]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
* mips-tdump.c: Replace CROSS_COMPILE with
[thirdparty/gcc.git] / gcc / configure
CommitLineData
71661611 1#! /bin/sh
071cd279 2# Guess values for system-dependent variables and create Makefiles.
0713dc29 3# Generated by GNU Autoconf 2.59.
071cd279 4#
0713dc29 5# Copyright (C) 2003 Free Software Foundation, Inc.
071cd279 6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
6a8964db 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+"$@"}'='"$@"'
0713dc29 19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
6a8964db 21fi
9ebd0bb2 22DUALCASE=1; export DUALCASE # for MKS sh
6a8964db 23
24# Support unset when possible.
9ebd0bb2 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6a8964db 26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
0713dc29 33$as_unset ENV MAIL MAILPATH
6a8964db 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
9ebd0bb2 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6a8964db 45 eval $as_var=C; export $as_var
46 else
0713dc29 47 $as_unset $as_var
6a8964db 48 fi
49done
50
51# Required to use basename.
0713dc29 52if expr a : '\(a\)' >/dev/null 2>&1; then
6a8964db 53 as_expr=expr
54else
55 as_expr=false
56fi
57
0713dc29 58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
6a8964db 59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
0713dc29 66as_me=`$as_basename "$0" ||
6a8964db 67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
0713dc29 69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
6a8964db 71echo X/"$0" |
0713dc29 72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
6a8964db 76
77
0713dc29 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
6a8964db 85
0713dc29 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
84eba009 97fi
98
84eba009 99
0713dc29 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
84eba009 116
0713dc29 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 '')
6a8964db 130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
0713dc29 131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
6a8964db 132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
0713dc29 135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
6a8964db 137 /*)
0713dc29 138 if ("$as_dir/$as_base" -c '
84eba009 139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
0713dc29 141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
84eba009 142 test "x$as_lineno_1" != "x$as_lineno_2" &&
0713dc29 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
6a8964db 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
0713dc29 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.
6a8964db 162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
0713dc29 163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
6a8964db 165 sed '
166 N
0713dc29 167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
6a8964db 170 t loop
0713dc29 171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
6a8964db 173 ' >$as_me.lineno &&
0713dc29 174 chmod +x $as_me.lineno ||
6a8964db 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
0713dc29 180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
6a8964db 182 # Exit status is that of the last command.
183 exit
184}
185
186
0713dc29 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= ;;
6a8964db 192esac
193
0713dc29 194if expr a : '\(a\)' >/dev/null 2>&1; then
6a8964db 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
0713dc29 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
6a8964db 207 as_ln_s='cp -p'
0713dc29 208 else
209 as_ln_s='ln -s'
210 fi
6a8964db 211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
0713dc29 216rm -f conf$$ conf$$.exe conf$$.file
071cd279 217
6a8964db 218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
9ebd0bb2 221 test -d ./-p && rmdir ./-p
6a8964db 222 as_mkdir_p=false
223fi
224
0713dc29 225as_executable_p="test -f"
6a8964db 226
227# Sed expression to map a string onto a valid CPP name.
9ebd0bb2 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
6a8964db 229
230# Sed expression to map a string onto a valid variable name.
9ebd0bb2 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
6a8964db 232
233
0713dc29 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
6a8964db 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
0713dc29 249exec 6>&1
250
6a8964db 251#
252# Initializations.
253#
071cd279 254ac_default_prefix=/usr/local
6a8964db 255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
0713dc29 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
6a8964db 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>
0713dc29 303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
6a8964db 307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
0713dc29 312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn cxx_compat_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_selected_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
6a8964db 313ac_subst_files='language_hooks'
071cd279 314
315# Initialize some variables set by options.
6a8964db 316ac_init_help=
317ac_init_version=false
071cd279 318# The variables have the same names as the options, with
319# dashes changed to underlines.
6a8964db 320cache_file=/dev/null
071cd279 321exec_prefix=NONE
071cd279 322no_create=
071cd279 323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
071cd279 331verbose=
332x_includes=NONE
333x_libraries=NONE
6a8964db 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.
071cd279 340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
0713dc29 343datadir='${prefix}/share'
071cd279 344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
0713dc29 347libdir='${exec_prefix}/lib'
071cd279 348includedir='${prefix}/include'
349oldincludedir='/usr/include'
0713dc29 350infodir='${prefix}/info'
351mandir='${prefix}/man'
071cd279 352
071cd279 353ac_prev=
354for ac_option
355do
071cd279 356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
0713dc29 358 eval "$ac_prev=\$ac_option"
071cd279 359 ac_prev=
360 continue
361 fi
362
0713dc29 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
071cd279 364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
0713dc29 367 case $ac_option in
071cd279 368
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
6a8964db 372 bindir=$ac_optarg ;;
071cd279 373
374 -build | --build | --buil | --bui | --bu)
6a8964db 375 ac_prev=build_alias ;;
071cd279 376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
6a8964db 377 build_alias=$ac_optarg ;;
071cd279 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=*)
6a8964db 384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
071cd279 388
0713dc29 389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
071cd279 390 ac_prev=datadir ;;
0713dc29 391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
6a8964db 393 datadir=$ac_optarg ;;
071cd279 394
395 -disable-* | --disable-*)
6a8964db 396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
071cd279 397 # Reject names that are not valid shell variable names.
6a8964db 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'`
0713dc29 402 eval "enable_$ac_feature=no" ;;
071cd279 403
404 -enable-* | --enable-*)
6a8964db 405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
071cd279 406 # Reject names that are not valid shell variable names.
6a8964db 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'`
0713dc29 411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
413 *) ac_optarg=yes ;;
414 esac
415 eval "enable_$ac_feature='$ac_optarg'" ;;
071cd279 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=*)
6a8964db 424 exec_prefix=$ac_optarg ;;
071cd279 425
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
429
6a8964db 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 ;;
071cd279 436
437 -host | --host | --hos | --ho)
6a8964db 438 ac_prev=host_alias ;;
071cd279 439 -host=* | --host=* | --hos=* | --ho=*)
6a8964db 440 host_alias=$ac_optarg ;;
071cd279 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=*)
6a8964db 447 includedir=$ac_optarg ;;
071cd279 448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
6a8964db 452 infodir=$ac_optarg ;;
071cd279 453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
6a8964db 457 libdir=$ac_optarg ;;
071cd279 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=*)
6a8964db 464 libexecdir=$ac_optarg ;;
071cd279 465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
0713dc29 467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
071cd279 469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
0713dc29 471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
6a8964db 473 localstatedir=$ac_optarg ;;
071cd279 474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
6a8964db 478 mandir=$ac_optarg ;;
071cd279 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 \
6a8964db 485 | --no-cr | --no-c | -n)
071cd279 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=*)
6a8964db 499 oldincludedir=$ac_optarg ;;
071cd279 500
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6a8964db 504 prefix=$ac_optarg ;;
071cd279 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=*)
6a8964db 511 program_prefix=$ac_optarg ;;
071cd279 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=*)
6a8964db 518 program_suffix=$ac_optarg ;;
071cd279 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=*)
6a8964db 535 program_transform_name=$ac_optarg ;;
071cd279 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=*)
6a8964db 545 sbindir=$ac_optarg ;;
071cd279 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=*)
6a8964db 556 sharedstatedir=$ac_optarg ;;
071cd279 557
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
6a8964db 561 site=$ac_optarg ;;
071cd279 562
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6a8964db 566 srcdir=$ac_optarg ;;
071cd279 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=*)
6a8964db 573 sysconfdir=$ac_optarg ;;
071cd279 574
575 -target | --target | --targe | --targ | --tar | --ta | --t)
6a8964db 576 ac_prev=target_alias ;;
071cd279 577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
6a8964db 578 target_alias=$ac_optarg ;;
071cd279 579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
6a8964db 583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
071cd279 585
586 -with-* | --with-*)
6a8964db 587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
071cd279 588 # Reject names that are not valid shell variable names.
6a8964db 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; }; }
071cd279 592 ac_package=`echo $ac_package| sed 's/-/_/g'`
0713dc29 593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
595 *) ac_optarg=yes ;;
596 esac
597 eval "with_$ac_package='$ac_optarg'" ;;
071cd279 598
599 -without-* | --without-*)
6a8964db 600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
071cd279 601 # Reject names that are not valid shell variable names.
6a8964db 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'`
0713dc29 606 eval "with_$ac_package=no" ;;
071cd279 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=*)
6a8964db 617 x_includes=$ac_optarg ;;
071cd279 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=*)
6a8964db 624 x_libraries=$ac_optarg ;;
071cd279 625
6a8964db 626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
071cd279 629 ;;
630
6a8964db 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; }; }
0713dc29 637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
6a8964db 639 export $ac_envvar ;;
640
071cd279 641 *)
6a8964db 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}
071cd279 647 ;;
648
649 esac
650done
651
652if test -n "$ac_prev"; then
6a8964db 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; }; }
12b432e0 656fi
12b432e0 657
0713dc29 658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
071cd279 660do
0713dc29 661 eval ac_val=$`echo $ac_var`
6a8964db 662 case $ac_val in
0713dc29 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
668
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671 localstatedir libdir includedir oldincludedir infodir mandir
672do
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; }; };;
071cd279 678 esac
679done
680
6a8964db 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
c9cd172c 698
6a8964db 699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
071cd279 703
071cd279 704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707 ac_srcdir_defaulted=yes
0713dc29 708 # Try the directory containing this script, then its parent.
709 ac_confdir=`(dirname "$0") 2>/dev/null ||
6a8964db 710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9ebd0bb2 711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
0713dc29 713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
6a8964db 715echo X"$0" |
0713dc29 716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
071cd279 721 srcdir=$ac_confdir
0713dc29 722 if test ! -r $srcdir/$ac_unique_file; then
071cd279 723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
0713dc29 728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
6a8964db 731 { (exit 1); exit 1; }; }
0713dc29 732 else
733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
6a8964db 734 { (exit 1); exit 1; }; }
0713dc29 735 fi
736fi
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
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
12b432e0 781
6a8964db 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.
071cd279 790
6a8964db 791Usage: $0 [OPTION]... [VAR=VALUE]...
071cd279 792
6a8964db 793To assign environment variables (e.g., CC, CFLAGS...), specify them as
794VAR=VALUE. See below for descriptions of some of the useful variables.
071cd279 795
6a8964db 796Defaults for the options are specified in brackets.
071cd279 797
6a8964db 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
0713dc29 809_ACEOF
810
811 cat <<_ACEOF
6a8964db 812Installation directories:
813 --prefix=PREFIX install architecture-independent files in PREFIX
9ebd0bb2 814 [$ac_default_prefix]
6a8964db 815 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
9ebd0bb2 816 [PREFIX]
071cd279 817
6a8964db 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'.
1c6c0617 822
6a8964db 823For better control, use the options below.
1c6c0617 824
6a8964db 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]
0713dc29 829 --datadir=DIR read-only architecture-independent data [PREFIX/share]
6a8964db 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]
0713dc29 836 --infodir=DIR info documentation [PREFIX/info]
837 --mandir=DIR man documentation [PREFIX/man]
6a8964db 838_ACEOF
1c6c0617 839
6a8964db 840 cat <<\_ACEOF
1c6c0617 841
6a8964db 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
1c6c0617 846
6a8964db 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
1c6c0617 852fi
853
6a8964db 854if test -n "$ac_init_help"; then
1c6c0617 855
6a8964db 856 cat <<\_ACEOF
1c6c0617 857
6a8964db 858Optional Features:
859 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
860 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
a6b4c5a9 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.
c0c5068d 865 --enable-werror-always enable -Werror always
6a8964db 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.
5391b316 870 Categories are: yes,no,all,none,release.
871 Flags are: assert,fold,gc,gcac,misc,
872 rtlflag,rtl,runtime,tree,valgrind.
0acc9e9d 873 --enable-mapped-location location_t is fileline integer cookie
6a8964db 874 --enable-coverage=LEVEL
36d91445 875 enable compiler's code coverage collection.
6a8964db 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++
e38498a2 883 --enable-decimal-float enable decimal float extension to C
6a8964db 884 --enable-threads enable thread usage for target GCC
885 --enable-threads=LIB use LIB thread package for target GCC
c024e802 886 --enable-tls enable or disable generation of tls code
887 overriding the assembler check for tls support
6a8964db 888 --enable-objc-gc enable the use of Boehm's garbage collector with
889 the GNU Objective-C runtime
890 --disable-shared don't provide a shared libgcc
891 --enable-intermodule build the compiler in one step
5222575c 892 --enable-languages=LIST specify which front-ends to build
e5d424c9 893 --disable-rpath do not hardcode runtime library paths
6a8964db 894 --enable-initfini-array use .init_array/.fini_array sections
895 --enable-sjlj-exceptions
896 arrange to use setjmp/longjmp exception handling
197f58fa 897 --enable-secureplt enable -msecure-plt by default for PowerPC
6a8964db 898 --disable-win32-registry
899 disable lookup of installation paths in the
900 Registry on Windows hosts
901 --enable-win32-registry enable registry lookup (default)
902 --enable-win32-registry=KEY
903 use KEY instead of GCC version as the last portion
904 of the registry key
905 --enable-maintainer-mode
906 enable make rules and dependencies not useful
907 (and sometimes confusing) to the casual installer
908 --enable-version-specific-runtime-libs
909 specify that runtime libraries should be
910 installed in a compiler-specific directory
9af7c2e2 911
6a8964db 912Optional Packages:
913 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
914 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
5dee13c2 915 --with-build-libsubdir=DIR Directory where to find libraries for build system
6a8964db 916 --with-local-prefix=DIR specifies directory to put local include
917 --with-gxx-include-dir=DIR
918 specifies directory to put g++ header files
919 --with-cpp-install-dir=DIR
920 install the user visible C preprocessor in DIR
921 (relative to PREFIX) as well as PREFIX/bin
922 --with-gnu-ld arrange to work with GNU ld.
923 --with-ld arrange to use the specified ld (full pathname)
9c948bc2 924 --with-demangler-in-ld try to use demangler in GNU ld.
6a8964db 925 --with-gnu-as arrange to work with GNU as
926 --with-as arrange to use the specified as (full pathname)
927 --with-stabs arrange to use stabs instead of host debug format
928 --with-dwarf2 force the default debug format to be DWARF 2
a99be165 929 --with-build-sysroot=sysroot
930 use sysroot as the system root during the build
6a8964db 931 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
e5d424c9 932 --with-gnu-ld assume the C compiler uses GNU ld default=no
933 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
934 --without-libiconv-prefix don't search for libiconv in includedir and libdir
8bdf23ae 935 --with-system-libunwind use installed libunwind
2dde0cc6 936 --with-long-double-128 Use 128-bit long double by default.
180e93cf 937 --with-gc={page,zone} choose the garbage collection mechanism to use
6a8964db 938 with the compiler
939 --with-system-zlib use installed libz
85690e4d 940 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
941 --with-datarootdir=DIR Use DIR as the data root [PREFIX/share]
942 --with-docdir=DIR Install documentation in DIR [DATAROOTDIR]
943 --with-htmldir=DIR html documentation in in DIR [DOCDIR]
1c6c0617 944
6a8964db 945Some influential environment variables:
946 CC C compiler command
947 CFLAGS C compiler flags
948 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
949 nonstandard directory <lib dir>
0713dc29 950 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
951 headers in a nonstandard directory <include dir>
6a8964db 952 CPP C preprocessor
4ee9c684 953 GMPLIBS How to link GMP
954 GMPINC How to find GMP include files
1c6c0617 955
6a8964db 956Use these variables to override the choices made by `configure' or to help
957it to find libraries and programs with nonstandard names/locations.
966842d4 958
6a8964db 959_ACEOF
960fi
c9cd172c 961
6a8964db 962if test "$ac_init_help" = "recursive"; then
963 # If there are subdirs, report their specific --help.
0713dc29 964 ac_popdir=`pwd`
6a8964db 965 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
0713dc29 966 test -d $ac_dir || continue
6a8964db 967 ac_builddir=.
968
0713dc29 969if test "$ac_dir" != .; then
6a8964db 970 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
0713dc29 971 # A "../" for each directory in $ac_dir_suffix.
972 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
973else
974 ac_dir_suffix= ac_top_builddir=
975fi
6a8964db 976
977case $srcdir in
0713dc29 978 .) # No --srcdir option. We are building in place.
6a8964db 979 ac_srcdir=.
0713dc29 980 if test -z "$ac_top_builddir"; then
981 ac_top_srcdir=.
982 else
983 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
984 fi ;;
985 [\\/]* | ?:[\\/]* ) # Absolute path.
6a8964db 986 ac_srcdir=$srcdir$ac_dir_suffix;
0713dc29 987 ac_top_srcdir=$srcdir ;;
988 *) # Relative path.
989 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
990 ac_top_srcdir=$ac_top_builddir$srcdir ;;
991esac
992
993# Do not use `cd foo && pwd` to compute absolute paths, because
994# the directories may not exist.
995case `pwd` in
996.) ac_abs_builddir="$ac_dir";;
997*)
998 case "$ac_dir" in
999 .) ac_abs_builddir=`pwd`;;
1000 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1001 *) ac_abs_builddir=`pwd`/"$ac_dir";;
1002 esac;;
1003esac
1004case $ac_abs_builddir in
1005.) ac_abs_top_builddir=${ac_top_builddir}.;;
1006*)
1007 case ${ac_top_builddir}. in
1008 .) ac_abs_top_builddir=$ac_abs_builddir;;
1009 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1010 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1011 esac;;
1012esac
1013case $ac_abs_builddir in
1014.) ac_abs_srcdir=$ac_srcdir;;
1015*)
1016 case $ac_srcdir in
1017 .) ac_abs_srcdir=$ac_abs_builddir;;
1018 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1019 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1020 esac;;
1021esac
1022case $ac_abs_builddir in
1023.) ac_abs_top_srcdir=$ac_top_srcdir;;
1024*)
1025 case $ac_top_srcdir in
1026 .) ac_abs_top_srcdir=$ac_abs_builddir;;
1027 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1028 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1029 esac;;
9ebd0bb2 1030esac
0713dc29 1031
1032 cd $ac_dir
1033 # Check for guested configure; otherwise get Cygnus style configure.
1034 if test -f $ac_srcdir/configure.gnu; then
1035 echo
1036 $SHELL $ac_srcdir/configure.gnu --help=recursive
1037 elif test -f $ac_srcdir/configure; then
1038 echo
1039 $SHELL $ac_srcdir/configure --help=recursive
1040 elif test -f $ac_srcdir/configure.ac ||
1041 test -f $ac_srcdir/configure.in; then
1042 echo
1043 $ac_configure --help
6a8964db 1044 else
1045 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
0713dc29 1046 fi
1047 cd $ac_popdir
6a8964db 1048 done
1049fi
1050
0713dc29 1051test -n "$ac_init_help" && exit 0
6a8964db 1052if $ac_init_version; then
1053 cat <<\_ACEOF
1054
0713dc29 1055Copyright (C) 2003 Free Software Foundation, Inc.
6a8964db 1056This configure script is free software; the Free Software Foundation
1057gives unlimited permission to copy, distribute and modify it.
1058_ACEOF
0713dc29 1059 exit 0
6a8964db 1060fi
0713dc29 1061exec 5>config.log
1062cat >&5 <<_ACEOF
6a8964db 1063This file contains any messages produced by compilers while
1064running configure, to aid debugging if configure makes a mistake.
1065
1066It was created by $as_me, which was
0713dc29 1067generated by GNU Autoconf 2.59. Invocation command line was
6a8964db 1068
1069 $ $0 $@
1070
1071_ACEOF
1072{
1073cat <<_ASUNAME
1074## --------- ##
1075## Platform. ##
1076## --------- ##
1077
1078hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1079uname -m = `(uname -m) 2>/dev/null || echo unknown`
1080uname -r = `(uname -r) 2>/dev/null || echo unknown`
1081uname -s = `(uname -s) 2>/dev/null || echo unknown`
1082uname -v = `(uname -v) 2>/dev/null || echo unknown`
1083
1084/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1085/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1086
1087/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1088/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1089/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
0713dc29 1090hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
6a8964db 1091/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1092/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1093/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1094
1095_ASUNAME
1096
1097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1098for as_dir in $PATH
1099do
1100 IFS=$as_save_IFS
1101 test -z "$as_dir" && as_dir=.
1102 echo "PATH: $as_dir"
1103done
1104
1105} >&5
1106
1107cat >&5 <<_ACEOF
1108
1109
1110## ----------- ##
1111## Core tests. ##
1112## ----------- ##
1113
1114_ACEOF
1115
1116
1117# Keep a trace of the command line.
1118# Strip out --no-create and --no-recursion so they do not pile up.
1119# Strip out --silent because we don't want to record it for future runs.
1120# Also quote any args containing shell meta-characters.
1121# Make two passes to allow for proper duplicate-argument suppression.
1122ac_configure_args=
1123ac_configure_args0=
1124ac_configure_args1=
0713dc29 1125ac_sep=
6a8964db 1126ac_must_keep_next=false
1127for ac_pass in 1 2
1128do
1129 for ac_arg
1130 do
1131 case $ac_arg in
1132 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1133 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1134 | -silent | --silent | --silen | --sile | --sil)
1135 continue ;;
0713dc29 1136 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
6a8964db 1137 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1138 esac
1139 case $ac_pass in
1140 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1141 2)
1142 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1143 if test $ac_must_keep_next = true; then
9ebd0bb2 1144 ac_must_keep_next=false # Got value, back to normal.
6a8964db 1145 else
9ebd0bb2 1146 case $ac_arg in
1147 *=* | --config-cache | -C | -disable-* | --disable-* \
1148 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1149 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1150 | -with-* | --with-* | -without-* | --without-* | --x)
1151 case "$ac_configure_args0 " in
1152 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1153 esac
1154 ;;
1155 -* ) ac_must_keep_next=true ;;
1156 esac
6a8964db 1157 fi
0713dc29 1158 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1159 # Get rid of the leading space.
1160 ac_sep=" "
6a8964db 1161 ;;
1162 esac
1163 done
1164done
1165$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1166$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1167
1168# When interrupted or exit'd, cleanup temporary files, and complete
1169# config.log. We remove comments because anyway the quotes in there
1170# would cause problems or look ugly.
0713dc29 1171# WARNING: Be sure not to use single quotes in there, as some shells,
1172# such as our DU 5.0 friend, will then `close' the trap.
6a8964db 1173trap 'exit_status=$?
1174 # Save into config.log some information that might help in debugging.
1175 {
1176 echo
1177
1178 cat <<\_ASBOX
1179## ---------------- ##
1180## Cache variables. ##
1181## ---------------- ##
1182_ASBOX
1183 echo
1184 # The following way of writing the cache mishandles newlines in values,
0713dc29 1185{
6a8964db 1186 (set) 2>&1 |
0713dc29 1187 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1188 *ac_space=\ *)
6a8964db 1189 sed -n \
0713dc29 1190 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1191 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1192 ;;
6a8964db 1193 *)
0713dc29 1194 sed -n \
1195 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
6a8964db 1196 ;;
0713dc29 1197 esac;
1198}
6a8964db 1199 echo
1200
1201 cat <<\_ASBOX
1202## ----------------- ##
1203## Output variables. ##
1204## ----------------- ##
1205_ASBOX
1206 echo
1207 for ac_var in $ac_subst_vars
1208 do
0713dc29 1209 eval ac_val=$`echo $ac_var`
1210 echo "$ac_var='"'"'$ac_val'"'"'"
6a8964db 1211 done | sort
1212 echo
1213
1214 if test -n "$ac_subst_files"; then
1215 cat <<\_ASBOX
0713dc29 1216## ------------- ##
1217## Output files. ##
1218## ------------- ##
6a8964db 1219_ASBOX
1220 echo
1221 for ac_var in $ac_subst_files
1222 do
0713dc29 1223 eval ac_val=$`echo $ac_var`
1224 echo "$ac_var='"'"'$ac_val'"'"'"
6a8964db 1225 done | sort
1226 echo
1227 fi
1228
1229 if test -s confdefs.h; then
1230 cat <<\_ASBOX
1231## ----------- ##
1232## confdefs.h. ##
1233## ----------- ##
1234_ASBOX
1235 echo
0713dc29 1236 sed "/^$/d" confdefs.h | sort
6a8964db 1237 echo
1238 fi
1239 test "$ac_signal" != 0 &&
1240 echo "$as_me: caught signal $ac_signal"
1241 echo "$as_me: exit $exit_status"
1242 } >&5
0713dc29 1243 rm -f core *.core &&
1244 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
6a8964db 1245 exit $exit_status
0713dc29 1246 ' 0
6a8964db 1247for ac_signal in 1 2 13 15; do
1248 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1249done
1250ac_signal=0
1251
1252# confdefs.h avoids OS command line length limits that DEFS can exceed.
0713dc29 1253rm -rf conftest* confdefs.h
1254# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1255echo >confdefs.h
6a8964db 1256
1257# Predefined preprocessor variables.
1258
1259cat >>confdefs.h <<_ACEOF
1260#define PACKAGE_NAME "$PACKAGE_NAME"
1261_ACEOF
1262
1263
1264cat >>confdefs.h <<_ACEOF
1265#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1266_ACEOF
1267
1268
1269cat >>confdefs.h <<_ACEOF
1270#define PACKAGE_VERSION "$PACKAGE_VERSION"
1271_ACEOF
1272
1273
1274cat >>confdefs.h <<_ACEOF
1275#define PACKAGE_STRING "$PACKAGE_STRING"
1276_ACEOF
1277
1278
1279cat >>confdefs.h <<_ACEOF
1280#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1281_ACEOF
1282
1283
1284# Let the site file select an alternate cache file if it wants to.
1285# Prefer explicitly selected file to automatically selected ones.
0713dc29 1286if test -z "$CONFIG_SITE"; then
1287 if test "x$prefix" != xNONE; then
1288 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1289 else
1290 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1291 fi
6a8964db 1292fi
0713dc29 1293for ac_site_file in $CONFIG_SITE; do
6a8964db 1294 if test -r "$ac_site_file"; then
1295 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1296echo "$as_me: loading site script $ac_site_file" >&6;}
1297 sed 's/^/| /' "$ac_site_file" >&5
1298 . "$ac_site_file"
1299 fi
1300done
1301
1302if test -r "$cache_file"; then
1303 # Some versions of bash will fail to source /dev/null (special
1304 # files actually), so we avoid doing that.
1305 if test -f "$cache_file"; then
1306 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1307echo "$as_me: loading cache $cache_file" >&6;}
1308 case $cache_file in
0713dc29 1309 [\\/]* | ?:[\\/]* ) . $cache_file;;
1310 *) . ./$cache_file;;
6a8964db 1311 esac
1312 fi
1313else
1314 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1315echo "$as_me: creating cache $cache_file" >&6;}
1316 >$cache_file
1317fi
1318
1319# Check that the precious variables saved in the cache have kept the same
1320# value.
1321ac_cache_corrupted=false
0713dc29 1322for ac_var in `(set) 2>&1 |
1323 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
6a8964db 1324 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1325 eval ac_new_set=\$ac_env_${ac_var}_set
0713dc29 1326 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1327 eval ac_new_val="\$ac_env_${ac_var}_value"
6a8964db 1328 case $ac_old_set,$ac_new_set in
1329 set,)
1330 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1331echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1332 ac_cache_corrupted=: ;;
1333 ,set)
1334 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1335echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1336 ac_cache_corrupted=: ;;
1337 ,);;
1338 *)
1339 if test "x$ac_old_val" != "x$ac_new_val"; then
9ebd0bb2 1340 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
6a8964db 1341echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
9ebd0bb2 1342 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
6a8964db 1343echo "$as_me: former value: $ac_old_val" >&2;}
9ebd0bb2 1344 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
6a8964db 1345echo "$as_me: current value: $ac_new_val" >&2;}
9ebd0bb2 1346 ac_cache_corrupted=:
6a8964db 1347 fi;;
1348 esac
1349 # Pass precious variables to config.status.
1350 if test "$ac_new_set" = set; then
1351 case $ac_new_val in
0713dc29 1352 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1353 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
6a8964db 1354 *) ac_arg=$ac_var=$ac_new_val ;;
1355 esac
1356 case " $ac_configure_args " in
1357 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1358 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1359 esac
1360 fi
1361done
1362if $ac_cache_corrupted; then
1363 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1364echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1365 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1366echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1367 { (exit 1); exit 1; }; }
1368fi
1369
0713dc29 1370ac_ext=c
1371ac_cpp='$CPP $CPPFLAGS'
1372ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1373ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1374ac_compiler_gnu=$ac_cv_c_compiler_gnu
1375
6a8964db 1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1211e6bc 1394
0713dc29 1395 ac_config_headers="$ac_config_headers auto-host.h:config.in"
6a8964db 1396
1397
f32e3360 1398gcc_version=`cat $srcdir/BASE-VER`
1399
6a8964db 1400# Determine the host, build, and target systems
1401ac_aux_dir=
0713dc29 1402for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1403 if test -f $ac_dir/install-sh; then
6a8964db 1404 ac_aux_dir=$ac_dir
1405 ac_install_sh="$ac_aux_dir/install-sh -c"
1406 break
0713dc29 1407 elif test -f $ac_dir/install.sh; then
6a8964db 1408 ac_aux_dir=$ac_dir
1409 ac_install_sh="$ac_aux_dir/install.sh -c"
1410 break
0713dc29 1411 elif test -f $ac_dir/shtool; then
6a8964db 1412 ac_aux_dir=$ac_dir
1413 ac_install_sh="$ac_aux_dir/shtool install -c"
1414 break
1415 fi
1416done
1417if test -z "$ac_aux_dir"; then
0713dc29 1418 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1419echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
6a8964db 1420 { (exit 1); exit 1; }; }
1421fi
0713dc29 1422ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1423ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1424ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
6a8964db 1425
1426# Make sure we can run config.sub.
0713dc29 1427$ac_config_sub sun4 >/dev/null 2>&1 ||
1428 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1429echo "$as_me: error: cannot run $ac_config_sub" >&2;}
6a8964db 1430 { (exit 1); exit 1; }; }
1431
0713dc29 1432echo "$as_me:$LINENO: checking build system type" >&5
1433echo $ECHO_N "checking build system type... $ECHO_C" >&6
6a8964db 1434if test "${ac_cv_build+set}" = set; then
1435 echo $ECHO_N "(cached) $ECHO_C" >&6
1436else
0713dc29 1437 ac_cv_build_alias=$build_alias
1438test -z "$ac_cv_build_alias" &&
1439 ac_cv_build_alias=`$ac_config_guess`
1440test -z "$ac_cv_build_alias" &&
6a8964db 1441 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1442echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1443 { (exit 1); exit 1; }; }
0713dc29 1444ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1445 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1446echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
6a8964db 1447 { (exit 1); exit 1; }; }
1448
1449fi
0713dc29 1450echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1451echo "${ECHO_T}$ac_cv_build" >&6
6a8964db 1452build=$ac_cv_build
0713dc29 1453build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1454build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1455build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1456
1457
1458echo "$as_me:$LINENO: checking host system type" >&5
1459echo $ECHO_N "checking host system type... $ECHO_C" >&6
6a8964db 1460if test "${ac_cv_host+set}" = set; then
1461 echo $ECHO_N "(cached) $ECHO_C" >&6
1462else
0713dc29 1463 ac_cv_host_alias=$host_alias
1464test -z "$ac_cv_host_alias" &&
1465 ac_cv_host_alias=$ac_cv_build_alias
1466ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1467 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1468echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
6a8964db 1469 { (exit 1); exit 1; }; }
1470
1471fi
0713dc29 1472echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1473echo "${ECHO_T}$ac_cv_host" >&6
6a8964db 1474host=$ac_cv_host
0713dc29 1475host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1476host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1477host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1478
1479
1480echo "$as_me:$LINENO: checking target system type" >&5
1481echo $ECHO_N "checking target system type... $ECHO_C" >&6
6a8964db 1482if test "${ac_cv_target+set}" = set; then
1483 echo $ECHO_N "(cached) $ECHO_C" >&6
1484else
0713dc29 1485 ac_cv_target_alias=$target_alias
1486test "x$ac_cv_target_alias" = "x" &&
1487 ac_cv_target_alias=$ac_cv_host_alias
1488ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1489 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1490echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
6a8964db 1491 { (exit 1); exit 1; }; }
1492
1493fi
0713dc29 1494echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1495echo "${ECHO_T}$ac_cv_target" >&6
6a8964db 1496target=$ac_cv_target
0713dc29 1497target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1498target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1499target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
6a8964db 1500
1501
1502# The aliases save the names the user supplied, while $host etc.
1503# will get canonicalized.
1504test -n "$target_alias" &&
1505 test "$program_prefix$program_suffix$program_transform_name" = \
1506 NONENONEs,x,x, &&
1507 program_prefix=${target_alias}-
1508
1509# Determine the noncanonical target name, for directory use.
b1ef404e 1510 case ${build_alias} in
1511 "") build_noncanonical=${build} ;;
1512 *) build_noncanonical=${build_alias} ;;
1513esac
1514
1515 case ${host_alias} in
1516 "") host_noncanonical=${build_noncanonical} ;;
1517 *) host_noncanonical=${host_alias} ;;
1518esac
1519
1520 case ${target_alias} in
1521 "") target_noncanonical=${host_noncanonical} ;;
1522 *) target_noncanonical=${target_alias} ;;
1523esac
1524
1525
1526
c2c28e49 1527
1528# Determine the target- and build-specific subdirectories
3e427a9c 1529
1530# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
1531# have matching libraries, they should use host libraries: Makefile.tpl
1532# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
1533# However, they still use the build modules, because the corresponding
1534# host modules (e.g. bison) are only built for the host when bootstrap
1535# finishes. So:
1536# - build_subdir is where we find build modules, and never changes.
1537# - build_libsubdir is where we find build libraries, and can be overridden.
1538
1539# Prefix 'build-' so this never conflicts with target_subdir.
b1ef404e 1540build_subdir="build-${build_noncanonical}"
5dee13c2 1541
0713dc29 1542# Check whether --with-build-libsubdir or --without-build-libsubdir was given.
5dee13c2 1543if test "${with_build_libsubdir+set}" = set; then
0713dc29 1544 withval="$with_build_libsubdir"
1545 build_libsubdir="$withval"
5dee13c2 1546else
1547 build_libsubdir="$build_subdir"
0713dc29 1548fi;
b1ef404e 1549# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1550if ( test $srcdir = . && test -d gcc ) \
1551 || test -d $srcdir/../host-${host_noncanonical}; then
1552 host_subdir="host-${host_noncanonical}"
1553else
1554 host_subdir=.
1555fi
1556# No prefix.
1557target_subdir=${target_noncanonical}
1558
966842d4 1559
9af7c2e2 1560# Set program_transform_name
1c6c0617 1561test "$program_prefix" != NONE &&
0713dc29 1562 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1c6c0617 1563# Use a double $ so make ignores it.
1564test "$program_suffix" != NONE &&
0713dc29 1565 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
6a8964db 1566# Double any \ or $. echo might interpret backslashes.
1567# By default was `s,x,x', remove it if useless.
1568cat <<\_ACEOF >conftest.sed
1569s/[\\$]/&&/g;s/;s,x,x,$//
1570_ACEOF
1571program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
0713dc29 1572rm conftest.sed
1c6c0617 1573
1574
7349ace9 1575# Check for bogus environment variables.
1576# Test if LIBRARY_PATH contains the notation for the current directory
1577# since this would lead to problems installing/building glibc.
1578# LIBRARY_PATH 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
0713dc29 1583echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1584echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
7349ace9 1585case ${LIBRARY_PATH} in
1586 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1587 library_path_setting="contains current directory"
1588 ;;
1589 *)
1590 library_path_setting="ok"
1591 ;;
1592esac
0713dc29 1593echo "$as_me:$LINENO: result: $library_path_setting" >&5
1594echo "${ECHO_T}$library_path_setting" >&6
7349ace9 1595if test "$library_path_setting" != "ok"; then
6a8964db 1596{ { echo "$as_me:$LINENO: error:
7349ace9 1597*** LIBRARY_PATH shouldn't contain the current directory when
1598*** building gcc. Please change the environment variable
6a8964db 1599*** and run configure again." >&5
1600echo "$as_me: error:
1601*** LIBRARY_PATH shouldn't contain the current directory when
1602*** building gcc. Please change the environment variable
1603*** and run configure again." >&2;}
1604 { (exit 1); exit 1; }; }
0dbd1c74 1605fi
1606
7349ace9 1607# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1608# since this would lead to problems installing/building glibc.
1609# GCC_EXEC_PREFIX contains the current directory if one of the following
1610# is true:
1611# - one of the terminals (":" and ";") is the first or last sign
1612# - two terminals occur directly after each other
1613# - the path contains an element with a dot in it
0713dc29 1614echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1615echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
7349ace9 1616case ${GCC_EXEC_PREFIX} in
1617 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1618 gcc_exec_prefix_setting="contains current directory"
1619 ;;
1620 *)
1621 gcc_exec_prefix_setting="ok"
1622 ;;
1623esac
0713dc29 1624echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1625echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
7349ace9 1626if test "$gcc_exec_prefix_setting" != "ok"; then
6a8964db 1627{ { echo "$as_me:$LINENO: error:
1628*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1629*** building gcc. Please change the environment variable
1630*** and run configure again." >&5
1631echo "$as_me: error:
c9e1a048 1632*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1633*** building gcc. Please change the environment variable
6a8964db 1634*** and run configure again." >&2;}
1635 { (exit 1); exit 1; }; }
7349ace9 1636fi
1637
1638# -----------
1639# Directories
1640# -----------
1641
1642# Specify the local prefix
1643local_prefix=
6a8964db 1644
0713dc29 1645# Check whether --with-local-prefix or --without-local-prefix was given.
7349ace9 1646if test "${with_local_prefix+set}" = set; then
0713dc29 1647 withval="$with_local_prefix"
1648 case "${withval}" in
6a8964db 1649yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1650echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1651 { (exit 1); exit 1; }; } ;;
7349ace9 1652no) ;;
1653*) local_prefix=$with_local_prefix ;;
1654esac
0713dc29 1655fi;
7349ace9 1656
1657# Default local prefix if it is empty
1658if test x$local_prefix = x; then
1659 local_prefix=/usr/local
1660fi
1661
1662# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1663# passed in by the toplevel make and thus we'd get different behavior
1664# depending on where we built the sources.
1665gcc_gxx_include_dir=
1666# Specify the g++ header file directory
6a8964db 1667
0713dc29 1668# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
7349ace9 1669if test "${with_gxx_include_dir+set}" = set; then
0713dc29 1670 withval="$with_gxx_include_dir"
1671 case "${withval}" in
6a8964db 1672yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1673echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1674 { (exit 1); exit 1; }; } ;;
7349ace9 1675no) ;;
1676*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1677esac
0713dc29 1678fi;
7349ace9 1679
0bf9691e 1680# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
7349ace9 1681if test x${gcc_gxx_include_dir} = x; then
1682 if test x${enable_version_specific_runtime_libs} = xyes; then
1683 gcc_gxx_include_dir='${libsubdir}/include/c++'
1684 else
0bf9691e 1685 libstdcxx_incdir='include/c++/$(version)'
1686 if test x$host != x$target; then
1687 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
1688 fi
1689 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/$libstdcxx_incdir"
7349ace9 1690 fi
1691fi
1692
6a8964db 1693
0713dc29 1694# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
7349ace9 1695if test "${with_cpp_install_dir+set}" = set; then
0713dc29 1696 withval="$with_cpp_install_dir"
1697 if test x$withval = xyes; then
6a8964db 1698 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1699echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1700 { (exit 1); exit 1; }; }
7349ace9 1701elif test x$withval != xno; then
1702 cpp_install_dir=$withval
1703fi
0713dc29 1704fi;
7349ace9 1705
37c96b91 1706# We would like to our source tree to be readonly. However when releases or
6a8964db 1707# pre-releases are generated, the flex/bison generated files as well as the
37c96b91 1708# various formats of manuals need to be included along with the rest of the
6a8964db 1709# sources. Therefore we have --enable-generated-files-in-srcdir to do
37c96b91 1710# just that.
1711
0713dc29 1712echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1713echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1714 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
37c96b91 1715if test "${enable_generated_files_in_srcdir+set}" = set; then
0713dc29 1716 enableval="$enable_generated_files_in_srcdir"
1717 generated_files_in_srcdir=$enableval
37c96b91 1718else
a6b4c5a9 1719 generated_files_in_srcdir=no
0713dc29 1720fi;
84eba009 1721
0713dc29 1722echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1723echo "${ECHO_T}$generated_files_in_srcdir" >&6
a6b4c5a9 1724
1725if test "$generated_files_in_srcdir" = "yes"; then
1726 GENINSRC=''
a6b4c5a9 1727else
1728 GENINSRC='#'
a6b4c5a9 1729fi
1730
1731
7349ace9 1732# -------------------
1733# Find default linker
1734# -------------------
1735
1736# With GNU ld
6a8964db 1737
0713dc29 1738# Check whether --with-gnu-ld or --without-gnu-ld was given.
7349ace9 1739if test "${with_gnu_ld+set}" = set; then
0713dc29 1740 withval="$with_gnu_ld"
1741 gnu_ld_flag="$with_gnu_ld"
7349ace9 1742else
1743 gnu_ld_flag=no
0713dc29 1744fi;
c9cd172c 1745
12b432e0 1746# With pre-defined ld
6a8964db 1747
0713dc29 1748# Check whether --with-ld or --without-ld was given.
7349ace9 1749if test "${with_ld+set}" = set; then
0713dc29 1750 withval="$with_ld"
1751 DEFAULT_LINKER="$with_ld"
1752fi;
7349ace9 1753if test x"${DEFAULT_LINKER+set}" = x"set"; then
1754 if test ! -x "$DEFAULT_LINKER"; then
b452b31a 1755 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1756echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1757 { (exit 1); exit 1; }; }
7349ace9 1758 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1759 gnu_ld_flag=yes
1760 fi
6a8964db 1761
1762cat >>confdefs.h <<_ACEOF
7349ace9 1763#define DEFAULT_LINKER "$DEFAULT_LINKER"
6a8964db 1764_ACEOF
7349ace9 1765
1766fi
1767
0713dc29 1768echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1769echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
7349ace9 1770if test x"${DEFAULT_LINKER+set}" = x"set"; then
1771 if test x"$gnu_ld_flag" = x"no"; then
0713dc29 1772 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1773echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
7349ace9 1774 else
0713dc29 1775 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1776echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
7349ace9 1777 fi
1778else
0713dc29 1779 echo "$as_me:$LINENO: result: no" >&5
1780echo "${ECHO_T}no" >&6
7349ace9 1781fi
1782
9c948bc2 1783# With demangler in GNU ld
1784
0713dc29 1785# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
9c948bc2 1786if test "${with_demangler_in_ld+set}" = set; then
0713dc29 1787 withval="$with_demangler_in_ld"
1788 demangler_in_ld="$with_demangler_in_ld"
9c948bc2 1789else
1790 demangler_in_ld=no
0713dc29 1791fi;
9c948bc2 1792
7349ace9 1793# ----------------------
1794# Find default assembler
1795# ----------------------
1796
1797# With GNU as
6a8964db 1798
0713dc29 1799# Check whether --with-gnu-as or --without-gnu-as was given.
7349ace9 1800if test "${with_gnu_as+set}" = set; then
0713dc29 1801 withval="$with_gnu_as"
1802 gas_flag="$with_gnu_as"
7349ace9 1803else
1804 gas_flag=no
0713dc29 1805fi;
7349ace9 1806
84eba009 1807
0713dc29 1808# Check whether --with-as or --without-as was given.
7349ace9 1809if test "${with_as+set}" = set; then
0713dc29 1810 withval="$with_as"
1811 DEFAULT_ASSEMBLER="$with_as"
1812fi;
7349ace9 1813if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1814 if test ! -x "$DEFAULT_ASSEMBLER"; then
b452b31a 1815 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1816echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1817 { (exit 1); exit 1; }; }
7349ace9 1818 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1819 gas_flag=yes
1820 fi
6a8964db 1821
1822cat >>confdefs.h <<_ACEOF
7349ace9 1823#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
6a8964db 1824_ACEOF
7349ace9 1825
1826fi
1827
0713dc29 1828echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1829echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
7349ace9 1830if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1831 if test x"$gas_flag" = x"no"; then
0713dc29 1832 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1833echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
7349ace9 1834 else
0713dc29 1835 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1836echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
7349ace9 1837 fi
1838else
0713dc29 1839 echo "$as_me:$LINENO: result: no" >&5
1840echo "${ECHO_T}no" >&6
7349ace9 1841fi
1842
1843# ---------------
1844# Find C compiler
1845# ---------------
1846
f7a804c7 1847# If a non-executable a.out is present (e.g. created by GNU as above even if
1848# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1849# file, even when creating an executable, so an execution test fails.
1850# Remove possible default executable files to avoid this.
1851#
1852# FIXME: This really belongs into AC_PROG_CC and can be removed once
1853# Autoconf includes it.
1854rm -f a.out a.exe b.out
1855
7349ace9 1856# Find the native compiler
6a8964db 1857ac_ext=c
1858ac_cpp='$CPP $CPPFLAGS'
1859ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1860ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1861ac_compiler_gnu=$ac_cv_c_compiler_gnu
1862if test -n "$ac_tool_prefix"; then
1863 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1864set dummy ${ac_tool_prefix}gcc; ac_word=$2
0713dc29 1865echo "$as_me:$LINENO: checking for $ac_word" >&5
1866echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6a8964db 1867if test "${ac_cv_prog_CC+set}" = set; then
1868 echo $ECHO_N "(cached) $ECHO_C" >&6
1869else
1870 if test -n "$CC"; then
1871 ac_cv_prog_CC="$CC" # Let the user override the test.
1872else
1873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1874for as_dir in $PATH
1875do
1876 IFS=$as_save_IFS
1877 test -z "$as_dir" && as_dir=.
1878 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 1879 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6a8964db 1880 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1881 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1882 break 2
1883 fi
1884done
1885done
1886
1887fi
1888fi
1889CC=$ac_cv_prog_CC
1890if test -n "$CC"; then
0713dc29 1891 echo "$as_me:$LINENO: result: $CC" >&5
1892echo "${ECHO_T}$CC" >&6
6a8964db 1893else
0713dc29 1894 echo "$as_me:$LINENO: result: no" >&5
1895echo "${ECHO_T}no" >&6
6a8964db 1896fi
1897
1898fi
1899if test -z "$ac_cv_prog_CC"; then
1900 ac_ct_CC=$CC
1901 # Extract the first word of "gcc", so it can be a program name with args.
c9cd172c 1902set dummy gcc; ac_word=$2
0713dc29 1903echo "$as_me:$LINENO: checking for $ac_word" >&5
1904echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6a8964db 1905if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1906 echo $ECHO_N "(cached) $ECHO_C" >&6
1907else
1908 if test -n "$ac_ct_CC"; then
1909 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1910else
1911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1912for as_dir in $PATH
1913do
1914 IFS=$as_save_IFS
1915 test -z "$as_dir" && as_dir=.
1916 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 1917 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6a8964db 1918 ac_cv_prog_ac_ct_CC="gcc"
1919 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1920 break 2
1921 fi
1922done
1923done
1924
1925fi
1926fi
1927ac_ct_CC=$ac_cv_prog_ac_ct_CC
1928if test -n "$ac_ct_CC"; then
0713dc29 1929 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1930echo "${ECHO_T}$ac_ct_CC" >&6
6a8964db 1931else
0713dc29 1932 echo "$as_me:$LINENO: result: no" >&5
1933echo "${ECHO_T}no" >&6
6a8964db 1934fi
1935
0713dc29 1936 CC=$ac_ct_CC
6a8964db 1937else
1938 CC="$ac_cv_prog_CC"
1939fi
1940
1941if test -z "$CC"; then
0713dc29 1942 if test -n "$ac_tool_prefix"; then
1943 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
6a8964db 1944set dummy ${ac_tool_prefix}cc; ac_word=$2
0713dc29 1945echo "$as_me:$LINENO: checking for $ac_word" >&5
1946echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6a8964db 1947if test "${ac_cv_prog_CC+set}" = set; then
1948 echo $ECHO_N "(cached) $ECHO_C" >&6
5f3760f6 1949else
1950 if test -n "$CC"; then
1951 ac_cv_prog_CC="$CC" # Let the user override the test.
1952else
6a8964db 1953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1954for as_dir in $PATH
1955do
1956 IFS=$as_save_IFS
1957 test -z "$as_dir" && as_dir=.
1958 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 1959 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6a8964db 1960 ac_cv_prog_CC="${ac_tool_prefix}cc"
1961 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1962 break 2
1963 fi
1964done
1965done
1966
5f3760f6 1967fi
1968fi
6a8964db 1969CC=$ac_cv_prog_CC
5f3760f6 1970if test -n "$CC"; then
0713dc29 1971 echo "$as_me:$LINENO: result: $CC" >&5
1972echo "${ECHO_T}$CC" >&6
6a8964db 1973else
0713dc29 1974 echo "$as_me:$LINENO: result: no" >&5
1975echo "${ECHO_T}no" >&6
6a8964db 1976fi
1977
0713dc29 1978fi
1979if test -z "$ac_cv_prog_CC"; then
1980 ac_ct_CC=$CC
1981 # Extract the first word of "cc", so it can be a program name with args.
1982set dummy cc; ac_word=$2
1983echo "$as_me:$LINENO: checking for $ac_word" >&5
1984echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1985if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1986 echo $ECHO_N "(cached) $ECHO_C" >&6
1987else
1988 if test -n "$ac_ct_CC"; then
1989 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1990else
1991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1992for as_dir in $PATH
1993do
1994 IFS=$as_save_IFS
1995 test -z "$as_dir" && as_dir=.
1996 for ac_exec_ext in '' $ac_executable_extensions; do
1997 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1998 ac_cv_prog_ac_ct_CC="cc"
1999 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2000 break 2
84eba009 2001 fi
0713dc29 2002done
2003done
2004
2005fi
2006fi
2007ac_ct_CC=$ac_cv_prog_ac_ct_CC
2008if test -n "$ac_ct_CC"; then
2009 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2010echo "${ECHO_T}$ac_ct_CC" >&6
2011else
2012 echo "$as_me:$LINENO: result: no" >&5
2013echo "${ECHO_T}no" >&6
2014fi
2015
2016 CC=$ac_ct_CC
2017else
2018 CC="$ac_cv_prog_CC"
2019fi
2020
6a8964db 2021fi
c9cd172c 2022if test -z "$CC"; then
2023 # Extract the first word of "cc", so it can be a program name with args.
2024set dummy cc; ac_word=$2
0713dc29 2025echo "$as_me:$LINENO: checking for $ac_word" >&5
2026echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6a8964db 2027if test "${ac_cv_prog_CC+set}" = set; then
2028 echo $ECHO_N "(cached) $ECHO_C" >&6
c9cd172c 2029else
2030 if test -n "$CC"; then
2031 ac_cv_prog_CC="$CC" # Let the user override the test.
2032else
2033 ac_prog_rejected=no
6a8964db 2034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2035for as_dir in $PATH
2036do
2037 IFS=$as_save_IFS
2038 test -z "$as_dir" && as_dir=.
2039 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 2040 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6a8964db 2041 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2042 ac_prog_rejected=yes
2043 continue
2044 fi
2045 ac_cv_prog_CC="cc"
2046 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2047 break 2
2048 fi
2049done
2050done
2051
c9cd172c 2052if test $ac_prog_rejected = yes; then
2053 # We found a bogon in the path, so make sure we never use it.
2054 set dummy $ac_cv_prog_CC
2055 shift
6a8964db 2056 if test $# != 0; then
c9cd172c 2057 # We chose a different compiler from the bogus one.
2058 # However, it has the same basename, so the bogon will be chosen
2059 # first if we set CC to just the basename; use the full file name.
2060 shift
6a8964db 2061 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
0dbd1c74 2062 fi
c9cd172c 2063fi
2064fi
2065fi
6a8964db 2066CC=$ac_cv_prog_CC
c9cd172c 2067if test -n "$CC"; then
0713dc29 2068 echo "$as_me:$LINENO: result: $CC" >&5
2069echo "${ECHO_T}$CC" >&6
0dbd1c74 2070else
0713dc29 2071 echo "$as_me:$LINENO: result: no" >&5
2072echo "${ECHO_T}no" >&6
0dbd1c74 2073fi
c9cd172c 2074
6a8964db 2075fi
2076if test -z "$CC"; then
2077 if test -n "$ac_tool_prefix"; then
0713dc29 2078 for ac_prog in cl
6a8964db 2079 do
2080 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2081set dummy $ac_tool_prefix$ac_prog; ac_word=$2
0713dc29 2082echo "$as_me:$LINENO: checking for $ac_word" >&5
2083echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6a8964db 2084if test "${ac_cv_prog_CC+set}" = set; then
2085 echo $ECHO_N "(cached) $ECHO_C" >&6
9af7c2e2 2086else
c9cd172c 2087 if test -n "$CC"; then
2088 ac_cv_prog_CC="$CC" # Let the user override the test.
2089else
6a8964db 2090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2091for as_dir in $PATH
2092do
2093 IFS=$as_save_IFS
2094 test -z "$as_dir" && as_dir=.
2095 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 2096 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6a8964db 2097 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2098 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2099 break 2
2100 fi
2101done
2102done
2103
9af7c2e2 2104fi
c9cd172c 2105fi
6a8964db 2106CC=$ac_cv_prog_CC
c9cd172c 2107if test -n "$CC"; then
0713dc29 2108 echo "$as_me:$LINENO: result: $CC" >&5
2109echo "${ECHO_T}$CC" >&6
c9cd172c 2110else
0713dc29 2111 echo "$as_me:$LINENO: result: no" >&5
2112echo "${ECHO_T}no" >&6
9af7c2e2 2113fi
c9e1a048 2114
6a8964db 2115 test -n "$CC" && break
2116 done
2117fi
2118if test -z "$CC"; then
2119 ac_ct_CC=$CC
0713dc29 2120 for ac_prog in cl
6a8964db 2121do
2122 # Extract the first word of "$ac_prog", so it can be a program name with args.
2123set dummy $ac_prog; ac_word=$2
0713dc29 2124echo "$as_me:$LINENO: checking for $ac_word" >&5
2125echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6a8964db 2126if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2127 echo $ECHO_N "(cached) $ECHO_C" >&6
2128else
2129 if test -n "$ac_ct_CC"; then
2130 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2131else
2132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2133for as_dir in $PATH
2134do
2135 IFS=$as_save_IFS
2136 test -z "$as_dir" && as_dir=.
2137 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 2138 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6a8964db 2139 ac_cv_prog_ac_ct_CC="$ac_prog"
2140 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2141 break 2
2142 fi
2143done
2144done
c9cd172c 2145
6a8964db 2146fi
2147fi
2148ac_ct_CC=$ac_cv_prog_ac_ct_CC
2149if test -n "$ac_ct_CC"; then
0713dc29 2150 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2151echo "${ECHO_T}$ac_ct_CC" >&6
6a8964db 2152else
0713dc29 2153 echo "$as_me:$LINENO: result: no" >&5
2154echo "${ECHO_T}no" >&6
6a8964db 2155fi
c9cd172c 2156
6a8964db 2157 test -n "$ac_ct_CC" && break
2158done
12b432e0 2159
0713dc29 2160 CC=$ac_ct_CC
6a8964db 2161fi
2162
2163fi
2164
2165
2166test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2167See \`config.log' for more details." >&5
2168echo "$as_me: error: no acceptable C compiler found in \$PATH
2169See \`config.log' for more details." >&2;}
2170 { (exit 1); exit 1; }; }
2171
2172# Provide some information about the compiler.
0713dc29 2173echo "$as_me:$LINENO:" \
2174 "checking for C compiler version" >&5
6a8964db 2175ac_compiler=`set X $ac_compile; echo $2`
0713dc29 2176{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2177 (eval $ac_compiler --version </dev/null >&5) 2>&5
6a8964db 2178 ac_status=$?
2179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2180 (exit $ac_status); }
0713dc29 2181{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2182 (eval $ac_compiler -v </dev/null >&5) 2>&5
6a8964db 2183 ac_status=$?
2184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2185 (exit $ac_status); }
0713dc29 2186{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2187 (eval $ac_compiler -V </dev/null >&5) 2>&5
6a8964db 2188 ac_status=$?
2189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2190 (exit $ac_status); }
2191
2192cat >conftest.$ac_ext <<_ACEOF
6a8964db 2193/* confdefs.h. */
2194_ACEOF
2195cat confdefs.h >>conftest.$ac_ext
2196cat >>conftest.$ac_ext <<_ACEOF
2197/* end confdefs.h. */
2198
2199int
2200main ()
2201{
12b432e0 2202
6a8964db 2203 ;
2204 return 0;
2205}
2206_ACEOF
2207ac_clean_files_save=$ac_clean_files
2208ac_clean_files="$ac_clean_files a.out a.exe b.out"
2209# Try to create an executable without -o first, disregard a.out.
2210# It will help us diagnose broken compilers, and finding out an intuition
2211# of exeext.
0713dc29 2212echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2213echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
6a8964db 2214ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
0713dc29 2215if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2216 (eval $ac_link_default) 2>&5
6a8964db 2217 ac_status=$?
2218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2219 (exit $ac_status); }; then
0713dc29 2220 # Find the output, starting from the most likely. This scheme is
2221# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2222# resort.
2223
2224# Be careful to initialize this variable, since it used to be cached.
2225# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2226ac_cv_exeext=
2227# b.out is created by i960 compilers.
2228for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
6a8964db 2229do
2230 test -f "$ac_file" || continue
2231 case $ac_file in
0713dc29 2232 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2233 ;;
2234 conftest.$ac_ext )
2235 # This is the source file.
9ebd0bb2 2236 ;;
6a8964db 2237 [ab].out )
9ebd0bb2 2238 # We found the default executable, but exeext='' is most
2239 # certainly right.
2240 break;;
6a8964db 2241 *.* )
0713dc29 2242 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2243 # FIXME: I believe we export ac_cv_exeext for Libtool,
2244 # but it would be cool to find out if it's true. Does anybody
2245 # maintain Libtool? --akim.
2246 export ac_cv_exeext
9ebd0bb2 2247 break;;
6a8964db 2248 * )
9ebd0bb2 2249 break;;
6a8964db 2250 esac
2251done
2252else
2253 echo "$as_me: failed program was:" >&5
2254sed 's/^/| /' conftest.$ac_ext >&5
2255
2256{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2257See \`config.log' for more details." >&5
2258echo "$as_me: error: C compiler cannot create executables
2259See \`config.log' for more details." >&2;}
2260 { (exit 77); exit 77; }; }
2261fi
2262
2263ac_exeext=$ac_cv_exeext
0713dc29 2264echo "$as_me:$LINENO: result: $ac_file" >&5
2265echo "${ECHO_T}$ac_file" >&6
6a8964db 2266
0713dc29 2267# Check the compiler produces executables we can run. If not, either
6a8964db 2268# the compiler is broken, or we cross compile.
0713dc29 2269echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2270echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
6a8964db 2271# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2272# If not cross compiling, check that we can run a simple program.
2273if test "$cross_compiling" != yes; then
2274 if { ac_try='./$ac_file'
0713dc29 2275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2276 (eval $ac_try) 2>&5
6a8964db 2277 ac_status=$?
2278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2279 (exit $ac_status); }; }; then
2280 cross_compiling=no
c9cd172c 2281 else
6a8964db 2282 if test "$cross_compiling" = maybe; then
2283 cross_compiling=yes
2284 else
2285 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2286If you meant to cross compile, use \`--host'.
2287See \`config.log' for more details." >&5
2288echo "$as_me: error: cannot run C compiled programs.
2289If you meant to cross compile, use \`--host'.
2290See \`config.log' for more details." >&2;}
2291 { (exit 1); exit 1; }; }
2292 fi
c9cd172c 2293 fi
2294fi
0713dc29 2295echo "$as_me:$LINENO: result: yes" >&5
2296echo "${ECHO_T}yes" >&6
6a8964db 2297
2298rm -f a.out a.exe conftest$ac_cv_exeext b.out
2299ac_clean_files=$ac_clean_files_save
0713dc29 2300# Check the compiler produces executables we can run. If not, either
6a8964db 2301# the compiler is broken, or we cross compile.
0713dc29 2302echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2303echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2304echo "$as_me:$LINENO: result: $cross_compiling" >&5
2305echo "${ECHO_T}$cross_compiling" >&6
2306
2307echo "$as_me:$LINENO: checking for suffix of executables" >&5
2308echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2309if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2310 (eval $ac_link) 2>&5
6a8964db 2311 ac_status=$?
2312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2313 (exit $ac_status); }; then
2314 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2315# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2316# work properly (i.e., refer to `conftest.exe'), while it won't with
2317# `rm'.
2318for ac_file in conftest.exe conftest conftest.*; do
2319 test -f "$ac_file" || continue
2320 case $ac_file in
0713dc29 2321 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
6a8964db 2322 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
0713dc29 2323 export ac_cv_exeext
9ebd0bb2 2324 break;;
6a8964db 2325 * ) break;;
2326 esac
2327done
0dbd1c74 2328else
6a8964db 2329 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2330See \`config.log' for more details." >&5
2331echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2332See \`config.log' for more details." >&2;}
2333 { (exit 1); exit 1; }; }
2334fi
2335
2336rm -f conftest$ac_cv_exeext
0713dc29 2337echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2338echo "${ECHO_T}$ac_cv_exeext" >&6
6a8964db 2339
2340rm -f conftest.$ac_ext
2341EXEEXT=$ac_cv_exeext
2342ac_exeext=$EXEEXT
0713dc29 2343echo "$as_me:$LINENO: checking for suffix of object files" >&5
2344echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
6a8964db 2345if test "${ac_cv_objext+set}" = set; then
2346 echo $ECHO_N "(cached) $ECHO_C" >&6
2347else
2348 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2349/* confdefs.h. */
2350_ACEOF
2351cat confdefs.h >>conftest.$ac_ext
2352cat >>conftest.$ac_ext <<_ACEOF
2353/* end confdefs.h. */
2354
2355int
2356main ()
2357{
c9cd172c 2358
6a8964db 2359 ;
2360 return 0;
2361}
2362_ACEOF
2363rm -f conftest.o conftest.obj
0713dc29 2364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2365 (eval $ac_compile) 2>&5
6a8964db 2366 ac_status=$?
2367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2368 (exit $ac_status); }; then
0713dc29 2369 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
6a8964db 2370 case $ac_file in
0713dc29 2371 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
6a8964db 2372 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2373 break;;
2374 esac
2375done
12b432e0 2376else
6a8964db 2377 echo "$as_me: failed program was:" >&5
2378sed 's/^/| /' conftest.$ac_ext >&5
2379
2380{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2381See \`config.log' for more details." >&5
2382echo "$as_me: error: cannot compute suffix of object files: cannot compile
2383See \`config.log' for more details." >&2;}
2384 { (exit 1); exit 1; }; }
2385fi
2386
2387rm -f conftest.$ac_cv_objext conftest.$ac_ext
2388fi
0713dc29 2389echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2390echo "${ECHO_T}$ac_cv_objext" >&6
6a8964db 2391OBJEXT=$ac_cv_objext
2392ac_objext=$OBJEXT
0713dc29 2393echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2394echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
6a8964db 2395if test "${ac_cv_c_compiler_gnu+set}" = set; then
2396 echo $ECHO_N "(cached) $ECHO_C" >&6
2397else
2398 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2399/* confdefs.h. */
2400_ACEOF
2401cat confdefs.h >>conftest.$ac_ext
2402cat >>conftest.$ac_ext <<_ACEOF
2403/* end confdefs.h. */
2404
2405int
2406main ()
2407{
2408#ifndef __GNUC__
2409 choke me
2410#endif
c9cd172c 2411
6a8964db 2412 ;
2413 return 0;
2414}
2415_ACEOF
2416rm -f conftest.$ac_objext
0713dc29 2417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2418 (eval $ac_compile) 2>conftest.er1
6a8964db 2419 ac_status=$?
9ebd0bb2 2420 grep -v '^ *+' conftest.er1 >conftest.err
2421 rm -f conftest.er1
2422 cat conftest.err >&5
6a8964db 2423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2424 (exit $ac_status); } &&
0713dc29 2425 { ac_try='test -z "$ac_c_werror_flag"
2426 || test ! -s conftest.err'
2427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2428 (eval $ac_try) 2>&5
9ebd0bb2 2429 ac_status=$?
2430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2431 (exit $ac_status); }; } &&
2432 { ac_try='test -s conftest.$ac_objext'
0713dc29 2433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2434 (eval $ac_try) 2>&5
6a8964db 2435 ac_status=$?
2436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2437 (exit $ac_status); }; }; then
2438 ac_compiler_gnu=yes
2439else
2440 echo "$as_me: failed program was:" >&5
2441sed 's/^/| /' conftest.$ac_ext >&5
2442
0713dc29 2443ac_compiler_gnu=no
6a8964db 2444fi
0713dc29 2445rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6a8964db 2446ac_cv_c_compiler_gnu=$ac_compiler_gnu
2447
2448fi
0713dc29 2449echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2450echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
6a8964db 2451GCC=`test $ac_compiler_gnu = yes && echo yes`
2452ac_test_CFLAGS=${CFLAGS+set}
2453ac_save_CFLAGS=$CFLAGS
0713dc29 2454CFLAGS="-g"
2455echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2456echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
6a8964db 2457if test "${ac_cv_prog_cc_g+set}" = set; then
2458 echo $ECHO_N "(cached) $ECHO_C" >&6
2459else
0713dc29 2460 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2461/* confdefs.h. */
2462_ACEOF
2463cat confdefs.h >>conftest.$ac_ext
2464cat >>conftest.$ac_ext <<_ACEOF
2465/* end confdefs.h. */
2466
2467int
2468main ()
2469{
2470
2471 ;
2472 return 0;
2473}
2474_ACEOF
2475rm -f conftest.$ac_objext
0713dc29 2476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2477 (eval $ac_compile) 2>conftest.er1
6a8964db 2478 ac_status=$?
9ebd0bb2 2479 grep -v '^ *+' conftest.er1 >conftest.err
2480 rm -f conftest.er1
2481 cat conftest.err >&5
6a8964db 2482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2483 (exit $ac_status); } &&
0713dc29 2484 { ac_try='test -z "$ac_c_werror_flag"
2485 || test ! -s conftest.err'
2486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2487 (eval $ac_try) 2>&5
9ebd0bb2 2488 ac_status=$?
2489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2490 (exit $ac_status); }; } &&
2491 { ac_try='test -s conftest.$ac_objext'
0713dc29 2492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2493 (eval $ac_try) 2>&5
6a8964db 2494 ac_status=$?
2495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2496 (exit $ac_status); }; }; then
c9cd172c 2497 ac_cv_prog_cc_g=yes
2498else
6a8964db 2499 echo "$as_me: failed program was:" >&5
2500sed 's/^/| /' conftest.$ac_ext >&5
12b432e0 2501
0713dc29 2502ac_cv_prog_cc_g=no
2503fi
2504rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2505fi
2506echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2507echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2508if test "$ac_test_CFLAGS" = set; then
2509 CFLAGS=$ac_save_CFLAGS
2510elif test $ac_cv_prog_cc_g = yes; then
2511 if test "$GCC" = yes; then
2512 CFLAGS="-g -O2"
2513 else
2514 CFLAGS="-g"
2515 fi
2516else
2517 if test "$GCC" = yes; then
2518 CFLAGS="-O2"
2519 else
2520 CFLAGS=
2521 fi
2522fi
2523echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2524echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2525if test "${ac_cv_prog_cc_stdc+set}" = set; then
2526 echo $ECHO_N "(cached) $ECHO_C" >&6
2527else
2528 ac_cv_prog_cc_stdc=no
2529ac_save_CC=$CC
2530cat >conftest.$ac_ext <<_ACEOF
6a8964db 2531/* confdefs.h. */
2532_ACEOF
2533cat confdefs.h >>conftest.$ac_ext
2534cat >>conftest.$ac_ext <<_ACEOF
2535/* end confdefs.h. */
0713dc29 2536#include <stdarg.h>
2537#include <stdio.h>
2538#include <sys/types.h>
2539#include <sys/stat.h>
2540/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2541struct buf { int x; };
2542FILE * (*rcsopen) (struct buf *, struct stat *, int);
2543static char *e (p, i)
2544 char **p;
2545 int i;
2546{
2547 return p[i];
2548}
2549static char *f (char * (*g) (char **, int), char **p, ...)
2550{
2551 char *s;
2552 va_list v;
2553 va_start (v,p);
2554 s = g (p, va_arg (v,int));
2555 va_end (v);
2556 return s;
2557}
9ebd0bb2 2558
0713dc29 2559/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2560 function prototypes and stuff, but not '\xHH' hex character constants.
2561 These don't provoke an error unfortunately, instead are silently treated
2562 as 'x'. The following induces an error, until -std1 is added to get
2563 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2564 array size at least. It's necessary to write '\x00'==0 to get something
2565 that's true only with -std1. */
2566int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2567
2568int test (int i, double x);
2569struct s1 {int (*f) (int a);};
2570struct s2 {int (*f) (double a);};
2571int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2572int argc;
2573char **argv;
6a8964db 2574int
2575main ()
2576{
0713dc29 2577return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6a8964db 2578 ;
2579 return 0;
2580}
2581_ACEOF
0713dc29 2582# Don't try gcc -ansi; that turns off useful extensions and
2583# breaks some systems' header files.
2584# AIX -qlanglvl=ansi
2585# Ultrix and OSF/1 -std1
2586# HP-UX 10.20 and later -Ae
2587# HP-UX older versions -Aa -D_HPUX_SOURCE
2588# SVR4 -Xc -D__EXTENSIONS__
2589for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2590do
2591 CC="$ac_save_CC $ac_arg"
2592 rm -f conftest.$ac_objext
2593if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2594 (eval $ac_compile) 2>conftest.er1
6a8964db 2595 ac_status=$?
9ebd0bb2 2596 grep -v '^ *+' conftest.er1 >conftest.err
2597 rm -f conftest.er1
2598 cat conftest.err >&5
6a8964db 2599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2600 (exit $ac_status); } &&
0713dc29 2601 { ac_try='test -z "$ac_c_werror_flag"
2602 || test ! -s conftest.err'
2603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2604 (eval $ac_try) 2>&5
9ebd0bb2 2605 ac_status=$?
2606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2607 (exit $ac_status); }; } &&
2608 { ac_try='test -s conftest.$ac_objext'
0713dc29 2609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2610 (eval $ac_try) 2>&5
6a8964db 2611 ac_status=$?
2612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2613 (exit $ac_status); }; }; then
0713dc29 2614 ac_cv_prog_cc_stdc=$ac_arg
2615break
6a8964db 2616else
2617 echo "$as_me: failed program was:" >&5
2618sed 's/^/| /' conftest.$ac_ext >&5
c9cd172c 2619
0713dc29 2620fi
2621rm -f conftest.err conftest.$ac_objext
2622done
2623rm -f conftest.$ac_ext conftest.$ac_objext
2624CC=$ac_save_CC
2625
2626fi
2627
2628case "x$ac_cv_prog_cc_stdc" in
2629 x|xno)
2630 echo "$as_me:$LINENO: result: none needed" >&5
2631echo "${ECHO_T}none needed" >&6 ;;
2632 *)
2633 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2634echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2635 CC="$CC $ac_cv_prog_cc_stdc" ;;
2636esac
2637
2638# Some people use a C++ compiler to compile C. Since we use `exit',
2639# in C++ we need to declare it. In case someone uses the same compiler
2640# for both compiling C and C++ we need to have the C++ compiler decide
2641# the declaration of exit, since it's the most demanding environment.
2642cat >conftest.$ac_ext <<_ACEOF
2643#ifndef __cplusplus
2644 choke me
2645#endif
2646_ACEOF
2647rm -f conftest.$ac_objext
2648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2649 (eval $ac_compile) 2>conftest.er1
2650 ac_status=$?
2651 grep -v '^ *+' conftest.er1 >conftest.err
2652 rm -f conftest.er1
2653 cat conftest.err >&5
2654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2655 (exit $ac_status); } &&
2656 { ac_try='test -z "$ac_c_werror_flag"
2657 || test ! -s conftest.err'
2658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2659 (eval $ac_try) 2>&5
2660 ac_status=$?
2661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2662 (exit $ac_status); }; } &&
2663 { ac_try='test -s conftest.$ac_objext'
2664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2665 (eval $ac_try) 2>&5
2666 ac_status=$?
2667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2668 (exit $ac_status); }; }; then
2669 for ac_declaration in \
2670 '' \
2671 'extern "C" void std::exit (int) throw (); using std::exit;' \
2672 'extern "C" void std::exit (int); using std::exit;' \
2673 'extern "C" void exit (int) throw ();' \
2674 'extern "C" void exit (int);' \
2675 'void exit (int);'
2676do
2677 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2678/* confdefs.h. */
2679_ACEOF
2680cat confdefs.h >>conftest.$ac_ext
2681cat >>conftest.$ac_ext <<_ACEOF
2682/* end confdefs.h. */
0713dc29 2683$ac_declaration
2684#include <stdlib.h>
6a8964db 2685int
2686main ()
2687{
0713dc29 2688exit (42);
6a8964db 2689 ;
2690 return 0;
2691}
2692_ACEOF
2693rm -f conftest.$ac_objext
0713dc29 2694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2695 (eval $ac_compile) 2>conftest.er1
6a8964db 2696 ac_status=$?
9ebd0bb2 2697 grep -v '^ *+' conftest.er1 >conftest.err
2698 rm -f conftest.er1
2699 cat conftest.err >&5
6a8964db 2700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2701 (exit $ac_status); } &&
0713dc29 2702 { ac_try='test -z "$ac_c_werror_flag"
2703 || test ! -s conftest.err'
2704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2705 (eval $ac_try) 2>&5
9ebd0bb2 2706 ac_status=$?
2707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2708 (exit $ac_status); }; } &&
2709 { ac_try='test -s conftest.$ac_objext'
0713dc29 2710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2711 (eval $ac_try) 2>&5
6a8964db 2712 ac_status=$?
2713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2714 (exit $ac_status); }; }; then
0713dc29 2715 :
6a8964db 2716else
2717 echo "$as_me: failed program was:" >&5
2718sed 's/^/| /' conftest.$ac_ext >&5
2719
0713dc29 2720continue
84eba009 2721fi
0713dc29 2722rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2723 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2724/* confdefs.h. */
2725_ACEOF
2726cat confdefs.h >>conftest.$ac_ext
2727cat >>conftest.$ac_ext <<_ACEOF
2728/* end confdefs.h. */
0713dc29 2729$ac_declaration
6a8964db 2730int
2731main ()
2732{
0713dc29 2733exit (42);
6a8964db 2734 ;
2735 return 0;
2736}
2737_ACEOF
0713dc29 2738rm -f conftest.$ac_objext
2739if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2740 (eval $ac_compile) 2>conftest.er1
6a8964db 2741 ac_status=$?
9ebd0bb2 2742 grep -v '^ *+' conftest.er1 >conftest.err
2743 rm -f conftest.er1
2744 cat conftest.err >&5
6a8964db 2745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2746 (exit $ac_status); } &&
0713dc29 2747 { ac_try='test -z "$ac_c_werror_flag"
2748 || test ! -s conftest.err'
2749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2750 (eval $ac_try) 2>&5
9ebd0bb2 2751 ac_status=$?
2752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2753 (exit $ac_status); }; } &&
2754 { ac_try='test -s conftest.$ac_objext'
0713dc29 2755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2756 (eval $ac_try) 2>&5
6a8964db 2757 ac_status=$?
2758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2759 (exit $ac_status); }; }; then
0713dc29 2760 break
3f9b9702 2761else
6a8964db 2762 echo "$as_me: failed program was:" >&5
2763sed 's/^/| /' conftest.$ac_ext >&5
2764
c9cd172c 2765fi
0713dc29 2766rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6a8964db 2767done
0713dc29 2768rm -f conftest*
2769if test -n "$ac_declaration"; then
2770 echo '#ifdef __cplusplus' >>confdefs.h
2771 echo $ac_declaration >>confdefs.h
2772 echo '#endif' >>confdefs.h
6a8964db 2773fi
2774
0713dc29 2775else
2776 echo "$as_me: failed program was:" >&5
2777sed 's/^/| /' conftest.$ac_ext >&5
6a8964db 2778
0713dc29 2779fi
2780rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6a8964db 2781ac_ext=c
2782ac_cpp='$CPP $CPPFLAGS'
2783ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2784ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2785ac_compiler_gnu=$ac_cv_c_compiler_gnu
2786
2787if test "x$CC" != xcc; then
0713dc29 2788 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2789echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
6a8964db 2790else
0713dc29 2791 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2792echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
6a8964db 2793fi
2794set dummy $CC; ac_cc=`echo $2 |
2795 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
0713dc29 2796if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
6a8964db 2797 echo $ECHO_N "(cached) $ECHO_C" >&6
2798else
2799 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2800/* confdefs.h. */
2801_ACEOF
2802cat confdefs.h >>conftest.$ac_ext
2803cat >>conftest.$ac_ext <<_ACEOF
2804/* end confdefs.h. */
2805
2806int
2807main ()
2808{
2809
2810 ;
2811 return 0;
2812}
2813_ACEOF
3f9b9702 2814# Make sure it works both with $CC and with simple cc.
2815# We do the test twice because some compilers refuse to overwrite an
2816# existing .o file with -o, though they will create one.
0713dc29 2817ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2818if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2819 (eval $ac_try) 2>&5
6a8964db 2820 ac_status=$?
2821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2822 (exit $ac_status); } &&
0713dc29 2823 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2824 (eval $ac_try) 2>&5
6a8964db 2825 ac_status=$?
2826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2827 (exit $ac_status); };
3f9b9702 2828then
2829 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2830 if test "x$CC" != xcc; then
2831 # Test first that cc exists at all.
6a8964db 2832 if { ac_try='cc -c conftest.$ac_ext >&5'
0713dc29 2833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2834 (eval $ac_try) 2>&5
6a8964db 2835 ac_status=$?
2836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2837 (exit $ac_status); }; }; then
0713dc29 2838 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2839 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2840 (eval $ac_try) 2>&5
6a8964db 2841 ac_status=$?
2842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2843 (exit $ac_status); } &&
0713dc29 2844 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2845 (eval $ac_try) 2>&5
6a8964db 2846 ac_status=$?
2847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2848 (exit $ac_status); };
3f9b9702 2849 then
9ebd0bb2 2850 # cc works too.
2851 :
3f9b9702 2852 else
9ebd0bb2 2853 # cc exists but doesn't like -o.
2854 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3f9b9702 2855 fi
2856 fi
2857 fi
2858else
2859 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2860fi
0713dc29 2861rm -f conftest*
3f9b9702 2862
2863fi
0713dc29 2864if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
2865 echo "$as_me:$LINENO: result: yes" >&5
2866echo "${ECHO_T}yes" >&6
3f9b9702 2867else
0713dc29 2868 echo "$as_me:$LINENO: result: no" >&5
2869echo "${ECHO_T}no" >&6
6a8964db 2870
2871cat >>confdefs.h <<\_ACEOF
3f9b9702 2872#define NO_MINUS_C_MINUS_O 1
6a8964db 2873_ACEOF
3f9b9702 2874
2875fi
2876
524a54cf 2877# expand $ac_aux_dir to an absolute path
2878am_aux_dir=`cd $ac_aux_dir && pwd`
2879
2880# FIXME: we rely on the cache variable name because
2881# there is no other way.
2882set dummy $CC
2883ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2884if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2885 # Losing compiler, so override with the script.
2886 # FIXME: It is wrong to rewrite CC.
2887 # But if we don't then we get into trouble of one sort or another.
2888 # A longer-term fix would be to have automake use am__CC in this case,
2889 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2890 CC="$am_aux_dir/compile $CC"
2891fi
2892
0fa54ff1 2893# autoconf is lame and doesn't give us any substitution variable for this.
2894if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2895 NO_MINUS_C_MINUS_O=yes
2896else
2897 OUTPUT_OPTION='-o $@'
2898fi
2899
2900
2901
c81c13fb 2902# Remove the -O2: for historical reasons, unless bootstrapping we prefer
2903# optimizations to be activated explicitly by the toplevel.
2904case "$CC" in
2905 */prev-gcc/xgcc*) ;;
2906 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
2907esac
2908
2909
966842d4 2910# -------------------------
2911# Check C compiler features
2912# -------------------------
2913
6a8964db 2914ac_ext=c
2915ac_cpp='$CPP $CPPFLAGS'
2916ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2917ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2918ac_compiler_gnu=$ac_cv_c_compiler_gnu
0713dc29 2919echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2920echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3239b2ba 2921# On Suns, sometimes $CPP names a directory.
2922if test -n "$CPP" && test -d "$CPP"; then
2923 CPP=
2924fi
2925if test -z "$CPP"; then
6a8964db 2926 if test "${ac_cv_prog_CPP+set}" = set; then
2927 echo $ECHO_N "(cached) $ECHO_C" >&6
2928else
2929 # Double quotes because CPP needs to be expanded
2930 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2931 do
2932 ac_preproc_ok=false
2933for ac_c_preproc_warn_flag in '' yes
2934do
2935 # Use a header file that comes with gcc, so configuring glibc
2936 # with a fresh cross-compiler works.
2937 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2938 # <limits.h> exists even on freestanding compilers.
3239b2ba 2939 # On the NeXT, cc -E runs the code through the compiler's parser,
6a8964db 2940 # not just through cpp. "Syntax error" is here to catch this case.
2941 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2942/* confdefs.h. */
2943_ACEOF
2944cat confdefs.h >>conftest.$ac_ext
2945cat >>conftest.$ac_ext <<_ACEOF
2946/* end confdefs.h. */
2947#ifdef __STDC__
2948# include <limits.h>
2949#else
2950# include <assert.h>
2951#endif
9ebd0bb2 2952 Syntax error
6a8964db 2953_ACEOF
0713dc29 2954if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2955 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6a8964db 2956 ac_status=$?
2957 grep -v '^ *+' conftest.er1 >conftest.err
2958 rm -f conftest.er1
2959 cat conftest.err >&5
2960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2961 (exit $ac_status); } >/dev/null; then
2962 if test -s conftest.err; then
2963 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 2964 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 2965 else
2966 ac_cpp_err=
2967 fi
2968else
2969 ac_cpp_err=yes
2970fi
2971if test -z "$ac_cpp_err"; then
9af7c2e2 2972 :
c9e1a048 2973else
6a8964db 2974 echo "$as_me: failed program was:" >&5
2975sed 's/^/| /' conftest.$ac_ext >&5
2976
2977 # Broken: fails on valid input.
2978continue
2979fi
2980rm -f conftest.err conftest.$ac_ext
2981
0713dc29 2982 # OK, works on sane cases. Now check whether non-existent headers
6a8964db 2983 # can be detected and how.
2984 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2985/* confdefs.h. */
2986_ACEOF
2987cat confdefs.h >>conftest.$ac_ext
2988cat >>conftest.$ac_ext <<_ACEOF
2989/* end confdefs.h. */
2990#include <ac_nonexistent.h>
2991_ACEOF
0713dc29 2992if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2993 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6a8964db 2994 ac_status=$?
2995 grep -v '^ *+' conftest.er1 >conftest.err
2996 rm -f conftest.er1
2997 cat conftest.err >&5
2998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2999 (exit $ac_status); } >/dev/null; then
3000 if test -s conftest.err; then
3001 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 3002 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 3003 else
3004 ac_cpp_err=
3005 fi
3006else
3007 ac_cpp_err=yes
3008fi
3009if test -z "$ac_cpp_err"; then
3010 # Broken: success on invalid input.
3011continue
3012else
3013 echo "$as_me: failed program was:" >&5
3014sed 's/^/| /' conftest.$ac_ext >&5
3015
3016 # Passes both tests.
3017ac_preproc_ok=:
3018break
3019fi
3020rm -f conftest.err conftest.$ac_ext
3021
3022done
3023# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3024rm -f conftest.err conftest.$ac_ext
3025if $ac_preproc_ok; then
3026 break
3027fi
3028
3029 done
3030 ac_cv_prog_CPP=$CPP
3031
3032fi
3033 CPP=$ac_cv_prog_CPP
3034else
3035 ac_cv_prog_CPP=$CPP
3036fi
0713dc29 3037echo "$as_me:$LINENO: result: $CPP" >&5
3038echo "${ECHO_T}$CPP" >&6
6a8964db 3039ac_preproc_ok=false
3040for ac_c_preproc_warn_flag in '' yes
3041do
3042 # Use a header file that comes with gcc, so configuring glibc
3043 # with a fresh cross-compiler works.
3044 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3045 # <limits.h> exists even on freestanding compilers.
3046 # On the NeXT, cc -E runs the code through the compiler's parser,
3047 # not just through cpp. "Syntax error" is here to catch this case.
3048 cat >conftest.$ac_ext <<_ACEOF
6a8964db 3049/* confdefs.h. */
3050_ACEOF
3051cat confdefs.h >>conftest.$ac_ext
3052cat >>conftest.$ac_ext <<_ACEOF
3053/* end confdefs.h. */
3054#ifdef __STDC__
3055# include <limits.h>
3056#else
3057# include <assert.h>
3058#endif
9ebd0bb2 3059 Syntax error
6a8964db 3060_ACEOF
0713dc29 3061if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3062 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6a8964db 3063 ac_status=$?
3064 grep -v '^ *+' conftest.er1 >conftest.err
3065 rm -f conftest.er1
3066 cat conftest.err >&5
3067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3068 (exit $ac_status); } >/dev/null; then
3069 if test -s conftest.err; then
3070 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 3071 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 3072 else
3073 ac_cpp_err=
3074 fi
3075else
3076 ac_cpp_err=yes
3077fi
3078if test -z "$ac_cpp_err"; then
c9cd172c 3079 :
0fa54ff1 3080else
6a8964db 3081 echo "$as_me: failed program was:" >&5
3082sed 's/^/| /' conftest.$ac_ext >&5
3083
3084 # Broken: fails on valid input.
3085continue
3086fi
3087rm -f conftest.err conftest.$ac_ext
3088
0713dc29 3089 # OK, works on sane cases. Now check whether non-existent headers
6a8964db 3090 # can be detected and how.
3091 cat >conftest.$ac_ext <<_ACEOF
6a8964db 3092/* confdefs.h. */
3093_ACEOF
3094cat confdefs.h >>conftest.$ac_ext
3095cat >>conftest.$ac_ext <<_ACEOF
3096/* end confdefs.h. */
3097#include <ac_nonexistent.h>
3098_ACEOF
0713dc29 3099if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3100 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6a8964db 3101 ac_status=$?
3102 grep -v '^ *+' conftest.er1 >conftest.err
3103 rm -f conftest.er1
3104 cat conftest.err >&5
3105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3106 (exit $ac_status); } >/dev/null; then
3107 if test -s conftest.err; then
3108 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 3109 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 3110 else
3111 ac_cpp_err=
3112 fi
c9cd172c 3113else
6a8964db 3114 ac_cpp_err=yes
12b432e0 3115fi
6a8964db 3116if test -z "$ac_cpp_err"; then
3117 # Broken: success on invalid input.
3118continue
3119else
3120 echo "$as_me: failed program was:" >&5
3121sed 's/^/| /' conftest.$ac_ext >&5
3122
3123 # Passes both tests.
3124ac_preproc_ok=:
3125break
12b432e0 3126fi
6a8964db 3127rm -f conftest.err conftest.$ac_ext
3128
3129done
3130# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3131rm -f conftest.err conftest.$ac_ext
3132if $ac_preproc_ok; then
3133 :
c9cd172c 3134else
6a8964db 3135 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3136See \`config.log' for more details." >&5
3137echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3138See \`config.log' for more details." >&2;}
3139 { (exit 1); exit 1; }; }
c9cd172c 3140fi
3141
6a8964db 3142ac_ext=c
3143ac_cpp='$CPP $CPPFLAGS'
3144ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3145ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3146ac_compiler_gnu=$ac_cv_c_compiler_gnu
3147
1f59d204 3148
0713dc29 3149echo "$as_me:$LINENO: checking for inline" >&5
3150echo $ECHO_N "checking for inline... $ECHO_C" >&6
6a8964db 3151if test "${ac_cv_c_inline+set}" = set; then
3152 echo $ECHO_N "(cached) $ECHO_C" >&6
0fa54ff1 3153else
3154 ac_cv_c_inline=no
3155for ac_kw in inline __inline__ __inline; do
6a8964db 3156 cat >conftest.$ac_ext <<_ACEOF
6a8964db 3157/* confdefs.h. */
3158_ACEOF
3159cat confdefs.h >>conftest.$ac_ext
3160cat >>conftest.$ac_ext <<_ACEOF
3161/* end confdefs.h. */
3162#ifndef __cplusplus
3163typedef int foo_t;
3164static $ac_kw foo_t static_foo () {return 0; }
3165$ac_kw foo_t foo () {return 0; }
3166#endif
0fa54ff1 3167
6a8964db 3168_ACEOF
3169rm -f conftest.$ac_objext
0713dc29 3170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3171 (eval $ac_compile) 2>conftest.er1
6a8964db 3172 ac_status=$?
9ebd0bb2 3173 grep -v '^ *+' conftest.er1 >conftest.err
3174 rm -f conftest.er1
3175 cat conftest.err >&5
6a8964db 3176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3177 (exit $ac_status); } &&
0713dc29 3178 { ac_try='test -z "$ac_c_werror_flag"
3179 || test ! -s conftest.err'
3180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3181 (eval $ac_try) 2>&5
9ebd0bb2 3182 ac_status=$?
3183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3184 (exit $ac_status); }; } &&
3185 { ac_try='test -s conftest.$ac_objext'
0713dc29 3186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3187 (eval $ac_try) 2>&5
6a8964db 3188 ac_status=$?
3189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3190 (exit $ac_status); }; }; then
0713dc29 3191 ac_cv_c_inline=$ac_kw; break
0fa54ff1 3192else
6a8964db 3193 echo "$as_me: failed program was:" >&5
3194sed 's/^/| /' conftest.$ac_ext >&5
3195
0fa54ff1 3196fi
0713dc29 3197rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
0fa54ff1 3198done
3199
3200fi
0713dc29 3201echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3202echo "${ECHO_T}$ac_cv_c_inline" >&6
9ebd0bb2 3203
3204
6a8964db 3205case $ac_cv_c_inline in
0fa54ff1 3206 inline | yes) ;;
9ebd0bb2 3207 *)
3208 case $ac_cv_c_inline in
3209 no) ac_val=;;
3210 *) ac_val=$ac_cv_c_inline;;
3211 esac
3212 cat >>confdefs.h <<_ACEOF
3213#ifndef __cplusplus
3214#define inline $ac_val
3215#endif
6a8964db 3216_ACEOF
9ebd0bb2 3217 ;;
0fa54ff1 3218esac
3219
0fa54ff1 3220
0fa54ff1 3221# sizeof(char) is 1 by definition.
b085c511 3222
0713dc29 3223echo "$as_me:$LINENO: checking for egrep" >&5
3224echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3225if test "${ac_cv_prog_egrep+set}" = set; then
84eba009 3226 echo $ECHO_N "(cached) $ECHO_C" >&6
3227else
0713dc29 3228 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3229 then ac_cv_prog_egrep='grep -E'
3230 else ac_cv_prog_egrep='egrep'
b085c511 3231 fi
3232fi
0713dc29 3233echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3234echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3235 EGREP=$ac_cv_prog_egrep
b085c511 3236
3237
0713dc29 3238echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3239echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
b085c511 3240if test "${ac_cv_header_stdc+set}" = set; then
3241 echo $ECHO_N "(cached) $ECHO_C" >&6
3242else
3243 cat >conftest.$ac_ext <<_ACEOF
3244/* confdefs.h. */
3245_ACEOF
3246cat confdefs.h >>conftest.$ac_ext
3247cat >>conftest.$ac_ext <<_ACEOF
3248/* end confdefs.h. */
3249#include <stdlib.h>
3250#include <stdarg.h>
3251#include <string.h>
3252#include <float.h>
3253
3254int
3255main ()
3256{
3257
3258 ;
3259 return 0;
3260}
3261_ACEOF
3262rm -f conftest.$ac_objext
0713dc29 3263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3264 (eval $ac_compile) 2>conftest.er1
b085c511 3265 ac_status=$?
3266 grep -v '^ *+' conftest.er1 >conftest.err
3267 rm -f conftest.er1
3268 cat conftest.err >&5
3269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3270 (exit $ac_status); } &&
0713dc29 3271 { ac_try='test -z "$ac_c_werror_flag"
3272 || test ! -s conftest.err'
3273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3274 (eval $ac_try) 2>&5
b085c511 3275 ac_status=$?
3276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3277 (exit $ac_status); }; } &&
3278 { ac_try='test -s conftest.$ac_objext'
0713dc29 3279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3280 (eval $ac_try) 2>&5
b085c511 3281 ac_status=$?
3282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3283 (exit $ac_status); }; }; then
3284 ac_cv_header_stdc=yes
3285else
3286 echo "$as_me: failed program was:" >&5
3287sed 's/^/| /' conftest.$ac_ext >&5
3288
0713dc29 3289ac_cv_header_stdc=no
b085c511 3290fi
0713dc29 3291rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 3292
3293if test $ac_cv_header_stdc = yes; then
3294 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3295 cat >conftest.$ac_ext <<_ACEOF
3296/* confdefs.h. */
3297_ACEOF
3298cat confdefs.h >>conftest.$ac_ext
3299cat >>conftest.$ac_ext <<_ACEOF
3300/* end confdefs.h. */
3301#include <string.h>
3302
3303_ACEOF
3304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3305 $EGREP "memchr" >/dev/null 2>&1; then
3306 :
3307else
3308 ac_cv_header_stdc=no
3309fi
3310rm -f conftest*
3311
3312fi
3313
3314if test $ac_cv_header_stdc = yes; then
3315 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3316 cat >conftest.$ac_ext <<_ACEOF
3317/* confdefs.h. */
3318_ACEOF
3319cat confdefs.h >>conftest.$ac_ext
3320cat >>conftest.$ac_ext <<_ACEOF
3321/* end confdefs.h. */
3322#include <stdlib.h>
3323
3324_ACEOF
3325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3326 $EGREP "free" >/dev/null 2>&1; then
3327 :
3328else
3329 ac_cv_header_stdc=no
3330fi
3331rm -f conftest*
3332
3333fi
3334
3335if test $ac_cv_header_stdc = yes; then
3336 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3337 if test "$cross_compiling" = yes; then
3338 :
3339else
3340 cat >conftest.$ac_ext <<_ACEOF
3341/* confdefs.h. */
3342_ACEOF
3343cat confdefs.h >>conftest.$ac_ext
3344cat >>conftest.$ac_ext <<_ACEOF
3345/* end confdefs.h. */
3346#include <ctype.h>
3347#if ((' ' & 0x0FF) == 0x020)
3348# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3349# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3350#else
3351# define ISLOWER(c) \
3352 (('a' <= (c) && (c) <= 'i') \
3353 || ('j' <= (c) && (c) <= 'r') \
3354 || ('s' <= (c) && (c) <= 'z'))
3355# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3356#endif
3357
3358#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3359int
3360main ()
3361{
3362 int i;
3363 for (i = 0; i < 256; i++)
3364 if (XOR (islower (i), ISLOWER (i))
3365 || toupper (i) != TOUPPER (i))
0713dc29 3366 exit(2);
3367 exit (0);
b085c511 3368}
3369_ACEOF
3370rm -f conftest$ac_exeext
0713dc29 3371if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3372 (eval $ac_link) 2>&5
b085c511 3373 ac_status=$?
3374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3375 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
0713dc29 3376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3377 (eval $ac_try) 2>&5
b085c511 3378 ac_status=$?
3379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3380 (exit $ac_status); }; }; then
3381 :
3382else
3383 echo "$as_me: program exited with status $ac_status" >&5
3384echo "$as_me: failed program was:" >&5
3385sed 's/^/| /' conftest.$ac_ext >&5
3386
3387( exit $ac_status )
3388ac_cv_header_stdc=no
3389fi
0713dc29 3390rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b085c511 3391fi
3392fi
3393fi
0713dc29 3394echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3395echo "${ECHO_T}$ac_cv_header_stdc" >&6
b085c511 3396if test $ac_cv_header_stdc = yes; then
3397
3398cat >>confdefs.h <<\_ACEOF
3399#define STDC_HEADERS 1
3400_ACEOF
3401
3402fi
3403
3404# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3415 inttypes.h stdint.h unistd.h
3416do
3417as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
0713dc29 3418echo "$as_me:$LINENO: checking for $ac_header" >&5
3419echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3420if eval "test \"\${$as_ac_Header+set}\" = set"; then
b085c511 3421 echo $ECHO_N "(cached) $ECHO_C" >&6
3422else
3423 cat >conftest.$ac_ext <<_ACEOF
3424/* confdefs.h. */
3425_ACEOF
3426cat confdefs.h >>conftest.$ac_ext
3427cat >>conftest.$ac_ext <<_ACEOF
3428/* end confdefs.h. */
3429$ac_includes_default
3430
3431#include <$ac_header>
3432_ACEOF
3433rm -f conftest.$ac_objext
0713dc29 3434if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3435 (eval $ac_compile) 2>conftest.er1
b085c511 3436 ac_status=$?
3437 grep -v '^ *+' conftest.er1 >conftest.err
3438 rm -f conftest.er1
3439 cat conftest.err >&5
3440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3441 (exit $ac_status); } &&
0713dc29 3442 { ac_try='test -z "$ac_c_werror_flag"
3443 || test ! -s conftest.err'
3444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3445 (eval $ac_try) 2>&5
b085c511 3446 ac_status=$?
3447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3448 (exit $ac_status); }; } &&
3449 { ac_try='test -s conftest.$ac_objext'
0713dc29 3450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3451 (eval $ac_try) 2>&5
b085c511 3452 ac_status=$?
3453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3454 (exit $ac_status); }; }; then
3455 eval "$as_ac_Header=yes"
3456else
3457 echo "$as_me: failed program was:" >&5
3458sed 's/^/| /' conftest.$ac_ext >&5
3459
0713dc29 3460eval "$as_ac_Header=no"
b085c511 3461fi
0713dc29 3462rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 3463fi
0713dc29 3464echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3465echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
b085c511 3466if test `eval echo '${'$as_ac_Header'}'` = yes; then
3467 cat >>confdefs.h <<_ACEOF
3468#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3469_ACEOF
3470
3471fi
3472
3473done
3474
3475
0713dc29 3476echo "$as_me:$LINENO: checking for void *" >&5
3477echo $ECHO_N "checking for void *... $ECHO_C" >&6
b085c511 3478if test "${ac_cv_type_void_p+set}" = set; then
3479 echo $ECHO_N "(cached) $ECHO_C" >&6
3480else
3481 cat >conftest.$ac_ext <<_ACEOF
3482/* confdefs.h. */
3483_ACEOF
3484cat confdefs.h >>conftest.$ac_ext
3485cat >>conftest.$ac_ext <<_ACEOF
3486/* end confdefs.h. */
3487$ac_includes_default
3488int
3489main ()
3490{
0713dc29 3491if ((void * *) 0)
b085c511 3492 return 0;
0713dc29 3493if (sizeof (void *))
b085c511 3494 return 0;
3495 ;
3496 return 0;
3497}
3498_ACEOF
3499rm -f conftest.$ac_objext
0713dc29 3500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3501 (eval $ac_compile) 2>conftest.er1
b085c511 3502 ac_status=$?
3503 grep -v '^ *+' conftest.er1 >conftest.err
3504 rm -f conftest.er1
3505 cat conftest.err >&5
3506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3507 (exit $ac_status); } &&
0713dc29 3508 { ac_try='test -z "$ac_c_werror_flag"
3509 || test ! -s conftest.err'
3510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3511 (eval $ac_try) 2>&5
b085c511 3512 ac_status=$?
3513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3514 (exit $ac_status); }; } &&
3515 { ac_try='test -s conftest.$ac_objext'
0713dc29 3516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3517 (eval $ac_try) 2>&5
b085c511 3518 ac_status=$?
3519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3520 (exit $ac_status); }; }; then
3521 ac_cv_type_void_p=yes
3522else
3523 echo "$as_me: failed program was:" >&5
3524sed 's/^/| /' conftest.$ac_ext >&5
3525
0713dc29 3526ac_cv_type_void_p=no
b085c511 3527fi
0713dc29 3528rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 3529fi
0713dc29 3530echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3531echo "${ECHO_T}$ac_cv_type_void_p" >&6
b085c511 3532
0713dc29 3533echo "$as_me:$LINENO: checking size of void *" >&5
3534echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6a8964db 3535if test "${ac_cv_sizeof_void_p+set}" = set; then
3536 echo $ECHO_N "(cached) $ECHO_C" >&6
6f817829 3537else
b085c511 3538 if test "$ac_cv_type_void_p" = yes; then
0713dc29 3539 # The cast to unsigned long works around a bug in the HP C Compiler
b085c511 3540 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3541 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3542 # This bug is HP SR number 8606223364.
3543 if test "$cross_compiling" = yes; then
3544 # Depending upon the size, compute the lo and hi bounds.
3545cat >conftest.$ac_ext <<_ACEOF
3546/* confdefs.h. */
3547_ACEOF
3548cat confdefs.h >>conftest.$ac_ext
3549cat >>conftest.$ac_ext <<_ACEOF
3550/* end confdefs.h. */
3551$ac_includes_default
3552int
3553main ()
3554{
0713dc29 3555static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
b085c511 3556test_array [0] = 0
3557
3558 ;
3559 return 0;
3560}
3561_ACEOF
3562rm -f conftest.$ac_objext
0713dc29 3563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3564 (eval $ac_compile) 2>conftest.er1
b085c511 3565 ac_status=$?
3566 grep -v '^ *+' conftest.er1 >conftest.err
3567 rm -f conftest.er1
3568 cat conftest.err >&5
3569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3570 (exit $ac_status); } &&
0713dc29 3571 { ac_try='test -z "$ac_c_werror_flag"
3572 || test ! -s conftest.err'
3573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3574 (eval $ac_try) 2>&5
b085c511 3575 ac_status=$?
3576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3577 (exit $ac_status); }; } &&
3578 { ac_try='test -s conftest.$ac_objext'
0713dc29 3579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3580 (eval $ac_try) 2>&5
b085c511 3581 ac_status=$?
3582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3583 (exit $ac_status); }; }; then
3584 ac_lo=0 ac_mid=0
3585 while :; do
3586 cat >conftest.$ac_ext <<_ACEOF
3587/* confdefs.h. */
3588_ACEOF
3589cat confdefs.h >>conftest.$ac_ext
3590cat >>conftest.$ac_ext <<_ACEOF
3591/* end confdefs.h. */
3592$ac_includes_default
3593int
3594main ()
3595{
0713dc29 3596static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
b085c511 3597test_array [0] = 0
3598
3599 ;
3600 return 0;
3601}
3602_ACEOF
3603rm -f conftest.$ac_objext
0713dc29 3604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3605 (eval $ac_compile) 2>conftest.er1
b085c511 3606 ac_status=$?
3607 grep -v '^ *+' conftest.er1 >conftest.err
3608 rm -f conftest.er1
3609 cat conftest.err >&5
3610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3611 (exit $ac_status); } &&
0713dc29 3612 { ac_try='test -z "$ac_c_werror_flag"
3613 || test ! -s conftest.err'
3614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3615 (eval $ac_try) 2>&5
b085c511 3616 ac_status=$?
3617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3618 (exit $ac_status); }; } &&
3619 { ac_try='test -s conftest.$ac_objext'
0713dc29 3620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3621 (eval $ac_try) 2>&5
b085c511 3622 ac_status=$?
3623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3624 (exit $ac_status); }; }; then
3625 ac_hi=$ac_mid; break
3626else
3627 echo "$as_me: failed program was:" >&5
3628sed 's/^/| /' conftest.$ac_ext >&5
3629
0713dc29 3630ac_lo=`expr $ac_mid + 1`
3631 if test $ac_lo -le $ac_mid; then
3632 ac_lo= ac_hi=
3633 break
3634 fi
3635 ac_mid=`expr 2 '*' $ac_mid + 1`
b085c511 3636fi
0713dc29 3637rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 3638 done
3639else
3640 echo "$as_me: failed program was:" >&5
3641sed 's/^/| /' conftest.$ac_ext >&5
3642
0713dc29 3643cat >conftest.$ac_ext <<_ACEOF
b085c511 3644/* confdefs.h. */
3645_ACEOF
3646cat confdefs.h >>conftest.$ac_ext
3647cat >>conftest.$ac_ext <<_ACEOF
3648/* end confdefs.h. */
3649$ac_includes_default
3650int
3651main ()
3652{
0713dc29 3653static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
b085c511 3654test_array [0] = 0
3655
3656 ;
3657 return 0;
3658}
3659_ACEOF
3660rm -f conftest.$ac_objext
0713dc29 3661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3662 (eval $ac_compile) 2>conftest.er1
b085c511 3663 ac_status=$?
3664 grep -v '^ *+' conftest.er1 >conftest.err
3665 rm -f conftest.er1
3666 cat conftest.err >&5
3667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3668 (exit $ac_status); } &&
0713dc29 3669 { ac_try='test -z "$ac_c_werror_flag"
3670 || test ! -s conftest.err'
3671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3672 (eval $ac_try) 2>&5
b085c511 3673 ac_status=$?
3674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3675 (exit $ac_status); }; } &&
3676 { ac_try='test -s conftest.$ac_objext'
0713dc29 3677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3678 (eval $ac_try) 2>&5
b085c511 3679 ac_status=$?
3680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3681 (exit $ac_status); }; }; then
3682 ac_hi=-1 ac_mid=-1
3683 while :; do
3684 cat >conftest.$ac_ext <<_ACEOF
3685/* confdefs.h. */
3686_ACEOF
3687cat confdefs.h >>conftest.$ac_ext
3688cat >>conftest.$ac_ext <<_ACEOF
3689/* end confdefs.h. */
3690$ac_includes_default
3691int
3692main ()
3693{
0713dc29 3694static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
b085c511 3695test_array [0] = 0
3696
3697 ;
3698 return 0;
3699}
3700_ACEOF
3701rm -f conftest.$ac_objext
0713dc29 3702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3703 (eval $ac_compile) 2>conftest.er1
b085c511 3704 ac_status=$?
3705 grep -v '^ *+' conftest.er1 >conftest.err
3706 rm -f conftest.er1
3707 cat conftest.err >&5
3708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3709 (exit $ac_status); } &&
0713dc29 3710 { ac_try='test -z "$ac_c_werror_flag"
3711 || test ! -s conftest.err'
3712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3713 (eval $ac_try) 2>&5
b085c511 3714 ac_status=$?
3715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3716 (exit $ac_status); }; } &&
3717 { ac_try='test -s conftest.$ac_objext'
0713dc29 3718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3719 (eval $ac_try) 2>&5
b085c511 3720 ac_status=$?
3721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3722 (exit $ac_status); }; }; then
3723 ac_lo=$ac_mid; break
3724else
3725 echo "$as_me: failed program was:" >&5
3726sed 's/^/| /' conftest.$ac_ext >&5
3727
0713dc29 3728ac_hi=`expr '(' $ac_mid ')' - 1`
3729 if test $ac_mid -le $ac_hi; then
3730 ac_lo= ac_hi=
3731 break
3732 fi
3733 ac_mid=`expr 2 '*' $ac_mid`
b085c511 3734fi
0713dc29 3735rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 3736 done
3737else
3738 echo "$as_me: failed program was:" >&5
3739sed 's/^/| /' conftest.$ac_ext >&5
3740
0713dc29 3741ac_lo= ac_hi=
b085c511 3742fi
0713dc29 3743rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 3744fi
0713dc29 3745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 3746# Binary search between lo and hi bounds.
3747while test "x$ac_lo" != "x$ac_hi"; do
3748 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3749 cat >conftest.$ac_ext <<_ACEOF
3750/* confdefs.h. */
3751_ACEOF
3752cat confdefs.h >>conftest.$ac_ext
3753cat >>conftest.$ac_ext <<_ACEOF
3754/* end confdefs.h. */
3755$ac_includes_default
3756int
3757main ()
3758{
0713dc29 3759static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
b085c511 3760test_array [0] = 0
3761
3762 ;
3763 return 0;
3764}
3765_ACEOF
3766rm -f conftest.$ac_objext
0713dc29 3767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3768 (eval $ac_compile) 2>conftest.er1
b085c511 3769 ac_status=$?
3770 grep -v '^ *+' conftest.er1 >conftest.err
3771 rm -f conftest.er1
3772 cat conftest.err >&5
3773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3774 (exit $ac_status); } &&
0713dc29 3775 { ac_try='test -z "$ac_c_werror_flag"
3776 || test ! -s conftest.err'
3777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3778 (eval $ac_try) 2>&5
b085c511 3779 ac_status=$?
3780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3781 (exit $ac_status); }; } &&
3782 { ac_try='test -s conftest.$ac_objext'
0713dc29 3783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3784 (eval $ac_try) 2>&5
b085c511 3785 ac_status=$?
3786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3787 (exit $ac_status); }; }; then
3788 ac_hi=$ac_mid
3789else
3790 echo "$as_me: failed program was:" >&5
3791sed 's/^/| /' conftest.$ac_ext >&5
3792
0713dc29 3793ac_lo=`expr '(' $ac_mid ')' + 1`
b085c511 3794fi
0713dc29 3795rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 3796done
3797case $ac_lo in
3798?*) ac_cv_sizeof_void_p=$ac_lo;;
0713dc29 3799'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
b085c511 3800See \`config.log' for more details." >&5
0713dc29 3801echo "$as_me: error: cannot compute sizeof (void *), 77
b085c511 3802See \`config.log' for more details." >&2;}
0713dc29 3803 { (exit 1); exit 1; }; } ;;
b085c511 3804esac
0713dc29 3805else
3806 if test "$cross_compiling" = yes; then
3807 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
3808See \`config.log' for more details." >&5
3809echo "$as_me: error: cannot run test program while cross compiling
3810See \`config.log' for more details." >&2;}
3811 { (exit 1); exit 1; }; }
b085c511 3812else
3813 cat >conftest.$ac_ext <<_ACEOF
3814/* confdefs.h. */
3815_ACEOF
3816cat confdefs.h >>conftest.$ac_ext
3817cat >>conftest.$ac_ext <<_ACEOF
3818/* end confdefs.h. */
3819$ac_includes_default
0713dc29 3820long longval () { return (long) (sizeof (void *)); }
3821unsigned long ulongval () { return (long) (sizeof (void *)); }
b085c511 3822#include <stdio.h>
3823#include <stdlib.h>
3824int
3825main ()
3826{
3827
3828 FILE *f = fopen ("conftest.val", "w");
3829 if (! f)
0713dc29 3830 exit (1);
3831 if (((long) (sizeof (void *))) < 0)
b085c511 3832 {
0713dc29 3833 long i = longval ();
3834 if (i != ((long) (sizeof (void *))))
3835 exit (1);
b085c511 3836 fprintf (f, "%ld\n", i);
3837 }
3838 else
3839 {
0713dc29 3840 unsigned long i = ulongval ();
3841 if (i != ((long) (sizeof (void *))))
3842 exit (1);
b085c511 3843 fprintf (f, "%lu\n", i);
3844 }
0713dc29 3845 exit (ferror (f) || fclose (f) != 0);
b085c511 3846
3847 ;
3848 return 0;
3849}
3850_ACEOF
3851rm -f conftest$ac_exeext
0713dc29 3852if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3853 (eval $ac_link) 2>&5
b085c511 3854 ac_status=$?
3855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3856 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
0713dc29 3857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3858 (eval $ac_try) 2>&5
b085c511 3859 ac_status=$?
3860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3861 (exit $ac_status); }; }; then
3862 ac_cv_sizeof_void_p=`cat conftest.val`
3863else
3864 echo "$as_me: program exited with status $ac_status" >&5
3865echo "$as_me: failed program was:" >&5
3866sed 's/^/| /' conftest.$ac_ext >&5
3867
3868( exit $ac_status )
0713dc29 3869{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
b085c511 3870See \`config.log' for more details." >&5
0713dc29 3871echo "$as_me: error: cannot compute sizeof (void *), 77
b085c511 3872See \`config.log' for more details." >&2;}
0713dc29 3873 { (exit 1); exit 1; }; }
3874fi
3875rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b085c511 3876fi
3877fi
3878rm -f conftest.val
3879else
3880 ac_cv_sizeof_void_p=0
3881fi
3882fi
0713dc29 3883echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3884echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
b085c511 3885cat >>confdefs.h <<_ACEOF
3886#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3887_ACEOF
3888
3889
0713dc29 3890echo "$as_me:$LINENO: checking for short" >&5
3891echo $ECHO_N "checking for short... $ECHO_C" >&6
b085c511 3892if test "${ac_cv_type_short+set}" = set; then
3893 echo $ECHO_N "(cached) $ECHO_C" >&6
3894else
3895 cat >conftest.$ac_ext <<_ACEOF
3896/* confdefs.h. */
3897_ACEOF
3898cat confdefs.h >>conftest.$ac_ext
3899cat >>conftest.$ac_ext <<_ACEOF
3900/* end confdefs.h. */
3901$ac_includes_default
3902int
3903main ()
3904{
0713dc29 3905if ((short *) 0)
b085c511 3906 return 0;
0713dc29 3907if (sizeof (short))
b085c511 3908 return 0;
3909 ;
3910 return 0;
3911}
3912_ACEOF
3913rm -f conftest.$ac_objext
0713dc29 3914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3915 (eval $ac_compile) 2>conftest.er1
b085c511 3916 ac_status=$?
3917 grep -v '^ *+' conftest.er1 >conftest.err
3918 rm -f conftest.er1
3919 cat conftest.err >&5
3920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3921 (exit $ac_status); } &&
0713dc29 3922 { ac_try='test -z "$ac_c_werror_flag"
3923 || test ! -s conftest.err'
3924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3925 (eval $ac_try) 2>&5
b085c511 3926 ac_status=$?
3927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3928 (exit $ac_status); }; } &&
3929 { ac_try='test -s conftest.$ac_objext'
0713dc29 3930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3931 (eval $ac_try) 2>&5
b085c511 3932 ac_status=$?
3933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3934 (exit $ac_status); }; }; then
3935 ac_cv_type_short=yes
3936else
3937 echo "$as_me: failed program was:" >&5
3938sed 's/^/| /' conftest.$ac_ext >&5
3939
0713dc29 3940ac_cv_type_short=no
b085c511 3941fi
0713dc29 3942rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 3943fi
0713dc29 3944echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
3945echo "${ECHO_T}$ac_cv_type_short" >&6
b085c511 3946
0713dc29 3947echo "$as_me:$LINENO: checking size of short" >&5
3948echo $ECHO_N "checking size of short... $ECHO_C" >&6
b085c511 3949if test "${ac_cv_sizeof_short+set}" = set; then
3950 echo $ECHO_N "(cached) $ECHO_C" >&6
3951else
3952 if test "$ac_cv_type_short" = yes; then
0713dc29 3953 # The cast to unsigned long works around a bug in the HP C Compiler
b085c511 3954 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3955 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3956 # This bug is HP SR number 8606223364.
3957 if test "$cross_compiling" = yes; then
3958 # Depending upon the size, compute the lo and hi bounds.
3959cat >conftest.$ac_ext <<_ACEOF
3960/* confdefs.h. */
3961_ACEOF
3962cat confdefs.h >>conftest.$ac_ext
3963cat >>conftest.$ac_ext <<_ACEOF
3964/* end confdefs.h. */
3965$ac_includes_default
3966int
3967main ()
3968{
0713dc29 3969static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
b085c511 3970test_array [0] = 0
3971
3972 ;
3973 return 0;
3974}
3975_ACEOF
3976rm -f conftest.$ac_objext
0713dc29 3977if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3978 (eval $ac_compile) 2>conftest.er1
b085c511 3979 ac_status=$?
3980 grep -v '^ *+' conftest.er1 >conftest.err
3981 rm -f conftest.er1
3982 cat conftest.err >&5
3983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3984 (exit $ac_status); } &&
0713dc29 3985 { ac_try='test -z "$ac_c_werror_flag"
3986 || test ! -s conftest.err'
3987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3988 (eval $ac_try) 2>&5
b085c511 3989 ac_status=$?
3990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3991 (exit $ac_status); }; } &&
3992 { ac_try='test -s conftest.$ac_objext'
0713dc29 3993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3994 (eval $ac_try) 2>&5
b085c511 3995 ac_status=$?
3996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3997 (exit $ac_status); }; }; then
3998 ac_lo=0 ac_mid=0
3999 while :; do
4000 cat >conftest.$ac_ext <<_ACEOF
4001/* confdefs.h. */
4002_ACEOF
4003cat confdefs.h >>conftest.$ac_ext
4004cat >>conftest.$ac_ext <<_ACEOF
4005/* end confdefs.h. */
4006$ac_includes_default
4007int
4008main ()
4009{
0713dc29 4010static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
b085c511 4011test_array [0] = 0
4012
4013 ;
4014 return 0;
4015}
4016_ACEOF
4017rm -f conftest.$ac_objext
0713dc29 4018if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4019 (eval $ac_compile) 2>conftest.er1
b085c511 4020 ac_status=$?
4021 grep -v '^ *+' conftest.er1 >conftest.err
4022 rm -f conftest.er1
4023 cat conftest.err >&5
4024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4025 (exit $ac_status); } &&
0713dc29 4026 { ac_try='test -z "$ac_c_werror_flag"
4027 || test ! -s conftest.err'
4028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4029 (eval $ac_try) 2>&5
b085c511 4030 ac_status=$?
4031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4032 (exit $ac_status); }; } &&
4033 { ac_try='test -s conftest.$ac_objext'
0713dc29 4034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4035 (eval $ac_try) 2>&5
b085c511 4036 ac_status=$?
4037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4038 (exit $ac_status); }; }; then
4039 ac_hi=$ac_mid; break
4040else
4041 echo "$as_me: failed program was:" >&5
4042sed 's/^/| /' conftest.$ac_ext >&5
4043
0713dc29 4044ac_lo=`expr $ac_mid + 1`
4045 if test $ac_lo -le $ac_mid; then
4046 ac_lo= ac_hi=
4047 break
4048 fi
4049 ac_mid=`expr 2 '*' $ac_mid + 1`
b085c511 4050fi
0713dc29 4051rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4052 done
4053else
4054 echo "$as_me: failed program was:" >&5
4055sed 's/^/| /' conftest.$ac_ext >&5
4056
0713dc29 4057cat >conftest.$ac_ext <<_ACEOF
b085c511 4058/* confdefs.h. */
4059_ACEOF
4060cat confdefs.h >>conftest.$ac_ext
4061cat >>conftest.$ac_ext <<_ACEOF
4062/* end confdefs.h. */
4063$ac_includes_default
4064int
4065main ()
4066{
0713dc29 4067static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
b085c511 4068test_array [0] = 0
4069
4070 ;
4071 return 0;
4072}
4073_ACEOF
4074rm -f conftest.$ac_objext
0713dc29 4075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4076 (eval $ac_compile) 2>conftest.er1
b085c511 4077 ac_status=$?
4078 grep -v '^ *+' conftest.er1 >conftest.err
4079 rm -f conftest.er1
4080 cat conftest.err >&5
4081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4082 (exit $ac_status); } &&
0713dc29 4083 { ac_try='test -z "$ac_c_werror_flag"
4084 || test ! -s conftest.err'
4085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4086 (eval $ac_try) 2>&5
b085c511 4087 ac_status=$?
4088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4089 (exit $ac_status); }; } &&
4090 { ac_try='test -s conftest.$ac_objext'
0713dc29 4091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4092 (eval $ac_try) 2>&5
b085c511 4093 ac_status=$?
4094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4095 (exit $ac_status); }; }; then
4096 ac_hi=-1 ac_mid=-1
4097 while :; do
4098 cat >conftest.$ac_ext <<_ACEOF
4099/* confdefs.h. */
4100_ACEOF
4101cat confdefs.h >>conftest.$ac_ext
4102cat >>conftest.$ac_ext <<_ACEOF
4103/* end confdefs.h. */
4104$ac_includes_default
4105int
4106main ()
4107{
0713dc29 4108static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
b085c511 4109test_array [0] = 0
4110
4111 ;
4112 return 0;
4113}
4114_ACEOF
4115rm -f conftest.$ac_objext
0713dc29 4116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4117 (eval $ac_compile) 2>conftest.er1
b085c511 4118 ac_status=$?
4119 grep -v '^ *+' conftest.er1 >conftest.err
4120 rm -f conftest.er1
4121 cat conftest.err >&5
4122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4123 (exit $ac_status); } &&
0713dc29 4124 { ac_try='test -z "$ac_c_werror_flag"
4125 || test ! -s conftest.err'
4126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4127 (eval $ac_try) 2>&5
b085c511 4128 ac_status=$?
4129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4130 (exit $ac_status); }; } &&
4131 { ac_try='test -s conftest.$ac_objext'
0713dc29 4132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4133 (eval $ac_try) 2>&5
b085c511 4134 ac_status=$?
4135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4136 (exit $ac_status); }; }; then
4137 ac_lo=$ac_mid; break
4138else
4139 echo "$as_me: failed program was:" >&5
4140sed 's/^/| /' conftest.$ac_ext >&5
4141
0713dc29 4142ac_hi=`expr '(' $ac_mid ')' - 1`
4143 if test $ac_mid -le $ac_hi; then
4144 ac_lo= ac_hi=
4145 break
4146 fi
4147 ac_mid=`expr 2 '*' $ac_mid`
b085c511 4148fi
0713dc29 4149rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4150 done
4151else
4152 echo "$as_me: failed program was:" >&5
4153sed 's/^/| /' conftest.$ac_ext >&5
4154
0713dc29 4155ac_lo= ac_hi=
b085c511 4156fi
0713dc29 4157rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4158fi
0713dc29 4159rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4160# Binary search between lo and hi bounds.
4161while test "x$ac_lo" != "x$ac_hi"; do
4162 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4163 cat >conftest.$ac_ext <<_ACEOF
4164/* confdefs.h. */
4165_ACEOF
4166cat confdefs.h >>conftest.$ac_ext
4167cat >>conftest.$ac_ext <<_ACEOF
4168/* end confdefs.h. */
4169$ac_includes_default
4170int
4171main ()
4172{
0713dc29 4173static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
b085c511 4174test_array [0] = 0
4175
4176 ;
4177 return 0;
4178}
4179_ACEOF
4180rm -f conftest.$ac_objext
0713dc29 4181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4182 (eval $ac_compile) 2>conftest.er1
b085c511 4183 ac_status=$?
4184 grep -v '^ *+' conftest.er1 >conftest.err
4185 rm -f conftest.er1
4186 cat conftest.err >&5
4187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4188 (exit $ac_status); } &&
0713dc29 4189 { ac_try='test -z "$ac_c_werror_flag"
4190 || test ! -s conftest.err'
4191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4192 (eval $ac_try) 2>&5
b085c511 4193 ac_status=$?
4194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195 (exit $ac_status); }; } &&
4196 { ac_try='test -s conftest.$ac_objext'
0713dc29 4197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4198 (eval $ac_try) 2>&5
b085c511 4199 ac_status=$?
4200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4201 (exit $ac_status); }; }; then
4202 ac_hi=$ac_mid
4203else
4204 echo "$as_me: failed program was:" >&5
4205sed 's/^/| /' conftest.$ac_ext >&5
4206
0713dc29 4207ac_lo=`expr '(' $ac_mid ')' + 1`
b085c511 4208fi
0713dc29 4209rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4210done
4211case $ac_lo in
4212?*) ac_cv_sizeof_short=$ac_lo;;
0713dc29 4213'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
b085c511 4214See \`config.log' for more details." >&5
0713dc29 4215echo "$as_me: error: cannot compute sizeof (short), 77
b085c511 4216See \`config.log' for more details." >&2;}
0713dc29 4217 { (exit 1); exit 1; }; } ;;
b085c511 4218esac
0713dc29 4219else
4220 if test "$cross_compiling" = yes; then
4221 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4222See \`config.log' for more details." >&5
4223echo "$as_me: error: cannot run test program while cross compiling
4224See \`config.log' for more details." >&2;}
4225 { (exit 1); exit 1; }; }
b085c511 4226else
4227 cat >conftest.$ac_ext <<_ACEOF
4228/* confdefs.h. */
4229_ACEOF
4230cat confdefs.h >>conftest.$ac_ext
4231cat >>conftest.$ac_ext <<_ACEOF
4232/* end confdefs.h. */
4233$ac_includes_default
0713dc29 4234long longval () { return (long) (sizeof (short)); }
4235unsigned long ulongval () { return (long) (sizeof (short)); }
b085c511 4236#include <stdio.h>
4237#include <stdlib.h>
4238int
4239main ()
4240{
4241
4242 FILE *f = fopen ("conftest.val", "w");
4243 if (! f)
0713dc29 4244 exit (1);
4245 if (((long) (sizeof (short))) < 0)
b085c511 4246 {
0713dc29 4247 long i = longval ();
4248 if (i != ((long) (sizeof (short))))
4249 exit (1);
b085c511 4250 fprintf (f, "%ld\n", i);
4251 }
4252 else
4253 {
0713dc29 4254 unsigned long i = ulongval ();
4255 if (i != ((long) (sizeof (short))))
4256 exit (1);
b085c511 4257 fprintf (f, "%lu\n", i);
4258 }
0713dc29 4259 exit (ferror (f) || fclose (f) != 0);
b085c511 4260
4261 ;
4262 return 0;
4263}
4264_ACEOF
4265rm -f conftest$ac_exeext
0713dc29 4266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4267 (eval $ac_link) 2>&5
b085c511 4268 ac_status=$?
4269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4270 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
0713dc29 4271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4272 (eval $ac_try) 2>&5
b085c511 4273 ac_status=$?
4274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4275 (exit $ac_status); }; }; then
4276 ac_cv_sizeof_short=`cat conftest.val`
4277else
4278 echo "$as_me: program exited with status $ac_status" >&5
4279echo "$as_me: failed program was:" >&5
4280sed 's/^/| /' conftest.$ac_ext >&5
4281
4282( exit $ac_status )
0713dc29 4283{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
b085c511 4284See \`config.log' for more details." >&5
0713dc29 4285echo "$as_me: error: cannot compute sizeof (short), 77
b085c511 4286See \`config.log' for more details." >&2;}
0713dc29 4287 { (exit 1); exit 1; }; }
4288fi
4289rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b085c511 4290fi
4291fi
4292rm -f conftest.val
4293else
4294 ac_cv_sizeof_short=0
4295fi
4296fi
0713dc29 4297echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4298echo "${ECHO_T}$ac_cv_sizeof_short" >&6
b085c511 4299cat >>confdefs.h <<_ACEOF
4300#define SIZEOF_SHORT $ac_cv_sizeof_short
4301_ACEOF
4302
4303
0713dc29 4304echo "$as_me:$LINENO: checking for int" >&5
4305echo $ECHO_N "checking for int... $ECHO_C" >&6
b085c511 4306if test "${ac_cv_type_int+set}" = set; then
4307 echo $ECHO_N "(cached) $ECHO_C" >&6
4308else
4309 cat >conftest.$ac_ext <<_ACEOF
4310/* confdefs.h. */
4311_ACEOF
4312cat confdefs.h >>conftest.$ac_ext
4313cat >>conftest.$ac_ext <<_ACEOF
4314/* end confdefs.h. */
4315$ac_includes_default
4316int
4317main ()
4318{
0713dc29 4319if ((int *) 0)
b085c511 4320 return 0;
0713dc29 4321if (sizeof (int))
b085c511 4322 return 0;
4323 ;
4324 return 0;
4325}
4326_ACEOF
4327rm -f conftest.$ac_objext
0713dc29 4328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4329 (eval $ac_compile) 2>conftest.er1
b085c511 4330 ac_status=$?
4331 grep -v '^ *+' conftest.er1 >conftest.err
4332 rm -f conftest.er1
4333 cat conftest.err >&5
4334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4335 (exit $ac_status); } &&
0713dc29 4336 { ac_try='test -z "$ac_c_werror_flag"
4337 || test ! -s conftest.err'
4338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4339 (eval $ac_try) 2>&5
b085c511 4340 ac_status=$?
4341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4342 (exit $ac_status); }; } &&
4343 { ac_try='test -s conftest.$ac_objext'
0713dc29 4344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4345 (eval $ac_try) 2>&5
b085c511 4346 ac_status=$?
4347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4348 (exit $ac_status); }; }; then
4349 ac_cv_type_int=yes
4350else
4351 echo "$as_me: failed program was:" >&5
4352sed 's/^/| /' conftest.$ac_ext >&5
4353
0713dc29 4354ac_cv_type_int=no
b085c511 4355fi
0713dc29 4356rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4357fi
0713dc29 4358echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4359echo "${ECHO_T}$ac_cv_type_int" >&6
b085c511 4360
0713dc29 4361echo "$as_me:$LINENO: checking size of int" >&5
4362echo $ECHO_N "checking size of int... $ECHO_C" >&6
b085c511 4363if test "${ac_cv_sizeof_int+set}" = set; then
4364 echo $ECHO_N "(cached) $ECHO_C" >&6
4365else
4366 if test "$ac_cv_type_int" = yes; then
0713dc29 4367 # The cast to unsigned long works around a bug in the HP C Compiler
b085c511 4368 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4369 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4370 # This bug is HP SR number 8606223364.
4371 if test "$cross_compiling" = yes; then
4372 # Depending upon the size, compute the lo and hi bounds.
4373cat >conftest.$ac_ext <<_ACEOF
4374/* confdefs.h. */
4375_ACEOF
4376cat confdefs.h >>conftest.$ac_ext
4377cat >>conftest.$ac_ext <<_ACEOF
4378/* end confdefs.h. */
4379$ac_includes_default
4380int
4381main ()
4382{
0713dc29 4383static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
b085c511 4384test_array [0] = 0
4385
4386 ;
4387 return 0;
4388}
4389_ACEOF
4390rm -f conftest.$ac_objext
0713dc29 4391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4392 (eval $ac_compile) 2>conftest.er1
b085c511 4393 ac_status=$?
4394 grep -v '^ *+' conftest.er1 >conftest.err
4395 rm -f conftest.er1
4396 cat conftest.err >&5
4397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4398 (exit $ac_status); } &&
0713dc29 4399 { ac_try='test -z "$ac_c_werror_flag"
4400 || test ! -s conftest.err'
4401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4402 (eval $ac_try) 2>&5
b085c511 4403 ac_status=$?
4404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4405 (exit $ac_status); }; } &&
4406 { ac_try='test -s conftest.$ac_objext'
0713dc29 4407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4408 (eval $ac_try) 2>&5
b085c511 4409 ac_status=$?
4410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4411 (exit $ac_status); }; }; then
4412 ac_lo=0 ac_mid=0
4413 while :; do
4414 cat >conftest.$ac_ext <<_ACEOF
4415/* confdefs.h. */
4416_ACEOF
4417cat confdefs.h >>conftest.$ac_ext
4418cat >>conftest.$ac_ext <<_ACEOF
4419/* end confdefs.h. */
4420$ac_includes_default
4421int
4422main ()
4423{
0713dc29 4424static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
b085c511 4425test_array [0] = 0
4426
4427 ;
4428 return 0;
4429}
4430_ACEOF
4431rm -f conftest.$ac_objext
0713dc29 4432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4433 (eval $ac_compile) 2>conftest.er1
b085c511 4434 ac_status=$?
4435 grep -v '^ *+' conftest.er1 >conftest.err
4436 rm -f conftest.er1
4437 cat conftest.err >&5
4438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4439 (exit $ac_status); } &&
0713dc29 4440 { ac_try='test -z "$ac_c_werror_flag"
4441 || test ! -s conftest.err'
4442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4443 (eval $ac_try) 2>&5
b085c511 4444 ac_status=$?
4445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4446 (exit $ac_status); }; } &&
4447 { ac_try='test -s conftest.$ac_objext'
0713dc29 4448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4449 (eval $ac_try) 2>&5
b085c511 4450 ac_status=$?
4451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4452 (exit $ac_status); }; }; then
4453 ac_hi=$ac_mid; break
4454else
4455 echo "$as_me: failed program was:" >&5
4456sed 's/^/| /' conftest.$ac_ext >&5
4457
0713dc29 4458ac_lo=`expr $ac_mid + 1`
4459 if test $ac_lo -le $ac_mid; then
4460 ac_lo= ac_hi=
4461 break
4462 fi
4463 ac_mid=`expr 2 '*' $ac_mid + 1`
b085c511 4464fi
0713dc29 4465rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4466 done
4467else
4468 echo "$as_me: failed program was:" >&5
4469sed 's/^/| /' conftest.$ac_ext >&5
4470
0713dc29 4471cat >conftest.$ac_ext <<_ACEOF
b085c511 4472/* confdefs.h. */
4473_ACEOF
4474cat confdefs.h >>conftest.$ac_ext
4475cat >>conftest.$ac_ext <<_ACEOF
4476/* end confdefs.h. */
4477$ac_includes_default
4478int
4479main ()
4480{
0713dc29 4481static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
b085c511 4482test_array [0] = 0
4483
4484 ;
4485 return 0;
4486}
4487_ACEOF
4488rm -f conftest.$ac_objext
0713dc29 4489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4490 (eval $ac_compile) 2>conftest.er1
b085c511 4491 ac_status=$?
4492 grep -v '^ *+' conftest.er1 >conftest.err
4493 rm -f conftest.er1
4494 cat conftest.err >&5
4495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4496 (exit $ac_status); } &&
0713dc29 4497 { ac_try='test -z "$ac_c_werror_flag"
4498 || test ! -s conftest.err'
4499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4500 (eval $ac_try) 2>&5
b085c511 4501 ac_status=$?
4502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4503 (exit $ac_status); }; } &&
4504 { ac_try='test -s conftest.$ac_objext'
0713dc29 4505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4506 (eval $ac_try) 2>&5
b085c511 4507 ac_status=$?
4508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4509 (exit $ac_status); }; }; then
4510 ac_hi=-1 ac_mid=-1
4511 while :; do
4512 cat >conftest.$ac_ext <<_ACEOF
4513/* confdefs.h. */
4514_ACEOF
4515cat confdefs.h >>conftest.$ac_ext
4516cat >>conftest.$ac_ext <<_ACEOF
4517/* end confdefs.h. */
4518$ac_includes_default
4519int
4520main ()
4521{
0713dc29 4522static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
b085c511 4523test_array [0] = 0
4524
4525 ;
4526 return 0;
4527}
4528_ACEOF
4529rm -f conftest.$ac_objext
0713dc29 4530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4531 (eval $ac_compile) 2>conftest.er1
b085c511 4532 ac_status=$?
4533 grep -v '^ *+' conftest.er1 >conftest.err
4534 rm -f conftest.er1
4535 cat conftest.err >&5
4536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4537 (exit $ac_status); } &&
0713dc29 4538 { ac_try='test -z "$ac_c_werror_flag"
4539 || test ! -s conftest.err'
4540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4541 (eval $ac_try) 2>&5
b085c511 4542 ac_status=$?
4543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4544 (exit $ac_status); }; } &&
4545 { ac_try='test -s conftest.$ac_objext'
0713dc29 4546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4547 (eval $ac_try) 2>&5
b085c511 4548 ac_status=$?
4549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4550 (exit $ac_status); }; }; then
4551 ac_lo=$ac_mid; break
4552else
4553 echo "$as_me: failed program was:" >&5
4554sed 's/^/| /' conftest.$ac_ext >&5
4555
0713dc29 4556ac_hi=`expr '(' $ac_mid ')' - 1`
4557 if test $ac_mid -le $ac_hi; then
4558 ac_lo= ac_hi=
4559 break
4560 fi
4561 ac_mid=`expr 2 '*' $ac_mid`
b085c511 4562fi
0713dc29 4563rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4564 done
4565else
4566 echo "$as_me: failed program was:" >&5
4567sed 's/^/| /' conftest.$ac_ext >&5
4568
0713dc29 4569ac_lo= ac_hi=
b085c511 4570fi
0713dc29 4571rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4572fi
0713dc29 4573rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4574# Binary search between lo and hi bounds.
4575while test "x$ac_lo" != "x$ac_hi"; do
4576 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4577 cat >conftest.$ac_ext <<_ACEOF
4578/* confdefs.h. */
4579_ACEOF
4580cat confdefs.h >>conftest.$ac_ext
4581cat >>conftest.$ac_ext <<_ACEOF
4582/* end confdefs.h. */
4583$ac_includes_default
4584int
4585main ()
4586{
0713dc29 4587static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
b085c511 4588test_array [0] = 0
4589
4590 ;
4591 return 0;
4592}
4593_ACEOF
4594rm -f conftest.$ac_objext
0713dc29 4595if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4596 (eval $ac_compile) 2>conftest.er1
b085c511 4597 ac_status=$?
4598 grep -v '^ *+' conftest.er1 >conftest.err
4599 rm -f conftest.er1
4600 cat conftest.err >&5
4601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602 (exit $ac_status); } &&
0713dc29 4603 { ac_try='test -z "$ac_c_werror_flag"
4604 || test ! -s conftest.err'
4605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4606 (eval $ac_try) 2>&5
b085c511 4607 ac_status=$?
4608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4609 (exit $ac_status); }; } &&
4610 { ac_try='test -s conftest.$ac_objext'
0713dc29 4611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4612 (eval $ac_try) 2>&5
b085c511 4613 ac_status=$?
4614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4615 (exit $ac_status); }; }; then
4616 ac_hi=$ac_mid
4617else
4618 echo "$as_me: failed program was:" >&5
4619sed 's/^/| /' conftest.$ac_ext >&5
4620
0713dc29 4621ac_lo=`expr '(' $ac_mid ')' + 1`
b085c511 4622fi
0713dc29 4623rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4624done
4625case $ac_lo in
4626?*) ac_cv_sizeof_int=$ac_lo;;
0713dc29 4627'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
b085c511 4628See \`config.log' for more details." >&5
0713dc29 4629echo "$as_me: error: cannot compute sizeof (int), 77
b085c511 4630See \`config.log' for more details." >&2;}
0713dc29 4631 { (exit 1); exit 1; }; } ;;
b085c511 4632esac
0713dc29 4633else
4634 if test "$cross_compiling" = yes; then
4635 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4636See \`config.log' for more details." >&5
4637echo "$as_me: error: cannot run test program while cross compiling
4638See \`config.log' for more details." >&2;}
4639 { (exit 1); exit 1; }; }
b085c511 4640else
4641 cat >conftest.$ac_ext <<_ACEOF
4642/* confdefs.h. */
4643_ACEOF
4644cat confdefs.h >>conftest.$ac_ext
4645cat >>conftest.$ac_ext <<_ACEOF
4646/* end confdefs.h. */
4647$ac_includes_default
0713dc29 4648long longval () { return (long) (sizeof (int)); }
4649unsigned long ulongval () { return (long) (sizeof (int)); }
b085c511 4650#include <stdio.h>
4651#include <stdlib.h>
4652int
4653main ()
4654{
4655
4656 FILE *f = fopen ("conftest.val", "w");
4657 if (! f)
0713dc29 4658 exit (1);
4659 if (((long) (sizeof (int))) < 0)
b085c511 4660 {
0713dc29 4661 long i = longval ();
4662 if (i != ((long) (sizeof (int))))
4663 exit (1);
b085c511 4664 fprintf (f, "%ld\n", i);
4665 }
4666 else
4667 {
0713dc29 4668 unsigned long i = ulongval ();
4669 if (i != ((long) (sizeof (int))))
4670 exit (1);
b085c511 4671 fprintf (f, "%lu\n", i);
4672 }
0713dc29 4673 exit (ferror (f) || fclose (f) != 0);
b085c511 4674
4675 ;
4676 return 0;
4677}
4678_ACEOF
4679rm -f conftest$ac_exeext
0713dc29 4680if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4681 (eval $ac_link) 2>&5
b085c511 4682 ac_status=$?
4683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4684 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
0713dc29 4685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4686 (eval $ac_try) 2>&5
b085c511 4687 ac_status=$?
4688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4689 (exit $ac_status); }; }; then
4690 ac_cv_sizeof_int=`cat conftest.val`
4691else
4692 echo "$as_me: program exited with status $ac_status" >&5
4693echo "$as_me: failed program was:" >&5
4694sed 's/^/| /' conftest.$ac_ext >&5
4695
4696( exit $ac_status )
0713dc29 4697{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
b085c511 4698See \`config.log' for more details." >&5
0713dc29 4699echo "$as_me: error: cannot compute sizeof (int), 77
b085c511 4700See \`config.log' for more details." >&2;}
0713dc29 4701 { (exit 1); exit 1; }; }
4702fi
4703rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b085c511 4704fi
4705fi
4706rm -f conftest.val
4707else
4708 ac_cv_sizeof_int=0
4709fi
4710fi
0713dc29 4711echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4712echo "${ECHO_T}$ac_cv_sizeof_int" >&6
b085c511 4713cat >>confdefs.h <<_ACEOF
4714#define SIZEOF_INT $ac_cv_sizeof_int
4715_ACEOF
4716
4717
0713dc29 4718echo "$as_me:$LINENO: checking for long" >&5
4719echo $ECHO_N "checking for long... $ECHO_C" >&6
b085c511 4720if test "${ac_cv_type_long+set}" = set; then
4721 echo $ECHO_N "(cached) $ECHO_C" >&6
4722else
4723 cat >conftest.$ac_ext <<_ACEOF
4724/* confdefs.h. */
4725_ACEOF
4726cat confdefs.h >>conftest.$ac_ext
4727cat >>conftest.$ac_ext <<_ACEOF
4728/* end confdefs.h. */
4729$ac_includes_default
4730int
4731main ()
4732{
0713dc29 4733if ((long *) 0)
b085c511 4734 return 0;
0713dc29 4735if (sizeof (long))
b085c511 4736 return 0;
4737 ;
4738 return 0;
4739}
4740_ACEOF
4741rm -f conftest.$ac_objext
0713dc29 4742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4743 (eval $ac_compile) 2>conftest.er1
b085c511 4744 ac_status=$?
4745 grep -v '^ *+' conftest.er1 >conftest.err
4746 rm -f conftest.er1
4747 cat conftest.err >&5
4748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4749 (exit $ac_status); } &&
0713dc29 4750 { ac_try='test -z "$ac_c_werror_flag"
4751 || test ! -s conftest.err'
4752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4753 (eval $ac_try) 2>&5
b085c511 4754 ac_status=$?
4755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4756 (exit $ac_status); }; } &&
4757 { ac_try='test -s conftest.$ac_objext'
0713dc29 4758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4759 (eval $ac_try) 2>&5
b085c511 4760 ac_status=$?
4761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4762 (exit $ac_status); }; }; then
4763 ac_cv_type_long=yes
4764else
4765 echo "$as_me: failed program was:" >&5
4766sed 's/^/| /' conftest.$ac_ext >&5
4767
0713dc29 4768ac_cv_type_long=no
b085c511 4769fi
0713dc29 4770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4771fi
0713dc29 4772echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4773echo "${ECHO_T}$ac_cv_type_long" >&6
b085c511 4774
0713dc29 4775echo "$as_me:$LINENO: checking size of long" >&5
4776echo $ECHO_N "checking size of long... $ECHO_C" >&6
b085c511 4777if test "${ac_cv_sizeof_long+set}" = set; then
4778 echo $ECHO_N "(cached) $ECHO_C" >&6
4779else
4780 if test "$ac_cv_type_long" = yes; then
0713dc29 4781 # The cast to unsigned long works around a bug in the HP C Compiler
b085c511 4782 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4783 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4784 # This bug is HP SR number 8606223364.
4785 if test "$cross_compiling" = yes; then
4786 # Depending upon the size, compute the lo and hi bounds.
4787cat >conftest.$ac_ext <<_ACEOF
4788/* confdefs.h. */
4789_ACEOF
4790cat confdefs.h >>conftest.$ac_ext
4791cat >>conftest.$ac_ext <<_ACEOF
4792/* end confdefs.h. */
4793$ac_includes_default
4794int
4795main ()
4796{
0713dc29 4797static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
b085c511 4798test_array [0] = 0
4799
4800 ;
4801 return 0;
4802}
4803_ACEOF
4804rm -f conftest.$ac_objext
0713dc29 4805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4806 (eval $ac_compile) 2>conftest.er1
b085c511 4807 ac_status=$?
4808 grep -v '^ *+' conftest.er1 >conftest.err
4809 rm -f conftest.er1
4810 cat conftest.err >&5
4811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4812 (exit $ac_status); } &&
0713dc29 4813 { ac_try='test -z "$ac_c_werror_flag"
4814 || test ! -s conftest.err'
4815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4816 (eval $ac_try) 2>&5
b085c511 4817 ac_status=$?
4818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4819 (exit $ac_status); }; } &&
4820 { ac_try='test -s conftest.$ac_objext'
0713dc29 4821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4822 (eval $ac_try) 2>&5
b085c511 4823 ac_status=$?
4824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4825 (exit $ac_status); }; }; then
4826 ac_lo=0 ac_mid=0
4827 while :; do
4828 cat >conftest.$ac_ext <<_ACEOF
4829/* confdefs.h. */
4830_ACEOF
4831cat confdefs.h >>conftest.$ac_ext
4832cat >>conftest.$ac_ext <<_ACEOF
4833/* end confdefs.h. */
4834$ac_includes_default
4835int
4836main ()
4837{
0713dc29 4838static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
b085c511 4839test_array [0] = 0
4840
4841 ;
4842 return 0;
4843}
4844_ACEOF
4845rm -f conftest.$ac_objext
0713dc29 4846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4847 (eval $ac_compile) 2>conftest.er1
b085c511 4848 ac_status=$?
4849 grep -v '^ *+' conftest.er1 >conftest.err
4850 rm -f conftest.er1
4851 cat conftest.err >&5
4852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4853 (exit $ac_status); } &&
0713dc29 4854 { ac_try='test -z "$ac_c_werror_flag"
4855 || test ! -s conftest.err'
4856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4857 (eval $ac_try) 2>&5
b085c511 4858 ac_status=$?
4859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4860 (exit $ac_status); }; } &&
4861 { ac_try='test -s conftest.$ac_objext'
0713dc29 4862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4863 (eval $ac_try) 2>&5
b085c511 4864 ac_status=$?
4865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4866 (exit $ac_status); }; }; then
4867 ac_hi=$ac_mid; break
4868else
4869 echo "$as_me: failed program was:" >&5
4870sed 's/^/| /' conftest.$ac_ext >&5
4871
0713dc29 4872ac_lo=`expr $ac_mid + 1`
4873 if test $ac_lo -le $ac_mid; then
4874 ac_lo= ac_hi=
4875 break
4876 fi
4877 ac_mid=`expr 2 '*' $ac_mid + 1`
b085c511 4878fi
0713dc29 4879rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4880 done
4881else
4882 echo "$as_me: failed program was:" >&5
4883sed 's/^/| /' conftest.$ac_ext >&5
4884
0713dc29 4885cat >conftest.$ac_ext <<_ACEOF
b085c511 4886/* confdefs.h. */
4887_ACEOF
4888cat confdefs.h >>conftest.$ac_ext
4889cat >>conftest.$ac_ext <<_ACEOF
4890/* end confdefs.h. */
4891$ac_includes_default
4892int
4893main ()
4894{
0713dc29 4895static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
b085c511 4896test_array [0] = 0
4897
4898 ;
4899 return 0;
4900}
4901_ACEOF
4902rm -f conftest.$ac_objext
0713dc29 4903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4904 (eval $ac_compile) 2>conftest.er1
b085c511 4905 ac_status=$?
4906 grep -v '^ *+' conftest.er1 >conftest.err
4907 rm -f conftest.er1
4908 cat conftest.err >&5
4909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4910 (exit $ac_status); } &&
0713dc29 4911 { ac_try='test -z "$ac_c_werror_flag"
4912 || test ! -s conftest.err'
4913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4914 (eval $ac_try) 2>&5
b085c511 4915 ac_status=$?
4916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4917 (exit $ac_status); }; } &&
4918 { ac_try='test -s conftest.$ac_objext'
0713dc29 4919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4920 (eval $ac_try) 2>&5
b085c511 4921 ac_status=$?
4922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4923 (exit $ac_status); }; }; then
4924 ac_hi=-1 ac_mid=-1
4925 while :; do
4926 cat >conftest.$ac_ext <<_ACEOF
4927/* confdefs.h. */
4928_ACEOF
4929cat confdefs.h >>conftest.$ac_ext
4930cat >>conftest.$ac_ext <<_ACEOF
4931/* end confdefs.h. */
4932$ac_includes_default
4933int
4934main ()
4935{
0713dc29 4936static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
b085c511 4937test_array [0] = 0
4938
4939 ;
4940 return 0;
4941}
4942_ACEOF
4943rm -f conftest.$ac_objext
0713dc29 4944if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4945 (eval $ac_compile) 2>conftest.er1
b085c511 4946 ac_status=$?
4947 grep -v '^ *+' conftest.er1 >conftest.err
4948 rm -f conftest.er1
4949 cat conftest.err >&5
4950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4951 (exit $ac_status); } &&
0713dc29 4952 { ac_try='test -z "$ac_c_werror_flag"
4953 || test ! -s conftest.err'
4954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4955 (eval $ac_try) 2>&5
b085c511 4956 ac_status=$?
4957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4958 (exit $ac_status); }; } &&
4959 { ac_try='test -s conftest.$ac_objext'
0713dc29 4960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4961 (eval $ac_try) 2>&5
b085c511 4962 ac_status=$?
4963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4964 (exit $ac_status); }; }; then
4965 ac_lo=$ac_mid; break
4966else
4967 echo "$as_me: failed program was:" >&5
4968sed 's/^/| /' conftest.$ac_ext >&5
4969
0713dc29 4970ac_hi=`expr '(' $ac_mid ')' - 1`
4971 if test $ac_mid -le $ac_hi; then
4972 ac_lo= ac_hi=
4973 break
4974 fi
4975 ac_mid=`expr 2 '*' $ac_mid`
b085c511 4976fi
0713dc29 4977rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4978 done
4979else
4980 echo "$as_me: failed program was:" >&5
4981sed 's/^/| /' conftest.$ac_ext >&5
4982
0713dc29 4983ac_lo= ac_hi=
b085c511 4984fi
0713dc29 4985rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4986fi
0713dc29 4987rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 4988# Binary search between lo and hi bounds.
4989while test "x$ac_lo" != "x$ac_hi"; do
4990 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4991 cat >conftest.$ac_ext <<_ACEOF
4992/* confdefs.h. */
4993_ACEOF
4994cat confdefs.h >>conftest.$ac_ext
4995cat >>conftest.$ac_ext <<_ACEOF
4996/* end confdefs.h. */
4997$ac_includes_default
4998int
4999main ()
5000{
0713dc29 5001static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
b085c511 5002test_array [0] = 0
5003
5004 ;
5005 return 0;
5006}
5007_ACEOF
5008rm -f conftest.$ac_objext
0713dc29 5009if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5010 (eval $ac_compile) 2>conftest.er1
b085c511 5011 ac_status=$?
5012 grep -v '^ *+' conftest.er1 >conftest.err
5013 rm -f conftest.er1
5014 cat conftest.err >&5
5015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5016 (exit $ac_status); } &&
0713dc29 5017 { ac_try='test -z "$ac_c_werror_flag"
5018 || test ! -s conftest.err'
5019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5020 (eval $ac_try) 2>&5
b085c511 5021 ac_status=$?
5022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5023 (exit $ac_status); }; } &&
5024 { ac_try='test -s conftest.$ac_objext'
0713dc29 5025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5026 (eval $ac_try) 2>&5
b085c511 5027 ac_status=$?
5028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5029 (exit $ac_status); }; }; then
5030 ac_hi=$ac_mid
5031else
5032 echo "$as_me: failed program was:" >&5
5033sed 's/^/| /' conftest.$ac_ext >&5
5034
0713dc29 5035ac_lo=`expr '(' $ac_mid ')' + 1`
b085c511 5036fi
0713dc29 5037rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 5038done
5039case $ac_lo in
5040?*) ac_cv_sizeof_long=$ac_lo;;
0713dc29 5041'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
b085c511 5042See \`config.log' for more details." >&5
0713dc29 5043echo "$as_me: error: cannot compute sizeof (long), 77
b085c511 5044See \`config.log' for more details." >&2;}
0713dc29 5045 { (exit 1); exit 1; }; } ;;
b085c511 5046esac
0713dc29 5047else
5048 if test "$cross_compiling" = yes; then
5049 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5050See \`config.log' for more details." >&5
5051echo "$as_me: error: cannot run test program while cross compiling
5052See \`config.log' for more details." >&2;}
5053 { (exit 1); exit 1; }; }
b085c511 5054else
5055 cat >conftest.$ac_ext <<_ACEOF
5056/* confdefs.h. */
5057_ACEOF
5058cat confdefs.h >>conftest.$ac_ext
5059cat >>conftest.$ac_ext <<_ACEOF
5060/* end confdefs.h. */
5061$ac_includes_default
0713dc29 5062long longval () { return (long) (sizeof (long)); }
5063unsigned long ulongval () { return (long) (sizeof (long)); }
b085c511 5064#include <stdio.h>
5065#include <stdlib.h>
5066int
5067main ()
5068{
5069
5070 FILE *f = fopen ("conftest.val", "w");
5071 if (! f)
0713dc29 5072 exit (1);
5073 if (((long) (sizeof (long))) < 0)
b085c511 5074 {
0713dc29 5075 long i = longval ();
5076 if (i != ((long) (sizeof (long))))
5077 exit (1);
b085c511 5078 fprintf (f, "%ld\n", i);
5079 }
5080 else
5081 {
0713dc29 5082 unsigned long i = ulongval ();
5083 if (i != ((long) (sizeof (long))))
5084 exit (1);
b085c511 5085 fprintf (f, "%lu\n", i);
5086 }
0713dc29 5087 exit (ferror (f) || fclose (f) != 0);
b085c511 5088
5089 ;
5090 return 0;
5091}
5092_ACEOF
5093rm -f conftest$ac_exeext
0713dc29 5094if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5095 (eval $ac_link) 2>&5
b085c511 5096 ac_status=$?
5097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5098 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
0713dc29 5099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5100 (eval $ac_try) 2>&5
b085c511 5101 ac_status=$?
5102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5103 (exit $ac_status); }; }; then
5104 ac_cv_sizeof_long=`cat conftest.val`
5105else
5106 echo "$as_me: program exited with status $ac_status" >&5
5107echo "$as_me: failed program was:" >&5
5108sed 's/^/| /' conftest.$ac_ext >&5
5109
5110( exit $ac_status )
0713dc29 5111{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
b085c511 5112See \`config.log' for more details." >&5
0713dc29 5113echo "$as_me: error: cannot compute sizeof (long), 77
b085c511 5114See \`config.log' for more details." >&2;}
0713dc29 5115 { (exit 1); exit 1; }; }
5116fi
5117rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b085c511 5118fi
5119fi
5120rm -f conftest.val
5121else
5122 ac_cv_sizeof_long=0
5123fi
5124fi
0713dc29 5125echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5126echo "${ECHO_T}$ac_cv_sizeof_long" >&6
b085c511 5127cat >>confdefs.h <<_ACEOF
5128#define SIZEOF_LONG $ac_cv_sizeof_long
5129_ACEOF
5130
5131
0713dc29 5132echo "$as_me:$LINENO: checking for long long" >&5
5133echo $ECHO_N "checking for long long... $ECHO_C" >&6
cd29f3a4 5134if test "${ac_cv_type_long_long+set}" = set; then
5135 echo $ECHO_N "(cached) $ECHO_C" >&6
5136else
5137 cat >conftest.$ac_ext <<_ACEOF
5138/* confdefs.h. */
5139_ACEOF
5140cat confdefs.h >>conftest.$ac_ext
5141cat >>conftest.$ac_ext <<_ACEOF
5142/* end confdefs.h. */
5143$ac_includes_default
5144int
5145main ()
5146{
0713dc29 5147if ((long long *) 0)
cd29f3a4 5148 return 0;
0713dc29 5149if (sizeof (long long))
cd29f3a4 5150 return 0;
5151 ;
5152 return 0;
5153}
5154_ACEOF
5155rm -f conftest.$ac_objext
0713dc29 5156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5157 (eval $ac_compile) 2>conftest.er1
cd29f3a4 5158 ac_status=$?
5159 grep -v '^ *+' conftest.er1 >conftest.err
5160 rm -f conftest.er1
5161 cat conftest.err >&5
5162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5163 (exit $ac_status); } &&
0713dc29 5164 { ac_try='test -z "$ac_c_werror_flag"
5165 || test ! -s conftest.err'
5166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5167 (eval $ac_try) 2>&5
5168 ac_status=$?
cd29f3a4 5169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5170 (exit $ac_status); }; } &&
5171 { ac_try='test -s conftest.$ac_objext'
0713dc29 5172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5173 (eval $ac_try) 2>&5
cd29f3a4 5174 ac_status=$?
5175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5176 (exit $ac_status); }; }; then
5177 ac_cv_type_long_long=yes
5178else
5179 echo "$as_me: failed program was:" >&5
5180sed 's/^/| /' conftest.$ac_ext >&5
5181
0713dc29 5182ac_cv_type_long_long=no
cd29f3a4 5183fi
0713dc29 5184rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd29f3a4 5185fi
0713dc29 5186echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5187echo "${ECHO_T}$ac_cv_type_long_long" >&6
cd29f3a4 5188if test $ac_cv_type_long_long = yes; then
5189
5190cat >>confdefs.h <<_ACEOF
5191#define HAVE_LONG_LONG 1
5192_ACEOF
5193
0713dc29 5194echo "$as_me:$LINENO: checking for long long" >&5
5195echo $ECHO_N "checking for long long... $ECHO_C" >&6
b085c511 5196if test "${ac_cv_type_long_long+set}" = set; then
5197 echo $ECHO_N "(cached) $ECHO_C" >&6
5198else
5199 cat >conftest.$ac_ext <<_ACEOF
5200/* confdefs.h. */
5201_ACEOF
5202cat confdefs.h >>conftest.$ac_ext
5203cat >>conftest.$ac_ext <<_ACEOF
5204/* end confdefs.h. */
5205$ac_includes_default
5206int
5207main ()
5208{
0713dc29 5209if ((long long *) 0)
b085c511 5210 return 0;
0713dc29 5211if (sizeof (long long))
b085c511 5212 return 0;
5213 ;
5214 return 0;
5215}
5216_ACEOF
5217rm -f conftest.$ac_objext
0713dc29 5218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5219 (eval $ac_compile) 2>conftest.er1
b085c511 5220 ac_status=$?
5221 grep -v '^ *+' conftest.er1 >conftest.err
5222 rm -f conftest.er1
5223 cat conftest.err >&5
5224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5225 (exit $ac_status); } &&
0713dc29 5226 { ac_try='test -z "$ac_c_werror_flag"
5227 || test ! -s conftest.err'
5228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5229 (eval $ac_try) 2>&5
b085c511 5230 ac_status=$?
5231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5232 (exit $ac_status); }; } &&
5233 { ac_try='test -s conftest.$ac_objext'
0713dc29 5234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5235 (eval $ac_try) 2>&5
b085c511 5236 ac_status=$?
5237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5238 (exit $ac_status); }; }; then
5239 ac_cv_type_long_long=yes
5240else
5241 echo "$as_me: failed program was:" >&5
5242sed 's/^/| /' conftest.$ac_ext >&5
5243
0713dc29 5244ac_cv_type_long_long=no
b085c511 5245fi
0713dc29 5246rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 5247fi
0713dc29 5248echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5249echo "${ECHO_T}$ac_cv_type_long_long" >&6
b085c511 5250
0713dc29 5251echo "$as_me:$LINENO: checking size of long long" >&5
5252echo $ECHO_N "checking size of long long... $ECHO_C" >&6
b085c511 5253if test "${ac_cv_sizeof_long_long+set}" = set; then
5254 echo $ECHO_N "(cached) $ECHO_C" >&6
5255else
5256 if test "$ac_cv_type_long_long" = yes; then
0713dc29 5257 # The cast to unsigned long works around a bug in the HP C Compiler
b085c511 5258 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5259 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5260 # This bug is HP SR number 8606223364.
5261 if test "$cross_compiling" = yes; then
5262 # Depending upon the size, compute the lo and hi bounds.
5263cat >conftest.$ac_ext <<_ACEOF
5264/* confdefs.h. */
5265_ACEOF
5266cat confdefs.h >>conftest.$ac_ext
5267cat >>conftest.$ac_ext <<_ACEOF
5268/* end confdefs.h. */
5269$ac_includes_default
5270int
5271main ()
5272{
0713dc29 5273static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
b085c511 5274test_array [0] = 0
5275
5276 ;
5277 return 0;
5278}
5279_ACEOF
5280rm -f conftest.$ac_objext
0713dc29 5281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5282 (eval $ac_compile) 2>conftest.er1
b085c511 5283 ac_status=$?
5284 grep -v '^ *+' conftest.er1 >conftest.err
5285 rm -f conftest.er1
5286 cat conftest.err >&5
5287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5288 (exit $ac_status); } &&
0713dc29 5289 { ac_try='test -z "$ac_c_werror_flag"
5290 || test ! -s conftest.err'
5291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5292 (eval $ac_try) 2>&5
b085c511 5293 ac_status=$?
5294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5295 (exit $ac_status); }; } &&
5296 { ac_try='test -s conftest.$ac_objext'
0713dc29 5297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5298 (eval $ac_try) 2>&5
b085c511 5299 ac_status=$?
5300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5301 (exit $ac_status); }; }; then
5302 ac_lo=0 ac_mid=0
5303 while :; do
5304 cat >conftest.$ac_ext <<_ACEOF
5305/* confdefs.h. */
5306_ACEOF
5307cat confdefs.h >>conftest.$ac_ext
5308cat >>conftest.$ac_ext <<_ACEOF
5309/* end confdefs.h. */
5310$ac_includes_default
5311int
5312main ()
5313{
0713dc29 5314static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
b085c511 5315test_array [0] = 0
5316
5317 ;
5318 return 0;
5319}
5320_ACEOF
5321rm -f conftest.$ac_objext
0713dc29 5322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5323 (eval $ac_compile) 2>conftest.er1
b085c511 5324 ac_status=$?
5325 grep -v '^ *+' conftest.er1 >conftest.err
5326 rm -f conftest.er1
5327 cat conftest.err >&5
5328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5329 (exit $ac_status); } &&
0713dc29 5330 { ac_try='test -z "$ac_c_werror_flag"
5331 || test ! -s conftest.err'
5332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5333 (eval $ac_try) 2>&5
b085c511 5334 ac_status=$?
5335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5336 (exit $ac_status); }; } &&
5337 { ac_try='test -s conftest.$ac_objext'
0713dc29 5338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5339 (eval $ac_try) 2>&5
b085c511 5340 ac_status=$?
5341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5342 (exit $ac_status); }; }; then
5343 ac_hi=$ac_mid; break
5344else
5345 echo "$as_me: failed program was:" >&5
5346sed 's/^/| /' conftest.$ac_ext >&5
5347
0713dc29 5348ac_lo=`expr $ac_mid + 1`
5349 if test $ac_lo -le $ac_mid; then
5350 ac_lo= ac_hi=
5351 break
5352 fi
5353 ac_mid=`expr 2 '*' $ac_mid + 1`
b085c511 5354fi
0713dc29 5355rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 5356 done
5357else
5358 echo "$as_me: failed program was:" >&5
5359sed 's/^/| /' conftest.$ac_ext >&5
5360
0713dc29 5361cat >conftest.$ac_ext <<_ACEOF
b085c511 5362/* confdefs.h. */
5363_ACEOF
5364cat confdefs.h >>conftest.$ac_ext
5365cat >>conftest.$ac_ext <<_ACEOF
5366/* end confdefs.h. */
5367$ac_includes_default
5368int
5369main ()
5370{
0713dc29 5371static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
b085c511 5372test_array [0] = 0
5373
5374 ;
5375 return 0;
5376}
5377_ACEOF
5378rm -f conftest.$ac_objext
0713dc29 5379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5380 (eval $ac_compile) 2>conftest.er1
b085c511 5381 ac_status=$?
5382 grep -v '^ *+' conftest.er1 >conftest.err
5383 rm -f conftest.er1
5384 cat conftest.err >&5
5385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5386 (exit $ac_status); } &&
0713dc29 5387 { ac_try='test -z "$ac_c_werror_flag"
5388 || test ! -s conftest.err'
5389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5390 (eval $ac_try) 2>&5
b085c511 5391 ac_status=$?
5392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5393 (exit $ac_status); }; } &&
5394 { ac_try='test -s conftest.$ac_objext'
0713dc29 5395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5396 (eval $ac_try) 2>&5
b085c511 5397 ac_status=$?
5398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5399 (exit $ac_status); }; }; then
5400 ac_hi=-1 ac_mid=-1
5401 while :; do
5402 cat >conftest.$ac_ext <<_ACEOF
5403/* confdefs.h. */
5404_ACEOF
5405cat confdefs.h >>conftest.$ac_ext
5406cat >>conftest.$ac_ext <<_ACEOF
5407/* end confdefs.h. */
5408$ac_includes_default
5409int
5410main ()
5411{
0713dc29 5412static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
b085c511 5413test_array [0] = 0
5414
5415 ;
5416 return 0;
5417}
5418_ACEOF
5419rm -f conftest.$ac_objext
0713dc29 5420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5421 (eval $ac_compile) 2>conftest.er1
b085c511 5422 ac_status=$?
5423 grep -v '^ *+' conftest.er1 >conftest.err
5424 rm -f conftest.er1
5425 cat conftest.err >&5
5426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5427 (exit $ac_status); } &&
0713dc29 5428 { ac_try='test -z "$ac_c_werror_flag"
5429 || test ! -s conftest.err'
5430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5431 (eval $ac_try) 2>&5
b085c511 5432 ac_status=$?
5433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5434 (exit $ac_status); }; } &&
5435 { ac_try='test -s conftest.$ac_objext'
0713dc29 5436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5437 (eval $ac_try) 2>&5
b085c511 5438 ac_status=$?
5439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5440 (exit $ac_status); }; }; then
5441 ac_lo=$ac_mid; break
5442else
5443 echo "$as_me: failed program was:" >&5
5444sed 's/^/| /' conftest.$ac_ext >&5
5445
0713dc29 5446ac_hi=`expr '(' $ac_mid ')' - 1`
5447 if test $ac_mid -le $ac_hi; then
5448 ac_lo= ac_hi=
5449 break
5450 fi
5451 ac_mid=`expr 2 '*' $ac_mid`
b085c511 5452fi
0713dc29 5453rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 5454 done
5455else
5456 echo "$as_me: failed program was:" >&5
5457sed 's/^/| /' conftest.$ac_ext >&5
5458
0713dc29 5459ac_lo= ac_hi=
b085c511 5460fi
0713dc29 5461rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 5462fi
0713dc29 5463rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 5464# Binary search between lo and hi bounds.
5465while test "x$ac_lo" != "x$ac_hi"; do
5466 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5467 cat >conftest.$ac_ext <<_ACEOF
5468/* confdefs.h. */
5469_ACEOF
5470cat confdefs.h >>conftest.$ac_ext
5471cat >>conftest.$ac_ext <<_ACEOF
5472/* end confdefs.h. */
5473$ac_includes_default
5474int
5475main ()
5476{
0713dc29 5477static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
b085c511 5478test_array [0] = 0
5479
5480 ;
5481 return 0;
5482}
5483_ACEOF
5484rm -f conftest.$ac_objext
0713dc29 5485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5486 (eval $ac_compile) 2>conftest.er1
b085c511 5487 ac_status=$?
5488 grep -v '^ *+' conftest.er1 >conftest.err
5489 rm -f conftest.er1
5490 cat conftest.err >&5
5491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5492 (exit $ac_status); } &&
0713dc29 5493 { ac_try='test -z "$ac_c_werror_flag"
5494 || test ! -s conftest.err'
5495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5496 (eval $ac_try) 2>&5
b085c511 5497 ac_status=$?
5498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5499 (exit $ac_status); }; } &&
5500 { ac_try='test -s conftest.$ac_objext'
0713dc29 5501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5502 (eval $ac_try) 2>&5
b085c511 5503 ac_status=$?
5504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5505 (exit $ac_status); }; }; then
5506 ac_hi=$ac_mid
5507else
5508 echo "$as_me: failed program was:" >&5
5509sed 's/^/| /' conftest.$ac_ext >&5
5510
0713dc29 5511ac_lo=`expr '(' $ac_mid ')' + 1`
b085c511 5512fi
0713dc29 5513rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 5514done
5515case $ac_lo in
5516?*) ac_cv_sizeof_long_long=$ac_lo;;
0713dc29 5517'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
b085c511 5518See \`config.log' for more details." >&5
0713dc29 5519echo "$as_me: error: cannot compute sizeof (long long), 77
b085c511 5520See \`config.log' for more details." >&2;}
0713dc29 5521 { (exit 1); exit 1; }; } ;;
b085c511 5522esac
0713dc29 5523else
5524 if test "$cross_compiling" = yes; then
5525 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5526See \`config.log' for more details." >&5
5527echo "$as_me: error: cannot run test program while cross compiling
5528See \`config.log' for more details." >&2;}
5529 { (exit 1); exit 1; }; }
b085c511 5530else
5531 cat >conftest.$ac_ext <<_ACEOF
5532/* confdefs.h. */
5533_ACEOF
5534cat confdefs.h >>conftest.$ac_ext
5535cat >>conftest.$ac_ext <<_ACEOF
5536/* end confdefs.h. */
5537$ac_includes_default
0713dc29 5538long longval () { return (long) (sizeof (long long)); }
5539unsigned long ulongval () { return (long) (sizeof (long long)); }
b085c511 5540#include <stdio.h>
5541#include <stdlib.h>
5542int
5543main ()
5544{
5545
5546 FILE *f = fopen ("conftest.val", "w");
5547 if (! f)
0713dc29 5548 exit (1);
5549 if (((long) (sizeof (long long))) < 0)
b085c511 5550 {
0713dc29 5551 long i = longval ();
5552 if (i != ((long) (sizeof (long long))))
5553 exit (1);
b085c511 5554 fprintf (f, "%ld\n", i);
5555 }
5556 else
5557 {
0713dc29 5558 unsigned long i = ulongval ();
5559 if (i != ((long) (sizeof (long long))))
5560 exit (1);
b085c511 5561 fprintf (f, "%lu\n", i);
5562 }
0713dc29 5563 exit (ferror (f) || fclose (f) != 0);
b085c511 5564
5565 ;
5566 return 0;
5567}
5568_ACEOF
5569rm -f conftest$ac_exeext
0713dc29 5570if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5571 (eval $ac_link) 2>&5
b085c511 5572 ac_status=$?
5573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5574 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
0713dc29 5575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5576 (eval $ac_try) 2>&5
b085c511 5577 ac_status=$?
5578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5579 (exit $ac_status); }; }; then
5580 ac_cv_sizeof_long_long=`cat conftest.val`
5581else
5582 echo "$as_me: program exited with status $ac_status" >&5
5583echo "$as_me: failed program was:" >&5
5584sed 's/^/| /' conftest.$ac_ext >&5
5585
5586( exit $ac_status )
0713dc29 5587{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
b085c511 5588See \`config.log' for more details." >&5
0713dc29 5589echo "$as_me: error: cannot compute sizeof (long long), 77
b085c511 5590See \`config.log' for more details." >&2;}
0713dc29 5591 { (exit 1); exit 1; }; }
5592fi
5593rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b085c511 5594fi
5595fi
5596rm -f conftest.val
5597else
5598 ac_cv_sizeof_long_long=0
5599fi
5600fi
0713dc29 5601echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5602echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
b085c511 5603cat >>confdefs.h <<_ACEOF
5604#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5605_ACEOF
5606
5607
5608fi
cd29f3a4 5609
0713dc29 5610echo "$as_me:$LINENO: checking for __int64" >&5
5611echo $ECHO_N "checking for __int64... $ECHO_C" >&6
cd29f3a4 5612if test "${ac_cv_type___int64+set}" = set; then
5613 echo $ECHO_N "(cached) $ECHO_C" >&6
5614else
5615 cat >conftest.$ac_ext <<_ACEOF
5616/* confdefs.h. */
5617_ACEOF
5618cat confdefs.h >>conftest.$ac_ext
5619cat >>conftest.$ac_ext <<_ACEOF
5620/* end confdefs.h. */
5621$ac_includes_default
5622int
5623main ()
5624{
0713dc29 5625if ((__int64 *) 0)
cd29f3a4 5626 return 0;
0713dc29 5627if (sizeof (__int64))
cd29f3a4 5628 return 0;
5629 ;
5630 return 0;
5631}
5632_ACEOF
5633rm -f conftest.$ac_objext
0713dc29 5634if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5635 (eval $ac_compile) 2>conftest.er1
cd29f3a4 5636 ac_status=$?
5637 grep -v '^ *+' conftest.er1 >conftest.err
5638 rm -f conftest.er1
5639 cat conftest.err >&5
5640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5641 (exit $ac_status); } &&
0713dc29 5642 { ac_try='test -z "$ac_c_werror_flag"
5643 || test ! -s conftest.err'
5644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5645 (eval $ac_try) 2>&5
cd29f3a4 5646 ac_status=$?
5647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5648 (exit $ac_status); }; } &&
5649 { ac_try='test -s conftest.$ac_objext'
0713dc29 5650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5651 (eval $ac_try) 2>&5
cd29f3a4 5652 ac_status=$?
5653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5654 (exit $ac_status); }; }; then
5655 ac_cv_type___int64=yes
5656else
5657 echo "$as_me: failed program was:" >&5
5658sed 's/^/| /' conftest.$ac_ext >&5
5659
0713dc29 5660ac_cv_type___int64=no
cd29f3a4 5661fi
0713dc29 5662rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd29f3a4 5663fi
0713dc29 5664echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5665echo "${ECHO_T}$ac_cv_type___int64" >&6
cd29f3a4 5666if test $ac_cv_type___int64 = yes; then
5667
5668cat >>confdefs.h <<_ACEOF
5669#define HAVE___INT64 1
5670_ACEOF
5671
0713dc29 5672echo "$as_me:$LINENO: checking for __int64" >&5
5673echo $ECHO_N "checking for __int64... $ECHO_C" >&6
b085c511 5674if test "${ac_cv_type___int64+set}" = set; then
5675 echo $ECHO_N "(cached) $ECHO_C" >&6
5676else
6a8964db 5677 cat >conftest.$ac_ext <<_ACEOF
6a8964db 5678/* confdefs.h. */
5679_ACEOF
5680cat confdefs.h >>conftest.$ac_ext
5681cat >>conftest.$ac_ext <<_ACEOF
5682/* end confdefs.h. */
b085c511 5683$ac_includes_default
6a8964db 5684int
5685main ()
5686{
0713dc29 5687if ((__int64 *) 0)
b085c511 5688 return 0;
0713dc29 5689if (sizeof (__int64))
b085c511 5690 return 0;
6a8964db 5691 ;
5692 return 0;
5693}
5694_ACEOF
5695rm -f conftest.$ac_objext
0713dc29 5696if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5697 (eval $ac_compile) 2>conftest.er1
6a8964db 5698 ac_status=$?
9ebd0bb2 5699 grep -v '^ *+' conftest.er1 >conftest.err
5700 rm -f conftest.er1
5701 cat conftest.err >&5
6a8964db 5702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5703 (exit $ac_status); } &&
0713dc29 5704 { ac_try='test -z "$ac_c_werror_flag"
5705 || test ! -s conftest.err'
5706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5707 (eval $ac_try) 2>&5
9ebd0bb2 5708 ac_status=$?
5709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5710 (exit $ac_status); }; } &&
5711 { ac_try='test -s conftest.$ac_objext'
0713dc29 5712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5713 (eval $ac_try) 2>&5
6a8964db 5714 ac_status=$?
5715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5716 (exit $ac_status); }; }; then
b085c511 5717 ac_cv_type___int64=yes
6f817829 5718else
6a8964db 5719 echo "$as_me: failed program was:" >&5
5720sed 's/^/| /' conftest.$ac_ext >&5
5721
0713dc29 5722ac_cv_type___int64=no
6f817829 5723fi
0713dc29 5724rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6f817829 5725fi
0713dc29 5726echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5727echo "${ECHO_T}$ac_cv_type___int64" >&6
6f817829 5728
0713dc29 5729echo "$as_me:$LINENO: checking size of __int64" >&5
5730echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
b085c511 5731if test "${ac_cv_sizeof___int64+set}" = set; then
6a8964db 5732 echo $ECHO_N "(cached) $ECHO_C" >&6
0fa54ff1 5733else
b085c511 5734 if test "$ac_cv_type___int64" = yes; then
0713dc29 5735 # The cast to unsigned long works around a bug in the HP C Compiler
b085c511 5736 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5737 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5738 # This bug is HP SR number 8606223364.
5739 if test "$cross_compiling" = yes; then
5740 # Depending upon the size, compute the lo and hi bounds.
5741cat >conftest.$ac_ext <<_ACEOF
6a8964db 5742/* confdefs.h. */
5743_ACEOF
5744cat confdefs.h >>conftest.$ac_ext
5745cat >>conftest.$ac_ext <<_ACEOF
5746/* end confdefs.h. */
b085c511 5747$ac_includes_default
6a8964db 5748int
5749main ()
5750{
0713dc29 5751static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
b085c511 5752test_array [0] = 0
5753
6a8964db 5754 ;
5755 return 0;
5756}
5757_ACEOF
5758rm -f conftest.$ac_objext
0713dc29 5759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5760 (eval $ac_compile) 2>conftest.er1
6a8964db 5761 ac_status=$?
9ebd0bb2 5762 grep -v '^ *+' conftest.er1 >conftest.err
5763 rm -f conftest.er1
5764 cat conftest.err >&5
6a8964db 5765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5766 (exit $ac_status); } &&
0713dc29 5767 { ac_try='test -z "$ac_c_werror_flag"
5768 || test ! -s conftest.err'
5769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5770 (eval $ac_try) 2>&5
9ebd0bb2 5771 ac_status=$?
5772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5773 (exit $ac_status); }; } &&
5774 { ac_try='test -s conftest.$ac_objext'
0713dc29 5775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5776 (eval $ac_try) 2>&5
6a8964db 5777 ac_status=$?
5778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5779 (exit $ac_status); }; }; then
b085c511 5780 ac_lo=0 ac_mid=0
5781 while :; do
5782 cat >conftest.$ac_ext <<_ACEOF
6a8964db 5783/* confdefs.h. */
5784_ACEOF
5785cat confdefs.h >>conftest.$ac_ext
5786cat >>conftest.$ac_ext <<_ACEOF
5787/* end confdefs.h. */
b085c511 5788$ac_includes_default
6a8964db 5789int
5790main ()
5791{
0713dc29 5792static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
b085c511 5793test_array [0] = 0
5794
6a8964db 5795 ;
5796 return 0;
5797}
5798_ACEOF
5799rm -f conftest.$ac_objext
0713dc29 5800if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5801 (eval $ac_compile) 2>conftest.er1
6a8964db 5802 ac_status=$?
9ebd0bb2 5803 grep -v '^ *+' conftest.er1 >conftest.err
5804 rm -f conftest.er1
5805 cat conftest.err >&5
6a8964db 5806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5807 (exit $ac_status); } &&
0713dc29 5808 { ac_try='test -z "$ac_c_werror_flag"
5809 || test ! -s conftest.err'
5810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5811 (eval $ac_try) 2>&5
9ebd0bb2 5812 ac_status=$?
5813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5814 (exit $ac_status); }; } &&
5815 { ac_try='test -s conftest.$ac_objext'
0713dc29 5816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5817 (eval $ac_try) 2>&5
6a8964db 5818 ac_status=$?
5819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820 (exit $ac_status); }; }; then
b085c511 5821 ac_hi=$ac_mid; break
02be28b3 5822else
6a8964db 5823 echo "$as_me: failed program was:" >&5
5824sed 's/^/| /' conftest.$ac_ext >&5
5825
0713dc29 5826ac_lo=`expr $ac_mid + 1`
5827 if test $ac_lo -le $ac_mid; then
5828 ac_lo= ac_hi=
5829 break
5830 fi
5831 ac_mid=`expr 2 '*' $ac_mid + 1`
02be28b3 5832fi
0713dc29 5833rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 5834 done
02be28b3 5835else
b085c511 5836 echo "$as_me: failed program was:" >&5
5837sed 's/^/| /' conftest.$ac_ext >&5
5838
0713dc29 5839cat >conftest.$ac_ext <<_ACEOF
6a8964db 5840/* confdefs.h. */
5841_ACEOF
5842cat confdefs.h >>conftest.$ac_ext
5843cat >>conftest.$ac_ext <<_ACEOF
5844/* end confdefs.h. */
b085c511 5845$ac_includes_default
6a8964db 5846int
5847main ()
5848{
0713dc29 5849static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
b085c511 5850test_array [0] = 0
5851
6a8964db 5852 ;
5853 return 0;
5854}
5855_ACEOF
5856rm -f conftest.$ac_objext
0713dc29 5857if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5858 (eval $ac_compile) 2>conftest.er1
6a8964db 5859 ac_status=$?
9ebd0bb2 5860 grep -v '^ *+' conftest.er1 >conftest.err
5861 rm -f conftest.er1
5862 cat conftest.err >&5
6a8964db 5863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5864 (exit $ac_status); } &&
0713dc29 5865 { ac_try='test -z "$ac_c_werror_flag"
5866 || test ! -s conftest.err'
5867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5868 (eval $ac_try) 2>&5
9ebd0bb2 5869 ac_status=$?
5870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5871 (exit $ac_status); }; } &&
5872 { ac_try='test -s conftest.$ac_objext'
0713dc29 5873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5874 (eval $ac_try) 2>&5
6a8964db 5875 ac_status=$?
5876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5877 (exit $ac_status); }; }; then
b085c511 5878 ac_hi=-1 ac_mid=-1
5879 while :; do
5880 cat >conftest.$ac_ext <<_ACEOF
6a8964db 5881/* confdefs.h. */
5882_ACEOF
5883cat confdefs.h >>conftest.$ac_ext
5884cat >>conftest.$ac_ext <<_ACEOF
5885/* end confdefs.h. */
b085c511 5886$ac_includes_default
6a8964db 5887int
5888main ()
5889{
0713dc29 5890static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
b085c511 5891test_array [0] = 0
5892
6a8964db 5893 ;
5894 return 0;
5895}
5896_ACEOF
5897rm -f conftest.$ac_objext
0713dc29 5898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5899 (eval $ac_compile) 2>conftest.er1
6a8964db 5900 ac_status=$?
9ebd0bb2 5901 grep -v '^ *+' conftest.er1 >conftest.err
5902 rm -f conftest.er1
5903 cat conftest.err >&5
6a8964db 5904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5905 (exit $ac_status); } &&
0713dc29 5906 { ac_try='test -z "$ac_c_werror_flag"
5907 || test ! -s conftest.err'
5908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5909 (eval $ac_try) 2>&5
9ebd0bb2 5910 ac_status=$?
5911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5912 (exit $ac_status); }; } &&
5913 { ac_try='test -s conftest.$ac_objext'
0713dc29 5914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5915 (eval $ac_try) 2>&5
6a8964db 5916 ac_status=$?
5917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5918 (exit $ac_status); }; }; then
b085c511 5919 ac_lo=$ac_mid; break
6a7488af 5920else
6a8964db 5921 echo "$as_me: failed program was:" >&5
5922sed 's/^/| /' conftest.$ac_ext >&5
5923
0713dc29 5924ac_hi=`expr '(' $ac_mid ')' - 1`
5925 if test $ac_mid -le $ac_hi; then
5926 ac_lo= ac_hi=
5927 break
5928 fi
5929 ac_mid=`expr 2 '*' $ac_mid`
6a7488af 5930fi
0713dc29 5931rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 5932 done
5933else
5934 echo "$as_me: failed program was:" >&5
5935sed 's/^/| /' conftest.$ac_ext >&5
6a7488af 5936
0713dc29 5937ac_lo= ac_hi=
0fa54ff1 5938fi
0713dc29 5939rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
0fa54ff1 5940fi
0713dc29 5941rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 5942# Binary search between lo and hi bounds.
5943while test "x$ac_lo" != "x$ac_hi"; do
5944 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6a8964db 5945 cat >conftest.$ac_ext <<_ACEOF
6a8964db 5946/* confdefs.h. */
5947_ACEOF
5948cat confdefs.h >>conftest.$ac_ext
5949cat >>conftest.$ac_ext <<_ACEOF
5950/* end confdefs.h. */
b085c511 5951$ac_includes_default
6a8964db 5952int
5953main ()
5954{
0713dc29 5955static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
b085c511 5956test_array [0] = 0
5957
6a8964db 5958 ;
5959 return 0;
5960}
5961_ACEOF
5962rm -f conftest.$ac_objext
0713dc29 5963if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5964 (eval $ac_compile) 2>conftest.er1
6a8964db 5965 ac_status=$?
9ebd0bb2 5966 grep -v '^ *+' conftest.er1 >conftest.err
5967 rm -f conftest.er1
5968 cat conftest.err >&5
6a8964db 5969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5970 (exit $ac_status); } &&
0713dc29 5971 { ac_try='test -z "$ac_c_werror_flag"
5972 || test ! -s conftest.err'
5973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5974 (eval $ac_try) 2>&5
9ebd0bb2 5975 ac_status=$?
5976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5977 (exit $ac_status); }; } &&
5978 { ac_try='test -s conftest.$ac_objext'
0713dc29 5979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5980 (eval $ac_try) 2>&5
6a8964db 5981 ac_status=$?
5982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5983 (exit $ac_status); }; }; then
b085c511 5984 ac_hi=$ac_mid
02be28b3 5985else
6a8964db 5986 echo "$as_me: failed program was:" >&5
5987sed 's/^/| /' conftest.$ac_ext >&5
5988
0713dc29 5989ac_lo=`expr '(' $ac_mid ')' + 1`
02be28b3 5990fi
0713dc29 5991rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
0fa54ff1 5992done
b085c511 5993case $ac_lo in
5994?*) ac_cv_sizeof___int64=$ac_lo;;
0713dc29 5995'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
b085c511 5996See \`config.log' for more details." >&5
0713dc29 5997echo "$as_me: error: cannot compute sizeof (__int64), 77
b085c511 5998See \`config.log' for more details." >&2;}
0713dc29 5999 { (exit 1); exit 1; }; } ;;
b085c511 6000esac
0713dc29 6001else
6002 if test "$cross_compiling" = yes; then
6003 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6004See \`config.log' for more details." >&5
6005echo "$as_me: error: cannot run test program while cross compiling
6006See \`config.log' for more details." >&2;}
6007 { (exit 1); exit 1; }; }
b085c511 6008else
6009 cat >conftest.$ac_ext <<_ACEOF
6010/* confdefs.h. */
6011_ACEOF
6012cat confdefs.h >>conftest.$ac_ext
6013cat >>conftest.$ac_ext <<_ACEOF
6014/* end confdefs.h. */
6015$ac_includes_default
0713dc29 6016long longval () { return (long) (sizeof (__int64)); }
6017unsigned long ulongval () { return (long) (sizeof (__int64)); }
b085c511 6018#include <stdio.h>
6019#include <stdlib.h>
6020int
6021main ()
6022{
0fa54ff1 6023
b085c511 6024 FILE *f = fopen ("conftest.val", "w");
6025 if (! f)
0713dc29 6026 exit (1);
6027 if (((long) (sizeof (__int64))) < 0)
b085c511 6028 {
0713dc29 6029 long i = longval ();
6030 if (i != ((long) (sizeof (__int64))))
6031 exit (1);
b085c511 6032 fprintf (f, "%ld\n", i);
6033 }
6034 else
6035 {
0713dc29 6036 unsigned long i = ulongval ();
6037 if (i != ((long) (sizeof (__int64))))
6038 exit (1);
b085c511 6039 fprintf (f, "%lu\n", i);
6040 }
0713dc29 6041 exit (ferror (f) || fclose (f) != 0);
b085c511 6042
6043 ;
6044 return 0;
6045}
6046_ACEOF
6047rm -f conftest$ac_exeext
0713dc29 6048if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6049 (eval $ac_link) 2>&5
b085c511 6050 ac_status=$?
6051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6052 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
0713dc29 6053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6054 (eval $ac_try) 2>&5
b085c511 6055 ac_status=$?
6056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6057 (exit $ac_status); }; }; then
6058 ac_cv_sizeof___int64=`cat conftest.val`
6059else
6060 echo "$as_me: program exited with status $ac_status" >&5
6061echo "$as_me: failed program was:" >&5
6062sed 's/^/| /' conftest.$ac_ext >&5
02be28b3 6063
b085c511 6064( exit $ac_status )
0713dc29 6065{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
b085c511 6066See \`config.log' for more details." >&5
0713dc29 6067echo "$as_me: error: cannot compute sizeof (__int64), 77
b085c511 6068See \`config.log' for more details." >&2;}
0713dc29 6069 { (exit 1); exit 1; }; }
6070fi
6071rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b085c511 6072fi
6073fi
6074rm -f conftest.val
6075else
6076 ac_cv_sizeof___int64=0
6077fi
6078fi
0713dc29 6079echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6080echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
6a8964db 6081cat >>confdefs.h <<_ACEOF
0fa54ff1 6082#define SIZEOF___INT64 $ac_cv_sizeof___int64
6a8964db 6083_ACEOF
0fa54ff1 6084
c9e1a048 6085
0fa54ff1 6086fi
6087
cd29f3a4 6088
7349ace9 6089# ---------------------
6090# Warnings and checking
6091# ---------------------
6092
1f59d204 6093# Check $CC warning features (if it's GCC).
6094# We want to use -pedantic, but we don't want warnings about
6095# * 'long long'
6096# * variadic macros
1d752508 6097# * overlong strings
1f59d204 6098# So, we only use -pedantic if we can disable those warnings.
6099
0713dc29 6100echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6101echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
1f59d204 6102if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6103 echo $ECHO_N "(cached) $ECHO_C" >&6
6104else
6105 save_CFLAGS="$CFLAGS"
6106 CFLAGS="-Wno-long-long"
6107 cat >conftest.$ac_ext <<_ACEOF
6108/* confdefs.h. */
6109_ACEOF
6110cat confdefs.h >>conftest.$ac_ext
6111cat >>conftest.$ac_ext <<_ACEOF
6112/* end confdefs.h. */
6113
6114_ACEOF
6115rm -f conftest.$ac_objext
0713dc29 6116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6117 (eval $ac_compile) 2>conftest.er1
1f59d204 6118 ac_status=$?
6119 grep -v '^ *+' conftest.er1 >conftest.err
6120 rm -f conftest.er1
6121 cat conftest.err >&5
6122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6123 (exit $ac_status); } &&
0713dc29 6124 { ac_try='test -z "$ac_c_werror_flag"
6125 || test ! -s conftest.err'
6126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6127 (eval $ac_try) 2>&5
1f59d204 6128 ac_status=$?
6129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6130 (exit $ac_status); }; } &&
6131 { ac_try='test -s conftest.$ac_objext'
0713dc29 6132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6133 (eval $ac_try) 2>&5
1f59d204 6134 ac_status=$?
6135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6136 (exit $ac_status); }; }; then
6137 ac_cv_prog_cc_w_no_long_long=yes
6138else
6139 echo "$as_me: failed program was:" >&5
6140sed 's/^/| /' conftest.$ac_ext >&5
6141
0713dc29 6142ac_cv_prog_cc_w_no_long_long=no
1f59d204 6143fi
0713dc29 6144rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1f59d204 6145 CFLAGS="$save_CFLAGS"
6146
6147fi
0713dc29 6148echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6149echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
1f59d204 6150
0713dc29 6151echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6152echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
1f59d204 6153if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6154 echo $ECHO_N "(cached) $ECHO_C" >&6
6155else
6156 save_CFLAGS="$CFLAGS"
6157 CFLAGS="-Wno-variadic-macros"
6158 cat >conftest.$ac_ext <<_ACEOF
6159/* confdefs.h. */
6160_ACEOF
6161cat confdefs.h >>conftest.$ac_ext
6162cat >>conftest.$ac_ext <<_ACEOF
6163/* end confdefs.h. */
6164
6165_ACEOF
6166rm -f conftest.$ac_objext
0713dc29 6167if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6168 (eval $ac_compile) 2>conftest.er1
1f59d204 6169 ac_status=$?
6170 grep -v '^ *+' conftest.er1 >conftest.err
6171 rm -f conftest.er1
6172 cat conftest.err >&5
6173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6174 (exit $ac_status); } &&
0713dc29 6175 { ac_try='test -z "$ac_c_werror_flag"
6176 || test ! -s conftest.err'
6177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6178 (eval $ac_try) 2>&5
1f59d204 6179 ac_status=$?
6180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6181 (exit $ac_status); }; } &&
6182 { ac_try='test -s conftest.$ac_objext'
0713dc29 6183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6184 (eval $ac_try) 2>&5
1f59d204 6185 ac_status=$?
6186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6187 (exit $ac_status); }; }; then
6188 ac_cv_prog_cc_w_no_variadic_macros=yes
6189else
6190 echo "$as_me: failed program was:" >&5
6191sed 's/^/| /' conftest.$ac_ext >&5
6192
0713dc29 6193ac_cv_prog_cc_w_no_variadic_macros=no
1f59d204 6194fi
0713dc29 6195rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1f59d204 6196 CFLAGS="$save_CFLAGS"
6197
6198fi
0713dc29 6199echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6200echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
1f59d204 6201
0713dc29 6202echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5
6203echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6
1d752508 6204if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then
6205 echo $ECHO_N "(cached) $ECHO_C" >&6
6206else
6207 save_CFLAGS="$CFLAGS"
6208 CFLAGS="-Wno-overlength-strings"
6209 cat >conftest.$ac_ext <<_ACEOF
6210/* confdefs.h. */
6211_ACEOF
6212cat confdefs.h >>conftest.$ac_ext
6213cat >>conftest.$ac_ext <<_ACEOF
6214/* end confdefs.h. */
6215
6216_ACEOF
6217rm -f conftest.$ac_objext
0713dc29 6218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6219 (eval $ac_compile) 2>conftest.er1
1d752508 6220 ac_status=$?
6221 grep -v '^ *+' conftest.er1 >conftest.err
6222 rm -f conftest.er1
6223 cat conftest.err >&5
6224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6225 (exit $ac_status); } &&
0713dc29 6226 { ac_try='test -z "$ac_c_werror_flag"
6227 || test ! -s conftest.err'
6228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6229 (eval $ac_try) 2>&5
1d752508 6230 ac_status=$?
6231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6232 (exit $ac_status); }; } &&
6233 { ac_try='test -s conftest.$ac_objext'
0713dc29 6234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6235 (eval $ac_try) 2>&5
1d752508 6236 ac_status=$?
6237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6238 (exit $ac_status); }; }; then
6239 ac_cv_prog_cc_w_no_overlength_strings=yes
6240else
6241 echo "$as_me: failed program was:" >&5
6242sed 's/^/| /' conftest.$ac_ext >&5
6243
0713dc29 6244ac_cv_prog_cc_w_no_overlength_strings=no
1d752508 6245fi
0713dc29 6246rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1d752508 6247 CFLAGS="$save_CFLAGS"
6248
6249fi
0713dc29 6250echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5
6251echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6
1d752508 6252
7349ace9 6253strict1_warn=
1f59d204 6254if test $ac_cv_prog_cc_w_no_long_long = yes \
1d752508 6255 && test $ac_cv_prog_cc_w_no_variadic_macros = yes \
6256 && test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then
6257 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
7349ace9 6258fi
6259
c70828fb 6260# Add -Wold-style-definition if it's accepted
0713dc29 6261echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6262echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
c70828fb 6263if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6264 echo $ECHO_N "(cached) $ECHO_C" >&6
6265else
6266 save_CFLAGS="$CFLAGS"
6267 CFLAGS="-Wold-style-definition"
6268 cat >conftest.$ac_ext <<_ACEOF
6269/* confdefs.h. */
6270_ACEOF
6271cat confdefs.h >>conftest.$ac_ext
6272cat >>conftest.$ac_ext <<_ACEOF
6273/* end confdefs.h. */
6274
6275_ACEOF
6276rm -f conftest.$ac_objext
0713dc29 6277if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6278 (eval $ac_compile) 2>conftest.er1
c70828fb 6279 ac_status=$?
6280 grep -v '^ *+' conftest.er1 >conftest.err
6281 rm -f conftest.er1
6282 cat conftest.err >&5
6283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6284 (exit $ac_status); } &&
0713dc29 6285 { ac_try='test -z "$ac_c_werror_flag"
6286 || test ! -s conftest.err'
6287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6288 (eval $ac_try) 2>&5
c70828fb 6289 ac_status=$?
6290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6291 (exit $ac_status); }; } &&
6292 { ac_try='test -s conftest.$ac_objext'
0713dc29 6293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6294 (eval $ac_try) 2>&5
c70828fb 6295 ac_status=$?
6296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6297 (exit $ac_status); }; }; then
6298 ac_cv_prog_cc_w_old_style_definition=yes
6299else
6300 echo "$as_me: failed program was:" >&5
6301sed 's/^/| /' conftest.$ac_ext >&5
6302
0713dc29 6303ac_cv_prog_cc_w_old_style_definition=no
c70828fb 6304fi
0713dc29 6305rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c70828fb 6306 CFLAGS="$save_CFLAGS"
6307
6308fi
0713dc29 6309echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
6310echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
c70828fb 6311if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
6312 strict1_warn="${strict1_warn} -Wold-style-definition"
6313fi
6314
3df48165 6315# Add -Wmissing-format-attribute if it's accepted
0713dc29 6316echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5
6317echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6
3df48165 6318if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then
6319 echo $ECHO_N "(cached) $ECHO_C" >&6
6320else
6321 save_CFLAGS="$CFLAGS"
6322 CFLAGS="-Wmissing-format-attribute"
6323 cat >conftest.$ac_ext <<_ACEOF
6324/* confdefs.h. */
6325_ACEOF
6326cat confdefs.h >>conftest.$ac_ext
6327cat >>conftest.$ac_ext <<_ACEOF
6328/* end confdefs.h. */
6329
6330_ACEOF
6331rm -f conftest.$ac_objext
0713dc29 6332if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6333 (eval $ac_compile) 2>conftest.er1
3df48165 6334 ac_status=$?
6335 grep -v '^ *+' conftest.er1 >conftest.err
6336 rm -f conftest.er1
6337 cat conftest.err >&5
6338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6339 (exit $ac_status); } &&
0713dc29 6340 { ac_try='test -z "$ac_c_werror_flag"
6341 || test ! -s conftest.err'
6342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6343 (eval $ac_try) 2>&5
3df48165 6344 ac_status=$?
6345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6346 (exit $ac_status); }; } &&
6347 { ac_try='test -s conftest.$ac_objext'
0713dc29 6348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6349 (eval $ac_try) 2>&5
3df48165 6350 ac_status=$?
6351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6352 (exit $ac_status); }; }; then
6353 ac_cv_prog_cc_w_missing_format_attribute=yes
6354else
6355 echo "$as_me: failed program was:" >&5
6356sed 's/^/| /' conftest.$ac_ext >&5
6357
0713dc29 6358ac_cv_prog_cc_w_missing_format_attribute=no
3df48165 6359fi
0713dc29 6360rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3df48165 6361 CFLAGS="$save_CFLAGS"
6362
6363fi
0713dc29 6364echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5
6365echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6
3df48165 6366if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then
6367 strict1_warn="${strict1_warn} -Wmissing-format-attribute"
6368fi
6369
c0c5068d 6370# Enable -Werror, period.
0713dc29 6371# Check whether --enable-werror_always or --disable-werror_always was given.
c0c5068d 6372if test "${enable_werror_always+set}" = set; then
0713dc29 6373 enableval="$enable_werror_always"
6374
c0c5068d 6375else
6376 enable_werror_always=no
0713dc29 6377fi;
c0c5068d 6378if test x${enable_werror_always} = xyes ; then
6379 strict1_warn="${strict1_warn} -Werror"
6380 WERROR=-Werror
6381fi
6382
3df48165 6383
6384
4e41d774 6385# Get C++ compatibility warning flag, if supported.
0713dc29 6386echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5
6387echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6
4e41d774 6388if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then
6389 echo $ECHO_N "(cached) $ECHO_C" >&6
6390else
6391 save_CFLAGS="$CFLAGS"
6392 CFLAGS="-Wc++-compat"
6393 cat >conftest.$ac_ext <<_ACEOF
6394/* confdefs.h. */
6395_ACEOF
6396cat confdefs.h >>conftest.$ac_ext
6397cat >>conftest.$ac_ext <<_ACEOF
6398/* end confdefs.h. */
6399
6400_ACEOF
6401rm -f conftest.$ac_objext
0713dc29 6402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6403 (eval $ac_compile) 2>conftest.er1
4e41d774 6404 ac_status=$?
6405 grep -v '^ *+' conftest.er1 >conftest.err
6406 rm -f conftest.er1
6407 cat conftest.err >&5
6408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6409 (exit $ac_status); } &&
0713dc29 6410 { ac_try='test -z "$ac_c_werror_flag"
6411 || test ! -s conftest.err'
6412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6413 (eval $ac_try) 2>&5
4e41d774 6414 ac_status=$?
6415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6416 (exit $ac_status); }; } &&
6417 { ac_try='test -s conftest.$ac_objext'
0713dc29 6418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6419 (eval $ac_try) 2>&5
4e41d774 6420 ac_status=$?
6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6422 (exit $ac_status); }; }; then
6423 ac_cv_prog_cc_w_cxx_compat=yes
6424else
6425 echo "$as_me: failed program was:" >&5
6426sed 's/^/| /' conftest.$ac_ext >&5
6427
0713dc29 6428ac_cv_prog_cc_w_cxx_compat=no
4e41d774 6429fi
0713dc29 6430rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4e41d774 6431 CFLAGS="$save_CFLAGS"
6432
6433fi
0713dc29 6434echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5
6435echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6
4e41d774 6436if test x${ac_cv_prog_cc_w_cxx_compat} = xyes; then
6437 cxx_compat_warn="-Wc++-compat"
6438fi
6439
6440
6441
6a8964db 6442# If the native compiler is GCC, we can enable warnings even in stage1.
0fa54ff1 6443# That's useful for people building cross-compilers, or just running a
6444# quick `make'.
6445warn_cflags=
6446if test "x$GCC" = "xyes"; then
6447 warn_cflags='$(GCC_WARN_CFLAGS)'
6448fi
6449
6450
a179eb24 6451# Enable -Werror in bootstrap stage2 and later.
1af67e62 6452is_release=
6453if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6454 is_release=yes
6455fi
0713dc29 6456# Check whether --enable-werror or --disable-werror was given.
a179eb24 6457if test "${enable_werror+set}" = set; then
0713dc29 6458 enableval="$enable_werror"
6459
a179eb24 6460else
997731eb 6461 if test x$is_release = x ; then
6462 # Default to "yes" on development branches.
a179eb24 6463 enable_werror=yes
997731eb 6464else
6465 # Default to "no" on release branches.
6466 enable_werror=no
6467fi
0713dc29 6468fi;
a179eb24 6469if test x$enable_werror = xyes ; then
6470 WERROR=-Werror
6471fi
6472
6473
0fa54ff1 6474# Enable expensive internal checks
0713dc29 6475# Check whether --enable-checking or --disable-checking was given.
0fa54ff1 6476if test "${enable_checking+set}" = set; then
0713dc29 6477 enableval="$enable_checking"
6478 ac_checking_flags="${enableval}"
a1fa05f0 6479else
6480
6481# Determine the default checks.
6482if test x$is_release = x ; then
6483 ac_checking_flags=yes
6484else
6485 ac_checking_flags=release
6486fi
0713dc29 6487fi;
a1fa05f0 6488ac_assert_checking=1
6489ac_checking=
5391b316 6490ac_fold_checking=
6491ac_gc_checking=
6492ac_gc_always_collect=
0fa54ff1 6493ac_rtl_checking=
6494ac_rtlflag_checking=
06350693 6495ac_runtime_checking=1
5391b316 6496ac_tree_checking=
6497ac_valgrind_checking=
a1fa05f0 6498IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6499for check in $ac_checking_flags
6500do
6501 case $check in
5391b316 6502 # these set all the flags to specific states
a1fa05f0 6503 yes) ac_assert_checking=1 ; ac_checking=1 ;
5391b316 6504 ac_fold_checking= ; ac_gc_checking=1 ;
6505 ac_gc_always_collect= ; ac_rtl_checking= ;
fcd42b1e 6506 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
5391b316 6507 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6508 no|none) ac_assert_checking= ; ac_checking= ;
6509 ac_fold_checking= ; ac_gc_checking= ;
6510 ac_gc_always_collect= ; ac_rtl_checking= ;
fcd42b1e 6511 ac_rtlflag_checking= ; ac_runtime_checking= ;
5391b316 6512 ac_tree_checking= ; ac_valgrind_checking= ;;
a1fa05f0 6513 all) ac_assert_checking=1 ; ac_checking=1 ;
5391b316 6514 ac_fold_checking=1 ; ac_gc_checking=1 ;
6515 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
6516 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6517 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6518 release) ac_assert_checking=1 ; ac_checking= ;
6519 ac_fold_checking= ; ac_gc_checking= ;
6520 ac_gc_always_collect= ; ac_rtl_checking= ;
6521 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6522 ac_tree_checking= ; ac_valgrind_checking= ;;
6523 # these enable particular checks
a1fa05f0 6524 assert) ac_assert_checking=1 ;;
6525 fold) ac_fold_checking=1 ;;
6526 gc) ac_gc_checking=1 ;;
6527 gcac) ac_gc_always_collect=1 ;;
6528 misc) ac_checking=1 ;;
a1fa05f0 6529 rtl) ac_rtl_checking=1 ;;
5391b316 6530 rtlflag) ac_rtlflag_checking=1 ;;
06350693 6531 runtime) ac_runtime_checking=1 ;;
a1fa05f0 6532 tree) ac_tree_checking=1 ;;
5391b316 6533 valgrind) ac_valgrind_checking=1 ;;
a1fa05f0 6534 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
6a8964db 6535echo "$as_me: error: unknown check category $check" >&2;}
6536 { (exit 1); exit 1; }; } ;;
a1fa05f0 6537 esac
6538done
6539IFS="$ac_save_IFS"
997731eb 6540
6a8964db 6541nocommon_flag=""
6542if test x$ac_checking != x ; then
6543
6544cat >>confdefs.h <<\_ACEOF
6545#define ENABLE_CHECKING 1
6546_ACEOF
6547
6548 nocommon_flag=-fno-common
6549fi
6550
997731eb 6551if test x$ac_assert_checking != x ; then
6552
6553cat >>confdefs.h <<\_ACEOF
6554#define ENABLE_ASSERT_CHECKING 1
6555_ACEOF
6556
06350693 6557fi
fcd42b1e 6558
06350693 6559if test x$ac_runtime_checking != x ; then
6560
6561cat >>confdefs.h <<\_ACEOF
6562#define ENABLE_RUNTIME_CHECKING 1
6563_ACEOF
6564
997731eb 6565fi
6a8964db 6566if test x$ac_tree_checking != x ; then
6567
6568cat >>confdefs.h <<\_ACEOF
6569#define ENABLE_TREE_CHECKING 1
6570_ACEOF
6571
4e7212d1 6572 TREEBROWSER=tree-browser.o
6a8964db 6573fi
4e7212d1 6574
6a8964db 6575if test x$ac_rtl_checking != x ; then
6576
6577cat >>confdefs.h <<\_ACEOF
6578#define ENABLE_RTL_CHECKING 1
6579_ACEOF
6580
6581fi
6582if test x$ac_rtlflag_checking != x ; then
6583
6584cat >>confdefs.h <<\_ACEOF
6585#define ENABLE_RTL_FLAG_CHECKING 1
6586_ACEOF
6587
6588fi
6589if test x$ac_gc_checking != x ; then
6590
6591cat >>confdefs.h <<\_ACEOF
6592#define ENABLE_GC_CHECKING 1
6593_ACEOF
6594
6595fi
6596if test x$ac_gc_always_collect != x ; then
6597
6598cat >>confdefs.h <<\_ACEOF
6599#define ENABLE_GC_ALWAYS_COLLECT 1
6600_ACEOF
6601
6602fi
6603if test x$ac_fold_checking != x ; then
6604
6605cat >>confdefs.h <<\_ACEOF
6606#define ENABLE_FOLD_CHECKING 1
6607_ACEOF
6608
6609fi
6610valgrind_path_defines=
6611valgrind_command=
6612
6a8964db 6613if test "${ac_cv_header_valgrind_h+set}" = set; then
0713dc29 6614 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6615echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6a8964db 6616if test "${ac_cv_header_valgrind_h+set}" = set; then
6617 echo $ECHO_N "(cached) $ECHO_C" >&6
6618fi
0713dc29 6619echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6620echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6a8964db 6621else
6622 # Is the header compilable?
0713dc29 6623echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6624echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
6a8964db 6625cat >conftest.$ac_ext <<_ACEOF
6a8964db 6626/* confdefs.h. */
6627_ACEOF
6628cat confdefs.h >>conftest.$ac_ext
6629cat >>conftest.$ac_ext <<_ACEOF
6630/* end confdefs.h. */
6631$ac_includes_default
12b432e0 6632#include <valgrind.h>
6a8964db 6633_ACEOF
6634rm -f conftest.$ac_objext
0713dc29 6635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6636 (eval $ac_compile) 2>conftest.er1
6a8964db 6637 ac_status=$?
9ebd0bb2 6638 grep -v '^ *+' conftest.er1 >conftest.err
6639 rm -f conftest.er1
6640 cat conftest.err >&5
6a8964db 6641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6642 (exit $ac_status); } &&
0713dc29 6643 { ac_try='test -z "$ac_c_werror_flag"
6644 || test ! -s conftest.err'
6645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6646 (eval $ac_try) 2>&5
9ebd0bb2 6647 ac_status=$?
6648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6649 (exit $ac_status); }; } &&
6650 { ac_try='test -s conftest.$ac_objext'
0713dc29 6651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6652 (eval $ac_try) 2>&5
6a8964db 6653 ac_status=$?
6654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6655 (exit $ac_status); }; }; then
6656 ac_header_compiler=yes
6657else
6658 echo "$as_me: failed program was:" >&5
6659sed 's/^/| /' conftest.$ac_ext >&5
6660
0713dc29 6661ac_header_compiler=no
6a8964db 6662fi
0713dc29 6663rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6664echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6665echo "${ECHO_T}$ac_header_compiler" >&6
6a8964db 6666
6667# Is the header present?
0713dc29 6668echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6669echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
6a8964db 6670cat >conftest.$ac_ext <<_ACEOF
6a8964db 6671/* confdefs.h. */
6672_ACEOF
6673cat confdefs.h >>conftest.$ac_ext
6674cat >>conftest.$ac_ext <<_ACEOF
6675/* end confdefs.h. */
6676#include <valgrind.h>
6677_ACEOF
0713dc29 6678if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6679 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6a8964db 6680 ac_status=$?
6681 grep -v '^ *+' conftest.er1 >conftest.err
6682 rm -f conftest.er1
6683 cat conftest.err >&5
6684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6685 (exit $ac_status); } >/dev/null; then
6686 if test -s conftest.err; then
6687 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 6688 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 6689 else
6690 ac_cpp_err=
6691 fi
6692else
6693 ac_cpp_err=yes
6694fi
6695if test -z "$ac_cpp_err"; then
6696 ac_header_preproc=yes
6697else
6698 echo "$as_me: failed program was:" >&5
6699sed 's/^/| /' conftest.$ac_ext >&5
6700
6701 ac_header_preproc=no
6702fi
6703rm -f conftest.err conftest.$ac_ext
0713dc29 6704echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6705echo "${ECHO_T}$ac_header_preproc" >&6
6a8964db 6706
6707# So? What about this header?
9ebd0bb2 6708case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6709 yes:no: )
6a8964db 6710 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6711echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9ebd0bb2 6712 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6713echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6714 ac_header_preproc=yes
6a8964db 6715 ;;
9ebd0bb2 6716 no:yes:* )
6a8964db 6717 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6718echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
9ebd0bb2 6719 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6720echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6721 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6722echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6723 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6724echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
6a8964db 6725 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6726echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
9ebd0bb2 6727 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6728echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
0713dc29 6729 (
6730 cat <<\_ASBOX
6731## ------------------------------------------ ##
6732## Report this to the AC_PACKAGE_NAME lists. ##
6733## ------------------------------------------ ##
6734_ASBOX
6735 ) |
6736 sed "s/^/$as_me: WARNING: /" >&2
6a8964db 6737 ;;
6738esac
0713dc29 6739echo "$as_me:$LINENO: checking for valgrind.h" >&5
6740echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6a8964db 6741if test "${ac_cv_header_valgrind_h+set}" = set; then
6742 echo $ECHO_N "(cached) $ECHO_C" >&6
6743else
6744 ac_cv_header_valgrind_h=$ac_header_preproc
3f720cf7 6745fi
0713dc29 6746echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6747echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6a8964db 6748
c9cd172c 6749fi
6a8964db 6750if test $ac_cv_header_valgrind_h = yes; then
3f720cf7 6751 have_valgrind_h=yes
6752else
6a8964db 6753 have_valgrind_h=no
3f720cf7 6754fi
6755
6756
6a8964db 6757
5391b316 6758if test x$ac_valgrind_checking != x ; then
0fa54ff1 6759 # It is certainly possible that there's valgrind but no valgrind.h.
6760 # GCC relies on making annotations so we must have both.
0713dc29 6761 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6762echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
6a8964db 6763 cat >conftest.$ac_ext <<_ACEOF
6a8964db 6764/* confdefs.h. */
6765_ACEOF
6766cat confdefs.h >>conftest.$ac_ext
6767cat >>conftest.$ac_ext <<_ACEOF
6768/* end confdefs.h. */
a519c4d3 6769#include <valgrind/memcheck.h>
8adead19 6770#ifndef VALGRIND_DISCARD
6771#error VALGRIND_DISCARD not defined
6772#endif
6a8964db 6773_ACEOF
0713dc29 6774if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6775 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6a8964db 6776 ac_status=$?
6777 grep -v '^ *+' conftest.er1 >conftest.err
6778 rm -f conftest.er1
6779 cat conftest.err >&5
6780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6781 (exit $ac_status); } >/dev/null; then
6782 if test -s conftest.err; then
6783 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 6784 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 6785 else
6786 ac_cpp_err=
6787 fi
6788else
6789 ac_cpp_err=yes
6790fi
6791if test -z "$ac_cpp_err"; then
a519c4d3 6792 gcc_cv_header_valgrind_memcheck_h=yes
6793else
6a8964db 6794 echo "$as_me: failed program was:" >&5
6795sed 's/^/| /' conftest.$ac_ext >&5
6796
a519c4d3 6797 gcc_cv_header_valgrind_memcheck_h=no
6798fi
6a8964db 6799rm -f conftest.err conftest.$ac_ext
0713dc29 6800 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6801echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6802 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6803echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
6a8964db 6804 cat >conftest.$ac_ext <<_ACEOF
6a8964db 6805/* confdefs.h. */
6806_ACEOF
6807cat confdefs.h >>conftest.$ac_ext
6808cat >>conftest.$ac_ext <<_ACEOF
6809/* end confdefs.h. */
a519c4d3 6810#include <memcheck.h>
6811#ifndef VALGRIND_DISCARD
6812#error VALGRIND_DISCARD not defined
6813#endif
6a8964db 6814_ACEOF
0713dc29 6815if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6816 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6a8964db 6817 ac_status=$?
6818 grep -v '^ *+' conftest.er1 >conftest.err
6819 rm -f conftest.er1
6820 cat conftest.err >&5
6821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6822 (exit $ac_status); } >/dev/null; then
6823 if test -s conftest.err; then
6824 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 6825 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 6826 else
6827 ac_cpp_err=
6828 fi
6829else
6830 ac_cpp_err=yes
6831fi
6832if test -z "$ac_cpp_err"; then
8adead19 6833 gcc_cv_header_memcheck_h=yes
6834else
6a8964db 6835 echo "$as_me: failed program was:" >&5
6836sed 's/^/| /' conftest.$ac_ext >&5
6837
c9e1a048 6838 gcc_cv_header_memcheck_h=no
6839fi
6a8964db 6840rm -f conftest.err conftest.$ac_ext
0713dc29 6841 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6842echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
6a8964db 6843
c6976b58 6844# Prepare PATH_SEPARATOR.
6845# The user is always right.
6846if test "${PATH_SEPARATOR+set}" != set; then
6847 echo "#! /bin/sh" >conf$$.sh
6848 echo "exit 0" >>conf$$.sh
6849 chmod +x conf$$.sh
6850 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6851 PATH_SEPARATOR=';'
6852 else
6853 PATH_SEPARATOR=:
6854 fi
6855 rm -f conf$$.sh
6856fi
6857
6858# Find out how to test for executable files. Don't use a zero-byte file,
6859# as systems may use methods other than mode bits to determine executability.
6860cat >conf$$.file <<_ASEOF
6861#! /bin/sh
6862exit 0
6863_ASEOF
6864chmod +x conf$$.file
6865if test -x conf$$.file >/dev/null 2>&1; then
6866 ac_executable_p="test -x"
6867else
6868 ac_executable_p="test -f"
6869fi
6870rm -f conf$$.file
6871
6872# Extract the first word of "valgrind", so it can be a program name with args.
0fa54ff1 6873set dummy valgrind; ac_word=$2
0713dc29 6874echo "$as_me:$LINENO: checking for $ac_word" >&5
6875echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6a8964db 6876if test "${ac_cv_path_valgrind_path+set}" = set; then
6877 echo $ECHO_N "(cached) $ECHO_C" >&6
0fa54ff1 6878else
6879 case "$valgrind_path" in
c6976b58 6880 [\\/]* | ?:[\\/]*)
6881 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6882 ;;
0fa54ff1 6883 *)
c6976b58 6884 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6885 for ac_dir in $PATH; do
6886 IFS="$ac_save_IFS"
6887 test -z "$ac_dir" && ac_dir=.
6888 for ac_exec_ext in '' $ac_executable_extensions; do
6889 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6890 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6891 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6892 break 2
6893 fi
6894 fi
6895 done
6896 done
6897 IFS="$ac_save_IFS"
6898 ;;
0fa54ff1 6899esac
02be28b3 6900fi
0fa54ff1 6901valgrind_path="$ac_cv_path_valgrind_path"
6902if test -n "$valgrind_path"; then
0713dc29 6903 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6904echo "${ECHO_T}$valgrind_path" >&6
0fa54ff1 6905else
0713dc29 6906 echo "$as_me:$LINENO: result: no" >&5
6907echo "${ECHO_T}no" >&6
0fa54ff1 6908fi
6909
a519c4d3 6910 if test "x$valgrind_path" = "x" \
6911 || (test $have_valgrind_h = no \
6912 && test $gcc_cv_header_memcheck_h = no \
6913 && test $gcc_cv_header_valgrind_memcheck_h = no); then
6a8964db 6914 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6915echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6916 { (exit 1); exit 1; }; }
0fa54ff1 6917 fi
6918 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6919 valgrind_command="$valgrind_path -q"
6a8964db 6920
6921cat >>confdefs.h <<\_ACEOF
0fa54ff1 6922#define ENABLE_VALGRIND_CHECKING 1
6a8964db 6923_ACEOF
02be28b3 6924
a519c4d3 6925 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
6a8964db 6926
6927cat >>confdefs.h <<\_ACEOF
a519c4d3 6928#define HAVE_VALGRIND_MEMCHECK_H 1
6a8964db 6929_ACEOF
a519c4d3 6930
6931 fi
8adead19 6932 if test $gcc_cv_header_memcheck_h = yes; then
6a8964db 6933
6934cat >>confdefs.h <<\_ACEOF
8adead19 6935#define HAVE_MEMCHECK_H 1
6a8964db 6936_ACEOF
8adead19 6937
6938 fi
0fa54ff1 6939fi
02be28b3 6940
02be28b3 6941
6942
0713dc29 6943# Check whether --enable-mapped-location or --disable-mapped-location was given.
0acc9e9d 6944if test "${enable_mapped_location+set}" = set; then
0713dc29 6945 enableval="$enable_mapped_location"
6946
0acc9e9d 6947else
6948 enable_mapped_location=no
0713dc29 6949fi;
0acc9e9d 6950
6951if test "$enable_mapped_location" = yes ; then
6952
6953cat >>confdefs.h <<\_ACEOF
6954#define USE_MAPPED_LOCATION 1
6955_ACEOF
6956
6957fi
6958
0fa54ff1 6959# Enable code coverage collection
0713dc29 6960# Check whether --enable-coverage or --disable-coverage was given.
0fa54ff1 6961if test "${enable_coverage+set}" = set; then
0713dc29 6962 enableval="$enable_coverage"
6963 case "${enableval}" in
034b0f6e 6964 yes|noopt)
6965 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6966 ;;
6967 opt)
6968 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6969 ;;
6970 no)
6971 # a.k.a. --disable-coverage
6972 coverage_flags=""
6973 ;;
6974 *)
6975 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
6a8964db 6976echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6977 { (exit 1); exit 1; }; }
034b0f6e 6978 ;;
0fa54ff1 6979esac
02be28b3 6980else
0fa54ff1 6981 coverage_flags=""
0713dc29 6982fi;
0fa54ff1 6983
6a8964db 6984
0713dc29 6985# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
84eba009 6986if test "${enable_gather_detailed_mem_stats+set}" = set; then
0713dc29 6987 enableval="$enable_gather_detailed_mem_stats"
6988
86736f9e 6989else
6990 enable_gather_detailed_mem_stats=no
0713dc29 6991fi;
86736f9e 6992if test x$enable_gather_detailed_mem_stats = xyes ; then
6a8964db 6993
6994cat >>confdefs.h <<\_ACEOF
86736f9e 6995#define GATHER_STATISTICS 1
6a8964db 6996_ACEOF
86736f9e 6997
6998fi
6999
966842d4 7000# -------------------------------
7001# Miscenalleous configure options
7002# -------------------------------
7349ace9 7003
7004# With stabs
6a8964db 7005
0713dc29 7006# Check whether --with-stabs or --without-stabs was given.
7349ace9 7007if test "${with_stabs+set}" = set; then
0713dc29 7008 withval="$with_stabs"
7009 stabs="$with_stabs"
7349ace9 7010else
7011 stabs=no
0713dc29 7012fi;
c9e1a048 7013
7349ace9 7014# Determine whether or not multilibs are enabled.
0713dc29 7015# Check whether --enable-multilib or --disable-multilib was given.
7349ace9 7016if test "${enable_multilib+set}" = set; then
0713dc29 7017 enableval="$enable_multilib"
7018
7349ace9 7019else
7020 enable_multilib=yes
0713dc29 7021fi;
02be28b3 7022
7349ace9 7023
0fa54ff1 7024# Enable __cxa_atexit for C++.
0713dc29 7025# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
0fa54ff1 7026if test "${enable___cxa_atexit+set}" = set; then
0713dc29 7027 enableval="$enable___cxa_atexit"
02be28b3 7028
0713dc29 7029fi;
02be28b3 7030
e38498a2 7031# Enable C extension for decimal float if target supports it.
0713dc29 7032# Check whether --enable-decimal-float or --disable-decimal-float was given.
e38498a2 7033if test "${enable_decimal_float+set}" = set; then
0713dc29 7034 enableval="$enable_decimal_float"
7035
e38498a2 7036 if test x$enablevar = xyes ; then
7037 case $target in
7038 powerpc*-*-linux* | i?86*-*-linux*)
f705e144 7039 enable_decimal_float=yes
e38498a2 7040 ;;
7041 *)
7042 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
7043echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
7044 enable_decimal_float=no
7045 ;;
7046 esac
7047 fi
7048
7049else
f705e144 7050 enable_decimal_float=no
0713dc29 7051fi;
e38498a2 7052
7053
7054
7055dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi`
7056
7057cat >>confdefs.h <<_ACEOF
7058#define ENABLE_DECIMAL_FLOAT $dfp
7059_ACEOF
7060
7061
0fa54ff1 7062# Enable threads
7063# Pass with no value to take the default
7064# Pass with a value to specify a thread package
0713dc29 7065# Check whether --enable-threads or --disable-threads was given.
0fa54ff1 7066if test "${enable_threads+set}" = set; then
0713dc29 7067 enableval="$enable_threads"
7068
0fa54ff1 7069else
7070 enable_threads=''
0713dc29 7071fi;
c024e802 7072
0713dc29 7073# Check whether --enable-tls or --disable-tls was given.
84eba009 7074if test "${enable_tls+set}" = set; then
0713dc29 7075 enableval="$enable_tls"
7076
c024e802 7077 case $enable_tls in
7078 yes | no) ;;
7079 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
7080Valid choices are 'yes' and 'no'." >&5
7081echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
7082Valid choices are 'yes' and 'no'." >&2;}
7083 { (exit 1); exit 1; }; } ;;
7084 esac
7085
7086else
7087 enable_tls=''
0713dc29 7088fi;
84eba009 7089
0713dc29 7090# Check whether --enable-objc-gc or --disable-objc-gc was given.
0fa54ff1 7091if test "${enable_objc_gc+set}" = set; then
0713dc29 7092 enableval="$enable_objc_gc"
7093 if test x$enable_objc_gc = xno; then
0fa54ff1 7094 objc_boehm_gc=''
7095else
7096 objc_boehm_gc=1
7097fi
7098else
7099 objc_boehm_gc=''
0713dc29 7100fi;
02be28b3 7101
7102
0713dc29 7103# Check whether --with-dwarf2 or --without-dwarf2 was given.
0fa54ff1 7104if test "${with_dwarf2+set}" = set; then
0713dc29 7105 withval="$with_dwarf2"
7106 dwarf2="$with_dwarf2"
02be28b3 7107else
0fa54ff1 7108 dwarf2=no
0713dc29 7109fi;
6a8964db 7110
0713dc29 7111# Check whether --enable-shared or --disable-shared was given.
84eba009 7112if test "${enable_shared+set}" = set; then
0713dc29 7113 enableval="$enable_shared"
7114
0fa54ff1 7115 case $enable_shared in
7116 yes | no) ;;
7117 *)
7118 enable_shared=no
7119 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
7120 for pkg in $enableval; do
7121 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
7122 enable_shared=yes
7123 fi
7124 done
7125 IFS="$ac_save_ifs"
7126 ;;
7127 esac
7128
02be28b3 7129else
0fa54ff1 7130 enable_shared=yes
0713dc29 7131fi;
02be28b3 7132
02be28b3 7133
84eba009 7134
0713dc29 7135# Check whether --with-build-sysroot or --without-build-sysroot was given.
a99be165 7136if test "${with_build_sysroot+set}" = set; then
0713dc29 7137 withval="$with_build_sysroot"
a99be165 7138
0713dc29 7139fi;
a99be165 7140
7141
0713dc29 7142# Check whether --with-sysroot or --without-sysroot was given.
805e22b2 7143if test "${with_sysroot+set}" = set; then
0713dc29 7144 withval="$with_sysroot"
7145
805e22b2 7146 case ${with_sysroot} in
d58156a1 7147 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
805e22b2 7148 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
7149 esac
6a8964db 7150
805e22b2 7151 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
7152 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
7153
17acc97a 7154 if test "x$exec_prefix" = xNONE; then
7155 if test "x$prefix" = xNONE; then
7156 test_prefix=/usr/local
7157 else
7158 test_prefix=$prefix
7159 fi
7160 else
7161 test_prefix=$exec_prefix
7162 fi
7163 case ${TARGET_SYSTEM_ROOT} in
c323a7f4 7164 "${test_prefix}"|"${test_prefix}/"*|\
7165 '${exec_prefix}'|'${exec_prefix}/'*)
17acc97a 7166 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
7167 TARGET_SYSTEM_ROOT_DEFINE="$t"
7168 ;;
7169 esac
7170
805e22b2 7171else
6a8964db 7172
805e22b2 7173 TARGET_SYSTEM_ROOT=
d68c6656 7174 TARGET_SYSTEM_ROOT_DEFINE=
805e22b2 7175 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
7176
0713dc29 7177fi;
805e22b2 7178
7179
7180
7181
40109983 7182# Build with intermodule optimisations
0713dc29 7183# Check whether --enable-intermodule or --disable-intermodule was given.
40109983 7184if test "${enable_intermodule+set}" = set; then
0713dc29 7185 enableval="$enable_intermodule"
7186 case ${enable_intermodule} in
9285d7bb 7187 yes) onestep="-onestep";;
7188 *) onestep="";;
40109983 7189esac
9285d7bb 7190else
7191 onestep=""
0713dc29 7192fi;
40109983 7193
7194
5222575c 7195# Sanity check enable_languages in case someone does not run the toplevel
7196# configure # script.
0713dc29 7197# Check whether --enable-languages or --disable-languages was given.
5222575c 7198if test "${enable_languages+set}" = set; then
0713dc29 7199 enableval="$enable_languages"
7200 case ,${enable_languages}, in
5222575c 7201 ,,|,yes,)
7202 # go safe -- we cannot be much sure without the toplevel
7203 # configure's
7204 # analysis of which target libs are present and usable
7205 enable_languages=c
7206 ;;
7207 *,all,*)
7208 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
7209echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
7210 { (exit 1); exit 1; }; }
7211 ;;
7212 *,c,*)
7213 ;;
7214 *)
7215 enable_languages=c,${enable_languages}
7216 ;;
7217esac
7218else
7219 enable_languages=c
0713dc29 7220fi;
5222575c 7221
18f327f7 7222# Used by documentation targets
7223
7224
7225
5222575c 7226
966842d4 7227# -------------------------
7228# Checks for other programs
7229# -------------------------
b3ff31d3 7230
0713dc29 7231echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7232echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
7233set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
7234if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
6a8964db 7235 echo $ECHO_N "(cached) $ECHO_C" >&6
0dbd1c74 7236else
6a8964db 7237 cat >conftest.make <<\_ACEOF
0dbd1c74 7238all:
0713dc29 7239 @echo 'ac_maketemp="$(MAKE)"'
6a8964db 7240_ACEOF
0dbd1c74 7241# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
0713dc29 7242eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
7243if test -n "$ac_maketemp"; then
7244 eval ac_cv_prog_make_${ac_make}_set=yes
7245else
7246 eval ac_cv_prog_make_${ac_make}_set=no
7247fi
6a8964db 7248rm -f conftest.make
0dbd1c74 7249fi
0713dc29 7250if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
7251 echo "$as_me:$LINENO: result: yes" >&5
7252echo "${ECHO_T}yes" >&6
0dbd1c74 7253 SET_MAKE=
7254else
0713dc29 7255 echo "$as_me:$LINENO: result: no" >&5
7256echo "${ECHO_T}no" >&6
0dbd1c74 7257 SET_MAKE="MAKE=${MAKE-make}"
7258fi
7259
7260
071cd279 7261# Find some useful tools
6a8964db 7262for ac_prog in gawk mawk nawk awk
071cd279 7263do
6a8964db 7264 # Extract the first word of "$ac_prog", so it can be a program name with args.
071cd279 7265set dummy $ac_prog; ac_word=$2
0713dc29 7266echo "$as_me:$LINENO: checking for $ac_word" >&5
7267echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6a8964db 7268if test "${ac_cv_prog_AWK+set}" = set; then
7269 echo $ECHO_N "(cached) $ECHO_C" >&6
071cd279 7270else
7271 if test -n "$AWK"; then
7272 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7273else
6a8964db 7274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275for as_dir in $PATH
7276do
7277 IFS=$as_save_IFS
7278 test -z "$as_dir" && as_dir=.
7279 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 7280 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6a8964db 7281 ac_cv_prog_AWK="$ac_prog"
7282 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7283 break 2
7284 fi
7285done
7286done
7287
071cd279 7288fi
7289fi
6a8964db 7290AWK=$ac_cv_prog_AWK
071cd279 7291if test -n "$AWK"; then
0713dc29 7292 echo "$as_me:$LINENO: result: $AWK" >&5
7293echo "${ECHO_T}$AWK" >&6
071cd279 7294else
0713dc29 7295 echo "$as_me:$LINENO: result: no" >&5
7296echo "${ECHO_T}no" >&6
071cd279 7297fi
7298
6a8964db 7299 test -n "$AWK" && break
071cd279 7300done
7301
e8b212b8 7302# We need awk to create options.c and options.h.
b007b385 7303# Bail out if it's missing.
7304case ${AWK} in
6a8964db 7305 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7306echo "$as_me: error: can't build without awk, bailing out" >&2;}
7307 { (exit 1); exit 1; }; } ;;
b007b385 7308esac
7309
0713dc29 7310echo "$as_me:$LINENO: checking whether ln -s works" >&5
7311echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
6a8964db 7312if test "${gcc_cv_prog_LN_S+set}" = set; then
7313 echo $ECHO_N "(cached) $ECHO_C" >&6
551ffacc 7314else
7315 rm -f conftestdata_t
7316echo >conftestdata_f
7317if ln -s conftestdata_f conftestdata_t 2>/dev/null
7318then
7319 gcc_cv_prog_LN_S="ln -s"
7320else
7321 if ln conftestdata_f conftestdata_t 2>/dev/null
7322 then
7323 gcc_cv_prog_LN_S=ln
7324 else
26be379c 7325 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7326 then
5cdb644a 7327 gcc_cv_prog_LN_S="cp -p"
26be379c 7328 else
7329 gcc_cv_prog_LN_S=cp
7330 fi
551ffacc 7331 fi
7332fi
7333rm -f conftestdata_f conftestdata_t
7334
7335fi
7336LN_S="$gcc_cv_prog_LN_S"
7337if test "$gcc_cv_prog_LN_S" = "ln -s"; then
0713dc29 7338 echo "$as_me:$LINENO: result: yes" >&5
7339echo "${ECHO_T}yes" >&6
551ffacc 7340else
7341 if test "$gcc_cv_prog_LN_S" = "ln"; then
0713dc29 7342 echo "$as_me:$LINENO: result: no, using ln" >&5
7343echo "${ECHO_T}no, using ln" >&6
551ffacc 7344 else
0713dc29 7345 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7346echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
551ffacc 7347 fi
7348fi
7349
0713dc29 7350echo "$as_me:$LINENO: checking whether ln works" >&5
7351echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
b1ef404e 7352if test "${acx_cv_prog_LN+set}" = set; then
7353 echo $ECHO_N "(cached) $ECHO_C" >&6
7354else
7355 rm -f conftestdata_t
7356echo >conftestdata_f
7357if ln conftestdata_f conftestdata_t 2>/dev/null
7358then
7359 acx_cv_prog_LN=ln
7360else
7361 acx_cv_prog_LN=no
7362fi
7363rm -f conftestdata_f conftestdata_t
7364
7365fi
7366if test $acx_cv_prog_LN = no; then
7367 LN="$LN_S"
0713dc29 7368 echo "$as_me:$LINENO: result: no, using $LN" >&5
7369echo "${ECHO_T}no, using $LN" >&6
b1ef404e 7370else
7371 LN="$acx_cv_prog_LN"
0713dc29 7372 echo "$as_me:$LINENO: result: yes" >&5
7373echo "${ECHO_T}yes" >&6
b1ef404e 7374fi
7375
6a8964db 7376if test -n "$ac_tool_prefix"; then
7377 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7378set dummy ${ac_tool_prefix}ranlib; ac_word=$2
0713dc29 7379echo "$as_me:$LINENO: checking for $ac_word" >&5
7380echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6a8964db 7381if test "${ac_cv_prog_RANLIB+set}" = set; then
7382 echo $ECHO_N "(cached) $ECHO_C" >&6
071cd279 7383else
7384 if test -n "$RANLIB"; then
7385 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7386else
6a8964db 7387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7388for as_dir in $PATH
7389do
7390 IFS=$as_save_IFS
7391 test -z "$as_dir" && as_dir=.
7392 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 7393 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6a8964db 7394 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7395 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7396 break 2
7397 fi
7398done
7399done
7400
c9cd172c 7401fi
7402fi
6a8964db 7403RANLIB=$ac_cv_prog_RANLIB
c9cd172c 7404if test -n "$RANLIB"; then
0713dc29 7405 echo "$as_me:$LINENO: result: $RANLIB" >&5
7406echo "${ECHO_T}$RANLIB" >&6
6a8964db 7407else
0713dc29 7408 echo "$as_me:$LINENO: result: no" >&5
7409echo "${ECHO_T}no" >&6
6a8964db 7410fi
7411
7412fi
7413if test -z "$ac_cv_prog_RANLIB"; then
7414 ac_ct_RANLIB=$RANLIB
7415 # Extract the first word of "ranlib", so it can be a program name with args.
7416set dummy ranlib; ac_word=$2
0713dc29 7417echo "$as_me:$LINENO: checking for $ac_word" >&5
7418echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6a8964db 7419if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7420 echo $ECHO_N "(cached) $ECHO_C" >&6
7421else
7422 if test -n "$ac_ct_RANLIB"; then
7423 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7424else
7425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7426for as_dir in $PATH
7427do
7428 IFS=$as_save_IFS
7429 test -z "$as_dir" && as_dir=.
7430 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 7431 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6a8964db 7432 ac_cv_prog_ac_ct_RANLIB="ranlib"
7433 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7434 break 2
7435 fi
7436done
7437done
7438
0713dc29 7439 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6a8964db 7440fi
7441fi
7442ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7443if test -n "$ac_ct_RANLIB"; then
0713dc29 7444 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7445echo "${ECHO_T}$ac_ct_RANLIB" >&6
c9cd172c 7446else
0713dc29 7447 echo "$as_me:$LINENO: result: no" >&5
7448echo "${ECHO_T}no" >&6
6a8964db 7449fi
7450
0713dc29 7451 RANLIB=$ac_ct_RANLIB
6a8964db 7452else
7453 RANLIB="$ac_cv_prog_RANLIB"
071cd279 7454fi
7455
72318bfa 7456case "${host}" in
7457*-*-darwin*)
7458 # By default, the Darwin ranlib will not treat common symbols as
7459 # definitions when building the archive table of contents. Other
7460 # ranlibs do that; pass an option to the Darwin ranlib that makes
7461 # it behave similarly.
7462 ranlib_flags="-c"
7463 ;;
7464*)
7465 ranlib_flags=""
7466esac
7467
7468
551ffacc 7469# Find a good install program. We prefer a C program (faster),
7470# so one script is as good as another. But avoid the broken or
7471# incompatible versions:
7472# SysV /etc/install, /usr/sbin/install
7473# SunOS /usr/etc/install
7474# IRIX /sbin/install
7475# AIX /bin/install
7476# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7477# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7478# ./install, which can be erroneously created by make from ./install.sh.
0713dc29 7479echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7480echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
551ffacc 7481if test -z "$INSTALL"; then
6a8964db 7482if test "${ac_cv_path_install+set}" = set; then
7483 echo $ECHO_N "(cached) $ECHO_C" >&6
551ffacc 7484else
7485 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7486 for ac_dir in $PATH; do
7487 # Account for people who put trailing slashes in PATH elements.
7488 case "$ac_dir/" in
7489 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7490 *)
7491 # OSF1 and SCO ODT 3.0 have their own names for install.
7492 for ac_prog in ginstall scoinst install; do
7493 if test -f $ac_dir/$ac_prog; then
7494 if test $ac_prog = install &&
7495 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7496 # AIX install. It has an incompatible calling convention.
7497 # OSF/1 installbsd also uses dspmsg, but is usable.
7498 :
7499 else
7500 ac_cv_path_install="$ac_dir/$ac_prog -c"
7501 break 2
7502 fi
7503 fi
7504 done
7505 ;;
7506 esac
7507 done
7508 IFS="$ac_save_IFS"
7509
7510fi
7511 if test "${ac_cv_path_install+set}" = set; then
7512 INSTALL="$ac_cv_path_install"
7513 else
7514 # As a last resort, use the slow shell script. We don't cache a
7515 # path for INSTALL within a source directory, because that will
7516 # break other packages using the cache if that directory is
7517 # removed, or if the path is relative.
7518 INSTALL="$ac_install_sh"
7519 fi
7520fi
0713dc29 7521echo "$as_me:$LINENO: result: $INSTALL" >&5
7522echo "${ECHO_T}$INSTALL" >&6
551ffacc 7523
7524# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7525# It thinks the first close brace ends the variable substitution.
7526test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7527
7528test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7529
071cd279 7530
8fea036f 7531# See if cmp has --ignore-initial.
0713dc29 7532echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7533echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
6a8964db 7534if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7535 echo $ECHO_N "(cached) $ECHO_C" >&6
8fea036f 7536else
7537 echo abfoo >t1
7538 echo cdfoo >t2
a918b4b1 7539 gcc_cv_prog_cmp_skip=slowcompare
8fea036f 7540 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7541 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
a918b4b1 7542 :
8fea036f 7543 else
7544 gcc_cv_prog_cmp_skip=gnucompare
7545 fi
a918b4b1 7546 fi
7547 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7548 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7549 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7550 :
7551 else
7552 gcc_cv_prog_cmp_skip=fastcompare
7553 fi
7554 fi
8fea036f 7555 fi
7556 rm t1 t2
7557
7558fi
0713dc29 7559echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7560echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
8fea036f 7561make_compare_target=$gcc_cv_prog_cmp_skip
7562
7563
7564
966842d4 7565# See if we have the mktemp command.
7566# Extract the first word of "mktemp", so it can be a program name with args.
7567set dummy mktemp; ac_word=$2
0713dc29 7568echo "$as_me:$LINENO: checking for $ac_word" >&5
7569echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6a8964db 7570if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7571 echo $ECHO_N "(cached) $ECHO_C" >&6
966842d4 7572else
7573 if test -n "$have_mktemp_command"; then
7574 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7575else
6a8964db 7576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7577for as_dir in $PATH
7578do
7579 IFS=$as_save_IFS
7580 test -z "$as_dir" && as_dir=.
7581 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 7582 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6a8964db 7583 ac_cv_prog_have_mktemp_command="yes"
7584 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7585 break 2
7586 fi
7587done
7588done
7589
966842d4 7590 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7591fi
7592fi
6a8964db 7593have_mktemp_command=$ac_cv_prog_have_mktemp_command
966842d4 7594if test -n "$have_mktemp_command"; then
0713dc29 7595 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7596echo "${ECHO_T}$have_mktemp_command" >&6
966842d4 7597else
0713dc29 7598 echo "$as_me:$LINENO: result: no" >&5
7599echo "${ECHO_T}no" >&6
966842d4 7600fi
7601
7602
a1ad7483 7603MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
7604
7605# See if makeinfo has been installed and is modern enough
7606# that we can use it.
f32e3360 7607
7608ac_executable_extensions="$build_exeext"
7609
a1ad7483 7610# Extract the first word of "makeinfo", so it can be a program name with args.
966842d4 7611set dummy makeinfo; ac_word=$2
0713dc29 7612echo "$as_me:$LINENO: checking for $ac_word" >&5
7613echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6a8964db 7614if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7615 echo $ECHO_N "(cached) $ECHO_C" >&6
966842d4 7616else
7617 if test -n "$MAKEINFO"; then
7618 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7619else
6a8964db 7620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7621for as_dir in $PATH
7622do
7623 IFS=$as_save_IFS
7624 test -z "$as_dir" && as_dir=.
7625 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 7626 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6a8964db 7627 ac_cv_prog_MAKEINFO="makeinfo"
7628 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7629 break 2
7630 fi
7631done
7632done
7633
966842d4 7634fi
7635fi
6a8964db 7636MAKEINFO=$ac_cv_prog_MAKEINFO
966842d4 7637if test -n "$MAKEINFO"; then
0713dc29 7638 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7639echo "${ECHO_T}$MAKEINFO" >&6
966842d4 7640else
0713dc29 7641 echo "$as_me:$LINENO: result: no" >&5
7642echo "${ECHO_T}no" >&6
966842d4 7643fi
7644
7645if test -n "$MAKEINFO"; then
7646 # Found it, now check the version.
0713dc29 7647 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7648echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
6a8964db 7649if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7650 echo $ECHO_N "(cached) $ECHO_C" >&6
966842d4 7651else
7652 ac_prog_version=`$MAKEINFO --version 2>&1 |
7653 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
0713dc29 7654 echo "configure:7654: version of makeinfo is $ac_prog_version" >&5
966842d4 7655 case $ac_prog_version in
7656 '') gcc_cv_prog_makeinfo_modern=no;;
cf638329 7657 4.[4-9]*)
966842d4 7658 gcc_cv_prog_makeinfo_modern=yes;;
7659 *) gcc_cv_prog_makeinfo_modern=no;;
7660 esac
7661
7662fi
0713dc29 7663echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7664echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
966842d4 7665else
7666 gcc_cv_prog_makeinfo_modern=no
7667fi
7668
966842d4 7669if test $gcc_cv_prog_makeinfo_modern = no; then
a1ad7483 7670 MAKEINFO="$MISSING makeinfo"
6a8964db 7671 { echo "$as_me:$LINENO: WARNING:
7672*** Makeinfo is missing or too old.
7673*** Info documentation will not be built." >&5
7674echo "$as_me: WARNING:
c9e1a048 7675*** Makeinfo is missing or too old.
6a8964db 7676*** Info documentation will not be built." >&2;}
966842d4 7677 BUILD_INFO=
7678else
6a8964db 7679 BUILD_INFO=info
966842d4 7680fi
7681
a1ad7483 7682
966842d4 7683# Is pod2man recent enough to regenerate manpages?
0713dc29 7684echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7685echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
966842d4 7686if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
0713dc29 7687 echo "$as_me:$LINENO: result: yes" >&5
7688echo "${ECHO_T}yes" >&6
6a8964db 7689 GENERATED_MANPAGES=generated-manpages
966842d4 7690else
0713dc29 7691 echo "$as_me:$LINENO: result: no" >&5
7692echo "${ECHO_T}no" >&6
966842d4 7693 GENERATED_MANPAGES=
7694fi
7695
a1ad7483 7696
966842d4 7697# How about lex?
a1ad7483 7698for ac_prog in flex
7699do
7700 # Extract the first word of "$ac_prog", so it can be a program name with args.
7701set dummy $ac_prog; ac_word=$2
0713dc29 7702echo "$as_me:$LINENO: checking for $ac_word" >&5
7703echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6a8964db 7704if test "${ac_cv_prog_FLEX+set}" = set; then
7705 echo $ECHO_N "(cached) $ECHO_C" >&6
966842d4 7706else
7707 if test -n "$FLEX"; then
7708 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7709else
6a8964db 7710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7711for as_dir in $PATH
7712do
7713 IFS=$as_save_IFS
7714 test -z "$as_dir" && as_dir=.
7715 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 7716 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a1ad7483 7717 ac_cv_prog_FLEX="$ac_prog"
6a8964db 7718 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7719 break 2
7720 fi
7721done
7722done
7723
966842d4 7724fi
7725fi
6a8964db 7726FLEX=$ac_cv_prog_FLEX
966842d4 7727if test -n "$FLEX"; then
0713dc29 7728 echo "$as_me:$LINENO: result: $FLEX" >&5
7729echo "${ECHO_T}$FLEX" >&6
966842d4 7730else
0713dc29 7731 echo "$as_me:$LINENO: result: no" >&5
7732echo "${ECHO_T}no" >&6
966842d4 7733fi
7734
a1ad7483 7735 test -n "$FLEX" && break
7736done
7737test -n "$FLEX" || FLEX="$MISSING flex"
7738
966842d4 7739
7740# Bison?
a1ad7483 7741for ac_prog in bison
7742do
7743 # Extract the first word of "$ac_prog", so it can be a program name with args.
7744set dummy $ac_prog; ac_word=$2
0713dc29 7745echo "$as_me:$LINENO: checking for $ac_word" >&5
7746echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6a8964db 7747if test "${ac_cv_prog_BISON+set}" = set; then
7748 echo $ECHO_N "(cached) $ECHO_C" >&6
966842d4 7749else
7750 if test -n "$BISON"; then
7751 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7752else
6a8964db 7753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7754for as_dir in $PATH
7755do
7756 IFS=$as_save_IFS
7757 test -z "$as_dir" && as_dir=.
7758 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 7759 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a1ad7483 7760 ac_cv_prog_BISON="$ac_prog"
6a8964db 7761 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7762 break 2
7763 fi
7764done
7765done
7766
966842d4 7767fi
7768fi
6a8964db 7769BISON=$ac_cv_prog_BISON
966842d4 7770if test -n "$BISON"; then
0713dc29 7771 echo "$as_me:$LINENO: result: $BISON" >&5
7772echo "${ECHO_T}$BISON" >&6
966842d4 7773else
0713dc29 7774 echo "$as_me:$LINENO: result: no" >&5
7775echo "${ECHO_T}no" >&6
966842d4 7776fi
7777
a1ad7483 7778 test -n "$BISON" && break
7779done
7780test -n "$BISON" || BISON="$MISSING bison"
7781
7782
7783# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7784# check for build == host before using them.
966842d4 7785
6ac26439 7786# NM
28c79bfe 7787if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7788 && test -d ../binutils ; then
6ac26439 7789 NM='$(objdir)/../binutils/nm-new'
7790else
7791 # Extract the first word of "nm", so it can be a program name with args.
7792set dummy nm; ac_word=$2
0713dc29 7793echo "$as_me:$LINENO: checking for $ac_word" >&5
7794echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6ac26439 7795if test "${ac_cv_prog_NM+set}" = set; then
7796 echo $ECHO_N "(cached) $ECHO_C" >&6
7797else
7798 if test -n "$NM"; then
7799 ac_cv_prog_NM="$NM" # Let the user override the test.
7800else
7801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7802for as_dir in $PATH
7803do
7804 IFS=$as_save_IFS
7805 test -z "$as_dir" && as_dir=.
7806 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 7807 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6ac26439 7808 ac_cv_prog_NM="nm"
7809 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7810 break 2
7811 fi
7812done
7813done
7814
7815 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7816fi
7817fi
7818NM=$ac_cv_prog_NM
7819if test -n "$NM"; then
0713dc29 7820 echo "$as_me:$LINENO: result: $NM" >&5
7821echo "${ECHO_T}$NM" >&6
6ac26439 7822else
0713dc29 7823 echo "$as_me:$LINENO: result: no" >&5
7824echo "${ECHO_T}no" >&6
6ac26439 7825fi
7826
7827fi
7828
7829# AR
28c79bfe 7830if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7831 && test -d ../binutils ; then
6ac26439 7832 AR='$(objdir)/../binutils/ar'
7833else
7834 # Extract the first word of "ar", so it can be a program name with args.
7835set dummy ar; ac_word=$2
0713dc29 7836echo "$as_me:$LINENO: checking for $ac_word" >&5
7837echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6ac26439 7838if test "${ac_cv_prog_AR+set}" = set; then
7839 echo $ECHO_N "(cached) $ECHO_C" >&6
7840else
7841 if test -n "$AR"; then
7842 ac_cv_prog_AR="$AR" # Let the user override the test.
7843else
7844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7845for as_dir in $PATH
7846do
7847 IFS=$as_save_IFS
7848 test -z "$as_dir" && as_dir=.
7849 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 7850 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6ac26439 7851 ac_cv_prog_AR="ar"
7852 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7853 break 2
7854 fi
7855done
7856done
7857
7858 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7859fi
7860fi
7861AR=$ac_cv_prog_AR
7862if test -n "$AR"; then
0713dc29 7863 echo "$as_me:$LINENO: result: $AR" >&5
7864echo "${ECHO_T}$AR" >&6
6ac26439 7865else
0713dc29 7866 echo "$as_me:$LINENO: result: no" >&5
7867echo "${ECHO_T}no" >&6
6ac26439 7868fi
7869
7870fi
7871
7872
966842d4 7873# --------------------
7874# Checks for C headers
7875# --------------------
7876
0713dc29 7877echo "$as_me:$LINENO: checking for GNU C library" >&5
7878echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
6a8964db 7879if test "${gcc_cv_glibc+set}" = set; then
7880 echo $ECHO_N "(cached) $ECHO_C" >&6
7881else
7882 cat >conftest.$ac_ext <<_ACEOF
6a8964db 7883/* confdefs.h. */
7884_ACEOF
7885cat confdefs.h >>conftest.$ac_ext
7886cat >>conftest.$ac_ext <<_ACEOF
7887/* end confdefs.h. */
966842d4 7888#include <features.h>
6a8964db 7889int
7890main ()
7891{
966842d4 7892
7893#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7894#error Not a GNU C library system
7895#endif
6a8964db 7896 ;
7897 return 0;
7898}
7899_ACEOF
7900rm -f conftest.$ac_objext
0713dc29 7901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7902 (eval $ac_compile) 2>conftest.er1
6a8964db 7903 ac_status=$?
9ebd0bb2 7904 grep -v '^ *+' conftest.er1 >conftest.err
7905 rm -f conftest.er1
7906 cat conftest.err >&5
6a8964db 7907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7908 (exit $ac_status); } &&
0713dc29 7909 { ac_try='test -z "$ac_c_werror_flag"
7910 || test ! -s conftest.err'
7911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7912 (eval $ac_try) 2>&5
9ebd0bb2 7913 ac_status=$?
7914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7915 (exit $ac_status); }; } &&
7916 { ac_try='test -s conftest.$ac_objext'
0713dc29 7917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7918 (eval $ac_try) 2>&5
6a8964db 7919 ac_status=$?
7920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7921 (exit $ac_status); }; }; then
966842d4 7922 gcc_cv_glibc=yes
7923else
6a8964db 7924 echo "$as_me: failed program was:" >&5
7925sed 's/^/| /' conftest.$ac_ext >&5
7926
0713dc29 7927gcc_cv_glibc=no
966842d4 7928fi
0713dc29 7929rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
966842d4 7930fi
7931
0713dc29 7932echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7933echo "${ECHO_T}$gcc_cv_glibc" >&6
966842d4 7934if test $gcc_cv_glibc = yes; then
6a8964db 7935
7936cat >>confdefs.h <<\_ACEOF
966842d4 7937#define _GNU_SOURCE 1
6a8964db 7938_ACEOF
966842d4 7939
7940fi
7941
2cd18f76 7942# Need to reject headers which give warnings, so that the -Werror bootstrap
7943# works later. *sigh* This needs to come before all header checks.
b1ef404e 7944
2cd18f76 7945ac_c_preproc_warn_flag=yes
7946
0713dc29 7947echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7948echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6a8964db 7949if test "${ac_cv_header_stdc+set}" = set; then
7950 echo $ECHO_N "(cached) $ECHO_C" >&6
ad87de1e 7951else
6a8964db 7952 cat >conftest.$ac_ext <<_ACEOF
6a8964db 7953/* confdefs.h. */
7954_ACEOF
7955cat confdefs.h >>conftest.$ac_ext
7956cat >>conftest.$ac_ext <<_ACEOF
7957/* end confdefs.h. */
ad87de1e 7958#include <stdlib.h>
7959#include <stdarg.h>
7960#include <string.h>
7961#include <float.h>
6a8964db 7962
7963int
7964main ()
7965{
7966
7967 ;
7968 return 0;
7969}
7970_ACEOF
7971rm -f conftest.$ac_objext
0713dc29 7972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7973 (eval $ac_compile) 2>conftest.er1
6a8964db 7974 ac_status=$?
9ebd0bb2 7975 grep -v '^ *+' conftest.er1 >conftest.err
7976 rm -f conftest.er1
7977 cat conftest.err >&5
6a8964db 7978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7979 (exit $ac_status); } &&
0713dc29 7980 { ac_try='test -z "$ac_c_werror_flag"
7981 || test ! -s conftest.err'
7982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7983 (eval $ac_try) 2>&5
9ebd0bb2 7984 ac_status=$?
7985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7986 (exit $ac_status); }; } &&
7987 { ac_try='test -s conftest.$ac_objext'
0713dc29 7988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7989 (eval $ac_try) 2>&5
6a8964db 7990 ac_status=$?
7991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7992 (exit $ac_status); }; }; then
ad87de1e 7993 ac_cv_header_stdc=yes
7994else
6a8964db 7995 echo "$as_me: failed program was:" >&5
7996sed 's/^/| /' conftest.$ac_ext >&5
7997
0713dc29 7998ac_cv_header_stdc=no
ad87de1e 7999fi
0713dc29 8000rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ad87de1e 8001
8002if test $ac_cv_header_stdc = yes; then
8003 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6a8964db 8004 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8005/* confdefs.h. */
8006_ACEOF
8007cat confdefs.h >>conftest.$ac_ext
8008cat >>conftest.$ac_ext <<_ACEOF
8009/* end confdefs.h. */
ad87de1e 8010#include <string.h>
6a8964db 8011
8012_ACEOF
ad87de1e 8013if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6a8964db 8014 $EGREP "memchr" >/dev/null 2>&1; then
ad87de1e 8015 :
8016else
ad87de1e 8017 ac_cv_header_stdc=no
8018fi
8019rm -f conftest*
8020
8021fi
8022
8023if test $ac_cv_header_stdc = yes; then
8024 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6a8964db 8025 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8026/* confdefs.h. */
8027_ACEOF
8028cat confdefs.h >>conftest.$ac_ext
8029cat >>conftest.$ac_ext <<_ACEOF
8030/* end confdefs.h. */
ad87de1e 8031#include <stdlib.h>
6a8964db 8032
8033_ACEOF
ad87de1e 8034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6a8964db 8035 $EGREP "free" >/dev/null 2>&1; then
ad87de1e 8036 :
8037else
ad87de1e 8038 ac_cv_header_stdc=no
8039fi
8040rm -f conftest*
8041
8042fi
8043
8044if test $ac_cv_header_stdc = yes; then
8045 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6a8964db 8046 if test "$cross_compiling" = yes; then
ad87de1e 8047 :
8048else
6a8964db 8049 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8050/* confdefs.h. */
8051_ACEOF
8052cat confdefs.h >>conftest.$ac_ext
8053cat >>conftest.$ac_ext <<_ACEOF
8054/* end confdefs.h. */
ad87de1e 8055#include <ctype.h>
6a8964db 8056#if ((' ' & 0x0FF) == 0x020)
8057# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8058# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8059#else
8060# define ISLOWER(c) \
9ebd0bb2 8061 (('a' <= (c) && (c) <= 'i') \
8062 || ('j' <= (c) && (c) <= 'r') \
8063 || ('s' <= (c) && (c) <= 'z'))
6a8964db 8064# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8065#endif
12b432e0 8066
6a8964db 8067#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8068int
8069main ()
8070{
8071 int i;
8072 for (i = 0; i < 256; i++)
8073 if (XOR (islower (i), ISLOWER (i))
9ebd0bb2 8074 || toupper (i) != TOUPPER (i))
0713dc29 8075 exit(2);
8076 exit (0);
6a8964db 8077}
8078_ACEOF
8079rm -f conftest$ac_exeext
0713dc29 8080if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8081 (eval $ac_link) 2>&5
6a8964db 8082 ac_status=$?
8083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8084 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
0713dc29 8085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8086 (eval $ac_try) 2>&5
6a8964db 8087 ac_status=$?
8088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8089 (exit $ac_status); }; }; then
ad87de1e 8090 :
8091else
6a8964db 8092 echo "$as_me: program exited with status $ac_status" >&5
8093echo "$as_me: failed program was:" >&5
8094sed 's/^/| /' conftest.$ac_ext >&5
8095
8096( exit $ac_status )
8097ac_cv_header_stdc=no
ad87de1e 8098fi
0713dc29 8099rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ad87de1e 8100fi
ad87de1e 8101fi
8102fi
0713dc29 8103echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8104echo "${ECHO_T}$ac_cv_header_stdc" >&6
12b432e0 8105if test $ac_cv_header_stdc = yes; then
6a8964db 8106
8107cat >>confdefs.h <<\_ACEOF
ad87de1e 8108#define STDC_HEADERS 1
6a8964db 8109_ACEOF
ad87de1e 8110
8111fi
8112
0713dc29 8113echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
8114echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
6a8964db 8115if test "${ac_cv_header_time+set}" = set; then
8116 echo $ECHO_N "(cached) $ECHO_C" >&6
ad87de1e 8117else
6a8964db 8118 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8119/* confdefs.h. */
8120_ACEOF
8121cat confdefs.h >>conftest.$ac_ext
8122cat >>conftest.$ac_ext <<_ACEOF
8123/* end confdefs.h. */
ad87de1e 8124#include <sys/types.h>
8125#include <sys/time.h>
8126#include <time.h>
6a8964db 8127
8128int
8129main ()
8130{
8131if ((struct tm *) 0)
8132return 0;
8133 ;
8134 return 0;
8135}
8136_ACEOF
8137rm -f conftest.$ac_objext
0713dc29 8138if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8139 (eval $ac_compile) 2>conftest.er1
6a8964db 8140 ac_status=$?
9ebd0bb2 8141 grep -v '^ *+' conftest.er1 >conftest.err
8142 rm -f conftest.er1
8143 cat conftest.err >&5
6a8964db 8144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8145 (exit $ac_status); } &&
0713dc29 8146 { ac_try='test -z "$ac_c_werror_flag"
8147 || test ! -s conftest.err'
8148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8149 (eval $ac_try) 2>&5
9ebd0bb2 8150 ac_status=$?
8151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8152 (exit $ac_status); }; } &&
8153 { ac_try='test -s conftest.$ac_objext'
0713dc29 8154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8155 (eval $ac_try) 2>&5
6a8964db 8156 ac_status=$?
8157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8158 (exit $ac_status); }; }; then
ad87de1e 8159 ac_cv_header_time=yes
8160else
6a8964db 8161 echo "$as_me: failed program was:" >&5
8162sed 's/^/| /' conftest.$ac_ext >&5
8163
0713dc29 8164ac_cv_header_time=no
ad87de1e 8165fi
0713dc29 8166rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ad87de1e 8167fi
0713dc29 8168echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
8169echo "${ECHO_T}$ac_cv_header_time" >&6
12b432e0 8170if test $ac_cv_header_time = yes; then
6a8964db 8171
8172cat >>confdefs.h <<\_ACEOF
ad87de1e 8173#define TIME_WITH_SYS_TIME 1
6a8964db 8174_ACEOF
ad87de1e 8175
8176fi
8177
0713dc29 8178echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
8179echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
b1ef404e 8180if test "${gcc_cv_header_string+set}" = set; then
8181 echo $ECHO_N "(cached) $ECHO_C" >&6
8182else
8183 cat >conftest.$ac_ext <<_ACEOF
8184/* confdefs.h. */
8185_ACEOF
8186cat confdefs.h >>conftest.$ac_ext
8187cat >>conftest.$ac_ext <<_ACEOF
8188/* end confdefs.h. */
8189#include <string.h>
8190#include <strings.h>
8191int
8192main ()
8193{
8194
8195 ;
8196 return 0;
8197}
8198_ACEOF
8199rm -f conftest.$ac_objext
0713dc29 8200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8201 (eval $ac_compile) 2>conftest.er1
b1ef404e 8202 ac_status=$?
8203 grep -v '^ *+' conftest.er1 >conftest.err
8204 rm -f conftest.er1
8205 cat conftest.err >&5
8206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8207 (exit $ac_status); } &&
0713dc29 8208 { ac_try='test -z "$ac_c_werror_flag"
8209 || test ! -s conftest.err'
8210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8211 (eval $ac_try) 2>&5
b1ef404e 8212 ac_status=$?
8213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8214 (exit $ac_status); }; } &&
8215 { ac_try='test -s conftest.$ac_objext'
0713dc29 8216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8217 (eval $ac_try) 2>&5
b1ef404e 8218 ac_status=$?
8219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220 (exit $ac_status); }; }; then
8221 gcc_cv_header_string=yes
8222else
8223 echo "$as_me: failed program was:" >&5
8224sed 's/^/| /' conftest.$ac_ext >&5
8225
0713dc29 8226gcc_cv_header_string=no
b1ef404e 8227fi
0713dc29 8228rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b1ef404e 8229fi
0713dc29 8230echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
8231echo "${ECHO_T}$gcc_cv_header_string" >&6
b1ef404e 8232if test $gcc_cv_header_string = yes; then
8233
8234cat >>confdefs.h <<\_ACEOF
8235#define STRING_WITH_STRINGS 1
8236_ACEOF
8237
8238fi
8239
0713dc29 8240echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
8241echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
6a8964db 8242if test "${ac_cv_header_sys_wait_h+set}" = set; then
8243 echo $ECHO_N "(cached) $ECHO_C" >&6
5a3ee0b1 8244else
6a8964db 8245 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8246/* confdefs.h. */
8247_ACEOF
8248cat confdefs.h >>conftest.$ac_ext
8249cat >>conftest.$ac_ext <<_ACEOF
8250/* end confdefs.h. */
5a3ee0b1 8251#include <sys/types.h>
8252#include <sys/wait.h>
8253#ifndef WEXITSTATUS
0713dc29 8254# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5a3ee0b1 8255#endif
8256#ifndef WIFEXITED
6a8964db 8257# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5a3ee0b1 8258#endif
6a8964db 8259
8260int
8261main ()
8262{
8263 int s;
8264 wait (&s);
8265 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8266 ;
8267 return 0;
8268}
8269_ACEOF
8270rm -f conftest.$ac_objext
0713dc29 8271if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8272 (eval $ac_compile) 2>conftest.er1
6a8964db 8273 ac_status=$?
9ebd0bb2 8274 grep -v '^ *+' conftest.er1 >conftest.err
8275 rm -f conftest.er1
8276 cat conftest.err >&5
6a8964db 8277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8278 (exit $ac_status); } &&
0713dc29 8279 { ac_try='test -z "$ac_c_werror_flag"
8280 || test ! -s conftest.err'
8281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8282 (eval $ac_try) 2>&5
9ebd0bb2 8283 ac_status=$?
8284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8285 (exit $ac_status); }; } &&
8286 { ac_try='test -s conftest.$ac_objext'
0713dc29 8287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8288 (eval $ac_try) 2>&5
6a8964db 8289 ac_status=$?
8290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8291 (exit $ac_status); }; }; then
5a3ee0b1 8292 ac_cv_header_sys_wait_h=yes
8293else
6a8964db 8294 echo "$as_me: failed program was:" >&5
8295sed 's/^/| /' conftest.$ac_ext >&5
8296
0713dc29 8297ac_cv_header_sys_wait_h=no
5a3ee0b1 8298fi
0713dc29 8299rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5a3ee0b1 8300fi
0713dc29 8301echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8302echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
12b432e0 8303if test $ac_cv_header_sys_wait_h = yes; then
6a8964db 8304
8305cat >>confdefs.h <<\_ACEOF
5a3ee0b1 8306#define HAVE_SYS_WAIT_H 1
6a8964db 8307_ACEOF
c9cd172c 8308
12b432e0 8309fi
c9cd172c 8310
6a8964db 8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
e5d424c9 8332
8333for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
9f0cea1b 8334 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
a876e5f8 8335 sys/resource.h sys/param.h sys/times.h sys/stat.h \
c6976b58 8336 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
071cd279 8337do
6a8964db 8338as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
0713dc29 8339echo "$as_me:$LINENO: checking for $ac_header" >&5
8340echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8341if eval "test \"\${$as_ac_Header+set}\" = set"; then
6a8964db 8342 echo $ECHO_N "(cached) $ECHO_C" >&6
6a8964db 8343else
b1ef404e 8344 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8345/* confdefs.h. */
8346_ACEOF
8347cat confdefs.h >>conftest.$ac_ext
8348cat >>conftest.$ac_ext <<_ACEOF
8349/* end confdefs.h. */
8350#include <$ac_header>
8351_ACEOF
0713dc29 8352if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8353 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6a8964db 8354 ac_status=$?
8355 grep -v '^ *+' conftest.er1 >conftest.err
8356 rm -f conftest.er1
8357 cat conftest.err >&5
8358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8359 (exit $ac_status); } >/dev/null; then
8360 if test -s conftest.err; then
8361 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 8362 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 8363 else
8364 ac_cpp_err=
8365 fi
8366else
8367 ac_cpp_err=yes
8368fi
8369if test -z "$ac_cpp_err"; then
b1ef404e 8370 eval "$as_ac_Header=yes"
6a8964db 8371else
8372 echo "$as_me: failed program was:" >&5
8373sed 's/^/| /' conftest.$ac_ext >&5
8374
b1ef404e 8375 eval "$as_ac_Header=no"
6a8964db 8376fi
8377rm -f conftest.err conftest.$ac_ext
c9cd172c 8378fi
0713dc29 8379echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8380echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6a8964db 8381if test `eval echo '${'$as_ac_Header'}'` = yes; then
8382 cat >>confdefs.h <<_ACEOF
8383#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8384_ACEOF
8385
ad87de1e 8386fi
8387done
8388
8389
58febf9e 8390# Check for thread headers.
0713dc29 8391echo "$as_me:$LINENO: checking for thread.h" >&5
8392echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
6a8964db 8393if test "${ac_cv_header_thread_h+set}" = set; then
8394 echo $ECHO_N "(cached) $ECHO_C" >&6
6a8964db 8395else
b1ef404e 8396 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8397/* confdefs.h. */
8398_ACEOF
8399cat confdefs.h >>conftest.$ac_ext
8400cat >>conftest.$ac_ext <<_ACEOF
8401/* end confdefs.h. */
8402#include <thread.h>
8403_ACEOF
0713dc29 8404if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8405 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6a8964db 8406 ac_status=$?
8407 grep -v '^ *+' conftest.er1 >conftest.err
8408 rm -f conftest.er1
8409 cat conftest.err >&5
8410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8411 (exit $ac_status); } >/dev/null; then
8412 if test -s conftest.err; then
8413 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 8414 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 8415 else
8416 ac_cpp_err=
8417 fi
8418else
8419 ac_cpp_err=yes
8420fi
8421if test -z "$ac_cpp_err"; then
b1ef404e 8422 ac_cv_header_thread_h=yes
6a8964db 8423else
8424 echo "$as_me: failed program was:" >&5
8425sed 's/^/| /' conftest.$ac_ext >&5
8426
b1ef404e 8427 ac_cv_header_thread_h=no
6a8964db 8428fi
8429rm -f conftest.err conftest.$ac_ext
c9cd172c 8430fi
0713dc29 8431echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8432echo "${ECHO_T}$ac_cv_header_thread_h" >&6
6a8964db 8433if test $ac_cv_header_thread_h = yes; then
58febf9e 8434 have_thread_h=yes
8435else
6a8964db 8436 have_thread_h=
58febf9e 8437fi
8438
0713dc29 8439echo "$as_me:$LINENO: checking for pthread.h" >&5
8440echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
6a8964db 8441if test "${ac_cv_header_pthread_h+set}" = set; then
8442 echo $ECHO_N "(cached) $ECHO_C" >&6
0bf9691e 8443else
b1ef404e 8444 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8445/* confdefs.h. */
8446_ACEOF
8447cat confdefs.h >>conftest.$ac_ext
8448cat >>conftest.$ac_ext <<_ACEOF
8449/* end confdefs.h. */
8450#include <pthread.h>
8451_ACEOF
0713dc29 8452if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8453 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6a8964db 8454 ac_status=$?
8455 grep -v '^ *+' conftest.er1 >conftest.err
8456 rm -f conftest.er1
8457 cat conftest.err >&5
8458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8459 (exit $ac_status); } >/dev/null; then
8460 if test -s conftest.err; then
8461 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 8462 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 8463 else
8464 ac_cpp_err=
8465 fi
8466else
8467 ac_cpp_err=yes
8468fi
b1ef404e 8469if test -z "$ac_cpp_err"; then
8470 ac_cv_header_pthread_h=yes
6a8964db 8471else
b1ef404e 8472 echo "$as_me: failed program was:" >&5
8473sed 's/^/| /' conftest.$ac_ext >&5
8474
8475 ac_cv_header_pthread_h=no
8476fi
8477rm -f conftest.err conftest.$ac_ext
c9cd172c 8478fi
0713dc29 8479echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8480echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
6a8964db 8481if test $ac_cv_header_pthread_h = yes; then
58febf9e 8482 have_pthread_h=yes
8483else
6a8964db 8484 have_pthread_h=
58febf9e 8485fi
8486
8487
3239b2ba 8488# These tests can't be done till we know if we have limits.h.
0713dc29 8489echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8490echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
6a8964db 8491if test "${gcc_cv_decl_char_bit+set}" = set; then
8492 echo $ECHO_N "(cached) $ECHO_C" >&6
8493else
8494 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8495/* confdefs.h. */
8496_ACEOF
8497cat confdefs.h >>conftest.$ac_ext
8498cat >>conftest.$ac_ext <<_ACEOF
8499/* end confdefs.h. */
02be28b3 8500#ifdef HAVE_LIMITS_H
8501#include <limits.h>
8502#endif
8503#ifdef CHAR_BIT
8504found
8505#endif
6a8964db 8506_ACEOF
02be28b3 8507if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6a8964db 8508 $EGREP "found" >/dev/null 2>&1; then
02be28b3 8509 gcc_cv_decl_char_bit=yes
8510else
02be28b3 8511 gcc_cv_decl_char_bit=no
8512fi
8513rm -f conftest*
8514
8515
8516fi
0713dc29 8517echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8518echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
02be28b3 8519if test $gcc_cv_decl_char_bit = no; then
0713dc29 8520 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8521echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
6a8964db 8522if test "${gcc_cv_c_nbby+set}" = set; then
8523 echo $ECHO_N "(cached) $ECHO_C" >&6
02be28b3 8524else
8525 i=8
8526 gcc_cv_c_nbby=
8527 while test $i -lt 65; do
6a8964db 8528 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8529/* confdefs.h. */
8530_ACEOF
8531cat confdefs.h >>conftest.$ac_ext
8532cat >>conftest.$ac_ext <<_ACEOF
8533/* end confdefs.h. */
8534
8535int
8536main ()
8537{
45449d9f 8538switch(0) {
8539 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8540 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8541 ; }
6a8964db 8542 ;
8543 return 0;
8544}
8545_ACEOF
8546rm -f conftest.$ac_objext
0713dc29 8547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8548 (eval $ac_compile) 2>conftest.er1
6a8964db 8549 ac_status=$?
9ebd0bb2 8550 grep -v '^ *+' conftest.er1 >conftest.err
8551 rm -f conftest.er1
8552 cat conftest.err >&5
6a8964db 8553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8554 (exit $ac_status); } &&
0713dc29 8555 { ac_try='test -z "$ac_c_werror_flag"
8556 || test ! -s conftest.err'
8557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8558 (eval $ac_try) 2>&5
9ebd0bb2 8559 ac_status=$?
8560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8561 (exit $ac_status); }; } &&
8562 { ac_try='test -s conftest.$ac_objext'
0713dc29 8563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8564 (eval $ac_try) 2>&5
6a8964db 8565 ac_status=$?
8566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8567 (exit $ac_status); }; }; then
45449d9f 8568 gcc_cv_c_nbby=$i; break
02be28b3 8569else
6a8964db 8570 echo "$as_me: failed program was:" >&5
8571sed 's/^/| /' conftest.$ac_ext >&5
8572
02be28b3 8573fi
0713dc29 8574rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
02be28b3 8575 i=`expr $i + 1`
8576 done
8577 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8578
8579fi
0713dc29 8580echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8581echo "${ECHO_T}$gcc_cv_c_nbby" >&6
02be28b3 8582if test $gcc_cv_c_nbby = failed; then
6a8964db 8583 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8584echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8585 { (exit 1); exit 1; }; }
02be28b3 8586else
6a8964db 8587
8588cat >>confdefs.h <<_ACEOF
02be28b3 8589#define CHAR_BIT $gcc_cv_c_nbby
6a8964db 8590_ACEOF
02be28b3 8591
8592fi
8593fi
0713dc29 8594echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8595echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
6a8964db 8596if test "${ac_cv_c_bigendian+set}" = set; then
8597 echo $ECHO_N "(cached) $ECHO_C" >&6
3239b2ba 8598else
fd158959 8599 # See if sys/param.h defines the BYTE_ORDER macro.
6a8964db 8600cat >conftest.$ac_ext <<_ACEOF
6a8964db 8601/* confdefs.h. */
8602_ACEOF
8603cat confdefs.h >>conftest.$ac_ext
8604cat >>conftest.$ac_ext <<_ACEOF
8605/* end confdefs.h. */
805e22b2 8606#include <sys/types.h>
8607#include <sys/param.h>
fd158959 8608
6a8964db 8609int
8610main ()
8611{
805e22b2 8612#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8613 bogus endian macros
3239b2ba 8614#endif
fd158959 8615
6a8964db 8616 ;
8617 return 0;
8618}
8619_ACEOF
8620rm -f conftest.$ac_objext
0713dc29 8621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8622 (eval $ac_compile) 2>conftest.er1
6a8964db 8623 ac_status=$?
9ebd0bb2 8624 grep -v '^ *+' conftest.er1 >conftest.err
8625 rm -f conftest.er1
8626 cat conftest.err >&5
6a8964db 8627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8628 (exit $ac_status); } &&
0713dc29 8629 { ac_try='test -z "$ac_c_werror_flag"
8630 || test ! -s conftest.err'
8631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8632 (eval $ac_try) 2>&5
9ebd0bb2 8633 ac_status=$?
8634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8635 (exit $ac_status); }; } &&
8636 { ac_try='test -s conftest.$ac_objext'
0713dc29 8637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8638 (eval $ac_try) 2>&5
6a8964db 8639 ac_status=$?
8640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8641 (exit $ac_status); }; }; then
805e22b2 8642 # It does; now see whether it defined to BIG_ENDIAN or not.
6a8964db 8643cat >conftest.$ac_ext <<_ACEOF
6a8964db 8644/* confdefs.h. */
8645_ACEOF
8646cat confdefs.h >>conftest.$ac_ext
8647cat >>conftest.$ac_ext <<_ACEOF
8648/* end confdefs.h. */
805e22b2 8649#include <sys/types.h>
8650#include <sys/param.h>
fd158959 8651
6a8964db 8652int
8653main ()
8654{
805e22b2 8655#if BYTE_ORDER != BIG_ENDIAN
8656 not big endian
3239b2ba 8657#endif
fd158959 8658
6a8964db 8659 ;
8660 return 0;
8661}
8662_ACEOF
8663rm -f conftest.$ac_objext
0713dc29 8664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8665 (eval $ac_compile) 2>conftest.er1
6a8964db 8666 ac_status=$?
9ebd0bb2 8667 grep -v '^ *+' conftest.er1 >conftest.err
8668 rm -f conftest.er1
8669 cat conftest.err >&5
6a8964db 8670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8671 (exit $ac_status); } &&
0713dc29 8672 { ac_try='test -z "$ac_c_werror_flag"
8673 || test ! -s conftest.err'
8674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8675 (eval $ac_try) 2>&5
9ebd0bb2 8676 ac_status=$?
8677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8678 (exit $ac_status); }; } &&
8679 { ac_try='test -s conftest.$ac_objext'
0713dc29 8680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8681 (eval $ac_try) 2>&5
6a8964db 8682 ac_status=$?
8683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8684 (exit $ac_status); }; }; then
805e22b2 8685 ac_cv_c_bigendian=yes
8686else
6a8964db 8687 echo "$as_me: failed program was:" >&5
8688sed 's/^/| /' conftest.$ac_ext >&5
8689
0713dc29 8690ac_cv_c_bigendian=no
805e22b2 8691fi
0713dc29 8692rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
805e22b2 8693else
6a8964db 8694 echo "$as_me: failed program was:" >&5
8695sed 's/^/| /' conftest.$ac_ext >&5
8696
0713dc29 8697# It does not; compile a test program.
fd158959 8698if test "$cross_compiling" = yes; then
8699 # try to guess the endianness by grepping values into an object file
8700 ac_cv_c_bigendian=unknown
8701 cat >conftest.$ac_ext <<_ACEOF
8702/* confdefs.h. */
8703_ACEOF
8704cat confdefs.h >>conftest.$ac_ext
8705cat >>conftest.$ac_ext <<_ACEOF
8706/* end confdefs.h. */
0713dc29 8707short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8708short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
fd158959 8709void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
0713dc29 8710short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8711short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
fd158959 8712void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
8713int
8714main ()
8715{
8716 _ascii (); _ebcdic ();
8717 ;
8718 return 0;
8719}
8720_ACEOF
8721rm -f conftest.$ac_objext
0713dc29 8722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8723 (eval $ac_compile) 2>conftest.er1
fd158959 8724 ac_status=$?
8725 grep -v '^ *+' conftest.er1 >conftest.err
8726 rm -f conftest.er1
8727 cat conftest.err >&5
8728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8729 (exit $ac_status); } &&
0713dc29 8730 { ac_try='test -z "$ac_c_werror_flag"
8731 || test ! -s conftest.err'
8732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8733 (eval $ac_try) 2>&5
fd158959 8734 ac_status=$?
8735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8736 (exit $ac_status); }; } &&
8737 { ac_try='test -s conftest.$ac_objext'
0713dc29 8738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8739 (eval $ac_try) 2>&5
fd158959 8740 ac_status=$?
8741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8742 (exit $ac_status); }; }; then
8743 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
8744 ac_cv_c_bigendian=yes
8745fi
8746if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8747 if test "$ac_cv_c_bigendian" = unknown; then
8748 ac_cv_c_bigendian=no
8749 else
8750 # finding both strings is unlikely to happen, but who knows?
8751 ac_cv_c_bigendian=unknown
8752 fi
8753fi
8754else
8755 echo "$as_me: failed program was:" >&5
8756sed 's/^/| /' conftest.$ac_ext >&5
8757
805e22b2 8758fi
0713dc29 8759rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6a8964db 8760else
8761 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8762/* confdefs.h. */
8763_ACEOF
8764cat confdefs.h >>conftest.$ac_ext
8765cat >>conftest.$ac_ext <<_ACEOF
8766/* end confdefs.h. */
fd158959 8767int
8768main ()
8769{
805e22b2 8770 /* Are we little or big endian? From Harbison&Steele. */
8771 union
8772 {
0713dc29 8773 long l;
8774 char c[sizeof (long)];
805e22b2 8775 } u;
8776 u.l = 1;
0713dc29 8777 exit (u.c[sizeof (long) - 1] == 1);
805e22b2 8778}
6a8964db 8779_ACEOF
8780rm -f conftest$ac_exeext
0713dc29 8781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8782 (eval $ac_link) 2>&5
6a8964db 8783 ac_status=$?
8784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8785 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
0713dc29 8786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8787 (eval $ac_try) 2>&5
6a8964db 8788 ac_status=$?
8789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8790 (exit $ac_status); }; }; then
805e22b2 8791 ac_cv_c_bigendian=no
8792else
6a8964db 8793 echo "$as_me: program exited with status $ac_status" >&5
8794echo "$as_me: failed program was:" >&5
8795sed 's/^/| /' conftest.$ac_ext >&5
8796
8797( exit $ac_status )
8798ac_cv_c_bigendian=yes
805e22b2 8799fi
0713dc29 8800rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3239b2ba 8801fi
805e22b2 8802fi
0713dc29 8803rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
805e22b2 8804fi
0713dc29 8805echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8806echo "${ECHO_T}$ac_cv_c_bigendian" >&6
fd158959 8807case $ac_cv_c_bigendian in
8808 yes)
6a8964db 8809
8810cat >>confdefs.h <<\_ACEOF
805e22b2 8811#define WORDS_BIGENDIAN 1
6a8964db 8812_ACEOF
fd158959 8813 ;;
8814 no)
8815 ;;
8816 *)
8817 { { echo "$as_me:$LINENO: error: unknown endianness
8818presetting ac_cv_c_bigendian=no (or yes) will help" >&5
8819echo "$as_me: error: unknown endianness
8820presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
8821 { (exit 1); exit 1; }; } ;;
8822esac
3239b2ba 8823
02be28b3 8824
966842d4 8825# --------
8826# UNSORTED
8827# --------
345a1501 8828
966842d4 8829# Stage specific cflags for build.
8830stage1_cflags=
8831case $build in
8832vax-*-*)
8833 if test x$GCC = xyes
8834 then
8835 stage1_cflags="-Wa,-J"
8836 else
8837 stage1_cflags="-J"
8838 fi
8839 ;;
84eba009 8840powerpc*-*-darwin*)
966842d4 8841 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
8842 # sources; use -no-cpp-precomp to get to GNU cpp.
8843 # Apple's GCC has bugs in designated initializer handling, so disable
8844 # that too.
8845 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
8846 ;;
8847esac
345a1501 8848
345a1501 8849
45449d9f 8850# These libraries may be used by collect2.
8851# We may need a special search path to get them linked.
0713dc29 8852echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8853echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
6a8964db 8854if test "${gcc_cv_collect2_libs+set}" = set; then
8855 echo $ECHO_N "(cached) $ECHO_C" >&6
45449d9f 8856else
8857 save_LIBS="$LIBS"
8e01c6f6 8858for libs in '' -lld -lmld \
45449d9f 8859 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8860 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8861do
8862 LIBS="$libs"
6a8964db 8863 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8864/* confdefs.h. */
8865_ACEOF
8866cat confdefs.h >>conftest.$ac_ext
8867cat >>conftest.$ac_ext <<_ACEOF
8868/* end confdefs.h. */
8869
0713dc29 8870/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 8871#ifdef __cplusplus
8872extern "C"
8873#endif
0713dc29 8874/* We use char because int might match the return type of a gcc2
8875 builtin and then its argument prototype would still apply. */
6a8964db 8876char ldopen ();
8877int
8878main ()
8879{
0713dc29 8880ldopen ();
6a8964db 8881 ;
8882 return 0;
8883}
8884_ACEOF
8885rm -f conftest.$ac_objext conftest$ac_exeext
0713dc29 8886if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8887 (eval $ac_link) 2>conftest.er1
6a8964db 8888 ac_status=$?
9ebd0bb2 8889 grep -v '^ *+' conftest.er1 >conftest.err
8890 rm -f conftest.er1
8891 cat conftest.err >&5
6a8964db 8892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8893 (exit $ac_status); } &&
0713dc29 8894 { ac_try='test -z "$ac_c_werror_flag"
8895 || test ! -s conftest.err'
8896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8897 (eval $ac_try) 2>&5
9ebd0bb2 8898 ac_status=$?
8899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8900 (exit $ac_status); }; } &&
8901 { ac_try='test -s conftest$ac_exeext'
0713dc29 8902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8903 (eval $ac_try) 2>&5
6a8964db 8904 ac_status=$?
8905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8906 (exit $ac_status); }; }; then
45449d9f 8907 gcc_cv_collect2_libs="$libs"; break
8908else
6a8964db 8909 echo "$as_me: failed program was:" >&5
8910sed 's/^/| /' conftest.$ac_ext >&5
8911
45449d9f 8912fi
0713dc29 8913rm -f conftest.err conftest.$ac_objext \
9ebd0bb2 8914 conftest$ac_exeext conftest.$ac_ext
45449d9f 8915done
8916LIBS="$save_LIBS"
8917test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8918fi
0713dc29 8919echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8920echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
45449d9f 8921case $gcc_cv_collect2_libs in
8922 "none required") ;;
8923 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8924esac
8925
8926
8e01c6f6 8927# When building Ada code on Alpha, we need exc_resume which is usually in
8928# -lexc. So test for it.
8929save_LIBS="$LIBS"
8930LIBS=
0713dc29 8931echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8932echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
6a8964db 8933if test "${ac_cv_search_exc_resume+set}" = set; then
8934 echo $ECHO_N "(cached) $ECHO_C" >&6
8935else
8936 ac_func_search_save_LIBS=$LIBS
0713dc29 8937ac_cv_search_exc_resume=no
6a8964db 8938cat >conftest.$ac_ext <<_ACEOF
6a8964db 8939/* confdefs.h. */
8940_ACEOF
8941cat confdefs.h >>conftest.$ac_ext
8942cat >>conftest.$ac_ext <<_ACEOF
8943/* end confdefs.h. */
8e01c6f6 8944
0713dc29 8945/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 8946#ifdef __cplusplus
8947extern "C"
8948#endif
0713dc29 8949/* We use char because int might match the return type of a gcc2
8950 builtin and then its argument prototype would still apply. */
6a8964db 8951char exc_resume ();
8952int
8953main ()
8954{
0713dc29 8955exc_resume ();
6a8964db 8956 ;
8957 return 0;
8958}
8959_ACEOF
0713dc29 8960rm -f conftest.$ac_objext conftest$ac_exeext
8961if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8962 (eval $ac_link) 2>conftest.er1
6a8964db 8963 ac_status=$?
9ebd0bb2 8964 grep -v '^ *+' conftest.er1 >conftest.err
8965 rm -f conftest.er1
8966 cat conftest.err >&5
6a8964db 8967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8968 (exit $ac_status); } &&
0713dc29 8969 { ac_try='test -z "$ac_c_werror_flag"
8970 || test ! -s conftest.err'
8971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8972 (eval $ac_try) 2>&5
9ebd0bb2 8973 ac_status=$?
8974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8975 (exit $ac_status); }; } &&
8976 { ac_try='test -s conftest$ac_exeext'
0713dc29 8977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8978 (eval $ac_try) 2>&5
6a8964db 8979 ac_status=$?
8980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8981 (exit $ac_status); }; }; then
0713dc29 8982 ac_cv_search_exc_resume="none required"
8e01c6f6 8983else
6a8964db 8984 echo "$as_me: failed program was:" >&5
8985sed 's/^/| /' conftest.$ac_ext >&5
8986
8e01c6f6 8987fi
0713dc29 8988rm -f conftest.err conftest.$ac_objext \
8989 conftest$ac_exeext conftest.$ac_ext
8990if test "$ac_cv_search_exc_resume" = no; then
8991 for ac_lib in exc; do
8992 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8993 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8994/* confdefs.h. */
8995_ACEOF
8996cat confdefs.h >>conftest.$ac_ext
8997cat >>conftest.$ac_ext <<_ACEOF
8998/* end confdefs.h. */
96b74343 8999
0713dc29 9000/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 9001#ifdef __cplusplus
9002extern "C"
9003#endif
0713dc29 9004/* We use char because int might match the return type of a gcc2
9005 builtin and then its argument prototype would still apply. */
9006char exc_resume ();
6a8964db 9007int
9008main ()
9009{
0713dc29 9010exc_resume ();
6a8964db 9011 ;
9012 return 0;
9013}
9014_ACEOF
0713dc29 9015rm -f conftest.$ac_objext conftest$ac_exeext
9016if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9017 (eval $ac_link) 2>conftest.er1
6a8964db 9018 ac_status=$?
9ebd0bb2 9019 grep -v '^ *+' conftest.er1 >conftest.err
9020 rm -f conftest.er1
9021 cat conftest.err >&5
6a8964db 9022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9023 (exit $ac_status); } &&
0713dc29 9024 { ac_try='test -z "$ac_c_werror_flag"
9025 || test ! -s conftest.err'
9026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9027 (eval $ac_try) 2>&5
9ebd0bb2 9028 ac_status=$?
9029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9030 (exit $ac_status); }; } &&
9031 { ac_try='test -s conftest$ac_exeext'
0713dc29 9032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9033 (eval $ac_try) 2>&5
6a8964db 9034 ac_status=$?
9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9036 (exit $ac_status); }; }; then
0713dc29 9037 ac_cv_search_exc_resume="-l$ac_lib"
9038break
96b74343 9039else
6a8964db 9040 echo "$as_me: failed program was:" >&5
9041sed 's/^/| /' conftest.$ac_ext >&5
9042
84eba009 9043fi
0713dc29 9044rm -f conftest.err conftest.$ac_objext \
9045 conftest$ac_exeext conftest.$ac_ext
9046 done
84eba009 9047fi
84eba009 9048LIBS=$ac_func_search_save_LIBS
9049fi
0713dc29 9050echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
9051echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
9052if test "$ac_cv_search_exc_resume" != no; then
9053 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
84eba009 9054
9055fi
9056
0713dc29 9057GNAT_LIBEXC="$LIBS"
84eba009 9058LIBS="$save_LIBS"
9059
9060
0713dc29 9061# Some systems put ldexp and frexp in libm instead of libc; assume
9062# they're both in the same place. jcf-dump needs them.
9063save_LIBS="$LIBS"
9064LIBS=
9065echo "$as_me:$LINENO: checking for library containing ldexp" >&5
9066echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
9067if test "${ac_cv_search_ldexp+set}" = set; then
84eba009 9068 echo $ECHO_N "(cached) $ECHO_C" >&6
9069else
0713dc29 9070 ac_func_search_save_LIBS=$LIBS
9071ac_cv_search_ldexp=no
9072cat >conftest.$ac_ext <<_ACEOF
6a8964db 9073/* confdefs.h. */
9074_ACEOF
9075cat confdefs.h >>conftest.$ac_ext
9076cat >>conftest.$ac_ext <<_ACEOF
9077/* end confdefs.h. */
0713dc29 9078
9079/* Override any gcc2 internal prototype to avoid an error. */
9080#ifdef __cplusplus
9081extern "C"
9082#endif
9083/* We use char because int might match the return type of a gcc2
9084 builtin and then its argument prototype would still apply. */
9085char ldexp ();
6a8964db 9086int
9087main ()
9088{
0713dc29 9089ldexp ();
6a8964db 9090 ;
9091 return 0;
9092}
9093_ACEOF
0713dc29 9094rm -f conftest.$ac_objext conftest$ac_exeext
9095if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9096 (eval $ac_link) 2>conftest.er1
6a8964db 9097 ac_status=$?
9ebd0bb2 9098 grep -v '^ *+' conftest.er1 >conftest.err
9099 rm -f conftest.er1
9100 cat conftest.err >&5
6a8964db 9101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9102 (exit $ac_status); } &&
0713dc29 9103 { ac_try='test -z "$ac_c_werror_flag"
9104 || test ! -s conftest.err'
9105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9106 (eval $ac_try) 2>&5
9ebd0bb2 9107 ac_status=$?
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); }; } &&
0713dc29 9110 { ac_try='test -s conftest$ac_exeext'
9111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9112 (eval $ac_try) 2>&5
6a8964db 9113 ac_status=$?
9114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9115 (exit $ac_status); }; }; then
0713dc29 9116 ac_cv_search_ldexp="none required"
ad87de1e 9117else
6a8964db 9118 echo "$as_me: failed program was:" >&5
9119sed 's/^/| /' conftest.$ac_ext >&5
9120
ad87de1e 9121fi
0713dc29 9122rm -f conftest.err conftest.$ac_objext \
9123 conftest$ac_exeext conftest.$ac_ext
9124if test "$ac_cv_search_ldexp" = no; then
9125 for ac_lib in m; do
9126 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9127 cat >conftest.$ac_ext <<_ACEOF
9128/* confdefs.h. */
6a8964db 9129_ACEOF
0713dc29 9130cat confdefs.h >>conftest.$ac_ext
9131cat >>conftest.$ac_ext <<_ACEOF
9132/* end confdefs.h. */
9133
9134/* Override any gcc2 internal prototype to avoid an error. */
9135#ifdef __cplusplus
9136extern "C"
9137#endif
9138/* We use char because int might match the return type of a gcc2
9139 builtin and then its argument prototype would still apply. */
9140char ldexp ();
9141int
9142main ()
9143{
9144ldexp ();
9145 ;
9146 return 0;
9147}
9148_ACEOF
9149rm -f conftest.$ac_objext conftest$ac_exeext
9150if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9151 (eval $ac_link) 2>conftest.er1
9152 ac_status=$?
9153 grep -v '^ *+' conftest.er1 >conftest.err
9154 rm -f conftest.er1
9155 cat conftest.err >&5
9156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9157 (exit $ac_status); } &&
9158 { ac_try='test -z "$ac_c_werror_flag"
9159 || test ! -s conftest.err'
9160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9161 (eval $ac_try) 2>&5
9162 ac_status=$?
9163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9164 (exit $ac_status); }; } &&
9165 { ac_try='test -s conftest$ac_exeext'
9166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9167 (eval $ac_try) 2>&5
9168 ac_status=$?
9169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170 (exit $ac_status); }; }; then
9171 ac_cv_search_ldexp="-l$ac_lib"
9172break
9173else
9174 echo "$as_me: failed program was:" >&5
9175sed 's/^/| /' conftest.$ac_ext >&5
9176
9177fi
9178rm -f conftest.err conftest.$ac_objext \
9179 conftest$ac_exeext conftest.$ac_ext
9180 done
9181fi
9182LIBS=$ac_func_search_save_LIBS
9183fi
9184echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
9185echo "${ECHO_T}$ac_cv_search_ldexp" >&6
9186if test "$ac_cv_search_ldexp" != no; then
9187 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
9188
9189fi
9190
9191LDEXP_LIB="$LIBS"
9192LIBS="$save_LIBS"
9193
9194
9195# Use <inttypes.h> only if it exists,
9196# doesn't clash with <sys/types.h>, and declares intmax_t.
9197echo "$as_me:$LINENO: checking for inttypes.h" >&5
9198echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
9199if test "${gcc_cv_header_inttypes_h+set}" = set; then
9200 echo $ECHO_N "(cached) $ECHO_C" >&6
9201else
9202 cat >conftest.$ac_ext <<_ACEOF
9203/* confdefs.h. */
9204_ACEOF
9205cat confdefs.h >>conftest.$ac_ext
9206cat >>conftest.$ac_ext <<_ACEOF
9207/* end confdefs.h. */
9208#include <sys/types.h>
9209#include <inttypes.h>
9210int
9211main ()
9212{
9213intmax_t i = -1;
9214 ;
9215 return 0;
9216}
9217_ACEOF
9218rm -f conftest.$ac_objext
9219if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9220 (eval $ac_compile) 2>conftest.er1
9221 ac_status=$?
9222 grep -v '^ *+' conftest.er1 >conftest.err
9223 rm -f conftest.er1
9224 cat conftest.err >&5
9225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9226 (exit $ac_status); } &&
9227 { ac_try='test -z "$ac_c_werror_flag"
9228 || test ! -s conftest.err'
9229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9230 (eval $ac_try) 2>&5
9231 ac_status=$?
9232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9233 (exit $ac_status); }; } &&
9234 { ac_try='test -s conftest.$ac_objext'
9235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9236 (eval $ac_try) 2>&5
9237 ac_status=$?
9238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9239 (exit $ac_status); }; }; then
9240 gcc_cv_header_inttypes_h=yes
9241else
9242 echo "$as_me: failed program was:" >&5
9243sed 's/^/| /' conftest.$ac_ext >&5
9244
9245gcc_cv_header_inttypes_h=no
9246fi
9247rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9248fi
9249
9250echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
9251echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
9252if test $gcc_cv_header_inttypes_h = yes; then
9253
9254cat >>confdefs.h <<\_ACEOF
9255#define HAVE_INTTYPES_H 1
9256_ACEOF
9257
4a7d7a8b 9258fi
ad87de1e 9259
488c4206 9260
6a8964db 9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
077a3c99 9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
6a8964db 9289
9290
9291
9292
9293
9294
9295
9296
b88c06b5 9297for ac_func in times clock kill getrlimit setrlimit atoll atoq \
077a3c99 9298 sysconf strsignal getrusage nl_langinfo scandir alphasort \
9299 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9300 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
ad87de1e 9301do
6a8964db 9302as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
0713dc29 9303echo "$as_me:$LINENO: checking for $ac_func" >&5
9304echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9305if eval "test \"\${$as_ac_var+set}\" = set"; then
6a8964db 9306 echo $ECHO_N "(cached) $ECHO_C" >&6
9307else
9308 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9309/* confdefs.h. */
9310_ACEOF
9311cat confdefs.h >>conftest.$ac_ext
9312cat >>conftest.$ac_ext <<_ACEOF
9313/* end confdefs.h. */
9ebd0bb2 9314/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9315 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9316#define $ac_func innocuous_$ac_func
9317
ad87de1e 9318/* System header to define __stub macros and hopefully few prototypes,
6a8964db 9319 which can conflict with char $ac_func (); below.
9320 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9321 <limits.h> exists even on freestanding compilers. */
9ebd0bb2 9322
6a8964db 9323#ifdef __STDC__
9324# include <limits.h>
9325#else
9326# include <assert.h>
9327#endif
9ebd0bb2 9328
9329#undef $ac_func
9330
0713dc29 9331/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 9332#ifdef __cplusplus
9333extern "C"
0713dc29 9334{
6a8964db 9335#endif
0713dc29 9336/* We use char because int might match the return type of a gcc2
9337 builtin and then its argument prototype would still apply. */
6a8964db 9338char $ac_func ();
ad87de1e 9339/* The GNU C library defines this for functions which it implements
9340 to always fail with ENOSYS. Some functions are actually named
9341 something starting with __ and the normal name is an alias. */
0713dc29 9342#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
ad87de1e 9343choke me
0713dc29 9344#else
9345char (*f) () = $ac_func;
9346#endif
9347#ifdef __cplusplus
9348}
ad87de1e 9349#endif
9350
6a8964db 9351int
9352main ()
9353{
0713dc29 9354return f != $ac_func;
6a8964db 9355 ;
9356 return 0;
9357}
9358_ACEOF
9359rm -f conftest.$ac_objext conftest$ac_exeext
0713dc29 9360if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9361 (eval $ac_link) 2>conftest.er1
6a8964db 9362 ac_status=$?
9ebd0bb2 9363 grep -v '^ *+' conftest.er1 >conftest.err
9364 rm -f conftest.er1
9365 cat conftest.err >&5
6a8964db 9366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9367 (exit $ac_status); } &&
0713dc29 9368 { ac_try='test -z "$ac_c_werror_flag"
9369 || test ! -s conftest.err'
9370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9371 (eval $ac_try) 2>&5
9ebd0bb2 9372 ac_status=$?
9373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9374 (exit $ac_status); }; } &&
9375 { ac_try='test -s conftest$ac_exeext'
0713dc29 9376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9377 (eval $ac_try) 2>&5
6a8964db 9378 ac_status=$?
9379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9380 (exit $ac_status); }; }; then
9381 eval "$as_ac_var=yes"
9382else
9383 echo "$as_me: failed program was:" >&5
9384sed 's/^/| /' conftest.$ac_ext >&5
9385
0713dc29 9386eval "$as_ac_var=no"
6a8964db 9387fi
0713dc29 9388rm -f conftest.err conftest.$ac_objext \
9ebd0bb2 9389 conftest$ac_exeext conftest.$ac_ext
6a8964db 9390fi
0713dc29 9391echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9392echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6a8964db 9393if test `eval echo '${'$as_ac_var'}'` = yes; then
9394 cat >>confdefs.h <<_ACEOF
9395#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9396_ACEOF
ad87de1e 9397
ad87de1e 9398fi
9399done
9400
2c99f836 9401
b503c1a2 9402if test x$ac_cv_func_mbstowcs = xyes; then
0713dc29 9403 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9404echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
6a8964db 9405if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9406 echo $ECHO_N "(cached) $ECHO_C" >&6
b503c1a2 9407else
9408 if test "$cross_compiling" = yes; then
9409 gcc_cv_func_mbstowcs_works=yes
9410else
6a8964db 9411 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9412/* confdefs.h. */
9413_ACEOF
9414cat confdefs.h >>conftest.$ac_ext
9415cat >>conftest.$ac_ext <<_ACEOF
9416/* end confdefs.h. */
b503c1a2 9417#include <stdlib.h>
9418int main()
9419{
9420 mbstowcs(0, "", 0);
9421 return 0;
9422}
6a8964db 9423_ACEOF
9424rm -f conftest$ac_exeext
0713dc29 9425if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9426 (eval $ac_link) 2>&5
6a8964db 9427 ac_status=$?
9428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9429 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
0713dc29 9430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9431 (eval $ac_try) 2>&5
6a8964db 9432 ac_status=$?
9433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9434 (exit $ac_status); }; }; then
b503c1a2 9435 gcc_cv_func_mbstowcs_works=yes
9436else
6a8964db 9437 echo "$as_me: program exited with status $ac_status" >&5
9438echo "$as_me: failed program was:" >&5
9439sed 's/^/| /' conftest.$ac_ext >&5
9440
9441( exit $ac_status )
9442gcc_cv_func_mbstowcs_works=no
b503c1a2 9443fi
0713dc29 9444rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b503c1a2 9445fi
b503c1a2 9446fi
0713dc29 9447echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9448echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
12b432e0 9449 if test x$gcc_cv_func_mbstowcs_works = xyes; then
6a8964db 9450
9451cat >>confdefs.h <<\_ACEOF
b503c1a2 9452#define HAVE_WORKING_MBSTOWCS 1
6a8964db 9453_ACEOF
b503c1a2 9454
9455 fi
9456fi
9457
0713dc29 9458echo "$as_me:$LINENO: checking for ssize_t" >&5
9459echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
6a8964db 9460if test "${ac_cv_type_ssize_t+set}" = set; then
9461 echo $ECHO_N "(cached) $ECHO_C" >&6
12b432e0 9462else
6a8964db 9463 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9464/* confdefs.h. */
9465_ACEOF
9466cat confdefs.h >>conftest.$ac_ext
9467cat >>conftest.$ac_ext <<_ACEOF
9468/* end confdefs.h. */
ca170da7 9469$ac_includes_default
9470int
9471main ()
9472{
0713dc29 9473if ((ssize_t *) 0)
ca170da7 9474 return 0;
0713dc29 9475if (sizeof (ssize_t))
ca170da7 9476 return 0;
9477 ;
9478 return 0;
9479}
6a8964db 9480_ACEOF
ca170da7 9481rm -f conftest.$ac_objext
0713dc29 9482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9483 (eval $ac_compile) 2>conftest.er1
ca170da7 9484 ac_status=$?
9ebd0bb2 9485 grep -v '^ *+' conftest.er1 >conftest.err
9486 rm -f conftest.er1
9487 cat conftest.err >&5
ca170da7 9488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9489 (exit $ac_status); } &&
0713dc29 9490 { ac_try='test -z "$ac_c_werror_flag"
9491 || test ! -s conftest.err'
9492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9493 (eval $ac_try) 2>&5
9ebd0bb2 9494 ac_status=$?
9495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9496 (exit $ac_status); }; } &&
9497 { ac_try='test -s conftest.$ac_objext'
0713dc29 9498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9499 (eval $ac_try) 2>&5
ca170da7 9500 ac_status=$?
9501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9502 (exit $ac_status); }; }; then
f17e67ef 9503 ac_cv_type_ssize_t=yes
99a9be64 9504else
ca170da7 9505 echo "$as_me: failed program was:" >&5
9506sed 's/^/| /' conftest.$ac_ext >&5
c9cd172c 9507
0713dc29 9508ac_cv_type_ssize_t=no
ca170da7 9509fi
0713dc29 9510rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12b432e0 9511fi
0713dc29 9512echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9513echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
ca170da7 9514if test $ac_cv_type_ssize_t = yes; then
9515 :
9516else
6a8964db 9517
ca170da7 9518cat >>confdefs.h <<_ACEOF
99a9be64 9519#define ssize_t int
6a8964db 9520_ACEOF
99a9be64 9521
9522fi
9523
dc85fb20 9524
2382c341 9525# Try to determine the array type of the second argument of getgroups
9526# for the target system (int or gid_t).
0713dc29 9527echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9528echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6a8964db 9529if test "${ac_cv_type_uid_t+set}" = set; then
9530 echo $ECHO_N "(cached) $ECHO_C" >&6
9531else
9532 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9533/* confdefs.h. */
9534_ACEOF
9535cat confdefs.h >>conftest.$ac_ext
9536cat >>conftest.$ac_ext <<_ACEOF
9537/* end confdefs.h. */
2382c341 9538#include <sys/types.h>
6a8964db 9539
9540_ACEOF
2382c341 9541if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6a8964db 9542 $EGREP "uid_t" >/dev/null 2>&1; then
2382c341 9543 ac_cv_type_uid_t=yes
9544else
2382c341 9545 ac_cv_type_uid_t=no
9546fi
9547rm -f conftest*
9548
9549fi
0713dc29 9550echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9551echo "${ECHO_T}$ac_cv_type_uid_t" >&6
12b432e0 9552if test $ac_cv_type_uid_t = no; then
6a8964db 9553
9554cat >>confdefs.h <<\_ACEOF
2382c341 9555#define uid_t int
6a8964db 9556_ACEOF
c9e1a048 9557
6a8964db 9558
9559cat >>confdefs.h <<\_ACEOF
2382c341 9560#define gid_t int
6a8964db 9561_ACEOF
2382c341 9562
9563fi
9564
0713dc29 9565echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9566echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
6a8964db 9567if test "${ac_cv_type_getgroups+set}" = set; then
9568 echo $ECHO_N "(cached) $ECHO_C" >&6
2382c341 9569else
9570 if test "$cross_compiling" = yes; then
9571 ac_cv_type_getgroups=cross
9572else
6a8964db 9573 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9574/* confdefs.h. */
9575_ACEOF
9576cat confdefs.h >>conftest.$ac_ext
9577cat >>conftest.$ac_ext <<_ACEOF
9578/* end confdefs.h. */
2382c341 9579/* Thanks to Mike Rendell for this test. */
0713dc29 9580#include <sys/types.h>
2382c341 9581#define NGID 256
9582#undef MAX
9583#define MAX(x, y) ((x) > (y) ? (x) : (y))
6a8964db 9584
9585int
9586main ()
2382c341 9587{
9588 gid_t gidset[NGID];
9589 int i, n;
0713dc29 9590 union { gid_t gval; long lval; } val;
2382c341 9591
9592 val.lval = -1;
9593 for (i = 0; i < NGID; i++)
9594 gidset[i] = val.gval;
9595 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
9ebd0bb2 9596 gidset);
2382c341 9597 /* Exit non-zero if getgroups seems to require an array of ints. This
0713dc29 9598 happens when gid_t is short but getgroups modifies an array of ints. */
9599 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12b432e0 9600}
6a8964db 9601_ACEOF
9602rm -f conftest$ac_exeext
0713dc29 9603if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9604 (eval $ac_link) 2>&5
6a8964db 9605 ac_status=$?
9606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9607 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
0713dc29 9608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9609 (eval $ac_try) 2>&5
6a8964db 9610 ac_status=$?
9611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9612 (exit $ac_status); }; }; then
9613 ac_cv_type_getgroups=gid_t
12b432e0 9614else
6a8964db 9615 echo "$as_me: program exited with status $ac_status" >&5
9616echo "$as_me: failed program was:" >&5
9617sed 's/^/| /' conftest.$ac_ext >&5
9618
9619( exit $ac_status )
9620ac_cv_type_getgroups=int
2382c341 9621fi
0713dc29 9622rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2382c341 9623fi
2382c341 9624if test $ac_cv_type_getgroups = cross; then
6a8964db 9625 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9626/* confdefs.h. */
9627_ACEOF
9628cat confdefs.h >>conftest.$ac_ext
9629cat >>conftest.$ac_ext <<_ACEOF
9630/* end confdefs.h. */
2382c341 9631#include <unistd.h>
6a8964db 9632
9633_ACEOF
2382c341 9634if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6a8964db 9635 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
2382c341 9636 ac_cv_type_getgroups=gid_t
9637else
2382c341 9638 ac_cv_type_getgroups=int
9639fi
9640rm -f conftest*
9641
9642fi
9643fi
0713dc29 9644echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9645echo "${ECHO_T}$ac_cv_type_getgroups" >&6
2382c341 9646
6a8964db 9647cat >>confdefs.h <<_ACEOF
2382c341 9648#define GETGROUPS_T $ac_cv_type_getgroups
6a8964db 9649_ACEOF
2382c341 9650
9651
9652if test "${target}" = "${build}"; then
9653 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9654else
9655 case "${target}" in
9656 # This condition may need some tweaking. It should include all
9657 # targets where the array type of the second argument of getgroups
9658 # is int and the type of gid_t is not equivalent to int.
9659 *-*-sunos* | *-*-ultrix*)
9660 TARGET_GETGROUPS_T=int
9661 ;;
9662 *)
9663 TARGET_GETGROUPS_T=gid_t
9664 ;;
9665 esac
9666fi
9667
9668
b0b8d180 9669
0713dc29 9670echo "$as_me:$LINENO: checking for sys/mman.h" >&5
9671echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
b0b8d180 9672if test "${ac_cv_header_sys_mman_h+set}" = set; then
9673 echo $ECHO_N "(cached) $ECHO_C" >&6
0bf9691e 9674else
b1ef404e 9675 cat >conftest.$ac_ext <<_ACEOF
b0b8d180 9676/* confdefs.h. */
9677_ACEOF
9678cat confdefs.h >>conftest.$ac_ext
9679cat >>conftest.$ac_ext <<_ACEOF
9680/* end confdefs.h. */
9681#include <sys/mman.h>
9682_ACEOF
0713dc29 9683if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9684 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
b0b8d180 9685 ac_status=$?
9686 grep -v '^ *+' conftest.er1 >conftest.err
9687 rm -f conftest.er1
9688 cat conftest.err >&5
9689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9690 (exit $ac_status); } >/dev/null; then
9691 if test -s conftest.err; then
9692 ac_cpp_err=$ac_c_preproc_warn_flag
9693 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9694 else
9695 ac_cpp_err=
9696 fi
9697else
9698 ac_cpp_err=yes
9699fi
9700if test -z "$ac_cpp_err"; then
b1ef404e 9701 ac_cv_header_sys_mman_h=yes
b0b8d180 9702else
9703 echo "$as_me: failed program was:" >&5
9704sed 's/^/| /' conftest.$ac_ext >&5
9705
b1ef404e 9706 ac_cv_header_sys_mman_h=no
b0b8d180 9707fi
9708rm -f conftest.err conftest.$ac_ext
9709fi
0713dc29 9710echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9711echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
b0b8d180 9712if test $ac_cv_header_sys_mman_h = yes; then
9713 gcc_header_sys_mman_h=yes
9714else
9715 gcc_header_sys_mman_h=no
9716fi
9717
0713dc29 9718echo "$as_me:$LINENO: checking for mmap" >&5
9719echo $ECHO_N "checking for mmap... $ECHO_C" >&6
b0b8d180 9720if test "${ac_cv_func_mmap+set}" = set; then
9721 echo $ECHO_N "(cached) $ECHO_C" >&6
9722else
9723 cat >conftest.$ac_ext <<_ACEOF
9724/* confdefs.h. */
9725_ACEOF
9726cat confdefs.h >>conftest.$ac_ext
9727cat >>conftest.$ac_ext <<_ACEOF
9728/* end confdefs.h. */
9729/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9730 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9731#define mmap innocuous_mmap
9732
9733/* System header to define __stub macros and hopefully few prototypes,
9734 which can conflict with char mmap (); below.
9735 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9736 <limits.h> exists even on freestanding compilers. */
9737
9738#ifdef __STDC__
9739# include <limits.h>
9740#else
9741# include <assert.h>
9742#endif
9743
9744#undef mmap
9745
0713dc29 9746/* Override any gcc2 internal prototype to avoid an error. */
b0b8d180 9747#ifdef __cplusplus
9748extern "C"
0713dc29 9749{
b0b8d180 9750#endif
0713dc29 9751/* We use char because int might match the return type of a gcc2
9752 builtin and then its argument prototype would still apply. */
b0b8d180 9753char mmap ();
9754/* The GNU C library defines this for functions which it implements
9755 to always fail with ENOSYS. Some functions are actually named
9756 something starting with __ and the normal name is an alias. */
0713dc29 9757#if defined (__stub_mmap) || defined (__stub___mmap)
b0b8d180 9758choke me
0713dc29 9759#else
9760char (*f) () = mmap;
9761#endif
9762#ifdef __cplusplus
9763}
b0b8d180 9764#endif
9765
9766int
9767main ()
9768{
0713dc29 9769return f != mmap;
b0b8d180 9770 ;
9771 return 0;
9772}
9773_ACEOF
9774rm -f conftest.$ac_objext conftest$ac_exeext
0713dc29 9775if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9776 (eval $ac_link) 2>conftest.er1
b0b8d180 9777 ac_status=$?
9778 grep -v '^ *+' conftest.er1 >conftest.err
9779 rm -f conftest.er1
9780 cat conftest.err >&5
9781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9782 (exit $ac_status); } &&
0713dc29 9783 { ac_try='test -z "$ac_c_werror_flag"
9784 || test ! -s conftest.err'
9785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9786 (eval $ac_try) 2>&5
b0b8d180 9787 ac_status=$?
9788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9789 (exit $ac_status); }; } &&
9790 { ac_try='test -s conftest$ac_exeext'
0713dc29 9791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9792 (eval $ac_try) 2>&5
b0b8d180 9793 ac_status=$?
9794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9795 (exit $ac_status); }; }; then
9796 ac_cv_func_mmap=yes
9797else
9798 echo "$as_me: failed program was:" >&5
9799sed 's/^/| /' conftest.$ac_ext >&5
9800
0713dc29 9801ac_cv_func_mmap=no
b0b8d180 9802fi
0713dc29 9803rm -f conftest.err conftest.$ac_objext \
b0b8d180 9804 conftest$ac_exeext conftest.$ac_ext
9805fi
0713dc29 9806echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9807echo "${ECHO_T}$ac_cv_func_mmap" >&6
b0b8d180 9808if test $ac_cv_func_mmap = yes; then
9809 gcc_func_mmap=yes
9810else
9811 gcc_func_mmap=no
9812fi
9813
9814if test "$gcc_header_sys_mman_h" != yes \
9815 || test "$gcc_func_mmap" != yes; then
9f0cea1b 9816 gcc_cv_func_mmap_file=no
9817 gcc_cv_func_mmap_dev_zero=no
9818 gcc_cv_func_mmap_anon=no
9819else
0713dc29 9820 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9821echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
6a8964db 9822if test "${gcc_cv_func_mmap_file+set}" = set; then
9823 echo $ECHO_N "(cached) $ECHO_C" >&6
9f0cea1b 9824else
6a8964db 9825 # Add a system to this blacklist if
9f0cea1b 9826 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9827 # memory area containing the same data that you'd get if you applied
9828 # read() to the same fd. The only system known to have a problem here
9829 # is VMS, where text files have record structure.
9830 case "$host_os" in
6a8964db 9831 vms* | ultrix*)
9f0cea1b 9832 gcc_cv_func_mmap_file=no ;;
9833 *)
9834 gcc_cv_func_mmap_file=yes;;
9835 esac
9836fi
0713dc29 9837echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9838echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9839 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9840echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
6a8964db 9841if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9842 echo $ECHO_N "(cached) $ECHO_C" >&6
9f0cea1b 9843else
9844 # Add a system to this blacklist if it has mmap() but /dev/zero
9845 # does not exist, or if mmapping /dev/zero does not give anonymous
9846 # zeroed pages with both the following properties:
9847 # 1. If you map N consecutive pages in with one call, and then
9848 # unmap any subset of those pages, the pages that were not
9849 # explicitly unmapped remain accessible.
9850 # 2. If you map two adjacent blocks of memory and then unmap them
9851 # both at once, they must both go away.
9852 # Systems known to be in this category are Windows (all variants),
9853 # VMS, and Darwin.
9854 case "$host_os" in
22ed000f 9855 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
9f0cea1b 9856 gcc_cv_func_mmap_dev_zero=no ;;
9857 *)
9858 gcc_cv_func_mmap_dev_zero=yes;;
9859 esac
9860fi
0713dc29 9861echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9862echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
9f0cea1b 9863
9864 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
0713dc29 9865 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9866echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
6a8964db 9867if test "${gcc_cv_decl_map_anon+set}" = set; then
9868 echo $ECHO_N "(cached) $ECHO_C" >&6
9869else
9870 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9871/* confdefs.h. */
9872_ACEOF
9873cat confdefs.h >>conftest.$ac_ext
9874cat >>conftest.$ac_ext <<_ACEOF
9875/* end confdefs.h. */
9f0cea1b 9876#include <sys/types.h>
9877#include <sys/mman.h>
9878#include <unistd.h>
9879
9880#ifndef MAP_ANONYMOUS
9881#define MAP_ANONYMOUS MAP_ANON
9882#endif
9883
6a8964db 9884int
9885main ()
9886{
9f0cea1b 9887int n = MAP_ANONYMOUS;
6a8964db 9888 ;
9889 return 0;
9890}
9891_ACEOF
9892rm -f conftest.$ac_objext
0713dc29 9893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9894 (eval $ac_compile) 2>conftest.er1
6a8964db 9895 ac_status=$?
9ebd0bb2 9896 grep -v '^ *+' conftest.er1 >conftest.err
9897 rm -f conftest.er1
9898 cat conftest.err >&5
6a8964db 9899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9900 (exit $ac_status); } &&
0713dc29 9901 { ac_try='test -z "$ac_c_werror_flag"
9902 || test ! -s conftest.err'
9903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9904 (eval $ac_try) 2>&5
9ebd0bb2 9905 ac_status=$?
9906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9907 (exit $ac_status); }; } &&
9908 { ac_try='test -s conftest.$ac_objext'
0713dc29 9909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9910 (eval $ac_try) 2>&5
6a8964db 9911 ac_status=$?
9912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9913 (exit $ac_status); }; }; then
9f0cea1b 9914 gcc_cv_decl_map_anon=yes
9915else
6a8964db 9916 echo "$as_me: failed program was:" >&5
9917sed 's/^/| /' conftest.$ac_ext >&5
9918
0713dc29 9919gcc_cv_decl_map_anon=no
9f0cea1b 9920fi
0713dc29 9921rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9f0cea1b 9922fi
0713dc29 9923echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9924echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
9f0cea1b 9925
9926 if test $gcc_cv_decl_map_anon = no; then
9927 gcc_cv_func_mmap_anon=no
9928 else
0713dc29 9929 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9930echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
6a8964db 9931if test "${gcc_cv_func_mmap_anon+set}" = set; then
9932 echo $ECHO_N "(cached) $ECHO_C" >&6
9f0cea1b 9933else
9934 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9935 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9936 # doesn't give anonymous zeroed pages with the same properties listed
9937 # above for use of /dev/zero.
9938 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9939 case "$host_os" in
9940 vms* | cygwin* | pe | mingw* | sco* | udk* )
9941 gcc_cv_func_mmap_anon=no ;;
9942 *)
9943 gcc_cv_func_mmap_anon=yes;;
9944 esac
9945fi
0713dc29 9946echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9947echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
9f0cea1b 9948 fi
9949fi
9950
9951if test $gcc_cv_func_mmap_file = yes; then
6a8964db 9952
9953cat >>confdefs.h <<\_ACEOF
9f0cea1b 9954#define HAVE_MMAP_FILE 1
6a8964db 9955_ACEOF
9f0cea1b 9956
9957fi
9958if test $gcc_cv_func_mmap_dev_zero = yes; then
6a8964db 9959
9960cat >>confdefs.h <<\_ACEOF
9f0cea1b 9961#define HAVE_MMAP_DEV_ZERO 1
6a8964db 9962_ACEOF
9f0cea1b 9963
9964fi
9965if test $gcc_cv_func_mmap_anon = yes; then
6a8964db 9966
9967cat >>confdefs.h <<\_ACEOF
9f0cea1b 9968#define HAVE_MMAP_ANON 1
6a8964db 9969_ACEOF
9f0cea1b 9970
9971fi
9972
f1959ea2 9973
9974case "${host}" in
8f966bdb 9975*-*-*vms*)
6a8964db 9976 # Under VMS, vfork works very differently than on Unix. The standard test
8f966bdb 9977 # won't work, and it isn't easily adaptable. It makes more sense to
9978 # just force it.
9979 ac_cv_func_vfork_works=yes
9980 ;;
f1959ea2 9981esac
0713dc29 9982echo "$as_me:$LINENO: checking for pid_t" >&5
9983echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
6a8964db 9984if test "${ac_cv_type_pid_t+set}" = set; then
9985 echo $ECHO_N "(cached) $ECHO_C" >&6
9986else
9987 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9988/* confdefs.h. */
9989_ACEOF
9990cat confdefs.h >>conftest.$ac_ext
9991cat >>conftest.$ac_ext <<_ACEOF
9992/* end confdefs.h. */
9993$ac_includes_default
9994int
9995main ()
9996{
0713dc29 9997if ((pid_t *) 0)
6a8964db 9998 return 0;
0713dc29 9999if (sizeof (pid_t))
6a8964db 10000 return 0;
10001 ;
10002 return 0;
10003}
10004_ACEOF
10005rm -f conftest.$ac_objext
0713dc29 10006if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10007 (eval $ac_compile) 2>conftest.er1
6a8964db 10008 ac_status=$?
9ebd0bb2 10009 grep -v '^ *+' conftest.er1 >conftest.err
10010 rm -f conftest.er1
10011 cat conftest.err >&5
6a8964db 10012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10013 (exit $ac_status); } &&
0713dc29 10014 { ac_try='test -z "$ac_c_werror_flag"
10015 || test ! -s conftest.err'
10016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10017 (eval $ac_try) 2>&5
9ebd0bb2 10018 ac_status=$?
10019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10020 (exit $ac_status); }; } &&
10021 { ac_try='test -s conftest.$ac_objext'
0713dc29 10022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10023 (eval $ac_try) 2>&5
6a8964db 10024 ac_status=$?
10025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10026 (exit $ac_status); }; }; then
f17e67ef 10027 ac_cv_type_pid_t=yes
020ecb1b 10028else
6a8964db 10029 echo "$as_me: failed program was:" >&5
10030sed 's/^/| /' conftest.$ac_ext >&5
c9cd172c 10031
0713dc29 10032ac_cv_type_pid_t=no
6a8964db 10033fi
0713dc29 10034rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12b432e0 10035fi
0713dc29 10036echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10037echo "${ECHO_T}$ac_cv_type_pid_t" >&6
6a8964db 10038if test $ac_cv_type_pid_t = yes; then
10039 :
10040else
10041
10042cat >>confdefs.h <<_ACEOF
020ecb1b 10043#define pid_t int
6a8964db 10044_ACEOF
020ecb1b 10045
10046fi
10047
6a8964db 10048
0713dc29 10049
10050for ac_header in unistd.h vfork.h
6a8964db 10051do
10052as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
0713dc29 10053echo "$as_me:$LINENO: checking for $ac_header" >&5
10054echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10055if eval "test \"\${$as_ac_Header+set}\" = set"; then
6a8964db 10056 echo $ECHO_N "(cached) $ECHO_C" >&6
0bf9691e 10057else
b1ef404e 10058 cat >conftest.$ac_ext <<_ACEOF
6a8964db 10059/* confdefs.h. */
10060_ACEOF
10061cat confdefs.h >>conftest.$ac_ext
10062cat >>conftest.$ac_ext <<_ACEOF
10063/* end confdefs.h. */
10064#include <$ac_header>
10065_ACEOF
0713dc29 10066if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10067 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6a8964db 10068 ac_status=$?
10069 grep -v '^ *+' conftest.er1 >conftest.err
10070 rm -f conftest.er1
10071 cat conftest.err >&5
10072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10073 (exit $ac_status); } >/dev/null; then
10074 if test -s conftest.err; then
10075 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 10076 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 10077 else
10078 ac_cpp_err=
10079 fi
9af7c2e2 10080else
6a8964db 10081 ac_cpp_err=yes
10082fi
10083if test -z "$ac_cpp_err"; then
b1ef404e 10084 eval "$as_ac_Header=yes"
6a8964db 10085else
10086 echo "$as_me: failed program was:" >&5
10087sed 's/^/| /' conftest.$ac_ext >&5
10088
b1ef404e 10089 eval "$as_ac_Header=no"
6a8964db 10090fi
10091rm -f conftest.err conftest.$ac_ext
020ecb1b 10092fi
0713dc29 10093echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10094echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6a8964db 10095if test `eval echo '${'$as_ac_Header'}'` = yes; then
10096 cat >>confdefs.h <<_ACEOF
10097#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10098_ACEOF
c9cd172c 10099
10100fi
6a8964db 10101done
10102
10103
10104
10105for ac_func in fork vfork
10106do
10107as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
0713dc29 10108echo "$as_me:$LINENO: checking for $ac_func" >&5
10109echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10110if eval "test \"\${$as_ac_var+set}\" = set"; then
6a8964db 10111 echo $ECHO_N "(cached) $ECHO_C" >&6
10112else
10113 cat >conftest.$ac_ext <<_ACEOF
6a8964db 10114/* confdefs.h. */
10115_ACEOF
10116cat confdefs.h >>conftest.$ac_ext
10117cat >>conftest.$ac_ext <<_ACEOF
10118/* end confdefs.h. */
9ebd0bb2 10119/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10120 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10121#define $ac_func innocuous_$ac_func
10122
020ecb1b 10123/* System header to define __stub macros and hopefully few prototypes,
6a8964db 10124 which can conflict with char $ac_func (); below.
10125 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10126 <limits.h> exists even on freestanding compilers. */
9ebd0bb2 10127
6a8964db 10128#ifdef __STDC__
10129# include <limits.h>
10130#else
10131# include <assert.h>
10132#endif
9ebd0bb2 10133
10134#undef $ac_func
10135
0713dc29 10136/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 10137#ifdef __cplusplus
10138extern "C"
0713dc29 10139{
6a8964db 10140#endif
0713dc29 10141/* We use char because int might match the return type of a gcc2
10142 builtin and then its argument prototype would still apply. */
6a8964db 10143char $ac_func ();
020ecb1b 10144/* The GNU C library defines this for functions which it implements
10145 to always fail with ENOSYS. Some functions are actually named
10146 something starting with __ and the normal name is an alias. */
0713dc29 10147#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
020ecb1b 10148choke me
0713dc29 10149#else
10150char (*f) () = $ac_func;
10151#endif
10152#ifdef __cplusplus
10153}
020ecb1b 10154#endif
10155
6a8964db 10156int
10157main ()
10158{
0713dc29 10159return f != $ac_func;
6a8964db 10160 ;
10161 return 0;
10162}
10163_ACEOF
10164rm -f conftest.$ac_objext conftest$ac_exeext
0713dc29 10165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10166 (eval $ac_link) 2>conftest.er1
6a8964db 10167 ac_status=$?
9ebd0bb2 10168 grep -v '^ *+' conftest.er1 >conftest.err
10169 rm -f conftest.er1
10170 cat conftest.err >&5
6a8964db 10171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10172 (exit $ac_status); } &&
0713dc29 10173 { ac_try='test -z "$ac_c_werror_flag"
10174 || test ! -s conftest.err'
10175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10176 (eval $ac_try) 2>&5
9ebd0bb2 10177 ac_status=$?
10178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10179 (exit $ac_status); }; } &&
10180 { ac_try='test -s conftest$ac_exeext'
0713dc29 10181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10182 (eval $ac_try) 2>&5
6a8964db 10183 ac_status=$?
10184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10185 (exit $ac_status); }; }; then
10186 eval "$as_ac_var=yes"
10187else
10188 echo "$as_me: failed program was:" >&5
10189sed 's/^/| /' conftest.$ac_ext >&5
10190
0713dc29 10191eval "$as_ac_var=no"
6a8964db 10192fi
0713dc29 10193rm -f conftest.err conftest.$ac_objext \
9ebd0bb2 10194 conftest$ac_exeext conftest.$ac_ext
6a8964db 10195fi
0713dc29 10196echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10197echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6a8964db 10198if test `eval echo '${'$as_ac_var'}'` = yes; then
10199 cat >>confdefs.h <<_ACEOF
10200#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10201_ACEOF
10202
020ecb1b 10203fi
6a8964db 10204done
020ecb1b 10205
6a8964db 10206if test "x$ac_cv_func_fork" = xyes; then
0713dc29 10207 echo "$as_me:$LINENO: checking for working fork" >&5
10208echo $ECHO_N "checking for working fork... $ECHO_C" >&6
6a8964db 10209if test "${ac_cv_func_fork_works+set}" = set; then
10210 echo $ECHO_N "(cached) $ECHO_C" >&6
020ecb1b 10211else
6a8964db 10212 if test "$cross_compiling" = yes; then
10213 ac_cv_func_fork_works=cross
10214else
10215 cat >conftest.$ac_ext <<_ACEOF
0713dc29 10216/* By Ruediger Kuhlmann. */
10217 #include <sys/types.h>
10218 #if HAVE_UNISTD_H
10219 # include <unistd.h>
10220 #endif
10221 /* Some systems only have a dummy stub for fork() */
10222 int main ()
10223 {
10224 if (fork() < 0)
10225 exit (1);
10226 exit (0);
10227 }
6a8964db 10228_ACEOF
10229rm -f conftest$ac_exeext
0713dc29 10230if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10231 (eval $ac_link) 2>&5
6a8964db 10232 ac_status=$?
10233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10234 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
0713dc29 10235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10236 (eval $ac_try) 2>&5
6a8964db 10237 ac_status=$?
10238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10239 (exit $ac_status); }; }; then
10240 ac_cv_func_fork_works=yes
10241else
10242 echo "$as_me: program exited with status $ac_status" >&5
10243echo "$as_me: failed program was:" >&5
10244sed 's/^/| /' conftest.$ac_ext >&5
10245
10246( exit $ac_status )
10247ac_cv_func_fork_works=no
10248fi
0713dc29 10249rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6a8964db 10250fi
10251fi
0713dc29 10252echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10253echo "${ECHO_T}$ac_cv_func_fork_works" >&6
6a8964db 10254
10255else
10256 ac_cv_func_fork_works=$ac_cv_func_fork
10257fi
10258if test "x$ac_cv_func_fork_works" = xcross; then
10259 case $host in
10260 *-*-amigaos* | *-*-msdosdjgpp*)
10261 # Override, as these systems have only a dummy fork() stub
10262 ac_cv_func_fork_works=no
10263 ;;
10264 *)
10265 ac_cv_func_fork_works=yes
10266 ;;
10267 esac
10268 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10269echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
020ecb1b 10270fi
020ecb1b 10271ac_cv_func_vfork_works=$ac_cv_func_vfork
6a8964db 10272if test "x$ac_cv_func_vfork" = xyes; then
0713dc29 10273 echo "$as_me:$LINENO: checking for working vfork" >&5
10274echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
6a8964db 10275if test "${ac_cv_func_vfork_works+set}" = set; then
10276 echo $ECHO_N "(cached) $ECHO_C" >&6
020ecb1b 10277else
6a8964db 10278 if test "$cross_compiling" = yes; then
10279 ac_cv_func_vfork_works=cross
10280else
10281 cat >conftest.$ac_ext <<_ACEOF
6a8964db 10282/* confdefs.h. */
10283_ACEOF
10284cat confdefs.h >>conftest.$ac_ext
10285cat >>conftest.$ac_ext <<_ACEOF
10286/* end confdefs.h. */
020ecb1b 10287/* Thanks to Paul Eggert for this test. */
0713dc29 10288#include <stdio.h>
10289#include <stdlib.h>
10290#include <sys/types.h>
10291#include <sys/stat.h>
6a8964db 10292#include <sys/wait.h>
0713dc29 10293#if HAVE_UNISTD_H
10294# include <unistd.h>
10295#endif
6a8964db 10296#if HAVE_VFORK_H
10297# include <vfork.h>
020ecb1b 10298#endif
10299/* On some sparc systems, changes by the child to local and incoming
6a8964db 10300 argument registers are propagated back to the parent. The compiler
10301 is told about this with #include <vfork.h>, but some compilers
10302 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10303 static variable whose address is put into a register that is
10304 clobbered by the vfork. */
10305static void
020ecb1b 10306#ifdef __cplusplus
10307sparc_address_test (int arg)
6a8964db 10308# else
020ecb1b 10309sparc_address_test (arg) int arg;
10310#endif
10311{
10312 static pid_t child;
10313 if (!child) {
10314 child = vfork ();
10315 if (child < 0) {
10316 perror ("vfork");
10317 _exit(2);
10318 }
10319 if (!child) {
10320 arg = getpid();
10321 write(-1, "", 0);
10322 _exit (arg);
10323 }
10324 }
10325}
6a8964db 10326
10327int
10328main ()
10329{
020ecb1b 10330 pid_t parent = getpid ();
10331 pid_t child;
10332
6a8964db 10333 sparc_address_test (0);
020ecb1b 10334
10335 child = vfork ();
10336
10337 if (child == 0) {
6a8964db 10338 /* Here is another test for sparc vfork register problems. This
10339 test uses lots of local variables, at least as many local
10340 variables as main has allocated so far including compiler
10341 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10342 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10343 reuse the register of parent for one of the local variables,
10344 since it will think that parent can't possibly be used any more
10345 in this routine. Assigning to the local variable will thus
10346 munge parent in the parent process. */
020ecb1b 10347 pid_t
10348 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10349 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10350 /* Convince the compiler that p..p7 are live; otherwise, it might
10351 use the same hardware register for all 8 local variables. */
10352 if (p != p1 || p != p2 || p != p3 || p != p4
10353 || p != p5 || p != p6 || p != p7)
10354 _exit(1);
10355
6a8964db 10356 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10357 from child file descriptors. If the child closes a descriptor
10358 before it execs or exits, this munges the parent's descriptor
10359 as well. Test for this by closing stdout in the child. */
020ecb1b 10360 _exit(close(fileno(stdout)) != 0);
10361 } else {
10362 int status;
10363 struct stat st;
10364
10365 while (wait(&status) != child)
10366 ;
0713dc29 10367 exit(
020ecb1b 10368 /* Was there some problem with vforking? */
10369 child < 0
10370
10371 /* Did the child fail? (This shouldn't happen.) */
10372 || status
10373
10374 /* Did the vfork/compiler bug occur? */
10375 || parent != getpid()
10376
10377 /* Did the file descriptor bug occur? */
10378 || fstat(fileno(stdout), &st) != 0
10379 );
10380 }
10381}
6a8964db 10382_ACEOF
10383rm -f conftest$ac_exeext
0713dc29 10384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10385 (eval $ac_link) 2>&5
6a8964db 10386 ac_status=$?
10387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10388 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
0713dc29 10389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10390 (eval $ac_try) 2>&5
6a8964db 10391 ac_status=$?
10392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10393 (exit $ac_status); }; }; then
020ecb1b 10394 ac_cv_func_vfork_works=yes
10395else
6a8964db 10396 echo "$as_me: program exited with status $ac_status" >&5
10397echo "$as_me: failed program was:" >&5
10398sed 's/^/| /' conftest.$ac_ext >&5
10399
10400( exit $ac_status )
10401ac_cv_func_vfork_works=no
c9e1a048 10402fi
0713dc29 10403rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c9cd172c 10404fi
6a8964db 10405fi
0713dc29 10406echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10407echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
020ecb1b 10408
6a8964db 10409fi;
10410if test "x$ac_cv_func_fork_works" = xcross; then
9ebd0bb2 10411 ac_cv_func_vfork_works=$ac_cv_func_vfork
6a8964db 10412 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10413echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
020ecb1b 10414fi
10415
6a8964db 10416if test "x$ac_cv_func_vfork_works" = xyes; then
10417
10418cat >>confdefs.h <<\_ACEOF
10419#define HAVE_WORKING_VFORK 1
10420_ACEOF
10421
10422else
10423
10424cat >>confdefs.h <<\_ACEOF
020ecb1b 10425#define vfork fork
6a8964db 10426_ACEOF
020ecb1b 10427
10428fi
6a8964db 10429if test "x$ac_cv_func_fork_works" = xyes; then
10430
10431cat >>confdefs.h <<\_ACEOF
10432#define HAVE_WORKING_FORK 1
10433_ACEOF
10434
10435fi
10436
020ecb1b 10437
772580ce 10438
e5d424c9 10439 if test "X$prefix" = "XNONE"; then
10440 acl_final_prefix="$ac_default_prefix"
10441 else
10442 acl_final_prefix="$prefix"
10443 fi
10444 if test "X$exec_prefix" = "XNONE"; then
10445 acl_final_exec_prefix='${prefix}'
10446 else
10447 acl_final_exec_prefix="$exec_prefix"
10448 fi
10449 acl_save_prefix="$prefix"
10450 prefix="$acl_final_prefix"
10451 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10452 prefix="$acl_save_prefix"
7093ff41 10453
10454
0713dc29 10455# Check whether --with-gnu-ld or --without-gnu-ld was given.
e5d424c9 10456if test "${with_gnu_ld+set}" = set; then
0713dc29 10457 withval="$with_gnu_ld"
10458 test "$withval" = no || with_gnu_ld=yes
6a8964db 10459else
e5d424c9 10460 with_gnu_ld=no
0713dc29 10461fi;
e5d424c9 10462# Prepare PATH_SEPARATOR.
10463# The user is always right.
10464if test "${PATH_SEPARATOR+set}" != set; then
10465 echo "#! /bin/sh" >conf$$.sh
10466 echo "exit 0" >>conf$$.sh
10467 chmod +x conf$$.sh
10468 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10469 PATH_SEPARATOR=';'
6a8964db 10470 else
e5d424c9 10471 PATH_SEPARATOR=:
6a8964db 10472 fi
e5d424c9 10473 rm -f conf$$.sh
10474fi
10475ac_prog=ld
10476if test "$GCC" = yes; then
10477 # Check if gcc -print-prog-name=ld gives a path.
0713dc29 10478 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10479echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
e5d424c9 10480 case $host in
10481 *-*-mingw*)
10482 # gcc leaves a trailing carriage return which upsets mingw
10483 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10484 *)
10485 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10486 esac
10487 case $ac_prog in
10488 # Accept absolute paths.
10489 [\\/]* | [A-Za-z]:[\\/]*)
10490 re_direlt='/[^/][^/]*/\.\./'
10491 # Canonicalize the path of ld
10492 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10493 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10494 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10495 done
10496 test -z "$LD" && LD="$ac_prog"
10497 ;;
10498 "")
10499 # If it fails, then pretend we aren't using GCC.
10500 ac_prog=ld
10501 ;;
10502 *)
10503 # If it is relative, then search for the first ld in PATH.
10504 with_gnu_ld=unknown
10505 ;;
10506 esac
10507elif test "$with_gnu_ld" = yes; then
0713dc29 10508 echo "$as_me:$LINENO: checking for GNU ld" >&5
10509echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
6a8964db 10510else
0713dc29 10511 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10512echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
6a8964db 10513fi
e5d424c9 10514if test "${acl_cv_path_LD+set}" = set; then
10515 echo $ECHO_N "(cached) $ECHO_C" >&6
6a8964db 10516else
e5d424c9 10517 if test -z "$LD"; then
10518 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10519 for ac_dir in $PATH; do
10520 test -z "$ac_dir" && ac_dir=.
10521 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10522 acl_cv_path_LD="$ac_dir/$ac_prog"
10523 # Check to see if the program is GNU ld. I'd rather use --version,
10524 # but apparently some GNU ld's only accept -v.
10525 # Break only if it was the GNU/non-GNU ld that we prefer.
b1ef404e 10526 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10527 test "$with_gnu_ld" != no && break
10528 else
10529 test "$with_gnu_ld" != yes && break
10530 fi
e5d424c9 10531 fi
10532 done
10533 IFS="$ac_save_ifs"
10534else
10535 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10536fi
10537fi
6a8964db 10538
e5d424c9 10539LD="$acl_cv_path_LD"
10540if test -n "$LD"; then
0713dc29 10541 echo "$as_me:$LINENO: result: $LD" >&5
10542echo "${ECHO_T}$LD" >&6
e5d424c9 10543else
0713dc29 10544 echo "$as_me:$LINENO: result: no" >&5
10545echo "${ECHO_T}no" >&6
6a8964db 10546fi
e5d424c9 10547test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10548echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10549 { (exit 1); exit 1; }; }
0713dc29 10550echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10551echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
e5d424c9 10552if test "${acl_cv_prog_gnu_ld+set}" = set; then
10553 echo $ECHO_N "(cached) $ECHO_C" >&6
10554else
10555 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
b1ef404e 10556if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10557 acl_cv_prog_gnu_ld=yes
10558else
10559 acl_cv_prog_gnu_ld=no
10560fi
e5d424c9 10561fi
0713dc29 10562echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10563echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
e5d424c9 10564with_gnu_ld=$acl_cv_prog_gnu_ld
10565
10566
10567
0713dc29 10568 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10569echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
e5d424c9 10570if test "${acl_cv_rpath+set}" = set; then
10571 echo $ECHO_N "(cached) $ECHO_C" >&6
10572else
10573
10574 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10575 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10576 . ./conftest.sh
10577 rm -f ./conftest.sh
10578 acl_cv_rpath=done
6a8964db 10579
e24cbb01 10580fi
0713dc29 10581echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10582echo "${ECHO_T}$acl_cv_rpath" >&6
e5d424c9 10583 wl="$acl_cv_wl"
10584 libext="$acl_cv_libext"
10585 shlibext="$acl_cv_shlibext"
10586 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10587 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10588 hardcode_direct="$acl_cv_hardcode_direct"
10589 hardcode_minus_L="$acl_cv_hardcode_minus_L"
0713dc29 10590 # Check whether --enable-rpath or --disable-rpath was given.
e5d424c9 10591if test "${enable_rpath+set}" = set; then
0713dc29 10592 enableval="$enable_rpath"
10593 :
e5d424c9 10594else
10595 enable_rpath=yes
0713dc29 10596fi;
e5d424c9 10597
10598
10599
10600
10601
10602
10603
10604 use_additional=yes
10605
10606 acl_save_prefix="$prefix"
10607 prefix="$acl_final_prefix"
10608 acl_save_exec_prefix="$exec_prefix"
10609 exec_prefix="$acl_final_exec_prefix"
10610
10611 eval additional_includedir=\"$includedir\"
10612 eval additional_libdir=\"$libdir\"
10613
10614 exec_prefix="$acl_save_exec_prefix"
10615 prefix="$acl_save_prefix"
10616
10617
0713dc29 10618# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
e5d424c9 10619if test "${with_libiconv_prefix+set}" = set; then
0713dc29 10620 withval="$with_libiconv_prefix"
10621
e5d424c9 10622 if test "X$withval" = "Xno"; then
10623 use_additional=no
10624 else
10625 if test "X$withval" = "X"; then
10626
10627 acl_save_prefix="$prefix"
10628 prefix="$acl_final_prefix"
10629 acl_save_exec_prefix="$exec_prefix"
10630 exec_prefix="$acl_final_exec_prefix"
10631
10632 eval additional_includedir=\"$includedir\"
10633 eval additional_libdir=\"$libdir\"
10634
10635 exec_prefix="$acl_save_exec_prefix"
10636 prefix="$acl_save_prefix"
10637
10638 else
10639 additional_includedir="$withval/include"
10640 additional_libdir="$withval/lib"
10641 fi
10642 fi
10643
0713dc29 10644fi;
e5d424c9 10645 LIBICONV=
10646 LTLIBICONV=
10647 INCICONV=
10648 rpathdirs=
10649 ltrpathdirs=
10650 names_already_handled=
10651 names_next_round='iconv '
10652 while test -n "$names_next_round"; do
10653 names_this_round="$names_next_round"
10654 names_next_round=
10655 for name in $names_this_round; do
10656 already_handled=
10657 for n in $names_already_handled; do
10658 if test "$n" = "$name"; then
10659 already_handled=yes
10660 break
10661 fi
10662 done
10663 if test -z "$already_handled"; then
10664 names_already_handled="$names_already_handled $name"
10665 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10666 eval value=\"\$HAVE_LIB$uppername\"
10667 if test -n "$value"; then
10668 if test "$value" = yes; then
10669 eval value=\"\$LIB$uppername\"
10670 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10671 eval value=\"\$LTLIB$uppername\"
10672 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10673 else
10674 :
10675 fi
10676 else
10677 found_dir=
10678 found_la=
10679 found_so=
10680 found_a=
10681 if test $use_additional = yes; then
10682 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10683 found_dir="$additional_libdir"
10684 found_so="$additional_libdir/lib$name.$shlibext"
10685 if test -f "$additional_libdir/lib$name.la"; then
10686 found_la="$additional_libdir/lib$name.la"
10687 fi
10688 else
10689 if test -f "$additional_libdir/lib$name.$libext"; then
10690 found_dir="$additional_libdir"
10691 found_a="$additional_libdir/lib$name.$libext"
10692 if test -f "$additional_libdir/lib$name.la"; then
10693 found_la="$additional_libdir/lib$name.la"
10694 fi
10695 fi
10696 fi
10697 fi
10698 if test "X$found_dir" = "X"; then
10699 for x in $LDFLAGS $LTLIBICONV; do
10700
10701 acl_save_prefix="$prefix"
10702 prefix="$acl_final_prefix"
10703 acl_save_exec_prefix="$exec_prefix"
10704 exec_prefix="$acl_final_exec_prefix"
10705 eval x=\"$x\"
10706 exec_prefix="$acl_save_exec_prefix"
10707 prefix="$acl_save_prefix"
10708
10709 case "$x" in
10710 -L*)
10711 dir=`echo "X$x" | sed -e 's/^X-L//'`
10712 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10713 found_dir="$dir"
10714 found_so="$dir/lib$name.$shlibext"
10715 if test -f "$dir/lib$name.la"; then
10716 found_la="$dir/lib$name.la"
10717 fi
10718 else
10719 if test -f "$dir/lib$name.$libext"; then
10720 found_dir="$dir"
10721 found_a="$dir/lib$name.$libext"
10722 if test -f "$dir/lib$name.la"; then
10723 found_la="$dir/lib$name.la"
10724 fi
10725 fi
10726 fi
10727 ;;
10728 esac
10729 if test "X$found_dir" != "X"; then
10730 break
10731 fi
10732 done
10733 fi
10734 if test "X$found_dir" != "X"; then
10735 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10736 if test "X$found_so" != "X"; then
10737 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10738 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10739 else
10740 haveit=
10741 for x in $ltrpathdirs; do
10742 if test "X$x" = "X$found_dir"; then
10743 haveit=yes
10744 break
10745 fi
10746 done
10747 if test -z "$haveit"; then
10748 ltrpathdirs="$ltrpathdirs $found_dir"
10749 fi
10750 if test "$hardcode_direct" = yes; then
10751 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10752 else
10753 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10754 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10755 haveit=
10756 for x in $rpathdirs; do
10757 if test "X$x" = "X$found_dir"; then
10758 haveit=yes
10759 break
10760 fi
10761 done
10762 if test -z "$haveit"; then
10763 rpathdirs="$rpathdirs $found_dir"
10764 fi
10765 else
10766 haveit=
10767 for x in $LDFLAGS $LIBICONV; do
10768
10769 acl_save_prefix="$prefix"
10770 prefix="$acl_final_prefix"
10771 acl_save_exec_prefix="$exec_prefix"
10772 exec_prefix="$acl_final_exec_prefix"
10773 eval x=\"$x\"
10774 exec_prefix="$acl_save_exec_prefix"
10775 prefix="$acl_save_prefix"
10776
10777 if test "X$x" = "X-L$found_dir"; then
10778 haveit=yes
10779 break
10780 fi
10781 done
10782 if test -z "$haveit"; then
10783 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10784 fi
10785 if test "$hardcode_minus_L" != no; then
10786 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10787 else
10788 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10789 fi
10790 fi
10791 fi
10792 fi
10793 else
10794 if test "X$found_a" != "X"; then
10795 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10796 else
10797 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10798 fi
10799 fi
10800 additional_includedir=
10801 case "$found_dir" in
10802 */lib | */lib/)
10803 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10804 additional_includedir="$basedir/include"
10805 ;;
10806 esac
10807 if test "X$additional_includedir" != "X"; then
10808 if test "X$additional_includedir" != "X/usr/include"; then
10809 haveit=
10810 if test "X$additional_includedir" = "X/usr/local/include"; then
10811 if test -n "$GCC"; then
10812 case $host_os in
b1ef404e 10813 linux*) haveit=yes;;
e5d424c9 10814 esac
10815 fi
10816 fi
10817 if test -z "$haveit"; then
10818 for x in $CPPFLAGS $INCICONV; do
10819
10820 acl_save_prefix="$prefix"
10821 prefix="$acl_final_prefix"
10822 acl_save_exec_prefix="$exec_prefix"
10823 exec_prefix="$acl_final_exec_prefix"
10824 eval x=\"$x\"
10825 exec_prefix="$acl_save_exec_prefix"
10826 prefix="$acl_save_prefix"
10827
10828 if test "X$x" = "X-I$additional_includedir"; then
10829 haveit=yes
10830 break
10831 fi
10832 done
10833 if test -z "$haveit"; then
10834 if test -d "$additional_includedir"; then
10835 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10836 fi
10837 fi
10838 fi
10839 fi
10840 fi
10841 if test -n "$found_la"; then
10842 save_libdir="$libdir"
10843 case "$found_la" in
10844 */* | *\\*) . "$found_la" ;;
10845 *) . "./$found_la" ;;
10846 esac
10847 libdir="$save_libdir"
10848 for dep in $dependency_libs; do
10849 case "$dep" in
10850 -L*)
10851 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10852 if test "X$additional_libdir" != "X/usr/lib"; then
10853 haveit=
10854 if test "X$additional_libdir" = "X/usr/local/lib"; then
10855 if test -n "$GCC"; then
10856 case $host_os in
b1ef404e 10857 linux*) haveit=yes;;
e5d424c9 10858 esac
10859 fi
10860 fi
10861 if test -z "$haveit"; then
10862 haveit=
10863 for x in $LDFLAGS $LIBICONV; do
10864
10865 acl_save_prefix="$prefix"
10866 prefix="$acl_final_prefix"
10867 acl_save_exec_prefix="$exec_prefix"
10868 exec_prefix="$acl_final_exec_prefix"
10869 eval x=\"$x\"
10870 exec_prefix="$acl_save_exec_prefix"
10871 prefix="$acl_save_prefix"
10872
10873 if test "X$x" = "X-L$additional_libdir"; then
10874 haveit=yes
10875 break
10876 fi
10877 done
10878 if test -z "$haveit"; then
10879 if test -d "$additional_libdir"; then
10880 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10881 fi
10882 fi
10883 haveit=
10884 for x in $LDFLAGS $LTLIBICONV; do
10885
10886 acl_save_prefix="$prefix"
10887 prefix="$acl_final_prefix"
10888 acl_save_exec_prefix="$exec_prefix"
10889 exec_prefix="$acl_final_exec_prefix"
10890 eval x=\"$x\"
10891 exec_prefix="$acl_save_exec_prefix"
10892 prefix="$acl_save_prefix"
10893
10894 if test "X$x" = "X-L$additional_libdir"; then
10895 haveit=yes
10896 break
10897 fi
10898 done
10899 if test -z "$haveit"; then
10900 if test -d "$additional_libdir"; then
10901 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10902 fi
10903 fi
10904 fi
10905 fi
10906 ;;
10907 -R*)
10908 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10909 if test "$enable_rpath" != no; then
10910 haveit=
10911 for x in $rpathdirs; do
10912 if test "X$x" = "X$dir"; then
10913 haveit=yes
10914 break
10915 fi
10916 done
10917 if test -z "$haveit"; then
10918 rpathdirs="$rpathdirs $dir"
10919 fi
10920 haveit=
10921 for x in $ltrpathdirs; do
10922 if test "X$x" = "X$dir"; then
10923 haveit=yes
10924 break
10925 fi
10926 done
10927 if test -z "$haveit"; then
10928 ltrpathdirs="$ltrpathdirs $dir"
10929 fi
10930 fi
10931 ;;
10932 -l*)
10933 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10934 ;;
10935 *.la)
10936 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10937 ;;
10938 *)
10939 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10940 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10941 ;;
10942 esac
10943 done
10944 fi
10945 else
10946 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10947 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10948 fi
10949 fi
10950 fi
10951 done
10952 done
10953 if test "X$rpathdirs" != "X"; then
10954 if test -n "$hardcode_libdir_separator"; then
10955 alldirs=
10956 for found_dir in $rpathdirs; do
10957 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10958 done
10959 acl_save_libdir="$libdir"
10960 libdir="$alldirs"
10961 eval flag=\"$hardcode_libdir_flag_spec\"
10962 libdir="$acl_save_libdir"
10963 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10964 else
10965 for found_dir in $rpathdirs; do
10966 acl_save_libdir="$libdir"
10967 libdir="$found_dir"
10968 eval flag=\"$hardcode_libdir_flag_spec\"
10969 libdir="$acl_save_libdir"
10970 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10971 done
10972 fi
10973 fi
10974 if test "X$ltrpathdirs" != "X"; then
10975 for found_dir in $ltrpathdirs; do
10976 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10977 done
10978 fi
10979
10980
10981
10982
10983
10984
10985
10986 am_save_CPPFLAGS="$CPPFLAGS"
10987
10988 for element in $INCICONV; do
10989 haveit=
10990 for x in $CPPFLAGS; do
10991
10992 acl_save_prefix="$prefix"
10993 prefix="$acl_final_prefix"
10994 acl_save_exec_prefix="$exec_prefix"
10995 exec_prefix="$acl_final_exec_prefix"
10996 eval x=\"$x\"
10997 exec_prefix="$acl_save_exec_prefix"
10998 prefix="$acl_save_prefix"
10999
11000 if test "X$x" = "X$element"; then
11001 haveit=yes
11002 break
11003 fi
11004 done
11005 if test -z "$haveit"; then
11006 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11007 fi
11008 done
e24cbb01 11009
11010
0713dc29 11011 echo "$as_me:$LINENO: checking for iconv" >&5
11012echo $ECHO_N "checking for iconv... $ECHO_C" >&6
6a8964db 11013if test "${am_cv_func_iconv+set}" = set; then
11014 echo $ECHO_N "(cached) $ECHO_C" >&6
7093ff41 11015else
6a8964db 11016
7093ff41 11017 am_cv_func_iconv="no, consider installing GNU libiconv"
11018 am_cv_lib_iconv=no
6a8964db 11019 cat >conftest.$ac_ext <<_ACEOF
6a8964db 11020/* confdefs.h. */
11021_ACEOF
11022cat confdefs.h >>conftest.$ac_ext
11023cat >>conftest.$ac_ext <<_ACEOF
11024/* end confdefs.h. */
7093ff41 11025#include <stdlib.h>
11026#include <iconv.h>
6a8964db 11027int
11028main ()
11029{
7093ff41 11030iconv_t cd = iconv_open("","");
11031 iconv(cd,NULL,NULL,NULL,NULL);
11032 iconv_close(cd);
6a8964db 11033 ;
11034 return 0;
11035}
11036_ACEOF
11037rm -f conftest.$ac_objext conftest$ac_exeext
0713dc29 11038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11039 (eval $ac_link) 2>conftest.er1
6a8964db 11040 ac_status=$?
9ebd0bb2 11041 grep -v '^ *+' conftest.er1 >conftest.err
11042 rm -f conftest.er1
11043 cat conftest.err >&5
6a8964db 11044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11045 (exit $ac_status); } &&
0713dc29 11046 { ac_try='test -z "$ac_c_werror_flag"
11047 || test ! -s conftest.err'
11048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11049 (eval $ac_try) 2>&5
9ebd0bb2 11050 ac_status=$?
11051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11052 (exit $ac_status); }; } &&
11053 { ac_try='test -s conftest$ac_exeext'
0713dc29 11054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11055 (eval $ac_try) 2>&5
6a8964db 11056 ac_status=$?
11057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11058 (exit $ac_status); }; }; then
7093ff41 11059 am_cv_func_iconv=yes
11060else
6a8964db 11061 echo "$as_me: failed program was:" >&5
11062sed 's/^/| /' conftest.$ac_ext >&5
11063
7093ff41 11064fi
0713dc29 11065rm -f conftest.err conftest.$ac_objext \
9ebd0bb2 11066 conftest$ac_exeext conftest.$ac_ext
7093ff41 11067 if test "$am_cv_func_iconv" != yes; then
11068 am_save_LIBS="$LIBS"
e5d424c9 11069 LIBS="$LIBS $LIBICONV"
6a8964db 11070 cat >conftest.$ac_ext <<_ACEOF
6a8964db 11071/* confdefs.h. */
11072_ACEOF
11073cat confdefs.h >>conftest.$ac_ext
11074cat >>conftest.$ac_ext <<_ACEOF
11075/* end confdefs.h. */
7093ff41 11076#include <stdlib.h>
11077#include <iconv.h>
6a8964db 11078int
11079main ()
11080{
7093ff41 11081iconv_t cd = iconv_open("","");
11082 iconv(cd,NULL,NULL,NULL,NULL);
11083 iconv_close(cd);
6a8964db 11084 ;
11085 return 0;
11086}
11087_ACEOF
11088rm -f conftest.$ac_objext conftest$ac_exeext
0713dc29 11089if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11090 (eval $ac_link) 2>conftest.er1
6a8964db 11091 ac_status=$?
9ebd0bb2 11092 grep -v '^ *+' conftest.er1 >conftest.err
11093 rm -f conftest.er1
11094 cat conftest.err >&5
6a8964db 11095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11096 (exit $ac_status); } &&
0713dc29 11097 { ac_try='test -z "$ac_c_werror_flag"
11098 || test ! -s conftest.err'
11099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11100 (eval $ac_try) 2>&5
9ebd0bb2 11101 ac_status=$?
11102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11103 (exit $ac_status); }; } &&
11104 { ac_try='test -s conftest$ac_exeext'
0713dc29 11105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11106 (eval $ac_try) 2>&5
6a8964db 11107 ac_status=$?
11108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11109 (exit $ac_status); }; }; then
7093ff41 11110 am_cv_lib_iconv=yes
11111 am_cv_func_iconv=yes
11112else
6a8964db 11113 echo "$as_me: failed program was:" >&5
11114sed 's/^/| /' conftest.$ac_ext >&5
11115
7093ff41 11116fi
0713dc29 11117rm -f conftest.err conftest.$ac_objext \
9ebd0bb2 11118 conftest$ac_exeext conftest.$ac_ext
7093ff41 11119 LIBS="$am_save_LIBS"
11120 fi
c9cd172c 11121
6a8964db 11122fi
0713dc29 11123echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
11124echo "${ECHO_T}$am_cv_func_iconv" >&6
12b432e0 11125 if test "$am_cv_func_iconv" = yes; then
6a8964db 11126
11127cat >>confdefs.h <<\_ACEOF
7093ff41 11128#define HAVE_ICONV 1
6a8964db 11129_ACEOF
7093ff41 11130
e5d424c9 11131 fi
11132 if test "$am_cv_lib_iconv" = yes; then
0713dc29 11133 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
11134echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
11135 echo "$as_me:$LINENO: result: $LIBICONV" >&5
11136echo "${ECHO_T}$LIBICONV" >&6
e5d424c9 11137 else
11138 CPPFLAGS="$am_save_CPPFLAGS"
11139 LIBICONV=
11140 LTLIBICONV=
11141 fi
11142
11143
11144
11145 if test "$am_cv_func_iconv" = yes; then
0713dc29 11146 echo "$as_me:$LINENO: checking for iconv declaration" >&5
11147echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
6a8964db 11148 if test "${am_cv_proto_iconv+set}" = set; then
11149 echo $ECHO_N "(cached) $ECHO_C" >&6
7093ff41 11150else
6a8964db 11151
11152 cat >conftest.$ac_ext <<_ACEOF
6a8964db 11153/* confdefs.h. */
11154_ACEOF
11155cat confdefs.h >>conftest.$ac_ext
11156cat >>conftest.$ac_ext <<_ACEOF
11157/* end confdefs.h. */
7093ff41 11158
11159#include <stdlib.h>
11160#include <iconv.h>
11161extern
11162#ifdef __cplusplus
11163"C"
11164#endif
11165#if defined(__STDC__) || defined(__cplusplus)
11166size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11167#else
11168size_t iconv();
11169#endif
11170
6a8964db 11171int
11172main ()
11173{
7093ff41 11174
6a8964db 11175 ;
11176 return 0;
11177}
11178_ACEOF
11179rm -f conftest.$ac_objext
0713dc29 11180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11181 (eval $ac_compile) 2>conftest.er1
6a8964db 11182 ac_status=$?
9ebd0bb2 11183 grep -v '^ *+' conftest.er1 >conftest.err
11184 rm -f conftest.er1
11185 cat conftest.err >&5
6a8964db 11186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11187 (exit $ac_status); } &&
0713dc29 11188 { ac_try='test -z "$ac_c_werror_flag"
11189 || test ! -s conftest.err'
11190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11191 (eval $ac_try) 2>&5
9ebd0bb2 11192 ac_status=$?
11193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194 (exit $ac_status); }; } &&
11195 { ac_try='test -s conftest.$ac_objext'
0713dc29 11196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11197 (eval $ac_try) 2>&5
6a8964db 11198 ac_status=$?
11199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11200 (exit $ac_status); }; }; then
7093ff41 11201 am_cv_proto_iconv_arg1=""
11202else
6a8964db 11203 echo "$as_me: failed program was:" >&5
11204sed 's/^/| /' conftest.$ac_ext >&5
11205
0713dc29 11206am_cv_proto_iconv_arg1="const"
7093ff41 11207fi
0713dc29 11208rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7093ff41 11209 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);"
11210fi
11211
11212 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
0713dc29 11213 echo "$as_me:$LINENO: result: ${ac_t:-
6a8964db 11214 }$am_cv_proto_iconv" >&5
11215echo "${ECHO_T}${ac_t:-
0713dc29 11216 }$am_cv_proto_iconv" >&6
6a8964db 11217
11218cat >>confdefs.h <<_ACEOF
7093ff41 11219#define ICONV_CONST $am_cv_proto_iconv_arg1
6a8964db 11220_ACEOF
7093ff41 11221
11222 fi
7093ff41 11223
c6976b58 11224# Until we have in-tree GNU iconv:
11225LIBICONV_DEP=
11226
11227
b1ef404e 11228
0713dc29 11229 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11230echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
b1ef404e 11231if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11232 echo $ECHO_N "(cached) $ECHO_C" >&6
11233else
11234 cat >conftest.$ac_ext <<_ACEOF
11235/* confdefs.h. */
11236_ACEOF
11237cat confdefs.h >>conftest.$ac_ext
11238cat >>conftest.$ac_ext <<_ACEOF
11239/* end confdefs.h. */
11240#include <locale.h>
11241int
11242main ()
11243{
11244return LC_MESSAGES
11245 ;
11246 return 0;
11247}
11248_ACEOF
11249rm -f conftest.$ac_objext conftest$ac_exeext
0713dc29 11250if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11251 (eval $ac_link) 2>conftest.er1
b1ef404e 11252 ac_status=$?
11253 grep -v '^ *+' conftest.er1 >conftest.err
11254 rm -f conftest.er1
11255 cat conftest.err >&5
11256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11257 (exit $ac_status); } &&
0713dc29 11258 { ac_try='test -z "$ac_c_werror_flag"
11259 || test ! -s conftest.err'
11260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11261 (eval $ac_try) 2>&5
b1ef404e 11262 ac_status=$?
11263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11264 (exit $ac_status); }; } &&
11265 { ac_try='test -s conftest$ac_exeext'
0713dc29 11266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11267 (eval $ac_try) 2>&5
b1ef404e 11268 ac_status=$?
11269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11270 (exit $ac_status); }; }; then
11271 am_cv_val_LC_MESSAGES=yes
11272else
11273 echo "$as_me: failed program was:" >&5
11274sed 's/^/| /' conftest.$ac_ext >&5
11275
0713dc29 11276am_cv_val_LC_MESSAGES=no
b1ef404e 11277fi
0713dc29 11278rm -f conftest.err conftest.$ac_objext \
b1ef404e 11279 conftest$ac_exeext conftest.$ac_ext
11280fi
0713dc29 11281echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11282echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
b1ef404e 11283 if test $am_cv_val_LC_MESSAGES = yes; then
11284
11285cat >>confdefs.h <<\_ACEOF
11286#define HAVE_LC_MESSAGES 1
11287_ACEOF
11288
11289 fi
11290
7093ff41 11291
ac31415f 11292
0713dc29 11293 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11294echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
ac31415f 11295if test "${am_cv_langinfo_codeset+set}" = set; then
11296 echo $ECHO_N "(cached) $ECHO_C" >&6
11297else
11298 cat >conftest.$ac_ext <<_ACEOF
11299/* confdefs.h. */
11300_ACEOF
11301cat confdefs.h >>conftest.$ac_ext
11302cat >>conftest.$ac_ext <<_ACEOF
11303/* end confdefs.h. */
11304#include <langinfo.h>
11305int
11306main ()
11307{
11308char* cs = nl_langinfo(CODESET);
11309 ;
11310 return 0;
11311}
11312_ACEOF
11313rm -f conftest.$ac_objext conftest$ac_exeext
0713dc29 11314if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11315 (eval $ac_link) 2>conftest.er1
ac31415f 11316 ac_status=$?
11317 grep -v '^ *+' conftest.er1 >conftest.err
11318 rm -f conftest.er1
11319 cat conftest.err >&5
11320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11321 (exit $ac_status); } &&
0713dc29 11322 { ac_try='test -z "$ac_c_werror_flag"
11323 || test ! -s conftest.err'
11324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11325 (eval $ac_try) 2>&5
ac31415f 11326 ac_status=$?
11327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11328 (exit $ac_status); }; } &&
11329 { ac_try='test -s conftest$ac_exeext'
0713dc29 11330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11331 (eval $ac_try) 2>&5
ac31415f 11332 ac_status=$?
11333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11334 (exit $ac_status); }; }; then
11335 am_cv_langinfo_codeset=yes
11336else
11337 echo "$as_me: failed program was:" >&5
11338sed 's/^/| /' conftest.$ac_ext >&5
11339
0713dc29 11340am_cv_langinfo_codeset=no
ac31415f 11341fi
0713dc29 11342rm -f conftest.err conftest.$ac_objext \
ac31415f 11343 conftest$ac_exeext conftest.$ac_ext
11344
11345fi
0713dc29 11346echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11347echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
ac31415f 11348 if test $am_cv_langinfo_codeset = yes; then
11349
11350cat >>confdefs.h <<\_ACEOF
11351#define HAVE_LANGINFO_CODESET 1
11352_ACEOF
11353
11354 fi
11355
11356
3c014a93 11357# We will need to find libiberty.h and ansidecl.h
11358saved_CFLAGS="$CFLAGS"
11359CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
599a3eac 11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
31671de5 11381
599a3eac 11382
11383
077a3c99 11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
7e5ef2ef 11394
077a3c99 11395
11396
6f8ecb9e 11397
9b1f316f 11398
11399for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
11400 strsignal strstr strverscmp \
11401 errno snprintf vsnprintf vasprintf malloc realloc calloc \
7e5ef2ef 11402 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
772580ce 11403do
599a3eac 11404 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
0713dc29 11405echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11406echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11407if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
6a8964db 11408 echo $ECHO_N "(cached) $ECHO_C" >&6
11409else
11410 cat >conftest.$ac_ext <<_ACEOF
6a8964db 11411/* confdefs.h. */
11412_ACEOF
11413cat confdefs.h >>conftest.$ac_ext
11414cat >>conftest.$ac_ext <<_ACEOF
11415/* end confdefs.h. */
344c569e 11416#undef $ac_tr_decl
11417#define $ac_tr_decl 1
6a8964db 11418
673b6e5a 11419#include "ansidecl.h"
3c014a93 11420#include "system.h"
07c927cb 11421
6a8964db 11422int
11423main ()
11424{
3c014a93 11425#ifndef $ac_func
11426char *(*pfn) = (char *(*)) $ac_func ;
11427#endif
6a8964db 11428 ;
11429 return 0;
11430}
11431_ACEOF
11432rm -f conftest.$ac_objext
0713dc29 11433if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11434 (eval $ac_compile) 2>conftest.er1
6a8964db 11435 ac_status=$?
9ebd0bb2 11436 grep -v '^ *+' conftest.er1 >conftest.err
11437 rm -f conftest.er1
11438 cat conftest.err >&5
6a8964db 11439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11440 (exit $ac_status); } &&
0713dc29 11441 { ac_try='test -z "$ac_c_werror_flag"
11442 || test ! -s conftest.err'
11443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11444 (eval $ac_try) 2>&5
9ebd0bb2 11445 ac_status=$?
11446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11447 (exit $ac_status); }; } &&
11448 { ac_try='test -s conftest.$ac_objext'
0713dc29 11449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11450 (eval $ac_try) 2>&5
6a8964db 11451 ac_status=$?
11452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11453 (exit $ac_status); }; }; then
07c927cb 11454 eval "gcc_cv_have_decl_$ac_func=yes"
772580ce 11455else
6a8964db 11456 echo "$as_me: failed program was:" >&5
11457sed 's/^/| /' conftest.$ac_ext >&5
11458
0713dc29 11459eval "gcc_cv_have_decl_$ac_func=no"
772580ce 11460fi
0713dc29 11461rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
772580ce 11462fi
11463
07c927cb 11464if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
0713dc29 11465 echo "$as_me:$LINENO: result: yes" >&5
11466echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
3c014a93 11467#define $ac_tr_decl 1
6a8964db 11468_ACEOF
11469
772580ce 11470else
0713dc29 11471 echo "$as_me:$LINENO: result: no" >&5
11472echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
07c927cb 11473#define $ac_tr_decl 0
6a8964db 11474_ACEOF
11475
772580ce 11476fi
11477
11478done
6a8964db 11479
6a8964db 11480
6a8964db 11481
772580ce 11482
772580ce 11483
11484for ac_func in getrlimit setrlimit getrusage
11485do
599a3eac 11486 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
0713dc29 11487echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11488echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11489if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
6a8964db 11490 echo $ECHO_N "(cached) $ECHO_C" >&6
11491else
11492 cat >conftest.$ac_ext <<_ACEOF
6a8964db 11493/* confdefs.h. */
11494_ACEOF
11495cat confdefs.h >>conftest.$ac_ext
11496cat >>conftest.$ac_ext <<_ACEOF
11497/* end confdefs.h. */
344c569e 11498#undef $ac_tr_decl
11499#define $ac_tr_decl 1
6a8964db 11500
673b6e5a 11501#include "ansidecl.h"
3c014a93 11502#include "system.h"
772580ce 11503#ifdef HAVE_SYS_RESOURCE_H
11504#include <sys/resource.h>
11505#endif
11506
07c927cb 11507
6a8964db 11508int
11509main ()
11510{
3c014a93 11511#ifndef $ac_func
11512char *(*pfn) = (char *(*)) $ac_func ;
11513#endif
6a8964db 11514 ;
11515 return 0;
11516}
11517_ACEOF
11518rm -f conftest.$ac_objext
0713dc29 11519if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11520 (eval $ac_compile) 2>conftest.er1
6a8964db 11521 ac_status=$?
9ebd0bb2 11522 grep -v '^ *+' conftest.er1 >conftest.err
11523 rm -f conftest.er1
11524 cat conftest.err >&5
6a8964db 11525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11526 (exit $ac_status); } &&
0713dc29 11527 { ac_try='test -z "$ac_c_werror_flag"
11528 || test ! -s conftest.err'
11529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11530 (eval $ac_try) 2>&5
9ebd0bb2 11531 ac_status=$?
11532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11533 (exit $ac_status); }; } &&
11534 { ac_try='test -s conftest.$ac_objext'
0713dc29 11535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11536 (eval $ac_try) 2>&5
6a8964db 11537 ac_status=$?
11538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11539 (exit $ac_status); }; }; then
07c927cb 11540 eval "gcc_cv_have_decl_$ac_func=yes"
772580ce 11541else
6a8964db 11542 echo "$as_me: failed program was:" >&5
11543sed 's/^/| /' conftest.$ac_ext >&5
11544
0713dc29 11545eval "gcc_cv_have_decl_$ac_func=no"
772580ce 11546fi
0713dc29 11547rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
772580ce 11548fi
11549
07c927cb 11550if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
0713dc29 11551 echo "$as_me:$LINENO: result: yes" >&5
11552echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
3c014a93 11553#define $ac_tr_decl 1
6a8964db 11554_ACEOF
11555
772580ce 11556else
0713dc29 11557 echo "$as_me:$LINENO: result: no" >&5
11558echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
07c927cb 11559#define $ac_tr_decl 0
6a8964db 11560_ACEOF
11561
772580ce 11562fi
11563
11564done
3c014a93 11565
772580ce 11566
6a8964db 11567cat >conftest.$ac_ext <<_ACEOF
6a8964db 11568/* confdefs.h. */
11569_ACEOF
11570cat confdefs.h >>conftest.$ac_ext
11571cat >>conftest.$ac_ext <<_ACEOF
11572/* end confdefs.h. */
c1b9d008 11573
11574#include "ansidecl.h"
11575#include "system.h"
11576#ifdef HAVE_SYS_RESOURCE_H
11577#include <sys/resource.h>
11578#endif
11579
6a8964db 11580int
11581main ()
11582{
c1b9d008 11583rlim_t l = 0;
6a8964db 11584 ;
11585 return 0;
11586}
11587_ACEOF
11588rm -f conftest.$ac_objext
0713dc29 11589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11590 (eval $ac_compile) 2>conftest.er1
6a8964db 11591 ac_status=$?
9ebd0bb2 11592 grep -v '^ *+' conftest.er1 >conftest.err
11593 rm -f conftest.er1
11594 cat conftest.err >&5
6a8964db 11595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11596 (exit $ac_status); } &&
0713dc29 11597 { ac_try='test -z "$ac_c_werror_flag"
11598 || test ! -s conftest.err'
11599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11600 (eval $ac_try) 2>&5
9ebd0bb2 11601 ac_status=$?
11602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11603 (exit $ac_status); }; } &&
11604 { ac_try='test -s conftest.$ac_objext'
0713dc29 11605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11606 (eval $ac_try) 2>&5
6a8964db 11607 ac_status=$?
11608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11609 (exit $ac_status); }; }; then
c1b9d008 11610 :
11611else
6a8964db 11612 echo "$as_me: failed program was:" >&5
11613sed 's/^/| /' conftest.$ac_ext >&5
11614
11615
11616cat >>confdefs.h <<\_ACEOF
c1b9d008 11617#define rlim_t long
6a8964db 11618_ACEOF
c1b9d008 11619
11620fi
0713dc29 11621rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1b9d008 11622
d71e0d30 11623# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11624# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11625# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11626# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
599a3eac 11627
31a83412 11628for ac_func in ldgetname
c770a4cb 11629do
599a3eac 11630 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
0713dc29 11631echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11632echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11633if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
6a8964db 11634 echo $ECHO_N "(cached) $ECHO_C" >&6
11635else
11636 cat >conftest.$ac_ext <<_ACEOF
6a8964db 11637/* confdefs.h. */
11638_ACEOF
11639cat confdefs.h >>conftest.$ac_ext
11640cat >>conftest.$ac_ext <<_ACEOF
11641/* end confdefs.h. */
c770a4cb 11642#undef $ac_tr_decl
11643#define $ac_tr_decl 1
6a8964db 11644
31a83412 11645#include "ansidecl.h"
11646#include "system.h"
11647#ifdef HAVE_LDFCN_H
d71e0d30 11648#undef FREAD
11649#undef FWRITE
31a83412 11650#include <ldfcn.h>
11651#endif
11652
11653
6a8964db 11654int
11655main ()
11656{
31a83412 11657#ifndef $ac_func
11658char *(*pfn) = (char *(*)) $ac_func ;
11659#endif
6a8964db 11660 ;
11661 return 0;
11662}
11663_ACEOF
11664rm -f conftest.$ac_objext
0713dc29 11665if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11666 (eval $ac_compile) 2>conftest.er1
6a8964db 11667 ac_status=$?
9ebd0bb2 11668 grep -v '^ *+' conftest.er1 >conftest.err
11669 rm -f conftest.er1
11670 cat conftest.err >&5
6a8964db 11671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11672 (exit $ac_status); } &&
0713dc29 11673 { ac_try='test -z "$ac_c_werror_flag"
11674 || test ! -s conftest.err'
11675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11676 (eval $ac_try) 2>&5
9ebd0bb2 11677 ac_status=$?
11678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11679 (exit $ac_status); }; } &&
11680 { ac_try='test -s conftest.$ac_objext'
0713dc29 11681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11682 (eval $ac_try) 2>&5
6a8964db 11683 ac_status=$?
11684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11685 (exit $ac_status); }; }; then
31a83412 11686 eval "gcc_cv_have_decl_$ac_func=yes"
11687else
6a8964db 11688 echo "$as_me: failed program was:" >&5
11689sed 's/^/| /' conftest.$ac_ext >&5
11690
0713dc29 11691eval "gcc_cv_have_decl_$ac_func=no"
31a83412 11692fi
0713dc29 11693rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
31a83412 11694fi
11695
11696if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
0713dc29 11697 echo "$as_me:$LINENO: result: yes" >&5
11698echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
31a83412 11699#define $ac_tr_decl 1
6a8964db 11700_ACEOF
11701
31a83412 11702else
0713dc29 11703 echo "$as_me:$LINENO: result: no" >&5
11704echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
31a83412 11705#define $ac_tr_decl 0
6a8964db 11706_ACEOF
11707
31a83412 11708fi
11709
11710done
6a8964db 11711
31a83412 11712
11713
11714for ac_func in times
11715do
599a3eac 11716 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
0713dc29 11717echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11718echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11719if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
6a8964db 11720 echo $ECHO_N "(cached) $ECHO_C" >&6
11721else
11722 cat >conftest.$ac_ext <<_ACEOF
6a8964db 11723/* confdefs.h. */
11724_ACEOF
11725cat confdefs.h >>conftest.$ac_ext
11726cat >>conftest.$ac_ext <<_ACEOF
11727/* end confdefs.h. */
31a83412 11728#undef $ac_tr_decl
11729#define $ac_tr_decl 1
6a8964db 11730
c770a4cb 11731#include "ansidecl.h"
11732#include "system.h"
11733#ifdef HAVE_SYS_TIMES_H
11734#include <sys/times.h>
11735#endif
11736
11737
6a8964db 11738int
11739main ()
11740{
c770a4cb 11741#ifndef $ac_func
11742char *(*pfn) = (char *(*)) $ac_func ;
11743#endif
6a8964db 11744 ;
11745 return 0;
11746}
11747_ACEOF
11748rm -f conftest.$ac_objext
0713dc29 11749if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11750 (eval $ac_compile) 2>conftest.er1
6a8964db 11751 ac_status=$?
9ebd0bb2 11752 grep -v '^ *+' conftest.er1 >conftest.err
11753 rm -f conftest.er1
11754 cat conftest.err >&5
6a8964db 11755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11756 (exit $ac_status); } &&
0713dc29 11757 { ac_try='test -z "$ac_c_werror_flag"
11758 || test ! -s conftest.err'
11759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11760 (eval $ac_try) 2>&5
9ebd0bb2 11761 ac_status=$?
11762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11763 (exit $ac_status); }; } &&
11764 { ac_try='test -s conftest.$ac_objext'
0713dc29 11765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11766 (eval $ac_try) 2>&5
6a8964db 11767 ac_status=$?
11768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11769 (exit $ac_status); }; }; then
c770a4cb 11770 eval "gcc_cv_have_decl_$ac_func=yes"
11771else
6a8964db 11772 echo "$as_me: failed program was:" >&5
11773sed 's/^/| /' conftest.$ac_ext >&5
11774
0713dc29 11775eval "gcc_cv_have_decl_$ac_func=no"
c770a4cb 11776fi
0713dc29 11777rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c770a4cb 11778fi
11779
11780if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
0713dc29 11781 echo "$as_me:$LINENO: result: yes" >&5
11782echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c770a4cb 11783#define $ac_tr_decl 1
6a8964db 11784_ACEOF
11785
c770a4cb 11786else
0713dc29 11787 echo "$as_me:$LINENO: result: no" >&5
11788echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c770a4cb 11789#define $ac_tr_decl 0
6a8964db 11790_ACEOF
11791
c770a4cb 11792fi
11793
11794done
c770a4cb 11795
11796
168c58e0 11797
11798for ac_func in sigaltstack
11799do
11800 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
0713dc29 11801echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11802echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11803if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
168c58e0 11804 echo $ECHO_N "(cached) $ECHO_C" >&6
11805else
11806 cat >conftest.$ac_ext <<_ACEOF
11807/* confdefs.h. */
11808_ACEOF
11809cat confdefs.h >>conftest.$ac_ext
11810cat >>conftest.$ac_ext <<_ACEOF
11811/* end confdefs.h. */
11812#undef $ac_tr_decl
11813#define $ac_tr_decl 1
11814
11815#include "ansidecl.h"
11816#include "system.h"
11817#include <signal.h>
11818
11819
11820int
11821main ()
11822{
11823#ifndef $ac_func
11824char *(*pfn) = (char *(*)) $ac_func ;
11825#endif
11826 ;
11827 return 0;
11828}
11829_ACEOF
11830rm -f conftest.$ac_objext
0713dc29 11831if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11832 (eval $ac_compile) 2>conftest.er1
168c58e0 11833 ac_status=$?
11834 grep -v '^ *+' conftest.er1 >conftest.err
11835 rm -f conftest.er1
11836 cat conftest.err >&5
11837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11838 (exit $ac_status); } &&
0713dc29 11839 { ac_try='test -z "$ac_c_werror_flag"
11840 || test ! -s conftest.err'
11841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11842 (eval $ac_try) 2>&5
168c58e0 11843 ac_status=$?
11844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11845 (exit $ac_status); }; } &&
11846 { ac_try='test -s conftest.$ac_objext'
0713dc29 11847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11848 (eval $ac_try) 2>&5
168c58e0 11849 ac_status=$?
11850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11851 (exit $ac_status); }; }; then
11852 eval "gcc_cv_have_decl_$ac_func=yes"
11853else
11854 echo "$as_me: failed program was:" >&5
11855sed 's/^/| /' conftest.$ac_ext >&5
11856
0713dc29 11857eval "gcc_cv_have_decl_$ac_func=no"
168c58e0 11858fi
0713dc29 11859rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
168c58e0 11860fi
11861
11862if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
0713dc29 11863 echo "$as_me:$LINENO: result: yes" >&5
11864echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
168c58e0 11865#define $ac_tr_decl 1
11866_ACEOF
11867
11868else
0713dc29 11869 echo "$as_me:$LINENO: result: no" >&5
11870echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
168c58e0 11871#define $ac_tr_decl 0
11872_ACEOF
11873
11874fi
11875
11876done
11877
11878
c770a4cb 11879# More time-related stuff.
0713dc29 11880echo "$as_me:$LINENO: checking for struct tms" >&5
11881echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
6a8964db 11882if test "${ac_cv_struct_tms+set}" = set; then
11883 echo $ECHO_N "(cached) $ECHO_C" >&6
11884else
11885
11886cat >conftest.$ac_ext <<_ACEOF
6a8964db 11887/* confdefs.h. */
11888_ACEOF
11889cat confdefs.h >>conftest.$ac_ext
11890cat >>conftest.$ac_ext <<_ACEOF
11891/* end confdefs.h. */
c770a4cb 11892
11893#include "ansidecl.h"
11894#include "system.h"
11895#ifdef HAVE_SYS_TIMES_H
11896#include <sys/times.h>
11897#endif
11898
6a8964db 11899int
11900main ()
11901{
c770a4cb 11902struct tms tms;
6a8964db 11903 ;
11904 return 0;
11905}
11906_ACEOF
11907rm -f conftest.$ac_objext
0713dc29 11908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11909 (eval $ac_compile) 2>conftest.er1
6a8964db 11910 ac_status=$?
9ebd0bb2 11911 grep -v '^ *+' conftest.er1 >conftest.err
11912 rm -f conftest.er1
11913 cat conftest.err >&5
6a8964db 11914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11915 (exit $ac_status); } &&
0713dc29 11916 { ac_try='test -z "$ac_c_werror_flag"
11917 || test ! -s conftest.err'
11918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11919 (eval $ac_try) 2>&5
9ebd0bb2 11920 ac_status=$?
11921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11922 (exit $ac_status); }; } &&
11923 { ac_try='test -s conftest.$ac_objext'
0713dc29 11924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11925 (eval $ac_try) 2>&5
6a8964db 11926 ac_status=$?
11927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11928 (exit $ac_status); }; }; then
c770a4cb 11929 ac_cv_struct_tms=yes
11930else
6a8964db 11931 echo "$as_me: failed program was:" >&5
11932sed 's/^/| /' conftest.$ac_ext >&5
11933
0713dc29 11934ac_cv_struct_tms=no
c770a4cb 11935fi
0713dc29 11936rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c770a4cb 11937fi
0713dc29 11938echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11939echo "${ECHO_T}$ac_cv_struct_tms" >&6
12b432e0 11940if test $ac_cv_struct_tms = yes; then
6a8964db 11941
11942cat >>confdefs.h <<\_ACEOF
c770a4cb 11943#define HAVE_STRUCT_TMS 1
6a8964db 11944_ACEOF
c770a4cb 11945
11946fi
11947
11948# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11949# revisit after autoconf 2.50.
0713dc29 11950echo "$as_me:$LINENO: checking for clock_t" >&5
11951echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
6a8964db 11952if test "${gcc_cv_type_clock_t+set}" = set; then
11953 echo $ECHO_N "(cached) $ECHO_C" >&6
11954else
11955
11956cat >conftest.$ac_ext <<_ACEOF
6a8964db 11957/* confdefs.h. */
11958_ACEOF
11959cat confdefs.h >>conftest.$ac_ext
11960cat >>conftest.$ac_ext <<_ACEOF
11961/* end confdefs.h. */
c770a4cb 11962
11963#include "ansidecl.h"
11964#include "system.h"
11965
6a8964db 11966int
11967main ()
11968{
c770a4cb 11969clock_t x;
6a8964db 11970 ;
11971 return 0;
11972}
11973_ACEOF
11974rm -f conftest.$ac_objext
0713dc29 11975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11976 (eval $ac_compile) 2>conftest.er1
6a8964db 11977 ac_status=$?
9ebd0bb2 11978 grep -v '^ *+' conftest.er1 >conftest.err
11979 rm -f conftest.er1
11980 cat conftest.err >&5
6a8964db 11981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11982 (exit $ac_status); } &&
0713dc29 11983 { ac_try='test -z "$ac_c_werror_flag"
11984 || test ! -s conftest.err'
11985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11986 (eval $ac_try) 2>&5
9ebd0bb2 11987 ac_status=$?
11988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11989 (exit $ac_status); }; } &&
11990 { ac_try='test -s conftest.$ac_objext'
0713dc29 11991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11992 (eval $ac_try) 2>&5
6a8964db 11993 ac_status=$?
11994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11995 (exit $ac_status); }; }; then
c770a4cb 11996 gcc_cv_type_clock_t=yes
11997else
6a8964db 11998 echo "$as_me: failed program was:" >&5
11999sed 's/^/| /' conftest.$ac_ext >&5
12000
0713dc29 12001gcc_cv_type_clock_t=no
c770a4cb 12002fi
0713dc29 12003rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c770a4cb 12004fi
0713dc29 12005echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
12006echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
12b432e0 12007if test $gcc_cv_type_clock_t = yes; then
6a8964db 12008
12009cat >>confdefs.h <<\_ACEOF
c770a4cb 12010#define HAVE_CLOCK_T 1
6a8964db 12011_ACEOF
c770a4cb 12012
12013fi
12014
24d1674d 12015# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
12016CFLAGS="$saved_CFLAGS"
12017
0713dc29 12018# Check whether --enable-initfini-array or --disable-initfini-array was given.
5646395d 12019if test "${enable_initfini_array+set}" = set; then
0713dc29 12020 enableval="$enable_initfini_array"
12021
5646395d 12022else
6a8964db 12023
0713dc29 12024echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
12025echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
6a8964db 12026if test "${gcc_cv_initfini_array+set}" = set; then
12027 echo $ECHO_N "(cached) $ECHO_C" >&6
5646395d 12028else
24d1674d 12029 if test "$cross_compiling" = yes; then
d8ea82e6 12030 gcc_cv_initfini_array=no
24d1674d 12031else
6a8964db 12032 cat >conftest.$ac_ext <<_ACEOF
6a8964db 12033/* confdefs.h. */
12034_ACEOF
12035cat confdefs.h >>conftest.$ac_ext
12036cat >>conftest.$ac_ext <<_ACEOF
12037/* end confdefs.h. */
24d1674d 12038
5646395d 12039static int x = -1;
12040int main (void) { return x; }
12041int foo (void) { x = 0; }
12042int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
6a8964db 12043_ACEOF
12044rm -f conftest$ac_exeext
0713dc29 12045if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12046 (eval $ac_link) 2>&5
6a8964db 12047 ac_status=$?
12048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12049 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
0713dc29 12050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12051 (eval $ac_try) 2>&5
6a8964db 12052 ac_status=$?
12053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12054 (exit $ac_status); }; }; then
d8ea82e6 12055 gcc_cv_initfini_array=yes
24d1674d 12056else
6a8964db 12057 echo "$as_me: program exited with status $ac_status" >&5
12058echo "$as_me: failed program was:" >&5
12059sed 's/^/| /' conftest.$ac_ext >&5
12060
12061( exit $ac_status )
12062gcc_cv_initfini_array=no
24d1674d 12063fi
0713dc29 12064rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24d1674d 12065fi
5646395d 12066fi
0713dc29 12067echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
12068echo "${ECHO_T}$gcc_cv_initfini_array" >&6
24d1674d 12069 enable_initfini_array=$gcc_cv_initfini_array
5646395d 12070
0713dc29 12071fi;
12b432e0 12072if test $enable_initfini_array = yes; then
6a8964db 12073
12074cat >>confdefs.h <<\_ACEOF
24d1674d 12075#define HAVE_INITFINI_ARRAY 1
6a8964db 12076_ACEOF
5646395d 12077
24d1674d 12078fi
772580ce 12079
6a8964db 12080# mkdir takes a single argument on some systems.
0713dc29 12081echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
12082echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
6a8964db 12083if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
12084 echo $ECHO_N "(cached) $ECHO_C" >&6
a729d1c3 12085else
6a8964db 12086 cat >conftest.$ac_ext <<_ACEOF
6a8964db 12087/* confdefs.h. */
12088_ACEOF
12089cat confdefs.h >>conftest.$ac_ext
12090cat >>conftest.$ac_ext <<_ACEOF
12091/* end confdefs.h. */
a729d1c3 12092
12093#include <sys/types.h>
12094#ifdef HAVE_SYS_STAT_H
12095# include <sys/stat.h>
12096#endif
12097#ifdef HAVE_UNISTD_H
12098# include <unistd.h>
12099#endif
12100#ifdef HAVE_DIRECT_H
12101# include <direct.h>
12102#endif
6a8964db 12103int
12104main ()
12105{
a729d1c3 12106mkdir ("foo", 0);
6a8964db 12107 ;
12108 return 0;
12109}
12110_ACEOF
12111rm -f conftest.$ac_objext
0713dc29 12112if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12113 (eval $ac_compile) 2>conftest.er1
6a8964db 12114 ac_status=$?
9ebd0bb2 12115 grep -v '^ *+' conftest.er1 >conftest.err
12116 rm -f conftest.er1
12117 cat conftest.err >&5
6a8964db 12118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12119 (exit $ac_status); } &&
0713dc29 12120 { ac_try='test -z "$ac_c_werror_flag"
12121 || test ! -s conftest.err'
12122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12123 (eval $ac_try) 2>&5
9ebd0bb2 12124 ac_status=$?
12125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12126 (exit $ac_status); }; } &&
12127 { ac_try='test -s conftest.$ac_objext'
0713dc29 12128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12129 (eval $ac_try) 2>&5
6a8964db 12130 ac_status=$?
12131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12132 (exit $ac_status); }; }; then
a729d1c3 12133 gcc_cv_mkdir_takes_one_arg=no
12134else
6a8964db 12135 echo "$as_me: failed program was:" >&5
12136sed 's/^/| /' conftest.$ac_ext >&5
12137
0713dc29 12138gcc_cv_mkdir_takes_one_arg=yes
a729d1c3 12139fi
0713dc29 12140rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a729d1c3 12141fi
0713dc29 12142echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
12143echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
12b432e0 12144if test $gcc_cv_mkdir_takes_one_arg = yes ; then
6a8964db 12145
12146cat >>confdefs.h <<\_ACEOF
a729d1c3 12147#define MKDIR_TAKES_ONE_ARG 1
6a8964db 12148_ACEOF
a729d1c3 12149
12150fi
12151
12152
071cd279 12153# File extensions
12154manext='.1'
12155objext='.o'
12156
12157
12158
805e22b2 12159# With Setjmp/Longjmp based exception handling.
0713dc29 12160# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
805e22b2 12161if test "${enable_sjlj_exceptions+set}" = set; then
0713dc29 12162 enableval="$enable_sjlj_exceptions"
12163 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
12b432e0 12164
6a8964db 12165cat >>confdefs.h <<_ACEOF
12166#define CONFIG_SJLJ_EXCEPTIONS $sjlj
12167_ACEOF
805e22b2 12168
0713dc29 12169fi;
805e22b2 12170
8bdf23ae 12171# For platforms with the unwind ABI which includes an unwind library,
12172# libunwind, we can choose to use the system libunwind.
805e22b2 12173
0713dc29 12174# Check whether --with-system-libunwind or --without-system-libunwind was given.
8bdf23ae 12175if test "${with_system_libunwind+set}" = set; then
0713dc29 12176 withval="$with_system_libunwind"
805e22b2 12177
0713dc29 12178fi;
805e22b2 12179
f406e07e 12180# config.gcc also contains tests of with_system_libunwind.
12181if test x$with_system_libunwind = xyes; then
12182
12183cat >>confdefs.h <<\_ACEOF
12184#define HAVE_GETIPINFO 1
12185_ACEOF
12186
12187fi
12188
7349ace9 12189# --------------------------------------------------------
12190# Build, host, and target specific configuration fragments
12191# --------------------------------------------------------
12192
eab1a815 12193# Collect build-machine-specific information.
12194. ${srcdir}/config.build
12195
973f8bf3 12196# Collect host-machine-specific information.
12197. ${srcdir}/config.host
12198
eb1bd38b 12199target_gtfiles=
973f8bf3 12200
12201# Collect target-machine-specific information.
2333aa54 12202. ${srcdir}/config.gcc
071cd279 12203
12204extra_objs="${host_extra_objs} ${extra_objs}"
69eb04f7 12205extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
071cd279 12206
12207# Default the target-machine variables that were not explicitly set.
bf3637a9 12208if test x"$tm_file" = x
071cd279 12209then tm_file=$cpu_type/$cpu_type.h; fi
12210
2a8be21e 12211if test x"$extra_headers" = x
071cd279 12212then extra_headers=; fi
12213
bf3637a9 12214if test x$md_file = x
0579e60e 12215then md_file=$cpu_type/$cpu_type.md; fi
071cd279 12216
bf3637a9 12217if test x$out_file = x
071cd279 12218then out_file=$cpu_type/$cpu_type.c; fi
12219
bf3637a9 12220if test x"$tmake_file" = x
071cd279 12221then tmake_file=$cpu_type/t-$cpu_type
12222fi
12223
27b15aee 12224if test x"$dwarf2" = xyes
b65d2e3c 12225then tm_file="$tm_file tm-dwarf2.h"
27b15aee 12226fi
12227
071cd279 12228# Say what files are being used for the output code and MD file.
83b8e55b 12229echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
071cd279 12230echo "Using \`$srcdir/config/$md_file' as machine description file."
12231
83b8e55b 12232# If any of the xm_file variables contain nonexistent files, warn
e1688c3e 12233# about them and drop them.
12234
83b8e55b 12235bx=
12236for x in $build_xm_file; do
12237 if test -f $srcdir/config/$x
12238 then bx="$bx $x"
6a8964db 12239 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12240echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
83b8e55b 12241 fi
12242done
12243build_xm_file="$bx"
12244
12245hx=
12246for x in $host_xm_file; do
12247 if test -f $srcdir/config/$x
12248 then hx="$hx $x"
6a8964db 12249 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12250echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
83b8e55b 12251 fi
12252done
12253host_xm_file="$hx"
12254
12255tx=
12256for x in $xm_file; do
12257 if test -f $srcdir/config/$x
12258 then tx="$tx $x"
6a8964db 12259 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12260echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
83b8e55b 12261 fi
12262done
12263xm_file="$tx"
12264
071cd279 12265count=a
12266for f in $tm_file; do
12267 count=${count}x
12268done
bf3637a9 12269if test $count = ax; then
071cd279 12270 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
12271else
12272 echo "Using the following target machine macro files:"
12273 for f in $tm_file; do
12274 echo " $srcdir/config/$f"
12275 done
12276fi
12277
805e22b2 12278if test x$need_64bit_hwint = xyes; then
6a8964db 12279
12280cat >>confdefs.h <<\_ACEOF
805e22b2 12281#define NEED_64BIT_HOST_WIDE_INT 1
6a8964db 12282_ACEOF
805e22b2 12283
12284fi
12285
3f28a032 12286if test x$use_long_long_for_widest_fast_int = xyes; then
12287
12288cat >>confdefs.h <<\_ACEOF
12289#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12290_ACEOF
12291
12292fi
12293
071cd279 12294count=a
12295for f in $host_xm_file; do
12296 count=${count}x
12297done
83b8e55b 12298if test $count = a; then
12299 :
12300elif test $count = ax; then
071cd279 12301 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12302else
12303 echo "Using the following host machine macro files:"
12304 for f in $host_xm_file; do
12305 echo " $srcdir/config/$f"
12306 done
12307fi
b197fbcf 12308echo "Using ${out_host_hook_obj} for host machine hooks."
071cd279 12309
bf3637a9 12310if test "$host_xm_file" != "$build_xm_file"; then
071cd279 12311 count=a
12312 for f in $build_xm_file; do
12313 count=${count}x
12314 done
83b8e55b 12315 if test $count = a; then
12316 :
12317 elif test $count = ax; then
071cd279 12318 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12319 else
12320 echo "Using the following build machine macro files:"
12321 for f in $build_xm_file; do
12322 echo " $srcdir/config/$f"
12323 done
12324 fi
12325fi
12326
168c58e0 12327case ${host} in
84eba009 12328 powerpc*-*-darwin*)
0713dc29 12329 echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
12330echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6
168c58e0 12331if test "${gcc_cv_mcontext_underscores+set}" = set; then
12332 echo $ECHO_N "(cached) $ECHO_C" >&6
12333else
12334 cat >conftest.$ac_ext <<_ACEOF
12335
679f19b4 12336#include <sys/signal.h>
168c58e0 12337#include <ucontext.h>
12338int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
12339
12340_ACEOF
12341rm -f conftest.$ac_objext
0713dc29 12342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12343 (eval $ac_compile) 2>conftest.er1
168c58e0 12344 ac_status=$?
12345 grep -v '^ *+' conftest.er1 >conftest.err
12346 rm -f conftest.er1
12347 cat conftest.err >&5
12348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12349 (exit $ac_status); } &&
0713dc29 12350 { ac_try='test -z "$ac_c_werror_flag"
12351 || test ! -s conftest.err'
12352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12353 (eval $ac_try) 2>&5
168c58e0 12354 ac_status=$?
12355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12356 (exit $ac_status); }; } &&
12357 { ac_try='test -s conftest.$ac_objext'
0713dc29 12358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12359 (eval $ac_try) 2>&5
168c58e0 12360 ac_status=$?
12361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12362 (exit $ac_status); }; }; then
12363 gcc_cv_mcontext_underscores=no
12364else
12365 echo "$as_me: failed program was:" >&5
12366sed 's/^/| /' conftest.$ac_ext >&5
12367
0713dc29 12368gcc_cv_mcontext_underscores=yes
168c58e0 12369fi
0713dc29 12370rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
168c58e0 12371fi
0713dc29 12372echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
12373echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6
168c58e0 12374 if test $gcc_cv_mcontext_underscores = yes; then
12375
12376cat >>confdefs.h <<\_ACEOF
12377#define HAS_MCONTEXT_T_UNDERSCORES
12378_ACEOF
12379
12380 fi
12381 ;;
12382esac
12383
d976f534 12384# ---------
12385# Threading
12386# ---------
12387
267d993c 12388# Check if a valid thread package
334c8279 12389case ${enable_threads} in
267d993c 12390 "" | no)
12391 # No threads
12392 target_thread_file='single'
12393 ;;
12394 yes)
12395 # default
12396 target_thread_file='single'
12397 ;;
8fde03ba 12398 aix | dce | gnat | irix | posix | posix95 | rtems | \
5614d3f5 12399 single | solaris | vxworks | win32 )
334c8279 12400 target_thread_file=${enable_threads}
267d993c 12401 ;;
12402 *)
334c8279 12403 echo "${enable_threads} is an unknown thread package" 1>&2
267d993c 12404 exit 1
12405 ;;
12406esac
12407
12408if test x${thread_file} = x; then
12409 # No thread file set by target-specific clauses in config.gcc,
12410 # so use file chosen by default logic above
12411 thread_file=${target_thread_file}
071cd279 12412fi
12413
d976f534 12414# Make gthr-default.h if we have a thread file.
12415gthread_flags=
12416if test $thread_file != single; then
12417 rm -f gthr-default.h
12418 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12419 gthread_flags=-DHAVE_GTHR_DEFAULT
12420fi
12421
12422
12423# --------
12424# UNSORTED
12425# --------
12426
d9ab9cb9 12427use_cxa_atexit=no
bc5ae993 12428if test x$enable___cxa_atexit = xyes || \
12429 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
d9ab9cb9 12430 if test x$host = x$target; then
d91ef9b0 12431 case $host in
12432 # mingw32 doesn't have __cxa_atexit but uses atexit registration
12433 # keyed to flag_use_cxa_atexit
12434 *-*-mingw32*)
12435 use_cxa_atexit=yes
12436 ;;
12437 *)
0713dc29 12438 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
12439echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
e4a013de 12440if test "${ac_cv_func___cxa_atexit+set}" = set; then
12441 echo $ECHO_N "(cached) $ECHO_C" >&6
12442else
12443 cat >conftest.$ac_ext <<_ACEOF
e4a013de 12444/* confdefs.h. */
12445_ACEOF
12446cat confdefs.h >>conftest.$ac_ext
12447cat >>conftest.$ac_ext <<_ACEOF
12448/* end confdefs.h. */
9ebd0bb2 12449/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12450 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12451#define __cxa_atexit innocuous___cxa_atexit
12452
e4a013de 12453/* System header to define __stub macros and hopefully few prototypes,
12454 which can conflict with char __cxa_atexit (); below.
12455 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12456 <limits.h> exists even on freestanding compilers. */
9ebd0bb2 12457
e4a013de 12458#ifdef __STDC__
12459# include <limits.h>
12460#else
12461# include <assert.h>
12462#endif
9ebd0bb2 12463
12464#undef __cxa_atexit
12465
0713dc29 12466/* Override any gcc2 internal prototype to avoid an error. */
e4a013de 12467#ifdef __cplusplus
12468extern "C"
0713dc29 12469{
e4a013de 12470#endif
0713dc29 12471/* We use char because int might match the return type of a gcc2
12472 builtin and then its argument prototype would still apply. */
e4a013de 12473char __cxa_atexit ();
12474/* The GNU C library defines this for functions which it implements
12475 to always fail with ENOSYS. Some functions are actually named
12476 something starting with __ and the normal name is an alias. */
0713dc29 12477#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
e4a013de 12478choke me
0713dc29 12479#else
12480char (*f) () = __cxa_atexit;
12481#endif
12482#ifdef __cplusplus
12483}
e4a013de 12484#endif
12485
12486int
12487main ()
12488{
0713dc29 12489return f != __cxa_atexit;
e4a013de 12490 ;
12491 return 0;
12492}
12493_ACEOF
12494rm -f conftest.$ac_objext conftest$ac_exeext
0713dc29 12495if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12496 (eval $ac_link) 2>conftest.er1
e4a013de 12497 ac_status=$?
9ebd0bb2 12498 grep -v '^ *+' conftest.er1 >conftest.err
12499 rm -f conftest.er1
12500 cat conftest.err >&5
e4a013de 12501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12502 (exit $ac_status); } &&
0713dc29 12503 { ac_try='test -z "$ac_c_werror_flag"
12504 || test ! -s conftest.err'
12505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12506 (eval $ac_try) 2>&5
9ebd0bb2 12507 ac_status=$?
12508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12509 (exit $ac_status); }; } &&
12510 { ac_try='test -s conftest$ac_exeext'
0713dc29 12511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12512 (eval $ac_try) 2>&5
e4a013de 12513 ac_status=$?
12514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12515 (exit $ac_status); }; }; then
12516 ac_cv_func___cxa_atexit=yes
12517else
12518 echo "$as_me: failed program was:" >&5
12519sed 's/^/| /' conftest.$ac_ext >&5
12520
0713dc29 12521ac_cv_func___cxa_atexit=no
e4a013de 12522fi
0713dc29 12523rm -f conftest.err conftest.$ac_objext \
9ebd0bb2 12524 conftest$ac_exeext conftest.$ac_ext
e4a013de 12525fi
0713dc29 12526echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12527echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
e4a013de 12528if test $ac_cv_func___cxa_atexit = yes; then
d9ab9cb9 12529 use_cxa_atexit=yes
12530else
12531 echo "__cxa_atexit can't be enabled on this target"
12532fi
12533
55a5bb1e 12534 ;;
d91ef9b0 12535 esac
d9ab9cb9 12536 else
12537 # We can't check for __cxa_atexit when building a cross, so assume
12538 # it is available
12539 use_cxa_atexit=yes
12540 fi
12541 if test x$use_cxa_atexit = xyes; then
6a8964db 12542
12543cat >>confdefs.h <<\_ACEOF
3bf418bd 12544#define DEFAULT_USE_CXA_ATEXIT 2
6a8964db 12545_ACEOF
bc5ae993 12546
d9ab9cb9 12547 fi
bc5ae993 12548fi
12549
f406e07e 12550use_getipinfo=yes
12551if test x$with_system_libunwind = xyes; then
12552 if test x$host = x$target; then
0713dc29 12553 echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5
12554echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6
f406e07e 12555if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
12556 echo $ECHO_N "(cached) $ECHO_C" >&6
12557else
12558 ac_func_search_save_LIBS=$LIBS
0713dc29 12559ac_cv_search__Unwind_GetIPInfo=no
f406e07e 12560cat >conftest.$ac_ext <<_ACEOF
12561/* confdefs.h. */
12562_ACEOF
12563cat confdefs.h >>conftest.$ac_ext
12564cat >>conftest.$ac_ext <<_ACEOF
12565/* end confdefs.h. */
12566
0713dc29 12567/* Override any gcc2 internal prototype to avoid an error. */
f406e07e 12568#ifdef __cplusplus
12569extern "C"
12570#endif
0713dc29 12571/* We use char because int might match the return type of a gcc2
12572 builtin and then its argument prototype would still apply. */
f406e07e 12573char _Unwind_GetIPInfo ();
12574int
12575main ()
12576{
0713dc29 12577_Unwind_GetIPInfo ();
f406e07e 12578 ;
12579 return 0;
12580}
12581_ACEOF
0713dc29 12582rm -f conftest.$ac_objext conftest$ac_exeext
12583if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12584 (eval $ac_link) 2>conftest.er1
f406e07e 12585 ac_status=$?
12586 grep -v '^ *+' conftest.er1 >conftest.err
12587 rm -f conftest.er1
12588 cat conftest.err >&5
12589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12590 (exit $ac_status); } &&
0713dc29 12591 { ac_try='test -z "$ac_c_werror_flag"
12592 || test ! -s conftest.err'
12593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12594 (eval $ac_try) 2>&5
f406e07e 12595 ac_status=$?
12596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12597 (exit $ac_status); }; } &&
12598 { ac_try='test -s conftest$ac_exeext'
0713dc29 12599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12600 (eval $ac_try) 2>&5
f406e07e 12601 ac_status=$?
12602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12603 (exit $ac_status); }; }; then
0713dc29 12604 ac_cv_search__Unwind_GetIPInfo="none required"
f406e07e 12605else
12606 echo "$as_me: failed program was:" >&5
12607sed 's/^/| /' conftest.$ac_ext >&5
12608
84eba009 12609fi
0713dc29 12610rm -f conftest.err conftest.$ac_objext \
12611 conftest$ac_exeext conftest.$ac_ext
12612if test "$ac_cv_search__Unwind_GetIPInfo" = no; then
12613 for ac_lib in unwind; do
12614 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12615 cat >conftest.$ac_ext <<_ACEOF
12616/* confdefs.h. */
12617_ACEOF
12618cat confdefs.h >>conftest.$ac_ext
12619cat >>conftest.$ac_ext <<_ACEOF
12620/* end confdefs.h. */
f406e07e 12621
0713dc29 12622/* Override any gcc2 internal prototype to avoid an error. */
12623#ifdef __cplusplus
12624extern "C"
12625#endif
12626/* We use char because int might match the return type of a gcc2
12627 builtin and then its argument prototype would still apply. */
12628char _Unwind_GetIPInfo ();
12629int
12630main ()
12631{
12632_Unwind_GetIPInfo ();
12633 ;
12634 return 0;
12635}
12636_ACEOF
12637rm -f conftest.$ac_objext conftest$ac_exeext
12638if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12639 (eval $ac_link) 2>conftest.er1
12640 ac_status=$?
12641 grep -v '^ *+' conftest.er1 >conftest.err
12642 rm -f conftest.er1
12643 cat conftest.err >&5
12644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12645 (exit $ac_status); } &&
12646 { ac_try='test -z "$ac_c_werror_flag"
12647 || test ! -s conftest.err'
12648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12649 (eval $ac_try) 2>&5
12650 ac_status=$?
12651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12652 (exit $ac_status); }; } &&
12653 { ac_try='test -s conftest$ac_exeext'
12654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12655 (eval $ac_try) 2>&5
12656 ac_status=$?
12657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12658 (exit $ac_status); }; }; then
12659 ac_cv_search__Unwind_GetIPInfo="-l$ac_lib"
12660break
84eba009 12661else
0713dc29 12662 echo "$as_me: failed program was:" >&5
12663sed 's/^/| /' conftest.$ac_ext >&5
12664
12665fi
12666rm -f conftest.err conftest.$ac_objext \
12667 conftest$ac_exeext conftest.$ac_ext
12668 done
f406e07e 12669fi
12670LIBS=$ac_func_search_save_LIBS
12671fi
0713dc29 12672echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5
12673echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6
12674if test "$ac_cv_search__Unwind_GetIPInfo" != no; then
12675 test "$ac_cv_search__Unwind_GetIPInfo" = "none required" || LIBS="$ac_cv_search__Unwind_GetIPInfo $LIBS"
f406e07e 12676
12677else
12678 use_getipinfo=no
12679fi
12680
12681 fi
12682fi
12683
12684if test x$use_getipinfo = xyes; then
12685
12686cat >>confdefs.h <<\_ACEOF
12687#define HAVE_GETIPINFO 1
12688_ACEOF
12689
12690else
12691 echo "The system unwind library does not support _Unwind_GetIPInfo."
12692fi
12693
6f432b58 12694# Look for a file containing extra machine modes.
b5ccaa7b 12695if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12696 extra_modes_file='$(srcdir)'/config/${extra_modes}
6a8964db 12697
12698
12699cat >>confdefs.h <<_ACEOF
4dcab8b7 12700#define EXTRA_MODES_FILE "config/$extra_modes"
6a8964db 12701_ACEOF
6f432b58 12702
12703fi
12704
ff05e09e 12705# Convert extra_options into a form suitable for Makefile use.
12706extra_opt_files=
12707for f in $extra_options; do
12708 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12709done
12710
12711
764fc592 12712# auto-host.h is the file containing items generated by autoconf and is
0dbd1c74 12713# the first file included by config.h.
805e22b2 12714# If host=build, it is correct to have bconfig include auto-host.h
6a8964db 12715# as well. If host!=build, we are in error and need to do more
58b16c1a 12716# work to find out the build config parameters.
bf3637a9 12717if test x$host = x$build
58b16c1a 12718then
d826737c 12719 build_auto=auto-host.h
764fc592 12720else
12721 # We create a subdir, then run autoconf in the subdir.
12722 # To prevent recursion we set host and build for the new
12723 # invocation of configure to the build for this invocation
6a8964db 12724 # of configure.
764fc592 12725 tempdir=build.$$
12726 rm -rf $tempdir
12727 mkdir $tempdir
12728 cd $tempdir
12729 case ${srcdir} in
f9a8e1cd 12730 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
764fc592 12731 *) realsrcdir=../${srcdir};;
12732 esac
fc5104b7 12733 saved_CFLAGS="${CFLAGS}"
12734 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12735 ${realsrcdir}/configure \
1f3fcf32 12736 --enable-languages=${enable_languages-all} \
ab3470ec 12737 --target=$target_alias --host=$build_alias --build=$build_alias
fc5104b7 12738 CFLAGS="${saved_CFLAGS}"
764fc592 12739
12740 # We just finished tests for the build machine, so rename
12741 # the file auto-build.h in the gcc directory.
12742 mv auto-host.h ../auto-build.h
12743 cd ..
12744 rm -rf $tempdir
d826737c 12745 build_auto=auto-build.h
58b16c1a 12746fi
12747
883c44aa 12748
d826737c 12749tm_file="${tm_file} defaults.h"
805e22b2 12750tm_p_file="${tm_p_file} tm-preds.h"
12751host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12752build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
4b0e3ddb 12753# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
18320123 12754# put this back in temporarily.
fcd42b1e 12755xm_file="auto-host.h ansidecl.h ${xm_file}"
4a7d7a8b 12756
7349ace9 12757# --------
12758# UNSORTED
12759# --------
12760
9371935c 12761# Compile in configure arguments.
6e11eb2c 12762if test -f configargs.h ; then
9371935c 12763 # Being re-configured.
8bffa377 12764 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
9371935c 12765 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12766else
12767 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12768fi
5df533c9 12769
12770# Double all backslashes and backslash all quotes to turn
12771# gcc_config_arguments into a C string.
12772sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12773$gcc_config_arguments
12774EOF
12775gcc_config_arguments_str=`cat conftest.out`
12776rm -f conftest.out
12777
9371935c 12778cat > configargs.h <<EOF
12779/* Generated automatically. */
5df533c9 12780static const char configuration_arguments[] = "$gcc_config_arguments_str";
6d72c630 12781static const char thread_model[] = "$thread_file";
7dd97ab6 12782
12783static const struct {
12784 const char *name, *value;
12785} configure_default_options[] = $configure_default_options;
9371935c 12786EOF
12787
be2828ce 12788# Internationalization
b1ef404e 12789# If we haven't got the data from the intl directory,
12790# assume NLS is disabled.
12791USE_NLS=no
12792LIBINTL=
12793LIBINTL_DEP=
12794INCINTL=
12795XGETTEXT=
12796GMSGFMT=
12797POSUB=
12798
12799if test -f ../intl/config.intl; then
12800 . ../intl/config.intl
12801fi
0713dc29 12802echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12803echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
b1ef404e 12804if test x"$USE_NLS" != xyes; then
0713dc29 12805 echo "$as_me:$LINENO: result: no" >&5
12806echo "${ECHO_T}no" >&6
b1ef404e 12807else
0713dc29 12808 echo "$as_me:$LINENO: result: yes" >&5
12809echo "${ECHO_T}yes" >&6
b1ef404e 12810
12811cat >>confdefs.h <<\_ACEOF
12812#define ENABLE_NLS 1
12813_ACEOF
12814
12815
0713dc29 12816 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12817echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
b1ef404e 12818 # Look for .po and .gmo files in the source directory.
12819 CATALOGS=
12820 XLINGUAS=
12821 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12822 # If there aren't any .gmo files the shell will give us the
12823 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12824 # weeded out.
12825 case "$cat" in *\**)
12826 continue;;
12827 esac
12828 # The quadruple backslash is collapsed to a double backslash
12829 # by the backticks, then collapsed again by the double quotes,
12830 # leaving us with one backslash in the sed expression (right
12831 # before the dot that mustn't act as a wildcard).
12832 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
12833 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
12834 # The user is allowed to set LINGUAS to a list of languages to
12835 # install catalogs for. If it's empty that means "all of them."
12836 if test "x$LINGUAS" = x; then
12837 CATALOGS="$CATALOGS $cat"
12838 XLINGUAS="$XLINGUAS $lang"
12839 else
12840 case "$LINGUAS" in *$lang*)
12841 CATALOGS="$CATALOGS $cat"
12842 XLINGUAS="$XLINGUAS $lang"
12843 ;;
12844 esac
12845 fi
12846 done
12847 LINGUAS="$XLINGUAS"
0713dc29 12848 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12849echo "${ECHO_T}$LINGUAS" >&6
b1ef404e 12850
12851
12852 DATADIRNAME=share
12853
12854 INSTOBJEXT=.mo
12855
12856 GENCAT=gencat
12857
12858 CATOBJEXT=.gmo
12859
12860fi
071cd279 12861
c6976b58 12862# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12863# -liconv on the link line twice.
12864case "$LIBINTL" in *$LIBICONV*)
12865 LIBICONV= ;;
12866esac
c5ab9ed2 12867
0713dc29 12868# Check whether --enable-secureplt or --disable-secureplt was given.
197f58fa 12869if test "${enable_secureplt+set}" = set; then
0713dc29 12870 enableval="$enable_secureplt"
197f58fa 12871
0713dc29 12872fi;
197f58fa 12873
c6976b58 12874# Windows32 Registry support for specifying GCC installation paths.
0713dc29 12875# Check whether --enable-win32-registry or --disable-win32-registry was given.
c6976b58 12876if test "${enable_win32_registry+set}" = set; then
0713dc29 12877 enableval="$enable_win32_registry"
c5ab9ed2 12878
0713dc29 12879fi;
6a8964db 12880
1af67e62 12881case $host_os in
12882 win32 | pe | cygwin* | mingw32* | uwin*)
12883 if test "x$enable_win32_registry" != xno; then
0713dc29 12884 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
12885echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
6a8964db 12886if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12887 echo $ECHO_N "(cached) $ECHO_C" >&6
12888else
12889 ac_func_search_save_LIBS=$LIBS
0713dc29 12890ac_cv_search_RegOpenKeyExA=no
6a8964db 12891cat >conftest.$ac_ext <<_ACEOF
6a8964db 12892/* confdefs.h. */
12893_ACEOF
12894cat confdefs.h >>conftest.$ac_ext
12895cat >>conftest.$ac_ext <<_ACEOF
12896/* end confdefs.h. */
071cd279 12897
0713dc29 12898/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 12899#ifdef __cplusplus
12900extern "C"
12901#endif
0713dc29 12902/* We use char because int might match the return type of a gcc2
12903 builtin and then its argument prototype would still apply. */
6a8964db 12904char RegOpenKeyExA ();
12905int
12906main ()
12907{
0713dc29 12908RegOpenKeyExA ();
6a8964db 12909 ;
12910 return 0;
12911}
12912_ACEOF
0713dc29 12913rm -f conftest.$ac_objext conftest$ac_exeext
12914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12915 (eval $ac_link) 2>conftest.er1
6a8964db 12916 ac_status=$?
9ebd0bb2 12917 grep -v '^ *+' conftest.er1 >conftest.err
12918 rm -f conftest.er1
12919 cat conftest.err >&5
6a8964db 12920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12921 (exit $ac_status); } &&
0713dc29 12922 { ac_try='test -z "$ac_c_werror_flag"
12923 || test ! -s conftest.err'
12924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12925 (eval $ac_try) 2>&5
9ebd0bb2 12926 ac_status=$?
12927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12928 (exit $ac_status); }; } &&
12929 { ac_try='test -s conftest$ac_exeext'
0713dc29 12930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12931 (eval $ac_try) 2>&5
6a8964db 12932 ac_status=$?
12933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12934 (exit $ac_status); }; }; then
0713dc29 12935 ac_cv_search_RegOpenKeyExA="none required"
be2828ce 12936else
6a8964db 12937 echo "$as_me: failed program was:" >&5
12938sed 's/^/| /' conftest.$ac_ext >&5
12939
9af7c2e2 12940fi
0713dc29 12941rm -f conftest.err conftest.$ac_objext \
12942 conftest$ac_exeext conftest.$ac_ext
12943if test "$ac_cv_search_RegOpenKeyExA" = no; then
12944 for ac_lib in advapi32; do
12945 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12946 cat >conftest.$ac_ext <<_ACEOF
12947/* confdefs.h. */
6a8964db 12948_ACEOF
0713dc29 12949cat confdefs.h >>conftest.$ac_ext
12950cat >>conftest.$ac_ext <<_ACEOF
12951/* end confdefs.h. */
c9e1a048 12952
0713dc29 12953/* Override any gcc2 internal prototype to avoid an error. */
12954#ifdef __cplusplus
12955extern "C"
12956#endif
12957/* We use char because int might match the return type of a gcc2
12958 builtin and then its argument prototype would still apply. */
12959char RegOpenKeyExA ();
12960int
12961main ()
12962{
12963RegOpenKeyExA ();
12964 ;
12965 return 0;
12966}
12967_ACEOF
12968rm -f conftest.$ac_objext conftest$ac_exeext
12969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12970 (eval $ac_link) 2>conftest.er1
12971 ac_status=$?
12972 grep -v '^ *+' conftest.er1 >conftest.err
12973 rm -f conftest.er1
12974 cat conftest.err >&5
12975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12976 (exit $ac_status); } &&
12977 { ac_try='test -z "$ac_c_werror_flag"
12978 || test ! -s conftest.err'
12979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12980 (eval $ac_try) 2>&5
12981 ac_status=$?
12982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12983 (exit $ac_status); }; } &&
12984 { ac_try='test -s conftest$ac_exeext'
12985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12986 (eval $ac_try) 2>&5
12987 ac_status=$?
12988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12989 (exit $ac_status); }; }; then
12990 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
12991break
12992else
12993 echo "$as_me: failed program was:" >&5
12994sed 's/^/| /' conftest.$ac_ext >&5
12995
12996fi
12997rm -f conftest.err conftest.$ac_objext \
12998 conftest$ac_exeext conftest.$ac_ext
12999 done
13000fi
13001LIBS=$ac_func_search_save_LIBS
13002fi
13003echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
13004echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
13005if test "$ac_cv_search_RegOpenKeyExA" != no; then
13006 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
13007
13008else
13009 enable_win32_registry=no
13010fi
13011
13012 fi
13013
13014 if test "x$enable_win32_registry" != xno; then
13015
13016cat >>confdefs.h <<\_ACEOF
13017#define ENABLE_WIN32_REGISTRY 1
13018_ACEOF
13019
13020
13021 if test "x$enable_win32_registry" != xyes \
13022 && test "x$enable_win32_registry" != x; then
13023
13024cat >>confdefs.h <<_ACEOF
13025#define WIN32_REGISTRY_KEY "$enable_win32_registry"
13026_ACEOF
13027
13028 fi
13029 fi
13030 ;;
13031esac
be2828ce 13032
c6976b58 13033# Get an absolute path to the GCC top-level source directory
13034holddir=`${PWDCMD-pwd}`
13035cd $srcdir
13036topdir=`${PWDCMD-pwd}`
13037cd $holddir
be2828ce 13038
c6976b58 13039# Conditionalize the makefile for this host machine.
a455468e 13040xmake_file=
2e222ce5 13041for f in ${host_xmake_file}
c6976b58 13042do
13043 if test -f ${srcdir}/config/$f
13044 then
a455468e 13045 xmake_file="${xmake_file} \$(srcdir)/config/$f"
c6976b58 13046 fi
13047done
9af7c2e2 13048
c6976b58 13049# Conditionalize the makefile for this target machine.
a455468e 13050tmake_file_=
2e222ce5 13051for f in ${tmake_file}
c6976b58 13052do
13053 if test -f ${srcdir}/config/$f
13054 then
a455468e 13055 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
c6976b58 13056 fi
13057done
a455468e 13058tmake_file="${tmake_file_}"
778fc1c8 13059
be2828ce 13060# If the host doesn't support symlinks, modify CC in
13061# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
13062# Otherwise, we can use "CC=$(CC)".
13063rm -f symtest.tem
26be379c 13064case "$LN_S" in
13065 *-s*)
13066 cc_set_by_configure="\$(CC)"
13067 quoted_cc_set_by_configure="\$(CC)"
13068 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
13069 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
13070 ;;
13071 *)
13072 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
13073 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
13074 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
13075 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
13076 ;;
13077esac
be2828ce 13078
a136b23d 13079# This is a terrible hack which will go away some day.
13080host_cc_for_libada=${CC}
3e934a80 13081
13082
be2828ce 13083out_object_file=`basename $out_file .c`.o
13084
ff05e09e 13085tm_file_list="options.h"
13086tm_include_list="options.h"
be2828ce 13087for f in $tm_file; do
de5102fe 13088 case $f in
673b6e5a 13089 defaults.h )
4dcab8b7 13090 tm_file_list="${tm_file_list} \$(srcdir)/$f"
13091 tm_include_list="${tm_include_list} $f"
13092 ;;
13093 * )
13094 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
13095 tm_include_list="${tm_include_list} config/$f"
13096 ;;
de5102fe 13097 esac
be2828ce 13098done
13099
83b8e55b 13100tm_p_file_list=
4dcab8b7 13101tm_p_include_list=
83b8e55b 13102for f in $tm_p_file; do
805e22b2 13103 case $f in
13104 tm-preds.h )
4dcab8b7 13105 tm_p_file_list="${tm_p_file_list} $f"
13106 tm_p_include_list="${tm_p_include_list} $f"
13107 ;;
13108 * )
13109 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
13110 tm_p_include_list="${tm_p_include_list} config/$f"
13111 esac
13112done
13113
13114xm_file_list=
13115xm_include_list=
13116for f in $xm_file; do
13117 case $f in
13118 ansidecl.h )
13119 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
13120 xm_include_list="${xm_include_list} $f"
13121 ;;
13122 auto-host.h )
13123 xm_file_list="${xm_file_list} $f"
13124 xm_include_list="${xm_include_list} $f"
13125 ;;
13126 * )
13127 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
13128 xm_include_list="${xm_include_list} config/$f"
13129 ;;
805e22b2 13130 esac
83b8e55b 13131done
13132
be2828ce 13133host_xm_file_list=
4dcab8b7 13134host_xm_include_list=
be2828ce 13135for f in $host_xm_file; do
de5102fe 13136 case $f in
673b6e5a 13137 ansidecl.h )
4dcab8b7 13138 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
13139 host_xm_include_list="${host_xm_include_list} $f"
13140 ;;
1f3233d1 13141 auto-host.h )
4dcab8b7 13142 host_xm_file_list="${host_xm_file_list} $f"
13143 host_xm_include_list="${host_xm_include_list} $f"
13144 ;;
13145 * )
13146 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
13147 host_xm_include_list="${host_xm_include_list} config/$f"
13148 ;;
de5102fe 13149 esac
be2828ce 13150done
13151
13152build_xm_file_list=
13153for f in $build_xm_file; do
de5102fe 13154 case $f in
673b6e5a 13155 ansidecl.h )
4dcab8b7 13156 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
13157 build_xm_include_list="${build_xm_include_list} $f"
13158 ;;
1f3233d1 13159 auto-build.h | auto-host.h )
4dcab8b7 13160 build_xm_file_list="${build_xm_file_list} $f"
13161 build_xm_include_list="${build_xm_include_list} $f"
13162 ;;
13163 * )
13164 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
13165 build_xm_include_list="${build_xm_include_list} config/$f"
13166 ;;
de5102fe 13167 esac
be2828ce 13168done
13169
29d774d0 13170# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
13171# cross-compiler which does not use the native headers and libraries.
0fc07c25 13172# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
6a8964db 13173CROSS=
13174ALL=all.internal
13175SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
5e368ffe 13176
13177if test "x$with_build_sysroot" != x; then
13178 build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)'
13179else
13180 # This value is used, even on a native system, because
13181 # CROSS_SYSTEM_HEADER_DIR is just
13182 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
13183 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
13184fi
13185
be2828ce 13186if test x$host != x$target
13187then
29d774d0 13188 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
0fc07c25 13189 ALL=all.cross
a99be165 13190 SYSTEM_HEADER_DIR=$build_system_header_dir
4ae4e5e8 13191 case "$host","$target" in
62cb8057 13192 # Darwin crosses can use the host system's libraries and headers,
13193 # because of the fat library support. Of course, it must be the
13194 # same version of Darwin on both sides. Allow the user to
13195 # just say --target=foo-darwin without a version number to mean
13196 # "the version on this system".
13197 *-*-darwin*,*-*-darwin*)
13198 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
13199 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
13200 if test $hostos = $targetos -o $targetos = darwin ; then
13201 CROSS=
13202 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
13203 with_headers=yes
13204 fi
13205 ;;
13206
4ae4e5e8 13207 i?86-*-*,x86_64-*-* \
13208 | powerpc*-*-*,powerpc64*-*-*)
13209 CROSS="$CROSS -DNATIVE_CROSS" ;;
13210 esac
e81222a4 13211elif test "x$TARGET_SYSTEM_ROOT" != x; then
5e368ffe 13212 SYSTEM_HEADER_DIR=$build_system_header_dir
be2828ce 13213fi
13214
81aabcf8 13215# If this is a cross-compiler that does not
13216# have its own set of headers then define
13217# inhibit_libc
13218
3caddd4e 13219# If this is using newlib, without having the headers available now,
13220# then define inhibit_libc in LIBGCC2_CFLAGS.
c872ef71 13221# This prevents libgcc2 from containing any code which requires libc
13222# support.
a99be165 13223inhibit_libc=false
3caddd4e 13224if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
13225 test x$with_newlib = xyes ; } &&
9ad4b12b 13226 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
a99be165 13227 inhibit_libc=true
81aabcf8 13228fi
13229
13230
0fc07c25 13231# When building gcc with a cross-compiler, we need to adjust things so
13232# that the generator programs are still built with the native compiler.
13233# Also, we cannot run fixincludes or fix-header.
0fc07c25 13234
13235# These are the normal (build=host) settings:
6a8964db 13236CC_FOR_BUILD='$(CC)'
13237BUILD_CFLAGS='$(ALL_CFLAGS)'
6a8964db 13238STMP_FIXINC=stmp-fixinc
2333aa54 13239
13240# Possibly disable fixproto, on a per-target basis.
13241case ${use_fixproto} in
13242 no)
13243 STMP_FIXPROTO=
13244 ;;
13245 yes)
13246 STMP_FIXPROTO=stmp-fixproto
13247 ;;
13248esac
13249
0fc07c25 13250
c19ee476 13251# And these apply if build != host, or we are generating coverage data
13252if test x$build != x$host || test "x$coverage_flags" != x
be2828ce 13253then
4a867005 13254 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
0fc07c25 13255
e81222a4 13256 if test "x$TARGET_SYSTEM_ROOT" = x; then
8f4ab70b 13257 if test "x$STMP_FIXPROTO" != x; then
0abf128a 13258 STMP_FIXPROTO=stmp-install-fixproto
13259 fi
e81222a4 13260 fi
be2828ce 13261fi
13262
13263# Expand extra_headers to include complete path.
13264# This substitutes for lots of t-* files.
13265extra_headers_list=
a78cd2c1 13266# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
13267for file in ${extra_headers} ; do
13268 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
13269done
be2828ce 13270
e08c7853 13271# Define collect2 in Makefile.
13272case $host_can_use_collect2 in
13273 no) collect2= ;;
13274 *) collect2='collect2$(exeext)' ;;
13275esac
13276
13277
be2828ce 13278# Add a definition of USE_COLLECT2 if system wants one.
7349ace9 13279case $use_collect2 in
13280 no) use_collect2= ;;
13281 "") ;;
6a8964db 13282 *)
7349ace9 13283 host_xm_defines="${host_xm_defines} USE_COLLECT2"
13284 xm_defines="${xm_defines} USE_COLLECT2"
e08c7853 13285 case $host_can_use_collect2 in
13286 no)
13287 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
13288echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
13289 { (exit 1); exit 1; }; }
13290 ;;
13291 esac
7349ace9 13292 ;;
13293esac
be2828ce 13294
d976f534 13295# ---------------------------
13296# Assembler & linker features
13297# ---------------------------
13298
d2aaa43f 13299# Identify the assembler which will work hand-in-glove with the newly
13300# built GCC, so that we can examine its features. This is the assembler
13301# which will be driven by the driver program.
13302#
13303# If build != host, and we aren't building gas in-tree, we identify a
13304# build->target assembler and hope that it will have the same features
13305# as the host->target assembler we'll be using.
398f3874 13306gcc_cv_gas_major_version=
13307gcc_cv_gas_minor_version=
be2828ce 13308gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
c47832b1 13309
13310if test "${gcc_cv_as+set}" = set; then
13311 :
13312else
13313
be2828ce 13314if test -x "$DEFAULT_ASSEMBLER"; then
13315 gcc_cv_as="$DEFAULT_ASSEMBLER"
7349ace9 13316elif test -f $gcc_cv_as_gas_srcdir/configure.in \
58220290 13317 && test -f ../gas/Makefile \
13318 && test x$build = x$host; then
c47832b1 13319 gcc_cv_as=../gas/as-new$build_exeext
13320elif test -x as$build_exeext; then
13321 # Build using assembler in the current directory.
13322 gcc_cv_as=./as$build_exeext
13323elif test -x $AS_FOR_TARGET; then
13324 gcc_cv_as="$AS_FOR_TARGET"
13325else
13326 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
13327set dummy $AS_FOR_TARGET; ac_word=$2
0713dc29 13328echo "$as_me:$LINENO: checking for $ac_word" >&5
13329echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c47832b1 13330if test "${ac_cv_path_gcc_cv_as+set}" = set; then
13331 echo $ECHO_N "(cached) $ECHO_C" >&6
13332else
13333 case $gcc_cv_as in
13334 [\\/]* | ?:[\\/]*)
13335 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
13336 ;;
13337 *)
13338 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13339for as_dir in $PATH
13340do
13341 IFS=$as_save_IFS
13342 test -z "$as_dir" && as_dir=.
13343 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 13344 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c47832b1 13345 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
13346 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13347 break 2
13348 fi
13349done
13350done
13351
13352 ;;
13353esac
13354fi
13355gcc_cv_as=$ac_cv_path_gcc_cv_as
0713dc29 13356
c47832b1 13357if test -n "$gcc_cv_as"; then
0713dc29 13358 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13359echo "${ECHO_T}$gcc_cv_as" >&6
c47832b1 13360else
0713dc29 13361 echo "$as_me:$LINENO: result: no" >&5
13362echo "${ECHO_T}no" >&6
c47832b1 13363fi
13364
13365fi
13366fi
13367
13368
13369ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
13370
13371
0713dc29 13372echo "$as_me:$LINENO: checking what assembler to use" >&5
13373echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
c47832b1 13374if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
58220290 13375 # Single tree build which includes gas. We want to prefer it
13376 # over whatever linker top-level may have detected, since
13377 # we'll use what we're building after installation anyway.
0713dc29 13378 echo "$as_me:$LINENO: result: newly built gas" >&5
13379echo "${ECHO_T}newly built gas" >&6
667fe30b 13380 in_tree_gas=yes
13381 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
13382for f in $gcc_cv_as_bfd_srcdir/configure \
13383 $gcc_cv_as_gas_srcdir/configure \
13384 $gcc_cv_as_gas_srcdir/configure.in \
13385 $gcc_cv_as_gas_srcdir/Makefile.in ; do
78dde42d 13386 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
667fe30b 13387 if test x$gcc_cv_gas_version != x; then
13388 break
13389 fi
13390done
13391gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
13392gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13393gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
8d6083e4 13394case $gcc_cv_gas_patch_version in
13395 "") gcc_cv_gas_patch_version="0" ;;
13396esac
6d6c1801 13397gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
13398 + $gcc_cv_gas_minor_version \) \* 1000 \
13399 + $gcc_cv_gas_patch_version`
667fe30b 13400
0dac358a 13401 in_tree_gas_is_elf=no
13402 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
13403 || (grep 'obj_format = multi' ../gas/Makefile \
13404 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
13405 then
13406 in_tree_gas_is_elf=yes
13407 fi
c47832b1 13408else
0713dc29 13409 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13410echo "${ECHO_T}$gcc_cv_as" >&6
c47832b1 13411 in_tree_gas=no
398f3874 13412fi
3245cd4f 13413
c47832b1 13414# Identify the linker which will work hand-in-glove with the newly
13415# built GCC, so that we can examine its features. This is the linker
13416# which will be driven by the driver program.
f32e3360 13417#
c47832b1 13418# If build != host, and we aren't building gas in-tree, we identify a
13419# build->target linker and hope that it will have the same features
13420# as the host->target linker we'll be using.
13421gcc_cv_gld_major_version=
13422gcc_cv_gld_minor_version=
13423gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
13424gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
f32e3360 13425
c47832b1 13426if test "${gcc_cv_ld+set}" = set; then
13427 :
f32e3360 13428else
f32e3360 13429
c47832b1 13430if test -x "$DEFAULT_LINKER"; then
13431 gcc_cv_ld="$DEFAULT_LINKER"
13432elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
13433 && test -f ../ld/Makefile \
13434 && test x$build = x$host; then
13435 gcc_cv_ld=../ld/ld-new$build_exeext
13436elif test -x collect-ld$build_exeext; then
13437 # Build using linker in the current directory.
13438 gcc_cv_ld=./collect-ld$build_exeext
13439elif test -x $LD_FOR_TARGET; then
13440 gcc_cv_ld="$LD_FOR_TARGET"
13441else
13442 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
13443set dummy $LD_FOR_TARGET; ac_word=$2
0713dc29 13444echo "$as_me:$LINENO: checking for $ac_word" >&5
13445echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c47832b1 13446if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
ae74ffb7 13447 echo $ECHO_N "(cached) $ECHO_C" >&6
13448else
c47832b1 13449 case $gcc_cv_ld in
ae74ffb7 13450 [\\/]* | ?:[\\/]*)
c47832b1 13451 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
ae74ffb7 13452 ;;
13453 *)
13454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13455for as_dir in $PATH
13456do
13457 IFS=$as_save_IFS
13458 test -z "$as_dir" && as_dir=.
13459 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 13460 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c47832b1 13461 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
ae74ffb7 13462 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13463 break 2
13464 fi
13465done
13466done
13467
13468 ;;
13469esac
13470fi
c47832b1 13471gcc_cv_ld=$ac_cv_path_gcc_cv_ld
0713dc29 13472
c47832b1 13473if test -n "$gcc_cv_ld"; then
0713dc29 13474 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13475echo "${ECHO_T}$gcc_cv_ld" >&6
ae74ffb7 13476else
0713dc29 13477 echo "$as_me:$LINENO: result: no" >&5
13478echo "${ECHO_T}no" >&6
ae74ffb7 13479fi
13480
13481fi
c47832b1 13482fi
13483
13484
13485ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
13486
13487
0713dc29 13488echo "$as_me:$LINENO: checking what linker to use" >&5
13489echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
c47832b1 13490if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
13491 # Single tree build which includes ld. We want to prefer it
13492 # over whatever linker top-level may have detected, since
13493 # we'll use what we're building after installation anyway.
0713dc29 13494 echo "$as_me:$LINENO: result: newly built ld" >&5
13495echo "${ECHO_T}newly built ld" >&6
c47832b1 13496 in_tree_ld=yes
13497 in_tree_ld_is_elf=no
13498 if (grep 'EMUL = .*elf' ../ld/Makefile \
13499 || grep 'EMUL = .*linux' ../ld/Makefile \
13500 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
13501 in_tree_ld_is_elf=yes
13502 fi
13503 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
13504 do
13505 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
13506 if test x$gcc_cv_gld_version != x; then
13507 break
13508 fi
13509 done
13510 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
13511 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13512else
0713dc29 13513 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13514echo "${ECHO_T}$gcc_cv_ld" >&6
c47832b1 13515 in_tree_ld=no
13516fi
13517
13518# Figure out what nm we will be using.
13519gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
13520if test "${gcc_cv_nm+set}" = set; then
13521 :
13522else
13523
13524if test -f $gcc_cv_binutils_srcdir/configure.in \
13648950 13525 && test -f ../binutils/Makefile \
13526 && test x$build = x$host; then
c47832b1 13527 gcc_cv_nm=../binutils/nm-new$build_exeext
13528elif test -x nm$build_exeext; then
13529 gcc_cv_nm=./nm$build_exeext
13530elif test -x $NM_FOR_TARGET; then
13531 gcc_cv_nm="$NM_FOR_TARGET"
13532else
13533 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
13534set dummy $NM_FOR_TARGET; ac_word=$2
0713dc29 13535echo "$as_me:$LINENO: checking for $ac_word" >&5
13536echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c47832b1 13537if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
ae74ffb7 13538 echo $ECHO_N "(cached) $ECHO_C" >&6
13539else
c47832b1 13540 case $gcc_cv_nm in
ae74ffb7 13541 [\\/]* | ?:[\\/]*)
c47832b1 13542 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
ae74ffb7 13543 ;;
13544 *)
13545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13546for as_dir in $PATH
13547do
13548 IFS=$as_save_IFS
13549 test -z "$as_dir" && as_dir=.
13550 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 13551 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c47832b1 13552 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
ae74ffb7 13553 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13554 break 2
13555 fi
13556done
13557done
13558
13559 ;;
13560esac
13561fi
c47832b1 13562gcc_cv_nm=$ac_cv_path_gcc_cv_nm
0713dc29 13563
c47832b1 13564if test -n "$gcc_cv_nm"; then
0713dc29 13565 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13566echo "${ECHO_T}$gcc_cv_nm" >&6
ae74ffb7 13567else
0713dc29 13568 echo "$as_me:$LINENO: result: no" >&5
13569echo "${ECHO_T}no" >&6
ae74ffb7 13570fi
13571
13572fi
c47832b1 13573fi
ae74ffb7 13574
c47832b1 13575
0713dc29 13576echo "$as_me:$LINENO: checking what nm to use" >&5
13577echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
c47832b1 13578if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
13579 # Single tree build which includes binutils.
0713dc29 13580 echo "$as_me:$LINENO: result: newly built nm" >&5
13581echo "${ECHO_T}newly built nm" >&6
c47832b1 13582 in_tree_nm=yes
13583else
0713dc29 13584 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13585echo "${ECHO_T}$gcc_cv_nm" >&6
c47832b1 13586 in_tree_nm=no
13587fi
13588
13589ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
13590
13591
13592# Figure out what objdump we will be using.
13593if test "${gcc_cv_objdump+set}" = set; then
13594 :
13595else
13596
13597if test -f $gcc_cv_binutils_srcdir/configure.in \
13648950 13598 && test -f ../binutils/Makefile \
13599 && test x$build = x$host; then
c47832b1 13600 # Single tree build which includes binutils.
13601 gcc_cv_objdump=../binutils/objdump$build_exeext
13602elif test -x objdump$build_exeext; then
13603 gcc_cv_objdump=./objdump$build_exeext
13604elif test -x $OBJDUMP_FOR_TARGET; then
13605 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
13606else
13607 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
13608set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
0713dc29 13609echo "$as_me:$LINENO: checking for $ac_word" >&5
13610echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c47832b1 13611if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
f32e3360 13612 echo $ECHO_N "(cached) $ECHO_C" >&6
13613else
c47832b1 13614 case $gcc_cv_objdump in
f32e3360 13615 [\\/]* | ?:[\\/]*)
c47832b1 13616 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
f32e3360 13617 ;;
13618 *)
13619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
c47832b1 13620for as_dir in $PATH
f32e3360 13621do
13622 IFS=$as_save_IFS
13623 test -z "$as_dir" && as_dir=.
13624 for ac_exec_ext in '' $ac_executable_extensions; do
0713dc29 13625 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c47832b1 13626 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
f32e3360 13627 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13628 break 2
13629 fi
13630done
13631done
07d1fecc 13632
f32e3360 13633 ;;
13634esac
13635fi
c47832b1 13636gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
0713dc29 13637
c47832b1 13638if test -n "$gcc_cv_objdump"; then
0713dc29 13639 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13640echo "${ECHO_T}$gcc_cv_objdump" >&6
f32e3360 13641else
0713dc29 13642 echo "$as_me:$LINENO: result: no" >&5
13643echo "${ECHO_T}no" >&6
f32e3360 13644fi
13645
c47832b1 13646fi
13647fi
f32e3360 13648
c47832b1 13649
0713dc29 13650echo "$as_me:$LINENO: checking what objdump to use" >&5
13651echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
c47832b1 13652if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
13653 # Single tree build which includes binutils.
0713dc29 13654 echo "$as_me:$LINENO: result: newly built objdump" >&5
13655echo "${ECHO_T}newly built objdump" >&6
c47832b1 13656elif test x$gcc_cv_objdump = x; then
0713dc29 13657 echo "$as_me:$LINENO: result: not found" >&5
13658echo "${ECHO_T}not found" >&6
c47832b1 13659else
0713dc29 13660 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13661echo "${ECHO_T}$gcc_cv_objdump" >&6
f6cc6524 13662fi
74e387fc 13663
398f3874 13664# Figure out what assembler alignment features are present.
0713dc29 13665echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13666echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
6a8964db 13667if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13668 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 13669else
13670 gcc_cv_as_balign_and_p2align=no
13671 if test $in_tree_gas = yes; then
13672 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13673 then gcc_cv_as_balign_and_p2align=yes
13674fi
13675 elif test x$gcc_cv_as != x; then
c9cd172c 13676 echo '.balign 4
6d6c1801 13677.p2align 2' > conftest.s
6a8964db 13678 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13680 (eval $ac_try) 2>&5
13681 ac_status=$?
13682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13683 (exit $ac_status); }; }
6d6c1801 13684 then
13685 gcc_cv_as_balign_and_p2align=yes
13686 else
13687 echo "configure: failed program was" >&5
13688 cat conftest.s >&5
13689 fi
13690 rm -f conftest.o conftest.s
13691 fi
13692fi
0713dc29 13693echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13694echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
12b432e0 13695if test $gcc_cv_as_balign_and_p2align = yes; then
6a8964db 13696
13697cat >>confdefs.h <<\_ACEOF
398f3874 13698#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6a8964db 13699_ACEOF
398f3874 13700
667fe30b 13701fi
13702
0713dc29 13703echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13704echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
6a8964db 13705if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13706 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 13707else
13708 gcc_cv_as_max_skip_p2align=no
13709 if test $in_tree_gas = yes; then
13710 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13711 then gcc_cv_as_max_skip_p2align=yes
13712fi
13713 elif test x$gcc_cv_as != x; then
c9cd172c 13714 echo '.p2align 4,,7' > conftest.s
6a8964db 13715 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13717 (eval $ac_try) 2>&5
13718 ac_status=$?
13719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13720 (exit $ac_status); }; }
6d6c1801 13721 then
13722 gcc_cv_as_max_skip_p2align=yes
13723 else
13724 echo "configure: failed program was" >&5
13725 cat conftest.s >&5
13726 fi
13727 rm -f conftest.o conftest.s
13728 fi
667fe30b 13729fi
0713dc29 13730echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13731echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
12b432e0 13732if test $gcc_cv_as_max_skip_p2align = yes; then
6a8964db 13733
13734cat >>confdefs.h <<\_ACEOF
3245cd4f 13735#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6a8964db 13736_ACEOF
3245cd4f 13737
3245cd4f 13738fi
667fe30b 13739
0713dc29 13740echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13741echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
6a8964db 13742if test "${gcc_cv_as_subsection_m1+set}" = set; then
13743 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 13744else
13745 gcc_cv_as_subsection_m1=no
13746 if test $in_tree_gas = yes; then
13747 if test $in_tree_gas_is_elf = yes \
13748 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13749 then gcc_cv_as_subsection_m1=yes
667fe30b 13750fi
6d6c1801 13751 elif test x$gcc_cv_as != x; then
c9cd172c 13752 echo 'conftest_label1: .word 0
b6d28b19 13753.subsection -1
13754conftest_label2: .word 0
6d6c1801 13755.previous' > conftest.s
6a8964db 13756 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13758 (eval $ac_try) 2>&5
13759 ac_status=$?
13760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13761 (exit $ac_status); }; }
6d6c1801 13762 then
13763 if test x$gcc_cv_nm != x; then
13764 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13765 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13766 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13767 then :
13768 else gcc_cv_as_subsection_m1=yes
13769 fi
13770 rm -f conftest.nm1 conftest.nm2
13771 fi
13772 else
13773 echo "configure: failed program was" >&5
13774 cat conftest.s >&5
13775 fi
13776 rm -f conftest.o conftest.s
13777 fi
398f3874 13778fi
0713dc29 13779echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13780echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
12b432e0 13781if test $gcc_cv_as_subsection_m1 = yes; then
6a8964db 13782
13783cat >>confdefs.h <<\_ACEOF
398f3874 13784#define HAVE_GAS_SUBSECTION_ORDERING 1
6a8964db 13785_ACEOF
398f3874 13786
b6d28b19 13787fi
667fe30b 13788
0713dc29 13789echo "$as_me:$LINENO: checking assembler for .weak" >&5
13790echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
6a8964db 13791if test "${gcc_cv_as_weak+set}" = set; then
13792 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 13793else
13794 gcc_cv_as_weak=no
13795 if test $in_tree_gas = yes; then
13796 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13797 then gcc_cv_as_weak=yes
667fe30b 13798fi
6d6c1801 13799 elif test x$gcc_cv_as != x; then
c9cd172c 13800 echo ' .weak foobar' > conftest.s
6a8964db 13801 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13803 (eval $ac_try) 2>&5
13804 ac_status=$?
13805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13806 (exit $ac_status); }; }
6d6c1801 13807 then
13808 gcc_cv_as_weak=yes
13809 else
13810 echo "configure: failed program was" >&5
13811 cat conftest.s >&5
13812 fi
13813 rm -f conftest.o conftest.s
13814 fi
398f3874 13815fi
0713dc29 13816echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13817echo "${ECHO_T}$gcc_cv_as_weak" >&6
12b432e0 13818if test $gcc_cv_as_weak = yes; then
6a8964db 13819
13820cat >>confdefs.h <<\_ACEOF
398f3874 13821#define HAVE_GAS_WEAK 1
6a8964db 13822_ACEOF
398f3874 13823
1a8c3b27 13824fi
667fe30b 13825
0713dc29 13826echo "$as_me:$LINENO: checking assembler for .weakref" >&5
13827echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
f4a30bd7 13828if test "${gcc_cv_as_weakref+set}" = set; then
13829 echo $ECHO_N "(cached) $ECHO_C" >&6
13830else
13831 gcc_cv_as_weakref=no
13832 if test $in_tree_gas = yes; then
13833 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
13834 then gcc_cv_as_weakref=yes
13835fi
13836 elif test x$gcc_cv_as != x; then
13837 echo ' .weakref foobar, barfnot' > conftest.s
13838 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13840 (eval $ac_try) 2>&5
13841 ac_status=$?
13842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13843 (exit $ac_status); }; }
13844 then
13845 gcc_cv_as_weakref=yes
13846 else
13847 echo "configure: failed program was" >&5
13848 cat conftest.s >&5
13849 fi
13850 rm -f conftest.o conftest.s
13851 fi
13852fi
0713dc29 13853echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
13854echo "${ECHO_T}$gcc_cv_as_weakref" >&6
f4a30bd7 13855if test $gcc_cv_as_weakref = yes; then
13856
13857cat >>confdefs.h <<\_ACEOF
13858#define HAVE_GAS_WEAKREF 1
13859_ACEOF
13860
13861fi
13862
0713dc29 13863echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13864echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
2455c36b 13865if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13866 echo $ECHO_N "(cached) $ECHO_C" >&6
13867else
13868 gcc_cv_as_nsubspa_comdat=no
13869 if test $in_tree_gas = yes; then
13870 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13871 then gcc_cv_as_nsubspa_comdat=yes
13872fi
13873 elif test x$gcc_cv_as != x; then
13874 echo ' .SPACE $TEXT$
13875 .NSUBSPA $CODE$,COMDAT' > conftest.s
13876 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13878 (eval $ac_try) 2>&5
13879 ac_status=$?
13880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13881 (exit $ac_status); }; }
13882 then
13883 gcc_cv_as_nsubspa_comdat=yes
13884 else
13885 echo "configure: failed program was" >&5
13886 cat conftest.s >&5
13887 fi
13888 rm -f conftest.o conftest.s
13889 fi
13890fi
0713dc29 13891echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13892echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
2455c36b 13893if test $gcc_cv_as_nsubspa_comdat = yes; then
13894
13895cat >>confdefs.h <<\_ACEOF
13896#define HAVE_GAS_NSUBSPA_COMDAT 1
13897_ACEOF
13898
13899fi
13900
6d6c1801 13901# .hidden needs to be supported in both the assembler and the linker,
13902# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13903# This is irritatingly difficult to feature test for; we have to check the
13904# date string after the version number. If we've got an in-tree
13905# ld, we don't know its patchlevel version, so we set the baseline at 2.13
13906# to be safe.
13907# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
0713dc29 13908echo "$as_me:$LINENO: checking assembler for .hidden" >&5
13909echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
6a8964db 13910if test "${gcc_cv_as_hidden+set}" = set; then
13911 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 13912else
13913 gcc_cv_as_hidden=no
13914 if test $in_tree_gas = yes; then
13915 if test $in_tree_gas_is_elf = yes \
13916 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
13917 then gcc_cv_as_hidden=yes
13918fi
13919 elif test x$gcc_cv_as != x; then
c9cd172c 13920 echo ' .hidden foobar
6d6c1801 13921foobar:' > conftest.s
6a8964db 13922 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13924 (eval $ac_try) 2>&5
13925 ac_status=$?
13926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13927 (exit $ac_status); }; }
6d6c1801 13928 then
13929 gcc_cv_as_hidden=yes
13930 else
13931 echo "configure: failed program was" >&5
13932 cat conftest.s >&5
13933 fi
13934 rm -f conftest.o conftest.s
13935 fi
13936fi
0713dc29 13937echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
13938echo "${ECHO_T}$gcc_cv_as_hidden" >&6
12b432e0 13939
667fe30b 13940
0713dc29 13941echo "$as_me:$LINENO: checking linker for .hidden support" >&5
13942echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
6a8964db 13943if test "${gcc_cv_ld_hidden+set}" = set; then
13944 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 13945else
13946 if test $in_tree_ld = yes ; then
13947 gcc_cv_ld_hidden=no
13948 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 \
13949 && test $in_tree_ld_is_elf = yes; then
13950 gcc_cv_ld_hidden=yes
13951 fi
13952else
13953 gcc_cv_ld_hidden=yes
43557a8f 13954 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
6d6c1801 13955 if echo "$ld_ver" | grep GNU > /dev/null; then
13956 ld_vers=`echo $ld_ver | sed -n \
13957 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13958 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13959 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13960 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13961 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
2593b9be 13962 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
ad6fbe2d 13963 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ -].*$,\1,p'`
6d6c1801 13964 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'`
2593b9be 13965 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
13966 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
13967 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
6d6c1801 13968 if test 0"$ld_date" -lt 20020404; then
13969 if test -n "$ld_date"; then
13970 # If there was date string, but was earlier than 2002-04-04, fail
13971 gcc_cv_ld_hidden=no
13972 elif test -z "$ld_vers"; then
13973 # If there was no date string nor ld version number, something is wrong
13974 gcc_cv_ld_hidden=no
13975 else
6d6c1801 13976 test -z "$ld_vers_patch" && ld_vers_patch=0
13977 if test "$ld_vers_major" -lt 2; then
13978 gcc_cv_ld_hidden=no
13979 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
13980 gcc_cv_ld_hidden="no"
13981 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
13982 gcc_cv_ld_hidden=no
a985a485 13983 fi
6d6c1801 13984 fi
61ab9ea9 13985 fi
6d6c1801 13986 else
6f8f5d6c 13987 case "${target}" in
ecb7c90c 13988 hppa64*-*-hpux* | ia64*-*-hpux*)
6f8f5d6c 13989 gcc_cv_ld_hidden=yes
13990 ;;
13991 *)
13992 gcc_cv_ld_hidden=no
13993 ;;
13994 esac
6d6c1801 13995 fi
13996fi
cec3745c 13997fi
0713dc29 13998echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
13999echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
6d6c1801 14000libgcc_visibility=no
667fe30b 14001
fcd42b1e 14002
bf4c475e 14003if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
6d6c1801 14004 libgcc_visibility=yes
6a8964db 14005
14006cat >>confdefs.h <<\_ACEOF
6d6c1801 14007#define HAVE_GAS_HIDDEN 1
6a8964db 14008_ACEOF
667fe30b 14009
14010fi
14011
6d6c1801 14012# Check if we have .[us]leb128, and support symbol arithmetic with it.
0713dc29 14013echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
14014echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
6a8964db 14015if test "${gcc_cv_as_leb128+set}" = set; then
14016 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 14017else
14018 gcc_cv_as_leb128=no
14019 if test $in_tree_gas = yes; then
14020 if test $in_tree_gas_is_elf = yes \
14021 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14022 then gcc_cv_as_leb128=yes
14023fi
14024 elif test x$gcc_cv_as != x; then
c9cd172c 14025 echo ' .data
37a2e188 14026 .uleb128 L2 - L1
14027L1:
14028 .uleb128 1280
14029 .sleb128 -1010
6d6c1801 14030L2:' > conftest.s
6a8964db 14031 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14033 (eval $ac_try) 2>&5
14034 ac_status=$?
14035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14036 (exit $ac_status); }; }
6d6c1801 14037 then
14038 # GAS versions before 2.11 do not support uleb128,
14039 # despite appearing to.
14040 # ??? There exists an elf-specific test that will crash
14041 # the assembler. Perhaps it's better to figure out whether
14042 # arbitrary sections are supported and try the test.
43557a8f 14043 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
6d6c1801 14044 if echo "$as_ver" | grep GNU > /dev/null; then
14045 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
14046 as_major=`echo $as_ver | sed 's/\..*//'`
14047 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
14048 if test $as_major -eq 2 && test $as_minor -lt 11
14049 then :
14050 else gcc_cv_as_leb128=yes
14051 fi
14052 fi
14053 else
14054 echo "configure: failed program was" >&5
14055 cat conftest.s >&5
14056 fi
14057 rm -f conftest.o conftest.s
14058 fi
37a2e188 14059fi
0713dc29 14060echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
14061echo "${ECHO_T}$gcc_cv_as_leb128" >&6
12b432e0 14062if test $gcc_cv_as_leb128 = yes; then
6a8964db 14063
14064cat >>confdefs.h <<\_ACEOF
37a2e188 14065#define HAVE_AS_LEB128 1
6a8964db 14066_ACEOF
37a2e188 14067
14068fi
667fe30b 14069
6d6c1801 14070# GAS versions up to and including 2.11.0 may mis-optimize
14071# .eh_frame data.
0713dc29 14072echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
14073echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
6a8964db 14074if test "${gcc_cv_as_eh_frame+set}" = set; then
14075 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 14076else
14077 gcc_cv_as_eh_frame=no
14078 if test $in_tree_gas = yes; then
14079 if test $in_tree_gas_is_elf = yes \
14080 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14081 then gcc_cv_as_eh_frame=yes
667fe30b 14082fi
6d6c1801 14083 elif test x$gcc_cv_as != x; then
c9cd172c 14084 echo ' .text
c3f311c4 14085.LFB1:
14086 .4byte 0
14087.L1:
14088 .4byte 0
14089.LFE1:
14090 .section .eh_frame,"aw",@progbits
14091__FRAME_BEGIN__:
14092 .4byte .LECIE1-.LSCIE1
14093.LSCIE1:
14094 .4byte 0x0
14095 .byte 0x1
14096 .ascii "z\0"
14097 .byte 0x1
14098 .byte 0x78
14099 .byte 0x1a
14100 .byte 0x0
14101 .byte 0x4
14102 .4byte 1
14103 .p2align 1
14104.LECIE1:
14105.LSFDE1:
14106 .4byte .LEFDE1-.LASFDE1
14107.LASFDE1:
14108 .4byte .LASFDE1-__FRAME_BEGIN__
14109 .4byte .LFB1
14110 .4byte .LFE1-.LFB1
14111 .byte 0x4
14112 .4byte .LFE1-.LFB1
14113 .byte 0x4
14114 .4byte .L1-.LFB1
6d6c1801 14115.LEFDE1:' > conftest.s
6a8964db 14116 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14118 (eval $ac_try) 2>&5
14119 ac_status=$?
14120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14121 (exit $ac_status); }; }
6d6c1801 14122 then
14123 cat > conftest.lit <<EOF
c3f311c4 14124 0000 10000000 00000000 017a0001 781a0004 .........z..x...
14125 0010 01000000 12000000 18000000 00000000 ................
9af7c2e2 14126 0020 08000000 04080000 0044 .........D
82ebecf9 14127EOF
6a8964db 14128cat > conftest.big <<EOF
82ebecf9 14129 0000 00000010 00000000 017a0001 781a0004 .........z..x...
14130 0010 00000001 00000012 00000018 00000000 ................
9af7c2e2 14131 0020 00000008 04000000 0844 .........D
c3f311c4 14132EOF
6d6c1801 14133 # If the assembler didn't choke, and we can objdump,
14134 # and we got the correct data, then succeed.
a9e7d751 14135 # The text in the here-document typically retains its unix-style line
14136 # endings, while the output of objdump will use host line endings.
14137 # Therefore, use diff -b for the comparisons.
6d6c1801 14138 if test x$gcc_cv_objdump != x \
14139 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
14140 | tail -3 > conftest.got \
a9e7d751 14141 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
14142 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
6d6c1801 14143 then
14144 gcc_cv_as_eh_frame=yes
6a8964db 14145 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
14146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14147 (eval $ac_try) 2>&5
14148 ac_status=$?
14149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14150 (exit $ac_status); }; }; then
6d6c1801 14151 gcc_cv_as_eh_frame=buggy
14152 else
14153 # Uh oh, what do we do now?
14154 gcc_cv_as_eh_frame=no
14155 fi
14156 else
14157 echo "configure: failed program was" >&5
14158 cat conftest.s >&5
14159 fi
14160 rm -f conftest.o conftest.s
14161 fi
c3f311c4 14162fi
0713dc29 14163echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
14164echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
667fe30b 14165
c9cd172c 14166
12b432e0 14167if test $gcc_cv_as_eh_frame = buggy; then
6a8964db 14168
14169cat >>confdefs.h <<\_ACEOF
6d6c1801 14170#define USE_AS_TRADITIONAL_FORMAT 1
6a8964db 14171_ACEOF
667fe30b 14172
14173fi
14174
0713dc29 14175echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14176echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
6a8964db 14177if test "${gcc_cv_as_shf_merge+set}" = set; then
14178 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 14179else
14180 gcc_cv_as_shf_merge=no
14181 if test $in_tree_gas = yes; then
14182 if test $in_tree_gas_is_elf = yes \
14183 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14184 then gcc_cv_as_shf_merge=yes
14185fi
14186 elif test x$gcc_cv_as != x; then
c9cd172c 14187 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
6a8964db 14188 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14190 (eval $ac_try) 2>&5
14191 ac_status=$?
14192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14193 (exit $ac_status); }; }
6d6c1801 14194 then
14195 gcc_cv_as_shf_merge=yes
14196 else
14197 echo "configure: failed program was" >&5
14198 cat conftest.s >&5
14199 fi
14200 rm -f conftest.o conftest.s
14201 fi
bb2821c0 14202fi
0713dc29 14203echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14204echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
6d6c1801 14205
537cd941 14206if test $gcc_cv_as_shf_merge = no; then
0713dc29 14207 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14208echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
537cd941 14209if test "${gcc_cv_as_shf_merge+set}" = set; then
14210 echo $ECHO_N "(cached) $ECHO_C" >&6
14211else
14212 gcc_cv_as_shf_merge=no
14213 if test $in_tree_gas = yes; then
14214 if test $in_tree_gas_is_elf = yes \
14215 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14216 then gcc_cv_as_shf_merge=yes
14217fi
14218 elif test x$gcc_cv_as != x; then
14219 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
14220 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14222 (eval $ac_try) 2>&5
14223 ac_status=$?
14224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14225 (exit $ac_status); }; }
14226 then
14227 gcc_cv_as_shf_merge=yes
14228 else
14229 echo "configure: failed program was" >&5
14230 cat conftest.s >&5
14231 fi
14232 rm -f conftest.o conftest.s
14233 fi
14234fi
0713dc29 14235echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14236echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
537cd941 14237
14238fi
2333aa54 14239
6a8964db 14240cat >>confdefs.h <<_ACEOF
2333aa54 14241#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
6a8964db 14242_ACEOF
bb2821c0 14243
bb2821c0 14244
0713dc29 14245echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14246echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
537cd941 14247if test "${gcc_cv_as_comdat_group+set}" = set; then
14248 echo $ECHO_N "(cached) $ECHO_C" >&6
14249else
14250 gcc_cv_as_comdat_group=no
14251 if test $in_tree_gas = yes; then
14252 if test $in_tree_gas_is_elf = yes \
2593b9be 14253 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
537cd941 14254 then gcc_cv_as_comdat_group=yes
14255fi
14256 elif test x$gcc_cv_as != x; then
14257 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
14258 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14260 (eval $ac_try) 2>&5
14261 ac_status=$?
14262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14263 (exit $ac_status); }; }
14264 then
14265 gcc_cv_as_comdat_group=yes
14266 else
14267 echo "configure: failed program was" >&5
14268 cat conftest.s >&5
14269 fi
14270 rm -f conftest.o conftest.s
14271 fi
14272fi
0713dc29 14273echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
14274echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
537cd941 14275
14276if test $gcc_cv_as_comdat_group = yes; then
14277 gcc_cv_as_comdat_group_percent=no
14278else
0713dc29 14279 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14280echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
537cd941 14281if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
14282 echo $ECHO_N "(cached) $ECHO_C" >&6
14283else
14284 gcc_cv_as_comdat_group_percent=no
14285 if test $in_tree_gas = yes; then
14286 if test $in_tree_gas_is_elf = yes \
2593b9be 14287 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
537cd941 14288 then gcc_cv_as_comdat_group_percent=yes
14289fi
14290 elif test x$gcc_cv_as != x; then
14291 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
14292 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14294 (eval $ac_try) 2>&5
14295 ac_status=$?
14296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14297 (exit $ac_status); }; }
14298 then
14299 gcc_cv_as_comdat_group_percent=yes
14300 else
14301 echo "configure: failed program was" >&5
14302 cat conftest.s >&5
14303 fi
14304 rm -f conftest.o conftest.s
14305 fi
14306fi
0713dc29 14307echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
14308echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
537cd941 14309
14310fi
2593b9be 14311if test $in_tree_ld != yes && test x"$ld_vers" != x; then
14312 comdat_group=yes
14313 if test 0"$ld_date" -lt 20050308; then
14314 if test -n "$ld_date"; then
14315 # If there was date string, but was earlier than 2005-03-08, fail
14316 comdat_group=no
14317 elif test "$ld_vers_major" -lt 2; then
14318 comdat_group=no
14319 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
14320 comdat_group=no
14321 fi
14322 fi
f3424fe6 14323else
14324 # assume linkers other than GNU ld don't support COMDAT group
14325 comdat_group=no
14326fi
14327if test $comdat_group = no; then
14328 gcc_cv_as_comdat_group=no
14329 gcc_cv_as_comdat_group_percent=no
2593b9be 14330fi
537cd941 14331
14332cat >>confdefs.h <<_ACEOF
2593b9be 14333#define HAVE_COMDAT_GROUP `if test $gcc_cv_as_comdat_group = yes || test $gcc_cv_as_comdat_group_percent = yes; then echo 1; else echo 0; fi`
537cd941 14334_ACEOF
14335
14336
6d6c1801 14337# Thread-local storage - the check is heavily parametrized.
2d6788fe 14338conftest_s=
14339tls_first_major=
14340tls_first_minor=
527d5be8 14341tls_as_opt=
2d6788fe 14342case "$target" in
5f7b9df8 14343 alpha*-*-*)
14344 conftest_s='
14345 .section ".tdata","awT",@progbits
14346foo: .long 25
14347 .text
14348 ldq $27,__tls_get_addr($29) !literal!1
14349 lda $16,foo($29) !tlsgd!1
14350 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
14351 ldq $27,__tls_get_addr($29) !literal!2
14352 lda $16,foo($29) !tlsldm!2
14353 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
14354 ldq $1,foo($29) !gotdtprel
14355 ldah $2,foo($29) !dtprelhi
14356 lda $3,foo($2) !dtprello
14357 lda $4,foo($29) !dtprel
14358 ldq $1,foo($29) !gottprel
14359 ldah $2,foo($29) !tprelhi
14360 lda $3,foo($2) !tprello
14361 lda $4,foo($29) !tprel'
14362 tls_first_major=2
14363 tls_first_minor=13
07a23b4e 14364 tls_as_opt=--fatal-warnings
5f7b9df8 14365 ;;
cfd199cb 14366 frv*-*-*)
14367 conftest_s='
14368 .section ".tdata","awT",@progbits
14369x: .long 25
14370 .text
14371 call #gettlsoff(x)'
14372 tls_first_major=2
14373 tls_first_minor=14
14374 ;;
716b2c5a 14375 hppa*-*-linux*)
14376 conftest_s='
14377t1: .reg %r20
14378t2: .reg %r21
14379gp: .reg %r19
14380 .section ".tdata","awT",@progbits
14381foo: .long 25
14382 .text
14383 .align 4
14384 addil LT%foo-$tls_gdidx$,gp
14385 ldo RT%foo-$tls_gdidx$(%r1),%arg0
14386 b __tls_get_addr
14387 nop
14388 addil LT%foo-$tls_ldidx$,gp
14389 b __tls_get_addr
14390 ldo RT%foo-$tls_ldidx$(%r1),%arg0
14391 addil LR%foo-$tls_dtpoff$,%ret0
14392 ldo RR%foo-$tls_dtpoff$(%r1),%t1
14393 mfctl %cr27,%t1
14394 addil LT%foo-$tls_ieoff$,gp
14395 ldw RT%foo-$tls_ieoff$(%r1),%t2
14396 add %t1,%t2,%t3
14397 mfctl %cr27,%t1
14398 addil LR%foo-$tls_leoff$,%t1
14399 ldo RR%foo-$tls_leoff$(%r1),%t2'
14400 tls_first_major=2
14401 tls_first_minor=15
14402 tls_as_opt=--fatal-warnings
14403 ;;
f655717d 14404 arm*-*-*)
14405 conftest_s='
14406 .section ".tdata","awT",%progbits
14407foo: .long 25
14408 .text
14409.word foo(gottpoff)
14410.word foo(tpoff)
14411.word foo(tlsgd)
14412.word foo(tlsldm)
14413.word foo(tlsldo)'
14414 tls_first_major=2
14415 tls_first_minor=17
14416 ;;
2d6788fe 14417 i[34567]86-*-*)
14418 conftest_s='
14419 .section ".tdata","awT",@progbits
14420foo: .long 25
14421 .text
14422 movl %gs:0, %eax
14423 leal foo@TLSGD(,%ebx,1), %eax
14424 leal foo@TLSLDM(%ebx), %eax
14425 leal foo@DTPOFF(%eax), %edx
14426 movl foo@GOTTPOFF(%ebx), %eax
14427 subl foo@GOTTPOFF(%ebx), %eax
29d8dd5c 14428 addl foo@GOTNTPOFF(%ebx), %eax
14429 movl foo@INDNTPOFF, %eax
2d6788fe 14430 movl $foo@TPOFF, %eax
14431 subl $foo@TPOFF, %eax
14432 leal foo@NTPOFF(%ecx), %eax'
14433 tls_first_major=2
29d8dd5c 14434 tls_first_minor=14
07a23b4e 14435 tls_as_opt=--fatal-warnings
29d8dd5c 14436 ;;
14437 x86_64-*-*)
14438 conftest_s='
14439 .section ".tdata","awT",@progbits
14440foo: .long 25
14441 .text
14442 movq %fs:0, %rax
14443 leaq foo@TLSGD(%rip), %rdi
14444 leaq foo@TLSLD(%rip), %rdi
14445 leaq foo@DTPOFF(%rax), %rdx
14446 movq foo@GOTTPOFF(%rip), %rax
14447 movq $foo@TPOFF, %rax'
14448 tls_first_major=2
14449 tls_first_minor=14
07a23b4e 14450 tls_as_opt=--fatal-warnings
2d6788fe 14451 ;;
c87e09ad 14452 ia64-*-*)
14453 conftest_s='
14454 .section ".tdata","awT",@progbits
14455foo: data8 25
14456 .text
14457 addl r16 = @ltoff(@dtpmod(foo#)), gp
14458 addl r17 = @ltoff(@dtprel(foo#)), gp
14459 addl r18 = @ltoff(@tprel(foo#)), gp
14460 addl r19 = @dtprel(foo#), gp
14461 adds r21 = @dtprel(foo#), r13
14462 movl r23 = @dtprel(foo#)
14463 addl r20 = @tprel(foo#), gp
14464 adds r22 = @tprel(foo#), r13
14465 movl r24 = @tprel(foo#)'
14466 tls_first_major=2
14467 tls_first_minor=13
07a23b4e 14468 tls_as_opt=--fatal-warnings
c87e09ad 14469 ;;
42bdde4b 14470 mips*-*-*)
14471 conftest_s='
14472 .section .tdata,"awT",@progbits
14473x:
14474 .word 2
14475 .text
14476 addiu $4, $28, %tlsgd(x)
14477 addiu $4, $28, %tlsldm(x)
14478 lui $4, %dtprel_hi(x)
14479 addiu $4, $4, %dtprel_lo(x)
14480 lw $4, %gottprel(x)($28)
14481 lui $4, %tprel_hi(x)
14482 addiu $4, $4, %tprel_lo(x)'
14483 tls_first_major=2
14484 tls_first_minor=16
14485 tls_as_opt='-32 --fatal-warnings'
14486 ;;
9b552c45 14487 powerpc-*-*)
14488 conftest_s='
14489 .section ".tdata","awT",@progbits
14490 .align 2
14491ld0: .space 4
14492ld1: .space 4
14493x1: .space 4
14494x2: .space 4
14495x3: .space 4
14496 .text
14497 addi 3,31,ld0@got@tlsgd
14498 bl __tls_get_addr
14499 addi 3,31,x1@got@tlsld
14500 bl __tls_get_addr
14501 addi 9,3,x1@dtprel
14502 addis 9,3,x2@dtprel@ha
14503 addi 9,9,x2@dtprel@l
14504 lwz 9,x3@got@tprel(31)
14505 add 9,9,x@tls
14506 addi 9,2,x1@tprel
14507 addis 9,2,x2@tprel@ha
14508 addi 9,9,x2@tprel@l'
14509 tls_first_major=2
14510 tls_first_minor=14
07a23b4e 14511 tls_as_opt="-a32 --fatal-warnings"
9b552c45 14512 ;;
14513 powerpc64-*-*)
14514 conftest_s='
14515 .section ".tdata","awT",@progbits
14516 .align 3
14517ld0: .space 8
14518ld1: .space 8
14519x1: .space 8
14520x2: .space 8
14521x3: .space 8
14522 .text
14523 addi 3,2,ld0@got@tlsgd
14524 bl .__tls_get_addr
14525 nop
14526 addi 3,2,ld1@toc
14527 bl .__tls_get_addr
14528 nop
14529 addi 3,2,x1@got@tlsld
14530 bl .__tls_get_addr
14531 nop
14532 addi 9,3,x1@dtprel
14533 bl .__tls_get_addr
14534 nop
14535 addis 9,3,x2@dtprel@ha
14536 addi 9,9,x2@dtprel@l
14537 bl .__tls_get_addr
14538 nop
14539 ld 9,x3@got@dtprel(2)
14540 add 9,9,3
14541 bl .__tls_get_addr
14542 nop'
14543 tls_first_major=2
14544 tls_first_minor=14
07a23b4e 14545 tls_as_opt="-a64 --fatal-warnings"
9b552c45 14546 ;;
be00aaa8 14547 s390-*-*)
14548 conftest_s='
14549 .section ".tdata","awT",@progbits
14550foo: .long 25
14551 .text
14552 .long foo@TLSGD
14553 .long foo@TLSLDM
14554 .long foo@DTPOFF
14555 .long foo@NTPOFF
14556 .long foo@GOTNTPOFF
14557 .long foo@INDNTPOFF
14558 l %r1,foo@GOTNTPOFF(%r12)
14559 l %r1,0(%r1):tls_load:foo
14560 bas %r14,0(%r1,%r13):tls_gdcall:foo
14561 bas %r14,0(%r1,%r13):tls_ldcall:foo'
14562 tls_first_major=2
14563 tls_first_minor=14
07a23b4e 14564 tls_as_opt="-m31 --fatal-warnings"
be00aaa8 14565 ;;
14566 s390x-*-*)
14567 conftest_s='
14568 .section ".tdata","awT",@progbits
14569foo: .long 25
14570 .text
14571 .quad foo@TLSGD
14572 .quad foo@TLSLDM
14573 .quad foo@DTPOFF
14574 .quad foo@NTPOFF
14575 .quad foo@GOTNTPOFF
14576 lg %r1,foo@GOTNTPOFF(%r12)
14577 larl %r1,foo@INDNTPOFF
14578 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
14579 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
14580 tls_first_major=2
14581 tls_first_minor=14
07a23b4e 14582 tls_as_opt="-m64 -Aesame --fatal-warnings"
be00aaa8 14583 ;;
ae852eea 14584 sh-*-* | sh[34]-*-*)
14585 conftest_s='
14586 .section ".tdata","awT",@progbits
14587foo: .long 25
14588 .text
14589 .long foo@TLSGD
14590 .long foo@TLSLDM
14591 .long foo@DTPOFF
14592 .long foo@GOTTPOFF
14593 .long foo@TPOFF'
14594 tls_first_major=2
14595 tls_first_minor=13
07a23b4e 14596 tls_as_opt=--fatal-warnings
ae852eea 14597 ;;
05b3a83f 14598 sparc*-*-*)
07a23b4e 14599 case "$target" in
43eca37c 14600 sparc*-sun-solaris2.[56789]*)
14601 # TLS was introduced in the Solaris 9 4/04 release but
14602 # we do not enable it by default on Solaris 9 either.
14603 if test "x$enable_tls" = xyes ; then
14604 on_solaris=yes
14605 else
14606 enable_tls=no;
14607 fi
14608 ;;
07a23b4e 14609 sparc*-sun-solaris2.*)
14610 on_solaris=yes
14611 ;;
14612 *)
14613 on_solaris=no
14614 ;;
14615 esac
14616 if test x$on_solaris = xyes && test x$gas_flag = xno; then
14617 conftest_s='
14618 .section ".tdata",#alloc,#write,#tls
14619foo: .long 25
14620 .text
14621 sethi %tgd_hi22(foo), %o0
14622 add %o0, %tgd_lo10(foo), %o1
14623 add %l7, %o1, %o0, %tgd_add(foo)
14624 call __tls_get_addr, %tgd_call(foo)
14625 sethi %tldm_hi22(foo), %l1
14626 add %l1, %tldm_lo10(foo), %l2
14627 add %l7, %l2, %o0, %tldm_add(foo)
14628 call __tls_get_addr, %tldm_call(foo)
14629 sethi %tldo_hix22(foo), %l3
14630 xor %l3, %tldo_lox10(foo), %l4
14631 add %o0, %l4, %l5, %tldo_add(foo)
14632 sethi %tie_hi22(foo), %o3
14633 add %o3, %tie_lo10(foo), %o3
14634 ld [%l7 + %o3], %o2, %tie_ld(foo)
14635 add %g7, %o2, %o4, %tie_add(foo)
14636 sethi %tle_hix22(foo), %l1
14637 xor %l1, %tle_lox10(foo), %o5
14638 ld [%g7 + %o5], %o1'
14639 tls_first_major=0
14640 tls_first_minor=0
14641 else
14642 conftest_s='
05b3a83f 14643 .section ".tdata","awT",@progbits
14644foo: .long 25
14645 .text
14646 sethi %tgd_hi22(foo), %o0
14647 add %o0, %tgd_lo10(foo), %o1
14648 add %l7, %o1, %o0, %tgd_add(foo)
14649 call __tls_get_addr, %tgd_call(foo)
14650 sethi %tldm_hi22(foo), %l1
14651 add %l1, %tldm_lo10(foo), %l2
14652 add %l7, %l2, %o0, %tldm_add(foo)
14653 call __tls_get_addr, %tldm_call(foo)
14654 sethi %tldo_hix22(foo), %l3
14655 xor %l3, %tldo_lox10(foo), %l4
14656 add %o0, %l4, %l5, %tldo_add(foo)
14657 sethi %tie_hi22(foo), %o3
14658 add %o3, %tie_lo10(foo), %o3
14659 ld [%l7 + %o3], %o2, %tie_ld(foo)
14660 add %g7, %o2, %o4, %tie_add(foo)
14661 sethi %tle_hix22(foo), %l1
14662 xor %l1, %tle_lox10(foo), %o5
14663 ld [%g7 + %o5], %o1'
14664 tls_first_major=2
14665 tls_first_minor=14
07a23b4e 14666 tls_as_opt="-32 --fatal-warnings"
14667 fi
05b3a83f 14668 ;;
2d6788fe 14669esac
c024e802 14670set_have_as_tls=no
14671if test "x$enable_tls" = xno ; then
14672 : # TLS explicitly disabled.
14673elif test "x$enable_tls" = xyes ; then
14674 set_have_as_tls=yes # TLS explicitly enabled.
14675elif test -z "$tls_first_major"; then
6d6c1801 14676 : # If we don't have a check, assume no support.
14677else
0713dc29 14678 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
14679echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
6a8964db 14680if test "${gcc_cv_as_tls+set}" = set; then
14681 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 14682else
14683 gcc_cv_as_tls=no
14684 if test $in_tree_gas = yes; then
14685 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
14686 then gcc_cv_as_tls=yes
667fe30b 14687fi
6d6c1801 14688 elif test x$gcc_cv_as != x; then
c9cd172c 14689 echo "$conftest_s" > conftest.s
07a23b4e 14690 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
6a8964db 14691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14692 (eval $ac_try) 2>&5
14693 ac_status=$?
14694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14695 (exit $ac_status); }; }
6d6c1801 14696 then
14697 gcc_cv_as_tls=yes
14698 else
14699 echo "configure: failed program was" >&5
14700 cat conftest.s >&5
14701 fi
14702 rm -f conftest.o conftest.s
2d6788fe 14703 fi
2d6788fe 14704fi
0713dc29 14705echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
14706echo "${ECHO_T}$gcc_cv_as_tls" >&6
12b432e0 14707if test $gcc_cv_as_tls = yes; then
c024e802 14708 set_have_as_tls=yes
14709fi
14710fi
14711if test $set_have_as_tls = yes ; then
6a8964db 14712
14713cat >>confdefs.h <<\_ACEOF
2d6788fe 14714#define HAVE_AS_TLS 1
6a8964db 14715_ACEOF
2d6788fe 14716
6d6c1801 14717fi
14718
14719# Target-specific assembler checks.
2d6788fe 14720
0713dc29 14721echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
14722echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
79f90e2b 14723gcc_cv_ld_static_dynamic=no
14724if test $in_tree_ld = yes ; then
14725 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
14726 gcc_cv_ld_static_dynamic=yes
14727 fi
14728elif test x$gcc_cv_ld != x; then
14729 # Check if linker supports -Bstatic/-Bdynamic option
14730 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
14731 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
14732 gcc_cv_ld_static_dynamic=yes
14733 fi
14734fi
14735if test x"$gcc_cv_ld_static_dynamic" = xyes; then
14736
14737cat >>confdefs.h <<\_ACEOF
14738#define HAVE_LD_STATIC_DYNAMIC 1
14739_ACEOF
14740
14741fi
0713dc29 14742echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14743echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
79f90e2b 14744
9c948bc2 14745if test x"$demangler_in_ld" = xyes; then
0713dc29 14746 echo "$as_me:$LINENO: checking linker --demangle support" >&5
14747echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
9c948bc2 14748 gcc_cv_ld_demangle=no
14749 if test $in_tree_ld = yes; then
14750 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 \
14751 gcc_cv_ld_demangle=yes
14752 fi
14753 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14754 # Check if the GNU linker supports --demangle option
14755 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14756 gcc_cv_ld_demangle=yes
14757 fi
14758 fi
14759 if test x"$gcc_cv_ld_demangle" = xyes; then
14760
14761cat >>confdefs.h <<\_ACEOF
14762#define HAVE_LD_DEMANGLE 1
14763_ACEOF
14764
14765 fi
0713dc29 14766 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14767echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
9c948bc2 14768fi
14769
8626dbb9 14770case "$target" in
14771 # All TARGET_ABI_OSF targets.
14772 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
0713dc29 14773 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14774echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
6a8964db 14775if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14776 echo $ECHO_N "(cached) $ECHO_C" >&6
8626dbb9 14777else
6d6c1801 14778 gcc_cv_as_alpha_explicit_relocs=no
14779 if test $in_tree_gas = yes; then
14780 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14781 then gcc_cv_as_alpha_explicit_relocs=yes
667fe30b 14782fi
6d6c1801 14783 elif test x$gcc_cv_as != x; then
c9cd172c 14784 echo ' .set nomacro
8626dbb9 14785 .text
14786 extbl $3, $2, $3 !lituse_bytoff!1
14787 ldq $2, a($29) !literal!1
14788 ldq $4, b($29) !literal!2
14789 ldq_u $3, 0($2) !lituse_base!1
14790 ldq $27, f($29) !literal!5
14791 jsr $26, ($27), f !lituse_jsr!5
14792 ldah $29, 0($26) !gpdisp!3
14793 lda $0, c($29) !gprel
14794 ldah $1, d($29) !gprelhigh
14795 lda $1, d($1) !gprellow
6d6c1801 14796 lda $29, 0($29) !gpdisp!3' > conftest.s
6a8964db 14797 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14799 (eval $ac_try) 2>&5
14800 ac_status=$?
14801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802 (exit $ac_status); }; }
6d6c1801 14803 then
14804 gcc_cv_as_alpha_explicit_relocs=yes
14805 else
14806 echo "configure: failed program was" >&5
14807 cat conftest.s >&5
14808 fi
14809 rm -f conftest.o conftest.s
14810 fi
c9e1a048 14811fi
0713dc29 14812echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14813echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
12b432e0 14814if test $gcc_cv_as_alpha_explicit_relocs = yes; then
6a8964db 14815
14816cat >>confdefs.h <<\_ACEOF
8626dbb9 14817#define HAVE_AS_EXPLICIT_RELOCS 1
6a8964db 14818_ACEOF
8626dbb9 14819
592222c2 14820fi
0713dc29 14821 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
14822echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
592222c2 14823if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
14824 echo $ECHO_N "(cached) $ECHO_C" >&6
14825else
14826 gcc_cv_as_alpha_jsrdirect_relocs=no
14827 if test $in_tree_gas = yes; then
14828 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
14829 then gcc_cv_as_alpha_jsrdirect_relocs=yes
14830fi
14831 elif test x$gcc_cv_as != x; then
14832 echo ' .set nomacro
14833 .text
14834 ldq $27, a($29) !literal!1
14835 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
14836 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14838 (eval $ac_try) 2>&5
14839 ac_status=$?
14840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14841 (exit $ac_status); }; }
14842 then
14843 gcc_cv_as_alpha_jsrdirect_relocs=yes
14844 else
14845 echo "configure: failed program was" >&5
14846 cat conftest.s >&5
14847 fi
14848 rm -f conftest.o conftest.s
14849 fi
14850fi
0713dc29 14851echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
14852echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
592222c2 14853if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
14854
14855cat >>confdefs.h <<\_ACEOF
14856#define HAVE_AS_JSRDIRECT_RELOCS 1
14857_ACEOF
14858
9ebd0bb2 14859fi
14860 ;;
14861
14862 cris-*-*)
0713dc29 14863 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14864echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
9ebd0bb2 14865if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14866 echo $ECHO_N "(cached) $ECHO_C" >&6
14867else
14868 gcc_cv_as_cris_no_mul_bug=no
14869 if test $in_tree_gas = yes; then
14870 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14871 then gcc_cv_as_cris_no_mul_bug=yes
14872fi
14873 elif test x$gcc_cv_as != x; then
14874 echo '.text' > conftest.s
14875 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14877 (eval $ac_try) 2>&5
14878 ac_status=$?
14879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14880 (exit $ac_status); }; }
14881 then
14882 gcc_cv_as_cris_no_mul_bug=yes
14883 else
14884 echo "configure: failed program was" >&5
14885 cat conftest.s >&5
14886 fi
14887 rm -f conftest.o conftest.s
14888 fi
14889fi
0713dc29 14890echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14891echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
9ebd0bb2 14892if test $gcc_cv_as_cris_no_mul_bug = yes; then
14893
14894cat >>confdefs.h <<\_ACEOF
14895#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14896_ACEOF
14897
6d6c1801 14898fi
8626dbb9 14899 ;;
6d6c1801 14900
d300bd48 14901 sparc*-*-*)
0713dc29 14902 echo "$as_me:$LINENO: checking assembler for .register" >&5
14903echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
6a8964db 14904if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14905 echo $ECHO_N "(cached) $ECHO_C" >&6
0569c094 14906else
6d6c1801 14907 gcc_cv_as_sparc_register_op=no
14908 if test x$gcc_cv_as != x; then
c9cd172c 14909 echo '.register %g2, #scratch' > conftest.s
6a8964db 14910 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14912 (eval $ac_try) 2>&5
14913 ac_status=$?
14914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14915 (exit $ac_status); }; }
6d6c1801 14916 then
14917 gcc_cv_as_sparc_register_op=yes
14918 else
14919 echo "configure: failed program was" >&5
14920 cat conftest.s >&5
14921 fi
14922 rm -f conftest.o conftest.s
14923 fi
c9e1a048 14924fi
0713dc29 14925echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
14926echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
12b432e0 14927if test $gcc_cv_as_sparc_register_op = yes; then
6a8964db 14928
14929cat >>confdefs.h <<\_ACEOF
d300bd48 14930#define HAVE_AS_REGISTER_PSEUDO_OP 1
6a8964db 14931_ACEOF
d300bd48 14932
6d6c1801 14933fi
d300bd48 14934
0713dc29 14935 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
14936echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
6a8964db 14937if test "${gcc_cv_as_sparc_relax+set}" = set; then
14938 echo $ECHO_N "(cached) $ECHO_C" >&6
4c335027 14939else
6d6c1801 14940 gcc_cv_as_sparc_relax=no
14941 if test x$gcc_cv_as != x; then
c9cd172c 14942 echo '.text' > conftest.s
6a8964db 14943 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
14944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14945 (eval $ac_try) 2>&5
14946 ac_status=$?
14947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14948 (exit $ac_status); }; }
6d6c1801 14949 then
14950 gcc_cv_as_sparc_relax=yes
14951 else
14952 echo "configure: failed program was" >&5
14953 cat conftest.s >&5
14954 fi
14955 rm -f conftest.o conftest.s
14956 fi
c9e1a048 14957fi
0713dc29 14958echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
14959echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
12b432e0 14960if test $gcc_cv_as_sparc_relax = yes; then
6a8964db 14961
14962cat >>confdefs.h <<\_ACEOF
4c335027 14963#define HAVE_AS_RELAX_OPTION 1
6a8964db 14964_ACEOF
4c335027 14965
6d6c1801 14966fi
4c335027 14967
0713dc29 14968 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
14969echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
6a8964db 14970if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
14971 echo $ECHO_N "(cached) $ECHO_C" >&6
66e333b1 14972else
6d6c1801 14973 gcc_cv_as_sparc_ua_pcrel=no
14974 if test x$gcc_cv_as != x; then
c9cd172c 14975 echo '.text
6d6c1801 14976foo:
14977 nop
14978.data
14979.align 4
14980.byte 0
14981.uaword %r_disp32(foo)' > conftest.s
6a8964db 14982 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14984 (eval $ac_try) 2>&5
14985 ac_status=$?
14986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14987 (exit $ac_status); }; }
6d6c1801 14988 then
14989 if test x$gcc_cv_ld != x \
14990 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
14991 gcc_cv_as_sparc_ua_pcrel=yes
14992 fi
14993 rm -f conftest
14994 else
14995 echo "configure: failed program was" >&5
14996 cat conftest.s >&5
14997 fi
14998 rm -f conftest.o conftest.s
14999 fi
c9e1a048 15000fi
0713dc29 15001echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
15002echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
12b432e0 15003if test $gcc_cv_as_sparc_ua_pcrel = yes; then
6a8964db 15004
15005cat >>confdefs.h <<\_ACEOF
66e333b1 15006#define HAVE_AS_SPARC_UA_PCREL 1
6a8964db 15007_ACEOF
66e333b1 15008
66e333b1 15009
0713dc29 15010 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
15011echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
6a8964db 15012if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
15013 echo $ECHO_N "(cached) $ECHO_C" >&6
e715c863 15014else
6d6c1801 15015 gcc_cv_as_sparc_ua_pcrel_hidden=no
15016 if test x$gcc_cv_as != x; then
c9cd172c 15017 echo '.data
6d6c1801 15018.align 4
15019.byte 0x31
15020.uaword %r_disp32(foo)
15021.byte 0x32, 0x33, 0x34
15022.global foo
15023.hidden foo
15024foo:
15025.skip 4' > conftest.s
6a8964db 15026 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
15027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15028 (eval $ac_try) 2>&5
15029 ac_status=$?
15030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15031 (exit $ac_status); }; }
6d6c1801 15032 then
15033 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
15034 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
15035 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
15036 | grep ' 31000000 07323334' > /dev/null 2>&1; then
15037 if $gcc_cv_objdump -R conftest 2> /dev/null \
15038 | grep 'DISP32' > /dev/null 2>&1; then
15039 :
15040 else
15041 gcc_cv_as_sparc_ua_pcrel_hidden=yes
e715c863 15042 fi
6d6c1801 15043 fi
15044 rm -f conftest
15045 else
15046 echo "configure: failed program was" >&5
15047 cat conftest.s >&5
15048 fi
15049 rm -f conftest.o conftest.s
15050 fi
c9e1a048 15051fi
0713dc29 15052echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
15053echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
12b432e0 15054if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
6a8964db 15055
15056cat >>confdefs.h <<\_ACEOF
e715c863 15057#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
6a8964db 15058_ACEOF
e715c863 15059
6d6c1801 15060fi
6a8964db 15061
6d6c1801 15062fi # unaligned pcrel relocs
e715c863 15063
0713dc29 15064 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
15065echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
6a8964db 15066if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
15067 echo $ECHO_N "(cached) $ECHO_C" >&6
0569c094 15068else
6d6c1801 15069 gcc_cv_as_sparc_offsetable_lo10=no
15070 if test x$gcc_cv_as != x; then
c9cd172c 15071 echo '.text
6d6c1801 15072 or %g1, %lo(ab) + 12, %g1
15073 or %g1, %lo(ab + 12), %g1' > conftest.s
6a8964db 15074 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
15075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15076 (eval $ac_try) 2>&5
15077 ac_status=$?
15078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15079 (exit $ac_status); }; }
6d6c1801 15080 then
15081 if test x$gcc_cv_objdump != x \
7908b1a1 15082 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
6d6c1801 15083 | grep ' 82106000 82106000' > /dev/null 2>&1; then
19f7ae9a 15084 gcc_cv_as_sparc_offsetable_lo10=yes
6d6c1801 15085 fi
15086 else
15087 echo "configure: failed program was" >&5
15088 cat conftest.s >&5
15089 fi
15090 rm -f conftest.o conftest.s
15091 fi
c9e1a048 15092fi
0713dc29 15093echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
15094echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
12b432e0 15095if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
6a8964db 15096
15097cat >>confdefs.h <<\_ACEOF
d300bd48 15098#define HAVE_AS_OFFSETABLE_LO10 1
6a8964db 15099_ACEOF
d300bd48 15100
6d6c1801 15101fi
d300bd48 15102 ;;
15103
96b9fbc1 15104 i[34567]86-*-* | x86_64-*-*)
1f10d387 15105 case $target_os in
15106 cygwin* | pe | mingw32*)
15107 # Used for DWARF 2 in PE
0713dc29 15108 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
15109echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
1f10d387 15110if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
15111 echo $ECHO_N "(cached) $ECHO_C" >&6
15112else
15113 gcc_cv_as_ix86_pe_secrel32=no
15114 if test $in_tree_gas = yes; then
15115 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
15116 then gcc_cv_as_ix86_pe_secrel32=yes
15117fi
15118 elif test x$gcc_cv_as != x; then
15119 echo '.text
15120foo: nop
15121.data
15122 .secrel32 foo' > conftest.s
15123 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15125 (eval $ac_try) 2>&5
15126 ac_status=$?
15127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15128 (exit $ac_status); }; }
15129 then
15130 if test x$gcc_cv_ld != x \
15131 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
15132 gcc_cv_as_ix86_pe_secrel32=yes
15133 fi
15134 rm -f conftest
15135 else
15136 echo "configure: failed program was" >&5
15137 cat conftest.s >&5
15138 fi
15139 rm -f conftest.o conftest.s
15140 fi
15141fi
0713dc29 15142echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
15143echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
1f10d387 15144if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
15145
15146cat >>confdefs.h <<\_ACEOF
15147#define HAVE_GAS_PE_SECREL32_RELOC 1
15148_ACEOF
15149
15150fi
15151 ;;
15152 esac
15153
0713dc29 15154 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
15155echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
6a8964db 15156if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
15157 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 15158else
15159 gcc_cv_as_ix86_filds_fists=no
15160 if test $in_tree_gas = yes; then
15161 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
15162 then gcc_cv_as_ix86_filds_fists=yes
667fe30b 15163fi
6d6c1801 15164 elif test x$gcc_cv_as != x; then
c9cd172c 15165 echo 'filds mem; fists mem' > conftest.s
6a8964db 15166 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15168 (eval $ac_try) 2>&5
15169 ac_status=$?
15170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15171 (exit $ac_status); }; }
6d6c1801 15172 then
15173 gcc_cv_as_ix86_filds_fists=yes
15174 else
15175 echo "configure: failed program was" >&5
15176 cat conftest.s >&5
398f3874 15177 fi
6d6c1801 15178 rm -f conftest.o conftest.s
15179 fi
15180fi
0713dc29 15181echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
15182echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
12b432e0 15183if test $gcc_cv_as_ix86_filds_fists = yes; then
6a8964db 15184
15185cat >>confdefs.h <<\_ACEOF
6d6c1801 15186#define HAVE_GAS_FILDS_FISTS 1
6a8964db 15187_ACEOF
667fe30b 15188
65cce9df 15189fi
15190
0713dc29 15191 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
15192echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
6a8964db 15193if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
15194 echo $ECHO_N "(cached) $ECHO_C" >&6
65cce9df 15195else
15196 gcc_cv_as_ix86_cmov_sun_syntax=no
15197 if test x$gcc_cv_as != x; then
c9cd172c 15198 echo 'cmovl.l %edx, %eax' > conftest.s
6a8964db 15199 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15201 (eval $ac_try) 2>&5
15202 ac_status=$?
15203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15204 (exit $ac_status); }; }
65cce9df 15205 then
15206 gcc_cv_as_ix86_cmov_sun_syntax=yes
15207 else
15208 echo "configure: failed program was" >&5
15209 cat conftest.s >&5
15210 fi
15211 rm -f conftest.o conftest.s
15212 fi
15213fi
0713dc29 15214echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
15215echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
12b432e0 15216if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
6a8964db 15217
15218cat >>confdefs.h <<\_ACEOF
65cce9df 15219#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
6a8964db 15220_ACEOF
65cce9df 15221
97f2677a 15222fi
15223
0713dc29 15224 echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5
15225echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6
97f2677a 15226if test "${gcc_cv_as_ix86_ffreep+set}" = set; then
15227 echo $ECHO_N "(cached) $ECHO_C" >&6
15228else
15229 gcc_cv_as_ix86_ffreep=no
15230 if test x$gcc_cv_as != x; then
15231 echo 'ffreep %st(1)' > conftest.s
15232 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15234 (eval $ac_try) 2>&5
15235 ac_status=$?
15236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15237 (exit $ac_status); }; }
15238 then
15239 gcc_cv_as_ix86_ffreep=yes
15240 else
15241 echo "configure: failed program was" >&5
15242 cat conftest.s >&5
15243 fi
15244 rm -f conftest.o conftest.s
15245 fi
15246fi
0713dc29 15247echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5
15248echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6
97f2677a 15249if test $gcc_cv_as_ix86_ffreep = yes; then
15250
15251cat >>confdefs.h <<\_ACEOF
15252#define HAVE_AS_IX86_FFREEP 1
15253_ACEOF
15254
95792072 15255fi
15256
0713dc29 15257 echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5
15258echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6
95792072 15259if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then
15260 echo $ECHO_N "(cached) $ECHO_C" >&6
15261else
15262 gcc_cv_as_ix86_diff_sect_delta=no
15263 if test x$gcc_cv_as != x; then
15264 echo '.section .rodata
15265.L1:
15266 .long .L2-.L1
15267 .long .L3-.L1
15268 .text
15269.L3: nop
15270.L2: nop' > conftest.s
15271 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15273 (eval $ac_try) 2>&5
15274 ac_status=$?
15275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15276 (exit $ac_status); }; }
15277 then
15278 gcc_cv_as_ix86_diff_sect_delta=yes
15279 else
15280 echo "configure: failed program was" >&5
15281 cat conftest.s >&5
15282 fi
15283 rm -f conftest.o conftest.s
15284 fi
15285fi
0713dc29 15286echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
15287echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6
95792072 15288if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
15289
15290cat >>confdefs.h <<\_ACEOF
15291#define HAVE_AS_IX86_DIFF_SECT_DELTA 1
15292_ACEOF
15293
667fe30b 15294fi
15295
f079b855 15296 # This one is used unconditionally by i386.[ch]; it is to be defined
15297 # to 1 if the feature is present, 0 otherwise.
0713dc29 15298 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
15299echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
6a8964db 15300if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
15301 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 15302else
15303 gcc_cv_as_ix86_gotoff_in_data=no
15304 if test $in_tree_gas = yes; then
15305 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15306 then gcc_cv_as_ix86_gotoff_in_data=yes
15307fi
15308 elif test x$gcc_cv_as != x; then
c9cd172c 15309 echo ' .text
bb006a84 15310.L0:
15311 nop
15312 .data
6d6c1801 15313 .long .L0@GOTOFF' > conftest.s
6a8964db 15314 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15316 (eval $ac_try) 2>&5
15317 ac_status=$?
15318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15319 (exit $ac_status); }; }
6d6c1801 15320 then
15321 gcc_cv_as_ix86_gotoff_in_data=yes
15322 else
15323 echo "configure: failed program was" >&5
15324 cat conftest.s >&5
bb006a84 15325 fi
6d6c1801 15326 rm -f conftest.o conftest.s
15327 fi
15328fi
0713dc29 15329echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
15330echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
6d6c1801 15331
f079b855 15332
6a8964db 15333cat >>confdefs.h <<_ACEOF
f079b855 15334#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
6a8964db 15335_ACEOF
bb006a84 15336
d300bd48 15337 ;;
0cc4b4a2 15338
15339 ia64*-*-*)
0713dc29 15340 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
15341echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
6a8964db 15342if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
15343 echo $ECHO_N "(cached) $ECHO_C" >&6
0cc4b4a2 15344else
6d6c1801 15345 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
15346 if test $in_tree_gas = yes; then
15347 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15348 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
667fe30b 15349fi
6d6c1801 15350 elif test x$gcc_cv_as != x; then
c9cd172c 15351 echo ' .text
0cc4b4a2 15352 addl r15 = @ltoffx(x#), gp
15353 ;;
13f3d840 15354 ld8.mov r16 = [r15], x#' > conftest.s
6a8964db 15355 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15357 (eval $ac_try) 2>&5
15358 ac_status=$?
15359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15360 (exit $ac_status); }; }
6d6c1801 15361 then
13f3d840 15362 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
6d6c1801 15363 else
15364 echo "configure: failed program was" >&5
15365 cat conftest.s >&5
24880e5b 15366 fi
6d6c1801 15367 rm -f conftest.o conftest.s
15368 fi
15369fi
0713dc29 15370echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
15371echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
12b432e0 15372if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
6a8964db 15373
15374cat >>confdefs.h <<\_ACEOF
13f3d840 15375#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
6a8964db 15376_ACEOF
6d6c1801 15377
13f3d840 15378fi
6d6c1801 15379
24880e5b 15380 ;;
6d6c1801 15381
24880e5b 15382 powerpc*-*-*)
6d6c1801 15383 case $target in
a8bb341c 15384 *-*-aix*) conftest_s=' .machine "pwr5"
15385 .csect .text[PR]
3ba829c3 15386 mfcr 3,128';;
cd0c3d24 15387 *-*-darwin*)
0713dc29 15388 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
15389echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
cd0c3d24 15390if test "${gcc_cv_as_machine_directive+set}" = set; then
15391 echo $ECHO_N "(cached) $ECHO_C" >&6
15392else
15393 gcc_cv_as_machine_directive=no
15394 if test x$gcc_cv_as != x; then
15395 echo ' .machine ppc7400' > conftest.s
15396 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15398 (eval $ac_try) 2>&5
15399 ac_status=$?
15400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15401 (exit $ac_status); }; }
15402 then
15403 gcc_cv_as_machine_directive=yes
15404 else
15405 echo "configure: failed program was" >&5
15406 cat conftest.s >&5
15407 fi
15408 rm -f conftest.o conftest.s
15409 fi
15410fi
0713dc29 15411echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
15412echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
cd0c3d24 15413
15414 if test x$gcc_cv_as_machine_directive != xyes; then
15415 echo "*** This target requires an assembler supporting \".machine\"" >&2
15416 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
15417 test x$build = x$target && exit 1
15418 fi
15419 conftest_s=' .text
3ba829c3 15420 mfcr r3,128';;
ce1a729a 15421 *) conftest_s=' .machine power4
4adb2d8e 15422 .text
3ba829c3 15423 mfcr 3,128';;
6d6c1801 15424 esac
6d6c1801 15425
0713dc29 15426 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
15427echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
6a8964db 15428if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
15429 echo $ECHO_N "(cached) $ECHO_C" >&6
24880e5b 15430else
6d6c1801 15431 gcc_cv_as_powerpc_mfcrf=no
15432 if test $in_tree_gas = yes; then
15433 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15434 then gcc_cv_as_powerpc_mfcrf=yes
24880e5b 15435fi
6d6c1801 15436 elif test x$gcc_cv_as != x; then
c9cd172c 15437 echo "$conftest_s" > conftest.s
6a8964db 15438 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15440 (eval $ac_try) 2>&5
15441 ac_status=$?
15442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15443 (exit $ac_status); }; }
6d6c1801 15444 then
15445 gcc_cv_as_powerpc_mfcrf=yes
15446 else
15447 echo "configure: failed program was" >&5
15448 cat conftest.s >&5
15449 fi
15450 rm -f conftest.o conftest.s
15451 fi
24880e5b 15452fi
0713dc29 15453echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
15454echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
12b432e0 15455if test $gcc_cv_as_powerpc_mfcrf = yes; then
6a8964db 15456
15457cat >>confdefs.h <<\_ACEOF
24880e5b 15458#define HAVE_AS_MFCRF 1
6a8964db 15459_ACEOF
0cc4b4a2 15460
6d6c1801 15461fi
a8bb341c 15462
15463 case $target in
15464 *-*-aix*) conftest_s=' .machine "pwr5"
15465 .csect .text[PR]
15466 popcntb 3,3';;
15467 *) conftest_s=' .machine power5
15468 .text
15469 popcntb 3,3';;
15470 esac
15471
0713dc29 15472 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
15473echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
a8bb341c 15474if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
15475 echo $ECHO_N "(cached) $ECHO_C" >&6
15476else
15477 gcc_cv_as_powerpc_popcntb=no
15478 if test $in_tree_gas = yes; then
15479 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15480 then gcc_cv_as_powerpc_popcntb=yes
15481fi
15482 elif test x$gcc_cv_as != x; then
15483 echo "$conftest_s" > conftest.s
15484 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15486 (eval $ac_try) 2>&5
15487 ac_status=$?
15488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15489 (exit $ac_status); }; }
15490 then
15491 gcc_cv_as_powerpc_popcntb=yes
15492 else
15493 echo "configure: failed program was" >&5
15494 cat conftest.s >&5
15495 fi
15496 rm -f conftest.o conftest.s
15497 fi
15498fi
0713dc29 15499echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
15500echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
a8bb341c 15501if test $gcc_cv_as_powerpc_popcntb = yes; then
15502
15503cat >>confdefs.h <<\_ACEOF
15504#define HAVE_AS_POPCNTB 1
15505_ACEOF
15506
a6018579 15507fi
15508
15509 case $target in
15510 *-*-aix*) conftest_s=' .machine "pwr5x"
15511 .csect .text[PR]
15512 frin 1,1';;
015fab10 15513 *) conftest_s=' .machine power5
a6018579 15514 .text
15515 frin 1,1';;
15516 esac
15517
0713dc29 15518 echo "$as_me:$LINENO: checking assembler for fp round support" >&5
15519echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
a6018579 15520if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
15521 echo $ECHO_N "(cached) $ECHO_C" >&6
15522else
15523 gcc_cv_as_powerpc_fprnd=no
15524 if test $in_tree_gas = yes; then
15525 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15526 then gcc_cv_as_powerpc_fprnd=yes
15527fi
15528 elif test x$gcc_cv_as != x; then
15529 echo "$conftest_s" > conftest.s
15530 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15532 (eval $ac_try) 2>&5
15533 ac_status=$?
15534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15535 (exit $ac_status); }; }
15536 then
15537 gcc_cv_as_powerpc_fprnd=yes
15538 else
15539 echo "configure: failed program was" >&5
15540 cat conftest.s >&5
15541 fi
15542 rm -f conftest.o conftest.s
15543 fi
15544fi
0713dc29 15545echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
15546echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
a6018579 15547if test $gcc_cv_as_powerpc_fprnd = yes; then
15548
15549cat >>confdefs.h <<\_ACEOF
15550#define HAVE_AS_FPRND 1
15551_ACEOF
15552
c15fcd1f 15553fi
15554
15555 case $target in
15556 *-*-aix*) conftest_s=' .machine "pwr6"
15557 .csect .text[PR]
15558 mffgpr 1,3';;
15559 *) conftest_s=' .machine power6
15560 .text
15561 mffgpr 1,3';;
15562 esac
15563
0713dc29 15564 echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5
15565echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6
c15fcd1f 15566if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then
15567 echo $ECHO_N "(cached) $ECHO_C" >&6
15568else
15569 gcc_cv_as_powerpc_mfpgpr=no
15570 if test $in_tree_gas = yes; then
15571 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
15572 then gcc_cv_as_powerpc_mfpgpr=yes
15573fi
15574 elif test x$gcc_cv_as != x; then
15575 echo "$conftest_s" > conftest.s
15576 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15578 (eval $ac_try) 2>&5
15579 ac_status=$?
15580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15581 (exit $ac_status); }; }
15582 then
15583 gcc_cv_as_powerpc_mfpgpr=yes
15584 else
15585 echo "configure: failed program was" >&5
15586 cat conftest.s >&5
15587 fi
15588 rm -f conftest.o conftest.s
15589 fi
15590fi
0713dc29 15591echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5
15592echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6
c15fcd1f 15593if test $gcc_cv_as_powerpc_mfpgpr = yes; then
15594
15595cat >>confdefs.h <<\_ACEOF
15596#define HAVE_AS_MFPGPR 1
15597_ACEOF
15598
a8bb341c 15599fi
15600
197f58fa 15601 case $target in
15602 *-*-aix*) conftest_s=' .csect .text[PR]
15603LCF..0:
15604 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
15605 *-*-darwin*)
15606 conftest_s=' .text
15607LCF0:
15608 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
15609 *) conftest_s=' .text
15610.LCF0:
15611 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
15612 esac
15613
0713dc29 15614 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
15615echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
197f58fa 15616if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
15617 echo $ECHO_N "(cached) $ECHO_C" >&6
15618else
15619 gcc_cv_as_powerpc_rel16=no
15620 if test $in_tree_gas = yes; then
15621 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15622 then gcc_cv_as_powerpc_rel16=yes
15623fi
15624 elif test x$gcc_cv_as != x; then
15625 echo "$conftest_s" > conftest.s
15626 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15628 (eval $ac_try) 2>&5
15629 ac_status=$?
15630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15631 (exit $ac_status); }; }
15632 then
15633 gcc_cv_as_powerpc_rel16=yes
15634 else
15635 echo "configure: failed program was" >&5
15636 cat conftest.s >&5
15637 fi
15638 rm -f conftest.o conftest.s
15639 fi
15640fi
0713dc29 15641echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
15642echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
197f58fa 15643if test $gcc_cv_as_powerpc_rel16 = yes; then
15644
15645cat >>confdefs.h <<\_ACEOF
15646#define HAVE_AS_REL16 1
15647_ACEOF
15648
15649fi
6d6c1801 15650 ;;
15651
15652 mips*-*-*)
0713dc29 15653 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
15654echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
6a8964db 15655if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
15656 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 15657else
15658 gcc_cv_as_mips_explicit_relocs=no
15659 if test $in_tree_gas = yes; then
15660 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15661 then gcc_cv_as_mips_explicit_relocs=yes
15662fi
15663 elif test x$gcc_cv_as != x; then
c9cd172c 15664 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
6a8964db 15665 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15667 (eval $ac_try) 2>&5
15668 ac_status=$?
15669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15670 (exit $ac_status); }; }
6d6c1801 15671 then
15672 gcc_cv_as_mips_explicit_relocs=yes
15673 else
15674 echo "configure: failed program was" >&5
15675 cat conftest.s >&5
0cc4b4a2 15676 fi
6d6c1801 15677 rm -f conftest.o conftest.s
15678 fi
15679fi
0713dc29 15680echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
15681echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
6d6c1801 15682if test $gcc_cv_as_mips_explicit_relocs = yes; then
15683 if test x$target_cpu_default = x
15684 then target_cpu_default=MASK_EXPLICIT_RELOCS
15685 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
15686 fi
f863d3e3 15687fi
0713dc29 15688 echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5
15689echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6
f863d3e3 15690if test "${gcc_cv_as_mips_no_shared+set}" = set; then
15691 echo $ECHO_N "(cached) $ECHO_C" >&6
15692else
15693 gcc_cv_as_mips_no_shared=no
15694 if test $in_tree_gas = yes; then
15695 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
15696 then gcc_cv_as_mips_no_shared=yes
15697fi
15698 elif test x$gcc_cv_as != x; then
15699 echo 'nop' > conftest.s
15700 if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5'
15701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15702 (eval $ac_try) 2>&5
15703 ac_status=$?
15704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15705 (exit $ac_status); }; }
15706 then
15707 gcc_cv_as_mips_no_shared=yes
15708 else
15709 echo "configure: failed program was" >&5
15710 cat conftest.s >&5
15711 fi
15712 rm -f conftest.o conftest.s
15713 fi
15714fi
0713dc29 15715echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5
15716echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6
f863d3e3 15717if test $gcc_cv_as_mips_no_shared = yes; then
15718
15719cat >>confdefs.h <<\_ACEOF
15720#define HAVE_AS_NO_SHARED 1
15721_ACEOF
15722
6d6c1801 15723fi
c8aeaa6d 15724 ;;
15725esac
6d6c1801 15726
c8aeaa6d 15727# Mips and HP-UX need the GNU assembler.
15728# Linux on IA64 might be able to use the Intel assembler.
15729
15730case "$target" in
15731 mips*-*-* | *-*-hpux* )
6e930e6c 15732 if test x$gas_flag = xyes \
15733 || test x"$host" != x"$build" \
15734 || test ! -x "$gcc_cv_as" \
15735 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
15736 :
15737 else
15738 echo "*** This configuration requires the GNU assembler" >&2
15739 exit 1
15740 fi
0cc4b4a2 15741 ;;
d300bd48 15742esac
c8aeaa6d 15743
142cf471 15744# ??? Not all targets support dwarf2 debug_line, even within a version
15745# of gas. Moreover, we need to emit a valid instruction to trigger any
15746# info to the output file. So, as supported targets are added to gas 2.11,
15747# add some instruction here to (also) show we expect this might work.
15748# ??? Once 2.11 is released, probably need to add first known working
15749# version to the per-target configury.
15750case "$target" in
549c28fd 15751 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
482662fd 15752 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
3dbfe3e4 15753 | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-*)
142cf471 15754 insn="nop"
15755 ;;
15dff672 15756 ia64*-*-* | s390*-*-*)
142cf471 15757 insn="nop 0"
15758 ;;
482662fd 15759 mmix-*-*)
15760 insn="swym 0"
15761 ;;
6d6c1801 15762esac
15763if test x"$insn" != x; then
15764 conftest_s="\
15765 .file 1 \"conftest.s\"
15766 .loc 1 3 0
15767 $insn"
0713dc29 15768 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
15769echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
6a8964db 15770if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
15771 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 15772else
15773 gcc_cv_as_dwarf2_debug_line=no
15774 if test $in_tree_gas = yes; then
15775 if test $in_tree_gas_is_elf = yes \
15776 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15777 then gcc_cv_as_dwarf2_debug_line=yes
15778fi
15779 elif test x$gcc_cv_as != x; then
c9cd172c 15780 echo "$conftest_s" > conftest.s
6a8964db 15781 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15783 (eval $ac_try) 2>&5
15784 ac_status=$?
15785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15786 (exit $ac_status); }; }
6d6c1801 15787 then
1b33a244 15788 if test x$gcc_cv_objdump != x \
15789 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
15790 | grep debug_line > /dev/null 2>&1; then
6d6c1801 15791 gcc_cv_as_dwarf2_debug_line=yes
15792 fi
15793 else
15794 echo "configure: failed program was" >&5
15795 cat conftest.s >&5
15796 fi
15797 rm -f conftest.o conftest.s
15798 fi
15799fi
0713dc29 15800echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
15801echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
667fe30b 15802
667fe30b 15803
6d6c1801 15804# The .debug_line file table must be in the exact order that
15805# we specified the files, since these indices are also used
15806# by DW_AT_decl_file. Approximate this test by testing if
15807# the assembler bitches if the same index is assigned twice.
0713dc29 15808 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
15809echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
6a8964db 15810if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
15811 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 15812else
15813 gcc_cv_as_dwarf2_file_buggy=no
15814 if test x$gcc_cv_as != x; then
c9cd172c 15815 echo ' .file 1 "foo.s"
6d6c1801 15816 .file 1 "bar.s"' > conftest.s
6a8964db 15817 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15819 (eval $ac_try) 2>&5
15820 ac_status=$?
15821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15822 (exit $ac_status); }; }
6d6c1801 15823 then
15824 gcc_cv_as_dwarf2_file_buggy=yes
15825 else
15826 echo "configure: failed program was" >&5
15827 cat conftest.s >&5
15828 fi
15829 rm -f conftest.o conftest.s
15830 fi
667fe30b 15831fi
0713dc29 15832echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
15833echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
6d6c1801 15834
15835
15836 if test $gcc_cv_as_dwarf2_debug_line = yes \
15837 && test $gcc_cv_as_dwarf2_file_buggy = no; then
6a8964db 15838
15839cat >>confdefs.h <<\_ACEOF
142cf471 15840#define HAVE_AS_DWARF2_DEBUG_LINE 1
6a8964db 15841_ACEOF
142cf471 15842
6d6c1801 15843 fi
667fe30b 15844
0713dc29 15845 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
15846echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
6a8964db 15847if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
15848 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 15849else
15850 gcc_cv_as_gdwarf2_flag=no
15851 if test $in_tree_gas = yes; then
15852 if test $in_tree_gas_is_elf = yes \
15853 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15854 then gcc_cv_as_gdwarf2_flag=yes
15855fi
15856 elif test x$gcc_cv_as != x; then
c9cd172c 15857 echo "$insn" > conftest.s
6a8964db 15858 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
15859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15860 (eval $ac_try) 2>&5
15861 ac_status=$?
15862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15863 (exit $ac_status); }; }
6d6c1801 15864 then
15865 gcc_cv_as_gdwarf2_flag=yes
15866 else
15867 echo "configure: failed program was" >&5
15868 cat conftest.s >&5
15869 fi
15870 rm -f conftest.o conftest.s
15871 fi
667fe30b 15872fi
0713dc29 15873echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
15874echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
12b432e0 15875if test $gcc_cv_as_gdwarf2_flag = yes; then
6a8964db 15876
15877cat >>confdefs.h <<\_ACEOF
1a6f9700 15878#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
6a8964db 15879_ACEOF
1a6f9700 15880
15881fi
667fe30b 15882
0713dc29 15883 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
15884echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
6a8964db 15885if test "${gcc_cv_as_gstabs_flag+set}" = set; then
15886 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 15887else
15888 gcc_cv_as_gstabs_flag=no
15889 if test $in_tree_gas = yes; then
15890 if test $in_tree_gas_is_elf = yes \
15891 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15892 then gcc_cv_as_gstabs_flag=yes
15893fi
15894 elif test x$gcc_cv_as != x; then
c9cd172c 15895 echo "$insn" > conftest.s
6a8964db 15896 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
15897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15898 (eval $ac_try) 2>&5
15899 ac_status=$?
15900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15901 (exit $ac_status); }; }
6d6c1801 15902 then
15903 # The native Solaris 9/Intel assembler doesn't understand --gstabs
15904 # and warns about it, but still exits successfully. So check for
15905 # this.
6a8964db 15906 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
15907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15908 (eval $ac_try) 2>&5
15909 ac_status=$?
15910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15911 (exit $ac_status); }; }
6d6c1801 15912 then :
15913 else gcc_cv_as_gstabs_flag=yes
15914 fi
15915 else
15916 echo "configure: failed program was" >&5
15917 cat conftest.s >&5
15918 fi
15919 rm -f conftest.o conftest.s
15920 fi
667fe30b 15921fi
0713dc29 15922echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
15923echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
12b432e0 15924if test $gcc_cv_as_gstabs_flag = yes; then
6a8964db 15925
15926cat >>confdefs.h <<\_ACEOF
1a6f9700 15927#define HAVE_AS_GSTABS_DEBUG_FLAG 1
6a8964db 15928_ACEOF
1a6f9700 15929
15930fi
6d6c1801 15931fi
1a6f9700 15932
0713dc29 15933echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
15934echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
d5720b0c 15935gcc_cv_ld_ro_rw_mix=unknown
7349ace9 15936if test $in_tree_ld = yes ; then
0dac358a 15937 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 \
15938 && test $in_tree_ld_is_elf = yes; then
d5720b0c 15939 gcc_cv_ld_ro_rw_mix=read-write
15940 fi
15941elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
67215fdd 15942 echo '.section myfoosect, "a"' > conftest1.s
15943 echo '.section myfoosect, "aw"' > conftest2.s
d5720b0c 15944 echo '.byte 1' >> conftest2.s
67215fdd 15945 echo '.section myfoosect, "a"' > conftest3.s
d5720b0c 15946 echo '.byte 0' >> conftest3.s
c96f876e 15947 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
15948 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
15949 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
d5720b0c 15950 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
a271d9f9 15951 conftest2.o conftest3.o > /dev/null 2>&1; then
d5720b0c 15952 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
a271d9f9 15953 | sed -e '/myfoosect/!d' -e N`
d5720b0c 15954 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
15955 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
15956 gcc_cv_ld_ro_rw_mix=read-only
15957 else
15958 gcc_cv_ld_ro_rw_mix=read-write
15959 fi
15960 fi
15961 fi
15962 rm -f conftest.* conftest[123].*
15963fi
15964if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
6a8964db 15965
15966cat >>confdefs.h <<\_ACEOF
d5720b0c 15967#define HAVE_LD_RO_RW_SECTION_MIXING 1
6a8964db 15968_ACEOF
d5720b0c 15969
15970fi
0713dc29 15971echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
15972echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
d5720b0c 15973
0713dc29 15974echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
15975echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
0d6378a9 15976gcc_cv_ld_eh_frame_hdr=no
7349ace9 15977if test $in_tree_ld = yes ; then
0dac358a 15978 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 \
15979 && test $in_tree_ld_is_elf = yes; then
0d6378a9 15980 gcc_cv_ld_eh_frame_hdr=yes
15981 fi
15982elif test x$gcc_cv_ld != x; then
15983 # Check if linker supports --eh-frame-hdr option
15984 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
15985 gcc_cv_ld_eh_frame_hdr=yes
15986 fi
15987fi
fcd42b1e 15988
0d6378a9 15989if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
6a8964db 15990
15991cat >>confdefs.h <<\_ACEOF
0d6378a9 15992#define HAVE_LD_EH_FRAME_HDR 1
6a8964db 15993_ACEOF
0d6378a9 15994
15995fi
0713dc29 15996echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
15997echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
0d6378a9 15998
0713dc29 15999echo "$as_me:$LINENO: checking linker position independent executable support" >&5
16000echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
c3ce66b0 16001gcc_cv_ld_pie=no
16002if test $in_tree_ld = yes ; then
0dac358a 16003 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 \
16004 && test $in_tree_ld_is_elf = yes; then
c3ce66b0 16005 gcc_cv_ld_pie=yes
16006 fi
16007elif test x$gcc_cv_ld != x; then
16008 # Check if linker supports -pie option
16009 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
16010 gcc_cv_ld_pie=yes
16011 fi
16012fi
16013if test x"$gcc_cv_ld_pie" = xyes; then
6a8964db 16014
16015cat >>confdefs.h <<\_ACEOF
c3ce66b0 16016#define HAVE_LD_PIE 1
6a8964db 16017_ACEOF
c3ce66b0 16018
16019fi
0713dc29 16020echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
16021echo "${ECHO_T}$gcc_cv_ld_pie" >&6
c3ce66b0 16022
0713dc29 16023echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5
16024echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6
0a011112 16025gcc_cv_ld_eh_gc_sections=no
16026if test $in_tree_ld = yes ; then
16027 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 17 -o "$gcc_cv_gld_major_version" -gt 2 \
16028 && test $in_tree_ld_is_elf = yes; then
16029 gcc_cv_ld_eh_gc_sections=yes
16030 fi
16031elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
16032 cat > conftest.s <<EOF
16033 .section .text
16034.globl _start
16035 .type _start, @function
16036_start:
16037 .long foo
16038 .size _start, .-_start
16039 .section .text.foo,"ax",@progbits
16040 .type foo, @function
16041foo:
16042 .long 0
16043 .size foo, .-foo
16044 .section .gcc_except_table.foo,"a",@progbits
16045.L0:
16046 .long 0
16047 .section .eh_frame,"a",@progbits
16048 .long .L0
16049EOF
16050 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
16051 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
16052 | grep "gc-sections option ignored" > /dev/null; then
16053 gcc_cv_ld_eh_gc_sections=no
16054 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
16055 gcc_cv_ld_eh_gc_sections=yes
16056 fi
16057 fi
16058 rm -f conftest.s conftest.o conftest
16059fi
16060if test x$gcc_cv_ld_eh_gc_sections = xyes; then
16061
16062cat >>confdefs.h <<\_ACEOF
16063#define HAVE_LD_EH_GC_SECTIONS 1
16064_ACEOF
16065
16066fi
0713dc29 16067echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5
16068echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6
0a011112 16069
d976f534 16070# --------
16071# UNSORTED
16072# --------
16073
0713dc29 16074echo "$as_me:$LINENO: checking linker --as-needed support" >&5
16075echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
11a4b5d2 16076if test "${gcc_cv_ld_as_needed+set}" = set; then
16077 echo $ECHO_N "(cached) $ECHO_C" >&6
16078else
16079 gcc_cv_ld_as_needed=no
6a40149e 16080if test $in_tree_ld = yes ; then
16081 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 \
16082 && test $in_tree_ld_is_elf = yes; then
16083 gcc_cv_ld_as_needed=yes
16084 fi
16085elif test x$gcc_cv_ld != x; then
16086 # Check if linker supports --as-needed and --no-as-needed options
16087 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
16088 gcc_cv_ld_as_needed=yes
16089 fi
16090fi
11a4b5d2 16091
16092fi
0713dc29 16093echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
16094echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
6a40149e 16095if test x"$gcc_cv_ld_as_needed" = xyes; then
16096
16097cat >>confdefs.h <<\_ACEOF
16098#define HAVE_LD_AS_NEEDED 1
16099_ACEOF
16100
16101fi
6a40149e 16102
4de3052c 16103case "$target:$tm_file" in
16104 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
0713dc29 16105 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
16106echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
66ebfa67 16107if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
16108 echo $ECHO_N "(cached) $ECHO_C" >&6
16109else
16110 gcc_cv_ld_no_dot_syms=no
16111 if test $in_tree_ld = yes ; then
16112 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
16113 gcc_cv_ld_no_dot_syms=yes
16114 fi
16115 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
16116 cat > conftest1.s <<EOF
16117 .text
16118 bl .foo
16119EOF
16120 cat > conftest2.s <<EOF
16121 .section ".opd","aw"
16122 .align 3
16123 .globl foo
16124 .type foo,@function
16125foo:
16126 .quad .LEfoo,.TOC.@tocbase,0
16127 .text
16128.LEfoo:
16129 blr
16130 .size foo,.-.LEfoo
16131EOF
16132 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
16133 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
16134 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
16135 gcc_cv_ld_no_dot_syms=yes
16136 fi
16137 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
16138 fi
16139
16140fi
0713dc29 16141echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
16142echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
66ebfa67 16143 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
16144
16145cat >>confdefs.h <<\_ACEOF
16146#define HAVE_LD_NO_DOT_SYMS 1
16147_ACEOF
16148
16149 fi
16150 ;;
16151esac
16152
0713dc29 16153echo "$as_me:$LINENO: checking linker --sysroot support" >&5
16154echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
b6bcc48f 16155if test "${gcc_cv_ld_sysroot+set}" = set; then
16156 echo $ECHO_N "(cached) $ECHO_C" >&6
16157else
16158 gcc_cv_ld_sysroot=no
16159 if test $in_tree_ld = yes ; then
16160 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
93b26f8a 16161 gcc_cv_ld_sysroot=yes
b6bcc48f 16162 fi
16163 elif test x$gcc_cv_ld != x; then
16164 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
16165 gcc_cv_ld_sysroot=yes
16166 fi
16167 fi
16168fi
0713dc29 16169echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
16170echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
b6bcc48f 16171if test x"$gcc_cv_ld_sysroot" = xyes; then
16172
16173cat >>confdefs.h <<\_ACEOF
16174#define HAVE_LD_SYSROOT 1
16175_ACEOF
16176
16177fi
16178
7b6408ee 16179if test x$with_sysroot = x && test x$host = x$target \
41c555b5 16180 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
16181 && test "$prefix" != "NONE"; then
6a8964db 16182
16183cat >>confdefs.h <<_ACEOF
759d75c3 16184#define PREFIX_INCLUDE_DIR "$prefix/include"
6a8964db 16185_ACEOF
759d75c3 16186
16187fi
16188
0d55f4d0 16189# Test for stack protector support in target C library.
16190case "$target" in
16191 *-*-linux*)
0713dc29 16192 echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5
16193echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6
0d55f4d0 16194if test "${gcc_cv_libc_provides_ssp+set}" = set; then
16195 echo $ECHO_N "(cached) $ECHO_C" >&6
16196else
16197 gcc_cv_libc_provides_ssp=no
16198 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
16199 if test "x$with_sysroot" = x; then
16200 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
16201 elif test "x$with_sysroot" = xyes; then
16202 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
16203 else
16204 glibc_header_dir="${with_sysroot}/usr/include"
16205 fi
16206 else
16207 glibc_header_dir=/usr/include
16208 fi
16209 # glibc 2.4 and later provides __stack_chk_fail and
16210 # either __stack_chk_guard, or TLS access to stack guard canary.
16211 if test -f $glibc_header_dir/features.h \
16212 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
16213 $glibc_header_dir/features.h > /dev/null; then
16214 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
16215 $glibc_header_dir/features.h > /dev/null; then
16216 gcc_cv_libc_provides_ssp=yes
16217 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
16218 $glibc_header_dir/features.h > /dev/null \
16219 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
16220 $glibc_header_dir/features.h > /dev/null; then
16221 gcc_cv_libc_provides_ssp=yes
16222 fi
16223 fi
16224fi
0713dc29 16225echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
16226echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;;
0d55f4d0 16227 *) gcc_cv_libc_provides_ssp=no ;;
16228esac
16229if test x$gcc_cv_libc_provides_ssp = xyes; then
16230
16231cat >>confdefs.h <<\_ACEOF
16232#define TARGET_LIBC_PROVIDES_SSP 1
16233_ACEOF
16234
16235fi
16236
2dde0cc6 16237# Check if TFmode long double should be used by default or not.
16238# Some glibc targets used DFmode long double, but with glibc 2.4
16239# and later they can use TFmode.
16240case "$target" in
16241 powerpc*-*-*gnu* | \
16242 sparc*-*-linux* | \
16243 s390*-*-linux* | \
16244 alpha*-*-linux*)
16245
0713dc29 16246# Check whether --with-long-double-128 or --without-long-double-128 was given.
2dde0cc6 16247if test "${with_long_double_128+set}" = set; then
0713dc29 16248 withval="$with_long_double_128"
16249 gcc_cv_target_ldbl128="$with_long_double_128"
2dde0cc6 16250else
16251 gcc_cv_target_ldbl128=no
16252 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
16253 if test "x$with_sysroot" = x; then
16254 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
16255 elif test "x$with_sysroot" = xyes; then
16256 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
16257 else
16258 glibc_header_dir="${with_sysroot}/usr/include"
16259 fi
16260 else
16261 glibc_header_dir=/usr/include
16262 fi
dfce740a 16263 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
2dde0cc6 16264 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
16265 && gcc_cv_target_ldbl128=yes
dfce740a 16266
0713dc29 16267fi;
2dde0cc6 16268 ;;
16269esac
16270if test x$gcc_cv_target_ldbl128 = xyes; then
16271
16272cat >>confdefs.h <<\_ACEOF
16273#define TARGET_DEFAULT_LONG_DOUBLE_128 1
16274_ACEOF
16275
16276fi
16277
772580ce 16278# Find out what GC implementation we want, or may, use.
6a8964db 16279
0713dc29 16280# Check whether --with-gc or --without-gc was given.
772580ce 16281if test "${with_gc+set}" = set; then
0713dc29 16282 withval="$with_gc"
16283 case "$withval" in
1bb42c87 16284 page)
772580ce 16285 GGC=ggc-$withval
1bb42c87 16286 ;;
16287 zone)
16288 GGC=ggc-$withval
16289
16290cat >>confdefs.h <<\_ACEOF
16291#define GGC_ZONE 1
16292_ACEOF
16293
772580ce 16294 ;;
16295 *)
6a8964db 16296 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
16297echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
16298 { (exit 1); exit 1; }; }
772580ce 16299 ;;
16300esac
16301else
71661611 16302 GGC=ggc-page
0713dc29 16303fi;
772580ce 16304
16305echo "Using $GGC for garbage collection."
16306
add841d2 16307# Use the system's zlib library.
f357ac87 16308zlibdir=-L../zlib
16309zlibinc="-I\$(srcdir)/../zlib"
6a8964db 16310
0713dc29 16311# Check whether --with-system-zlib or --without-system-zlib was given.
add841d2 16312if test "${with_system_zlib+set}" = set; then
0713dc29 16313 withval="$with_system_zlib"
16314 zlibdir=
add841d2 16315zlibinc=
16316
0713dc29 16317fi;
add841d2 16318
16319
c5ab9ed2 16320
84eba009 16321
0713dc29 16322echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
16323echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
16324 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
c5ab9ed2 16325if test "${enable_maintainer_mode+set}" = set; then
0713dc29 16326 enableval="$enable_maintainer_mode"
16327 maintainer_mode=$enableval
c5ab9ed2 16328else
16329 maintainer_mode=no
0713dc29 16330fi;
12b432e0 16331
0713dc29 16332echo "$as_me:$LINENO: result: $maintainer_mode" >&5
16333echo "${ECHO_T}$maintainer_mode" >&6
c5ab9ed2 16334
16335if test "$maintainer_mode" = "yes"; then
16336 MAINT=''
16337else
16338 MAINT='#'
16339fi
16340
d976f534 16341# --------------
16342# Language hooks
16343# --------------
16344
071cd279 16345# Make empty files to contain the specs and options for each language.
16346# Then add #include lines to for a compiler that has specs and/or options.
16347
26526d23 16348subdirs=
3272db82 16349lang_opt_files=
071cd279 16350lang_specs_files=
c3cc26e1 16351lang_tree_files=
071cd279 16352# These (without "all_") are set in each config-lang.in.
16353# `language' must be a single word so is spelled singularly.
16354all_languages=
16355all_boot_languages=
16356all_compilers=
16357all_stagestuff=
50e7e370 16358all_outputs='Makefile gccbug mklibgcc libada-mk'
071cd279 16359# List of language makefile fragments.
a455468e 16360all_lang_makefrags=
16361# List of language subdirectory makefiles. Deprecated.
071cd279 16362all_lang_makefiles=
1f3233d1 16363# Files for gengtype
eb1bd38b 16364all_gtfiles="$target_gtfiles"
776c30b8 16365# Files for gengtype with language
16366all_gtfiles_files_langs=
16367all_gtfiles_files_files=
071cd279 16368
26526d23 16369# These are the languages that are set in --enable-languages,
16370# and are available in the GCC tree.
16371all_selected_languages=
16372
071cd279 16373# Add the language fragments.
16374# Languages are added via two mechanisms. Some information must be
16375# recorded in makefile variables, these are defined in config-lang.in.
16376# We accumulate them and plug them into the main Makefile.
16377# The other mechanism is a set of hooks for each of the main targets
16378# like `clean', `install', etc.
16379
071cd279 16380language_hooks="Make-hooks"
071cd279 16381
26526d23 16382for lang in ${srcdir}/*/config-lang.in
071cd279 16383do
5dee13c2 16384 test "$lang" = "${srcdir}/*/config-lang.in" && continue
16385
26526d23 16386 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
16387 if test "x$lang_alias" = x
16388 then
16389 echo "$lang doesn't set \$language." 1>&2
16390 exit 1
16391 fi
16392 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
16393 subdirs="$subdirs $subdir"
16394 case ",$enable_languages," in
16395 *,$lang_alias,*)
16396 all_selected_languages="$all_selected_languages $lang_alias"
16397 if test -f $srcdir/$subdir/lang-specs.h; then
16398 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
16399 fi
16400 ;;
16401 esac
16402
26526d23 16403 language=
16404 boot_language=
16405 compilers=
16406 stagestuff=
16407 outputs=
16408 gtfiles=
5dee13c2 16409 subdir_requires=
26526d23 16410 . ${srcdir}/$subdir/config-lang.in
16411 if test "x$language" = x
16412 then
16413 echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2
16414 exit 1
16415 fi
5dee13c2 16416
16417 ok=:
16418 case ",$enable_languages," in
16419 *,$lang_alias,*) ;;
16420 *)
16421 for i in $subdir_requires; do
3891e7d9 16422 test -f "${srcdir}/$i/config-lang.in" && continue
5dee13c2 16423 ok=false
16424 break
16425 done
16426 ;;
16427 esac
16428 $ok || continue
16429
26526d23 16430 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in"
5dee13c2 16431 if test -f $srcdir/$subdir/lang.opt; then
16432 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
16433 fi
16434 if test -f $srcdir/$subdir/$subdir-tree.def; then
16435 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
16436 fi
26526d23 16437 if test -f ${srcdir}/$subdir/Makefile.in
16438 then all_lang_makefiles="$subdir/Makefile"
16439 fi
16440 all_languages="$all_languages $language"
16441 if test "x$boot_language" = xyes
16442 then
16443 all_boot_languages="$all_boot_languages $language"
16444 fi
16445 all_compilers="$all_compilers $compilers"
16446 all_stagestuff="$all_stagestuff $stagestuff"
16447 all_outputs="$all_outputs $outputs"
16448 all_gtfiles="$all_gtfiles $gtfiles"
5dee13c2 16449 for f in $gtfiles
16450 do
16451 all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} "
16452 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
16453 done
071cd279 16454done
16455
776c30b8 16456# Pick up gtfiles for c
16457gtfiles=
26526d23 16458subdir="c"
776c30b8 16459. ${srcdir}/c-config-lang.in
16460all_gtfiles="$all_gtfiles $gtfiles"
2e222ce5 16461for f in $gtfiles
776c30b8 16462do
26526d23 16463 all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} "
776c30b8 16464 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
776c30b8 16465done
16466
21fa82cb 16467check_languages=
26526d23 16468for language in $all_selected_languages
21fa82cb 16469do
26526d23 16470 check_languages="$check_languages check-$language"
21fa82cb 16471done
16472
d5cd09c5 16473# We link each language in with a set of hooks, reached indirectly via
26526d23 16474# lang.${target}. Only do so for selected languages.
071cd279 16475
16476rm -f Make-hooks
16477touch Make-hooks
ae6555f9 16478target_list="all.cross start.encap rest.encap tags \
51f93521 16479 install-common install-man install-info dvi pdf html \
ca6eabd1 16480 uninstall info man srcextra srcman srcinfo \
80e909c6 16481 mostlyclean clean distclean maintainer-clean \
ef3bb540 16482 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
26526d23 16483
071cd279 16484for t in $target_list
16485do
16486 x=
26526d23 16487 for lang in $all_selected_languages
071cd279 16488 do
26526d23 16489 x="$x $lang.$t"
071cd279 16490 done
16491 echo "lang.$t: $x" >> Make-hooks
16492done
16493
d976f534 16494# --------
16495# UNSORTED
16496# --------
16497
49d87238 16498# Create .gdbinit.
071cd279 16499
49d87238 16500echo "dir ." > .gdbinit
16501echo "dir ${srcdir}" >> .gdbinit
16502if test x$gdb_needs_out_file_path = xyes
16503then
16504 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
16505fi
16506if test "x$subdirs" != x; then
16507 for s in $subdirs
16508 do
16509 echo "dir ${srcdir}/$s" >> .gdbinit
16510 done
071cd279 16511fi
49d87238 16512echo "source ${srcdir}/gdbinit.in" >> .gdbinit
071cd279 16513
8ffadb5b 16514# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
16515# absolute path for gcc_tooldir based on inserting the number of up-directory
16516# movements required to get from $(exec_prefix) to $(prefix) into the basic
16517# $(libsubdir)/@(unlibsubdir) based path.
e29a95ef 16518# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
16519# make and thus we'd get different behavior depending on where we built the
16520# sources.
7df8690a 16521if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
d58156a1 16522 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
f22b529a 16523else
8ffadb5b 16524# An explanation of the sed strings:
16525# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
16526# -e 's|/$||' match a trailing forward slash and eliminates it
16527# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
424da949 16528# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8ffadb5b 16529#
16530# (*) Note this pattern overwrites the first character of the string
16531# with a forward slash if one is not already present. This is not a
16532# problem because the exact names of the sub-directories concerned is
16533# unimportant, just the number of them matters.
16534#
16535# The practical upshot of these patterns is like this:
16536#
16537# prefix exec_prefix result
16538# ------ ----------- ------
16539# /foo /foo/bar ../
16540# /foo/ /foo/bar ../
16541# /foo /foo/bar/ ../
16542# /foo/ /foo/bar/ ../
16543# /foo /foo/bar/ugg ../../
16544#
066520ea 16545 dollar='$$'
d58156a1 16546 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
f22b529a 16547fi
16548
16549
9bc65db1 16550
074386b8 16551# Find a directory in which to install a shared libgcc.
16552
0713dc29 16553# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
074386b8 16554if test "${enable_version_specific_runtime_libs+set}" = set; then
0713dc29 16555 enableval="$enable_version_specific_runtime_libs"
6a8964db 16556
0713dc29 16557fi;
074386b8 16558
16559
0713dc29 16560# Check whether --with-slibdir or --without-slibdir was given.
4724fbab 16561if test "${with_slibdir+set}" = set; then
0713dc29 16562 withval="$with_slibdir"
16563 slibdir="$with_slibdir"
4724fbab 16564else
16565 if test "${enable_version_specific_runtime_libs+set}" = set; then
074386b8 16566 slibdir='$(libsubdir)'
4724fbab 16567elif test "$host" != "$target"; then
074386b8 16568 slibdir='$(build_tooldir)/lib'
16569else
4724fbab 16570 slibdir='$(libdir)'
074386b8 16571fi
0713dc29 16572fi;
074386b8 16573
16574
3354d061 16575objdir=`${PWDCMD-pwd}`
fbc57885 16576
16577
85690e4d 16578
0713dc29 16579# Check whether --with-datarootdir or --without-datarootdir was given.
85690e4d 16580if test "${with_datarootdir+set}" = set; then
0713dc29 16581 withval="$with_datarootdir"
16582 datarootdir="\${prefix}/$with_datarootdir"
85690e4d 16583else
16584 datarootdir='$(prefix)/share'
0713dc29 16585fi;
85690e4d 16586
16587
16588
0713dc29 16589# Check whether --with-docdir or --without-docdir was given.
85690e4d 16590if test "${with_docdir+set}" = set; then
0713dc29 16591 withval="$with_docdir"
16592 docdir="\${prefix}/$with_docdir"
85690e4d 16593else
16594 docdir='$(datarootdir)'
0713dc29 16595fi;
85690e4d 16596
16597
84eba009 16598
0713dc29 16599# Check whether --with-htmldir or --without-htmldir was given.
85690e4d 16600if test "${with_htmldir+set}" = set; then
0713dc29 16601 withval="$with_htmldir"
16602 htmldir="\${prefix}/$with_htmldir"
85690e4d 16603else
16604 htmldir='$(docdir)'
0713dc29 16605fi;
85690e4d 16606
16607
071cd279 16608# Substitute configuration variables
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
d9db3eb3 16655
0dbd1c74 16656
2aa3e87b 16657
a654e028 16658
be69511d 16659
5c872430 16660
83b8e55b 16661
16662
16663
16664
16665
16666
16667
8b24e546 16668
1f3233d1 16669
37c96b91 16670
071cd279 16671
c9cd172c 16672# Echo link setup.
16673if test x${build} = x${host} ; then
16674 if test x${host} = x${target} ; then
16675 echo "Links are now set up to build a native compiler for ${target}." 1>&2
16676 else
16677 echo "Links are now set up to build a cross-compiler" 1>&2
16678 echo " from ${host} to ${target}." 1>&2
16679 fi
16680else
16681 if test x${host} = x${target} ; then
16682 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
16683 echo " for ${target}." 1>&2
16684 else
16685 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
16686 echo " from ${host} to ${target}." 1>&2
16687 fi
16688fi
16689
4ee9c684 16690
16691
16692
c9cd172c 16693# Configure the subdirectories
16694# AC_CONFIG_SUBDIRS($subdirs)
16695
16696# Create the Makefile
16697# and configure language subdirectories
0713dc29 16698 ac_config_files="$ac_config_files $all_outputs"
1211e6bc 16699
16700
0713dc29 16701 ac_config_commands="$ac_config_commands default"
1211e6bc 16702
6a8964db 16703cat >confcache <<\_ACEOF
c9cd172c 16704# This file is a shell script that caches the results of configure
16705# tests run on this system so they can be shared between configure
6a8964db 16706# scripts and configure runs, see configure's option --config-cache.
16707# It is not useful on other systems. If it contains results you don't
16708# want to keep, you may remove or edit it.
c9cd172c 16709#
6a8964db 16710# config.status only pays attention to the cache file if you give it
16711# the --recheck option to rerun configure.
c9cd172c 16712#
6a8964db 16713# `ac_cv_env_foo' variables (set or unset) will be overridden when
16714# loading this file, other *unset* `ac_cv_foo' will be assigned the
16715# following values.
16716
16717_ACEOF
16718
c9cd172c 16719# The following way of writing the cache mishandles newlines in values,
16720# but we know of no workaround that is simple, portable, and efficient.
0713dc29 16721# So, don't put newlines in cache variables' values.
c9cd172c 16722# Ultrix sh set writes to stderr and can't be redirected directly,
16723# and sets the high bit in the cache file unless we assign to the vars.
0713dc29 16724{
6a8964db 16725 (set) 2>&1 |
0713dc29 16726 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16727 *ac_space=\ *)
6a8964db 16728 # `set' does not quote correctly, so add quotes (double-quote
16729 # substitution turns \\\\ into \\, and sed turns \\ into \).
16730 sed -n \
9ebd0bb2 16731 "s/'/'\\\\''/g;
16732 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
0713dc29 16733 ;;
6a8964db 16734 *)
16735 # `set' quotes correctly as required by POSIX, so do not add quotes.
0713dc29 16736 sed -n \
16737 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
6a8964db 16738 ;;
0713dc29 16739 esac;
16740} |
6a8964db 16741 sed '
16742 t clear
0713dc29 16743 : clear
6a8964db 16744 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16745 t end
0713dc29 16746 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16747 : end' >>confcache
16748if diff $cache_file confcache >/dev/null 2>&1; then :; else
16749 if test -w $cache_file; then
16750 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
6a8964db 16751 cat confcache >$cache_file
c9cd172c 16752 else
0713dc29 16753 echo "not updating unwritable cache $cache_file"
c9cd172c 16754 fi
16755fi
16756rm -f confcache
16757
16758test "x$prefix" = xNONE && prefix=$ac_default_prefix
16759# Let make expand exec_prefix.
16760test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16761
0713dc29 16762# VPATH may cause trouble with some makes, so we remove $(srcdir),
16763# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16764# trailing colons and then remove the whole line if VPATH becomes empty
16765# (actually we leave an empty line to preserve line numbers).
16766if test "x$srcdir" = x.; then
16767 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16768s/:*\$(srcdir):*/:/;
16769s/:*\${srcdir}:*/:/;
16770s/:*@srcdir@:*/:/;
16771s/^\([^=]*=[ ]*\):*/\1/;
16772s/:*$//;
16773s/^[^=]*=[ ]*$//;
16774}'
16775fi
16776
12b432e0 16777DEFS=-DHAVE_CONFIG_H
c9cd172c 16778
6a8964db 16779ac_libobjs=
16780ac_ltlibobjs=
16781for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16782 # 1. Remove the extension, and $U if already installed.
0713dc29 16783 ac_i=`echo "$ac_i" |
16784 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
16785 # 2. Add them.
16786 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
16787 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
6a8964db 16788done
16789LIBOBJS=$ac_libobjs
12b432e0 16790
6a8964db 16791LTLIBOBJS=$ac_ltlibobjs
16792
16793
16794
16795: ${CONFIG_STATUS=./config.status}
16796ac_clean_files_save=$ac_clean_files
16797ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16798{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16799echo "$as_me: creating $CONFIG_STATUS" >&6;}
16800cat >$CONFIG_STATUS <<_ACEOF
16801#! $SHELL
16802# Generated by $as_me.
c9cd172c 16803# Run this file to recreate the current configuration.
16804# Compiler output produced by configure, useful for debugging
6a8964db 16805# configure, is in config.log if it exists.
c9cd172c 16806
6a8964db 16807debug=false
16808ac_cs_recheck=false
16809ac_cs_silent=false
16810SHELL=\${CONFIG_SHELL-$SHELL}
16811_ACEOF
16812
16813cat >>$CONFIG_STATUS <<\_ACEOF
16814## --------------------- ##
16815## M4sh Initialization. ##
16816## --------------------- ##
16817
16818# Be Bourne compatible
16819if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16820 emulate sh
16821 NULLCMD=:
16822 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
16823 # is contrary to our usage. Disable this feature.
16824 alias -g '${1+"$@"}'='"$@"'
0713dc29 16825elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16826 set -o posix
6a8964db 16827fi
9ebd0bb2 16828DUALCASE=1; export DUALCASE # for MKS sh
6a8964db 16829
16830# Support unset when possible.
9ebd0bb2 16831if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6a8964db 16832 as_unset=unset
16833else
16834 as_unset=false
16835fi
16836
16837
16838# Work around bugs in pre-3.0 UWIN ksh.
0713dc29 16839$as_unset ENV MAIL MAILPATH
6a8964db 16840PS1='$ '
16841PS2='> '
16842PS4='+ '
16843
16844# NLS nuisances.
16845for as_var in \
16846 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
16847 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
16848 LC_TELEPHONE LC_TIME
c9cd172c 16849do
9ebd0bb2 16850 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6a8964db 16851 eval $as_var=C; export $as_var
16852 else
0713dc29 16853 $as_unset $as_var
6a8964db 16854 fi
c9cd172c 16855done
16856
6a8964db 16857# Required to use basename.
0713dc29 16858if expr a : '\(a\)' >/dev/null 2>&1; then
6a8964db 16859 as_expr=expr
16860else
16861 as_expr=false
16862fi
c9cd172c 16863
0713dc29 16864if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
6a8964db 16865 as_basename=basename
16866else
16867 as_basename=false
16868fi
c9cd172c 16869
16870
6a8964db 16871# Name of the executable.
0713dc29 16872as_me=`$as_basename "$0" ||
6a8964db 16873$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16874 X"$0" : 'X\(//\)$' \| \
0713dc29 16875 X"$0" : 'X\(/\)$' \| \
16876 . : '\(.\)' 2>/dev/null ||
6a8964db 16877echo X/"$0" |
0713dc29 16878 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16879 /^X\/\(\/\/\)$/{ s//\1/; q; }
16880 /^X\/\(\/\).*/{ s//\1/; q; }
16881 s/.*/./; q'`
6a8964db 16882
c9cd172c 16883
0713dc29 16884# PATH needs CR, and LINENO needs CR and PATH.
16885# Avoid depending upon Character Ranges.
16886as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16887as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16888as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16889as_cr_digits='0123456789'
16890as_cr_alnum=$as_cr_Letters$as_cr_digits
6a8964db 16891
0713dc29 16892# The user is always right.
16893if test "${PATH_SEPARATOR+set}" != set; then
16894 echo "#! /bin/sh" >conf$$.sh
16895 echo "exit 0" >>conf$$.sh
16896 chmod +x conf$$.sh
16897 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
16898 PATH_SEPARATOR=';'
16899 else
16900 PATH_SEPARATOR=:
16901 fi
16902 rm -f conf$$.sh
16903fi
16904
16905
16906 as_lineno_1=$LINENO
16907 as_lineno_2=$LINENO
16908 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16909 test "x$as_lineno_1" != "x$as_lineno_2" &&
16910 test "x$as_lineno_3" = "x$as_lineno_2" || {
16911 # Find who we are. Look in the path if we contain no path at all
16912 # relative or not.
16913 case $0 in
16914 *[\\/]* ) as_myself=$0 ;;
16915 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16916for as_dir in $PATH
16917do
16918 IFS=$as_save_IFS
16919 test -z "$as_dir" && as_dir=.
16920 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16921done
6a8964db 16922
0713dc29 16923 ;;
16924 esac
16925 # We did not find ourselves, most probably we were run as `sh COMMAND'
16926 # in which case we are not to be found in the path.
16927 if test "x$as_myself" = x; then
16928 as_myself=$0
16929 fi
16930 if test ! -f "$as_myself"; then
16931 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16932echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16933 { (exit 1); exit 1; }; }
16934 fi
16935 case $CONFIG_SHELL in
16936 '')
16937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16938for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16939do
16940 IFS=$as_save_IFS
16941 test -z "$as_dir" && as_dir=.
16942 for as_base in sh bash ksh sh5; do
16943 case $as_dir in
16944 /*)
16945 if ("$as_dir/$as_base" -c '
6a8964db 16946 as_lineno_1=$LINENO
16947 as_lineno_2=$LINENO
0713dc29 16948 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
6a8964db 16949 test "x$as_lineno_1" != "x$as_lineno_2" &&
0713dc29 16950 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16951 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
16952 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
16953 CONFIG_SHELL=$as_dir/$as_base
16954 export CONFIG_SHELL
16955 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16956 fi;;
16957 esac
16958 done
16959done
16960;;
16961 esac
6a8964db 16962
16963 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16964 # uniformly replaced by the line number. The first 'sed' inserts a
0713dc29 16965 # line-number line before each line; the second 'sed' does the real
16966 # work. The second script uses 'N' to pair each line-number line
16967 # with the numbered line, and appends trailing '-' during
16968 # substitution so that $LINENO is not a special case at line end.
6a8964db 16969 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
0713dc29 16970 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16971 sed '=' <$as_myself |
6a8964db 16972 sed '
16973 N
0713dc29 16974 s,$,-,
16975 : loop
16976 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
6a8964db 16977 t loop
0713dc29 16978 s,-$,,
16979 s,^['$as_cr_digits']*\n,,
6a8964db 16980 ' >$as_me.lineno &&
0713dc29 16981 chmod +x $as_me.lineno ||
16982 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16983echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
6a8964db 16984 { (exit 1); exit 1; }; }
16985
16986 # Don't try to exec as it changes $[0], causing all sort of problems
16987 # (the dirname of $[0] is not the place where we might find the
0713dc29 16988 # original and so on. Autoconf is especially sensible to this).
16989 . ./$as_me.lineno
6a8964db 16990 # Exit status is that of the last command.
16991 exit
16992}
16993
16994
0713dc29 16995case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16996 *c*,-n*) ECHO_N= ECHO_C='
16997' ECHO_T=' ' ;;
16998 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16999 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
6a8964db 17000esac
17001
0713dc29 17002if expr a : '\(a\)' >/dev/null 2>&1; then
6a8964db 17003 as_expr=expr
17004else
17005 as_expr=false
17006fi
17007
17008rm -f conf$$ conf$$.exe conf$$.file
17009echo >conf$$.file
17010if ln -s conf$$.file conf$$ 2>/dev/null; then
0713dc29 17011 # We could just check for DJGPP; but this test a) works b) is more generic
17012 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17013 if test -f conf$$.exe; then
17014 # Don't use ln at all; we don't have any links
6a8964db 17015 as_ln_s='cp -p'
0713dc29 17016 else
17017 as_ln_s='ln -s'
17018 fi
6a8964db 17019elif ln conf$$.file conf$$ 2>/dev/null; then
17020 as_ln_s=ln
17021else
17022 as_ln_s='cp -p'
17023fi
0713dc29 17024rm -f conf$$ conf$$.exe conf$$.file
6a8964db 17025
17026if mkdir -p . 2>/dev/null; then
17027 as_mkdir_p=:
17028else
9ebd0bb2 17029 test -d ./-p && rmdir ./-p
6a8964db 17030 as_mkdir_p=false
17031fi
17032
0713dc29 17033as_executable_p="test -f"
6a8964db 17034
17035# Sed expression to map a string onto a valid CPP name.
9ebd0bb2 17036as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
6a8964db 17037
17038# Sed expression to map a string onto a valid variable name.
9ebd0bb2 17039as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
6a8964db 17040
17041
0713dc29 17042# IFS
17043# We need space, tab and new line, in precisely that order.
17044as_nl='
17045'
17046IFS=" $as_nl"
17047
17048# CDPATH.
17049$as_unset CDPATH
17050
6a8964db 17051exec 6>&1
17052
0713dc29 17053# Open the log real soon, to keep \$[0] and so on meaningful, and to
6a8964db 17054# report actual input values of CONFIG_FILES etc. instead of their
0713dc29 17055# values after options handling. Logging --version etc. is OK.
17056exec 5>>config.log
17057{
17058 echo
17059 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17060## Running $as_me. ##
17061_ASBOX
17062} >&5
17063cat >&5 <<_CSEOF
17064
6a8964db 17065This file was extended by $as_me, which was
0713dc29 17066generated by GNU Autoconf 2.59. Invocation command line was
6a8964db 17067
17068 CONFIG_FILES = $CONFIG_FILES
17069 CONFIG_HEADERS = $CONFIG_HEADERS
17070 CONFIG_LINKS = $CONFIG_LINKS
17071 CONFIG_COMMANDS = $CONFIG_COMMANDS
17072 $ $0 $@
17073
0713dc29 17074_CSEOF
17075echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17076echo >&5
6a8964db 17077_ACEOF
17078
17079# Files that config.status was made for.
0713dc29 17080if test -n "$ac_config_files"; then
17081 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17082fi
6a8964db 17083
0713dc29 17084if test -n "$ac_config_headers"; then
17085 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17086fi
17087
17088if test -n "$ac_config_links"; then
17089 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17090fi
17091
17092if test -n "$ac_config_commands"; then
17093 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17094fi
6a8964db 17095
17096cat >>$CONFIG_STATUS <<\_ACEOF
0713dc29 17097
6a8964db 17098ac_cs_usage="\
17099\`$as_me' instantiates files from templates according to the
17100current configuration.
17101
17102Usage: $0 [OPTIONS] [FILE]...
17103
17104 -h, --help print this help, then exit
17105 -V, --version print version number, then exit
17106 -q, --quiet do not print progress messages
17107 -d, --debug don't remove temporary files
17108 --recheck update $as_me by reconfiguring in the same conditions
17109 --file=FILE[:TEMPLATE]
9ebd0bb2 17110 instantiate the configuration file FILE
6a8964db 17111 --header=FILE[:TEMPLATE]
9ebd0bb2 17112 instantiate the configuration header FILE
6a8964db 17113
17114Configuration files:
17115$config_files
17116
17117Configuration headers:
17118$config_headers
17119
17120Configuration commands:
17121$config_commands
17122
17123Report bugs to <bug-autoconf@gnu.org>."
84eba009 17124_ACEOF
0713dc29 17125
6a8964db 17126cat >>$CONFIG_STATUS <<_ACEOF
17127ac_cs_version="\\
17128config.status
0713dc29 17129configured by $0, generated by GNU Autoconf 2.59,
17130 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
6a8964db 17131
0713dc29 17132Copyright (C) 2003 Free Software Foundation, Inc.
6a8964db 17133This config.status script is free software; the Free Software Foundation
17134gives unlimited permission to copy, distribute and modify it."
0713dc29 17135srcdir=$srcdir
6a8964db 17136_ACEOF
17137
17138cat >>$CONFIG_STATUS <<\_ACEOF
17139# If no file are specified by the user, then we need to provide default
17140# value. By we need to know if files were specified by the user.
17141ac_need_defaults=:
17142while test $# != 0
17143do
17144 case $1 in
17145 --*=*)
0713dc29 17146 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17147 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6a8964db 17148 ac_shift=:
17149 ;;
0713dc29 17150 -*)
6a8964db 17151 ac_option=$1
17152 ac_optarg=$2
17153 ac_shift=shift
17154 ;;
0713dc29 17155 *) # This is not an option, so the user has probably given explicit
17156 # arguments.
17157 ac_option=$1
17158 ac_need_defaults=false;;
6a8964db 17159 esac
17160
17161 case $ac_option in
17162 # Handling of the options.
0713dc29 17163_ACEOF
17164cat >>$CONFIG_STATUS <<\_ACEOF
6a8964db 17165 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17166 ac_cs_recheck=: ;;
0713dc29 17167 --version | --vers* | -V )
17168 echo "$ac_cs_version"; exit 0 ;;
17169 --he | --h)
17170 # Conflict between --help and --header
17171 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17172Try \`$0 --help' for more information." >&5
17173echo "$as_me: error: ambiguous option: $1
17174Try \`$0 --help' for more information." >&2;}
17175 { (exit 1); exit 1; }; };;
17176 --help | --hel | -h )
17177 echo "$ac_cs_usage"; exit 0 ;;
17178 --debug | --d* | -d )
6a8964db 17179 debug=: ;;
17180 --file | --fil | --fi | --f )
17181 $ac_shift
17182 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
17183 ac_need_defaults=false;;
17184 --header | --heade | --head | --hea )
17185 $ac_shift
17186 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
17187 ac_need_defaults=false;;
17188 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17189 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17190 ac_cs_silent=: ;;
17191
17192 # This is an error.
0713dc29 17193 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17194Try \`$0 --help' for more information." >&5
17195echo "$as_me: error: unrecognized option: $1
17196Try \`$0 --help' for more information." >&2;}
6a8964db 17197 { (exit 1); exit 1; }; } ;;
17198
0713dc29 17199 *) ac_config_targets="$ac_config_targets $1" ;;
6a8964db 17200
17201 esac
17202 shift
c9cd172c 17203done
6a8964db 17204
17205ac_configure_extra_args=
17206
17207if $ac_cs_silent; then
17208 exec 6>/dev/null
17209 ac_configure_extra_args="$ac_configure_extra_args --silent"
071cd279 17210fi
17211
6a8964db 17212_ACEOF
17213cat >>$CONFIG_STATUS <<_ACEOF
17214if \$ac_cs_recheck; then
0713dc29 17215 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
17216 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
6a8964db 17217fi
071cd279 17218
6a8964db 17219_ACEOF
17220
17221cat >>$CONFIG_STATUS <<_ACEOF
17222#
0713dc29 17223# INIT-COMMANDS section.
6a8964db 17224#
0713dc29 17225
6a8964db 17226subdirs='$subdirs'
6a8964db 17227
17228_ACEOF
17229
84eba009 17230
0713dc29 17231
17232cat >>$CONFIG_STATUS <<\_ACEOF
6a8964db 17233for ac_config_target in $ac_config_targets
17234do
0713dc29 17235 case "$ac_config_target" in
17236 # Handling of arguments.
17237 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
17238 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17239 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
6a8964db 17240 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17241echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17242 { (exit 1); exit 1; }; };;
071cd279 17243 esac
6a8964db 17244done
17245
17246# If the user did not use the arguments to specify the items to instantiate,
17247# then the envvar interface is used. Set only those that are not.
17248# We use the long form for the default assignment because of an extremely
17249# bizarre bug on SunOS 4.1.3.
17250if $ac_need_defaults; then
17251 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17252 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17253 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17254fi
17255
17256# Have a temporary directory for convenience. Make it in the build tree
0713dc29 17257# simply because there is no reason to put it here, and in addition,
6a8964db 17258# creating and moving files from /tmp can sometimes cause problems.
0713dc29 17259# Create a temporary directory, and hook for its removal unless debugging.
6a8964db 17260$debug ||
17261{
0713dc29 17262 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
6a8964db 17263 trap '{ (exit 1); exit 1; }' 1 2 13 15
17264}
0713dc29 17265
6a8964db 17266# Create a (secure) tmp directory for tmp files.
c9cd172c 17267
6a8964db 17268{
0713dc29 17269 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
6a8964db 17270 test -n "$tmp" && test -d "$tmp"
17271} ||
17272{
0713dc29 17273 tmp=./confstat$$-$RANDOM
17274 (umask 077 && mkdir $tmp)
6a8964db 17275} ||
17276{
17277 echo "$me: cannot create a temporary directory in ." >&2
17278 { (exit 1); exit 1; }
17279}
17280
0713dc29 17281_ACEOF
17282
17283cat >>$CONFIG_STATUS <<_ACEOF
17284
6a8964db 17285#
0713dc29 17286# CONFIG_FILES section.
6a8964db 17287#
17288
17289# No need to generate the scripts if there are no CONFIG_FILES.
17290# This happens for instance when ./config.status config.h
0713dc29 17291if test -n "\$CONFIG_FILES"; then
17292 # Protect against being on the right side of a sed subst in config.status.
17293 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17294 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17295s,@SHELL@,$SHELL,;t t
17296s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17297s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17298s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17299s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17300s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17301s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17302s,@exec_prefix@,$exec_prefix,;t t
17303s,@prefix@,$prefix,;t t
17304s,@program_transform_name@,$program_transform_name,;t t
17305s,@bindir@,$bindir,;t t
17306s,@sbindir@,$sbindir,;t t
17307s,@libexecdir@,$libexecdir,;t t
17308s,@datadir@,$datadir,;t t
17309s,@sysconfdir@,$sysconfdir,;t t
17310s,@sharedstatedir@,$sharedstatedir,;t t
17311s,@localstatedir@,$localstatedir,;t t
17312s,@libdir@,$libdir,;t t
17313s,@includedir@,$includedir,;t t
17314s,@oldincludedir@,$oldincludedir,;t t
17315s,@infodir@,$infodir,;t t
17316s,@mandir@,$mandir,;t t
17317s,@build_alias@,$build_alias,;t t
17318s,@host_alias@,$host_alias,;t t
17319s,@target_alias@,$target_alias,;t t
17320s,@DEFS@,$DEFS,;t t
17321s,@ECHO_C@,$ECHO_C,;t t
17322s,@ECHO_N@,$ECHO_N,;t t
17323s,@ECHO_T@,$ECHO_T,;t t
17324s,@LIBS@,$LIBS,;t t
17325s,@build@,$build,;t t
17326s,@build_cpu@,$build_cpu,;t t
17327s,@build_vendor@,$build_vendor,;t t
17328s,@build_os@,$build_os,;t t
17329s,@host@,$host,;t t
17330s,@host_cpu@,$host_cpu,;t t
17331s,@host_vendor@,$host_vendor,;t t
17332s,@host_os@,$host_os,;t t
17333s,@target@,$target,;t t
17334s,@target_cpu@,$target_cpu,;t t
17335s,@target_vendor@,$target_vendor,;t t
17336s,@target_os@,$target_os,;t t
17337s,@target_noncanonical@,$target_noncanonical,;t t
17338s,@build_libsubdir@,$build_libsubdir,;t t
17339s,@build_subdir@,$build_subdir,;t t
17340s,@host_subdir@,$host_subdir,;t t
17341s,@target_subdir@,$target_subdir,;t t
17342s,@GENINSRC@,$GENINSRC,;t t
17343s,@CC@,$CC,;t t
17344s,@CFLAGS@,$CFLAGS,;t t
17345s,@LDFLAGS@,$LDFLAGS,;t t
17346s,@CPPFLAGS@,$CPPFLAGS,;t t
17347s,@ac_ct_CC@,$ac_ct_CC,;t t
17348s,@EXEEXT@,$EXEEXT,;t t
17349s,@OBJEXT@,$OBJEXT,;t t
17350s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
17351s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
17352s,@CPP@,$CPP,;t t
17353s,@EGREP@,$EGREP,;t t
17354s,@strict1_warn@,$strict1_warn,;t t
17355s,@cxx_compat_warn@,$cxx_compat_warn,;t t
17356s,@warn_cflags@,$warn_cflags,;t t
17357s,@WERROR@,$WERROR,;t t
17358s,@nocommon_flag@,$nocommon_flag,;t t
17359s,@TREEBROWSER@,$TREEBROWSER,;t t
17360s,@valgrind_path@,$valgrind_path,;t t
17361s,@valgrind_path_defines@,$valgrind_path_defines,;t t
17362s,@valgrind_command@,$valgrind_command,;t t
17363s,@coverage_flags@,$coverage_flags,;t t
17364s,@enable_multilib@,$enable_multilib,;t t
17365s,@enable_decimal_float@,$enable_decimal_float,;t t
17366s,@enable_shared@,$enable_shared,;t t
17367s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
17368s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
17369s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
17370s,@onestep@,$onestep,;t t
17371s,@datarootdir@,$datarootdir,;t t
17372s,@docdir@,$docdir,;t t
17373s,@htmldir@,$htmldir,;t t
17374s,@SET_MAKE@,$SET_MAKE,;t t
17375s,@AWK@,$AWK,;t t
17376s,@LN_S@,$LN_S,;t t
17377s,@LN@,$LN,;t t
17378s,@RANLIB@,$RANLIB,;t t
17379s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17380s,@ranlib_flags@,$ranlib_flags,;t t
17381s,@INSTALL@,$INSTALL,;t t
17382s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17383s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17384s,@make_compare_target@,$make_compare_target,;t t
17385s,@have_mktemp_command@,$have_mktemp_command,;t t
17386s,@MAKEINFO@,$MAKEINFO,;t t
17387s,@BUILD_INFO@,$BUILD_INFO,;t t
17388s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
17389s,@FLEX@,$FLEX,;t t
17390s,@BISON@,$BISON,;t t
17391s,@NM@,$NM,;t t
17392s,@AR@,$AR,;t t
17393s,@stage1_cflags@,$stage1_cflags,;t t
17394s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
17395s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
17396s,@LDEXP_LIB@,$LDEXP_LIB,;t t
17397s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
17398s,@LIBICONV@,$LIBICONV,;t t
17399s,@LTLIBICONV@,$LTLIBICONV,;t t
17400s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
17401s,@manext@,$manext,;t t
17402s,@objext@,$objext,;t t
17403s,@gthread_flags@,$gthread_flags,;t t
17404s,@extra_modes_file@,$extra_modes_file,;t t
17405s,@extra_opt_files@,$extra_opt_files,;t t
17406s,@USE_NLS@,$USE_NLS,;t t
17407s,@LIBINTL@,$LIBINTL,;t t
17408s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
17409s,@INCINTL@,$INCINTL,;t t
17410s,@XGETTEXT@,$XGETTEXT,;t t
17411s,@GMSGFMT@,$GMSGFMT,;t t
17412s,@POSUB@,$POSUB,;t t
17413s,@CATALOGS@,$CATALOGS,;t t
17414s,@DATADIRNAME@,$DATADIRNAME,;t t
17415s,@INSTOBJEXT@,$INSTOBJEXT,;t t
17416s,@GENCAT@,$GENCAT,;t t
17417s,@CATOBJEXT@,$CATOBJEXT,;t t
17418s,@host_cc_for_libada@,$host_cc_for_libada,;t t
17419s,@CROSS@,$CROSS,;t t
17420s,@ALL@,$ALL,;t t
17421s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
17422s,@inhibit_libc@,$inhibit_libc,;t t
17423s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
17424s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17425s,@STMP_FIXINC@,$STMP_FIXINC,;t t
17426s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
17427s,@collect2@,$collect2,;t t
17428s,@gcc_cv_as@,$gcc_cv_as,;t t
17429s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
17430s,@gcc_cv_ld@,$gcc_cv_ld,;t t
17431s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
17432s,@gcc_cv_nm@,$gcc_cv_nm,;t t
17433s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
17434s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
17435s,@libgcc_visibility@,$libgcc_visibility,;t t
17436s,@GGC@,$GGC,;t t
17437s,@zlibdir@,$zlibdir,;t t
17438s,@zlibinc@,$zlibinc,;t t
17439s,@MAINT@,$MAINT,;t t
17440s,@gcc_tooldir@,$gcc_tooldir,;t t
17441s,@dollar@,$dollar,;t t
17442s,@slibdir@,$slibdir,;t t
17443s,@objdir@,$objdir,;t t
17444s,@subdirs@,$subdirs,;t t
17445s,@srcdir@,$srcdir,;t t
17446s,@all_boot_languages@,$all_boot_languages,;t t
17447s,@all_compilers@,$all_compilers,;t t
17448s,@all_gtfiles@,$all_gtfiles,;t t
17449s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
17450s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
17451s,@all_lang_makefrags@,$all_lang_makefrags,;t t
17452s,@all_lang_makefiles@,$all_lang_makefiles,;t t
17453s,@all_languages@,$all_languages,;t t
17454s,@all_selected_languages@,$all_selected_languages,;t t
17455s,@all_stagestuff@,$all_stagestuff,;t t
17456s,@build_exeext@,$build_exeext,;t t
17457s,@build_install_headers_dir@,$build_install_headers_dir,;t t
17458s,@build_xm_file_list@,$build_xm_file_list,;t t
17459s,@build_xm_include_list@,$build_xm_include_list,;t t
17460s,@build_xm_defines@,$build_xm_defines,;t t
17461s,@check_languages@,$check_languages,;t t
17462s,@cc_set_by_configure@,$cc_set_by_configure,;t t
17463s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
17464s,@cpp_install_dir@,$cpp_install_dir,;t t
17465s,@xmake_file@,$xmake_file,;t t
17466s,@tmake_file@,$tmake_file,;t t
17467s,@extra_gcc_objs@,$extra_gcc_objs,;t t
17468s,@extra_headers_list@,$extra_headers_list,;t t
17469s,@extra_objs@,$extra_objs,;t t
17470s,@extra_parts@,$extra_parts,;t t
17471s,@extra_passes@,$extra_passes,;t t
17472s,@extra_programs@,$extra_programs,;t t
17473s,@float_h_file@,$float_h_file,;t t
17474s,@gcc_config_arguments@,$gcc_config_arguments,;t t
17475s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
17476s,@host_exeext@,$host_exeext,;t t
17477s,@host_xm_file_list@,$host_xm_file_list,;t t
17478s,@host_xm_include_list@,$host_xm_include_list,;t t
17479s,@host_xm_defines@,$host_xm_defines,;t t
17480s,@out_host_hook_obj@,$out_host_hook_obj,;t t
17481s,@install@,$install,;t t
17482s,@lang_opt_files@,$lang_opt_files,;t t
17483s,@lang_specs_files@,$lang_specs_files,;t t
17484s,@lang_tree_files@,$lang_tree_files,;t t
17485s,@local_prefix@,$local_prefix,;t t
17486s,@md_file@,$md_file,;t t
17487s,@objc_boehm_gc@,$objc_boehm_gc,;t t
17488s,@out_file@,$out_file,;t t
17489s,@out_object_file@,$out_object_file,;t t
17490s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
17491s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
17492s,@thread_file@,$thread_file,;t t
17493s,@tm_file_list@,$tm_file_list,;t t
17494s,@tm_include_list@,$tm_include_list,;t t
17495s,@tm_defines@,$tm_defines,;t t
17496s,@tm_p_file_list@,$tm_p_file_list,;t t
17497s,@tm_p_include_list@,$tm_p_include_list,;t t
17498s,@xm_file_list@,$xm_file_list,;t t
17499s,@xm_include_list@,$xm_include_list,;t t
17500s,@xm_defines@,$xm_defines,;t t
17501s,@c_target_objs@,$c_target_objs,;t t
17502s,@cxx_target_objs@,$cxx_target_objs,;t t
17503s,@target_cpu_default@,$target_cpu_default,;t t
17504s,@GMPLIBS@,$GMPLIBS,;t t
17505s,@GMPINC@,$GMPINC,;t t
17506s,@LIBOBJS@,$LIBOBJS,;t t
17507s,@LTLIBOBJS@,$LTLIBOBJS,;t t
17508/@language_hooks@/r $language_hooks
17509s,@language_hooks@,,;t t
17510CEOF
17511
17512_ACEOF
17513
17514 cat >>$CONFIG_STATUS <<\_ACEOF
17515 # Split the substitutions into bite-sized pieces for seds with
17516 # small command number limits, like on Digital OSF/1 and HP-UX.
17517 ac_max_sed_lines=48
17518 ac_sed_frag=1 # Number of current file.
17519 ac_beg=1 # First line for current file.
17520 ac_end=$ac_max_sed_lines # Line after last line for current file.
17521 ac_more_lines=:
17522 ac_sed_cmds=
17523 while $ac_more_lines; do
17524 if test $ac_beg -gt 1; then
17525 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17526 else
17527 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17528 fi
17529 if test ! -s $tmp/subs.frag; then
17530 ac_more_lines=false
17531 else
17532 # The purpose of the label and of the branching condition is to
17533 # speed up the sed processing (if there are no `@' at all, there
17534 # is no need to browse any of the substitutions).
17535 # These are the two extra sed commands mentioned above.
17536 (echo ':t
17537 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17538 if test -z "$ac_sed_cmds"; then
17539 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17540 else
17541 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17542 fi
17543 ac_sed_frag=`expr $ac_sed_frag + 1`
17544 ac_beg=$ac_end
17545 ac_end=`expr $ac_end + $ac_max_sed_lines`
17546 fi
17547 done
17548 if test -z "$ac_sed_cmds"; then
17549 ac_sed_cmds=cat
84eba009 17550 fi
0713dc29 17551fi # test -n "$CONFIG_FILES"
84eba009 17552
84eba009 17553_ACEOF
6a8964db 17554cat >>$CONFIG_STATUS <<\_ACEOF
0713dc29 17555for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17556 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17557 case $ac_file in
17558 - | *:- | *:-:* ) # input from stdin
17559 cat >$tmp/stdin
17560 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17561 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17562 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17563 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17564 * ) ac_file_in=$ac_file.in ;;
12b432e0 17565 esac
c9e1a048 17566
0713dc29 17567 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17568 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
6a8964db 17569$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9ebd0bb2 17570 X"$ac_file" : 'X\(//\)[^/]' \| \
17571 X"$ac_file" : 'X\(//\)$' \| \
0713dc29 17572 X"$ac_file" : 'X\(/\)' \| \
17573 . : '\(.\)' 2>/dev/null ||
6a8964db 17574echo X"$ac_file" |
0713dc29 17575 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17576 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17577 /^X\(\/\/\)$/{ s//\1/; q; }
17578 /^X\(\/\).*/{ s//\1/; q; }
17579 s/.*/./; q'`
17580 { if $as_mkdir_p; then
17581 mkdir -p "$ac_dir"
17582 else
17583 as_dir="$ac_dir"
6a8964db 17584 as_dirs=
0713dc29 17585 while test ! -d "$as_dir"; do
17586 as_dirs="$as_dir $as_dirs"
17587 as_dir=`(dirname "$as_dir") 2>/dev/null ||
6a8964db 17588$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9ebd0bb2 17589 X"$as_dir" : 'X\(//\)[^/]' \| \
17590 X"$as_dir" : 'X\(//\)$' \| \
0713dc29 17591 X"$as_dir" : 'X\(/\)' \| \
17592 . : '\(.\)' 2>/dev/null ||
6a8964db 17593echo X"$as_dir" |
0713dc29 17594 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17595 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17596 /^X\(\/\/\)$/{ s//\1/; q; }
17597 /^X\(\/\).*/{ s//\1/; q; }
17598 s/.*/./; q'`
6a8964db 17599 done
0713dc29 17600 test ! -n "$as_dirs" || mkdir $as_dirs
17601 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17602echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
6a8964db 17603 { (exit 1); exit 1; }; }; }
0713dc29 17604
6a8964db 17605 ac_builddir=.
17606
0713dc29 17607if test "$ac_dir" != .; then
6a8964db 17608 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
0713dc29 17609 # A "../" for each directory in $ac_dir_suffix.
17610 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17611else
17612 ac_dir_suffix= ac_top_builddir=
17613fi
6a8964db 17614
17615case $srcdir in
0713dc29 17616 .) # No --srcdir option. We are building in place.
6a8964db 17617 ac_srcdir=.
0713dc29 17618 if test -z "$ac_top_builddir"; then
17619 ac_top_srcdir=.
17620 else
17621 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17622 fi ;;
17623 [\\/]* | ?:[\\/]* ) # Absolute path.
6a8964db 17624 ac_srcdir=$srcdir$ac_dir_suffix;
0713dc29 17625 ac_top_srcdir=$srcdir ;;
17626 *) # Relative path.
17627 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17628 ac_top_srcdir=$ac_top_builddir$srcdir ;;
6a8964db 17629esac
6a8964db 17630
0713dc29 17631# Do not use `cd foo && pwd` to compute absolute paths, because
17632# the directories may not exist.
17633case `pwd` in
17634.) ac_abs_builddir="$ac_dir";;
17635*)
17636 case "$ac_dir" in
17637 .) ac_abs_builddir=`pwd`;;
17638 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17639 *) ac_abs_builddir=`pwd`/"$ac_dir";;
17640 esac;;
17641esac
17642case $ac_abs_builddir in
17643.) ac_abs_top_builddir=${ac_top_builddir}.;;
17644*)
17645 case ${ac_top_builddir}. in
17646 .) ac_abs_top_builddir=$ac_abs_builddir;;
17647 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
17648 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
17649 esac;;
17650esac
17651case $ac_abs_builddir in
17652.) ac_abs_srcdir=$ac_srcdir;;
17653*)
17654 case $ac_srcdir in
17655 .) ac_abs_srcdir=$ac_abs_builddir;;
17656 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
17657 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
17658 esac;;
17659esac
17660case $ac_abs_builddir in
17661.) ac_abs_top_srcdir=$ac_top_srcdir;;
17662*)
17663 case $ac_top_srcdir in
17664 .) ac_abs_top_srcdir=$ac_abs_builddir;;
17665 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
17666 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
17667 esac;;
17668esac
6a8964db 17669
17670
84eba009 17671
0713dc29 17672 if test x"$ac_file" != x-; then
17673 { echo "$as_me:$LINENO: creating $ac_file" >&5
17674echo "$as_me: creating $ac_file" >&6;}
17675 rm -f "$ac_file"
17676 fi
17677 # Let's still pretend it is `configure' which instantiates (i.e., don't
17678 # use $as_me), people would be surprised to read:
17679 # /* config.h. Generated by config.status. */
17680 if test x"$ac_file" = x-; then
17681 configure_input=
17682 else
17683 configure_input="$ac_file. "
17684 fi
17685 configure_input=$configure_input"Generated from `echo $ac_file_in |
17686 sed 's,.*/,,'` by configure."
17687
17688 # First look for the input files in the build tree, otherwise in the
17689 # src tree.
17690 ac_file_inputs=`IFS=:
17691 for f in $ac_file_in; do
17692 case $f in
17693 -) echo $tmp/stdin ;;
17694 [\\/$]*)
17695 # Absolute (can't be DOS-style, as IFS=:)
17696 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17697echo "$as_me: error: cannot find input file: $f" >&2;}
17698 { (exit 1); exit 1; }; }
17699 echo "$f";;
17700 *) # Relative
17701 if test -f "$f"; then
17702 # Build tree
17703 echo "$f"
17704 elif test -f "$srcdir/$f"; then
17705 # Source tree
17706 echo "$srcdir/$f"
17707 else
17708 # /dev/null tree
17709 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17710echo "$as_me: error: cannot find input file: $f" >&2;}
17711 { (exit 1); exit 1; }; }
17712 fi;;
17713 esac
17714 done` || { (exit 1); exit 1; }
6a8964db 17715_ACEOF
17716cat >>$CONFIG_STATUS <<_ACEOF
17717 sed "$ac_vpsub
17718$extrasub
17719_ACEOF
17720cat >>$CONFIG_STATUS <<\_ACEOF
17721:t
17722/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
0713dc29 17723s,@configure_input@,$configure_input,;t t
17724s,@srcdir@,$ac_srcdir,;t t
17725s,@abs_srcdir@,$ac_abs_srcdir,;t t
17726s,@top_srcdir@,$ac_top_srcdir,;t t
17727s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17728s,@builddir@,$ac_builddir,;t t
17729s,@abs_builddir@,$ac_abs_builddir,;t t
17730s,@top_builddir@,$ac_top_builddir,;t t
17731s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17732" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17733 rm -f $tmp/stdin
17734 if test x"$ac_file" != x-; then
17735 mv $tmp/out $ac_file
17736 else
17737 cat $tmp/out
17738 rm -f $tmp/out
17739 fi
17740
17741done
17742_ACEOF
17743cat >>$CONFIG_STATUS <<\_ACEOF
17744
17745#
17746# CONFIG_HEADER section.
17747#
17748
17749# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17750# NAME is the cpp macro being defined and VALUE is the value it is being given.
17751#
17752# ac_d sets the value in "#define NAME VALUE" lines.
17753ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17754ac_dB='[ ].*$,\1#\2'
17755ac_dC=' '
17756ac_dD=',;t'
17757# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17758ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17759ac_uB='$,\1#\2define\3'
17760ac_uC=' '
17761ac_uD=',;t'
17762
17763for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17764 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6a8964db 17765 case $ac_file in
0713dc29 17766 - | *:- | *:-:* ) # input from stdin
17767 cat >$tmp/stdin
17768 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17769 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17770 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17771 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17772 * ) ac_file_in=$ac_file.in ;;
071cd279 17773 esac
0713dc29 17774
17775 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17776echo "$as_me: creating $ac_file" >&6;}
17777
17778 # First look for the input files in the build tree, otherwise in the
17779 # src tree.
17780 ac_file_inputs=`IFS=:
17781 for f in $ac_file_in; do
17782 case $f in
17783 -) echo $tmp/stdin ;;
17784 [\\/$]*)
17785 # Absolute (can't be DOS-style, as IFS=:)
17786 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17787echo "$as_me: error: cannot find input file: $f" >&2;}
17788 { (exit 1); exit 1; }; }
17789 # Do quote $f, to prevent DOS paths from being IFS'd.
17790 echo "$f";;
17791 *) # Relative
17792 if test -f "$f"; then
17793 # Build tree
17794 echo "$f"
17795 elif test -f "$srcdir/$f"; then
17796 # Source tree
17797 echo "$srcdir/$f"
17798 else
17799 # /dev/null tree
17800 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17801echo "$as_me: error: cannot find input file: $f" >&2;}
17802 { (exit 1); exit 1; }; }
17803 fi;;
17804 esac
17805 done` || { (exit 1); exit 1; }
17806 # Remove the trailing spaces.
17807 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
17808
17809_ACEOF
17810
17811# Transform confdefs.h into two sed scripts, `conftest.defines' and
17812# `conftest.undefs', that substitutes the proper values into
17813# config.h.in to produce config.h. The first handles `#define'
17814# templates, and the second `#undef' templates.
17815# And first: Protect against being on the right side of a sed subst in
17816# config.status. Protect against being in an unquoted here document
17817# in config.status.
17818rm -f conftest.defines conftest.undefs
17819# Using a here document instead of a string reduces the quoting nightmare.
17820# Putting comments in sed scripts is not portable.
17821#
17822# `end' is used to avoid that the second main sed command (meant for
17823# 0-ary CPP macros) applies to n-ary macro definitions.
17824# See the Autoconf documentation for `clear'.
17825cat >confdef2sed.sed <<\_ACEOF
17826s/[\\&,]/\\&/g
17827s,[\\$`],\\&,g
17828t clear
17829: clear
17830s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17831t end
17832s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17833: end
17834_ACEOF
17835# If some macros were called several times there might be several times
17836# the same #defines, which is useless. Nevertheless, we may not want to
17837# sort them, since we want the *last* AC-DEFINE to be honored.
17838uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17839sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17840rm -f confdef2sed.sed
17841
17842# This sed command replaces #undef with comments. This is necessary, for
071cd279 17843# example, in the case of _POSIX_SOURCE, which is predefined and required
17844# on some systems where configure will not decide to define it.
0713dc29 17845cat >>conftest.undefs <<\_ACEOF
17846s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17847_ACEOF
17848
17849# Break up conftest.defines because some shells have a limit on the size
17850# of here documents, and old seds have small limits too (100 cmds).
17851echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17852echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17853echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17854echo ' :' >>$CONFIG_STATUS
17855rm -f conftest.tail
17856while grep . conftest.defines >/dev/null
6a8964db 17857do
0713dc29 17858 # Write a limited-size here document to $tmp/defines.sed.
17859 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17860 # Speed up: don't consider the non `#define' lines.
17861 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17862 # Work around the forget-to-reset-the-flag bug.
17863 echo 't clr' >>$CONFIG_STATUS
17864 echo ': clr' >>$CONFIG_STATUS
17865 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
6a8964db 17866 echo 'CEOF
0713dc29 17867 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17868 rm -f $tmp/in
17869 mv $tmp/out $tmp/in
17870' >>$CONFIG_STATUS
17871 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
6a8964db 17872 rm -f conftest.defines
17873 mv conftest.tail conftest.defines
17874done
0713dc29 17875rm -f conftest.defines
17876echo ' fi # grep' >>$CONFIG_STATUS
17877echo >>$CONFIG_STATUS
17878
17879# Break up conftest.undefs because some shells have a limit on the size
17880# of here documents, and old seds have small limits too (100 cmds).
17881echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17882rm -f conftest.tail
17883while grep . conftest.undefs >/dev/null
17884do
17885 # Write a limited-size here document to $tmp/undefs.sed.
17886 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17887 # Speed up: don't consider the non `#undef'
17888 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17889 # Work around the forget-to-reset-the-flag bug.
17890 echo 't clr' >>$CONFIG_STATUS
17891 echo ': clr' >>$CONFIG_STATUS
17892 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17893 echo 'CEOF
17894 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17895 rm -f $tmp/in
17896 mv $tmp/out $tmp/in
17897' >>$CONFIG_STATUS
17898 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17899 rm -f conftest.undefs
17900 mv conftest.tail conftest.undefs
17901done
17902rm -f conftest.undefs
6a8964db 17903
17904cat >>$CONFIG_STATUS <<\_ACEOF
0713dc29 17905 # Let's still pretend it is `configure' which instantiates (i.e., don't
17906 # use $as_me), people would be surprised to read:
17907 # /* config.h. Generated by config.status. */
17908 if test x"$ac_file" = x-; then
17909 echo "/* Generated by configure. */" >$tmp/config.h
17910 else
17911 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
17912 fi
17913 cat $tmp/in >>$tmp/config.h
17914 rm -f $tmp/in
6a8964db 17915 if test x"$ac_file" != x-; then
0713dc29 17916 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
6a8964db 17917 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17918echo "$as_me: $ac_file is unchanged" >&6;}
17919 else
0713dc29 17920 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17921$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17922 X"$ac_file" : 'X\(//\)[^/]' \| \
17923 X"$ac_file" : 'X\(//\)$' \| \
17924 X"$ac_file" : 'X\(/\)' \| \
17925 . : '\(.\)' 2>/dev/null ||
17926echo X"$ac_file" |
17927 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17928 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17929 /^X\(\/\/\)$/{ s//\1/; q; }
17930 /^X\(\/\).*/{ s//\1/; q; }
17931 s/.*/./; q'`
17932 { if $as_mkdir_p; then
17933 mkdir -p "$ac_dir"
17934 else
17935 as_dir="$ac_dir"
17936 as_dirs=
17937 while test ! -d "$as_dir"; do
17938 as_dirs="$as_dir $as_dirs"
17939 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17940$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17941 X"$as_dir" : 'X\(//\)[^/]' \| \
17942 X"$as_dir" : 'X\(//\)$' \| \
17943 X"$as_dir" : 'X\(/\)' \| \
17944 . : '\(.\)' 2>/dev/null ||
17945echo X"$as_dir" |
17946 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17947 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17948 /^X\(\/\/\)$/{ s//\1/; q; }
17949 /^X\(\/\).*/{ s//\1/; q; }
17950 s/.*/./; q'`
17951 done
17952 test ! -n "$as_dirs" || mkdir $as_dirs
17953 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17954echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17955 { (exit 1); exit 1; }; }; }
17956
6a8964db 17957 rm -f $ac_file
0713dc29 17958 mv $tmp/config.h $ac_file
6a8964db 17959 fi
17960 else
0713dc29 17961 cat $tmp/config.h
17962 rm -f $tmp/config.h
6a8964db 17963 fi
0713dc29 17964done
17965_ACEOF
17966cat >>$CONFIG_STATUS <<\_ACEOF
d6b9b86f 17967
0713dc29 17968#
17969# CONFIG_COMMANDS section.
17970#
17971for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17972 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17973 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17974 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
17975$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17976 X"$ac_dest" : 'X\(//\)[^/]' \| \
17977 X"$ac_dest" : 'X\(//\)$' \| \
17978 X"$ac_dest" : 'X\(/\)' \| \
17979 . : '\(.\)' 2>/dev/null ||
17980echo X"$ac_dest" |
17981 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17982 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17983 /^X\(\/\/\)$/{ s//\1/; q; }
17984 /^X\(\/\).*/{ s//\1/; q; }
17985 s/.*/./; q'`
17986 { if $as_mkdir_p; then
17987 mkdir -p "$ac_dir"
17988 else
17989 as_dir="$ac_dir"
17990 as_dirs=
17991 while test ! -d "$as_dir"; do
17992 as_dirs="$as_dir $as_dirs"
17993 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17994$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17995 X"$as_dir" : 'X\(//\)[^/]' \| \
17996 X"$as_dir" : 'X\(//\)$' \| \
17997 X"$as_dir" : 'X\(/\)' \| \
17998 . : '\(.\)' 2>/dev/null ||
17999echo X"$as_dir" |
18000 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18001 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18002 /^X\(\/\/\)$/{ s//\1/; q; }
18003 /^X\(\/\).*/{ s//\1/; q; }
18004 s/.*/./; q'`
18005 done
18006 test ! -n "$as_dirs" || mkdir $as_dirs
18007 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18008echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18009 { (exit 1); exit 1; }; }; }
6a8964db 18010
0713dc29 18011 ac_builddir=.
18012
18013if test "$ac_dir" != .; then
18014 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18015 # A "../" for each directory in $ac_dir_suffix.
18016 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18017else
18018 ac_dir_suffix= ac_top_builddir=
18019fi
6a8964db 18020
0713dc29 18021case $srcdir in
18022 .) # No --srcdir option. We are building in place.
18023 ac_srcdir=.
18024 if test -z "$ac_top_builddir"; then
18025 ac_top_srcdir=.
18026 else
18027 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18028 fi ;;
18029 [\\/]* | ?:[\\/]* ) # Absolute path.
18030 ac_srcdir=$srcdir$ac_dir_suffix;
18031 ac_top_srcdir=$srcdir ;;
18032 *) # Relative path.
18033 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18034 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18035esac
18036
18037# Do not use `cd foo && pwd` to compute absolute paths, because
18038# the directories may not exist.
18039case `pwd` in
18040.) ac_abs_builddir="$ac_dir";;
18041*)
18042 case "$ac_dir" in
18043 .) ac_abs_builddir=`pwd`;;
18044 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
18045 *) ac_abs_builddir=`pwd`/"$ac_dir";;
18046 esac;;
18047esac
18048case $ac_abs_builddir in
18049.) ac_abs_top_builddir=${ac_top_builddir}.;;
18050*)
18051 case ${ac_top_builddir}. in
18052 .) ac_abs_top_builddir=$ac_abs_builddir;;
18053 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
18054 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
18055 esac;;
18056esac
18057case $ac_abs_builddir in
18058.) ac_abs_srcdir=$ac_srcdir;;
18059*)
18060 case $ac_srcdir in
18061 .) ac_abs_srcdir=$ac_abs_builddir;;
18062 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
18063 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
18064 esac;;
18065esac
18066case $ac_abs_builddir in
18067.) ac_abs_top_srcdir=$ac_top_srcdir;;
18068*)
18069 case $ac_top_srcdir in
18070 .) ac_abs_top_srcdir=$ac_abs_builddir;;
18071 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
18072 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
18073 esac;;
18074esac
18075
18076
18077 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
18078echo "$as_me: executing $ac_dest commands" >&6;}
18079 case $ac_dest in
18080 default )
00ba4d3e 18081case ${CONFIG_HEADERS} in
18082 *auto-host.h:config.in*)
18083 echo > cstamp-h ;;
071cd279 18084esac
a455468e 18085# Make sure all the subdirs exist.
524a54cf 18086for d in $subdirs doc build
a455468e 18087do
a455468e 18088 test -d $d || mkdir $d
a455468e 18089done
55b0dbe2 18090# If the host supports symlinks, point stage[1234] at ../stage[1234] so
18091# bootstrapping and the installation procedure can still use
18092# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
18093# FLAGS_TO_PASS has been modified to solve the problem there.
18094# This is virtually a duplicate of what happens in configure.lang; we do
18095# an extra check to make sure this only happens if ln -s can be used.
26be379c 18096case "$LN_S" in
18097 *-s*)
18098 for d in ${subdirs} ; do
3354d061 18099 STARTDIR=`${PWDCMD-pwd}`
0ba40214 18100 cd $d
109d4e8d 18101 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
0ba40214 18102 do
18103 rm -f $t
26be379c 18104 $LN_S ../$t $t 2>/dev/null
0ba40214 18105 done
18106 cd $STARTDIR
26be379c 18107 done
18108 ;;
18109esac
6a8964db 18110 ;;
18111 esac
0713dc29 18112done
18113_ACEOF
c9e1a048 18114
0713dc29 18115cat >>$CONFIG_STATUS <<\_ACEOF
6a8964db 18116
18117{ (exit 0); exit 0; }
18118_ACEOF
071cd279 18119chmod +x $CONFIG_STATUS
6a8964db 18120ac_clean_files=$ac_clean_files_save
18121
18122
18123# configure is writing to config.log, and then calls config.status.
18124# config.status does its own redirection, appending to config.log.
18125# Unfortunately, on DOS this fails, as config.log is still kept open
18126# by configure, so config.status won't be able to write to it; its
18127# output is simply discarded. So we exec the FD to /dev/null,
18128# effectively closing config.log, so it can be properly (re)opened and
18129# appended to by config.status. When coming back to configure, we
18130# need to make the FD available again.
18131if test "$no_create" != yes; then
18132 ac_cs_success=:
18133 ac_config_status_args=
18134 test "$silent" = yes &&
18135 ac_config_status_args="$ac_config_status_args --quiet"
18136 exec 5>/dev/null
18137 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18138 exec 5>>config.log
18139 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18140 # would make configure fail if this is the last instruction.
18141 $ac_cs_success || { (exit 1); exit 1; }
18142fi
071cd279 18143