]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
gcc/
[thirdparty/gcc.git] / gcc / configure
CommitLineData
71661611 1#! /bin/sh
071cd279 2# Guess values for system-dependent variables and create Makefiles.
d6b9b86f 3# Generated by GNU Autoconf 2.59.
071cd279 4#
9ebd0bb2 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+"$@"}'='"$@"'
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
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.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
43do
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
47 $as_unset $as_var
48 fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54else
55 as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
66as_me=`$as_basename "$0" ||
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
76
77
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
96 rm -f conf$$.sh
97fi
98
99
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
116
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
137 /*)
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
166 N
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
210 fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
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
225as_executable_p="test -f"
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
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
241$as_unset CDPATH
242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
071cd279 254ac_default_prefix=/usr/local
6a8964db 255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
274ac_unique_file="tree.c"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
ae74ffb7 312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump ORIGINAL_OBJDUMP_FOR_TARGET libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
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'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
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
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
361 fi
362
6a8964db 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
071cd279 364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
6a8964db 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
389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
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'`
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'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
071cd279 413 *) ac_optarg=yes ;;
414 esac
6a8964db 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 \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
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'`
6a8964db 593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
071cd279 595 *) ac_optarg=yes ;;
596 esac
6a8964db 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'`
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; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
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
6a8964db 658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
666 esac
667done
9af7c2e2 668
6a8964db 669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
9ebd0bb2 671 localstatedir libdir includedir oldincludedir infodir mandir
071cd279 672do
6a8964db 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
708 # Try the directory containing this script, then its parent.
6a8964db 709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9ebd0bb2 711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
6a8964db 715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
071cd279 721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
6a8964db 730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
12b432e0 732 else
6a8964db 733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
12b432e0 735 fi
736fi
6a8964db 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
4ee9c684 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
809_ACEOF
810
811 cat <<_ACEOF
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]
829 --datadir=DIR read-only architecture-independent data [PREFIX/share]
830 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
831 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
832 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
833 --libdir=DIR object code libraries [EPREFIX/lib]
834 --includedir=DIR C header files [PREFIX/include]
835 --oldincludedir=DIR C header files for non-gcc [/usr/include]
836 --infodir=DIR info documentation [PREFIX/info]
837 --mandir=DIR man documentation [PREFIX/man]
838_ACEOF
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++
883 --enable-threads enable thread usage for target GCC
884 --enable-threads=LIB use LIB thread package for target GCC
885 --enable-objc-gc enable the use of Boehm's garbage collector with
886 the GNU Objective-C runtime
887 --disable-shared don't provide a shared libgcc
888 --enable-intermodule build the compiler in one step
5222575c 889 --enable-languages=LIST specify which front-ends to build
e5d424c9 890 --disable-rpath do not hardcode runtime library paths
6a8964db 891 --enable-initfini-array use .init_array/.fini_array sections
892 --enable-sjlj-exceptions
893 arrange to use setjmp/longjmp exception handling
197f58fa 894 --enable-secureplt enable -msecure-plt by default for PowerPC
6a8964db 895 --disable-win32-registry
896 disable lookup of installation paths in the
897 Registry on Windows hosts
898 --enable-win32-registry enable registry lookup (default)
899 --enable-win32-registry=KEY
900 use KEY instead of GCC version as the last portion
901 of the registry key
902 --enable-maintainer-mode
903 enable make rules and dependencies not useful
904 (and sometimes confusing) to the casual installer
905 --enable-version-specific-runtime-libs
906 specify that runtime libraries should be
907 installed in a compiler-specific directory
9af7c2e2 908
6a8964db 909Optional Packages:
910 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
911 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
912 --with-local-prefix=DIR specifies directory to put local include
913 --with-gxx-include-dir=DIR
914 specifies directory to put g++ header files
915 --with-cpp-install-dir=DIR
916 install the user visible C preprocessor in DIR
917 (relative to PREFIX) as well as PREFIX/bin
918 --with-gnu-ld arrange to work with GNU ld.
919 --with-ld arrange to use the specified ld (full pathname)
9c948bc2 920 --with-demangler-in-ld try to use demangler in GNU ld.
6a8964db 921 --with-gnu-as arrange to work with GNU as
922 --with-as arrange to use the specified as (full pathname)
923 --with-stabs arrange to use stabs instead of host debug format
924 --with-dwarf2 force the default debug format to be DWARF 2
a99be165 925 --with-build-sysroot=sysroot
926 use sysroot as the system root during the build
6a8964db 927 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
e5d424c9 928 --with-gnu-ld assume the C compiler uses GNU ld default=no
929 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
930 --without-libiconv-prefix don't search for libiconv in includedir and libdir
8bdf23ae 931 --with-system-libunwind use installed libunwind
180e93cf 932 --with-gc={page,zone} choose the garbage collection mechanism to use
6a8964db 933 with the compiler
934 --with-system-zlib use installed libz
935 --with-slibdir=DIR shared libraries in DIR LIBDIR
1c6c0617 936
6a8964db 937Some influential environment variables:
938 CC C compiler command
939 CFLAGS C compiler flags
940 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
941 nonstandard directory <lib dir>
942 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
943 headers in a nonstandard directory <include dir>
944 CPP C preprocessor
4ee9c684 945 GMPLIBS How to link GMP
946 GMPINC How to find GMP include files
1c6c0617 947
6a8964db 948Use these variables to override the choices made by `configure' or to help
949it to find libraries and programs with nonstandard names/locations.
966842d4 950
6a8964db 951_ACEOF
952fi
c9cd172c 953
6a8964db 954if test "$ac_init_help" = "recursive"; then
955 # If there are subdirs, report their specific --help.
956 ac_popdir=`pwd`
957 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
958 test -d $ac_dir || continue
959 ac_builddir=.
960
961if test "$ac_dir" != .; then
962 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
963 # A "../" for each directory in $ac_dir_suffix.
964 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
965else
966 ac_dir_suffix= ac_top_builddir=
967fi
968
969case $srcdir in
970 .) # No --srcdir option. We are building in place.
971 ac_srcdir=.
972 if test -z "$ac_top_builddir"; then
973 ac_top_srcdir=.
974 else
975 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
976 fi ;;
977 [\\/]* | ?:[\\/]* ) # Absolute path.
978 ac_srcdir=$srcdir$ac_dir_suffix;
979 ac_top_srcdir=$srcdir ;;
980 *) # Relative path.
981 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
982 ac_top_srcdir=$ac_top_builddir$srcdir ;;
983esac
d6b9b86f 984
985# Do not use `cd foo && pwd` to compute absolute paths, because
986# the directories may not exist.
987case `pwd` in
988.) ac_abs_builddir="$ac_dir";;
9ebd0bb2 989*)
d6b9b86f 990 case "$ac_dir" in
991 .) ac_abs_builddir=`pwd`;;
992 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
993 *) ac_abs_builddir=`pwd`/"$ac_dir";;
9ebd0bb2 994 esac;;
995esac
d6b9b86f 996case $ac_abs_builddir in
9ebd0bb2 997.) ac_abs_top_builddir=${ac_top_builddir}.;;
998*)
999 case ${ac_top_builddir}. in
d6b9b86f 1000 .) ac_abs_top_builddir=$ac_abs_builddir;;
9ebd0bb2 1001 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
d6b9b86f 1002 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
9ebd0bb2 1003 esac;;
1004esac
d6b9b86f 1005case $ac_abs_builddir in
9ebd0bb2 1006.) ac_abs_srcdir=$ac_srcdir;;
1007*)
1008 case $ac_srcdir in
d6b9b86f 1009 .) ac_abs_srcdir=$ac_abs_builddir;;
9ebd0bb2 1010 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
d6b9b86f 1011 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
9ebd0bb2 1012 esac;;
1013esac
d6b9b86f 1014case $ac_abs_builddir in
9ebd0bb2 1015.) ac_abs_top_srcdir=$ac_top_srcdir;;
1016*)
1017 case $ac_top_srcdir in
d6b9b86f 1018 .) ac_abs_top_srcdir=$ac_abs_builddir;;
9ebd0bb2 1019 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
d6b9b86f 1020 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
9ebd0bb2 1021 esac;;
1022esac
6a8964db 1023
1024 cd $ac_dir
1025 # Check for guested configure; otherwise get Cygnus style configure.
1026 if test -f $ac_srcdir/configure.gnu; then
1027 echo
1028 $SHELL $ac_srcdir/configure.gnu --help=recursive
1029 elif test -f $ac_srcdir/configure; then
1030 echo
1031 $SHELL $ac_srcdir/configure --help=recursive
1032 elif test -f $ac_srcdir/configure.ac ||
9ebd0bb2 1033 test -f $ac_srcdir/configure.in; then
6a8964db 1034 echo
1035 $ac_configure --help
1036 else
1037 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1038 fi
c8aeaa6d 1039 cd $ac_popdir
6a8964db 1040 done
1041fi
1042
1043test -n "$ac_init_help" && exit 0
1044if $ac_init_version; then
1045 cat <<\_ACEOF
1046
9ebd0bb2 1047Copyright (C) 2003 Free Software Foundation, Inc.
6a8964db 1048This configure script is free software; the Free Software Foundation
1049gives unlimited permission to copy, distribute and modify it.
1050_ACEOF
1051 exit 0
1052fi
1053exec 5>config.log
1054cat >&5 <<_ACEOF
1055This file contains any messages produced by compilers while
1056running configure, to aid debugging if configure makes a mistake.
1057
1058It was created by $as_me, which was
d6b9b86f 1059generated by GNU Autoconf 2.59. Invocation command line was
6a8964db 1060
1061 $ $0 $@
1062
1063_ACEOF
1064{
1065cat <<_ASUNAME
1066## --------- ##
1067## Platform. ##
1068## --------- ##
1069
1070hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1071uname -m = `(uname -m) 2>/dev/null || echo unknown`
1072uname -r = `(uname -r) 2>/dev/null || echo unknown`
1073uname -s = `(uname -s) 2>/dev/null || echo unknown`
1074uname -v = `(uname -v) 2>/dev/null || echo unknown`
1075
1076/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1077/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1078
1079/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1080/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1081/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1082hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1083/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1084/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1085/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1086
1087_ASUNAME
1088
1089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1090for as_dir in $PATH
1091do
1092 IFS=$as_save_IFS
1093 test -z "$as_dir" && as_dir=.
1094 echo "PATH: $as_dir"
1095done
1096
1097} >&5
1098
1099cat >&5 <<_ACEOF
1100
1101
1102## ----------- ##
1103## Core tests. ##
1104## ----------- ##
1105
1106_ACEOF
1107
1108
1109# Keep a trace of the command line.
1110# Strip out --no-create and --no-recursion so they do not pile up.
1111# Strip out --silent because we don't want to record it for future runs.
1112# Also quote any args containing shell meta-characters.
1113# Make two passes to allow for proper duplicate-argument suppression.
1114ac_configure_args=
1115ac_configure_args0=
1116ac_configure_args1=
1117ac_sep=
1118ac_must_keep_next=false
1119for ac_pass in 1 2
1120do
1121 for ac_arg
1122 do
1123 case $ac_arg in
1124 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1125 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1126 | -silent | --silent | --silen | --sile | --sil)
1127 continue ;;
1128 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1129 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1130 esac
1131 case $ac_pass in
1132 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1133 2)
1134 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1135 if test $ac_must_keep_next = true; then
9ebd0bb2 1136 ac_must_keep_next=false # Got value, back to normal.
6a8964db 1137 else
9ebd0bb2 1138 case $ac_arg in
1139 *=* | --config-cache | -C | -disable-* | --disable-* \
1140 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1141 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1142 | -with-* | --with-* | -without-* | --without-* | --x)
1143 case "$ac_configure_args0 " in
1144 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1145 esac
1146 ;;
1147 -* ) ac_must_keep_next=true ;;
1148 esac
6a8964db 1149 fi
1150 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1151 # Get rid of the leading space.
1152 ac_sep=" "
1153 ;;
1154 esac
1155 done
1156done
1157$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1158$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1159
1160# When interrupted or exit'd, cleanup temporary files, and complete
1161# config.log. We remove comments because anyway the quotes in there
1162# would cause problems or look ugly.
1163# WARNING: Be sure not to use single quotes in there, as some shells,
1164# such as our DU 5.0 friend, will then `close' the trap.
1165trap 'exit_status=$?
1166 # Save into config.log some information that might help in debugging.
1167 {
1168 echo
1169
1170 cat <<\_ASBOX
1171## ---------------- ##
1172## Cache variables. ##
1173## ---------------- ##
1174_ASBOX
1175 echo
1176 # The following way of writing the cache mishandles newlines in values,
1177{
1178 (set) 2>&1 |
1179 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1180 *ac_space=\ *)
1181 sed -n \
9ebd0bb2 1182 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1183 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
6a8964db 1184 ;;
1185 *)
1186 sed -n \
9ebd0bb2 1187 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
6a8964db 1188 ;;
1189 esac;
1190}
1191 echo
1192
1193 cat <<\_ASBOX
1194## ----------------- ##
1195## Output variables. ##
1196## ----------------- ##
1197_ASBOX
1198 echo
1199 for ac_var in $ac_subst_vars
1200 do
1201 eval ac_val=$`echo $ac_var`
1202 echo "$ac_var='"'"'$ac_val'"'"'"
1203 done | sort
1204 echo
1205
1206 if test -n "$ac_subst_files"; then
1207 cat <<\_ASBOX
1208## ------------- ##
1209## Output files. ##
1210## ------------- ##
1211_ASBOX
1212 echo
1213 for ac_var in $ac_subst_files
1214 do
1215 eval ac_val=$`echo $ac_var`
9ebd0bb2 1216 echo "$ac_var='"'"'$ac_val'"'"'"
6a8964db 1217 done | sort
1218 echo
1219 fi
1220
1221 if test -s confdefs.h; then
1222 cat <<\_ASBOX
1223## ----------- ##
1224## confdefs.h. ##
1225## ----------- ##
1226_ASBOX
1227 echo
1228 sed "/^$/d" confdefs.h | sort
1229 echo
1230 fi
1231 test "$ac_signal" != 0 &&
1232 echo "$as_me: caught signal $ac_signal"
1233 echo "$as_me: exit $exit_status"
1234 } >&5
9ebd0bb2 1235 rm -f core *.core &&
6a8964db 1236 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1237 exit $exit_status
1238 ' 0
1239for ac_signal in 1 2 13 15; do
1240 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1241done
1242ac_signal=0
1243
1244# confdefs.h avoids OS command line length limits that DEFS can exceed.
1245rm -rf conftest* confdefs.h
1246# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1247echo >confdefs.h
1248
1249# Predefined preprocessor variables.
1250
1251cat >>confdefs.h <<_ACEOF
1252#define PACKAGE_NAME "$PACKAGE_NAME"
1253_ACEOF
1254
1255
1256cat >>confdefs.h <<_ACEOF
1257#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1258_ACEOF
1259
1260
1261cat >>confdefs.h <<_ACEOF
1262#define PACKAGE_VERSION "$PACKAGE_VERSION"
1263_ACEOF
1264
1265
1266cat >>confdefs.h <<_ACEOF
1267#define PACKAGE_STRING "$PACKAGE_STRING"
1268_ACEOF
1269
1270
1271cat >>confdefs.h <<_ACEOF
1272#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1273_ACEOF
1274
1275
1276# Let the site file select an alternate cache file if it wants to.
1277# Prefer explicitly selected file to automatically selected ones.
1278if test -z "$CONFIG_SITE"; then
1279 if test "x$prefix" != xNONE; then
1280 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1281 else
1282 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1283 fi
1284fi
1285for ac_site_file in $CONFIG_SITE; do
1286 if test -r "$ac_site_file"; then
1287 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1288echo "$as_me: loading site script $ac_site_file" >&6;}
1289 sed 's/^/| /' "$ac_site_file" >&5
1290 . "$ac_site_file"
1291 fi
1292done
1293
1294if test -r "$cache_file"; then
1295 # Some versions of bash will fail to source /dev/null (special
1296 # files actually), so we avoid doing that.
1297 if test -f "$cache_file"; then
1298 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1299echo "$as_me: loading cache $cache_file" >&6;}
1300 case $cache_file in
1301 [\\/]* | ?:[\\/]* ) . $cache_file;;
1302 *) . ./$cache_file;;
1303 esac
1304 fi
1305else
1306 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1307echo "$as_me: creating cache $cache_file" >&6;}
1308 >$cache_file
1309fi
1310
1311# Check that the precious variables saved in the cache have kept the same
1312# value.
1313ac_cache_corrupted=false
1314for ac_var in `(set) 2>&1 |
9ebd0bb2 1315 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
6a8964db 1316 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1317 eval ac_new_set=\$ac_env_${ac_var}_set
1318 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1319 eval ac_new_val="\$ac_env_${ac_var}_value"
1320 case $ac_old_set,$ac_new_set in
1321 set,)
1322 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1323echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1324 ac_cache_corrupted=: ;;
1325 ,set)
1326 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1327echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1328 ac_cache_corrupted=: ;;
1329 ,);;
1330 *)
1331 if test "x$ac_old_val" != "x$ac_new_val"; then
9ebd0bb2 1332 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
6a8964db 1333echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
9ebd0bb2 1334 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
6a8964db 1335echo "$as_me: former value: $ac_old_val" >&2;}
9ebd0bb2 1336 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
6a8964db 1337echo "$as_me: current value: $ac_new_val" >&2;}
9ebd0bb2 1338 ac_cache_corrupted=:
6a8964db 1339 fi;;
1340 esac
1341 # Pass precious variables to config.status.
1342 if test "$ac_new_set" = set; then
1343 case $ac_new_val in
1344 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1345 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1346 *) ac_arg=$ac_var=$ac_new_val ;;
1347 esac
1348 case " $ac_configure_args " in
1349 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1350 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1351 esac
1352 fi
1353done
1354if $ac_cache_corrupted; then
1355 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1356echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1357 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1358echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1359 { (exit 1); exit 1; }; }
1360fi
1361
1362ac_ext=c
1363ac_cpp='$CPP $CPPFLAGS'
1364ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1365ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1366ac_compiler_gnu=$ac_cv_c_compiler_gnu
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1211e6bc 1386
6a8964db 1387 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1388
1389
f32e3360 1390gcc_version=`cat $srcdir/BASE-VER`
1391
6a8964db 1392# Determine the host, build, and target systems
1393ac_aux_dir=
1394for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1395 if test -f $ac_dir/install-sh; then
1396 ac_aux_dir=$ac_dir
1397 ac_install_sh="$ac_aux_dir/install-sh -c"
1398 break
1399 elif test -f $ac_dir/install.sh; then
1400 ac_aux_dir=$ac_dir
1401 ac_install_sh="$ac_aux_dir/install.sh -c"
1402 break
1403 elif test -f $ac_dir/shtool; then
1404 ac_aux_dir=$ac_dir
1405 ac_install_sh="$ac_aux_dir/shtool install -c"
1406 break
1407 fi
1408done
1409if test -z "$ac_aux_dir"; then
1410 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1411echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1412 { (exit 1); exit 1; }; }
1413fi
1414ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1415ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1416ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1417
1418# Make sure we can run config.sub.
1419$ac_config_sub sun4 >/dev/null 2>&1 ||
1420 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1421echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1422 { (exit 1); exit 1; }; }
1423
1424echo "$as_me:$LINENO: checking build system type" >&5
1425echo $ECHO_N "checking build system type... $ECHO_C" >&6
1426if test "${ac_cv_build+set}" = set; then
1427 echo $ECHO_N "(cached) $ECHO_C" >&6
1428else
1429 ac_cv_build_alias=$build_alias
1430test -z "$ac_cv_build_alias" &&
1431 ac_cv_build_alias=`$ac_config_guess`
1432test -z "$ac_cv_build_alias" &&
1433 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1434echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1435 { (exit 1); exit 1; }; }
1436ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1437 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1438echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1439 { (exit 1); exit 1; }; }
1440
1441fi
1442echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1443echo "${ECHO_T}$ac_cv_build" >&6
1444build=$ac_cv_build
1445build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1446build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1447build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1448
1449
1450echo "$as_me:$LINENO: checking host system type" >&5
1451echo $ECHO_N "checking host system type... $ECHO_C" >&6
1452if test "${ac_cv_host+set}" = set; then
1453 echo $ECHO_N "(cached) $ECHO_C" >&6
1454else
1455 ac_cv_host_alias=$host_alias
1456test -z "$ac_cv_host_alias" &&
1457 ac_cv_host_alias=$ac_cv_build_alias
1458ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1459 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1460echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1461 { (exit 1); exit 1; }; }
1462
1463fi
1464echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1465echo "${ECHO_T}$ac_cv_host" >&6
1466host=$ac_cv_host
1467host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1468host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1469host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1470
1471
1472echo "$as_me:$LINENO: checking target system type" >&5
1473echo $ECHO_N "checking target system type... $ECHO_C" >&6
1474if test "${ac_cv_target+set}" = set; then
1475 echo $ECHO_N "(cached) $ECHO_C" >&6
1476else
1477 ac_cv_target_alias=$target_alias
1478test "x$ac_cv_target_alias" = "x" &&
1479 ac_cv_target_alias=$ac_cv_host_alias
1480ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1481 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1482echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1483 { (exit 1); exit 1; }; }
1484
1485fi
1486echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1487echo "${ECHO_T}$ac_cv_target" >&6
1488target=$ac_cv_target
1489target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1490target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1491target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1492
1493
1494# The aliases save the names the user supplied, while $host etc.
1495# will get canonicalized.
1496test -n "$target_alias" &&
1497 test "$program_prefix$program_suffix$program_transform_name" = \
1498 NONENONEs,x,x, &&
1499 program_prefix=${target_alias}-
1500
1501# Determine the noncanonical target name, for directory use.
1502 case ${build_alias} in
1503 "") build_noncanonical=${build} ;;
c9cd172c 1504 *) build_noncanonical=${build_alias} ;;
1505esac
966842d4 1506
4f442f07 1507 case ${host_alias} in
1508 "") host_noncanonical=${build_noncanonical} ;;
1509 *) host_noncanonical=${host_alias} ;;
1510esac
966842d4 1511
4f442f07 1512 case ${target_alias} in
1513 "") target_noncanonical=${host_noncanonical} ;;
1514 *) target_noncanonical=${target_alias} ;;
1515esac
9af7c2e2 1516
c2c28e49 1517
1518
1519
1520# Determine the target- and build-specific subdirectories
4f442f07 1521 # Prefix 'build-' so this never conflicts with target_subdir.
1522build_subdir="build-${build_noncanonical}"
c1eb9e31 1523# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1524if ( test $srcdir = . && test -d gcc ) \
1525 || test -d $srcdir/../host-${host_noncanonical}; then
1526 host_subdir="host-${host_noncanonical}"
1527else
1528 host_subdir=.
1529fi
4f442f07 1530# No prefix.
1531target_subdir=${target_noncanonical}
6a8964db 1532
966842d4 1533
9af7c2e2 1534# Set program_transform_name
1c6c0617 1535test "$program_prefix" != NONE &&
6a8964db 1536 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1c6c0617 1537# Use a double $ so make ignores it.
1538test "$program_suffix" != NONE &&
6a8964db 1539 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1540# Double any \ or $. echo might interpret backslashes.
1541# By default was `s,x,x', remove it if useless.
1542cat <<\_ACEOF >conftest.sed
1543s/[\\$]/&&/g;s/;s,x,x,$//
1544_ACEOF
1545program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1546rm conftest.sed
1c6c0617 1547
1548
7349ace9 1549# Check for bogus environment variables.
1550# Test if LIBRARY_PATH contains the notation for the current directory
1551# since this would lead to problems installing/building glibc.
1552# LIBRARY_PATH contains the current directory if one of the following
1553# is true:
1554# - one of the terminals (":" and ";") is the first or last sign
1555# - two terminals occur directly after each other
1556# - the path contains an element with a dot in it
6a8964db 1557echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1558echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
7349ace9 1559case ${LIBRARY_PATH} in
1560 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1561 library_path_setting="contains current directory"
1562 ;;
1563 *)
1564 library_path_setting="ok"
1565 ;;
1566esac
6a8964db 1567echo "$as_me:$LINENO: result: $library_path_setting" >&5
1568echo "${ECHO_T}$library_path_setting" >&6
7349ace9 1569if test "$library_path_setting" != "ok"; then
6a8964db 1570{ { echo "$as_me:$LINENO: error:
7349ace9 1571*** LIBRARY_PATH shouldn't contain the current directory when
1572*** building gcc. Please change the environment variable
6a8964db 1573*** and run configure again." >&5
1574echo "$as_me: error:
1575*** LIBRARY_PATH shouldn't contain the current directory when
1576*** building gcc. Please change the environment variable
1577*** and run configure again." >&2;}
1578 { (exit 1); exit 1; }; }
0dbd1c74 1579fi
1580
7349ace9 1581# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1582# since this would lead to problems installing/building glibc.
1583# GCC_EXEC_PREFIX contains the current directory if one of the following
1584# is true:
1585# - one of the terminals (":" and ";") is the first or last sign
1586# - two terminals occur directly after each other
1587# - the path contains an element with a dot in it
6a8964db 1588echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1589echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
7349ace9 1590case ${GCC_EXEC_PREFIX} in
1591 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1592 gcc_exec_prefix_setting="contains current directory"
1593 ;;
1594 *)
1595 gcc_exec_prefix_setting="ok"
1596 ;;
1597esac
6a8964db 1598echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1599echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
7349ace9 1600if test "$gcc_exec_prefix_setting" != "ok"; then
6a8964db 1601{ { echo "$as_me:$LINENO: error:
1602*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1603*** building gcc. Please change the environment variable
1604*** and run configure again." >&5
1605echo "$as_me: error:
c9e1a048 1606*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1607*** building gcc. Please change the environment variable
6a8964db 1608*** and run configure again." >&2;}
1609 { (exit 1); exit 1; }; }
7349ace9 1610fi
1611
1612# -----------
1613# Directories
1614# -----------
1615
1616# Specify the local prefix
1617local_prefix=
6a8964db 1618
7349ace9 1619# Check whether --with-local-prefix or --without-local-prefix was given.
1620if test "${with_local_prefix+set}" = set; then
1621 withval="$with_local_prefix"
1622 case "${withval}" in
6a8964db 1623yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1624echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1625 { (exit 1); exit 1; }; } ;;
7349ace9 1626no) ;;
1627*) local_prefix=$with_local_prefix ;;
1628esac
6a8964db 1629fi;
7349ace9 1630
1631# Default local prefix if it is empty
1632if test x$local_prefix = x; then
1633 local_prefix=/usr/local
1634fi
1635
1636# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1637# passed in by the toplevel make and thus we'd get different behavior
1638# depending on where we built the sources.
1639gcc_gxx_include_dir=
1640# Specify the g++ header file directory
6a8964db 1641
7349ace9 1642# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1643if test "${with_gxx_include_dir+set}" = set; then
1644 withval="$with_gxx_include_dir"
1645 case "${withval}" in
6a8964db 1646yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1647echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1648 { (exit 1); exit 1; }; } ;;
7349ace9 1649no) ;;
1650*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1651esac
6a8964db 1652fi;
7349ace9 1653
1654if test x${gcc_gxx_include_dir} = x; then
1655 if test x${enable_version_specific_runtime_libs} = xyes; then
1656 gcc_gxx_include_dir='${libsubdir}/include/c++'
1657 else
1af67e62 1658 libstdcxx_incdir='c++/$(version)'
7349ace9 1659 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
1660 fi
1661fi
1662
6a8964db 1663
7349ace9 1664# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1665if test "${with_cpp_install_dir+set}" = set; then
1666 withval="$with_cpp_install_dir"
1667 if test x$withval = xyes; then
6a8964db 1668 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1669echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1670 { (exit 1); exit 1; }; }
7349ace9 1671elif test x$withval != xno; then
1672 cpp_install_dir=$withval
1673fi
6a8964db 1674fi;
7349ace9 1675
37c96b91 1676# We would like to our source tree to be readonly. However when releases or
6a8964db 1677# pre-releases are generated, the flex/bison generated files as well as the
37c96b91 1678# various formats of manuals need to be included along with the rest of the
6a8964db 1679# sources. Therefore we have --enable-generated-files-in-srcdir to do
37c96b91 1680# just that.
1681
a6b4c5a9 1682echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1683echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1684 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
37c96b91 1685if test "${enable_generated_files_in_srcdir+set}" = set; then
1686 enableval="$enable_generated_files_in_srcdir"
a6b4c5a9 1687 generated_files_in_srcdir=$enableval
37c96b91 1688else
a6b4c5a9 1689 generated_files_in_srcdir=no
6a8964db 1690fi;
37c96b91 1691
a6b4c5a9 1692echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1693echo "${ECHO_T}$generated_files_in_srcdir" >&6
1694
1695if test "$generated_files_in_srcdir" = "yes"; then
1696 GENINSRC=''
a6b4c5a9 1697else
1698 GENINSRC='#'
a6b4c5a9 1699fi
1700
1701
7349ace9 1702# -------------------
1703# Find default linker
1704# -------------------
1705
1706# With GNU ld
6a8964db 1707
7349ace9 1708# Check whether --with-gnu-ld or --without-gnu-ld was given.
1709if test "${with_gnu_ld+set}" = set; then
1710 withval="$with_gnu_ld"
1711 gnu_ld_flag="$with_gnu_ld"
1712else
1713 gnu_ld_flag=no
6a8964db 1714fi;
c9cd172c 1715
12b432e0 1716# With pre-defined ld
6a8964db 1717
7349ace9 1718# Check whether --with-ld or --without-ld was given.
1719if test "${with_ld+set}" = set; then
1720 withval="$with_ld"
1721 DEFAULT_LINKER="$with_ld"
6a8964db 1722fi;
7349ace9 1723if test x"${DEFAULT_LINKER+set}" = x"set"; then
1724 if test ! -x "$DEFAULT_LINKER"; then
b452b31a 1725 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1726echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1727 { (exit 1); exit 1; }; }
7349ace9 1728 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1729 gnu_ld_flag=yes
1730 fi
6a8964db 1731
1732cat >>confdefs.h <<_ACEOF
7349ace9 1733#define DEFAULT_LINKER "$DEFAULT_LINKER"
6a8964db 1734_ACEOF
7349ace9 1735
1736fi
1737
6a8964db 1738echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1739echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
7349ace9 1740if test x"${DEFAULT_LINKER+set}" = x"set"; then
1741 if test x"$gnu_ld_flag" = x"no"; then
6a8964db 1742 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1743echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
7349ace9 1744 else
6a8964db 1745 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1746echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
7349ace9 1747 fi
1748else
6a8964db 1749 echo "$as_me:$LINENO: result: no" >&5
1750echo "${ECHO_T}no" >&6
7349ace9 1751fi
1752
9c948bc2 1753# With demangler in GNU ld
1754
1755# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
1756if test "${with_demangler_in_ld+set}" = set; then
1757 withval="$with_demangler_in_ld"
1758 demangler_in_ld="$with_demangler_in_ld"
1759else
1760 demangler_in_ld=no
1761fi;
1762
7349ace9 1763# ----------------------
1764# Find default assembler
1765# ----------------------
1766
1767# With GNU as
6a8964db 1768
7349ace9 1769# Check whether --with-gnu-as or --without-gnu-as was given.
1770if test "${with_gnu_as+set}" = set; then
1771 withval="$with_gnu_as"
1772 gas_flag="$with_gnu_as"
1773else
1774 gas_flag=no
6a8964db 1775fi;
7349ace9 1776
1777
1778# Check whether --with-as or --without-as was given.
1779if test "${with_as+set}" = set; then
1780 withval="$with_as"
1781 DEFAULT_ASSEMBLER="$with_as"
6a8964db 1782fi;
7349ace9 1783if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1784 if test ! -x "$DEFAULT_ASSEMBLER"; then
b452b31a 1785 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1786echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1787 { (exit 1); exit 1; }; }
7349ace9 1788 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1789 gas_flag=yes
1790 fi
6a8964db 1791
1792cat >>confdefs.h <<_ACEOF
7349ace9 1793#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
6a8964db 1794_ACEOF
7349ace9 1795
1796fi
1797
6a8964db 1798echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1799echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
7349ace9 1800if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1801 if test x"$gas_flag" = x"no"; then
6a8964db 1802 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1803echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
7349ace9 1804 else
6a8964db 1805 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1806echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
7349ace9 1807 fi
1808else
6a8964db 1809 echo "$as_me:$LINENO: result: no" >&5
1810echo "${ECHO_T}no" >&6
7349ace9 1811fi
1812
1813# ---------------
1814# Find C compiler
1815# ---------------
1816
f7a804c7 1817# If a non-executable a.out is present (e.g. created by GNU as above even if
1818# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1819# file, even when creating an executable, so an execution test fails.
1820# Remove possible default executable files to avoid this.
1821#
1822# FIXME: This really belongs into AC_PROG_CC and can be removed once
1823# Autoconf includes it.
1824rm -f a.out a.exe b.out
1825
7349ace9 1826# Find the native compiler
6a8964db 1827ac_ext=c
1828ac_cpp='$CPP $CPPFLAGS'
1829ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1830ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1831ac_compiler_gnu=$ac_cv_c_compiler_gnu
1832if test -n "$ac_tool_prefix"; then
1833 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1834set dummy ${ac_tool_prefix}gcc; ac_word=$2
1835echo "$as_me:$LINENO: checking for $ac_word" >&5
1836echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1837if test "${ac_cv_prog_CC+set}" = set; then
1838 echo $ECHO_N "(cached) $ECHO_C" >&6
1839else
1840 if test -n "$CC"; then
1841 ac_cv_prog_CC="$CC" # Let the user override the test.
1842else
1843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1844for as_dir in $PATH
1845do
1846 IFS=$as_save_IFS
1847 test -z "$as_dir" && as_dir=.
1848 for ac_exec_ext in '' $ac_executable_extensions; do
1849 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1850 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1851 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1852 break 2
1853 fi
1854done
1855done
1856
1857fi
1858fi
1859CC=$ac_cv_prog_CC
1860if test -n "$CC"; then
1861 echo "$as_me:$LINENO: result: $CC" >&5
1862echo "${ECHO_T}$CC" >&6
1863else
1864 echo "$as_me:$LINENO: result: no" >&5
1865echo "${ECHO_T}no" >&6
1866fi
1867
1868fi
1869if test -z "$ac_cv_prog_CC"; then
1870 ac_ct_CC=$CC
1871 # Extract the first word of "gcc", so it can be a program name with args.
c9cd172c 1872set dummy gcc; ac_word=$2
6a8964db 1873echo "$as_me:$LINENO: checking for $ac_word" >&5
1874echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1875if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1876 echo $ECHO_N "(cached) $ECHO_C" >&6
1877else
1878 if test -n "$ac_ct_CC"; then
1879 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1880else
1881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1882for as_dir in $PATH
1883do
1884 IFS=$as_save_IFS
1885 test -z "$as_dir" && as_dir=.
1886 for ac_exec_ext in '' $ac_executable_extensions; do
1887 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1888 ac_cv_prog_ac_ct_CC="gcc"
1889 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1890 break 2
1891 fi
1892done
1893done
1894
1895fi
1896fi
1897ac_ct_CC=$ac_cv_prog_ac_ct_CC
1898if test -n "$ac_ct_CC"; then
1899 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1900echo "${ECHO_T}$ac_ct_CC" >&6
1901else
1902 echo "$as_me:$LINENO: result: no" >&5
1903echo "${ECHO_T}no" >&6
1904fi
1905
1906 CC=$ac_ct_CC
1907else
1908 CC="$ac_cv_prog_CC"
1909fi
1910
1911if test -z "$CC"; then
1912 if test -n "$ac_tool_prefix"; then
1913 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1914set dummy ${ac_tool_prefix}cc; ac_word=$2
1915echo "$as_me:$LINENO: checking for $ac_word" >&5
1916echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1917if test "${ac_cv_prog_CC+set}" = set; then
1918 echo $ECHO_N "(cached) $ECHO_C" >&6
5f3760f6 1919else
1920 if test -n "$CC"; then
1921 ac_cv_prog_CC="$CC" # Let the user override the test.
1922else
6a8964db 1923as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1924for as_dir in $PATH
1925do
1926 IFS=$as_save_IFS
1927 test -z "$as_dir" && as_dir=.
1928 for ac_exec_ext in '' $ac_executable_extensions; do
1929 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1930 ac_cv_prog_CC="${ac_tool_prefix}cc"
1931 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1932 break 2
1933 fi
1934done
1935done
1936
5f3760f6 1937fi
1938fi
6a8964db 1939CC=$ac_cv_prog_CC
5f3760f6 1940if test -n "$CC"; then
6a8964db 1941 echo "$as_me:$LINENO: result: $CC" >&5
1942echo "${ECHO_T}$CC" >&6
1943else
1944 echo "$as_me:$LINENO: result: no" >&5
1945echo "${ECHO_T}no" >&6
1946fi
1947
1948fi
1949if test -z "$ac_cv_prog_CC"; then
1950 ac_ct_CC=$CC
1951 # Extract the first word of "cc", so it can be a program name with args.
1952set dummy cc; ac_word=$2
1953echo "$as_me:$LINENO: checking for $ac_word" >&5
1954echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1955if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1956 echo $ECHO_N "(cached) $ECHO_C" >&6
1957else
1958 if test -n "$ac_ct_CC"; then
1959 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1960else
1961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1962for as_dir in $PATH
1963do
1964 IFS=$as_save_IFS
1965 test -z "$as_dir" && as_dir=.
1966 for ac_exec_ext in '' $ac_executable_extensions; do
1967 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1968 ac_cv_prog_ac_ct_CC="cc"
1969 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1970 break 2
1971 fi
1972done
1973done
1974
1975fi
1976fi
1977ac_ct_CC=$ac_cv_prog_ac_ct_CC
1978if test -n "$ac_ct_CC"; then
1979 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1980echo "${ECHO_T}$ac_ct_CC" >&6
1981else
1982 echo "$as_me:$LINENO: result: no" >&5
1983echo "${ECHO_T}no" >&6
1984fi
1985
1986 CC=$ac_ct_CC
5f3760f6 1987else
6a8964db 1988 CC="$ac_cv_prog_CC"
0dbd1c74 1989fi
c9cd172c 1990
6a8964db 1991fi
c9cd172c 1992if test -z "$CC"; then
1993 # Extract the first word of "cc", so it can be a program name with args.
1994set dummy cc; ac_word=$2
6a8964db 1995echo "$as_me:$LINENO: checking for $ac_word" >&5
1996echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1997if test "${ac_cv_prog_CC+set}" = set; then
1998 echo $ECHO_N "(cached) $ECHO_C" >&6
c9cd172c 1999else
2000 if test -n "$CC"; then
2001 ac_cv_prog_CC="$CC" # Let the user override the test.
2002else
2003 ac_prog_rejected=no
6a8964db 2004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2005for as_dir in $PATH
2006do
2007 IFS=$as_save_IFS
2008 test -z "$as_dir" && as_dir=.
2009 for ac_exec_ext in '' $ac_executable_extensions; do
2010 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2011 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2012 ac_prog_rejected=yes
2013 continue
2014 fi
2015 ac_cv_prog_CC="cc"
2016 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2017 break 2
2018 fi
2019done
2020done
2021
c9cd172c 2022if test $ac_prog_rejected = yes; then
2023 # We found a bogon in the path, so make sure we never use it.
2024 set dummy $ac_cv_prog_CC
2025 shift
6a8964db 2026 if test $# != 0; then
c9cd172c 2027 # We chose a different compiler from the bogus one.
2028 # However, it has the same basename, so the bogon will be chosen
2029 # first if we set CC to just the basename; use the full file name.
2030 shift
6a8964db 2031 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
0dbd1c74 2032 fi
c9cd172c 2033fi
2034fi
2035fi
6a8964db 2036CC=$ac_cv_prog_CC
c9cd172c 2037if test -n "$CC"; then
6a8964db 2038 echo "$as_me:$LINENO: result: $CC" >&5
2039echo "${ECHO_T}$CC" >&6
0dbd1c74 2040else
6a8964db 2041 echo "$as_me:$LINENO: result: no" >&5
2042echo "${ECHO_T}no" >&6
0dbd1c74 2043fi
c9cd172c 2044
6a8964db 2045fi
2046if test -z "$CC"; then
2047 if test -n "$ac_tool_prefix"; then
2048 for ac_prog in cl
2049 do
2050 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2051set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2052echo "$as_me:$LINENO: checking for $ac_word" >&5
2053echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2054if test "${ac_cv_prog_CC+set}" = set; then
2055 echo $ECHO_N "(cached) $ECHO_C" >&6
9af7c2e2 2056else
c9cd172c 2057 if test -n "$CC"; then
2058 ac_cv_prog_CC="$CC" # Let the user override the test.
2059else
6a8964db 2060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2061for as_dir in $PATH
2062do
2063 IFS=$as_save_IFS
2064 test -z "$as_dir" && as_dir=.
2065 for ac_exec_ext in '' $ac_executable_extensions; do
2066 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2067 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2068 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2069 break 2
2070 fi
2071done
2072done
2073
9af7c2e2 2074fi
c9cd172c 2075fi
6a8964db 2076CC=$ac_cv_prog_CC
c9cd172c 2077if test -n "$CC"; then
6a8964db 2078 echo "$as_me:$LINENO: result: $CC" >&5
2079echo "${ECHO_T}$CC" >&6
c9cd172c 2080else
6a8964db 2081 echo "$as_me:$LINENO: result: no" >&5
2082echo "${ECHO_T}no" >&6
9af7c2e2 2083fi
c9e1a048 2084
6a8964db 2085 test -n "$CC" && break
2086 done
2087fi
2088if test -z "$CC"; then
2089 ac_ct_CC=$CC
2090 for ac_prog in cl
2091do
2092 # Extract the first word of "$ac_prog", so it can be a program name with args.
2093set dummy $ac_prog; ac_word=$2
2094echo "$as_me:$LINENO: checking for $ac_word" >&5
2095echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2096if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2097 echo $ECHO_N "(cached) $ECHO_C" >&6
2098else
2099 if test -n "$ac_ct_CC"; then
2100 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2101else
2102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2103for as_dir in $PATH
2104do
2105 IFS=$as_save_IFS
2106 test -z "$as_dir" && as_dir=.
2107 for ac_exec_ext in '' $ac_executable_extensions; do
2108 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2109 ac_cv_prog_ac_ct_CC="$ac_prog"
2110 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2111 break 2
2112 fi
2113done
2114done
c9cd172c 2115
6a8964db 2116fi
2117fi
2118ac_ct_CC=$ac_cv_prog_ac_ct_CC
2119if test -n "$ac_ct_CC"; then
2120 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2121echo "${ECHO_T}$ac_ct_CC" >&6
2122else
2123 echo "$as_me:$LINENO: result: no" >&5
2124echo "${ECHO_T}no" >&6
2125fi
c9cd172c 2126
6a8964db 2127 test -n "$ac_ct_CC" && break
2128done
12b432e0 2129
6a8964db 2130 CC=$ac_ct_CC
2131fi
2132
2133fi
2134
2135
2136test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2137See \`config.log' for more details." >&5
2138echo "$as_me: error: no acceptable C compiler found in \$PATH
2139See \`config.log' for more details." >&2;}
2140 { (exit 1); exit 1; }; }
2141
2142# Provide some information about the compiler.
2143echo "$as_me:$LINENO:" \
2144 "checking for C compiler version" >&5
2145ac_compiler=`set X $ac_compile; echo $2`
2146{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2147 (eval $ac_compiler --version </dev/null >&5) 2>&5
2148 ac_status=$?
2149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2150 (exit $ac_status); }
2151{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2152 (eval $ac_compiler -v </dev/null >&5) 2>&5
2153 ac_status=$?
2154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2155 (exit $ac_status); }
2156{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2157 (eval $ac_compiler -V </dev/null >&5) 2>&5
2158 ac_status=$?
2159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2160 (exit $ac_status); }
2161
2162cat >conftest.$ac_ext <<_ACEOF
6a8964db 2163/* confdefs.h. */
2164_ACEOF
2165cat confdefs.h >>conftest.$ac_ext
2166cat >>conftest.$ac_ext <<_ACEOF
2167/* end confdefs.h. */
2168
2169int
2170main ()
2171{
12b432e0 2172
6a8964db 2173 ;
2174 return 0;
2175}
2176_ACEOF
2177ac_clean_files_save=$ac_clean_files
2178ac_clean_files="$ac_clean_files a.out a.exe b.out"
2179# Try to create an executable without -o first, disregard a.out.
2180# It will help us diagnose broken compilers, and finding out an intuition
2181# of exeext.
9ebd0bb2 2182echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2183echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
6a8964db 2184ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2185if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2186 (eval $ac_link_default) 2>&5
2187 ac_status=$?
2188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2189 (exit $ac_status); }; then
2190 # Find the output, starting from the most likely. This scheme is
2191# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2192# resort.
2193
2194# Be careful to initialize this variable, since it used to be cached.
2195# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2196ac_cv_exeext=
2197# b.out is created by i960 compilers.
2198for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2199do
2200 test -f "$ac_file" || continue
2201 case $ac_file in
2202 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
9ebd0bb2 2203 ;;
6a8964db 2204 conftest.$ac_ext )
9ebd0bb2 2205 # This is the source file.
2206 ;;
6a8964db 2207 [ab].out )
9ebd0bb2 2208 # We found the default executable, but exeext='' is most
2209 # certainly right.
2210 break;;
6a8964db 2211 *.* )
9ebd0bb2 2212 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2213 # FIXME: I believe we export ac_cv_exeext for Libtool,
2214 # but it would be cool to find out if it's true. Does anybody
2215 # maintain Libtool? --akim.
2216 export ac_cv_exeext
2217 break;;
6a8964db 2218 * )
9ebd0bb2 2219 break;;
6a8964db 2220 esac
2221done
2222else
2223 echo "$as_me: failed program was:" >&5
2224sed 's/^/| /' conftest.$ac_ext >&5
2225
2226{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2227See \`config.log' for more details." >&5
2228echo "$as_me: error: C compiler cannot create executables
2229See \`config.log' for more details." >&2;}
2230 { (exit 77); exit 77; }; }
2231fi
2232
2233ac_exeext=$ac_cv_exeext
2234echo "$as_me:$LINENO: result: $ac_file" >&5
2235echo "${ECHO_T}$ac_file" >&6
2236
2237# Check the compiler produces executables we can run. If not, either
2238# the compiler is broken, or we cross compile.
2239echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2240echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2241# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2242# If not cross compiling, check that we can run a simple program.
2243if test "$cross_compiling" != yes; then
2244 if { ac_try='./$ac_file'
2245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2246 (eval $ac_try) 2>&5
2247 ac_status=$?
2248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2249 (exit $ac_status); }; }; then
2250 cross_compiling=no
c9cd172c 2251 else
6a8964db 2252 if test "$cross_compiling" = maybe; then
2253 cross_compiling=yes
2254 else
2255 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2256If you meant to cross compile, use \`--host'.
2257See \`config.log' for more details." >&5
2258echo "$as_me: error: cannot run C compiled programs.
2259If you meant to cross compile, use \`--host'.
2260See \`config.log' for more details." >&2;}
2261 { (exit 1); exit 1; }; }
2262 fi
c9cd172c 2263 fi
2264fi
6a8964db 2265echo "$as_me:$LINENO: result: yes" >&5
2266echo "${ECHO_T}yes" >&6
2267
2268rm -f a.out a.exe conftest$ac_cv_exeext b.out
2269ac_clean_files=$ac_clean_files_save
2270# Check the compiler produces executables we can run. If not, either
2271# the compiler is broken, or we cross compile.
2272echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2273echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2274echo "$as_me:$LINENO: result: $cross_compiling" >&5
2275echo "${ECHO_T}$cross_compiling" >&6
2276
2277echo "$as_me:$LINENO: checking for suffix of executables" >&5
2278echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2279if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2280 (eval $ac_link) 2>&5
2281 ac_status=$?
2282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2283 (exit $ac_status); }; then
2284 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2285# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2286# work properly (i.e., refer to `conftest.exe'), while it won't with
2287# `rm'.
2288for ac_file in conftest.exe conftest conftest.*; do
2289 test -f "$ac_file" || continue
2290 case $ac_file in
2291 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2292 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
9ebd0bb2 2293 export ac_cv_exeext
2294 break;;
6a8964db 2295 * ) break;;
2296 esac
2297done
0dbd1c74 2298else
6a8964db 2299 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2300See \`config.log' for more details." >&5
2301echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2302See \`config.log' for more details." >&2;}
2303 { (exit 1); exit 1; }; }
2304fi
2305
2306rm -f conftest$ac_cv_exeext
2307echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2308echo "${ECHO_T}$ac_cv_exeext" >&6
2309
2310rm -f conftest.$ac_ext
2311EXEEXT=$ac_cv_exeext
2312ac_exeext=$EXEEXT
2313echo "$as_me:$LINENO: checking for suffix of object files" >&5
2314echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2315if test "${ac_cv_objext+set}" = set; then
2316 echo $ECHO_N "(cached) $ECHO_C" >&6
2317else
2318 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2319/* confdefs.h. */
2320_ACEOF
2321cat confdefs.h >>conftest.$ac_ext
2322cat >>conftest.$ac_ext <<_ACEOF
2323/* end confdefs.h. */
2324
2325int
2326main ()
2327{
c9cd172c 2328
6a8964db 2329 ;
2330 return 0;
2331}
2332_ACEOF
2333rm -f conftest.o conftest.obj
2334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2335 (eval $ac_compile) 2>&5
2336 ac_status=$?
2337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2338 (exit $ac_status); }; then
2339 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2340 case $ac_file in
2341 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2342 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2343 break;;
2344 esac
2345done
12b432e0 2346else
6a8964db 2347 echo "$as_me: failed program was:" >&5
2348sed 's/^/| /' conftest.$ac_ext >&5
2349
2350{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2351See \`config.log' for more details." >&5
2352echo "$as_me: error: cannot compute suffix of object files: cannot compile
2353See \`config.log' for more details." >&2;}
2354 { (exit 1); exit 1; }; }
2355fi
2356
2357rm -f conftest.$ac_cv_objext conftest.$ac_ext
2358fi
2359echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2360echo "${ECHO_T}$ac_cv_objext" >&6
2361OBJEXT=$ac_cv_objext
2362ac_objext=$OBJEXT
2363echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2364echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2365if test "${ac_cv_c_compiler_gnu+set}" = set; then
2366 echo $ECHO_N "(cached) $ECHO_C" >&6
2367else
2368 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2369/* confdefs.h. */
2370_ACEOF
2371cat confdefs.h >>conftest.$ac_ext
2372cat >>conftest.$ac_ext <<_ACEOF
2373/* end confdefs.h. */
2374
2375int
2376main ()
2377{
2378#ifndef __GNUC__
2379 choke me
2380#endif
c9cd172c 2381
6a8964db 2382 ;
2383 return 0;
2384}
2385_ACEOF
2386rm -f conftest.$ac_objext
2387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 2388 (eval $ac_compile) 2>conftest.er1
6a8964db 2389 ac_status=$?
9ebd0bb2 2390 grep -v '^ *+' conftest.er1 >conftest.err
2391 rm -f conftest.er1
2392 cat conftest.err >&5
6a8964db 2393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2394 (exit $ac_status); } &&
c8aeaa6d 2395 { ac_try='test -z "$ac_c_werror_flag"
2396 || test ! -s conftest.err'
9ebd0bb2 2397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2398 (eval $ac_try) 2>&5
2399 ac_status=$?
2400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2401 (exit $ac_status); }; } &&
2402 { ac_try='test -s conftest.$ac_objext'
6a8964db 2403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2404 (eval $ac_try) 2>&5
2405 ac_status=$?
2406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2407 (exit $ac_status); }; }; then
2408 ac_compiler_gnu=yes
2409else
2410 echo "$as_me: failed program was:" >&5
2411sed 's/^/| /' conftest.$ac_ext >&5
2412
2413ac_compiler_gnu=no
2414fi
9ebd0bb2 2415rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6a8964db 2416ac_cv_c_compiler_gnu=$ac_compiler_gnu
2417
2418fi
2419echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2420echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2421GCC=`test $ac_compiler_gnu = yes && echo yes`
2422ac_test_CFLAGS=${CFLAGS+set}
2423ac_save_CFLAGS=$CFLAGS
2424CFLAGS="-g"
2425echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2426echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2427if test "${ac_cv_prog_cc_g+set}" = set; then
2428 echo $ECHO_N "(cached) $ECHO_C" >&6
2429else
2430 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2431/* confdefs.h. */
2432_ACEOF
2433cat confdefs.h >>conftest.$ac_ext
2434cat >>conftest.$ac_ext <<_ACEOF
2435/* end confdefs.h. */
2436
2437int
2438main ()
2439{
2440
2441 ;
2442 return 0;
2443}
2444_ACEOF
2445rm -f conftest.$ac_objext
2446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 2447 (eval $ac_compile) 2>conftest.er1
6a8964db 2448 ac_status=$?
9ebd0bb2 2449 grep -v '^ *+' conftest.er1 >conftest.err
2450 rm -f conftest.er1
2451 cat conftest.err >&5
6a8964db 2452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2453 (exit $ac_status); } &&
c8aeaa6d 2454 { ac_try='test -z "$ac_c_werror_flag"
2455 || test ! -s conftest.err'
9ebd0bb2 2456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2457 (eval $ac_try) 2>&5
2458 ac_status=$?
2459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2460 (exit $ac_status); }; } &&
2461 { ac_try='test -s conftest.$ac_objext'
6a8964db 2462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2463 (eval $ac_try) 2>&5
2464 ac_status=$?
2465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2466 (exit $ac_status); }; }; then
c9cd172c 2467 ac_cv_prog_cc_g=yes
2468else
6a8964db 2469 echo "$as_me: failed program was:" >&5
2470sed 's/^/| /' conftest.$ac_ext >&5
12b432e0 2471
6a8964db 2472ac_cv_prog_cc_g=no
c9cd172c 2473fi
9ebd0bb2 2474rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6a8964db 2475fi
2476echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2477echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
5f3760f6 2478if test "$ac_test_CFLAGS" = set; then
6a8964db 2479 CFLAGS=$ac_save_CFLAGS
5f3760f6 2480elif test $ac_cv_prog_cc_g = yes; then
2481 if test "$GCC" = yes; then
0dbd1c74 2482 CFLAGS="-g -O2"
2483 else
5f3760f6 2484 CFLAGS="-g"
61297650 2485 fi
de0ae752 2486else
5f3760f6 2487 if test "$GCC" = yes; then
2488 CFLAGS="-O2"
2489 else
2490 CFLAGS=
2491 fi
0dbd1c74 2492fi
6a8964db 2493echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2494echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2495if test "${ac_cv_prog_cc_stdc+set}" = set; then
2496 echo $ECHO_N "(cached) $ECHO_C" >&6
2497else
2498 ac_cv_prog_cc_stdc=no
2499ac_save_CC=$CC
2500cat >conftest.$ac_ext <<_ACEOF
6a8964db 2501/* confdefs.h. */
2502_ACEOF
2503cat confdefs.h >>conftest.$ac_ext
2504cat >>conftest.$ac_ext <<_ACEOF
2505/* end confdefs.h. */
2506#include <stdarg.h>
2507#include <stdio.h>
2508#include <sys/types.h>
2509#include <sys/stat.h>
2510/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2511struct buf { int x; };
2512FILE * (*rcsopen) (struct buf *, struct stat *, int);
2513static char *e (p, i)
2514 char **p;
2515 int i;
2516{
2517 return p[i];
2518}
2519static char *f (char * (*g) (char **, int), char **p, ...)
2520{
2521 char *s;
2522 va_list v;
2523 va_start (v,p);
2524 s = g (p, va_arg (v,int));
2525 va_end (v);
2526 return s;
2527}
9ebd0bb2 2528
2529/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2530 function prototypes and stuff, but not '\xHH' hex character constants.
2531 These don't provoke an error unfortunately, instead are silently treated
2532 as 'x'. The following induces an error, until -std1 is added to get
2533 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2534 array size at least. It's necessary to write '\x00'==0 to get something
2535 that's true only with -std1. */
2536int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2537
6a8964db 2538int test (int i, double x);
2539struct s1 {int (*f) (int a);};
2540struct s2 {int (*f) (double a);};
2541int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2542int argc;
2543char **argv;
2544int
2545main ()
2546{
2547return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2548 ;
2549 return 0;
2550}
2551_ACEOF
2552# Don't try gcc -ansi; that turns off useful extensions and
2553# breaks some systems' header files.
2554# AIX -qlanglvl=ansi
2555# Ultrix and OSF/1 -std1
2556# HP-UX 10.20 and later -Ae
2557# HP-UX older versions -Aa -D_HPUX_SOURCE
2558# SVR4 -Xc -D__EXTENSIONS__
2559for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2560do
2561 CC="$ac_save_CC $ac_arg"
2562 rm -f conftest.$ac_objext
2563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 2564 (eval $ac_compile) 2>conftest.er1
6a8964db 2565 ac_status=$?
9ebd0bb2 2566 grep -v '^ *+' conftest.er1 >conftest.err
2567 rm -f conftest.er1
2568 cat conftest.err >&5
6a8964db 2569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2570 (exit $ac_status); } &&
c8aeaa6d 2571 { ac_try='test -z "$ac_c_werror_flag"
2572 || test ! -s conftest.err'
9ebd0bb2 2573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2574 (eval $ac_try) 2>&5
2575 ac_status=$?
2576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2577 (exit $ac_status); }; } &&
2578 { ac_try='test -s conftest.$ac_objext'
6a8964db 2579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2580 (eval $ac_try) 2>&5
2581 ac_status=$?
2582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2583 (exit $ac_status); }; }; then
2584 ac_cv_prog_cc_stdc=$ac_arg
2585break
2586else
2587 echo "$as_me: failed program was:" >&5
2588sed 's/^/| /' conftest.$ac_ext >&5
c9cd172c 2589
6a8964db 2590fi
9ebd0bb2 2591rm -f conftest.err conftest.$ac_objext
6a8964db 2592done
2593rm -f conftest.$ac_ext conftest.$ac_objext
2594CC=$ac_save_CC
2595
2596fi
2597
2598case "x$ac_cv_prog_cc_stdc" in
2599 x|xno)
2600 echo "$as_me:$LINENO: result: none needed" >&5
2601echo "${ECHO_T}none needed" >&6 ;;
2602 *)
2603 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2604echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2605 CC="$CC $ac_cv_prog_cc_stdc" ;;
2606esac
2607
2608# Some people use a C++ compiler to compile C. Since we use `exit',
2609# in C++ we need to declare it. In case someone uses the same compiler
2610# for both compiling C and C++ we need to have the C++ compiler decide
2611# the declaration of exit, since it's the most demanding environment.
2612cat >conftest.$ac_ext <<_ACEOF
2613#ifndef __cplusplus
2614 choke me
2615#endif
2616_ACEOF
2617rm -f conftest.$ac_objext
2618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 2619 (eval $ac_compile) 2>conftest.er1
6a8964db 2620 ac_status=$?
9ebd0bb2 2621 grep -v '^ *+' conftest.er1 >conftest.err
2622 rm -f conftest.er1
2623 cat conftest.err >&5
6a8964db 2624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2625 (exit $ac_status); } &&
c8aeaa6d 2626 { ac_try='test -z "$ac_c_werror_flag"
2627 || test ! -s conftest.err'
9ebd0bb2 2628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2629 (eval $ac_try) 2>&5
2630 ac_status=$?
2631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2632 (exit $ac_status); }; } &&
2633 { ac_try='test -s conftest.$ac_objext'
6a8964db 2634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2635 (eval $ac_try) 2>&5
2636 ac_status=$?
2637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2638 (exit $ac_status); }; }; then
2639 for ac_declaration in \
9ebd0bb2 2640 '' \
6a8964db 2641 'extern "C" void std::exit (int) throw (); using std::exit;' \
2642 'extern "C" void std::exit (int); using std::exit;' \
2643 'extern "C" void exit (int) throw ();' \
2644 'extern "C" void exit (int);' \
2645 'void exit (int);'
2646do
2647 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2648/* confdefs.h. */
2649_ACEOF
2650cat confdefs.h >>conftest.$ac_ext
2651cat >>conftest.$ac_ext <<_ACEOF
2652/* end confdefs.h. */
1f3fcf32 2653$ac_declaration
9ebd0bb2 2654#include <stdlib.h>
6a8964db 2655int
2656main ()
2657{
2658exit (42);
2659 ;
2660 return 0;
2661}
2662_ACEOF
2663rm -f conftest.$ac_objext
2664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 2665 (eval $ac_compile) 2>conftest.er1
6a8964db 2666 ac_status=$?
9ebd0bb2 2667 grep -v '^ *+' conftest.er1 >conftest.err
2668 rm -f conftest.er1
2669 cat conftest.err >&5
6a8964db 2670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2671 (exit $ac_status); } &&
c8aeaa6d 2672 { ac_try='test -z "$ac_c_werror_flag"
2673 || test ! -s conftest.err'
9ebd0bb2 2674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2675 (eval $ac_try) 2>&5
2676 ac_status=$?
2677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2678 (exit $ac_status); }; } &&
2679 { ac_try='test -s conftest.$ac_objext'
6a8964db 2680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2681 (eval $ac_try) 2>&5
2682 ac_status=$?
2683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2684 (exit $ac_status); }; }; then
2685 :
2686else
2687 echo "$as_me: failed program was:" >&5
2688sed 's/^/| /' conftest.$ac_ext >&5
2689
2690continue
2691fi
9ebd0bb2 2692rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6a8964db 2693 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2694/* confdefs.h. */
2695_ACEOF
2696cat confdefs.h >>conftest.$ac_ext
2697cat >>conftest.$ac_ext <<_ACEOF
2698/* end confdefs.h. */
2699$ac_declaration
2700int
2701main ()
2702{
2703exit (42);
2704 ;
2705 return 0;
2706}
2707_ACEOF
2708rm -f conftest.$ac_objext
2709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 2710 (eval $ac_compile) 2>conftest.er1
6a8964db 2711 ac_status=$?
9ebd0bb2 2712 grep -v '^ *+' conftest.er1 >conftest.err
2713 rm -f conftest.er1
2714 cat conftest.err >&5
6a8964db 2715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2716 (exit $ac_status); } &&
c8aeaa6d 2717 { ac_try='test -z "$ac_c_werror_flag"
2718 || test ! -s conftest.err'
9ebd0bb2 2719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2720 (eval $ac_try) 2>&5
2721 ac_status=$?
2722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2723 (exit $ac_status); }; } &&
2724 { ac_try='test -s conftest.$ac_objext'
6a8964db 2725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2726 (eval $ac_try) 2>&5
2727 ac_status=$?
2728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2729 (exit $ac_status); }; }; then
2730 break
3f9b9702 2731else
6a8964db 2732 echo "$as_me: failed program was:" >&5
2733sed 's/^/| /' conftest.$ac_ext >&5
2734
c9cd172c 2735fi
9ebd0bb2 2736rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6a8964db 2737done
2738rm -f conftest*
2739if test -n "$ac_declaration"; then
2740 echo '#ifdef __cplusplus' >>confdefs.h
2741 echo $ac_declaration >>confdefs.h
2742 echo '#endif' >>confdefs.h
2743fi
2744
3f9b9702 2745else
6a8964db 2746 echo "$as_me: failed program was:" >&5
2747sed 's/^/| /' conftest.$ac_ext >&5
2748
2749fi
9ebd0bb2 2750rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6a8964db 2751ac_ext=c
2752ac_cpp='$CPP $CPPFLAGS'
2753ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2754ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2755ac_compiler_gnu=$ac_cv_c_compiler_gnu
2756
2757if test "x$CC" != xcc; then
2758 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2759echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2760else
2761 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2762echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2763fi
2764set dummy $CC; ac_cc=`echo $2 |
2765 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2766if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2767 echo $ECHO_N "(cached) $ECHO_C" >&6
2768else
2769 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2770/* confdefs.h. */
2771_ACEOF
2772cat confdefs.h >>conftest.$ac_ext
2773cat >>conftest.$ac_ext <<_ACEOF
2774/* end confdefs.h. */
2775
2776int
2777main ()
2778{
2779
2780 ;
2781 return 0;
2782}
2783_ACEOF
3f9b9702 2784# Make sure it works both with $CC and with simple cc.
2785# We do the test twice because some compilers refuse to overwrite an
2786# existing .o file with -o, though they will create one.
6a8964db 2787ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2788if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2789 (eval $ac_try) 2>&5
2790 ac_status=$?
2791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2792 (exit $ac_status); } &&
2793 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2794 (eval $ac_try) 2>&5
2795 ac_status=$?
2796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2797 (exit $ac_status); };
3f9b9702 2798then
2799 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2800 if test "x$CC" != xcc; then
2801 # Test first that cc exists at all.
6a8964db 2802 if { ac_try='cc -c conftest.$ac_ext >&5'
2803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2804 (eval $ac_try) 2>&5
2805 ac_status=$?
2806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2807 (exit $ac_status); }; }; then
2808 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2809 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2810 (eval $ac_try) 2>&5
2811 ac_status=$?
2812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2813 (exit $ac_status); } &&
2814 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2815 (eval $ac_try) 2>&5
2816 ac_status=$?
2817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2818 (exit $ac_status); };
3f9b9702 2819 then
9ebd0bb2 2820 # cc works too.
2821 :
3f9b9702 2822 else
9ebd0bb2 2823 # cc exists but doesn't like -o.
2824 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3f9b9702 2825 fi
2826 fi
2827 fi
2828else
2829 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2830fi
2831rm -f conftest*
2832
2833fi
2834if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
6a8964db 2835 echo "$as_me:$LINENO: result: yes" >&5
2836echo "${ECHO_T}yes" >&6
3f9b9702 2837else
6a8964db 2838 echo "$as_me:$LINENO: result: no" >&5
2839echo "${ECHO_T}no" >&6
2840
2841cat >>confdefs.h <<\_ACEOF
3f9b9702 2842#define NO_MINUS_C_MINUS_O 1
6a8964db 2843_ACEOF
3f9b9702 2844
2845fi
2846
524a54cf 2847# expand $ac_aux_dir to an absolute path
2848am_aux_dir=`cd $ac_aux_dir && pwd`
2849
2850# FIXME: we rely on the cache variable name because
2851# there is no other way.
2852set dummy $CC
2853ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2854if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2855 # Losing compiler, so override with the script.
2856 # FIXME: It is wrong to rewrite CC.
2857 # But if we don't then we get into trouble of one sort or another.
2858 # A longer-term fix would be to have automake use am__CC in this case,
2859 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2860 CC="$am_aux_dir/compile $CC"
2861fi
2862
0fa54ff1 2863# autoconf is lame and doesn't give us any substitution variable for this.
2864if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2865 NO_MINUS_C_MINUS_O=yes
2866else
2867 OUTPUT_OPTION='-o $@'
2868fi
2869
2870
2871
966842d4 2872# -------------------------
2873# Check C compiler features
2874# -------------------------
2875
6a8964db 2876ac_ext=c
2877ac_cpp='$CPP $CPPFLAGS'
2878ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2879ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2880ac_compiler_gnu=$ac_cv_c_compiler_gnu
2881echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2882echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3239b2ba 2883# On Suns, sometimes $CPP names a directory.
2884if test -n "$CPP" && test -d "$CPP"; then
2885 CPP=
2886fi
2887if test -z "$CPP"; then
6a8964db 2888 if test "${ac_cv_prog_CPP+set}" = set; then
2889 echo $ECHO_N "(cached) $ECHO_C" >&6
2890else
2891 # Double quotes because CPP needs to be expanded
2892 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2893 do
2894 ac_preproc_ok=false
2895for ac_c_preproc_warn_flag in '' yes
2896do
2897 # Use a header file that comes with gcc, so configuring glibc
2898 # with a fresh cross-compiler works.
2899 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2900 # <limits.h> exists even on freestanding compilers.
3239b2ba 2901 # On the NeXT, cc -E runs the code through the compiler's parser,
6a8964db 2902 # not just through cpp. "Syntax error" is here to catch this case.
2903 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2904/* confdefs.h. */
2905_ACEOF
2906cat confdefs.h >>conftest.$ac_ext
2907cat >>conftest.$ac_ext <<_ACEOF
2908/* end confdefs.h. */
2909#ifdef __STDC__
2910# include <limits.h>
2911#else
2912# include <assert.h>
2913#endif
9ebd0bb2 2914 Syntax error
6a8964db 2915_ACEOF
2916if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2917 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2918 ac_status=$?
2919 grep -v '^ *+' conftest.er1 >conftest.err
2920 rm -f conftest.er1
2921 cat conftest.err >&5
2922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2923 (exit $ac_status); } >/dev/null; then
2924 if test -s conftest.err; then
2925 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 2926 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 2927 else
2928 ac_cpp_err=
2929 fi
2930else
2931 ac_cpp_err=yes
2932fi
2933if test -z "$ac_cpp_err"; then
9af7c2e2 2934 :
c9e1a048 2935else
6a8964db 2936 echo "$as_me: failed program was:" >&5
2937sed 's/^/| /' conftest.$ac_ext >&5
2938
2939 # Broken: fails on valid input.
2940continue
2941fi
2942rm -f conftest.err conftest.$ac_ext
2943
2944 # OK, works on sane cases. Now check whether non-existent headers
2945 # can be detected and how.
2946 cat >conftest.$ac_ext <<_ACEOF
6a8964db 2947/* confdefs.h. */
2948_ACEOF
2949cat confdefs.h >>conftest.$ac_ext
2950cat >>conftest.$ac_ext <<_ACEOF
2951/* end confdefs.h. */
2952#include <ac_nonexistent.h>
2953_ACEOF
2954if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2955 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
2972 # Broken: success on invalid input.
2973continue
2974else
2975 echo "$as_me: failed program was:" >&5
2976sed 's/^/| /' conftest.$ac_ext >&5
2977
2978 # Passes both tests.
2979ac_preproc_ok=:
2980break
2981fi
2982rm -f conftest.err conftest.$ac_ext
2983
2984done
2985# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2986rm -f conftest.err conftest.$ac_ext
2987if $ac_preproc_ok; then
2988 break
2989fi
2990
2991 done
2992 ac_cv_prog_CPP=$CPP
2993
2994fi
2995 CPP=$ac_cv_prog_CPP
2996else
2997 ac_cv_prog_CPP=$CPP
2998fi
2999echo "$as_me:$LINENO: result: $CPP" >&5
3000echo "${ECHO_T}$CPP" >&6
3001ac_preproc_ok=false
3002for ac_c_preproc_warn_flag in '' yes
3003do
3004 # Use a header file that comes with gcc, so configuring glibc
3005 # with a fresh cross-compiler works.
3006 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3007 # <limits.h> exists even on freestanding compilers.
3008 # On the NeXT, cc -E runs the code through the compiler's parser,
3009 # not just through cpp. "Syntax error" is here to catch this case.
3010 cat >conftest.$ac_ext <<_ACEOF
6a8964db 3011/* confdefs.h. */
3012_ACEOF
3013cat confdefs.h >>conftest.$ac_ext
3014cat >>conftest.$ac_ext <<_ACEOF
3015/* end confdefs.h. */
3016#ifdef __STDC__
3017# include <limits.h>
3018#else
3019# include <assert.h>
3020#endif
9ebd0bb2 3021 Syntax error
6a8964db 3022_ACEOF
3023if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3024 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3025 ac_status=$?
3026 grep -v '^ *+' conftest.er1 >conftest.err
3027 rm -f conftest.er1
3028 cat conftest.err >&5
3029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3030 (exit $ac_status); } >/dev/null; then
3031 if test -s conftest.err; then
3032 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 3033 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 3034 else
3035 ac_cpp_err=
3036 fi
3037else
3038 ac_cpp_err=yes
3039fi
3040if test -z "$ac_cpp_err"; then
c9cd172c 3041 :
0fa54ff1 3042else
6a8964db 3043 echo "$as_me: failed program was:" >&5
3044sed 's/^/| /' conftest.$ac_ext >&5
3045
3046 # Broken: fails on valid input.
3047continue
3048fi
3049rm -f conftest.err conftest.$ac_ext
3050
3051 # OK, works on sane cases. Now check whether non-existent headers
3052 # can be detected and how.
3053 cat >conftest.$ac_ext <<_ACEOF
6a8964db 3054/* confdefs.h. */
3055_ACEOF
3056cat confdefs.h >>conftest.$ac_ext
3057cat >>conftest.$ac_ext <<_ACEOF
3058/* end confdefs.h. */
3059#include <ac_nonexistent.h>
3060_ACEOF
3061if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3062 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
c9cd172c 3075else
6a8964db 3076 ac_cpp_err=yes
12b432e0 3077fi
6a8964db 3078if test -z "$ac_cpp_err"; then
3079 # Broken: success on invalid input.
3080continue
3081else
3082 echo "$as_me: failed program was:" >&5
3083sed 's/^/| /' conftest.$ac_ext >&5
3084
3085 # Passes both tests.
3086ac_preproc_ok=:
3087break
12b432e0 3088fi
6a8964db 3089rm -f conftest.err conftest.$ac_ext
3090
3091done
3092# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3093rm -f conftest.err conftest.$ac_ext
3094if $ac_preproc_ok; then
3095 :
c9cd172c 3096else
6a8964db 3097 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3098See \`config.log' for more details." >&5
3099echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3100See \`config.log' for more details." >&2;}
3101 { (exit 1); exit 1; }; }
c9cd172c 3102fi
3103
6a8964db 3104ac_ext=c
3105ac_cpp='$CPP $CPPFLAGS'
3106ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3107ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3108ac_compiler_gnu=$ac_cv_c_compiler_gnu
3109
1f59d204 3110
6a8964db 3111echo "$as_me:$LINENO: checking for inline" >&5
3112echo $ECHO_N "checking for inline... $ECHO_C" >&6
3113if test "${ac_cv_c_inline+set}" = set; then
3114 echo $ECHO_N "(cached) $ECHO_C" >&6
0fa54ff1 3115else
3116 ac_cv_c_inline=no
3117for ac_kw in inline __inline__ __inline; do
6a8964db 3118 cat >conftest.$ac_ext <<_ACEOF
6a8964db 3119/* confdefs.h. */
3120_ACEOF
3121cat confdefs.h >>conftest.$ac_ext
3122cat >>conftest.$ac_ext <<_ACEOF
3123/* end confdefs.h. */
3124#ifndef __cplusplus
3125typedef int foo_t;
3126static $ac_kw foo_t static_foo () {return 0; }
3127$ac_kw foo_t foo () {return 0; }
3128#endif
0fa54ff1 3129
6a8964db 3130_ACEOF
3131rm -f conftest.$ac_objext
3132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 3133 (eval $ac_compile) 2>conftest.er1
6a8964db 3134 ac_status=$?
9ebd0bb2 3135 grep -v '^ *+' conftest.er1 >conftest.err
3136 rm -f conftest.er1
3137 cat conftest.err >&5
6a8964db 3138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3139 (exit $ac_status); } &&
c8aeaa6d 3140 { ac_try='test -z "$ac_c_werror_flag"
3141 || test ! -s conftest.err'
9ebd0bb2 3142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3143 (eval $ac_try) 2>&5
3144 ac_status=$?
3145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3146 (exit $ac_status); }; } &&
3147 { ac_try='test -s conftest.$ac_objext'
6a8964db 3148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3149 (eval $ac_try) 2>&5
3150 ac_status=$?
3151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3152 (exit $ac_status); }; }; then
0fa54ff1 3153 ac_cv_c_inline=$ac_kw; break
3154else
6a8964db 3155 echo "$as_me: failed program was:" >&5
3156sed 's/^/| /' conftest.$ac_ext >&5
3157
0fa54ff1 3158fi
9ebd0bb2 3159rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
0fa54ff1 3160done
3161
3162fi
6a8964db 3163echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3164echo "${ECHO_T}$ac_cv_c_inline" >&6
9ebd0bb2 3165
3166
6a8964db 3167case $ac_cv_c_inline in
0fa54ff1 3168 inline | yes) ;;
9ebd0bb2 3169 *)
3170 case $ac_cv_c_inline in
3171 no) ac_val=;;
3172 *) ac_val=$ac_cv_c_inline;;
3173 esac
3174 cat >>confdefs.h <<_ACEOF
3175#ifndef __cplusplus
3176#define inline $ac_val
3177#endif
6a8964db 3178_ACEOF
9ebd0bb2 3179 ;;
0fa54ff1 3180esac
3181
0fa54ff1 3182
0fa54ff1 3183# sizeof(char) is 1 by definition.
b085c511 3184
3185echo "$as_me:$LINENO: checking for egrep" >&5
3186echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3187if test "${ac_cv_prog_egrep+set}" = set; then
3188 echo $ECHO_N "(cached) $ECHO_C" >&6
3189else
3190 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3191 then ac_cv_prog_egrep='grep -E'
3192 else ac_cv_prog_egrep='egrep'
3193 fi
3194fi
3195echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3196echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3197 EGREP=$ac_cv_prog_egrep
3198
3199
3200echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3201echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3202if test "${ac_cv_header_stdc+set}" = set; then
3203 echo $ECHO_N "(cached) $ECHO_C" >&6
3204else
3205 cat >conftest.$ac_ext <<_ACEOF
3206/* confdefs.h. */
3207_ACEOF
3208cat confdefs.h >>conftest.$ac_ext
3209cat >>conftest.$ac_ext <<_ACEOF
3210/* end confdefs.h. */
3211#include <stdlib.h>
3212#include <stdarg.h>
3213#include <string.h>
3214#include <float.h>
3215
3216int
3217main ()
3218{
3219
3220 ;
3221 return 0;
3222}
3223_ACEOF
3224rm -f conftest.$ac_objext
3225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3226 (eval $ac_compile) 2>conftest.er1
3227 ac_status=$?
3228 grep -v '^ *+' conftest.er1 >conftest.err
3229 rm -f conftest.er1
3230 cat conftest.err >&5
3231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3232 (exit $ac_status); } &&
c8aeaa6d 3233 { ac_try='test -z "$ac_c_werror_flag"
3234 || test ! -s conftest.err'
b085c511 3235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3236 (eval $ac_try) 2>&5
3237 ac_status=$?
3238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3239 (exit $ac_status); }; } &&
3240 { ac_try='test -s conftest.$ac_objext'
3241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3242 (eval $ac_try) 2>&5
3243 ac_status=$?
3244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3245 (exit $ac_status); }; }; then
3246 ac_cv_header_stdc=yes
3247else
3248 echo "$as_me: failed program was:" >&5
3249sed 's/^/| /' conftest.$ac_ext >&5
3250
3251ac_cv_header_stdc=no
3252fi
3253rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3254
3255if test $ac_cv_header_stdc = yes; then
3256 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3257 cat >conftest.$ac_ext <<_ACEOF
3258/* confdefs.h. */
3259_ACEOF
3260cat confdefs.h >>conftest.$ac_ext
3261cat >>conftest.$ac_ext <<_ACEOF
3262/* end confdefs.h. */
3263#include <string.h>
3264
3265_ACEOF
3266if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3267 $EGREP "memchr" >/dev/null 2>&1; then
3268 :
3269else
3270 ac_cv_header_stdc=no
3271fi
3272rm -f conftest*
3273
3274fi
3275
3276if test $ac_cv_header_stdc = yes; then
3277 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3278 cat >conftest.$ac_ext <<_ACEOF
3279/* confdefs.h. */
3280_ACEOF
3281cat confdefs.h >>conftest.$ac_ext
3282cat >>conftest.$ac_ext <<_ACEOF
3283/* end confdefs.h. */
3284#include <stdlib.h>
3285
3286_ACEOF
3287if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3288 $EGREP "free" >/dev/null 2>&1; then
3289 :
3290else
3291 ac_cv_header_stdc=no
3292fi
3293rm -f conftest*
3294
3295fi
3296
3297if test $ac_cv_header_stdc = yes; then
3298 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3299 if test "$cross_compiling" = yes; then
3300 :
3301else
3302 cat >conftest.$ac_ext <<_ACEOF
3303/* confdefs.h. */
3304_ACEOF
3305cat confdefs.h >>conftest.$ac_ext
3306cat >>conftest.$ac_ext <<_ACEOF
3307/* end confdefs.h. */
3308#include <ctype.h>
3309#if ((' ' & 0x0FF) == 0x020)
3310# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3311# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3312#else
3313# define ISLOWER(c) \
3314 (('a' <= (c) && (c) <= 'i') \
3315 || ('j' <= (c) && (c) <= 'r') \
3316 || ('s' <= (c) && (c) <= 'z'))
3317# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3318#endif
3319
3320#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3321int
3322main ()
3323{
3324 int i;
3325 for (i = 0; i < 256; i++)
3326 if (XOR (islower (i), ISLOWER (i))
3327 || toupper (i) != TOUPPER (i))
3328 exit(2);
3329 exit (0);
3330}
3331_ACEOF
3332rm -f conftest$ac_exeext
3333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3334 (eval $ac_link) 2>&5
3335 ac_status=$?
3336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3339 (eval $ac_try) 2>&5
3340 ac_status=$?
3341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3342 (exit $ac_status); }; }; then
3343 :
3344else
3345 echo "$as_me: program exited with status $ac_status" >&5
3346echo "$as_me: failed program was:" >&5
3347sed 's/^/| /' conftest.$ac_ext >&5
3348
3349( exit $ac_status )
3350ac_cv_header_stdc=no
3351fi
3352rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3353fi
3354fi
3355fi
3356echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3357echo "${ECHO_T}$ac_cv_header_stdc" >&6
3358if test $ac_cv_header_stdc = yes; then
3359
3360cat >>confdefs.h <<\_ACEOF
3361#define STDC_HEADERS 1
3362_ACEOF
3363
3364fi
3365
3366# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3377 inttypes.h stdint.h unistd.h
3378do
3379as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3380echo "$as_me:$LINENO: checking for $ac_header" >&5
3381echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3382if eval "test \"\${$as_ac_Header+set}\" = set"; then
3383 echo $ECHO_N "(cached) $ECHO_C" >&6
3384else
3385 cat >conftest.$ac_ext <<_ACEOF
3386/* confdefs.h. */
3387_ACEOF
3388cat confdefs.h >>conftest.$ac_ext
3389cat >>conftest.$ac_ext <<_ACEOF
3390/* end confdefs.h. */
3391$ac_includes_default
3392
3393#include <$ac_header>
3394_ACEOF
3395rm -f conftest.$ac_objext
3396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3397 (eval $ac_compile) 2>conftest.er1
3398 ac_status=$?
3399 grep -v '^ *+' conftest.er1 >conftest.err
3400 rm -f conftest.er1
3401 cat conftest.err >&5
3402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3403 (exit $ac_status); } &&
c8aeaa6d 3404 { ac_try='test -z "$ac_c_werror_flag"
3405 || test ! -s conftest.err'
b085c511 3406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3407 (eval $ac_try) 2>&5
3408 ac_status=$?
3409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3410 (exit $ac_status); }; } &&
3411 { ac_try='test -s conftest.$ac_objext'
3412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3413 (eval $ac_try) 2>&5
3414 ac_status=$?
3415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3416 (exit $ac_status); }; }; then
3417 eval "$as_ac_Header=yes"
3418else
3419 echo "$as_me: failed program was:" >&5
3420sed 's/^/| /' conftest.$ac_ext >&5
3421
3422eval "$as_ac_Header=no"
3423fi
3424rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3425fi
3426echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3427echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3428if test `eval echo '${'$as_ac_Header'}'` = yes; then
3429 cat >>confdefs.h <<_ACEOF
3430#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3431_ACEOF
3432
3433fi
3434
3435done
3436
3437
3438echo "$as_me:$LINENO: checking for void *" >&5
3439echo $ECHO_N "checking for void *... $ECHO_C" >&6
3440if test "${ac_cv_type_void_p+set}" = set; then
3441 echo $ECHO_N "(cached) $ECHO_C" >&6
3442else
3443 cat >conftest.$ac_ext <<_ACEOF
3444/* confdefs.h. */
3445_ACEOF
3446cat confdefs.h >>conftest.$ac_ext
3447cat >>conftest.$ac_ext <<_ACEOF
3448/* end confdefs.h. */
3449$ac_includes_default
3450int
3451main ()
3452{
3453if ((void * *) 0)
3454 return 0;
3455if (sizeof (void *))
3456 return 0;
3457 ;
3458 return 0;
3459}
3460_ACEOF
3461rm -f conftest.$ac_objext
3462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3463 (eval $ac_compile) 2>conftest.er1
3464 ac_status=$?
3465 grep -v '^ *+' conftest.er1 >conftest.err
3466 rm -f conftest.er1
3467 cat conftest.err >&5
3468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3469 (exit $ac_status); } &&
c8aeaa6d 3470 { ac_try='test -z "$ac_c_werror_flag"
3471 || test ! -s conftest.err'
b085c511 3472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3473 (eval $ac_try) 2>&5
3474 ac_status=$?
3475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3476 (exit $ac_status); }; } &&
3477 { ac_try='test -s conftest.$ac_objext'
3478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3479 (eval $ac_try) 2>&5
3480 ac_status=$?
3481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3482 (exit $ac_status); }; }; then
3483 ac_cv_type_void_p=yes
3484else
3485 echo "$as_me: failed program was:" >&5
3486sed 's/^/| /' conftest.$ac_ext >&5
3487
3488ac_cv_type_void_p=no
3489fi
3490rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3491fi
3492echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3493echo "${ECHO_T}$ac_cv_type_void_p" >&6
3494
6a8964db 3495echo "$as_me:$LINENO: checking size of void *" >&5
3496echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3497if test "${ac_cv_sizeof_void_p+set}" = set; then
3498 echo $ECHO_N "(cached) $ECHO_C" >&6
6f817829 3499else
b085c511 3500 if test "$ac_cv_type_void_p" = yes; then
3501 # The cast to unsigned long works around a bug in the HP C Compiler
3502 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3503 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3504 # This bug is HP SR number 8606223364.
3505 if test "$cross_compiling" = yes; then
3506 # Depending upon the size, compute the lo and hi bounds.
3507cat >conftest.$ac_ext <<_ACEOF
3508/* confdefs.h. */
3509_ACEOF
3510cat confdefs.h >>conftest.$ac_ext
3511cat >>conftest.$ac_ext <<_ACEOF
3512/* end confdefs.h. */
3513$ac_includes_default
3514int
3515main ()
3516{
3517static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
3518test_array [0] = 0
3519
3520 ;
3521 return 0;
3522}
3523_ACEOF
3524rm -f conftest.$ac_objext
3525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3526 (eval $ac_compile) 2>conftest.er1
3527 ac_status=$?
3528 grep -v '^ *+' conftest.er1 >conftest.err
3529 rm -f conftest.er1
3530 cat conftest.err >&5
3531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3532 (exit $ac_status); } &&
c8aeaa6d 3533 { ac_try='test -z "$ac_c_werror_flag"
3534 || test ! -s conftest.err'
b085c511 3535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3536 (eval $ac_try) 2>&5
3537 ac_status=$?
3538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3539 (exit $ac_status); }; } &&
3540 { ac_try='test -s conftest.$ac_objext'
3541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3542 (eval $ac_try) 2>&5
3543 ac_status=$?
3544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3545 (exit $ac_status); }; }; then
3546 ac_lo=0 ac_mid=0
3547 while :; do
3548 cat >conftest.$ac_ext <<_ACEOF
3549/* confdefs.h. */
3550_ACEOF
3551cat confdefs.h >>conftest.$ac_ext
3552cat >>conftest.$ac_ext <<_ACEOF
3553/* end confdefs.h. */
3554$ac_includes_default
3555int
3556main ()
3557{
3558static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3559test_array [0] = 0
3560
3561 ;
3562 return 0;
3563}
3564_ACEOF
3565rm -f conftest.$ac_objext
3566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3567 (eval $ac_compile) 2>conftest.er1
3568 ac_status=$?
3569 grep -v '^ *+' conftest.er1 >conftest.err
3570 rm -f conftest.er1
3571 cat conftest.err >&5
3572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3573 (exit $ac_status); } &&
c8aeaa6d 3574 { ac_try='test -z "$ac_c_werror_flag"
3575 || test ! -s conftest.err'
b085c511 3576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3577 (eval $ac_try) 2>&5
3578 ac_status=$?
3579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3580 (exit $ac_status); }; } &&
3581 { ac_try='test -s conftest.$ac_objext'
3582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3583 (eval $ac_try) 2>&5
3584 ac_status=$?
3585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3586 (exit $ac_status); }; }; then
3587 ac_hi=$ac_mid; break
3588else
3589 echo "$as_me: failed program was:" >&5
3590sed 's/^/| /' conftest.$ac_ext >&5
3591
3592ac_lo=`expr $ac_mid + 1`
3593 if test $ac_lo -le $ac_mid; then
3594 ac_lo= ac_hi=
3595 break
3596 fi
3597 ac_mid=`expr 2 '*' $ac_mid + 1`
3598fi
3599rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3600 done
3601else
3602 echo "$as_me: failed program was:" >&5
3603sed 's/^/| /' conftest.$ac_ext >&5
3604
3605cat >conftest.$ac_ext <<_ACEOF
3606/* confdefs.h. */
3607_ACEOF
3608cat confdefs.h >>conftest.$ac_ext
3609cat >>conftest.$ac_ext <<_ACEOF
3610/* end confdefs.h. */
3611$ac_includes_default
3612int
3613main ()
3614{
3615static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
3616test_array [0] = 0
3617
3618 ;
3619 return 0;
3620}
3621_ACEOF
3622rm -f conftest.$ac_objext
3623if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3624 (eval $ac_compile) 2>conftest.er1
3625 ac_status=$?
3626 grep -v '^ *+' conftest.er1 >conftest.err
3627 rm -f conftest.er1
3628 cat conftest.err >&5
3629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3630 (exit $ac_status); } &&
c8aeaa6d 3631 { ac_try='test -z "$ac_c_werror_flag"
3632 || test ! -s conftest.err'
b085c511 3633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3634 (eval $ac_try) 2>&5
3635 ac_status=$?
3636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3637 (exit $ac_status); }; } &&
3638 { ac_try='test -s conftest.$ac_objext'
3639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3640 (eval $ac_try) 2>&5
3641 ac_status=$?
3642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3643 (exit $ac_status); }; }; then
3644 ac_hi=-1 ac_mid=-1
3645 while :; do
3646 cat >conftest.$ac_ext <<_ACEOF
3647/* confdefs.h. */
3648_ACEOF
3649cat confdefs.h >>conftest.$ac_ext
3650cat >>conftest.$ac_ext <<_ACEOF
3651/* end confdefs.h. */
3652$ac_includes_default
3653int
3654main ()
3655{
3656static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
3657test_array [0] = 0
3658
3659 ;
3660 return 0;
3661}
3662_ACEOF
3663rm -f conftest.$ac_objext
3664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3665 (eval $ac_compile) 2>conftest.er1
3666 ac_status=$?
3667 grep -v '^ *+' conftest.er1 >conftest.err
3668 rm -f conftest.er1
3669 cat conftest.err >&5
3670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3671 (exit $ac_status); } &&
c8aeaa6d 3672 { ac_try='test -z "$ac_c_werror_flag"
3673 || test ! -s conftest.err'
b085c511 3674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3675 (eval $ac_try) 2>&5
3676 ac_status=$?
3677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3678 (exit $ac_status); }; } &&
3679 { ac_try='test -s conftest.$ac_objext'
3680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3681 (eval $ac_try) 2>&5
3682 ac_status=$?
3683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3684 (exit $ac_status); }; }; then
3685 ac_lo=$ac_mid; break
3686else
3687 echo "$as_me: failed program was:" >&5
3688sed 's/^/| /' conftest.$ac_ext >&5
3689
3690ac_hi=`expr '(' $ac_mid ')' - 1`
3691 if test $ac_mid -le $ac_hi; then
3692 ac_lo= ac_hi=
3693 break
3694 fi
3695 ac_mid=`expr 2 '*' $ac_mid`
3696fi
3697rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3698 done
3699else
3700 echo "$as_me: failed program was:" >&5
3701sed 's/^/| /' conftest.$ac_ext >&5
3702
3703ac_lo= ac_hi=
3704fi
3705rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3706fi
3707rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3708# Binary search between lo and hi bounds.
3709while test "x$ac_lo" != "x$ac_hi"; do
3710 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3711 cat >conftest.$ac_ext <<_ACEOF
3712/* confdefs.h. */
3713_ACEOF
3714cat confdefs.h >>conftest.$ac_ext
3715cat >>conftest.$ac_ext <<_ACEOF
3716/* end confdefs.h. */
3717$ac_includes_default
3718int
3719main ()
3720{
3721static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3722test_array [0] = 0
3723
3724 ;
3725 return 0;
3726}
3727_ACEOF
3728rm -f conftest.$ac_objext
3729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3730 (eval $ac_compile) 2>conftest.er1
3731 ac_status=$?
3732 grep -v '^ *+' conftest.er1 >conftest.err
3733 rm -f conftest.er1
3734 cat conftest.err >&5
3735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3736 (exit $ac_status); } &&
c8aeaa6d 3737 { ac_try='test -z "$ac_c_werror_flag"
3738 || test ! -s conftest.err'
b085c511 3739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3740 (eval $ac_try) 2>&5
3741 ac_status=$?
3742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3743 (exit $ac_status); }; } &&
3744 { ac_try='test -s conftest.$ac_objext'
3745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3746 (eval $ac_try) 2>&5
3747 ac_status=$?
3748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3749 (exit $ac_status); }; }; then
3750 ac_hi=$ac_mid
3751else
3752 echo "$as_me: failed program was:" >&5
3753sed 's/^/| /' conftest.$ac_ext >&5
3754
3755ac_lo=`expr '(' $ac_mid ')' + 1`
3756fi
3757rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3758done
3759case $ac_lo in
3760?*) ac_cv_sizeof_void_p=$ac_lo;;
3761'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3762See \`config.log' for more details." >&5
3763echo "$as_me: error: cannot compute sizeof (void *), 77
3764See \`config.log' for more details." >&2;}
3765 { (exit 1); exit 1; }; } ;;
3766esac
3767else
3768 if test "$cross_compiling" = yes; then
c8aeaa6d 3769 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
3770See \`config.log' for more details." >&5
3771echo "$as_me: error: cannot run test program while cross compiling
3772See \`config.log' for more details." >&2;}
b085c511 3773 { (exit 1); exit 1; }; }
3774else
3775 cat >conftest.$ac_ext <<_ACEOF
3776/* confdefs.h. */
3777_ACEOF
3778cat confdefs.h >>conftest.$ac_ext
3779cat >>conftest.$ac_ext <<_ACEOF
3780/* end confdefs.h. */
3781$ac_includes_default
3782long longval () { return (long) (sizeof (void *)); }
3783unsigned long ulongval () { return (long) (sizeof (void *)); }
3784#include <stdio.h>
3785#include <stdlib.h>
3786int
3787main ()
3788{
3789
3790 FILE *f = fopen ("conftest.val", "w");
3791 if (! f)
3792 exit (1);
3793 if (((long) (sizeof (void *))) < 0)
3794 {
3795 long i = longval ();
3796 if (i != ((long) (sizeof (void *))))
3797 exit (1);
3798 fprintf (f, "%ld\n", i);
3799 }
3800 else
3801 {
3802 unsigned long i = ulongval ();
3803 if (i != ((long) (sizeof (void *))))
3804 exit (1);
3805 fprintf (f, "%lu\n", i);
3806 }
3807 exit (ferror (f) || fclose (f) != 0);
3808
3809 ;
3810 return 0;
3811}
3812_ACEOF
3813rm -f conftest$ac_exeext
3814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3815 (eval $ac_link) 2>&5
3816 ac_status=$?
3817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3818 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3820 (eval $ac_try) 2>&5
3821 ac_status=$?
3822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3823 (exit $ac_status); }; }; then
3824 ac_cv_sizeof_void_p=`cat conftest.val`
3825else
3826 echo "$as_me: program exited with status $ac_status" >&5
3827echo "$as_me: failed program was:" >&5
3828sed 's/^/| /' conftest.$ac_ext >&5
3829
3830( exit $ac_status )
3831{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3832See \`config.log' for more details." >&5
3833echo "$as_me: error: cannot compute sizeof (void *), 77
3834See \`config.log' for more details." >&2;}
3835 { (exit 1); exit 1; }; }
3836fi
3837rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3838fi
3839fi
3840rm -f conftest.val
3841else
3842 ac_cv_sizeof_void_p=0
3843fi
3844fi
3845echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3846echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3847cat >>confdefs.h <<_ACEOF
3848#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3849_ACEOF
3850
3851
3852echo "$as_me:$LINENO: checking for short" >&5
3853echo $ECHO_N "checking for short... $ECHO_C" >&6
3854if test "${ac_cv_type_short+set}" = set; then
3855 echo $ECHO_N "(cached) $ECHO_C" >&6
3856else
3857 cat >conftest.$ac_ext <<_ACEOF
3858/* confdefs.h. */
3859_ACEOF
3860cat confdefs.h >>conftest.$ac_ext
3861cat >>conftest.$ac_ext <<_ACEOF
3862/* end confdefs.h. */
3863$ac_includes_default
3864int
3865main ()
3866{
3867if ((short *) 0)
3868 return 0;
3869if (sizeof (short))
3870 return 0;
3871 ;
3872 return 0;
3873}
3874_ACEOF
3875rm -f conftest.$ac_objext
3876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3877 (eval $ac_compile) 2>conftest.er1
3878 ac_status=$?
3879 grep -v '^ *+' conftest.er1 >conftest.err
3880 rm -f conftest.er1
3881 cat conftest.err >&5
3882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3883 (exit $ac_status); } &&
c8aeaa6d 3884 { ac_try='test -z "$ac_c_werror_flag"
3885 || test ! -s conftest.err'
b085c511 3886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3887 (eval $ac_try) 2>&5
3888 ac_status=$?
3889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3890 (exit $ac_status); }; } &&
3891 { ac_try='test -s conftest.$ac_objext'
3892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3893 (eval $ac_try) 2>&5
3894 ac_status=$?
3895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3896 (exit $ac_status); }; }; then
3897 ac_cv_type_short=yes
3898else
3899 echo "$as_me: failed program was:" >&5
3900sed 's/^/| /' conftest.$ac_ext >&5
3901
3902ac_cv_type_short=no
3903fi
3904rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3905fi
3906echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
3907echo "${ECHO_T}$ac_cv_type_short" >&6
3908
3909echo "$as_me:$LINENO: checking size of short" >&5
3910echo $ECHO_N "checking size of short... $ECHO_C" >&6
3911if test "${ac_cv_sizeof_short+set}" = set; then
3912 echo $ECHO_N "(cached) $ECHO_C" >&6
3913else
3914 if test "$ac_cv_type_short" = yes; then
3915 # The cast to unsigned long works around a bug in the HP C Compiler
3916 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3917 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3918 # This bug is HP SR number 8606223364.
3919 if test "$cross_compiling" = yes; then
3920 # Depending upon the size, compute the lo and hi bounds.
3921cat >conftest.$ac_ext <<_ACEOF
3922/* confdefs.h. */
3923_ACEOF
3924cat confdefs.h >>conftest.$ac_ext
3925cat >>conftest.$ac_ext <<_ACEOF
3926/* end confdefs.h. */
3927$ac_includes_default
3928int
3929main ()
3930{
3931static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
3932test_array [0] = 0
3933
3934 ;
3935 return 0;
3936}
3937_ACEOF
3938rm -f conftest.$ac_objext
3939if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3940 (eval $ac_compile) 2>conftest.er1
3941 ac_status=$?
3942 grep -v '^ *+' conftest.er1 >conftest.err
3943 rm -f conftest.er1
3944 cat conftest.err >&5
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); } &&
c8aeaa6d 3947 { ac_try='test -z "$ac_c_werror_flag"
3948 || test ! -s conftest.err'
b085c511 3949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3950 (eval $ac_try) 2>&5
3951 ac_status=$?
3952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3953 (exit $ac_status); }; } &&
3954 { ac_try='test -s conftest.$ac_objext'
3955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3956 (eval $ac_try) 2>&5
3957 ac_status=$?
3958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3959 (exit $ac_status); }; }; then
3960 ac_lo=0 ac_mid=0
3961 while :; do
3962 cat >conftest.$ac_ext <<_ACEOF
3963/* confdefs.h. */
3964_ACEOF
3965cat confdefs.h >>conftest.$ac_ext
3966cat >>conftest.$ac_ext <<_ACEOF
3967/* end confdefs.h. */
3968$ac_includes_default
3969int
3970main ()
3971{
3972static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
3973test_array [0] = 0
3974
3975 ;
3976 return 0;
3977}
3978_ACEOF
3979rm -f conftest.$ac_objext
3980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3981 (eval $ac_compile) 2>conftest.er1
3982 ac_status=$?
3983 grep -v '^ *+' conftest.er1 >conftest.err
3984 rm -f conftest.er1
3985 cat conftest.err >&5
3986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3987 (exit $ac_status); } &&
c8aeaa6d 3988 { ac_try='test -z "$ac_c_werror_flag"
3989 || test ! -s conftest.err'
b085c511 3990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3991 (eval $ac_try) 2>&5
3992 ac_status=$?
3993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3994 (exit $ac_status); }; } &&
3995 { ac_try='test -s conftest.$ac_objext'
3996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3997 (eval $ac_try) 2>&5
3998 ac_status=$?
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); }; }; then
4001 ac_hi=$ac_mid; break
4002else
4003 echo "$as_me: failed program was:" >&5
4004sed 's/^/| /' conftest.$ac_ext >&5
4005
4006ac_lo=`expr $ac_mid + 1`
4007 if test $ac_lo -le $ac_mid; then
4008 ac_lo= ac_hi=
4009 break
4010 fi
4011 ac_mid=`expr 2 '*' $ac_mid + 1`
4012fi
4013rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4014 done
4015else
4016 echo "$as_me: failed program was:" >&5
4017sed 's/^/| /' conftest.$ac_ext >&5
4018
4019cat >conftest.$ac_ext <<_ACEOF
4020/* confdefs.h. */
4021_ACEOF
4022cat confdefs.h >>conftest.$ac_ext
4023cat >>conftest.$ac_ext <<_ACEOF
4024/* end confdefs.h. */
4025$ac_includes_default
4026int
4027main ()
4028{
4029static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
4030test_array [0] = 0
4031
4032 ;
4033 return 0;
4034}
4035_ACEOF
4036rm -f conftest.$ac_objext
4037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4038 (eval $ac_compile) 2>conftest.er1
4039 ac_status=$?
4040 grep -v '^ *+' conftest.er1 >conftest.err
4041 rm -f conftest.er1
4042 cat conftest.err >&5
4043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4044 (exit $ac_status); } &&
c8aeaa6d 4045 { ac_try='test -z "$ac_c_werror_flag"
4046 || test ! -s conftest.err'
b085c511 4047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4048 (eval $ac_try) 2>&5
4049 ac_status=$?
4050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4051 (exit $ac_status); }; } &&
4052 { ac_try='test -s conftest.$ac_objext'
4053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4054 (eval $ac_try) 2>&5
4055 ac_status=$?
4056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4057 (exit $ac_status); }; }; then
4058 ac_hi=-1 ac_mid=-1
4059 while :; do
4060 cat >conftest.$ac_ext <<_ACEOF
4061/* confdefs.h. */
4062_ACEOF
4063cat confdefs.h >>conftest.$ac_ext
4064cat >>conftest.$ac_ext <<_ACEOF
4065/* end confdefs.h. */
4066$ac_includes_default
4067int
4068main ()
4069{
4070static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
4071test_array [0] = 0
4072
4073 ;
4074 return 0;
4075}
4076_ACEOF
4077rm -f conftest.$ac_objext
4078if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4079 (eval $ac_compile) 2>conftest.er1
4080 ac_status=$?
4081 grep -v '^ *+' conftest.er1 >conftest.err
4082 rm -f conftest.er1
4083 cat conftest.err >&5
4084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085 (exit $ac_status); } &&
c8aeaa6d 4086 { ac_try='test -z "$ac_c_werror_flag"
4087 || test ! -s conftest.err'
b085c511 4088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4089 (eval $ac_try) 2>&5
4090 ac_status=$?
4091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4092 (exit $ac_status); }; } &&
4093 { ac_try='test -s conftest.$ac_objext'
4094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4095 (eval $ac_try) 2>&5
4096 ac_status=$?
4097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4098 (exit $ac_status); }; }; then
4099 ac_lo=$ac_mid; break
4100else
4101 echo "$as_me: failed program was:" >&5
4102sed 's/^/| /' conftest.$ac_ext >&5
4103
4104ac_hi=`expr '(' $ac_mid ')' - 1`
4105 if test $ac_mid -le $ac_hi; then
4106 ac_lo= ac_hi=
4107 break
4108 fi
4109 ac_mid=`expr 2 '*' $ac_mid`
4110fi
4111rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4112 done
4113else
4114 echo "$as_me: failed program was:" >&5
4115sed 's/^/| /' conftest.$ac_ext >&5
4116
4117ac_lo= ac_hi=
4118fi
4119rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4120fi
4121rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4122# Binary search between lo and hi bounds.
4123while test "x$ac_lo" != "x$ac_hi"; do
4124 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4125 cat >conftest.$ac_ext <<_ACEOF
4126/* confdefs.h. */
4127_ACEOF
4128cat confdefs.h >>conftest.$ac_ext
4129cat >>conftest.$ac_ext <<_ACEOF
4130/* end confdefs.h. */
4131$ac_includes_default
4132int
4133main ()
4134{
4135static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4136test_array [0] = 0
4137
4138 ;
4139 return 0;
4140}
4141_ACEOF
4142rm -f conftest.$ac_objext
4143if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4144 (eval $ac_compile) 2>conftest.er1
4145 ac_status=$?
4146 grep -v '^ *+' conftest.er1 >conftest.err
4147 rm -f conftest.er1
4148 cat conftest.err >&5
4149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4150 (exit $ac_status); } &&
c8aeaa6d 4151 { ac_try='test -z "$ac_c_werror_flag"
4152 || test ! -s conftest.err'
b085c511 4153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4154 (eval $ac_try) 2>&5
4155 ac_status=$?
4156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4157 (exit $ac_status); }; } &&
4158 { ac_try='test -s conftest.$ac_objext'
4159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4160 (eval $ac_try) 2>&5
4161 ac_status=$?
4162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4163 (exit $ac_status); }; }; then
4164 ac_hi=$ac_mid
4165else
4166 echo "$as_me: failed program was:" >&5
4167sed 's/^/| /' conftest.$ac_ext >&5
4168
4169ac_lo=`expr '(' $ac_mid ')' + 1`
4170fi
4171rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4172done
4173case $ac_lo in
4174?*) ac_cv_sizeof_short=$ac_lo;;
4175'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4176See \`config.log' for more details." >&5
4177echo "$as_me: error: cannot compute sizeof (short), 77
4178See \`config.log' for more details." >&2;}
4179 { (exit 1); exit 1; }; } ;;
4180esac
4181else
4182 if test "$cross_compiling" = yes; then
c8aeaa6d 4183 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4184See \`config.log' for more details." >&5
4185echo "$as_me: error: cannot run test program while cross compiling
4186See \`config.log' for more details." >&2;}
b085c511 4187 { (exit 1); exit 1; }; }
4188else
4189 cat >conftest.$ac_ext <<_ACEOF
4190/* confdefs.h. */
4191_ACEOF
4192cat confdefs.h >>conftest.$ac_ext
4193cat >>conftest.$ac_ext <<_ACEOF
4194/* end confdefs.h. */
4195$ac_includes_default
4196long longval () { return (long) (sizeof (short)); }
4197unsigned long ulongval () { return (long) (sizeof (short)); }
4198#include <stdio.h>
4199#include <stdlib.h>
4200int
4201main ()
4202{
4203
4204 FILE *f = fopen ("conftest.val", "w");
4205 if (! f)
4206 exit (1);
4207 if (((long) (sizeof (short))) < 0)
4208 {
4209 long i = longval ();
4210 if (i != ((long) (sizeof (short))))
4211 exit (1);
4212 fprintf (f, "%ld\n", i);
4213 }
4214 else
4215 {
4216 unsigned long i = ulongval ();
4217 if (i != ((long) (sizeof (short))))
4218 exit (1);
4219 fprintf (f, "%lu\n", i);
4220 }
4221 exit (ferror (f) || fclose (f) != 0);
4222
4223 ;
4224 return 0;
4225}
4226_ACEOF
4227rm -f conftest$ac_exeext
4228if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4229 (eval $ac_link) 2>&5
4230 ac_status=$?
4231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4232 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4234 (eval $ac_try) 2>&5
4235 ac_status=$?
4236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4237 (exit $ac_status); }; }; then
4238 ac_cv_sizeof_short=`cat conftest.val`
4239else
4240 echo "$as_me: program exited with status $ac_status" >&5
4241echo "$as_me: failed program was:" >&5
4242sed 's/^/| /' conftest.$ac_ext >&5
4243
4244( exit $ac_status )
4245{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4246See \`config.log' for more details." >&5
4247echo "$as_me: error: cannot compute sizeof (short), 77
4248See \`config.log' for more details." >&2;}
4249 { (exit 1); exit 1; }; }
4250fi
4251rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4252fi
4253fi
4254rm -f conftest.val
4255else
4256 ac_cv_sizeof_short=0
4257fi
4258fi
4259echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4260echo "${ECHO_T}$ac_cv_sizeof_short" >&6
4261cat >>confdefs.h <<_ACEOF
4262#define SIZEOF_SHORT $ac_cv_sizeof_short
4263_ACEOF
4264
4265
4266echo "$as_me:$LINENO: checking for int" >&5
4267echo $ECHO_N "checking for int... $ECHO_C" >&6
4268if test "${ac_cv_type_int+set}" = set; then
4269 echo $ECHO_N "(cached) $ECHO_C" >&6
4270else
4271 cat >conftest.$ac_ext <<_ACEOF
4272/* confdefs.h. */
4273_ACEOF
4274cat confdefs.h >>conftest.$ac_ext
4275cat >>conftest.$ac_ext <<_ACEOF
4276/* end confdefs.h. */
4277$ac_includes_default
4278int
4279main ()
4280{
4281if ((int *) 0)
4282 return 0;
4283if (sizeof (int))
4284 return 0;
4285 ;
4286 return 0;
4287}
4288_ACEOF
4289rm -f conftest.$ac_objext
4290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4291 (eval $ac_compile) 2>conftest.er1
4292 ac_status=$?
4293 grep -v '^ *+' conftest.er1 >conftest.err
4294 rm -f conftest.er1
4295 cat conftest.err >&5
4296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4297 (exit $ac_status); } &&
c8aeaa6d 4298 { ac_try='test -z "$ac_c_werror_flag"
4299 || test ! -s conftest.err'
b085c511 4300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4301 (eval $ac_try) 2>&5
4302 ac_status=$?
4303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4304 (exit $ac_status); }; } &&
4305 { ac_try='test -s conftest.$ac_objext'
4306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4307 (eval $ac_try) 2>&5
4308 ac_status=$?
4309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4310 (exit $ac_status); }; }; then
4311 ac_cv_type_int=yes
4312else
4313 echo "$as_me: failed program was:" >&5
4314sed 's/^/| /' conftest.$ac_ext >&5
4315
4316ac_cv_type_int=no
4317fi
4318rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4319fi
4320echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4321echo "${ECHO_T}$ac_cv_type_int" >&6
4322
4323echo "$as_me:$LINENO: checking size of int" >&5
4324echo $ECHO_N "checking size of int... $ECHO_C" >&6
4325if test "${ac_cv_sizeof_int+set}" = set; then
4326 echo $ECHO_N "(cached) $ECHO_C" >&6
4327else
4328 if test "$ac_cv_type_int" = yes; then
4329 # The cast to unsigned long works around a bug in the HP C Compiler
4330 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4331 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4332 # This bug is HP SR number 8606223364.
4333 if test "$cross_compiling" = yes; then
4334 # Depending upon the size, compute the lo and hi bounds.
4335cat >conftest.$ac_ext <<_ACEOF
4336/* confdefs.h. */
4337_ACEOF
4338cat confdefs.h >>conftest.$ac_ext
4339cat >>conftest.$ac_ext <<_ACEOF
4340/* end confdefs.h. */
4341$ac_includes_default
4342int
4343main ()
4344{
4345static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4346test_array [0] = 0
4347
4348 ;
4349 return 0;
4350}
4351_ACEOF
4352rm -f conftest.$ac_objext
4353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4354 (eval $ac_compile) 2>conftest.er1
4355 ac_status=$?
4356 grep -v '^ *+' conftest.er1 >conftest.err
4357 rm -f conftest.er1
4358 cat conftest.err >&5
4359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4360 (exit $ac_status); } &&
c8aeaa6d 4361 { ac_try='test -z "$ac_c_werror_flag"
4362 || test ! -s conftest.err'
b085c511 4363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4364 (eval $ac_try) 2>&5
4365 ac_status=$?
4366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4367 (exit $ac_status); }; } &&
4368 { ac_try='test -s conftest.$ac_objext'
4369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4370 (eval $ac_try) 2>&5
4371 ac_status=$?
4372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4373 (exit $ac_status); }; }; then
4374 ac_lo=0 ac_mid=0
4375 while :; do
4376 cat >conftest.$ac_ext <<_ACEOF
4377/* confdefs.h. */
4378_ACEOF
4379cat confdefs.h >>conftest.$ac_ext
4380cat >>conftest.$ac_ext <<_ACEOF
4381/* end confdefs.h. */
4382$ac_includes_default
4383int
4384main ()
4385{
4386static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4387test_array [0] = 0
4388
4389 ;
4390 return 0;
4391}
4392_ACEOF
4393rm -f conftest.$ac_objext
4394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4395 (eval $ac_compile) 2>conftest.er1
4396 ac_status=$?
4397 grep -v '^ *+' conftest.er1 >conftest.err
4398 rm -f conftest.er1
4399 cat conftest.err >&5
4400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4401 (exit $ac_status); } &&
c8aeaa6d 4402 { ac_try='test -z "$ac_c_werror_flag"
4403 || test ! -s conftest.err'
b085c511 4404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4405 (eval $ac_try) 2>&5
4406 ac_status=$?
4407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4408 (exit $ac_status); }; } &&
4409 { ac_try='test -s conftest.$ac_objext'
4410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4411 (eval $ac_try) 2>&5
4412 ac_status=$?
4413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4414 (exit $ac_status); }; }; then
4415 ac_hi=$ac_mid; break
4416else
4417 echo "$as_me: failed program was:" >&5
4418sed 's/^/| /' conftest.$ac_ext >&5
4419
4420ac_lo=`expr $ac_mid + 1`
4421 if test $ac_lo -le $ac_mid; then
4422 ac_lo= ac_hi=
4423 break
4424 fi
4425 ac_mid=`expr 2 '*' $ac_mid + 1`
4426fi
4427rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4428 done
4429else
4430 echo "$as_me: failed program was:" >&5
4431sed 's/^/| /' conftest.$ac_ext >&5
4432
4433cat >conftest.$ac_ext <<_ACEOF
4434/* confdefs.h. */
4435_ACEOF
4436cat confdefs.h >>conftest.$ac_ext
4437cat >>conftest.$ac_ext <<_ACEOF
4438/* end confdefs.h. */
4439$ac_includes_default
4440int
4441main ()
4442{
4443static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4444test_array [0] = 0
4445
4446 ;
4447 return 0;
4448}
4449_ACEOF
4450rm -f conftest.$ac_objext
4451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4452 (eval $ac_compile) 2>conftest.er1
4453 ac_status=$?
4454 grep -v '^ *+' conftest.er1 >conftest.err
4455 rm -f conftest.er1
4456 cat conftest.err >&5
4457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4458 (exit $ac_status); } &&
c8aeaa6d 4459 { ac_try='test -z "$ac_c_werror_flag"
4460 || test ! -s conftest.err'
b085c511 4461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4462 (eval $ac_try) 2>&5
4463 ac_status=$?
4464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4465 (exit $ac_status); }; } &&
4466 { ac_try='test -s conftest.$ac_objext'
4467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4468 (eval $ac_try) 2>&5
4469 ac_status=$?
4470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4471 (exit $ac_status); }; }; then
4472 ac_hi=-1 ac_mid=-1
4473 while :; do
4474 cat >conftest.$ac_ext <<_ACEOF
4475/* confdefs.h. */
4476_ACEOF
4477cat confdefs.h >>conftest.$ac_ext
4478cat >>conftest.$ac_ext <<_ACEOF
4479/* end confdefs.h. */
4480$ac_includes_default
4481int
4482main ()
4483{
4484static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4485test_array [0] = 0
4486
4487 ;
4488 return 0;
4489}
4490_ACEOF
4491rm -f conftest.$ac_objext
4492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4493 (eval $ac_compile) 2>conftest.er1
4494 ac_status=$?
4495 grep -v '^ *+' conftest.er1 >conftest.err
4496 rm -f conftest.er1
4497 cat conftest.err >&5
4498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4499 (exit $ac_status); } &&
c8aeaa6d 4500 { ac_try='test -z "$ac_c_werror_flag"
4501 || test ! -s conftest.err'
b085c511 4502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4503 (eval $ac_try) 2>&5
4504 ac_status=$?
4505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4506 (exit $ac_status); }; } &&
4507 { ac_try='test -s conftest.$ac_objext'
4508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4509 (eval $ac_try) 2>&5
4510 ac_status=$?
4511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4512 (exit $ac_status); }; }; then
4513 ac_lo=$ac_mid; break
4514else
4515 echo "$as_me: failed program was:" >&5
4516sed 's/^/| /' conftest.$ac_ext >&5
4517
4518ac_hi=`expr '(' $ac_mid ')' - 1`
4519 if test $ac_mid -le $ac_hi; then
4520 ac_lo= ac_hi=
4521 break
4522 fi
4523 ac_mid=`expr 2 '*' $ac_mid`
4524fi
4525rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4526 done
4527else
4528 echo "$as_me: failed program was:" >&5
4529sed 's/^/| /' conftest.$ac_ext >&5
4530
4531ac_lo= ac_hi=
4532fi
4533rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4534fi
4535rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4536# Binary search between lo and hi bounds.
4537while test "x$ac_lo" != "x$ac_hi"; do
4538 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4539 cat >conftest.$ac_ext <<_ACEOF
4540/* confdefs.h. */
4541_ACEOF
4542cat confdefs.h >>conftest.$ac_ext
4543cat >>conftest.$ac_ext <<_ACEOF
4544/* end confdefs.h. */
4545$ac_includes_default
4546int
4547main ()
4548{
4549static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4550test_array [0] = 0
4551
4552 ;
4553 return 0;
4554}
4555_ACEOF
4556rm -f conftest.$ac_objext
4557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4558 (eval $ac_compile) 2>conftest.er1
4559 ac_status=$?
4560 grep -v '^ *+' conftest.er1 >conftest.err
4561 rm -f conftest.er1
4562 cat conftest.err >&5
4563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4564 (exit $ac_status); } &&
c8aeaa6d 4565 { ac_try='test -z "$ac_c_werror_flag"
4566 || test ! -s conftest.err'
b085c511 4567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4568 (eval $ac_try) 2>&5
4569 ac_status=$?
4570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4571 (exit $ac_status); }; } &&
4572 { ac_try='test -s conftest.$ac_objext'
4573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4574 (eval $ac_try) 2>&5
4575 ac_status=$?
4576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4577 (exit $ac_status); }; }; then
4578 ac_hi=$ac_mid
4579else
4580 echo "$as_me: failed program was:" >&5
4581sed 's/^/| /' conftest.$ac_ext >&5
4582
4583ac_lo=`expr '(' $ac_mid ')' + 1`
4584fi
4585rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4586done
4587case $ac_lo in
4588?*) ac_cv_sizeof_int=$ac_lo;;
4589'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4590See \`config.log' for more details." >&5
4591echo "$as_me: error: cannot compute sizeof (int), 77
4592See \`config.log' for more details." >&2;}
4593 { (exit 1); exit 1; }; } ;;
4594esac
4595else
4596 if test "$cross_compiling" = yes; then
c8aeaa6d 4597 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4598See \`config.log' for more details." >&5
4599echo "$as_me: error: cannot run test program while cross compiling
4600See \`config.log' for more details." >&2;}
b085c511 4601 { (exit 1); exit 1; }; }
4602else
4603 cat >conftest.$ac_ext <<_ACEOF
4604/* confdefs.h. */
4605_ACEOF
4606cat confdefs.h >>conftest.$ac_ext
4607cat >>conftest.$ac_ext <<_ACEOF
4608/* end confdefs.h. */
4609$ac_includes_default
4610long longval () { return (long) (sizeof (int)); }
4611unsigned long ulongval () { return (long) (sizeof (int)); }
4612#include <stdio.h>
4613#include <stdlib.h>
4614int
4615main ()
4616{
4617
4618 FILE *f = fopen ("conftest.val", "w");
4619 if (! f)
4620 exit (1);
4621 if (((long) (sizeof (int))) < 0)
4622 {
4623 long i = longval ();
4624 if (i != ((long) (sizeof (int))))
4625 exit (1);
4626 fprintf (f, "%ld\n", i);
4627 }
4628 else
4629 {
4630 unsigned long i = ulongval ();
4631 if (i != ((long) (sizeof (int))))
4632 exit (1);
4633 fprintf (f, "%lu\n", i);
4634 }
4635 exit (ferror (f) || fclose (f) != 0);
4636
4637 ;
4638 return 0;
4639}
4640_ACEOF
4641rm -f conftest$ac_exeext
4642if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4643 (eval $ac_link) 2>&5
4644 ac_status=$?
4645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4646 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4648 (eval $ac_try) 2>&5
4649 ac_status=$?
4650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4651 (exit $ac_status); }; }; then
4652 ac_cv_sizeof_int=`cat conftest.val`
4653else
4654 echo "$as_me: program exited with status $ac_status" >&5
4655echo "$as_me: failed program was:" >&5
4656sed 's/^/| /' conftest.$ac_ext >&5
4657
4658( exit $ac_status )
4659{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4660See \`config.log' for more details." >&5
4661echo "$as_me: error: cannot compute sizeof (int), 77
4662See \`config.log' for more details." >&2;}
4663 { (exit 1); exit 1; }; }
4664fi
4665rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4666fi
4667fi
4668rm -f conftest.val
4669else
4670 ac_cv_sizeof_int=0
4671fi
4672fi
4673echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4674echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4675cat >>confdefs.h <<_ACEOF
4676#define SIZEOF_INT $ac_cv_sizeof_int
4677_ACEOF
4678
4679
4680echo "$as_me:$LINENO: checking for long" >&5
4681echo $ECHO_N "checking for long... $ECHO_C" >&6
4682if test "${ac_cv_type_long+set}" = set; then
4683 echo $ECHO_N "(cached) $ECHO_C" >&6
4684else
4685 cat >conftest.$ac_ext <<_ACEOF
4686/* confdefs.h. */
4687_ACEOF
4688cat confdefs.h >>conftest.$ac_ext
4689cat >>conftest.$ac_ext <<_ACEOF
4690/* end confdefs.h. */
4691$ac_includes_default
4692int
4693main ()
4694{
4695if ((long *) 0)
4696 return 0;
4697if (sizeof (long))
4698 return 0;
4699 ;
4700 return 0;
4701}
4702_ACEOF
4703rm -f conftest.$ac_objext
4704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4705 (eval $ac_compile) 2>conftest.er1
4706 ac_status=$?
4707 grep -v '^ *+' conftest.er1 >conftest.err
4708 rm -f conftest.er1
4709 cat conftest.err >&5
4710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4711 (exit $ac_status); } &&
c8aeaa6d 4712 { ac_try='test -z "$ac_c_werror_flag"
4713 || test ! -s conftest.err'
b085c511 4714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4715 (eval $ac_try) 2>&5
4716 ac_status=$?
4717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4718 (exit $ac_status); }; } &&
4719 { ac_try='test -s conftest.$ac_objext'
4720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4721 (eval $ac_try) 2>&5
4722 ac_status=$?
4723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4724 (exit $ac_status); }; }; then
4725 ac_cv_type_long=yes
4726else
4727 echo "$as_me: failed program was:" >&5
4728sed 's/^/| /' conftest.$ac_ext >&5
4729
4730ac_cv_type_long=no
4731fi
4732rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4733fi
4734echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4735echo "${ECHO_T}$ac_cv_type_long" >&6
4736
4737echo "$as_me:$LINENO: checking size of long" >&5
4738echo $ECHO_N "checking size of long... $ECHO_C" >&6
4739if test "${ac_cv_sizeof_long+set}" = set; then
4740 echo $ECHO_N "(cached) $ECHO_C" >&6
4741else
4742 if test "$ac_cv_type_long" = yes; then
4743 # The cast to unsigned long works around a bug in the HP C Compiler
4744 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4745 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4746 # This bug is HP SR number 8606223364.
4747 if test "$cross_compiling" = yes; then
4748 # Depending upon the size, compute the lo and hi bounds.
4749cat >conftest.$ac_ext <<_ACEOF
4750/* confdefs.h. */
4751_ACEOF
4752cat confdefs.h >>conftest.$ac_ext
4753cat >>conftest.$ac_ext <<_ACEOF
4754/* end confdefs.h. */
4755$ac_includes_default
4756int
4757main ()
4758{
4759static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
4760test_array [0] = 0
4761
4762 ;
4763 return 0;
4764}
4765_ACEOF
4766rm -f conftest.$ac_objext
4767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4768 (eval $ac_compile) 2>conftest.er1
4769 ac_status=$?
4770 grep -v '^ *+' conftest.er1 >conftest.err
4771 rm -f conftest.er1
4772 cat conftest.err >&5
4773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4774 (exit $ac_status); } &&
c8aeaa6d 4775 { ac_try='test -z "$ac_c_werror_flag"
4776 || test ! -s conftest.err'
b085c511 4777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4778 (eval $ac_try) 2>&5
4779 ac_status=$?
4780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4781 (exit $ac_status); }; } &&
4782 { ac_try='test -s conftest.$ac_objext'
4783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4784 (eval $ac_try) 2>&5
4785 ac_status=$?
4786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4787 (exit $ac_status); }; }; then
4788 ac_lo=0 ac_mid=0
4789 while :; do
4790 cat >conftest.$ac_ext <<_ACEOF
4791/* confdefs.h. */
4792_ACEOF
4793cat confdefs.h >>conftest.$ac_ext
4794cat >>conftest.$ac_ext <<_ACEOF
4795/* end confdefs.h. */
4796$ac_includes_default
4797int
4798main ()
4799{
4800static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4801test_array [0] = 0
4802
4803 ;
4804 return 0;
4805}
4806_ACEOF
4807rm -f conftest.$ac_objext
4808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4809 (eval $ac_compile) 2>conftest.er1
4810 ac_status=$?
4811 grep -v '^ *+' conftest.er1 >conftest.err
4812 rm -f conftest.er1
4813 cat conftest.err >&5
4814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815 (exit $ac_status); } &&
c8aeaa6d 4816 { ac_try='test -z "$ac_c_werror_flag"
4817 || test ! -s conftest.err'
b085c511 4818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4819 (eval $ac_try) 2>&5
4820 ac_status=$?
4821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4822 (exit $ac_status); }; } &&
4823 { ac_try='test -s conftest.$ac_objext'
4824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4825 (eval $ac_try) 2>&5
4826 ac_status=$?
4827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4828 (exit $ac_status); }; }; then
4829 ac_hi=$ac_mid; break
4830else
4831 echo "$as_me: failed program was:" >&5
4832sed 's/^/| /' conftest.$ac_ext >&5
4833
4834ac_lo=`expr $ac_mid + 1`
4835 if test $ac_lo -le $ac_mid; then
4836 ac_lo= ac_hi=
4837 break
4838 fi
4839 ac_mid=`expr 2 '*' $ac_mid + 1`
4840fi
4841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4842 done
4843else
4844 echo "$as_me: failed program was:" >&5
4845sed 's/^/| /' conftest.$ac_ext >&5
4846
4847cat >conftest.$ac_ext <<_ACEOF
4848/* confdefs.h. */
4849_ACEOF
4850cat confdefs.h >>conftest.$ac_ext
4851cat >>conftest.$ac_ext <<_ACEOF
4852/* end confdefs.h. */
4853$ac_includes_default
4854int
4855main ()
4856{
4857static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
4858test_array [0] = 0
4859
4860 ;
4861 return 0;
4862}
4863_ACEOF
4864rm -f conftest.$ac_objext
4865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4866 (eval $ac_compile) 2>conftest.er1
4867 ac_status=$?
4868 grep -v '^ *+' conftest.er1 >conftest.err
4869 rm -f conftest.er1
4870 cat conftest.err >&5
4871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4872 (exit $ac_status); } &&
c8aeaa6d 4873 { ac_try='test -z "$ac_c_werror_flag"
4874 || test ! -s conftest.err'
b085c511 4875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4876 (eval $ac_try) 2>&5
4877 ac_status=$?
4878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4879 (exit $ac_status); }; } &&
4880 { ac_try='test -s conftest.$ac_objext'
4881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4882 (eval $ac_try) 2>&5
4883 ac_status=$?
4884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4885 (exit $ac_status); }; }; then
4886 ac_hi=-1 ac_mid=-1
4887 while :; do
4888 cat >conftest.$ac_ext <<_ACEOF
4889/* confdefs.h. */
4890_ACEOF
4891cat confdefs.h >>conftest.$ac_ext
4892cat >>conftest.$ac_ext <<_ACEOF
4893/* end confdefs.h. */
4894$ac_includes_default
4895int
4896main ()
4897{
4898static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
4899test_array [0] = 0
4900
4901 ;
4902 return 0;
4903}
4904_ACEOF
4905rm -f conftest.$ac_objext
4906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4907 (eval $ac_compile) 2>conftest.er1
4908 ac_status=$?
4909 grep -v '^ *+' conftest.er1 >conftest.err
4910 rm -f conftest.er1
4911 cat conftest.err >&5
4912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4913 (exit $ac_status); } &&
c8aeaa6d 4914 { ac_try='test -z "$ac_c_werror_flag"
4915 || test ! -s conftest.err'
b085c511 4916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4917 (eval $ac_try) 2>&5
4918 ac_status=$?
4919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4920 (exit $ac_status); }; } &&
4921 { ac_try='test -s conftest.$ac_objext'
4922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4923 (eval $ac_try) 2>&5
4924 ac_status=$?
4925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4926 (exit $ac_status); }; }; then
4927 ac_lo=$ac_mid; break
4928else
4929 echo "$as_me: failed program was:" >&5
4930sed 's/^/| /' conftest.$ac_ext >&5
4931
4932ac_hi=`expr '(' $ac_mid ')' - 1`
4933 if test $ac_mid -le $ac_hi; then
4934 ac_lo= ac_hi=
4935 break
4936 fi
4937 ac_mid=`expr 2 '*' $ac_mid`
4938fi
4939rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4940 done
4941else
4942 echo "$as_me: failed program was:" >&5
4943sed 's/^/| /' conftest.$ac_ext >&5
4944
4945ac_lo= ac_hi=
4946fi
4947rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4948fi
4949rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4950# Binary search between lo and hi bounds.
4951while test "x$ac_lo" != "x$ac_hi"; do
4952 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4953 cat >conftest.$ac_ext <<_ACEOF
4954/* confdefs.h. */
4955_ACEOF
4956cat confdefs.h >>conftest.$ac_ext
4957cat >>conftest.$ac_ext <<_ACEOF
4958/* end confdefs.h. */
4959$ac_includes_default
4960int
4961main ()
4962{
4963static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4964test_array [0] = 0
4965
4966 ;
4967 return 0;
4968}
4969_ACEOF
4970rm -f conftest.$ac_objext
4971if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4972 (eval $ac_compile) 2>conftest.er1
4973 ac_status=$?
4974 grep -v '^ *+' conftest.er1 >conftest.err
4975 rm -f conftest.er1
4976 cat conftest.err >&5
4977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4978 (exit $ac_status); } &&
c8aeaa6d 4979 { ac_try='test -z "$ac_c_werror_flag"
4980 || test ! -s conftest.err'
b085c511 4981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4982 (eval $ac_try) 2>&5
4983 ac_status=$?
4984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985 (exit $ac_status); }; } &&
4986 { ac_try='test -s conftest.$ac_objext'
4987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4988 (eval $ac_try) 2>&5
4989 ac_status=$?
4990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4991 (exit $ac_status); }; }; then
4992 ac_hi=$ac_mid
4993else
4994 echo "$as_me: failed program was:" >&5
4995sed 's/^/| /' conftest.$ac_ext >&5
4996
4997ac_lo=`expr '(' $ac_mid ')' + 1`
4998fi
4999rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5000done
5001case $ac_lo in
5002?*) ac_cv_sizeof_long=$ac_lo;;
5003'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5004See \`config.log' for more details." >&5
5005echo "$as_me: error: cannot compute sizeof (long), 77
5006See \`config.log' for more details." >&2;}
5007 { (exit 1); exit 1; }; } ;;
5008esac
5009else
5010 if test "$cross_compiling" = yes; then
c8aeaa6d 5011 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5012See \`config.log' for more details." >&5
5013echo "$as_me: error: cannot run test program while cross compiling
5014See \`config.log' for more details." >&2;}
b085c511 5015 { (exit 1); exit 1; }; }
5016else
5017 cat >conftest.$ac_ext <<_ACEOF
5018/* confdefs.h. */
5019_ACEOF
5020cat confdefs.h >>conftest.$ac_ext
5021cat >>conftest.$ac_ext <<_ACEOF
5022/* end confdefs.h. */
5023$ac_includes_default
5024long longval () { return (long) (sizeof (long)); }
5025unsigned long ulongval () { return (long) (sizeof (long)); }
5026#include <stdio.h>
5027#include <stdlib.h>
5028int
5029main ()
5030{
5031
5032 FILE *f = fopen ("conftest.val", "w");
5033 if (! f)
5034 exit (1);
5035 if (((long) (sizeof (long))) < 0)
5036 {
5037 long i = longval ();
5038 if (i != ((long) (sizeof (long))))
5039 exit (1);
5040 fprintf (f, "%ld\n", i);
5041 }
5042 else
5043 {
5044 unsigned long i = ulongval ();
5045 if (i != ((long) (sizeof (long))))
5046 exit (1);
5047 fprintf (f, "%lu\n", i);
5048 }
5049 exit (ferror (f) || fclose (f) != 0);
5050
5051 ;
5052 return 0;
5053}
5054_ACEOF
5055rm -f conftest$ac_exeext
5056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5057 (eval $ac_link) 2>&5
5058 ac_status=$?
5059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5062 (eval $ac_try) 2>&5
5063 ac_status=$?
5064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065 (exit $ac_status); }; }; then
5066 ac_cv_sizeof_long=`cat conftest.val`
5067else
5068 echo "$as_me: program exited with status $ac_status" >&5
5069echo "$as_me: failed program was:" >&5
5070sed 's/^/| /' conftest.$ac_ext >&5
5071
5072( exit $ac_status )
5073{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5074See \`config.log' for more details." >&5
5075echo "$as_me: error: cannot compute sizeof (long), 77
5076See \`config.log' for more details." >&2;}
5077 { (exit 1); exit 1; }; }
5078fi
5079rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5080fi
5081fi
5082rm -f conftest.val
5083else
5084 ac_cv_sizeof_long=0
5085fi
5086fi
5087echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5088echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5089cat >>confdefs.h <<_ACEOF
5090#define SIZEOF_LONG $ac_cv_sizeof_long
5091_ACEOF
5092
5093
cd29f3a4 5094echo "$as_me:$LINENO: checking for long long" >&5
5095echo $ECHO_N "checking for long long... $ECHO_C" >&6
5096if test "${ac_cv_type_long_long+set}" = set; then
5097 echo $ECHO_N "(cached) $ECHO_C" >&6
5098else
5099 cat >conftest.$ac_ext <<_ACEOF
5100/* confdefs.h. */
5101_ACEOF
5102cat confdefs.h >>conftest.$ac_ext
5103cat >>conftest.$ac_ext <<_ACEOF
5104/* end confdefs.h. */
5105$ac_includes_default
5106int
5107main ()
5108{
5109if ((long long *) 0)
5110 return 0;
5111if (sizeof (long long))
5112 return 0;
5113 ;
5114 return 0;
5115}
5116_ACEOF
5117rm -f conftest.$ac_objext
5118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5119 (eval $ac_compile) 2>conftest.er1
5120 ac_status=$?
5121 grep -v '^ *+' conftest.er1 >conftest.err
5122 rm -f conftest.er1
5123 cat conftest.err >&5
5124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5125 (exit $ac_status); } &&
c8aeaa6d 5126 { ac_try='test -z "$ac_c_werror_flag"
5127 || test ! -s conftest.err'
cd29f3a4 5128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5129 (eval $ac_try) 2>&5
5130 ac_status=$?
5131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132 (exit $ac_status); }; } &&
5133 { ac_try='test -s conftest.$ac_objext'
5134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5135 (eval $ac_try) 2>&5
5136 ac_status=$?
5137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5138 (exit $ac_status); }; }; then
5139 ac_cv_type_long_long=yes
5140else
5141 echo "$as_me: failed program was:" >&5
5142sed 's/^/| /' conftest.$ac_ext >&5
5143
5144ac_cv_type_long_long=no
5145fi
5146rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5147fi
5148echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5149echo "${ECHO_T}$ac_cv_type_long_long" >&6
5150if test $ac_cv_type_long_long = yes; then
5151
5152cat >>confdefs.h <<_ACEOF
5153#define HAVE_LONG_LONG 1
5154_ACEOF
5155
5156echo "$as_me:$LINENO: checking for long long" >&5
b085c511 5157echo $ECHO_N "checking for long long... $ECHO_C" >&6
5158if test "${ac_cv_type_long_long+set}" = set; then
5159 echo $ECHO_N "(cached) $ECHO_C" >&6
5160else
5161 cat >conftest.$ac_ext <<_ACEOF
5162/* confdefs.h. */
5163_ACEOF
5164cat confdefs.h >>conftest.$ac_ext
5165cat >>conftest.$ac_ext <<_ACEOF
5166/* end confdefs.h. */
5167$ac_includes_default
5168int
5169main ()
5170{
5171if ((long long *) 0)
5172 return 0;
5173if (sizeof (long long))
5174 return 0;
5175 ;
5176 return 0;
5177}
5178_ACEOF
5179rm -f conftest.$ac_objext
5180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5181 (eval $ac_compile) 2>conftest.er1
5182 ac_status=$?
5183 grep -v '^ *+' conftest.er1 >conftest.err
5184 rm -f conftest.er1
5185 cat conftest.err >&5
5186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5187 (exit $ac_status); } &&
c8aeaa6d 5188 { ac_try='test -z "$ac_c_werror_flag"
5189 || test ! -s conftest.err'
b085c511 5190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5191 (eval $ac_try) 2>&5
5192 ac_status=$?
5193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5194 (exit $ac_status); }; } &&
5195 { ac_try='test -s conftest.$ac_objext'
5196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5197 (eval $ac_try) 2>&5
5198 ac_status=$?
5199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5200 (exit $ac_status); }; }; then
5201 ac_cv_type_long_long=yes
5202else
5203 echo "$as_me: failed program was:" >&5
5204sed 's/^/| /' conftest.$ac_ext >&5
5205
5206ac_cv_type_long_long=no
5207fi
5208rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5209fi
5210echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5211echo "${ECHO_T}$ac_cv_type_long_long" >&6
5212
5213echo "$as_me:$LINENO: checking size of long long" >&5
5214echo $ECHO_N "checking size of long long... $ECHO_C" >&6
5215if test "${ac_cv_sizeof_long_long+set}" = set; then
5216 echo $ECHO_N "(cached) $ECHO_C" >&6
5217else
5218 if test "$ac_cv_type_long_long" = yes; then
5219 # The cast to unsigned long works around a bug in the HP C Compiler
5220 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5221 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5222 # This bug is HP SR number 8606223364.
5223 if test "$cross_compiling" = yes; then
5224 # Depending upon the size, compute the lo and hi bounds.
5225cat >conftest.$ac_ext <<_ACEOF
5226/* confdefs.h. */
5227_ACEOF
5228cat confdefs.h >>conftest.$ac_ext
5229cat >>conftest.$ac_ext <<_ACEOF
5230/* end confdefs.h. */
5231$ac_includes_default
5232int
5233main ()
5234{
5235static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
5236test_array [0] = 0
5237
5238 ;
5239 return 0;
5240}
5241_ACEOF
5242rm -f conftest.$ac_objext
5243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5244 (eval $ac_compile) 2>conftest.er1
5245 ac_status=$?
5246 grep -v '^ *+' conftest.er1 >conftest.err
5247 rm -f conftest.er1
5248 cat conftest.err >&5
5249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5250 (exit $ac_status); } &&
c8aeaa6d 5251 { ac_try='test -z "$ac_c_werror_flag"
5252 || test ! -s conftest.err'
b085c511 5253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5254 (eval $ac_try) 2>&5
5255 ac_status=$?
5256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5257 (exit $ac_status); }; } &&
5258 { ac_try='test -s conftest.$ac_objext'
5259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5260 (eval $ac_try) 2>&5
5261 ac_status=$?
5262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5263 (exit $ac_status); }; }; then
5264 ac_lo=0 ac_mid=0
5265 while :; do
5266 cat >conftest.$ac_ext <<_ACEOF
5267/* confdefs.h. */
5268_ACEOF
5269cat confdefs.h >>conftest.$ac_ext
5270cat >>conftest.$ac_ext <<_ACEOF
5271/* end confdefs.h. */
5272$ac_includes_default
5273int
5274main ()
5275{
5276static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5277test_array [0] = 0
5278
5279 ;
5280 return 0;
5281}
5282_ACEOF
5283rm -f conftest.$ac_objext
5284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5285 (eval $ac_compile) 2>conftest.er1
5286 ac_status=$?
5287 grep -v '^ *+' conftest.er1 >conftest.err
5288 rm -f conftest.er1
5289 cat conftest.err >&5
5290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5291 (exit $ac_status); } &&
c8aeaa6d 5292 { ac_try='test -z "$ac_c_werror_flag"
5293 || test ! -s conftest.err'
b085c511 5294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5295 (eval $ac_try) 2>&5
5296 ac_status=$?
5297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5298 (exit $ac_status); }; } &&
5299 { ac_try='test -s conftest.$ac_objext'
5300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5301 (eval $ac_try) 2>&5
5302 ac_status=$?
5303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5304 (exit $ac_status); }; }; then
5305 ac_hi=$ac_mid; break
5306else
5307 echo "$as_me: failed program was:" >&5
5308sed 's/^/| /' conftest.$ac_ext >&5
5309
5310ac_lo=`expr $ac_mid + 1`
5311 if test $ac_lo -le $ac_mid; then
5312 ac_lo= ac_hi=
5313 break
5314 fi
5315 ac_mid=`expr 2 '*' $ac_mid + 1`
5316fi
5317rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5318 done
5319else
5320 echo "$as_me: failed program was:" >&5
5321sed 's/^/| /' conftest.$ac_ext >&5
5322
5323cat >conftest.$ac_ext <<_ACEOF
5324/* confdefs.h. */
5325_ACEOF
5326cat confdefs.h >>conftest.$ac_ext
5327cat >>conftest.$ac_ext <<_ACEOF
5328/* end confdefs.h. */
5329$ac_includes_default
5330int
5331main ()
5332{
5333static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
5334test_array [0] = 0
5335
5336 ;
5337 return 0;
5338}
5339_ACEOF
5340rm -f conftest.$ac_objext
5341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5342 (eval $ac_compile) 2>conftest.er1
5343 ac_status=$?
5344 grep -v '^ *+' conftest.er1 >conftest.err
5345 rm -f conftest.er1
5346 cat conftest.err >&5
5347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5348 (exit $ac_status); } &&
c8aeaa6d 5349 { ac_try='test -z "$ac_c_werror_flag"
5350 || test ! -s conftest.err'
b085c511 5351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5352 (eval $ac_try) 2>&5
5353 ac_status=$?
5354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5355 (exit $ac_status); }; } &&
5356 { ac_try='test -s conftest.$ac_objext'
5357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5358 (eval $ac_try) 2>&5
5359 ac_status=$?
5360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5361 (exit $ac_status); }; }; then
5362 ac_hi=-1 ac_mid=-1
5363 while :; do
5364 cat >conftest.$ac_ext <<_ACEOF
5365/* confdefs.h. */
5366_ACEOF
5367cat confdefs.h >>conftest.$ac_ext
5368cat >>conftest.$ac_ext <<_ACEOF
5369/* end confdefs.h. */
5370$ac_includes_default
5371int
5372main ()
5373{
5374static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
5375test_array [0] = 0
5376
5377 ;
5378 return 0;
5379}
5380_ACEOF
5381rm -f conftest.$ac_objext
5382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5383 (eval $ac_compile) 2>conftest.er1
5384 ac_status=$?
5385 grep -v '^ *+' conftest.er1 >conftest.err
5386 rm -f conftest.er1
5387 cat conftest.err >&5
5388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5389 (exit $ac_status); } &&
c8aeaa6d 5390 { ac_try='test -z "$ac_c_werror_flag"
5391 || test ! -s conftest.err'
b085c511 5392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5393 (eval $ac_try) 2>&5
5394 ac_status=$?
5395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5396 (exit $ac_status); }; } &&
5397 { ac_try='test -s conftest.$ac_objext'
5398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5399 (eval $ac_try) 2>&5
5400 ac_status=$?
5401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5402 (exit $ac_status); }; }; then
5403 ac_lo=$ac_mid; break
5404else
5405 echo "$as_me: failed program was:" >&5
5406sed 's/^/| /' conftest.$ac_ext >&5
5407
5408ac_hi=`expr '(' $ac_mid ')' - 1`
5409 if test $ac_mid -le $ac_hi; then
5410 ac_lo= ac_hi=
5411 break
5412 fi
5413 ac_mid=`expr 2 '*' $ac_mid`
5414fi
5415rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5416 done
5417else
5418 echo "$as_me: failed program was:" >&5
5419sed 's/^/| /' conftest.$ac_ext >&5
5420
5421ac_lo= ac_hi=
5422fi
5423rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5424fi
5425rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5426# Binary search between lo and hi bounds.
5427while test "x$ac_lo" != "x$ac_hi"; do
5428 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5429 cat >conftest.$ac_ext <<_ACEOF
5430/* confdefs.h. */
5431_ACEOF
5432cat confdefs.h >>conftest.$ac_ext
5433cat >>conftest.$ac_ext <<_ACEOF
5434/* end confdefs.h. */
5435$ac_includes_default
5436int
5437main ()
5438{
5439static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5440test_array [0] = 0
5441
5442 ;
5443 return 0;
5444}
5445_ACEOF
5446rm -f conftest.$ac_objext
5447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5448 (eval $ac_compile) 2>conftest.er1
5449 ac_status=$?
5450 grep -v '^ *+' conftest.er1 >conftest.err
5451 rm -f conftest.er1
5452 cat conftest.err >&5
5453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5454 (exit $ac_status); } &&
c8aeaa6d 5455 { ac_try='test -z "$ac_c_werror_flag"
5456 || test ! -s conftest.err'
b085c511 5457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5458 (eval $ac_try) 2>&5
5459 ac_status=$?
5460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5461 (exit $ac_status); }; } &&
5462 { ac_try='test -s conftest.$ac_objext'
5463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5464 (eval $ac_try) 2>&5
5465 ac_status=$?
5466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5467 (exit $ac_status); }; }; then
5468 ac_hi=$ac_mid
5469else
5470 echo "$as_me: failed program was:" >&5
5471sed 's/^/| /' conftest.$ac_ext >&5
5472
5473ac_lo=`expr '(' $ac_mid ')' + 1`
5474fi
5475rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5476done
5477case $ac_lo in
5478?*) ac_cv_sizeof_long_long=$ac_lo;;
5479'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5480See \`config.log' for more details." >&5
5481echo "$as_me: error: cannot compute sizeof (long long), 77
5482See \`config.log' for more details." >&2;}
5483 { (exit 1); exit 1; }; } ;;
5484esac
5485else
5486 if test "$cross_compiling" = yes; then
c8aeaa6d 5487 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5488See \`config.log' for more details." >&5
5489echo "$as_me: error: cannot run test program while cross compiling
5490See \`config.log' for more details." >&2;}
b085c511 5491 { (exit 1); exit 1; }; }
5492else
5493 cat >conftest.$ac_ext <<_ACEOF
5494/* confdefs.h. */
5495_ACEOF
5496cat confdefs.h >>conftest.$ac_ext
5497cat >>conftest.$ac_ext <<_ACEOF
5498/* end confdefs.h. */
5499$ac_includes_default
5500long longval () { return (long) (sizeof (long long)); }
5501unsigned long ulongval () { return (long) (sizeof (long long)); }
5502#include <stdio.h>
5503#include <stdlib.h>
5504int
5505main ()
5506{
5507
5508 FILE *f = fopen ("conftest.val", "w");
5509 if (! f)
5510 exit (1);
5511 if (((long) (sizeof (long long))) < 0)
5512 {
5513 long i = longval ();
5514 if (i != ((long) (sizeof (long long))))
5515 exit (1);
5516 fprintf (f, "%ld\n", i);
5517 }
5518 else
5519 {
5520 unsigned long i = ulongval ();
5521 if (i != ((long) (sizeof (long long))))
5522 exit (1);
5523 fprintf (f, "%lu\n", i);
5524 }
5525 exit (ferror (f) || fclose (f) != 0);
5526
5527 ;
5528 return 0;
5529}
5530_ACEOF
5531rm -f conftest$ac_exeext
5532if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5533 (eval $ac_link) 2>&5
5534 ac_status=$?
5535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5536 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5538 (eval $ac_try) 2>&5
5539 ac_status=$?
5540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5541 (exit $ac_status); }; }; then
5542 ac_cv_sizeof_long_long=`cat conftest.val`
5543else
5544 echo "$as_me: program exited with status $ac_status" >&5
5545echo "$as_me: failed program was:" >&5
5546sed 's/^/| /' conftest.$ac_ext >&5
5547
5548( exit $ac_status )
5549{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5550See \`config.log' for more details." >&5
5551echo "$as_me: error: cannot compute sizeof (long long), 77
5552See \`config.log' for more details." >&2;}
5553 { (exit 1); exit 1; }; }
5554fi
5555rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5556fi
5557fi
5558rm -f conftest.val
5559else
5560 ac_cv_sizeof_long_long=0
5561fi
5562fi
5563echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5564echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
5565cat >>confdefs.h <<_ACEOF
5566#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5567_ACEOF
5568
5569
5570fi
cd29f3a4 5571
5572echo "$as_me:$LINENO: checking for __int64" >&5
5573echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5574if test "${ac_cv_type___int64+set}" = set; then
5575 echo $ECHO_N "(cached) $ECHO_C" >&6
5576else
5577 cat >conftest.$ac_ext <<_ACEOF
5578/* confdefs.h. */
5579_ACEOF
5580cat confdefs.h >>conftest.$ac_ext
5581cat >>conftest.$ac_ext <<_ACEOF
5582/* end confdefs.h. */
5583$ac_includes_default
5584int
5585main ()
5586{
5587if ((__int64 *) 0)
5588 return 0;
5589if (sizeof (__int64))
5590 return 0;
5591 ;
5592 return 0;
5593}
5594_ACEOF
5595rm -f conftest.$ac_objext
5596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5597 (eval $ac_compile) 2>conftest.er1
5598 ac_status=$?
5599 grep -v '^ *+' conftest.er1 >conftest.err
5600 rm -f conftest.er1
5601 cat conftest.err >&5
5602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5603 (exit $ac_status); } &&
c8aeaa6d 5604 { ac_try='test -z "$ac_c_werror_flag"
5605 || test ! -s conftest.err'
cd29f3a4 5606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5607 (eval $ac_try) 2>&5
5608 ac_status=$?
5609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5610 (exit $ac_status); }; } &&
5611 { ac_try='test -s conftest.$ac_objext'
5612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5613 (eval $ac_try) 2>&5
5614 ac_status=$?
5615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5616 (exit $ac_status); }; }; then
5617 ac_cv_type___int64=yes
5618else
5619 echo "$as_me: failed program was:" >&5
5620sed 's/^/| /' conftest.$ac_ext >&5
5621
5622ac_cv_type___int64=no
5623fi
5624rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5625fi
5626echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5627echo "${ECHO_T}$ac_cv_type___int64" >&6
5628if test $ac_cv_type___int64 = yes; then
5629
5630cat >>confdefs.h <<_ACEOF
5631#define HAVE___INT64 1
5632_ACEOF
5633
5634echo "$as_me:$LINENO: checking for __int64" >&5
b085c511 5635echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5636if test "${ac_cv_type___int64+set}" = set; then
5637 echo $ECHO_N "(cached) $ECHO_C" >&6
5638else
6a8964db 5639 cat >conftest.$ac_ext <<_ACEOF
6a8964db 5640/* confdefs.h. */
5641_ACEOF
5642cat confdefs.h >>conftest.$ac_ext
5643cat >>conftest.$ac_ext <<_ACEOF
5644/* end confdefs.h. */
b085c511 5645$ac_includes_default
6a8964db 5646int
5647main ()
5648{
b085c511 5649if ((__int64 *) 0)
5650 return 0;
5651if (sizeof (__int64))
5652 return 0;
6a8964db 5653 ;
5654 return 0;
5655}
5656_ACEOF
5657rm -f conftest.$ac_objext
5658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 5659 (eval $ac_compile) 2>conftest.er1
6a8964db 5660 ac_status=$?
9ebd0bb2 5661 grep -v '^ *+' conftest.er1 >conftest.err
5662 rm -f conftest.er1
5663 cat conftest.err >&5
6a8964db 5664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5665 (exit $ac_status); } &&
c8aeaa6d 5666 { ac_try='test -z "$ac_c_werror_flag"
5667 || test ! -s conftest.err'
9ebd0bb2 5668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5669 (eval $ac_try) 2>&5
5670 ac_status=$?
5671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5672 (exit $ac_status); }; } &&
5673 { ac_try='test -s conftest.$ac_objext'
6a8964db 5674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5675 (eval $ac_try) 2>&5
5676 ac_status=$?
5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678 (exit $ac_status); }; }; then
b085c511 5679 ac_cv_type___int64=yes
6f817829 5680else
6a8964db 5681 echo "$as_me: failed program was:" >&5
5682sed 's/^/| /' conftest.$ac_ext >&5
5683
b085c511 5684ac_cv_type___int64=no
6f817829 5685fi
9ebd0bb2 5686rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6f817829 5687fi
b085c511 5688echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5689echo "${ECHO_T}$ac_cv_type___int64" >&6
6f817829 5690
b085c511 5691echo "$as_me:$LINENO: checking size of __int64" >&5
5692echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
5693if test "${ac_cv_sizeof___int64+set}" = set; then
6a8964db 5694 echo $ECHO_N "(cached) $ECHO_C" >&6
0fa54ff1 5695else
b085c511 5696 if test "$ac_cv_type___int64" = yes; then
5697 # The cast to unsigned long works around a bug in the HP C Compiler
5698 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5699 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5700 # This bug is HP SR number 8606223364.
5701 if test "$cross_compiling" = yes; then
5702 # Depending upon the size, compute the lo and hi bounds.
5703cat >conftest.$ac_ext <<_ACEOF
6a8964db 5704/* confdefs.h. */
5705_ACEOF
5706cat confdefs.h >>conftest.$ac_ext
5707cat >>conftest.$ac_ext <<_ACEOF
5708/* end confdefs.h. */
b085c511 5709$ac_includes_default
6a8964db 5710int
5711main ()
5712{
b085c511 5713static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
5714test_array [0] = 0
5715
6a8964db 5716 ;
5717 return 0;
5718}
5719_ACEOF
5720rm -f conftest.$ac_objext
5721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 5722 (eval $ac_compile) 2>conftest.er1
6a8964db 5723 ac_status=$?
9ebd0bb2 5724 grep -v '^ *+' conftest.er1 >conftest.err
5725 rm -f conftest.er1
5726 cat conftest.err >&5
6a8964db 5727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5728 (exit $ac_status); } &&
c8aeaa6d 5729 { ac_try='test -z "$ac_c_werror_flag"
5730 || test ! -s conftest.err'
9ebd0bb2 5731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5732 (eval $ac_try) 2>&5
5733 ac_status=$?
5734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5735 (exit $ac_status); }; } &&
5736 { ac_try='test -s conftest.$ac_objext'
6a8964db 5737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5738 (eval $ac_try) 2>&5
5739 ac_status=$?
5740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5741 (exit $ac_status); }; }; then
b085c511 5742 ac_lo=0 ac_mid=0
5743 while :; do
5744 cat >conftest.$ac_ext <<_ACEOF
6a8964db 5745/* confdefs.h. */
5746_ACEOF
5747cat confdefs.h >>conftest.$ac_ext
5748cat >>conftest.$ac_ext <<_ACEOF
5749/* end confdefs.h. */
b085c511 5750$ac_includes_default
6a8964db 5751int
5752main ()
5753{
b085c511 5754static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5755test_array [0] = 0
5756
6a8964db 5757 ;
5758 return 0;
5759}
5760_ACEOF
5761rm -f conftest.$ac_objext
5762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 5763 (eval $ac_compile) 2>conftest.er1
6a8964db 5764 ac_status=$?
9ebd0bb2 5765 grep -v '^ *+' conftest.er1 >conftest.err
5766 rm -f conftest.er1
5767 cat conftest.err >&5
6a8964db 5768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5769 (exit $ac_status); } &&
c8aeaa6d 5770 { ac_try='test -z "$ac_c_werror_flag"
5771 || test ! -s conftest.err'
9ebd0bb2 5772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5773 (eval $ac_try) 2>&5
5774 ac_status=$?
5775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5776 (exit $ac_status); }; } &&
5777 { ac_try='test -s conftest.$ac_objext'
6a8964db 5778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5779 (eval $ac_try) 2>&5
5780 ac_status=$?
5781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5782 (exit $ac_status); }; }; then
b085c511 5783 ac_hi=$ac_mid; break
02be28b3 5784else
6a8964db 5785 echo "$as_me: failed program was:" >&5
5786sed 's/^/| /' conftest.$ac_ext >&5
5787
b085c511 5788ac_lo=`expr $ac_mid + 1`
5789 if test $ac_lo -le $ac_mid; then
5790 ac_lo= ac_hi=
5791 break
5792 fi
5793 ac_mid=`expr 2 '*' $ac_mid + 1`
02be28b3 5794fi
9ebd0bb2 5795rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 5796 done
02be28b3 5797else
b085c511 5798 echo "$as_me: failed program was:" >&5
5799sed 's/^/| /' conftest.$ac_ext >&5
5800
5801cat >conftest.$ac_ext <<_ACEOF
6a8964db 5802/* confdefs.h. */
5803_ACEOF
5804cat confdefs.h >>conftest.$ac_ext
5805cat >>conftest.$ac_ext <<_ACEOF
5806/* end confdefs.h. */
b085c511 5807$ac_includes_default
6a8964db 5808int
5809main ()
5810{
b085c511 5811static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
5812test_array [0] = 0
5813
6a8964db 5814 ;
5815 return 0;
5816}
5817_ACEOF
5818rm -f conftest.$ac_objext
5819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 5820 (eval $ac_compile) 2>conftest.er1
6a8964db 5821 ac_status=$?
9ebd0bb2 5822 grep -v '^ *+' conftest.er1 >conftest.err
5823 rm -f conftest.er1
5824 cat conftest.err >&5
6a8964db 5825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5826 (exit $ac_status); } &&
c8aeaa6d 5827 { ac_try='test -z "$ac_c_werror_flag"
5828 || test ! -s conftest.err'
9ebd0bb2 5829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5830 (eval $ac_try) 2>&5
5831 ac_status=$?
5832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5833 (exit $ac_status); }; } &&
5834 { ac_try='test -s conftest.$ac_objext'
6a8964db 5835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5836 (eval $ac_try) 2>&5
5837 ac_status=$?
5838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5839 (exit $ac_status); }; }; then
b085c511 5840 ac_hi=-1 ac_mid=-1
5841 while :; do
5842 cat >conftest.$ac_ext <<_ACEOF
6a8964db 5843/* confdefs.h. */
5844_ACEOF
5845cat confdefs.h >>conftest.$ac_ext
5846cat >>conftest.$ac_ext <<_ACEOF
5847/* end confdefs.h. */
b085c511 5848$ac_includes_default
6a8964db 5849int
5850main ()
5851{
b085c511 5852static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
5853test_array [0] = 0
5854
6a8964db 5855 ;
5856 return 0;
5857}
5858_ACEOF
5859rm -f conftest.$ac_objext
5860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 5861 (eval $ac_compile) 2>conftest.er1
6a8964db 5862 ac_status=$?
9ebd0bb2 5863 grep -v '^ *+' conftest.er1 >conftest.err
5864 rm -f conftest.er1
5865 cat conftest.err >&5
6a8964db 5866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867 (exit $ac_status); } &&
c8aeaa6d 5868 { ac_try='test -z "$ac_c_werror_flag"
5869 || test ! -s conftest.err'
9ebd0bb2 5870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5871 (eval $ac_try) 2>&5
5872 ac_status=$?
5873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5874 (exit $ac_status); }; } &&
5875 { ac_try='test -s conftest.$ac_objext'
6a8964db 5876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5877 (eval $ac_try) 2>&5
5878 ac_status=$?
5879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880 (exit $ac_status); }; }; then
b085c511 5881 ac_lo=$ac_mid; break
6a7488af 5882else
6a8964db 5883 echo "$as_me: failed program was:" >&5
5884sed 's/^/| /' conftest.$ac_ext >&5
5885
b085c511 5886ac_hi=`expr '(' $ac_mid ')' - 1`
5887 if test $ac_mid -le $ac_hi; then
5888 ac_lo= ac_hi=
5889 break
5890 fi
5891 ac_mid=`expr 2 '*' $ac_mid`
6a7488af 5892fi
9ebd0bb2 5893rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b085c511 5894 done
5895else
5896 echo "$as_me: failed program was:" >&5
5897sed 's/^/| /' conftest.$ac_ext >&5
6a7488af 5898
b085c511 5899ac_lo= ac_hi=
0fa54ff1 5900fi
b085c511 5901rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
0fa54ff1 5902fi
b085c511 5903rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5904# Binary search between lo and hi bounds.
5905while test "x$ac_lo" != "x$ac_hi"; do
5906 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6a8964db 5907 cat >conftest.$ac_ext <<_ACEOF
6a8964db 5908/* confdefs.h. */
5909_ACEOF
5910cat confdefs.h >>conftest.$ac_ext
5911cat >>conftest.$ac_ext <<_ACEOF
5912/* end confdefs.h. */
b085c511 5913$ac_includes_default
6a8964db 5914int
5915main ()
5916{
b085c511 5917static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5918test_array [0] = 0
5919
6a8964db 5920 ;
5921 return 0;
5922}
5923_ACEOF
5924rm -f conftest.$ac_objext
5925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 5926 (eval $ac_compile) 2>conftest.er1
6a8964db 5927 ac_status=$?
9ebd0bb2 5928 grep -v '^ *+' conftest.er1 >conftest.err
5929 rm -f conftest.er1
5930 cat conftest.err >&5
6a8964db 5931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5932 (exit $ac_status); } &&
c8aeaa6d 5933 { ac_try='test -z "$ac_c_werror_flag"
5934 || test ! -s conftest.err'
9ebd0bb2 5935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5936 (eval $ac_try) 2>&5
5937 ac_status=$?
5938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5939 (exit $ac_status); }; } &&
5940 { ac_try='test -s conftest.$ac_objext'
6a8964db 5941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5942 (eval $ac_try) 2>&5
5943 ac_status=$?
5944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5945 (exit $ac_status); }; }; then
b085c511 5946 ac_hi=$ac_mid
02be28b3 5947else
6a8964db 5948 echo "$as_me: failed program was:" >&5
5949sed 's/^/| /' conftest.$ac_ext >&5
5950
b085c511 5951ac_lo=`expr '(' $ac_mid ')' + 1`
02be28b3 5952fi
9ebd0bb2 5953rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
0fa54ff1 5954done
b085c511 5955case $ac_lo in
5956?*) ac_cv_sizeof___int64=$ac_lo;;
5957'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
5958See \`config.log' for more details." >&5
5959echo "$as_me: error: cannot compute sizeof (__int64), 77
5960See \`config.log' for more details." >&2;}
5961 { (exit 1); exit 1; }; } ;;
5962esac
5963else
5964 if test "$cross_compiling" = yes; then
c8aeaa6d 5965 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5966See \`config.log' for more details." >&5
5967echo "$as_me: error: cannot run test program while cross compiling
5968See \`config.log' for more details." >&2;}
b085c511 5969 { (exit 1); exit 1; }; }
5970else
5971 cat >conftest.$ac_ext <<_ACEOF
5972/* confdefs.h. */
5973_ACEOF
5974cat confdefs.h >>conftest.$ac_ext
5975cat >>conftest.$ac_ext <<_ACEOF
5976/* end confdefs.h. */
5977$ac_includes_default
5978long longval () { return (long) (sizeof (__int64)); }
5979unsigned long ulongval () { return (long) (sizeof (__int64)); }
5980#include <stdio.h>
5981#include <stdlib.h>
5982int
5983main ()
5984{
0fa54ff1 5985
b085c511 5986 FILE *f = fopen ("conftest.val", "w");
5987 if (! f)
5988 exit (1);
5989 if (((long) (sizeof (__int64))) < 0)
5990 {
5991 long i = longval ();
5992 if (i != ((long) (sizeof (__int64))))
5993 exit (1);
5994 fprintf (f, "%ld\n", i);
5995 }
5996 else
5997 {
5998 unsigned long i = ulongval ();
5999 if (i != ((long) (sizeof (__int64))))
6000 exit (1);
6001 fprintf (f, "%lu\n", i);
6002 }
6003 exit (ferror (f) || fclose (f) != 0);
6004
6005 ;
6006 return 0;
6007}
6008_ACEOF
6009rm -f conftest$ac_exeext
6010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6011 (eval $ac_link) 2>&5
6012 ac_status=$?
6013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6014 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6016 (eval $ac_try) 2>&5
6017 ac_status=$?
6018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6019 (exit $ac_status); }; }; then
6020 ac_cv_sizeof___int64=`cat conftest.val`
6021else
6022 echo "$as_me: program exited with status $ac_status" >&5
6023echo "$as_me: failed program was:" >&5
6024sed 's/^/| /' conftest.$ac_ext >&5
02be28b3 6025
b085c511 6026( exit $ac_status )
6027{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
6028See \`config.log' for more details." >&5
6029echo "$as_me: error: cannot compute sizeof (__int64), 77
6030See \`config.log' for more details." >&2;}
6a8964db 6031 { (exit 1); exit 1; }; }
0fa54ff1 6032fi
b085c511 6033rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6034fi
6035fi
6036rm -f conftest.val
6037else
6038 ac_cv_sizeof___int64=0
6039fi
6040fi
6a8964db 6041echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6042echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
6a8964db 6043cat >>confdefs.h <<_ACEOF
0fa54ff1 6044#define SIZEOF___INT64 $ac_cv_sizeof___int64
6a8964db 6045_ACEOF
0fa54ff1 6046
c9e1a048 6047
0fa54ff1 6048fi
6049
cd29f3a4 6050
7349ace9 6051# ---------------------
6052# Warnings and checking
6053# ---------------------
6054
1f59d204 6055# Check $CC warning features (if it's GCC).
6056# We want to use -pedantic, but we don't want warnings about
6057# * 'long long'
6058# * variadic macros
6059# So, we only use -pedantic if we can disable those warnings.
6060
6061echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6062echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
6063if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6064 echo $ECHO_N "(cached) $ECHO_C" >&6
6065else
6066 save_CFLAGS="$CFLAGS"
6067 CFLAGS="-Wno-long-long"
6068 cat >conftest.$ac_ext <<_ACEOF
6069/* confdefs.h. */
6070_ACEOF
6071cat confdefs.h >>conftest.$ac_ext
6072cat >>conftest.$ac_ext <<_ACEOF
6073/* end confdefs.h. */
6074
6075_ACEOF
6076rm -f conftest.$ac_objext
6077if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6078 (eval $ac_compile) 2>conftest.er1
6079 ac_status=$?
6080 grep -v '^ *+' conftest.er1 >conftest.err
6081 rm -f conftest.er1
6082 cat conftest.err >&5
6083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6084 (exit $ac_status); } &&
c8aeaa6d 6085 { ac_try='test -z "$ac_c_werror_flag"
6086 || test ! -s conftest.err'
1f59d204 6087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6088 (eval $ac_try) 2>&5
6089 ac_status=$?
6090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6091 (exit $ac_status); }; } &&
6092 { ac_try='test -s conftest.$ac_objext'
6093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6094 (eval $ac_try) 2>&5
6095 ac_status=$?
6096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6097 (exit $ac_status); }; }; then
6098 ac_cv_prog_cc_w_no_long_long=yes
6099else
6100 echo "$as_me: failed program was:" >&5
6101sed 's/^/| /' conftest.$ac_ext >&5
6102
6103ac_cv_prog_cc_w_no_long_long=no
6104fi
6105rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6106 CFLAGS="$save_CFLAGS"
6107
6108fi
6109echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6110echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
6111
6112echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6113echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
6114if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6115 echo $ECHO_N "(cached) $ECHO_C" >&6
6116else
6117 save_CFLAGS="$CFLAGS"
6118 CFLAGS="-Wno-variadic-macros"
6119 cat >conftest.$ac_ext <<_ACEOF
6120/* confdefs.h. */
6121_ACEOF
6122cat confdefs.h >>conftest.$ac_ext
6123cat >>conftest.$ac_ext <<_ACEOF
6124/* end confdefs.h. */
6125
6126_ACEOF
6127rm -f conftest.$ac_objext
6128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6129 (eval $ac_compile) 2>conftest.er1
6130 ac_status=$?
6131 grep -v '^ *+' conftest.er1 >conftest.err
6132 rm -f conftest.er1
6133 cat conftest.err >&5
6134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6135 (exit $ac_status); } &&
c8aeaa6d 6136 { ac_try='test -z "$ac_c_werror_flag"
6137 || test ! -s conftest.err'
1f59d204 6138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6139 (eval $ac_try) 2>&5
6140 ac_status=$?
6141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6142 (exit $ac_status); }; } &&
6143 { ac_try='test -s conftest.$ac_objext'
6144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6145 (eval $ac_try) 2>&5
6146 ac_status=$?
6147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6148 (exit $ac_status); }; }; then
6149 ac_cv_prog_cc_w_no_variadic_macros=yes
6150else
6151 echo "$as_me: failed program was:" >&5
6152sed 's/^/| /' conftest.$ac_ext >&5
6153
6154ac_cv_prog_cc_w_no_variadic_macros=no
6155fi
6156rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6157 CFLAGS="$save_CFLAGS"
6158
6159fi
6160echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6161echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
6162
7349ace9 6163strict1_warn=
1f59d204 6164if test $ac_cv_prog_cc_w_no_long_long = yes \
6165 && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then
6166 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros"
7349ace9 6167fi
6168
c70828fb 6169# Add -Wold-style-definition if it's accepted
6170echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6171echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
6172if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6173 echo $ECHO_N "(cached) $ECHO_C" >&6
6174else
6175 save_CFLAGS="$CFLAGS"
6176 CFLAGS="-Wold-style-definition"
6177 cat >conftest.$ac_ext <<_ACEOF
6178/* confdefs.h. */
6179_ACEOF
6180cat confdefs.h >>conftest.$ac_ext
6181cat >>conftest.$ac_ext <<_ACEOF
6182/* end confdefs.h. */
6183
6184_ACEOF
6185rm -f conftest.$ac_objext
6186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6187 (eval $ac_compile) 2>conftest.er1
6188 ac_status=$?
6189 grep -v '^ *+' conftest.er1 >conftest.err
6190 rm -f conftest.er1
6191 cat conftest.err >&5
6192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6193 (exit $ac_status); } &&
c8aeaa6d 6194 { ac_try='test -z "$ac_c_werror_flag"
6195 || test ! -s conftest.err'
c70828fb 6196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6197 (eval $ac_try) 2>&5
6198 ac_status=$?
6199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6200 (exit $ac_status); }; } &&
6201 { ac_try='test -s conftest.$ac_objext'
6202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6203 (eval $ac_try) 2>&5
6204 ac_status=$?
6205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6206 (exit $ac_status); }; }; then
6207 ac_cv_prog_cc_w_old_style_definition=yes
6208else
6209 echo "$as_me: failed program was:" >&5
6210sed 's/^/| /' conftest.$ac_ext >&5
6211
6212ac_cv_prog_cc_w_old_style_definition=no
6213fi
6214rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6215 CFLAGS="$save_CFLAGS"
6216
6217fi
6218echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
6219echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
6220if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
6221 strict1_warn="${strict1_warn} -Wold-style-definition"
6222fi
6223
3df48165 6224# Add -Wmissing-format-attribute if it's accepted
6225echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5
6226echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6
6227if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then
6228 echo $ECHO_N "(cached) $ECHO_C" >&6
6229else
6230 save_CFLAGS="$CFLAGS"
6231 CFLAGS="-Wmissing-format-attribute"
6232 cat >conftest.$ac_ext <<_ACEOF
6233/* confdefs.h. */
6234_ACEOF
6235cat confdefs.h >>conftest.$ac_ext
6236cat >>conftest.$ac_ext <<_ACEOF
6237/* end confdefs.h. */
6238
6239_ACEOF
6240rm -f conftest.$ac_objext
6241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6242 (eval $ac_compile) 2>conftest.er1
6243 ac_status=$?
6244 grep -v '^ *+' conftest.er1 >conftest.err
6245 rm -f conftest.er1
6246 cat conftest.err >&5
6247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6248 (exit $ac_status); } &&
c8aeaa6d 6249 { ac_try='test -z "$ac_c_werror_flag"
6250 || test ! -s conftest.err'
3df48165 6251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6252 (eval $ac_try) 2>&5
6253 ac_status=$?
6254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6255 (exit $ac_status); }; } &&
6256 { ac_try='test -s conftest.$ac_objext'
6257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6258 (eval $ac_try) 2>&5
6259 ac_status=$?
6260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6261 (exit $ac_status); }; }; then
6262 ac_cv_prog_cc_w_missing_format_attribute=yes
6263else
6264 echo "$as_me: failed program was:" >&5
6265sed 's/^/| /' conftest.$ac_ext >&5
6266
6267ac_cv_prog_cc_w_missing_format_attribute=no
6268fi
6269rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6270 CFLAGS="$save_CFLAGS"
6271
6272fi
6273echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5
6274echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6
6275if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then
6276 strict1_warn="${strict1_warn} -Wmissing-format-attribute"
6277fi
6278
c0c5068d 6279# Enable -Werror, period.
6280# Check whether --enable-werror_always or --disable-werror_always was given.
6281if test "${enable_werror_always+set}" = set; then
6282 enableval="$enable_werror_always"
6283
6284else
6285 enable_werror_always=no
6286fi;
6287if test x${enable_werror_always} = xyes ; then
6288 strict1_warn="${strict1_warn} -Werror"
6289 WERROR=-Werror
6290fi
6291
3df48165 6292
6293
6a8964db 6294# If the native compiler is GCC, we can enable warnings even in stage1.
0fa54ff1 6295# That's useful for people building cross-compilers, or just running a
6296# quick `make'.
6297warn_cflags=
6298if test "x$GCC" = "xyes"; then
6299 warn_cflags='$(GCC_WARN_CFLAGS)'
6300fi
6301
6302
a179eb24 6303# Enable -Werror in bootstrap stage2 and later.
1af67e62 6304is_release=
6305if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6306 is_release=yes
6307fi
a179eb24 6308# Check whether --enable-werror or --disable-werror was given.
6309if test "${enable_werror+set}" = set; then
6310 enableval="$enable_werror"
6a8964db 6311
a179eb24 6312else
997731eb 6313 if test x$is_release = x ; then
6314 # Default to "yes" on development branches.
a179eb24 6315 enable_werror=yes
997731eb 6316else
6317 # Default to "no" on release branches.
6318 enable_werror=no
6319fi
6a8964db 6320fi;
a179eb24 6321if test x$enable_werror = xyes ; then
6322 WERROR=-Werror
6323fi
6324
6325
0fa54ff1 6326# Enable expensive internal checks
6327# Check whether --enable-checking or --disable-checking was given.
6328if test "${enable_checking+set}" = set; then
6329 enableval="$enable_checking"
a1fa05f0 6330 ac_checking_flags="${enableval}"
6331else
6332
6333# Determine the default checks.
6334if test x$is_release = x ; then
6335 ac_checking_flags=yes
6336else
6337 ac_checking_flags=release
6338fi
6339fi;
6340ac_assert_checking=1
6341ac_checking=
5391b316 6342ac_fold_checking=
6343ac_gc_checking=
6344ac_gc_always_collect=
0fa54ff1 6345ac_rtl_checking=
6346ac_rtlflag_checking=
06350693 6347ac_runtime_checking=1
5391b316 6348ac_tree_checking=
6349ac_valgrind_checking=
a1fa05f0 6350IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6351for check in $ac_checking_flags
6352do
6353 case $check in
5391b316 6354 # these set all the flags to specific states
a1fa05f0 6355 yes) ac_assert_checking=1 ; ac_checking=1 ;
5391b316 6356 ac_fold_checking= ; ac_gc_checking=1 ;
6357 ac_gc_always_collect= ; ac_rtl_checking= ;
fcd42b1e 6358 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
5391b316 6359 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6360 no|none) ac_assert_checking= ; ac_checking= ;
6361 ac_fold_checking= ; ac_gc_checking= ;
6362 ac_gc_always_collect= ; ac_rtl_checking= ;
fcd42b1e 6363 ac_rtlflag_checking= ; ac_runtime_checking= ;
5391b316 6364 ac_tree_checking= ; ac_valgrind_checking= ;;
a1fa05f0 6365 all) ac_assert_checking=1 ; ac_checking=1 ;
5391b316 6366 ac_fold_checking=1 ; ac_gc_checking=1 ;
6367 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
6368 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6369 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6370 release) ac_assert_checking=1 ; ac_checking= ;
6371 ac_fold_checking= ; ac_gc_checking= ;
6372 ac_gc_always_collect= ; ac_rtl_checking= ;
6373 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6374 ac_tree_checking= ; ac_valgrind_checking= ;;
6375 # these enable particular checks
a1fa05f0 6376 assert) ac_assert_checking=1 ;;
6377 fold) ac_fold_checking=1 ;;
6378 gc) ac_gc_checking=1 ;;
6379 gcac) ac_gc_always_collect=1 ;;
6380 misc) ac_checking=1 ;;
a1fa05f0 6381 rtl) ac_rtl_checking=1 ;;
5391b316 6382 rtlflag) ac_rtlflag_checking=1 ;;
06350693 6383 runtime) ac_runtime_checking=1 ;;
a1fa05f0 6384 tree) ac_tree_checking=1 ;;
5391b316 6385 valgrind) ac_valgrind_checking=1 ;;
a1fa05f0 6386 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
6a8964db 6387echo "$as_me: error: unknown check category $check" >&2;}
6388 { (exit 1); exit 1; }; } ;;
a1fa05f0 6389 esac
6390done
6391IFS="$ac_save_IFS"
997731eb 6392
6a8964db 6393nocommon_flag=""
6394if test x$ac_checking != x ; then
6395
6396cat >>confdefs.h <<\_ACEOF
6397#define ENABLE_CHECKING 1
6398_ACEOF
6399
6400 nocommon_flag=-fno-common
6401fi
6402
997731eb 6403if test x$ac_assert_checking != x ; then
6404
6405cat >>confdefs.h <<\_ACEOF
6406#define ENABLE_ASSERT_CHECKING 1
6407_ACEOF
6408
06350693 6409fi
fcd42b1e 6410
06350693 6411if test x$ac_runtime_checking != x ; then
6412
6413cat >>confdefs.h <<\_ACEOF
6414#define ENABLE_RUNTIME_CHECKING 1
6415_ACEOF
6416
997731eb 6417fi
6a8964db 6418if test x$ac_tree_checking != x ; then
6419
6420cat >>confdefs.h <<\_ACEOF
6421#define ENABLE_TREE_CHECKING 1
6422_ACEOF
6423
4e7212d1 6424 TREEBROWSER=tree-browser.o
6a8964db 6425fi
4e7212d1 6426
6a8964db 6427if test x$ac_rtl_checking != x ; then
6428
6429cat >>confdefs.h <<\_ACEOF
6430#define ENABLE_RTL_CHECKING 1
6431_ACEOF
6432
6433fi
6434if test x$ac_rtlflag_checking != x ; then
6435
6436cat >>confdefs.h <<\_ACEOF
6437#define ENABLE_RTL_FLAG_CHECKING 1
6438_ACEOF
6439
6440fi
6441if test x$ac_gc_checking != x ; then
6442
6443cat >>confdefs.h <<\_ACEOF
6444#define ENABLE_GC_CHECKING 1
6445_ACEOF
6446
6447fi
6448if test x$ac_gc_always_collect != x ; then
6449
6450cat >>confdefs.h <<\_ACEOF
6451#define ENABLE_GC_ALWAYS_COLLECT 1
6452_ACEOF
6453
6454fi
6455if test x$ac_fold_checking != x ; then
6456
6457cat >>confdefs.h <<\_ACEOF
6458#define ENABLE_FOLD_CHECKING 1
6459_ACEOF
6460
6461fi
6462valgrind_path_defines=
6463valgrind_command=
6464
6a8964db 6465if test "${ac_cv_header_valgrind_h+set}" = set; then
6466 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6467echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6468if test "${ac_cv_header_valgrind_h+set}" = set; then
6469 echo $ECHO_N "(cached) $ECHO_C" >&6
6470fi
6471echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6472echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6473else
6474 # Is the header compilable?
6475echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6476echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
6477cat >conftest.$ac_ext <<_ACEOF
6a8964db 6478/* confdefs.h. */
6479_ACEOF
6480cat confdefs.h >>conftest.$ac_ext
6481cat >>conftest.$ac_ext <<_ACEOF
6482/* end confdefs.h. */
6483$ac_includes_default
12b432e0 6484#include <valgrind.h>
6a8964db 6485_ACEOF
6486rm -f conftest.$ac_objext
6487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 6488 (eval $ac_compile) 2>conftest.er1
6a8964db 6489 ac_status=$?
9ebd0bb2 6490 grep -v '^ *+' conftest.er1 >conftest.err
6491 rm -f conftest.er1
6492 cat conftest.err >&5
6a8964db 6493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6494 (exit $ac_status); } &&
c8aeaa6d 6495 { ac_try='test -z "$ac_c_werror_flag"
6496 || test ! -s conftest.err'
9ebd0bb2 6497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6498 (eval $ac_try) 2>&5
6499 ac_status=$?
6500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6501 (exit $ac_status); }; } &&
6502 { ac_try='test -s conftest.$ac_objext'
6a8964db 6503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6504 (eval $ac_try) 2>&5
6505 ac_status=$?
6506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6507 (exit $ac_status); }; }; then
6508 ac_header_compiler=yes
6509else
6510 echo "$as_me: failed program was:" >&5
6511sed 's/^/| /' conftest.$ac_ext >&5
6512
6513ac_header_compiler=no
6514fi
9ebd0bb2 6515rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6a8964db 6516echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6517echo "${ECHO_T}$ac_header_compiler" >&6
6518
6519# Is the header present?
6520echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6521echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
6522cat >conftest.$ac_ext <<_ACEOF
6a8964db 6523/* confdefs.h. */
6524_ACEOF
6525cat confdefs.h >>conftest.$ac_ext
6526cat >>conftest.$ac_ext <<_ACEOF
6527/* end confdefs.h. */
6528#include <valgrind.h>
6529_ACEOF
6530if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6531 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6532 ac_status=$?
6533 grep -v '^ *+' conftest.er1 >conftest.err
6534 rm -f conftest.er1
6535 cat conftest.err >&5
6536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6537 (exit $ac_status); } >/dev/null; then
6538 if test -s conftest.err; then
6539 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 6540 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 6541 else
6542 ac_cpp_err=
6543 fi
6544else
6545 ac_cpp_err=yes
6546fi
6547if test -z "$ac_cpp_err"; then
6548 ac_header_preproc=yes
6549else
6550 echo "$as_me: failed program was:" >&5
6551sed 's/^/| /' conftest.$ac_ext >&5
6552
6553 ac_header_preproc=no
6554fi
6555rm -f conftest.err conftest.$ac_ext
6556echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6557echo "${ECHO_T}$ac_header_preproc" >&6
6558
6559# So? What about this header?
9ebd0bb2 6560case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6561 yes:no: )
6a8964db 6562 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6563echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9ebd0bb2 6564 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6565echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6566 ac_header_preproc=yes
6a8964db 6567 ;;
9ebd0bb2 6568 no:yes:* )
6a8964db 6569 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6570echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
9ebd0bb2 6571 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6572echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6573 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6574echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6575 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6576echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
6a8964db 6577 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6578echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
9ebd0bb2 6579 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6580echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
6a8964db 6581 (
6582 cat <<\_ASBOX
9ebd0bb2 6583## ------------------------------------------ ##
6584## Report this to the AC_PACKAGE_NAME lists. ##
6585## ------------------------------------------ ##
6a8964db 6586_ASBOX
6587 ) |
6588 sed "s/^/$as_me: WARNING: /" >&2
6589 ;;
6590esac
6591echo "$as_me:$LINENO: checking for valgrind.h" >&5
6592echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6593if test "${ac_cv_header_valgrind_h+set}" = set; then
6594 echo $ECHO_N "(cached) $ECHO_C" >&6
6595else
6596 ac_cv_header_valgrind_h=$ac_header_preproc
3f720cf7 6597fi
6a8964db 6598echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6599echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6600
c9cd172c 6601fi
6a8964db 6602if test $ac_cv_header_valgrind_h = yes; then
3f720cf7 6603 have_valgrind_h=yes
6604else
6a8964db 6605 have_valgrind_h=no
3f720cf7 6606fi
6607
6608
6a8964db 6609
5391b316 6610if test x$ac_valgrind_checking != x ; then
0fa54ff1 6611 # It is certainly possible that there's valgrind but no valgrind.h.
6612 # GCC relies on making annotations so we must have both.
6a8964db 6613 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6614echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
6615 cat >conftest.$ac_ext <<_ACEOF
6a8964db 6616/* confdefs.h. */
6617_ACEOF
6618cat confdefs.h >>conftest.$ac_ext
6619cat >>conftest.$ac_ext <<_ACEOF
6620/* end confdefs.h. */
a519c4d3 6621#include <valgrind/memcheck.h>
8adead19 6622#ifndef VALGRIND_DISCARD
6623#error VALGRIND_DISCARD not defined
6624#endif
6a8964db 6625_ACEOF
6626if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6627 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6628 ac_status=$?
6629 grep -v '^ *+' conftest.er1 >conftest.err
6630 rm -f conftest.er1
6631 cat conftest.err >&5
6632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6633 (exit $ac_status); } >/dev/null; then
6634 if test -s conftest.err; then
6635 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 6636 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 6637 else
6638 ac_cpp_err=
6639 fi
6640else
6641 ac_cpp_err=yes
6642fi
6643if test -z "$ac_cpp_err"; then
a519c4d3 6644 gcc_cv_header_valgrind_memcheck_h=yes
6645else
6a8964db 6646 echo "$as_me: failed program was:" >&5
6647sed 's/^/| /' conftest.$ac_ext >&5
6648
a519c4d3 6649 gcc_cv_header_valgrind_memcheck_h=no
6650fi
6a8964db 6651rm -f conftest.err conftest.$ac_ext
6652 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6653echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6654 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6655echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
6656 cat >conftest.$ac_ext <<_ACEOF
6a8964db 6657/* confdefs.h. */
6658_ACEOF
6659cat confdefs.h >>conftest.$ac_ext
6660cat >>conftest.$ac_ext <<_ACEOF
6661/* end confdefs.h. */
a519c4d3 6662#include <memcheck.h>
6663#ifndef VALGRIND_DISCARD
6664#error VALGRIND_DISCARD not defined
6665#endif
6a8964db 6666_ACEOF
6667if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6668 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6669 ac_status=$?
6670 grep -v '^ *+' conftest.er1 >conftest.err
6671 rm -f conftest.er1
6672 cat conftest.err >&5
6673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6674 (exit $ac_status); } >/dev/null; then
6675 if test -s conftest.err; then
6676 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 6677 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 6678 else
6679 ac_cpp_err=
6680 fi
6681else
6682 ac_cpp_err=yes
6683fi
6684if test -z "$ac_cpp_err"; then
8adead19 6685 gcc_cv_header_memcheck_h=yes
6686else
6a8964db 6687 echo "$as_me: failed program was:" >&5
6688sed 's/^/| /' conftest.$ac_ext >&5
6689
c9e1a048 6690 gcc_cv_header_memcheck_h=no
6691fi
6a8964db 6692rm -f conftest.err conftest.$ac_ext
6693 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6694echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
6695
c6976b58 6696# Prepare PATH_SEPARATOR.
6697# The user is always right.
6698if test "${PATH_SEPARATOR+set}" != set; then
6699 echo "#! /bin/sh" >conf$$.sh
6700 echo "exit 0" >>conf$$.sh
6701 chmod +x conf$$.sh
6702 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6703 PATH_SEPARATOR=';'
6704 else
6705 PATH_SEPARATOR=:
6706 fi
6707 rm -f conf$$.sh
6708fi
6709
6710# Find out how to test for executable files. Don't use a zero-byte file,
6711# as systems may use methods other than mode bits to determine executability.
6712cat >conf$$.file <<_ASEOF
6713#! /bin/sh
6714exit 0
6715_ASEOF
6716chmod +x conf$$.file
6717if test -x conf$$.file >/dev/null 2>&1; then
6718 ac_executable_p="test -x"
6719else
6720 ac_executable_p="test -f"
6721fi
6722rm -f conf$$.file
6723
6724# Extract the first word of "valgrind", so it can be a program name with args.
0fa54ff1 6725set dummy valgrind; ac_word=$2
6a8964db 6726echo "$as_me:$LINENO: checking for $ac_word" >&5
6727echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6728if test "${ac_cv_path_valgrind_path+set}" = set; then
6729 echo $ECHO_N "(cached) $ECHO_C" >&6
0fa54ff1 6730else
6731 case "$valgrind_path" in
c6976b58 6732 [\\/]* | ?:[\\/]*)
6733 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6734 ;;
0fa54ff1 6735 *)
c6976b58 6736 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6737 for ac_dir in $PATH; do
6738 IFS="$ac_save_IFS"
6739 test -z "$ac_dir" && ac_dir=.
6740 for ac_exec_ext in '' $ac_executable_extensions; do
6741 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6742 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6743 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6744 break 2
6745 fi
6746 fi
6747 done
6748 done
6749 IFS="$ac_save_IFS"
6750 ;;
0fa54ff1 6751esac
02be28b3 6752fi
0fa54ff1 6753valgrind_path="$ac_cv_path_valgrind_path"
6754if test -n "$valgrind_path"; then
6a8964db 6755 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6756echo "${ECHO_T}$valgrind_path" >&6
0fa54ff1 6757else
6a8964db 6758 echo "$as_me:$LINENO: result: no" >&5
6759echo "${ECHO_T}no" >&6
0fa54ff1 6760fi
6761
a519c4d3 6762 if test "x$valgrind_path" = "x" \
6763 || (test $have_valgrind_h = no \
6764 && test $gcc_cv_header_memcheck_h = no \
6765 && test $gcc_cv_header_valgrind_memcheck_h = no); then
6a8964db 6766 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6767echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6768 { (exit 1); exit 1; }; }
0fa54ff1 6769 fi
6770 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6771 valgrind_command="$valgrind_path -q"
6a8964db 6772
6773cat >>confdefs.h <<\_ACEOF
0fa54ff1 6774#define ENABLE_VALGRIND_CHECKING 1
6a8964db 6775_ACEOF
02be28b3 6776
a519c4d3 6777 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
6a8964db 6778
6779cat >>confdefs.h <<\_ACEOF
a519c4d3 6780#define HAVE_VALGRIND_MEMCHECK_H 1
6a8964db 6781_ACEOF
a519c4d3 6782
6783 fi
8adead19 6784 if test $gcc_cv_header_memcheck_h = yes; then
6a8964db 6785
6786cat >>confdefs.h <<\_ACEOF
8adead19 6787#define HAVE_MEMCHECK_H 1
6a8964db 6788_ACEOF
8adead19 6789
6790 fi
0fa54ff1 6791fi
02be28b3 6792
02be28b3 6793
6794
0acc9e9d 6795# Check whether --enable-mapped-location or --disable-mapped-location was given.
6796if test "${enable_mapped_location+set}" = set; then
6797 enableval="$enable_mapped_location"
6798
6799else
6800 enable_mapped_location=no
6801fi;
6802
6803if test "$enable_mapped_location" = yes ; then
6804
6805cat >>confdefs.h <<\_ACEOF
6806#define USE_MAPPED_LOCATION 1
6807_ACEOF
6808
6809fi
6810
0fa54ff1 6811# Enable code coverage collection
6812# Check whether --enable-coverage or --disable-coverage was given.
6813if test "${enable_coverage+set}" = set; then
6814 enableval="$enable_coverage"
6815 case "${enableval}" in
034b0f6e 6816 yes|noopt)
6817 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6818 ;;
6819 opt)
6820 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6821 ;;
6822 no)
6823 # a.k.a. --disable-coverage
6824 coverage_flags=""
6825 ;;
6826 *)
6827 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
6a8964db 6828echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6829 { (exit 1); exit 1; }; }
034b0f6e 6830 ;;
0fa54ff1 6831esac
02be28b3 6832else
0fa54ff1 6833 coverage_flags=""
6a8964db 6834fi;
06f1fb80 6835
0fa54ff1 6836
86736f9e 6837# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
6838if test "${enable_gather_detailed_mem_stats+set}" = set; then
6839 enableval="$enable_gather_detailed_mem_stats"
6a8964db 6840
86736f9e 6841else
6842 enable_gather_detailed_mem_stats=no
6a8964db 6843fi;
86736f9e 6844if test x$enable_gather_detailed_mem_stats = xyes ; then
6a8964db 6845
6846cat >>confdefs.h <<\_ACEOF
86736f9e 6847#define GATHER_STATISTICS 1
6a8964db 6848_ACEOF
86736f9e 6849
6850fi
6851
966842d4 6852# -------------------------------
6853# Miscenalleous configure options
6854# -------------------------------
7349ace9 6855
6856# With stabs
6a8964db 6857
7349ace9 6858# Check whether --with-stabs or --without-stabs was given.
6859if test "${with_stabs+set}" = set; then
6860 withval="$with_stabs"
6861 stabs="$with_stabs"
6862else
6863 stabs=no
6a8964db 6864fi;
c9e1a048 6865
7349ace9 6866# Determine whether or not multilibs are enabled.
6867# Check whether --enable-multilib or --disable-multilib was given.
6868if test "${enable_multilib+set}" = set; then
6869 enableval="$enable_multilib"
6a8964db 6870
7349ace9 6871else
6872 enable_multilib=yes
6a8964db 6873fi;
02be28b3 6874
7349ace9 6875
0fa54ff1 6876# Enable __cxa_atexit for C++.
6877# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
6878if test "${enable___cxa_atexit+set}" = set; then
6879 enableval="$enable___cxa_atexit"
02be28b3 6880
6a8964db 6881fi;
02be28b3 6882
0fa54ff1 6883# Enable threads
6884# Pass with no value to take the default
6885# Pass with a value to specify a thread package
6886# Check whether --enable-threads or --disable-threads was given.
6887if test "${enable_threads+set}" = set; then
6888 enableval="$enable_threads"
6a8964db 6889
0fa54ff1 6890else
6891 enable_threads=''
6a8964db 6892fi;
0fa54ff1 6893
6894# Check whether --enable-objc-gc or --disable-objc-gc was given.
6895if test "${enable_objc_gc+set}" = set; then
6896 enableval="$enable_objc_gc"
6897 if test x$enable_objc_gc = xno; then
6898 objc_boehm_gc=''
6899else
6900 objc_boehm_gc=1
6901fi
6902else
6903 objc_boehm_gc=''
6a8964db 6904fi;
02be28b3 6905
6906
0fa54ff1 6907# Check whether --with-dwarf2 or --without-dwarf2 was given.
6908if test "${with_dwarf2+set}" = set; then
6909 withval="$with_dwarf2"
6910 dwarf2="$with_dwarf2"
02be28b3 6911else
0fa54ff1 6912 dwarf2=no
6a8964db 6913fi;
02be28b3 6914
0fa54ff1 6915# Check whether --enable-shared or --disable-shared was given.
6916if test "${enable_shared+set}" = set; then
6917 enableval="$enable_shared"
6a8964db 6918
0fa54ff1 6919 case $enable_shared in
6920 yes | no) ;;
6921 *)
6922 enable_shared=no
6923 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6924 for pkg in $enableval; do
6925 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
6926 enable_shared=yes
6927 fi
6928 done
6929 IFS="$ac_save_ifs"
6930 ;;
6931 esac
6932
02be28b3 6933else
0fa54ff1 6934 enable_shared=yes
6a8964db 6935fi;
02be28b3 6936
02be28b3 6937
02be28b3 6938
a99be165 6939# Check whether --with-build-sysroot or --without-build-sysroot was given.
6940if test "${with_build_sysroot+set}" = set; then
6941 withval="$with_build_sysroot"
6942
6943fi;
6944
6945
805e22b2 6946# Check whether --with-sysroot or --without-sysroot was given.
6947if test "${with_sysroot+set}" = set; then
6948 withval="$with_sysroot"
6a8964db 6949
805e22b2 6950 case ${with_sysroot} in
d58156a1 6951 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
805e22b2 6952 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
6953 esac
6a8964db 6954
805e22b2 6955 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
6956 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
6957
17acc97a 6958 if test "x$exec_prefix" = xNONE; then
6959 if test "x$prefix" = xNONE; then
6960 test_prefix=/usr/local
6961 else
6962 test_prefix=$prefix
6963 fi
6964 else
6965 test_prefix=$exec_prefix
6966 fi
6967 case ${TARGET_SYSTEM_ROOT} in
c323a7f4 6968 "${test_prefix}"|"${test_prefix}/"*|\
6969 '${exec_prefix}'|'${exec_prefix}/'*)
17acc97a 6970 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
6971 TARGET_SYSTEM_ROOT_DEFINE="$t"
6972 ;;
6973 esac
6974
805e22b2 6975else
6a8964db 6976
805e22b2 6977 TARGET_SYSTEM_ROOT=
d68c6656 6978 TARGET_SYSTEM_ROOT_DEFINE=
805e22b2 6979 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
6980
6a8964db 6981fi;
805e22b2 6982
6983
6984
6985
40109983 6986# Build with intermodule optimisations
40109983 6987# Check whether --enable-intermodule or --disable-intermodule was given.
6988if test "${enable_intermodule+set}" = set; then
6989 enableval="$enable_intermodule"
9285d7bb 6990 case ${enable_intermodule} in
6991 yes) onestep="-onestep";;
6992 *) onestep="";;
40109983 6993esac
9285d7bb 6994else
6995 onestep=""
6a8964db 6996fi;
40109983 6997
6998
5222575c 6999# Sanity check enable_languages in case someone does not run the toplevel
7000# configure # script.
7001# Check whether --enable-languages or --disable-languages was given.
7002if test "${enable_languages+set}" = set; then
7003 enableval="$enable_languages"
7004 case ,${enable_languages}, in
7005 ,,|,yes,)
7006 # go safe -- we cannot be much sure without the toplevel
7007 # configure's
7008 # analysis of which target libs are present and usable
7009 enable_languages=c
7010 ;;
7011 *,all,*)
7012 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
7013echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
7014 { (exit 1); exit 1; }; }
7015 ;;
7016 *,c,*)
7017 ;;
7018 *)
7019 enable_languages=c,${enable_languages}
7020 ;;
7021esac
7022else
7023 enable_languages=c
7024fi;
7025
7026subdirs=
7027for lang in ${srcdir}/*/config-lang.in
7028do
7029 case $lang in
7030 # The odd quoting in the next line works around
7031 # an apparent bug in bash 1.12 on linux.
7032 ${srcdir}/[*]/config-lang.in) ;;
7033 *)
7034 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
7035 if test "x$lang_alias" = x
7036 then
7037 echo "$lang doesn't set \$language." 1>&2
7038 exit 1
7039 fi
7040 case ",$enable_languages," in
7041 *,$lang_alias,*)
7042 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
7043 esac
7044 ;;
7045 esac
7046done
7047
7048
966842d4 7049# -------------------------
7050# Checks for other programs
7051# -------------------------
b3ff31d3 7052
6a8964db 7053echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7054echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
9ebd0bb2 7055set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
6a8964db 7056if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
7057 echo $ECHO_N "(cached) $ECHO_C" >&6
0dbd1c74 7058else
6a8964db 7059 cat >conftest.make <<\_ACEOF
0dbd1c74 7060all:
6a8964db 7061 @echo 'ac_maketemp="$(MAKE)"'
7062_ACEOF
0dbd1c74 7063# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6a8964db 7064eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
0dbd1c74 7065if test -n "$ac_maketemp"; then
7066 eval ac_cv_prog_make_${ac_make}_set=yes
7067else
7068 eval ac_cv_prog_make_${ac_make}_set=no
7069fi
6a8964db 7070rm -f conftest.make
0dbd1c74 7071fi
7072if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
6a8964db 7073 echo "$as_me:$LINENO: result: yes" >&5
7074echo "${ECHO_T}yes" >&6
0dbd1c74 7075 SET_MAKE=
7076else
6a8964db 7077 echo "$as_me:$LINENO: result: no" >&5
7078echo "${ECHO_T}no" >&6
0dbd1c74 7079 SET_MAKE="MAKE=${MAKE-make}"
7080fi
7081
7082
071cd279 7083# Find some useful tools
6a8964db 7084for ac_prog in gawk mawk nawk awk
071cd279 7085do
6a8964db 7086 # Extract the first word of "$ac_prog", so it can be a program name with args.
071cd279 7087set dummy $ac_prog; ac_word=$2
6a8964db 7088echo "$as_me:$LINENO: checking for $ac_word" >&5
7089echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7090if test "${ac_cv_prog_AWK+set}" = set; then
7091 echo $ECHO_N "(cached) $ECHO_C" >&6
071cd279 7092else
7093 if test -n "$AWK"; then
7094 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7095else
6a8964db 7096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7097for as_dir in $PATH
7098do
7099 IFS=$as_save_IFS
7100 test -z "$as_dir" && as_dir=.
7101 for ac_exec_ext in '' $ac_executable_extensions; do
7102 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7103 ac_cv_prog_AWK="$ac_prog"
7104 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7105 break 2
7106 fi
7107done
7108done
7109
071cd279 7110fi
7111fi
6a8964db 7112AWK=$ac_cv_prog_AWK
071cd279 7113if test -n "$AWK"; then
6a8964db 7114 echo "$as_me:$LINENO: result: $AWK" >&5
7115echo "${ECHO_T}$AWK" >&6
071cd279 7116else
6a8964db 7117 echo "$as_me:$LINENO: result: no" >&5
7118echo "${ECHO_T}no" >&6
071cd279 7119fi
7120
6a8964db 7121 test -n "$AWK" && break
071cd279 7122done
7123
e8b212b8 7124# We need awk to create options.c and options.h.
b007b385 7125# Bail out if it's missing.
7126case ${AWK} in
6a8964db 7127 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7128echo "$as_me: error: can't build without awk, bailing out" >&2;}
7129 { (exit 1); exit 1; }; } ;;
b007b385 7130esac
7131
6a8964db 7132echo "$as_me:$LINENO: checking whether ln -s works" >&5
7133echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
7134if test "${gcc_cv_prog_LN_S+set}" = set; then
7135 echo $ECHO_N "(cached) $ECHO_C" >&6
551ffacc 7136else
7137 rm -f conftestdata_t
7138echo >conftestdata_f
7139if ln -s conftestdata_f conftestdata_t 2>/dev/null
7140then
7141 gcc_cv_prog_LN_S="ln -s"
7142else
7143 if ln conftestdata_f conftestdata_t 2>/dev/null
7144 then
7145 gcc_cv_prog_LN_S=ln
7146 else
26be379c 7147 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7148 then
5cdb644a 7149 gcc_cv_prog_LN_S="cp -p"
26be379c 7150 else
7151 gcc_cv_prog_LN_S=cp
7152 fi
551ffacc 7153 fi
7154fi
7155rm -f conftestdata_f conftestdata_t
7156
7157fi
7158LN_S="$gcc_cv_prog_LN_S"
7159if test "$gcc_cv_prog_LN_S" = "ln -s"; then
6a8964db 7160 echo "$as_me:$LINENO: result: yes" >&5
7161echo "${ECHO_T}yes" >&6
551ffacc 7162else
7163 if test "$gcc_cv_prog_LN_S" = "ln"; then
6a8964db 7164 echo "$as_me:$LINENO: result: no, using ln" >&5
7165echo "${ECHO_T}no, using ln" >&6
551ffacc 7166 else
26be379c 7167 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7168echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
551ffacc 7169 fi
7170fi
7171
6b858cc5 7172echo "$as_me:$LINENO: checking whether ln works" >&5
7173echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
7174if test "${acx_cv_prog_LN+set}" = set; then
7175 echo $ECHO_N "(cached) $ECHO_C" >&6
7176else
7177 rm -f conftestdata_t
7178echo >conftestdata_f
7179if ln conftestdata_f conftestdata_t 2>/dev/null
7180then
7181 acx_cv_prog_LN=ln
7182else
7183 acx_cv_prog_LN=no
7184fi
7185rm -f conftestdata_f conftestdata_t
7186
7187fi
7188if test $acx_cv_prog_LN = no; then
7189 LN="$LN_S"
7190 echo "$as_me:$LINENO: result: no, using $LN" >&5
7191echo "${ECHO_T}no, using $LN" >&6
7192else
7193 LN="$acx_cv_prog_LN"
7194 echo "$as_me:$LINENO: result: yes" >&5
7195echo "${ECHO_T}yes" >&6
7196fi
7197
6a8964db 7198if test -n "$ac_tool_prefix"; then
7199 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7200set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7201echo "$as_me:$LINENO: checking for $ac_word" >&5
7202echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7203if test "${ac_cv_prog_RANLIB+set}" = set; then
7204 echo $ECHO_N "(cached) $ECHO_C" >&6
071cd279 7205else
7206 if test -n "$RANLIB"; then
7207 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7208else
6a8964db 7209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7210for as_dir in $PATH
7211do
7212 IFS=$as_save_IFS
7213 test -z "$as_dir" && as_dir=.
7214 for ac_exec_ext in '' $ac_executable_extensions; do
7215 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7216 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7217 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7218 break 2
7219 fi
7220done
7221done
7222
c9cd172c 7223fi
7224fi
6a8964db 7225RANLIB=$ac_cv_prog_RANLIB
c9cd172c 7226if test -n "$RANLIB"; then
6a8964db 7227 echo "$as_me:$LINENO: result: $RANLIB" >&5
7228echo "${ECHO_T}$RANLIB" >&6
7229else
7230 echo "$as_me:$LINENO: result: no" >&5
7231echo "${ECHO_T}no" >&6
7232fi
7233
7234fi
7235if test -z "$ac_cv_prog_RANLIB"; then
7236 ac_ct_RANLIB=$RANLIB
7237 # Extract the first word of "ranlib", so it can be a program name with args.
7238set dummy ranlib; ac_word=$2
7239echo "$as_me:$LINENO: checking for $ac_word" >&5
7240echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7241if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7242 echo $ECHO_N "(cached) $ECHO_C" >&6
7243else
7244 if test -n "$ac_ct_RANLIB"; then
7245 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7246else
7247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7248for as_dir in $PATH
7249do
7250 IFS=$as_save_IFS
7251 test -z "$as_dir" && as_dir=.
7252 for ac_exec_ext in '' $ac_executable_extensions; do
7253 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7254 ac_cv_prog_ac_ct_RANLIB="ranlib"
7255 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7256 break 2
7257 fi
7258done
7259done
7260
7261 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7262fi
7263fi
7264ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7265if test -n "$ac_ct_RANLIB"; then
7266 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7267echo "${ECHO_T}$ac_ct_RANLIB" >&6
c9cd172c 7268else
6a8964db 7269 echo "$as_me:$LINENO: result: no" >&5
7270echo "${ECHO_T}no" >&6
7271fi
7272
7273 RANLIB=$ac_ct_RANLIB
7274else
7275 RANLIB="$ac_cv_prog_RANLIB"
071cd279 7276fi
7277
72318bfa 7278case "${host}" in
7279*-*-darwin*)
7280 # By default, the Darwin ranlib will not treat common symbols as
7281 # definitions when building the archive table of contents. Other
7282 # ranlibs do that; pass an option to the Darwin ranlib that makes
7283 # it behave similarly.
7284 ranlib_flags="-c"
7285 ;;
7286*)
7287 ranlib_flags=""
7288esac
7289
7290
551ffacc 7291# Find a good install program. We prefer a C program (faster),
7292# so one script is as good as another. But avoid the broken or
7293# incompatible versions:
7294# SysV /etc/install, /usr/sbin/install
7295# SunOS /usr/etc/install
7296# IRIX /sbin/install
7297# AIX /bin/install
7298# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7299# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7300# ./install, which can be erroneously created by make from ./install.sh.
6a8964db 7301echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7302echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
551ffacc 7303if test -z "$INSTALL"; then
6a8964db 7304if test "${ac_cv_path_install+set}" = set; then
7305 echo $ECHO_N "(cached) $ECHO_C" >&6
551ffacc 7306else
7307 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7308 for ac_dir in $PATH; do
7309 # Account for people who put trailing slashes in PATH elements.
7310 case "$ac_dir/" in
7311 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7312 *)
7313 # OSF1 and SCO ODT 3.0 have their own names for install.
7314 for ac_prog in ginstall scoinst install; do
7315 if test -f $ac_dir/$ac_prog; then
7316 if test $ac_prog = install &&
7317 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7318 # AIX install. It has an incompatible calling convention.
7319 # OSF/1 installbsd also uses dspmsg, but is usable.
7320 :
7321 else
7322 ac_cv_path_install="$ac_dir/$ac_prog -c"
7323 break 2
7324 fi
7325 fi
7326 done
7327 ;;
7328 esac
7329 done
7330 IFS="$ac_save_IFS"
7331
7332fi
7333 if test "${ac_cv_path_install+set}" = set; then
7334 INSTALL="$ac_cv_path_install"
7335 else
7336 # As a last resort, use the slow shell script. We don't cache a
7337 # path for INSTALL within a source directory, because that will
7338 # break other packages using the cache if that directory is
7339 # removed, or if the path is relative.
7340 INSTALL="$ac_install_sh"
7341 fi
7342fi
6a8964db 7343echo "$as_me:$LINENO: result: $INSTALL" >&5
7344echo "${ECHO_T}$INSTALL" >&6
551ffacc 7345
7346# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7347# It thinks the first close brace ends the variable substitution.
7348test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7349
7350test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7351
071cd279 7352
8fea036f 7353# See if cmp has --ignore-initial.
6a8964db 7354echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7355echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
7356if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7357 echo $ECHO_N "(cached) $ECHO_C" >&6
8fea036f 7358else
7359 echo abfoo >t1
7360 echo cdfoo >t2
a918b4b1 7361 gcc_cv_prog_cmp_skip=slowcompare
8fea036f 7362 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7363 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
a918b4b1 7364 :
8fea036f 7365 else
7366 gcc_cv_prog_cmp_skip=gnucompare
7367 fi
a918b4b1 7368 fi
7369 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7370 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7371 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7372 :
7373 else
7374 gcc_cv_prog_cmp_skip=fastcompare
7375 fi
7376 fi
8fea036f 7377 fi
7378 rm t1 t2
7379
7380fi
6a8964db 7381echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7382echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
8fea036f 7383make_compare_target=$gcc_cv_prog_cmp_skip
7384
7385
7386
966842d4 7387# See if we have the mktemp command.
7388# Extract the first word of "mktemp", so it can be a program name with args.
7389set dummy mktemp; ac_word=$2
6a8964db 7390echo "$as_me:$LINENO: checking for $ac_word" >&5
7391echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7392if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7393 echo $ECHO_N "(cached) $ECHO_C" >&6
966842d4 7394else
7395 if test -n "$have_mktemp_command"; then
7396 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7397else
6a8964db 7398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7399for as_dir in $PATH
7400do
7401 IFS=$as_save_IFS
7402 test -z "$as_dir" && as_dir=.
7403 for ac_exec_ext in '' $ac_executable_extensions; do
7404 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7405 ac_cv_prog_have_mktemp_command="yes"
7406 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7407 break 2
7408 fi
7409done
7410done
7411
966842d4 7412 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7413fi
7414fi
6a8964db 7415have_mktemp_command=$ac_cv_prog_have_mktemp_command
966842d4 7416if test -n "$have_mktemp_command"; then
6a8964db 7417 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7418echo "${ECHO_T}$have_mktemp_command" >&6
966842d4 7419else
6a8964db 7420 echo "$as_me:$LINENO: result: no" >&5
7421echo "${ECHO_T}no" >&6
966842d4 7422fi
7423
7424
a1ad7483 7425MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
7426
7427# See if makeinfo has been installed and is modern enough
7428# that we can use it.
f32e3360 7429
7430ac_executable_extensions="$build_exeext"
7431
a1ad7483 7432# Extract the first word of "makeinfo", so it can be a program name with args.
966842d4 7433set dummy makeinfo; ac_word=$2
6a8964db 7434echo "$as_me:$LINENO: checking for $ac_word" >&5
7435echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7436if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7437 echo $ECHO_N "(cached) $ECHO_C" >&6
966842d4 7438else
7439 if test -n "$MAKEINFO"; then
7440 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7441else
6a8964db 7442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7443for as_dir in $PATH
7444do
7445 IFS=$as_save_IFS
7446 test -z "$as_dir" && as_dir=.
7447 for ac_exec_ext in '' $ac_executable_extensions; do
7448 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7449 ac_cv_prog_MAKEINFO="makeinfo"
7450 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7451 break 2
7452 fi
7453done
7454done
7455
966842d4 7456fi
7457fi
6a8964db 7458MAKEINFO=$ac_cv_prog_MAKEINFO
966842d4 7459if test -n "$MAKEINFO"; then
6a8964db 7460 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7461echo "${ECHO_T}$MAKEINFO" >&6
966842d4 7462else
6a8964db 7463 echo "$as_me:$LINENO: result: no" >&5
7464echo "${ECHO_T}no" >&6
966842d4 7465fi
7466
7467if test -n "$MAKEINFO"; then
7468 # Found it, now check the version.
6a8964db 7469 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7470echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
7471if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7472 echo $ECHO_N "(cached) $ECHO_C" >&6
966842d4 7473else
7474 ac_prog_version=`$MAKEINFO --version 2>&1 |
7475 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
c8aeaa6d 7476 echo "configure:7476: version of makeinfo is $ac_prog_version" >&5
966842d4 7477 case $ac_prog_version in
7478 '') gcc_cv_prog_makeinfo_modern=no;;
cf638329 7479 4.[4-9]*)
966842d4 7480 gcc_cv_prog_makeinfo_modern=yes;;
7481 *) gcc_cv_prog_makeinfo_modern=no;;
7482 esac
7483
7484fi
6a8964db 7485echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7486echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
966842d4 7487else
7488 gcc_cv_prog_makeinfo_modern=no
7489fi
7490
966842d4 7491if test $gcc_cv_prog_makeinfo_modern = no; then
a1ad7483 7492 MAKEINFO="$MISSING makeinfo"
6a8964db 7493 { echo "$as_me:$LINENO: WARNING:
7494*** Makeinfo is missing or too old.
7495*** Info documentation will not be built." >&5
7496echo "$as_me: WARNING:
c9e1a048 7497*** Makeinfo is missing or too old.
6a8964db 7498*** Info documentation will not be built." >&2;}
966842d4 7499 BUILD_INFO=
7500else
6a8964db 7501 BUILD_INFO=info
966842d4 7502fi
7503
a1ad7483 7504
966842d4 7505# Is pod2man recent enough to regenerate manpages?
6a8964db 7506echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7507echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
966842d4 7508if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
6a8964db 7509 echo "$as_me:$LINENO: result: yes" >&5
7510echo "${ECHO_T}yes" >&6
7511 GENERATED_MANPAGES=generated-manpages
966842d4 7512else
6a8964db 7513 echo "$as_me:$LINENO: result: no" >&5
7514echo "${ECHO_T}no" >&6
966842d4 7515 GENERATED_MANPAGES=
7516fi
7517
a1ad7483 7518
966842d4 7519# How about lex?
a1ad7483 7520for ac_prog in flex
7521do
7522 # Extract the first word of "$ac_prog", so it can be a program name with args.
7523set dummy $ac_prog; ac_word=$2
6a8964db 7524echo "$as_me:$LINENO: checking for $ac_word" >&5
7525echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7526if test "${ac_cv_prog_FLEX+set}" = set; then
7527 echo $ECHO_N "(cached) $ECHO_C" >&6
966842d4 7528else
7529 if test -n "$FLEX"; then
7530 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7531else
6a8964db 7532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7533for as_dir in $PATH
7534do
7535 IFS=$as_save_IFS
7536 test -z "$as_dir" && as_dir=.
7537 for ac_exec_ext in '' $ac_executable_extensions; do
7538 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a1ad7483 7539 ac_cv_prog_FLEX="$ac_prog"
6a8964db 7540 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7541 break 2
7542 fi
7543done
7544done
7545
966842d4 7546fi
7547fi
6a8964db 7548FLEX=$ac_cv_prog_FLEX
966842d4 7549if test -n "$FLEX"; then
6a8964db 7550 echo "$as_me:$LINENO: result: $FLEX" >&5
7551echo "${ECHO_T}$FLEX" >&6
966842d4 7552else
6a8964db 7553 echo "$as_me:$LINENO: result: no" >&5
7554echo "${ECHO_T}no" >&6
966842d4 7555fi
7556
a1ad7483 7557 test -n "$FLEX" && break
7558done
7559test -n "$FLEX" || FLEX="$MISSING flex"
7560
966842d4 7561
7562# Bison?
a1ad7483 7563for ac_prog in bison
7564do
7565 # Extract the first word of "$ac_prog", so it can be a program name with args.
7566set dummy $ac_prog; ac_word=$2
6a8964db 7567echo "$as_me:$LINENO: checking for $ac_word" >&5
7568echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7569if test "${ac_cv_prog_BISON+set}" = set; then
7570 echo $ECHO_N "(cached) $ECHO_C" >&6
966842d4 7571else
7572 if test -n "$BISON"; then
7573 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7574else
6a8964db 7575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7576for as_dir in $PATH
7577do
7578 IFS=$as_save_IFS
7579 test -z "$as_dir" && as_dir=.
7580 for ac_exec_ext in '' $ac_executable_extensions; do
7581 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a1ad7483 7582 ac_cv_prog_BISON="$ac_prog"
6a8964db 7583 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7584 break 2
7585 fi
7586done
7587done
7588
966842d4 7589fi
7590fi
6a8964db 7591BISON=$ac_cv_prog_BISON
966842d4 7592if test -n "$BISON"; then
6a8964db 7593 echo "$as_me:$LINENO: result: $BISON" >&5
7594echo "${ECHO_T}$BISON" >&6
966842d4 7595else
6a8964db 7596 echo "$as_me:$LINENO: result: no" >&5
7597echo "${ECHO_T}no" >&6
966842d4 7598fi
7599
a1ad7483 7600 test -n "$BISON" && break
7601done
7602test -n "$BISON" || BISON="$MISSING bison"
7603
7604
7605# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7606# check for build == host before using them.
966842d4 7607
6ac26439 7608# NM
28c79bfe 7609if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7610 && test -d ../binutils ; then
6ac26439 7611 NM='$(objdir)/../binutils/nm-new'
7612else
7613 # Extract the first word of "nm", so it can be a program name with args.
7614set dummy nm; ac_word=$2
7615echo "$as_me:$LINENO: checking for $ac_word" >&5
7616echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7617if test "${ac_cv_prog_NM+set}" = set; then
7618 echo $ECHO_N "(cached) $ECHO_C" >&6
7619else
7620 if test -n "$NM"; then
7621 ac_cv_prog_NM="$NM" # Let the user override the test.
7622else
7623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7624for as_dir in $PATH
7625do
7626 IFS=$as_save_IFS
7627 test -z "$as_dir" && as_dir=.
7628 for ac_exec_ext in '' $ac_executable_extensions; do
7629 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7630 ac_cv_prog_NM="nm"
7631 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7632 break 2
7633 fi
7634done
7635done
7636
7637 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7638fi
7639fi
7640NM=$ac_cv_prog_NM
7641if test -n "$NM"; then
7642 echo "$as_me:$LINENO: result: $NM" >&5
7643echo "${ECHO_T}$NM" >&6
7644else
7645 echo "$as_me:$LINENO: result: no" >&5
7646echo "${ECHO_T}no" >&6
7647fi
7648
7649fi
7650
7651# AR
28c79bfe 7652if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7653 && test -d ../binutils ; then
6ac26439 7654 AR='$(objdir)/../binutils/ar'
7655else
7656 # Extract the first word of "ar", so it can be a program name with args.
7657set dummy ar; ac_word=$2
7658echo "$as_me:$LINENO: checking for $ac_word" >&5
7659echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7660if test "${ac_cv_prog_AR+set}" = set; then
7661 echo $ECHO_N "(cached) $ECHO_C" >&6
7662else
7663 if test -n "$AR"; then
7664 ac_cv_prog_AR="$AR" # Let the user override the test.
7665else
7666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7667for as_dir in $PATH
7668do
7669 IFS=$as_save_IFS
7670 test -z "$as_dir" && as_dir=.
7671 for ac_exec_ext in '' $ac_executable_extensions; do
7672 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7673 ac_cv_prog_AR="ar"
7674 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7675 break 2
7676 fi
7677done
7678done
7679
7680 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7681fi
7682fi
7683AR=$ac_cv_prog_AR
7684if test -n "$AR"; then
7685 echo "$as_me:$LINENO: result: $AR" >&5
7686echo "${ECHO_T}$AR" >&6
7687else
7688 echo "$as_me:$LINENO: result: no" >&5
7689echo "${ECHO_T}no" >&6
7690fi
7691
7692fi
7693
7694
966842d4 7695# --------------------
7696# Checks for C headers
7697# --------------------
7698
6a8964db 7699echo "$as_me:$LINENO: checking for GNU C library" >&5
7700echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
7701if test "${gcc_cv_glibc+set}" = set; then
7702 echo $ECHO_N "(cached) $ECHO_C" >&6
7703else
7704 cat >conftest.$ac_ext <<_ACEOF
6a8964db 7705/* confdefs.h. */
7706_ACEOF
7707cat confdefs.h >>conftest.$ac_ext
7708cat >>conftest.$ac_ext <<_ACEOF
7709/* end confdefs.h. */
966842d4 7710#include <features.h>
6a8964db 7711int
7712main ()
7713{
966842d4 7714
7715#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7716#error Not a GNU C library system
7717#endif
6a8964db 7718 ;
7719 return 0;
7720}
7721_ACEOF
7722rm -f conftest.$ac_objext
7723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 7724 (eval $ac_compile) 2>conftest.er1
6a8964db 7725 ac_status=$?
9ebd0bb2 7726 grep -v '^ *+' conftest.er1 >conftest.err
7727 rm -f conftest.er1
7728 cat conftest.err >&5
6a8964db 7729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7730 (exit $ac_status); } &&
c8aeaa6d 7731 { ac_try='test -z "$ac_c_werror_flag"
7732 || test ! -s conftest.err'
9ebd0bb2 7733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7734 (eval $ac_try) 2>&5
7735 ac_status=$?
7736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7737 (exit $ac_status); }; } &&
7738 { ac_try='test -s conftest.$ac_objext'
6a8964db 7739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7740 (eval $ac_try) 2>&5
7741 ac_status=$?
7742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7743 (exit $ac_status); }; }; then
966842d4 7744 gcc_cv_glibc=yes
7745else
6a8964db 7746 echo "$as_me: failed program was:" >&5
7747sed 's/^/| /' conftest.$ac_ext >&5
7748
7749gcc_cv_glibc=no
966842d4 7750fi
9ebd0bb2 7751rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
966842d4 7752fi
7753
6a8964db 7754echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7755echo "${ECHO_T}$gcc_cv_glibc" >&6
966842d4 7756if test $gcc_cv_glibc = yes; then
6a8964db 7757
7758cat >>confdefs.h <<\_ACEOF
966842d4 7759#define _GNU_SOURCE 1
6a8964db 7760_ACEOF
966842d4 7761
7762fi
7763
2cd18f76 7764# Need to reject headers which give warnings, so that the -Werror bootstrap
7765# works later. *sigh* This needs to come before all header checks.
7766
7767ac_c_preproc_warn_flag=yes
7768
6a8964db 7769echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7770echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7771if test "${ac_cv_header_stdc+set}" = set; then
7772 echo $ECHO_N "(cached) $ECHO_C" >&6
ad87de1e 7773else
6a8964db 7774 cat >conftest.$ac_ext <<_ACEOF
6a8964db 7775/* confdefs.h. */
7776_ACEOF
7777cat confdefs.h >>conftest.$ac_ext
7778cat >>conftest.$ac_ext <<_ACEOF
7779/* end confdefs.h. */
ad87de1e 7780#include <stdlib.h>
7781#include <stdarg.h>
7782#include <string.h>
7783#include <float.h>
6a8964db 7784
7785int
7786main ()
7787{
7788
7789 ;
7790 return 0;
7791}
7792_ACEOF
7793rm -f conftest.$ac_objext
7794if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 7795 (eval $ac_compile) 2>conftest.er1
6a8964db 7796 ac_status=$?
9ebd0bb2 7797 grep -v '^ *+' conftest.er1 >conftest.err
7798 rm -f conftest.er1
7799 cat conftest.err >&5
6a8964db 7800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7801 (exit $ac_status); } &&
c8aeaa6d 7802 { ac_try='test -z "$ac_c_werror_flag"
7803 || test ! -s conftest.err'
9ebd0bb2 7804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7805 (eval $ac_try) 2>&5
7806 ac_status=$?
7807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7808 (exit $ac_status); }; } &&
7809 { ac_try='test -s conftest.$ac_objext'
6a8964db 7810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7811 (eval $ac_try) 2>&5
7812 ac_status=$?
7813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7814 (exit $ac_status); }; }; then
ad87de1e 7815 ac_cv_header_stdc=yes
7816else
6a8964db 7817 echo "$as_me: failed program was:" >&5
7818sed 's/^/| /' conftest.$ac_ext >&5
7819
7820ac_cv_header_stdc=no
ad87de1e 7821fi
9ebd0bb2 7822rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ad87de1e 7823
7824if test $ac_cv_header_stdc = yes; then
7825 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6a8964db 7826 cat >conftest.$ac_ext <<_ACEOF
6a8964db 7827/* confdefs.h. */
7828_ACEOF
7829cat confdefs.h >>conftest.$ac_ext
7830cat >>conftest.$ac_ext <<_ACEOF
7831/* end confdefs.h. */
ad87de1e 7832#include <string.h>
6a8964db 7833
7834_ACEOF
ad87de1e 7835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6a8964db 7836 $EGREP "memchr" >/dev/null 2>&1; then
ad87de1e 7837 :
7838else
ad87de1e 7839 ac_cv_header_stdc=no
7840fi
7841rm -f conftest*
7842
7843fi
7844
7845if test $ac_cv_header_stdc = yes; then
7846 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6a8964db 7847 cat >conftest.$ac_ext <<_ACEOF
6a8964db 7848/* confdefs.h. */
7849_ACEOF
7850cat confdefs.h >>conftest.$ac_ext
7851cat >>conftest.$ac_ext <<_ACEOF
7852/* end confdefs.h. */
ad87de1e 7853#include <stdlib.h>
6a8964db 7854
7855_ACEOF
ad87de1e 7856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6a8964db 7857 $EGREP "free" >/dev/null 2>&1; then
ad87de1e 7858 :
7859else
ad87de1e 7860 ac_cv_header_stdc=no
7861fi
7862rm -f conftest*
7863
7864fi
7865
7866if test $ac_cv_header_stdc = yes; then
7867 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6a8964db 7868 if test "$cross_compiling" = yes; then
ad87de1e 7869 :
7870else
6a8964db 7871 cat >conftest.$ac_ext <<_ACEOF
6a8964db 7872/* confdefs.h. */
7873_ACEOF
7874cat confdefs.h >>conftest.$ac_ext
7875cat >>conftest.$ac_ext <<_ACEOF
7876/* end confdefs.h. */
ad87de1e 7877#include <ctype.h>
6a8964db 7878#if ((' ' & 0x0FF) == 0x020)
7879# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7880# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7881#else
7882# define ISLOWER(c) \
9ebd0bb2 7883 (('a' <= (c) && (c) <= 'i') \
7884 || ('j' <= (c) && (c) <= 'r') \
7885 || ('s' <= (c) && (c) <= 'z'))
6a8964db 7886# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7887#endif
12b432e0 7888
6a8964db 7889#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7890int
7891main ()
7892{
7893 int i;
7894 for (i = 0; i < 256; i++)
7895 if (XOR (islower (i), ISLOWER (i))
9ebd0bb2 7896 || toupper (i) != TOUPPER (i))
6a8964db 7897 exit(2);
7898 exit (0);
7899}
7900_ACEOF
7901rm -f conftest$ac_exeext
7902if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7903 (eval $ac_link) 2>&5
7904 ac_status=$?
7905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7906 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7908 (eval $ac_try) 2>&5
7909 ac_status=$?
7910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7911 (exit $ac_status); }; }; then
ad87de1e 7912 :
7913else
6a8964db 7914 echo "$as_me: program exited with status $ac_status" >&5
7915echo "$as_me: failed program was:" >&5
7916sed 's/^/| /' conftest.$ac_ext >&5
7917
7918( exit $ac_status )
7919ac_cv_header_stdc=no
ad87de1e 7920fi
9ebd0bb2 7921rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ad87de1e 7922fi
ad87de1e 7923fi
7924fi
6a8964db 7925echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7926echo "${ECHO_T}$ac_cv_header_stdc" >&6
12b432e0 7927if test $ac_cv_header_stdc = yes; then
6a8964db 7928
7929cat >>confdefs.h <<\_ACEOF
ad87de1e 7930#define STDC_HEADERS 1
6a8964db 7931_ACEOF
ad87de1e 7932
7933fi
7934
6a8964db 7935echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7936echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
7937if test "${ac_cv_header_time+set}" = set; then
7938 echo $ECHO_N "(cached) $ECHO_C" >&6
ad87de1e 7939else
6a8964db 7940 cat >conftest.$ac_ext <<_ACEOF
6a8964db 7941/* confdefs.h. */
7942_ACEOF
7943cat confdefs.h >>conftest.$ac_ext
7944cat >>conftest.$ac_ext <<_ACEOF
7945/* end confdefs.h. */
ad87de1e 7946#include <sys/types.h>
7947#include <sys/time.h>
7948#include <time.h>
6a8964db 7949
7950int
7951main ()
7952{
7953if ((struct tm *) 0)
7954return 0;
7955 ;
7956 return 0;
7957}
7958_ACEOF
7959rm -f conftest.$ac_objext
7960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 7961 (eval $ac_compile) 2>conftest.er1
6a8964db 7962 ac_status=$?
9ebd0bb2 7963 grep -v '^ *+' conftest.er1 >conftest.err
7964 rm -f conftest.er1
7965 cat conftest.err >&5
6a8964db 7966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7967 (exit $ac_status); } &&
c8aeaa6d 7968 { ac_try='test -z "$ac_c_werror_flag"
7969 || test ! -s conftest.err'
9ebd0bb2 7970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7971 (eval $ac_try) 2>&5
7972 ac_status=$?
7973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7974 (exit $ac_status); }; } &&
7975 { ac_try='test -s conftest.$ac_objext'
6a8964db 7976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7977 (eval $ac_try) 2>&5
7978 ac_status=$?
7979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980 (exit $ac_status); }; }; then
ad87de1e 7981 ac_cv_header_time=yes
7982else
6a8964db 7983 echo "$as_me: failed program was:" >&5
7984sed 's/^/| /' conftest.$ac_ext >&5
7985
7986ac_cv_header_time=no
ad87de1e 7987fi
9ebd0bb2 7988rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ad87de1e 7989fi
6a8964db 7990echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7991echo "${ECHO_T}$ac_cv_header_time" >&6
12b432e0 7992if test $ac_cv_header_time = yes; then
6a8964db 7993
7994cat >>confdefs.h <<\_ACEOF
ad87de1e 7995#define TIME_WITH_SYS_TIME 1
6a8964db 7996_ACEOF
ad87de1e 7997
7998fi
7999
6b858cc5 8000echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
8001echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
8002if test "${gcc_cv_header_string+set}" = set; then
8003 echo $ECHO_N "(cached) $ECHO_C" >&6
8004else
8005 cat >conftest.$ac_ext <<_ACEOF
8006/* confdefs.h. */
8007_ACEOF
8008cat confdefs.h >>conftest.$ac_ext
8009cat >>conftest.$ac_ext <<_ACEOF
8010/* end confdefs.h. */
8011#include <string.h>
8012#include <strings.h>
8013int
8014main ()
8015{
8016
8017 ;
8018 return 0;
8019}
8020_ACEOF
8021rm -f conftest.$ac_objext
8022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8023 (eval $ac_compile) 2>conftest.er1
8024 ac_status=$?
8025 grep -v '^ *+' conftest.er1 >conftest.err
8026 rm -f conftest.er1
8027 cat conftest.err >&5
8028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8029 (exit $ac_status); } &&
c8aeaa6d 8030 { ac_try='test -z "$ac_c_werror_flag"
8031 || test ! -s conftest.err'
6b858cc5 8032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8033 (eval $ac_try) 2>&5
8034 ac_status=$?
8035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8036 (exit $ac_status); }; } &&
8037 { ac_try='test -s conftest.$ac_objext'
8038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8039 (eval $ac_try) 2>&5
8040 ac_status=$?
8041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8042 (exit $ac_status); }; }; then
8043 gcc_cv_header_string=yes
8044else
8045 echo "$as_me: failed program was:" >&5
8046sed 's/^/| /' conftest.$ac_ext >&5
8047
8048gcc_cv_header_string=no
8049fi
8050rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8051fi
8052echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
8053echo "${ECHO_T}$gcc_cv_header_string" >&6
8054if test $gcc_cv_header_string = yes; then
8055
8056cat >>confdefs.h <<\_ACEOF
8057#define STRING_WITH_STRINGS 1
8058_ACEOF
8059
8060fi
8061
6a8964db 8062echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
8063echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
8064if test "${ac_cv_header_sys_wait_h+set}" = set; then
8065 echo $ECHO_N "(cached) $ECHO_C" >&6
5a3ee0b1 8066else
6a8964db 8067 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8068/* confdefs.h. */
8069_ACEOF
8070cat confdefs.h >>conftest.$ac_ext
8071cat >>conftest.$ac_ext <<_ACEOF
8072/* end confdefs.h. */
5a3ee0b1 8073#include <sys/types.h>
8074#include <sys/wait.h>
8075#ifndef WEXITSTATUS
6a8964db 8076# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5a3ee0b1 8077#endif
8078#ifndef WIFEXITED
6a8964db 8079# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5a3ee0b1 8080#endif
6a8964db 8081
8082int
8083main ()
8084{
8085 int s;
8086 wait (&s);
8087 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8088 ;
8089 return 0;
8090}
8091_ACEOF
8092rm -f conftest.$ac_objext
8093if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 8094 (eval $ac_compile) 2>conftest.er1
6a8964db 8095 ac_status=$?
9ebd0bb2 8096 grep -v '^ *+' conftest.er1 >conftest.err
8097 rm -f conftest.er1
8098 cat conftest.err >&5
6a8964db 8099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8100 (exit $ac_status); } &&
c8aeaa6d 8101 { ac_try='test -z "$ac_c_werror_flag"
8102 || test ! -s conftest.err'
9ebd0bb2 8103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8104 (eval $ac_try) 2>&5
8105 ac_status=$?
8106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8107 (exit $ac_status); }; } &&
8108 { ac_try='test -s conftest.$ac_objext'
6a8964db 8109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8110 (eval $ac_try) 2>&5
8111 ac_status=$?
8112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8113 (exit $ac_status); }; }; then
5a3ee0b1 8114 ac_cv_header_sys_wait_h=yes
8115else
6a8964db 8116 echo "$as_me: failed program was:" >&5
8117sed 's/^/| /' conftest.$ac_ext >&5
8118
8119ac_cv_header_sys_wait_h=no
5a3ee0b1 8120fi
9ebd0bb2 8121rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5a3ee0b1 8122fi
6a8964db 8123echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8124echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
12b432e0 8125if test $ac_cv_header_sys_wait_h = yes; then
6a8964db 8126
8127cat >>confdefs.h <<\_ACEOF
5a3ee0b1 8128#define HAVE_SYS_WAIT_H 1
6a8964db 8129_ACEOF
c9cd172c 8130
12b432e0 8131fi
c9cd172c 8132
6a8964db 8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
e5d424c9 8154
8155for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
9f0cea1b 8156 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
a876e5f8 8157 sys/resource.h sys/param.h sys/times.h sys/stat.h \
c6976b58 8158 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
071cd279 8159do
6a8964db 8160as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2cd18f76 8161echo "$as_me:$LINENO: checking for $ac_header" >&5
6a8964db 8162echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8163if eval "test \"\${$as_ac_Header+set}\" = set"; then
8164 echo $ECHO_N "(cached) $ECHO_C" >&6
6a8964db 8165else
2cd18f76 8166 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8167/* confdefs.h. */
8168_ACEOF
8169cat confdefs.h >>conftest.$ac_ext
8170cat >>conftest.$ac_ext <<_ACEOF
8171/* end confdefs.h. */
8172#include <$ac_header>
8173_ACEOF
8174if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8175 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8176 ac_status=$?
8177 grep -v '^ *+' conftest.er1 >conftest.err
8178 rm -f conftest.er1
8179 cat conftest.err >&5
8180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8181 (exit $ac_status); } >/dev/null; then
8182 if test -s conftest.err; then
8183 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 8184 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 8185 else
8186 ac_cpp_err=
8187 fi
8188else
8189 ac_cpp_err=yes
8190fi
8191if test -z "$ac_cpp_err"; then
2cd18f76 8192 eval "$as_ac_Header=yes"
6a8964db 8193else
8194 echo "$as_me: failed program was:" >&5
8195sed 's/^/| /' conftest.$ac_ext >&5
8196
2cd18f76 8197 eval "$as_ac_Header=no"
6a8964db 8198fi
8199rm -f conftest.err conftest.$ac_ext
c9cd172c 8200fi
6a8964db 8201echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8202echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6a8964db 8203if test `eval echo '${'$as_ac_Header'}'` = yes; then
8204 cat >>confdefs.h <<_ACEOF
8205#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8206_ACEOF
8207
ad87de1e 8208fi
8209done
8210
8211
58febf9e 8212# Check for thread headers.
2cd18f76 8213echo "$as_me:$LINENO: checking for thread.h" >&5
6a8964db 8214echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
8215if test "${ac_cv_header_thread_h+set}" = set; then
8216 echo $ECHO_N "(cached) $ECHO_C" >&6
6a8964db 8217else
2cd18f76 8218 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8219/* confdefs.h. */
8220_ACEOF
8221cat confdefs.h >>conftest.$ac_ext
8222cat >>conftest.$ac_ext <<_ACEOF
8223/* end confdefs.h. */
8224#include <thread.h>
8225_ACEOF
8226if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8227 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8228 ac_status=$?
8229 grep -v '^ *+' conftest.er1 >conftest.err
8230 rm -f conftest.er1
8231 cat conftest.err >&5
8232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8233 (exit $ac_status); } >/dev/null; then
8234 if test -s conftest.err; then
8235 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 8236 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 8237 else
8238 ac_cpp_err=
8239 fi
8240else
8241 ac_cpp_err=yes
8242fi
8243if test -z "$ac_cpp_err"; then
2cd18f76 8244 ac_cv_header_thread_h=yes
6a8964db 8245else
8246 echo "$as_me: failed program was:" >&5
8247sed 's/^/| /' conftest.$ac_ext >&5
8248
2cd18f76 8249 ac_cv_header_thread_h=no
6a8964db 8250fi
8251rm -f conftest.err conftest.$ac_ext
c9cd172c 8252fi
6a8964db 8253echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8254echo "${ECHO_T}$ac_cv_header_thread_h" >&6
6a8964db 8255if test $ac_cv_header_thread_h = yes; then
58febf9e 8256 have_thread_h=yes
8257else
6a8964db 8258 have_thread_h=
58febf9e 8259fi
8260
2cd18f76 8261echo "$as_me:$LINENO: checking for pthread.h" >&5
6a8964db 8262echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8263if test "${ac_cv_header_pthread_h+set}" = set; then
8264 echo $ECHO_N "(cached) $ECHO_C" >&6
58febf9e 8265else
2cd18f76 8266 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8267/* confdefs.h. */
8268_ACEOF
8269cat confdefs.h >>conftest.$ac_ext
8270cat >>conftest.$ac_ext <<_ACEOF
8271/* end confdefs.h. */
8272#include <pthread.h>
8273_ACEOF
8274if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8275 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8276 ac_status=$?
8277 grep -v '^ *+' conftest.er1 >conftest.err
8278 rm -f conftest.er1
8279 cat conftest.err >&5
8280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8281 (exit $ac_status); } >/dev/null; then
8282 if test -s conftest.err; then
8283 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 8284 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 8285 else
8286 ac_cpp_err=
8287 fi
8288else
8289 ac_cpp_err=yes
8290fi
8291if test -z "$ac_cpp_err"; then
2cd18f76 8292 ac_cv_header_pthread_h=yes
6a8964db 8293else
8294 echo "$as_me: failed program was:" >&5
8295sed 's/^/| /' conftest.$ac_ext >&5
8296
2cd18f76 8297 ac_cv_header_pthread_h=no
6a8964db 8298fi
8299rm -f conftest.err conftest.$ac_ext
c9cd172c 8300fi
6a8964db 8301echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8302echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
6a8964db 8303if test $ac_cv_header_pthread_h = yes; then
58febf9e 8304 have_pthread_h=yes
8305else
6a8964db 8306 have_pthread_h=
58febf9e 8307fi
8308
8309
3239b2ba 8310# These tests can't be done till we know if we have limits.h.
6a8964db 8311echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8312echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
8313if test "${gcc_cv_decl_char_bit+set}" = set; then
8314 echo $ECHO_N "(cached) $ECHO_C" >&6
8315else
8316 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8317/* confdefs.h. */
8318_ACEOF
8319cat confdefs.h >>conftest.$ac_ext
8320cat >>conftest.$ac_ext <<_ACEOF
8321/* end confdefs.h. */
02be28b3 8322#ifdef HAVE_LIMITS_H
8323#include <limits.h>
8324#endif
8325#ifdef CHAR_BIT
8326found
8327#endif
6a8964db 8328_ACEOF
02be28b3 8329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6a8964db 8330 $EGREP "found" >/dev/null 2>&1; then
02be28b3 8331 gcc_cv_decl_char_bit=yes
8332else
02be28b3 8333 gcc_cv_decl_char_bit=no
8334fi
8335rm -f conftest*
8336
8337
8338fi
6a8964db 8339echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8340echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
02be28b3 8341if test $gcc_cv_decl_char_bit = no; then
6a8964db 8342 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8343echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
8344if test "${gcc_cv_c_nbby+set}" = set; then
8345 echo $ECHO_N "(cached) $ECHO_C" >&6
02be28b3 8346else
8347 i=8
8348 gcc_cv_c_nbby=
8349 while test $i -lt 65; do
6a8964db 8350 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8351/* confdefs.h. */
8352_ACEOF
8353cat confdefs.h >>conftest.$ac_ext
8354cat >>conftest.$ac_ext <<_ACEOF
8355/* end confdefs.h. */
8356
8357int
8358main ()
8359{
45449d9f 8360switch(0) {
8361 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8362 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8363 ; }
6a8964db 8364 ;
8365 return 0;
8366}
8367_ACEOF
8368rm -f conftest.$ac_objext
8369if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 8370 (eval $ac_compile) 2>conftest.er1
6a8964db 8371 ac_status=$?
9ebd0bb2 8372 grep -v '^ *+' conftest.er1 >conftest.err
8373 rm -f conftest.er1
8374 cat conftest.err >&5
6a8964db 8375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8376 (exit $ac_status); } &&
c8aeaa6d 8377 { ac_try='test -z "$ac_c_werror_flag"
8378 || test ! -s conftest.err'
9ebd0bb2 8379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8380 (eval $ac_try) 2>&5
8381 ac_status=$?
8382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8383 (exit $ac_status); }; } &&
8384 { ac_try='test -s conftest.$ac_objext'
6a8964db 8385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8386 (eval $ac_try) 2>&5
8387 ac_status=$?
8388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8389 (exit $ac_status); }; }; then
45449d9f 8390 gcc_cv_c_nbby=$i; break
02be28b3 8391else
6a8964db 8392 echo "$as_me: failed program was:" >&5
8393sed 's/^/| /' conftest.$ac_ext >&5
8394
02be28b3 8395fi
9ebd0bb2 8396rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
02be28b3 8397 i=`expr $i + 1`
8398 done
8399 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8400
8401fi
6a8964db 8402echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8403echo "${ECHO_T}$gcc_cv_c_nbby" >&6
02be28b3 8404if test $gcc_cv_c_nbby = failed; then
6a8964db 8405 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8406echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8407 { (exit 1); exit 1; }; }
02be28b3 8408else
6a8964db 8409
8410cat >>confdefs.h <<_ACEOF
02be28b3 8411#define CHAR_BIT $gcc_cv_c_nbby
6a8964db 8412_ACEOF
02be28b3 8413
8414fi
8415fi
6a8964db 8416echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8417echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
8418if test "${ac_cv_c_bigendian+set}" = set; then
8419 echo $ECHO_N "(cached) $ECHO_C" >&6
3239b2ba 8420else
fd158959 8421 # See if sys/param.h defines the BYTE_ORDER macro.
6a8964db 8422cat >conftest.$ac_ext <<_ACEOF
6a8964db 8423/* confdefs.h. */
8424_ACEOF
8425cat confdefs.h >>conftest.$ac_ext
8426cat >>conftest.$ac_ext <<_ACEOF
8427/* end confdefs.h. */
805e22b2 8428#include <sys/types.h>
8429#include <sys/param.h>
fd158959 8430
6a8964db 8431int
8432main ()
8433{
805e22b2 8434#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8435 bogus endian macros
3239b2ba 8436#endif
fd158959 8437
6a8964db 8438 ;
8439 return 0;
8440}
8441_ACEOF
8442rm -f conftest.$ac_objext
8443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 8444 (eval $ac_compile) 2>conftest.er1
6a8964db 8445 ac_status=$?
9ebd0bb2 8446 grep -v '^ *+' conftest.er1 >conftest.err
8447 rm -f conftest.er1
8448 cat conftest.err >&5
6a8964db 8449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8450 (exit $ac_status); } &&
c8aeaa6d 8451 { ac_try='test -z "$ac_c_werror_flag"
8452 || test ! -s conftest.err'
9ebd0bb2 8453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8454 (eval $ac_try) 2>&5
8455 ac_status=$?
8456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8457 (exit $ac_status); }; } &&
8458 { ac_try='test -s conftest.$ac_objext'
6a8964db 8459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8460 (eval $ac_try) 2>&5
8461 ac_status=$?
8462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8463 (exit $ac_status); }; }; then
805e22b2 8464 # It does; now see whether it defined to BIG_ENDIAN or not.
6a8964db 8465cat >conftest.$ac_ext <<_ACEOF
6a8964db 8466/* confdefs.h. */
8467_ACEOF
8468cat confdefs.h >>conftest.$ac_ext
8469cat >>conftest.$ac_ext <<_ACEOF
8470/* end confdefs.h. */
805e22b2 8471#include <sys/types.h>
8472#include <sys/param.h>
fd158959 8473
6a8964db 8474int
8475main ()
8476{
805e22b2 8477#if BYTE_ORDER != BIG_ENDIAN
8478 not big endian
3239b2ba 8479#endif
fd158959 8480
6a8964db 8481 ;
8482 return 0;
8483}
8484_ACEOF
8485rm -f conftest.$ac_objext
8486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 8487 (eval $ac_compile) 2>conftest.er1
6a8964db 8488 ac_status=$?
9ebd0bb2 8489 grep -v '^ *+' conftest.er1 >conftest.err
8490 rm -f conftest.er1
8491 cat conftest.err >&5
6a8964db 8492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8493 (exit $ac_status); } &&
c8aeaa6d 8494 { ac_try='test -z "$ac_c_werror_flag"
8495 || test ! -s conftest.err'
9ebd0bb2 8496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8497 (eval $ac_try) 2>&5
8498 ac_status=$?
8499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8500 (exit $ac_status); }; } &&
8501 { ac_try='test -s conftest.$ac_objext'
6a8964db 8502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8503 (eval $ac_try) 2>&5
8504 ac_status=$?
8505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8506 (exit $ac_status); }; }; then
805e22b2 8507 ac_cv_c_bigendian=yes
8508else
6a8964db 8509 echo "$as_me: failed program was:" >&5
8510sed 's/^/| /' conftest.$ac_ext >&5
8511
8512ac_cv_c_bigendian=no
805e22b2 8513fi
9ebd0bb2 8514rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
805e22b2 8515else
6a8964db 8516 echo "$as_me: failed program was:" >&5
8517sed 's/^/| /' conftest.$ac_ext >&5
8518
fd158959 8519# It does not; compile a test program.
8520if test "$cross_compiling" = yes; then
8521 # try to guess the endianness by grepping values into an object file
8522 ac_cv_c_bigendian=unknown
8523 cat >conftest.$ac_ext <<_ACEOF
8524/* confdefs.h. */
8525_ACEOF
8526cat confdefs.h >>conftest.$ac_ext
8527cat >>conftest.$ac_ext <<_ACEOF
8528/* end confdefs.h. */
8529short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8530short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8531void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
8532short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8533short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8534void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
8535int
8536main ()
8537{
8538 _ascii (); _ebcdic ();
8539 ;
8540 return 0;
8541}
8542_ACEOF
8543rm -f conftest.$ac_objext
8544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8545 (eval $ac_compile) 2>conftest.er1
8546 ac_status=$?
8547 grep -v '^ *+' conftest.er1 >conftest.err
8548 rm -f conftest.er1
8549 cat conftest.err >&5
8550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8551 (exit $ac_status); } &&
c8aeaa6d 8552 { ac_try='test -z "$ac_c_werror_flag"
8553 || test ! -s conftest.err'
fd158959 8554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8555 (eval $ac_try) 2>&5
8556 ac_status=$?
8557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8558 (exit $ac_status); }; } &&
8559 { ac_try='test -s conftest.$ac_objext'
8560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8561 (eval $ac_try) 2>&5
8562 ac_status=$?
8563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8564 (exit $ac_status); }; }; then
8565 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
8566 ac_cv_c_bigendian=yes
8567fi
8568if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8569 if test "$ac_cv_c_bigendian" = unknown; then
8570 ac_cv_c_bigendian=no
8571 else
8572 # finding both strings is unlikely to happen, but who knows?
8573 ac_cv_c_bigendian=unknown
8574 fi
8575fi
8576else
8577 echo "$as_me: failed program was:" >&5
8578sed 's/^/| /' conftest.$ac_ext >&5
8579
805e22b2 8580fi
9ebd0bb2 8581rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6a8964db 8582else
8583 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8584/* confdefs.h. */
8585_ACEOF
8586cat confdefs.h >>conftest.$ac_ext
8587cat >>conftest.$ac_ext <<_ACEOF
8588/* end confdefs.h. */
fd158959 8589int
8590main ()
8591{
805e22b2 8592 /* Are we little or big endian? From Harbison&Steele. */
8593 union
8594 {
8595 long l;
8596 char c[sizeof (long)];
8597 } u;
8598 u.l = 1;
8599 exit (u.c[sizeof (long) - 1] == 1);
8600}
6a8964db 8601_ACEOF
8602rm -f conftest$ac_exeext
8603if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8604 (eval $ac_link) 2>&5
8605 ac_status=$?
8606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8607 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8609 (eval $ac_try) 2>&5
8610 ac_status=$?
8611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8612 (exit $ac_status); }; }; then
805e22b2 8613 ac_cv_c_bigendian=no
8614else
6a8964db 8615 echo "$as_me: program exited with status $ac_status" >&5
8616echo "$as_me: failed program was:" >&5
8617sed 's/^/| /' conftest.$ac_ext >&5
8618
8619( exit $ac_status )
8620ac_cv_c_bigendian=yes
805e22b2 8621fi
9ebd0bb2 8622rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3239b2ba 8623fi
805e22b2 8624fi
fd158959 8625rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
805e22b2 8626fi
6a8964db 8627echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8628echo "${ECHO_T}$ac_cv_c_bigendian" >&6
fd158959 8629case $ac_cv_c_bigendian in
8630 yes)
6a8964db 8631
8632cat >>confdefs.h <<\_ACEOF
805e22b2 8633#define WORDS_BIGENDIAN 1
6a8964db 8634_ACEOF
fd158959 8635 ;;
8636 no)
8637 ;;
8638 *)
8639 { { echo "$as_me:$LINENO: error: unknown endianness
8640presetting ac_cv_c_bigendian=no (or yes) will help" >&5
8641echo "$as_me: error: unknown endianness
8642presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
8643 { (exit 1); exit 1; }; } ;;
8644esac
3239b2ba 8645
02be28b3 8646
966842d4 8647# --------
8648# UNSORTED
8649# --------
345a1501 8650
966842d4 8651# Stage specific cflags for build.
8652stage1_cflags=
8653case $build in
8654vax-*-*)
8655 if test x$GCC = xyes
8656 then
8657 stage1_cflags="-Wa,-J"
8658 else
8659 stage1_cflags="-J"
8660 fi
8661 ;;
8662powerpc-*-darwin*)
8663 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
8664 # sources; use -no-cpp-precomp to get to GNU cpp.
8665 # Apple's GCC has bugs in designated initializer handling, so disable
8666 # that too.
8667 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
8668 ;;
8669esac
345a1501 8670
345a1501 8671
45449d9f 8672# These libraries may be used by collect2.
8673# We may need a special search path to get them linked.
6a8964db 8674echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8675echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
8676if test "${gcc_cv_collect2_libs+set}" = set; then
8677 echo $ECHO_N "(cached) $ECHO_C" >&6
45449d9f 8678else
8679 save_LIBS="$LIBS"
8e01c6f6 8680for libs in '' -lld -lmld \
45449d9f 8681 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8682 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8683do
8684 LIBS="$libs"
6a8964db 8685 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8686/* confdefs.h. */
8687_ACEOF
8688cat confdefs.h >>conftest.$ac_ext
8689cat >>conftest.$ac_ext <<_ACEOF
8690/* end confdefs.h. */
8691
45449d9f 8692/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 8693#ifdef __cplusplus
8694extern "C"
8695#endif
45449d9f 8696/* We use char because int might match the return type of a gcc2
6a8964db 8697 builtin and then its argument prototype would still apply. */
8698char ldopen ();
8699int
8700main ()
8701{
8702ldopen ();
8703 ;
8704 return 0;
8705}
8706_ACEOF
8707rm -f conftest.$ac_objext conftest$ac_exeext
8708if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9ebd0bb2 8709 (eval $ac_link) 2>conftest.er1
6a8964db 8710 ac_status=$?
9ebd0bb2 8711 grep -v '^ *+' conftest.er1 >conftest.err
8712 rm -f conftest.er1
8713 cat conftest.err >&5
6a8964db 8714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8715 (exit $ac_status); } &&
c8aeaa6d 8716 { ac_try='test -z "$ac_c_werror_flag"
8717 || test ! -s conftest.err'
9ebd0bb2 8718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8719 (eval $ac_try) 2>&5
8720 ac_status=$?
8721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8722 (exit $ac_status); }; } &&
8723 { ac_try='test -s conftest$ac_exeext'
6a8964db 8724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8725 (eval $ac_try) 2>&5
8726 ac_status=$?
8727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8728 (exit $ac_status); }; }; then
45449d9f 8729 gcc_cv_collect2_libs="$libs"; break
8730else
6a8964db 8731 echo "$as_me: failed program was:" >&5
8732sed 's/^/| /' conftest.$ac_ext >&5
8733
45449d9f 8734fi
9ebd0bb2 8735rm -f conftest.err conftest.$ac_objext \
8736 conftest$ac_exeext conftest.$ac_ext
45449d9f 8737done
8738LIBS="$save_LIBS"
8739test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8740fi
6a8964db 8741echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8742echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
45449d9f 8743case $gcc_cv_collect2_libs in
8744 "none required") ;;
8745 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8746esac
8747
8748
8e01c6f6 8749# When building Ada code on Alpha, we need exc_resume which is usually in
8750# -lexc. So test for it.
8751save_LIBS="$LIBS"
8752LIBS=
6a8964db 8753echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8754echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
8755if test "${ac_cv_search_exc_resume+set}" = set; then
8756 echo $ECHO_N "(cached) $ECHO_C" >&6
8757else
8758 ac_func_search_save_LIBS=$LIBS
8759ac_cv_search_exc_resume=no
8760cat >conftest.$ac_ext <<_ACEOF
6a8964db 8761/* confdefs.h. */
8762_ACEOF
8763cat confdefs.h >>conftest.$ac_ext
8764cat >>conftest.$ac_ext <<_ACEOF
8765/* end confdefs.h. */
8e01c6f6 8766
8e01c6f6 8767/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 8768#ifdef __cplusplus
8769extern "C"
8770#endif
8e01c6f6 8771/* We use char because int might match the return type of a gcc2
6a8964db 8772 builtin and then its argument prototype would still apply. */
8773char exc_resume ();
8774int
8775main ()
8776{
8777exc_resume ();
8778 ;
8779 return 0;
8780}
8781_ACEOF
8782rm -f conftest.$ac_objext conftest$ac_exeext
8783if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9ebd0bb2 8784 (eval $ac_link) 2>conftest.er1
6a8964db 8785 ac_status=$?
9ebd0bb2 8786 grep -v '^ *+' conftest.er1 >conftest.err
8787 rm -f conftest.er1
8788 cat conftest.err >&5
6a8964db 8789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8790 (exit $ac_status); } &&
c8aeaa6d 8791 { ac_try='test -z "$ac_c_werror_flag"
8792 || test ! -s conftest.err'
9ebd0bb2 8793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8794 (eval $ac_try) 2>&5
8795 ac_status=$?
8796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8797 (exit $ac_status); }; } &&
8798 { ac_try='test -s conftest$ac_exeext'
6a8964db 8799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8800 (eval $ac_try) 2>&5
8801 ac_status=$?
8802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8803 (exit $ac_status); }; }; then
8e01c6f6 8804 ac_cv_search_exc_resume="none required"
8805else
6a8964db 8806 echo "$as_me: failed program was:" >&5
8807sed 's/^/| /' conftest.$ac_ext >&5
8808
8e01c6f6 8809fi
9ebd0bb2 8810rm -f conftest.err conftest.$ac_objext \
8811 conftest$ac_exeext conftest.$ac_ext
6a8964db 8812if test "$ac_cv_search_exc_resume" = no; then
8813 for ac_lib in exc; do
8814 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8815 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8816/* confdefs.h. */
8817_ACEOF
8818cat confdefs.h >>conftest.$ac_ext
8819cat >>conftest.$ac_ext <<_ACEOF
8820/* end confdefs.h. */
8821
8e01c6f6 8822/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 8823#ifdef __cplusplus
8824extern "C"
8825#endif
8e01c6f6 8826/* We use char because int might match the return type of a gcc2
6a8964db 8827 builtin and then its argument prototype would still apply. */
8828char exc_resume ();
8829int
8830main ()
8831{
8832exc_resume ();
8833 ;
8834 return 0;
8835}
8836_ACEOF
8837rm -f conftest.$ac_objext conftest$ac_exeext
8838if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9ebd0bb2 8839 (eval $ac_link) 2>conftest.er1
6a8964db 8840 ac_status=$?
9ebd0bb2 8841 grep -v '^ *+' conftest.er1 >conftest.err
8842 rm -f conftest.er1
8843 cat conftest.err >&5
6a8964db 8844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8845 (exit $ac_status); } &&
c8aeaa6d 8846 { ac_try='test -z "$ac_c_werror_flag"
8847 || test ! -s conftest.err'
9ebd0bb2 8848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8849 (eval $ac_try) 2>&5
8850 ac_status=$?
8851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8852 (exit $ac_status); }; } &&
8853 { ac_try='test -s conftest$ac_exeext'
6a8964db 8854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8855 (eval $ac_try) 2>&5
8856 ac_status=$?
8857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8858 (exit $ac_status); }; }; then
8859 ac_cv_search_exc_resume="-l$ac_lib"
8e01c6f6 8860break
8861else
6a8964db 8862 echo "$as_me: failed program was:" >&5
8863sed 's/^/| /' conftest.$ac_ext >&5
8864
c9e1a048 8865fi
9ebd0bb2 8866rm -f conftest.err conftest.$ac_objext \
8867 conftest$ac_exeext conftest.$ac_ext
6a8964db 8868 done
c9cd172c 8869fi
6a8964db 8870LIBS=$ac_func_search_save_LIBS
8871fi
8872echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
8873echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
8874if test "$ac_cv_search_exc_resume" != no; then
12b432e0 8875 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
6a8964db 8876
8e01c6f6 8877fi
6a8964db 8878
8e01c6f6 8879GNAT_LIBEXC="$LIBS"
8880LIBS="$save_LIBS"
8881
8882
96b74343 8883# Some systems put ldexp and frexp in libm instead of libc; assume
8884# they're both in the same place. jcf-dump needs them.
8885save_LIBS="$LIBS"
8886LIBS=
6a8964db 8887echo "$as_me:$LINENO: checking for library containing ldexp" >&5
8888echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
8889if test "${ac_cv_search_ldexp+set}" = set; then
8890 echo $ECHO_N "(cached) $ECHO_C" >&6
8891else
8892 ac_func_search_save_LIBS=$LIBS
8893ac_cv_search_ldexp=no
8894cat >conftest.$ac_ext <<_ACEOF
6a8964db 8895/* confdefs.h. */
8896_ACEOF
8897cat confdefs.h >>conftest.$ac_ext
8898cat >>conftest.$ac_ext <<_ACEOF
8899/* end confdefs.h. */
96b74343 8900
96b74343 8901/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 8902#ifdef __cplusplus
8903extern "C"
8904#endif
96b74343 8905/* We use char because int might match the return type of a gcc2
6a8964db 8906 builtin and then its argument prototype would still apply. */
8907char ldexp ();
8908int
8909main ()
8910{
8911ldexp ();
8912 ;
8913 return 0;
8914}
8915_ACEOF
8916rm -f conftest.$ac_objext conftest$ac_exeext
8917if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9ebd0bb2 8918 (eval $ac_link) 2>conftest.er1
6a8964db 8919 ac_status=$?
9ebd0bb2 8920 grep -v '^ *+' conftest.er1 >conftest.err
8921 rm -f conftest.er1
8922 cat conftest.err >&5
6a8964db 8923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8924 (exit $ac_status); } &&
c8aeaa6d 8925 { ac_try='test -z "$ac_c_werror_flag"
8926 || test ! -s conftest.err'
9ebd0bb2 8927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8928 (eval $ac_try) 2>&5
8929 ac_status=$?
8930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8931 (exit $ac_status); }; } &&
8932 { ac_try='test -s conftest$ac_exeext'
6a8964db 8933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8934 (eval $ac_try) 2>&5
8935 ac_status=$?
8936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8937 (exit $ac_status); }; }; then
96b74343 8938 ac_cv_search_ldexp="none required"
8939else
6a8964db 8940 echo "$as_me: failed program was:" >&5
8941sed 's/^/| /' conftest.$ac_ext >&5
8942
96b74343 8943fi
9ebd0bb2 8944rm -f conftest.err conftest.$ac_objext \
8945 conftest$ac_exeext conftest.$ac_ext
6a8964db 8946if test "$ac_cv_search_ldexp" = no; then
8947 for ac_lib in m; do
8948 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8949 cat >conftest.$ac_ext <<_ACEOF
6a8964db 8950/* confdefs.h. */
8951_ACEOF
8952cat confdefs.h >>conftest.$ac_ext
8953cat >>conftest.$ac_ext <<_ACEOF
8954/* end confdefs.h. */
8955
96b74343 8956/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 8957#ifdef __cplusplus
8958extern "C"
8959#endif
96b74343 8960/* We use char because int might match the return type of a gcc2
6a8964db 8961 builtin and then its argument prototype would still apply. */
8962char ldexp ();
8963int
8964main ()
8965{
8966ldexp ();
8967 ;
8968 return 0;
8969}
8970_ACEOF
8971rm -f conftest.$ac_objext conftest$ac_exeext
8972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9ebd0bb2 8973 (eval $ac_link) 2>conftest.er1
6a8964db 8974 ac_status=$?
9ebd0bb2 8975 grep -v '^ *+' conftest.er1 >conftest.err
8976 rm -f conftest.er1
8977 cat conftest.err >&5
6a8964db 8978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8979 (exit $ac_status); } &&
c8aeaa6d 8980 { ac_try='test -z "$ac_c_werror_flag"
8981 || test ! -s conftest.err'
9ebd0bb2 8982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8983 (eval $ac_try) 2>&5
8984 ac_status=$?
8985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8986 (exit $ac_status); }; } &&
8987 { ac_try='test -s conftest$ac_exeext'
6a8964db 8988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8989 (eval $ac_try) 2>&5
8990 ac_status=$?
8991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8992 (exit $ac_status); }; }; then
8993 ac_cv_search_ldexp="-l$ac_lib"
96b74343 8994break
8995else
6a8964db 8996 echo "$as_me: failed program was:" >&5
8997sed 's/^/| /' conftest.$ac_ext >&5
8998
c9e1a048 8999fi
9ebd0bb2 9000rm -f conftest.err conftest.$ac_objext \
9001 conftest$ac_exeext conftest.$ac_ext
6a8964db 9002 done
c9cd172c 9003fi
6a8964db 9004LIBS=$ac_func_search_save_LIBS
9005fi
9006echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
9007echo "${ECHO_T}$ac_cv_search_ldexp" >&6
9008if test "$ac_cv_search_ldexp" != no; then
12b432e0 9009 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
6a8964db 9010
96b74343 9011fi
6a8964db 9012
96b74343 9013LDEXP_LIB="$LIBS"
9014LIBS="$save_LIBS"
9015
9016
ad87de1e 9017# Use <inttypes.h> only if it exists,
9018# doesn't clash with <sys/types.h>, and declares intmax_t.
6a8964db 9019echo "$as_me:$LINENO: checking for inttypes.h" >&5
9020echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
9021if test "${gcc_cv_header_inttypes_h+set}" = set; then
9022 echo $ECHO_N "(cached) $ECHO_C" >&6
9023else
9024 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9025/* confdefs.h. */
9026_ACEOF
9027cat confdefs.h >>conftest.$ac_ext
9028cat >>conftest.$ac_ext <<_ACEOF
9029/* end confdefs.h. */
ad87de1e 9030#include <sys/types.h>
9031#include <inttypes.h>
6a8964db 9032int
9033main ()
9034{
ad87de1e 9035intmax_t i = -1;
6a8964db 9036 ;
9037 return 0;
9038}
9039_ACEOF
9040rm -f conftest.$ac_objext
9041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 9042 (eval $ac_compile) 2>conftest.er1
6a8964db 9043 ac_status=$?
9ebd0bb2 9044 grep -v '^ *+' conftest.er1 >conftest.err
9045 rm -f conftest.er1
9046 cat conftest.err >&5
6a8964db 9047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9048 (exit $ac_status); } &&
c8aeaa6d 9049 { ac_try='test -z "$ac_c_werror_flag"
9050 || test ! -s conftest.err'
9ebd0bb2 9051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9052 (eval $ac_try) 2>&5
9053 ac_status=$?
9054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9055 (exit $ac_status); }; } &&
9056 { ac_try='test -s conftest.$ac_objext'
6a8964db 9057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9058 (eval $ac_try) 2>&5
9059 ac_status=$?
9060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9061 (exit $ac_status); }; }; then
4a7d7a8b 9062 gcc_cv_header_inttypes_h=yes
ad87de1e 9063else
6a8964db 9064 echo "$as_me: failed program was:" >&5
9065sed 's/^/| /' conftest.$ac_ext >&5
9066
9067gcc_cv_header_inttypes_h=no
ad87de1e 9068fi
9ebd0bb2 9069rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ad87de1e 9070fi
9071
6a8964db 9072echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
9073echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
4a7d7a8b 9074if test $gcc_cv_header_inttypes_h = yes; then
6a8964db 9075
9076cat >>confdefs.h <<\_ACEOF
4a7d7a8b 9077#define HAVE_INTTYPES_H 1
6a8964db 9078_ACEOF
4a7d7a8b 9079
9080fi
ad87de1e 9081
488c4206 9082
6a8964db 9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
077a3c99 9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
6a8964db 9111
9112
9113
9114
9115
9116
9117
9118
b88c06b5 9119for ac_func in times clock kill getrlimit setrlimit atoll atoq \
077a3c99 9120 sysconf strsignal getrusage nl_langinfo scandir alphasort \
9121 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9122 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 9123do
6a8964db 9124as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9125echo "$as_me:$LINENO: checking for $ac_func" >&5
9126echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9127if eval "test \"\${$as_ac_var+set}\" = set"; then
9128 echo $ECHO_N "(cached) $ECHO_C" >&6
9129else
9130 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9131/* confdefs.h. */
9132_ACEOF
9133cat confdefs.h >>conftest.$ac_ext
9134cat >>conftest.$ac_ext <<_ACEOF
9135/* end confdefs.h. */
9ebd0bb2 9136/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9137 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9138#define $ac_func innocuous_$ac_func
9139
ad87de1e 9140/* System header to define __stub macros and hopefully few prototypes,
6a8964db 9141 which can conflict with char $ac_func (); below.
9142 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9143 <limits.h> exists even on freestanding compilers. */
9ebd0bb2 9144
6a8964db 9145#ifdef __STDC__
9146# include <limits.h>
9147#else
9148# include <assert.h>
9149#endif
9ebd0bb2 9150
9151#undef $ac_func
9152
c9cd172c 9153/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 9154#ifdef __cplusplus
9155extern "C"
9156{
9157#endif
c9cd172c 9158/* We use char because int might match the return type of a gcc2
6a8964db 9159 builtin and then its argument prototype would still apply. */
9160char $ac_func ();
ad87de1e 9161/* The GNU C library defines this for functions which it implements
9162 to always fail with ENOSYS. Some functions are actually named
9163 something starting with __ and the normal name is an alias. */
9164#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9165choke me
9166#else
6a8964db 9167char (*f) () = $ac_func;
9168#endif
9169#ifdef __cplusplus
9170}
ad87de1e 9171#endif
9172
6a8964db 9173int
9174main ()
9175{
9176return f != $ac_func;
9177 ;
9178 return 0;
9179}
9180_ACEOF
9181rm -f conftest.$ac_objext conftest$ac_exeext
9182if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9ebd0bb2 9183 (eval $ac_link) 2>conftest.er1
6a8964db 9184 ac_status=$?
9ebd0bb2 9185 grep -v '^ *+' conftest.er1 >conftest.err
9186 rm -f conftest.er1
9187 cat conftest.err >&5
6a8964db 9188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9189 (exit $ac_status); } &&
c8aeaa6d 9190 { ac_try='test -z "$ac_c_werror_flag"
9191 || test ! -s conftest.err'
9ebd0bb2 9192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9193 (eval $ac_try) 2>&5
9194 ac_status=$?
9195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9196 (exit $ac_status); }; } &&
9197 { ac_try='test -s conftest$ac_exeext'
6a8964db 9198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9199 (eval $ac_try) 2>&5
9200 ac_status=$?
9201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9202 (exit $ac_status); }; }; then
9203 eval "$as_ac_var=yes"
9204else
9205 echo "$as_me: failed program was:" >&5
9206sed 's/^/| /' conftest.$ac_ext >&5
9207
9208eval "$as_ac_var=no"
9209fi
9ebd0bb2 9210rm -f conftest.err conftest.$ac_objext \
9211 conftest$ac_exeext conftest.$ac_ext
6a8964db 9212fi
9213echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9214echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9215if test `eval echo '${'$as_ac_var'}'` = yes; then
9216 cat >>confdefs.h <<_ACEOF
9217#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9218_ACEOF
ad87de1e 9219
ad87de1e 9220fi
9221done
9222
2c99f836 9223
b503c1a2 9224if test x$ac_cv_func_mbstowcs = xyes; then
6a8964db 9225 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9226echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
9227if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9228 echo $ECHO_N "(cached) $ECHO_C" >&6
b503c1a2 9229else
9230 if test "$cross_compiling" = yes; then
9231 gcc_cv_func_mbstowcs_works=yes
9232else
6a8964db 9233 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9234/* confdefs.h. */
9235_ACEOF
9236cat confdefs.h >>conftest.$ac_ext
9237cat >>conftest.$ac_ext <<_ACEOF
9238/* end confdefs.h. */
b503c1a2 9239#include <stdlib.h>
9240int main()
9241{
9242 mbstowcs(0, "", 0);
9243 return 0;
9244}
6a8964db 9245_ACEOF
9246rm -f conftest$ac_exeext
9247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9248 (eval $ac_link) 2>&5
9249 ac_status=$?
9250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9251 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9253 (eval $ac_try) 2>&5
9254 ac_status=$?
9255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9256 (exit $ac_status); }; }; then
b503c1a2 9257 gcc_cv_func_mbstowcs_works=yes
9258else
6a8964db 9259 echo "$as_me: program exited with status $ac_status" >&5
9260echo "$as_me: failed program was:" >&5
9261sed 's/^/| /' conftest.$ac_ext >&5
9262
9263( exit $ac_status )
9264gcc_cv_func_mbstowcs_works=no
b503c1a2 9265fi
9ebd0bb2 9266rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b503c1a2 9267fi
b503c1a2 9268fi
6a8964db 9269echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9270echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
12b432e0 9271 if test x$gcc_cv_func_mbstowcs_works = xyes; then
6a8964db 9272
9273cat >>confdefs.h <<\_ACEOF
b503c1a2 9274#define HAVE_WORKING_MBSTOWCS 1
6a8964db 9275_ACEOF
b503c1a2 9276
9277 fi
9278fi
9279
6a8964db 9280echo "$as_me:$LINENO: checking for ssize_t" >&5
9281echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
9282if test "${ac_cv_type_ssize_t+set}" = set; then
9283 echo $ECHO_N "(cached) $ECHO_C" >&6
12b432e0 9284else
6a8964db 9285 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9286/* confdefs.h. */
9287_ACEOF
9288cat confdefs.h >>conftest.$ac_ext
9289cat >>conftest.$ac_ext <<_ACEOF
9290/* end confdefs.h. */
ca170da7 9291$ac_includes_default
9292int
9293main ()
9294{
9295if ((ssize_t *) 0)
9296 return 0;
9297if (sizeof (ssize_t))
9298 return 0;
9299 ;
9300 return 0;
9301}
6a8964db 9302_ACEOF
ca170da7 9303rm -f conftest.$ac_objext
9304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 9305 (eval $ac_compile) 2>conftest.er1
ca170da7 9306 ac_status=$?
9ebd0bb2 9307 grep -v '^ *+' conftest.er1 >conftest.err
9308 rm -f conftest.er1
9309 cat conftest.err >&5
ca170da7 9310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9311 (exit $ac_status); } &&
c8aeaa6d 9312 { ac_try='test -z "$ac_c_werror_flag"
9313 || test ! -s conftest.err'
9ebd0bb2 9314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9315 (eval $ac_try) 2>&5
9316 ac_status=$?
9317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9318 (exit $ac_status); }; } &&
9319 { ac_try='test -s conftest.$ac_objext'
ca170da7 9320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9321 (eval $ac_try) 2>&5
9322 ac_status=$?
9323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9324 (exit $ac_status); }; }; then
f17e67ef 9325 ac_cv_type_ssize_t=yes
99a9be64 9326else
ca170da7 9327 echo "$as_me: failed program was:" >&5
9328sed 's/^/| /' conftest.$ac_ext >&5
c9cd172c 9329
ca170da7 9330ac_cv_type_ssize_t=no
9331fi
9ebd0bb2 9332rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12b432e0 9333fi
6a8964db 9334echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9335echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
ca170da7 9336if test $ac_cv_type_ssize_t = yes; then
9337 :
9338else
6a8964db 9339
ca170da7 9340cat >>confdefs.h <<_ACEOF
99a9be64 9341#define ssize_t int
6a8964db 9342_ACEOF
99a9be64 9343
9344fi
9345
dc85fb20 9346
2382c341 9347# Try to determine the array type of the second argument of getgroups
9348# for the target system (int or gid_t).
6a8964db 9349echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9350echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
9351if test "${ac_cv_type_uid_t+set}" = set; then
9352 echo $ECHO_N "(cached) $ECHO_C" >&6
9353else
9354 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9355/* confdefs.h. */
9356_ACEOF
9357cat confdefs.h >>conftest.$ac_ext
9358cat >>conftest.$ac_ext <<_ACEOF
9359/* end confdefs.h. */
2382c341 9360#include <sys/types.h>
6a8964db 9361
9362_ACEOF
2382c341 9363if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6a8964db 9364 $EGREP "uid_t" >/dev/null 2>&1; then
2382c341 9365 ac_cv_type_uid_t=yes
9366else
2382c341 9367 ac_cv_type_uid_t=no
9368fi
9369rm -f conftest*
9370
9371fi
6a8964db 9372echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9373echo "${ECHO_T}$ac_cv_type_uid_t" >&6
12b432e0 9374if test $ac_cv_type_uid_t = no; then
6a8964db 9375
9376cat >>confdefs.h <<\_ACEOF
2382c341 9377#define uid_t int
6a8964db 9378_ACEOF
c9e1a048 9379
6a8964db 9380
9381cat >>confdefs.h <<\_ACEOF
2382c341 9382#define gid_t int
6a8964db 9383_ACEOF
2382c341 9384
9385fi
9386
6a8964db 9387echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9388echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
9389if test "${ac_cv_type_getgroups+set}" = set; then
9390 echo $ECHO_N "(cached) $ECHO_C" >&6
2382c341 9391else
9392 if test "$cross_compiling" = yes; then
9393 ac_cv_type_getgroups=cross
9394else
6a8964db 9395 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9396/* confdefs.h. */
9397_ACEOF
9398cat confdefs.h >>conftest.$ac_ext
9399cat >>conftest.$ac_ext <<_ACEOF
9400/* end confdefs.h. */
2382c341 9401/* Thanks to Mike Rendell for this test. */
9402#include <sys/types.h>
9403#define NGID 256
9404#undef MAX
9405#define MAX(x, y) ((x) > (y) ? (x) : (y))
6a8964db 9406
9407int
9408main ()
2382c341 9409{
9410 gid_t gidset[NGID];
9411 int i, n;
9412 union { gid_t gval; long lval; } val;
9413
9414 val.lval = -1;
9415 for (i = 0; i < NGID; i++)
9416 gidset[i] = val.gval;
9417 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
9ebd0bb2 9418 gidset);
2382c341 9419 /* Exit non-zero if getgroups seems to require an array of ints. This
9420 happens when gid_t is short but getgroups modifies an array of ints. */
9421 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12b432e0 9422}
6a8964db 9423_ACEOF
9424rm -f conftest$ac_exeext
9425if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9426 (eval $ac_link) 2>&5
9427 ac_status=$?
9428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9429 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9431 (eval $ac_try) 2>&5
9432 ac_status=$?
9433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9434 (exit $ac_status); }; }; then
9435 ac_cv_type_getgroups=gid_t
12b432e0 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 )
9442ac_cv_type_getgroups=int
2382c341 9443fi
9ebd0bb2 9444rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2382c341 9445fi
2382c341 9446if test $ac_cv_type_getgroups = cross; then
6a8964db 9447 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9448/* confdefs.h. */
9449_ACEOF
9450cat confdefs.h >>conftest.$ac_ext
9451cat >>conftest.$ac_ext <<_ACEOF
9452/* end confdefs.h. */
2382c341 9453#include <unistd.h>
6a8964db 9454
9455_ACEOF
2382c341 9456if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6a8964db 9457 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
2382c341 9458 ac_cv_type_getgroups=gid_t
9459else
2382c341 9460 ac_cv_type_getgroups=int
9461fi
9462rm -f conftest*
9463
9464fi
9465fi
6a8964db 9466echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9467echo "${ECHO_T}$ac_cv_type_getgroups" >&6
2382c341 9468
6a8964db 9469cat >>confdefs.h <<_ACEOF
2382c341 9470#define GETGROUPS_T $ac_cv_type_getgroups
6a8964db 9471_ACEOF
2382c341 9472
9473
9474if test "${target}" = "${build}"; then
9475 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9476else
9477 case "${target}" in
9478 # This condition may need some tweaking. It should include all
9479 # targets where the array type of the second argument of getgroups
9480 # is int and the type of gid_t is not equivalent to int.
9481 *-*-sunos* | *-*-ultrix*)
9482 TARGET_GETGROUPS_T=int
9483 ;;
9484 *)
9485 TARGET_GETGROUPS_T=gid_t
9486 ;;
9487 esac
9488fi
9489
9490
b0b8d180 9491
9492echo "$as_me:$LINENO: checking for sys/mman.h" >&5
9493echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
9494if test "${ac_cv_header_sys_mman_h+set}" = set; then
9495 echo $ECHO_N "(cached) $ECHO_C" >&6
9496else
9497 cat >conftest.$ac_ext <<_ACEOF
9498/* confdefs.h. */
9499_ACEOF
9500cat confdefs.h >>conftest.$ac_ext
9501cat >>conftest.$ac_ext <<_ACEOF
9502/* end confdefs.h. */
9503#include <sys/mman.h>
9504_ACEOF
9505if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9506 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9507 ac_status=$?
9508 grep -v '^ *+' conftest.er1 >conftest.err
9509 rm -f conftest.er1
9510 cat conftest.err >&5
9511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9512 (exit $ac_status); } >/dev/null; then
9513 if test -s conftest.err; then
9514 ac_cpp_err=$ac_c_preproc_warn_flag
9515 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9516 else
9517 ac_cpp_err=
9518 fi
9519else
9520 ac_cpp_err=yes
9521fi
9522if test -z "$ac_cpp_err"; then
9523 ac_cv_header_sys_mman_h=yes
9524else
9525 echo "$as_me: failed program was:" >&5
9526sed 's/^/| /' conftest.$ac_ext >&5
9527
9528 ac_cv_header_sys_mman_h=no
9529fi
9530rm -f conftest.err conftest.$ac_ext
9531fi
9532echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9533echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
9534if test $ac_cv_header_sys_mman_h = yes; then
9535 gcc_header_sys_mman_h=yes
9536else
9537 gcc_header_sys_mman_h=no
9538fi
9539
9540echo "$as_me:$LINENO: checking for mmap" >&5
9541echo $ECHO_N "checking for mmap... $ECHO_C" >&6
9542if test "${ac_cv_func_mmap+set}" = set; then
9543 echo $ECHO_N "(cached) $ECHO_C" >&6
9544else
9545 cat >conftest.$ac_ext <<_ACEOF
9546/* confdefs.h. */
9547_ACEOF
9548cat confdefs.h >>conftest.$ac_ext
9549cat >>conftest.$ac_ext <<_ACEOF
9550/* end confdefs.h. */
9551/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9552 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9553#define mmap innocuous_mmap
9554
9555/* System header to define __stub macros and hopefully few prototypes,
9556 which can conflict with char mmap (); below.
9557 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9558 <limits.h> exists even on freestanding compilers. */
9559
9560#ifdef __STDC__
9561# include <limits.h>
9562#else
9563# include <assert.h>
9564#endif
9565
9566#undef mmap
9567
9568/* Override any gcc2 internal prototype to avoid an error. */
9569#ifdef __cplusplus
9570extern "C"
9571{
9572#endif
9573/* We use char because int might match the return type of a gcc2
9574 builtin and then its argument prototype would still apply. */
9575char mmap ();
9576/* The GNU C library defines this for functions which it implements
9577 to always fail with ENOSYS. Some functions are actually named
9578 something starting with __ and the normal name is an alias. */
9579#if defined (__stub_mmap) || defined (__stub___mmap)
9580choke me
9581#else
9582char (*f) () = mmap;
9583#endif
9584#ifdef __cplusplus
9585}
9586#endif
9587
9588int
9589main ()
9590{
9591return f != mmap;
9592 ;
9593 return 0;
9594}
9595_ACEOF
9596rm -f conftest.$ac_objext conftest$ac_exeext
9597if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9598 (eval $ac_link) 2>conftest.er1
9599 ac_status=$?
9600 grep -v '^ *+' conftest.er1 >conftest.err
9601 rm -f conftest.er1
9602 cat conftest.err >&5
9603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9604 (exit $ac_status); } &&
c8aeaa6d 9605 { ac_try='test -z "$ac_c_werror_flag"
9606 || test ! -s conftest.err'
b0b8d180 9607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9608 (eval $ac_try) 2>&5
9609 ac_status=$?
9610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9611 (exit $ac_status); }; } &&
9612 { ac_try='test -s conftest$ac_exeext'
9613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9614 (eval $ac_try) 2>&5
9615 ac_status=$?
9616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9617 (exit $ac_status); }; }; then
9618 ac_cv_func_mmap=yes
9619else
9620 echo "$as_me: failed program was:" >&5
9621sed 's/^/| /' conftest.$ac_ext >&5
9622
9623ac_cv_func_mmap=no
9624fi
9625rm -f conftest.err conftest.$ac_objext \
9626 conftest$ac_exeext conftest.$ac_ext
9627fi
9628echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9629echo "${ECHO_T}$ac_cv_func_mmap" >&6
9630if test $ac_cv_func_mmap = yes; then
9631 gcc_func_mmap=yes
9632else
9633 gcc_func_mmap=no
9634fi
9635
9636if test "$gcc_header_sys_mman_h" != yes \
9637 || test "$gcc_func_mmap" != yes; then
9f0cea1b 9638 gcc_cv_func_mmap_file=no
9639 gcc_cv_func_mmap_dev_zero=no
9640 gcc_cv_func_mmap_anon=no
9641else
6a8964db 9642 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9643echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
9644if test "${gcc_cv_func_mmap_file+set}" = set; then
9645 echo $ECHO_N "(cached) $ECHO_C" >&6
9f0cea1b 9646else
6a8964db 9647 # Add a system to this blacklist if
9f0cea1b 9648 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9649 # memory area containing the same data that you'd get if you applied
9650 # read() to the same fd. The only system known to have a problem here
9651 # is VMS, where text files have record structure.
9652 case "$host_os" in
6a8964db 9653 vms* | ultrix*)
9f0cea1b 9654 gcc_cv_func_mmap_file=no ;;
9655 *)
9656 gcc_cv_func_mmap_file=yes;;
9657 esac
9658fi
6a8964db 9659echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9660echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9661 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9662echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
9663if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9664 echo $ECHO_N "(cached) $ECHO_C" >&6
9f0cea1b 9665else
9666 # Add a system to this blacklist if it has mmap() but /dev/zero
9667 # does not exist, or if mmapping /dev/zero does not give anonymous
9668 # zeroed pages with both the following properties:
9669 # 1. If you map N consecutive pages in with one call, and then
9670 # unmap any subset of those pages, the pages that were not
9671 # explicitly unmapped remain accessible.
9672 # 2. If you map two adjacent blocks of memory and then unmap them
9673 # both at once, they must both go away.
9674 # Systems known to be in this category are Windows (all variants),
9675 # VMS, and Darwin.
9676 case "$host_os" in
22ed000f 9677 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
9f0cea1b 9678 gcc_cv_func_mmap_dev_zero=no ;;
9679 *)
9680 gcc_cv_func_mmap_dev_zero=yes;;
9681 esac
9682fi
6a8964db 9683echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9684echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
9f0cea1b 9685
9686 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
6a8964db 9687 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9688echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
9689if test "${gcc_cv_decl_map_anon+set}" = set; then
9690 echo $ECHO_N "(cached) $ECHO_C" >&6
9691else
9692 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9693/* confdefs.h. */
9694_ACEOF
9695cat confdefs.h >>conftest.$ac_ext
9696cat >>conftest.$ac_ext <<_ACEOF
9697/* end confdefs.h. */
9f0cea1b 9698#include <sys/types.h>
9699#include <sys/mman.h>
9700#include <unistd.h>
9701
9702#ifndef MAP_ANONYMOUS
9703#define MAP_ANONYMOUS MAP_ANON
9704#endif
9705
6a8964db 9706int
9707main ()
9708{
9f0cea1b 9709int n = MAP_ANONYMOUS;
6a8964db 9710 ;
9711 return 0;
9712}
9713_ACEOF
9714rm -f conftest.$ac_objext
9715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 9716 (eval $ac_compile) 2>conftest.er1
6a8964db 9717 ac_status=$?
9ebd0bb2 9718 grep -v '^ *+' conftest.er1 >conftest.err
9719 rm -f conftest.er1
9720 cat conftest.err >&5
6a8964db 9721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9722 (exit $ac_status); } &&
c8aeaa6d 9723 { ac_try='test -z "$ac_c_werror_flag"
9724 || test ! -s conftest.err'
9ebd0bb2 9725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9726 (eval $ac_try) 2>&5
9727 ac_status=$?
9728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9729 (exit $ac_status); }; } &&
9730 { ac_try='test -s conftest.$ac_objext'
6a8964db 9731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9732 (eval $ac_try) 2>&5
9733 ac_status=$?
9734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9735 (exit $ac_status); }; }; then
9f0cea1b 9736 gcc_cv_decl_map_anon=yes
9737else
6a8964db 9738 echo "$as_me: failed program was:" >&5
9739sed 's/^/| /' conftest.$ac_ext >&5
9740
9741gcc_cv_decl_map_anon=no
9f0cea1b 9742fi
9ebd0bb2 9743rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9f0cea1b 9744fi
6a8964db 9745echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9746echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
9f0cea1b 9747
9748 if test $gcc_cv_decl_map_anon = no; then
9749 gcc_cv_func_mmap_anon=no
9750 else
6a8964db 9751 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9752echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
9753if test "${gcc_cv_func_mmap_anon+set}" = set; then
9754 echo $ECHO_N "(cached) $ECHO_C" >&6
9f0cea1b 9755else
9756 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9757 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9758 # doesn't give anonymous zeroed pages with the same properties listed
9759 # above for use of /dev/zero.
9760 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9761 case "$host_os" in
9762 vms* | cygwin* | pe | mingw* | sco* | udk* )
9763 gcc_cv_func_mmap_anon=no ;;
9764 *)
9765 gcc_cv_func_mmap_anon=yes;;
9766 esac
9767fi
6a8964db 9768echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9769echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
9f0cea1b 9770 fi
9771fi
9772
9773if test $gcc_cv_func_mmap_file = yes; then
6a8964db 9774
9775cat >>confdefs.h <<\_ACEOF
9f0cea1b 9776#define HAVE_MMAP_FILE 1
6a8964db 9777_ACEOF
9f0cea1b 9778
9779fi
9780if test $gcc_cv_func_mmap_dev_zero = yes; then
6a8964db 9781
9782cat >>confdefs.h <<\_ACEOF
9f0cea1b 9783#define HAVE_MMAP_DEV_ZERO 1
6a8964db 9784_ACEOF
9f0cea1b 9785
9786fi
9787if test $gcc_cv_func_mmap_anon = yes; then
6a8964db 9788
9789cat >>confdefs.h <<\_ACEOF
9f0cea1b 9790#define HAVE_MMAP_ANON 1
6a8964db 9791_ACEOF
9f0cea1b 9792
9793fi
9794
f1959ea2 9795
9796case "${host}" in
8f966bdb 9797*-*-*vms*)
6a8964db 9798 # Under VMS, vfork works very differently than on Unix. The standard test
8f966bdb 9799 # won't work, and it isn't easily adaptable. It makes more sense to
9800 # just force it.
9801 ac_cv_func_vfork_works=yes
9802 ;;
f1959ea2 9803esac
6a8964db 9804echo "$as_me:$LINENO: checking for pid_t" >&5
9805echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
9806if test "${ac_cv_type_pid_t+set}" = set; then
9807 echo $ECHO_N "(cached) $ECHO_C" >&6
9808else
9809 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9810/* confdefs.h. */
9811_ACEOF
9812cat confdefs.h >>conftest.$ac_ext
9813cat >>conftest.$ac_ext <<_ACEOF
9814/* end confdefs.h. */
9815$ac_includes_default
9816int
9817main ()
9818{
9819if ((pid_t *) 0)
9820 return 0;
9821if (sizeof (pid_t))
9822 return 0;
9823 ;
9824 return 0;
9825}
9826_ACEOF
9827rm -f conftest.$ac_objext
9828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 9829 (eval $ac_compile) 2>conftest.er1
6a8964db 9830 ac_status=$?
9ebd0bb2 9831 grep -v '^ *+' conftest.er1 >conftest.err
9832 rm -f conftest.er1
9833 cat conftest.err >&5
6a8964db 9834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9835 (exit $ac_status); } &&
c8aeaa6d 9836 { ac_try='test -z "$ac_c_werror_flag"
9837 || test ! -s conftest.err'
9ebd0bb2 9838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9839 (eval $ac_try) 2>&5
9840 ac_status=$?
9841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9842 (exit $ac_status); }; } &&
9843 { ac_try='test -s conftest.$ac_objext'
6a8964db 9844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9845 (eval $ac_try) 2>&5
9846 ac_status=$?
9847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9848 (exit $ac_status); }; }; then
f17e67ef 9849 ac_cv_type_pid_t=yes
020ecb1b 9850else
6a8964db 9851 echo "$as_me: failed program was:" >&5
9852sed 's/^/| /' conftest.$ac_ext >&5
c9cd172c 9853
6a8964db 9854ac_cv_type_pid_t=no
9855fi
9ebd0bb2 9856rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12b432e0 9857fi
6a8964db 9858echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
9859echo "${ECHO_T}$ac_cv_type_pid_t" >&6
9860if test $ac_cv_type_pid_t = yes; then
9861 :
9862else
9863
9864cat >>confdefs.h <<_ACEOF
020ecb1b 9865#define pid_t int
6a8964db 9866_ACEOF
020ecb1b 9867
9868fi
9869
6a8964db 9870
9871
9872for ac_header in unistd.h vfork.h
9873do
9874as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2cd18f76 9875echo "$as_me:$LINENO: checking for $ac_header" >&5
6a8964db 9876echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9877if eval "test \"\${$as_ac_Header+set}\" = set"; then
9878 echo $ECHO_N "(cached) $ECHO_C" >&6
6a8964db 9879else
2cd18f76 9880 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9881/* confdefs.h. */
9882_ACEOF
9883cat confdefs.h >>conftest.$ac_ext
9884cat >>conftest.$ac_ext <<_ACEOF
9885/* end confdefs.h. */
9886#include <$ac_header>
9887_ACEOF
9888if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9889 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9890 ac_status=$?
9891 grep -v '^ *+' conftest.er1 >conftest.err
9892 rm -f conftest.er1
9893 cat conftest.err >&5
9894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9895 (exit $ac_status); } >/dev/null; then
9896 if test -s conftest.err; then
9897 ac_cpp_err=$ac_c_preproc_warn_flag
9ebd0bb2 9898 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6a8964db 9899 else
9900 ac_cpp_err=
9901 fi
9af7c2e2 9902else
6a8964db 9903 ac_cpp_err=yes
9904fi
9905if test -z "$ac_cpp_err"; then
2cd18f76 9906 eval "$as_ac_Header=yes"
6a8964db 9907else
9908 echo "$as_me: failed program was:" >&5
9909sed 's/^/| /' conftest.$ac_ext >&5
9910
2cd18f76 9911 eval "$as_ac_Header=no"
6a8964db 9912fi
9913rm -f conftest.err conftest.$ac_ext
020ecb1b 9914fi
6a8964db 9915echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9916echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6a8964db 9917if test `eval echo '${'$as_ac_Header'}'` = yes; then
9918 cat >>confdefs.h <<_ACEOF
9919#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9920_ACEOF
c9cd172c 9921
9922fi
6a8964db 9923done
9924
9925
9926
9927for ac_func in fork vfork
9928do
9929as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9930echo "$as_me:$LINENO: checking for $ac_func" >&5
9931echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9932if eval "test \"\${$as_ac_var+set}\" = set"; then
9933 echo $ECHO_N "(cached) $ECHO_C" >&6
9934else
9935 cat >conftest.$ac_ext <<_ACEOF
6a8964db 9936/* confdefs.h. */
9937_ACEOF
9938cat confdefs.h >>conftest.$ac_ext
9939cat >>conftest.$ac_ext <<_ACEOF
9940/* end confdefs.h. */
9ebd0bb2 9941/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9942 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9943#define $ac_func innocuous_$ac_func
9944
020ecb1b 9945/* System header to define __stub macros and hopefully few prototypes,
6a8964db 9946 which can conflict with char $ac_func (); below.
9947 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9948 <limits.h> exists even on freestanding compilers. */
9ebd0bb2 9949
6a8964db 9950#ifdef __STDC__
9951# include <limits.h>
9952#else
9953# include <assert.h>
9954#endif
9ebd0bb2 9955
9956#undef $ac_func
9957
c9cd172c 9958/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 9959#ifdef __cplusplus
9960extern "C"
9961{
9962#endif
c9cd172c 9963/* We use char because int might match the return type of a gcc2
6a8964db 9964 builtin and then its argument prototype would still apply. */
9965char $ac_func ();
020ecb1b 9966/* The GNU C library defines this for functions which it implements
9967 to always fail with ENOSYS. Some functions are actually named
9968 something starting with __ and the normal name is an alias. */
6a8964db 9969#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
020ecb1b 9970choke me
9971#else
6a8964db 9972char (*f) () = $ac_func;
9973#endif
9974#ifdef __cplusplus
9975}
020ecb1b 9976#endif
9977
6a8964db 9978int
9979main ()
9980{
9981return f != $ac_func;
9982 ;
9983 return 0;
9984}
9985_ACEOF
9986rm -f conftest.$ac_objext conftest$ac_exeext
9987if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9ebd0bb2 9988 (eval $ac_link) 2>conftest.er1
6a8964db 9989 ac_status=$?
9ebd0bb2 9990 grep -v '^ *+' conftest.er1 >conftest.err
9991 rm -f conftest.er1
9992 cat conftest.err >&5
6a8964db 9993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9994 (exit $ac_status); } &&
c8aeaa6d 9995 { ac_try='test -z "$ac_c_werror_flag"
9996 || test ! -s conftest.err'
9ebd0bb2 9997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9998 (eval $ac_try) 2>&5
9999 ac_status=$?
10000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10001 (exit $ac_status); }; } &&
10002 { ac_try='test -s conftest$ac_exeext'
6a8964db 10003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10004 (eval $ac_try) 2>&5
10005 ac_status=$?
10006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10007 (exit $ac_status); }; }; then
10008 eval "$as_ac_var=yes"
10009else
10010 echo "$as_me: failed program was:" >&5
10011sed 's/^/| /' conftest.$ac_ext >&5
10012
10013eval "$as_ac_var=no"
10014fi
9ebd0bb2 10015rm -f conftest.err conftest.$ac_objext \
10016 conftest$ac_exeext conftest.$ac_ext
6a8964db 10017fi
10018echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10019echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10020if test `eval echo '${'$as_ac_var'}'` = yes; then
10021 cat >>confdefs.h <<_ACEOF
10022#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10023_ACEOF
10024
020ecb1b 10025fi
6a8964db 10026done
020ecb1b 10027
6a8964db 10028if test "x$ac_cv_func_fork" = xyes; then
10029 echo "$as_me:$LINENO: checking for working fork" >&5
10030echo $ECHO_N "checking for working fork... $ECHO_C" >&6
10031if test "${ac_cv_func_fork_works+set}" = set; then
10032 echo $ECHO_N "(cached) $ECHO_C" >&6
020ecb1b 10033else
6a8964db 10034 if test "$cross_compiling" = yes; then
10035 ac_cv_func_fork_works=cross
10036else
10037 cat >conftest.$ac_ext <<_ACEOF
10038/* By Ruediger Kuhlmann. */
10039 #include <sys/types.h>
10040 #if HAVE_UNISTD_H
10041 # include <unistd.h>
10042 #endif
10043 /* Some systems only have a dummy stub for fork() */
10044 int main ()
10045 {
9ebd0bb2 10046 if (fork() < 0)
10047 exit (1);
10048 exit (0);
6a8964db 10049 }
10050_ACEOF
10051rm -f conftest$ac_exeext
10052if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10053 (eval $ac_link) 2>&5
10054 ac_status=$?
10055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10058 (eval $ac_try) 2>&5
10059 ac_status=$?
10060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10061 (exit $ac_status); }; }; then
10062 ac_cv_func_fork_works=yes
10063else
10064 echo "$as_me: program exited with status $ac_status" >&5
10065echo "$as_me: failed program was:" >&5
10066sed 's/^/| /' conftest.$ac_ext >&5
10067
10068( exit $ac_status )
10069ac_cv_func_fork_works=no
10070fi
9ebd0bb2 10071rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6a8964db 10072fi
10073fi
10074echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10075echo "${ECHO_T}$ac_cv_func_fork_works" >&6
10076
10077else
10078 ac_cv_func_fork_works=$ac_cv_func_fork
10079fi
10080if test "x$ac_cv_func_fork_works" = xcross; then
10081 case $host in
10082 *-*-amigaos* | *-*-msdosdjgpp*)
10083 # Override, as these systems have only a dummy fork() stub
10084 ac_cv_func_fork_works=no
10085 ;;
10086 *)
10087 ac_cv_func_fork_works=yes
10088 ;;
10089 esac
10090 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10091echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
020ecb1b 10092fi
020ecb1b 10093ac_cv_func_vfork_works=$ac_cv_func_vfork
6a8964db 10094if test "x$ac_cv_func_vfork" = xyes; then
10095 echo "$as_me:$LINENO: checking for working vfork" >&5
10096echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
10097if test "${ac_cv_func_vfork_works+set}" = set; then
10098 echo $ECHO_N "(cached) $ECHO_C" >&6
020ecb1b 10099else
6a8964db 10100 if test "$cross_compiling" = yes; then
10101 ac_cv_func_vfork_works=cross
10102else
10103 cat >conftest.$ac_ext <<_ACEOF
6a8964db 10104/* confdefs.h. */
10105_ACEOF
10106cat confdefs.h >>conftest.$ac_ext
10107cat >>conftest.$ac_ext <<_ACEOF
10108/* end confdefs.h. */
020ecb1b 10109/* Thanks to Paul Eggert for this test. */
10110#include <stdio.h>
6a8964db 10111#include <stdlib.h>
020ecb1b 10112#include <sys/types.h>
10113#include <sys/stat.h>
6a8964db 10114#include <sys/wait.h>
10115#if HAVE_UNISTD_H
10116# include <unistd.h>
020ecb1b 10117#endif
6a8964db 10118#if HAVE_VFORK_H
10119# include <vfork.h>
020ecb1b 10120#endif
10121/* On some sparc systems, changes by the child to local and incoming
6a8964db 10122 argument registers are propagated back to the parent. The compiler
10123 is told about this with #include <vfork.h>, but some compilers
10124 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10125 static variable whose address is put into a register that is
10126 clobbered by the vfork. */
10127static void
020ecb1b 10128#ifdef __cplusplus
10129sparc_address_test (int arg)
6a8964db 10130# else
020ecb1b 10131sparc_address_test (arg) int arg;
10132#endif
10133{
10134 static pid_t child;
10135 if (!child) {
10136 child = vfork ();
10137 if (child < 0) {
10138 perror ("vfork");
10139 _exit(2);
10140 }
10141 if (!child) {
10142 arg = getpid();
10143 write(-1, "", 0);
10144 _exit (arg);
10145 }
10146 }
10147}
6a8964db 10148
10149int
10150main ()
10151{
020ecb1b 10152 pid_t parent = getpid ();
10153 pid_t child;
10154
6a8964db 10155 sparc_address_test (0);
020ecb1b 10156
10157 child = vfork ();
10158
10159 if (child == 0) {
6a8964db 10160 /* Here is another test for sparc vfork register problems. This
10161 test uses lots of local variables, at least as many local
10162 variables as main has allocated so far including compiler
10163 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10164 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10165 reuse the register of parent for one of the local variables,
10166 since it will think that parent can't possibly be used any more
10167 in this routine. Assigning to the local variable will thus
10168 munge parent in the parent process. */
020ecb1b 10169 pid_t
10170 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10171 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10172 /* Convince the compiler that p..p7 are live; otherwise, it might
10173 use the same hardware register for all 8 local variables. */
10174 if (p != p1 || p != p2 || p != p3 || p != p4
10175 || p != p5 || p != p6 || p != p7)
10176 _exit(1);
10177
6a8964db 10178 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10179 from child file descriptors. If the child closes a descriptor
10180 before it execs or exits, this munges the parent's descriptor
10181 as well. Test for this by closing stdout in the child. */
020ecb1b 10182 _exit(close(fileno(stdout)) != 0);
10183 } else {
10184 int status;
10185 struct stat st;
10186
10187 while (wait(&status) != child)
10188 ;
10189 exit(
10190 /* Was there some problem with vforking? */
10191 child < 0
10192
10193 /* Did the child fail? (This shouldn't happen.) */
10194 || status
10195
10196 /* Did the vfork/compiler bug occur? */
10197 || parent != getpid()
10198
10199 /* Did the file descriptor bug occur? */
10200 || fstat(fileno(stdout), &st) != 0
10201 );
10202 }
10203}
6a8964db 10204_ACEOF
10205rm -f conftest$ac_exeext
10206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10207 (eval $ac_link) 2>&5
10208 ac_status=$?
10209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10210 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10212 (eval $ac_try) 2>&5
10213 ac_status=$?
10214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10215 (exit $ac_status); }; }; then
020ecb1b 10216 ac_cv_func_vfork_works=yes
10217else
6a8964db 10218 echo "$as_me: program exited with status $ac_status" >&5
10219echo "$as_me: failed program was:" >&5
10220sed 's/^/| /' conftest.$ac_ext >&5
10221
10222( exit $ac_status )
10223ac_cv_func_vfork_works=no
c9e1a048 10224fi
9ebd0bb2 10225rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c9cd172c 10226fi
6a8964db 10227fi
10228echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10229echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
020ecb1b 10230
6a8964db 10231fi;
10232if test "x$ac_cv_func_fork_works" = xcross; then
9ebd0bb2 10233 ac_cv_func_vfork_works=$ac_cv_func_vfork
6a8964db 10234 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10235echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
020ecb1b 10236fi
10237
6a8964db 10238if test "x$ac_cv_func_vfork_works" = xyes; then
10239
10240cat >>confdefs.h <<\_ACEOF
10241#define HAVE_WORKING_VFORK 1
10242_ACEOF
10243
10244else
10245
10246cat >>confdefs.h <<\_ACEOF
020ecb1b 10247#define vfork fork
6a8964db 10248_ACEOF
020ecb1b 10249
10250fi
6a8964db 10251if test "x$ac_cv_func_fork_works" = xyes; then
10252
10253cat >>confdefs.h <<\_ACEOF
10254#define HAVE_WORKING_FORK 1
10255_ACEOF
10256
10257fi
10258
020ecb1b 10259
772580ce 10260
e5d424c9 10261 if test "X$prefix" = "XNONE"; then
10262 acl_final_prefix="$ac_default_prefix"
10263 else
10264 acl_final_prefix="$prefix"
10265 fi
10266 if test "X$exec_prefix" = "XNONE"; then
10267 acl_final_exec_prefix='${prefix}'
10268 else
10269 acl_final_exec_prefix="$exec_prefix"
10270 fi
10271 acl_save_prefix="$prefix"
10272 prefix="$acl_final_prefix"
10273 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10274 prefix="$acl_save_prefix"
7093ff41 10275
10276
e5d424c9 10277# Check whether --with-gnu-ld or --without-gnu-ld was given.
10278if test "${with_gnu_ld+set}" = set; then
10279 withval="$with_gnu_ld"
10280 test "$withval" = no || with_gnu_ld=yes
6a8964db 10281else
e5d424c9 10282 with_gnu_ld=no
10283fi;
10284# Prepare PATH_SEPARATOR.
10285# The user is always right.
10286if test "${PATH_SEPARATOR+set}" != set; then
10287 echo "#! /bin/sh" >conf$$.sh
10288 echo "exit 0" >>conf$$.sh
10289 chmod +x conf$$.sh
10290 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10291 PATH_SEPARATOR=';'
6a8964db 10292 else
e5d424c9 10293 PATH_SEPARATOR=:
6a8964db 10294 fi
e5d424c9 10295 rm -f conf$$.sh
10296fi
10297ac_prog=ld
10298if test "$GCC" = yes; then
10299 # Check if gcc -print-prog-name=ld gives a path.
10300 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10301echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10302 case $host in
10303 *-*-mingw*)
10304 # gcc leaves a trailing carriage return which upsets mingw
10305 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10306 *)
10307 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10308 esac
10309 case $ac_prog in
10310 # Accept absolute paths.
10311 [\\/]* | [A-Za-z]:[\\/]*)
10312 re_direlt='/[^/][^/]*/\.\./'
10313 # Canonicalize the path of ld
10314 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10315 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10316 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10317 done
10318 test -z "$LD" && LD="$ac_prog"
10319 ;;
10320 "")
10321 # If it fails, then pretend we aren't using GCC.
10322 ac_prog=ld
10323 ;;
10324 *)
10325 # If it is relative, then search for the first ld in PATH.
10326 with_gnu_ld=unknown
10327 ;;
10328 esac
10329elif test "$with_gnu_ld" = yes; then
10330 echo "$as_me:$LINENO: checking for GNU ld" >&5
10331echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
6a8964db 10332else
e5d424c9 10333 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10334echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
6a8964db 10335fi
e5d424c9 10336if test "${acl_cv_path_LD+set}" = set; then
10337 echo $ECHO_N "(cached) $ECHO_C" >&6
6a8964db 10338else
e5d424c9 10339 if test -z "$LD"; then
10340 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10341 for ac_dir in $PATH; do
10342 test -z "$ac_dir" && ac_dir=.
10343 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10344 acl_cv_path_LD="$ac_dir/$ac_prog"
10345 # Check to see if the program is GNU ld. I'd rather use --version,
10346 # but apparently some GNU ld's only accept -v.
10347 # Break only if it was the GNU/non-GNU ld that we prefer.
10348 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10349 test "$with_gnu_ld" != no && break
10350 else
10351 test "$with_gnu_ld" != yes && break
10352 fi
10353 fi
10354 done
10355 IFS="$ac_save_ifs"
10356else
10357 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10358fi
10359fi
6a8964db 10360
e5d424c9 10361LD="$acl_cv_path_LD"
10362if test -n "$LD"; then
10363 echo "$as_me:$LINENO: result: $LD" >&5
10364echo "${ECHO_T}$LD" >&6
10365else
10366 echo "$as_me:$LINENO: result: no" >&5
10367echo "${ECHO_T}no" >&6
6a8964db 10368fi
e5d424c9 10369test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10370echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10371 { (exit 1); exit 1; }; }
10372echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10373echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10374if test "${acl_cv_prog_gnu_ld+set}" = set; then
10375 echo $ECHO_N "(cached) $ECHO_C" >&6
10376else
10377 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10378if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10379 acl_cv_prog_gnu_ld=yes
10380else
10381 acl_cv_prog_gnu_ld=no
c9cd172c 10382fi
e5d424c9 10383fi
10384echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10385echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10386with_gnu_ld=$acl_cv_prog_gnu_ld
10387
10388
10389
10390 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10391echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10392if test "${acl_cv_rpath+set}" = set; then
10393 echo $ECHO_N "(cached) $ECHO_C" >&6
10394else
10395
10396 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10397 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10398 . ./conftest.sh
10399 rm -f ./conftest.sh
10400 acl_cv_rpath=done
6a8964db 10401
e24cbb01 10402fi
e5d424c9 10403echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10404echo "${ECHO_T}$acl_cv_rpath" >&6
10405 wl="$acl_cv_wl"
10406 libext="$acl_cv_libext"
10407 shlibext="$acl_cv_shlibext"
10408 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10409 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10410 hardcode_direct="$acl_cv_hardcode_direct"
10411 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10412 # Check whether --enable-rpath or --disable-rpath was given.
10413if test "${enable_rpath+set}" = set; then
10414 enableval="$enable_rpath"
10415 :
10416else
10417 enable_rpath=yes
10418fi;
10419
10420
10421
10422
10423
10424
10425
10426 use_additional=yes
10427
10428 acl_save_prefix="$prefix"
10429 prefix="$acl_final_prefix"
10430 acl_save_exec_prefix="$exec_prefix"
10431 exec_prefix="$acl_final_exec_prefix"
10432
10433 eval additional_includedir=\"$includedir\"
10434 eval additional_libdir=\"$libdir\"
10435
10436 exec_prefix="$acl_save_exec_prefix"
10437 prefix="$acl_save_prefix"
10438
10439
10440# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10441if test "${with_libiconv_prefix+set}" = set; then
10442 withval="$with_libiconv_prefix"
10443
10444 if test "X$withval" = "Xno"; then
10445 use_additional=no
10446 else
10447 if test "X$withval" = "X"; then
10448
10449 acl_save_prefix="$prefix"
10450 prefix="$acl_final_prefix"
10451 acl_save_exec_prefix="$exec_prefix"
10452 exec_prefix="$acl_final_exec_prefix"
10453
10454 eval additional_includedir=\"$includedir\"
10455 eval additional_libdir=\"$libdir\"
10456
10457 exec_prefix="$acl_save_exec_prefix"
10458 prefix="$acl_save_prefix"
10459
10460 else
10461 additional_includedir="$withval/include"
10462 additional_libdir="$withval/lib"
10463 fi
10464 fi
10465
10466fi;
10467 LIBICONV=
10468 LTLIBICONV=
10469 INCICONV=
10470 rpathdirs=
10471 ltrpathdirs=
10472 names_already_handled=
10473 names_next_round='iconv '
10474 while test -n "$names_next_round"; do
10475 names_this_round="$names_next_round"
10476 names_next_round=
10477 for name in $names_this_round; do
10478 already_handled=
10479 for n in $names_already_handled; do
10480 if test "$n" = "$name"; then
10481 already_handled=yes
10482 break
10483 fi
10484 done
10485 if test -z "$already_handled"; then
10486 names_already_handled="$names_already_handled $name"
10487 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10488 eval value=\"\$HAVE_LIB$uppername\"
10489 if test -n "$value"; then
10490 if test "$value" = yes; then
10491 eval value=\"\$LIB$uppername\"
10492 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10493 eval value=\"\$LTLIB$uppername\"
10494 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10495 else
10496 :
10497 fi
10498 else
10499 found_dir=
10500 found_la=
10501 found_so=
10502 found_a=
10503 if test $use_additional = yes; then
10504 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10505 found_dir="$additional_libdir"
10506 found_so="$additional_libdir/lib$name.$shlibext"
10507 if test -f "$additional_libdir/lib$name.la"; then
10508 found_la="$additional_libdir/lib$name.la"
10509 fi
10510 else
10511 if test -f "$additional_libdir/lib$name.$libext"; then
10512 found_dir="$additional_libdir"
10513 found_a="$additional_libdir/lib$name.$libext"
10514 if test -f "$additional_libdir/lib$name.la"; then
10515 found_la="$additional_libdir/lib$name.la"
10516 fi
10517 fi
10518 fi
10519 fi
10520 if test "X$found_dir" = "X"; then
10521 for x in $LDFLAGS $LTLIBICONV; do
10522
10523 acl_save_prefix="$prefix"
10524 prefix="$acl_final_prefix"
10525 acl_save_exec_prefix="$exec_prefix"
10526 exec_prefix="$acl_final_exec_prefix"
10527 eval x=\"$x\"
10528 exec_prefix="$acl_save_exec_prefix"
10529 prefix="$acl_save_prefix"
10530
10531 case "$x" in
10532 -L*)
10533 dir=`echo "X$x" | sed -e 's/^X-L//'`
10534 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10535 found_dir="$dir"
10536 found_so="$dir/lib$name.$shlibext"
10537 if test -f "$dir/lib$name.la"; then
10538 found_la="$dir/lib$name.la"
10539 fi
10540 else
10541 if test -f "$dir/lib$name.$libext"; then
10542 found_dir="$dir"
10543 found_a="$dir/lib$name.$libext"
10544 if test -f "$dir/lib$name.la"; then
10545 found_la="$dir/lib$name.la"
10546 fi
10547 fi
10548 fi
10549 ;;
10550 esac
10551 if test "X$found_dir" != "X"; then
10552 break
10553 fi
10554 done
10555 fi
10556 if test "X$found_dir" != "X"; then
10557 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10558 if test "X$found_so" != "X"; then
10559 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10560 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10561 else
10562 haveit=
10563 for x in $ltrpathdirs; do
10564 if test "X$x" = "X$found_dir"; then
10565 haveit=yes
10566 break
10567 fi
10568 done
10569 if test -z "$haveit"; then
10570 ltrpathdirs="$ltrpathdirs $found_dir"
10571 fi
10572 if test "$hardcode_direct" = yes; then
10573 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10574 else
10575 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10576 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10577 haveit=
10578 for x in $rpathdirs; do
10579 if test "X$x" = "X$found_dir"; then
10580 haveit=yes
10581 break
10582 fi
10583 done
10584 if test -z "$haveit"; then
10585 rpathdirs="$rpathdirs $found_dir"
10586 fi
10587 else
10588 haveit=
10589 for x in $LDFLAGS $LIBICONV; do
10590
10591 acl_save_prefix="$prefix"
10592 prefix="$acl_final_prefix"
10593 acl_save_exec_prefix="$exec_prefix"
10594 exec_prefix="$acl_final_exec_prefix"
10595 eval x=\"$x\"
10596 exec_prefix="$acl_save_exec_prefix"
10597 prefix="$acl_save_prefix"
10598
10599 if test "X$x" = "X-L$found_dir"; then
10600 haveit=yes
10601 break
10602 fi
10603 done
10604 if test -z "$haveit"; then
10605 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10606 fi
10607 if test "$hardcode_minus_L" != no; then
10608 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10609 else
10610 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10611 fi
10612 fi
10613 fi
10614 fi
10615 else
10616 if test "X$found_a" != "X"; then
10617 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10618 else
10619 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10620 fi
10621 fi
10622 additional_includedir=
10623 case "$found_dir" in
10624 */lib | */lib/)
10625 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10626 additional_includedir="$basedir/include"
10627 ;;
10628 esac
10629 if test "X$additional_includedir" != "X"; then
10630 if test "X$additional_includedir" != "X/usr/include"; then
10631 haveit=
10632 if test "X$additional_includedir" = "X/usr/local/include"; then
10633 if test -n "$GCC"; then
10634 case $host_os in
10635 linux*) haveit=yes;;
10636 esac
10637 fi
10638 fi
10639 if test -z "$haveit"; then
10640 for x in $CPPFLAGS $INCICONV; do
10641
10642 acl_save_prefix="$prefix"
10643 prefix="$acl_final_prefix"
10644 acl_save_exec_prefix="$exec_prefix"
10645 exec_prefix="$acl_final_exec_prefix"
10646 eval x=\"$x\"
10647 exec_prefix="$acl_save_exec_prefix"
10648 prefix="$acl_save_prefix"
10649
10650 if test "X$x" = "X-I$additional_includedir"; then
10651 haveit=yes
10652 break
10653 fi
10654 done
10655 if test -z "$haveit"; then
10656 if test -d "$additional_includedir"; then
10657 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10658 fi
10659 fi
10660 fi
10661 fi
10662 fi
10663 if test -n "$found_la"; then
10664 save_libdir="$libdir"
10665 case "$found_la" in
10666 */* | *\\*) . "$found_la" ;;
10667 *) . "./$found_la" ;;
10668 esac
10669 libdir="$save_libdir"
10670 for dep in $dependency_libs; do
10671 case "$dep" in
10672 -L*)
10673 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10674 if test "X$additional_libdir" != "X/usr/lib"; then
10675 haveit=
10676 if test "X$additional_libdir" = "X/usr/local/lib"; then
10677 if test -n "$GCC"; then
10678 case $host_os in
10679 linux*) haveit=yes;;
10680 esac
10681 fi
10682 fi
10683 if test -z "$haveit"; then
10684 haveit=
10685 for x in $LDFLAGS $LIBICONV; do
10686
10687 acl_save_prefix="$prefix"
10688 prefix="$acl_final_prefix"
10689 acl_save_exec_prefix="$exec_prefix"
10690 exec_prefix="$acl_final_exec_prefix"
10691 eval x=\"$x\"
10692 exec_prefix="$acl_save_exec_prefix"
10693 prefix="$acl_save_prefix"
10694
10695 if test "X$x" = "X-L$additional_libdir"; then
10696 haveit=yes
10697 break
10698 fi
10699 done
10700 if test -z "$haveit"; then
10701 if test -d "$additional_libdir"; then
10702 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10703 fi
10704 fi
10705 haveit=
10706 for x in $LDFLAGS $LTLIBICONV; do
10707
10708 acl_save_prefix="$prefix"
10709 prefix="$acl_final_prefix"
10710 acl_save_exec_prefix="$exec_prefix"
10711 exec_prefix="$acl_final_exec_prefix"
10712 eval x=\"$x\"
10713 exec_prefix="$acl_save_exec_prefix"
10714 prefix="$acl_save_prefix"
10715
10716 if test "X$x" = "X-L$additional_libdir"; then
10717 haveit=yes
10718 break
10719 fi
10720 done
10721 if test -z "$haveit"; then
10722 if test -d "$additional_libdir"; then
10723 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10724 fi
10725 fi
10726 fi
10727 fi
10728 ;;
10729 -R*)
10730 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10731 if test "$enable_rpath" != no; then
10732 haveit=
10733 for x in $rpathdirs; do
10734 if test "X$x" = "X$dir"; then
10735 haveit=yes
10736 break
10737 fi
10738 done
10739 if test -z "$haveit"; then
10740 rpathdirs="$rpathdirs $dir"
10741 fi
10742 haveit=
10743 for x in $ltrpathdirs; do
10744 if test "X$x" = "X$dir"; then
10745 haveit=yes
10746 break
10747 fi
10748 done
10749 if test -z "$haveit"; then
10750 ltrpathdirs="$ltrpathdirs $dir"
10751 fi
10752 fi
10753 ;;
10754 -l*)
10755 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10756 ;;
10757 *.la)
10758 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10759 ;;
10760 *)
10761 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10762 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10763 ;;
10764 esac
10765 done
10766 fi
10767 else
10768 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10769 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10770 fi
10771 fi
10772 fi
10773 done
10774 done
10775 if test "X$rpathdirs" != "X"; then
10776 if test -n "$hardcode_libdir_separator"; then
10777 alldirs=
10778 for found_dir in $rpathdirs; do
10779 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10780 done
10781 acl_save_libdir="$libdir"
10782 libdir="$alldirs"
10783 eval flag=\"$hardcode_libdir_flag_spec\"
10784 libdir="$acl_save_libdir"
10785 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10786 else
10787 for found_dir in $rpathdirs; do
10788 acl_save_libdir="$libdir"
10789 libdir="$found_dir"
10790 eval flag=\"$hardcode_libdir_flag_spec\"
10791 libdir="$acl_save_libdir"
10792 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10793 done
10794 fi
10795 fi
10796 if test "X$ltrpathdirs" != "X"; then
10797 for found_dir in $ltrpathdirs; do
10798 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10799 done
10800 fi
10801
10802
10803
10804
10805
10806
10807
10808 am_save_CPPFLAGS="$CPPFLAGS"
10809
10810 for element in $INCICONV; do
10811 haveit=
10812 for x in $CPPFLAGS; do
10813
10814 acl_save_prefix="$prefix"
10815 prefix="$acl_final_prefix"
10816 acl_save_exec_prefix="$exec_prefix"
10817 exec_prefix="$acl_final_exec_prefix"
10818 eval x=\"$x\"
10819 exec_prefix="$acl_save_exec_prefix"
10820 prefix="$acl_save_prefix"
10821
10822 if test "X$x" = "X$element"; then
10823 haveit=yes
10824 break
10825 fi
10826 done
10827 if test -z "$haveit"; then
10828 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10829 fi
10830 done
e24cbb01 10831
10832
6a8964db 10833 echo "$as_me:$LINENO: checking for iconv" >&5
10834echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10835if test "${am_cv_func_iconv+set}" = set; then
10836 echo $ECHO_N "(cached) $ECHO_C" >&6
7093ff41 10837else
6a8964db 10838
7093ff41 10839 am_cv_func_iconv="no, consider installing GNU libiconv"
10840 am_cv_lib_iconv=no
6a8964db 10841 cat >conftest.$ac_ext <<_ACEOF
6a8964db 10842/* confdefs.h. */
10843_ACEOF
10844cat confdefs.h >>conftest.$ac_ext
10845cat >>conftest.$ac_ext <<_ACEOF
10846/* end confdefs.h. */
7093ff41 10847#include <stdlib.h>
10848#include <iconv.h>
6a8964db 10849int
10850main ()
10851{
7093ff41 10852iconv_t cd = iconv_open("","");
10853 iconv(cd,NULL,NULL,NULL,NULL);
10854 iconv_close(cd);
6a8964db 10855 ;
10856 return 0;
10857}
10858_ACEOF
10859rm -f conftest.$ac_objext conftest$ac_exeext
10860if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9ebd0bb2 10861 (eval $ac_link) 2>conftest.er1
6a8964db 10862 ac_status=$?
9ebd0bb2 10863 grep -v '^ *+' conftest.er1 >conftest.err
10864 rm -f conftest.er1
10865 cat conftest.err >&5
6a8964db 10866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10867 (exit $ac_status); } &&
c8aeaa6d 10868 { ac_try='test -z "$ac_c_werror_flag"
10869 || test ! -s conftest.err'
9ebd0bb2 10870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10871 (eval $ac_try) 2>&5
10872 ac_status=$?
10873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10874 (exit $ac_status); }; } &&
10875 { ac_try='test -s conftest$ac_exeext'
6a8964db 10876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10877 (eval $ac_try) 2>&5
10878 ac_status=$?
10879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10880 (exit $ac_status); }; }; then
7093ff41 10881 am_cv_func_iconv=yes
10882else
6a8964db 10883 echo "$as_me: failed program was:" >&5
10884sed 's/^/| /' conftest.$ac_ext >&5
10885
7093ff41 10886fi
9ebd0bb2 10887rm -f conftest.err conftest.$ac_objext \
10888 conftest$ac_exeext conftest.$ac_ext
7093ff41 10889 if test "$am_cv_func_iconv" != yes; then
10890 am_save_LIBS="$LIBS"
e5d424c9 10891 LIBS="$LIBS $LIBICONV"
6a8964db 10892 cat >conftest.$ac_ext <<_ACEOF
6a8964db 10893/* confdefs.h. */
10894_ACEOF
10895cat confdefs.h >>conftest.$ac_ext
10896cat >>conftest.$ac_ext <<_ACEOF
10897/* end confdefs.h. */
7093ff41 10898#include <stdlib.h>
10899#include <iconv.h>
6a8964db 10900int
10901main ()
10902{
7093ff41 10903iconv_t cd = iconv_open("","");
10904 iconv(cd,NULL,NULL,NULL,NULL);
10905 iconv_close(cd);
6a8964db 10906 ;
10907 return 0;
10908}
10909_ACEOF
10910rm -f conftest.$ac_objext conftest$ac_exeext
10911if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9ebd0bb2 10912 (eval $ac_link) 2>conftest.er1
6a8964db 10913 ac_status=$?
9ebd0bb2 10914 grep -v '^ *+' conftest.er1 >conftest.err
10915 rm -f conftest.er1
10916 cat conftest.err >&5
6a8964db 10917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10918 (exit $ac_status); } &&
c8aeaa6d 10919 { ac_try='test -z "$ac_c_werror_flag"
10920 || test ! -s conftest.err'
9ebd0bb2 10921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10922 (eval $ac_try) 2>&5
10923 ac_status=$?
10924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10925 (exit $ac_status); }; } &&
10926 { ac_try='test -s conftest$ac_exeext'
6a8964db 10927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10928 (eval $ac_try) 2>&5
10929 ac_status=$?
10930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10931 (exit $ac_status); }; }; then
7093ff41 10932 am_cv_lib_iconv=yes
10933 am_cv_func_iconv=yes
10934else
6a8964db 10935 echo "$as_me: failed program was:" >&5
10936sed 's/^/| /' conftest.$ac_ext >&5
10937
7093ff41 10938fi
9ebd0bb2 10939rm -f conftest.err conftest.$ac_objext \
10940 conftest$ac_exeext conftest.$ac_ext
7093ff41 10941 LIBS="$am_save_LIBS"
10942 fi
c9cd172c 10943
6a8964db 10944fi
10945echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
10946echo "${ECHO_T}$am_cv_func_iconv" >&6
12b432e0 10947 if test "$am_cv_func_iconv" = yes; then
6a8964db 10948
10949cat >>confdefs.h <<\_ACEOF
7093ff41 10950#define HAVE_ICONV 1
6a8964db 10951_ACEOF
7093ff41 10952
e5d424c9 10953 fi
10954 if test "$am_cv_lib_iconv" = yes; then
10955 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
10956echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
10957 echo "$as_me:$LINENO: result: $LIBICONV" >&5
10958echo "${ECHO_T}$LIBICONV" >&6
10959 else
10960 CPPFLAGS="$am_save_CPPFLAGS"
10961 LIBICONV=
10962 LTLIBICONV=
10963 fi
10964
10965
10966
10967 if test "$am_cv_func_iconv" = yes; then
6a8964db 10968 echo "$as_me:$LINENO: checking for iconv declaration" >&5
10969echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
10970 if test "${am_cv_proto_iconv+set}" = set; then
10971 echo $ECHO_N "(cached) $ECHO_C" >&6
7093ff41 10972else
6a8964db 10973
10974 cat >conftest.$ac_ext <<_ACEOF
6a8964db 10975/* confdefs.h. */
10976_ACEOF
10977cat confdefs.h >>conftest.$ac_ext
10978cat >>conftest.$ac_ext <<_ACEOF
10979/* end confdefs.h. */
7093ff41 10980
10981#include <stdlib.h>
10982#include <iconv.h>
10983extern
10984#ifdef __cplusplus
10985"C"
10986#endif
10987#if defined(__STDC__) || defined(__cplusplus)
10988size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10989#else
10990size_t iconv();
10991#endif
10992
6a8964db 10993int
10994main ()
10995{
7093ff41 10996
6a8964db 10997 ;
10998 return 0;
10999}
11000_ACEOF
11001rm -f conftest.$ac_objext
11002if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 11003 (eval $ac_compile) 2>conftest.er1
6a8964db 11004 ac_status=$?
9ebd0bb2 11005 grep -v '^ *+' conftest.er1 >conftest.err
11006 rm -f conftest.er1
11007 cat conftest.err >&5
6a8964db 11008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11009 (exit $ac_status); } &&
c8aeaa6d 11010 { ac_try='test -z "$ac_c_werror_flag"
11011 || test ! -s conftest.err'
9ebd0bb2 11012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11013 (eval $ac_try) 2>&5
11014 ac_status=$?
11015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11016 (exit $ac_status); }; } &&
11017 { ac_try='test -s conftest.$ac_objext'
6a8964db 11018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11019 (eval $ac_try) 2>&5
11020 ac_status=$?
11021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11022 (exit $ac_status); }; }; then
7093ff41 11023 am_cv_proto_iconv_arg1=""
11024else
6a8964db 11025 echo "$as_me: failed program was:" >&5
11026sed 's/^/| /' conftest.$ac_ext >&5
11027
11028am_cv_proto_iconv_arg1="const"
7093ff41 11029fi
9ebd0bb2 11030rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7093ff41 11031 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);"
11032fi
11033
11034 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6a8964db 11035 echo "$as_me:$LINENO: result: ${ac_t:-
11036 }$am_cv_proto_iconv" >&5
11037echo "${ECHO_T}${ac_t:-
11038 }$am_cv_proto_iconv" >&6
11039
11040cat >>confdefs.h <<_ACEOF
7093ff41 11041#define ICONV_CONST $am_cv_proto_iconv_arg1
6a8964db 11042_ACEOF
7093ff41 11043
11044 fi
7093ff41 11045
c6976b58 11046# Until we have in-tree GNU iconv:
11047LIBICONV_DEP=
11048
11049
11050
6a8964db 11051 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11052echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
11053if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11054 echo $ECHO_N "(cached) $ECHO_C" >&6
c6976b58 11055else
6a8964db 11056 cat >conftest.$ac_ext <<_ACEOF
6a8964db 11057/* confdefs.h. */
11058_ACEOF
11059cat confdefs.h >>conftest.$ac_ext
11060cat >>conftest.$ac_ext <<_ACEOF
11061/* end confdefs.h. */
c6976b58 11062#include <locale.h>
6a8964db 11063int
11064main ()
11065{
c6976b58 11066return LC_MESSAGES
6a8964db 11067 ;
11068 return 0;
11069}
11070_ACEOF
11071rm -f conftest.$ac_objext conftest$ac_exeext
11072if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9ebd0bb2 11073 (eval $ac_link) 2>conftest.er1
6a8964db 11074 ac_status=$?
9ebd0bb2 11075 grep -v '^ *+' conftest.er1 >conftest.err
11076 rm -f conftest.er1
11077 cat conftest.err >&5
6a8964db 11078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11079 (exit $ac_status); } &&
c8aeaa6d 11080 { ac_try='test -z "$ac_c_werror_flag"
11081 || test ! -s conftest.err'
9ebd0bb2 11082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11083 (eval $ac_try) 2>&5
11084 ac_status=$?
11085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11086 (exit $ac_status); }; } &&
11087 { ac_try='test -s conftest$ac_exeext'
6a8964db 11088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11089 (eval $ac_try) 2>&5
11090 ac_status=$?
11091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11092 (exit $ac_status); }; }; then
c6976b58 11093 am_cv_val_LC_MESSAGES=yes
11094else
6a8964db 11095 echo "$as_me: failed program was:" >&5
11096sed 's/^/| /' conftest.$ac_ext >&5
11097
11098am_cv_val_LC_MESSAGES=no
c6976b58 11099fi
9ebd0bb2 11100rm -f conftest.err conftest.$ac_objext \
11101 conftest$ac_exeext conftest.$ac_ext
c6976b58 11102fi
6a8964db 11103echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11104echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
12b432e0 11105 if test $am_cv_val_LC_MESSAGES = yes; then
6a8964db 11106
11107cat >>confdefs.h <<\_ACEOF
c6976b58 11108#define HAVE_LC_MESSAGES 1
6a8964db 11109_ACEOF
c6976b58 11110
11111 fi
11112
7093ff41 11113
ac31415f 11114
11115 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11116echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11117if test "${am_cv_langinfo_codeset+set}" = set; then
11118 echo $ECHO_N "(cached) $ECHO_C" >&6
11119else
11120 cat >conftest.$ac_ext <<_ACEOF
11121/* confdefs.h. */
11122_ACEOF
11123cat confdefs.h >>conftest.$ac_ext
11124cat >>conftest.$ac_ext <<_ACEOF
11125/* end confdefs.h. */
11126#include <langinfo.h>
11127int
11128main ()
11129{
11130char* cs = nl_langinfo(CODESET);
11131 ;
11132 return 0;
11133}
11134_ACEOF
11135rm -f conftest.$ac_objext conftest$ac_exeext
11136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11137 (eval $ac_link) 2>conftest.er1
11138 ac_status=$?
11139 grep -v '^ *+' conftest.er1 >conftest.err
11140 rm -f conftest.er1
11141 cat conftest.err >&5
11142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11143 (exit $ac_status); } &&
c8aeaa6d 11144 { ac_try='test -z "$ac_c_werror_flag"
11145 || test ! -s conftest.err'
ac31415f 11146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11147 (eval $ac_try) 2>&5
11148 ac_status=$?
11149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11150 (exit $ac_status); }; } &&
11151 { ac_try='test -s conftest$ac_exeext'
11152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11153 (eval $ac_try) 2>&5
11154 ac_status=$?
11155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11156 (exit $ac_status); }; }; then
11157 am_cv_langinfo_codeset=yes
11158else
11159 echo "$as_me: failed program was:" >&5
11160sed 's/^/| /' conftest.$ac_ext >&5
11161
11162am_cv_langinfo_codeset=no
11163fi
11164rm -f conftest.err conftest.$ac_objext \
11165 conftest$ac_exeext conftest.$ac_ext
11166
11167fi
11168echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11169echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11170 if test $am_cv_langinfo_codeset = yes; then
11171
11172cat >>confdefs.h <<\_ACEOF
11173#define HAVE_LANGINFO_CODESET 1
11174_ACEOF
11175
11176 fi
11177
11178
3c014a93 11179# We will need to find libiberty.h and ansidecl.h
11180saved_CFLAGS="$CFLAGS"
11181CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
599a3eac 11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
31671de5 11203
599a3eac 11204
11205
077a3c99 11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
7e5ef2ef 11216
077a3c99 11217
11218
6f8ecb9e 11219
9b1f316f 11220
11221for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
11222 strsignal strstr strverscmp \
11223 errno snprintf vsnprintf vasprintf malloc realloc calloc \
7e5ef2ef 11224 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 11225do
599a3eac 11226 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
6a8964db 11227echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11228echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11229if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11230 echo $ECHO_N "(cached) $ECHO_C" >&6
11231else
11232 cat >conftest.$ac_ext <<_ACEOF
6a8964db 11233/* confdefs.h. */
11234_ACEOF
11235cat confdefs.h >>conftest.$ac_ext
11236cat >>conftest.$ac_ext <<_ACEOF
11237/* end confdefs.h. */
344c569e 11238#undef $ac_tr_decl
11239#define $ac_tr_decl 1
6a8964db 11240
673b6e5a 11241#include "ansidecl.h"
3c014a93 11242#include "system.h"
07c927cb 11243
6a8964db 11244int
11245main ()
11246{
3c014a93 11247#ifndef $ac_func
11248char *(*pfn) = (char *(*)) $ac_func ;
11249#endif
6a8964db 11250 ;
11251 return 0;
11252}
11253_ACEOF
11254rm -f conftest.$ac_objext
11255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 11256 (eval $ac_compile) 2>conftest.er1
6a8964db 11257 ac_status=$?
9ebd0bb2 11258 grep -v '^ *+' conftest.er1 >conftest.err
11259 rm -f conftest.er1
11260 cat conftest.err >&5
6a8964db 11261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11262 (exit $ac_status); } &&
c8aeaa6d 11263 { ac_try='test -z "$ac_c_werror_flag"
11264 || test ! -s conftest.err'
9ebd0bb2 11265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11266 (eval $ac_try) 2>&5
11267 ac_status=$?
11268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11269 (exit $ac_status); }; } &&
11270 { ac_try='test -s conftest.$ac_objext'
6a8964db 11271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11272 (eval $ac_try) 2>&5
11273 ac_status=$?
11274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11275 (exit $ac_status); }; }; then
07c927cb 11276 eval "gcc_cv_have_decl_$ac_func=yes"
772580ce 11277else
6a8964db 11278 echo "$as_me: failed program was:" >&5
11279sed 's/^/| /' conftest.$ac_ext >&5
11280
11281eval "gcc_cv_have_decl_$ac_func=no"
772580ce 11282fi
9ebd0bb2 11283rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
772580ce 11284fi
11285
07c927cb 11286if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
6a8964db 11287 echo "$as_me:$LINENO: result: yes" >&5
11288echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
3c014a93 11289#define $ac_tr_decl 1
6a8964db 11290_ACEOF
11291
772580ce 11292else
6a8964db 11293 echo "$as_me:$LINENO: result: no" >&5
11294echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
07c927cb 11295#define $ac_tr_decl 0
6a8964db 11296_ACEOF
11297
772580ce 11298fi
11299
11300done
6a8964db 11301
6a8964db 11302
6a8964db 11303
772580ce 11304
772580ce 11305
11306for ac_func in getrlimit setrlimit getrusage
11307do
599a3eac 11308 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
6a8964db 11309echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11310echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11311if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11312 echo $ECHO_N "(cached) $ECHO_C" >&6
11313else
11314 cat >conftest.$ac_ext <<_ACEOF
6a8964db 11315/* confdefs.h. */
11316_ACEOF
11317cat confdefs.h >>conftest.$ac_ext
11318cat >>conftest.$ac_ext <<_ACEOF
11319/* end confdefs.h. */
344c569e 11320#undef $ac_tr_decl
11321#define $ac_tr_decl 1
6a8964db 11322
673b6e5a 11323#include "ansidecl.h"
3c014a93 11324#include "system.h"
772580ce 11325#ifdef HAVE_SYS_RESOURCE_H
11326#include <sys/resource.h>
11327#endif
11328
07c927cb 11329
6a8964db 11330int
11331main ()
11332{
3c014a93 11333#ifndef $ac_func
11334char *(*pfn) = (char *(*)) $ac_func ;
11335#endif
6a8964db 11336 ;
11337 return 0;
11338}
11339_ACEOF
11340rm -f conftest.$ac_objext
11341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 11342 (eval $ac_compile) 2>conftest.er1
6a8964db 11343 ac_status=$?
9ebd0bb2 11344 grep -v '^ *+' conftest.er1 >conftest.err
11345 rm -f conftest.er1
11346 cat conftest.err >&5
6a8964db 11347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11348 (exit $ac_status); } &&
c8aeaa6d 11349 { ac_try='test -z "$ac_c_werror_flag"
11350 || test ! -s conftest.err'
9ebd0bb2 11351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11352 (eval $ac_try) 2>&5
11353 ac_status=$?
11354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11355 (exit $ac_status); }; } &&
11356 { ac_try='test -s conftest.$ac_objext'
6a8964db 11357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11358 (eval $ac_try) 2>&5
11359 ac_status=$?
11360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11361 (exit $ac_status); }; }; then
07c927cb 11362 eval "gcc_cv_have_decl_$ac_func=yes"
772580ce 11363else
6a8964db 11364 echo "$as_me: failed program was:" >&5
11365sed 's/^/| /' conftest.$ac_ext >&5
11366
11367eval "gcc_cv_have_decl_$ac_func=no"
772580ce 11368fi
9ebd0bb2 11369rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
772580ce 11370fi
11371
07c927cb 11372if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
6a8964db 11373 echo "$as_me:$LINENO: result: yes" >&5
11374echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
3c014a93 11375#define $ac_tr_decl 1
6a8964db 11376_ACEOF
11377
772580ce 11378else
6a8964db 11379 echo "$as_me:$LINENO: result: no" >&5
11380echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
07c927cb 11381#define $ac_tr_decl 0
6a8964db 11382_ACEOF
11383
772580ce 11384fi
11385
11386done
3c014a93 11387
772580ce 11388
6a8964db 11389cat >conftest.$ac_ext <<_ACEOF
6a8964db 11390/* confdefs.h. */
11391_ACEOF
11392cat confdefs.h >>conftest.$ac_ext
11393cat >>conftest.$ac_ext <<_ACEOF
11394/* end confdefs.h. */
c1b9d008 11395
11396#include "ansidecl.h"
11397#include "system.h"
11398#ifdef HAVE_SYS_RESOURCE_H
11399#include <sys/resource.h>
11400#endif
11401
6a8964db 11402int
11403main ()
11404{
c1b9d008 11405rlim_t l = 0;
6a8964db 11406 ;
11407 return 0;
11408}
11409_ACEOF
11410rm -f conftest.$ac_objext
11411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 11412 (eval $ac_compile) 2>conftest.er1
6a8964db 11413 ac_status=$?
9ebd0bb2 11414 grep -v '^ *+' conftest.er1 >conftest.err
11415 rm -f conftest.er1
11416 cat conftest.err >&5
6a8964db 11417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11418 (exit $ac_status); } &&
c8aeaa6d 11419 { ac_try='test -z "$ac_c_werror_flag"
11420 || test ! -s conftest.err'
9ebd0bb2 11421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11422 (eval $ac_try) 2>&5
11423 ac_status=$?
11424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11425 (exit $ac_status); }; } &&
11426 { ac_try='test -s conftest.$ac_objext'
6a8964db 11427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11428 (eval $ac_try) 2>&5
11429 ac_status=$?
11430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11431 (exit $ac_status); }; }; then
c1b9d008 11432 :
11433else
6a8964db 11434 echo "$as_me: failed program was:" >&5
11435sed 's/^/| /' conftest.$ac_ext >&5
11436
11437
11438cat >>confdefs.h <<\_ACEOF
c1b9d008 11439#define rlim_t long
6a8964db 11440_ACEOF
c1b9d008 11441
11442fi
9ebd0bb2 11443rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1b9d008 11444
d71e0d30 11445# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11446# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11447# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11448# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
599a3eac 11449
31a83412 11450for ac_func in ldgetname
c770a4cb 11451do
599a3eac 11452 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
6a8964db 11453echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11454echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11455if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11456 echo $ECHO_N "(cached) $ECHO_C" >&6
11457else
11458 cat >conftest.$ac_ext <<_ACEOF
6a8964db 11459/* confdefs.h. */
11460_ACEOF
11461cat confdefs.h >>conftest.$ac_ext
11462cat >>conftest.$ac_ext <<_ACEOF
11463/* end confdefs.h. */
c770a4cb 11464#undef $ac_tr_decl
11465#define $ac_tr_decl 1
6a8964db 11466
31a83412 11467#include "ansidecl.h"
11468#include "system.h"
11469#ifdef HAVE_LDFCN_H
d71e0d30 11470#undef FREAD
11471#undef FWRITE
31a83412 11472#include <ldfcn.h>
11473#endif
11474
11475
6a8964db 11476int
11477main ()
11478{
31a83412 11479#ifndef $ac_func
11480char *(*pfn) = (char *(*)) $ac_func ;
11481#endif
6a8964db 11482 ;
11483 return 0;
11484}
11485_ACEOF
11486rm -f conftest.$ac_objext
11487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 11488 (eval $ac_compile) 2>conftest.er1
6a8964db 11489 ac_status=$?
9ebd0bb2 11490 grep -v '^ *+' conftest.er1 >conftest.err
11491 rm -f conftest.er1
11492 cat conftest.err >&5
6a8964db 11493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11494 (exit $ac_status); } &&
c8aeaa6d 11495 { ac_try='test -z "$ac_c_werror_flag"
11496 || test ! -s conftest.err'
9ebd0bb2 11497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11498 (eval $ac_try) 2>&5
11499 ac_status=$?
11500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11501 (exit $ac_status); }; } &&
11502 { ac_try='test -s conftest.$ac_objext'
6a8964db 11503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11504 (eval $ac_try) 2>&5
11505 ac_status=$?
11506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11507 (exit $ac_status); }; }; then
31a83412 11508 eval "gcc_cv_have_decl_$ac_func=yes"
11509else
6a8964db 11510 echo "$as_me: failed program was:" >&5
11511sed 's/^/| /' conftest.$ac_ext >&5
11512
11513eval "gcc_cv_have_decl_$ac_func=no"
31a83412 11514fi
9ebd0bb2 11515rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
31a83412 11516fi
11517
11518if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
6a8964db 11519 echo "$as_me:$LINENO: result: yes" >&5
11520echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
31a83412 11521#define $ac_tr_decl 1
6a8964db 11522_ACEOF
11523
31a83412 11524else
6a8964db 11525 echo "$as_me:$LINENO: result: no" >&5
11526echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
31a83412 11527#define $ac_tr_decl 0
6a8964db 11528_ACEOF
11529
31a83412 11530fi
11531
11532done
6a8964db 11533
31a83412 11534
11535
11536for ac_func in times
11537do
599a3eac 11538 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
6a8964db 11539echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11540echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11541if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11542 echo $ECHO_N "(cached) $ECHO_C" >&6
11543else
11544 cat >conftest.$ac_ext <<_ACEOF
6a8964db 11545/* confdefs.h. */
11546_ACEOF
11547cat confdefs.h >>conftest.$ac_ext
11548cat >>conftest.$ac_ext <<_ACEOF
11549/* end confdefs.h. */
31a83412 11550#undef $ac_tr_decl
11551#define $ac_tr_decl 1
6a8964db 11552
c770a4cb 11553#include "ansidecl.h"
11554#include "system.h"
11555#ifdef HAVE_SYS_TIMES_H
11556#include <sys/times.h>
11557#endif
11558
11559
6a8964db 11560int
11561main ()
11562{
c770a4cb 11563#ifndef $ac_func
11564char *(*pfn) = (char *(*)) $ac_func ;
11565#endif
6a8964db 11566 ;
11567 return 0;
11568}
11569_ACEOF
11570rm -f conftest.$ac_objext
11571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 11572 (eval $ac_compile) 2>conftest.er1
6a8964db 11573 ac_status=$?
9ebd0bb2 11574 grep -v '^ *+' conftest.er1 >conftest.err
11575 rm -f conftest.er1
11576 cat conftest.err >&5
6a8964db 11577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11578 (exit $ac_status); } &&
c8aeaa6d 11579 { ac_try='test -z "$ac_c_werror_flag"
11580 || test ! -s conftest.err'
9ebd0bb2 11581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11582 (eval $ac_try) 2>&5
11583 ac_status=$?
11584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11585 (exit $ac_status); }; } &&
11586 { ac_try='test -s conftest.$ac_objext'
6a8964db 11587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11588 (eval $ac_try) 2>&5
11589 ac_status=$?
11590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11591 (exit $ac_status); }; }; then
c770a4cb 11592 eval "gcc_cv_have_decl_$ac_func=yes"
11593else
6a8964db 11594 echo "$as_me: failed program was:" >&5
11595sed 's/^/| /' conftest.$ac_ext >&5
11596
11597eval "gcc_cv_have_decl_$ac_func=no"
c770a4cb 11598fi
9ebd0bb2 11599rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c770a4cb 11600fi
11601
11602if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
6a8964db 11603 echo "$as_me:$LINENO: result: yes" >&5
11604echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c770a4cb 11605#define $ac_tr_decl 1
6a8964db 11606_ACEOF
11607
c770a4cb 11608else
6a8964db 11609 echo "$as_me:$LINENO: result: no" >&5
11610echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c770a4cb 11611#define $ac_tr_decl 0
6a8964db 11612_ACEOF
11613
c770a4cb 11614fi
11615
11616done
c770a4cb 11617
11618
11619# More time-related stuff.
6a8964db 11620echo "$as_me:$LINENO: checking for struct tms" >&5
11621echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
11622if test "${ac_cv_struct_tms+set}" = set; then
11623 echo $ECHO_N "(cached) $ECHO_C" >&6
11624else
11625
11626cat >conftest.$ac_ext <<_ACEOF
6a8964db 11627/* confdefs.h. */
11628_ACEOF
11629cat confdefs.h >>conftest.$ac_ext
11630cat >>conftest.$ac_ext <<_ACEOF
11631/* end confdefs.h. */
c770a4cb 11632
11633#include "ansidecl.h"
11634#include "system.h"
11635#ifdef HAVE_SYS_TIMES_H
11636#include <sys/times.h>
11637#endif
11638
6a8964db 11639int
11640main ()
11641{
c770a4cb 11642struct tms tms;
6a8964db 11643 ;
11644 return 0;
11645}
11646_ACEOF
11647rm -f conftest.$ac_objext
11648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 11649 (eval $ac_compile) 2>conftest.er1
6a8964db 11650 ac_status=$?
9ebd0bb2 11651 grep -v '^ *+' conftest.er1 >conftest.err
11652 rm -f conftest.er1
11653 cat conftest.err >&5
6a8964db 11654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11655 (exit $ac_status); } &&
c8aeaa6d 11656 { ac_try='test -z "$ac_c_werror_flag"
11657 || test ! -s conftest.err'
9ebd0bb2 11658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11659 (eval $ac_try) 2>&5
11660 ac_status=$?
11661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11662 (exit $ac_status); }; } &&
11663 { ac_try='test -s conftest.$ac_objext'
6a8964db 11664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11665 (eval $ac_try) 2>&5
11666 ac_status=$?
11667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11668 (exit $ac_status); }; }; then
c770a4cb 11669 ac_cv_struct_tms=yes
11670else
6a8964db 11671 echo "$as_me: failed program was:" >&5
11672sed 's/^/| /' conftest.$ac_ext >&5
11673
11674ac_cv_struct_tms=no
c770a4cb 11675fi
9ebd0bb2 11676rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c770a4cb 11677fi
6a8964db 11678echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11679echo "${ECHO_T}$ac_cv_struct_tms" >&6
12b432e0 11680if test $ac_cv_struct_tms = yes; then
6a8964db 11681
11682cat >>confdefs.h <<\_ACEOF
c770a4cb 11683#define HAVE_STRUCT_TMS 1
6a8964db 11684_ACEOF
c770a4cb 11685
11686fi
11687
11688# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11689# revisit after autoconf 2.50.
6a8964db 11690echo "$as_me:$LINENO: checking for clock_t" >&5
11691echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
11692if test "${gcc_cv_type_clock_t+set}" = set; then
11693 echo $ECHO_N "(cached) $ECHO_C" >&6
11694else
11695
11696cat >conftest.$ac_ext <<_ACEOF
6a8964db 11697/* confdefs.h. */
11698_ACEOF
11699cat confdefs.h >>conftest.$ac_ext
11700cat >>conftest.$ac_ext <<_ACEOF
11701/* end confdefs.h. */
c770a4cb 11702
11703#include "ansidecl.h"
11704#include "system.h"
11705
6a8964db 11706int
11707main ()
11708{
c770a4cb 11709clock_t x;
6a8964db 11710 ;
11711 return 0;
11712}
11713_ACEOF
11714rm -f conftest.$ac_objext
11715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 11716 (eval $ac_compile) 2>conftest.er1
6a8964db 11717 ac_status=$?
9ebd0bb2 11718 grep -v '^ *+' conftest.er1 >conftest.err
11719 rm -f conftest.er1
11720 cat conftest.err >&5
6a8964db 11721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11722 (exit $ac_status); } &&
c8aeaa6d 11723 { ac_try='test -z "$ac_c_werror_flag"
11724 || test ! -s conftest.err'
9ebd0bb2 11725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11726 (eval $ac_try) 2>&5
11727 ac_status=$?
11728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11729 (exit $ac_status); }; } &&
11730 { ac_try='test -s conftest.$ac_objext'
6a8964db 11731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11732 (eval $ac_try) 2>&5
11733 ac_status=$?
11734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11735 (exit $ac_status); }; }; then
c770a4cb 11736 gcc_cv_type_clock_t=yes
11737else
6a8964db 11738 echo "$as_me: failed program was:" >&5
11739sed 's/^/| /' conftest.$ac_ext >&5
11740
11741gcc_cv_type_clock_t=no
c770a4cb 11742fi
9ebd0bb2 11743rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c770a4cb 11744fi
6a8964db 11745echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
11746echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
12b432e0 11747if test $gcc_cv_type_clock_t = yes; then
6a8964db 11748
11749cat >>confdefs.h <<\_ACEOF
c770a4cb 11750#define HAVE_CLOCK_T 1
6a8964db 11751_ACEOF
c770a4cb 11752
11753fi
11754
24d1674d 11755# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
11756CFLAGS="$saved_CFLAGS"
11757
5646395d 11758# Check whether --enable-initfini-array or --disable-initfini-array was given.
11759if test "${enable_initfini_array+set}" = set; then
11760 enableval="$enable_initfini_array"
6a8964db 11761
5646395d 11762else
6a8964db 11763
11764echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
11765echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
11766if test "${gcc_cv_initfini_array+set}" = set; then
11767 echo $ECHO_N "(cached) $ECHO_C" >&6
5646395d 11768else
24d1674d 11769 if test "$cross_compiling" = yes; then
d8ea82e6 11770 gcc_cv_initfini_array=no
24d1674d 11771else
6a8964db 11772 cat >conftest.$ac_ext <<_ACEOF
6a8964db 11773/* confdefs.h. */
11774_ACEOF
11775cat confdefs.h >>conftest.$ac_ext
11776cat >>conftest.$ac_ext <<_ACEOF
11777/* end confdefs.h. */
24d1674d 11778
5646395d 11779static int x = -1;
11780int main (void) { return x; }
11781int foo (void) { x = 0; }
11782int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
6a8964db 11783_ACEOF
11784rm -f conftest$ac_exeext
11785if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11786 (eval $ac_link) 2>&5
11787 ac_status=$?
11788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11789 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11791 (eval $ac_try) 2>&5
11792 ac_status=$?
11793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11794 (exit $ac_status); }; }; then
d8ea82e6 11795 gcc_cv_initfini_array=yes
24d1674d 11796else
6a8964db 11797 echo "$as_me: program exited with status $ac_status" >&5
11798echo "$as_me: failed program was:" >&5
11799sed 's/^/| /' conftest.$ac_ext >&5
11800
11801( exit $ac_status )
11802gcc_cv_initfini_array=no
24d1674d 11803fi
9ebd0bb2 11804rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24d1674d 11805fi
5646395d 11806fi
6a8964db 11807echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
11808echo "${ECHO_T}$gcc_cv_initfini_array" >&6
24d1674d 11809 enable_initfini_array=$gcc_cv_initfini_array
5646395d 11810
6a8964db 11811fi;
12b432e0 11812if test $enable_initfini_array = yes; then
6a8964db 11813
11814cat >>confdefs.h <<\_ACEOF
24d1674d 11815#define HAVE_INITFINI_ARRAY 1
6a8964db 11816_ACEOF
5646395d 11817
24d1674d 11818fi
772580ce 11819
6a8964db 11820# mkdir takes a single argument on some systems.
11821echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
11822echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
11823if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
11824 echo $ECHO_N "(cached) $ECHO_C" >&6
a729d1c3 11825else
6a8964db 11826 cat >conftest.$ac_ext <<_ACEOF
6a8964db 11827/* confdefs.h. */
11828_ACEOF
11829cat confdefs.h >>conftest.$ac_ext
11830cat >>conftest.$ac_ext <<_ACEOF
11831/* end confdefs.h. */
a729d1c3 11832
11833#include <sys/types.h>
11834#ifdef HAVE_SYS_STAT_H
11835# include <sys/stat.h>
11836#endif
11837#ifdef HAVE_UNISTD_H
11838# include <unistd.h>
11839#endif
11840#ifdef HAVE_DIRECT_H
11841# include <direct.h>
11842#endif
6a8964db 11843int
11844main ()
11845{
a729d1c3 11846mkdir ("foo", 0);
6a8964db 11847 ;
11848 return 0;
11849}
11850_ACEOF
11851rm -f conftest.$ac_objext
11852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9ebd0bb2 11853 (eval $ac_compile) 2>conftest.er1
6a8964db 11854 ac_status=$?
9ebd0bb2 11855 grep -v '^ *+' conftest.er1 >conftest.err
11856 rm -f conftest.er1
11857 cat conftest.err >&5
6a8964db 11858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11859 (exit $ac_status); } &&
c8aeaa6d 11860 { ac_try='test -z "$ac_c_werror_flag"
11861 || test ! -s conftest.err'
9ebd0bb2 11862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11863 (eval $ac_try) 2>&5
11864 ac_status=$?
11865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11866 (exit $ac_status); }; } &&
11867 { ac_try='test -s conftest.$ac_objext'
6a8964db 11868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11869 (eval $ac_try) 2>&5
11870 ac_status=$?
11871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11872 (exit $ac_status); }; }; then
a729d1c3 11873 gcc_cv_mkdir_takes_one_arg=no
11874else
6a8964db 11875 echo "$as_me: failed program was:" >&5
11876sed 's/^/| /' conftest.$ac_ext >&5
11877
11878gcc_cv_mkdir_takes_one_arg=yes
a729d1c3 11879fi
9ebd0bb2 11880rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a729d1c3 11881fi
6a8964db 11882echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
11883echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
12b432e0 11884if test $gcc_cv_mkdir_takes_one_arg = yes ; then
6a8964db 11885
11886cat >>confdefs.h <<\_ACEOF
a729d1c3 11887#define MKDIR_TAKES_ONE_ARG 1
6a8964db 11888_ACEOF
a729d1c3 11889
11890fi
11891
11892
071cd279 11893# File extensions
11894manext='.1'
11895objext='.o'
11896
11897
11898
805e22b2 11899# With Setjmp/Longjmp based exception handling.
11900# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
11901if test "${enable_sjlj_exceptions+set}" = set; then
11902 enableval="$enable_sjlj_exceptions"
11903 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
12b432e0 11904
6a8964db 11905cat >>confdefs.h <<_ACEOF
11906#define CONFIG_SJLJ_EXCEPTIONS $sjlj
11907_ACEOF
805e22b2 11908
6a8964db 11909fi;
805e22b2 11910
8bdf23ae 11911# For platforms with the unwind ABI which includes an unwind library,
11912# libunwind, we can choose to use the system libunwind.
805e22b2 11913
8bdf23ae 11914# Check whether --with-system-libunwind or --without-system-libunwind was given.
11915if test "${with_system_libunwind+set}" = set; then
11916 withval="$with_system_libunwind"
805e22b2 11917
6a8964db 11918fi;
805e22b2 11919
7349ace9 11920# --------------------------------------------------------
11921# Build, host, and target specific configuration fragments
11922# --------------------------------------------------------
11923
eab1a815 11924# Collect build-machine-specific information.
11925. ${srcdir}/config.build
11926
973f8bf3 11927# Collect host-machine-specific information.
11928. ${srcdir}/config.host
11929
eb1bd38b 11930target_gtfiles=
973f8bf3 11931
11932# Collect target-machine-specific information.
2333aa54 11933. ${srcdir}/config.gcc
071cd279 11934
11935extra_objs="${host_extra_objs} ${extra_objs}"
69eb04f7 11936extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
071cd279 11937
11938# Default the target-machine variables that were not explicitly set.
bf3637a9 11939if test x"$tm_file" = x
071cd279 11940then tm_file=$cpu_type/$cpu_type.h; fi
11941
2a8be21e 11942if test x"$extra_headers" = x
071cd279 11943then extra_headers=; fi
11944
bf3637a9 11945if test x$md_file = x
0579e60e 11946then md_file=$cpu_type/$cpu_type.md; fi
071cd279 11947
bf3637a9 11948if test x$out_file = x
071cd279 11949then out_file=$cpu_type/$cpu_type.c; fi
11950
bf3637a9 11951if test x"$tmake_file" = x
071cd279 11952then tmake_file=$cpu_type/t-$cpu_type
11953fi
11954
27b15aee 11955if test x"$dwarf2" = xyes
b65d2e3c 11956then tm_file="$tm_file tm-dwarf2.h"
27b15aee 11957fi
11958
071cd279 11959# Say what files are being used for the output code and MD file.
83b8e55b 11960echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
071cd279 11961echo "Using \`$srcdir/config/$md_file' as machine description file."
11962
83b8e55b 11963# If any of the xm_file variables contain nonexistent files, warn
e1688c3e 11964# about them and drop them.
11965
83b8e55b 11966bx=
11967for x in $build_xm_file; do
11968 if test -f $srcdir/config/$x
11969 then bx="$bx $x"
6a8964db 11970 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11971echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
83b8e55b 11972 fi
11973done
11974build_xm_file="$bx"
11975
11976hx=
11977for x in $host_xm_file; do
11978 if test -f $srcdir/config/$x
11979 then hx="$hx $x"
6a8964db 11980 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11981echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
83b8e55b 11982 fi
11983done
11984host_xm_file="$hx"
11985
11986tx=
11987for x in $xm_file; do
11988 if test -f $srcdir/config/$x
11989 then tx="$tx $x"
6a8964db 11990 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11991echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
83b8e55b 11992 fi
11993done
11994xm_file="$tx"
11995
071cd279 11996count=a
11997for f in $tm_file; do
11998 count=${count}x
11999done
bf3637a9 12000if test $count = ax; then
071cd279 12001 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
12002else
12003 echo "Using the following target machine macro files:"
12004 for f in $tm_file; do
12005 echo " $srcdir/config/$f"
12006 done
12007fi
12008
805e22b2 12009if test x$need_64bit_hwint = xyes; then
6a8964db 12010
12011cat >>confdefs.h <<\_ACEOF
805e22b2 12012#define NEED_64BIT_HOST_WIDE_INT 1
6a8964db 12013_ACEOF
805e22b2 12014
12015fi
12016
3f28a032 12017if test x$use_long_long_for_widest_fast_int = xyes; then
12018
12019cat >>confdefs.h <<\_ACEOF
12020#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12021_ACEOF
12022
12023fi
12024
071cd279 12025count=a
12026for f in $host_xm_file; do
12027 count=${count}x
12028done
83b8e55b 12029if test $count = a; then
12030 :
12031elif test $count = ax; then
071cd279 12032 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12033else
12034 echo "Using the following host machine macro files:"
12035 for f in $host_xm_file; do
12036 echo " $srcdir/config/$f"
12037 done
12038fi
b197fbcf 12039echo "Using ${out_host_hook_obj} for host machine hooks."
071cd279 12040
bf3637a9 12041if test "$host_xm_file" != "$build_xm_file"; then
071cd279 12042 count=a
12043 for f in $build_xm_file; do
12044 count=${count}x
12045 done
83b8e55b 12046 if test $count = a; then
12047 :
12048 elif test $count = ax; then
071cd279 12049 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12050 else
12051 echo "Using the following build machine macro files:"
12052 for f in $build_xm_file; do
12053 echo " $srcdir/config/$f"
12054 done
12055 fi
12056fi
12057
d976f534 12058# ---------
12059# Threading
12060# ---------
12061
267d993c 12062# Check if a valid thread package
334c8279 12063case ${enable_threads} in
267d993c 12064 "" | no)
12065 # No threads
12066 target_thread_file='single'
12067 ;;
12068 yes)
12069 # default
12070 target_thread_file='single'
12071 ;;
8fde03ba 12072 aix | dce | gnat | irix | posix | posix95 | rtems | \
5614d3f5 12073 single | solaris | vxworks | win32 )
334c8279 12074 target_thread_file=${enable_threads}
267d993c 12075 ;;
12076 *)
334c8279 12077 echo "${enable_threads} is an unknown thread package" 1>&2
267d993c 12078 exit 1
12079 ;;
12080esac
12081
12082if test x${thread_file} = x; then
12083 # No thread file set by target-specific clauses in config.gcc,
12084 # so use file chosen by default logic above
12085 thread_file=${target_thread_file}
071cd279 12086fi
12087
d976f534 12088# Make gthr-default.h if we have a thread file.
12089gthread_flags=
12090if test $thread_file != single; then
12091 rm -f gthr-default.h
12092 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12093 gthread_flags=-DHAVE_GTHR_DEFAULT
12094fi
12095
12096
12097# --------
12098# UNSORTED
12099# --------
12100
d9ab9cb9 12101use_cxa_atexit=no
bc5ae993 12102if test x$enable___cxa_atexit = xyes || \
12103 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
d9ab9cb9 12104 if test x$host = x$target; then
12105 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
e4a013de 12106echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
12107if test "${ac_cv_func___cxa_atexit+set}" = set; then
12108 echo $ECHO_N "(cached) $ECHO_C" >&6
12109else
12110 cat >conftest.$ac_ext <<_ACEOF
e4a013de 12111/* confdefs.h. */
12112_ACEOF
12113cat confdefs.h >>conftest.$ac_ext
12114cat >>conftest.$ac_ext <<_ACEOF
12115/* end confdefs.h. */
9ebd0bb2 12116/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12117 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12118#define __cxa_atexit innocuous___cxa_atexit
12119
e4a013de 12120/* System header to define __stub macros and hopefully few prototypes,
12121 which can conflict with char __cxa_atexit (); below.
12122 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12123 <limits.h> exists even on freestanding compilers. */
9ebd0bb2 12124
e4a013de 12125#ifdef __STDC__
12126# include <limits.h>
12127#else
12128# include <assert.h>
12129#endif
9ebd0bb2 12130
12131#undef __cxa_atexit
12132
e4a013de 12133/* Override any gcc2 internal prototype to avoid an error. */
12134#ifdef __cplusplus
12135extern "C"
12136{
12137#endif
12138/* We use char because int might match the return type of a gcc2
12139 builtin and then its argument prototype would still apply. */
12140char __cxa_atexit ();
12141/* The GNU C library defines this for functions which it implements
12142 to always fail with ENOSYS. Some functions are actually named
12143 something starting with __ and the normal name is an alias. */
12144#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
12145choke me
12146#else
12147char (*f) () = __cxa_atexit;
12148#endif
12149#ifdef __cplusplus
12150}
12151#endif
12152
12153int
12154main ()
12155{
12156return f != __cxa_atexit;
12157 ;
12158 return 0;
12159}
12160_ACEOF
12161rm -f conftest.$ac_objext conftest$ac_exeext
12162if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9ebd0bb2 12163 (eval $ac_link) 2>conftest.er1
e4a013de 12164 ac_status=$?
9ebd0bb2 12165 grep -v '^ *+' conftest.er1 >conftest.err
12166 rm -f conftest.er1
12167 cat conftest.err >&5
e4a013de 12168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12169 (exit $ac_status); } &&
c8aeaa6d 12170 { ac_try='test -z "$ac_c_werror_flag"
12171 || test ! -s conftest.err'
9ebd0bb2 12172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12173 (eval $ac_try) 2>&5
12174 ac_status=$?
12175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12176 (exit $ac_status); }; } &&
12177 { ac_try='test -s conftest$ac_exeext'
e4a013de 12178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12179 (eval $ac_try) 2>&5
12180 ac_status=$?
12181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12182 (exit $ac_status); }; }; then
12183 ac_cv_func___cxa_atexit=yes
12184else
12185 echo "$as_me: failed program was:" >&5
12186sed 's/^/| /' conftest.$ac_ext >&5
12187
12188ac_cv_func___cxa_atexit=no
12189fi
9ebd0bb2 12190rm -f conftest.err conftest.$ac_objext \
12191 conftest$ac_exeext conftest.$ac_ext
e4a013de 12192fi
12193echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12194echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
12195if test $ac_cv_func___cxa_atexit = yes; then
d9ab9cb9 12196 use_cxa_atexit=yes
12197else
12198 echo "__cxa_atexit can't be enabled on this target"
12199fi
12200
12201 else
12202 # We can't check for __cxa_atexit when building a cross, so assume
12203 # it is available
12204 use_cxa_atexit=yes
12205 fi
12206 if test x$use_cxa_atexit = xyes; then
6a8964db 12207
12208cat >>confdefs.h <<\_ACEOF
bc5ae993 12209#define DEFAULT_USE_CXA_ATEXIT 1
6a8964db 12210_ACEOF
bc5ae993 12211
d9ab9cb9 12212 fi
bc5ae993 12213fi
12214
6f432b58 12215# Look for a file containing extra machine modes.
b5ccaa7b 12216if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12217 extra_modes_file='$(srcdir)'/config/${extra_modes}
6a8964db 12218
12219
12220cat >>confdefs.h <<_ACEOF
4dcab8b7 12221#define EXTRA_MODES_FILE "config/$extra_modes"
6a8964db 12222_ACEOF
6f432b58 12223
12224fi
12225
ff05e09e 12226# Convert extra_options into a form suitable for Makefile use.
12227extra_opt_files=
12228for f in $extra_options; do
12229 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12230done
12231
12232
764fc592 12233# auto-host.h is the file containing items generated by autoconf and is
0dbd1c74 12234# the first file included by config.h.
805e22b2 12235# If host=build, it is correct to have bconfig include auto-host.h
6a8964db 12236# as well. If host!=build, we are in error and need to do more
58b16c1a 12237# work to find out the build config parameters.
bf3637a9 12238if test x$host = x$build
58b16c1a 12239then
d826737c 12240 build_auto=auto-host.h
764fc592 12241else
12242 # We create a subdir, then run autoconf in the subdir.
12243 # To prevent recursion we set host and build for the new
12244 # invocation of configure to the build for this invocation
6a8964db 12245 # of configure.
764fc592 12246 tempdir=build.$$
12247 rm -rf $tempdir
12248 mkdir $tempdir
12249 cd $tempdir
12250 case ${srcdir} in
f9a8e1cd 12251 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
764fc592 12252 *) realsrcdir=../${srcdir};;
12253 esac
fc5104b7 12254 saved_CFLAGS="${CFLAGS}"
12255 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12256 ${realsrcdir}/configure \
1f3fcf32 12257 --enable-languages=${enable_languages-all} \
ab3470ec 12258 --target=$target_alias --host=$build_alias --build=$build_alias
fc5104b7 12259 CFLAGS="${saved_CFLAGS}"
764fc592 12260
12261 # We just finished tests for the build machine, so rename
12262 # the file auto-build.h in the gcc directory.
12263 mv auto-host.h ../auto-build.h
12264 cd ..
12265 rm -rf $tempdir
d826737c 12266 build_auto=auto-build.h
58b16c1a 12267fi
12268
883c44aa 12269
d826737c 12270tm_file="${tm_file} defaults.h"
805e22b2 12271tm_p_file="${tm_p_file} tm-preds.h"
12272host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12273build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
4b0e3ddb 12274# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
18320123 12275# put this back in temporarily.
fcd42b1e 12276xm_file="auto-host.h ansidecl.h ${xm_file}"
4a7d7a8b 12277
7349ace9 12278# --------
12279# UNSORTED
12280# --------
12281
9371935c 12282# Compile in configure arguments.
6e11eb2c 12283if test -f configargs.h ; then
9371935c 12284 # Being re-configured.
8bffa377 12285 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
9371935c 12286 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12287else
12288 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12289fi
5df533c9 12290
12291# Double all backslashes and backslash all quotes to turn
12292# gcc_config_arguments into a C string.
12293sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12294$gcc_config_arguments
12295EOF
12296gcc_config_arguments_str=`cat conftest.out`
12297rm -f conftest.out
12298
9371935c 12299cat > configargs.h <<EOF
12300/* Generated automatically. */
5df533c9 12301static const char configuration_arguments[] = "$gcc_config_arguments_str";
6d72c630 12302static const char thread_model[] = "$thread_file";
7dd97ab6 12303
12304static const struct {
12305 const char *name, *value;
12306} configure_default_options[] = $configure_default_options;
9371935c 12307EOF
12308
be2828ce 12309# Internationalization
c6976b58 12310# If we haven't got the data from the intl directory,
12311# assume NLS is disabled.
6a8964db 12312USE_NLS=no
12313LIBINTL=
12314LIBINTL_DEP=
12315INCINTL=
12316XGETTEXT=
12317GMSGFMT=
12318POSUB=
c6976b58 12319if test -f ../intl/config.intl; then
12320 . ../intl/config.intl
9af7c2e2 12321fi
6a8964db 12322echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12323echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
c6976b58 12324if test x"$USE_NLS" != xyes; then
6a8964db 12325 echo "$as_me:$LINENO: result: no" >&5
12326echo "${ECHO_T}no" >&6
c6976b58 12327else
6a8964db 12328 echo "$as_me:$LINENO: result: yes" >&5
12329echo "${ECHO_T}yes" >&6
12330
12331cat >>confdefs.h <<\_ACEOF
c6976b58 12332#define ENABLE_NLS 1
6a8964db 12333_ACEOF
c6976b58 12334
9af7c2e2 12335
6a8964db 12336 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12337echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
c6976b58 12338 # Look for .po and .gmo files in the source directory.
6a8964db 12339 CATALOGS=
c6976b58 12340 XLINGUAS=
12341 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12342 # If there aren't any .gmo files the shell will give us the
12343 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12344 # weeded out.
12345 case "$cat" in *\**)
12346 continue;;
12347 esac
12348 # The quadruple backslash is collapsed to a double backslash
12349 # by the backticks, then collapsed again by the double quotes,
12350 # leaving us with one backslash in the sed expression (right
12351 # before the dot that mustn't act as a wildcard).
12352 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
12353 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
12354 # The user is allowed to set LINGUAS to a list of languages to
12355 # install catalogs for. If it's empty that means "all of them."
12356 if test "x$LINGUAS" = x; then
12357 CATALOGS="$CATALOGS $cat"
12358 XLINGUAS="$XLINGUAS $lang"
12359 else
12360 case "$LINGUAS" in *$lang*)
12361 CATALOGS="$CATALOGS $cat"
12362 XLINGUAS="$XLINGUAS $lang"
12363 ;;
12364 esac
12365 fi
12366 done
12367 LINGUAS="$XLINGUAS"
6a8964db 12368 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12369echo "${ECHO_T}$LINGUAS" >&6
c6976b58 12370fi
071cd279 12371
c6976b58 12372# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12373# -liconv on the link line twice.
12374case "$LIBINTL" in *$LIBICONV*)
12375 LIBICONV= ;;
12376esac
c5ab9ed2 12377
197f58fa 12378# Check whether --enable-secureplt or --disable-secureplt was given.
12379if test "${enable_secureplt+set}" = set; then
12380 enableval="$enable_secureplt"
12381
12382fi;
12383
c6976b58 12384# Windows32 Registry support for specifying GCC installation paths.
12385# Check whether --enable-win32-registry or --disable-win32-registry was given.
12386if test "${enable_win32_registry+set}" = set; then
12387 enableval="$enable_win32_registry"
c5ab9ed2 12388
6a8964db 12389fi;
6a8964db 12390
1af67e62 12391case $host_os in
12392 win32 | pe | cygwin* | mingw32* | uwin*)
12393 if test "x$enable_win32_registry" != xno; then
12394 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
6a8964db 12395echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
12396if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12397 echo $ECHO_N "(cached) $ECHO_C" >&6
12398else
12399 ac_func_search_save_LIBS=$LIBS
12400ac_cv_search_RegOpenKeyExA=no
12401cat >conftest.$ac_ext <<_ACEOF
6a8964db 12402/* confdefs.h. */
12403_ACEOF
12404cat confdefs.h >>conftest.$ac_ext
12405cat >>conftest.$ac_ext <<_ACEOF
12406/* end confdefs.h. */
071cd279 12407
be2828ce 12408/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 12409#ifdef __cplusplus
12410extern "C"
12411#endif
be2828ce 12412/* We use char because int might match the return type of a gcc2
6a8964db 12413 builtin and then its argument prototype would still apply. */
12414char RegOpenKeyExA ();
12415int
12416main ()
12417{
12418RegOpenKeyExA ();
12419 ;
12420 return 0;
12421}
12422_ACEOF
12423rm -f conftest.$ac_objext conftest$ac_exeext
12424if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9ebd0bb2 12425 (eval $ac_link) 2>conftest.er1
6a8964db 12426 ac_status=$?
9ebd0bb2 12427 grep -v '^ *+' conftest.er1 >conftest.err
12428 rm -f conftest.er1
12429 cat conftest.err >&5
6a8964db 12430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12431 (exit $ac_status); } &&
c8aeaa6d 12432 { ac_try='test -z "$ac_c_werror_flag"
12433 || test ! -s conftest.err'
9ebd0bb2 12434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12435 (eval $ac_try) 2>&5
12436 ac_status=$?
12437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12438 (exit $ac_status); }; } &&
12439 { ac_try='test -s conftest$ac_exeext'
6a8964db 12440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12441 (eval $ac_try) 2>&5
12442 ac_status=$?
12443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12444 (exit $ac_status); }; }; then
c6976b58 12445 ac_cv_search_RegOpenKeyExA="none required"
be2828ce 12446else
6a8964db 12447 echo "$as_me: failed program was:" >&5
12448sed 's/^/| /' conftest.$ac_ext >&5
12449
071cd279 12450fi
9ebd0bb2 12451rm -f conftest.err conftest.$ac_objext \
12452 conftest$ac_exeext conftest.$ac_ext
6a8964db 12453if test "$ac_cv_search_RegOpenKeyExA" = no; then
12454 for ac_lib in advapi32; do
12455 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12456 cat >conftest.$ac_ext <<_ACEOF
6a8964db 12457/* confdefs.h. */
12458_ACEOF
12459cat confdefs.h >>conftest.$ac_ext
12460cat >>conftest.$ac_ext <<_ACEOF
12461/* end confdefs.h. */
12462
c6976b58 12463/* Override any gcc2 internal prototype to avoid an error. */
6a8964db 12464#ifdef __cplusplus
12465extern "C"
12466#endif
c6976b58 12467/* We use char because int might match the return type of a gcc2
6a8964db 12468 builtin and then its argument prototype would still apply. */
12469char RegOpenKeyExA ();
12470int
12471main ()
12472{
12473RegOpenKeyExA ();
12474 ;
12475 return 0;
12476}
12477_ACEOF
12478rm -f conftest.$ac_objext conftest$ac_exeext
12479if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9ebd0bb2 12480 (eval $ac_link) 2>conftest.er1
6a8964db 12481 ac_status=$?
9ebd0bb2 12482 grep -v '^ *+' conftest.er1 >conftest.err
12483 rm -f conftest.er1
12484 cat conftest.err >&5
6a8964db 12485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12486 (exit $ac_status); } &&
c8aeaa6d 12487 { ac_try='test -z "$ac_c_werror_flag"
12488 || test ! -s conftest.err'
9ebd0bb2 12489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12490 (eval $ac_try) 2>&5
12491 ac_status=$?
12492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12493 (exit $ac_status); }; } &&
12494 { ac_try='test -s conftest$ac_exeext'
6a8964db 12495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12496 (eval $ac_try) 2>&5
12497 ac_status=$?
12498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12499 (exit $ac_status); }; }; then
12500 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
c6976b58 12501break
071cd279 12502else
6a8964db 12503 echo "$as_me: failed program was:" >&5
12504sed 's/^/| /' conftest.$ac_ext >&5
12505
071cd279 12506fi
9ebd0bb2 12507rm -f conftest.err conftest.$ac_objext \
12508 conftest$ac_exeext conftest.$ac_ext
6a8964db 12509 done
c9cd172c 12510fi
6a8964db 12511LIBS=$ac_func_search_save_LIBS
12512fi
12513echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
12514echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
12515if test "$ac_cv_search_RegOpenKeyExA" != no; then
12b432e0 12516 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
6a8964db 12517
c9e1a048 12518else
1af67e62 12519 enable_win32_registry=no
9af7c2e2 12520fi
be2828ce 12521
1af67e62 12522 fi
12523
12524 if test "x$enable_win32_registry" != xno; then
12525
12526cat >>confdefs.h <<\_ACEOF
12527#define ENABLE_WIN32_REGISTRY 1
12528_ACEOF
be2828ce 12529
1af67e62 12530
12531 if test "x$enable_win32_registry" != xyes \
12532 && test "x$enable_win32_registry" != x; then
6a8964db 12533
12534cat >>confdefs.h <<_ACEOF
1af67e62 12535#define WIN32_REGISTRY_KEY "$enable_win32_registry"
6a8964db 12536_ACEOF
c9e1a048 12537
1af67e62 12538 fi
12539 fi
12540 ;;
c6976b58 12541esac
be2828ce 12542
c6976b58 12543# Get an absolute path to the GCC top-level source directory
12544holddir=`${PWDCMD-pwd}`
12545cd $srcdir
12546topdir=`${PWDCMD-pwd}`
12547cd $holddir
be2828ce 12548
c6976b58 12549# Conditionalize the makefile for this host machine.
a455468e 12550xmake_file=
2e222ce5 12551for f in ${host_xmake_file}
c6976b58 12552do
12553 if test -f ${srcdir}/config/$f
12554 then
a455468e 12555 xmake_file="${xmake_file} \$(srcdir)/config/$f"
c6976b58 12556 fi
12557done
9af7c2e2 12558
c6976b58 12559# Conditionalize the makefile for this target machine.
a455468e 12560tmake_file_=
2e222ce5 12561for f in ${tmake_file}
c6976b58 12562do
12563 if test -f ${srcdir}/config/$f
12564 then
a455468e 12565 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
c6976b58 12566 fi
12567done
a455468e 12568tmake_file="${tmake_file_}"
778fc1c8 12569
be2828ce 12570# If the host doesn't support symlinks, modify CC in
12571# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
12572# Otherwise, we can use "CC=$(CC)".
12573rm -f symtest.tem
26be379c 12574case "$LN_S" in
12575 *-s*)
12576 cc_set_by_configure="\$(CC)"
12577 quoted_cc_set_by_configure="\$(CC)"
12578 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12579 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12580 ;;
12581 *)
12582 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
12583 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
12584 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
12585 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
12586 ;;
12587esac
be2828ce 12588
a136b23d 12589# This is a terrible hack which will go away some day.
12590host_cc_for_libada=${CC}
3e934a80 12591
12592
be2828ce 12593out_object_file=`basename $out_file .c`.o
12594
ff05e09e 12595tm_file_list="options.h"
12596tm_include_list="options.h"
be2828ce 12597for f in $tm_file; do
de5102fe 12598 case $f in
673b6e5a 12599 defaults.h )
4dcab8b7 12600 tm_file_list="${tm_file_list} \$(srcdir)/$f"
12601 tm_include_list="${tm_include_list} $f"
12602 ;;
12603 * )
12604 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
12605 tm_include_list="${tm_include_list} config/$f"
12606 ;;
de5102fe 12607 esac
be2828ce 12608done
12609
83b8e55b 12610tm_p_file_list=
4dcab8b7 12611tm_p_include_list=
83b8e55b 12612for f in $tm_p_file; do
805e22b2 12613 case $f in
12614 tm-preds.h )
4dcab8b7 12615 tm_p_file_list="${tm_p_file_list} $f"
12616 tm_p_include_list="${tm_p_include_list} $f"
12617 ;;
12618 * )
12619 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
12620 tm_p_include_list="${tm_p_include_list} config/$f"
12621 esac
12622done
12623
12624xm_file_list=
12625xm_include_list=
12626for f in $xm_file; do
12627 case $f in
12628 ansidecl.h )
12629 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
12630 xm_include_list="${xm_include_list} $f"
12631 ;;
12632 auto-host.h )
12633 xm_file_list="${xm_file_list} $f"
12634 xm_include_list="${xm_include_list} $f"
12635 ;;
12636 * )
12637 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
12638 xm_include_list="${xm_include_list} config/$f"
12639 ;;
805e22b2 12640 esac
83b8e55b 12641done
12642
be2828ce 12643host_xm_file_list=
4dcab8b7 12644host_xm_include_list=
be2828ce 12645for f in $host_xm_file; do
de5102fe 12646 case $f in
673b6e5a 12647 ansidecl.h )
4dcab8b7 12648 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
12649 host_xm_include_list="${host_xm_include_list} $f"
12650 ;;
1f3233d1 12651 auto-host.h )
4dcab8b7 12652 host_xm_file_list="${host_xm_file_list} $f"
12653 host_xm_include_list="${host_xm_include_list} $f"
12654 ;;
12655 * )
12656 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
12657 host_xm_include_list="${host_xm_include_list} config/$f"
12658 ;;
de5102fe 12659 esac
be2828ce 12660done
12661
12662build_xm_file_list=
12663for f in $build_xm_file; do
de5102fe 12664 case $f in
673b6e5a 12665 ansidecl.h )
4dcab8b7 12666 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
12667 build_xm_include_list="${build_xm_include_list} $f"
12668 ;;
1f3233d1 12669 auto-build.h | auto-host.h )
4dcab8b7 12670 build_xm_file_list="${build_xm_file_list} $f"
12671 build_xm_include_list="${build_xm_include_list} $f"
12672 ;;
12673 * )
12674 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
12675 build_xm_include_list="${build_xm_include_list} config/$f"
12676 ;;
de5102fe 12677 esac
be2828ce 12678done
12679
0fc07c25 12680# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
12681# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
6a8964db 12682CROSS=
12683ALL=all.internal
12684SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
5e368ffe 12685
12686if test "x$with_build_sysroot" != x; then
12687 build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)'
12688else
12689 # This value is used, even on a native system, because
12690 # CROSS_SYSTEM_HEADER_DIR is just
12691 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
12692 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
12693fi
12694
be2828ce 12695if test x$host != x$target
12696then
0fc07c25 12697 CROSS="-DCROSS_COMPILE"
12698 ALL=all.cross
a99be165 12699 SYSTEM_HEADER_DIR=$build_system_header_dir
4ae4e5e8 12700 case "$host","$target" in
62cb8057 12701 # Darwin crosses can use the host system's libraries and headers,
12702 # because of the fat library support. Of course, it must be the
12703 # same version of Darwin on both sides. Allow the user to
12704 # just say --target=foo-darwin without a version number to mean
12705 # "the version on this system".
12706 *-*-darwin*,*-*-darwin*)
12707 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
12708 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
12709 if test $hostos = $targetos -o $targetos = darwin ; then
12710 CROSS=
12711 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
12712 with_headers=yes
12713 fi
12714 ;;
12715
4ae4e5e8 12716 i?86-*-*,x86_64-*-* \
12717 | powerpc*-*-*,powerpc64*-*-*)
12718 CROSS="$CROSS -DNATIVE_CROSS" ;;
12719 esac
e81222a4 12720elif test "x$TARGET_SYSTEM_ROOT" != x; then
5e368ffe 12721 SYSTEM_HEADER_DIR=$build_system_header_dir
be2828ce 12722fi
12723
81aabcf8 12724# If this is a cross-compiler that does not
12725# have its own set of headers then define
12726# inhibit_libc
12727
3caddd4e 12728# If this is using newlib, without having the headers available now,
12729# then define inhibit_libc in LIBGCC2_CFLAGS.
c872ef71 12730# This prevents libgcc2 from containing any code which requires libc
12731# support.
a99be165 12732inhibit_libc=false
3caddd4e 12733if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
12734 test x$with_newlib = xyes ; } &&
9ad4b12b 12735 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
a99be165 12736 inhibit_libc=true
81aabcf8 12737fi
12738
12739
0fc07c25 12740# When building gcc with a cross-compiler, we need to adjust things so
12741# that the generator programs are still built with the native compiler.
12742# Also, we cannot run fixincludes or fix-header.
0fc07c25 12743
12744# These are the normal (build=host) settings:
6a8964db 12745CC_FOR_BUILD='$(CC)'
12746BUILD_CFLAGS='$(ALL_CFLAGS)'
6a8964db 12747STMP_FIXINC=stmp-fixinc
2333aa54 12748
12749# Possibly disable fixproto, on a per-target basis.
12750case ${use_fixproto} in
12751 no)
12752 STMP_FIXPROTO=
12753 ;;
12754 yes)
12755 STMP_FIXPROTO=stmp-fixproto
12756 ;;
12757esac
12758
0fc07c25 12759
c19ee476 12760# And these apply if build != host, or we are generating coverage data
12761if test x$build != x$host || test "x$coverage_flags" != x
be2828ce 12762then
4a867005 12763 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
0fc07c25 12764
e81222a4 12765 if test "x$TARGET_SYSTEM_ROOT" = x; then
8f4ab70b 12766 if test "x$STMP_FIXPROTO" != x; then
0abf128a 12767 STMP_FIXPROTO=stmp-install-fixproto
12768 fi
e81222a4 12769 fi
be2828ce 12770fi
12771
12772# Expand extra_headers to include complete path.
12773# This substitutes for lots of t-* files.
12774extra_headers_list=
a78cd2c1 12775# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
12776for file in ${extra_headers} ; do
12777 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
12778done
be2828ce 12779
e08c7853 12780# Define collect2 in Makefile.
12781case $host_can_use_collect2 in
12782 no) collect2= ;;
12783 *) collect2='collect2$(exeext)' ;;
12784esac
12785
12786
be2828ce 12787# Add a definition of USE_COLLECT2 if system wants one.
7349ace9 12788case $use_collect2 in
12789 no) use_collect2= ;;
12790 "") ;;
6a8964db 12791 *)
7349ace9 12792 host_xm_defines="${host_xm_defines} USE_COLLECT2"
12793 xm_defines="${xm_defines} USE_COLLECT2"
e08c7853 12794 case $host_can_use_collect2 in
12795 no)
12796 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
12797echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
12798 { (exit 1); exit 1; }; }
12799 ;;
12800 esac
7349ace9 12801 ;;
12802esac
be2828ce 12803
d976f534 12804# ---------------------------
12805# Assembler & linker features
12806# ---------------------------
12807
d2aaa43f 12808# Identify the assembler which will work hand-in-glove with the newly
12809# built GCC, so that we can examine its features. This is the assembler
12810# which will be driven by the driver program.
12811#
12812# If build != host, and we aren't building gas in-tree, we identify a
12813# build->target assembler and hope that it will have the same features
12814# as the host->target assembler we'll be using.
7349ace9 12815in_tree_gas=no
be2828ce 12816gcc_cv_as=
398f3874 12817gcc_cv_gas_major_version=
12818gcc_cv_gas_minor_version=
be2828ce 12819gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
12820if test -x "$DEFAULT_ASSEMBLER"; then
12821 gcc_cv_as="$DEFAULT_ASSEMBLER"
7349ace9 12822elif test -f $gcc_cv_as_gas_srcdir/configure.in \
58220290 12823 && test -f ../gas/Makefile \
12824 && test x$build = x$host; then
12825 # Single tree build which includes gas. We want to prefer it
12826 # over whatever linker top-level may have detected, since
12827 # we'll use what we're building after installation anyway.
667fe30b 12828 in_tree_gas=yes
12829 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
12830for f in $gcc_cv_as_bfd_srcdir/configure \
12831 $gcc_cv_as_gas_srcdir/configure \
12832 $gcc_cv_as_gas_srcdir/configure.in \
12833 $gcc_cv_as_gas_srcdir/Makefile.in ; do
78dde42d 12834 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
667fe30b 12835 if test x$gcc_cv_gas_version != x; then
12836 break
12837 fi
12838done
12839gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
12840gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
12841gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
8d6083e4 12842case $gcc_cv_gas_patch_version in
12843 "") gcc_cv_gas_patch_version="0" ;;
12844esac
6d6c1801 12845gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
12846 + $gcc_cv_gas_minor_version \) \* 1000 \
12847 + $gcc_cv_gas_patch_version`
667fe30b 12848
f32e3360 12849 gcc_cv_as=../gas/as-new$build_exeext
0dac358a 12850 in_tree_gas_is_elf=no
12851 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
12852 || (grep 'obj_format = multi' ../gas/Makefile \
12853 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
12854 then
12855 in_tree_gas_is_elf=yes
12856 fi
f32e3360 12857elif test -x as$build_exeext; then
12858 # Build using assembler in the current directory.
12859 gcc_cv_as=./as$build_exeext
398f3874 12860fi
3245cd4f 12861
1af67e62 12862
f32e3360 12863# When searching for the assembler or linker, search the same directories
12864# that the installed compiler will search. Else we may find the wrong
12865# assembler or linker and lose. If we do not find a suitable binary,
12866# then try the user's path.
12867#
12868# Also note we have to check MD_EXEC_PREFIX before checking the user's path.
12869if test "x$exec_prefix" = xNONE; then
12870 if test "x$prefix" = xNONE; then
12871 gcc_cv_tool_prefix=/usr/local
07d1fecc 12872 else
f32e3360 12873 gcc_cv_tool_prefix=$prefix
07d1fecc 12874 fi
f32e3360 12875else
12876 gcc_cv_tool_prefix=$exec_prefix
12877fi
12878
12879if test x$host = x$build; then
12880 gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version"
12881 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical"
12882 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical/$gcc_version"
12883 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical"
12884 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version"
12885 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin"
12886else
12887 gcc_cv_tool_dirs=
12888fi
12889
12890if test x$build = x$target; then
12891 # Rummage through tm_files looking for MD_EXEC_PREFIX
12892 md_dirs=
12893 for f in ${tm_file_list}; do
12894 if test -f $f; then
12895 if grep '^#[ ]*undef[ ]*MD_EXEC_PREFIX' $f > /dev/null; then
12896 md_dirs=
12897 fi
12898 md_dirs="$md_dirs "`sed -n -e 's@^#[ ]*define[ ]*MD_EXEC_PREFIX[ ]*"\(.*\)/"@\1@p' < $f`
12899 fi
12900 done
12901 for f in ${md_dirs}; do
12902 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$f"
12903 done
12904fi
12905
12906
12907
12908
12909exec 6>/dev/null
ae74ffb7 12910
12911# First try the environment variables. Handle full paths or basenames.
12912if test "x$gcc_cv_as" = x && test -n "$AS_FOR_TARGET"; then
12913 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
12914set dummy $AS_FOR_TARGET; ac_word=$2
12915echo "$as_me:$LINENO: checking for $ac_word" >&5
12916echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12917if test "${ac_cv_path_gcc_cv_as+set}" = set; then
12918 echo $ECHO_N "(cached) $ECHO_C" >&6
12919else
12920 case $gcc_cv_as in
12921 [\\/]* | ?:[\\/]*)
12922 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
12923 ;;
12924 *)
12925 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12926for as_dir in $PATH
12927do
12928 IFS=$as_save_IFS
12929 test -z "$as_dir" && as_dir=.
12930 for ac_exec_ext in '' $ac_executable_extensions; do
12931 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12932 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
12933 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12934 break 2
12935 fi
12936done
12937done
12938
12939 ;;
12940esac
12941fi
12942gcc_cv_as=$ac_cv_path_gcc_cv_as
12943
12944if test -n "$gcc_cv_as"; then
12945 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
12946echo "${ECHO_T}$gcc_cv_as" >&6
12947else
12948 echo "$as_me:$LINENO: result: no" >&5
12949echo "${ECHO_T}no" >&6
12950fi
12951
12952fi
12953if test "x$gcc_cv_as" = x && test -n "$AS" && test x$host = x$target; then
12954 # Extract the first word of "$AS", so it can be a program name with args.
12955set dummy $AS; ac_word=$2
12956echo "$as_me:$LINENO: checking for $ac_word" >&5
12957echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12958if test "${ac_cv_path_gcc_cv_as+set}" = set; then
12959 echo $ECHO_N "(cached) $ECHO_C" >&6
12960else
12961 case $gcc_cv_as in
12962 [\\/]* | ?:[\\/]*)
12963 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
12964 ;;
12965 *)
12966 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12967for as_dir in $PATH
12968do
12969 IFS=$as_save_IFS
12970 test -z "$as_dir" && as_dir=.
12971 for ac_exec_ext in '' $ac_executable_extensions; do
12972 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12973 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
12974 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12975 break 2
12976 fi
12977done
12978done
12979
12980 ;;
12981esac
12982fi
12983gcc_cv_as=$ac_cv_path_gcc_cv_as
12984
12985if test -n "$gcc_cv_as"; then
12986 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
12987echo "${ECHO_T}$gcc_cv_as" >&6
12988else
12989 echo "$as_me:$LINENO: result: no" >&5
12990echo "${ECHO_T}no" >&6
12991fi
12992
12993fi
12994
f6cc6524 12995if test "x$gcc_cv_as" = x; then
919611cc 12996 # The AC_PATH_PROGS macro doesn't work properly when its 4th argument
12997 # is empty.
12998 if test "x$gcc_cv_tool_dirs" = x; then
12999 gcc_cv_as=
13000 else
13001 for ac_prog in as
f32e3360 13002do
13003 # Extract the first word of "$ac_prog", so it can be a program name with args.
13004set dummy $ac_prog; ac_word=$2
13005echo "$as_me:$LINENO: checking for $ac_word" >&5
13006echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13007if test "${ac_cv_path_gcc_cv_as+set}" = set; then
13008 echo $ECHO_N "(cached) $ECHO_C" >&6
13009else
13010 case $gcc_cv_as in
13011 [\\/]* | ?:[\\/]*)
13012 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
13013 ;;
13014 *)
13015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13016for as_dir in $gcc_cv_tool_dirs
13017do
13018 IFS=$as_save_IFS
13019 test -z "$as_dir" && as_dir=.
13020 for ac_exec_ext in '' $ac_executable_extensions; do
13021 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13022 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
13023 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13024 break 2
13025 fi
13026done
13027done
07d1fecc 13028
f32e3360 13029 ;;
13030esac
13031fi
13032gcc_cv_as=$ac_cv_path_gcc_cv_as
13033
13034if test -n "$gcc_cv_as"; then
13035 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13036echo "${ECHO_T}$gcc_cv_as" >&6
13037else
13038 echo "$as_me:$LINENO: result: no" >&5
13039echo "${ECHO_T}no" >&6
13040fi
13041
13042 test -n "$gcc_cv_as" && break
13043done
13044
919611cc 13045 fi
f6cc6524 13046fi
f32e3360 13047if test "x$gcc_cv_as" = x; then
13048 # If the loop above did not find a tool, then use whatever
fe610e8e 13049 # one we can find in the users's path. We are looking for a
f32e3360 13050 # ${build} -> ${target} tool.
3290bc33 13051 if test "x$program_prefix" != xNONE; then
f32e3360 13052 default_tool_name=${program_prefix}as
fe610e8e 13053 elif test x$build != x$host && test x$build != x$target; then
f32e3360 13054 default_tool_name=${target_noncanonical}-as
3290bc33 13055 else
f32e3360 13056 default_tool_name=`echo as | sed "${program_transform_name}"`
3290bc33 13057 fi
f32e3360 13058 for ac_prog in $default_tool_name
13059do
13060 # Extract the first word of "$ac_prog", so it can be a program name with args.
13061set dummy $ac_prog; ac_word=$2
13062echo "$as_me:$LINENO: checking for $ac_word" >&5
13063echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13064if test "${ac_cv_path_gcc_cv_as+set}" = set; then
13065 echo $ECHO_N "(cached) $ECHO_C" >&6
13066else
13067 case $gcc_cv_as in
13068 [\\/]* | ?:[\\/]*)
13069 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
13070 ;;
13071 *)
13072 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13073for as_dir in $PATH
13074do
13075 IFS=$as_save_IFS
13076 test -z "$as_dir" && as_dir=.
13077 for ac_exec_ext in '' $ac_executable_extensions; do
13078 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13079 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
13080 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13081 break 2
13082 fi
13083done
13084done
3290bc33 13085
f32e3360 13086 ;;
13087esac
13088fi
13089gcc_cv_as=$ac_cv_path_gcc_cv_as
3290bc33 13090
f32e3360 13091if test -n "$gcc_cv_as"; then
13092 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13093echo "${ECHO_T}$gcc_cv_as" >&6
13094else
13095 echo "$as_me:$LINENO: result: no" >&5
13096echo "${ECHO_T}no" >&6
13097fi
13098
13099 test -n "$gcc_cv_as" && break
13100done
a8669770 13101test -n "$gcc_cv_as" || gcc_cv_as="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext"
07d1fecc 13102
3245cd4f 13103fi
f32e3360 13104test "$silent" != yes && exec 6>&1
13105
13106ORIGINAL_AS_FOR_TARGET="$gcc_cv_as"
13107
13108echo "$as_me:$LINENO: checking what assembler to use" >&5
13109echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
7349ace9 13110case $in_tree_gas in
13111 yes)
6a8964db 13112 echo "$as_me:$LINENO: result: \"newly built gas\"" >&5
13113echo "${ECHO_T}\"newly built gas\"" >&6
7349ace9 13114 ;;
13115 no)
6a8964db 13116 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13117echo "${ECHO_T}$gcc_cv_as" >&6
7349ace9 13118 ;;
13119esac
398f3874 13120
d2aaa43f 13121# Identify the linker which will work hand-in-glove with the newly
13122# built GCC, so that we can examine its features. This is the linker
13123# which will be driven by the driver program.
13124#
13125# If build != host, and we aren't building gas in-tree, we identify a
13126# build->target linker and hope that it will have the same features
13127# as the host->target linker we'll be using.
7349ace9 13128in_tree_ld=no
0d6378a9 13129gcc_cv_ld=
13130gcc_cv_gld_major_version=
13131gcc_cv_gld_minor_version=
13132gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
13133gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
13134if test -x "$DEFAULT_LINKER"; then
13135 gcc_cv_ld="$DEFAULT_LINKER"
7349ace9 13136elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
58220290 13137 && test -f ../ld/Makefile \
13138 && test x$build = x$host; then
13139 # Single tree build which includes ld. We want to prefer it
13140 # over whatever linker top-level may have detected, since
13141 # we'll use what we're building after installation anyway.
7349ace9 13142 in_tree_ld=yes
0dac358a 13143 in_tree_ld_is_elf=no
13144 if (grep 'EMUL = .*elf' ../ld/Makefile \
092f763e 13145 || grep 'EMUL = .*linux' ../ld/Makefile \
13146 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
0dac358a 13147 in_tree_ld_is_elf=yes
13148 fi
0d6378a9 13149 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
13150 do
78dde42d 13151 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
0d6378a9 13152 if test x$gcc_cv_gld_version != x; then
13153 break
13154 fi
13155 done
13156 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
13157 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
f32e3360 13158 gcc_cv_ld=../ld/ld-new$build_exeext
13159elif test -x collect-ld$build_exeext; then
13160 # Build using linker in the current directory.
13161 gcc_cv_ld=./collect-ld$build_exeext
0d6378a9 13162fi
13163
0d6378a9 13164
f32e3360 13165
13166
13167
13168exec 6>/dev/null
ae74ffb7 13169
13170# First try the environment variables. Handle full paths or basenames.
13171if test "x$gcc_cv_ld" = x && test -n "$LD_FOR_TARGET"; then
13172 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
13173set dummy $LD_FOR_TARGET; ac_word=$2
13174echo "$as_me:$LINENO: checking for $ac_word" >&5
13175echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13176if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
13177 echo $ECHO_N "(cached) $ECHO_C" >&6
13178else
13179 case $gcc_cv_ld in
13180 [\\/]* | ?:[\\/]*)
13181 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
13182 ;;
13183 *)
13184 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13185for as_dir in $PATH
13186do
13187 IFS=$as_save_IFS
13188 test -z "$as_dir" && as_dir=.
13189 for ac_exec_ext in '' $ac_executable_extensions; do
13190 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13191 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
13192 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13193 break 2
13194 fi
13195done
13196done
13197
13198 ;;
13199esac
13200fi
13201gcc_cv_ld=$ac_cv_path_gcc_cv_ld
13202
13203if test -n "$gcc_cv_ld"; then
13204 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13205echo "${ECHO_T}$gcc_cv_ld" >&6
13206else
13207 echo "$as_me:$LINENO: result: no" >&5
13208echo "${ECHO_T}no" >&6
13209fi
13210
13211fi
13212if test "x$gcc_cv_ld" = x && test -n "$LD" && test x$host = x$target; then
13213 # Extract the first word of "$LD", so it can be a program name with args.
13214set dummy $LD; ac_word=$2
13215echo "$as_me:$LINENO: checking for $ac_word" >&5
13216echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13217if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
13218 echo $ECHO_N "(cached) $ECHO_C" >&6
13219else
13220 case $gcc_cv_ld in
13221 [\\/]* | ?:[\\/]*)
13222 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
13223 ;;
13224 *)
13225 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13226for as_dir in $PATH
13227do
13228 IFS=$as_save_IFS
13229 test -z "$as_dir" && as_dir=.
13230 for ac_exec_ext in '' $ac_executable_extensions; do
13231 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13232 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
13233 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13234 break 2
13235 fi
13236done
13237done
13238
13239 ;;
13240esac
13241fi
13242gcc_cv_ld=$ac_cv_path_gcc_cv_ld
13243
13244if test -n "$gcc_cv_ld"; then
13245 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13246echo "${ECHO_T}$gcc_cv_ld" >&6
13247else
13248 echo "$as_me:$LINENO: result: no" >&5
13249echo "${ECHO_T}no" >&6
13250fi
13251
13252fi
13253
f6cc6524 13254if test "x$gcc_cv_ld" = x; then
919611cc 13255 # The AC_PATH_PROGS macro doesn't work properly when its 4th argument
13256 # is empty.
13257 if test "x$gcc_cv_tool_dirs" = x; then
13258 gcc_cv_ld=
13259 else
13260 for ac_prog in ld
f32e3360 13261do
13262 # Extract the first word of "$ac_prog", so it can be a program name with args.
13263set dummy $ac_prog; ac_word=$2
13264echo "$as_me:$LINENO: checking for $ac_word" >&5
13265echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13266if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
13267 echo $ECHO_N "(cached) $ECHO_C" >&6
13268else
13269 case $gcc_cv_ld in
13270 [\\/]* | ?:[\\/]*)
13271 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
13272 ;;
13273 *)
13274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13275for as_dir in $gcc_cv_tool_dirs
13276do
13277 IFS=$as_save_IFS
13278 test -z "$as_dir" && as_dir=.
13279 for ac_exec_ext in '' $ac_executable_extensions; do
13280 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13281 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
13282 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13283 break 2
13284 fi
13285done
13286done
13287
13288 ;;
13289esac
13290fi
13291gcc_cv_ld=$ac_cv_path_gcc_cv_ld
13292
13293if test -n "$gcc_cv_ld"; then
13294 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13295echo "${ECHO_T}$gcc_cv_ld" >&6
13296else
13297 echo "$as_me:$LINENO: result: no" >&5
13298echo "${ECHO_T}no" >&6
13299fi
13300
13301 test -n "$gcc_cv_ld" && break
13302done
13303
919611cc 13304 fi
f6cc6524 13305fi
f32e3360 13306if test "x$gcc_cv_ld" = x; then
13307 # If the loop above did not find a tool, then use whatever
fe610e8e 13308 # one we can find in the users's path. We are looking for a
f32e3360 13309 # ${build} -> ${target} tool.
3290bc33 13310 if test "x$program_prefix" != xNONE; then
f32e3360 13311 default_tool_name=${program_prefix}ld
fe610e8e 13312 elif test x$build != x$host && test x$build != x$target; then
f32e3360 13313 default_tool_name=${target_noncanonical}-ld
3290bc33 13314 else
f32e3360 13315 default_tool_name=`echo ld | sed "${program_transform_name}"`
3290bc33 13316 fi
f32e3360 13317 for ac_prog in $default_tool_name
13318do
13319 # Extract the first word of "$ac_prog", so it can be a program name with args.
13320set dummy $ac_prog; ac_word=$2
13321echo "$as_me:$LINENO: checking for $ac_word" >&5
13322echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13323if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
13324 echo $ECHO_N "(cached) $ECHO_C" >&6
13325else
13326 case $gcc_cv_ld in
13327 [\\/]* | ?:[\\/]*)
13328 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
13329 ;;
13330 *)
13331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13332for as_dir in $PATH
13333do
13334 IFS=$as_save_IFS
13335 test -z "$as_dir" && as_dir=.
13336 for ac_exec_ext in '' $ac_executable_extensions; do
13337 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13338 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
13339 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13340 break 2
13341 fi
13342done
13343done
3290bc33 13344
f32e3360 13345 ;;
13346esac
13347fi
13348gcc_cv_ld=$ac_cv_path_gcc_cv_ld
3290bc33 13349
f32e3360 13350if test -n "$gcc_cv_ld"; then
13351 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13352echo "${ECHO_T}$gcc_cv_ld" >&6
13353else
13354 echo "$as_me:$LINENO: result: no" >&5
13355echo "${ECHO_T}no" >&6
13356fi
13357
13358 test -n "$gcc_cv_ld" && break
13359done
a8669770 13360test -n "$gcc_cv_ld" || gcc_cv_ld="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext"
0d6378a9 13361
0d6378a9 13362fi
f32e3360 13363test "$silent" != yes && exec 6>&1
13364
13365ORIGINAL_LD_FOR_TARGET="$gcc_cv_ld"
13366
13367echo "$as_me:$LINENO: checking what linker to use" >&5
13368echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
7349ace9 13369case $in_tree_ld in
13370 yes)
6a8964db 13371 echo "$as_me:$LINENO: result: \"newly built ld\"" >&5
13372echo "${ECHO_T}\"newly built ld\"" >&6
7349ace9 13373 ;;
13374 no)
6a8964db 13375 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13376echo "${ECHO_T}$gcc_cv_ld" >&6
7349ace9 13377 ;;
13378esac
0d6378a9 13379
398f3874 13380# Figure out what nm we will be using.
37c5bbf8 13381gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
37c5bbf8 13382in_tree_nm=no
f32e3360 13383gcc_cv_nm=
13384if test -f $gcc_cv_binutils_srcdir/configure.in \
37c5bbf8 13385 && test -f ../binutils/Makefile; then
13386 # Single tree build which includes binutils.
13387 in_tree_nm=yes
f32e3360 13388 gcc_cv_nm=../binutils/nm-new$build_exeext
13389elif test -x nm$build_exeext; then
68c3d71c 13390 gcc_cv_nm=./nm$build_exeext
f32e3360 13391fi
13392
13393
13394
13395
13396
13397exec 6>/dev/null
ae74ffb7 13398
13399# First try the environment variables. Handle full paths or basenames.
13400if test "x$gcc_cv_nm" = x && test -n "$NM_FOR_TARGET"; then
13401 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
13402set dummy $NM_FOR_TARGET; ac_word=$2
13403echo "$as_me:$LINENO: checking for $ac_word" >&5
13404echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13405if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
13406 echo $ECHO_N "(cached) $ECHO_C" >&6
13407else
13408 case $gcc_cv_nm in
13409 [\\/]* | ?:[\\/]*)
13410 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
13411 ;;
13412 *)
13413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13414for as_dir in $PATH
13415do
13416 IFS=$as_save_IFS
13417 test -z "$as_dir" && as_dir=.
13418 for ac_exec_ext in '' $ac_executable_extensions; do
13419 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13420 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
13421 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13422 break 2
13423 fi
13424done
13425done
13426
13427 ;;
13428esac
13429fi
13430gcc_cv_nm=$ac_cv_path_gcc_cv_nm
13431
13432if test -n "$gcc_cv_nm"; then
13433 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13434echo "${ECHO_T}$gcc_cv_nm" >&6
13435else
13436 echo "$as_me:$LINENO: result: no" >&5
13437echo "${ECHO_T}no" >&6
13438fi
13439
13440fi
13441if test "x$gcc_cv_nm" = x && test -n "$NM" && test x$host = x$target; then
13442 # Extract the first word of "$NM", so it can be a program name with args.
13443set dummy $NM; ac_word=$2
13444echo "$as_me:$LINENO: checking for $ac_word" >&5
13445echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13446if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
13447 echo $ECHO_N "(cached) $ECHO_C" >&6
13448else
13449 case $gcc_cv_nm in
13450 [\\/]* | ?:[\\/]*)
13451 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
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
13460 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13461 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
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
13471gcc_cv_nm=$ac_cv_path_gcc_cv_nm
13472
13473if test -n "$gcc_cv_nm"; then
13474 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13475echo "${ECHO_T}$gcc_cv_nm" >&6
13476else
13477 echo "$as_me:$LINENO: result: no" >&5
13478echo "${ECHO_T}no" >&6
13479fi
13480
13481fi
13482
f6cc6524 13483if test "x$gcc_cv_nm" = x; then
919611cc 13484 # The AC_PATH_PROGS macro doesn't work properly when its 4th argument
13485 # is empty.
13486 if test "x$gcc_cv_tool_dirs" = x; then
13487 gcc_cv_nm=
13488 else
13489 for ac_prog in nm
f32e3360 13490do
13491 # Extract the first word of "$ac_prog", so it can be a program name with args.
13492set dummy $ac_prog; ac_word=$2
13493echo "$as_me:$LINENO: checking for $ac_word" >&5
13494echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13495if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
13496 echo $ECHO_N "(cached) $ECHO_C" >&6
ab3470ec 13497else
f32e3360 13498 case $gcc_cv_nm in
13499 [\\/]* | ?:[\\/]*)
13500 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
13501 ;;
13502 *)
13503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13504for as_dir in $gcc_cv_tool_dirs
13505do
13506 IFS=$as_save_IFS
13507 test -z "$as_dir" && as_dir=.
13508 for ac_exec_ext in '' $ac_executable_extensions; do
13509 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13510 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
13511 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13512 break 2
13513 fi
13514done
13515done
13516
13517 ;;
13518esac
398f3874 13519fi
f32e3360 13520gcc_cv_nm=$ac_cv_path_gcc_cv_nm
13521
13522if test -n "$gcc_cv_nm"; then
13523 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13524echo "${ECHO_T}$gcc_cv_nm" >&6
13525else
13526 echo "$as_me:$LINENO: result: no" >&5
13527echo "${ECHO_T}no" >&6
13528fi
13529
13530 test -n "$gcc_cv_nm" && break
13531done
13532
919611cc 13533 fi
f6cc6524 13534fi
f32e3360 13535if test "x$gcc_cv_nm" = x; then
13536 # If the loop above did not find a tool, then use whatever
13537 # one we can find in the users's path. We are looking for a
13538 # ${build} -> ${target} tool.
13539 if test "x$program_prefix" != xNONE; then
13540 default_tool_name=${program_prefix}nm
13541 elif test x$build != x$host && test x$build != x$target; then
13542 default_tool_name=${target_noncanonical}-nm
13543 else
13544 default_tool_name=`echo nm | sed "${program_transform_name}"`
13545 fi
13546 for ac_prog in $default_tool_name
13547do
13548 # Extract the first word of "$ac_prog", so it can be a program name with args.
13549set dummy $ac_prog; ac_word=$2
13550echo "$as_me:$LINENO: checking for $ac_word" >&5
13551echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13552if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
13553 echo $ECHO_N "(cached) $ECHO_C" >&6
13554else
13555 case $gcc_cv_nm in
13556 [\\/]* | ?:[\\/]*)
13557 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
13558 ;;
13559 *)
13560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13561for as_dir in $PATH
13562do
13563 IFS=$as_save_IFS
13564 test -z "$as_dir" && as_dir=.
13565 for ac_exec_ext in '' $ac_executable_extensions; do
13566 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13567 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
13568 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13569 break 2
13570 fi
13571done
13572done
13573
13574 ;;
13575esac
13576fi
13577gcc_cv_nm=$ac_cv_path_gcc_cv_nm
13578
13579if test -n "$gcc_cv_nm"; then
13580 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13581echo "${ECHO_T}$gcc_cv_nm" >&6
13582else
13583 echo "$as_me:$LINENO: result: no" >&5
13584echo "${ECHO_T}no" >&6
13585fi
13586
13587 test -n "$gcc_cv_nm" && break
13588done
a8669770 13589test -n "$gcc_cv_nm" || gcc_cv_nm="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext"
f32e3360 13590
13591fi
13592test "$silent" != yes && exec 6>&1
13593
13594ORIGINAL_NM_FOR_TARGET="$gcc_cv_nm"
13595
13596echo "$as_me:$LINENO: checking what nm to use" >&5
13597echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
37c5bbf8 13598case $in_tree_nm in
6a8964db 13599 yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5
13600echo "${ECHO_T}\"newly built nm\"" >&6 ;;
13601 no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13602echo "${ECHO_T}$gcc_cv_nm" >&6 ;;
37c5bbf8 13603esac
398f3874 13604
74e387fc 13605# Figure out what objdump we will be using.
37c5bbf8 13606in_tree_objdump=no
ae74ffb7 13607gcc_cv_objdump=
13608if test -f $gcc_cv_binutils_srcdir/configure.in \
37c5bbf8 13609 && test -f ../binutils/Makefile; then
13610 # Single tree build which includes binutils.
13611 in_tree_objdump=yes
f32e3360 13612 gcc_cv_objdump=../binutils/objdump$build_exeext
ae74ffb7 13613elif test -x objdump$build_exeext; then
13614 gcc_cv_objdump=./objdump$build_exeext
13615fi
13616
13617
13618
13619
13620
13621exec 6>/dev/null
13622
13623# First try the environment variables. Handle full paths or basenames.
13624if test "x$gcc_cv_objdump" = x && test -n "$OBJDUMP_FOR_TARGET"; then
13625 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
13626set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
13627echo "$as_me:$LINENO: checking for $ac_word" >&5
13628echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13629if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
13630 echo $ECHO_N "(cached) $ECHO_C" >&6
13631else
13632 case $gcc_cv_objdump in
13633 [\\/]* | ?:[\\/]*)
13634 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
13635 ;;
13636 *)
13637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13638for as_dir in $PATH
13639do
13640 IFS=$as_save_IFS
13641 test -z "$as_dir" && as_dir=.
13642 for ac_exec_ext in '' $ac_executable_extensions; do
13643 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13644 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
13645 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13646 break 2
13647 fi
13648done
13649done
13650
13651 ;;
13652esac
13653fi
13654gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
13655
13656if test -n "$gcc_cv_objdump"; then
13657 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13658echo "${ECHO_T}$gcc_cv_objdump" >&6
13659else
13660 echo "$as_me:$LINENO: result: no" >&5
13661echo "${ECHO_T}no" >&6
13662fi
13663
13664fi
13665if test "x$gcc_cv_objdump" = x && test -n "$OBJDUMP" && test x$host = x$target; then
13666 # Extract the first word of "$OBJDUMP", so it can be a program name with args.
13667set dummy $OBJDUMP; ac_word=$2
13668echo "$as_me:$LINENO: checking for $ac_word" >&5
13669echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13670if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
13671 echo $ECHO_N "(cached) $ECHO_C" >&6
13672else
13673 case $gcc_cv_objdump in
13674 [\\/]* | ?:[\\/]*)
13675 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
13676 ;;
13677 *)
13678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13679for as_dir in $PATH
13680do
13681 IFS=$as_save_IFS
13682 test -z "$as_dir" && as_dir=.
13683 for ac_exec_ext in '' $ac_executable_extensions; do
13684 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13685 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
13686 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13687 break 2
13688 fi
13689done
13690done
13691
13692 ;;
13693esac
13694fi
13695gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
13696
13697if test -n "$gcc_cv_objdump"; then
13698 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13699echo "${ECHO_T}$gcc_cv_objdump" >&6
ab3470ec 13700else
ae74ffb7 13701 echo "$as_me:$LINENO: result: no" >&5
13702echo "${ECHO_T}no" >&6
13703fi
13704
13705fi
13706
13707if test "x$gcc_cv_objdump" = x; then
13708 # The AC_PATH_PROGS macro doesn't work properly when its 4th argument
13709 # is empty.
13710 if test "x$gcc_cv_tool_dirs" = x; then
13711 gcc_cv_objdump=
13712 else
13713 for ac_prog in objdump
13714do
13715 # Extract the first word of "$ac_prog", so it can be a program name with args.
13716set dummy $ac_prog; ac_word=$2
13717echo "$as_me:$LINENO: checking for $ac_word" >&5
13718echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13719if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
13720 echo $ECHO_N "(cached) $ECHO_C" >&6
13721else
13722 case $gcc_cv_objdump in
13723 [\\/]* | ?:[\\/]*)
13724 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
13725 ;;
13726 *)
13727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13728for as_dir in $gcc_cv_tool_dirs
13729do
13730 IFS=$as_save_IFS
13731 test -z "$as_dir" && as_dir=.
13732 for ac_exec_ext in '' $ac_executable_extensions; do
13733 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13734 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
13735 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13736 break 2
13737 fi
13738done
13739done
13740
13741 ;;
13742esac
13743fi
13744gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
13745
13746if test -n "$gcc_cv_objdump"; then
13747 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13748echo "${ECHO_T}$gcc_cv_objdump" >&6
13749else
13750 echo "$as_me:$LINENO: result: no" >&5
13751echo "${ECHO_T}no" >&6
13752fi
13753
13754 test -n "$gcc_cv_objdump" && break
13755done
13756
13757 fi
13758fi
13759if test "x$gcc_cv_objdump" = x; then
13760 # If the loop above did not find a tool, then use whatever
13761 # one we can find in the users's path. We are looking for a
13762 # ${build} -> ${target} tool.
13763 if test "x$program_prefix" != xNONE; then
13764 default_tool_name=${program_prefix}objdump
13765 elif test x$build != x$host && test x$build != x$target; then
13766 default_tool_name=${target_noncanonical}-objdump
13767 else
13768 default_tool_name=`echo objdump | sed "${program_transform_name}"`
13769 fi
13770 for ac_prog in $default_tool_name
13771do
13772 # Extract the first word of "$ac_prog", so it can be a program name with args.
13773set dummy $ac_prog; ac_word=$2
13774echo "$as_me:$LINENO: checking for $ac_word" >&5
13775echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13776if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
13777 echo $ECHO_N "(cached) $ECHO_C" >&6
13778else
13779 case $gcc_cv_objdump in
13780 [\\/]* | ?:[\\/]*)
13781 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
13782 ;;
13783 *)
13784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13785for as_dir in $PATH
13786do
13787 IFS=$as_save_IFS
13788 test -z "$as_dir" && as_dir=.
13789 for ac_exec_ext in '' $ac_executable_extensions; do
13790 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13791 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
13792 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13793 break 2
13794 fi
13795done
13796done
13797
13798 ;;
13799esac
74e387fc 13800fi
ae74ffb7 13801gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
13802
13803if test -n "$gcc_cv_objdump"; then
13804 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13805echo "${ECHO_T}$gcc_cv_objdump" >&6
13806else
13807 echo "$as_me:$LINENO: result: no" >&5
13808echo "${ECHO_T}no" >&6
13809fi
13810
13811 test -n "$gcc_cv_objdump" && break
13812done
13813test -n "$gcc_cv_objdump" || gcc_cv_objdump="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext"
13814
13815fi
13816test "$silent" != yes && exec 6>&1
13817
13818ORIGINAL_OBJDUMP_FOR_TARGET="$gcc_cv_objdump"
13819
13820echo "$as_me:$LINENO: checking what objdump to use" >&5
13821echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
37c5bbf8 13822case $in_tree_objdump in
6a8964db 13823 yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5
13824echo "${ECHO_T}\"newly built objdump\"" >&6 ;;
13825 no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13826echo "${ECHO_T}$gcc_cv_objdump" >&6 ;;
37c5bbf8 13827esac
74e387fc 13828
398f3874 13829# Figure out what assembler alignment features are present.
6a8964db 13830echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13831echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
13832if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13833 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 13834else
13835 gcc_cv_as_balign_and_p2align=no
13836 if test $in_tree_gas = yes; then
13837 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13838 then gcc_cv_as_balign_and_p2align=yes
13839fi
13840 elif test x$gcc_cv_as != x; then
c9cd172c 13841 echo '.balign 4
6d6c1801 13842.p2align 2' > conftest.s
6a8964db 13843 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13845 (eval $ac_try) 2>&5
13846 ac_status=$?
13847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13848 (exit $ac_status); }; }
6d6c1801 13849 then
13850 gcc_cv_as_balign_and_p2align=yes
13851 else
13852 echo "configure: failed program was" >&5
13853 cat conftest.s >&5
13854 fi
13855 rm -f conftest.o conftest.s
13856 fi
13857fi
6a8964db 13858echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13859echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
12b432e0 13860if test $gcc_cv_as_balign_and_p2align = yes; then
6a8964db 13861
13862cat >>confdefs.h <<\_ACEOF
398f3874 13863#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6a8964db 13864_ACEOF
398f3874 13865
667fe30b 13866fi
13867
6a8964db 13868echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13869echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
13870if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13871 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 13872else
13873 gcc_cv_as_max_skip_p2align=no
13874 if test $in_tree_gas = yes; then
13875 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13876 then gcc_cv_as_max_skip_p2align=yes
13877fi
13878 elif test x$gcc_cv_as != x; then
c9cd172c 13879 echo '.p2align 4,,7' > conftest.s
6a8964db 13880 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13882 (eval $ac_try) 2>&5
13883 ac_status=$?
13884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13885 (exit $ac_status); }; }
6d6c1801 13886 then
13887 gcc_cv_as_max_skip_p2align=yes
13888 else
13889 echo "configure: failed program was" >&5
13890 cat conftest.s >&5
13891 fi
13892 rm -f conftest.o conftest.s
13893 fi
667fe30b 13894fi
6a8964db 13895echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13896echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
12b432e0 13897if test $gcc_cv_as_max_skip_p2align = yes; then
6a8964db 13898
13899cat >>confdefs.h <<\_ACEOF
3245cd4f 13900#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6a8964db 13901_ACEOF
3245cd4f 13902
3245cd4f 13903fi
667fe30b 13904
6a8964db 13905echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13906echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
13907if test "${gcc_cv_as_subsection_m1+set}" = set; then
13908 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 13909else
13910 gcc_cv_as_subsection_m1=no
13911 if test $in_tree_gas = yes; then
13912 if test $in_tree_gas_is_elf = yes \
13913 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13914 then gcc_cv_as_subsection_m1=yes
667fe30b 13915fi
6d6c1801 13916 elif test x$gcc_cv_as != x; then
c9cd172c 13917 echo 'conftest_label1: .word 0
b6d28b19 13918.subsection -1
13919conftest_label2: .word 0
6d6c1801 13920.previous' > conftest.s
6a8964db 13921 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13923 (eval $ac_try) 2>&5
13924 ac_status=$?
13925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13926 (exit $ac_status); }; }
6d6c1801 13927 then
13928 if test x$gcc_cv_nm != x; then
13929 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13930 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13931 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13932 then :
13933 else gcc_cv_as_subsection_m1=yes
13934 fi
13935 rm -f conftest.nm1 conftest.nm2
13936 fi
13937 else
13938 echo "configure: failed program was" >&5
13939 cat conftest.s >&5
13940 fi
13941 rm -f conftest.o conftest.s
13942 fi
398f3874 13943fi
6a8964db 13944echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13945echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
12b432e0 13946if test $gcc_cv_as_subsection_m1 = yes; then
6a8964db 13947
13948cat >>confdefs.h <<\_ACEOF
398f3874 13949#define HAVE_GAS_SUBSECTION_ORDERING 1
6a8964db 13950_ACEOF
398f3874 13951
b6d28b19 13952fi
667fe30b 13953
6a8964db 13954echo "$as_me:$LINENO: checking assembler for .weak" >&5
13955echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
13956if test "${gcc_cv_as_weak+set}" = set; then
13957 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 13958else
13959 gcc_cv_as_weak=no
13960 if test $in_tree_gas = yes; then
13961 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13962 then gcc_cv_as_weak=yes
667fe30b 13963fi
6d6c1801 13964 elif test x$gcc_cv_as != x; then
c9cd172c 13965 echo ' .weak foobar' > conftest.s
6a8964db 13966 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13968 (eval $ac_try) 2>&5
13969 ac_status=$?
13970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13971 (exit $ac_status); }; }
6d6c1801 13972 then
13973 gcc_cv_as_weak=yes
13974 else
13975 echo "configure: failed program was" >&5
13976 cat conftest.s >&5
13977 fi
13978 rm -f conftest.o conftest.s
13979 fi
398f3874 13980fi
6a8964db 13981echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13982echo "${ECHO_T}$gcc_cv_as_weak" >&6
12b432e0 13983if test $gcc_cv_as_weak = yes; then
6a8964db 13984
13985cat >>confdefs.h <<\_ACEOF
398f3874 13986#define HAVE_GAS_WEAK 1
6a8964db 13987_ACEOF
398f3874 13988
1a8c3b27 13989fi
667fe30b 13990
f4a30bd7 13991echo "$as_me:$LINENO: checking assembler for .weakref" >&5
13992echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
13993if test "${gcc_cv_as_weakref+set}" = set; then
13994 echo $ECHO_N "(cached) $ECHO_C" >&6
13995else
13996 gcc_cv_as_weakref=no
13997 if test $in_tree_gas = yes; then
13998 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
13999 then gcc_cv_as_weakref=yes
14000fi
14001 elif test x$gcc_cv_as != x; then
14002 echo ' .weakref foobar, barfnot' > conftest.s
14003 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14005 (eval $ac_try) 2>&5
14006 ac_status=$?
14007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14008 (exit $ac_status); }; }
14009 then
14010 gcc_cv_as_weakref=yes
14011 else
14012 echo "configure: failed program was" >&5
14013 cat conftest.s >&5
14014 fi
14015 rm -f conftest.o conftest.s
14016 fi
14017fi
14018echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
14019echo "${ECHO_T}$gcc_cv_as_weakref" >&6
14020if test $gcc_cv_as_weakref = yes; then
14021
14022cat >>confdefs.h <<\_ACEOF
14023#define HAVE_GAS_WEAKREF 1
14024_ACEOF
14025
14026fi
14027
2455c36b 14028echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
14029echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
14030if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
14031 echo $ECHO_N "(cached) $ECHO_C" >&6
14032else
14033 gcc_cv_as_nsubspa_comdat=no
14034 if test $in_tree_gas = yes; then
14035 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14036 then gcc_cv_as_nsubspa_comdat=yes
14037fi
14038 elif test x$gcc_cv_as != x; then
14039 echo ' .SPACE $TEXT$
14040 .NSUBSPA $CODE$,COMDAT' > conftest.s
14041 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14043 (eval $ac_try) 2>&5
14044 ac_status=$?
14045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14046 (exit $ac_status); }; }
14047 then
14048 gcc_cv_as_nsubspa_comdat=yes
14049 else
14050 echo "configure: failed program was" >&5
14051 cat conftest.s >&5
14052 fi
14053 rm -f conftest.o conftest.s
14054 fi
14055fi
14056echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
14057echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
14058if test $gcc_cv_as_nsubspa_comdat = yes; then
14059
14060cat >>confdefs.h <<\_ACEOF
14061#define HAVE_GAS_NSUBSPA_COMDAT 1
14062_ACEOF
14063
14064fi
14065
6d6c1801 14066# .hidden needs to be supported in both the assembler and the linker,
14067# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
14068# This is irritatingly difficult to feature test for; we have to check the
14069# date string after the version number. If we've got an in-tree
14070# ld, we don't know its patchlevel version, so we set the baseline at 2.13
14071# to be safe.
14072# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
6a8964db 14073echo "$as_me:$LINENO: checking assembler for .hidden" >&5
14074echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
14075if test "${gcc_cv_as_hidden+set}" = set; then
14076 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 14077else
14078 gcc_cv_as_hidden=no
14079 if test $in_tree_gas = yes; then
14080 if test $in_tree_gas_is_elf = yes \
14081 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
14082 then gcc_cv_as_hidden=yes
14083fi
14084 elif test x$gcc_cv_as != x; then
c9cd172c 14085 echo ' .hidden foobar
6d6c1801 14086foobar:' > conftest.s
6a8964db 14087 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14089 (eval $ac_try) 2>&5
14090 ac_status=$?
14091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14092 (exit $ac_status); }; }
6d6c1801 14093 then
14094 gcc_cv_as_hidden=yes
14095 else
14096 echo "configure: failed program was" >&5
14097 cat conftest.s >&5
14098 fi
14099 rm -f conftest.o conftest.s
14100 fi
14101fi
6a8964db 14102echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
14103echo "${ECHO_T}$gcc_cv_as_hidden" >&6
12b432e0 14104
667fe30b 14105
6a8964db 14106echo "$as_me:$LINENO: checking linker for .hidden support" >&5
14107echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
14108if test "${gcc_cv_ld_hidden+set}" = set; then
14109 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 14110else
14111 if test $in_tree_ld = yes ; then
14112 gcc_cv_ld_hidden=no
14113 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 \
14114 && test $in_tree_ld_is_elf = yes; then
14115 gcc_cv_ld_hidden=yes
14116 fi
14117else
14118 gcc_cv_ld_hidden=yes
43557a8f 14119 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
6d6c1801 14120 if echo "$ld_ver" | grep GNU > /dev/null; then
14121 ld_vers=`echo $ld_ver | sed -n \
14122 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
14123 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
14124 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
14125 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
14126 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
2593b9be 14127 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
14128 -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 14129 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 14130 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
14131 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
14132 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
6d6c1801 14133 if test 0"$ld_date" -lt 20020404; then
14134 if test -n "$ld_date"; then
14135 # If there was date string, but was earlier than 2002-04-04, fail
14136 gcc_cv_ld_hidden=no
14137 elif test -z "$ld_vers"; then
14138 # If there was no date string nor ld version number, something is wrong
14139 gcc_cv_ld_hidden=no
14140 else
6d6c1801 14141 test -z "$ld_vers_patch" && ld_vers_patch=0
14142 if test "$ld_vers_major" -lt 2; then
14143 gcc_cv_ld_hidden=no
14144 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
14145 gcc_cv_ld_hidden="no"
14146 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
14147 gcc_cv_ld_hidden=no
a985a485 14148 fi
6d6c1801 14149 fi
61ab9ea9 14150 fi
6d6c1801 14151 else
6f8f5d6c 14152 case "${target}" in
ecb7c90c 14153 hppa64*-*-hpux* | ia64*-*-hpux*)
6f8f5d6c 14154 gcc_cv_ld_hidden=yes
14155 ;;
14156 *)
14157 gcc_cv_ld_hidden=no
14158 ;;
14159 esac
6d6c1801 14160 fi
14161fi
cec3745c 14162fi
6a8964db 14163echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
14164echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
6d6c1801 14165libgcc_visibility=no
667fe30b 14166
fcd42b1e 14167
bf4c475e 14168if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
6d6c1801 14169 libgcc_visibility=yes
6a8964db 14170
14171cat >>confdefs.h <<\_ACEOF
6d6c1801 14172#define HAVE_GAS_HIDDEN 1
6a8964db 14173_ACEOF
667fe30b 14174
14175fi
14176
6d6c1801 14177# Check if we have .[us]leb128, and support symbol arithmetic with it.
6a8964db 14178echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
14179echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
14180if test "${gcc_cv_as_leb128+set}" = set; then
14181 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 14182else
14183 gcc_cv_as_leb128=no
14184 if test $in_tree_gas = yes; then
14185 if test $in_tree_gas_is_elf = yes \
14186 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14187 then gcc_cv_as_leb128=yes
14188fi
14189 elif test x$gcc_cv_as != x; then
c9cd172c 14190 echo ' .data
37a2e188 14191 .uleb128 L2 - L1
14192L1:
14193 .uleb128 1280
14194 .sleb128 -1010
6d6c1801 14195L2:' > conftest.s
6a8964db 14196 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14198 (eval $ac_try) 2>&5
14199 ac_status=$?
14200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14201 (exit $ac_status); }; }
6d6c1801 14202 then
14203 # GAS versions before 2.11 do not support uleb128,
14204 # despite appearing to.
14205 # ??? There exists an elf-specific test that will crash
14206 # the assembler. Perhaps it's better to figure out whether
14207 # arbitrary sections are supported and try the test.
43557a8f 14208 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
6d6c1801 14209 if echo "$as_ver" | grep GNU > /dev/null; then
14210 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
14211 as_major=`echo $as_ver | sed 's/\..*//'`
14212 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
14213 if test $as_major -eq 2 && test $as_minor -lt 11
14214 then :
14215 else gcc_cv_as_leb128=yes
14216 fi
14217 fi
14218 else
14219 echo "configure: failed program was" >&5
14220 cat conftest.s >&5
14221 fi
14222 rm -f conftest.o conftest.s
14223 fi
37a2e188 14224fi
6a8964db 14225echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
14226echo "${ECHO_T}$gcc_cv_as_leb128" >&6
12b432e0 14227if test $gcc_cv_as_leb128 = yes; then
6a8964db 14228
14229cat >>confdefs.h <<\_ACEOF
37a2e188 14230#define HAVE_AS_LEB128 1
6a8964db 14231_ACEOF
37a2e188 14232
14233fi
667fe30b 14234
6d6c1801 14235# GAS versions up to and including 2.11.0 may mis-optimize
14236# .eh_frame data.
6a8964db 14237echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
14238echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
14239if test "${gcc_cv_as_eh_frame+set}" = set; then
14240 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 14241else
14242 gcc_cv_as_eh_frame=no
14243 if test $in_tree_gas = yes; then
14244 if test $in_tree_gas_is_elf = yes \
14245 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14246 then gcc_cv_as_eh_frame=yes
667fe30b 14247fi
6d6c1801 14248 elif test x$gcc_cv_as != x; then
c9cd172c 14249 echo ' .text
c3f311c4 14250.LFB1:
14251 .4byte 0
14252.L1:
14253 .4byte 0
14254.LFE1:
14255 .section .eh_frame,"aw",@progbits
14256__FRAME_BEGIN__:
14257 .4byte .LECIE1-.LSCIE1
14258.LSCIE1:
14259 .4byte 0x0
14260 .byte 0x1
14261 .ascii "z\0"
14262 .byte 0x1
14263 .byte 0x78
14264 .byte 0x1a
14265 .byte 0x0
14266 .byte 0x4
14267 .4byte 1
14268 .p2align 1
14269.LECIE1:
14270.LSFDE1:
14271 .4byte .LEFDE1-.LASFDE1
14272.LASFDE1:
14273 .4byte .LASFDE1-__FRAME_BEGIN__
14274 .4byte .LFB1
14275 .4byte .LFE1-.LFB1
14276 .byte 0x4
14277 .4byte .LFE1-.LFB1
14278 .byte 0x4
14279 .4byte .L1-.LFB1
6d6c1801 14280.LEFDE1:' > conftest.s
6a8964db 14281 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14283 (eval $ac_try) 2>&5
14284 ac_status=$?
14285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14286 (exit $ac_status); }; }
6d6c1801 14287 then
14288 cat > conftest.lit <<EOF
c3f311c4 14289 0000 10000000 00000000 017a0001 781a0004 .........z..x...
14290 0010 01000000 12000000 18000000 00000000 ................
9af7c2e2 14291 0020 08000000 04080000 0044 .........D
82ebecf9 14292EOF
6a8964db 14293cat > conftest.big <<EOF
82ebecf9 14294 0000 00000010 00000000 017a0001 781a0004 .........z..x...
14295 0010 00000001 00000012 00000018 00000000 ................
9af7c2e2 14296 0020 00000008 04000000 0844 .........D
c3f311c4 14297EOF
6d6c1801 14298 # If the assembler didn't choke, and we can objdump,
14299 # and we got the correct data, then succeed.
14300 if test x$gcc_cv_objdump != x \
14301 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
14302 | tail -3 > conftest.got \
14303 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
14304 || cmp conftest.big conftest.got > /dev/null 2>&1; }
14305 then
14306 gcc_cv_as_eh_frame=yes
6a8964db 14307 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
14308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14309 (eval $ac_try) 2>&5
14310 ac_status=$?
14311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14312 (exit $ac_status); }; }; then
6d6c1801 14313 gcc_cv_as_eh_frame=buggy
14314 else
14315 # Uh oh, what do we do now?
14316 gcc_cv_as_eh_frame=no
14317 fi
14318 else
14319 echo "configure: failed program was" >&5
14320 cat conftest.s >&5
14321 fi
14322 rm -f conftest.o conftest.s
14323 fi
c3f311c4 14324fi
6a8964db 14325echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
14326echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
667fe30b 14327
c9cd172c 14328
12b432e0 14329if test $gcc_cv_as_eh_frame = buggy; then
6a8964db 14330
14331cat >>confdefs.h <<\_ACEOF
6d6c1801 14332#define USE_AS_TRADITIONAL_FORMAT 1
6a8964db 14333_ACEOF
667fe30b 14334
14335fi
14336
6a8964db 14337echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14338echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
14339if test "${gcc_cv_as_shf_merge+set}" = set; then
14340 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 14341else
14342 gcc_cv_as_shf_merge=no
14343 if test $in_tree_gas = yes; then
14344 if test $in_tree_gas_is_elf = yes \
14345 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14346 then gcc_cv_as_shf_merge=yes
14347fi
14348 elif test x$gcc_cv_as != x; then
c9cd172c 14349 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
6a8964db 14350 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14352 (eval $ac_try) 2>&5
14353 ac_status=$?
14354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14355 (exit $ac_status); }; }
6d6c1801 14356 then
14357 gcc_cv_as_shf_merge=yes
14358 else
14359 echo "configure: failed program was" >&5
14360 cat conftest.s >&5
14361 fi
14362 rm -f conftest.o conftest.s
14363 fi
bb2821c0 14364fi
6a8964db 14365echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14366echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
6d6c1801 14367
537cd941 14368if test $gcc_cv_as_shf_merge = no; then
14369 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14370echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
14371if test "${gcc_cv_as_shf_merge+set}" = set; then
14372 echo $ECHO_N "(cached) $ECHO_C" >&6
14373else
14374 gcc_cv_as_shf_merge=no
14375 if test $in_tree_gas = yes; then
14376 if test $in_tree_gas_is_elf = yes \
14377 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14378 then gcc_cv_as_shf_merge=yes
14379fi
14380 elif test x$gcc_cv_as != x; then
14381 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
14382 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14384 (eval $ac_try) 2>&5
14385 ac_status=$?
14386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14387 (exit $ac_status); }; }
14388 then
14389 gcc_cv_as_shf_merge=yes
14390 else
14391 echo "configure: failed program was" >&5
14392 cat conftest.s >&5
14393 fi
14394 rm -f conftest.o conftest.s
14395 fi
14396fi
14397echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14398echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
14399
14400fi
2333aa54 14401
6a8964db 14402cat >>confdefs.h <<_ACEOF
2333aa54 14403#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
6a8964db 14404_ACEOF
bb2821c0 14405
bb2821c0 14406
537cd941 14407echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14408echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
14409if test "${gcc_cv_as_comdat_group+set}" = set; then
14410 echo $ECHO_N "(cached) $ECHO_C" >&6
14411else
14412 gcc_cv_as_comdat_group=no
14413 if test $in_tree_gas = yes; then
14414 if test $in_tree_gas_is_elf = yes \
2593b9be 14415 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
537cd941 14416 then gcc_cv_as_comdat_group=yes
14417fi
14418 elif test x$gcc_cv_as != x; then
14419 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
14420 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14422 (eval $ac_try) 2>&5
14423 ac_status=$?
14424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14425 (exit $ac_status); }; }
14426 then
14427 gcc_cv_as_comdat_group=yes
14428 else
14429 echo "configure: failed program was" >&5
14430 cat conftest.s >&5
14431 fi
14432 rm -f conftest.o conftest.s
14433 fi
14434fi
14435echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
14436echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
14437
14438if test $gcc_cv_as_comdat_group = yes; then
14439 gcc_cv_as_comdat_group_percent=no
14440else
14441 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14442echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
14443if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
14444 echo $ECHO_N "(cached) $ECHO_C" >&6
14445else
14446 gcc_cv_as_comdat_group_percent=no
14447 if test $in_tree_gas = yes; then
14448 if test $in_tree_gas_is_elf = yes \
2593b9be 14449 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
537cd941 14450 then gcc_cv_as_comdat_group_percent=yes
14451fi
14452 elif test x$gcc_cv_as != x; then
14453 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
14454 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14456 (eval $ac_try) 2>&5
14457 ac_status=$?
14458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14459 (exit $ac_status); }; }
14460 then
14461 gcc_cv_as_comdat_group_percent=yes
14462 else
14463 echo "configure: failed program was" >&5
14464 cat conftest.s >&5
14465 fi
14466 rm -f conftest.o conftest.s
14467 fi
14468fi
14469echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
14470echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
14471
14472fi
2593b9be 14473if test $in_tree_ld != yes && test x"$ld_vers" != x; then
14474 comdat_group=yes
14475 if test 0"$ld_date" -lt 20050308; then
14476 if test -n "$ld_date"; then
14477 # If there was date string, but was earlier than 2005-03-08, fail
14478 comdat_group=no
14479 elif test "$ld_vers_major" -lt 2; then
14480 comdat_group=no
14481 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
14482 comdat_group=no
14483 fi
14484 fi
14485 if test $comdat_group = no; then
14486 gcc_cv_as_comdat_group=no
14487 gcc_cv_as_comdat_group_percent=no
14488 fi
14489fi
537cd941 14490
14491cat >>confdefs.h <<_ACEOF
2593b9be 14492#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 14493_ACEOF
14494
14495
6d6c1801 14496# Thread-local storage - the check is heavily parametrized.
2d6788fe 14497conftest_s=
14498tls_first_major=
14499tls_first_minor=
527d5be8 14500tls_as_opt=
2d6788fe 14501case "$target" in
5f7b9df8 14502 alpha*-*-*)
14503 conftest_s='
14504 .section ".tdata","awT",@progbits
14505foo: .long 25
14506 .text
14507 ldq $27,__tls_get_addr($29) !literal!1
14508 lda $16,foo($29) !tlsgd!1
14509 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
14510 ldq $27,__tls_get_addr($29) !literal!2
14511 lda $16,foo($29) !tlsldm!2
14512 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
14513 ldq $1,foo($29) !gotdtprel
14514 ldah $2,foo($29) !dtprelhi
14515 lda $3,foo($2) !dtprello
14516 lda $4,foo($29) !dtprel
14517 ldq $1,foo($29) !gottprel
14518 ldah $2,foo($29) !tprelhi
14519 lda $3,foo($2) !tprello
14520 lda $4,foo($29) !tprel'
14521 tls_first_major=2
14522 tls_first_minor=13
07a23b4e 14523 tls_as_opt=--fatal-warnings
5f7b9df8 14524 ;;
cfd199cb 14525 frv*-*-*)
14526 conftest_s='
14527 .section ".tdata","awT",@progbits
14528x: .long 25
14529 .text
14530 call #gettlsoff(x)'
14531 tls_first_major=2
14532 tls_first_minor=14
14533 ;;
716b2c5a 14534 hppa*-*-linux*)
14535 conftest_s='
14536t1: .reg %r20
14537t2: .reg %r21
14538gp: .reg %r19
14539 .section ".tdata","awT",@progbits
14540foo: .long 25
14541 .text
14542 .align 4
14543 addil LT%foo-$tls_gdidx$,gp
14544 ldo RT%foo-$tls_gdidx$(%r1),%arg0
14545 b __tls_get_addr
14546 nop
14547 addil LT%foo-$tls_ldidx$,gp
14548 b __tls_get_addr
14549 ldo RT%foo-$tls_ldidx$(%r1),%arg0
14550 addil LR%foo-$tls_dtpoff$,%ret0
14551 ldo RR%foo-$tls_dtpoff$(%r1),%t1
14552 mfctl %cr27,%t1
14553 addil LT%foo-$tls_ieoff$,gp
14554 ldw RT%foo-$tls_ieoff$(%r1),%t2
14555 add %t1,%t2,%t3
14556 mfctl %cr27,%t1
14557 addil LR%foo-$tls_leoff$,%t1
14558 ldo RR%foo-$tls_leoff$(%r1),%t2'
14559 tls_first_major=2
14560 tls_first_minor=15
14561 tls_as_opt=--fatal-warnings
14562 ;;
f655717d 14563 arm*-*-*)
14564 conftest_s='
14565 .section ".tdata","awT",%progbits
14566foo: .long 25
14567 .text
14568.word foo(gottpoff)
14569.word foo(tpoff)
14570.word foo(tlsgd)
14571.word foo(tlsldm)
14572.word foo(tlsldo)'
14573 tls_first_major=2
14574 tls_first_minor=17
14575 ;;
2d6788fe 14576 i[34567]86-*-*)
14577 conftest_s='
14578 .section ".tdata","awT",@progbits
14579foo: .long 25
14580 .text
14581 movl %gs:0, %eax
14582 leal foo@TLSGD(,%ebx,1), %eax
14583 leal foo@TLSLDM(%ebx), %eax
14584 leal foo@DTPOFF(%eax), %edx
14585 movl foo@GOTTPOFF(%ebx), %eax
14586 subl foo@GOTTPOFF(%ebx), %eax
29d8dd5c 14587 addl foo@GOTNTPOFF(%ebx), %eax
14588 movl foo@INDNTPOFF, %eax
2d6788fe 14589 movl $foo@TPOFF, %eax
14590 subl $foo@TPOFF, %eax
14591 leal foo@NTPOFF(%ecx), %eax'
14592 tls_first_major=2
29d8dd5c 14593 tls_first_minor=14
07a23b4e 14594 tls_as_opt=--fatal-warnings
29d8dd5c 14595 ;;
14596 x86_64-*-*)
14597 conftest_s='
14598 .section ".tdata","awT",@progbits
14599foo: .long 25
14600 .text
14601 movq %fs:0, %rax
14602 leaq foo@TLSGD(%rip), %rdi
14603 leaq foo@TLSLD(%rip), %rdi
14604 leaq foo@DTPOFF(%rax), %rdx
14605 movq foo@GOTTPOFF(%rip), %rax
14606 movq $foo@TPOFF, %rax'
14607 tls_first_major=2
14608 tls_first_minor=14
07a23b4e 14609 tls_as_opt=--fatal-warnings
2d6788fe 14610 ;;
c87e09ad 14611 ia64-*-*)
14612 conftest_s='
14613 .section ".tdata","awT",@progbits
14614foo: data8 25
14615 .text
14616 addl r16 = @ltoff(@dtpmod(foo#)), gp
14617 addl r17 = @ltoff(@dtprel(foo#)), gp
14618 addl r18 = @ltoff(@tprel(foo#)), gp
14619 addl r19 = @dtprel(foo#), gp
14620 adds r21 = @dtprel(foo#), r13
14621 movl r23 = @dtprel(foo#)
14622 addl r20 = @tprel(foo#), gp
14623 adds r22 = @tprel(foo#), r13
14624 movl r24 = @tprel(foo#)'
14625 tls_first_major=2
14626 tls_first_minor=13
07a23b4e 14627 tls_as_opt=--fatal-warnings
c87e09ad 14628 ;;
42bdde4b 14629 mips*-*-*)
14630 conftest_s='
14631 .section .tdata,"awT",@progbits
14632x:
14633 .word 2
14634 .text
14635 addiu $4, $28, %tlsgd(x)
14636 addiu $4, $28, %tlsldm(x)
14637 lui $4, %dtprel_hi(x)
14638 addiu $4, $4, %dtprel_lo(x)
14639 lw $4, %gottprel(x)($28)
14640 lui $4, %tprel_hi(x)
14641 addiu $4, $4, %tprel_lo(x)'
14642 tls_first_major=2
14643 tls_first_minor=16
14644 tls_as_opt='-32 --fatal-warnings'
14645 ;;
9b552c45 14646 powerpc-*-*)
14647 conftest_s='
14648 .section ".tdata","awT",@progbits
14649 .align 2
14650ld0: .space 4
14651ld1: .space 4
14652x1: .space 4
14653x2: .space 4
14654x3: .space 4
14655 .text
14656 addi 3,31,ld0@got@tlsgd
14657 bl __tls_get_addr
14658 addi 3,31,x1@got@tlsld
14659 bl __tls_get_addr
14660 addi 9,3,x1@dtprel
14661 addis 9,3,x2@dtprel@ha
14662 addi 9,9,x2@dtprel@l
14663 lwz 9,x3@got@tprel(31)
14664 add 9,9,x@tls
14665 addi 9,2,x1@tprel
14666 addis 9,2,x2@tprel@ha
14667 addi 9,9,x2@tprel@l'
14668 tls_first_major=2
14669 tls_first_minor=14
07a23b4e 14670 tls_as_opt="-a32 --fatal-warnings"
9b552c45 14671 ;;
14672 powerpc64-*-*)
14673 conftest_s='
14674 .section ".tdata","awT",@progbits
14675 .align 3
14676ld0: .space 8
14677ld1: .space 8
14678x1: .space 8
14679x2: .space 8
14680x3: .space 8
14681 .text
14682 addi 3,2,ld0@got@tlsgd
14683 bl .__tls_get_addr
14684 nop
14685 addi 3,2,ld1@toc
14686 bl .__tls_get_addr
14687 nop
14688 addi 3,2,x1@got@tlsld
14689 bl .__tls_get_addr
14690 nop
14691 addi 9,3,x1@dtprel
14692 bl .__tls_get_addr
14693 nop
14694 addis 9,3,x2@dtprel@ha
14695 addi 9,9,x2@dtprel@l
14696 bl .__tls_get_addr
14697 nop
14698 ld 9,x3@got@dtprel(2)
14699 add 9,9,3
14700 bl .__tls_get_addr
14701 nop'
14702 tls_first_major=2
14703 tls_first_minor=14
07a23b4e 14704 tls_as_opt="-a64 --fatal-warnings"
9b552c45 14705 ;;
be00aaa8 14706 s390-*-*)
14707 conftest_s='
14708 .section ".tdata","awT",@progbits
14709foo: .long 25
14710 .text
14711 .long foo@TLSGD
14712 .long foo@TLSLDM
14713 .long foo@DTPOFF
14714 .long foo@NTPOFF
14715 .long foo@GOTNTPOFF
14716 .long foo@INDNTPOFF
14717 l %r1,foo@GOTNTPOFF(%r12)
14718 l %r1,0(%r1):tls_load:foo
14719 bas %r14,0(%r1,%r13):tls_gdcall:foo
14720 bas %r14,0(%r1,%r13):tls_ldcall:foo'
14721 tls_first_major=2
14722 tls_first_minor=14
07a23b4e 14723 tls_as_opt="-m31 --fatal-warnings"
be00aaa8 14724 ;;
14725 s390x-*-*)
14726 conftest_s='
14727 .section ".tdata","awT",@progbits
14728foo: .long 25
14729 .text
14730 .quad foo@TLSGD
14731 .quad foo@TLSLDM
14732 .quad foo@DTPOFF
14733 .quad foo@NTPOFF
14734 .quad foo@GOTNTPOFF
14735 lg %r1,foo@GOTNTPOFF(%r12)
14736 larl %r1,foo@INDNTPOFF
14737 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
14738 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
14739 tls_first_major=2
14740 tls_first_minor=14
07a23b4e 14741 tls_as_opt="-m64 -Aesame --fatal-warnings"
be00aaa8 14742 ;;
ae852eea 14743 sh-*-* | sh[34]-*-*)
14744 conftest_s='
14745 .section ".tdata","awT",@progbits
14746foo: .long 25
14747 .text
14748 .long foo@TLSGD
14749 .long foo@TLSLDM
14750 .long foo@DTPOFF
14751 .long foo@GOTTPOFF
14752 .long foo@TPOFF'
14753 tls_first_major=2
14754 tls_first_minor=13
07a23b4e 14755 tls_as_opt=--fatal-warnings
ae852eea 14756 ;;
05b3a83f 14757 sparc*-*-*)
07a23b4e 14758 case "$target" in
14759 sparc*-sun-solaris2.*)
14760 on_solaris=yes
14761 ;;
14762 *)
14763 on_solaris=no
14764 ;;
14765 esac
14766 if test x$on_solaris = xyes && test x$gas_flag = xno; then
14767 conftest_s='
14768 .section ".tdata",#alloc,#write,#tls
14769foo: .long 25
14770 .text
14771 sethi %tgd_hi22(foo), %o0
14772 add %o0, %tgd_lo10(foo), %o1
14773 add %l7, %o1, %o0, %tgd_add(foo)
14774 call __tls_get_addr, %tgd_call(foo)
14775 sethi %tldm_hi22(foo), %l1
14776 add %l1, %tldm_lo10(foo), %l2
14777 add %l7, %l2, %o0, %tldm_add(foo)
14778 call __tls_get_addr, %tldm_call(foo)
14779 sethi %tldo_hix22(foo), %l3
14780 xor %l3, %tldo_lox10(foo), %l4
14781 add %o0, %l4, %l5, %tldo_add(foo)
14782 sethi %tie_hi22(foo), %o3
14783 add %o3, %tie_lo10(foo), %o3
14784 ld [%l7 + %o3], %o2, %tie_ld(foo)
14785 add %g7, %o2, %o4, %tie_add(foo)
14786 sethi %tle_hix22(foo), %l1
14787 xor %l1, %tle_lox10(foo), %o5
14788 ld [%g7 + %o5], %o1'
14789 tls_first_major=0
14790 tls_first_minor=0
14791 else
14792 conftest_s='
05b3a83f 14793 .section ".tdata","awT",@progbits
14794foo: .long 25
14795 .text
14796 sethi %tgd_hi22(foo), %o0
14797 add %o0, %tgd_lo10(foo), %o1
14798 add %l7, %o1, %o0, %tgd_add(foo)
14799 call __tls_get_addr, %tgd_call(foo)
14800 sethi %tldm_hi22(foo), %l1
14801 add %l1, %tldm_lo10(foo), %l2
14802 add %l7, %l2, %o0, %tldm_add(foo)
14803 call __tls_get_addr, %tldm_call(foo)
14804 sethi %tldo_hix22(foo), %l3
14805 xor %l3, %tldo_lox10(foo), %l4
14806 add %o0, %l4, %l5, %tldo_add(foo)
14807 sethi %tie_hi22(foo), %o3
14808 add %o3, %tie_lo10(foo), %o3
14809 ld [%l7 + %o3], %o2, %tie_ld(foo)
14810 add %g7, %o2, %o4, %tie_add(foo)
14811 sethi %tle_hix22(foo), %l1
14812 xor %l1, %tle_lox10(foo), %o5
14813 ld [%g7 + %o5], %o1'
14814 tls_first_major=2
14815 tls_first_minor=14
07a23b4e 14816 tls_as_opt="-32 --fatal-warnings"
14817 fi
05b3a83f 14818 ;;
2d6788fe 14819esac
14820if test -z "$tls_first_major"; then
6d6c1801 14821 : # If we don't have a check, assume no support.
14822else
6a8964db 14823 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
14824echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
14825if test "${gcc_cv_as_tls+set}" = set; then
14826 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 14827else
14828 gcc_cv_as_tls=no
14829 if test $in_tree_gas = yes; then
14830 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
14831 then gcc_cv_as_tls=yes
667fe30b 14832fi
6d6c1801 14833 elif test x$gcc_cv_as != x; then
c9cd172c 14834 echo "$conftest_s" > conftest.s
07a23b4e 14835 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
6a8964db 14836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14837 (eval $ac_try) 2>&5
14838 ac_status=$?
14839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14840 (exit $ac_status); }; }
6d6c1801 14841 then
14842 gcc_cv_as_tls=yes
14843 else
14844 echo "configure: failed program was" >&5
14845 cat conftest.s >&5
14846 fi
14847 rm -f conftest.o conftest.s
2d6788fe 14848 fi
2d6788fe 14849fi
6a8964db 14850echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
14851echo "${ECHO_T}$gcc_cv_as_tls" >&6
12b432e0 14852if test $gcc_cv_as_tls = yes; then
6a8964db 14853
14854cat >>confdefs.h <<\_ACEOF
2d6788fe 14855#define HAVE_AS_TLS 1
6a8964db 14856_ACEOF
2d6788fe 14857
14858fi
6d6c1801 14859fi
14860
14861# Target-specific assembler checks.
2d6788fe 14862
79f90e2b 14863echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
14864echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
14865gcc_cv_ld_static_dynamic=no
14866if test $in_tree_ld = yes ; then
14867 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
14868 gcc_cv_ld_static_dynamic=yes
14869 fi
14870elif test x$gcc_cv_ld != x; then
14871 # Check if linker supports -Bstatic/-Bdynamic option
14872 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
14873 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
14874 gcc_cv_ld_static_dynamic=yes
14875 fi
14876fi
14877if test x"$gcc_cv_ld_static_dynamic" = xyes; then
14878
14879cat >>confdefs.h <<\_ACEOF
14880#define HAVE_LD_STATIC_DYNAMIC 1
14881_ACEOF
14882
14883fi
14884echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14885echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
14886
9c948bc2 14887if test x"$demangler_in_ld" = xyes; then
14888 echo "$as_me:$LINENO: checking linker --demangle support" >&5
14889echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
14890 gcc_cv_ld_demangle=no
14891 if test $in_tree_ld = yes; then
14892 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 \
14893 gcc_cv_ld_demangle=yes
14894 fi
14895 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14896 # Check if the GNU linker supports --demangle option
14897 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14898 gcc_cv_ld_demangle=yes
14899 fi
14900 fi
14901 if test x"$gcc_cv_ld_demangle" = xyes; then
14902
14903cat >>confdefs.h <<\_ACEOF
14904#define HAVE_LD_DEMANGLE 1
14905_ACEOF
14906
14907 fi
14908 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14909echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
14910fi
14911
8626dbb9 14912case "$target" in
14913 # All TARGET_ABI_OSF targets.
14914 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
6a8964db 14915 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14916echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14917if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14918 echo $ECHO_N "(cached) $ECHO_C" >&6
8626dbb9 14919else
6d6c1801 14920 gcc_cv_as_alpha_explicit_relocs=no
14921 if test $in_tree_gas = yes; then
14922 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14923 then gcc_cv_as_alpha_explicit_relocs=yes
667fe30b 14924fi
6d6c1801 14925 elif test x$gcc_cv_as != x; then
c9cd172c 14926 echo ' .set nomacro
8626dbb9 14927 .text
14928 extbl $3, $2, $3 !lituse_bytoff!1
14929 ldq $2, a($29) !literal!1
14930 ldq $4, b($29) !literal!2
14931 ldq_u $3, 0($2) !lituse_base!1
14932 ldq $27, f($29) !literal!5
14933 jsr $26, ($27), f !lituse_jsr!5
14934 ldah $29, 0($26) !gpdisp!3
14935 lda $0, c($29) !gprel
14936 ldah $1, d($29) !gprelhigh
14937 lda $1, d($1) !gprellow
6d6c1801 14938 lda $29, 0($29) !gpdisp!3' > conftest.s
6a8964db 14939 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14941 (eval $ac_try) 2>&5
14942 ac_status=$?
14943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14944 (exit $ac_status); }; }
6d6c1801 14945 then
14946 gcc_cv_as_alpha_explicit_relocs=yes
14947 else
14948 echo "configure: failed program was" >&5
14949 cat conftest.s >&5
14950 fi
14951 rm -f conftest.o conftest.s
14952 fi
c9e1a048 14953fi
6a8964db 14954echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14955echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
12b432e0 14956if test $gcc_cv_as_alpha_explicit_relocs = yes; then
6a8964db 14957
14958cat >>confdefs.h <<\_ACEOF
8626dbb9 14959#define HAVE_AS_EXPLICIT_RELOCS 1
6a8964db 14960_ACEOF
8626dbb9 14961
592222c2 14962fi
14963 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
14964echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
14965if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
14966 echo $ECHO_N "(cached) $ECHO_C" >&6
14967else
14968 gcc_cv_as_alpha_jsrdirect_relocs=no
14969 if test $in_tree_gas = yes; then
14970 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
14971 then gcc_cv_as_alpha_jsrdirect_relocs=yes
14972fi
14973 elif test x$gcc_cv_as != x; then
14974 echo ' .set nomacro
14975 .text
14976 ldq $27, a($29) !literal!1
14977 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
14978 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14980 (eval $ac_try) 2>&5
14981 ac_status=$?
14982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14983 (exit $ac_status); }; }
14984 then
14985 gcc_cv_as_alpha_jsrdirect_relocs=yes
14986 else
14987 echo "configure: failed program was" >&5
14988 cat conftest.s >&5
14989 fi
14990 rm -f conftest.o conftest.s
14991 fi
14992fi
14993echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
14994echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
14995if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
14996
14997cat >>confdefs.h <<\_ACEOF
14998#define HAVE_AS_JSRDIRECT_RELOCS 1
14999_ACEOF
15000
9ebd0bb2 15001fi
15002 ;;
15003
15004 cris-*-*)
15005 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
15006echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
15007if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
15008 echo $ECHO_N "(cached) $ECHO_C" >&6
15009else
15010 gcc_cv_as_cris_no_mul_bug=no
15011 if test $in_tree_gas = yes; then
15012 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
15013 then gcc_cv_as_cris_no_mul_bug=yes
15014fi
15015 elif test x$gcc_cv_as != x; then
15016 echo '.text' > conftest.s
15017 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
15018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15019 (eval $ac_try) 2>&5
15020 ac_status=$?
15021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15022 (exit $ac_status); }; }
15023 then
15024 gcc_cv_as_cris_no_mul_bug=yes
15025 else
15026 echo "configure: failed program was" >&5
15027 cat conftest.s >&5
15028 fi
15029 rm -f conftest.o conftest.s
15030 fi
15031fi
15032echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
15033echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
15034if test $gcc_cv_as_cris_no_mul_bug = yes; then
15035
15036cat >>confdefs.h <<\_ACEOF
15037#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
15038_ACEOF
15039
6d6c1801 15040fi
8626dbb9 15041 ;;
6d6c1801 15042
d300bd48 15043 sparc*-*-*)
6a8964db 15044 echo "$as_me:$LINENO: checking assembler for .register" >&5
15045echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
15046if test "${gcc_cv_as_sparc_register_op+set}" = set; then
15047 echo $ECHO_N "(cached) $ECHO_C" >&6
0569c094 15048else
6d6c1801 15049 gcc_cv_as_sparc_register_op=no
15050 if test x$gcc_cv_as != x; then
c9cd172c 15051 echo '.register %g2, #scratch' > conftest.s
6a8964db 15052 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15054 (eval $ac_try) 2>&5
15055 ac_status=$?
15056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15057 (exit $ac_status); }; }
6d6c1801 15058 then
15059 gcc_cv_as_sparc_register_op=yes
15060 else
15061 echo "configure: failed program was" >&5
15062 cat conftest.s >&5
15063 fi
15064 rm -f conftest.o conftest.s
15065 fi
c9e1a048 15066fi
6a8964db 15067echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
15068echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
12b432e0 15069if test $gcc_cv_as_sparc_register_op = yes; then
6a8964db 15070
15071cat >>confdefs.h <<\_ACEOF
d300bd48 15072#define HAVE_AS_REGISTER_PSEUDO_OP 1
6a8964db 15073_ACEOF
d300bd48 15074
6d6c1801 15075fi
d300bd48 15076
6a8964db 15077 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
15078echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
15079if test "${gcc_cv_as_sparc_relax+set}" = set; then
15080 echo $ECHO_N "(cached) $ECHO_C" >&6
4c335027 15081else
6d6c1801 15082 gcc_cv_as_sparc_relax=no
15083 if test x$gcc_cv_as != x; then
c9cd172c 15084 echo '.text' > conftest.s
6a8964db 15085 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
15086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15087 (eval $ac_try) 2>&5
15088 ac_status=$?
15089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15090 (exit $ac_status); }; }
6d6c1801 15091 then
15092 gcc_cv_as_sparc_relax=yes
15093 else
15094 echo "configure: failed program was" >&5
15095 cat conftest.s >&5
15096 fi
15097 rm -f conftest.o conftest.s
15098 fi
c9e1a048 15099fi
6a8964db 15100echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
15101echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
12b432e0 15102if test $gcc_cv_as_sparc_relax = yes; then
6a8964db 15103
15104cat >>confdefs.h <<\_ACEOF
4c335027 15105#define HAVE_AS_RELAX_OPTION 1
6a8964db 15106_ACEOF
4c335027 15107
6d6c1801 15108fi
4c335027 15109
6a8964db 15110 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
15111echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
15112if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
15113 echo $ECHO_N "(cached) $ECHO_C" >&6
66e333b1 15114else
6d6c1801 15115 gcc_cv_as_sparc_ua_pcrel=no
15116 if test x$gcc_cv_as != x; then
c9cd172c 15117 echo '.text
6d6c1801 15118foo:
15119 nop
15120.data
15121.align 4
15122.byte 0
15123.uaword %r_disp32(foo)' > conftest.s
6a8964db 15124 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
15125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15126 (eval $ac_try) 2>&5
15127 ac_status=$?
15128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15129 (exit $ac_status); }; }
6d6c1801 15130 then
15131 if test x$gcc_cv_ld != x \
15132 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
15133 gcc_cv_as_sparc_ua_pcrel=yes
15134 fi
15135 rm -f conftest
15136 else
15137 echo "configure: failed program was" >&5
15138 cat conftest.s >&5
15139 fi
15140 rm -f conftest.o conftest.s
15141 fi
c9e1a048 15142fi
6a8964db 15143echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
15144echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
12b432e0 15145if test $gcc_cv_as_sparc_ua_pcrel = yes; then
6a8964db 15146
15147cat >>confdefs.h <<\_ACEOF
66e333b1 15148#define HAVE_AS_SPARC_UA_PCREL 1
6a8964db 15149_ACEOF
66e333b1 15150
66e333b1 15151
6a8964db 15152 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
15153echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
15154if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
15155 echo $ECHO_N "(cached) $ECHO_C" >&6
e715c863 15156else
6d6c1801 15157 gcc_cv_as_sparc_ua_pcrel_hidden=no
15158 if test x$gcc_cv_as != x; then
c9cd172c 15159 echo '.data
6d6c1801 15160.align 4
15161.byte 0x31
15162.uaword %r_disp32(foo)
15163.byte 0x32, 0x33, 0x34
15164.global foo
15165.hidden foo
15166foo:
15167.skip 4' > conftest.s
6a8964db 15168 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
15169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15170 (eval $ac_try) 2>&5
15171 ac_status=$?
15172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15173 (exit $ac_status); }; }
6d6c1801 15174 then
15175 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
15176 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
15177 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
15178 | grep ' 31000000 07323334' > /dev/null 2>&1; then
15179 if $gcc_cv_objdump -R conftest 2> /dev/null \
15180 | grep 'DISP32' > /dev/null 2>&1; then
15181 :
15182 else
15183 gcc_cv_as_sparc_ua_pcrel_hidden=yes
e715c863 15184 fi
6d6c1801 15185 fi
15186 rm -f conftest
15187 else
15188 echo "configure: failed program was" >&5
15189 cat conftest.s >&5
15190 fi
15191 rm -f conftest.o conftest.s
15192 fi
c9e1a048 15193fi
6a8964db 15194echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
15195echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
12b432e0 15196if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
6a8964db 15197
15198cat >>confdefs.h <<\_ACEOF
e715c863 15199#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
6a8964db 15200_ACEOF
e715c863 15201
6d6c1801 15202fi
6a8964db 15203
6d6c1801 15204fi # unaligned pcrel relocs
e715c863 15205
6a8964db 15206 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
15207echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
15208if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
15209 echo $ECHO_N "(cached) $ECHO_C" >&6
0569c094 15210else
6d6c1801 15211 gcc_cv_as_sparc_offsetable_lo10=no
15212 if test x$gcc_cv_as != x; then
c9cd172c 15213 echo '.text
6d6c1801 15214 or %g1, %lo(ab) + 12, %g1
15215 or %g1, %lo(ab + 12), %g1' > conftest.s
6a8964db 15216 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
15217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15218 (eval $ac_try) 2>&5
15219 ac_status=$?
15220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15221 (exit $ac_status); }; }
6d6c1801 15222 then
15223 if test x$gcc_cv_objdump != x \
7908b1a1 15224 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
6d6c1801 15225 | grep ' 82106000 82106000' > /dev/null 2>&1; then
19f7ae9a 15226 gcc_cv_as_sparc_offsetable_lo10=yes
6d6c1801 15227 fi
15228 else
15229 echo "configure: failed program was" >&5
15230 cat conftest.s >&5
15231 fi
15232 rm -f conftest.o conftest.s
15233 fi
c9e1a048 15234fi
6a8964db 15235echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
15236echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
12b432e0 15237if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
6a8964db 15238
15239cat >>confdefs.h <<\_ACEOF
d300bd48 15240#define HAVE_AS_OFFSETABLE_LO10 1
6a8964db 15241_ACEOF
d300bd48 15242
6d6c1801 15243fi
d300bd48 15244 ;;
15245
96b9fbc1 15246 i[34567]86-*-* | x86_64-*-*)
1f10d387 15247 case $target_os in
15248 cygwin* | pe | mingw32*)
15249 # Used for DWARF 2 in PE
15250 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
15251echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
15252if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
15253 echo $ECHO_N "(cached) $ECHO_C" >&6
15254else
15255 gcc_cv_as_ix86_pe_secrel32=no
15256 if test $in_tree_gas = yes; then
15257 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
15258 then gcc_cv_as_ix86_pe_secrel32=yes
15259fi
15260 elif test x$gcc_cv_as != x; then
15261 echo '.text
15262foo: nop
15263.data
15264 .secrel32 foo' > conftest.s
15265 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15267 (eval $ac_try) 2>&5
15268 ac_status=$?
15269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15270 (exit $ac_status); }; }
15271 then
15272 if test x$gcc_cv_ld != x \
15273 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
15274 gcc_cv_as_ix86_pe_secrel32=yes
15275 fi
15276 rm -f conftest
15277 else
15278 echo "configure: failed program was" >&5
15279 cat conftest.s >&5
15280 fi
15281 rm -f conftest.o conftest.s
15282 fi
15283fi
15284echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
15285echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
15286if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
15287
15288cat >>confdefs.h <<\_ACEOF
15289#define HAVE_GAS_PE_SECREL32_RELOC 1
15290_ACEOF
15291
15292fi
15293 ;;
15294 esac
15295
6a8964db 15296 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
15297echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
15298if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
15299 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 15300else
15301 gcc_cv_as_ix86_filds_fists=no
15302 if test $in_tree_gas = yes; then
15303 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
15304 then gcc_cv_as_ix86_filds_fists=yes
667fe30b 15305fi
6d6c1801 15306 elif test x$gcc_cv_as != x; then
c9cd172c 15307 echo 'filds mem; fists mem' > conftest.s
6a8964db 15308 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15310 (eval $ac_try) 2>&5
15311 ac_status=$?
15312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15313 (exit $ac_status); }; }
6d6c1801 15314 then
15315 gcc_cv_as_ix86_filds_fists=yes
15316 else
15317 echo "configure: failed program was" >&5
15318 cat conftest.s >&5
398f3874 15319 fi
6d6c1801 15320 rm -f conftest.o conftest.s
15321 fi
15322fi
6a8964db 15323echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
15324echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
12b432e0 15325if test $gcc_cv_as_ix86_filds_fists = yes; then
6a8964db 15326
15327cat >>confdefs.h <<\_ACEOF
6d6c1801 15328#define HAVE_GAS_FILDS_FISTS 1
6a8964db 15329_ACEOF
667fe30b 15330
65cce9df 15331fi
15332
6a8964db 15333 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
15334echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
15335if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
15336 echo $ECHO_N "(cached) $ECHO_C" >&6
65cce9df 15337else
15338 gcc_cv_as_ix86_cmov_sun_syntax=no
15339 if test x$gcc_cv_as != x; then
c9cd172c 15340 echo 'cmovl.l %edx, %eax' > conftest.s
6a8964db 15341 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15343 (eval $ac_try) 2>&5
15344 ac_status=$?
15345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15346 (exit $ac_status); }; }
65cce9df 15347 then
15348 gcc_cv_as_ix86_cmov_sun_syntax=yes
15349 else
15350 echo "configure: failed program was" >&5
15351 cat conftest.s >&5
15352 fi
15353 rm -f conftest.o conftest.s
15354 fi
15355fi
6a8964db 15356echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
15357echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
12b432e0 15358if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
6a8964db 15359
15360cat >>confdefs.h <<\_ACEOF
65cce9df 15361#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
6a8964db 15362_ACEOF
65cce9df 15363
667fe30b 15364fi
15365
f079b855 15366 # This one is used unconditionally by i386.[ch]; it is to be defined
15367 # to 1 if the feature is present, 0 otherwise.
6a8964db 15368 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
15369echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
15370if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
15371 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 15372else
15373 gcc_cv_as_ix86_gotoff_in_data=no
15374 if test $in_tree_gas = yes; then
15375 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15376 then gcc_cv_as_ix86_gotoff_in_data=yes
15377fi
15378 elif test x$gcc_cv_as != x; then
c9cd172c 15379 echo ' .text
bb006a84 15380.L0:
15381 nop
15382 .data
6d6c1801 15383 .long .L0@GOTOFF' > conftest.s
6a8964db 15384 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15386 (eval $ac_try) 2>&5
15387 ac_status=$?
15388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15389 (exit $ac_status); }; }
6d6c1801 15390 then
15391 gcc_cv_as_ix86_gotoff_in_data=yes
15392 else
15393 echo "configure: failed program was" >&5
15394 cat conftest.s >&5
bb006a84 15395 fi
6d6c1801 15396 rm -f conftest.o conftest.s
15397 fi
15398fi
6a8964db 15399echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
15400echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
6d6c1801 15401
f079b855 15402
6a8964db 15403cat >>confdefs.h <<_ACEOF
f079b855 15404#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
6a8964db 15405_ACEOF
bb006a84 15406
d300bd48 15407 ;;
0cc4b4a2 15408
15409 ia64*-*-*)
6a8964db 15410 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
15411echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
15412if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
15413 echo $ECHO_N "(cached) $ECHO_C" >&6
0cc4b4a2 15414else
6d6c1801 15415 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
15416 if test $in_tree_gas = yes; then
15417 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15418 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
667fe30b 15419fi
6d6c1801 15420 elif test x$gcc_cv_as != x; then
c9cd172c 15421 echo ' .text
0cc4b4a2 15422 addl r15 = @ltoffx(x#), gp
15423 ;;
13f3d840 15424 ld8.mov r16 = [r15], x#' > conftest.s
6a8964db 15425 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15427 (eval $ac_try) 2>&5
15428 ac_status=$?
15429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15430 (exit $ac_status); }; }
6d6c1801 15431 then
13f3d840 15432 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
6d6c1801 15433 else
15434 echo "configure: failed program was" >&5
15435 cat conftest.s >&5
24880e5b 15436 fi
6d6c1801 15437 rm -f conftest.o conftest.s
15438 fi
15439fi
6a8964db 15440echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
15441echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
12b432e0 15442if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
6a8964db 15443
15444cat >>confdefs.h <<\_ACEOF
13f3d840 15445#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
6a8964db 15446_ACEOF
6d6c1801 15447
13f3d840 15448fi
6d6c1801 15449
24880e5b 15450 ;;
6d6c1801 15451
24880e5b 15452 powerpc*-*-*)
6d6c1801 15453 case $target in
a8bb341c 15454 *-*-aix*) conftest_s=' .machine "pwr5"
15455 .csect .text[PR]
3ba829c3 15456 mfcr 3,128';;
cd0c3d24 15457 *-*-darwin*)
15458 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
15459echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
15460if test "${gcc_cv_as_machine_directive+set}" = set; then
15461 echo $ECHO_N "(cached) $ECHO_C" >&6
15462else
15463 gcc_cv_as_machine_directive=no
15464 if test x$gcc_cv_as != x; then
15465 echo ' .machine ppc7400' > conftest.s
15466 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15468 (eval $ac_try) 2>&5
15469 ac_status=$?
15470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15471 (exit $ac_status); }; }
15472 then
15473 gcc_cv_as_machine_directive=yes
15474 else
15475 echo "configure: failed program was" >&5
15476 cat conftest.s >&5
15477 fi
15478 rm -f conftest.o conftest.s
15479 fi
15480fi
15481echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
15482echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
15483
15484 if test x$gcc_cv_as_machine_directive != xyes; then
15485 echo "*** This target requires an assembler supporting \".machine\"" >&2
15486 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
15487 test x$build = x$target && exit 1
15488 fi
15489 conftest_s=' .text
3ba829c3 15490 mfcr r3,128';;
ce1a729a 15491 *) conftest_s=' .machine power4
4adb2d8e 15492 .text
3ba829c3 15493 mfcr 3,128';;
6d6c1801 15494 esac
6d6c1801 15495
6a8964db 15496 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
15497echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
15498if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
15499 echo $ECHO_N "(cached) $ECHO_C" >&6
24880e5b 15500else
6d6c1801 15501 gcc_cv_as_powerpc_mfcrf=no
15502 if test $in_tree_gas = yes; then
15503 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15504 then gcc_cv_as_powerpc_mfcrf=yes
24880e5b 15505fi
6d6c1801 15506 elif test x$gcc_cv_as != x; then
c9cd172c 15507 echo "$conftest_s" > conftest.s
6a8964db 15508 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15510 (eval $ac_try) 2>&5
15511 ac_status=$?
15512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15513 (exit $ac_status); }; }
6d6c1801 15514 then
15515 gcc_cv_as_powerpc_mfcrf=yes
15516 else
15517 echo "configure: failed program was" >&5
15518 cat conftest.s >&5
15519 fi
15520 rm -f conftest.o conftest.s
15521 fi
24880e5b 15522fi
6a8964db 15523echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
15524echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
12b432e0 15525if test $gcc_cv_as_powerpc_mfcrf = yes; then
6a8964db 15526
15527cat >>confdefs.h <<\_ACEOF
24880e5b 15528#define HAVE_AS_MFCRF 1
6a8964db 15529_ACEOF
0cc4b4a2 15530
6d6c1801 15531fi
a8bb341c 15532
15533 case $target in
15534 *-*-aix*) conftest_s=' .machine "pwr5"
15535 .csect .text[PR]
15536 popcntb 3,3';;
15537 *) conftest_s=' .machine power5
15538 .text
15539 popcntb 3,3';;
15540 esac
15541
15542 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
15543echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
15544if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
15545 echo $ECHO_N "(cached) $ECHO_C" >&6
15546else
15547 gcc_cv_as_powerpc_popcntb=no
15548 if test $in_tree_gas = yes; then
15549 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15550 then gcc_cv_as_powerpc_popcntb=yes
15551fi
15552 elif test x$gcc_cv_as != x; then
15553 echo "$conftest_s" > conftest.s
15554 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15556 (eval $ac_try) 2>&5
15557 ac_status=$?
15558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15559 (exit $ac_status); }; }
15560 then
15561 gcc_cv_as_powerpc_popcntb=yes
15562 else
15563 echo "configure: failed program was" >&5
15564 cat conftest.s >&5
15565 fi
15566 rm -f conftest.o conftest.s
15567 fi
15568fi
15569echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
15570echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
15571if test $gcc_cv_as_powerpc_popcntb = yes; then
15572
15573cat >>confdefs.h <<\_ACEOF
15574#define HAVE_AS_POPCNTB 1
15575_ACEOF
15576
a6018579 15577fi
15578
15579 case $target in
15580 *-*-aix*) conftest_s=' .machine "pwr5x"
15581 .csect .text[PR]
15582 frin 1,1';;
015fab10 15583 *) conftest_s=' .machine power5
a6018579 15584 .text
15585 frin 1,1';;
15586 esac
15587
15588 echo "$as_me:$LINENO: checking assembler for fp round support" >&5
15589echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
15590if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
15591 echo $ECHO_N "(cached) $ECHO_C" >&6
15592else
15593 gcc_cv_as_powerpc_fprnd=no
15594 if test $in_tree_gas = yes; then
15595 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15596 then gcc_cv_as_powerpc_fprnd=yes
15597fi
15598 elif test x$gcc_cv_as != x; then
15599 echo "$conftest_s" > conftest.s
15600 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15602 (eval $ac_try) 2>&5
15603 ac_status=$?
15604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15605 (exit $ac_status); }; }
15606 then
15607 gcc_cv_as_powerpc_fprnd=yes
15608 else
15609 echo "configure: failed program was" >&5
15610 cat conftest.s >&5
15611 fi
15612 rm -f conftest.o conftest.s
15613 fi
15614fi
15615echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
15616echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
15617if test $gcc_cv_as_powerpc_fprnd = yes; then
15618
15619cat >>confdefs.h <<\_ACEOF
15620#define HAVE_AS_FPRND 1
15621_ACEOF
15622
a8bb341c 15623fi
15624
197f58fa 15625 case $target in
15626 *-*-aix*) conftest_s=' .csect .text[PR]
15627LCF..0:
15628 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
15629 *-*-darwin*)
15630 conftest_s=' .text
15631LCF0:
15632 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
15633 *) conftest_s=' .text
15634.LCF0:
15635 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
15636 esac
15637
15638 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
15639echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
15640if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
15641 echo $ECHO_N "(cached) $ECHO_C" >&6
15642else
15643 gcc_cv_as_powerpc_rel16=no
15644 if test $in_tree_gas = yes; then
15645 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15646 then gcc_cv_as_powerpc_rel16=yes
15647fi
15648 elif test x$gcc_cv_as != x; then
15649 echo "$conftest_s" > conftest.s
15650 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15652 (eval $ac_try) 2>&5
15653 ac_status=$?
15654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15655 (exit $ac_status); }; }
15656 then
15657 gcc_cv_as_powerpc_rel16=yes
15658 else
15659 echo "configure: failed program was" >&5
15660 cat conftest.s >&5
15661 fi
15662 rm -f conftest.o conftest.s
15663 fi
15664fi
15665echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
15666echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
15667if test $gcc_cv_as_powerpc_rel16 = yes; then
15668
15669cat >>confdefs.h <<\_ACEOF
15670#define HAVE_AS_REL16 1
15671_ACEOF
15672
15673fi
6d6c1801 15674 ;;
15675
15676 mips*-*-*)
6a8964db 15677 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
15678echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
15679if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
15680 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 15681else
15682 gcc_cv_as_mips_explicit_relocs=no
15683 if test $in_tree_gas = yes; then
15684 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15685 then gcc_cv_as_mips_explicit_relocs=yes
15686fi
15687 elif test x$gcc_cv_as != x; then
c9cd172c 15688 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
6a8964db 15689 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15691 (eval $ac_try) 2>&5
15692 ac_status=$?
15693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15694 (exit $ac_status); }; }
6d6c1801 15695 then
15696 gcc_cv_as_mips_explicit_relocs=yes
15697 else
15698 echo "configure: failed program was" >&5
15699 cat conftest.s >&5
0cc4b4a2 15700 fi
6d6c1801 15701 rm -f conftest.o conftest.s
15702 fi
15703fi
6a8964db 15704echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
15705echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
6d6c1801 15706if test $gcc_cv_as_mips_explicit_relocs = yes; then
15707 if test x$target_cpu_default = x
15708 then target_cpu_default=MASK_EXPLICIT_RELOCS
15709 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
15710 fi
15711fi
c8aeaa6d 15712 ;;
15713esac
6d6c1801 15714
c8aeaa6d 15715# Mips and HP-UX need the GNU assembler.
15716# Linux on IA64 might be able to use the Intel assembler.
15717
15718case "$target" in
15719 mips*-*-* | *-*-hpux* )
6e930e6c 15720 if test x$gas_flag = xyes \
15721 || test x"$host" != x"$build" \
15722 || test ! -x "$gcc_cv_as" \
15723 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
15724 :
15725 else
15726 echo "*** This configuration requires the GNU assembler" >&2
15727 exit 1
15728 fi
0cc4b4a2 15729 ;;
d300bd48 15730esac
c8aeaa6d 15731
142cf471 15732# ??? Not all targets support dwarf2 debug_line, even within a version
15733# of gas. Moreover, we need to emit a valid instruction to trigger any
15734# info to the output file. So, as supported targets are added to gas 2.11,
15735# add some instruction here to (also) show we expect this might work.
15736# ??? Once 2.11 is released, probably need to add first known working
15737# version to the per-target configury.
15738case "$target" in
549c28fd 15739 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
482662fd 15740 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
1c69223f 15741 | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-*)
142cf471 15742 insn="nop"
15743 ;;
15dff672 15744 ia64*-*-* | s390*-*-*)
142cf471 15745 insn="nop 0"
15746 ;;
482662fd 15747 mmix-*-*)
15748 insn="swym 0"
15749 ;;
6d6c1801 15750esac
15751if test x"$insn" != x; then
15752 conftest_s="\
15753 .file 1 \"conftest.s\"
15754 .loc 1 3 0
15755 $insn"
6a8964db 15756 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
15757echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
15758if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
15759 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 15760else
15761 gcc_cv_as_dwarf2_debug_line=no
15762 if test $in_tree_gas = yes; then
15763 if test $in_tree_gas_is_elf = yes \
15764 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15765 then gcc_cv_as_dwarf2_debug_line=yes
15766fi
15767 elif test x$gcc_cv_as != x; then
c9cd172c 15768 echo "$conftest_s" > conftest.s
6a8964db 15769 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15771 (eval $ac_try) 2>&5
15772 ac_status=$?
15773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15774 (exit $ac_status); }; }
6d6c1801 15775 then
1b33a244 15776 if test x$gcc_cv_objdump != x \
15777 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
15778 | grep debug_line > /dev/null 2>&1; then
6d6c1801 15779 gcc_cv_as_dwarf2_debug_line=yes
15780 fi
15781 else
15782 echo "configure: failed program was" >&5
15783 cat conftest.s >&5
15784 fi
15785 rm -f conftest.o conftest.s
15786 fi
15787fi
6a8964db 15788echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
15789echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
667fe30b 15790
667fe30b 15791
6d6c1801 15792# The .debug_line file table must be in the exact order that
15793# we specified the files, since these indices are also used
15794# by DW_AT_decl_file. Approximate this test by testing if
15795# the assembler bitches if the same index is assigned twice.
6a8964db 15796 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
15797echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
15798if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
15799 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 15800else
15801 gcc_cv_as_dwarf2_file_buggy=no
15802 if test x$gcc_cv_as != x; then
c9cd172c 15803 echo ' .file 1 "foo.s"
6d6c1801 15804 .file 1 "bar.s"' > conftest.s
6a8964db 15805 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15807 (eval $ac_try) 2>&5
15808 ac_status=$?
15809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15810 (exit $ac_status); }; }
6d6c1801 15811 then
15812 gcc_cv_as_dwarf2_file_buggy=yes
15813 else
15814 echo "configure: failed program was" >&5
15815 cat conftest.s >&5
15816 fi
15817 rm -f conftest.o conftest.s
15818 fi
667fe30b 15819fi
6a8964db 15820echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
15821echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
6d6c1801 15822
15823
15824 if test $gcc_cv_as_dwarf2_debug_line = yes \
15825 && test $gcc_cv_as_dwarf2_file_buggy = no; then
6a8964db 15826
15827cat >>confdefs.h <<\_ACEOF
142cf471 15828#define HAVE_AS_DWARF2_DEBUG_LINE 1
6a8964db 15829_ACEOF
142cf471 15830
6d6c1801 15831 fi
667fe30b 15832
6a8964db 15833 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
15834echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
15835if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
15836 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 15837else
15838 gcc_cv_as_gdwarf2_flag=no
15839 if test $in_tree_gas = yes; then
15840 if test $in_tree_gas_is_elf = yes \
15841 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15842 then gcc_cv_as_gdwarf2_flag=yes
15843fi
15844 elif test x$gcc_cv_as != x; then
c9cd172c 15845 echo "$insn" > conftest.s
6a8964db 15846 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
15847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15848 (eval $ac_try) 2>&5
15849 ac_status=$?
15850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15851 (exit $ac_status); }; }
6d6c1801 15852 then
15853 gcc_cv_as_gdwarf2_flag=yes
15854 else
15855 echo "configure: failed program was" >&5
15856 cat conftest.s >&5
15857 fi
15858 rm -f conftest.o conftest.s
15859 fi
667fe30b 15860fi
6a8964db 15861echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
15862echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
12b432e0 15863if test $gcc_cv_as_gdwarf2_flag = yes; then
6a8964db 15864
15865cat >>confdefs.h <<\_ACEOF
1a6f9700 15866#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
6a8964db 15867_ACEOF
1a6f9700 15868
15869fi
667fe30b 15870
6a8964db 15871 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
15872echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
15873if test "${gcc_cv_as_gstabs_flag+set}" = set; then
15874 echo $ECHO_N "(cached) $ECHO_C" >&6
6d6c1801 15875else
15876 gcc_cv_as_gstabs_flag=no
15877 if test $in_tree_gas = yes; then
15878 if test $in_tree_gas_is_elf = yes \
15879 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15880 then gcc_cv_as_gstabs_flag=yes
15881fi
15882 elif test x$gcc_cv_as != x; then
c9cd172c 15883 echo "$insn" > conftest.s
6a8964db 15884 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
15885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15886 (eval $ac_try) 2>&5
15887 ac_status=$?
15888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15889 (exit $ac_status); }; }
6d6c1801 15890 then
15891 # The native Solaris 9/Intel assembler doesn't understand --gstabs
15892 # and warns about it, but still exits successfully. So check for
15893 # this.
6a8964db 15894 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
15895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15896 (eval $ac_try) 2>&5
15897 ac_status=$?
15898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15899 (exit $ac_status); }; }
6d6c1801 15900 then :
15901 else gcc_cv_as_gstabs_flag=yes
15902 fi
15903 else
15904 echo "configure: failed program was" >&5
15905 cat conftest.s >&5
15906 fi
15907 rm -f conftest.o conftest.s
15908 fi
667fe30b 15909fi
6a8964db 15910echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
15911echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
12b432e0 15912if test $gcc_cv_as_gstabs_flag = yes; then
6a8964db 15913
15914cat >>confdefs.h <<\_ACEOF
1a6f9700 15915#define HAVE_AS_GSTABS_DEBUG_FLAG 1
6a8964db 15916_ACEOF
1a6f9700 15917
15918fi
6d6c1801 15919fi
1a6f9700 15920
6a8964db 15921echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
15922echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
d5720b0c 15923gcc_cv_ld_ro_rw_mix=unknown
7349ace9 15924if test $in_tree_ld = yes ; then
0dac358a 15925 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 \
15926 && test $in_tree_ld_is_elf = yes; then
d5720b0c 15927 gcc_cv_ld_ro_rw_mix=read-write
15928 fi
15929elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
67215fdd 15930 echo '.section myfoosect, "a"' > conftest1.s
15931 echo '.section myfoosect, "aw"' > conftest2.s
d5720b0c 15932 echo '.byte 1' >> conftest2.s
67215fdd 15933 echo '.section myfoosect, "a"' > conftest3.s
d5720b0c 15934 echo '.byte 0' >> conftest3.s
c96f876e 15935 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
15936 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
15937 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
d5720b0c 15938 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
a271d9f9 15939 conftest2.o conftest3.o > /dev/null 2>&1; then
d5720b0c 15940 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
a271d9f9 15941 | sed -e '/myfoosect/!d' -e N`
d5720b0c 15942 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
15943 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
15944 gcc_cv_ld_ro_rw_mix=read-only
15945 else
15946 gcc_cv_ld_ro_rw_mix=read-write
15947 fi
15948 fi
15949 fi
15950 rm -f conftest.* conftest[123].*
15951fi
15952if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
6a8964db 15953
15954cat >>confdefs.h <<\_ACEOF
d5720b0c 15955#define HAVE_LD_RO_RW_SECTION_MIXING 1
6a8964db 15956_ACEOF
d5720b0c 15957
15958fi
6a8964db 15959echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
15960echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
d5720b0c 15961
6a8964db 15962echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
15963echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
0d6378a9 15964gcc_cv_ld_eh_frame_hdr=no
7349ace9 15965if test $in_tree_ld = yes ; then
0dac358a 15966 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 \
15967 && test $in_tree_ld_is_elf = yes; then
0d6378a9 15968 gcc_cv_ld_eh_frame_hdr=yes
15969 fi
15970elif test x$gcc_cv_ld != x; then
15971 # Check if linker supports --eh-frame-hdr option
15972 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
15973 gcc_cv_ld_eh_frame_hdr=yes
15974 fi
15975fi
fcd42b1e 15976
0d6378a9 15977if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
6a8964db 15978
15979cat >>confdefs.h <<\_ACEOF
0d6378a9 15980#define HAVE_LD_EH_FRAME_HDR 1
6a8964db 15981_ACEOF
0d6378a9 15982
15983fi
6a8964db 15984echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
15985echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
0d6378a9 15986
6a8964db 15987echo "$as_me:$LINENO: checking linker position independent executable support" >&5
15988echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
c3ce66b0 15989gcc_cv_ld_pie=no
15990if test $in_tree_ld = yes ; then
0dac358a 15991 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 \
15992 && test $in_tree_ld_is_elf = yes; then
c3ce66b0 15993 gcc_cv_ld_pie=yes
15994 fi
15995elif test x$gcc_cv_ld != x; then
15996 # Check if linker supports -pie option
15997 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
15998 gcc_cv_ld_pie=yes
15999 fi
16000fi
16001if test x"$gcc_cv_ld_pie" = xyes; then
6a8964db 16002
16003cat >>confdefs.h <<\_ACEOF
c3ce66b0 16004#define HAVE_LD_PIE 1
6a8964db 16005_ACEOF
c3ce66b0 16006
16007fi
6a8964db 16008echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
16009echo "${ECHO_T}$gcc_cv_ld_pie" >&6
c3ce66b0 16010
d976f534 16011# --------
16012# UNSORTED
16013# --------
16014
6a40149e 16015echo "$as_me:$LINENO: checking linker --as-needed support" >&5
16016echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
11a4b5d2 16017if test "${gcc_cv_ld_as_needed+set}" = set; then
16018 echo $ECHO_N "(cached) $ECHO_C" >&6
16019else
16020 gcc_cv_ld_as_needed=no
6a40149e 16021if test $in_tree_ld = yes ; then
16022 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 \
16023 && test $in_tree_ld_is_elf = yes; then
16024 gcc_cv_ld_as_needed=yes
16025 fi
16026elif test x$gcc_cv_ld != x; then
16027 # Check if linker supports --as-needed and --no-as-needed options
16028 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
16029 gcc_cv_ld_as_needed=yes
16030 fi
16031fi
11a4b5d2 16032
16033fi
16034echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
16035echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
6a40149e 16036if test x"$gcc_cv_ld_as_needed" = xyes; then
16037
16038cat >>confdefs.h <<\_ACEOF
16039#define HAVE_LD_AS_NEEDED 1
16040_ACEOF
16041
16042fi
6a40149e 16043
4de3052c 16044case "$target:$tm_file" in
16045 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
66ebfa67 16046 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
16047echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
16048if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
16049 echo $ECHO_N "(cached) $ECHO_C" >&6
16050else
16051 gcc_cv_ld_no_dot_syms=no
16052 if test $in_tree_ld = yes ; then
16053 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
16054 gcc_cv_ld_no_dot_syms=yes
16055 fi
16056 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
16057 cat > conftest1.s <<EOF
16058 .text
16059 bl .foo
16060EOF
16061 cat > conftest2.s <<EOF
16062 .section ".opd","aw"
16063 .align 3
16064 .globl foo
16065 .type foo,@function
16066foo:
16067 .quad .LEfoo,.TOC.@tocbase,0
16068 .text
16069.LEfoo:
16070 blr
16071 .size foo,.-.LEfoo
16072EOF
16073 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
16074 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
16075 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
16076 gcc_cv_ld_no_dot_syms=yes
16077 fi
16078 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
16079 fi
16080
16081fi
16082echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
16083echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
16084 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
16085
16086cat >>confdefs.h <<\_ACEOF
16087#define HAVE_LD_NO_DOT_SYMS 1
16088_ACEOF
16089
16090 fi
16091 ;;
16092esac
16093
b6bcc48f 16094echo "$as_me:$LINENO: checking linker --sysroot support" >&5
16095echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
16096if test "${gcc_cv_ld_sysroot+set}" = set; then
16097 echo $ECHO_N "(cached) $ECHO_C" >&6
16098else
16099 gcc_cv_ld_sysroot=no
16100 if test $in_tree_ld = yes ; then
16101 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 16102 gcc_cv_ld_sysroot=yes
b6bcc48f 16103 fi
16104 elif test x$gcc_cv_ld != x; then
16105 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
16106 gcc_cv_ld_sysroot=yes
16107 fi
16108 fi
16109fi
16110echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
16111echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
16112if test x"$gcc_cv_ld_sysroot" = xyes; then
16113
16114cat >>confdefs.h <<\_ACEOF
16115#define HAVE_LD_SYSROOT 1
16116_ACEOF
16117
16118fi
16119
7b6408ee 16120if test x$with_sysroot = x && test x$host = x$target \
17acc97a 16121 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
6a8964db 16122
16123cat >>confdefs.h <<_ACEOF
759d75c3 16124#define PREFIX_INCLUDE_DIR "$prefix/include"
6a8964db 16125_ACEOF
759d75c3 16126
16127fi
16128
0d55f4d0 16129# Test for stack protector support in target C library.
16130case "$target" in
16131 *-*-linux*)
16132 echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5
16133echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6
16134if test "${gcc_cv_libc_provides_ssp+set}" = set; then
16135 echo $ECHO_N "(cached) $ECHO_C" >&6
16136else
16137 gcc_cv_libc_provides_ssp=no
16138 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
16139 if test "x$with_sysroot" = x; then
16140 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
16141 elif test "x$with_sysroot" = xyes; then
16142 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
16143 else
16144 glibc_header_dir="${with_sysroot}/usr/include"
16145 fi
16146 else
16147 glibc_header_dir=/usr/include
16148 fi
16149 # glibc 2.4 and later provides __stack_chk_fail and
16150 # either __stack_chk_guard, or TLS access to stack guard canary.
16151 if test -f $glibc_header_dir/features.h \
16152 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
16153 $glibc_header_dir/features.h > /dev/null; then
16154 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
16155 $glibc_header_dir/features.h > /dev/null; then
16156 gcc_cv_libc_provides_ssp=yes
16157 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
16158 $glibc_header_dir/features.h > /dev/null \
16159 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
16160 $glibc_header_dir/features.h > /dev/null; then
16161 gcc_cv_libc_provides_ssp=yes
16162 fi
16163 fi
16164fi
16165echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
16166echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;;
16167 *) gcc_cv_libc_provides_ssp=no ;;
16168esac
16169if test x$gcc_cv_libc_provides_ssp = xyes; then
16170
16171cat >>confdefs.h <<\_ACEOF
16172#define TARGET_LIBC_PROVIDES_SSP 1
16173_ACEOF
16174
16175fi
16176
772580ce 16177# Find out what GC implementation we want, or may, use.
6a8964db 16178
772580ce 16179# Check whether --with-gc or --without-gc was given.
16180if test "${with_gc+set}" = set; then
16181 withval="$with_gc"
16182 case "$withval" in
1bb42c87 16183 page)
772580ce 16184 GGC=ggc-$withval
1bb42c87 16185 ;;
16186 zone)
16187 GGC=ggc-$withval
16188
16189cat >>confdefs.h <<\_ACEOF
16190#define GGC_ZONE 1
16191_ACEOF
16192
772580ce 16193 ;;
16194 *)
6a8964db 16195 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
16196echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
16197 { (exit 1); exit 1; }; }
772580ce 16198 ;;
16199esac
16200else
71661611 16201 GGC=ggc-page
6a8964db 16202fi;
772580ce 16203
16204echo "Using $GGC for garbage collection."
16205
add841d2 16206# Use the system's zlib library.
f357ac87 16207zlibdir=-L../zlib
16208zlibinc="-I\$(srcdir)/../zlib"
6a8964db 16209
add841d2 16210# Check whether --with-system-zlib or --without-system-zlib was given.
16211if test "${with_system_zlib+set}" = set; then
16212 withval="$with_system_zlib"
16213 zlibdir=
16214zlibinc=
16215
6a8964db 16216fi;
add841d2 16217
16218
16219
c5ab9ed2 16220
6a8964db 16221echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
16222echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
c5ab9ed2 16223 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
16224if test "${enable_maintainer_mode+set}" = set; then
16225 enableval="$enable_maintainer_mode"
16226 maintainer_mode=$enableval
16227else
16228 maintainer_mode=no
6a8964db 16229fi;
12b432e0 16230
6a8964db 16231echo "$as_me:$LINENO: result: $maintainer_mode" >&5
16232echo "${ECHO_T}$maintainer_mode" >&6
c5ab9ed2 16233
16234if test "$maintainer_mode" = "yes"; then
16235 MAINT=''
16236else
16237 MAINT='#'
16238fi
16239
d976f534 16240# --------------
16241# Language hooks
16242# --------------
16243
071cd279 16244# Make empty files to contain the specs and options for each language.
16245# Then add #include lines to for a compiler that has specs and/or options.
16246
3272db82 16247lang_opt_files=
071cd279 16248lang_specs_files=
c3cc26e1 16249lang_tree_files=
071cd279 16250for subdir in . $subdirs
16251do
3272db82 16252 if test -f $srcdir/$subdir/lang.opt; then
16253 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
16254 fi
bf3637a9 16255 if test -f $srcdir/$subdir/lang-specs.h; then
a1a7e9d5 16256 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
071cd279 16257 fi
c3cc26e1 16258 if test -f $srcdir/$subdir/$subdir-tree.def; then
a1a7e9d5 16259 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
c3cc26e1 16260 fi
071cd279 16261done
16262
16263# These (without "all_") are set in each config-lang.in.
16264# `language' must be a single word so is spelled singularly.
16265all_languages=
16266all_boot_languages=
16267all_compilers=
16268all_stagestuff=
50e7e370 16269all_outputs='Makefile gccbug mklibgcc libada-mk'
071cd279 16270# List of language makefile fragments.
a455468e 16271all_lang_makefrags=
16272# List of language subdirectory makefiles. Deprecated.
071cd279 16273all_lang_makefiles=
1f3233d1 16274# Files for gengtype
eb1bd38b 16275all_gtfiles="$target_gtfiles"
776c30b8 16276# Files for gengtype with language
16277all_gtfiles_files_langs=
16278all_gtfiles_files_files=
071cd279 16279
16280# Add the language fragments.
16281# Languages are added via two mechanisms. Some information must be
16282# recorded in makefile variables, these are defined in config-lang.in.
16283# We accumulate them and plug them into the main Makefile.
16284# The other mechanism is a set of hooks for each of the main targets
16285# like `clean', `install', etc.
16286
071cd279 16287language_hooks="Make-hooks"
071cd279 16288
2e222ce5 16289for s in $subdirs
071cd279 16290do
071cd279 16291 language=
16292 boot_language=
16293 compilers=
16294 stagestuff=
071cd279 16295 outputs=
1f3233d1 16296 gtfiles=
071cd279 16297 . ${srcdir}/$s/config-lang.in
bf3637a9 16298 if test "x$language" = x
071cd279 16299 then
16300 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
16301 exit 1
16302 fi
a455468e 16303 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
aaaa7561 16304 if test -f ${srcdir}/$s/Makefile.in
a455468e 16305 then all_lang_makefiles="$s/Makefile"
aaaa7561 16306 fi
071cd279 16307 all_languages="$all_languages $language"
bf3637a9 16308 if test "x$boot_language" = xyes
071cd279 16309 then
16310 all_boot_languages="$all_boot_languages $language"
16311 fi
16312 all_compilers="$all_compilers $compilers"
16313 all_stagestuff="$all_stagestuff $stagestuff"
071cd279 16314 all_outputs="$all_outputs $outputs"
1f3233d1 16315 all_gtfiles="$all_gtfiles $gtfiles"
2e222ce5 16316 for f in $gtfiles
776c30b8 16317 do
776c30b8 16318 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
16319 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
776c30b8 16320 done
071cd279 16321done
16322
776c30b8 16323# Pick up gtfiles for c
16324gtfiles=
16325s="c"
16326. ${srcdir}/c-config-lang.in
16327all_gtfiles="$all_gtfiles $gtfiles"
2e222ce5 16328for f in $gtfiles
776c30b8 16329do
776c30b8 16330 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
16331 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
776c30b8 16332done
16333
21fa82cb 16334check_languages=
2e222ce5 16335for language in $all_languages
21fa82cb 16336do
21fa82cb 16337 check_languages="$check_languages check-$language"
21fa82cb 16338done
16339
d5cd09c5 16340# We link each language in with a set of hooks, reached indirectly via
16341# lang.${target}.
071cd279 16342
16343rm -f Make-hooks
16344touch Make-hooks
ae6555f9 16345target_list="all.cross start.encap rest.encap tags \
16346 install-common install-man \
ca6eabd1 16347 uninstall info man srcextra srcman srcinfo \
80e909c6 16348 mostlyclean clean distclean maintainer-clean \
ef3bb540 16349 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
071cd279 16350for t in $target_list
16351do
16352 x=
2e222ce5 16353 for lang in $all_languages
071cd279 16354 do
be2828ce 16355 x="$x $lang.$t"
071cd279 16356 done
16357 echo "lang.$t: $x" >> Make-hooks
16358done
16359
d976f534 16360# --------
16361# UNSORTED
16362# --------
16363
49d87238 16364# Create .gdbinit.
071cd279 16365
49d87238 16366echo "dir ." > .gdbinit
16367echo "dir ${srcdir}" >> .gdbinit
16368if test x$gdb_needs_out_file_path = xyes
16369then
16370 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
16371fi
16372if test "x$subdirs" != x; then
16373 for s in $subdirs
16374 do
16375 echo "dir ${srcdir}/$s" >> .gdbinit
16376 done
071cd279 16377fi
49d87238 16378echo "source ${srcdir}/gdbinit.in" >> .gdbinit
071cd279 16379
8ffadb5b 16380# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
16381# absolute path for gcc_tooldir based on inserting the number of up-directory
16382# movements required to get from $(exec_prefix) to $(prefix) into the basic
16383# $(libsubdir)/@(unlibsubdir) based path.
e29a95ef 16384# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
16385# make and thus we'd get different behavior depending on where we built the
16386# sources.
7df8690a 16387if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
d58156a1 16388 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
f22b529a 16389else
8ffadb5b 16390# An explanation of the sed strings:
16391# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
16392# -e 's|/$||' match a trailing forward slash and eliminates it
16393# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
424da949 16394# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8ffadb5b 16395#
16396# (*) Note this pattern overwrites the first character of the string
16397# with a forward slash if one is not already present. This is not a
16398# problem because the exact names of the sub-directories concerned is
16399# unimportant, just the number of them matters.
16400#
16401# The practical upshot of these patterns is like this:
16402#
16403# prefix exec_prefix result
16404# ------ ----------- ------
16405# /foo /foo/bar ../
16406# /foo/ /foo/bar ../
16407# /foo /foo/bar/ ../
16408# /foo/ /foo/bar/ ../
16409# /foo /foo/bar/ugg ../../
16410#
066520ea 16411 dollar='$$'
d58156a1 16412 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
f22b529a 16413fi
16414
16415
9bc65db1 16416
074386b8 16417# Find a directory in which to install a shared libgcc.
16418
16419# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
16420if test "${enable_version_specific_runtime_libs+set}" = set; then
16421 enableval="$enable_version_specific_runtime_libs"
6a8964db 16422
16423fi;
074386b8 16424
16425
4724fbab 16426# Check whether --with-slibdir or --without-slibdir was given.
16427if test "${with_slibdir+set}" = set; then
16428 withval="$with_slibdir"
16429 slibdir="$with_slibdir"
16430else
16431 if test "${enable_version_specific_runtime_libs+set}" = set; then
074386b8 16432 slibdir='$(libsubdir)'
4724fbab 16433elif test "$host" != "$target"; then
074386b8 16434 slibdir='$(build_tooldir)/lib'
16435else
4724fbab 16436 slibdir='$(libdir)'
074386b8 16437fi
6a8964db 16438fi;
074386b8 16439
16440
3354d061 16441objdir=`${PWDCMD-pwd}`
fbc57885 16442
16443
071cd279 16444# Substitute configuration variables
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
d9db3eb3 16491
0dbd1c74 16492
2aa3e87b 16493
a654e028 16494
be69511d 16495
5c872430 16496
83b8e55b 16497
16498
16499
16500
16501
16502
16503
8b24e546 16504
1f3233d1 16505
37c96b91 16506
071cd279 16507
c9cd172c 16508# Echo link setup.
16509if test x${build} = x${host} ; then
16510 if test x${host} = x${target} ; then
16511 echo "Links are now set up to build a native compiler for ${target}." 1>&2
16512 else
16513 echo "Links are now set up to build a cross-compiler" 1>&2
16514 echo " from ${host} to ${target}." 1>&2
16515 fi
16516else
16517 if test x${host} = x${target} ; then
16518 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
16519 echo " for ${target}." 1>&2
16520 else
16521 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
16522 echo " from ${host} to ${target}." 1>&2
16523 fi
16524fi
16525
4ee9c684 16526
16527
16528
c9cd172c 16529# Configure the subdirectories
16530# AC_CONFIG_SUBDIRS($subdirs)
16531
16532# Create the Makefile
16533# and configure language subdirectories
6a8964db 16534 ac_config_files="$ac_config_files $all_outputs"
1211e6bc 16535
16536
6a8964db 16537 ac_config_commands="$ac_config_commands default"
1211e6bc 16538
6a8964db 16539cat >confcache <<\_ACEOF
c9cd172c 16540# This file is a shell script that caches the results of configure
16541# tests run on this system so they can be shared between configure
6a8964db 16542# scripts and configure runs, see configure's option --config-cache.
16543# It is not useful on other systems. If it contains results you don't
16544# want to keep, you may remove or edit it.
c9cd172c 16545#
6a8964db 16546# config.status only pays attention to the cache file if you give it
16547# the --recheck option to rerun configure.
c9cd172c 16548#
6a8964db 16549# `ac_cv_env_foo' variables (set or unset) will be overridden when
16550# loading this file, other *unset* `ac_cv_foo' will be assigned the
16551# following values.
16552
16553_ACEOF
16554
c9cd172c 16555# The following way of writing the cache mishandles newlines in values,
16556# but we know of no workaround that is simple, portable, and efficient.
16557# So, don't put newlines in cache variables' values.
16558# Ultrix sh set writes to stderr and can't be redirected directly,
16559# and sets the high bit in the cache file unless we assign to the vars.
6a8964db 16560{
16561 (set) 2>&1 |
16562 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16563 *ac_space=\ *)
16564 # `set' does not quote correctly, so add quotes (double-quote
16565 # substitution turns \\\\ into \\, and sed turns \\ into \).
16566 sed -n \
9ebd0bb2 16567 "s/'/'\\\\''/g;
16568 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
6a8964db 16569 ;;
16570 *)
16571 # `set' quotes correctly as required by POSIX, so do not add quotes.
16572 sed -n \
9ebd0bb2 16573 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
6a8964db 16574 ;;
16575 esac;
16576} |
16577 sed '
16578 t clear
16579 : clear
16580 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16581 t end
16582 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16583 : end' >>confcache
16584if diff $cache_file confcache >/dev/null 2>&1; then :; else
c9cd172c 16585 if test -w $cache_file; then
6a8964db 16586 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16587 cat confcache >$cache_file
c9cd172c 16588 else
16589 echo "not updating unwritable cache $cache_file"
16590 fi
16591fi
16592rm -f confcache
16593
16594test "x$prefix" = xNONE && prefix=$ac_default_prefix
16595# Let make expand exec_prefix.
16596test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16597
6a8964db 16598# VPATH may cause trouble with some makes, so we remove $(srcdir),
16599# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16600# trailing colons and then remove the whole line if VPATH becomes empty
16601# (actually we leave an empty line to preserve line numbers).
c9cd172c 16602if test "x$srcdir" = x.; then
9ebd0bb2 16603 ac_vpsub='/^[ ]*VPATH[ ]*=/{
6a8964db 16604s/:*\$(srcdir):*/:/;
16605s/:*\${srcdir}:*/:/;
16606s/:*@srcdir@:*/:/;
9ebd0bb2 16607s/^\([^=]*=[ ]*\):*/\1/;
6a8964db 16608s/:*$//;
9ebd0bb2 16609s/^[^=]*=[ ]*$//;
6a8964db 16610}'
c9cd172c 16611fi
16612
12b432e0 16613DEFS=-DHAVE_CONFIG_H
c9cd172c 16614
6a8964db 16615ac_libobjs=
16616ac_ltlibobjs=
16617for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16618 # 1. Remove the extension, and $U if already installed.
16619 ac_i=`echo "$ac_i" |
9ebd0bb2 16620 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6a8964db 16621 # 2. Add them.
16622 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
16623 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
16624done
16625LIBOBJS=$ac_libobjs
12b432e0 16626
6a8964db 16627LTLIBOBJS=$ac_ltlibobjs
16628
16629
16630
16631: ${CONFIG_STATUS=./config.status}
16632ac_clean_files_save=$ac_clean_files
16633ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16634{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16635echo "$as_me: creating $CONFIG_STATUS" >&6;}
16636cat >$CONFIG_STATUS <<_ACEOF
16637#! $SHELL
16638# Generated by $as_me.
c9cd172c 16639# Run this file to recreate the current configuration.
16640# Compiler output produced by configure, useful for debugging
6a8964db 16641# configure, is in config.log if it exists.
c9cd172c 16642
6a8964db 16643debug=false
16644ac_cs_recheck=false
16645ac_cs_silent=false
16646SHELL=\${CONFIG_SHELL-$SHELL}
16647_ACEOF
16648
16649cat >>$CONFIG_STATUS <<\_ACEOF
16650## --------------------- ##
16651## M4sh Initialization. ##
16652## --------------------- ##
16653
16654# Be Bourne compatible
16655if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16656 emulate sh
16657 NULLCMD=:
16658 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
16659 # is contrary to our usage. Disable this feature.
16660 alias -g '${1+"$@"}'='"$@"'
16661elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16662 set -o posix
16663fi
9ebd0bb2 16664DUALCASE=1; export DUALCASE # for MKS sh
6a8964db 16665
16666# Support unset when possible.
9ebd0bb2 16667if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6a8964db 16668 as_unset=unset
16669else
16670 as_unset=false
16671fi
16672
16673
16674# Work around bugs in pre-3.0 UWIN ksh.
16675$as_unset ENV MAIL MAILPATH
16676PS1='$ '
16677PS2='> '
16678PS4='+ '
16679
16680# NLS nuisances.
16681for as_var in \
16682 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
16683 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
16684 LC_TELEPHONE LC_TIME
c9cd172c 16685do
9ebd0bb2 16686 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6a8964db 16687 eval $as_var=C; export $as_var
16688 else
16689 $as_unset $as_var
16690 fi
c9cd172c 16691done
16692
6a8964db 16693# Required to use basename.
16694if expr a : '\(a\)' >/dev/null 2>&1; then
16695 as_expr=expr
16696else
16697 as_expr=false
16698fi
c9cd172c 16699
6a8964db 16700if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
16701 as_basename=basename
16702else
16703 as_basename=false
16704fi
c9cd172c 16705
16706
6a8964db 16707# Name of the executable.
16708as_me=`$as_basename "$0" ||
16709$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16710 X"$0" : 'X\(//\)$' \| \
16711 X"$0" : 'X\(/\)$' \| \
16712 . : '\(.\)' 2>/dev/null ||
16713echo X/"$0" |
16714 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16715 /^X\/\(\/\/\)$/{ s//\1/; q; }
16716 /^X\/\(\/\).*/{ s//\1/; q; }
16717 s/.*/./; q'`
16718
c9cd172c 16719
6a8964db 16720# PATH needs CR, and LINENO needs CR and PATH.
16721# Avoid depending upon Character Ranges.
16722as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16723as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16724as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16725as_cr_digits='0123456789'
16726as_cr_alnum=$as_cr_Letters$as_cr_digits
16727
16728# The user is always right.
16729if test "${PATH_SEPARATOR+set}" != set; then
16730 echo "#! /bin/sh" >conf$$.sh
16731 echo "exit 0" >>conf$$.sh
16732 chmod +x conf$$.sh
16733 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
16734 PATH_SEPARATOR=';'
c9cd172c 16735 else
6a8964db 16736 PATH_SEPARATOR=:
16737 fi
16738 rm -f conf$$.sh
16739fi
16740
16741
16742 as_lineno_1=$LINENO
16743 as_lineno_2=$LINENO
16744 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16745 test "x$as_lineno_1" != "x$as_lineno_2" &&
16746 test "x$as_lineno_3" = "x$as_lineno_2" || {
16747 # Find who we are. Look in the path if we contain no path at all
16748 # relative or not.
16749 case $0 in
16750 *[\\/]* ) as_myself=$0 ;;
16751 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16752for as_dir in $PATH
16753do
16754 IFS=$as_save_IFS
16755 test -z "$as_dir" && as_dir=.
16756 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16757done
16758
16759 ;;
16760 esac
16761 # We did not find ourselves, most probably we were run as `sh COMMAND'
16762 # in which case we are not to be found in the path.
16763 if test "x$as_myself" = x; then
16764 as_myself=$0
16765 fi
16766 if test ! -f "$as_myself"; then
16767 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16768echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16769 { (exit 1); exit 1; }; }
c9cd172c 16770 fi
6a8964db 16771 case $CONFIG_SHELL in
16772 '')
16773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16774for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16775do
16776 IFS=$as_save_IFS
16777 test -z "$as_dir" && as_dir=.
16778 for as_base in sh bash ksh sh5; do
16779 case $as_dir in
16780 /*)
16781 if ("$as_dir/$as_base" -c '
16782 as_lineno_1=$LINENO
16783 as_lineno_2=$LINENO
16784 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16785 test "x$as_lineno_1" != "x$as_lineno_2" &&
16786 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16787 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
16788 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
16789 CONFIG_SHELL=$as_dir/$as_base
16790 export CONFIG_SHELL
16791 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16792 fi;;
16793 esac
16794 done
16795done
16796;;
16797 esac
16798
16799 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16800 # uniformly replaced by the line number. The first 'sed' inserts a
16801 # line-number line before each line; the second 'sed' does the real
16802 # work. The second script uses 'N' to pair each line-number line
16803 # with the numbered line, and appends trailing '-' during
16804 # substitution so that $LINENO is not a special case at line end.
16805 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16806 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16807 sed '=' <$as_myself |
16808 sed '
16809 N
16810 s,$,-,
16811 : loop
16812 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16813 t loop
16814 s,-$,,
16815 s,^['$as_cr_digits']*\n,,
16816 ' >$as_me.lineno &&
16817 chmod +x $as_me.lineno ||
16818 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16819echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16820 { (exit 1); exit 1; }; }
16821
16822 # Don't try to exec as it changes $[0], causing all sort of problems
16823 # (the dirname of $[0] is not the place where we might find the
16824 # original and so on. Autoconf is especially sensible to this).
16825 . ./$as_me.lineno
16826 # Exit status is that of the last command.
16827 exit
16828}
16829
16830
16831case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16832 *c*,-n*) ECHO_N= ECHO_C='
16833' ECHO_T=' ' ;;
16834 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16835 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16836esac
16837
16838if expr a : '\(a\)' >/dev/null 2>&1; then
16839 as_expr=expr
16840else
16841 as_expr=false
16842fi
16843
16844rm -f conf$$ conf$$.exe conf$$.file
16845echo >conf$$.file
16846if ln -s conf$$.file conf$$ 2>/dev/null; then
16847 # We could just check for DJGPP; but this test a) works b) is more generic
16848 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16849 if test -f conf$$.exe; then
16850 # Don't use ln at all; we don't have any links
16851 as_ln_s='cp -p'
c9cd172c 16852 else
6a8964db 16853 as_ln_s='ln -s'
c9cd172c 16854 fi
6a8964db 16855elif ln conf$$.file conf$$ 2>/dev/null; then
16856 as_ln_s=ln
16857else
16858 as_ln_s='cp -p'
16859fi
16860rm -f conf$$ conf$$.exe conf$$.file
16861
16862if mkdir -p . 2>/dev/null; then
16863 as_mkdir_p=:
16864else
9ebd0bb2 16865 test -d ./-p && rmdir ./-p
6a8964db 16866 as_mkdir_p=false
16867fi
16868
16869as_executable_p="test -f"
16870
16871# Sed expression to map a string onto a valid CPP name.
9ebd0bb2 16872as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
6a8964db 16873
16874# Sed expression to map a string onto a valid variable name.
9ebd0bb2 16875as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
6a8964db 16876
16877
16878# IFS
16879# We need space, tab and new line, in precisely that order.
16880as_nl='
16881'
16882IFS=" $as_nl"
16883
16884# CDPATH.
16885$as_unset CDPATH
16886
16887exec 6>&1
16888
16889# Open the log real soon, to keep \$[0] and so on meaningful, and to
16890# report actual input values of CONFIG_FILES etc. instead of their
16891# values after options handling. Logging --version etc. is OK.
16892exec 5>>config.log
16893{
16894 echo
16895 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16896## Running $as_me. ##
16897_ASBOX
16898} >&5
16899cat >&5 <<_CSEOF
16900
16901This file was extended by $as_me, which was
d6b9b86f 16902generated by GNU Autoconf 2.59. Invocation command line was
6a8964db 16903
16904 CONFIG_FILES = $CONFIG_FILES
16905 CONFIG_HEADERS = $CONFIG_HEADERS
16906 CONFIG_LINKS = $CONFIG_LINKS
16907 CONFIG_COMMANDS = $CONFIG_COMMANDS
16908 $ $0 $@
16909
16910_CSEOF
16911echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16912echo >&5
16913_ACEOF
16914
16915# Files that config.status was made for.
16916if test -n "$ac_config_files"; then
16917 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16918fi
16919
16920if test -n "$ac_config_headers"; then
16921 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16922fi
16923
16924if test -n "$ac_config_links"; then
16925 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16926fi
16927
16928if test -n "$ac_config_commands"; then
16929 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16930fi
16931
16932cat >>$CONFIG_STATUS <<\_ACEOF
16933
16934ac_cs_usage="\
16935\`$as_me' instantiates files from templates according to the
16936current configuration.
16937
16938Usage: $0 [OPTIONS] [FILE]...
16939
16940 -h, --help print this help, then exit
16941 -V, --version print version number, then exit
16942 -q, --quiet do not print progress messages
16943 -d, --debug don't remove temporary files
16944 --recheck update $as_me by reconfiguring in the same conditions
16945 --file=FILE[:TEMPLATE]
9ebd0bb2 16946 instantiate the configuration file FILE
6a8964db 16947 --header=FILE[:TEMPLATE]
9ebd0bb2 16948 instantiate the configuration header FILE
6a8964db 16949
16950Configuration files:
16951$config_files
16952
16953Configuration headers:
16954$config_headers
16955
16956Configuration commands:
16957$config_commands
16958
16959Report bugs to <bug-autoconf@gnu.org>."
16960_ACEOF
16961
16962cat >>$CONFIG_STATUS <<_ACEOF
16963ac_cs_version="\\
16964config.status
d6b9b86f 16965configured by $0, generated by GNU Autoconf 2.59,
6a8964db 16966 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16967
9ebd0bb2 16968Copyright (C) 2003 Free Software Foundation, Inc.
6a8964db 16969This config.status script is free software; the Free Software Foundation
16970gives unlimited permission to copy, distribute and modify it."
16971srcdir=$srcdir
16972_ACEOF
16973
16974cat >>$CONFIG_STATUS <<\_ACEOF
16975# If no file are specified by the user, then we need to provide default
16976# value. By we need to know if files were specified by the user.
16977ac_need_defaults=:
16978while test $# != 0
16979do
16980 case $1 in
16981 --*=*)
16982 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16983 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16984 ac_shift=:
16985 ;;
16986 -*)
16987 ac_option=$1
16988 ac_optarg=$2
16989 ac_shift=shift
16990 ;;
16991 *) # This is not an option, so the user has probably given explicit
16992 # arguments.
16993 ac_option=$1
16994 ac_need_defaults=false;;
16995 esac
16996
16997 case $ac_option in
16998 # Handling of the options.
16999_ACEOF
17000cat >>$CONFIG_STATUS <<\_ACEOF
17001 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17002 ac_cs_recheck=: ;;
17003 --version | --vers* | -V )
17004 echo "$ac_cs_version"; exit 0 ;;
17005 --he | --h)
17006 # Conflict between --help and --header
17007 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17008Try \`$0 --help' for more information." >&5
17009echo "$as_me: error: ambiguous option: $1
17010Try \`$0 --help' for more information." >&2;}
17011 { (exit 1); exit 1; }; };;
17012 --help | --hel | -h )
17013 echo "$ac_cs_usage"; exit 0 ;;
17014 --debug | --d* | -d )
17015 debug=: ;;
17016 --file | --fil | --fi | --f )
17017 $ac_shift
17018 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
17019 ac_need_defaults=false;;
17020 --header | --heade | --head | --hea )
17021 $ac_shift
17022 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
17023 ac_need_defaults=false;;
17024 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17025 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17026 ac_cs_silent=: ;;
17027
17028 # This is an error.
17029 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17030Try \`$0 --help' for more information." >&5
17031echo "$as_me: error: unrecognized option: $1
17032Try \`$0 --help' for more information." >&2;}
17033 { (exit 1); exit 1; }; } ;;
17034
17035 *) ac_config_targets="$ac_config_targets $1" ;;
17036
17037 esac
17038 shift
c9cd172c 17039done
6a8964db 17040
17041ac_configure_extra_args=
17042
17043if $ac_cs_silent; then
17044 exec 6>/dev/null
17045 ac_configure_extra_args="$ac_configure_extra_args --silent"
071cd279 17046fi
17047
6a8964db 17048_ACEOF
17049cat >>$CONFIG_STATUS <<_ACEOF
17050if \$ac_cs_recheck; then
17051 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
17052 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17053fi
071cd279 17054
6a8964db 17055_ACEOF
17056
17057cat >>$CONFIG_STATUS <<_ACEOF
17058#
17059# INIT-COMMANDS section.
17060#
17061
17062subdirs='$subdirs'
6a8964db 17063
17064_ACEOF
17065
17066
17067
17068cat >>$CONFIG_STATUS <<\_ACEOF
17069for ac_config_target in $ac_config_targets
17070do
17071 case "$ac_config_target" in
17072 # Handling of arguments.
17073 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
17074 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17075 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
17076 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17077echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17078 { (exit 1); exit 1; }; };;
071cd279 17079 esac
6a8964db 17080done
17081
17082# If the user did not use the arguments to specify the items to instantiate,
17083# then the envvar interface is used. Set only those that are not.
17084# We use the long form for the default assignment because of an extremely
17085# bizarre bug on SunOS 4.1.3.
17086if $ac_need_defaults; then
17087 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17088 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17089 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17090fi
17091
17092# Have a temporary directory for convenience. Make it in the build tree
17093# simply because there is no reason to put it here, and in addition,
17094# creating and moving files from /tmp can sometimes cause problems.
17095# Create a temporary directory, and hook for its removal unless debugging.
17096$debug ||
17097{
17098 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17099 trap '{ (exit 1); exit 1; }' 1 2 13 15
17100}
071cd279 17101
6a8964db 17102# Create a (secure) tmp directory for tmp files.
c9cd172c 17103
6a8964db 17104{
17105 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
17106 test -n "$tmp" && test -d "$tmp"
17107} ||
17108{
17109 tmp=./confstat$$-$RANDOM
17110 (umask 077 && mkdir $tmp)
17111} ||
17112{
17113 echo "$me: cannot create a temporary directory in ." >&2
17114 { (exit 1); exit 1; }
17115}
17116
17117_ACEOF
17118
17119cat >>$CONFIG_STATUS <<_ACEOF
17120
17121#
17122# CONFIG_FILES section.
17123#
17124
17125# No need to generate the scripts if there are no CONFIG_FILES.
17126# This happens for instance when ./config.status config.h
17127if test -n "\$CONFIG_FILES"; then
17128 # Protect against being on the right side of a sed subst in config.status.
17129 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17130 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17131s,@SHELL@,$SHELL,;t t
17132s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17133s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17134s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17135s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17136s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17137s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17138s,@exec_prefix@,$exec_prefix,;t t
17139s,@prefix@,$prefix,;t t
17140s,@program_transform_name@,$program_transform_name,;t t
17141s,@bindir@,$bindir,;t t
17142s,@sbindir@,$sbindir,;t t
17143s,@libexecdir@,$libexecdir,;t t
17144s,@datadir@,$datadir,;t t
17145s,@sysconfdir@,$sysconfdir,;t t
17146s,@sharedstatedir@,$sharedstatedir,;t t
17147s,@localstatedir@,$localstatedir,;t t
17148s,@libdir@,$libdir,;t t
17149s,@includedir@,$includedir,;t t
17150s,@oldincludedir@,$oldincludedir,;t t
17151s,@infodir@,$infodir,;t t
17152s,@mandir@,$mandir,;t t
17153s,@build_alias@,$build_alias,;t t
17154s,@host_alias@,$host_alias,;t t
17155s,@target_alias@,$target_alias,;t t
17156s,@DEFS@,$DEFS,;t t
17157s,@ECHO_C@,$ECHO_C,;t t
17158s,@ECHO_N@,$ECHO_N,;t t
17159s,@ECHO_T@,$ECHO_T,;t t
17160s,@LIBS@,$LIBS,;t t
17161s,@build@,$build,;t t
17162s,@build_cpu@,$build_cpu,;t t
17163s,@build_vendor@,$build_vendor,;t t
17164s,@build_os@,$build_os,;t t
17165s,@host@,$host,;t t
17166s,@host_cpu@,$host_cpu,;t t
17167s,@host_vendor@,$host_vendor,;t t
17168s,@host_os@,$host_os,;t t
17169s,@target@,$target,;t t
17170s,@target_cpu@,$target_cpu,;t t
17171s,@target_vendor@,$target_vendor,;t t
17172s,@target_os@,$target_os,;t t
c2c28e49 17173s,@target_noncanonical@,$target_noncanonical,;t t
6a8964db 17174s,@build_subdir@,$build_subdir,;t t
17175s,@host_subdir@,$host_subdir,;t t
17176s,@target_subdir@,$target_subdir,;t t
a6b4c5a9 17177s,@GENINSRC@,$GENINSRC,;t t
6a8964db 17178s,@CC@,$CC,;t t
17179s,@CFLAGS@,$CFLAGS,;t t
17180s,@LDFLAGS@,$LDFLAGS,;t t
17181s,@CPPFLAGS@,$CPPFLAGS,;t t
17182s,@ac_ct_CC@,$ac_ct_CC,;t t
17183s,@EXEEXT@,$EXEEXT,;t t
17184s,@OBJEXT@,$OBJEXT,;t t
17185s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
17186s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
17187s,@CPP@,$CPP,;t t
b085c511 17188s,@EGREP@,$EGREP,;t t
6a8964db 17189s,@strict1_warn@,$strict1_warn,;t t
17190s,@warn_cflags@,$warn_cflags,;t t
17191s,@WERROR@,$WERROR,;t t
17192s,@nocommon_flag@,$nocommon_flag,;t t
4e7212d1 17193s,@TREEBROWSER@,$TREEBROWSER,;t t
6a8964db 17194s,@valgrind_path@,$valgrind_path,;t t
17195s,@valgrind_path_defines@,$valgrind_path_defines,;t t
17196s,@valgrind_command@,$valgrind_command,;t t
17197s,@coverage_flags@,$coverage_flags,;t t
17198s,@enable_multilib@,$enable_multilib,;t t
17199s,@enable_shared@,$enable_shared,;t t
17200s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
17201s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
17202s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
17203s,@onestep@,$onestep,;t t
17204s,@SET_MAKE@,$SET_MAKE,;t t
17205s,@AWK@,$AWK,;t t
6a8964db 17206s,@LN_S@,$LN_S,;t t
6b858cc5 17207s,@LN@,$LN,;t t
6a8964db 17208s,@RANLIB@,$RANLIB,;t t
17209s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
72318bfa 17210s,@ranlib_flags@,$ranlib_flags,;t t
6a8964db 17211s,@INSTALL@,$INSTALL,;t t
17212s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17213s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17214s,@make_compare_target@,$make_compare_target,;t t
17215s,@have_mktemp_command@,$have_mktemp_command,;t t
17216s,@MAKEINFO@,$MAKEINFO,;t t
17217s,@BUILD_INFO@,$BUILD_INFO,;t t
17218s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
17219s,@FLEX@,$FLEX,;t t
17220s,@BISON@,$BISON,;t t
6ac26439 17221s,@NM@,$NM,;t t
17222s,@AR@,$AR,;t t
6a8964db 17223s,@stage1_cflags@,$stage1_cflags,;t t
17224s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
17225s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
17226s,@LDEXP_LIB@,$LDEXP_LIB,;t t
17227s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
17228s,@LIBICONV@,$LIBICONV,;t t
e5d424c9 17229s,@LTLIBICONV@,$LTLIBICONV,;t t
6a8964db 17230s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
17231s,@manext@,$manext,;t t
17232s,@objext@,$objext,;t t
d976f534 17233s,@gthread_flags@,$gthread_flags,;t t
6a8964db 17234s,@extra_modes_file@,$extra_modes_file,;t t
ff05e09e 17235s,@extra_opt_files@,$extra_opt_files,;t t
6a8964db 17236s,@USE_NLS@,$USE_NLS,;t t
17237s,@LIBINTL@,$LIBINTL,;t t
17238s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
17239s,@INCINTL@,$INCINTL,;t t
17240s,@XGETTEXT@,$XGETTEXT,;t t
17241s,@GMSGFMT@,$GMSGFMT,;t t
17242s,@POSUB@,$POSUB,;t t
17243s,@CATALOGS@,$CATALOGS,;t t
a136b23d 17244s,@host_cc_for_libada@,$host_cc_for_libada,;t t
6a8964db 17245s,@CROSS@,$CROSS,;t t
17246s,@ALL@,$ALL,;t t
17247s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
17248s,@inhibit_libc@,$inhibit_libc,;t t
6a8964db 17249s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
17250s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17251s,@STMP_FIXINC@,$STMP_FIXINC,;t t
17252s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
e08c7853 17253s,@collect2@,$collect2,;t t
f32e3360 17254s,@gcc_cv_as@,$gcc_cv_as,;t t
17255s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
17256s,@gcc_cv_ld@,$gcc_cv_ld,;t t
17257s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
17258s,@gcc_cv_nm@,$gcc_cv_nm,;t t
17259s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
ae74ffb7 17260s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
17261s,@ORIGINAL_OBJDUMP_FOR_TARGET@,$ORIGINAL_OBJDUMP_FOR_TARGET,;t t
6a8964db 17262s,@libgcc_visibility@,$libgcc_visibility,;t t
6a8964db 17263s,@GGC@,$GGC,;t t
17264s,@zlibdir@,$zlibdir,;t t
17265s,@zlibinc@,$zlibinc,;t t
17266s,@MAINT@,$MAINT,;t t
17267s,@gcc_tooldir@,$gcc_tooldir,;t t
17268s,@dollar@,$dollar,;t t
17269s,@slibdir@,$slibdir,;t t
17270s,@objdir@,$objdir,;t t
17271s,@subdirs@,$subdirs,;t t
17272s,@srcdir@,$srcdir,;t t
6a8964db 17273s,@all_boot_languages@,$all_boot_languages,;t t
17274s,@all_compilers@,$all_compilers,;t t
17275s,@all_gtfiles@,$all_gtfiles,;t t
17276s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
17277s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
17278s,@all_lang_makefrags@,$all_lang_makefrags,;t t
17279s,@all_lang_makefiles@,$all_lang_makefiles,;t t
17280s,@all_languages@,$all_languages,;t t
17281s,@all_stagestuff@,$all_stagestuff,;t t
17282s,@build_exeext@,$build_exeext,;t t
17283s,@build_install_headers_dir@,$build_install_headers_dir,;t t
17284s,@build_xm_file_list@,$build_xm_file_list,;t t
17285s,@build_xm_include_list@,$build_xm_include_list,;t t
17286s,@build_xm_defines@,$build_xm_defines,;t t
17287s,@check_languages@,$check_languages,;t t
17288s,@cc_set_by_configure@,$cc_set_by_configure,;t t
17289s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
17290s,@cpp_install_dir@,$cpp_install_dir,;t t
17291s,@xmake_file@,$xmake_file,;t t
17292s,@tmake_file@,$tmake_file,;t t
69eb04f7 17293s,@extra_gcc_objs@,$extra_gcc_objs,;t t
6a8964db 17294s,@extra_headers_list@,$extra_headers_list,;t t
17295s,@extra_objs@,$extra_objs,;t t
17296s,@extra_parts@,$extra_parts,;t t
17297s,@extra_passes@,$extra_passes,;t t
17298s,@extra_programs@,$extra_programs,;t t
17299s,@float_h_file@,$float_h_file,;t t
17300s,@gcc_config_arguments@,$gcc_config_arguments,;t t
17301s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
17302s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
6a8964db 17303s,@host_exeext@,$host_exeext,;t t
6a8964db 17304s,@host_xm_file_list@,$host_xm_file_list,;t t
17305s,@host_xm_include_list@,$host_xm_include_list,;t t
17306s,@host_xm_defines@,$host_xm_defines,;t t
17307s,@out_host_hook_obj@,$out_host_hook_obj,;t t
17308s,@install@,$install,;t t
17309s,@lang_opt_files@,$lang_opt_files,;t t
17310s,@lang_specs_files@,$lang_specs_files,;t t
17311s,@lang_tree_files@,$lang_tree_files,;t t
17312s,@local_prefix@,$local_prefix,;t t
17313s,@md_file@,$md_file,;t t
17314s,@objc_boehm_gc@,$objc_boehm_gc,;t t
17315s,@out_file@,$out_file,;t t
17316s,@out_object_file@,$out_object_file,;t t
17317s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
17318s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
6a8964db 17319s,@thread_file@,$thread_file,;t t
17320s,@tm_file_list@,$tm_file_list,;t t
17321s,@tm_include_list@,$tm_include_list,;t t
17322s,@tm_defines@,$tm_defines,;t t
17323s,@tm_p_file_list@,$tm_p_file_list,;t t
17324s,@tm_p_include_list@,$tm_p_include_list,;t t
17325s,@xm_file_list@,$xm_file_list,;t t
17326s,@xm_include_list@,$xm_include_list,;t t
17327s,@xm_defines@,$xm_defines,;t t
6a8964db 17328s,@c_target_objs@,$c_target_objs,;t t
17329s,@cxx_target_objs@,$cxx_target_objs,;t t
17330s,@target_cpu_default@,$target_cpu_default,;t t
4ee9c684 17331s,@GMPLIBS@,$GMPLIBS,;t t
17332s,@GMPINC@,$GMPINC,;t t
6a8964db 17333s,@LIBOBJS@,$LIBOBJS,;t t
17334s,@LTLIBOBJS@,$LTLIBOBJS,;t t
17335/@language_hooks@/r $language_hooks
17336s,@language_hooks@,,;t t
17337CEOF
17338
17339_ACEOF
17340
17341 cat >>$CONFIG_STATUS <<\_ACEOF
17342 # Split the substitutions into bite-sized pieces for seds with
17343 # small command number limits, like on Digital OSF/1 and HP-UX.
17344 ac_max_sed_lines=48
17345 ac_sed_frag=1 # Number of current file.
17346 ac_beg=1 # First line for current file.
17347 ac_end=$ac_max_sed_lines # Line after last line for current file.
17348 ac_more_lines=:
17349 ac_sed_cmds=
17350 while $ac_more_lines; do
17351 if test $ac_beg -gt 1; then
17352 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17353 else
17354 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17355 fi
17356 if test ! -s $tmp/subs.frag; then
17357 ac_more_lines=false
17358 else
17359 # The purpose of the label and of the branching condition is to
17360 # speed up the sed processing (if there are no `@' at all, there
17361 # is no need to browse any of the substitutions).
17362 # These are the two extra sed commands mentioned above.
17363 (echo ':t
17364 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17365 if test -z "$ac_sed_cmds"; then
9ebd0bb2 17366 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
6a8964db 17367 else
9ebd0bb2 17368 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
6a8964db 17369 fi
17370 ac_sed_frag=`expr $ac_sed_frag + 1`
17371 ac_beg=$ac_end
17372 ac_end=`expr $ac_end + $ac_max_sed_lines`
17373 fi
17374 done
17375 if test -z "$ac_sed_cmds"; then
17376 ac_sed_cmds=cat
12b432e0 17377 fi
6a8964db 17378fi # test -n "$CONFIG_FILES"
c9e1a048 17379
6a8964db 17380_ACEOF
17381cat >>$CONFIG_STATUS <<\_ACEOF
17382for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17383 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17384 case $ac_file in
17385 - | *:- | *:-:* ) # input from stdin
9ebd0bb2 17386 cat >$tmp/stdin
17387 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17388 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
6a8964db 17389 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
9ebd0bb2 17390 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
6a8964db 17391 * ) ac_file_in=$ac_file.in ;;
12b432e0 17392 esac
c9e1a048 17393
6a8964db 17394 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17395 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17396$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9ebd0bb2 17397 X"$ac_file" : 'X\(//\)[^/]' \| \
17398 X"$ac_file" : 'X\(//\)$' \| \
17399 X"$ac_file" : 'X\(/\)' \| \
17400 . : '\(.\)' 2>/dev/null ||
6a8964db 17401echo X"$ac_file" |
17402 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17403 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17404 /^X\(\/\/\)$/{ s//\1/; q; }
17405 /^X\(\/\).*/{ s//\1/; q; }
17406 s/.*/./; q'`
17407 { if $as_mkdir_p; then
17408 mkdir -p "$ac_dir"
17409 else
17410 as_dir="$ac_dir"
17411 as_dirs=
17412 while test ! -d "$as_dir"; do
17413 as_dirs="$as_dir $as_dirs"
17414 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17415$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9ebd0bb2 17416 X"$as_dir" : 'X\(//\)[^/]' \| \
17417 X"$as_dir" : 'X\(//\)$' \| \
17418 X"$as_dir" : 'X\(/\)' \| \
17419 . : '\(.\)' 2>/dev/null ||
6a8964db 17420echo X"$as_dir" |
17421 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17422 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17423 /^X\(\/\/\)$/{ s//\1/; q; }
17424 /^X\(\/\).*/{ s//\1/; q; }
17425 s/.*/./; q'`
17426 done
17427 test ! -n "$as_dirs" || mkdir $as_dirs
17428 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17429echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17430 { (exit 1); exit 1; }; }; }
c9cd172c 17431
6a8964db 17432 ac_builddir=.
17433
17434if test "$ac_dir" != .; then
17435 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17436 # A "../" for each directory in $ac_dir_suffix.
17437 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17438else
17439 ac_dir_suffix= ac_top_builddir=
17440fi
17441
17442case $srcdir in
17443 .) # No --srcdir option. We are building in place.
17444 ac_srcdir=.
17445 if test -z "$ac_top_builddir"; then
17446 ac_top_srcdir=.
17447 else
17448 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17449 fi ;;
17450 [\\/]* | ?:[\\/]* ) # Absolute path.
17451 ac_srcdir=$srcdir$ac_dir_suffix;
17452 ac_top_srcdir=$srcdir ;;
17453 *) # Relative path.
17454 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17455 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17456esac
d6b9b86f 17457
17458# Do not use `cd foo && pwd` to compute absolute paths, because
17459# the directories may not exist.
17460case `pwd` in
17461.) ac_abs_builddir="$ac_dir";;
9ebd0bb2 17462*)
d6b9b86f 17463 case "$ac_dir" in
17464 .) ac_abs_builddir=`pwd`;;
17465 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17466 *) ac_abs_builddir=`pwd`/"$ac_dir";;
9ebd0bb2 17467 esac;;
17468esac
d6b9b86f 17469case $ac_abs_builddir in
9ebd0bb2 17470.) ac_abs_top_builddir=${ac_top_builddir}.;;
17471*)
17472 case ${ac_top_builddir}. in
d6b9b86f 17473 .) ac_abs_top_builddir=$ac_abs_builddir;;
9ebd0bb2 17474 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
d6b9b86f 17475 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
9ebd0bb2 17476 esac;;
17477esac
d6b9b86f 17478case $ac_abs_builddir in
9ebd0bb2 17479.) ac_abs_srcdir=$ac_srcdir;;
17480*)
17481 case $ac_srcdir in
d6b9b86f 17482 .) ac_abs_srcdir=$ac_abs_builddir;;
9ebd0bb2 17483 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
d6b9b86f 17484 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
9ebd0bb2 17485 esac;;
17486esac
d6b9b86f 17487case $ac_abs_builddir in
9ebd0bb2 17488.) ac_abs_top_srcdir=$ac_top_srcdir;;
17489*)
17490 case $ac_top_srcdir in
d6b9b86f 17491 .) ac_abs_top_srcdir=$ac_abs_builddir;;
9ebd0bb2 17492 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
d6b9b86f 17493 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
9ebd0bb2 17494 esac;;
17495esac
6a8964db 17496
17497
17498
c8aeaa6d 17499 if test x"$ac_file" != x-; then
17500 { echo "$as_me:$LINENO: creating $ac_file" >&5
17501echo "$as_me: creating $ac_file" >&6;}
17502 rm -f "$ac_file"
17503 fi
6a8964db 17504 # Let's still pretend it is `configure' which instantiates (i.e., don't
17505 # use $as_me), people would be surprised to read:
17506 # /* config.h. Generated by config.status. */
17507 if test x"$ac_file" = x-; then
17508 configure_input=
17509 else
17510 configure_input="$ac_file. "
17511 fi
17512 configure_input=$configure_input"Generated from `echo $ac_file_in |
9ebd0bb2 17513 sed 's,.*/,,'` by configure."
6a8964db 17514
17515 # First look for the input files in the build tree, otherwise in the
17516 # src tree.
17517 ac_file_inputs=`IFS=:
17518 for f in $ac_file_in; do
17519 case $f in
17520 -) echo $tmp/stdin ;;
17521 [\\/$]*)
9ebd0bb2 17522 # Absolute (can't be DOS-style, as IFS=:)
17523 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
6a8964db 17524echo "$as_me: error: cannot find input file: $f" >&2;}
17525 { (exit 1); exit 1; }; }
9ebd0bb2 17526 echo "$f";;
6a8964db 17527 *) # Relative
9ebd0bb2 17528 if test -f "$f"; then
17529 # Build tree
17530 echo "$f"
17531 elif test -f "$srcdir/$f"; then
17532 # Source tree
17533 echo "$srcdir/$f"
17534 else
17535 # /dev/null tree
17536 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
6a8964db 17537echo "$as_me: error: cannot find input file: $f" >&2;}
17538 { (exit 1); exit 1; }; }
9ebd0bb2 17539 fi;;
6a8964db 17540 esac
17541 done` || { (exit 1); exit 1; }
17542_ACEOF
17543cat >>$CONFIG_STATUS <<_ACEOF
17544 sed "$ac_vpsub
17545$extrasub
17546_ACEOF
17547cat >>$CONFIG_STATUS <<\_ACEOF
17548:t
17549/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17550s,@configure_input@,$configure_input,;t t
17551s,@srcdir@,$ac_srcdir,;t t
17552s,@abs_srcdir@,$ac_abs_srcdir,;t t
17553s,@top_srcdir@,$ac_top_srcdir,;t t
17554s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17555s,@builddir@,$ac_builddir,;t t
17556s,@abs_builddir@,$ac_abs_builddir,;t t
17557s,@top_builddir@,$ac_top_builddir,;t t
17558s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17559" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17560 rm -f $tmp/stdin
17561 if test x"$ac_file" != x-; then
17562 mv $tmp/out $ac_file
17563 else
17564 cat $tmp/out
17565 rm -f $tmp/out
17566 fi
17567
17568done
17569_ACEOF
17570cat >>$CONFIG_STATUS <<\_ACEOF
c9cd172c 17571
6a8964db 17572#
17573# CONFIG_HEADER section.
17574#
071cd279 17575
17576# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17577# NAME is the cpp macro being defined and VALUE is the value it is being given.
17578#
17579# ac_d sets the value in "#define NAME VALUE" lines.
9ebd0bb2 17580ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17581ac_dB='[ ].*$,\1#\2'
6a8964db 17582ac_dC=' '
17583ac_dD=',;t'
17584# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9ebd0bb2 17585ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6a8964db 17586ac_uB='$,\1#\2define\3'
071cd279 17587ac_uC=' '
6a8964db 17588ac_uD=',;t'
17589
17590for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
071cd279 17591 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6a8964db 17592 case $ac_file in
17593 - | *:- | *:-:* ) # input from stdin
9ebd0bb2 17594 cat >$tmp/stdin
17595 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17596 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
6a8964db 17597 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
9ebd0bb2 17598 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
6a8964db 17599 * ) ac_file_in=$ac_file.in ;;
071cd279 17600 esac
17601
6a8964db 17602 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17603echo "$as_me: creating $ac_file" >&6;}
17604
17605 # First look for the input files in the build tree, otherwise in the
17606 # src tree.
17607 ac_file_inputs=`IFS=:
17608 for f in $ac_file_in; do
17609 case $f in
17610 -) echo $tmp/stdin ;;
17611 [\\/$]*)
9ebd0bb2 17612 # Absolute (can't be DOS-style, as IFS=:)
17613 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
6a8964db 17614echo "$as_me: error: cannot find input file: $f" >&2;}
17615 { (exit 1); exit 1; }; }
9ebd0bb2 17616 # Do quote $f, to prevent DOS paths from being IFS'd.
17617 echo "$f";;
6a8964db 17618 *) # Relative
9ebd0bb2 17619 if test -f "$f"; then
17620 # Build tree
17621 echo "$f"
17622 elif test -f "$srcdir/$f"; then
17623 # Source tree
17624 echo "$srcdir/$f"
17625 else
17626 # /dev/null tree
17627 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
6a8964db 17628echo "$as_me: error: cannot find input file: $f" >&2;}
17629 { (exit 1); exit 1; }; }
9ebd0bb2 17630 fi;;
6a8964db 17631 esac
17632 done` || { (exit 1); exit 1; }
17633 # Remove the trailing spaces.
9ebd0bb2 17634 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
6a8964db 17635
17636_ACEOF
17637
17638# Transform confdefs.h into two sed scripts, `conftest.defines' and
17639# `conftest.undefs', that substitutes the proper values into
17640# config.h.in to produce config.h. The first handles `#define'
17641# templates, and the second `#undef' templates.
17642# And first: Protect against being on the right side of a sed subst in
17643# config.status. Protect against being in an unquoted here document
17644# in config.status.
17645rm -f conftest.defines conftest.undefs
17646# Using a here document instead of a string reduces the quoting nightmare.
17647# Putting comments in sed scripts is not portable.
17648#
17649# `end' is used to avoid that the second main sed command (meant for
17650# 0-ary CPP macros) applies to n-ary macro definitions.
17651# See the Autoconf documentation for `clear'.
17652cat >confdef2sed.sed <<\_ACEOF
17653s/[\\&,]/\\&/g
17654s,[\\$`],\\&,g
17655t clear
17656: clear
9ebd0bb2 17657s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
6a8964db 17658t end
9ebd0bb2 17659s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
6a8964db 17660: end
17661_ACEOF
17662# If some macros were called several times there might be several times
17663# the same #defines, which is useless. Nevertheless, we may not want to
17664# sort them, since we want the *last* AC-DEFINE to be honored.
17665uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17666sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17667rm -f confdef2sed.sed
071cd279 17668
17669# This sed command replaces #undef with comments. This is necessary, for
17670# example, in the case of _POSIX_SOURCE, which is predefined and required
17671# on some systems where configure will not decide to define it.
6a8964db 17672cat >>conftest.undefs <<\_ACEOF
9ebd0bb2 17673s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
6a8964db 17674_ACEOF
17675
17676# Break up conftest.defines because some shells have a limit on the size
17677# of here documents, and old seds have small limits too (100 cmds).
17678echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
9ebd0bb2 17679echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
6a8964db 17680echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17681echo ' :' >>$CONFIG_STATUS
17682rm -f conftest.tail
17683while grep . conftest.defines >/dev/null
17684do
17685 # Write a limited-size here document to $tmp/defines.sed.
17686 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17687 # Speed up: don't consider the non `#define' lines.
9ebd0bb2 17688 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
6a8964db 17689 # Work around the forget-to-reset-the-flag bug.
17690 echo 't clr' >>$CONFIG_STATUS
17691 echo ': clr' >>$CONFIG_STATUS
17692 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
17693 echo 'CEOF
17694 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17695 rm -f $tmp/in
17696 mv $tmp/out $tmp/in
17697' >>$CONFIG_STATUS
17698 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17699 rm -f conftest.defines
17700 mv conftest.tail conftest.defines
17701done
17702rm -f conftest.defines
17703echo ' fi # grep' >>$CONFIG_STATUS
17704echo >>$CONFIG_STATUS
071cd279 17705
6a8964db 17706# Break up conftest.undefs because some shells have a limit on the size
17707# of here documents, and old seds have small limits too (100 cmds).
17708echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
071cd279 17709rm -f conftest.tail
6a8964db 17710while grep . conftest.undefs >/dev/null
071cd279 17711do
6a8964db 17712 # Write a limited-size here document to $tmp/undefs.sed.
17713 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17714 # Speed up: don't consider the non `#undef'
9ebd0bb2 17715 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
6a8964db 17716 # Work around the forget-to-reset-the-flag bug.
17717 echo 't clr' >>$CONFIG_STATUS
17718 echo ': clr' >>$CONFIG_STATUS
17719 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
071cd279 17720 echo 'CEOF
6a8964db 17721 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17722 rm -f $tmp/in
17723 mv $tmp/out $tmp/in
17724' >>$CONFIG_STATUS
17725 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17726 rm -f conftest.undefs
17727 mv conftest.tail conftest.undefs
071cd279 17728done
6a8964db 17729rm -f conftest.undefs
17730
17731cat >>$CONFIG_STATUS <<\_ACEOF
17732 # Let's still pretend it is `configure' which instantiates (i.e., don't
17733 # use $as_me), people would be surprised to read:
17734 # /* config.h. Generated by config.status. */
17735 if test x"$ac_file" = x-; then
17736 echo "/* Generated by configure. */" >$tmp/config.h
c9cd172c 17737 else
6a8964db 17738 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
c9e1a048 17739 fi
6a8964db 17740 cat $tmp/in >>$tmp/config.h
17741 rm -f $tmp/in
17742 if test x"$ac_file" != x-; then
17743 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
17744 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17745echo "$as_me: $ac_file is unchanged" >&6;}
17746 else
17747 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17748$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9ebd0bb2 17749 X"$ac_file" : 'X\(//\)[^/]' \| \
17750 X"$ac_file" : 'X\(//\)$' \| \
17751 X"$ac_file" : 'X\(/\)' \| \
17752 . : '\(.\)' 2>/dev/null ||
6a8964db 17753echo X"$ac_file" |
17754 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17755 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17756 /^X\(\/\/\)$/{ s//\1/; q; }
17757 /^X\(\/\).*/{ s//\1/; q; }
17758 s/.*/./; q'`
17759 { if $as_mkdir_p; then
17760 mkdir -p "$ac_dir"
17761 else
17762 as_dir="$ac_dir"
17763 as_dirs=
17764 while test ! -d "$as_dir"; do
17765 as_dirs="$as_dir $as_dirs"
17766 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17767$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9ebd0bb2 17768 X"$as_dir" : 'X\(//\)[^/]' \| \
17769 X"$as_dir" : 'X\(//\)$' \| \
17770 X"$as_dir" : 'X\(/\)' \| \
17771 . : '\(.\)' 2>/dev/null ||
6a8964db 17772echo X"$as_dir" |
17773 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17774 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17775 /^X\(\/\/\)$/{ s//\1/; q; }
17776 /^X\(\/\).*/{ s//\1/; q; }
17777 s/.*/./; q'`
17778 done
17779 test ! -n "$as_dirs" || mkdir $as_dirs
17780 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17781echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17782 { (exit 1); exit 1; }; }; }
12b432e0 17783
6a8964db 17784 rm -f $ac_file
17785 mv $tmp/config.h $ac_file
17786 fi
17787 else
17788 cat $tmp/config.h
17789 rm -f $tmp/config.h
17790 fi
17791done
17792_ACEOF
17793cat >>$CONFIG_STATUS <<\_ACEOF
071cd279 17794
6a8964db 17795#
17796# CONFIG_COMMANDS section.
17797#
17798for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17799 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17800 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17801 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
17802$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9ebd0bb2 17803 X"$ac_dest" : 'X\(//\)[^/]' \| \
17804 X"$ac_dest" : 'X\(//\)$' \| \
17805 X"$ac_dest" : 'X\(/\)' \| \
17806 . : '\(.\)' 2>/dev/null ||
6a8964db 17807echo X"$ac_dest" |
17808 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17809 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17810 /^X\(\/\/\)$/{ s//\1/; q; }
17811 /^X\(\/\).*/{ s//\1/; q; }
17812 s/.*/./; q'`
9ebd0bb2 17813 { if $as_mkdir_p; then
17814 mkdir -p "$ac_dir"
17815 else
17816 as_dir="$ac_dir"
17817 as_dirs=
17818 while test ! -d "$as_dir"; do
17819 as_dirs="$as_dir $as_dirs"
17820 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17821$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17822 X"$as_dir" : 'X\(//\)[^/]' \| \
17823 X"$as_dir" : 'X\(//\)$' \| \
17824 X"$as_dir" : 'X\(/\)' \| \
17825 . : '\(.\)' 2>/dev/null ||
17826echo X"$as_dir" |
17827 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17828 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17829 /^X\(\/\/\)$/{ s//\1/; q; }
17830 /^X\(\/\).*/{ s//\1/; q; }
17831 s/.*/./; q'`
17832 done
17833 test ! -n "$as_dirs" || mkdir $as_dirs
17834 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17835echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17836 { (exit 1); exit 1; }; }; }
17837
6a8964db 17838 ac_builddir=.
17839
17840if test "$ac_dir" != .; then
17841 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17842 # A "../" for each directory in $ac_dir_suffix.
17843 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17844else
17845 ac_dir_suffix= ac_top_builddir=
17846fi
17847
17848case $srcdir in
17849 .) # No --srcdir option. We are building in place.
17850 ac_srcdir=.
17851 if test -z "$ac_top_builddir"; then
17852 ac_top_srcdir=.
17853 else
17854 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17855 fi ;;
17856 [\\/]* | ?:[\\/]* ) # Absolute path.
17857 ac_srcdir=$srcdir$ac_dir_suffix;
17858 ac_top_srcdir=$srcdir ;;
17859 *) # Relative path.
17860 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17861 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17862esac
d6b9b86f 17863
17864# Do not use `cd foo && pwd` to compute absolute paths, because
17865# the directories may not exist.
17866case `pwd` in
17867.) ac_abs_builddir="$ac_dir";;
9ebd0bb2 17868*)
d6b9b86f 17869 case "$ac_dir" in
17870 .) ac_abs_builddir=`pwd`;;
17871 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17872 *) ac_abs_builddir=`pwd`/"$ac_dir";;
9ebd0bb2 17873 esac;;
17874esac
d6b9b86f 17875case $ac_abs_builddir in
9ebd0bb2 17876.) ac_abs_top_builddir=${ac_top_builddir}.;;
17877*)
17878 case ${ac_top_builddir}. in
d6b9b86f 17879 .) ac_abs_top_builddir=$ac_abs_builddir;;
9ebd0bb2 17880 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
d6b9b86f 17881 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
9ebd0bb2 17882 esac;;
17883esac
d6b9b86f 17884case $ac_abs_builddir in
9ebd0bb2 17885.) ac_abs_srcdir=$ac_srcdir;;
17886*)
17887 case $ac_srcdir in
d6b9b86f 17888 .) ac_abs_srcdir=$ac_abs_builddir;;
9ebd0bb2 17889 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
d6b9b86f 17890 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
9ebd0bb2 17891 esac;;
17892esac
d6b9b86f 17893case $ac_abs_builddir in
9ebd0bb2 17894.) ac_abs_top_srcdir=$ac_top_srcdir;;
17895*)
17896 case $ac_top_srcdir in
d6b9b86f 17897 .) ac_abs_top_srcdir=$ac_abs_builddir;;
9ebd0bb2 17898 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
d6b9b86f 17899 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
9ebd0bb2 17900 esac;;
17901esac
6a8964db 17902
17903
17904 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
17905echo "$as_me: executing $ac_dest commands" >&6;}
17906 case $ac_dest in
17907 default )
00ba4d3e 17908case ${CONFIG_HEADERS} in
17909 *auto-host.h:config.in*)
17910 echo > cstamp-h ;;
071cd279 17911esac
a455468e 17912# Make sure all the subdirs exist.
524a54cf 17913for d in $subdirs doc build
a455468e 17914do
a455468e 17915 test -d $d || mkdir $d
a455468e 17916done
55b0dbe2 17917# If the host supports symlinks, point stage[1234] at ../stage[1234] so
17918# bootstrapping and the installation procedure can still use
17919# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
17920# FLAGS_TO_PASS has been modified to solve the problem there.
17921# This is virtually a duplicate of what happens in configure.lang; we do
17922# an extra check to make sure this only happens if ln -s can be used.
26be379c 17923case "$LN_S" in
17924 *-s*)
17925 for d in ${subdirs} ; do
3354d061 17926 STARTDIR=`${PWDCMD-pwd}`
0ba40214 17927 cd $d
109d4e8d 17928 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
0ba40214 17929 do
17930 rm -f $t
26be379c 17931 $LN_S ../$t $t 2>/dev/null
0ba40214 17932 done
17933 cd $STARTDIR
26be379c 17934 done
17935 ;;
17936esac
6a8964db 17937 ;;
17938 esac
17939done
17940_ACEOF
c9e1a048 17941
6a8964db 17942cat >>$CONFIG_STATUS <<\_ACEOF
17943
17944{ (exit 0); exit 0; }
17945_ACEOF
071cd279 17946chmod +x $CONFIG_STATUS
6a8964db 17947ac_clean_files=$ac_clean_files_save
17948
17949
17950# configure is writing to config.log, and then calls config.status.
17951# config.status does its own redirection, appending to config.log.
17952# Unfortunately, on DOS this fails, as config.log is still kept open
17953# by configure, so config.status won't be able to write to it; its
17954# output is simply discarded. So we exec the FD to /dev/null,
17955# effectively closing config.log, so it can be properly (re)opened and
17956# appended to by config.status. When coming back to configure, we
17957# need to make the FD available again.
17958if test "$no_create" != yes; then
17959 ac_cs_success=:
17960 ac_config_status_args=
17961 test "$silent" = yes &&
17962 ac_config_status_args="$ac_config_status_args --quiet"
17963 exec 5>/dev/null
17964 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17965 exec 5>>config.log
17966 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17967 # would make configure fail if this is the last instruction.
17968 $ac_cs_success || { (exit 1); exit 1; }
17969fi
071cd279 17970