]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
i386.c (return_in_memory_32): Add ATTRIBUTE_UNUSED.
[thirdparty/gcc.git] / gcc / configure
CommitLineData
005537df 1#! /bin/sh
861bb6c1 2# Guess values for system-dependent variables and create Makefiles.
b61ff9c8 3# Generated by GNU Autoconf 2.59.
861bb6c1 4#
b61ff9c8 5# Copyright (C) 2003 Free Software Foundation, Inc.
861bb6c1
JL
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
ba479fd2
NN
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
11
b61ff9c8 12# Be Bourne compatible
ba479fd2
NN
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+"$@"}'='"$@"'
b61ff9c8
BS
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
ba479fd2 21fi
b61ff9c8 22DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
23
24# Support unset when possible.
86da66b5 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
b61ff9c8 33$as_unset ENV MAIL MAILPATH
ba479fd2
NN
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
43do
86da66b5 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
45 eval $as_var=C; export $as_var
46 else
b61ff9c8 47 $as_unset $as_var
ba479fd2
NN
48 fi
49done
50
51# Required to use basename.
b61ff9c8 52if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
53 as_expr=expr
54else
55 as_expr=false
56fi
57
b61ff9c8 58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
ba479fd2
NN
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
b61ff9c8 66as_me=`$as_basename "$0" ||
ba479fd2
NN
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
b61ff9c8
BS
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
ba479fd2 71echo X/"$0" |
b61ff9c8
BS
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
703d89ab 76
ab22c1fa 77
b61ff9c8
BS
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
1a4b763e 85
b61ff9c8
BS
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
1a4b763e
BS
97fi
98
1a4b763e 99
b61ff9c8
BS
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
1a4b763e 116
b61ff9c8
BS
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 '')
ba479fd2 130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
dd7f7a6e 131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
ba479fd2
NN
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
b61ff9c8
BS
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
ba479fd2 137 /*)
b61ff9c8 138 if ("$as_dir/$as_base" -c '
1a4b763e
BS
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
b61ff9c8 141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
1a4b763e 142 test "x$as_lineno_1" != "x$as_lineno_2" &&
b61ff9c8
BS
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
ba479fd2
NN
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
b61ff9c8
BS
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.
ba479fd2 162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b61ff9c8
BS
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
ba479fd2
NN
165 sed '
166 N
b61ff9c8
BS
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
ba479fd2 170 t loop
b61ff9c8
BS
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
ba479fd2 173 ' >$as_me.lineno &&
b61ff9c8 174 chmod +x $as_me.lineno ||
ba479fd2
NN
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
b61ff9c8
BS
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
ba479fd2
NN
182 # Exit status is that of the last command.
183 exit
184}
185
186
b61ff9c8
BS
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= ;;
ba479fd2
NN
192esac
193
b61ff9c8 194if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
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
b61ff9c8
BS
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
ba479fd2 207 as_ln_s='cp -p'
b61ff9c8
BS
208 else
209 as_ln_s='ln -s'
210 fi
ba479fd2
NN
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
b61ff9c8 216rm -f conf$$ conf$$.exe conf$$.file
861bb6c1 217
ba479fd2
NN
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
86da66b5 221 test -d ./-p && rmdir ./-p
ba479fd2
NN
222 as_mkdir_p=false
223fi
224
b61ff9c8 225as_executable_p="test -f"
ba479fd2
NN
226
227# Sed expression to map a string onto a valid CPP name.
86da66b5 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
229
230# Sed expression to map a string onto a valid variable name.
86da66b5 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
232
233
b61ff9c8
BS
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
ba479fd2
NN
242
243
da0f6381
PB
244
245# Check that we are running under the correct shell.
246SHELL=${CONFIG_SHELL-/bin/sh}
247
248case X$lt_ECHO in
249X*--fallback-echo)
250 # Remove one level of quotation (which was required for Make).
251 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
252 ;;
253esac
254
255ECHO=${lt_ECHO-echo}
256if test "X$1" = X--no-reexec; then
257 # Discard the --no-reexec flag, and continue.
258 shift
259elif test "X$1" = X--fallback-echo; then
260 # Avoid inline document here, it may be left over
261 :
262elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
263 # Yippee, $ECHO works!
264 :
265else
266 # Restart under the correct shell.
267 exec $SHELL "$0" --no-reexec ${1+"$@"}
268fi
269
270if test "X$1" = X--fallback-echo; then
271 # used as fallback echo
272 shift
273 cat <<_LT_EOF
274$*
275_LT_EOF
276 exit 0
277fi
278
279# The HP-UX ksh and POSIX shell print the target directory to stdout
280# if CDPATH is set.
281(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
282
283if test -z "$lt_ECHO"; then
284 if test "X${echo_test_string+set}" != Xset; then
285 # find a string as large as possible, as long as the shell can cope with it
286 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
287 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
288 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
289 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
290 then
291 break
292 fi
293 done
294 fi
295
296 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
297 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
298 test "X$echo_testing_string" = "X$echo_test_string"; then
299 :
300 else
301 # The Solaris, AIX, and Digital Unix default echo programs unquote
302 # backslashes. This makes it impossible to quote backslashes using
303 # echo "$something" | sed 's/\\/\\\\/g'
304 #
305 # So, first we look for a working echo in the user's PATH.
306
307 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
308 for dir in $PATH /usr/ucb; do
309 IFS="$lt_save_ifs"
310 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
311 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
312 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
313 test "X$echo_testing_string" = "X$echo_test_string"; then
314 ECHO="$dir/echo"
315 break
316 fi
317 done
318 IFS="$lt_save_ifs"
319
320 if test "X$ECHO" = Xecho; then
321 # We didn't find a better echo, so look for alternatives.
322 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
323 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
324 test "X$echo_testing_string" = "X$echo_test_string"; then
325 # This shell has a builtin print -r that does the trick.
326 ECHO='print -r'
327 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
328 test "X$CONFIG_SHELL" != X/bin/ksh; then
329 # If we have ksh, try running configure again with it.
330 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
331 export ORIGINAL_CONFIG_SHELL
332 CONFIG_SHELL=/bin/ksh
333 export CONFIG_SHELL
334 exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
335 else
336 # Try using printf.
337 ECHO='printf %s\n'
338 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
339 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
340 test "X$echo_testing_string" = "X$echo_test_string"; then
341 # Cool, printf works
342 :
343 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
344 test "X$echo_testing_string" = 'X\t' &&
345 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
346 test "X$echo_testing_string" = "X$echo_test_string"; then
347 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
348 export CONFIG_SHELL
349 SHELL="$CONFIG_SHELL"
350 export SHELL
351 ECHO="$CONFIG_SHELL $0 --fallback-echo"
352 elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
353 test "X$echo_testing_string" = 'X\t' &&
354 echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
355 test "X$echo_testing_string" = "X$echo_test_string"; then
356 ECHO="$CONFIG_SHELL $0 --fallback-echo"
357 else
358 # maybe with a smaller string...
359 prev=:
360
361 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
362 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
363 then
364 break
365 fi
366 prev="$cmd"
367 done
368
369 if test "$prev" != 'sed 50q "$0"'; then
370 echo_test_string=`eval $prev`
371 export echo_test_string
372 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
373 else
374 # Oops. We lost completely, so just stick with echo.
375 ECHO=echo
376 fi
377 fi
378 fi
379 fi
380 fi
381fi
382
383# Copy echo and quote the copy suitably for passing to libtool from
384# the Makefile, instead of quoting the original, which is used later.
385lt_ECHO=$ECHO
386if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
387 lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
388fi
389
390
391
392
ba479fd2
NN
393# Name of the host.
394# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
395# so uname gets run too.
396ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
397
b61ff9c8
BS
398exec 6>&1
399
ba479fd2
NN
400#
401# Initializations.
402#
861bb6c1 403ac_default_prefix=/usr/local
ba479fd2
NN
404ac_config_libobj_dir=.
405cross_compiling=no
406subdirs=
407MFLAGS=
408MAKEFLAGS=
409SHELL=${CONFIG_SHELL-/bin/sh}
410
b61ff9c8
BS
411# Maximum number of lines to put in a shell here document.
412# This variable seems obsolete. It should probably be removed, and
413# only ac_max_sed_lines should be used.
414: ${ac_max_here_lines=38}
415
ba479fd2
NN
416# Identity of this package.
417PACKAGE_NAME=
418PACKAGE_TARNAME=
419PACKAGE_VERSION=
420PACKAGE_STRING=
421PACKAGE_BUGREPORT=
422
423ac_unique_file="tree.c"
424# Factoring default headers for most tests.
425ac_includes_default="\
426#include <stdio.h>
b61ff9c8 427#if HAVE_SYS_TYPES_H
ba479fd2
NN
428# include <sys/types.h>
429#endif
b61ff9c8 430#if HAVE_SYS_STAT_H
ba479fd2
NN
431# include <sys/stat.h>
432#endif
b61ff9c8 433#if STDC_HEADERS
ba479fd2
NN
434# include <stdlib.h>
435# include <stddef.h>
436#else
b61ff9c8 437# if HAVE_STDLIB_H
ba479fd2
NN
438# include <stdlib.h>
439# endif
440#endif
b61ff9c8
BS
441#if HAVE_STRING_H
442# if !STDC_HEADERS && HAVE_MEMORY_H
ba479fd2
NN
443# include <memory.h>
444# endif
445# include <string.h>
446#endif
b61ff9c8 447#if HAVE_STRINGS_H
ba479fd2
NN
448# include <strings.h>
449#endif
b61ff9c8 450#if HAVE_INTTYPES_H
ba479fd2 451# include <inttypes.h>
b61ff9c8
BS
452#else
453# if HAVE_STDINT_H
454# include <stdint.h>
455# endif
ba479fd2 456#endif
b61ff9c8 457#if HAVE_UNISTD_H
ba479fd2
NN
458# include <unistd.h>
459#endif"
460
3d4e720a 461ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
ba479fd2 462ac_subst_files='language_hooks'
861bb6c1
JL
463
464# Initialize some variables set by options.
ba479fd2
NN
465ac_init_help=
466ac_init_version=false
861bb6c1
JL
467# The variables have the same names as the options, with
468# dashes changed to underlines.
ba479fd2 469cache_file=/dev/null
861bb6c1 470exec_prefix=NONE
861bb6c1 471no_create=
861bb6c1
JL
472no_recursion=
473prefix=NONE
474program_prefix=NONE
475program_suffix=NONE
476program_transform_name=s,x,x,
477silent=
478site=
479srcdir=
861bb6c1
JL
480verbose=
481x_includes=NONE
482x_libraries=NONE
ba479fd2
NN
483
484# Installation directory options.
485# These are left unexpanded so users can "make install exec_prefix=/foo"
486# and all the variables that are supposed to be based on exec_prefix
487# by default will actually change.
488# Use braces instead of parens because sh, perl, etc. also accept them.
861bb6c1
JL
489bindir='${exec_prefix}/bin'
490sbindir='${exec_prefix}/sbin'
491libexecdir='${exec_prefix}/libexec'
b61ff9c8 492datadir='${prefix}/share'
861bb6c1
JL
493sysconfdir='${prefix}/etc'
494sharedstatedir='${prefix}/com'
495localstatedir='${prefix}/var'
b61ff9c8 496libdir='${exec_prefix}/lib'
861bb6c1
JL
497includedir='${prefix}/include'
498oldincludedir='/usr/include'
b61ff9c8
BS
499infodir='${prefix}/info'
500mandir='${prefix}/man'
861bb6c1 501
861bb6c1
JL
502ac_prev=
503for ac_option
504do
861bb6c1
JL
505 # If the previous option needs an argument, assign it.
506 if test -n "$ac_prev"; then
b61ff9c8 507 eval "$ac_prev=\$ac_option"
861bb6c1
JL
508 ac_prev=
509 continue
510 fi
511
b61ff9c8 512 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
861bb6c1
JL
513
514 # Accept the important Cygnus configure options, so we can diagnose typos.
515
b61ff9c8 516 case $ac_option in
861bb6c1
JL
517
518 -bindir | --bindir | --bindi | --bind | --bin | --bi)
519 ac_prev=bindir ;;
520 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 521 bindir=$ac_optarg ;;
861bb6c1
JL
522
523 -build | --build | --buil | --bui | --bu)
ba479fd2 524 ac_prev=build_alias ;;
861bb6c1 525 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 526 build_alias=$ac_optarg ;;
861bb6c1
JL
527
528 -cache-file | --cache-file | --cache-fil | --cache-fi \
529 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
530 ac_prev=cache_file ;;
531 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
532 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
533 cache_file=$ac_optarg ;;
534
535 --config-cache | -C)
536 cache_file=config.cache ;;
861bb6c1 537
b61ff9c8 538 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
861bb6c1 539 ac_prev=datadir ;;
b61ff9c8
BS
540 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
541 | --da=*)
ba479fd2 542 datadir=$ac_optarg ;;
861bb6c1
JL
543
544 -disable-* | --disable-*)
ba479fd2 545 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 546 # Reject names that are not valid shell variable names.
b61ff9c8 547 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
548 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
549 { (exit 1); exit 1; }; }
b61ff9c8
BS
550 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
551 eval "enable_$ac_feature=no" ;;
861bb6c1
JL
552
553 -enable-* | --enable-*)
ba479fd2 554 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 555 # Reject names that are not valid shell variable names.
b61ff9c8 556 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
557 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
558 { (exit 1); exit 1; }; }
b61ff9c8
BS
559 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
560 case $ac_option in
561 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
562 *) ac_optarg=yes ;;
563 esac
564 eval "enable_$ac_feature='$ac_optarg'" ;;
861bb6c1
JL
565
566 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
567 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
568 | --exec | --exe | --ex)
569 ac_prev=exec_prefix ;;
570 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
571 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
572 | --exec=* | --exe=* | --ex=*)
ba479fd2 573 exec_prefix=$ac_optarg ;;
861bb6c1
JL
574
575 -gas | --gas | --ga | --g)
576 # Obsolete; use --with-gas.
577 with_gas=yes ;;
578
ba479fd2
NN
579 -help | --help | --hel | --he | -h)
580 ac_init_help=long ;;
581 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
582 ac_init_help=recursive ;;
583 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
584 ac_init_help=short ;;
861bb6c1
JL
585
586 -host | --host | --hos | --ho)
ba479fd2 587 ac_prev=host_alias ;;
861bb6c1 588 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 589 host_alias=$ac_optarg ;;
861bb6c1
JL
590
591 -includedir | --includedir | --includedi | --included | --include \
592 | --includ | --inclu | --incl | --inc)
593 ac_prev=includedir ;;
594 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
595 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 596 includedir=$ac_optarg ;;
861bb6c1
JL
597
598 -infodir | --infodir | --infodi | --infod | --info | --inf)
599 ac_prev=infodir ;;
600 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 601 infodir=$ac_optarg ;;
861bb6c1
JL
602
603 -libdir | --libdir | --libdi | --libd)
604 ac_prev=libdir ;;
605 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 606 libdir=$ac_optarg ;;
861bb6c1
JL
607
608 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
609 | --libexe | --libex | --libe)
610 ac_prev=libexecdir ;;
611 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
612 | --libexe=* | --libex=* | --libe=*)
ba479fd2 613 libexecdir=$ac_optarg ;;
861bb6c1
JL
614
615 -localstatedir | --localstatedir | --localstatedi | --localstated \
b61ff9c8
BS
616 | --localstate | --localstat | --localsta | --localst \
617 | --locals | --local | --loca | --loc | --lo)
861bb6c1
JL
618 ac_prev=localstatedir ;;
619 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
b61ff9c8
BS
620 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
621 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
ba479fd2 622 localstatedir=$ac_optarg ;;
861bb6c1
JL
623
624 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
625 ac_prev=mandir ;;
626 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 627 mandir=$ac_optarg ;;
861bb6c1
JL
628
629 -nfp | --nfp | --nf)
630 # Obsolete; use --without-fp.
631 with_fp=no ;;
632
633 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 634 | --no-cr | --no-c | -n)
861bb6c1
JL
635 no_create=yes ;;
636
637 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
638 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
639 no_recursion=yes ;;
640
641 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
642 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
643 | --oldin | --oldi | --old | --ol | --o)
644 ac_prev=oldincludedir ;;
645 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
646 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
647 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 648 oldincludedir=$ac_optarg ;;
861bb6c1
JL
649
650 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
651 ac_prev=prefix ;;
652 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 653 prefix=$ac_optarg ;;
861bb6c1
JL
654
655 -program-prefix | --program-prefix | --program-prefi | --program-pref \
656 | --program-pre | --program-pr | --program-p)
657 ac_prev=program_prefix ;;
658 -program-prefix=* | --program-prefix=* | --program-prefi=* \
659 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 660 program_prefix=$ac_optarg ;;
861bb6c1
JL
661
662 -program-suffix | --program-suffix | --program-suffi | --program-suff \
663 | --program-suf | --program-su | --program-s)
664 ac_prev=program_suffix ;;
665 -program-suffix=* | --program-suffix=* | --program-suffi=* \
666 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 667 program_suffix=$ac_optarg ;;
861bb6c1
JL
668
669 -program-transform-name | --program-transform-name \
670 | --program-transform-nam | --program-transform-na \
671 | --program-transform-n | --program-transform- \
672 | --program-transform | --program-transfor \
673 | --program-transfo | --program-transf \
674 | --program-trans | --program-tran \
675 | --progr-tra | --program-tr | --program-t)
676 ac_prev=program_transform_name ;;
677 -program-transform-name=* | --program-transform-name=* \
678 | --program-transform-nam=* | --program-transform-na=* \
679 | --program-transform-n=* | --program-transform-=* \
680 | --program-transform=* | --program-transfor=* \
681 | --program-transfo=* | --program-transf=* \
682 | --program-trans=* | --program-tran=* \
683 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 684 program_transform_name=$ac_optarg ;;
861bb6c1
JL
685
686 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
687 | -silent | --silent | --silen | --sile | --sil)
688 silent=yes ;;
689
690 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
691 ac_prev=sbindir ;;
692 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
693 | --sbi=* | --sb=*)
ba479fd2 694 sbindir=$ac_optarg ;;
861bb6c1
JL
695
696 -sharedstatedir | --sharedstatedir | --sharedstatedi \
697 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
698 | --sharedst | --shareds | --shared | --share | --shar \
699 | --sha | --sh)
700 ac_prev=sharedstatedir ;;
701 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
702 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
703 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
704 | --sha=* | --sh=*)
ba479fd2 705 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
706
707 -site | --site | --sit)
708 ac_prev=site ;;
709 -site=* | --site=* | --sit=*)
ba479fd2 710 site=$ac_optarg ;;
861bb6c1
JL
711
712 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
713 ac_prev=srcdir ;;
714 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 715 srcdir=$ac_optarg ;;
861bb6c1
JL
716
717 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
718 | --syscon | --sysco | --sysc | --sys | --sy)
719 ac_prev=sysconfdir ;;
720 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
721 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 722 sysconfdir=$ac_optarg ;;
861bb6c1
JL
723
724 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 725 ac_prev=target_alias ;;
861bb6c1 726 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 727 target_alias=$ac_optarg ;;
861bb6c1
JL
728
729 -v | -verbose | --verbose | --verbos | --verbo | --verb)
730 verbose=yes ;;
731
ba479fd2
NN
732 -version | --version | --versio | --versi | --vers | -V)
733 ac_init_version=: ;;
861bb6c1
JL
734
735 -with-* | --with-*)
ba479fd2 736 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 737 # Reject names that are not valid shell variable names.
b61ff9c8 738 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
739 { echo "$as_me: error: invalid package name: $ac_package" >&2
740 { (exit 1); exit 1; }; }
b61ff9c8
BS
741 ac_package=`echo $ac_package| sed 's/-/_/g'`
742 case $ac_option in
743 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
744 *) ac_optarg=yes ;;
745 esac
746 eval "with_$ac_package='$ac_optarg'" ;;
861bb6c1
JL
747
748 -without-* | --without-*)
ba479fd2 749 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 750 # Reject names that are not valid shell variable names.
b61ff9c8 751 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
752 { echo "$as_me: error: invalid package name: $ac_package" >&2
753 { (exit 1); exit 1; }; }
b61ff9c8
BS
754 ac_package=`echo $ac_package | sed 's/-/_/g'`
755 eval "with_$ac_package=no" ;;
861bb6c1
JL
756
757 --x)
758 # Obsolete; use --with-x.
759 with_x=yes ;;
760
761 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
762 | --x-incl | --x-inc | --x-in | --x-i)
763 ac_prev=x_includes ;;
764 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
765 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 766 x_includes=$ac_optarg ;;
861bb6c1
JL
767
768 -x-libraries | --x-libraries | --x-librarie | --x-librari \
769 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
770 ac_prev=x_libraries ;;
771 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
772 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 773 x_libraries=$ac_optarg ;;
861bb6c1 774
ba479fd2
NN
775 -*) { echo "$as_me: error: unrecognized option: $ac_option
776Try \`$0 --help' for more information." >&2
777 { (exit 1); exit 1; }; }
861bb6c1
JL
778 ;;
779
ba479fd2
NN
780 *=*)
781 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
782 # Reject names that are not valid shell variable names.
783 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
784 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
785 { (exit 1); exit 1; }; }
b61ff9c8
BS
786 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
787 eval "$ac_envvar='$ac_optarg'"
ba479fd2
NN
788 export $ac_envvar ;;
789
861bb6c1 790 *)
ba479fd2
NN
791 # FIXME: should be removed in autoconf 3.0.
792 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
793 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
794 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
795 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
796 ;;
797
798 esac
799done
800
801if test -n "$ac_prev"; then
ba479fd2
NN
802 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
803 { echo "$as_me: error: missing argument to $ac_option" >&2
804 { (exit 1); exit 1; }; }
63cf211a 805fi
63cf211a 806
b61ff9c8
BS
807# Be sure to have absolute paths.
808for ac_var in exec_prefix prefix
861bb6c1 809do
b61ff9c8 810 eval ac_val=$`echo $ac_var`
ba479fd2 811 case $ac_val in
b61ff9c8
BS
812 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
813 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
814 { (exit 1); exit 1; }; };;
2f41c1d6
PB
815 esac
816done
817
b61ff9c8
BS
818# Be sure to have absolute paths.
819for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
820 localstatedir libdir includedir oldincludedir infodir mandir
821do
822 eval ac_val=$`echo $ac_var`
823 case $ac_val in
824 [\\/$]* | ?:[\\/]* ) ;;
825 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
826 { (exit 1); exit 1; }; };;
827 esac
828done
829
830# There might be people who depend on the old broken behavior: `$host'
831# used to hold the argument of --host etc.
832# FIXME: To remove some day.
833build=$build_alias
834host=$host_alias
ba479fd2
NN
835target=$target_alias
836
837# FIXME: To remove some day.
838if test "x$host_alias" != x; then
839 if test "x$build_alias" = x; then
840 cross_compiling=maybe
841 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
842 If a cross compiler is detected then cross compile mode will be used." >&2
843 elif test "x$build_alias" != "x$host_alias"; then
844 cross_compiling=yes
845 fi
846fi
6e3f3080 847
ba479fd2
NN
848ac_tool_prefix=
849test -n "$host_alias" && ac_tool_prefix=$host_alias-
850
851test "$silent" = yes && exec 6>/dev/null
861bb6c1 852
861bb6c1
JL
853
854# Find the source files, if location was not specified.
855if test -z "$srcdir"; then
856 ac_srcdir_defaulted=yes
b61ff9c8
BS
857 # Try the directory containing this script, then its parent.
858 ac_confdir=`(dirname "$0") 2>/dev/null ||
ba479fd2 859$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
860 X"$0" : 'X\(//\)[^/]' \| \
861 X"$0" : 'X\(//\)$' \| \
b61ff9c8
BS
862 X"$0" : 'X\(/\)' \| \
863 . : '\(.\)' 2>/dev/null ||
ba479fd2 864echo X"$0" |
b61ff9c8
BS
865 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
866 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
867 /^X\(\/\/\)$/{ s//\1/; q; }
868 /^X\(\/\).*/{ s//\1/; q; }
869 s/.*/./; q'`
861bb6c1 870 srcdir=$ac_confdir
b61ff9c8 871 if test ! -r $srcdir/$ac_unique_file; then
861bb6c1
JL
872 srcdir=..
873 fi
874else
875 ac_srcdir_defaulted=no
876fi
b61ff9c8
BS
877if test ! -r $srcdir/$ac_unique_file; then
878 if test "$ac_srcdir_defaulted" = yes; then
879 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
880 { (exit 1); exit 1; }; }
881 else
882 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
ba479fd2 883 { (exit 1); exit 1; }; }
b61ff9c8 884 fi
dd7f7a6e 885fi
b61ff9c8
BS
886(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
887 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
dd7f7a6e 888 { (exit 1); exit 1; }; }
b61ff9c8
BS
889srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
890ac_env_build_alias_set=${build_alias+set}
891ac_env_build_alias_value=$build_alias
892ac_cv_env_build_alias_set=${build_alias+set}
893ac_cv_env_build_alias_value=$build_alias
894ac_env_host_alias_set=${host_alias+set}
895ac_env_host_alias_value=$host_alias
896ac_cv_env_host_alias_set=${host_alias+set}
897ac_cv_env_host_alias_value=$host_alias
898ac_env_target_alias_set=${target_alias+set}
899ac_env_target_alias_value=$target_alias
900ac_cv_env_target_alias_set=${target_alias+set}
901ac_cv_env_target_alias_value=$target_alias
902ac_env_CC_set=${CC+set}
903ac_env_CC_value=$CC
904ac_cv_env_CC_set=${CC+set}
905ac_cv_env_CC_value=$CC
906ac_env_CFLAGS_set=${CFLAGS+set}
907ac_env_CFLAGS_value=$CFLAGS
908ac_cv_env_CFLAGS_set=${CFLAGS+set}
909ac_cv_env_CFLAGS_value=$CFLAGS
910ac_env_LDFLAGS_set=${LDFLAGS+set}
911ac_env_LDFLAGS_value=$LDFLAGS
912ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
913ac_cv_env_LDFLAGS_value=$LDFLAGS
914ac_env_CPPFLAGS_set=${CPPFLAGS+set}
915ac_env_CPPFLAGS_value=$CPPFLAGS
916ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
917ac_cv_env_CPPFLAGS_value=$CPPFLAGS
918ac_env_CPP_set=${CPP+set}
919ac_env_CPP_value=$CPP
920ac_cv_env_CPP_set=${CPP+set}
921ac_cv_env_CPP_value=$CPP
922ac_env_GMPLIBS_set=${GMPLIBS+set}
923ac_env_GMPLIBS_value=$GMPLIBS
924ac_cv_env_GMPLIBS_set=${GMPLIBS+set}
925ac_cv_env_GMPLIBS_value=$GMPLIBS
926ac_env_GMPINC_set=${GMPINC+set}
927ac_env_GMPINC_value=$GMPINC
928ac_cv_env_GMPINC_set=${GMPINC+set}
929ac_cv_env_GMPINC_value=$GMPINC
63cf211a 930
ba479fd2
NN
931#
932# Report the --help message.
933#
934if test "$ac_init_help" = "long"; then
935 # Omit some internal or obsolete options to make the list less imposing.
936 # This message is too long to be a string in the A/UX 3.1 sh.
937 cat <<_ACEOF
938\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 939
ba479fd2 940Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 941
ba479fd2
NN
942To assign environment variables (e.g., CC, CFLAGS...), specify them as
943VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 944
ba479fd2 945Defaults for the options are specified in brackets.
861bb6c1 946
ba479fd2
NN
947Configuration:
948 -h, --help display this help and exit
949 --help=short display options specific to this package
950 --help=recursive display the short help of all the included packages
951 -V, --version display version information and exit
952 -q, --quiet, --silent do not print \`checking...' messages
953 --cache-file=FILE cache test results in FILE [disabled]
954 -C, --config-cache alias for \`--cache-file=config.cache'
955 -n, --no-create do not create output files
956 --srcdir=DIR find the sources in DIR [configure dir or \`..']
957
b61ff9c8
BS
958_ACEOF
959
960 cat <<_ACEOF
ba479fd2
NN
961Installation directories:
962 --prefix=PREFIX install architecture-independent files in PREFIX
86da66b5 963 [$ac_default_prefix]
ba479fd2 964 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
86da66b5 965 [PREFIX]
861bb6c1 966
ba479fd2
NN
967By default, \`make install' will install all the files in
968\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
969an installation prefix other than \`$ac_default_prefix' using \`--prefix',
970for instance \`--prefix=\$HOME'.
13c22933 971
ba479fd2 972For better control, use the options below.
13c22933 973
ba479fd2
NN
974Fine tuning of the installation directories:
975 --bindir=DIR user executables [EPREFIX/bin]
976 --sbindir=DIR system admin executables [EPREFIX/sbin]
977 --libexecdir=DIR program executables [EPREFIX/libexec]
b61ff9c8 978 --datadir=DIR read-only architecture-independent data [PREFIX/share]
ba479fd2
NN
979 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
980 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
981 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
982 --libdir=DIR object code libraries [EPREFIX/lib]
983 --includedir=DIR C header files [PREFIX/include]
984 --oldincludedir=DIR C header files for non-gcc [/usr/include]
b61ff9c8
BS
985 --infodir=DIR info documentation [PREFIX/info]
986 --mandir=DIR man documentation [PREFIX/man]
ba479fd2 987_ACEOF
13c22933 988
ba479fd2 989 cat <<\_ACEOF
13c22933 990
ba479fd2
NN
991Program names:
992 --program-prefix=PREFIX prepend PREFIX to installed program names
993 --program-suffix=SUFFIX append SUFFIX to installed program names
994 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 995
ba479fd2
NN
996System types:
997 --build=BUILD configure for building on BUILD [guessed]
998 --host=HOST cross-compile to build programs to run on HOST [BUILD]
999 --target=TARGET configure for building compilers for TARGET [HOST]
1000_ACEOF
13c22933
JJ
1001fi
1002
ba479fd2 1003if test -n "$ac_init_help"; then
13c22933 1004
ba479fd2 1005 cat <<\_ACEOF
13c22933 1006
ba479fd2
NN
1007Optional Features:
1008 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1009 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
1010 --enable-generated-files-in-srcdir
1011 put copies of generated files in source dir
1012 intended for creating source tarballs for users
1013 without texinfo bison or flex.
3bbd5a19 1014 --enable-werror-always enable -Werror despite compiler version
ba479fd2
NN
1015 --enable-checking=LIST
1016 enable expensive run-time checks. With LIST,
1017 enable only specific categories of checks.
cdce5c16 1018 Categories are: yes,no,all,none,release.
3089f8b5 1019 Flags are: assert,df,fold,gc,gcac,misc,
7e98624c 1020 rtlflag,rtl,runtime,tree,valgrind,types.
ba479fd2 1021 --enable-coverage=LEVEL
fb38008e 1022 enable compiler's code coverage collection.
ba479fd2
NN
1023 Use to measure compiler performance and locate
1024 unused parts of the compiler. With LEVEL, specify
1025 optimization. Values are opt, noopt,
1026 default is noopt
1027 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
1028 --enable-multilib enable library support for multiple ABIs
1029 --enable-__cxa_atexit enable __cxa_atexit for C++
79b87c74
MM
1030 --enable-decimal-float={no,yes,bid,dpd}
1031 enable decimal float extension to C. Selecting 'bid'
1032 or 'dpd' choses which decimal floating point format
1033 to use
ab22c1fa 1034 --enable-fixed-point enable fixed-point arithmetic extension to C
ba479fd2
NN
1035 --enable-threads enable thread usage for target GCC
1036 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
1037 --enable-tls enable or disable generation of tls code
1038 overriding the assembler check for tls support
ba479fd2
NN
1039 --enable-objc-gc enable the use of Boehm's garbage collector with
1040 the GNU Objective-C runtime
1041 --disable-shared don't provide a shared libgcc
1042 --enable-intermodule build the compiler in one step
f3c9f174 1043 --enable-languages=LIST specify which front-ends to build
dfb77e37 1044 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
1045 --enable-initfini-array use .init_array/.fini_array sections
1046 --enable-sjlj-exceptions
1047 arrange to use setjmp/longjmp exception handling
7f970b70 1048 --enable-secureplt enable -msecure-plt by default for PowerPC
ba479fd2
NN
1049 --disable-win32-registry
1050 disable lookup of installation paths in the
1051 Registry on Windows hosts
1052 --enable-win32-registry enable registry lookup (default)
1053 --enable-win32-registry=KEY
1054 use KEY instead of GCC version as the last portion
1055 of the registry key
da0f6381
PB
1056 --enable-shared[=PKGS]
1057 build shared libraries [default=yes]
1058 --enable-static[=PKGS]
1059 build static libraries [default=yes]
1060 --enable-fast-install[=PKGS]
1061 optimize for fast installation [default=yes]
1062 --disable-libtool-lock avoid locking (might break parallel builds)
ba479fd2
NN
1063 --enable-maintainer-mode
1064 enable make rules and dependencies not useful
1065 (and sometimes confusing) to the casual installer
1066 --enable-version-specific-runtime-libs
1067 specify that runtime libraries should be
1068 installed in a compiler-specific directory
093e61a6 1069
ba479fd2
NN
1070Optional Packages:
1071 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1072 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1546bb64 1073 --with-build-libsubdir=DIR Directory where to find libraries for build system
ba479fd2
NN
1074 --with-local-prefix=DIR specifies directory to put local include
1075 --with-gxx-include-dir=DIR
1076 specifies directory to put g++ header files
1077 --with-cpp-install-dir=DIR
1078 install the user visible C preprocessor in DIR
1079 (relative to PREFIX) as well as PREFIX/bin
1080 --with-gnu-ld arrange to work with GNU ld.
1081 --with-ld arrange to use the specified ld (full pathname)
d594623a 1082 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
1083 --with-gnu-as arrange to work with GNU as
1084 --with-as arrange to use the specified as (full pathname)
1085 --with-stabs arrange to use stabs instead of host debug format
1086 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
1087 --with-build-sysroot=sysroot
1088 use sysroot as the system root during the build
ba479fd2 1089 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
2f41c1d6
PB
1090 --with-pkgversion=PKG Use PKG in the version string in place of "GCC"
1091 --with-bugurl=URL Direct users to URL to report a bug
dfb77e37
KC
1092 --with-gnu-ld assume the C compiler uses GNU ld default=no
1093 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1094 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 1095 --with-system-libunwind use installed libunwind
da0f6381
PB
1096 --with-pic try to use only PIC/non-PIC objects [default=use
1097 both]
1098 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
ed965309 1099 --with-long-double-128 Use 128-bit long double by default.
59415997 1100 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
1101 with the compiler
1102 --with-system-zlib use installed libz
22482f74
MS
1103 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
1104 --with-datarootdir=DIR Use DIR as the data root [PREFIX/share]
1105 --with-docdir=DIR Install documentation in DIR [DATAROOTDIR]
1106 --with-htmldir=DIR html documentation in in DIR [DOCDIR]
13c22933 1107
ba479fd2
NN
1108Some influential environment variables:
1109 CC C compiler command
1110 CFLAGS C compiler flags
1111 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1112 nonstandard directory <lib dir>
b61ff9c8
BS
1113 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
1114 headers in a nonstandard directory <include dir>
ba479fd2 1115 CPP C preprocessor
6de9cd9a
DN
1116 GMPLIBS How to link GMP
1117 GMPINC How to find GMP include files
13c22933 1118
ba479fd2
NN
1119Use these variables to override the choices made by `configure' or to help
1120it to find libraries and programs with nonstandard names/locations.
73458fb7 1121
ba479fd2
NN
1122_ACEOF
1123fi
6e3f3080 1124
ba479fd2
NN
1125if test "$ac_init_help" = "recursive"; then
1126 # If there are subdirs, report their specific --help.
b61ff9c8 1127 ac_popdir=`pwd`
ba479fd2 1128 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
b61ff9c8 1129 test -d $ac_dir || continue
ba479fd2
NN
1130 ac_builddir=.
1131
b61ff9c8 1132if test "$ac_dir" != .; then
ba479fd2 1133 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b61ff9c8
BS
1134 # A "../" for each directory in $ac_dir_suffix.
1135 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1136else
1137 ac_dir_suffix= ac_top_builddir=
1138fi
ba479fd2
NN
1139
1140case $srcdir in
b61ff9c8 1141 .) # No --srcdir option. We are building in place.
ba479fd2 1142 ac_srcdir=.
b61ff9c8
BS
1143 if test -z "$ac_top_builddir"; then
1144 ac_top_srcdir=.
1145 else
1146 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1147 fi ;;
1148 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 1149 ac_srcdir=$srcdir$ac_dir_suffix;
b61ff9c8
BS
1150 ac_top_srcdir=$srcdir ;;
1151 *) # Relative path.
1152 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1153 ac_top_srcdir=$ac_top_builddir$srcdir ;;
1154esac
1155
1156# Do not use `cd foo && pwd` to compute absolute paths, because
1157# the directories may not exist.
1158case `pwd` in
1159.) ac_abs_builddir="$ac_dir";;
1160*)
1161 case "$ac_dir" in
1162 .) ac_abs_builddir=`pwd`;;
1163 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1164 *) ac_abs_builddir=`pwd`/"$ac_dir";;
1165 esac;;
1166esac
1167case $ac_abs_builddir in
1168.) ac_abs_top_builddir=${ac_top_builddir}.;;
1169*)
1170 case ${ac_top_builddir}. in
1171 .) ac_abs_top_builddir=$ac_abs_builddir;;
1172 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1173 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1174 esac;;
1175esac
1176case $ac_abs_builddir in
1177.) ac_abs_srcdir=$ac_srcdir;;
1178*)
1179 case $ac_srcdir in
1180 .) ac_abs_srcdir=$ac_abs_builddir;;
1181 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1182 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1183 esac;;
1184esac
1185case $ac_abs_builddir in
1186.) ac_abs_top_srcdir=$ac_top_srcdir;;
1187*)
1188 case $ac_top_srcdir in
1189 .) ac_abs_top_srcdir=$ac_abs_builddir;;
1190 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1191 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1192 esac;;
86da66b5 1193esac
b61ff9c8
BS
1194
1195 cd $ac_dir
1196 # Check for guested configure; otherwise get Cygnus style configure.
1197 if test -f $ac_srcdir/configure.gnu; then
1198 echo
1199 $SHELL $ac_srcdir/configure.gnu --help=recursive
1200 elif test -f $ac_srcdir/configure; then
1201 echo
1202 $SHELL $ac_srcdir/configure --help=recursive
1203 elif test -f $ac_srcdir/configure.ac ||
1204 test -f $ac_srcdir/configure.in; then
1205 echo
1206 $ac_configure --help
ba479fd2
NN
1207 else
1208 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
b61ff9c8
BS
1209 fi
1210 cd $ac_popdir
ba479fd2
NN
1211 done
1212fi
1213
b61ff9c8 1214test -n "$ac_init_help" && exit 0
ba479fd2
NN
1215if $ac_init_version; then
1216 cat <<\_ACEOF
1217
b61ff9c8 1218Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1219This configure script is free software; the Free Software Foundation
1220gives unlimited permission to copy, distribute and modify it.
1221_ACEOF
b61ff9c8 1222 exit 0
ba479fd2 1223fi
b61ff9c8
BS
1224exec 5>config.log
1225cat >&5 <<_ACEOF
ba479fd2
NN
1226This file contains any messages produced by compilers while
1227running configure, to aid debugging if configure makes a mistake.
1228
1229It was created by $as_me, which was
b61ff9c8 1230generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1231
1232 $ $0 $@
1233
1234_ACEOF
1235{
1236cat <<_ASUNAME
1237## --------- ##
1238## Platform. ##
1239## --------- ##
1240
1241hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1242uname -m = `(uname -m) 2>/dev/null || echo unknown`
1243uname -r = `(uname -r) 2>/dev/null || echo unknown`
1244uname -s = `(uname -s) 2>/dev/null || echo unknown`
1245uname -v = `(uname -v) 2>/dev/null || echo unknown`
1246
1247/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1248/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1249
1250/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1251/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1252/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
b61ff9c8 1253hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
ba479fd2
NN
1254/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1255/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1256/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1257
1258_ASUNAME
1259
1260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1261for as_dir in $PATH
1262do
1263 IFS=$as_save_IFS
1264 test -z "$as_dir" && as_dir=.
1265 echo "PATH: $as_dir"
1266done
1267
1268} >&5
1269
1270cat >&5 <<_ACEOF
1271
1272
1273## ----------- ##
1274## Core tests. ##
1275## ----------- ##
1276
1277_ACEOF
1278
1279
1280# Keep a trace of the command line.
1281# Strip out --no-create and --no-recursion so they do not pile up.
1282# Strip out --silent because we don't want to record it for future runs.
1283# Also quote any args containing shell meta-characters.
1284# Make two passes to allow for proper duplicate-argument suppression.
1285ac_configure_args=
1286ac_configure_args0=
1287ac_configure_args1=
b61ff9c8 1288ac_sep=
ba479fd2
NN
1289ac_must_keep_next=false
1290for ac_pass in 1 2
1291do
1292 for ac_arg
1293 do
1294 case $ac_arg in
1295 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1296 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1297 | -silent | --silent | --silen | --sile | --sil)
1298 continue ;;
b61ff9c8 1299 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ba479fd2
NN
1300 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1301 esac
1302 case $ac_pass in
1303 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1304 2)
1305 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1306 if test $ac_must_keep_next = true; then
86da66b5 1307 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1308 else
86da66b5
HPN
1309 case $ac_arg in
1310 *=* | --config-cache | -C | -disable-* | --disable-* \
1311 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1312 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1313 | -with-* | --with-* | -without-* | --without-* | --x)
1314 case "$ac_configure_args0 " in
1315 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1316 esac
1317 ;;
1318 -* ) ac_must_keep_next=true ;;
1319 esac
ba479fd2 1320 fi
b61ff9c8
BS
1321 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1322 # Get rid of the leading space.
1323 ac_sep=" "
ba479fd2
NN
1324 ;;
1325 esac
1326 done
1327done
1328$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1329$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1330
1331# When interrupted or exit'd, cleanup temporary files, and complete
1332# config.log. We remove comments because anyway the quotes in there
1333# would cause problems or look ugly.
b61ff9c8
BS
1334# WARNING: Be sure not to use single quotes in there, as some shells,
1335# such as our DU 5.0 friend, will then `close' the trap.
ba479fd2
NN
1336trap 'exit_status=$?
1337 # Save into config.log some information that might help in debugging.
1338 {
1339 echo
1340
1341 cat <<\_ASBOX
1342## ---------------- ##
1343## Cache variables. ##
1344## ---------------- ##
1345_ASBOX
1346 echo
1347 # The following way of writing the cache mishandles newlines in values,
b61ff9c8 1348{
ba479fd2 1349 (set) 2>&1 |
b61ff9c8
BS
1350 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1351 *ac_space=\ *)
ba479fd2 1352 sed -n \
b61ff9c8
BS
1353 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1354 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1355 ;;
ba479fd2 1356 *)
b61ff9c8
BS
1357 sed -n \
1358 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 1359 ;;
b61ff9c8
BS
1360 esac;
1361}
ba479fd2
NN
1362 echo
1363
1364 cat <<\_ASBOX
1365## ----------------- ##
1366## Output variables. ##
1367## ----------------- ##
1368_ASBOX
1369 echo
1370 for ac_var in $ac_subst_vars
1371 do
b61ff9c8
BS
1372 eval ac_val=$`echo $ac_var`
1373 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1374 done | sort
1375 echo
1376
1377 if test -n "$ac_subst_files"; then
1378 cat <<\_ASBOX
b61ff9c8
BS
1379## ------------- ##
1380## Output files. ##
1381## ------------- ##
ba479fd2
NN
1382_ASBOX
1383 echo
1384 for ac_var in $ac_subst_files
1385 do
b61ff9c8
BS
1386 eval ac_val=$`echo $ac_var`
1387 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1388 done | sort
1389 echo
1390 fi
1391
1392 if test -s confdefs.h; then
1393 cat <<\_ASBOX
1394## ----------- ##
1395## confdefs.h. ##
1396## ----------- ##
1397_ASBOX
1398 echo
b61ff9c8 1399 sed "/^$/d" confdefs.h | sort
ba479fd2
NN
1400 echo
1401 fi
1402 test "$ac_signal" != 0 &&
1403 echo "$as_me: caught signal $ac_signal"
1404 echo "$as_me: exit $exit_status"
1405 } >&5
b61ff9c8
BS
1406 rm -f core *.core &&
1407 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
ba479fd2 1408 exit $exit_status
b61ff9c8 1409 ' 0
ba479fd2
NN
1410for ac_signal in 1 2 13 15; do
1411 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1412done
1413ac_signal=0
1414
1415# confdefs.h avoids OS command line length limits that DEFS can exceed.
b61ff9c8
BS
1416rm -rf conftest* confdefs.h
1417# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1418echo >confdefs.h
ba479fd2
NN
1419
1420# Predefined preprocessor variables.
1421
1422cat >>confdefs.h <<_ACEOF
1423#define PACKAGE_NAME "$PACKAGE_NAME"
1424_ACEOF
1425
1426
1427cat >>confdefs.h <<_ACEOF
1428#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1429_ACEOF
1430
1431
1432cat >>confdefs.h <<_ACEOF
1433#define PACKAGE_VERSION "$PACKAGE_VERSION"
1434_ACEOF
1435
1436
1437cat >>confdefs.h <<_ACEOF
1438#define PACKAGE_STRING "$PACKAGE_STRING"
1439_ACEOF
1440
1441
1442cat >>confdefs.h <<_ACEOF
1443#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1444_ACEOF
1445
1446
1447# Let the site file select an alternate cache file if it wants to.
1448# Prefer explicitly selected file to automatically selected ones.
b61ff9c8
BS
1449if test -z "$CONFIG_SITE"; then
1450 if test "x$prefix" != xNONE; then
1451 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1452 else
1453 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1454 fi
ba479fd2 1455fi
b61ff9c8 1456for ac_site_file in $CONFIG_SITE; do
ba479fd2
NN
1457 if test -r "$ac_site_file"; then
1458 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1459echo "$as_me: loading site script $ac_site_file" >&6;}
1460 sed 's/^/| /' "$ac_site_file" >&5
1461 . "$ac_site_file"
1462 fi
1463done
1464
1465if test -r "$cache_file"; then
1466 # Some versions of bash will fail to source /dev/null (special
1467 # files actually), so we avoid doing that.
1468 if test -f "$cache_file"; then
1469 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1470echo "$as_me: loading cache $cache_file" >&6;}
1471 case $cache_file in
b61ff9c8
BS
1472 [\\/]* | ?:[\\/]* ) . $cache_file;;
1473 *) . ./$cache_file;;
ba479fd2
NN
1474 esac
1475 fi
1476else
1477 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1478echo "$as_me: creating cache $cache_file" >&6;}
1479 >$cache_file
1480fi
1481
1482# Check that the precious variables saved in the cache have kept the same
1483# value.
1484ac_cache_corrupted=false
b61ff9c8
BS
1485for ac_var in `(set) 2>&1 |
1486 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1487 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1488 eval ac_new_set=\$ac_env_${ac_var}_set
b61ff9c8
BS
1489 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1490 eval ac_new_val="\$ac_env_${ac_var}_value"
ba479fd2
NN
1491 case $ac_old_set,$ac_new_set in
1492 set,)
1493 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1494echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1495 ac_cache_corrupted=: ;;
1496 ,set)
1497 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1498echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1499 ac_cache_corrupted=: ;;
1500 ,);;
1501 *)
1502 if test "x$ac_old_val" != "x$ac_new_val"; then
deb984e6
PB
1503 # differences in whitespace do not lead to failure.
1504 ac_old_val_w=`echo x $ac_old_val`
1505 ac_new_val_w=`echo x $ac_new_val`
1506 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1507 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1508echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
deb984e6
PB
1509 ac_cache_corrupted=:
1510 else
1511 { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1512echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1513 eval $ac_var=\$ac_old_val
1514 fi
1515 { echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1516echo "$as_me: former value: \`$ac_old_val'" >&2;}
1517 { echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1518echo "$as_me: current value: \`$ac_new_val'" >&2;}
ba479fd2
NN
1519 fi;;
1520 esac
1521 # Pass precious variables to config.status.
1522 if test "$ac_new_set" = set; then
1523 case $ac_new_val in
b61ff9c8
BS
1524 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1525 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
ba479fd2
NN
1526 *) ac_arg=$ac_var=$ac_new_val ;;
1527 esac
1528 case " $ac_configure_args " in
1529 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1530 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1531 esac
1532 fi
1533done
1534if $ac_cache_corrupted; then
1535 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1536echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1537 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1538echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1539 { (exit 1); exit 1; }; }
1540fi
1541
b61ff9c8
BS
1542ac_ext=c
1543ac_cpp='$CPP $CPPFLAGS'
1544ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1545ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1546ac_compiler_gnu=$ac_cv_c_compiler_gnu
1547
ba479fd2
NN
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
914c5af7 1566
b61ff9c8 1567 ac_config_headers="$ac_config_headers auto-host.h:config.in"
ba479fd2
NN
1568
1569
9f18db39
PB
1570gcc_version=`cat $srcdir/BASE-VER`
1571
ba479fd2
NN
1572# Determine the host, build, and target systems
1573ac_aux_dir=
b61ff9c8
BS
1574for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1575 if test -f $ac_dir/install-sh; then
ba479fd2
NN
1576 ac_aux_dir=$ac_dir
1577 ac_install_sh="$ac_aux_dir/install-sh -c"
1578 break
b61ff9c8 1579 elif test -f $ac_dir/install.sh; then
ba479fd2
NN
1580 ac_aux_dir=$ac_dir
1581 ac_install_sh="$ac_aux_dir/install.sh -c"
1582 break
b61ff9c8 1583 elif test -f $ac_dir/shtool; then
ba479fd2
NN
1584 ac_aux_dir=$ac_dir
1585 ac_install_sh="$ac_aux_dir/shtool install -c"
1586 break
1587 fi
1588done
1589if test -z "$ac_aux_dir"; then
b61ff9c8
BS
1590 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1591echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
ba479fd2
NN
1592 { (exit 1); exit 1; }; }
1593fi
b61ff9c8
BS
1594ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1595ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1596ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba479fd2
NN
1597
1598# Make sure we can run config.sub.
b61ff9c8
BS
1599$ac_config_sub sun4 >/dev/null 2>&1 ||
1600 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1601echo "$as_me: error: cannot run $ac_config_sub" >&2;}
ba479fd2
NN
1602 { (exit 1); exit 1; }; }
1603
b61ff9c8
BS
1604echo "$as_me:$LINENO: checking build system type" >&5
1605echo $ECHO_N "checking build system type... $ECHO_C" >&6
ba479fd2
NN
1606if test "${ac_cv_build+set}" = set; then
1607 echo $ECHO_N "(cached) $ECHO_C" >&6
1608else
b61ff9c8
BS
1609 ac_cv_build_alias=$build_alias
1610test -z "$ac_cv_build_alias" &&
1611 ac_cv_build_alias=`$ac_config_guess`
1612test -z "$ac_cv_build_alias" &&
ba479fd2
NN
1613 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1614echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1615 { (exit 1); exit 1; }; }
b61ff9c8
BS
1616ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1617 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1618echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
ba479fd2
NN
1619 { (exit 1); exit 1; }; }
1620
1621fi
b61ff9c8
BS
1622echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1623echo "${ECHO_T}$ac_cv_build" >&6
ba479fd2 1624build=$ac_cv_build
b61ff9c8
BS
1625build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1626build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1627build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1628
1629
1630echo "$as_me:$LINENO: checking host system type" >&5
1631echo $ECHO_N "checking host system type... $ECHO_C" >&6
ba479fd2
NN
1632if test "${ac_cv_host+set}" = set; then
1633 echo $ECHO_N "(cached) $ECHO_C" >&6
1634else
b61ff9c8
BS
1635 ac_cv_host_alias=$host_alias
1636test -z "$ac_cv_host_alias" &&
1637 ac_cv_host_alias=$ac_cv_build_alias
1638ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1639 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1640echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
ba479fd2
NN
1641 { (exit 1); exit 1; }; }
1642
1643fi
b61ff9c8
BS
1644echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1645echo "${ECHO_T}$ac_cv_host" >&6
ba479fd2 1646host=$ac_cv_host
b61ff9c8
BS
1647host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1648host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1649host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1650
1651
1652echo "$as_me:$LINENO: checking target system type" >&5
1653echo $ECHO_N "checking target system type... $ECHO_C" >&6
ba479fd2
NN
1654if test "${ac_cv_target+set}" = set; then
1655 echo $ECHO_N "(cached) $ECHO_C" >&6
1656else
b61ff9c8
BS
1657 ac_cv_target_alias=$target_alias
1658test "x$ac_cv_target_alias" = "x" &&
1659 ac_cv_target_alias=$ac_cv_host_alias
1660ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1661 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1662echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
ba479fd2
NN
1663 { (exit 1); exit 1; }; }
1664
1665fi
b61ff9c8
BS
1666echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1667echo "${ECHO_T}$ac_cv_target" >&6
ba479fd2 1668target=$ac_cv_target
b61ff9c8
BS
1669target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1670target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1671target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba479fd2
NN
1672
1673
1674# The aliases save the names the user supplied, while $host etc.
1675# will get canonicalized.
1676test -n "$target_alias" &&
1677 test "$program_prefix$program_suffix$program_transform_name" = \
1678 NONENONEs,x,x, &&
1679 program_prefix=${target_alias}-
1680
1681# Determine the noncanonical target name, for directory use.
18fc9bd4
RG
1682 case ${build_alias} in
1683 "") build_noncanonical=${build} ;;
1684 *) build_noncanonical=${build_alias} ;;
1685esac
1686
1687 case ${host_alias} in
1688 "") host_noncanonical=${build_noncanonical} ;;
1689 *) host_noncanonical=${host_alias} ;;
1690esac
1691
1692 case ${target_alias} in
1693 "") target_noncanonical=${host_noncanonical} ;;
1694 *) target_noncanonical=${target_alias} ;;
1695esac
1696
1697
1698
8f1529e6
L
1699
1700# Determine the target- and build-specific subdirectories
57255173
PB
1701
1702# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
1703# have matching libraries, they should use host libraries: Makefile.tpl
1704# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
1705# However, they still use the build modules, because the corresponding
1706# host modules (e.g. bison) are only built for the host when bootstrap
1707# finishes. So:
1708# - build_subdir is where we find build modules, and never changes.
1709# - build_libsubdir is where we find build libraries, and can be overridden.
1710
1711# Prefix 'build-' so this never conflicts with target_subdir.
18fc9bd4 1712build_subdir="build-${build_noncanonical}"
1546bb64 1713
b61ff9c8 1714# Check whether --with-build-libsubdir or --without-build-libsubdir was given.
1546bb64 1715if test "${with_build_libsubdir+set}" = set; then
b61ff9c8
BS
1716 withval="$with_build_libsubdir"
1717 build_libsubdir="$withval"
1546bb64
PB
1718else
1719 build_libsubdir="$build_subdir"
b61ff9c8 1720fi;
18fc9bd4
RG
1721# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1722if ( test $srcdir = . && test -d gcc ) \
1723 || test -d $srcdir/../host-${host_noncanonical}; then
1724 host_subdir="host-${host_noncanonical}"
1725else
1726 host_subdir=.
1727fi
1728# No prefix.
1729target_subdir=${target_noncanonical}
1730
73458fb7 1731
093e61a6 1732# Set program_transform_name
13c22933 1733test "$program_prefix" != NONE &&
b61ff9c8 1734 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1735# Use a double $ so make ignores it.
1736test "$program_suffix" != NONE &&
b61ff9c8 1737 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
ba479fd2
NN
1738# Double any \ or $. echo might interpret backslashes.
1739# By default was `s,x,x', remove it if useless.
1740cat <<\_ACEOF >conftest.sed
1741s/[\\$]/&&/g;s/;s,x,x,$//
1742_ACEOF
1743program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
b61ff9c8 1744rm conftest.sed
13c22933
JJ
1745
1746
34a86c2b
NN
1747# Check for bogus environment variables.
1748# Test if LIBRARY_PATH contains the notation for the current directory
1749# since this would lead to problems installing/building glibc.
1750# LIBRARY_PATH contains the current directory if one of the following
1751# is true:
1752# - one of the terminals (":" and ";") is the first or last sign
1753# - two terminals occur directly after each other
1754# - the path contains an element with a dot in it
b61ff9c8
BS
1755echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1756echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1757case ${LIBRARY_PATH} in
1758 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1759 library_path_setting="contains current directory"
1760 ;;
1761 *)
1762 library_path_setting="ok"
1763 ;;
1764esac
b61ff9c8
BS
1765echo "$as_me:$LINENO: result: $library_path_setting" >&5
1766echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1767if test "$library_path_setting" != "ok"; then
ba479fd2 1768{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1769*** LIBRARY_PATH shouldn't contain the current directory when
1770*** building gcc. Please change the environment variable
ba479fd2
NN
1771*** and run configure again." >&5
1772echo "$as_me: error:
1773*** LIBRARY_PATH shouldn't contain the current directory when
1774*** building gcc. Please change the environment variable
1775*** and run configure again." >&2;}
1776 { (exit 1); exit 1; }; }
e9a25f70
JL
1777fi
1778
34a86c2b
NN
1779# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1780# since this would lead to problems installing/building glibc.
1781# GCC_EXEC_PREFIX contains the current directory if one of the following
1782# is true:
1783# - one of the terminals (":" and ";") is the first or last sign
1784# - two terminals occur directly after each other
1785# - the path contains an element with a dot in it
b61ff9c8
BS
1786echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1787echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1788case ${GCC_EXEC_PREFIX} in
1789 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1790 gcc_exec_prefix_setting="contains current directory"
1791 ;;
1792 *)
1793 gcc_exec_prefix_setting="ok"
1794 ;;
1795esac
b61ff9c8
BS
1796echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1797echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1798if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1799{ { echo "$as_me:$LINENO: error:
1800*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1801*** building gcc. Please change the environment variable
1802*** and run configure again." >&5
1803echo "$as_me: error:
cafe096b
EC
1804*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1805*** building gcc. Please change the environment variable
ba479fd2
NN
1806*** and run configure again." >&2;}
1807 { (exit 1); exit 1; }; }
34a86c2b
NN
1808fi
1809
1810# -----------
1811# Directories
1812# -----------
1813
1814# Specify the local prefix
1815local_prefix=
ba479fd2 1816
b61ff9c8 1817# Check whether --with-local-prefix or --without-local-prefix was given.
34a86c2b 1818if test "${with_local_prefix+set}" = set; then
b61ff9c8
BS
1819 withval="$with_local_prefix"
1820 case "${withval}" in
ba479fd2
NN
1821yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1822echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1823 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1824no) ;;
1825*) local_prefix=$with_local_prefix ;;
1826esac
b61ff9c8 1827fi;
34a86c2b
NN
1828
1829# Default local prefix if it is empty
1830if test x$local_prefix = x; then
1831 local_prefix=/usr/local
1832fi
1833
1834# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1835# passed in by the toplevel make and thus we'd get different behavior
1836# depending on where we built the sources.
1837gcc_gxx_include_dir=
1838# Specify the g++ header file directory
ba479fd2 1839
b61ff9c8 1840# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
34a86c2b 1841if test "${with_gxx_include_dir+set}" = set; then
b61ff9c8
BS
1842 withval="$with_gxx_include_dir"
1843 case "${withval}" in
ba479fd2
NN
1844yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1845echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1846 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1847no) ;;
1848*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1849esac
b61ff9c8 1850fi;
34a86c2b 1851
0f57bf40 1852# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
34a86c2b
NN
1853if test x${gcc_gxx_include_dir} = x; then
1854 if test x${enable_version_specific_runtime_libs} = xyes; then
1855 gcc_gxx_include_dir='${libsubdir}/include/c++'
1856 else
0f57bf40
MM
1857 libstdcxx_incdir='include/c++/$(version)'
1858 if test x$host != x$target; then
1859 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
1860 fi
15c723f3 1861 gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
34a86c2b
NN
1862 fi
1863fi
1864
ba479fd2 1865
b61ff9c8 1866# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
34a86c2b 1867if test "${with_cpp_install_dir+set}" = set; then
b61ff9c8
BS
1868 withval="$with_cpp_install_dir"
1869 if test x$withval = xyes; then
ba479fd2
NN
1870 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1871echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1872 { (exit 1); exit 1; }; }
34a86c2b
NN
1873elif test x$withval != xno; then
1874 cpp_install_dir=$withval
1875fi
b61ff9c8 1876fi;
34a86c2b 1877
51b9ff45 1878# We would like to our source tree to be readonly. However when releases or
ba479fd2 1879# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1880# various formats of manuals need to be included along with the rest of the
ba479fd2 1881# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1882# just that.
1883
b61ff9c8
BS
1884echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1885echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1886 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45 1887if test "${enable_generated_files_in_srcdir+set}" = set; then
b61ff9c8
BS
1888 enableval="$enable_generated_files_in_srcdir"
1889 generated_files_in_srcdir=$enableval
51b9ff45 1890else
03787dfd 1891 generated_files_in_srcdir=no
b61ff9c8 1892fi;
1a4b763e 1893
b61ff9c8
BS
1894echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1895echo "${ECHO_T}$generated_files_in_srcdir" >&6
03787dfd
KC
1896
1897if test "$generated_files_in_srcdir" = "yes"; then
1898 GENINSRC=''
03787dfd
KC
1899else
1900 GENINSRC='#'
03787dfd
KC
1901fi
1902
1903
34a86c2b
NN
1904# -------------------
1905# Find default linker
1906# -------------------
1907
1908# With GNU ld
ba479fd2 1909
b61ff9c8 1910# Check whether --with-gnu-ld or --without-gnu-ld was given.
34a86c2b 1911if test "${with_gnu_ld+set}" = set; then
b61ff9c8
BS
1912 withval="$with_gnu_ld"
1913 gnu_ld_flag="$with_gnu_ld"
34a86c2b
NN
1914else
1915 gnu_ld_flag=no
b61ff9c8 1916fi;
6e3f3080 1917
63cf211a 1918# With pre-defined ld
ba479fd2 1919
b61ff9c8 1920# Check whether --with-ld or --without-ld was given.
34a86c2b 1921if test "${with_ld+set}" = set; then
b61ff9c8
BS
1922 withval="$with_ld"
1923 DEFAULT_LINKER="$with_ld"
1924fi;
34a86c2b
NN
1925if test x"${DEFAULT_LINKER+set}" = x"set"; then
1926 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1927 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1928echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1929 { (exit 1); exit 1; }; }
34a86c2b
NN
1930 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1931 gnu_ld_flag=yes
1932 fi
ba479fd2
NN
1933
1934cat >>confdefs.h <<_ACEOF
34a86c2b 1935#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1936_ACEOF
34a86c2b
NN
1937
1938fi
1939
2091ff66
NF
1940gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
1941
1942cat >>confdefs.h <<_ACEOF
1943#define HAVE_GNU_LD $gnu_ld
1944_ACEOF
1945
1946
b61ff9c8
BS
1947echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1948echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1949if test x"${DEFAULT_LINKER+set}" = x"set"; then
1950 if test x"$gnu_ld_flag" = x"no"; then
b61ff9c8
BS
1951 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1952echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1953 else
b61ff9c8
BS
1954 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1955echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1956 fi
1957else
b61ff9c8
BS
1958 echo "$as_me:$LINENO: result: no" >&5
1959echo "${ECHO_T}no" >&6
34a86c2b
NN
1960fi
1961
d594623a
L
1962# With demangler in GNU ld
1963
b61ff9c8 1964# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
d594623a 1965if test "${with_demangler_in_ld+set}" = set; then
b61ff9c8
BS
1966 withval="$with_demangler_in_ld"
1967 demangler_in_ld="$with_demangler_in_ld"
d594623a
L
1968else
1969 demangler_in_ld=no
b61ff9c8 1970fi;
d594623a 1971
34a86c2b
NN
1972# ----------------------
1973# Find default assembler
1974# ----------------------
1975
1976# With GNU as
ba479fd2 1977
b61ff9c8 1978# Check whether --with-gnu-as or --without-gnu-as was given.
34a86c2b 1979if test "${with_gnu_as+set}" = set; then
b61ff9c8
BS
1980 withval="$with_gnu_as"
1981 gas_flag="$with_gnu_as"
34a86c2b
NN
1982else
1983 gas_flag=no
b61ff9c8 1984fi;
ab22c1fa 1985
1a4b763e 1986
b61ff9c8 1987# Check whether --with-as or --without-as was given.
34a86c2b 1988if test "${with_as+set}" = set; then
b61ff9c8
BS
1989 withval="$with_as"
1990 DEFAULT_ASSEMBLER="$with_as"
1991fi;
34a86c2b
NN
1992if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1993 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1994 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1995echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1996 { (exit 1); exit 1; }; }
34a86c2b
NN
1997 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1998 gas_flag=yes
1999 fi
ba479fd2
NN
2000
2001cat >>confdefs.h <<_ACEOF
34a86c2b 2002#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 2003_ACEOF
34a86c2b
NN
2004
2005fi
2006
dc60b775
CD
2007gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
2008
2009cat >>confdefs.h <<_ACEOF
2010#define HAVE_GNU_AS $gnu_as
2011_ACEOF
2012
2013
b61ff9c8
BS
2014echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
2015echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
2016if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2017 if test x"$gas_flag" = x"no"; then
b61ff9c8
BS
2018 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
2019echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 2020 else
b61ff9c8
BS
2021 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
2022echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
2023 fi
2024else
b61ff9c8
BS
2025 echo "$as_me:$LINENO: result: no" >&5
2026echo "${ECHO_T}no" >&6
34a86c2b
NN
2027fi
2028
2029# ---------------
2030# Find C compiler
2031# ---------------
2032
426ca3ca
RO
2033# If a non-executable a.out is present (e.g. created by GNU as above even if
2034# invoked with -v only), the IRIX 6 native ld just overwrites the existing
2035# file, even when creating an executable, so an execution test fails.
2036# Remove possible default executable files to avoid this.
2037#
2038# FIXME: This really belongs into AC_PROG_CC and can be removed once
2039# Autoconf includes it.
2040rm -f a.out a.exe b.out
2041
34a86c2b 2042# Find the native compiler
ba479fd2
NN
2043ac_ext=c
2044ac_cpp='$CPP $CPPFLAGS'
2045ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2046ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2047ac_compiler_gnu=$ac_cv_c_compiler_gnu
2048if test -n "$ac_tool_prefix"; then
2049 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2050set dummy ${ac_tool_prefix}gcc; ac_word=$2
b61ff9c8
BS
2051echo "$as_me:$LINENO: checking for $ac_word" >&5
2052echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2053if test "${ac_cv_prog_CC+set}" = set; then
2054 echo $ECHO_N "(cached) $ECHO_C" >&6
2055else
2056 if test -n "$CC"; then
2057 ac_cv_prog_CC="$CC" # Let the user override the test.
2058else
2059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2060for as_dir in $PATH
2061do
2062 IFS=$as_save_IFS
2063 test -z "$as_dir" && as_dir=.
2064 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2065 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2066 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2067 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2068 break 2
2069 fi
2070done
2071done
2072
2073fi
2074fi
2075CC=$ac_cv_prog_CC
2076if test -n "$CC"; then
b61ff9c8
BS
2077 echo "$as_me:$LINENO: result: $CC" >&5
2078echo "${ECHO_T}$CC" >&6
ba479fd2 2079else
b61ff9c8
BS
2080 echo "$as_me:$LINENO: result: no" >&5
2081echo "${ECHO_T}no" >&6
ba479fd2
NN
2082fi
2083
2084fi
2085if test -z "$ac_cv_prog_CC"; then
2086 ac_ct_CC=$CC
2087 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 2088set dummy gcc; ac_word=$2
b61ff9c8
BS
2089echo "$as_me:$LINENO: checking for $ac_word" >&5
2090echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2091if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2092 echo $ECHO_N "(cached) $ECHO_C" >&6
2093else
2094 if test -n "$ac_ct_CC"; then
2095 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2096else
2097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2098for as_dir in $PATH
2099do
2100 IFS=$as_save_IFS
2101 test -z "$as_dir" && as_dir=.
2102 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2103 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2104 ac_cv_prog_ac_ct_CC="gcc"
2105 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2106 break 2
2107 fi
2108done
2109done
2110
2111fi
2112fi
2113ac_ct_CC=$ac_cv_prog_ac_ct_CC
2114if test -n "$ac_ct_CC"; then
b61ff9c8
BS
2115 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2116echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 2117else
b61ff9c8
BS
2118 echo "$as_me:$LINENO: result: no" >&5
2119echo "${ECHO_T}no" >&6
ba479fd2
NN
2120fi
2121
b61ff9c8 2122 CC=$ac_ct_CC
ba479fd2
NN
2123else
2124 CC="$ac_cv_prog_CC"
2125fi
2126
2127if test -z "$CC"; then
b61ff9c8
BS
2128 if test -n "$ac_tool_prefix"; then
2129 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
ba479fd2 2130set dummy ${ac_tool_prefix}cc; ac_word=$2
b61ff9c8
BS
2131echo "$as_me:$LINENO: checking for $ac_word" >&5
2132echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2133if test "${ac_cv_prog_CC+set}" = set; then
2134 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
2135else
2136 if test -n "$CC"; then
2137 ac_cv_prog_CC="$CC" # Let the user override the test.
2138else
ba479fd2
NN
2139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2140for as_dir in $PATH
2141do
2142 IFS=$as_save_IFS
2143 test -z "$as_dir" && as_dir=.
2144 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2145 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2146 ac_cv_prog_CC="${ac_tool_prefix}cc"
2147 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2148 break 2
2149 fi
2150done
2151done
2152
cd9e5e7c
MK
2153fi
2154fi
ba479fd2 2155CC=$ac_cv_prog_CC
cd9e5e7c 2156if test -n "$CC"; then
b61ff9c8
BS
2157 echo "$as_me:$LINENO: result: $CC" >&5
2158echo "${ECHO_T}$CC" >&6
2f41c1d6 2159else
b61ff9c8
BS
2160 echo "$as_me:$LINENO: result: no" >&5
2161echo "${ECHO_T}no" >&6
2f41c1d6
PB
2162fi
2163
b61ff9c8
BS
2164fi
2165if test -z "$ac_cv_prog_CC"; then
2166 ac_ct_CC=$CC
2167 # Extract the first word of "cc", so it can be a program name with args.
2168set dummy cc; ac_word=$2
2169echo "$as_me:$LINENO: checking for $ac_word" >&5
2170echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2171if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2172 echo $ECHO_N "(cached) $ECHO_C" >&6
2173else
2174 if test -n "$ac_ct_CC"; then
2175 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2176else
2177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2178for as_dir in $PATH
2179do
2180 IFS=$as_save_IFS
2181 test -z "$as_dir" && as_dir=.
2182 for ac_exec_ext in '' $ac_executable_extensions; do
2183 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2184 ac_cv_prog_ac_ct_CC="cc"
2185 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2186 break 2
1a4b763e 2187 fi
b61ff9c8
BS
2188done
2189done
2190
2191fi
2192fi
2193ac_ct_CC=$ac_cv_prog_ac_ct_CC
2194if test -n "$ac_ct_CC"; then
2195 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2196echo "${ECHO_T}$ac_ct_CC" >&6
2197else
2198 echo "$as_me:$LINENO: result: no" >&5
2199echo "${ECHO_T}no" >&6
2200fi
2201
2202 CC=$ac_ct_CC
2203else
2204 CC="$ac_cv_prog_CC"
2205fi
2206
ba479fd2 2207fi
6e3f3080
NN
2208if test -z "$CC"; then
2209 # Extract the first word of "cc", so it can be a program name with args.
2210set dummy cc; ac_word=$2
b61ff9c8
BS
2211echo "$as_me:$LINENO: checking for $ac_word" >&5
2212echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2213if test "${ac_cv_prog_CC+set}" = set; then
2214 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2215else
2216 if test -n "$CC"; then
2217 ac_cv_prog_CC="$CC" # Let the user override the test.
2218else
2219 ac_prog_rejected=no
ba479fd2
NN
2220as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2221for as_dir in $PATH
2222do
2223 IFS=$as_save_IFS
2224 test -z "$as_dir" && as_dir=.
2225 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2226 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2227 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2228 ac_prog_rejected=yes
2229 continue
2230 fi
2231 ac_cv_prog_CC="cc"
2232 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2233 break 2
2234 fi
2235done
2236done
2237
6e3f3080
NN
2238if test $ac_prog_rejected = yes; then
2239 # We found a bogon in the path, so make sure we never use it.
2240 set dummy $ac_cv_prog_CC
2241 shift
ba479fd2 2242 if test $# != 0; then
6e3f3080
NN
2243 # We chose a different compiler from the bogus one.
2244 # However, it has the same basename, so the bogon will be chosen
2245 # first if we set CC to just the basename; use the full file name.
2246 shift
ba479fd2 2247 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2248 fi
6e3f3080
NN
2249fi
2250fi
2251fi
ba479fd2 2252CC=$ac_cv_prog_CC
6e3f3080 2253if test -n "$CC"; then
b61ff9c8
BS
2254 echo "$as_me:$LINENO: result: $CC" >&5
2255echo "${ECHO_T}$CC" >&6
e9a25f70 2256else
b61ff9c8
BS
2257 echo "$as_me:$LINENO: result: no" >&5
2258echo "${ECHO_T}no" >&6
e9a25f70 2259fi
6e3f3080 2260
ba479fd2
NN
2261fi
2262if test -z "$CC"; then
2263 if test -n "$ac_tool_prefix"; then
b61ff9c8 2264 for ac_prog in cl
ba479fd2
NN
2265 do
2266 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2267set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b61ff9c8
BS
2268echo "$as_me:$LINENO: checking for $ac_word" >&5
2269echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2270if test "${ac_cv_prog_CC+set}" = set; then
2271 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2272else
6e3f3080
NN
2273 if test -n "$CC"; then
2274 ac_cv_prog_CC="$CC" # Let the user override the test.
2275else
ba479fd2
NN
2276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2277for as_dir in $PATH
2278do
2279 IFS=$as_save_IFS
2280 test -z "$as_dir" && as_dir=.
2281 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2282 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2283 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2284 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2285 break 2
2286 fi
2287done
2288done
2289
093e61a6 2290fi
6e3f3080 2291fi
ba479fd2 2292CC=$ac_cv_prog_CC
6e3f3080 2293if test -n "$CC"; then
b61ff9c8
BS
2294 echo "$as_me:$LINENO: result: $CC" >&5
2295echo "${ECHO_T}$CC" >&6
6e3f3080 2296else
b61ff9c8
BS
2297 echo "$as_me:$LINENO: result: no" >&5
2298echo "${ECHO_T}no" >&6
093e61a6 2299fi
cafe096b 2300
ba479fd2
NN
2301 test -n "$CC" && break
2302 done
2303fi
2304if test -z "$CC"; then
2305 ac_ct_CC=$CC
b61ff9c8 2306 for ac_prog in cl
ba479fd2
NN
2307do
2308 # Extract the first word of "$ac_prog", so it can be a program name with args.
2309set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
2310echo "$as_me:$LINENO: checking for $ac_word" >&5
2311echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2312if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2313 echo $ECHO_N "(cached) $ECHO_C" >&6
2314else
2315 if test -n "$ac_ct_CC"; then
2316 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2317else
2318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2319for as_dir in $PATH
2320do
2321 IFS=$as_save_IFS
2322 test -z "$as_dir" && as_dir=.
2323 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2324 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2325 ac_cv_prog_ac_ct_CC="$ac_prog"
2326 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2327 break 2
2328 fi
2329done
2330done
6e3f3080 2331
ba479fd2
NN
2332fi
2333fi
2334ac_ct_CC=$ac_cv_prog_ac_ct_CC
2335if test -n "$ac_ct_CC"; then
b61ff9c8
BS
2336 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2337echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 2338else
b61ff9c8
BS
2339 echo "$as_me:$LINENO: result: no" >&5
2340echo "${ECHO_T}no" >&6
ba479fd2 2341fi
6e3f3080 2342
ba479fd2
NN
2343 test -n "$ac_ct_CC" && break
2344done
63cf211a 2345
b61ff9c8 2346 CC=$ac_ct_CC
ba479fd2
NN
2347fi
2348
2349fi
2350
2351
2352test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2353See \`config.log' for more details." >&5
2354echo "$as_me: error: no acceptable C compiler found in \$PATH
2355See \`config.log' for more details." >&2;}
2356 { (exit 1); exit 1; }; }
2357
2358# Provide some information about the compiler.
b61ff9c8
BS
2359echo "$as_me:$LINENO:" \
2360 "checking for C compiler version" >&5
ba479fd2 2361ac_compiler=`set X $ac_compile; echo $2`
b61ff9c8
BS
2362{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2363 (eval $ac_compiler --version </dev/null >&5) 2>&5
ba479fd2
NN
2364 ac_status=$?
2365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2366 (exit $ac_status); }
b61ff9c8
BS
2367{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2368 (eval $ac_compiler -v </dev/null >&5) 2>&5
ba479fd2
NN
2369 ac_status=$?
2370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2371 (exit $ac_status); }
b61ff9c8
BS
2372{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2373 (eval $ac_compiler -V </dev/null >&5) 2>&5
ba479fd2
NN
2374 ac_status=$?
2375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2376 (exit $ac_status); }
2377
2378cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2379/* confdefs.h. */
2380_ACEOF
2381cat confdefs.h >>conftest.$ac_ext
2382cat >>conftest.$ac_ext <<_ACEOF
2383/* end confdefs.h. */
2384
2385int
2386main ()
2387{
63cf211a 2388
ba479fd2
NN
2389 ;
2390 return 0;
2391}
2392_ACEOF
2393ac_clean_files_save=$ac_clean_files
2394ac_clean_files="$ac_clean_files a.out a.exe b.out"
2395# Try to create an executable without -o first, disregard a.out.
2396# It will help us diagnose broken compilers, and finding out an intuition
2397# of exeext.
b61ff9c8
BS
2398echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2399echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2 2400ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
b61ff9c8
BS
2401if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2402 (eval $ac_link_default) 2>&5
ba479fd2
NN
2403 ac_status=$?
2404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2405 (exit $ac_status); }; then
b61ff9c8
BS
2406 # Find the output, starting from the most likely. This scheme is
2407# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2408# resort.
2409
2410# Be careful to initialize this variable, since it used to be cached.
2411# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2412ac_cv_exeext=
2413# b.out is created by i960 compilers.
2414for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
ba479fd2
NN
2415do
2416 test -f "$ac_file" || continue
2417 case $ac_file in
b61ff9c8
BS
2418 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2419 ;;
2420 conftest.$ac_ext )
2421 # This is the source file.
86da66b5 2422 ;;
ba479fd2 2423 [ab].out )
86da66b5
HPN
2424 # We found the default executable, but exeext='' is most
2425 # certainly right.
2426 break;;
ba479fd2 2427 *.* )
b61ff9c8
BS
2428 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2429 # FIXME: I believe we export ac_cv_exeext for Libtool,
2430 # but it would be cool to find out if it's true. Does anybody
2431 # maintain Libtool? --akim.
2432 export ac_cv_exeext
86da66b5 2433 break;;
ba479fd2 2434 * )
86da66b5 2435 break;;
ba479fd2
NN
2436 esac
2437done
2438else
2439 echo "$as_me: failed program was:" >&5
2440sed 's/^/| /' conftest.$ac_ext >&5
2441
2442{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2443See \`config.log' for more details." >&5
2444echo "$as_me: error: C compiler cannot create executables
2445See \`config.log' for more details." >&2;}
2446 { (exit 77); exit 77; }; }
2447fi
2448
2449ac_exeext=$ac_cv_exeext
b61ff9c8
BS
2450echo "$as_me:$LINENO: result: $ac_file" >&5
2451echo "${ECHO_T}$ac_file" >&6
ba479fd2 2452
b61ff9c8 2453# Check the compiler produces executables we can run. If not, either
ba479fd2 2454# the compiler is broken, or we cross compile.
b61ff9c8
BS
2455echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2456echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
ba479fd2
NN
2457# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2458# If not cross compiling, check that we can run a simple program.
2459if test "$cross_compiling" != yes; then
2460 if { ac_try='./$ac_file'
b61ff9c8
BS
2461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2462 (eval $ac_try) 2>&5
ba479fd2
NN
2463 ac_status=$?
2464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2465 (exit $ac_status); }; }; then
2466 cross_compiling=no
6e3f3080 2467 else
ba479fd2
NN
2468 if test "$cross_compiling" = maybe; then
2469 cross_compiling=yes
2470 else
2471 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2472If you meant to cross compile, use \`--host'.
2473See \`config.log' for more details." >&5
2474echo "$as_me: error: cannot run C compiled programs.
2475If you meant to cross compile, use \`--host'.
2476See \`config.log' for more details." >&2;}
2477 { (exit 1); exit 1; }; }
2478 fi
6e3f3080
NN
2479 fi
2480fi
b61ff9c8
BS
2481echo "$as_me:$LINENO: result: yes" >&5
2482echo "${ECHO_T}yes" >&6
ba479fd2
NN
2483
2484rm -f a.out a.exe conftest$ac_cv_exeext b.out
2485ac_clean_files=$ac_clean_files_save
b61ff9c8 2486# Check the compiler produces executables we can run. If not, either
ba479fd2 2487# the compiler is broken, or we cross compile.
b61ff9c8
BS
2488echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2489echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2490echo "$as_me:$LINENO: result: $cross_compiling" >&5
2491echo "${ECHO_T}$cross_compiling" >&6
2492
2493echo "$as_me:$LINENO: checking for suffix of executables" >&5
2494echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2495if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2496 (eval $ac_link) 2>&5
ba479fd2
NN
2497 ac_status=$?
2498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2499 (exit $ac_status); }; then
2500 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2501# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2502# work properly (i.e., refer to `conftest.exe'), while it won't with
2503# `rm'.
2504for ac_file in conftest.exe conftest conftest.*; do
2505 test -f "$ac_file" || continue
2506 case $ac_file in
b61ff9c8 2507 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
ba479fd2 2508 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b61ff9c8 2509 export ac_cv_exeext
86da66b5 2510 break;;
ba479fd2
NN
2511 * ) break;;
2512 esac
2513done
e9a25f70 2514else
ba479fd2
NN
2515 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2516See \`config.log' for more details." >&5
2517echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2518See \`config.log' for more details." >&2;}
2519 { (exit 1); exit 1; }; }
2520fi
2521
2522rm -f conftest$ac_cv_exeext
b61ff9c8
BS
2523echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2524echo "${ECHO_T}$ac_cv_exeext" >&6
ba479fd2
NN
2525
2526rm -f conftest.$ac_ext
2527EXEEXT=$ac_cv_exeext
2528ac_exeext=$EXEEXT
b61ff9c8
BS
2529echo "$as_me:$LINENO: checking for suffix of object files" >&5
2530echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
ba479fd2
NN
2531if test "${ac_cv_objext+set}" = set; then
2532 echo $ECHO_N "(cached) $ECHO_C" >&6
2533else
2534 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2535/* confdefs.h. */
2536_ACEOF
2537cat confdefs.h >>conftest.$ac_ext
2538cat >>conftest.$ac_ext <<_ACEOF
2539/* end confdefs.h. */
2540
2541int
2542main ()
2543{
6e3f3080 2544
ba479fd2
NN
2545 ;
2546 return 0;
2547}
2548_ACEOF
2549rm -f conftest.o conftest.obj
b61ff9c8
BS
2550if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2551 (eval $ac_compile) 2>&5
ba479fd2
NN
2552 ac_status=$?
2553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2554 (exit $ac_status); }; then
b61ff9c8 2555 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
ba479fd2 2556 case $ac_file in
b61ff9c8 2557 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
ba479fd2
NN
2558 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2559 break;;
2560 esac
2561done
63cf211a 2562else
ba479fd2
NN
2563 echo "$as_me: failed program was:" >&5
2564sed 's/^/| /' conftest.$ac_ext >&5
2565
2566{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2567See \`config.log' for more details." >&5
2568echo "$as_me: error: cannot compute suffix of object files: cannot compile
2569See \`config.log' for more details." >&2;}
2570 { (exit 1); exit 1; }; }
2571fi
2572
2573rm -f conftest.$ac_cv_objext conftest.$ac_ext
2574fi
b61ff9c8
BS
2575echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2576echo "${ECHO_T}$ac_cv_objext" >&6
ba479fd2
NN
2577OBJEXT=$ac_cv_objext
2578ac_objext=$OBJEXT
b61ff9c8
BS
2579echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2580echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
ba479fd2
NN
2581if test "${ac_cv_c_compiler_gnu+set}" = set; then
2582 echo $ECHO_N "(cached) $ECHO_C" >&6
2583else
2584 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2585/* confdefs.h. */
2586_ACEOF
2587cat confdefs.h >>conftest.$ac_ext
2588cat >>conftest.$ac_ext <<_ACEOF
2589/* end confdefs.h. */
2590
2591int
2592main ()
2593{
2594#ifndef __GNUC__
2595 choke me
2596#endif
6e3f3080 2597
ba479fd2
NN
2598 ;
2599 return 0;
2600}
2601_ACEOF
2602rm -f conftest.$ac_objext
b61ff9c8
BS
2603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2604 (eval $ac_compile) 2>conftest.er1
ba479fd2 2605 ac_status=$?
86da66b5
HPN
2606 grep -v '^ *+' conftest.er1 >conftest.err
2607 rm -f conftest.er1
2608 cat conftest.err >&5
ba479fd2 2609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2610 (exit $ac_status); } &&
2611 { ac_try='test -z "$ac_c_werror_flag"
2612 || test ! -s conftest.err'
2613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2614 (eval $ac_try) 2>&5
2615 ac_status=$?
2616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2617 (exit $ac_status); }; } &&
2618 { ac_try='test -s conftest.$ac_objext'
2619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2620 (eval $ac_try) 2>&5
2621 ac_status=$?
2622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2623 (exit $ac_status); }; }; then
ba479fd2
NN
2624 ac_compiler_gnu=yes
2625else
2626 echo "$as_me: failed program was:" >&5
2627sed 's/^/| /' conftest.$ac_ext >&5
2628
b61ff9c8 2629ac_compiler_gnu=no
ba479fd2 2630fi
b61ff9c8 2631rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2632ac_cv_c_compiler_gnu=$ac_compiler_gnu
2633
2634fi
b61ff9c8
BS
2635echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2636echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
ba479fd2
NN
2637GCC=`test $ac_compiler_gnu = yes && echo yes`
2638ac_test_CFLAGS=${CFLAGS+set}
2639ac_save_CFLAGS=$CFLAGS
b61ff9c8
BS
2640CFLAGS="-g"
2641echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2642echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
ba479fd2
NN
2643if test "${ac_cv_prog_cc_g+set}" = set; then
2644 echo $ECHO_N "(cached) $ECHO_C" >&6
2645else
b61ff9c8 2646 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2647/* confdefs.h. */
2648_ACEOF
2649cat confdefs.h >>conftest.$ac_ext
2650cat >>conftest.$ac_ext <<_ACEOF
2651/* end confdefs.h. */
2652
2653int
2654main ()
2655{
2656
2657 ;
2658 return 0;
2659}
2660_ACEOF
2661rm -f conftest.$ac_objext
b61ff9c8
BS
2662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2663 (eval $ac_compile) 2>conftest.er1
ba479fd2 2664 ac_status=$?
86da66b5
HPN
2665 grep -v '^ *+' conftest.er1 >conftest.err
2666 rm -f conftest.er1
2667 cat conftest.err >&5
ba479fd2 2668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2669 (exit $ac_status); } &&
2670 { ac_try='test -z "$ac_c_werror_flag"
2671 || test ! -s conftest.err'
2672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2673 (eval $ac_try) 2>&5
2674 ac_status=$?
2675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2676 (exit $ac_status); }; } &&
2677 { ac_try='test -s conftest.$ac_objext'
2678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2679 (eval $ac_try) 2>&5
2680 ac_status=$?
2681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2682 (exit $ac_status); }; }; then
1a4b763e
BS
2683 ac_cv_prog_cc_g=yes
2684else
2685 echo "$as_me: failed program was:" >&5
2686sed 's/^/| /' conftest.$ac_ext >&5
2687
b61ff9c8
BS
2688ac_cv_prog_cc_g=no
2689fi
2690rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2691fi
2692echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2693echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2694if test "$ac_test_CFLAGS" = set; then
2695 CFLAGS=$ac_save_CFLAGS
2696elif test $ac_cv_prog_cc_g = yes; then
2697 if test "$GCC" = yes; then
2698 CFLAGS="-g -O2"
2699 else
2700 CFLAGS="-g"
2701 fi
2702else
2703 if test "$GCC" = yes; then
2704 CFLAGS="-O2"
2705 else
2706 CFLAGS=
2707 fi
2708fi
2709echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2710echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2711if test "${ac_cv_prog_cc_stdc+set}" = set; then
2712 echo $ECHO_N "(cached) $ECHO_C" >&6
2713else
2714 ac_cv_prog_cc_stdc=no
2715ac_save_CC=$CC
2716cat >conftest.$ac_ext <<_ACEOF
1a4b763e
BS
2717/* confdefs.h. */
2718_ACEOF
2719cat confdefs.h >>conftest.$ac_ext
2720cat >>conftest.$ac_ext <<_ACEOF
2721/* end confdefs.h. */
b61ff9c8
BS
2722#include <stdarg.h>
2723#include <stdio.h>
2724#include <sys/types.h>
2725#include <sys/stat.h>
2726/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2727struct buf { int x; };
2728FILE * (*rcsopen) (struct buf *, struct stat *, int);
2729static char *e (p, i)
2730 char **p;
2731 int i;
1a4b763e 2732{
b61ff9c8 2733 return p[i];
1a4b763e 2734}
b61ff9c8
BS
2735static char *f (char * (*g) (char **, int), char **p, ...)
2736{
2737 char *s;
2738 va_list v;
2739 va_start (v,p);
2740 s = g (p, va_arg (v,int));
2741 va_end (v);
2742 return s;
2743}
2744
2745/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2746 function prototypes and stuff, but not '\xHH' hex character constants.
2747 These don't provoke an error unfortunately, instead are silently treated
2748 as 'x'. The following induces an error, until -std1 is added to get
2749 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2750 array size at least. It's necessary to write '\x00'==0 to get something
2751 that's true only with -std1. */
2752int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2753
2754int test (int i, double x);
2755struct s1 {int (*f) (int a);};
2756struct s2 {int (*f) (double a);};
2757int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2758int argc;
2759char **argv;
2760int
2761main ()
2762{
2763return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2764 ;
2765 return 0;
2766}
2767_ACEOF
2768# Don't try gcc -ansi; that turns off useful extensions and
2769# breaks some systems' header files.
2770# AIX -qlanglvl=ansi
2771# Ultrix and OSF/1 -std1
2772# HP-UX 10.20 and later -Ae
2773# HP-UX older versions -Aa -D_HPUX_SOURCE
2774# SVR4 -Xc -D__EXTENSIONS__
2775for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2776do
2777 CC="$ac_save_CC $ac_arg"
2778 rm -f conftest.$ac_objext
2779if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2780 (eval $ac_compile) 2>conftest.er1
2781 ac_status=$?
1a4b763e
BS
2782 grep -v '^ *+' conftest.er1 >conftest.err
2783 rm -f conftest.er1
2784 cat conftest.err >&5
2f41c1d6 2785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2786 (exit $ac_status); } &&
2787 { ac_try='test -z "$ac_c_werror_flag"
2788 || test ! -s conftest.err'
2789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2790 (eval $ac_try) 2>&5
2791 ac_status=$?
2792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2793 (exit $ac_status); }; } &&
2794 { ac_try='test -s conftest.$ac_objext'
2795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2796 (eval $ac_try) 2>&5
2797 ac_status=$?
2798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2799 (exit $ac_status); }; }; then
2800 ac_cv_prog_cc_stdc=$ac_arg
2801break
1a4b763e
BS
2802else
2803 echo "$as_me: failed program was:" >&5
2804sed 's/^/| /' conftest.$ac_ext >&5
2805
b61ff9c8
BS
2806fi
2807rm -f conftest.err conftest.$ac_objext
2808done
2809rm -f conftest.$ac_ext conftest.$ac_objext
2810CC=$ac_save_CC
2811
2812fi
2813
2814case "x$ac_cv_prog_cc_stdc" in
2815 x|xno)
2816 echo "$as_me:$LINENO: result: none needed" >&5
2817echo "${ECHO_T}none needed" >&6 ;;
2818 *)
2819 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2820echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2821 CC="$CC $ac_cv_prog_cc_stdc" ;;
2822esac
2823
2824# Some people use a C++ compiler to compile C. Since we use `exit',
2825# in C++ we need to declare it. In case someone uses the same compiler
2826# for both compiling C and C++ we need to have the C++ compiler decide
2827# the declaration of exit, since it's the most demanding environment.
2828cat >conftest.$ac_ext <<_ACEOF
2829#ifndef __cplusplus
2830 choke me
2831#endif
2832_ACEOF
2833rm -f conftest.$ac_objext
2834if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2835 (eval $ac_compile) 2>conftest.er1
2836 ac_status=$?
2837 grep -v '^ *+' conftest.er1 >conftest.err
2838 rm -f conftest.er1
2839 cat conftest.err >&5
2840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2841 (exit $ac_status); } &&
2842 { ac_try='test -z "$ac_c_werror_flag"
2843 || test ! -s conftest.err'
2844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2845 (eval $ac_try) 2>&5
2846 ac_status=$?
2847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2848 (exit $ac_status); }; } &&
2849 { ac_try='test -s conftest.$ac_objext'
2850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2851 (eval $ac_try) 2>&5
2852 ac_status=$?
2853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2854 (exit $ac_status); }; }; then
2855 for ac_declaration in \
2856 '' \
2857 'extern "C" void std::exit (int) throw (); using std::exit;' \
2858 'extern "C" void std::exit (int); using std::exit;' \
2859 'extern "C" void exit (int) throw ();' \
2860 'extern "C" void exit (int);' \
2861 'void exit (int);'
2862do
2863 cat >conftest.$ac_ext <<_ACEOF
1a4b763e
BS
2864/* confdefs.h. */
2865_ACEOF
2866cat confdefs.h >>conftest.$ac_ext
2867cat >>conftest.$ac_ext <<_ACEOF
2868/* end confdefs.h. */
b61ff9c8
BS
2869$ac_declaration
2870#include <stdlib.h>
1a4b763e
BS
2871int
2872main ()
2873{
b61ff9c8 2874exit (42);
1a4b763e
BS
2875 ;
2876 return 0;
2877}
2878_ACEOF
2879rm -f conftest.$ac_objext
b61ff9c8
BS
2880if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2881 (eval $ac_compile) 2>conftest.er1
2f41c1d6 2882 ac_status=$?
1a4b763e
BS
2883 grep -v '^ *+' conftest.er1 >conftest.err
2884 rm -f conftest.er1
2885 cat conftest.err >&5
2f41c1d6 2886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2887 (exit $ac_status); } &&
2888 { ac_try='test -z "$ac_c_werror_flag"
2889 || test ! -s conftest.err'
2890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2891 (eval $ac_try) 2>&5
2892 ac_status=$?
2893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2894 (exit $ac_status); }; } &&
2895 { ac_try='test -s conftest.$ac_objext'
2896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2897 (eval $ac_try) 2>&5
2898 ac_status=$?
2899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2900 (exit $ac_status); }; }; then
2901 :
ab22c1fa
CF
2902else
2903 echo "$as_me: failed program was:" >&5
2904sed 's/^/| /' conftest.$ac_ext >&5
2905
b61ff9c8 2906continue
2f41c1d6 2907fi
b61ff9c8
BS
2908rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2909 cat >conftest.$ac_ext <<_ACEOF
ab22c1fa
CF
2910/* confdefs.h. */
2911_ACEOF
2912cat confdefs.h >>conftest.$ac_ext
2913cat >>conftest.$ac_ext <<_ACEOF
2914/* end confdefs.h. */
b61ff9c8 2915$ac_declaration
2f41c1d6
PB
2916int
2917main ()
2918{
b61ff9c8 2919exit (42);
2f41c1d6
PB
2920 ;
2921 return 0;
2922}
2923_ACEOF
b61ff9c8
BS
2924rm -f conftest.$ac_objext
2925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2926 (eval $ac_compile) 2>conftest.er1
2f41c1d6 2927 ac_status=$?
ab22c1fa
CF
2928 grep -v '^ *+' conftest.er1 >conftest.err
2929 rm -f conftest.er1
2930 cat conftest.err >&5
a3bba767 2931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2932 (exit $ac_status); } &&
2933 { ac_try='test -z "$ac_c_werror_flag"
2934 || test ! -s conftest.err'
2935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2936 (eval $ac_try) 2>&5
2937 ac_status=$?
2938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2939 (exit $ac_status); }; } &&
2940 { ac_try='test -s conftest.$ac_objext'
2941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2942 (eval $ac_try) 2>&5
2943 ac_status=$?
2944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2945 (exit $ac_status); }; }; then
2946 break
ab22c1fa
CF
2947else
2948 echo "$as_me: failed program was:" >&5
2949sed 's/^/| /' conftest.$ac_ext >&5
2950
2f41c1d6 2951fi
b61ff9c8 2952rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2f41c1d6 2953done
b61ff9c8
BS
2954rm -f conftest*
2955if test -n "$ac_declaration"; then
2956 echo '#ifdef __cplusplus' >>confdefs.h
2957 echo $ac_declaration >>confdefs.h
2958 echo '#endif' >>confdefs.h
2f41c1d6 2959fi
2f41c1d6 2960
b61ff9c8
BS
2961else
2962 echo "$as_me: failed program was:" >&5
2963sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2964
b61ff9c8
BS
2965fi
2966rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2967ac_ext=c
2968ac_cpp='$CPP $CPPFLAGS'
2969ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2970ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2971ac_compiler_gnu=$ac_cv_c_compiler_gnu
2972
2973if test "x$CC" != xcc; then
b61ff9c8
BS
2974 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2975echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
ba479fd2 2976else
b61ff9c8
BS
2977 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2978echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
ba479fd2
NN
2979fi
2980set dummy $CC; ac_cc=`echo $2 |
2981 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
b61ff9c8 2982if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
ba479fd2
NN
2983 echo $ECHO_N "(cached) $ECHO_C" >&6
2984else
2985 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2986/* confdefs.h. */
2987_ACEOF
2988cat confdefs.h >>conftest.$ac_ext
2989cat >>conftest.$ac_ext <<_ACEOF
2990/* end confdefs.h. */
2991
2992int
2993main ()
2994{
2995
2996 ;
2997 return 0;
2998}
2999_ACEOF
3ec83fc2
RH
3000# Make sure it works both with $CC and with simple cc.
3001# We do the test twice because some compilers refuse to overwrite an
3002# existing .o file with -o, though they will create one.
b61ff9c8
BS
3003ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
3004if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3005 (eval $ac_try) 2>&5
ba479fd2
NN
3006 ac_status=$?
3007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3008 (exit $ac_status); } &&
b61ff9c8
BS
3009 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3010 (eval $ac_try) 2>&5
ba479fd2
NN
3011 ac_status=$?
3012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3013 (exit $ac_status); };
3ec83fc2
RH
3014then
3015 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
3016 if test "x$CC" != xcc; then
3017 # Test first that cc exists at all.
ba479fd2 3018 if { ac_try='cc -c conftest.$ac_ext >&5'
b61ff9c8
BS
3019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3020 (eval $ac_try) 2>&5
ba479fd2
NN
3021 ac_status=$?
3022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3023 (exit $ac_status); }; }; then
b61ff9c8
BS
3024 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
3025 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3026 (eval $ac_try) 2>&5
ba479fd2
NN
3027 ac_status=$?
3028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3029 (exit $ac_status); } &&
b61ff9c8
BS
3030 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3031 (eval $ac_try) 2>&5
ba479fd2
NN
3032 ac_status=$?
3033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3034 (exit $ac_status); };
3ec83fc2 3035 then
86da66b5
HPN
3036 # cc works too.
3037 :
3ec83fc2 3038 else
86da66b5
HPN
3039 # cc exists but doesn't like -o.
3040 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
3041 fi
3042 fi
3043 fi
3044else
3045 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3046fi
b61ff9c8 3047rm -f conftest*
3ec83fc2
RH
3048
3049fi
b61ff9c8
BS
3050if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
3051 echo "$as_me:$LINENO: result: yes" >&5
3052echo "${ECHO_T}yes" >&6
3ec83fc2 3053else
b61ff9c8
BS
3054 echo "$as_me:$LINENO: result: no" >&5
3055echo "${ECHO_T}no" >&6
ba479fd2
NN
3056
3057cat >>confdefs.h <<\_ACEOF
3ec83fc2 3058#define NO_MINUS_C_MINUS_O 1
ba479fd2 3059_ACEOF
3ec83fc2
RH
3060
3061fi
3062
3b620440
KC
3063# expand $ac_aux_dir to an absolute path
3064am_aux_dir=`cd $ac_aux_dir && pwd`
3065
3066# FIXME: we rely on the cache variable name because
3067# there is no other way.
3068set dummy $CC
3069ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
3070if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
3071 # Losing compiler, so override with the script.
3072 # FIXME: It is wrong to rewrite CC.
3073 # But if we don't then we get into trouble of one sort or another.
3074 # A longer-term fix would be to have automake use am__CC in this case,
3075 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3076 CC="$am_aux_dir/compile $CC"
3077fi
3078
3d4e720a
ST
3079
3080
3081
3082if test -n "$ac_tool_prefix"; then
3083 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
3084set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
3085echo "$as_me:$LINENO: checking for $ac_word" >&5
3086echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3087if test "${ac_cv_prog_GNATBIND+set}" = set; then
3088 echo $ECHO_N "(cached) $ECHO_C" >&6
3089else
3090 if test -n "$GNATBIND"; then
3091 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
3092else
3093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3094for as_dir in $PATH
3095do
3096 IFS=$as_save_IFS
3097 test -z "$as_dir" && as_dir=.
3098 for ac_exec_ext in '' $ac_executable_extensions; do
3099 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3100 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
3101 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3102 break 2
3103 fi
3104done
3105done
3106
3107fi
3108fi
3109GNATBIND=$ac_cv_prog_GNATBIND
3110if test -n "$GNATBIND"; then
3111 echo "$as_me:$LINENO: result: $GNATBIND" >&5
3112echo "${ECHO_T}$GNATBIND" >&6
3113else
3114 echo "$as_me:$LINENO: result: no" >&5
3115echo "${ECHO_T}no" >&6
3116fi
3117
3118fi
3119if test -z "$ac_cv_prog_GNATBIND"; then
3120 ac_ct_GNATBIND=$GNATBIND
3121 # Extract the first word of "gnatbind", so it can be a program name with args.
3122set dummy gnatbind; ac_word=$2
3123echo "$as_me:$LINENO: checking for $ac_word" >&5
3124echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3125if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then
3126 echo $ECHO_N "(cached) $ECHO_C" >&6
3127else
3128 if test -n "$ac_ct_GNATBIND"; then
3129 ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
3130else
3131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3132for as_dir in $PATH
3133do
3134 IFS=$as_save_IFS
3135 test -z "$as_dir" && as_dir=.
3136 for ac_exec_ext in '' $ac_executable_extensions; do
3137 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3138 ac_cv_prog_ac_ct_GNATBIND="gnatbind"
3139 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3140 break 2
3141 fi
3142done
3143done
3144
3145 test -z "$ac_cv_prog_ac_ct_GNATBIND" && ac_cv_prog_ac_ct_GNATBIND="no"
3146fi
3147fi
3148ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
3149if test -n "$ac_ct_GNATBIND"; then
3150 echo "$as_me:$LINENO: result: $ac_ct_GNATBIND" >&5
3151echo "${ECHO_T}$ac_ct_GNATBIND" >&6
3152else
3153 echo "$as_me:$LINENO: result: no" >&5
3154echo "${ECHO_T}no" >&6
3155fi
3156
3157 GNATBIND=$ac_ct_GNATBIND
3158else
3159 GNATBIND="$ac_cv_prog_GNATBIND"
3160fi
3161
3162if test -n "$ac_tool_prefix"; then
3163 # Extract the first word of "${ac_tool_prefix}gnatmake", so it can be a program name with args.
3164set dummy ${ac_tool_prefix}gnatmake; ac_word=$2
3165echo "$as_me:$LINENO: checking for $ac_word" >&5
3166echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3167if test "${ac_cv_prog_GNATMAKE+set}" = set; then
3168 echo $ECHO_N "(cached) $ECHO_C" >&6
3169else
3170 if test -n "$GNATMAKE"; then
3171 ac_cv_prog_GNATMAKE="$GNATMAKE" # Let the user override the test.
3172else
3173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3174for as_dir in $PATH
3175do
3176 IFS=$as_save_IFS
3177 test -z "$as_dir" && as_dir=.
3178 for ac_exec_ext in '' $ac_executable_extensions; do
3179 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3180 ac_cv_prog_GNATMAKE="${ac_tool_prefix}gnatmake"
3181 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3182 break 2
3183 fi
3184done
3185done
3186
3187fi
3188fi
3189GNATMAKE=$ac_cv_prog_GNATMAKE
3190if test -n "$GNATMAKE"; then
3191 echo "$as_me:$LINENO: result: $GNATMAKE" >&5
3192echo "${ECHO_T}$GNATMAKE" >&6
3193else
3194 echo "$as_me:$LINENO: result: no" >&5
3195echo "${ECHO_T}no" >&6
3196fi
3197
3198fi
3199if test -z "$ac_cv_prog_GNATMAKE"; then
3200 ac_ct_GNATMAKE=$GNATMAKE
3201 # Extract the first word of "gnatmake", so it can be a program name with args.
3202set dummy gnatmake; ac_word=$2
3203echo "$as_me:$LINENO: checking for $ac_word" >&5
3204echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3205if test "${ac_cv_prog_ac_ct_GNATMAKE+set}" = set; then
3206 echo $ECHO_N "(cached) $ECHO_C" >&6
3207else
3208 if test -n "$ac_ct_GNATMAKE"; then
3209 ac_cv_prog_ac_ct_GNATMAKE="$ac_ct_GNATMAKE" # Let the user override the test.
3210else
3211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3212for as_dir in $PATH
3213do
3214 IFS=$as_save_IFS
3215 test -z "$as_dir" && as_dir=.
3216 for ac_exec_ext in '' $ac_executable_extensions; do
3217 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3218 ac_cv_prog_ac_ct_GNATMAKE="gnatmake"
3219 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3220 break 2
3221 fi
3222done
3223done
3224
3225 test -z "$ac_cv_prog_ac_ct_GNATMAKE" && ac_cv_prog_ac_ct_GNATMAKE="no"
3226fi
3227fi
3228ac_ct_GNATMAKE=$ac_cv_prog_ac_ct_GNATMAKE
3229if test -n "$ac_ct_GNATMAKE"; then
3230 echo "$as_me:$LINENO: result: $ac_ct_GNATMAKE" >&5
3231echo "${ECHO_T}$ac_ct_GNATMAKE" >&6
3232else
3233 echo "$as_me:$LINENO: result: no" >&5
3234echo "${ECHO_T}no" >&6
3235fi
3236
3237 GNATMAKE=$ac_ct_GNATMAKE
3238else
3239 GNATMAKE="$ac_cv_prog_GNATMAKE"
3240fi
3241
3242echo "$as_me:$LINENO: checking whether compiler driver understands Ada" >&5
3243echo $ECHO_N "checking whether compiler driver understands Ada... $ECHO_C" >&6
3244if test "${acx_cv_cc_gcc_supports_ada+set}" = set; then
3245 echo $ECHO_N "(cached) $ECHO_C" >&6
3246else
3247 cat >conftest.adb <<EOF
3248procedure conftest is begin null; end conftest;
3249EOF
3250acx_cv_cc_gcc_supports_ada=no
3251# There is a bug in old released versions of GCC which causes the
3252# driver to exit successfully when the appropriate language module
3253# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
3254# Therefore we must check for the error message as well as an
3255# unsuccessful exit.
3256# Other compilers, like HP Tru64 UNIX cc, exit successfully when
3257# given a .adb file, but produce no object file. So we must check
3258# if an object file was really produced to guard against this.
3259errors=`(${CC} -I"$srcdir"/ada -c conftest.adb) 2>&1 || echo failure`
3260if test x"$errors" = x && test -f conftest.$ac_objext; then
3261 acx_cv_cc_gcc_supports_ada=yes
3262fi
3263rm -f conftest.*
3264fi
3265echo "$as_me:$LINENO: result: $acx_cv_cc_gcc_supports_ada" >&5
3266echo "${ECHO_T}$acx_cv_cc_gcc_supports_ada" >&6
3267
3268if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
3269 have_gnat=yes
3270else
3271 have_gnat=no
3272fi
3273
3274
414d23ae
HPN
3275# autoconf is lame and doesn't give us any substitution variable for this.
3276if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
3277 NO_MINUS_C_MINUS_O=yes
3278else
3279 OUTPUT_OPTION='-o $@'
3280fi
3281
3282
3283
ec6c7392
PB
3284# Remove the -O2: for historical reasons, unless bootstrapping we prefer
3285# optimizations to be activated explicitly by the toplevel.
3286case "$CC" in
3287 */prev-gcc/xgcc*) ;;
3288 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
3289esac
3290
3291
73458fb7
NN
3292# -------------------------
3293# Check C compiler features
3294# -------------------------
3295
60d26958 3296
ba479fd2
NN
3297ac_ext=c
3298ac_cpp='$CPP $CPPFLAGS'
3299ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3300ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3301ac_compiler_gnu=$ac_cv_c_compiler_gnu
b61ff9c8
BS
3302echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3303echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
3304# On Suns, sometimes $CPP names a directory.
3305if test -n "$CPP" && test -d "$CPP"; then
3306 CPP=
3307fi
3308if test -z "$CPP"; then
ba479fd2
NN
3309 if test "${ac_cv_prog_CPP+set}" = set; then
3310 echo $ECHO_N "(cached) $ECHO_C" >&6
3311else
3312 # Double quotes because CPP needs to be expanded
3313 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3314 do
3315 ac_preproc_ok=false
3316for ac_c_preproc_warn_flag in '' yes
3317do
3318 # Use a header file that comes with gcc, so configuring glibc
3319 # with a fresh cross-compiler works.
3320 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3321 # <limits.h> exists even on freestanding compilers.
84c041a1 3322 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
3323 # not just through cpp. "Syntax error" is here to catch this case.
3324 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3325/* confdefs.h. */
3326_ACEOF
3327cat confdefs.h >>conftest.$ac_ext
3328cat >>conftest.$ac_ext <<_ACEOF
3329/* end confdefs.h. */
3330#ifdef __STDC__
3331# include <limits.h>
3332#else
3333# include <assert.h>
3334#endif
86da66b5 3335 Syntax error
ba479fd2 3336_ACEOF
b61ff9c8
BS
3337if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3338 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3339 ac_status=$?
3340 grep -v '^ *+' conftest.er1 >conftest.err
3341 rm -f conftest.er1
3342 cat conftest.err >&5
3343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3344 (exit $ac_status); } >/dev/null; then
3345 if test -s conftest.err; then
3346 ac_cpp_err=$ac_c_preproc_warn_flag
3347 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3348 else
3349 ac_cpp_err=
3350 fi
3351else
3352 ac_cpp_err=yes
3353fi
3354if test -z "$ac_cpp_err"; then
093e61a6 3355 :
cafe096b 3356else
ba479fd2
NN
3357 echo "$as_me: failed program was:" >&5
3358sed 's/^/| /' conftest.$ac_ext >&5
3359
3360 # Broken: fails on valid input.
3361continue
3362fi
3363rm -f conftest.err conftest.$ac_ext
3364
b61ff9c8 3365 # OK, works on sane cases. Now check whether non-existent headers
ba479fd2
NN
3366 # can be detected and how.
3367 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3368/* confdefs.h. */
3369_ACEOF
3370cat confdefs.h >>conftest.$ac_ext
3371cat >>conftest.$ac_ext <<_ACEOF
3372/* end confdefs.h. */
3373#include <ac_nonexistent.h>
3374_ACEOF
b61ff9c8
BS
3375if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3376 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3377 ac_status=$?
3378 grep -v '^ *+' conftest.er1 >conftest.err
3379 rm -f conftest.er1
3380 cat conftest.err >&5
3381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3382 (exit $ac_status); } >/dev/null; then
3383 if test -s conftest.err; then
3384 ac_cpp_err=$ac_c_preproc_warn_flag
3385 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3386 else
3387 ac_cpp_err=
3388 fi
3389else
3390 ac_cpp_err=yes
3391fi
3392if test -z "$ac_cpp_err"; then
ba479fd2
NN
3393 # Broken: success on invalid input.
3394continue
3395else
3396 echo "$as_me: failed program was:" >&5
3397sed 's/^/| /' conftest.$ac_ext >&5
3398
3399 # Passes both tests.
3400ac_preproc_ok=:
3401break
3402fi
3403rm -f conftest.err conftest.$ac_ext
3404
3405done
3406# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3407rm -f conftest.err conftest.$ac_ext
3408if $ac_preproc_ok; then
3409 break
3410fi
3411
3412 done
3413 ac_cv_prog_CPP=$CPP
3414
3415fi
3416 CPP=$ac_cv_prog_CPP
3417else
3418 ac_cv_prog_CPP=$CPP
3419fi
b61ff9c8
BS
3420echo "$as_me:$LINENO: result: $CPP" >&5
3421echo "${ECHO_T}$CPP" >&6
ba479fd2
NN
3422ac_preproc_ok=false
3423for ac_c_preproc_warn_flag in '' yes
3424do
3425 # Use a header file that comes with gcc, so configuring glibc
3426 # with a fresh cross-compiler works.
3427 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3428 # <limits.h> exists even on freestanding compilers.
3429 # On the NeXT, cc -E runs the code through the compiler's parser,
3430 # not just through cpp. "Syntax error" is here to catch this case.
3431 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3432/* confdefs.h. */
3433_ACEOF
3434cat confdefs.h >>conftest.$ac_ext
3435cat >>conftest.$ac_ext <<_ACEOF
3436/* end confdefs.h. */
3437#ifdef __STDC__
3438# include <limits.h>
3439#else
3440# include <assert.h>
3441#endif
86da66b5 3442 Syntax error
ba479fd2 3443_ACEOF
b61ff9c8
BS
3444if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3445 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3446 ac_status=$?
3447 grep -v '^ *+' conftest.er1 >conftest.err
3448 rm -f conftest.er1
3449 cat conftest.err >&5
3450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3451 (exit $ac_status); } >/dev/null; then
3452 if test -s conftest.err; then
3453 ac_cpp_err=$ac_c_preproc_warn_flag
3454 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3455 else
3456 ac_cpp_err=
3457 fi
3458else
3459 ac_cpp_err=yes
3460fi
3461if test -z "$ac_cpp_err"; then
6e3f3080 3462 :
414d23ae 3463else
ba479fd2
NN
3464 echo "$as_me: failed program was:" >&5
3465sed 's/^/| /' conftest.$ac_ext >&5
3466
3467 # Broken: fails on valid input.
3468continue
3469fi
3470rm -f conftest.err conftest.$ac_ext
3471
b61ff9c8 3472 # OK, works on sane cases. Now check whether non-existent headers
ba479fd2
NN
3473 # can be detected and how.
3474 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3475/* confdefs.h. */
3476_ACEOF
3477cat confdefs.h >>conftest.$ac_ext
3478cat >>conftest.$ac_ext <<_ACEOF
3479/* end confdefs.h. */
3480#include <ac_nonexistent.h>
3481_ACEOF
b61ff9c8
BS
3482if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3483 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3484 ac_status=$?
3485 grep -v '^ *+' conftest.er1 >conftest.err
3486 rm -f conftest.er1
3487 cat conftest.err >&5
3488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3489 (exit $ac_status); } >/dev/null; then
3490 if test -s conftest.err; then
3491 ac_cpp_err=$ac_c_preproc_warn_flag
3492 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3493 else
3494 ac_cpp_err=
3495 fi
3496else
3497 ac_cpp_err=yes
3498fi
3499if test -z "$ac_cpp_err"; then
ba479fd2
NN
3500 # Broken: success on invalid input.
3501continue
3502else
3503 echo "$as_me: failed program was:" >&5
3504sed 's/^/| /' conftest.$ac_ext >&5
3505
3506 # Passes both tests.
3507ac_preproc_ok=:
3508break
63cf211a 3509fi
ba479fd2
NN
3510rm -f conftest.err conftest.$ac_ext
3511
3512done
3513# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3514rm -f conftest.err conftest.$ac_ext
3515if $ac_preproc_ok; then
3516 :
6e3f3080 3517else
ba479fd2
NN
3518 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3519See \`config.log' for more details." >&5
3520echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3521See \`config.log' for more details." >&2;}
3522 { (exit 1); exit 1; }; }
6e3f3080
NN
3523fi
3524
ba479fd2
NN
3525ac_ext=c
3526ac_cpp='$CPP $CPPFLAGS'
3527ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3528ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3529ac_compiler_gnu=$ac_cv_c_compiler_gnu
3530
b5472e1d 3531
60d26958
PB
3532echo "$as_me:$LINENO: checking for egrep" >&5
3533echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3534if test "${ac_cv_prog_egrep+set}" = set; then
3535 echo $ECHO_N "(cached) $ECHO_C" >&6
3536else
3537 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3538 then ac_cv_prog_egrep='grep -E'
3539 else ac_cv_prog_egrep='egrep'
3540 fi
3541fi
3542echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3543echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3544 EGREP=$ac_cv_prog_egrep
3545
3546
3547echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3548echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3549if test "${ac_cv_header_stdc+set}" = set; then
ba479fd2 3550 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3551else
ba479fd2 3552 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3553/* confdefs.h. */
3554_ACEOF
3555cat confdefs.h >>conftest.$ac_ext
3556cat >>conftest.$ac_ext <<_ACEOF
3557/* end confdefs.h. */
60d26958
PB
3558#include <stdlib.h>
3559#include <stdarg.h>
3560#include <string.h>
3561#include <float.h>
3562
3563int
3564main ()
3565{
414d23ae 3566
60d26958
PB
3567 ;
3568 return 0;
3569}
ba479fd2
NN
3570_ACEOF
3571rm -f conftest.$ac_objext
b61ff9c8
BS
3572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3573 (eval $ac_compile) 2>conftest.er1
ba479fd2 3574 ac_status=$?
86da66b5
HPN
3575 grep -v '^ *+' conftest.er1 >conftest.err
3576 rm -f conftest.er1
3577 cat conftest.err >&5
ba479fd2 3578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3579 (exit $ac_status); } &&
3580 { ac_try='test -z "$ac_c_werror_flag"
3581 || test ! -s conftest.err'
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); }; } &&
3587 { ac_try='test -s conftest.$ac_objext'
3588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3589 (eval $ac_try) 2>&5
3590 ac_status=$?
3591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3592 (exit $ac_status); }; }; then
60d26958 3593 ac_cv_header_stdc=yes
414d23ae 3594else
ba479fd2
NN
3595 echo "$as_me: failed program was:" >&5
3596sed 's/^/| /' conftest.$ac_ext >&5
3597
60d26958 3598ac_cv_header_stdc=no
414d23ae 3599fi
b61ff9c8 3600rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3601
60d26958
PB
3602if test $ac_cv_header_stdc = yes; then
3603 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3604 cat >conftest.$ac_ext <<_ACEOF
3605/* confdefs.h. */
3606_ACEOF
3607cat confdefs.h >>conftest.$ac_ext
3608cat >>conftest.$ac_ext <<_ACEOF
3609/* end confdefs.h. */
3610#include <string.h>
3611
3612_ACEOF
3613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3614 $EGREP "memchr" >/dev/null 2>&1; then
3615 :
3616else
3617 ac_cv_header_stdc=no
414d23ae 3618fi
60d26958 3619rm -f conftest*
86da66b5 3620
60d26958 3621fi
86da66b5 3622
60d26958
PB
3623if test $ac_cv_header_stdc = yes; then
3624 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3625 cat >conftest.$ac_ext <<_ACEOF
3626/* confdefs.h. */
3627_ACEOF
3628cat confdefs.h >>conftest.$ac_ext
3629cat >>conftest.$ac_ext <<_ACEOF
3630/* end confdefs.h. */
3631#include <stdlib.h>
3632
3633_ACEOF
3634if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3635 $EGREP "free" >/dev/null 2>&1; then
3636 :
3637else
3638 ac_cv_header_stdc=no
3639fi
3640rm -f conftest*
3641
3642fi
3643
3644if test $ac_cv_header_stdc = yes; then
3645 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3646 if test "$cross_compiling" = yes; then
3647 :
3648else
3649 cat >conftest.$ac_ext <<_ACEOF
3650/* confdefs.h. */
3651_ACEOF
3652cat confdefs.h >>conftest.$ac_ext
3653cat >>conftest.$ac_ext <<_ACEOF
3654/* end confdefs.h. */
3655#include <ctype.h>
3656#if ((' ' & 0x0FF) == 0x020)
3657# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3658# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3659#else
3660# define ISLOWER(c) \
3661 (('a' <= (c) && (c) <= 'i') \
3662 || ('j' <= (c) && (c) <= 'r') \
3663 || ('s' <= (c) && (c) <= 'z'))
3664# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
86da66b5 3665#endif
60d26958
PB
3666
3667#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3668int
3669main ()
3670{
3671 int i;
3672 for (i = 0; i < 256; i++)
3673 if (XOR (islower (i), ISLOWER (i))
3674 || toupper (i) != TOUPPER (i))
3675 exit(2);
3676 exit (0);
3677}
ba479fd2 3678_ACEOF
60d26958
PB
3679rm -f conftest$ac_exeext
3680if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3681 (eval $ac_link) 2>&5
3682 ac_status=$?
3683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3684 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3686 (eval $ac_try) 2>&5
3687 ac_status=$?
3688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3689 (exit $ac_status); }; }; then
3690 :
3691else
3692 echo "$as_me: program exited with status $ac_status" >&5
3693echo "$as_me: failed program was:" >&5
3694sed 's/^/| /' conftest.$ac_ext >&5
414d23ae 3695
60d26958
PB
3696( exit $ac_status )
3697ac_cv_header_stdc=no
3698fi
3699rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3700fi
3701fi
3702fi
3703echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3704echo "${ECHO_T}$ac_cv_header_stdc" >&6
3705if test $ac_cv_header_stdc = yes; then
414d23ae 3706
60d26958
PB
3707cat >>confdefs.h <<\_ACEOF
3708#define STDC_HEADERS 1
3709_ACEOF
bf3b7cd3 3710
60d26958
PB
3711fi
3712
3713# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3724 inttypes.h stdint.h unistd.h
3725do
3726as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3727echo "$as_me:$LINENO: checking for $ac_header" >&5
3728echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3729if eval "test \"\${$as_ac_Header+set}\" = set"; then
1a4b763e
BS
3730 echo $ECHO_N "(cached) $ECHO_C" >&6
3731else
60d26958
PB
3732 cat >conftest.$ac_ext <<_ACEOF
3733/* confdefs.h. */
3734_ACEOF
3735cat confdefs.h >>conftest.$ac_ext
3736cat >>conftest.$ac_ext <<_ACEOF
3737/* end confdefs.h. */
3738$ac_includes_default
3739
3740#include <$ac_header>
3741_ACEOF
3742rm -f conftest.$ac_objext
3743if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3744 (eval $ac_compile) 2>conftest.er1
3745 ac_status=$?
3746 grep -v '^ *+' conftest.er1 >conftest.err
3747 rm -f conftest.er1
3748 cat conftest.err >&5
3749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3750 (exit $ac_status); } &&
3751 { ac_try='test -z "$ac_c_werror_flag"
3752 || test ! -s conftest.err'
3753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3754 (eval $ac_try) 2>&5
3755 ac_status=$?
3756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3757 (exit $ac_status); }; } &&
3758 { ac_try='test -s conftest.$ac_objext'
3759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3760 (eval $ac_try) 2>&5
3761 ac_status=$?
3762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3763 (exit $ac_status); }; }; then
3764 eval "$as_ac_Header=yes"
3765else
3766 echo "$as_me: failed program was:" >&5
3767sed 's/^/| /' conftest.$ac_ext >&5
3768
3769eval "$as_ac_Header=no"
b61ff9c8 3770fi
60d26958
PB
3771rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3772fi
3773echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3774echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3775if test `eval echo '${'$as_ac_Header'}'` = yes; then
3776 cat >>confdefs.h <<_ACEOF
3777#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3778_ACEOF
1a4b763e 3779
60d26958 3780fi
1a4b763e 3781
60d26958
PB
3782done
3783
3784
3785
3786 if test "${ac_cv_header_minix_config_h+set}" = set; then
3787 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3788echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3789if test "${ac_cv_header_minix_config_h+set}" = set; then
3790 echo $ECHO_N "(cached) $ECHO_C" >&6
3791fi
3792echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3793echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3794else
3795 # Is the header compilable?
3796echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3797echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3798cat >conftest.$ac_ext <<_ACEOF
3799/* confdefs.h. */
3800_ACEOF
3801cat confdefs.h >>conftest.$ac_ext
3802cat >>conftest.$ac_ext <<_ACEOF
3803/* end confdefs.h. */
3804$ac_includes_default
3805#include <minix/config.h>
3806_ACEOF
3807rm -f conftest.$ac_objext
3808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3809 (eval $ac_compile) 2>conftest.er1
3810 ac_status=$?
3811 grep -v '^ *+' conftest.er1 >conftest.err
3812 rm -f conftest.er1
3813 cat conftest.err >&5
3814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3815 (exit $ac_status); } &&
3816 { ac_try='test -z "$ac_c_werror_flag"
3817 || test ! -s conftest.err'
3818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3819 (eval $ac_try) 2>&5
3820 ac_status=$?
3821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3822 (exit $ac_status); }; } &&
3823 { ac_try='test -s conftest.$ac_objext'
3824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3825 (eval $ac_try) 2>&5
3826 ac_status=$?
3827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3828 (exit $ac_status); }; }; then
3829 ac_header_compiler=yes
3830else
3831 echo "$as_me: failed program was:" >&5
3832sed 's/^/| /' conftest.$ac_ext >&5
3833
3834ac_header_compiler=no
3835fi
3836rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3837echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3838echo "${ECHO_T}$ac_header_compiler" >&6
3839
3840# Is the header present?
3841echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3842echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3843cat >conftest.$ac_ext <<_ACEOF
3844/* confdefs.h. */
3845_ACEOF
3846cat confdefs.h >>conftest.$ac_ext
3847cat >>conftest.$ac_ext <<_ACEOF
3848/* end confdefs.h. */
3849#include <minix/config.h>
3850_ACEOF
3851if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3852 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3853 ac_status=$?
3854 grep -v '^ *+' conftest.er1 >conftest.err
3855 rm -f conftest.er1
3856 cat conftest.err >&5
3857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3858 (exit $ac_status); } >/dev/null; then
3859 if test -s conftest.err; then
3860 ac_cpp_err=$ac_c_preproc_warn_flag
3861 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3862 else
3863 ac_cpp_err=
3864 fi
3865else
3866 ac_cpp_err=yes
3867fi
3868if test -z "$ac_cpp_err"; then
3869 ac_header_preproc=yes
3870else
3871 echo "$as_me: failed program was:" >&5
3872sed 's/^/| /' conftest.$ac_ext >&5
3873
3874 ac_header_preproc=no
3875fi
3876rm -f conftest.err conftest.$ac_ext
3877echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3878echo "${ECHO_T}$ac_header_preproc" >&6
3879
3880# So? What about this header?
3881case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3882 yes:no: )
3883 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3884echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3885 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
3886echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
3887 ac_header_preproc=yes
3888 ;;
3889 no:yes:* )
3890 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3891echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3892 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3893echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3894 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
3895echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
3896 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
3897echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
3898 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3899echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3900 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
3901echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
3902 (
3903 cat <<\_ASBOX
3904## ------------------------------------------ ##
3905## Report this to the AC_PACKAGE_NAME lists. ##
3906## ------------------------------------------ ##
3907_ASBOX
3908 ) |
3909 sed "s/^/$as_me: WARNING: /" >&2
3910 ;;
3911esac
3912echo "$as_me:$LINENO: checking for minix/config.h" >&5
3913echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3914if test "${ac_cv_header_minix_config_h+set}" = set; then
3915 echo $ECHO_N "(cached) $ECHO_C" >&6
3916else
3917 ac_cv_header_minix_config_h=$ac_header_preproc
3918fi
3919echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3920echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3921
3922fi
3923if test $ac_cv_header_minix_config_h = yes; then
3924 MINIX=yes
3925else
3926 MINIX=
3927fi
3928
3929
3930 if test "$MINIX" = yes; then
3931
3932cat >>confdefs.h <<\_ACEOF
3933#define _POSIX_SOURCE 1
3934_ACEOF
3935
3936
3937cat >>confdefs.h <<\_ACEOF
3938#define _POSIX_1_SOURCE 2
3939_ACEOF
3940
3941
3942cat >>confdefs.h <<\_ACEOF
3943#define _MINIX 1
3944_ACEOF
3945
3946 fi
3947
3948
3949
3950 echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
3951echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6
3952if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
bf3b7cd3
JD
3953 echo $ECHO_N "(cached) $ECHO_C" >&6
3954else
3955 cat >conftest.$ac_ext <<_ACEOF
3956/* confdefs.h. */
3957_ACEOF
3958cat confdefs.h >>conftest.$ac_ext
3959cat >>conftest.$ac_ext <<_ACEOF
3960/* end confdefs.h. */
bf3b7cd3 3961
60d26958
PB
3962# define __EXTENSIONS__ 1
3963 $ac_includes_default
bf3b7cd3
JD
3964int
3965main ()
3966{
3967
3968 ;
3969 return 0;
3970}
3971_ACEOF
3972rm -f conftest.$ac_objext
b61ff9c8
BS
3973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3974 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3975 ac_status=$?
3976 grep -v '^ *+' conftest.er1 >conftest.err
3977 rm -f conftest.er1
3978 cat conftest.err >&5
3979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3980 (exit $ac_status); } &&
3981 { ac_try='test -z "$ac_c_werror_flag"
3982 || test ! -s conftest.err'
3983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3984 (eval $ac_try) 2>&5
3985 ac_status=$?
3986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3987 (exit $ac_status); }; } &&
3988 { ac_try='test -s conftest.$ac_objext'
3989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3990 (eval $ac_try) 2>&5
3991 ac_status=$?
3992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3993 (exit $ac_status); }; }; then
60d26958 3994 ac_cv_safe_to_define___extensions__=yes
bf3b7cd3
JD
3995else
3996 echo "$as_me: failed program was:" >&5
3997sed 's/^/| /' conftest.$ac_ext >&5
3998
60d26958 3999ac_cv_safe_to_define___extensions__=no
bf3b7cd3 4000fi
b61ff9c8 4001rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
60d26958
PB
4002fi
4003echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4004echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6
4005 test $ac_cv_safe_to_define___extensions__ = yes &&
4006 cat >>confdefs.h <<\_ACEOF
4007#define __EXTENSIONS__ 1
4008_ACEOF
bf3b7cd3 4009
60d26958
PB
4010 cat >>confdefs.h <<\_ACEOF
4011#define _ALL_SOURCE 1
4012_ACEOF
4013
4014 cat >>confdefs.h <<\_ACEOF
4015#define _GNU_SOURCE 1
4016_ACEOF
4017
4018 cat >>confdefs.h <<\_ACEOF
4019#define _POSIX_PTHREAD_SEMANTICS 1
4020_ACEOF
4021
4022 cat >>confdefs.h <<\_ACEOF
4023#define _TANDEM_SOURCE 1
4024_ACEOF
4025
4026
4027ac_ext=c
4028ac_cpp='$CPP $CPPFLAGS'
4029ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4030ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4031ac_compiler_gnu=$ac_cv_c_compiler_gnu
4032echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4033echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
4034# On Suns, sometimes $CPP names a directory.
4035if test -n "$CPP" && test -d "$CPP"; then
4036 CPP=
4037fi
4038if test -z "$CPP"; then
4039 if test "${ac_cv_prog_CPP+set}" = set; then
4040 echo $ECHO_N "(cached) $ECHO_C" >&6
4041else
4042 # Double quotes because CPP needs to be expanded
4043 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4044 do
4045 ac_preproc_ok=false
4046for ac_c_preproc_warn_flag in '' yes
4047do
4048 # Use a header file that comes with gcc, so configuring glibc
4049 # with a fresh cross-compiler works.
4050 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4051 # <limits.h> exists even on freestanding compilers.
4052 # On the NeXT, cc -E runs the code through the compiler's parser,
4053 # not just through cpp. "Syntax error" is here to catch this case.
bf3b7cd3
JD
4054 cat >conftest.$ac_ext <<_ACEOF
4055/* confdefs.h. */
4056_ACEOF
4057cat confdefs.h >>conftest.$ac_ext
4058cat >>conftest.$ac_ext <<_ACEOF
4059/* end confdefs.h. */
60d26958
PB
4060#ifdef __STDC__
4061# include <limits.h>
4062#else
4063# include <assert.h>
4064#endif
4065 Syntax error
bf3b7cd3 4066_ACEOF
60d26958
PB
4067if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4068 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4069 ac_status=$?
4070 grep -v '^ *+' conftest.er1 >conftest.err
4071 rm -f conftest.er1
4072 cat conftest.err >&5
4073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4074 (exit $ac_status); } >/dev/null; then
4075 if test -s conftest.err; then
4076 ac_cpp_err=$ac_c_preproc_warn_flag
4077 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4078 else
4079 ac_cpp_err=
4080 fi
4081else
4082 ac_cpp_err=yes
4083fi
4084if test -z "$ac_cpp_err"; then
bf3b7cd3
JD
4085 :
4086else
60d26958
PB
4087 echo "$as_me: failed program was:" >&5
4088sed 's/^/| /' conftest.$ac_ext >&5
4089
4090 # Broken: fails on valid input.
4091continue
bf3b7cd3 4092fi
60d26958
PB
4093rm -f conftest.err conftest.$ac_ext
4094
4095 # OK, works on sane cases. Now check whether non-existent headers
4096 # can be detected and how.
4097 cat >conftest.$ac_ext <<_ACEOF
4098/* confdefs.h. */
4099_ACEOF
4100cat confdefs.h >>conftest.$ac_ext
4101cat >>conftest.$ac_ext <<_ACEOF
4102/* end confdefs.h. */
4103#include <ac_nonexistent.h>
4104_ACEOF
4105if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4106 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4107 ac_status=$?
4108 grep -v '^ *+' conftest.er1 >conftest.err
4109 rm -f conftest.er1
4110 cat conftest.err >&5
4111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4112 (exit $ac_status); } >/dev/null; then
4113 if test -s conftest.err; then
4114 ac_cpp_err=$ac_c_preproc_warn_flag
4115 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4116 else
4117 ac_cpp_err=
4118 fi
4119else
4120 ac_cpp_err=yes
4121fi
4122if test -z "$ac_cpp_err"; then
4123 # Broken: success on invalid input.
4124continue
4125else
4126 echo "$as_me: failed program was:" >&5
4127sed 's/^/| /' conftest.$ac_ext >&5
bf3b7cd3 4128
60d26958
PB
4129 # Passes both tests.
4130ac_preproc_ok=:
4131break
bf3b7cd3 4132fi
60d26958 4133rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4134
60d26958
PB
4135done
4136# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4137rm -f conftest.err conftest.$ac_ext
4138if $ac_preproc_ok; then
4139 break
4140fi
4141
4142 done
4143 ac_cv_prog_CPP=$CPP
4144
4145fi
4146 CPP=$ac_cv_prog_CPP
4147else
4148 ac_cv_prog_CPP=$CPP
4149fi
4150echo "$as_me:$LINENO: result: $CPP" >&5
4151echo "${ECHO_T}$CPP" >&6
4152ac_preproc_ok=false
4153for ac_c_preproc_warn_flag in '' yes
4154do
4155 # Use a header file that comes with gcc, so configuring glibc
4156 # with a fresh cross-compiler works.
4157 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4158 # <limits.h> exists even on freestanding compilers.
4159 # On the NeXT, cc -E runs the code through the compiler's parser,
4160 # not just through cpp. "Syntax error" is here to catch this case.
bf3b7cd3
JD
4161 cat >conftest.$ac_ext <<_ACEOF
4162/* confdefs.h. */
4163_ACEOF
4164cat confdefs.h >>conftest.$ac_ext
4165cat >>conftest.$ac_ext <<_ACEOF
4166/* end confdefs.h. */
60d26958
PB
4167#ifdef __STDC__
4168# include <limits.h>
4169#else
4170# include <assert.h>
4171#endif
4172 Syntax error
bf3b7cd3 4173_ACEOF
60d26958
PB
4174if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4175 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4176 ac_status=$?
4177 grep -v '^ *+' conftest.er1 >conftest.err
4178 rm -f conftest.er1
4179 cat conftest.err >&5
4180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4181 (exit $ac_status); } >/dev/null; then
4182 if test -s conftest.err; then
4183 ac_cpp_err=$ac_c_preproc_warn_flag
4184 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4185 else
4186 ac_cpp_err=
4187 fi
bf3b7cd3 4188else
60d26958 4189 ac_cpp_err=yes
bf3b7cd3 4190fi
60d26958
PB
4191if test -z "$ac_cpp_err"; then
4192 :
4193else
4194 echo "$as_me: failed program was:" >&5
4195sed 's/^/| /' conftest.$ac_ext >&5
bf3b7cd3 4196
60d26958
PB
4197 # Broken: fails on valid input.
4198continue
bf3b7cd3 4199fi
60d26958 4200rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4201
60d26958
PB
4202 # OK, works on sane cases. Now check whether non-existent headers
4203 # can be detected and how.
bf3b7cd3
JD
4204 cat >conftest.$ac_ext <<_ACEOF
4205/* confdefs.h. */
4206_ACEOF
4207cat confdefs.h >>conftest.$ac_ext
4208cat >>conftest.$ac_ext <<_ACEOF
4209/* end confdefs.h. */
60d26958 4210#include <ac_nonexistent.h>
bf3b7cd3 4211_ACEOF
60d26958
PB
4212if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4213 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
bf3b7cd3 4214 ac_status=$?
60d26958
PB
4215 grep -v '^ *+' conftest.er1 >conftest.err
4216 rm -f conftest.er1
4217 cat conftest.err >&5
bf3b7cd3 4218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
60d26958
PB
4219 (exit $ac_status); } >/dev/null; then
4220 if test -s conftest.err; then
4221 ac_cpp_err=$ac_c_preproc_warn_flag
4222 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4223 else
4224 ac_cpp_err=
4225 fi
bf3b7cd3 4226else
60d26958
PB
4227 ac_cpp_err=yes
4228fi
4229if test -z "$ac_cpp_err"; then
4230 # Broken: success on invalid input.
4231continue
4232else
4233 echo "$as_me: failed program was:" >&5
bf3b7cd3
JD
4234sed 's/^/| /' conftest.$ac_ext >&5
4235
60d26958
PB
4236 # Passes both tests.
4237ac_preproc_ok=:
4238break
1a4b763e 4239fi
60d26958 4240rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4241
60d26958
PB
4242done
4243# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4244rm -f conftest.err conftest.$ac_ext
4245if $ac_preproc_ok; then
4246 :
4247else
4248 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4249See \`config.log' for more details." >&5
4250echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4251See \`config.log' for more details." >&2;}
4252 { (exit 1); exit 1; }; }
bf3b7cd3
JD
4253fi
4254
60d26958
PB
4255ac_ext=c
4256ac_cpp='$CPP $CPPFLAGS'
4257ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4258ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4259ac_compiler_gnu=$ac_cv_c_compiler_gnu
bf3b7cd3 4260
60d26958
PB
4261echo "$as_me:$LINENO: checking for inline" >&5
4262echo $ECHO_N "checking for inline... $ECHO_C" >&6
4263if test "${ac_cv_c_inline+set}" = set; then
bf3b7cd3
JD
4264 echo $ECHO_N "(cached) $ECHO_C" >&6
4265else
60d26958
PB
4266 ac_cv_c_inline=no
4267for ac_kw in inline __inline__ __inline; do
bf3b7cd3
JD
4268 cat >conftest.$ac_ext <<_ACEOF
4269/* confdefs.h. */
4270_ACEOF
4271cat confdefs.h >>conftest.$ac_ext
4272cat >>conftest.$ac_ext <<_ACEOF
4273/* end confdefs.h. */
60d26958
PB
4274#ifndef __cplusplus
4275typedef int foo_t;
4276static $ac_kw foo_t static_foo () {return 0; }
4277$ac_kw foo_t foo () {return 0; }
4278#endif
bf3b7cd3 4279
bf3b7cd3
JD
4280_ACEOF
4281rm -f conftest.$ac_objext
b61ff9c8
BS
4282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4283 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4284 ac_status=$?
4285 grep -v '^ *+' conftest.er1 >conftest.err
4286 rm -f conftest.er1
4287 cat conftest.err >&5
4288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4289 (exit $ac_status); } &&
4290 { ac_try='test -z "$ac_c_werror_flag"
4291 || test ! -s conftest.err'
4292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4293 (eval $ac_try) 2>&5
4294 ac_status=$?
4295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4296 (exit $ac_status); }; } &&
4297 { ac_try='test -s conftest.$ac_objext'
4298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4299 (eval $ac_try) 2>&5
4300 ac_status=$?
4301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4302 (exit $ac_status); }; }; then
60d26958 4303 ac_cv_c_inline=$ac_kw; break
bf3b7cd3
JD
4304else
4305 echo "$as_me: failed program was:" >&5
4306sed 's/^/| /' conftest.$ac_ext >&5
4307
bf3b7cd3 4308fi
b61ff9c8 4309rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
60d26958 4310done
bf3b7cd3
JD
4311
4312fi
60d26958
PB
4313echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
4314echo "${ECHO_T}$ac_cv_c_inline" >&6
bf3b7cd3 4315
60d26958
PB
4316
4317case $ac_cv_c_inline in
4318 inline | yes) ;;
4319 *)
4320 case $ac_cv_c_inline in
4321 no) ac_val=;;
4322 *) ac_val=$ac_cv_c_inline;;
4323 esac
4324 cat >>confdefs.h <<_ACEOF
4325#ifndef __cplusplus
4326#define inline $ac_val
4327#endif
4328_ACEOF
4329 ;;
4330esac
bf3b7cd3
JD
4331
4332
60d26958 4333# sizeof(char) is 1 by definition.
b61ff9c8
BS
4334echo "$as_me:$LINENO: checking for void *" >&5
4335echo $ECHO_N "checking for void *... $ECHO_C" >&6
bf3b7cd3
JD
4336if test "${ac_cv_type_void_p+set}" = set; then
4337 echo $ECHO_N "(cached) $ECHO_C" >&6
4338else
4339 cat >conftest.$ac_ext <<_ACEOF
4340/* confdefs.h. */
4341_ACEOF
4342cat confdefs.h >>conftest.$ac_ext
4343cat >>conftest.$ac_ext <<_ACEOF
4344/* end confdefs.h. */
4345$ac_includes_default
4346int
4347main ()
4348{
b61ff9c8 4349if ((void * *) 0)
bf3b7cd3 4350 return 0;
b61ff9c8 4351if (sizeof (void *))
bf3b7cd3
JD
4352 return 0;
4353 ;
4354 return 0;
4355}
4356_ACEOF
4357rm -f conftest.$ac_objext
b61ff9c8
BS
4358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4359 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4360 ac_status=$?
4361 grep -v '^ *+' conftest.er1 >conftest.err
4362 rm -f conftest.er1
4363 cat conftest.err >&5
4364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4365 (exit $ac_status); } &&
4366 { ac_try='test -z "$ac_c_werror_flag"
4367 || test ! -s conftest.err'
4368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4369 (eval $ac_try) 2>&5
4370 ac_status=$?
4371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4372 (exit $ac_status); }; } &&
4373 { ac_try='test -s conftest.$ac_objext'
4374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4375 (eval $ac_try) 2>&5
4376 ac_status=$?
4377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4378 (exit $ac_status); }; }; then
bf3b7cd3
JD
4379 ac_cv_type_void_p=yes
4380else
4381 echo "$as_me: failed program was:" >&5
4382sed 's/^/| /' conftest.$ac_ext >&5
4383
b61ff9c8 4384ac_cv_type_void_p=no
bf3b7cd3 4385fi
b61ff9c8 4386rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4387fi
b61ff9c8
BS
4388echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
4389echo "${ECHO_T}$ac_cv_type_void_p" >&6
bf3b7cd3 4390
b61ff9c8
BS
4391echo "$as_me:$LINENO: checking size of void *" >&5
4392echo $ECHO_N "checking size of void *... $ECHO_C" >&6
ba479fd2
NN
4393if test "${ac_cv_sizeof_void_p+set}" = set; then
4394 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 4395else
b61ff9c8
BS
4396 if test "$ac_cv_type_void_p" = yes; then
4397 # The cast to unsigned long works around a bug in the HP C Compiler
4398 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4399 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4400 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4401 if test "$cross_compiling" = yes; then
4402 # Depending upon the size, compute the lo and hi bounds.
4403cat >conftest.$ac_ext <<_ACEOF
4404/* confdefs.h. */
4405_ACEOF
4406cat confdefs.h >>conftest.$ac_ext
4407cat >>conftest.$ac_ext <<_ACEOF
4408/* end confdefs.h. */
4409$ac_includes_default
4410int
4411main ()
4412{
b61ff9c8 4413static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
bf3b7cd3
JD
4414test_array [0] = 0
4415
4416 ;
4417 return 0;
4418}
4419_ACEOF
4420rm -f conftest.$ac_objext
b61ff9c8
BS
4421if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4422 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4423 ac_status=$?
4424 grep -v '^ *+' conftest.er1 >conftest.err
4425 rm -f conftest.er1
4426 cat conftest.err >&5
4427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4428 (exit $ac_status); } &&
4429 { ac_try='test -z "$ac_c_werror_flag"
4430 || test ! -s conftest.err'
4431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4432 (eval $ac_try) 2>&5
4433 ac_status=$?
4434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4435 (exit $ac_status); }; } &&
4436 { ac_try='test -s conftest.$ac_objext'
4437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4438 (eval $ac_try) 2>&5
4439 ac_status=$?
4440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4441 (exit $ac_status); }; }; then
bf3b7cd3
JD
4442 ac_lo=0 ac_mid=0
4443 while :; do
4444 cat >conftest.$ac_ext <<_ACEOF
4445/* confdefs.h. */
4446_ACEOF
4447cat confdefs.h >>conftest.$ac_ext
4448cat >>conftest.$ac_ext <<_ACEOF
4449/* end confdefs.h. */
4450$ac_includes_default
4451int
4452main ()
4453{
b61ff9c8 4454static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
4455test_array [0] = 0
4456
4457 ;
4458 return 0;
4459}
4460_ACEOF
4461rm -f conftest.$ac_objext
b61ff9c8
BS
4462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4463 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4464 ac_status=$?
4465 grep -v '^ *+' conftest.er1 >conftest.err
4466 rm -f conftest.er1
4467 cat conftest.err >&5
4468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4469 (exit $ac_status); } &&
4470 { ac_try='test -z "$ac_c_werror_flag"
4471 || test ! -s conftest.err'
4472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4473 (eval $ac_try) 2>&5
4474 ac_status=$?
4475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4476 (exit $ac_status); }; } &&
4477 { ac_try='test -s conftest.$ac_objext'
4478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4479 (eval $ac_try) 2>&5
4480 ac_status=$?
4481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4482 (exit $ac_status); }; }; then
bf3b7cd3
JD
4483 ac_hi=$ac_mid; break
4484else
4485 echo "$as_me: failed program was:" >&5
4486sed 's/^/| /' conftest.$ac_ext >&5
4487
b61ff9c8
BS
4488ac_lo=`expr $ac_mid + 1`
4489 if test $ac_lo -le $ac_mid; then
4490 ac_lo= ac_hi=
4491 break
4492 fi
4493 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4494fi
b61ff9c8 4495rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4496 done
4497else
4498 echo "$as_me: failed program was:" >&5
4499sed 's/^/| /' conftest.$ac_ext >&5
4500
b61ff9c8 4501cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4502/* confdefs.h. */
4503_ACEOF
4504cat confdefs.h >>conftest.$ac_ext
4505cat >>conftest.$ac_ext <<_ACEOF
4506/* end confdefs.h. */
4507$ac_includes_default
4508int
4509main ()
4510{
b61ff9c8 4511static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
bf3b7cd3
JD
4512test_array [0] = 0
4513
4514 ;
4515 return 0;
4516}
4517_ACEOF
4518rm -f conftest.$ac_objext
b61ff9c8
BS
4519if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4520 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4521 ac_status=$?
4522 grep -v '^ *+' conftest.er1 >conftest.err
4523 rm -f conftest.er1
4524 cat conftest.err >&5
4525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4526 (exit $ac_status); } &&
4527 { ac_try='test -z "$ac_c_werror_flag"
4528 || test ! -s conftest.err'
4529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4530 (eval $ac_try) 2>&5
4531 ac_status=$?
4532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4533 (exit $ac_status); }; } &&
4534 { ac_try='test -s conftest.$ac_objext'
4535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4536 (eval $ac_try) 2>&5
4537 ac_status=$?
4538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4539 (exit $ac_status); }; }; then
bf3b7cd3
JD
4540 ac_hi=-1 ac_mid=-1
4541 while :; do
4542 cat >conftest.$ac_ext <<_ACEOF
4543/* confdefs.h. */
4544_ACEOF
4545cat confdefs.h >>conftest.$ac_ext
4546cat >>conftest.$ac_ext <<_ACEOF
4547/* end confdefs.h. */
4548$ac_includes_default
4549int
4550main ()
4551{
b61ff9c8 4552static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
bf3b7cd3
JD
4553test_array [0] = 0
4554
4555 ;
4556 return 0;
4557}
4558_ACEOF
4559rm -f conftest.$ac_objext
b61ff9c8
BS
4560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4561 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4562 ac_status=$?
4563 grep -v '^ *+' conftest.er1 >conftest.err
4564 rm -f conftest.er1
4565 cat conftest.err >&5
4566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4567 (exit $ac_status); } &&
4568 { ac_try='test -z "$ac_c_werror_flag"
4569 || test ! -s conftest.err'
4570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4571 (eval $ac_try) 2>&5
4572 ac_status=$?
4573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4574 (exit $ac_status); }; } &&
4575 { ac_try='test -s conftest.$ac_objext'
4576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4577 (eval $ac_try) 2>&5
4578 ac_status=$?
4579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4580 (exit $ac_status); }; }; then
bf3b7cd3
JD
4581 ac_lo=$ac_mid; break
4582else
4583 echo "$as_me: failed program was:" >&5
4584sed 's/^/| /' conftest.$ac_ext >&5
4585
b61ff9c8
BS
4586ac_hi=`expr '(' $ac_mid ')' - 1`
4587 if test $ac_mid -le $ac_hi; then
4588 ac_lo= ac_hi=
4589 break
4590 fi
4591 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4592fi
b61ff9c8 4593rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4594 done
4595else
4596 echo "$as_me: failed program was:" >&5
4597sed 's/^/| /' conftest.$ac_ext >&5
4598
b61ff9c8 4599ac_lo= ac_hi=
bf3b7cd3 4600fi
b61ff9c8 4601rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4602fi
b61ff9c8 4603rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4604# Binary search between lo and hi bounds.
4605while test "x$ac_lo" != "x$ac_hi"; do
4606 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4607 cat >conftest.$ac_ext <<_ACEOF
4608/* confdefs.h. */
4609_ACEOF
4610cat confdefs.h >>conftest.$ac_ext
4611cat >>conftest.$ac_ext <<_ACEOF
4612/* end confdefs.h. */
4613$ac_includes_default
4614int
4615main ()
4616{
b61ff9c8 4617static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
4618test_array [0] = 0
4619
4620 ;
4621 return 0;
4622}
4623_ACEOF
4624rm -f conftest.$ac_objext
b61ff9c8
BS
4625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4626 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4627 ac_status=$?
4628 grep -v '^ *+' conftest.er1 >conftest.err
4629 rm -f conftest.er1
4630 cat conftest.err >&5
4631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4632 (exit $ac_status); } &&
4633 { ac_try='test -z "$ac_c_werror_flag"
4634 || test ! -s conftest.err'
4635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4636 (eval $ac_try) 2>&5
4637 ac_status=$?
4638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4639 (exit $ac_status); }; } &&
4640 { ac_try='test -s conftest.$ac_objext'
4641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4642 (eval $ac_try) 2>&5
4643 ac_status=$?
4644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4645 (exit $ac_status); }; }; then
bf3b7cd3
JD
4646 ac_hi=$ac_mid
4647else
4648 echo "$as_me: failed program was:" >&5
4649sed 's/^/| /' conftest.$ac_ext >&5
4650
b61ff9c8 4651ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 4652fi
b61ff9c8 4653rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4654done
4655case $ac_lo in
4656?*) ac_cv_sizeof_void_p=$ac_lo;;
b61ff9c8 4657'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 4658See \`config.log' for more details." >&5
b61ff9c8 4659echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 4660See \`config.log' for more details." >&2;}
b61ff9c8 4661 { (exit 1); exit 1; }; } ;;
bf3b7cd3 4662esac
b61ff9c8
BS
4663else
4664 if test "$cross_compiling" = yes; then
4665 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4666See \`config.log' for more details." >&5
4667echo "$as_me: error: cannot run test program while cross compiling
4668See \`config.log' for more details." >&2;}
4669 { (exit 1); exit 1; }; }
bf3b7cd3
JD
4670else
4671 cat >conftest.$ac_ext <<_ACEOF
4672/* confdefs.h. */
4673_ACEOF
4674cat confdefs.h >>conftest.$ac_ext
4675cat >>conftest.$ac_ext <<_ACEOF
4676/* end confdefs.h. */
4677$ac_includes_default
b61ff9c8
BS
4678long longval () { return (long) (sizeof (void *)); }
4679unsigned long ulongval () { return (long) (sizeof (void *)); }
bf3b7cd3
JD
4680#include <stdio.h>
4681#include <stdlib.h>
4682int
4683main ()
4684{
4685
4686 FILE *f = fopen ("conftest.val", "w");
4687 if (! f)
b61ff9c8
BS
4688 exit (1);
4689 if (((long) (sizeof (void *))) < 0)
bf3b7cd3 4690 {
b61ff9c8
BS
4691 long i = longval ();
4692 if (i != ((long) (sizeof (void *))))
4693 exit (1);
bf3b7cd3
JD
4694 fprintf (f, "%ld\n", i);
4695 }
4696 else
4697 {
b61ff9c8
BS
4698 unsigned long i = ulongval ();
4699 if (i != ((long) (sizeof (void *))))
4700 exit (1);
bf3b7cd3
JD
4701 fprintf (f, "%lu\n", i);
4702 }
b61ff9c8 4703 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
4704
4705 ;
4706 return 0;
4707}
4708_ACEOF
4709rm -f conftest$ac_exeext
b61ff9c8
BS
4710if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4711 (eval $ac_link) 2>&5
bf3b7cd3
JD
4712 ac_status=$?
4713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4714 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
4715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4716 (eval $ac_try) 2>&5
bf3b7cd3
JD
4717 ac_status=$?
4718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4719 (exit $ac_status); }; }; then
4720 ac_cv_sizeof_void_p=`cat conftest.val`
4721else
4722 echo "$as_me: program exited with status $ac_status" >&5
4723echo "$as_me: failed program was:" >&5
4724sed 's/^/| /' conftest.$ac_ext >&5
4725
4726( exit $ac_status )
b61ff9c8 4727{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 4728See \`config.log' for more details." >&5
b61ff9c8 4729echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 4730See \`config.log' for more details." >&2;}
b61ff9c8
BS
4731 { (exit 1); exit 1; }; }
4732fi
4733rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4734fi
4735fi
4736rm -f conftest.val
b61ff9c8
BS
4737else
4738 ac_cv_sizeof_void_p=0
bf3b7cd3 4739fi
b61ff9c8
BS
4740fi
4741echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
4742echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
bf3b7cd3
JD
4743cat >>confdefs.h <<_ACEOF
4744#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4745_ACEOF
4746
4747
b61ff9c8
BS
4748echo "$as_me:$LINENO: checking for short" >&5
4749echo $ECHO_N "checking for short... $ECHO_C" >&6
bf3b7cd3
JD
4750if test "${ac_cv_type_short+set}" = set; then
4751 echo $ECHO_N "(cached) $ECHO_C" >&6
4752else
4753 cat >conftest.$ac_ext <<_ACEOF
4754/* confdefs.h. */
4755_ACEOF
4756cat confdefs.h >>conftest.$ac_ext
4757cat >>conftest.$ac_ext <<_ACEOF
4758/* end confdefs.h. */
4759$ac_includes_default
4760int
4761main ()
4762{
b61ff9c8 4763if ((short *) 0)
bf3b7cd3 4764 return 0;
b61ff9c8 4765if (sizeof (short))
bf3b7cd3
JD
4766 return 0;
4767 ;
4768 return 0;
4769}
4770_ACEOF
4771rm -f conftest.$ac_objext
b61ff9c8
BS
4772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4773 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4774 ac_status=$?
4775 grep -v '^ *+' conftest.er1 >conftest.err
4776 rm -f conftest.er1
4777 cat conftest.err >&5
4778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4779 (exit $ac_status); } &&
4780 { ac_try='test -z "$ac_c_werror_flag"
4781 || test ! -s conftest.err'
4782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4783 (eval $ac_try) 2>&5
4784 ac_status=$?
4785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4786 (exit $ac_status); }; } &&
4787 { ac_try='test -s conftest.$ac_objext'
4788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4789 (eval $ac_try) 2>&5
4790 ac_status=$?
4791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4792 (exit $ac_status); }; }; then
bf3b7cd3
JD
4793 ac_cv_type_short=yes
4794else
4795 echo "$as_me: failed program was:" >&5
4796sed 's/^/| /' conftest.$ac_ext >&5
4797
b61ff9c8 4798ac_cv_type_short=no
bf3b7cd3 4799fi
b61ff9c8 4800rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4801fi
b61ff9c8
BS
4802echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
4803echo "${ECHO_T}$ac_cv_type_short" >&6
bf3b7cd3 4804
b61ff9c8
BS
4805echo "$as_me:$LINENO: checking size of short" >&5
4806echo $ECHO_N "checking size of short... $ECHO_C" >&6
bf3b7cd3
JD
4807if test "${ac_cv_sizeof_short+set}" = set; then
4808 echo $ECHO_N "(cached) $ECHO_C" >&6
4809else
b61ff9c8
BS
4810 if test "$ac_cv_type_short" = yes; then
4811 # The cast to unsigned long works around a bug in the HP C Compiler
4812 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4813 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4814 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4815 if test "$cross_compiling" = yes; then
4816 # Depending upon the size, compute the lo and hi bounds.
4817cat >conftest.$ac_ext <<_ACEOF
4818/* confdefs.h. */
4819_ACEOF
4820cat confdefs.h >>conftest.$ac_ext
4821cat >>conftest.$ac_ext <<_ACEOF
4822/* end confdefs.h. */
4823$ac_includes_default
4824int
4825main ()
4826{
b61ff9c8 4827static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
bf3b7cd3
JD
4828test_array [0] = 0
4829
4830 ;
4831 return 0;
4832}
4833_ACEOF
4834rm -f conftest.$ac_objext
b61ff9c8
BS
4835if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4836 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4837 ac_status=$?
4838 grep -v '^ *+' conftest.er1 >conftest.err
4839 rm -f conftest.er1
4840 cat conftest.err >&5
4841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4842 (exit $ac_status); } &&
4843 { ac_try='test -z "$ac_c_werror_flag"
4844 || test ! -s conftest.err'
4845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4846 (eval $ac_try) 2>&5
4847 ac_status=$?
4848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4849 (exit $ac_status); }; } &&
4850 { ac_try='test -s conftest.$ac_objext'
4851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4852 (eval $ac_try) 2>&5
4853 ac_status=$?
4854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4855 (exit $ac_status); }; }; then
bf3b7cd3
JD
4856 ac_lo=0 ac_mid=0
4857 while :; do
4858 cat >conftest.$ac_ext <<_ACEOF
4859/* confdefs.h. */
4860_ACEOF
4861cat confdefs.h >>conftest.$ac_ext
4862cat >>conftest.$ac_ext <<_ACEOF
4863/* end confdefs.h. */
4864$ac_includes_default
4865int
4866main ()
4867{
b61ff9c8 4868static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
4869test_array [0] = 0
4870
4871 ;
4872 return 0;
4873}
4874_ACEOF
4875rm -f conftest.$ac_objext
b61ff9c8
BS
4876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4877 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4878 ac_status=$?
4879 grep -v '^ *+' conftest.er1 >conftest.err
4880 rm -f conftest.er1
4881 cat conftest.err >&5
4882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4883 (exit $ac_status); } &&
4884 { ac_try='test -z "$ac_c_werror_flag"
4885 || test ! -s conftest.err'
4886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4887 (eval $ac_try) 2>&5
4888 ac_status=$?
4889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4890 (exit $ac_status); }; } &&
4891 { ac_try='test -s conftest.$ac_objext'
4892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4893 (eval $ac_try) 2>&5
4894 ac_status=$?
4895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4896 (exit $ac_status); }; }; then
bf3b7cd3
JD
4897 ac_hi=$ac_mid; break
4898else
4899 echo "$as_me: failed program was:" >&5
4900sed 's/^/| /' conftest.$ac_ext >&5
4901
b61ff9c8
BS
4902ac_lo=`expr $ac_mid + 1`
4903 if test $ac_lo -le $ac_mid; then
4904 ac_lo= ac_hi=
4905 break
4906 fi
4907 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4908fi
b61ff9c8 4909rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4910 done
4911else
4912 echo "$as_me: failed program was:" >&5
4913sed 's/^/| /' conftest.$ac_ext >&5
4914
b61ff9c8 4915cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4916/* confdefs.h. */
4917_ACEOF
4918cat confdefs.h >>conftest.$ac_ext
4919cat >>conftest.$ac_ext <<_ACEOF
4920/* end confdefs.h. */
4921$ac_includes_default
4922int
4923main ()
4924{
b61ff9c8 4925static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
bf3b7cd3
JD
4926test_array [0] = 0
4927
4928 ;
4929 return 0;
4930}
4931_ACEOF
4932rm -f conftest.$ac_objext
b61ff9c8
BS
4933if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4934 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4935 ac_status=$?
4936 grep -v '^ *+' conftest.er1 >conftest.err
4937 rm -f conftest.er1
4938 cat conftest.err >&5
4939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4940 (exit $ac_status); } &&
4941 { ac_try='test -z "$ac_c_werror_flag"
4942 || test ! -s conftest.err'
4943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4944 (eval $ac_try) 2>&5
4945 ac_status=$?
4946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4947 (exit $ac_status); }; } &&
4948 { ac_try='test -s conftest.$ac_objext'
4949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4950 (eval $ac_try) 2>&5
4951 ac_status=$?
4952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4953 (exit $ac_status); }; }; then
bf3b7cd3
JD
4954 ac_hi=-1 ac_mid=-1
4955 while :; do
4956 cat >conftest.$ac_ext <<_ACEOF
4957/* confdefs.h. */
4958_ACEOF
4959cat confdefs.h >>conftest.$ac_ext
4960cat >>conftest.$ac_ext <<_ACEOF
4961/* end confdefs.h. */
4962$ac_includes_default
4963int
4964main ()
4965{
b61ff9c8 4966static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
bf3b7cd3
JD
4967test_array [0] = 0
4968
4969 ;
4970 return 0;
4971}
4972_ACEOF
4973rm -f conftest.$ac_objext
b61ff9c8
BS
4974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4975 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4976 ac_status=$?
4977 grep -v '^ *+' conftest.er1 >conftest.err
4978 rm -f conftest.er1
4979 cat conftest.err >&5
4980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4981 (exit $ac_status); } &&
4982 { ac_try='test -z "$ac_c_werror_flag"
4983 || test ! -s conftest.err'
4984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4985 (eval $ac_try) 2>&5
4986 ac_status=$?
4987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4988 (exit $ac_status); }; } &&
4989 { ac_try='test -s conftest.$ac_objext'
4990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4991 (eval $ac_try) 2>&5
4992 ac_status=$?
4993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4994 (exit $ac_status); }; }; then
bf3b7cd3
JD
4995 ac_lo=$ac_mid; break
4996else
4997 echo "$as_me: failed program was:" >&5
4998sed 's/^/| /' conftest.$ac_ext >&5
4999
b61ff9c8
BS
5000ac_hi=`expr '(' $ac_mid ')' - 1`
5001 if test $ac_mid -le $ac_hi; then
5002 ac_lo= ac_hi=
5003 break
5004 fi
5005 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5006fi
b61ff9c8 5007rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5008 done
5009else
5010 echo "$as_me: failed program was:" >&5
5011sed 's/^/| /' conftest.$ac_ext >&5
5012
b61ff9c8 5013ac_lo= ac_hi=
bf3b7cd3 5014fi
b61ff9c8 5015rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5016fi
b61ff9c8 5017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5018# Binary search between lo and hi bounds.
5019while test "x$ac_lo" != "x$ac_hi"; do
5020 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5021 cat >conftest.$ac_ext <<_ACEOF
5022/* confdefs.h. */
5023_ACEOF
5024cat confdefs.h >>conftest.$ac_ext
5025cat >>conftest.$ac_ext <<_ACEOF
5026/* end confdefs.h. */
5027$ac_includes_default
5028int
5029main ()
5030{
b61ff9c8 5031static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
5032test_array [0] = 0
5033
5034 ;
5035 return 0;
5036}
5037_ACEOF
5038rm -f conftest.$ac_objext
b61ff9c8
BS
5039if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5040 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5041 ac_status=$?
5042 grep -v '^ *+' conftest.er1 >conftest.err
5043 rm -f conftest.er1
5044 cat conftest.err >&5
5045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5046 (exit $ac_status); } &&
5047 { ac_try='test -z "$ac_c_werror_flag"
5048 || test ! -s conftest.err'
5049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5050 (eval $ac_try) 2>&5
5051 ac_status=$?
5052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5053 (exit $ac_status); }; } &&
5054 { ac_try='test -s conftest.$ac_objext'
5055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5056 (eval $ac_try) 2>&5
5057 ac_status=$?
5058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5059 (exit $ac_status); }; }; then
bf3b7cd3
JD
5060 ac_hi=$ac_mid
5061else
5062 echo "$as_me: failed program was:" >&5
5063sed 's/^/| /' conftest.$ac_ext >&5
5064
b61ff9c8 5065ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5066fi
b61ff9c8 5067rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5068done
5069case $ac_lo in
5070?*) ac_cv_sizeof_short=$ac_lo;;
b61ff9c8 5071'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 5072See \`config.log' for more details." >&5
b61ff9c8 5073echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 5074See \`config.log' for more details." >&2;}
b61ff9c8 5075 { (exit 1); exit 1; }; } ;;
bf3b7cd3 5076esac
b61ff9c8
BS
5077else
5078 if test "$cross_compiling" = yes; then
5079 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5080See \`config.log' for more details." >&5
5081echo "$as_me: error: cannot run test program while cross compiling
5082See \`config.log' for more details." >&2;}
5083 { (exit 1); exit 1; }; }
8b1f719a
PB
5084else
5085 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5086/* confdefs.h. */
5087_ACEOF
5088cat confdefs.h >>conftest.$ac_ext
5089cat >>conftest.$ac_ext <<_ACEOF
5090/* end confdefs.h. */
5091$ac_includes_default
b61ff9c8
BS
5092long longval () { return (long) (sizeof (short)); }
5093unsigned long ulongval () { return (long) (sizeof (short)); }
bf3b7cd3
JD
5094#include <stdio.h>
5095#include <stdlib.h>
5096int
5097main ()
5098{
5099
5100 FILE *f = fopen ("conftest.val", "w");
5101 if (! f)
b61ff9c8
BS
5102 exit (1);
5103 if (((long) (sizeof (short))) < 0)
bf3b7cd3 5104 {
b61ff9c8
BS
5105 long i = longval ();
5106 if (i != ((long) (sizeof (short))))
5107 exit (1);
bf3b7cd3
JD
5108 fprintf (f, "%ld\n", i);
5109 }
5110 else
5111 {
b61ff9c8
BS
5112 unsigned long i = ulongval ();
5113 if (i != ((long) (sizeof (short))))
5114 exit (1);
bf3b7cd3
JD
5115 fprintf (f, "%lu\n", i);
5116 }
b61ff9c8 5117 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5118
5119 ;
5120 return 0;
5121}
5122_ACEOF
5123rm -f conftest$ac_exeext
b61ff9c8
BS
5124if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5125 (eval $ac_link) 2>&5
bf3b7cd3
JD
5126 ac_status=$?
5127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5128 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5130 (eval $ac_try) 2>&5
bf3b7cd3
JD
5131 ac_status=$?
5132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5133 (exit $ac_status); }; }; then
5134 ac_cv_sizeof_short=`cat conftest.val`
5135else
5136 echo "$as_me: program exited with status $ac_status" >&5
5137echo "$as_me: failed program was:" >&5
5138sed 's/^/| /' conftest.$ac_ext >&5
5139
5140( exit $ac_status )
b61ff9c8 5141{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 5142See \`config.log' for more details." >&5
b61ff9c8 5143echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 5144See \`config.log' for more details." >&2;}
b61ff9c8
BS
5145 { (exit 1); exit 1; }; }
5146fi
5147rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5148fi
5149fi
5150rm -f conftest.val
b61ff9c8
BS
5151else
5152 ac_cv_sizeof_short=0
bf3b7cd3 5153fi
b61ff9c8
BS
5154fi
5155echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
5156echo "${ECHO_T}$ac_cv_sizeof_short" >&6
bf3b7cd3
JD
5157cat >>confdefs.h <<_ACEOF
5158#define SIZEOF_SHORT $ac_cv_sizeof_short
5159_ACEOF
5160
5161
b61ff9c8
BS
5162echo "$as_me:$LINENO: checking for int" >&5
5163echo $ECHO_N "checking for int... $ECHO_C" >&6
bf3b7cd3
JD
5164if test "${ac_cv_type_int+set}" = set; then
5165 echo $ECHO_N "(cached) $ECHO_C" >&6
5166else
5167 cat >conftest.$ac_ext <<_ACEOF
5168/* confdefs.h. */
5169_ACEOF
5170cat confdefs.h >>conftest.$ac_ext
5171cat >>conftest.$ac_ext <<_ACEOF
5172/* end confdefs.h. */
5173$ac_includes_default
5174int
5175main ()
5176{
b61ff9c8 5177if ((int *) 0)
bf3b7cd3 5178 return 0;
b61ff9c8 5179if (sizeof (int))
bf3b7cd3
JD
5180 return 0;
5181 ;
5182 return 0;
5183}
5184_ACEOF
5185rm -f conftest.$ac_objext
b61ff9c8
BS
5186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5187 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5188 ac_status=$?
5189 grep -v '^ *+' conftest.er1 >conftest.err
5190 rm -f conftest.er1
5191 cat conftest.err >&5
5192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5193 (exit $ac_status); } &&
5194 { ac_try='test -z "$ac_c_werror_flag"
5195 || test ! -s conftest.err'
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); }; } &&
5201 { ac_try='test -s conftest.$ac_objext'
5202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5203 (eval $ac_try) 2>&5
5204 ac_status=$?
5205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5206 (exit $ac_status); }; }; then
bf3b7cd3
JD
5207 ac_cv_type_int=yes
5208else
5209 echo "$as_me: failed program was:" >&5
5210sed 's/^/| /' conftest.$ac_ext >&5
5211
b61ff9c8 5212ac_cv_type_int=no
bf3b7cd3 5213fi
b61ff9c8 5214rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5215fi
b61ff9c8
BS
5216echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5217echo "${ECHO_T}$ac_cv_type_int" >&6
bf3b7cd3 5218
b61ff9c8
BS
5219echo "$as_me:$LINENO: checking size of int" >&5
5220echo $ECHO_N "checking size of int... $ECHO_C" >&6
bf3b7cd3
JD
5221if test "${ac_cv_sizeof_int+set}" = set; then
5222 echo $ECHO_N "(cached) $ECHO_C" >&6
5223else
b61ff9c8
BS
5224 if test "$ac_cv_type_int" = yes; then
5225 # The cast to unsigned long works around a bug in the HP C Compiler
5226 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5227 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5228 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5229 if test "$cross_compiling" = yes; then
5230 # Depending upon the size, compute the lo and hi bounds.
5231cat >conftest.$ac_ext <<_ACEOF
5232/* confdefs.h. */
5233_ACEOF
5234cat confdefs.h >>conftest.$ac_ext
5235cat >>conftest.$ac_ext <<_ACEOF
5236/* end confdefs.h. */
5237$ac_includes_default
5238int
5239main ()
5240{
b61ff9c8 5241static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
bf3b7cd3
JD
5242test_array [0] = 0
5243
5244 ;
5245 return 0;
5246}
5247_ACEOF
5248rm -f conftest.$ac_objext
b61ff9c8
BS
5249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5250 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5251 ac_status=$?
5252 grep -v '^ *+' conftest.er1 >conftest.err
5253 rm -f conftest.er1
5254 cat conftest.err >&5
5255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5256 (exit $ac_status); } &&
5257 { ac_try='test -z "$ac_c_werror_flag"
5258 || test ! -s conftest.err'
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); }; } &&
5264 { ac_try='test -s conftest.$ac_objext'
5265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5266 (eval $ac_try) 2>&5
5267 ac_status=$?
5268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5269 (exit $ac_status); }; }; then
bf3b7cd3
JD
5270 ac_lo=0 ac_mid=0
5271 while :; do
5272 cat >conftest.$ac_ext <<_ACEOF
5273/* confdefs.h. */
5274_ACEOF
5275cat confdefs.h >>conftest.$ac_ext
5276cat >>conftest.$ac_ext <<_ACEOF
5277/* end confdefs.h. */
5278$ac_includes_default
5279int
5280main ()
5281{
b61ff9c8 5282static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
5283test_array [0] = 0
5284
5285 ;
5286 return 0;
5287}
5288_ACEOF
5289rm -f conftest.$ac_objext
b61ff9c8
BS
5290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5291 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5292 ac_status=$?
5293 grep -v '^ *+' conftest.er1 >conftest.err
5294 rm -f conftest.er1
5295 cat conftest.err >&5
5296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5297 (exit $ac_status); } &&
5298 { ac_try='test -z "$ac_c_werror_flag"
5299 || test ! -s conftest.err'
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); }; } &&
5305 { ac_try='test -s conftest.$ac_objext'
5306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5307 (eval $ac_try) 2>&5
5308 ac_status=$?
5309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5310 (exit $ac_status); }; }; then
bf3b7cd3
JD
5311 ac_hi=$ac_mid; break
5312else
5313 echo "$as_me: failed program was:" >&5
5314sed 's/^/| /' conftest.$ac_ext >&5
5315
b61ff9c8
BS
5316ac_lo=`expr $ac_mid + 1`
5317 if test $ac_lo -le $ac_mid; then
5318 ac_lo= ac_hi=
5319 break
5320 fi
5321 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 5322fi
b61ff9c8 5323rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5324 done
5325else
5326 echo "$as_me: failed program was:" >&5
5327sed 's/^/| /' conftest.$ac_ext >&5
5328
b61ff9c8 5329cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5330/* confdefs.h. */
5331_ACEOF
5332cat confdefs.h >>conftest.$ac_ext
5333cat >>conftest.$ac_ext <<_ACEOF
5334/* end confdefs.h. */
5335$ac_includes_default
5336int
5337main ()
5338{
b61ff9c8 5339static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
bf3b7cd3
JD
5340test_array [0] = 0
5341
5342 ;
5343 return 0;
5344}
5345_ACEOF
5346rm -f conftest.$ac_objext
b61ff9c8
BS
5347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5348 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5349 ac_status=$?
5350 grep -v '^ *+' conftest.er1 >conftest.err
5351 rm -f conftest.er1
5352 cat conftest.err >&5
5353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5354 (exit $ac_status); } &&
5355 { ac_try='test -z "$ac_c_werror_flag"
5356 || test ! -s conftest.err'
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); }; } &&
5362 { ac_try='test -s conftest.$ac_objext'
5363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5364 (eval $ac_try) 2>&5
5365 ac_status=$?
5366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5367 (exit $ac_status); }; }; then
bf3b7cd3
JD
5368 ac_hi=-1 ac_mid=-1
5369 while :; do
5370 cat >conftest.$ac_ext <<_ACEOF
5371/* confdefs.h. */
5372_ACEOF
5373cat confdefs.h >>conftest.$ac_ext
5374cat >>conftest.$ac_ext <<_ACEOF
5375/* end confdefs.h. */
5376$ac_includes_default
5377int
5378main ()
5379{
b61ff9c8 5380static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
bf3b7cd3
JD
5381test_array [0] = 0
5382
5383 ;
5384 return 0;
5385}
5386_ACEOF
5387rm -f conftest.$ac_objext
b61ff9c8
BS
5388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5389 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5390 ac_status=$?
5391 grep -v '^ *+' conftest.er1 >conftest.err
5392 rm -f conftest.er1
5393 cat conftest.err >&5
5394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5395 (exit $ac_status); } &&
5396 { ac_try='test -z "$ac_c_werror_flag"
5397 || test ! -s conftest.err'
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); }; } &&
5403 { ac_try='test -s conftest.$ac_objext'
5404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5405 (eval $ac_try) 2>&5
5406 ac_status=$?
5407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5408 (exit $ac_status); }; }; then
bf3b7cd3
JD
5409 ac_lo=$ac_mid; break
5410else
5411 echo "$as_me: failed program was:" >&5
5412sed 's/^/| /' conftest.$ac_ext >&5
5413
b61ff9c8
BS
5414ac_hi=`expr '(' $ac_mid ')' - 1`
5415 if test $ac_mid -le $ac_hi; then
5416 ac_lo= ac_hi=
5417 break
5418 fi
5419 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5420fi
b61ff9c8 5421rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5422 done
5423else
5424 echo "$as_me: failed program was:" >&5
5425sed 's/^/| /' conftest.$ac_ext >&5
5426
b61ff9c8 5427ac_lo= ac_hi=
bf3b7cd3 5428fi
b61ff9c8 5429rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5430fi
b61ff9c8 5431rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5432# Binary search between lo and hi bounds.
5433while test "x$ac_lo" != "x$ac_hi"; do
5434 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5435 cat >conftest.$ac_ext <<_ACEOF
5436/* confdefs.h. */
5437_ACEOF
5438cat confdefs.h >>conftest.$ac_ext
5439cat >>conftest.$ac_ext <<_ACEOF
5440/* end confdefs.h. */
5441$ac_includes_default
5442int
5443main ()
5444{
b61ff9c8 5445static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
5446test_array [0] = 0
5447
5448 ;
5449 return 0;
5450}
5451_ACEOF
5452rm -f conftest.$ac_objext
b61ff9c8
BS
5453if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5454 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5455 ac_status=$?
5456 grep -v '^ *+' conftest.er1 >conftest.err
5457 rm -f conftest.er1
5458 cat conftest.err >&5
5459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5460 (exit $ac_status); } &&
5461 { ac_try='test -z "$ac_c_werror_flag"
5462 || test ! -s conftest.err'
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); }; } &&
5468 { ac_try='test -s conftest.$ac_objext'
5469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5470 (eval $ac_try) 2>&5
5471 ac_status=$?
5472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5473 (exit $ac_status); }; }; then
bf3b7cd3
JD
5474 ac_hi=$ac_mid
5475else
5476 echo "$as_me: failed program was:" >&5
5477sed 's/^/| /' conftest.$ac_ext >&5
5478
b61ff9c8 5479ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5480fi
b61ff9c8 5481rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5482done
5483case $ac_lo in
5484?*) ac_cv_sizeof_int=$ac_lo;;
b61ff9c8 5485'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 5486See \`config.log' for more details." >&5
b61ff9c8 5487echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 5488See \`config.log' for more details." >&2;}
b61ff9c8 5489 { (exit 1); exit 1; }; } ;;
bf3b7cd3 5490esac
b61ff9c8
BS
5491else
5492 if test "$cross_compiling" = yes; then
5493 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5494See \`config.log' for more details." >&5
5495echo "$as_me: error: cannot run test program while cross compiling
5496See \`config.log' for more details." >&2;}
5497 { (exit 1); exit 1; }; }
bf3b7cd3
JD
5498else
5499 cat >conftest.$ac_ext <<_ACEOF
5500/* confdefs.h. */
5501_ACEOF
5502cat confdefs.h >>conftest.$ac_ext
5503cat >>conftest.$ac_ext <<_ACEOF
5504/* end confdefs.h. */
5505$ac_includes_default
b61ff9c8
BS
5506long longval () { return (long) (sizeof (int)); }
5507unsigned long ulongval () { return (long) (sizeof (int)); }
bf3b7cd3
JD
5508#include <stdio.h>
5509#include <stdlib.h>
5510int
5511main ()
5512{
5513
5514 FILE *f = fopen ("conftest.val", "w");
5515 if (! f)
b61ff9c8
BS
5516 exit (1);
5517 if (((long) (sizeof (int))) < 0)
bf3b7cd3 5518 {
b61ff9c8
BS
5519 long i = longval ();
5520 if (i != ((long) (sizeof (int))))
5521 exit (1);
bf3b7cd3
JD
5522 fprintf (f, "%ld\n", i);
5523 }
5524 else
5525 {
b61ff9c8
BS
5526 unsigned long i = ulongval ();
5527 if (i != ((long) (sizeof (int))))
5528 exit (1);
bf3b7cd3
JD
5529 fprintf (f, "%lu\n", i);
5530 }
b61ff9c8 5531 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5532
5533 ;
5534 return 0;
5535}
5536_ACEOF
5537rm -f conftest$ac_exeext
b61ff9c8
BS
5538if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5539 (eval $ac_link) 2>&5
bf3b7cd3
JD
5540 ac_status=$?
5541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5542 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5544 (eval $ac_try) 2>&5
bf3b7cd3
JD
5545 ac_status=$?
5546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5547 (exit $ac_status); }; }; then
5548 ac_cv_sizeof_int=`cat conftest.val`
5549else
5550 echo "$as_me: program exited with status $ac_status" >&5
5551echo "$as_me: failed program was:" >&5
5552sed 's/^/| /' conftest.$ac_ext >&5
5553
5554( exit $ac_status )
b61ff9c8 5555{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 5556See \`config.log' for more details." >&5
b61ff9c8 5557echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 5558See \`config.log' for more details." >&2;}
b61ff9c8
BS
5559 { (exit 1); exit 1; }; }
5560fi
5561rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5562fi
5563fi
5564rm -f conftest.val
b61ff9c8
BS
5565else
5566 ac_cv_sizeof_int=0
bf3b7cd3 5567fi
b61ff9c8
BS
5568fi
5569echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5570echo "${ECHO_T}$ac_cv_sizeof_int" >&6
bf3b7cd3
JD
5571cat >>confdefs.h <<_ACEOF
5572#define SIZEOF_INT $ac_cv_sizeof_int
5573_ACEOF
5574
5575
b61ff9c8
BS
5576echo "$as_me:$LINENO: checking for long" >&5
5577echo $ECHO_N "checking for long... $ECHO_C" >&6
bf3b7cd3
JD
5578if test "${ac_cv_type_long+set}" = set; then
5579 echo $ECHO_N "(cached) $ECHO_C" >&6
5580else
5581 cat >conftest.$ac_ext <<_ACEOF
5582/* confdefs.h. */
5583_ACEOF
5584cat confdefs.h >>conftest.$ac_ext
5585cat >>conftest.$ac_ext <<_ACEOF
5586/* end confdefs.h. */
5587$ac_includes_default
5588int
5589main ()
5590{
b61ff9c8 5591if ((long *) 0)
bf3b7cd3 5592 return 0;
b61ff9c8 5593if (sizeof (long))
bf3b7cd3
JD
5594 return 0;
5595 ;
5596 return 0;
5597}
5598_ACEOF
5599rm -f conftest.$ac_objext
b61ff9c8
BS
5600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5601 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5602 ac_status=$?
5603 grep -v '^ *+' conftest.er1 >conftest.err
5604 rm -f conftest.er1
5605 cat conftest.err >&5
5606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5607 (exit $ac_status); } &&
5608 { ac_try='test -z "$ac_c_werror_flag"
5609 || test ! -s conftest.err'
5610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5611 (eval $ac_try) 2>&5
5612 ac_status=$?
5613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5614 (exit $ac_status); }; } &&
5615 { ac_try='test -s conftest.$ac_objext'
5616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5617 (eval $ac_try) 2>&5
5618 ac_status=$?
5619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5620 (exit $ac_status); }; }; then
bf3b7cd3
JD
5621 ac_cv_type_long=yes
5622else
5623 echo "$as_me: failed program was:" >&5
5624sed 's/^/| /' conftest.$ac_ext >&5
5625
b61ff9c8 5626ac_cv_type_long=no
bf3b7cd3 5627fi
b61ff9c8 5628rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5629fi
b61ff9c8
BS
5630echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5631echo "${ECHO_T}$ac_cv_type_long" >&6
bf3b7cd3 5632
b61ff9c8
BS
5633echo "$as_me:$LINENO: checking size of long" >&5
5634echo $ECHO_N "checking size of long... $ECHO_C" >&6
bf3b7cd3
JD
5635if test "${ac_cv_sizeof_long+set}" = set; then
5636 echo $ECHO_N "(cached) $ECHO_C" >&6
5637else
b61ff9c8
BS
5638 if test "$ac_cv_type_long" = yes; then
5639 # The cast to unsigned long works around a bug in the HP C Compiler
5640 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5641 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5642 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5643 if test "$cross_compiling" = yes; then
5644 # Depending upon the size, compute the lo and hi bounds.
5645cat >conftest.$ac_ext <<_ACEOF
5646/* confdefs.h. */
5647_ACEOF
5648cat confdefs.h >>conftest.$ac_ext
5649cat >>conftest.$ac_ext <<_ACEOF
5650/* end confdefs.h. */
5651$ac_includes_default
5652int
5653main ()
5654{
b61ff9c8 5655static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
bf3b7cd3
JD
5656test_array [0] = 0
5657
5658 ;
5659 return 0;
5660}
5661_ACEOF
5662rm -f conftest.$ac_objext
b61ff9c8
BS
5663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5664 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5665 ac_status=$?
5666 grep -v '^ *+' conftest.er1 >conftest.err
5667 rm -f conftest.er1
5668 cat conftest.err >&5
5669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5670 (exit $ac_status); } &&
5671 { ac_try='test -z "$ac_c_werror_flag"
5672 || test ! -s conftest.err'
5673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5674 (eval $ac_try) 2>&5
5675 ac_status=$?
5676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5677 (exit $ac_status); }; } &&
5678 { ac_try='test -s conftest.$ac_objext'
5679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5680 (eval $ac_try) 2>&5
5681 ac_status=$?
5682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5683 (exit $ac_status); }; }; then
bf3b7cd3
JD
5684 ac_lo=0 ac_mid=0
5685 while :; do
5686 cat >conftest.$ac_ext <<_ACEOF
5687/* confdefs.h. */
5688_ACEOF
5689cat confdefs.h >>conftest.$ac_ext
5690cat >>conftest.$ac_ext <<_ACEOF
5691/* end confdefs.h. */
5692$ac_includes_default
5693int
5694main ()
5695{
b61ff9c8 5696static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
5697test_array [0] = 0
5698
5699 ;
5700 return 0;
5701}
5702_ACEOF
5703rm -f conftest.$ac_objext
b61ff9c8
BS
5704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5705 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5706 ac_status=$?
5707 grep -v '^ *+' conftest.er1 >conftest.err
5708 rm -f conftest.er1
5709 cat conftest.err >&5
5710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5711 (exit $ac_status); } &&
5712 { ac_try='test -z "$ac_c_werror_flag"
5713 || test ! -s conftest.err'
5714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5715 (eval $ac_try) 2>&5
5716 ac_status=$?
5717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5718 (exit $ac_status); }; } &&
5719 { ac_try='test -s conftest.$ac_objext'
5720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5721 (eval $ac_try) 2>&5
5722 ac_status=$?
5723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5724 (exit $ac_status); }; }; then
bf3b7cd3
JD
5725 ac_hi=$ac_mid; break
5726else
5727 echo "$as_me: failed program was:" >&5
5728sed 's/^/| /' conftest.$ac_ext >&5
5729
b61ff9c8
BS
5730ac_lo=`expr $ac_mid + 1`
5731 if test $ac_lo -le $ac_mid; then
5732 ac_lo= ac_hi=
5733 break
5734 fi
5735 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 5736fi
b61ff9c8 5737rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5738 done
5739else
5740 echo "$as_me: failed program was:" >&5
5741sed 's/^/| /' conftest.$ac_ext >&5
5742
b61ff9c8 5743cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5744/* confdefs.h. */
5745_ACEOF
5746cat confdefs.h >>conftest.$ac_ext
5747cat >>conftest.$ac_ext <<_ACEOF
5748/* end confdefs.h. */
5749$ac_includes_default
5750int
5751main ()
5752{
b61ff9c8 5753static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
bf3b7cd3
JD
5754test_array [0] = 0
5755
5756 ;
5757 return 0;
5758}
5759_ACEOF
5760rm -f conftest.$ac_objext
b61ff9c8
BS
5761if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5762 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5763 ac_status=$?
5764 grep -v '^ *+' conftest.er1 >conftest.err
5765 rm -f conftest.er1
5766 cat conftest.err >&5
5767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5768 (exit $ac_status); } &&
5769 { ac_try='test -z "$ac_c_werror_flag"
5770 || test ! -s conftest.err'
5771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5772 (eval $ac_try) 2>&5
5773 ac_status=$?
5774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5775 (exit $ac_status); }; } &&
5776 { ac_try='test -s conftest.$ac_objext'
5777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5778 (eval $ac_try) 2>&5
5779 ac_status=$?
5780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5781 (exit $ac_status); }; }; then
bf3b7cd3
JD
5782 ac_hi=-1 ac_mid=-1
5783 while :; do
5784 cat >conftest.$ac_ext <<_ACEOF
5785/* confdefs.h. */
5786_ACEOF
5787cat confdefs.h >>conftest.$ac_ext
5788cat >>conftest.$ac_ext <<_ACEOF
5789/* end confdefs.h. */
5790$ac_includes_default
5791int
5792main ()
5793{
b61ff9c8 5794static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
bf3b7cd3
JD
5795test_array [0] = 0
5796
5797 ;
5798 return 0;
5799}
5800_ACEOF
5801rm -f conftest.$ac_objext
b61ff9c8
BS
5802if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5803 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5804 ac_status=$?
5805 grep -v '^ *+' conftest.er1 >conftest.err
5806 rm -f conftest.er1
5807 cat conftest.err >&5
5808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5809 (exit $ac_status); } &&
5810 { ac_try='test -z "$ac_c_werror_flag"
5811 || test ! -s conftest.err'
5812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5813 (eval $ac_try) 2>&5
5814 ac_status=$?
5815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5816 (exit $ac_status); }; } &&
5817 { ac_try='test -s conftest.$ac_objext'
5818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5819 (eval $ac_try) 2>&5
5820 ac_status=$?
5821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5822 (exit $ac_status); }; }; then
bf3b7cd3
JD
5823 ac_lo=$ac_mid; break
5824else
5825 echo "$as_me: failed program was:" >&5
5826sed 's/^/| /' conftest.$ac_ext >&5
5827
b61ff9c8
BS
5828ac_hi=`expr '(' $ac_mid ')' - 1`
5829 if test $ac_mid -le $ac_hi; then
5830 ac_lo= ac_hi=
5831 break
5832 fi
5833 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5834fi
b61ff9c8 5835rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5836 done
5837else
5838 echo "$as_me: failed program was:" >&5
5839sed 's/^/| /' conftest.$ac_ext >&5
5840
b61ff9c8 5841ac_lo= ac_hi=
bf3b7cd3 5842fi
b61ff9c8 5843rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5844fi
b61ff9c8 5845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5846# Binary search between lo and hi bounds.
5847while test "x$ac_lo" != "x$ac_hi"; do
5848 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5849 cat >conftest.$ac_ext <<_ACEOF
5850/* confdefs.h. */
5851_ACEOF
5852cat confdefs.h >>conftest.$ac_ext
5853cat >>conftest.$ac_ext <<_ACEOF
5854/* end confdefs.h. */
5855$ac_includes_default
5856int
5857main ()
5858{
b61ff9c8 5859static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
5860test_array [0] = 0
5861
5862 ;
5863 return 0;
5864}
5865_ACEOF
5866rm -f conftest.$ac_objext
b61ff9c8
BS
5867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5868 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5869 ac_status=$?
5870 grep -v '^ *+' conftest.er1 >conftest.err
5871 rm -f conftest.er1
5872 cat conftest.err >&5
5873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5874 (exit $ac_status); } &&
5875 { ac_try='test -z "$ac_c_werror_flag"
5876 || test ! -s conftest.err'
5877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5878 (eval $ac_try) 2>&5
5879 ac_status=$?
5880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5881 (exit $ac_status); }; } &&
5882 { ac_try='test -s conftest.$ac_objext'
5883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5884 (eval $ac_try) 2>&5
5885 ac_status=$?
5886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5887 (exit $ac_status); }; }; then
bf3b7cd3
JD
5888 ac_hi=$ac_mid
5889else
5890 echo "$as_me: failed program was:" >&5
5891sed 's/^/| /' conftest.$ac_ext >&5
5892
b61ff9c8 5893ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5894fi
b61ff9c8 5895rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5896done
5897case $ac_lo in
5898?*) ac_cv_sizeof_long=$ac_lo;;
b61ff9c8 5899'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 5900See \`config.log' for more details." >&5
b61ff9c8 5901echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 5902See \`config.log' for more details." >&2;}
b61ff9c8 5903 { (exit 1); exit 1; }; } ;;
bf3b7cd3 5904esac
b61ff9c8
BS
5905else
5906 if test "$cross_compiling" = yes; then
5907 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5908See \`config.log' for more details." >&5
5909echo "$as_me: error: cannot run test program while cross compiling
5910See \`config.log' for more details." >&2;}
5911 { (exit 1); exit 1; }; }
bf3b7cd3
JD
5912else
5913 cat >conftest.$ac_ext <<_ACEOF
5914/* confdefs.h. */
5915_ACEOF
5916cat confdefs.h >>conftest.$ac_ext
5917cat >>conftest.$ac_ext <<_ACEOF
5918/* end confdefs.h. */
5919$ac_includes_default
b61ff9c8
BS
5920long longval () { return (long) (sizeof (long)); }
5921unsigned long ulongval () { return (long) (sizeof (long)); }
bf3b7cd3
JD
5922#include <stdio.h>
5923#include <stdlib.h>
5924int
5925main ()
5926{
5927
5928 FILE *f = fopen ("conftest.val", "w");
5929 if (! f)
b61ff9c8
BS
5930 exit (1);
5931 if (((long) (sizeof (long))) < 0)
bf3b7cd3 5932 {
b61ff9c8
BS
5933 long i = longval ();
5934 if (i != ((long) (sizeof (long))))
5935 exit (1);
bf3b7cd3
JD
5936 fprintf (f, "%ld\n", i);
5937 }
5938 else
5939 {
b61ff9c8
BS
5940 unsigned long i = ulongval ();
5941 if (i != ((long) (sizeof (long))))
5942 exit (1);
bf3b7cd3
JD
5943 fprintf (f, "%lu\n", i);
5944 }
b61ff9c8 5945 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5946
5947 ;
5948 return 0;
5949}
5950_ACEOF
5951rm -f conftest$ac_exeext
b61ff9c8
BS
5952if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5953 (eval $ac_link) 2>&5
bf3b7cd3
JD
5954 ac_status=$?
5955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5956 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5958 (eval $ac_try) 2>&5
bf3b7cd3
JD
5959 ac_status=$?
5960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5961 (exit $ac_status); }; }; then
5962 ac_cv_sizeof_long=`cat conftest.val`
5963else
5964 echo "$as_me: program exited with status $ac_status" >&5
5965echo "$as_me: failed program was:" >&5
5966sed 's/^/| /' conftest.$ac_ext >&5
5967
5968( exit $ac_status )
b61ff9c8 5969{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 5970See \`config.log' for more details." >&5
b61ff9c8 5971echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 5972See \`config.log' for more details." >&2;}
b61ff9c8
BS
5973 { (exit 1); exit 1; }; }
5974fi
5975rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5976fi
5977fi
5978rm -f conftest.val
b61ff9c8
BS
5979else
5980 ac_cv_sizeof_long=0
bf3b7cd3 5981fi
b61ff9c8
BS
5982fi
5983echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5984echo "${ECHO_T}$ac_cv_sizeof_long" >&6
bf3b7cd3
JD
5985cat >>confdefs.h <<_ACEOF
5986#define SIZEOF_LONG $ac_cv_sizeof_long
5987_ACEOF
5988
5989
b61ff9c8
BS
5990echo "$as_me:$LINENO: checking for long long" >&5
5991echo $ECHO_N "checking for long long... $ECHO_C" >&6
5ec1c5e6
KC
5992if test "${ac_cv_type_long_long+set}" = set; then
5993 echo $ECHO_N "(cached) $ECHO_C" >&6
5994else
5995 cat >conftest.$ac_ext <<_ACEOF
5996/* confdefs.h. */
5997_ACEOF
5998cat confdefs.h >>conftest.$ac_ext
5999cat >>conftest.$ac_ext <<_ACEOF
6000/* end confdefs.h. */
6001$ac_includes_default
6002int
6003main ()
6004{
b61ff9c8 6005if ((long long *) 0)
5ec1c5e6 6006 return 0;
b61ff9c8 6007if (sizeof (long long))
5ec1c5e6
KC
6008 return 0;
6009 ;
6010 return 0;
6011}
6012_ACEOF
6013rm -f conftest.$ac_objext
b61ff9c8
BS
6014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6015 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
6016 ac_status=$?
6017 grep -v '^ *+' conftest.er1 >conftest.err
6018 rm -f conftest.er1
6019 cat conftest.err >&5
6020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6021 (exit $ac_status); } &&
6022 { ac_try='test -z "$ac_c_werror_flag"
6023 || test ! -s conftest.err'
6024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6025 (eval $ac_try) 2>&5
6026 ac_status=$?
6027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6028 (exit $ac_status); }; } &&
6029 { ac_try='test -s conftest.$ac_objext'
6030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6031 (eval $ac_try) 2>&5
6032 ac_status=$?
6033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6034 (exit $ac_status); }; }; then
5ec1c5e6
KC
6035 ac_cv_type_long_long=yes
6036else
6037 echo "$as_me: failed program was:" >&5
6038sed 's/^/| /' conftest.$ac_ext >&5
6039
b61ff9c8 6040ac_cv_type_long_long=no
5ec1c5e6 6041fi
b61ff9c8 6042rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 6043fi
b61ff9c8
BS
6044echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
6045echo "${ECHO_T}$ac_cv_type_long_long" >&6
5ec1c5e6
KC
6046if test $ac_cv_type_long_long = yes; then
6047
6048cat >>confdefs.h <<_ACEOF
6049#define HAVE_LONG_LONG 1
6050_ACEOF
6051
b61ff9c8
BS
6052echo "$as_me:$LINENO: checking for long long" >&5
6053echo $ECHO_N "checking for long long... $ECHO_C" >&6
bf3b7cd3
JD
6054if test "${ac_cv_type_long_long+set}" = set; then
6055 echo $ECHO_N "(cached) $ECHO_C" >&6
6056else
6057 cat >conftest.$ac_ext <<_ACEOF
6058/* confdefs.h. */
6059_ACEOF
6060cat confdefs.h >>conftest.$ac_ext
6061cat >>conftest.$ac_ext <<_ACEOF
6062/* end confdefs.h. */
6063$ac_includes_default
6064int
6065main ()
6066{
b61ff9c8 6067if ((long long *) 0)
bf3b7cd3 6068 return 0;
b61ff9c8 6069if (sizeof (long long))
bf3b7cd3
JD
6070 return 0;
6071 ;
6072 return 0;
6073}
6074_ACEOF
6075rm -f conftest.$ac_objext
b61ff9c8
BS
6076if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6077 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6078 ac_status=$?
6079 grep -v '^ *+' conftest.er1 >conftest.err
6080 rm -f conftest.er1
6081 cat conftest.err >&5
6082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6083 (exit $ac_status); } &&
6084 { ac_try='test -z "$ac_c_werror_flag"
6085 || test ! -s conftest.err'
6086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6087 (eval $ac_try) 2>&5
6088 ac_status=$?
6089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6090 (exit $ac_status); }; } &&
6091 { ac_try='test -s conftest.$ac_objext'
6092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6093 (eval $ac_try) 2>&5
6094 ac_status=$?
6095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6096 (exit $ac_status); }; }; then
6097 ac_cv_type_long_long=yes
6098else
bf3b7cd3
JD
6099 echo "$as_me: failed program was:" >&5
6100sed 's/^/| /' conftest.$ac_ext >&5
6101
b61ff9c8 6102ac_cv_type_long_long=no
bf3b7cd3 6103fi
b61ff9c8 6104rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6105fi
b61ff9c8
BS
6106echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
6107echo "${ECHO_T}$ac_cv_type_long_long" >&6
bf3b7cd3 6108
b61ff9c8
BS
6109echo "$as_me:$LINENO: checking size of long long" >&5
6110echo $ECHO_N "checking size of long long... $ECHO_C" >&6
bf3b7cd3
JD
6111if test "${ac_cv_sizeof_long_long+set}" = set; then
6112 echo $ECHO_N "(cached) $ECHO_C" >&6
6113else
b61ff9c8
BS
6114 if test "$ac_cv_type_long_long" = yes; then
6115 # The cast to unsigned long works around a bug in the HP C Compiler
6116 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6117 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6118 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
6119 if test "$cross_compiling" = yes; then
6120 # Depending upon the size, compute the lo and hi bounds.
6121cat >conftest.$ac_ext <<_ACEOF
6122/* confdefs.h. */
6123_ACEOF
6124cat confdefs.h >>conftest.$ac_ext
6125cat >>conftest.$ac_ext <<_ACEOF
6126/* end confdefs.h. */
6127$ac_includes_default
6128int
6129main ()
6130{
b61ff9c8 6131static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
bf3b7cd3
JD
6132test_array [0] = 0
6133
6134 ;
6135 return 0;
6136}
6137_ACEOF
6138rm -f conftest.$ac_objext
b61ff9c8
BS
6139if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6140 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6141 ac_status=$?
6142 grep -v '^ *+' conftest.er1 >conftest.err
6143 rm -f conftest.er1
6144 cat conftest.err >&5
6145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6146 (exit $ac_status); } &&
6147 { ac_try='test -z "$ac_c_werror_flag"
6148 || test ! -s conftest.err'
6149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6150 (eval $ac_try) 2>&5
6151 ac_status=$?
6152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6153 (exit $ac_status); }; } &&
6154 { ac_try='test -s conftest.$ac_objext'
6155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6156 (eval $ac_try) 2>&5
6157 ac_status=$?
6158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6159 (exit $ac_status); }; }; then
bf3b7cd3
JD
6160 ac_lo=0 ac_mid=0
6161 while :; do
6162 cat >conftest.$ac_ext <<_ACEOF
6163/* confdefs.h. */
6164_ACEOF
6165cat confdefs.h >>conftest.$ac_ext
6166cat >>conftest.$ac_ext <<_ACEOF
6167/* end confdefs.h. */
6168$ac_includes_default
6169int
6170main ()
6171{
b61ff9c8 6172static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
6173test_array [0] = 0
6174
6175 ;
6176 return 0;
6177}
6178_ACEOF
6179rm -f conftest.$ac_objext
b61ff9c8
BS
6180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6181 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6182 ac_status=$?
6183 grep -v '^ *+' conftest.er1 >conftest.err
6184 rm -f conftest.er1
6185 cat conftest.err >&5
6186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6187 (exit $ac_status); } &&
6188 { ac_try='test -z "$ac_c_werror_flag"
6189 || test ! -s conftest.err'
6190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6191 (eval $ac_try) 2>&5
6192 ac_status=$?
6193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6194 (exit $ac_status); }; } &&
6195 { ac_try='test -s conftest.$ac_objext'
6196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6197 (eval $ac_try) 2>&5
6198 ac_status=$?
6199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6200 (exit $ac_status); }; }; then
8b1f719a 6201 ac_hi=$ac_mid; break
bf3b7cd3
JD
6202else
6203 echo "$as_me: failed program was:" >&5
6204sed 's/^/| /' conftest.$ac_ext >&5
6205
b61ff9c8
BS
6206ac_lo=`expr $ac_mid + 1`
6207 if test $ac_lo -le $ac_mid; then
6208 ac_lo= ac_hi=
6209 break
6210 fi
6211 ac_mid=`expr 2 '*' $ac_mid + 1`
8b1f719a 6212fi
b61ff9c8 6213rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8b1f719a
PB
6214 done
6215else
6216 echo "$as_me: failed program was:" >&5
6217sed 's/^/| /' conftest.$ac_ext >&5
6218
b61ff9c8 6219cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
6220/* confdefs.h. */
6221_ACEOF
6222cat confdefs.h >>conftest.$ac_ext
6223cat >>conftest.$ac_ext <<_ACEOF
6224/* end confdefs.h. */
6225$ac_includes_default
6226int
6227main ()
6228{
b61ff9c8 6229static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
bf3b7cd3
JD
6230test_array [0] = 0
6231
6232 ;
6233 return 0;
6234}
6235_ACEOF
6236rm -f conftest.$ac_objext
b61ff9c8
BS
6237if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6238 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6239 ac_status=$?
6240 grep -v '^ *+' conftest.er1 >conftest.err
6241 rm -f conftest.er1
6242 cat conftest.err >&5
6243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6244 (exit $ac_status); } &&
6245 { ac_try='test -z "$ac_c_werror_flag"
6246 || test ! -s conftest.err'
6247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6248 (eval $ac_try) 2>&5
6249 ac_status=$?
6250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6251 (exit $ac_status); }; } &&
6252 { ac_try='test -s conftest.$ac_objext'
6253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6254 (eval $ac_try) 2>&5
6255 ac_status=$?
6256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6257 (exit $ac_status); }; }; then
bf3b7cd3
JD
6258 ac_hi=-1 ac_mid=-1
6259 while :; do
6260 cat >conftest.$ac_ext <<_ACEOF
6261/* confdefs.h. */
6262_ACEOF
6263cat confdefs.h >>conftest.$ac_ext
6264cat >>conftest.$ac_ext <<_ACEOF
6265/* end confdefs.h. */
6266$ac_includes_default
6267int
6268main ()
6269{
b61ff9c8 6270static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
bf3b7cd3
JD
6271test_array [0] = 0
6272
6273 ;
6274 return 0;
6275}
6276_ACEOF
6277rm -f conftest.$ac_objext
b61ff9c8
BS
6278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6279 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6280 ac_status=$?
6281 grep -v '^ *+' conftest.er1 >conftest.err
6282 rm -f conftest.er1
6283 cat conftest.err >&5
6284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6285 (exit $ac_status); } &&
6286 { ac_try='test -z "$ac_c_werror_flag"
6287 || test ! -s conftest.err'
6288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6289 (eval $ac_try) 2>&5
6290 ac_status=$?
6291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6292 (exit $ac_status); }; } &&
6293 { ac_try='test -s conftest.$ac_objext'
6294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6295 (eval $ac_try) 2>&5
6296 ac_status=$?
6297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6298 (exit $ac_status); }; }; then
bf3b7cd3
JD
6299 ac_lo=$ac_mid; break
6300else
6301 echo "$as_me: failed program was:" >&5
6302sed 's/^/| /' conftest.$ac_ext >&5
6303
b61ff9c8
BS
6304ac_hi=`expr '(' $ac_mid ')' - 1`
6305 if test $ac_mid -le $ac_hi; then
6306 ac_lo= ac_hi=
6307 break
6308 fi
6309 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 6310fi
b61ff9c8 6311rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6312 done
6313else
6314 echo "$as_me: failed program was:" >&5
6315sed 's/^/| /' conftest.$ac_ext >&5
6316
b61ff9c8 6317ac_lo= ac_hi=
bf3b7cd3 6318fi
b61ff9c8 6319rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6320fi
b61ff9c8 6321rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6322# Binary search between lo and hi bounds.
6323while test "x$ac_lo" != "x$ac_hi"; do
6324 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6325 cat >conftest.$ac_ext <<_ACEOF
6326/* confdefs.h. */
6327_ACEOF
6328cat confdefs.h >>conftest.$ac_ext
6329cat >>conftest.$ac_ext <<_ACEOF
6330/* end confdefs.h. */
6331$ac_includes_default
6332int
6333main ()
6334{
b61ff9c8 6335static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
6336test_array [0] = 0
6337
6338 ;
6339 return 0;
6340}
6341_ACEOF
6342rm -f conftest.$ac_objext
b61ff9c8
BS
6343if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6344 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6345 ac_status=$?
6346 grep -v '^ *+' conftest.er1 >conftest.err
6347 rm -f conftest.er1
6348 cat conftest.err >&5
6349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6350 (exit $ac_status); } &&
6351 { ac_try='test -z "$ac_c_werror_flag"
6352 || test ! -s conftest.err'
6353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6354 (eval $ac_try) 2>&5
6355 ac_status=$?
6356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6357 (exit $ac_status); }; } &&
6358 { ac_try='test -s conftest.$ac_objext'
6359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6360 (eval $ac_try) 2>&5
6361 ac_status=$?
6362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6363 (exit $ac_status); }; }; then
bf3b7cd3
JD
6364 ac_hi=$ac_mid
6365else
6366 echo "$as_me: failed program was:" >&5
6367sed 's/^/| /' conftest.$ac_ext >&5
6368
b61ff9c8 6369ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 6370fi
b61ff9c8 6371rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6372done
6373case $ac_lo in
6374?*) ac_cv_sizeof_long_long=$ac_lo;;
b61ff9c8 6375'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 6376See \`config.log' for more details." >&5
b61ff9c8 6377echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 6378See \`config.log' for more details." >&2;}
b61ff9c8 6379 { (exit 1); exit 1; }; } ;;
bf3b7cd3 6380esac
b61ff9c8
BS
6381else
6382 if test "$cross_compiling" = yes; then
6383 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6384See \`config.log' for more details." >&5
6385echo "$as_me: error: cannot run test program while cross compiling
6386See \`config.log' for more details." >&2;}
6387 { (exit 1); exit 1; }; }
bf3b7cd3
JD
6388else
6389 cat >conftest.$ac_ext <<_ACEOF
6390/* confdefs.h. */
6391_ACEOF
6392cat confdefs.h >>conftest.$ac_ext
6393cat >>conftest.$ac_ext <<_ACEOF
6394/* end confdefs.h. */
6395$ac_includes_default
b61ff9c8
BS
6396long longval () { return (long) (sizeof (long long)); }
6397unsigned long ulongval () { return (long) (sizeof (long long)); }
bf3b7cd3
JD
6398#include <stdio.h>
6399#include <stdlib.h>
6400int
6401main ()
6402{
6403
6404 FILE *f = fopen ("conftest.val", "w");
6405 if (! f)
b61ff9c8
BS
6406 exit (1);
6407 if (((long) (sizeof (long long))) < 0)
bf3b7cd3 6408 {
b61ff9c8
BS
6409 long i = longval ();
6410 if (i != ((long) (sizeof (long long))))
6411 exit (1);
bf3b7cd3
JD
6412 fprintf (f, "%ld\n", i);
6413 }
6414 else
6415 {
b61ff9c8
BS
6416 unsigned long i = ulongval ();
6417 if (i != ((long) (sizeof (long long))))
6418 exit (1);
bf3b7cd3
JD
6419 fprintf (f, "%lu\n", i);
6420 }
b61ff9c8 6421 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6422
6423 ;
6424 return 0;
6425}
6426_ACEOF
6427rm -f conftest$ac_exeext
b61ff9c8
BS
6428if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6429 (eval $ac_link) 2>&5
bf3b7cd3
JD
6430 ac_status=$?
6431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6432 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
6433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6434 (eval $ac_try) 2>&5
bf3b7cd3
JD
6435 ac_status=$?
6436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6437 (exit $ac_status); }; }; then
6438 ac_cv_sizeof_long_long=`cat conftest.val`
6439else
6440 echo "$as_me: program exited with status $ac_status" >&5
6441echo "$as_me: failed program was:" >&5
6442sed 's/^/| /' conftest.$ac_ext >&5
6443
6444( exit $ac_status )
b61ff9c8 6445{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 6446See \`config.log' for more details." >&5
b61ff9c8 6447echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 6448See \`config.log' for more details." >&2;}
b61ff9c8
BS
6449 { (exit 1); exit 1; }; }
6450fi
6451rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6452fi
6453fi
6454rm -f conftest.val
b61ff9c8
BS
6455else
6456 ac_cv_sizeof_long_long=0
2f41c1d6 6457fi
b61ff9c8
BS
6458fi
6459echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
6460echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
bf3b7cd3
JD
6461cat >>confdefs.h <<_ACEOF
6462#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
6463_ACEOF
6464
6465
6466fi
5ec1c5e6 6467
b61ff9c8
BS
6468echo "$as_me:$LINENO: checking for __int64" >&5
6469echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5ec1c5e6
KC
6470if test "${ac_cv_type___int64+set}" = set; then
6471 echo $ECHO_N "(cached) $ECHO_C" >&6
6472else
6473 cat >conftest.$ac_ext <<_ACEOF
6474/* confdefs.h. */
6475_ACEOF
6476cat confdefs.h >>conftest.$ac_ext
6477cat >>conftest.$ac_ext <<_ACEOF
6478/* end confdefs.h. */
6479$ac_includes_default
6480int
6481main ()
6482{
b61ff9c8 6483if ((__int64 *) 0)
5ec1c5e6 6484 return 0;
b61ff9c8 6485if (sizeof (__int64))
5ec1c5e6
KC
6486 return 0;
6487 ;
6488 return 0;
6489}
6490_ACEOF
6491rm -f conftest.$ac_objext
b61ff9c8
BS
6492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6493 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
6494 ac_status=$?
6495 grep -v '^ *+' conftest.er1 >conftest.err
6496 rm -f conftest.er1
6497 cat conftest.err >&5
6498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6499 (exit $ac_status); } &&
6500 { ac_try='test -z "$ac_c_werror_flag"
6501 || test ! -s conftest.err'
6502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6503 (eval $ac_try) 2>&5
6504 ac_status=$?
6505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6506 (exit $ac_status); }; } &&
6507 { ac_try='test -s conftest.$ac_objext'
6508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6509 (eval $ac_try) 2>&5
6510 ac_status=$?
6511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6512 (exit $ac_status); }; }; then
5ec1c5e6
KC
6513 ac_cv_type___int64=yes
6514else
6515 echo "$as_me: failed program was:" >&5
6516sed 's/^/| /' conftest.$ac_ext >&5
6517
b61ff9c8 6518ac_cv_type___int64=no
5ec1c5e6 6519fi
b61ff9c8 6520rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 6521fi
b61ff9c8
BS
6522echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
6523echo "${ECHO_T}$ac_cv_type___int64" >&6
5ec1c5e6
KC
6524if test $ac_cv_type___int64 = yes; then
6525
6526cat >>confdefs.h <<_ACEOF
6527#define HAVE___INT64 1
6528_ACEOF
6529
b61ff9c8
BS
6530echo "$as_me:$LINENO: checking for __int64" >&5
6531echo $ECHO_N "checking for __int64... $ECHO_C" >&6
bf3b7cd3
JD
6532if test "${ac_cv_type___int64+set}" = set; then
6533 echo $ECHO_N "(cached) $ECHO_C" >&6
6534else
ba479fd2 6535 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6536/* confdefs.h. */
6537_ACEOF
6538cat confdefs.h >>conftest.$ac_ext
6539cat >>conftest.$ac_ext <<_ACEOF
6540/* end confdefs.h. */
bf3b7cd3 6541$ac_includes_default
ba479fd2
NN
6542int
6543main ()
6544{
b61ff9c8 6545if ((__int64 *) 0)
bf3b7cd3 6546 return 0;
b61ff9c8 6547if (sizeof (__int64))
bf3b7cd3 6548 return 0;
ba479fd2
NN
6549 ;
6550 return 0;
6551}
6552_ACEOF
6553rm -f conftest.$ac_objext
b61ff9c8
BS
6554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6555 (eval $ac_compile) 2>conftest.er1
ba479fd2 6556 ac_status=$?
86da66b5
HPN
6557 grep -v '^ *+' conftest.er1 >conftest.err
6558 rm -f conftest.er1
6559 cat conftest.err >&5
ba479fd2 6560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6561 (exit $ac_status); } &&
6562 { ac_try='test -z "$ac_c_werror_flag"
6563 || test ! -s conftest.err'
6564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6565 (eval $ac_try) 2>&5
6566 ac_status=$?
6567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6568 (exit $ac_status); }; } &&
6569 { ac_try='test -s conftest.$ac_objext'
6570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6571 (eval $ac_try) 2>&5
6572 ac_status=$?
6573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6574 (exit $ac_status); }; }; then
bf3b7cd3 6575 ac_cv_type___int64=yes
75b6f3fd 6576else
ba479fd2
NN
6577 echo "$as_me: failed program was:" >&5
6578sed 's/^/| /' conftest.$ac_ext >&5
6579
b61ff9c8 6580ac_cv_type___int64=no
75b6f3fd 6581fi
b61ff9c8 6582rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 6583fi
b61ff9c8
BS
6584echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
6585echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 6586
b61ff9c8
BS
6587echo "$as_me:$LINENO: checking size of __int64" >&5
6588echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
bf3b7cd3 6589if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 6590 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 6591else
b61ff9c8
BS
6592 if test "$ac_cv_type___int64" = yes; then
6593 # The cast to unsigned long works around a bug in the HP C Compiler
6594 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6595 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6596 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
6597 if test "$cross_compiling" = yes; then
6598 # Depending upon the size, compute the lo and hi bounds.
6599cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6600/* confdefs.h. */
6601_ACEOF
6602cat confdefs.h >>conftest.$ac_ext
6603cat >>conftest.$ac_ext <<_ACEOF
6604/* end confdefs.h. */
bf3b7cd3 6605$ac_includes_default
ba479fd2
NN
6606int
6607main ()
6608{
b61ff9c8 6609static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
bf3b7cd3
JD
6610test_array [0] = 0
6611
ba479fd2
NN
6612 ;
6613 return 0;
6614}
6615_ACEOF
6616rm -f conftest.$ac_objext
b61ff9c8
BS
6617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6618 (eval $ac_compile) 2>conftest.er1
ba479fd2 6619 ac_status=$?
86da66b5
HPN
6620 grep -v '^ *+' conftest.er1 >conftest.err
6621 rm -f conftest.er1
6622 cat conftest.err >&5
ba479fd2 6623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6624 (exit $ac_status); } &&
6625 { ac_try='test -z "$ac_c_werror_flag"
6626 || test ! -s conftest.err'
6627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6628 (eval $ac_try) 2>&5
6629 ac_status=$?
6630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6631 (exit $ac_status); }; } &&
6632 { ac_try='test -s conftest.$ac_objext'
6633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6634 (eval $ac_try) 2>&5
6635 ac_status=$?
6636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6637 (exit $ac_status); }; }; then
bf3b7cd3
JD
6638 ac_lo=0 ac_mid=0
6639 while :; do
6640 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6641/* confdefs.h. */
6642_ACEOF
6643cat confdefs.h >>conftest.$ac_ext
6644cat >>conftest.$ac_ext <<_ACEOF
6645/* end confdefs.h. */
bf3b7cd3 6646$ac_includes_default
ba479fd2
NN
6647int
6648main ()
6649{
b61ff9c8 6650static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
bf3b7cd3
JD
6651test_array [0] = 0
6652
ba479fd2
NN
6653 ;
6654 return 0;
6655}
6656_ACEOF
6657rm -f conftest.$ac_objext
b61ff9c8
BS
6658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6659 (eval $ac_compile) 2>conftest.er1
ba479fd2 6660 ac_status=$?
86da66b5
HPN
6661 grep -v '^ *+' conftest.er1 >conftest.err
6662 rm -f conftest.er1
6663 cat conftest.err >&5
ba479fd2 6664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6665 (exit $ac_status); } &&
6666 { ac_try='test -z "$ac_c_werror_flag"
6667 || test ! -s conftest.err'
6668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6669 (eval $ac_try) 2>&5
6670 ac_status=$?
6671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6672 (exit $ac_status); }; } &&
6673 { ac_try='test -s conftest.$ac_objext'
6674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6675 (eval $ac_try) 2>&5
6676 ac_status=$?
6677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6678 (exit $ac_status); }; }; then
bf3b7cd3 6679 ac_hi=$ac_mid; break
75e93faa 6680else
ba479fd2
NN
6681 echo "$as_me: failed program was:" >&5
6682sed 's/^/| /' conftest.$ac_ext >&5
6683
b61ff9c8
BS
6684ac_lo=`expr $ac_mid + 1`
6685 if test $ac_lo -le $ac_mid; then
6686 ac_lo= ac_hi=
6687 break
6688 fi
6689 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 6690fi
b61ff9c8 6691rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6692 done
75e93faa 6693else
bf3b7cd3
JD
6694 echo "$as_me: failed program was:" >&5
6695sed 's/^/| /' conftest.$ac_ext >&5
6696
b61ff9c8 6697cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6698/* confdefs.h. */
6699_ACEOF
6700cat confdefs.h >>conftest.$ac_ext
6701cat >>conftest.$ac_ext <<_ACEOF
6702/* end confdefs.h. */
bf3b7cd3 6703$ac_includes_default
ba479fd2
NN
6704int
6705main ()
6706{
b61ff9c8 6707static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
bf3b7cd3
JD
6708test_array [0] = 0
6709
ba479fd2
NN
6710 ;
6711 return 0;
6712}
6713_ACEOF
6714rm -f conftest.$ac_objext
b61ff9c8
BS
6715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6716 (eval $ac_compile) 2>conftest.er1
ba479fd2 6717 ac_status=$?
86da66b5
HPN
6718 grep -v '^ *+' conftest.er1 >conftest.err
6719 rm -f conftest.er1
6720 cat conftest.err >&5
ba479fd2 6721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6722 (exit $ac_status); } &&
6723 { ac_try='test -z "$ac_c_werror_flag"
6724 || test ! -s conftest.err'
6725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6726 (eval $ac_try) 2>&5
6727 ac_status=$?
6728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6729 (exit $ac_status); }; } &&
6730 { ac_try='test -s conftest.$ac_objext'
6731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6732 (eval $ac_try) 2>&5
6733 ac_status=$?
6734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6735 (exit $ac_status); }; }; then
bf3b7cd3
JD
6736 ac_hi=-1 ac_mid=-1
6737 while :; do
6738 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6739/* confdefs.h. */
6740_ACEOF
6741cat confdefs.h >>conftest.$ac_ext
6742cat >>conftest.$ac_ext <<_ACEOF
6743/* end confdefs.h. */
bf3b7cd3 6744$ac_includes_default
ba479fd2
NN
6745int
6746main ()
6747{
b61ff9c8 6748static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
bf3b7cd3
JD
6749test_array [0] = 0
6750
ba479fd2
NN
6751 ;
6752 return 0;
6753}
6754_ACEOF
6755rm -f conftest.$ac_objext
b61ff9c8
BS
6756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6757 (eval $ac_compile) 2>conftest.er1
ba479fd2 6758 ac_status=$?
86da66b5
HPN
6759 grep -v '^ *+' conftest.er1 >conftest.err
6760 rm -f conftest.er1
6761 cat conftest.err >&5
ba479fd2 6762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6763 (exit $ac_status); } &&
6764 { ac_try='test -z "$ac_c_werror_flag"
6765 || test ! -s conftest.err'
6766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6767 (eval $ac_try) 2>&5
6768 ac_status=$?
6769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6770 (exit $ac_status); }; } &&
6771 { ac_try='test -s conftest.$ac_objext'
6772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6773 (eval $ac_try) 2>&5
6774 ac_status=$?
6775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6776 (exit $ac_status); }; }; then
bf3b7cd3 6777 ac_lo=$ac_mid; break
04cabffc 6778else
ba479fd2
NN
6779 echo "$as_me: failed program was:" >&5
6780sed 's/^/| /' conftest.$ac_ext >&5
6781
b61ff9c8
BS
6782ac_hi=`expr '(' $ac_mid ')' - 1`
6783 if test $ac_mid -le $ac_hi; then
6784 ac_lo= ac_hi=
6785 break
6786 fi
6787 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 6788fi
b61ff9c8 6789rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6790 done
6791else
6792 echo "$as_me: failed program was:" >&5
6793sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 6794
b61ff9c8 6795ac_lo= ac_hi=
414d23ae 6796fi
b61ff9c8 6797rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6798fi
b61ff9c8 6799rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6800# Binary search between lo and hi bounds.
6801while test "x$ac_lo" != "x$ac_hi"; do
6802 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 6803 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6804/* confdefs.h. */
6805_ACEOF
6806cat confdefs.h >>conftest.$ac_ext
6807cat >>conftest.$ac_ext <<_ACEOF
6808/* end confdefs.h. */
bf3b7cd3 6809$ac_includes_default
ba479fd2
NN
6810int
6811main ()
6812{
b61ff9c8 6813static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
bf3b7cd3
JD
6814test_array [0] = 0
6815
ba479fd2
NN
6816 ;
6817 return 0;
6818}
6819_ACEOF
6820rm -f conftest.$ac_objext
b61ff9c8
BS
6821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6822 (eval $ac_compile) 2>conftest.er1
ba479fd2 6823 ac_status=$?
86da66b5
HPN
6824 grep -v '^ *+' conftest.er1 >conftest.err
6825 rm -f conftest.er1
6826 cat conftest.err >&5
ba479fd2 6827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6828 (exit $ac_status); } &&
6829 { ac_try='test -z "$ac_c_werror_flag"
6830 || test ! -s conftest.err'
6831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6832 (eval $ac_try) 2>&5
6833 ac_status=$?
6834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6835 (exit $ac_status); }; } &&
6836 { ac_try='test -s conftest.$ac_objext'
6837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6838 (eval $ac_try) 2>&5
6839 ac_status=$?
6840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6841 (exit $ac_status); }; }; then
bf3b7cd3 6842 ac_hi=$ac_mid
75e93faa 6843else
ba479fd2
NN
6844 echo "$as_me: failed program was:" >&5
6845sed 's/^/| /' conftest.$ac_ext >&5
6846
b61ff9c8 6847ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 6848fi
b61ff9c8 6849rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6850done
bf3b7cd3
JD
6851case $ac_lo in
6852?*) ac_cv_sizeof___int64=$ac_lo;;
b61ff9c8 6853'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6854See \`config.log' for more details." >&5
b61ff9c8 6855echo "$as_me: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6856See \`config.log' for more details." >&2;}
b61ff9c8 6857 { (exit 1); exit 1; }; } ;;
bf3b7cd3 6858esac
b61ff9c8
BS
6859else
6860 if test "$cross_compiling" = yes; then
6861 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6862See \`config.log' for more details." >&5
6863echo "$as_me: error: cannot run test program while cross compiling
6864See \`config.log' for more details." >&2;}
6865 { (exit 1); exit 1; }; }
bf3b7cd3
JD
6866else
6867 cat >conftest.$ac_ext <<_ACEOF
6868/* confdefs.h. */
6869_ACEOF
6870cat confdefs.h >>conftest.$ac_ext
6871cat >>conftest.$ac_ext <<_ACEOF
6872/* end confdefs.h. */
6873$ac_includes_default
b61ff9c8
BS
6874long longval () { return (long) (sizeof (__int64)); }
6875unsigned long ulongval () { return (long) (sizeof (__int64)); }
bf3b7cd3
JD
6876#include <stdio.h>
6877#include <stdlib.h>
6878int
6879main ()
6880{
414d23ae 6881
bf3b7cd3
JD
6882 FILE *f = fopen ("conftest.val", "w");
6883 if (! f)
b61ff9c8
BS
6884 exit (1);
6885 if (((long) (sizeof (__int64))) < 0)
bf3b7cd3 6886 {
b61ff9c8
BS
6887 long i = longval ();
6888 if (i != ((long) (sizeof (__int64))))
6889 exit (1);
bf3b7cd3
JD
6890 fprintf (f, "%ld\n", i);
6891 }
6892 else
6893 {
b61ff9c8
BS
6894 unsigned long i = ulongval ();
6895 if (i != ((long) (sizeof (__int64))))
6896 exit (1);
bf3b7cd3
JD
6897 fprintf (f, "%lu\n", i);
6898 }
b61ff9c8 6899 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6900
6901 ;
6902 return 0;
6903}
6904_ACEOF
6905rm -f conftest$ac_exeext
b61ff9c8
BS
6906if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6907 (eval $ac_link) 2>&5
bf3b7cd3
JD
6908 ac_status=$?
6909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6910 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
6911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6912 (eval $ac_try) 2>&5
bf3b7cd3
JD
6913 ac_status=$?
6914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6915 (exit $ac_status); }; }; then
6916 ac_cv_sizeof___int64=`cat conftest.val`
6917else
6918 echo "$as_me: program exited with status $ac_status" >&5
6919echo "$as_me: failed program was:" >&5
6920sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6921
bf3b7cd3 6922( exit $ac_status )
b61ff9c8 6923{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6924See \`config.log' for more details." >&5
b61ff9c8 6925echo "$as_me: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6926See \`config.log' for more details." >&2;}
b61ff9c8
BS
6927 { (exit 1); exit 1; }; }
6928fi
6929rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6930fi
6931fi
6932rm -f conftest.val
b61ff9c8
BS
6933else
6934 ac_cv_sizeof___int64=0
bf3b7cd3 6935fi
b61ff9c8
BS
6936fi
6937echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6938echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 6939cat >>confdefs.h <<_ACEOF
414d23ae 6940#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6941_ACEOF
414d23ae 6942
cafe096b 6943
414d23ae
HPN
6944fi
6945
5ec1c5e6 6946
34a86c2b
NN
6947# ---------------------
6948# Warnings and checking
6949# ---------------------
6950
b5472e1d
NN
6951# Check $CC warning features (if it's GCC).
6952# We want to use -pedantic, but we don't want warnings about
6953# * 'long long'
6954# * variadic macros
89a42ac8 6955# * overlong strings
b5472e1d
NN
6956# So, we only use -pedantic if we can disable those warnings.
6957
3bbd5a19
PB
6958loose_warn=
6959save_CFLAGS="$CFLAGS"
6960for option in -W -Wall -Wwrite-strings -Wstrict-prototypes \
6961 -Wmissing-prototypes; do
6962 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
6963
b61ff9c8
BS
6964 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
6965echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
6966if eval "test \"\${$as_acx_Woption+set}\" = set"; then
b5472e1d
NN
6967 echo $ECHO_N "(cached) $ECHO_C" >&6
6968else
3bbd5a19
PB
6969 CFLAGS="$option"
6970 cat >conftest.$ac_ext <<_ACEOF
b5472e1d
NN
6971/* confdefs.h. */
6972_ACEOF
6973cat confdefs.h >>conftest.$ac_ext
6974cat >>conftest.$ac_ext <<_ACEOF
6975/* end confdefs.h. */
6976
3bbd5a19
PB
6977int
6978main ()
6979{
6980
6981 ;
6982 return 0;
6983}
b5472e1d
NN
6984_ACEOF
6985rm -f conftest.$ac_objext
b61ff9c8
BS
6986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6987 (eval $ac_compile) 2>conftest.er1
b5472e1d
NN
6988 ac_status=$?
6989 grep -v '^ *+' conftest.er1 >conftest.err
6990 rm -f conftest.er1
6991 cat conftest.err >&5
6992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6993 (exit $ac_status); } &&
6994 { ac_try='test -z "$ac_c_werror_flag"
6995 || test ! -s conftest.err'
6996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6997 (eval $ac_try) 2>&5
6998 ac_status=$?
6999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7000 (exit $ac_status); }; } &&
7001 { ac_try='test -s conftest.$ac_objext'
7002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7003 (eval $ac_try) 2>&5
7004 ac_status=$?
7005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7006 (exit $ac_status); }; }; then
3bbd5a19 7007 eval "$as_acx_Woption=yes"
b5472e1d
NN
7008else
7009 echo "$as_me: failed program was:" >&5
7010sed 's/^/| /' conftest.$ac_ext >&5
7011
b61ff9c8 7012eval "$as_acx_Woption=no"
b5472e1d 7013fi
b61ff9c8 7014rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
7015
7016fi
b61ff9c8
BS
7017echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
7018echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3bbd5a19
PB
7019 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
7020 loose_warn="$loose_warn${loose_warn:+ }$option"
7021fi
7022
7023 done
7024CFLAGS="$save_CFLAGS"
7025
7026cxx_compat_warn=
7027save_CFLAGS="$CFLAGS"
7028for option in -Wc++-compat; do
7029 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
b5472e1d 7030
b61ff9c8
BS
7031 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
7032echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
7033if eval "test \"\${$as_acx_Woption+set}\" = set"; then
b5472e1d
NN
7034 echo $ECHO_N "(cached) $ECHO_C" >&6
7035else
3bbd5a19
PB
7036 CFLAGS="$option"
7037 cat >conftest.$ac_ext <<_ACEOF
b5472e1d
NN
7038/* confdefs.h. */
7039_ACEOF
7040cat confdefs.h >>conftest.$ac_ext
7041cat >>conftest.$ac_ext <<_ACEOF
7042/* end confdefs.h. */
7043
3bbd5a19
PB
7044int
7045main ()
7046{
7047
7048 ;
7049 return 0;
7050}
b5472e1d
NN
7051_ACEOF
7052rm -f conftest.$ac_objext
b61ff9c8
BS
7053if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7054 (eval $ac_compile) 2>conftest.er1
b5472e1d
NN
7055 ac_status=$?
7056 grep -v '^ *+' conftest.er1 >conftest.err
7057 rm -f conftest.er1
7058 cat conftest.err >&5
7059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7060 (exit $ac_status); } &&
7061 { ac_try='test -z "$ac_c_werror_flag"
7062 || test ! -s conftest.err'
7063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7064 (eval $ac_try) 2>&5
7065 ac_status=$?
7066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7067 (exit $ac_status); }; } &&
7068 { ac_try='test -s conftest.$ac_objext'
7069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7070 (eval $ac_try) 2>&5
7071 ac_status=$?
7072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7073 (exit $ac_status); }; }; then
3bbd5a19 7074 eval "$as_acx_Woption=yes"
b5472e1d
NN
7075else
7076 echo "$as_me: failed program was:" >&5
7077sed 's/^/| /' conftest.$ac_ext >&5
7078
b61ff9c8 7079eval "$as_acx_Woption=no"
b5472e1d 7080fi
b61ff9c8 7081rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
7082
7083fi
b61ff9c8
BS
7084echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
7085echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3bbd5a19
PB
7086 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
7087 cxx_compat_warn="$cxx_compat_warn${cxx_compat_warn:+ }$option"
7088fi
7089
7090 done
7091CFLAGS="$save_CFLAGS"
b5472e1d 7092
3bbd5a19
PB
7093strict_warn=
7094save_CFLAGS="$CFLAGS"
7095for option in -Wold-style-definition \
7096 -Wmissing-format-attribute; do
7097 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
7098
b61ff9c8
BS
7099 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
7100echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
7101if eval "test \"\${$as_acx_Woption+set}\" = set"; then
89a42ac8
ZW
7102 echo $ECHO_N "(cached) $ECHO_C" >&6
7103else
3bbd5a19
PB
7104 CFLAGS="$option"
7105 cat >conftest.$ac_ext <<_ACEOF
89a42ac8
ZW
7106/* confdefs.h. */
7107_ACEOF
7108cat confdefs.h >>conftest.$ac_ext
7109cat >>conftest.$ac_ext <<_ACEOF
7110/* end confdefs.h. */
7111
3bbd5a19
PB
7112int
7113main ()
7114{
7115
7116 ;
7117 return 0;
7118}
89a42ac8
ZW
7119_ACEOF
7120rm -f conftest.$ac_objext
b61ff9c8
BS
7121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7122 (eval $ac_compile) 2>conftest.er1
89a42ac8
ZW
7123 ac_status=$?
7124 grep -v '^ *+' conftest.er1 >conftest.err
7125 rm -f conftest.er1
7126 cat conftest.err >&5
7127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7128 (exit $ac_status); } &&
7129 { ac_try='test -z "$ac_c_werror_flag"
7130 || test ! -s conftest.err'
7131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7132 (eval $ac_try) 2>&5
7133 ac_status=$?
7134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7135 (exit $ac_status); }; } &&
7136 { ac_try='test -s conftest.$ac_objext'
7137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7138 (eval $ac_try) 2>&5
7139 ac_status=$?
7140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7141 (exit $ac_status); }; }; then
3bbd5a19 7142 eval "$as_acx_Woption=yes"
89a42ac8
ZW
7143else
7144 echo "$as_me: failed program was:" >&5
7145sed 's/^/| /' conftest.$ac_ext >&5
7146
b61ff9c8 7147eval "$as_acx_Woption=no"
89a42ac8 7148fi
b61ff9c8 7149rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
89a42ac8
ZW
7150
7151fi
b61ff9c8
BS
7152echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
7153echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3bbd5a19
PB
7154 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
7155 strict_warn="$strict_warn${strict_warn:+ }$option"
34a86c2b
NN
7156fi
7157
3bbd5a19
PB
7158 done
7159CFLAGS="$save_CFLAGS"
7160
7161if test "$GCC" = yes; then
b61ff9c8 7162 echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \
3bbd5a19
PB
7163 -Wno-overlength-strings" >&5
7164echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \
b61ff9c8 7165 -Wno-overlength-strings... $ECHO_C" >&6
3bbd5a19 7166if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings+set}" = set; then
643d3bd2
NN
7167 echo $ECHO_N "(cached) $ECHO_C" >&6
7168else
7169 save_CFLAGS="$CFLAGS"
3bbd5a19
PB
7170CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros \
7171 -Wno-overlength-strings"
7172cat >conftest.$ac_ext <<_ACEOF
643d3bd2
NN
7173/* confdefs.h. */
7174_ACEOF
7175cat confdefs.h >>conftest.$ac_ext
7176cat >>conftest.$ac_ext <<_ACEOF
7177/* end confdefs.h. */
7178
3bbd5a19
PB
7179int
7180main ()
7181{
7182
7183 ;
7184 return 0;
7185}
643d3bd2
NN
7186_ACEOF
7187rm -f conftest.$ac_objext
b61ff9c8
BS
7188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7189 (eval $ac_compile) 2>conftest.er1
643d3bd2
NN
7190 ac_status=$?
7191 grep -v '^ *+' conftest.er1 >conftest.err
7192 rm -f conftest.er1
7193 cat conftest.err >&5
7194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7195 (exit $ac_status); } &&
7196 { ac_try='test -z "$ac_c_werror_flag"
7197 || test ! -s conftest.err'
7198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7199 (eval $ac_try) 2>&5
7200 ac_status=$?
7201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7202 (exit $ac_status); }; } &&
7203 { ac_try='test -s conftest.$ac_objext'
7204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7205 (eval $ac_try) 2>&5
7206 ac_status=$?
7207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7208 (exit $ac_status); }; }; then
3bbd5a19 7209 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=yes
643d3bd2
NN
7210else
7211 echo "$as_me: failed program was:" >&5
7212sed 's/^/| /' conftest.$ac_ext >&5
7213
b61ff9c8 7214acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=no
643d3bd2 7215fi
b61ff9c8 7216rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3bbd5a19 7217CFLAGS="$save_CFLAGS"
643d3bd2 7218fi
b61ff9c8
BS
7219echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&5
7220echo "${ECHO_T}$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&6
3bbd5a19
PB
7221if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings = yes; then
7222 strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros \
7223 -Wno-overlength-strings"
643d3bd2
NN
7224fi
7225
ac0f3f39 7226
ac0f3f39 7227fi
ac0f3f39 7228
ac0f3f39 7229
b61ff9c8 7230# Check whether --enable-werror-always or --disable-werror-always was given.
09a9c095 7231if test "${enable_werror_always+set}" = set; then
b61ff9c8
BS
7232 enableval="$enable_werror_always"
7233
09a9c095
NN
7234else
7235 enable_werror_always=no
b61ff9c8 7236fi;
3bbd5a19
PB
7237if test $enable_werror_always = yes; then
7238 strict_warn="$strict_warn${strict_warn:+ }-Werror"
373477bb 7239fi
373477bb 7240
373477bb
GDR
7241
7242
7243
3bbd5a19
PB
7244# The above macros do nothing if the compiler is not GCC. However, the
7245# Makefile has more goo to add other flags, so this variabl is used to
7246# enables warnings only for GCC.
414d23ae
HPN
7247warn_cflags=
7248if test "x$GCC" = "xyes"; then
7249 warn_cflags='$(GCC_WARN_CFLAGS)'
7250fi
7251
7252
8b1f719a 7253# Enable expensive internal checks
a1286ef5
ZW
7254is_release=
7255if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
7256 is_release=yes
7257fi
a6ccdbab 7258
b61ff9c8 7259# Check whether --enable-checking or --disable-checking was given.
414d23ae 7260if test "${enable_checking+set}" = set; then
b61ff9c8
BS
7261 enableval="$enable_checking"
7262 ac_checking_flags="${enableval}"
e1bbfc5c
NS
7263else
7264
7265# Determine the default checks.
7266if test x$is_release = x ; then
7267 ac_checking_flags=yes
7268else
7269 ac_checking_flags=release
7270fi
b61ff9c8 7271fi;
e1bbfc5c 7272IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
04c3028a 7273for check in release $ac_checking_flags
e1bbfc5c
NS
7274do
7275 case $check in
cdce5c16 7276 # these set all the flags to specific states
0d475361 7277 yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
cdce5c16
NS
7278 ac_fold_checking= ; ac_gc_checking=1 ;
7279 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 7280 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7e98624c 7281 ac_tree_checking=1 ; ac_valgrind_checking= ;
1b24a790 7282 ac_types_checking=1 ;;
3089f8b5 7283 no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
cdce5c16
NS
7284 ac_fold_checking= ; ac_gc_checking= ;
7285 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 7286 ac_rtlflag_checking= ; ac_runtime_checking= ;
7e98624c
RG
7287 ac_tree_checking= ; ac_valgrind_checking= ;
7288 ac_types_checking= ;;
3089f8b5 7289 all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
cdce5c16
NS
7290 ac_fold_checking=1 ; ac_gc_checking=1 ;
7291 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
7292 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7e98624c
RG
7293 ac_tree_checking=1 ; ac_valgrind_checking= ;
7294 ac_types_checking=1 ;;
3089f8b5 7295 release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
cdce5c16
NS
7296 ac_fold_checking= ; ac_gc_checking= ;
7297 ac_gc_always_collect= ; ac_rtl_checking= ;
7298 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
7e98624c
RG
7299 ac_tree_checking= ; ac_valgrind_checking= ;
7300 ac_types_checking= ;;
cdce5c16 7301 # these enable particular checks
e1bbfc5c 7302 assert) ac_assert_checking=1 ;;
3089f8b5 7303 df) ac_df_checking=1 ;;
e1bbfc5c
NS
7304 fold) ac_fold_checking=1 ;;
7305 gc) ac_gc_checking=1 ;;
7306 gcac) ac_gc_always_collect=1 ;;
7307 misc) ac_checking=1 ;;
e1bbfc5c 7308 rtl) ac_rtl_checking=1 ;;
cdce5c16 7309 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 7310 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 7311 tree) ac_tree_checking=1 ;;
7e98624c 7312 types) ac_types_checking=1 ;;
cdce5c16 7313 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 7314 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
7315echo "$as_me: error: unknown check category $check" >&2;}
7316 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
7317 esac
7318done
7319IFS="$ac_save_IFS"
06c37c96 7320
ba479fd2
NN
7321nocommon_flag=""
7322if test x$ac_checking != x ; then
7323
7324cat >>confdefs.h <<\_ACEOF
7325#define ENABLE_CHECKING 1
7326_ACEOF
7327
7328 nocommon_flag=-fno-common
7329fi
3bbd5a19 7330
3089f8b5
PB
7331if test x$ac_df_checking != x ; then
7332
7333cat >>confdefs.h <<\_ACEOF
7334#define ENABLE_DF_CHECKING 1
7335_ACEOF
7336
7337fi
06c37c96
NS
7338if test x$ac_assert_checking != x ; then
7339
7340cat >>confdefs.h <<\_ACEOF
7341#define ENABLE_ASSERT_CHECKING 1
7342_ACEOF
7343
b53ef395 7344fi
232b67d9 7345
b53ef395
NS
7346if test x$ac_runtime_checking != x ; then
7347
7348cat >>confdefs.h <<\_ACEOF
7349#define ENABLE_RUNTIME_CHECKING 1
7350_ACEOF
7351
06c37c96 7352fi
ba479fd2
NN
7353if test x$ac_tree_checking != x ; then
7354
7355cat >>confdefs.h <<\_ACEOF
7356#define ENABLE_TREE_CHECKING 1
7357_ACEOF
7358
13f05fd0 7359 TREEBROWSER=tree-browser.o
ba479fd2 7360fi
7e98624c
RG
7361if test x$ac_types_checking != x ; then
7362
7363cat >>confdefs.h <<\_ACEOF
7364#define ENABLE_TYPES_CHECKING 1
7365_ACEOF
7366
7367fi
13f05fd0 7368
ba479fd2
NN
7369if test x$ac_rtl_checking != x ; then
7370
7371cat >>confdefs.h <<\_ACEOF
7372#define ENABLE_RTL_CHECKING 1
7373_ACEOF
7374
7375fi
7376if test x$ac_rtlflag_checking != x ; then
7377
7378cat >>confdefs.h <<\_ACEOF
7379#define ENABLE_RTL_FLAG_CHECKING 1
7380_ACEOF
7381
7382fi
7383if test x$ac_gc_checking != x ; then
7384
7385cat >>confdefs.h <<\_ACEOF
7386#define ENABLE_GC_CHECKING 1
7387_ACEOF
7388
7389fi
7390if test x$ac_gc_always_collect != x ; then
7391
7392cat >>confdefs.h <<\_ACEOF
7393#define ENABLE_GC_ALWAYS_COLLECT 1
7394_ACEOF
7395
7396fi
7397if test x$ac_fold_checking != x ; then
7398
7399cat >>confdefs.h <<\_ACEOF
7400#define ENABLE_FOLD_CHECKING 1
7401_ACEOF
7402
7403fi
7404valgrind_path_defines=
7405valgrind_command=
7406
ba479fd2 7407if test "${ac_cv_header_valgrind_h+set}" = set; then
b61ff9c8
BS
7408 echo "$as_me:$LINENO: checking for valgrind.h" >&5
7409echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
ba479fd2
NN
7410if test "${ac_cv_header_valgrind_h+set}" = set; then
7411 echo $ECHO_N "(cached) $ECHO_C" >&6
7412fi
b61ff9c8
BS
7413echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
7414echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
ba479fd2
NN
7415else
7416 # Is the header compilable?
b61ff9c8
BS
7417echo "$as_me:$LINENO: checking valgrind.h usability" >&5
7418echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
ba479fd2 7419cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7420/* confdefs.h. */
7421_ACEOF
7422cat confdefs.h >>conftest.$ac_ext
7423cat >>conftest.$ac_ext <<_ACEOF
7424/* end confdefs.h. */
7425$ac_includes_default
63cf211a 7426#include <valgrind.h>
ba479fd2
NN
7427_ACEOF
7428rm -f conftest.$ac_objext
b61ff9c8
BS
7429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7430 (eval $ac_compile) 2>conftest.er1
ba479fd2 7431 ac_status=$?
86da66b5
HPN
7432 grep -v '^ *+' conftest.er1 >conftest.err
7433 rm -f conftest.er1
7434 cat conftest.err >&5
ba479fd2 7435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7436 (exit $ac_status); } &&
7437 { ac_try='test -z "$ac_c_werror_flag"
7438 || test ! -s conftest.err'
7439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7440 (eval $ac_try) 2>&5
7441 ac_status=$?
7442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7443 (exit $ac_status); }; } &&
7444 { ac_try='test -s conftest.$ac_objext'
7445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7446 (eval $ac_try) 2>&5
7447 ac_status=$?
7448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7449 (exit $ac_status); }; }; then
ba479fd2
NN
7450 ac_header_compiler=yes
7451else
7452 echo "$as_me: failed program was:" >&5
7453sed 's/^/| /' conftest.$ac_ext >&5
7454
b61ff9c8 7455ac_header_compiler=no
ba479fd2 7456fi
b61ff9c8
BS
7457rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7458echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7459echo "${ECHO_T}$ac_header_compiler" >&6
ba479fd2
NN
7460
7461# Is the header present?
b61ff9c8
BS
7462echo "$as_me:$LINENO: checking valgrind.h presence" >&5
7463echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
ba479fd2 7464cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7465/* confdefs.h. */
7466_ACEOF
7467cat confdefs.h >>conftest.$ac_ext
7468cat >>conftest.$ac_ext <<_ACEOF
7469/* end confdefs.h. */
7470#include <valgrind.h>
7471_ACEOF
b61ff9c8
BS
7472if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7473 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
7474 ac_status=$?
7475 grep -v '^ *+' conftest.er1 >conftest.err
7476 rm -f conftest.er1
7477 cat conftest.err >&5
7478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7479 (exit $ac_status); } >/dev/null; then
7480 if test -s conftest.err; then
7481 ac_cpp_err=$ac_c_preproc_warn_flag
7482 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7483 else
7484 ac_cpp_err=
7485 fi
7486else
7487 ac_cpp_err=yes
7488fi
7489if test -z "$ac_cpp_err"; then
ba479fd2
NN
7490 ac_header_preproc=yes
7491else
7492 echo "$as_me: failed program was:" >&5
7493sed 's/^/| /' conftest.$ac_ext >&5
7494
7495 ac_header_preproc=no
7496fi
7497rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
7498echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7499echo "${ECHO_T}$ac_header_preproc" >&6
ba479fd2
NN
7500
7501# So? What about this header?
86da66b5
HPN
7502case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7503 yes:no: )
ba479fd2
NN
7504 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
7505echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
7506 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
7507echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
7508 ac_header_preproc=yes
ba479fd2 7509 ;;
86da66b5 7510 no:yes:* )
ba479fd2
NN
7511 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
7512echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
7513 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
7514echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
7515 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
7516echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
7517 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
7518echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
7519 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
7520echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
7521 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
7522echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
b61ff9c8
BS
7523 (
7524 cat <<\_ASBOX
7525## ------------------------------------------ ##
7526## Report this to the AC_PACKAGE_NAME lists. ##
7527## ------------------------------------------ ##
7528_ASBOX
7529 ) |
7530 sed "s/^/$as_me: WARNING: /" >&2
ba479fd2
NN
7531 ;;
7532esac
b61ff9c8
BS
7533echo "$as_me:$LINENO: checking for valgrind.h" >&5
7534echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
ba479fd2
NN
7535if test "${ac_cv_header_valgrind_h+set}" = set; then
7536 echo $ECHO_N "(cached) $ECHO_C" >&6
7537else
7538 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 7539fi
b61ff9c8
BS
7540echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
7541echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
ba479fd2 7542
6e3f3080 7543fi
ba479fd2 7544if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
7545 have_valgrind_h=yes
7546else
ba479fd2 7547 have_valgrind_h=no
6938ec6c
NN
7548fi
7549
7550
ba479fd2 7551
cdce5c16 7552if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
7553 # It is certainly possible that there's valgrind but no valgrind.h.
7554 # GCC relies on making annotations so we must have both.
b61ff9c8
BS
7555 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
7556echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
ba479fd2 7557 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7558/* confdefs.h. */
7559_ACEOF
7560cat confdefs.h >>conftest.$ac_ext
7561cat >>conftest.$ac_ext <<_ACEOF
7562/* end confdefs.h. */
a207b594 7563#include <valgrind/memcheck.h>
14011ca4
AJ
7564#ifndef VALGRIND_DISCARD
7565#error VALGRIND_DISCARD not defined
7566#endif
ba479fd2 7567_ACEOF
b61ff9c8
BS
7568if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7569 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
7570 ac_status=$?
7571 grep -v '^ *+' conftest.er1 >conftest.err
7572 rm -f conftest.er1
7573 cat conftest.err >&5
7574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7575 (exit $ac_status); } >/dev/null; then
7576 if test -s conftest.err; then
7577 ac_cpp_err=$ac_c_preproc_warn_flag
7578 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7579 else
7580 ac_cpp_err=
7581 fi
7582else
7583 ac_cpp_err=yes
7584fi
7585if test -z "$ac_cpp_err"; then
a207b594
HPN
7586 gcc_cv_header_valgrind_memcheck_h=yes
7587else
ba479fd2
NN
7588 echo "$as_me: failed program was:" >&5
7589sed 's/^/| /' conftest.$ac_ext >&5
7590
a207b594
HPN
7591 gcc_cv_header_valgrind_memcheck_h=no
7592fi
ba479fd2 7593rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
7594 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
7595echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
7596 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
7597echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
ba479fd2 7598 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7599/* confdefs.h. */
7600_ACEOF
7601cat confdefs.h >>conftest.$ac_ext
7602cat >>conftest.$ac_ext <<_ACEOF
7603/* end confdefs.h. */
a207b594
HPN
7604#include <memcheck.h>
7605#ifndef VALGRIND_DISCARD
7606#error VALGRIND_DISCARD not defined
7607#endif
ba479fd2 7608_ACEOF
b61ff9c8
BS
7609if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7610 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
7611 ac_status=$?
7612 grep -v '^ *+' conftest.er1 >conftest.err
7613 rm -f conftest.er1
7614 cat conftest.err >&5
7615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7616 (exit $ac_status); } >/dev/null; then
7617 if test -s conftest.err; then
7618 ac_cpp_err=$ac_c_preproc_warn_flag
7619 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7620 else
7621 ac_cpp_err=
7622 fi
7623else
7624 ac_cpp_err=yes
7625fi
7626if test -z "$ac_cpp_err"; then
14011ca4
AJ
7627 gcc_cv_header_memcheck_h=yes
7628else
ba479fd2
NN
7629 echo "$as_me: failed program was:" >&5
7630sed 's/^/| /' conftest.$ac_ext >&5
7631
cafe096b
EC
7632 gcc_cv_header_memcheck_h=no
7633fi
ba479fd2 7634rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
7635 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
7636echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
ba479fd2 7637
56694dd9
ZW
7638# Prepare PATH_SEPARATOR.
7639# The user is always right.
7640if test "${PATH_SEPARATOR+set}" != set; then
7641 echo "#! /bin/sh" >conf$$.sh
7642 echo "exit 0" >>conf$$.sh
7643 chmod +x conf$$.sh
7644 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7645 PATH_SEPARATOR=';'
7646 else
7647 PATH_SEPARATOR=:
7648 fi
7649 rm -f conf$$.sh
7650fi
7651
7652# Find out how to test for executable files. Don't use a zero-byte file,
7653# as systems may use methods other than mode bits to determine executability.
7654cat >conf$$.file <<_ASEOF
7655#! /bin/sh
7656exit 0
7657_ASEOF
7658chmod +x conf$$.file
7659if test -x conf$$.file >/dev/null 2>&1; then
7660 ac_executable_p="test -x"
7661else
7662 ac_executable_p="test -f"
7663fi
7664rm -f conf$$.file
7665
7666# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 7667set dummy valgrind; ac_word=$2
b61ff9c8
BS
7668echo "$as_me:$LINENO: checking for $ac_word" >&5
7669echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7670if test "${ac_cv_path_valgrind_path+set}" = set; then
7671 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
7672else
7673 case "$valgrind_path" in
56694dd9
ZW
7674 [\\/]* | ?:[\\/]*)
7675 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
7676 ;;
414d23ae 7677 *)
56694dd9
ZW
7678 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
7679 for ac_dir in $PATH; do
7680 IFS="$ac_save_IFS"
7681 test -z "$ac_dir" && ac_dir=.
7682 for ac_exec_ext in '' $ac_executable_extensions; do
7683 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
7684 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
7685 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
7686 break 2
7687 fi
7688 fi
7689 done
7690 done
7691 IFS="$ac_save_IFS"
7692 ;;
414d23ae 7693esac
75e93faa 7694fi
414d23ae
HPN
7695valgrind_path="$ac_cv_path_valgrind_path"
7696if test -n "$valgrind_path"; then
b61ff9c8
BS
7697 echo "$as_me:$LINENO: result: $valgrind_path" >&5
7698echo "${ECHO_T}$valgrind_path" >&6
414d23ae 7699else
b61ff9c8
BS
7700 echo "$as_me:$LINENO: result: no" >&5
7701echo "${ECHO_T}no" >&6
414d23ae
HPN
7702fi
7703
a207b594
HPN
7704 if test "x$valgrind_path" = "x" \
7705 || (test $have_valgrind_h = no \
7706 && test $gcc_cv_header_memcheck_h = no \
7707 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
7708 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
7709echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
7710 { (exit 1); exit 1; }; }
414d23ae
HPN
7711 fi
7712 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
7713 valgrind_command="$valgrind_path -q"
ba479fd2
NN
7714
7715cat >>confdefs.h <<\_ACEOF
414d23ae 7716#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 7717_ACEOF
75e93faa 7718
a207b594 7719 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
7720
7721cat >>confdefs.h <<\_ACEOF
a207b594 7722#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 7723_ACEOF
a207b594
HPN
7724
7725 fi
14011ca4 7726 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
7727
7728cat >>confdefs.h <<\_ACEOF
14011ca4 7729#define HAVE_MEMCHECK_H 1
ba479fd2 7730_ACEOF
14011ca4
AJ
7731
7732 fi
414d23ae 7733fi
75e93faa 7734
75e93faa
ZW
7735
7736
414d23ae 7737# Enable code coverage collection
b61ff9c8 7738# Check whether --enable-coverage or --disable-coverage was given.
414d23ae 7739if test "${enable_coverage+set}" = set; then
b61ff9c8
BS
7740 enableval="$enable_coverage"
7741 case "${enableval}" in
6dd297da
NN
7742 yes|noopt)
7743 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
7744 ;;
7745 opt)
7746 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
7747 ;;
7748 no)
7749 # a.k.a. --disable-coverage
7750 coverage_flags=""
7751 ;;
7752 *)
7753 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
7754echo "$as_me: error: unknown coverage setting $enableval" >&2;}
7755 { (exit 1); exit 1; }; }
6dd297da 7756 ;;
414d23ae 7757esac
75e93faa 7758else
414d23ae 7759 coverage_flags=""
b61ff9c8 7760fi;
a3bba767 7761
2f41c1d6 7762
b61ff9c8 7763# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
1a4b763e 7764if test "${enable_gather_detailed_mem_stats+set}" = set; then
b61ff9c8
BS
7765 enableval="$enable_gather_detailed_mem_stats"
7766
439a7e54
DN
7767else
7768 enable_gather_detailed_mem_stats=no
b61ff9c8 7769fi;
439a7e54 7770if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
7771
7772cat >>confdefs.h <<\_ACEOF
439a7e54 7773#define GATHER_STATISTICS 1
ba479fd2 7774_ACEOF
439a7e54
DN
7775
7776fi
7777
73458fb7
NN
7778# -------------------------------
7779# Miscenalleous configure options
7780# -------------------------------
34a86c2b
NN
7781
7782# With stabs
ba479fd2 7783
b61ff9c8 7784# Check whether --with-stabs or --without-stabs was given.
34a86c2b 7785if test "${with_stabs+set}" = set; then
b61ff9c8
BS
7786 withval="$with_stabs"
7787 stabs="$with_stabs"
34a86c2b
NN
7788else
7789 stabs=no
b61ff9c8 7790fi;
cafe096b 7791
34a86c2b 7792# Determine whether or not multilibs are enabled.
b61ff9c8 7793# Check whether --enable-multilib or --disable-multilib was given.
34a86c2b 7794if test "${enable_multilib+set}" = set; then
b61ff9c8
BS
7795 enableval="$enable_multilib"
7796
34a86c2b
NN
7797else
7798 enable_multilib=yes
b61ff9c8 7799fi;
75e93faa 7800
34a86c2b 7801
414d23ae 7802# Enable __cxa_atexit for C++.
b61ff9c8 7803# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
414d23ae 7804if test "${enable___cxa_atexit+set}" = set; then
b61ff9c8 7805 enableval="$enable___cxa_atexit"
75e93faa 7806
b61ff9c8 7807fi;
75e93faa 7808
486aa804 7809# Enable C extension for decimal float if target supports it.
b61ff9c8 7810# Check whether --enable-decimal-float or --disable-decimal-float was given.
486aa804 7811if test "${enable_decimal_float+set}" = set; then
b61ff9c8
BS
7812 enableval="$enable_decimal_float"
7813
79b87c74
MM
7814 case $enable_decimal_float in
7815 yes | no | bid | dpd) ;;
7816 *) { { echo "$as_me:$LINENO: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
7817Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&5
7818echo "$as_me: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
7819Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&2;}
7820 { (exit 1); exit 1; }; } ;;
7821 esac
7822
7823else
7824
7825 case $target in
7826 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
a4a9df5f 7827 enable_decimal_float=yes
486aa804
BE
7828 ;;
7829 *)
7830 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
7831echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
7832 enable_decimal_float=no
7833 ;;
79b87c74 7834 esac
486aa804 7835
b61ff9c8 7836fi;
486aa804 7837
79b87c74
MM
7838dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
7839
7840cat >>confdefs.h <<_ACEOF
7841#define ENABLE_DECIMAL_FLOAT $dfp
7842_ACEOF
7843
7844
7845# x86's use BID format instead of DPD
7846case x$enable_decimal_float in
7847 xyes)
7848 case $target in
7849 i?86*-*-linux* | x86_64*-*-linux*)
7850 enable_decimal_float=bid
7851 ;;
7852 *)
7853 enable_decimal_float=dpd
7854 ;;
7855 esac
7856 ;;
7857 xno)
7858 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
7859 # dependency on libdecnumber.
7860 enable_decimal_float=dpd
7861 ;;
7862esac
486aa804
BE
7863
7864
79b87c74 7865bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
486aa804
BE
7866
7867cat >>confdefs.h <<_ACEOF
79b87c74 7868#define ENABLE_DECIMAL_BID_FORMAT $bid
486aa804
BE
7869_ACEOF
7870
7871
ab22c1fa 7872# Enable C extension for fixed-point arithmetic.
b61ff9c8 7873# Check whether --enable-fixed-point or --disable-fixed-point was given.
ab22c1fa 7874if test "${enable_fixed_point+set}" = set; then
b61ff9c8
BS
7875 enableval="$enable_fixed_point"
7876
ab22c1fa
CF
7877
7878else
7879
7880 case $target in
7881 mips*-*-*)
d5be1dd4 7882 case $host in
a0e527e3
RW
7883 mips*-sgi-irix*)
7884 { echo "$as_me:$LINENO: WARNING: fixed-point is not supported on IRIX" >&5
7885echo "$as_me: WARNING: fixed-point is not supported on IRIX" >&2;}
d5be1dd4
RS
7886 enable_fixed_point=no
7887 ;;
7888 *)
7889 enable_fixed_point=yes
7890 ;;
7891 esac
ab22c1fa
CF
7892 ;;
7893 *)
7894 { echo "$as_me:$LINENO: WARNING: fixed-point is not supported for this target" >&5
7895echo "$as_me: WARNING: fixed-point is not supported for this target" >&2;}
7896 enable_fixed_point=no
7897 ;;
7898 esac
7899
b61ff9c8 7900fi;
ab22c1fa
CF
7901
7902
7903fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi`
7904
7905cat >>confdefs.h <<_ACEOF
7906#define ENABLE_FIXED_POINT $fixedpoint
7907_ACEOF
7908
7909
414d23ae
HPN
7910# Enable threads
7911# Pass with no value to take the default
7912# Pass with a value to specify a thread package
b61ff9c8 7913# Check whether --enable-threads or --disable-threads was given.
414d23ae 7914if test "${enable_threads+set}" = set; then
b61ff9c8
BS
7915 enableval="$enable_threads"
7916
414d23ae
HPN
7917else
7918 enable_threads=''
b61ff9c8 7919fi;
2f41c1d6 7920
b61ff9c8 7921# Check whether --enable-tls or --disable-tls was given.
1a4b763e 7922if test "${enable_tls+set}" = set; then
b61ff9c8
BS
7923 enableval="$enable_tls"
7924
8dea1cca
DD
7925 case $enable_tls in
7926 yes | no) ;;
7927 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
7928Valid choices are 'yes' and 'no'." >&5
7929echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
7930Valid choices are 'yes' and 'no'." >&2;}
7931 { (exit 1); exit 1; }; } ;;
7932 esac
7933
7934else
7935 enable_tls=''
b61ff9c8 7936fi;
1a4b763e 7937
b61ff9c8 7938# Check whether --enable-objc-gc or --disable-objc-gc was given.
414d23ae 7939if test "${enable_objc_gc+set}" = set; then
b61ff9c8
BS
7940 enableval="$enable_objc_gc"
7941 if test x$enable_objc_gc = xno; then
414d23ae
HPN
7942 objc_boehm_gc=''
7943else
7944 objc_boehm_gc=1
7945fi
7946else
7947 objc_boehm_gc=''
b61ff9c8 7948fi;
75e93faa 7949
a6ccdbab 7950
b61ff9c8 7951# Check whether --with-dwarf2 or --without-dwarf2 was given.
414d23ae 7952if test "${with_dwarf2+set}" = set; then
b61ff9c8
BS
7953 withval="$with_dwarf2"
7954 dwarf2="$with_dwarf2"
75e93faa 7955else
414d23ae 7956 dwarf2=no
b61ff9c8 7957fi;
2f41c1d6 7958
b61ff9c8 7959# Check whether --enable-shared or --disable-shared was given.
1a4b763e 7960if test "${enable_shared+set}" = set; then
b61ff9c8
BS
7961 enableval="$enable_shared"
7962
414d23ae
HPN
7963 case $enable_shared in
7964 yes | no) ;;
7965 *)
7966 enable_shared=no
7967 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
7968 for pkg in $enableval; do
7969 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
7970 enable_shared=yes
7971 fi
7972 done
7973 IFS="$ac_save_ifs"
7974 ;;
7975 esac
7976
75e93faa 7977else
414d23ae 7978 enable_shared=yes
b61ff9c8 7979fi;
703d89ab 7980
ab22c1fa 7981
1a4b763e 7982
b61ff9c8 7983# Check whether --with-build-sysroot or --without-build-sysroot was given.
160633c6 7984if test "${with_build_sysroot+set}" = set; then
b61ff9c8 7985 withval="$with_build_sysroot"
160633c6 7986
b61ff9c8 7987fi;
160633c6
MM
7988
7989
b61ff9c8 7990# Check whether --with-sysroot or --without-sysroot was given.
4977bab6 7991if test "${with_sysroot+set}" = set; then
b61ff9c8
BS
7992 withval="$with_sysroot"
7993
4977bab6 7994 case ${with_sysroot} in
caa55b1e 7995 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
7996 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
7997 esac
ba479fd2 7998
4977bab6 7999 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14da6073 8000 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
4977bab6 8001
748670c2
RS
8002 if test "x$prefix" = xNONE; then
8003 test_prefix=/usr/local
8004 else
8005 test_prefix=$prefix
8006 fi
047d636f 8007 if test "x$exec_prefix" = xNONE; then
748670c2 8008 test_exec_prefix=$test_prefix
047d636f 8009 else
748670c2 8010 test_exec_prefix=$exec_prefix
047d636f
DJ
8011 fi
8012 case ${TARGET_SYSTEM_ROOT} in
91710e62 8013 "${test_prefix}"|"${test_prefix}/"*|\
748670c2
RS
8014 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
8015 '${prefix}'|'${prefix}/'*|\
91710e62 8016 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
8017 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
8018 TARGET_SYSTEM_ROOT_DEFINE="$t"
8019 ;;
8020 esac
8021
4977bab6 8022else
ba479fd2 8023
4977bab6 8024 TARGET_SYSTEM_ROOT=
db720d9a 8025 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
8026 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
8027
b61ff9c8 8028fi;
4977bab6
ZW
8029
8030
8031
8032
d1bd0ded 8033# Build with intermodule optimisations
b61ff9c8 8034# Check whether --enable-intermodule or --disable-intermodule was given.
d1bd0ded 8035if test "${enable_intermodule+set}" = set; then
b61ff9c8
BS
8036 enableval="$enable_intermodule"
8037 case ${enable_intermodule} in
0c46c5c7
KC
8038 yes) onestep="-onestep";;
8039 *) onestep="";;
d1bd0ded 8040esac
0c46c5c7
KC
8041else
8042 onestep=""
b61ff9c8 8043fi;
2f41c1d6
PB
8044
8045
8046
8047
b61ff9c8 8048# Check whether --with-pkgversion or --without-pkgversion was given.
2f41c1d6 8049if test "${with_pkgversion+set}" = set; then
b61ff9c8
BS
8050 withval="$with_pkgversion"
8051 case "$withval" in
2f41c1d6
PB
8052 yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
8053echo "$as_me: error: package version not specified" >&2;}
8054 { (exit 1); exit 1; }; } ;;
8055 no) PKGVERSION= ;;
8056 *) PKGVERSION="($withval) " ;;
8057 esac
8058else
8059 PKGVERSION="(GCC) "
8060
b61ff9c8 8061fi;
2f41c1d6
PB
8062
8063
8064
1a4b763e 8065
b61ff9c8 8066# Check whether --with-bugurl or --without-bugurl was given.
2f41c1d6 8067if test "${with_bugurl+set}" = set; then
b61ff9c8
BS
8068 withval="$with_bugurl"
8069 case "$withval" in
2f41c1d6
PB
8070 yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
8071echo "$as_me: error: bug URL not specified" >&2;}
8072 { (exit 1); exit 1; }; } ;;
8073 no) BUGURL=
8074 ;;
8075 *) BUGURL="$withval"
8076 ;;
8077 esac
8078else
8079 BUGURL="http://gcc.gnu.org/bugs.html"
8080
b61ff9c8 8081fi;
2f41c1d6
PB
8082 case ${BUGURL} in
8083 "")
8084 REPORT_BUGS_TO=
8085 REPORT_BUGS_TEXI=
8086 ;;
8087 *)
8088 REPORT_BUGS_TO="<$BUGURL>"
8089 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8090 ;;
8091 esac;
8092
ab22c1fa 8093
d1bd0ded
GK
8094
8095
f3c9f174
NN
8096# Sanity check enable_languages in case someone does not run the toplevel
8097# configure # script.
b61ff9c8 8098# Check whether --enable-languages or --disable-languages was given.
f3c9f174 8099if test "${enable_languages+set}" = set; then
b61ff9c8
BS
8100 enableval="$enable_languages"
8101 case ,${enable_languages}, in
f3c9f174
NN
8102 ,,|,yes,)
8103 # go safe -- we cannot be much sure without the toplevel
8104 # configure's
8105 # analysis of which target libs are present and usable
8106 enable_languages=c
8107 ;;
8108 *,all,*)
8109 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
8110echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
8111 { (exit 1); exit 1; }; }
8112 ;;
8113 *,c,*)
8114 ;;
8115 *)
8116 enable_languages=c,${enable_languages}
8117 ;;
8118esac
8119else
8120 enable_languages=c
b61ff9c8 8121fi;
f3c9f174 8122
9288b845
CD
8123# Used by documentation targets
8124
8125
8126
f3c9f174 8127
73458fb7
NN
8128# -------------------------
8129# Checks for other programs
8130# -------------------------
5b67ad6f 8131
b61ff9c8
BS
8132echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8133echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
8134set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
8135if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
ba479fd2 8136 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 8137else
ba479fd2 8138 cat >conftest.make <<\_ACEOF
e9a25f70 8139all:
b61ff9c8 8140 @echo 'ac_maketemp="$(MAKE)"'
ba479fd2 8141_ACEOF
e9a25f70 8142# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
b61ff9c8
BS
8143eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
8144if test -n "$ac_maketemp"; then
8145 eval ac_cv_prog_make_${ac_make}_set=yes
8146else
8147 eval ac_cv_prog_make_${ac_make}_set=no
8148fi
ba479fd2 8149rm -f conftest.make
e9a25f70 8150fi
b61ff9c8
BS
8151if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
8152 echo "$as_me:$LINENO: result: yes" >&5
8153echo "${ECHO_T}yes" >&6
e9a25f70
JL
8154 SET_MAKE=
8155else
b61ff9c8
BS
8156 echo "$as_me:$LINENO: result: no" >&5
8157echo "${ECHO_T}no" >&6
e9a25f70
JL
8158 SET_MAKE="MAKE=${MAKE-make}"
8159fi
8160
8161
861bb6c1 8162# Find some useful tools
ba479fd2 8163for ac_prog in gawk mawk nawk awk
861bb6c1 8164do
ba479fd2 8165 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 8166set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
8167echo "$as_me:$LINENO: checking for $ac_word" >&5
8168echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8169if test "${ac_cv_prog_AWK+set}" = set; then
8170 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
8171else
8172 if test -n "$AWK"; then
8173 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8174else
ba479fd2
NN
8175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8176for as_dir in $PATH
8177do
8178 IFS=$as_save_IFS
8179 test -z "$as_dir" && as_dir=.
8180 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8181 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8182 ac_cv_prog_AWK="$ac_prog"
8183 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8184 break 2
8185 fi
8186done
8187done
8188
861bb6c1
JL
8189fi
8190fi
ba479fd2 8191AWK=$ac_cv_prog_AWK
861bb6c1 8192if test -n "$AWK"; then
b61ff9c8
BS
8193 echo "$as_me:$LINENO: result: $AWK" >&5
8194echo "${ECHO_T}$AWK" >&6
861bb6c1 8195else
b61ff9c8
BS
8196 echo "$as_me:$LINENO: result: no" >&5
8197echo "${ECHO_T}no" >&6
861bb6c1
JL
8198fi
8199
ba479fd2 8200 test -n "$AWK" && break
861bb6c1
JL
8201done
8202
776dc15d 8203# We need awk to create options.c and options.h.
2c4902b9
NN
8204# Bail out if it's missing.
8205case ${AWK} in
ba479fd2
NN
8206 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
8207echo "$as_me: error: can't build without awk, bailing out" >&2;}
8208 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
8209esac
8210
b61ff9c8
BS
8211echo "$as_me:$LINENO: checking whether ln -s works" >&5
8212echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
ba479fd2
NN
8213if test "${gcc_cv_prog_LN_S+set}" = set; then
8214 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
8215else
8216 rm -f conftestdata_t
8217echo >conftestdata_f
8218if ln -s conftestdata_f conftestdata_t 2>/dev/null
8219then
8220 gcc_cv_prog_LN_S="ln -s"
8221else
8222 if ln conftestdata_f conftestdata_t 2>/dev/null
8223 then
8224 gcc_cv_prog_LN_S=ln
8225 else
35f06ae4
PB
8226 if cp -p conftestdata_f conftestdata_t 2>/dev/null
8227 then
06c3418c 8228 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
8229 else
8230 gcc_cv_prog_LN_S=cp
8231 fi
0a4b6309
RL
8232 fi
8233fi
8234rm -f conftestdata_f conftestdata_t
8235
8236fi
8237LN_S="$gcc_cv_prog_LN_S"
8238if test "$gcc_cv_prog_LN_S" = "ln -s"; then
b61ff9c8
BS
8239 echo "$as_me:$LINENO: result: yes" >&5
8240echo "${ECHO_T}yes" >&6
0a4b6309
RL
8241else
8242 if test "$gcc_cv_prog_LN_S" = "ln"; then
b61ff9c8
BS
8243 echo "$as_me:$LINENO: result: no, using ln" >&5
8244echo "${ECHO_T}no, using ln" >&6
0a4b6309 8245 else
b61ff9c8
BS
8246 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
8247echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
8248 fi
8249fi
8250
b61ff9c8
BS
8251echo "$as_me:$LINENO: checking whether ln works" >&5
8252echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
18fc9bd4
RG
8253if test "${acx_cv_prog_LN+set}" = set; then
8254 echo $ECHO_N "(cached) $ECHO_C" >&6
8255else
8256 rm -f conftestdata_t
8257echo >conftestdata_f
8258if ln conftestdata_f conftestdata_t 2>/dev/null
8259then
8260 acx_cv_prog_LN=ln
8261else
8262 acx_cv_prog_LN=no
8263fi
8264rm -f conftestdata_f conftestdata_t
8265
8266fi
8267if test $acx_cv_prog_LN = no; then
8268 LN="$LN_S"
b61ff9c8
BS
8269 echo "$as_me:$LINENO: result: no, using $LN" >&5
8270echo "${ECHO_T}no, using $LN" >&6
18fc9bd4
RG
8271else
8272 LN="$acx_cv_prog_LN"
b61ff9c8
BS
8273 echo "$as_me:$LINENO: result: yes" >&5
8274echo "${ECHO_T}yes" >&6
18fc9bd4
RG
8275fi
8276
ba479fd2
NN
8277if test -n "$ac_tool_prefix"; then
8278 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8279set dummy ${ac_tool_prefix}ranlib; ac_word=$2
b61ff9c8
BS
8280echo "$as_me:$LINENO: checking for $ac_word" >&5
8281echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8282if test "${ac_cv_prog_RANLIB+set}" = set; then
8283 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
8284else
8285 if test -n "$RANLIB"; then
8286 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8287else
ba479fd2
NN
8288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8289for as_dir in $PATH
8290do
8291 IFS=$as_save_IFS
8292 test -z "$as_dir" && as_dir=.
8293 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8294 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8295 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8296 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8297 break 2
8298 fi
8299done
8300done
8301
6e3f3080
NN
8302fi
8303fi
ba479fd2 8304RANLIB=$ac_cv_prog_RANLIB
6e3f3080 8305if test -n "$RANLIB"; then
b61ff9c8
BS
8306 echo "$as_me:$LINENO: result: $RANLIB" >&5
8307echo "${ECHO_T}$RANLIB" >&6
ba479fd2 8308else
b61ff9c8
BS
8309 echo "$as_me:$LINENO: result: no" >&5
8310echo "${ECHO_T}no" >&6
ba479fd2
NN
8311fi
8312
8313fi
8314if test -z "$ac_cv_prog_RANLIB"; then
8315 ac_ct_RANLIB=$RANLIB
8316 # Extract the first word of "ranlib", so it can be a program name with args.
8317set dummy ranlib; ac_word=$2
b61ff9c8
BS
8318echo "$as_me:$LINENO: checking for $ac_word" >&5
8319echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8320if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8321 echo $ECHO_N "(cached) $ECHO_C" >&6
8322else
8323 if test -n "$ac_ct_RANLIB"; then
8324 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8325else
8326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8327for as_dir in $PATH
8328do
8329 IFS=$as_save_IFS
8330 test -z "$as_dir" && as_dir=.
8331 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8332 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8333 ac_cv_prog_ac_ct_RANLIB="ranlib"
8334 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8335 break 2
8336 fi
8337done
8338done
8339
b61ff9c8 8340 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
ba479fd2
NN
8341fi
8342fi
8343ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8344if test -n "$ac_ct_RANLIB"; then
b61ff9c8
BS
8345 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8346echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 8347else
b61ff9c8
BS
8348 echo "$as_me:$LINENO: result: no" >&5
8349echo "${ECHO_T}no" >&6
ba479fd2
NN
8350fi
8351
b61ff9c8 8352 RANLIB=$ac_ct_RANLIB
ba479fd2
NN
8353else
8354 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
8355fi
8356
343a6100
MM
8357case "${host}" in
8358*-*-darwin*)
8359 # By default, the Darwin ranlib will not treat common symbols as
8360 # definitions when building the archive table of contents. Other
8361 # ranlibs do that; pass an option to the Darwin ranlib that makes
8362 # it behave similarly.
8363 ranlib_flags="-c"
8364 ;;
8365*)
8366 ranlib_flags=""
8367esac
8368
8369
0a4b6309
RL
8370# Find a good install program. We prefer a C program (faster),
8371# so one script is as good as another. But avoid the broken or
8372# incompatible versions:
8373# SysV /etc/install, /usr/sbin/install
8374# SunOS /usr/etc/install
8375# IRIX /sbin/install
8376# AIX /bin/install
8377# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8378# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8379# ./install, which can be erroneously created by make from ./install.sh.
b61ff9c8
BS
8380echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
8381echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 8382if test -z "$INSTALL"; then
ba479fd2
NN
8383if test "${ac_cv_path_install+set}" = set; then
8384 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
8385else
8386 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
8387 for ac_dir in $PATH; do
8388 # Account for people who put trailing slashes in PATH elements.
8389 case "$ac_dir/" in
8390 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
8391 *)
8392 # OSF1 and SCO ODT 3.0 have their own names for install.
8393 for ac_prog in ginstall scoinst install; do
8394 if test -f $ac_dir/$ac_prog; then
8395 if test $ac_prog = install &&
8396 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
8397 # AIX install. It has an incompatible calling convention.
8398 # OSF/1 installbsd also uses dspmsg, but is usable.
8399 :
8400 else
8401 ac_cv_path_install="$ac_dir/$ac_prog -c"
8402 break 2
8403 fi
8404 fi
8405 done
8406 ;;
8407 esac
8408 done
8409 IFS="$ac_save_IFS"
8410
8411fi
8412 if test "${ac_cv_path_install+set}" = set; then
8413 INSTALL="$ac_cv_path_install"
8414 else
8415 # As a last resort, use the slow shell script. We don't cache a
8416 # path for INSTALL within a source directory, because that will
8417 # break other packages using the cache if that directory is
8418 # removed, or if the path is relative.
8419 INSTALL="$ac_install_sh"
8420 fi
8421fi
b61ff9c8
BS
8422echo "$as_me:$LINENO: result: $INSTALL" >&5
8423echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
8424
8425# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8426# It thinks the first close brace ends the variable substitution.
8427test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8428
8429test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8430
861bb6c1 8431
3a000df0 8432# See if cmp has --ignore-initial.
b61ff9c8
BS
8433echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
8434echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
ba479fd2
NN
8435if test "${gcc_cv_prog_cmp_skip+set}" = set; then
8436 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
8437else
8438 echo abfoo >t1
8439 echo cdfoo >t2
269a7343 8440 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
8441 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
8442 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 8443 :
3a000df0
KC
8444 else
8445 gcc_cv_prog_cmp_skip=gnucompare
8446 fi
269a7343
KG
8447 fi
8448 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
8449 if cmp t1 t2 2 2 > /dev/null 2>&1; then
8450 if cmp t1 t2 1 1 > /dev/null 2>&1; then
8451 :
8452 else
8453 gcc_cv_prog_cmp_skip=fastcompare
8454 fi
8455 fi
3a000df0
KC
8456 fi
8457 rm t1 t2
8458
8459fi
b61ff9c8
BS
8460echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
8461echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
8462make_compare_target=$gcc_cv_prog_cmp_skip
8463
8464
8465
73458fb7
NN
8466# See if we have the mktemp command.
8467# Extract the first word of "mktemp", so it can be a program name with args.
8468set dummy mktemp; ac_word=$2
b61ff9c8
BS
8469echo "$as_me:$LINENO: checking for $ac_word" >&5
8470echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8471if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
8472 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8473else
8474 if test -n "$have_mktemp_command"; then
8475 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
8476else
ba479fd2
NN
8477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8478for as_dir in $PATH
8479do
8480 IFS=$as_save_IFS
8481 test -z "$as_dir" && as_dir=.
8482 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8483 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8484 ac_cv_prog_have_mktemp_command="yes"
8485 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8486 break 2
8487 fi
8488done
8489done
8490
73458fb7
NN
8491 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
8492fi
8493fi
ba479fd2 8494have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 8495if test -n "$have_mktemp_command"; then
b61ff9c8
BS
8496 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
8497echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 8498else
b61ff9c8
BS
8499 echo "$as_me:$LINENO: result: no" >&5
8500echo "${ECHO_T}no" >&6
73458fb7
NN
8501fi
8502
8503
7c27e184
PB
8504# See if makeinfo has been installed and is modern enough
8505# that we can use it.
9f18db39 8506
3bbd5a19 8507 # Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 8508set dummy makeinfo; ac_word=$2
b61ff9c8
BS
8509echo "$as_me:$LINENO: checking for $ac_word" >&5
8510echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8511if test "${ac_cv_prog_MAKEINFO+set}" = set; then
8512 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8513else
8514 if test -n "$MAKEINFO"; then
8515 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
8516else
ba479fd2
NN
8517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8518for as_dir in $PATH
8519do
8520 IFS=$as_save_IFS
8521 test -z "$as_dir" && as_dir=.
8522 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8523 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8524 ac_cv_prog_MAKEINFO="makeinfo"
8525 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8526 break 2
8527 fi
8528done
8529done
8530
73458fb7
NN
8531fi
8532fi
ba479fd2 8533MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 8534if test -n "$MAKEINFO"; then
b61ff9c8
BS
8535 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
8536echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 8537else
b61ff9c8
BS
8538 echo "$as_me:$LINENO: result: no" >&5
8539echo "${ECHO_T}no" >&6
73458fb7
NN
8540fi
8541
3bbd5a19
PB
8542 if test -n "$MAKEINFO"; then
8543 # Found it, now check the version.
b61ff9c8
BS
8544 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
8545echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
ba479fd2
NN
8546if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
8547 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7 8548else
3bbd5a19
PB
8549 ac_prog_version=`eval $MAKEINFO --version 2>&1 |
8550 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
8551
8552 case $ac_prog_version in
8553 '') gcc_cv_prog_makeinfo_modern=no;;
4c471775 8554 4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;;
3bbd5a19
PB
8555 *) gcc_cv_prog_makeinfo_modern=no;;
8556 esac
73458fb7
NN
8557
8558fi
b61ff9c8
BS
8559echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
8560echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
3bbd5a19
PB
8561 else
8562 gcc_cv_prog_makeinfo_modern=no
8563 fi
8564 if test $gcc_cv_prog_makeinfo_modern = no; then
8565 MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo"
8566 fi
73458fb7 8567
73458fb7 8568if test $gcc_cv_prog_makeinfo_modern = no; then
ba479fd2
NN
8569 { echo "$as_me:$LINENO: WARNING:
8570*** Makeinfo is missing or too old.
8571*** Info documentation will not be built." >&5
8572echo "$as_me: WARNING:
cafe096b 8573*** Makeinfo is missing or too old.
ba479fd2 8574*** Info documentation will not be built." >&2;}
73458fb7
NN
8575 BUILD_INFO=
8576else
ba479fd2 8577 BUILD_INFO=info
73458fb7
NN
8578fi
8579
7c27e184 8580
73458fb7 8581# Is pod2man recent enough to regenerate manpages?
b61ff9c8
BS
8582echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
8583echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 8584if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
b61ff9c8
BS
8585 echo "$as_me:$LINENO: result: yes" >&5
8586echo "${ECHO_T}yes" >&6
ba479fd2 8587 GENERATED_MANPAGES=generated-manpages
73458fb7 8588else
b61ff9c8
BS
8589 echo "$as_me:$LINENO: result: no" >&5
8590echo "${ECHO_T}no" >&6
73458fb7
NN
8591 GENERATED_MANPAGES=
8592fi
8593
7c27e184 8594
3bbd5a19
PB
8595MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
8596
73458fb7 8597# How about lex?
7c27e184
PB
8598for ac_prog in flex
8599do
8600 # Extract the first word of "$ac_prog", so it can be a program name with args.
8601set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
8602echo "$as_me:$LINENO: checking for $ac_word" >&5
8603echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8604if test "${ac_cv_prog_FLEX+set}" = set; then
8605 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8606else
8607 if test -n "$FLEX"; then
8608 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
8609else
ba479fd2
NN
8610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8611for as_dir in $PATH
8612do
8613 IFS=$as_save_IFS
8614 test -z "$as_dir" && as_dir=.
8615 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8616 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 8617 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
8618 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8619 break 2
8620 fi
8621done
8622done
8623
73458fb7
NN
8624fi
8625fi
ba479fd2 8626FLEX=$ac_cv_prog_FLEX
73458fb7 8627if test -n "$FLEX"; then
b61ff9c8
BS
8628 echo "$as_me:$LINENO: result: $FLEX" >&5
8629echo "${ECHO_T}$FLEX" >&6
73458fb7 8630else
b61ff9c8
BS
8631 echo "$as_me:$LINENO: result: no" >&5
8632echo "${ECHO_T}no" >&6
73458fb7
NN
8633fi
8634
7c27e184
PB
8635 test -n "$FLEX" && break
8636done
8637test -n "$FLEX" || FLEX="$MISSING flex"
8638
73458fb7
NN
8639
8640# Bison?
7c27e184
PB
8641for ac_prog in bison
8642do
8643 # Extract the first word of "$ac_prog", so it can be a program name with args.
8644set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
8645echo "$as_me:$LINENO: checking for $ac_word" >&5
8646echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8647if test "${ac_cv_prog_BISON+set}" = set; then
8648 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8649else
8650 if test -n "$BISON"; then
8651 ac_cv_prog_BISON="$BISON" # Let the user override the test.
8652else
ba479fd2
NN
8653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8654for as_dir in $PATH
8655do
8656 IFS=$as_save_IFS
8657 test -z "$as_dir" && as_dir=.
8658 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8659 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 8660 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
8661 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8662 break 2
8663 fi
8664done
8665done
8666
73458fb7
NN
8667fi
8668fi
ba479fd2 8669BISON=$ac_cv_prog_BISON
73458fb7 8670if test -n "$BISON"; then
b61ff9c8
BS
8671 echo "$as_me:$LINENO: result: $BISON" >&5
8672echo "${ECHO_T}$BISON" >&6
73458fb7 8673else
b61ff9c8
BS
8674 echo "$as_me:$LINENO: result: no" >&5
8675echo "${ECHO_T}no" >&6
73458fb7
NN
8676fi
8677
7c27e184
PB
8678 test -n "$BISON" && break
8679done
8680test -n "$BISON" || BISON="$MISSING bison"
8681
8682
8683# Binutils are not build modules, unlike bison/flex/makeinfo. So we
8684# check for build == host before using them.
73458fb7 8685
f6a874ac 8686# NM
414adbdd
GK
8687if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
8688 && test -d ../binutils ; then
f6a874ac
JW
8689 NM='$(objdir)/../binutils/nm-new'
8690else
8691 # Extract the first word of "nm", so it can be a program name with args.
8692set dummy nm; ac_word=$2
b61ff9c8
BS
8693echo "$as_me:$LINENO: checking for $ac_word" >&5
8694echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
f6a874ac
JW
8695if test "${ac_cv_prog_NM+set}" = set; then
8696 echo $ECHO_N "(cached) $ECHO_C" >&6
8697else
8698 if test -n "$NM"; then
8699 ac_cv_prog_NM="$NM" # Let the user override the test.
8700else
8701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8702for as_dir in $PATH
8703do
8704 IFS=$as_save_IFS
8705 test -z "$as_dir" && as_dir=.
8706 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8707 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f6a874ac
JW
8708 ac_cv_prog_NM="nm"
8709 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8710 break 2
8711 fi
8712done
8713done
8714
8715 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
8716fi
8717fi
8718NM=$ac_cv_prog_NM
8719if test -n "$NM"; then
b61ff9c8
BS
8720 echo "$as_me:$LINENO: result: $NM" >&5
8721echo "${ECHO_T}$NM" >&6
f6a874ac 8722else
b61ff9c8
BS
8723 echo "$as_me:$LINENO: result: no" >&5
8724echo "${ECHO_T}no" >&6
f6a874ac
JW
8725fi
8726
8727fi
8728
8729# AR
414adbdd
GK
8730if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
8731 && test -d ../binutils ; then
f6a874ac
JW
8732 AR='$(objdir)/../binutils/ar'
8733else
8734 # Extract the first word of "ar", so it can be a program name with args.
8735set dummy ar; ac_word=$2
b61ff9c8
BS
8736echo "$as_me:$LINENO: checking for $ac_word" >&5
8737echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
f6a874ac
JW
8738if test "${ac_cv_prog_AR+set}" = set; then
8739 echo $ECHO_N "(cached) $ECHO_C" >&6
8740else
8741 if test -n "$AR"; then
8742 ac_cv_prog_AR="$AR" # Let the user override the test.
8743else
8744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8745for as_dir in $PATH
8746do
8747 IFS=$as_save_IFS
8748 test -z "$as_dir" && as_dir=.
8749 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8750 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f6a874ac
JW
8751 ac_cv_prog_AR="ar"
8752 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8753 break 2
8754 fi
8755done
8756done
8757
8758 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
8759fi
8760fi
8761AR=$ac_cv_prog_AR
8762if test -n "$AR"; then
b61ff9c8
BS
8763 echo "$as_me:$LINENO: result: $AR" >&5
8764echo "${ECHO_T}$AR" >&6
f6a874ac 8765else
b61ff9c8
BS
8766 echo "$as_me:$LINENO: result: no" >&5
8767echo "${ECHO_T}no" >&6
f6a874ac
JW
8768fi
8769
8770fi
8771
8772
73458fb7
NN
8773# --------------------
8774# Checks for C headers
8775# --------------------
8776
ca9bc441
NN
8777# Need to reject headers which give warnings, so that the -Werror bootstrap
8778# works later. *sigh* This needs to come before all header checks.
18fc9bd4 8779
ca9bc441
NN
8780ac_c_preproc_warn_flag=yes
8781
b61ff9c8
BS
8782echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8783echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
ba479fd2
NN
8784if test "${ac_cv_header_stdc+set}" = set; then
8785 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8786else
ba479fd2 8787 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8788/* confdefs.h. */
8789_ACEOF
8790cat confdefs.h >>conftest.$ac_ext
8791cat >>conftest.$ac_ext <<_ACEOF
8792/* end confdefs.h. */
956d6950
JL
8793#include <stdlib.h>
8794#include <stdarg.h>
8795#include <string.h>
8796#include <float.h>
ba479fd2
NN
8797
8798int
8799main ()
8800{
8801
8802 ;
8803 return 0;
8804}
8805_ACEOF
8806rm -f conftest.$ac_objext
b61ff9c8
BS
8807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8808 (eval $ac_compile) 2>conftest.er1
ba479fd2 8809 ac_status=$?
86da66b5
HPN
8810 grep -v '^ *+' conftest.er1 >conftest.err
8811 rm -f conftest.er1
8812 cat conftest.err >&5
ba479fd2 8813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8814 (exit $ac_status); } &&
8815 { ac_try='test -z "$ac_c_werror_flag"
8816 || test ! -s conftest.err'
8817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8818 (eval $ac_try) 2>&5
8819 ac_status=$?
8820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8821 (exit $ac_status); }; } &&
8822 { ac_try='test -s conftest.$ac_objext'
8823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8824 (eval $ac_try) 2>&5
8825 ac_status=$?
8826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8827 (exit $ac_status); }; }; then
956d6950
JL
8828 ac_cv_header_stdc=yes
8829else
ba479fd2
NN
8830 echo "$as_me: failed program was:" >&5
8831sed 's/^/| /' conftest.$ac_ext >&5
8832
b61ff9c8 8833ac_cv_header_stdc=no
956d6950 8834fi
b61ff9c8 8835rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
8836
8837if test $ac_cv_header_stdc = yes; then
8838 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 8839 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8840/* confdefs.h. */
8841_ACEOF
8842cat confdefs.h >>conftest.$ac_ext
8843cat >>conftest.$ac_ext <<_ACEOF
8844/* end confdefs.h. */
956d6950 8845#include <string.h>
ba479fd2
NN
8846
8847_ACEOF
956d6950 8848if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8849 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
8850 :
8851else
956d6950
JL
8852 ac_cv_header_stdc=no
8853fi
8854rm -f conftest*
8855
8856fi
8857
8858if test $ac_cv_header_stdc = yes; then
8859 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 8860 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8861/* confdefs.h. */
8862_ACEOF
8863cat confdefs.h >>conftest.$ac_ext
8864cat >>conftest.$ac_ext <<_ACEOF
8865/* end confdefs.h. */
956d6950 8866#include <stdlib.h>
ba479fd2
NN
8867
8868_ACEOF
956d6950 8869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8870 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
8871 :
8872else
956d6950
JL
8873 ac_cv_header_stdc=no
8874fi
8875rm -f conftest*
8876
8877fi
8878
8879if test $ac_cv_header_stdc = yes; then
8880 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 8881 if test "$cross_compiling" = yes; then
956d6950
JL
8882 :
8883else
ba479fd2 8884 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8885/* confdefs.h. */
8886_ACEOF
8887cat confdefs.h >>conftest.$ac_ext
8888cat >>conftest.$ac_ext <<_ACEOF
8889/* end confdefs.h. */
956d6950 8890#include <ctype.h>
ba479fd2
NN
8891#if ((' ' & 0x0FF) == 0x020)
8892# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8893# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8894#else
8895# define ISLOWER(c) \
86da66b5
HPN
8896 (('a' <= (c) && (c) <= 'i') \
8897 || ('j' <= (c) && (c) <= 'r') \
8898 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
8899# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8900#endif
63cf211a 8901
ba479fd2
NN
8902#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8903int
8904main ()
8905{
8906 int i;
8907 for (i = 0; i < 256; i++)
8908 if (XOR (islower (i), ISLOWER (i))
86da66b5 8909 || toupper (i) != TOUPPER (i))
b61ff9c8
BS
8910 exit(2);
8911 exit (0);
ba479fd2
NN
8912}
8913_ACEOF
8914rm -f conftest$ac_exeext
b61ff9c8
BS
8915if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8916 (eval $ac_link) 2>&5
ba479fd2
NN
8917 ac_status=$?
8918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8919 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
8920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8921 (eval $ac_try) 2>&5
ba479fd2
NN
8922 ac_status=$?
8923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8924 (exit $ac_status); }; }; then
956d6950
JL
8925 :
8926else
ba479fd2
NN
8927 echo "$as_me: program exited with status $ac_status" >&5
8928echo "$as_me: failed program was:" >&5
8929sed 's/^/| /' conftest.$ac_ext >&5
8930
8931( exit $ac_status )
8932ac_cv_header_stdc=no
956d6950 8933fi
b61ff9c8 8934rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 8935fi
956d6950
JL
8936fi
8937fi
b61ff9c8
BS
8938echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8939echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 8940if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
8941
8942cat >>confdefs.h <<\_ACEOF
956d6950 8943#define STDC_HEADERS 1
ba479fd2 8944_ACEOF
956d6950
JL
8945
8946fi
8947
b61ff9c8
BS
8948echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
8949echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
ba479fd2
NN
8950if test "${ac_cv_header_time+set}" = set; then
8951 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8952else
ba479fd2 8953 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8954/* confdefs.h. */
8955_ACEOF
8956cat confdefs.h >>conftest.$ac_ext
8957cat >>conftest.$ac_ext <<_ACEOF
8958/* end confdefs.h. */
956d6950
JL
8959#include <sys/types.h>
8960#include <sys/time.h>
8961#include <time.h>
ba479fd2
NN
8962
8963int
8964main ()
8965{
8966if ((struct tm *) 0)
8967return 0;
8968 ;
8969 return 0;
8970}
8971_ACEOF
8972rm -f conftest.$ac_objext
b61ff9c8
BS
8973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8974 (eval $ac_compile) 2>conftest.er1
ba479fd2 8975 ac_status=$?
86da66b5
HPN
8976 grep -v '^ *+' conftest.er1 >conftest.err
8977 rm -f conftest.er1
8978 cat conftest.err >&5
ba479fd2 8979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8980 (exit $ac_status); } &&
8981 { ac_try='test -z "$ac_c_werror_flag"
8982 || test ! -s conftest.err'
8983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8984 (eval $ac_try) 2>&5
8985 ac_status=$?
8986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8987 (exit $ac_status); }; } &&
8988 { ac_try='test -s conftest.$ac_objext'
8989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8990 (eval $ac_try) 2>&5
8991 ac_status=$?
8992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8993 (exit $ac_status); }; }; then
956d6950
JL
8994 ac_cv_header_time=yes
8995else
ba479fd2
NN
8996 echo "$as_me: failed program was:" >&5
8997sed 's/^/| /' conftest.$ac_ext >&5
8998
b61ff9c8 8999ac_cv_header_time=no
956d6950 9000fi
b61ff9c8 9001rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 9002fi
b61ff9c8
BS
9003echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
9004echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 9005if test $ac_cv_header_time = yes; then
ba479fd2
NN
9006
9007cat >>confdefs.h <<\_ACEOF
956d6950 9008#define TIME_WITH_SYS_TIME 1
ba479fd2 9009_ACEOF
956d6950
JL
9010
9011fi
9012
b61ff9c8
BS
9013echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
9014echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
18fc9bd4
RG
9015if test "${gcc_cv_header_string+set}" = set; then
9016 echo $ECHO_N "(cached) $ECHO_C" >&6
9017else
9018 cat >conftest.$ac_ext <<_ACEOF
9019/* confdefs.h. */
9020_ACEOF
9021cat confdefs.h >>conftest.$ac_ext
9022cat >>conftest.$ac_ext <<_ACEOF
9023/* end confdefs.h. */
9024#include <string.h>
9025#include <strings.h>
9026int
9027main ()
9028{
9029
9030 ;
9031 return 0;
9032}
9033_ACEOF
9034rm -f conftest.$ac_objext
b61ff9c8
BS
9035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9036 (eval $ac_compile) 2>conftest.er1
18fc9bd4
RG
9037 ac_status=$?
9038 grep -v '^ *+' conftest.er1 >conftest.err
9039 rm -f conftest.er1
9040 cat conftest.err >&5
9041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9042 (exit $ac_status); } &&
9043 { ac_try='test -z "$ac_c_werror_flag"
9044 || test ! -s conftest.err'
9045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9046 (eval $ac_try) 2>&5
9047 ac_status=$?
9048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9049 (exit $ac_status); }; } &&
9050 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
18fc9bd4
RG
9056 gcc_cv_header_string=yes
9057else
9058 echo "$as_me: failed program was:" >&5
9059sed 's/^/| /' conftest.$ac_ext >&5
9060
b61ff9c8 9061gcc_cv_header_string=no
18fc9bd4 9062fi
b61ff9c8 9063rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18fc9bd4 9064fi
b61ff9c8
BS
9065echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
9066echo "${ECHO_T}$gcc_cv_header_string" >&6
18fc9bd4
RG
9067if test $gcc_cv_header_string = yes; then
9068
9069cat >>confdefs.h <<\_ACEOF
9070#define STRING_WITH_STRINGS 1
9071_ACEOF
9072
9073fi
9074
b61ff9c8
BS
9075echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
9076echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
ba479fd2
NN
9077if test "${ac_cv_header_sys_wait_h+set}" = set; then
9078 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 9079else
ba479fd2 9080 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9081/* confdefs.h. */
9082_ACEOF
9083cat confdefs.h >>conftest.$ac_ext
9084cat >>conftest.$ac_ext <<_ACEOF
9085/* end confdefs.h. */
e9831ca0
KG
9086#include <sys/types.h>
9087#include <sys/wait.h>
9088#ifndef WEXITSTATUS
b61ff9c8 9089# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
9090#endif
9091#ifndef WIFEXITED
ba479fd2 9092# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 9093#endif
ba479fd2
NN
9094
9095int
9096main ()
9097{
9098 int s;
9099 wait (&s);
9100 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9101 ;
9102 return 0;
9103}
9104_ACEOF
9105rm -f conftest.$ac_objext
b61ff9c8
BS
9106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9107 (eval $ac_compile) 2>conftest.er1
ba479fd2 9108 ac_status=$?
86da66b5
HPN
9109 grep -v '^ *+' conftest.er1 >conftest.err
9110 rm -f conftest.er1
9111 cat conftest.err >&5
ba479fd2 9112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9113 (exit $ac_status); } &&
9114 { ac_try='test -z "$ac_c_werror_flag"
9115 || test ! -s conftest.err'
9116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9117 (eval $ac_try) 2>&5
9118 ac_status=$?
9119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9120 (exit $ac_status); }; } &&
9121 { ac_try='test -s conftest.$ac_objext'
9122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9123 (eval $ac_try) 2>&5
9124 ac_status=$?
9125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9126 (exit $ac_status); }; }; then
e9831ca0
KG
9127 ac_cv_header_sys_wait_h=yes
9128else
ba479fd2
NN
9129 echo "$as_me: failed program was:" >&5
9130sed 's/^/| /' conftest.$ac_ext >&5
9131
b61ff9c8 9132ac_cv_header_sys_wait_h=no
e9831ca0 9133fi
b61ff9c8 9134rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 9135fi
b61ff9c8
BS
9136echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
9137echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 9138if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
9139
9140cat >>confdefs.h <<\_ACEOF
e9831ca0 9141#define HAVE_SYS_WAIT_H 1
ba479fd2 9142_ACEOF
6e3f3080 9143
63cf211a 9144fi
6e3f3080 9145
ba479fd2
NN
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
dfb77e37
KC
9167
9168for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 9169 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 9170 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 9171 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 9172do
ba479fd2 9173as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b61ff9c8
BS
9174echo "$as_me:$LINENO: checking for $ac_header" >&5
9175echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9176if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 9177 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9178else
18fc9bd4 9179 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9180/* confdefs.h. */
9181_ACEOF
9182cat confdefs.h >>conftest.$ac_ext
9183cat >>conftest.$ac_ext <<_ACEOF
9184/* end confdefs.h. */
9185#include <$ac_header>
9186_ACEOF
b61ff9c8
BS
9187if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9188 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9189 ac_status=$?
9190 grep -v '^ *+' conftest.er1 >conftest.err
9191 rm -f conftest.er1
9192 cat conftest.err >&5
9193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9194 (exit $ac_status); } >/dev/null; then
9195 if test -s conftest.err; then
9196 ac_cpp_err=$ac_c_preproc_warn_flag
9197 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9198 else
9199 ac_cpp_err=
9200 fi
9201else
9202 ac_cpp_err=yes
9203fi
9204if test -z "$ac_cpp_err"; then
18fc9bd4 9205 eval "$as_ac_Header=yes"
ba479fd2
NN
9206else
9207 echo "$as_me: failed program was:" >&5
9208sed 's/^/| /' conftest.$ac_ext >&5
9209
18fc9bd4 9210 eval "$as_ac_Header=no"
ba479fd2
NN
9211fi
9212rm -f conftest.err conftest.$ac_ext
6e3f3080 9213fi
b61ff9c8
BS
9214echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9215echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
9216if test `eval echo '${'$as_ac_Header'}'` = yes; then
9217 cat >>confdefs.h <<_ACEOF
9218#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9219_ACEOF
9220
956d6950
JL
9221fi
9222done
9223
9224
f24af81b 9225# Check for thread headers.
b61ff9c8
BS
9226echo "$as_me:$LINENO: checking for thread.h" >&5
9227echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
ba479fd2
NN
9228if test "${ac_cv_header_thread_h+set}" = set; then
9229 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9230else
18fc9bd4 9231 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9232/* confdefs.h. */
9233_ACEOF
9234cat confdefs.h >>conftest.$ac_ext
9235cat >>conftest.$ac_ext <<_ACEOF
9236/* end confdefs.h. */
9237#include <thread.h>
9238_ACEOF
b61ff9c8
BS
9239if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9240 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9241 ac_status=$?
9242 grep -v '^ *+' conftest.er1 >conftest.err
9243 rm -f conftest.er1
9244 cat conftest.err >&5
9245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9246 (exit $ac_status); } >/dev/null; then
9247 if test -s conftest.err; then
9248 ac_cpp_err=$ac_c_preproc_warn_flag
9249 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9250 else
9251 ac_cpp_err=
9252 fi
9253else
9254 ac_cpp_err=yes
9255fi
9256if test -z "$ac_cpp_err"; then
18fc9bd4 9257 ac_cv_header_thread_h=yes
ba479fd2
NN
9258else
9259 echo "$as_me: failed program was:" >&5
9260sed 's/^/| /' conftest.$ac_ext >&5
9261
18fc9bd4 9262 ac_cv_header_thread_h=no
ba479fd2
NN
9263fi
9264rm -f conftest.err conftest.$ac_ext
6e3f3080 9265fi
b61ff9c8
BS
9266echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
9267echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 9268if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
9269 have_thread_h=yes
9270else
ba479fd2 9271 have_thread_h=
f24af81b
TT
9272fi
9273
b61ff9c8
BS
9274echo "$as_me:$LINENO: checking for pthread.h" >&5
9275echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
ba479fd2
NN
9276if test "${ac_cv_header_pthread_h+set}" = set; then
9277 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 9278else
18fc9bd4 9279 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9280/* confdefs.h. */
9281_ACEOF
9282cat confdefs.h >>conftest.$ac_ext
9283cat >>conftest.$ac_ext <<_ACEOF
9284/* end confdefs.h. */
9285#include <pthread.h>
9286_ACEOF
b61ff9c8
BS
9287if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9288 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9289 ac_status=$?
9290 grep -v '^ *+' conftest.er1 >conftest.err
9291 rm -f conftest.er1
9292 cat conftest.err >&5
9293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9294 (exit $ac_status); } >/dev/null; then
9295 if test -s conftest.err; then
9296 ac_cpp_err=$ac_c_preproc_warn_flag
9297 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9298 else
9299 ac_cpp_err=
9300 fi
9301else
9302 ac_cpp_err=yes
9303fi
9304if test -z "$ac_cpp_err"; then
18fc9bd4 9305 ac_cv_header_pthread_h=yes
ba479fd2 9306else
18fc9bd4
RG
9307 echo "$as_me: failed program was:" >&5
9308sed 's/^/| /' conftest.$ac_ext >&5
9309
9310 ac_cv_header_pthread_h=no
9311fi
9312rm -f conftest.err conftest.$ac_ext
6e3f3080 9313fi
b61ff9c8
BS
9314echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
9315echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 9316if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
9317 have_pthread_h=yes
9318else
ba479fd2 9319 have_pthread_h=
f24af81b
TT
9320fi
9321
9322
84c041a1 9323# These tests can't be done till we know if we have limits.h.
b61ff9c8
BS
9324echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
9325echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
ba479fd2
NN
9326if test "${gcc_cv_decl_char_bit+set}" = set; then
9327 echo $ECHO_N "(cached) $ECHO_C" >&6
9328else
9329 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9330/* confdefs.h. */
9331_ACEOF
9332cat confdefs.h >>conftest.$ac_ext
9333cat >>conftest.$ac_ext <<_ACEOF
9334/* end confdefs.h. */
75e93faa
ZW
9335#ifdef HAVE_LIMITS_H
9336#include <limits.h>
9337#endif
9338#ifdef CHAR_BIT
9339found
9340#endif
ba479fd2 9341_ACEOF
75e93faa 9342if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9343 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
9344 gcc_cv_decl_char_bit=yes
9345else
75e93faa
ZW
9346 gcc_cv_decl_char_bit=no
9347fi
9348rm -f conftest*
9349
9350
9351fi
b61ff9c8
BS
9352echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
9353echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 9354if test $gcc_cv_decl_char_bit = no; then
b61ff9c8
BS
9355 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
9356echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
ba479fd2
NN
9357if test "${gcc_cv_c_nbby+set}" = set; then
9358 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
9359else
9360 i=8
9361 gcc_cv_c_nbby=
9362 while test $i -lt 65; do
ba479fd2 9363 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9364/* confdefs.h. */
9365_ACEOF
9366cat confdefs.h >>conftest.$ac_ext
9367cat >>conftest.$ac_ext <<_ACEOF
9368/* end confdefs.h. */
9369
9370int
9371main ()
9372{
4e70264f
ZW
9373switch(0) {
9374 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
9375 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
9376 ; }
ba479fd2
NN
9377 ;
9378 return 0;
9379}
9380_ACEOF
9381rm -f conftest.$ac_objext
b61ff9c8
BS
9382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9383 (eval $ac_compile) 2>conftest.er1
ba479fd2 9384 ac_status=$?
86da66b5
HPN
9385 grep -v '^ *+' conftest.er1 >conftest.err
9386 rm -f conftest.er1
9387 cat conftest.err >&5
ba479fd2 9388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9389 (exit $ac_status); } &&
9390 { ac_try='test -z "$ac_c_werror_flag"
9391 || test ! -s conftest.err'
9392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9393 (eval $ac_try) 2>&5
9394 ac_status=$?
9395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9396 (exit $ac_status); }; } &&
9397 { ac_try='test -s conftest.$ac_objext'
9398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9399 (eval $ac_try) 2>&5
9400 ac_status=$?
9401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9402 (exit $ac_status); }; }; then
4e70264f 9403 gcc_cv_c_nbby=$i; break
75e93faa 9404else
ba479fd2
NN
9405 echo "$as_me: failed program was:" >&5
9406sed 's/^/| /' conftest.$ac_ext >&5
9407
75e93faa 9408fi
b61ff9c8 9409rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
9410 i=`expr $i + 1`
9411 done
9412 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
9413
9414fi
b61ff9c8
BS
9415echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
9416echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 9417if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
9418 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
9419echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
9420 { (exit 1); exit 1; }; }
75e93faa 9421else
ba479fd2
NN
9422
9423cat >>confdefs.h <<_ACEOF
75e93faa 9424#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 9425_ACEOF
75e93faa
ZW
9426
9427fi
9428fi
b61ff9c8
BS
9429echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
9430echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
ba479fd2
NN
9431if test "${ac_cv_c_bigendian+set}" = set; then
9432 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 9433else
9791c75c 9434 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 9435cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9436/* confdefs.h. */
9437_ACEOF
9438cat confdefs.h >>conftest.$ac_ext
9439cat >>conftest.$ac_ext <<_ACEOF
9440/* end confdefs.h. */
4977bab6
ZW
9441#include <sys/types.h>
9442#include <sys/param.h>
9791c75c 9443
ba479fd2
NN
9444int
9445main ()
9446{
b61ff9c8 9447#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4977bab6 9448 bogus endian macros
84c041a1 9449#endif
9791c75c 9450
ba479fd2
NN
9451 ;
9452 return 0;
9453}
9454_ACEOF
9455rm -f conftest.$ac_objext
b61ff9c8
BS
9456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9457 (eval $ac_compile) 2>conftest.er1
ba479fd2 9458 ac_status=$?
86da66b5
HPN
9459 grep -v '^ *+' conftest.er1 >conftest.err
9460 rm -f conftest.er1
9461 cat conftest.err >&5
ba479fd2 9462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9463 (exit $ac_status); } &&
9464 { ac_try='test -z "$ac_c_werror_flag"
9465 || test ! -s conftest.err'
9466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9467 (eval $ac_try) 2>&5
9468 ac_status=$?
9469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9470 (exit $ac_status); }; } &&
9471 { ac_try='test -s conftest.$ac_objext'
9472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9473 (eval $ac_try) 2>&5
9474 ac_status=$?
9475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9476 (exit $ac_status); }; }; then
2f41c1d6 9477 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 9478cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9479/* confdefs.h. */
9480_ACEOF
9481cat confdefs.h >>conftest.$ac_ext
9482cat >>conftest.$ac_ext <<_ACEOF
9483/* end confdefs.h. */
4977bab6
ZW
9484#include <sys/types.h>
9485#include <sys/param.h>
9791c75c 9486
ba479fd2
NN
9487int
9488main ()
9489{
4977bab6
ZW
9490#if BYTE_ORDER != BIG_ENDIAN
9491 not big endian
84c041a1 9492#endif
9791c75c 9493
ba479fd2
NN
9494 ;
9495 return 0;
9496}
9497_ACEOF
9498rm -f conftest.$ac_objext
b61ff9c8
BS
9499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9500 (eval $ac_compile) 2>conftest.er1
ba479fd2 9501 ac_status=$?
86da66b5
HPN
9502 grep -v '^ *+' conftest.er1 >conftest.err
9503 rm -f conftest.er1
9504 cat conftest.err >&5
ba479fd2 9505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9506 (exit $ac_status); } &&
9507 { ac_try='test -z "$ac_c_werror_flag"
9508 || test ! -s conftest.err'
9509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9510 (eval $ac_try) 2>&5
9511 ac_status=$?
9512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9513 (exit $ac_status); }; } &&
9514 { ac_try='test -s conftest.$ac_objext'
9515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9516 (eval $ac_try) 2>&5
9517 ac_status=$?
9518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9519 (exit $ac_status); }; }; then
9520 ac_cv_c_bigendian=yes
9521else
9522 echo "$as_me: failed program was:" >&5
ba479fd2
NN
9523sed 's/^/| /' conftest.$ac_ext >&5
9524
b61ff9c8 9525ac_cv_c_bigendian=no
4977bab6 9526fi
b61ff9c8 9527rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 9528else
ba479fd2
NN
9529 echo "$as_me: failed program was:" >&5
9530sed 's/^/| /' conftest.$ac_ext >&5
9531
b61ff9c8 9532# It does not; compile a test program.
9791c75c
KC
9533if test "$cross_compiling" = yes; then
9534 # try to guess the endianness by grepping values into an object file
9535 ac_cv_c_bigendian=unknown
9536 cat >conftest.$ac_ext <<_ACEOF
9537/* confdefs.h. */
9538_ACEOF
9539cat confdefs.h >>conftest.$ac_ext
9540cat >>conftest.$ac_ext <<_ACEOF
9541/* end confdefs.h. */
b61ff9c8
BS
9542short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9543short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9791c75c 9544void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
b61ff9c8
BS
9545short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9546short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9791c75c
KC
9547void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
9548int
9549main ()
9550{
9551 _ascii (); _ebcdic ();
9552 ;
9553 return 0;
9554}
9555_ACEOF
9556rm -f conftest.$ac_objext
b61ff9c8
BS
9557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9558 (eval $ac_compile) 2>conftest.er1
9791c75c
KC
9559 ac_status=$?
9560 grep -v '^ *+' conftest.er1 >conftest.err
9561 rm -f conftest.er1
9562 cat conftest.err >&5
9563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9564 (exit $ac_status); } &&
9565 { ac_try='test -z "$ac_c_werror_flag"
9566 || test ! -s conftest.err'
9567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9568 (eval $ac_try) 2>&5
9569 ac_status=$?
9570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9571 (exit $ac_status); }; } &&
9572 { ac_try='test -s conftest.$ac_objext'
9573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9574 (eval $ac_try) 2>&5
9575 ac_status=$?
9576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9577 (exit $ac_status); }; }; then
8b1f719a
PB
9578 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
9579 ac_cv_c_bigendian=yes
9580fi
9791c75c
KC
9581if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9582 if test "$ac_cv_c_bigendian" = unknown; then
9583 ac_cv_c_bigendian=no
9584 else
9585 # finding both strings is unlikely to happen, but who knows?
9586 ac_cv_c_bigendian=unknown
9587 fi
9588fi
9589else
9590 echo "$as_me: failed program was:" >&5
9591sed 's/^/| /' conftest.$ac_ext >&5
9592
4977bab6 9593fi
b61ff9c8 9594rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
9595else
9596 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9597/* confdefs.h. */
9598_ACEOF
9599cat confdefs.h >>conftest.$ac_ext
9600cat >>conftest.$ac_ext <<_ACEOF
9601/* end confdefs.h. */
9791c75c
KC
9602int
9603main ()
9604{
4977bab6
ZW
9605 /* Are we little or big endian? From Harbison&Steele. */
9606 union
9607 {
b61ff9c8
BS
9608 long l;
9609 char c[sizeof (long)];
4977bab6
ZW
9610 } u;
9611 u.l = 1;
b61ff9c8 9612 exit (u.c[sizeof (long) - 1] == 1);
4977bab6 9613}
ba479fd2
NN
9614_ACEOF
9615rm -f conftest$ac_exeext
b61ff9c8
BS
9616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9617 (eval $ac_link) 2>&5
ba479fd2
NN
9618 ac_status=$?
9619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9620 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
9621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9622 (eval $ac_try) 2>&5
ba479fd2
NN
9623 ac_status=$?
9624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9625 (exit $ac_status); }; }; then
4977bab6
ZW
9626 ac_cv_c_bigendian=no
9627else
ba479fd2
NN
9628 echo "$as_me: program exited with status $ac_status" >&5
9629echo "$as_me: failed program was:" >&5
9630sed 's/^/| /' conftest.$ac_ext >&5
9631
9632( exit $ac_status )
9633ac_cv_c_bigendian=yes
4977bab6 9634fi
b61ff9c8 9635rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 9636fi
4977bab6 9637fi
b61ff9c8 9638rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 9639fi
b61ff9c8
BS
9640echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
9641echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
9642case $ac_cv_c_bigendian in
9643 yes)
ba479fd2
NN
9644
9645cat >>confdefs.h <<\_ACEOF
4977bab6 9646#define WORDS_BIGENDIAN 1
ba479fd2 9647_ACEOF
9791c75c
KC
9648 ;;
9649 no)
9650 ;;
9651 *)
9652 { { echo "$as_me:$LINENO: error: unknown endianness
9653presetting ac_cv_c_bigendian=no (or yes) will help" >&5
9654echo "$as_me: error: unknown endianness
9655presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
9656 { (exit 1); exit 1; }; } ;;
9657esac
84c041a1 9658
75e93faa 9659
73458fb7
NN
9660# --------
9661# UNSORTED
9662# --------
1e608388 9663
1e608388 9664
4e70264f
ZW
9665# These libraries may be used by collect2.
9666# We may need a special search path to get them linked.
b61ff9c8
BS
9667echo "$as_me:$LINENO: checking for collect2 libraries" >&5
9668echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
ba479fd2
NN
9669if test "${gcc_cv_collect2_libs+set}" = set; then
9670 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
9671else
9672 save_LIBS="$LIBS"
7f2749d4 9673for libs in '' -lld -lmld \
4e70264f
ZW
9674 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
9675 '-L/usr/lib/cmplrs/cc3.11 -lmld'
9676do
9677 LIBS="$libs"
ba479fd2 9678 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9679/* confdefs.h. */
9680_ACEOF
9681cat confdefs.h >>conftest.$ac_ext
9682cat >>conftest.$ac_ext <<_ACEOF
9683/* end confdefs.h. */
9684
b61ff9c8 9685/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9686#ifdef __cplusplus
9687extern "C"
9688#endif
b61ff9c8
BS
9689/* We use char because int might match the return type of a gcc2
9690 builtin and then its argument prototype would still apply. */
ba479fd2
NN
9691char ldopen ();
9692int
9693main ()
9694{
b61ff9c8 9695ldopen ();
ba479fd2
NN
9696 ;
9697 return 0;
9698}
9699_ACEOF
9700rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
9701if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9702 (eval $ac_link) 2>conftest.er1
ba479fd2 9703 ac_status=$?
86da66b5
HPN
9704 grep -v '^ *+' conftest.er1 >conftest.err
9705 rm -f conftest.er1
9706 cat conftest.err >&5
ba479fd2 9707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9708 (exit $ac_status); } &&
9709 { ac_try='test -z "$ac_c_werror_flag"
9710 || test ! -s conftest.err'
9711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9712 (eval $ac_try) 2>&5
9713 ac_status=$?
9714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9715 (exit $ac_status); }; } &&
9716 { ac_try='test -s conftest$ac_exeext'
9717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9718 (eval $ac_try) 2>&5
9719 ac_status=$?
9720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9721 (exit $ac_status); }; }; then
4e70264f
ZW
9722 gcc_cv_collect2_libs="$libs"; break
9723else
ba479fd2
NN
9724 echo "$as_me: failed program was:" >&5
9725sed 's/^/| /' conftest.$ac_ext >&5
9726
4e70264f 9727fi
b61ff9c8 9728rm -f conftest.err conftest.$ac_objext \
86da66b5 9729 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
9730done
9731LIBS="$save_LIBS"
9732test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
9733fi
b61ff9c8
BS
9734echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
9735echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
9736case $gcc_cv_collect2_libs in
9737 "none required") ;;
9738 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
9739esac
9740
9741
7f2749d4
RK
9742# When building Ada code on Alpha, we need exc_resume which is usually in
9743# -lexc. So test for it.
9744save_LIBS="$LIBS"
9745LIBS=
b61ff9c8
BS
9746echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
9747echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
ba479fd2
NN
9748if test "${ac_cv_search_exc_resume+set}" = set; then
9749 echo $ECHO_N "(cached) $ECHO_C" >&6
9750else
9751 ac_func_search_save_LIBS=$LIBS
b61ff9c8 9752ac_cv_search_exc_resume=no
ba479fd2 9753cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9754/* confdefs.h. */
9755_ACEOF
9756cat confdefs.h >>conftest.$ac_ext
9757cat >>conftest.$ac_ext <<_ACEOF
9758/* end confdefs.h. */
7f2749d4 9759
b61ff9c8 9760/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9761#ifdef __cplusplus
9762extern "C"
9763#endif
b61ff9c8
BS
9764/* We use char because int might match the return type of a gcc2
9765 builtin and then its argument prototype would still apply. */
ba479fd2
NN
9766char exc_resume ();
9767int
9768main ()
9769{
b61ff9c8 9770exc_resume ();
ba479fd2
NN
9771 ;
9772 return 0;
9773}
9774_ACEOF
b61ff9c8
BS
9775rm -f conftest.$ac_objext conftest$ac_exeext
9776if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9777 (eval $ac_link) 2>conftest.er1
ba479fd2 9778 ac_status=$?
86da66b5
HPN
9779 grep -v '^ *+' conftest.er1 >conftest.err
9780 rm -f conftest.er1
9781 cat conftest.err >&5
ba479fd2 9782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9783 (exit $ac_status); } &&
9784 { ac_try='test -z "$ac_c_werror_flag"
9785 || test ! -s conftest.err'
9786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9787 (eval $ac_try) 2>&5
9788 ac_status=$?
9789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9790 (exit $ac_status); }; } &&
9791 { ac_try='test -s conftest$ac_exeext'
9792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9793 (eval $ac_try) 2>&5
9794 ac_status=$?
9795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9796 (exit $ac_status); }; }; then
9797 ac_cv_search_exc_resume="none required"
7f2749d4 9798else
ba479fd2
NN
9799 echo "$as_me: failed program was:" >&5
9800sed 's/^/| /' conftest.$ac_ext >&5
9801
ab22c1fa 9802fi
b61ff9c8
BS
9803rm -f conftest.err conftest.$ac_objext \
9804 conftest$ac_exeext conftest.$ac_ext
9805if test "$ac_cv_search_exc_resume" = no; then
9806 for ac_lib in exc; do
9807 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9808 cat >conftest.$ac_ext <<_ACEOF
9809/* confdefs.h. */
9810_ACEOF
9811cat confdefs.h >>conftest.$ac_ext
9812cat >>conftest.$ac_ext <<_ACEOF
9813/* end confdefs.h. */
2f41c1d6 9814
b61ff9c8
BS
9815/* Override any gcc2 internal prototype to avoid an error. */
9816#ifdef __cplusplus
9817extern "C"
9818#endif
9819/* We use char because int might match the return type of a gcc2
9820 builtin and then its argument prototype would still apply. */
9821char exc_resume ();
9822int
9823main ()
9824{
9825exc_resume ();
9826 ;
9827 return 0;
9828}
9829_ACEOF
9830rm -f conftest.$ac_objext conftest$ac_exeext
9831if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9832 (eval $ac_link) 2>conftest.er1
9833 ac_status=$?
9834 grep -v '^ *+' conftest.er1 >conftest.err
9835 rm -f conftest.er1
9836 cat conftest.err >&5
9837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9838 (exit $ac_status); } &&
9839 { ac_try='test -z "$ac_c_werror_flag"
9840 || test ! -s conftest.err'
9841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9842 (eval $ac_try) 2>&5
9843 ac_status=$?
9844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9845 (exit $ac_status); }; } &&
9846 { ac_try='test -s conftest$ac_exeext'
9847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9848 (eval $ac_try) 2>&5
9849 ac_status=$?
9850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9851 (exit $ac_status); }; }; then
9852 ac_cv_search_exc_resume="-l$ac_lib"
9853break
1a4b763e 9854else
b61ff9c8
BS
9855 echo "$as_me: failed program was:" >&5
9856sed 's/^/| /' conftest.$ac_ext >&5
9857
9858fi
9859rm -f conftest.err conftest.$ac_objext \
9860 conftest$ac_exeext conftest.$ac_ext
9861 done
b8ec3cc8 9862fi
b8ec3cc8
EC
9863LIBS=$ac_func_search_save_LIBS
9864fi
b61ff9c8
BS
9865echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
9866echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
9867if test "$ac_cv_search_exc_resume" != no; then
9868 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
b8ec3cc8
EC
9869
9870fi
9871
dd7f7a6e 9872GNAT_LIBEXC="$LIBS"
b8ec3cc8
EC
9873LIBS="$save_LIBS"
9874
9875
dd7f7a6e
EC
9876# Some systems put ldexp and frexp in libm instead of libc; assume
9877# they're both in the same place. jcf-dump needs them.
9878save_LIBS="$LIBS"
9879LIBS=
b61ff9c8
BS
9880echo "$as_me:$LINENO: checking for library containing ldexp" >&5
9881echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
dd7f7a6e 9882if test "${ac_cv_search_ldexp+set}" = set; then
b8ec3cc8
EC
9883 echo $ECHO_N "(cached) $ECHO_C" >&6
9884else
dd7f7a6e 9885 ac_func_search_save_LIBS=$LIBS
b61ff9c8 9886ac_cv_search_ldexp=no
dd7f7a6e 9887cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9888/* confdefs.h. */
9889_ACEOF
9890cat confdefs.h >>conftest.$ac_ext
9891cat >>conftest.$ac_ext <<_ACEOF
9892/* end confdefs.h. */
dd7f7a6e 9893
b61ff9c8 9894/* Override any gcc2 internal prototype to avoid an error. */
dd7f7a6e
EC
9895#ifdef __cplusplus
9896extern "C"
9897#endif
b61ff9c8
BS
9898/* We use char because int might match the return type of a gcc2
9899 builtin and then its argument prototype would still apply. */
dd7f7a6e 9900char ldexp ();
ba479fd2
NN
9901int
9902main ()
9903{
b61ff9c8 9904ldexp ();
ba479fd2
NN
9905 ;
9906 return 0;
9907}
9908_ACEOF
b61ff9c8
BS
9909rm -f conftest.$ac_objext conftest$ac_exeext
9910if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9911 (eval $ac_link) 2>conftest.er1
dd7f7a6e
EC
9912 ac_status=$?
9913 grep -v '^ *+' conftest.er1 >conftest.err
9914 rm -f conftest.er1
9915 cat conftest.err >&5
9916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9917 (exit $ac_status); } &&
9918 { ac_try='test -z "$ac_c_werror_flag"
9919 || test ! -s conftest.err'
9920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9921 (eval $ac_try) 2>&5
9922 ac_status=$?
9923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9924 (exit $ac_status); }; } &&
9925 { ac_try='test -s conftest$ac_exeext'
9926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9927 (eval $ac_try) 2>&5
9928 ac_status=$?
9929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9930 (exit $ac_status); }; }; then
9931 ac_cv_search_ldexp="none required"
dd7f7a6e
EC
9932else
9933 echo "$as_me: failed program was:" >&5
9934sed 's/^/| /' conftest.$ac_ext >&5
9935
1a4b763e 9936fi
b61ff9c8
BS
9937rm -f conftest.err conftest.$ac_objext \
9938 conftest$ac_exeext conftest.$ac_ext
9939if test "$ac_cv_search_ldexp" = no; then
9940 for ac_lib in m; do
9941 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9942 cat >conftest.$ac_ext <<_ACEOF
9943/* confdefs.h. */
9944_ACEOF
9945cat confdefs.h >>conftest.$ac_ext
9946cat >>conftest.$ac_ext <<_ACEOF
9947/* end confdefs.h. */
2f41c1d6 9948
b61ff9c8
BS
9949/* Override any gcc2 internal prototype to avoid an error. */
9950#ifdef __cplusplus
9951extern "C"
9952#endif
9953/* We use char because int might match the return type of a gcc2
9954 builtin and then its argument prototype would still apply. */
9955char ldexp ();
9956int
9957main ()
9958{
9959ldexp ();
9960 ;
9961 return 0;
9962}
9963_ACEOF
9964rm -f conftest.$ac_objext conftest$ac_exeext
9965if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9966 (eval $ac_link) 2>conftest.er1
9967 ac_status=$?
9968 grep -v '^ *+' conftest.er1 >conftest.err
9969 rm -f conftest.er1
9970 cat conftest.err >&5
9971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9972 (exit $ac_status); } &&
9973 { ac_try='test -z "$ac_c_werror_flag"
9974 || test ! -s conftest.err'
9975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9976 (eval $ac_try) 2>&5
9977 ac_status=$?
9978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9979 (exit $ac_status); }; } &&
9980 { ac_try='test -s conftest$ac_exeext'
9981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9982 (eval $ac_try) 2>&5
9983 ac_status=$?
9984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9985 (exit $ac_status); }; }; then
9986 ac_cv_search_ldexp="-l$ac_lib"
9987break
1a4b763e 9988else
b61ff9c8
BS
9989 echo "$as_me: failed program was:" >&5
9990sed 's/^/| /' conftest.$ac_ext >&5
9991
9992fi
9993rm -f conftest.err conftest.$ac_objext \
9994 conftest$ac_exeext conftest.$ac_ext
9995 done
dd7f7a6e
EC
9996fi
9997LIBS=$ac_func_search_save_LIBS
9998fi
b61ff9c8
BS
9999echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
10000echo "${ECHO_T}$ac_cv_search_ldexp" >&6
10001if test "$ac_cv_search_ldexp" != no; then
10002 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
dd7f7a6e
EC
10003
10004fi
10005
10006LDEXP_LIB="$LIBS"
10007LIBS="$save_LIBS"
10008
10009
10010# Use <inttypes.h> only if it exists,
10011# doesn't clash with <sys/types.h>, and declares intmax_t.
b61ff9c8
BS
10012echo "$as_me:$LINENO: checking for inttypes.h" >&5
10013echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
dd7f7a6e
EC
10014if test "${gcc_cv_header_inttypes_h+set}" = set; then
10015 echo $ECHO_N "(cached) $ECHO_C" >&6
10016else
10017 cat >conftest.$ac_ext <<_ACEOF
10018/* confdefs.h. */
10019_ACEOF
10020cat confdefs.h >>conftest.$ac_ext
10021cat >>conftest.$ac_ext <<_ACEOF
10022/* end confdefs.h. */
10023#include <sys/types.h>
10024#include <inttypes.h>
10025int
10026main ()
10027{
10028intmax_t i = -1;
10029 ;
10030 return 0;
10031}
10032_ACEOF
10033rm -f conftest.$ac_objext
b61ff9c8
BS
10034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10035 (eval $ac_compile) 2>conftest.er1
dd7f7a6e
EC
10036 ac_status=$?
10037 grep -v '^ *+' conftest.er1 >conftest.err
10038 rm -f conftest.er1
10039 cat conftest.err >&5
10040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10041 (exit $ac_status); } &&
10042 { ac_try='test -z "$ac_c_werror_flag"
10043 || test ! -s conftest.err'
10044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10045 (eval $ac_try) 2>&5
10046 ac_status=$?
10047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10048 (exit $ac_status); }; } &&
10049 { ac_try='test -s conftest.$ac_objext'
10050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10051 (eval $ac_try) 2>&5
10052 ac_status=$?
10053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10054 (exit $ac_status); }; }; then
dd7f7a6e
EC
10055 gcc_cv_header_inttypes_h=yes
10056else
10057 echo "$as_me: failed program was:" >&5
10058sed 's/^/| /' conftest.$ac_ext >&5
10059
b61ff9c8 10060gcc_cv_header_inttypes_h=no
dd7f7a6e 10061fi
b61ff9c8 10062rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e
EC
10063fi
10064
b61ff9c8
BS
10065echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
10066echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
dd7f7a6e
EC
10067if test $gcc_cv_header_inttypes_h = yes; then
10068
10069cat >>confdefs.h <<\_ACEOF
10070#define HAVE_INTTYPES_H 1
10071_ACEOF
10072
0056a9b5 10073fi
956d6950 10074
c149cc37 10075
ba479fd2
NN
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
0d667716
KG
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
ba479fd2
NN
10104
10105
10106
10107
10108
10109
10110
10111
52a6edcc 10112for ac_func in times clock kill getrlimit setrlimit atoll atoq \
0d667716
KG
10113 sysconf strsignal getrusage nl_langinfo scandir alphasort \
10114 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
10115 clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
956d6950 10116do
ba479fd2 10117as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b61ff9c8
BS
10118echo "$as_me:$LINENO: checking for $ac_func" >&5
10119echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10120if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
10121 echo $ECHO_N "(cached) $ECHO_C" >&6
10122else
10123 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10124/* confdefs.h. */
10125_ACEOF
10126cat confdefs.h >>conftest.$ac_ext
10127cat >>conftest.$ac_ext <<_ACEOF
10128/* end confdefs.h. */
86da66b5
HPN
10129/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10130 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10131#define $ac_func innocuous_$ac_func
10132
956d6950 10133/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10134 which can conflict with char $ac_func (); below.
10135 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10136 <limits.h> exists even on freestanding compilers. */
86da66b5 10137
ba479fd2
NN
10138#ifdef __STDC__
10139# include <limits.h>
10140#else
10141# include <assert.h>
10142#endif
86da66b5
HPN
10143
10144#undef $ac_func
10145
b61ff9c8 10146/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10147#ifdef __cplusplus
10148extern "C"
b61ff9c8 10149{
ba479fd2 10150#endif
b61ff9c8
BS
10151/* We use char because int might match the return type of a gcc2
10152 builtin and then its argument prototype would still apply. */
ba479fd2 10153char $ac_func ();
956d6950
JL
10154/* The GNU C library defines this for functions which it implements
10155 to always fail with ENOSYS. Some functions are actually named
10156 something starting with __ and the normal name is an alias. */
b61ff9c8 10157#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
956d6950 10158choke me
b61ff9c8
BS
10159#else
10160char (*f) () = $ac_func;
10161#endif
10162#ifdef __cplusplus
10163}
956d6950
JL
10164#endif
10165
ba479fd2
NN
10166int
10167main ()
10168{
b61ff9c8 10169return f != $ac_func;
ba479fd2
NN
10170 ;
10171 return 0;
10172}
10173_ACEOF
10174rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
10175if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10176 (eval $ac_link) 2>conftest.er1
ba479fd2 10177 ac_status=$?
86da66b5
HPN
10178 grep -v '^ *+' conftest.er1 >conftest.err
10179 rm -f conftest.er1
10180 cat conftest.err >&5
ba479fd2 10181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10182 (exit $ac_status); } &&
10183 { ac_try='test -z "$ac_c_werror_flag"
10184 || test ! -s conftest.err'
10185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10186 (eval $ac_try) 2>&5
10187 ac_status=$?
10188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10189 (exit $ac_status); }; } &&
10190 { ac_try='test -s conftest$ac_exeext'
10191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10192 (eval $ac_try) 2>&5
10193 ac_status=$?
10194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10195 (exit $ac_status); }; }; then
ba479fd2
NN
10196 eval "$as_ac_var=yes"
10197else
10198 echo "$as_me: failed program was:" >&5
10199sed 's/^/| /' conftest.$ac_ext >&5
10200
b61ff9c8 10201eval "$as_ac_var=no"
ba479fd2 10202fi
b61ff9c8 10203rm -f conftest.err conftest.$ac_objext \
86da66b5 10204 conftest$ac_exeext conftest.$ac_ext
ba479fd2 10205fi
b61ff9c8
BS
10206echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10207echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
10208if test `eval echo '${'$as_ac_var'}'` = yes; then
10209 cat >>confdefs.h <<_ACEOF
10210#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10211_ACEOF
956d6950 10212
956d6950
JL
10213fi
10214done
10215
6885fc87 10216
39f6c4c8 10217if test x$ac_cv_func_mbstowcs = xyes; then
b61ff9c8
BS
10218 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
10219echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
ba479fd2
NN
10220if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
10221 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
10222else
10223 if test "$cross_compiling" = yes; then
10224 gcc_cv_func_mbstowcs_works=yes
10225else
ba479fd2 10226 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10227/* confdefs.h. */
10228_ACEOF
10229cat confdefs.h >>conftest.$ac_ext
10230cat >>conftest.$ac_ext <<_ACEOF
10231/* end confdefs.h. */
39f6c4c8
KW
10232#include <stdlib.h>
10233int main()
10234{
10235 mbstowcs(0, "", 0);
10236 return 0;
10237}
ba479fd2
NN
10238_ACEOF
10239rm -f conftest$ac_exeext
b61ff9c8
BS
10240if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10241 (eval $ac_link) 2>&5
ba479fd2
NN
10242 ac_status=$?
10243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10244 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
10245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10246 (eval $ac_try) 2>&5
ba479fd2
NN
10247 ac_status=$?
10248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10249 (exit $ac_status); }; }; then
39f6c4c8
KW
10250 gcc_cv_func_mbstowcs_works=yes
10251else
ba479fd2
NN
10252 echo "$as_me: program exited with status $ac_status" >&5
10253echo "$as_me: failed program was:" >&5
10254sed 's/^/| /' conftest.$ac_ext >&5
10255
10256( exit $ac_status )
10257gcc_cv_func_mbstowcs_works=no
39f6c4c8 10258fi
b61ff9c8 10259rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 10260fi
39f6c4c8 10261fi
b61ff9c8
BS
10262echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
10263echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 10264 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
10265
10266cat >>confdefs.h <<\_ACEOF
39f6c4c8 10267#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 10268_ACEOF
39f6c4c8
KW
10269
10270 fi
10271fi
10272
b61ff9c8
BS
10273echo "$as_me:$LINENO: checking for ssize_t" >&5
10274echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
ba479fd2
NN
10275if test "${ac_cv_type_ssize_t+set}" = set; then
10276 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 10277else
ba479fd2 10278 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10279/* confdefs.h. */
10280_ACEOF
10281cat confdefs.h >>conftest.$ac_ext
10282cat >>conftest.$ac_ext <<_ACEOF
10283/* end confdefs.h. */
8b4fc07a
NN
10284$ac_includes_default
10285int
10286main ()
10287{
b61ff9c8 10288if ((ssize_t *) 0)
8b4fc07a 10289 return 0;
b61ff9c8 10290if (sizeof (ssize_t))
8b4fc07a
NN
10291 return 0;
10292 ;
10293 return 0;
10294}
ba479fd2 10295_ACEOF
8b4fc07a 10296rm -f conftest.$ac_objext
b61ff9c8
BS
10297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10298 (eval $ac_compile) 2>conftest.er1
8b4fc07a 10299 ac_status=$?
86da66b5
HPN
10300 grep -v '^ *+' conftest.er1 >conftest.err
10301 rm -f conftest.er1
10302 cat conftest.err >&5
8b4fc07a 10303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10304 (exit $ac_status); } &&
10305 { ac_try='test -z "$ac_c_werror_flag"
10306 || test ! -s conftest.err'
10307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10308 (eval $ac_try) 2>&5
10309 ac_status=$?
10310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10311 (exit $ac_status); }; } &&
10312 { ac_try='test -s conftest.$ac_objext'
10313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10314 (eval $ac_try) 2>&5
10315 ac_status=$?
10316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10317 (exit $ac_status); }; }; then
cb65112a 10318 ac_cv_type_ssize_t=yes
f12bc141 10319else
8b4fc07a
NN
10320 echo "$as_me: failed program was:" >&5
10321sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10322
b61ff9c8 10323ac_cv_type_ssize_t=no
8b4fc07a 10324fi
b61ff9c8 10325rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10326fi
b61ff9c8
BS
10327echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
10328echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
10329if test $ac_cv_type_ssize_t = yes; then
10330 :
10331else
ba479fd2 10332
8b4fc07a 10333cat >>confdefs.h <<_ACEOF
f12bc141 10334#define ssize_t int
ba479fd2 10335_ACEOF
f12bc141
ZW
10336
10337fi
10338
0b9d02c6 10339
e256b8b6
DA
10340# Try to determine the array type of the second argument of getgroups
10341# for the target system (int or gid_t).
b61ff9c8
BS
10342echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
10343echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
ba479fd2
NN
10344if test "${ac_cv_type_uid_t+set}" = set; then
10345 echo $ECHO_N "(cached) $ECHO_C" >&6
10346else
10347 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10348/* confdefs.h. */
10349_ACEOF
10350cat confdefs.h >>conftest.$ac_ext
10351cat >>conftest.$ac_ext <<_ACEOF
10352/* end confdefs.h. */
e256b8b6 10353#include <sys/types.h>
ba479fd2
NN
10354
10355_ACEOF
e256b8b6 10356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 10357 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
10358 ac_cv_type_uid_t=yes
10359else
e256b8b6
DA
10360 ac_cv_type_uid_t=no
10361fi
10362rm -f conftest*
10363
10364fi
b61ff9c8
BS
10365echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
10366echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 10367if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
10368
10369cat >>confdefs.h <<\_ACEOF
e256b8b6 10370#define uid_t int
ba479fd2 10371_ACEOF
cafe096b 10372
ba479fd2
NN
10373
10374cat >>confdefs.h <<\_ACEOF
e256b8b6 10375#define gid_t int
ba479fd2 10376_ACEOF
e256b8b6
DA
10377
10378fi
10379
b61ff9c8
BS
10380echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
10381echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
ba479fd2
NN
10382if test "${ac_cv_type_getgroups+set}" = set; then
10383 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
10384else
10385 if test "$cross_compiling" = yes; then
10386 ac_cv_type_getgroups=cross
10387else
ba479fd2 10388 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10389/* confdefs.h. */
10390_ACEOF
10391cat confdefs.h >>conftest.$ac_ext
10392cat >>conftest.$ac_ext <<_ACEOF
10393/* end confdefs.h. */
e256b8b6 10394/* Thanks to Mike Rendell for this test. */
b61ff9c8 10395#include <sys/types.h>
e256b8b6
DA
10396#define NGID 256
10397#undef MAX
10398#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
10399
10400int
10401main ()
e256b8b6
DA
10402{
10403 gid_t gidset[NGID];
10404 int i, n;
b61ff9c8 10405 union { gid_t gval; long lval; } val;
e256b8b6
DA
10406
10407 val.lval = -1;
10408 for (i = 0; i < NGID; i++)
10409 gidset[i] = val.gval;
10410 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 10411 gidset);
e256b8b6 10412 /* Exit non-zero if getgroups seems to require an array of ints. This
b61ff9c8
BS
10413 happens when gid_t is short but getgroups modifies an array of ints. */
10414 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 10415}
ba479fd2
NN
10416_ACEOF
10417rm -f conftest$ac_exeext
b61ff9c8
BS
10418if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10419 (eval $ac_link) 2>&5
ba479fd2
NN
10420 ac_status=$?
10421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10422 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
10423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10424 (eval $ac_try) 2>&5
ba479fd2
NN
10425 ac_status=$?
10426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10427 (exit $ac_status); }; }; then
10428 ac_cv_type_getgroups=gid_t
63cf211a 10429else
ba479fd2
NN
10430 echo "$as_me: program exited with status $ac_status" >&5
10431echo "$as_me: failed program was:" >&5
10432sed 's/^/| /' conftest.$ac_ext >&5
10433
10434( exit $ac_status )
10435ac_cv_type_getgroups=int
e256b8b6 10436fi
b61ff9c8 10437rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 10438fi
e256b8b6 10439if test $ac_cv_type_getgroups = cross; then
ba479fd2 10440 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10441/* confdefs.h. */
10442_ACEOF
10443cat confdefs.h >>conftest.$ac_ext
10444cat >>conftest.$ac_ext <<_ACEOF
10445/* end confdefs.h. */
e256b8b6 10446#include <unistd.h>
ba479fd2
NN
10447
10448_ACEOF
e256b8b6 10449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 10450 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
10451 ac_cv_type_getgroups=gid_t
10452else
e256b8b6
DA
10453 ac_cv_type_getgroups=int
10454fi
10455rm -f conftest*
10456
10457fi
10458fi
b61ff9c8
BS
10459echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
10460echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 10461
ba479fd2 10462cat >>confdefs.h <<_ACEOF
e256b8b6 10463#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 10464_ACEOF
e256b8b6
DA
10465
10466
10467if test "${target}" = "${build}"; then
10468 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
10469else
10470 case "${target}" in
10471 # This condition may need some tweaking. It should include all
10472 # targets where the array type of the second argument of getgroups
10473 # is int and the type of gid_t is not equivalent to int.
10474 *-*-sunos* | *-*-ultrix*)
10475 TARGET_GETGROUPS_T=int
10476 ;;
10477 *)
10478 TARGET_GETGROUPS_T=gid_t
10479 ;;
10480 esac
10481fi
10482
10483
3b0727a0 10484
b61ff9c8
BS
10485echo "$as_me:$LINENO: checking for sys/mman.h" >&5
10486echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
3b0727a0
MR
10487if test "${ac_cv_header_sys_mman_h+set}" = set; then
10488 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10489else
18fc9bd4 10490 cat >conftest.$ac_ext <<_ACEOF
3b0727a0
MR
10491/* confdefs.h. */
10492_ACEOF
10493cat confdefs.h >>conftest.$ac_ext
10494cat >>conftest.$ac_ext <<_ACEOF
10495/* end confdefs.h. */
10496#include <sys/mman.h>
10497_ACEOF
b61ff9c8
BS
10498if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10499 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3b0727a0
MR
10500 ac_status=$?
10501 grep -v '^ *+' conftest.er1 >conftest.err
10502 rm -f conftest.er1
10503 cat conftest.err >&5
10504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10505 (exit $ac_status); } >/dev/null; then
10506 if test -s conftest.err; then
10507 ac_cpp_err=$ac_c_preproc_warn_flag
10508 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10509 else
10510 ac_cpp_err=
10511 fi
10512else
10513 ac_cpp_err=yes
10514fi
10515if test -z "$ac_cpp_err"; then
10516 ac_cv_header_sys_mman_h=yes
10517else
3b0727a0
MR
10518 echo "$as_me: failed program was:" >&5
10519sed 's/^/| /' conftest.$ac_ext >&5
10520
18fc9bd4 10521 ac_cv_header_sys_mman_h=no
3b0727a0
MR
10522fi
10523rm -f conftest.err conftest.$ac_ext
10524fi
b61ff9c8
BS
10525echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
10526echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
3b0727a0
MR
10527if test $ac_cv_header_sys_mman_h = yes; then
10528 gcc_header_sys_mman_h=yes
10529else
10530 gcc_header_sys_mman_h=no
10531fi
10532
b61ff9c8
BS
10533echo "$as_me:$LINENO: checking for mmap" >&5
10534echo $ECHO_N "checking for mmap... $ECHO_C" >&6
3b0727a0
MR
10535if test "${ac_cv_func_mmap+set}" = set; then
10536 echo $ECHO_N "(cached) $ECHO_C" >&6
10537else
10538 cat >conftest.$ac_ext <<_ACEOF
10539/* confdefs.h. */
10540_ACEOF
10541cat confdefs.h >>conftest.$ac_ext
10542cat >>conftest.$ac_ext <<_ACEOF
10543/* end confdefs.h. */
10544/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
10545 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10546#define mmap innocuous_mmap
10547
10548/* System header to define __stub macros and hopefully few prototypes,
10549 which can conflict with char mmap (); below.
10550 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10551 <limits.h> exists even on freestanding compilers. */
10552
10553#ifdef __STDC__
10554# include <limits.h>
10555#else
10556# include <assert.h>
10557#endif
10558
10559#undef mmap
10560
b61ff9c8 10561/* Override any gcc2 internal prototype to avoid an error. */
3b0727a0
MR
10562#ifdef __cplusplus
10563extern "C"
b61ff9c8 10564{
3b0727a0 10565#endif
b61ff9c8
BS
10566/* We use char because int might match the return type of a gcc2
10567 builtin and then its argument prototype would still apply. */
3b0727a0
MR
10568char mmap ();
10569/* The GNU C library defines this for functions which it implements
10570 to always fail with ENOSYS. Some functions are actually named
10571 something starting with __ and the normal name is an alias. */
b61ff9c8 10572#if defined (__stub_mmap) || defined (__stub___mmap)
3b0727a0 10573choke me
b61ff9c8
BS
10574#else
10575char (*f) () = mmap;
10576#endif
10577#ifdef __cplusplus
10578}
3b0727a0
MR
10579#endif
10580
10581int
10582main ()
10583{
b61ff9c8 10584return f != mmap;
3b0727a0
MR
10585 ;
10586 return 0;
10587}
10588_ACEOF
10589rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
10590if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10591 (eval $ac_link) 2>conftest.er1
3b0727a0
MR
10592 ac_status=$?
10593 grep -v '^ *+' conftest.er1 >conftest.err
10594 rm -f conftest.er1
10595 cat conftest.err >&5
10596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10597 (exit $ac_status); } &&
10598 { ac_try='test -z "$ac_c_werror_flag"
10599 || test ! -s conftest.err'
10600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10601 (eval $ac_try) 2>&5
10602 ac_status=$?
10603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10604 (exit $ac_status); }; } &&
10605 { ac_try='test -s conftest$ac_exeext'
10606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10607 (eval $ac_try) 2>&5
10608 ac_status=$?
10609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10610 (exit $ac_status); }; }; then
8b1f719a
PB
10611 ac_cv_func_mmap=yes
10612else
10613 echo "$as_me: failed program was:" >&5
10614sed 's/^/| /' conftest.$ac_ext >&5
a6ccdbab 10615
b61ff9c8 10616ac_cv_func_mmap=no
8b1f719a 10617fi
b61ff9c8 10618rm -f conftest.err conftest.$ac_objext \
3b0727a0
MR
10619 conftest$ac_exeext conftest.$ac_ext
10620fi
b61ff9c8
BS
10621echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
10622echo "${ECHO_T}$ac_cv_func_mmap" >&6
3b0727a0
MR
10623if test $ac_cv_func_mmap = yes; then
10624 gcc_func_mmap=yes
10625else
10626 gcc_func_mmap=no
10627fi
10628
10629if test "$gcc_header_sys_mman_h" != yes \
10630 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
10631 gcc_cv_func_mmap_file=no
10632 gcc_cv_func_mmap_dev_zero=no
10633 gcc_cv_func_mmap_anon=no
10634else
b61ff9c8
BS
10635 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
10636echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
ba479fd2
NN
10637if test "${gcc_cv_func_mmap_file+set}" = set; then
10638 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 10639else
ba479fd2 10640 # Add a system to this blacklist if
1072ec3f
ZW
10641 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
10642 # memory area containing the same data that you'd get if you applied
10643 # read() to the same fd. The only system known to have a problem here
10644 # is VMS, where text files have record structure.
10645 case "$host_os" in
ba479fd2 10646 vms* | ultrix*)
1072ec3f
ZW
10647 gcc_cv_func_mmap_file=no ;;
10648 *)
10649 gcc_cv_func_mmap_file=yes;;
10650 esac
10651fi
b61ff9c8
BS
10652echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
10653echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
10654 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
10655echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
ba479fd2
NN
10656if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
10657 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
10658else
10659 # Add a system to this blacklist if it has mmap() but /dev/zero
10660 # does not exist, or if mmapping /dev/zero does not give anonymous
10661 # zeroed pages with both the following properties:
10662 # 1. If you map N consecutive pages in with one call, and then
10663 # unmap any subset of those pages, the pages that were not
10664 # explicitly unmapped remain accessible.
10665 # 2. If you map two adjacent blocks of memory and then unmap them
10666 # both at once, they must both go away.
10667 # Systems known to be in this category are Windows (all variants),
10668 # VMS, and Darwin.
10669 case "$host_os" in
2ce240d3 10670 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
10671 gcc_cv_func_mmap_dev_zero=no ;;
10672 *)
10673 gcc_cv_func_mmap_dev_zero=yes;;
10674 esac
10675fi
b61ff9c8
BS
10676echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
10677echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
10678
10679 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
b61ff9c8
BS
10680 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
10681echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
ba479fd2
NN
10682if test "${gcc_cv_decl_map_anon+set}" = set; then
10683 echo $ECHO_N "(cached) $ECHO_C" >&6
10684else
10685 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10686/* confdefs.h. */
10687_ACEOF
10688cat confdefs.h >>conftest.$ac_ext
10689cat >>conftest.$ac_ext <<_ACEOF
10690/* end confdefs.h. */
1072ec3f
ZW
10691#include <sys/types.h>
10692#include <sys/mman.h>
10693#include <unistd.h>
10694
10695#ifndef MAP_ANONYMOUS
10696#define MAP_ANONYMOUS MAP_ANON
10697#endif
10698
ba479fd2
NN
10699int
10700main ()
10701{
1072ec3f 10702int n = MAP_ANONYMOUS;
ba479fd2
NN
10703 ;
10704 return 0;
10705}
10706_ACEOF
10707rm -f conftest.$ac_objext
b61ff9c8
BS
10708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10709 (eval $ac_compile) 2>conftest.er1
ba479fd2 10710 ac_status=$?
86da66b5
HPN
10711 grep -v '^ *+' conftest.er1 >conftest.err
10712 rm -f conftest.er1
10713 cat conftest.err >&5
ba479fd2 10714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10715 (exit $ac_status); } &&
10716 { ac_try='test -z "$ac_c_werror_flag"
10717 || test ! -s conftest.err'
10718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10719 (eval $ac_try) 2>&5
10720 ac_status=$?
10721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10722 (exit $ac_status); }; } &&
10723 { ac_try='test -s conftest.$ac_objext'
10724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10725 (eval $ac_try) 2>&5
10726 ac_status=$?
10727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10728 (exit $ac_status); }; }; then
1072ec3f
ZW
10729 gcc_cv_decl_map_anon=yes
10730else
ba479fd2
NN
10731 echo "$as_me: failed program was:" >&5
10732sed 's/^/| /' conftest.$ac_ext >&5
10733
b61ff9c8 10734gcc_cv_decl_map_anon=no
1072ec3f 10735fi
b61ff9c8 10736rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 10737fi
b61ff9c8
BS
10738echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
10739echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
10740
10741 if test $gcc_cv_decl_map_anon = no; then
10742 gcc_cv_func_mmap_anon=no
10743 else
b61ff9c8
BS
10744 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
10745echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
ba479fd2
NN
10746if test "${gcc_cv_func_mmap_anon+set}" = set; then
10747 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
10748else
10749 # Add a system to this blacklist if it has mmap() and MAP_ANON or
10750 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
10751 # doesn't give anonymous zeroed pages with the same properties listed
10752 # above for use of /dev/zero.
10753 # Systems known to be in this category are Windows, VMS, and SCO Unix.
10754 case "$host_os" in
10755 vms* | cygwin* | pe | mingw* | sco* | udk* )
10756 gcc_cv_func_mmap_anon=no ;;
10757 *)
10758 gcc_cv_func_mmap_anon=yes;;
10759 esac
10760fi
b61ff9c8
BS
10761echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
10762echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
10763 fi
10764fi
10765
10766if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
10767
10768cat >>confdefs.h <<\_ACEOF
1072ec3f 10769#define HAVE_MMAP_FILE 1
ba479fd2 10770_ACEOF
1072ec3f
ZW
10771
10772fi
10773if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
10774
10775cat >>confdefs.h <<\_ACEOF
1072ec3f 10776#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 10777_ACEOF
1072ec3f
ZW
10778
10779fi
10780if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
10781
10782cat >>confdefs.h <<\_ACEOF
1072ec3f 10783#define HAVE_MMAP_ANON 1
ba479fd2 10784_ACEOF
1072ec3f
ZW
10785
10786fi
10787
b27d2bd5
MK
10788
10789case "${host}" in
ee262b6f 10790*-*-*vms*)
ba479fd2 10791 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
10792 # won't work, and it isn't easily adaptable. It makes more sense to
10793 # just force it.
10794 ac_cv_func_vfork_works=yes
10795 ;;
b27d2bd5 10796esac
b61ff9c8
BS
10797echo "$as_me:$LINENO: checking for pid_t" >&5
10798echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
ba479fd2
NN
10799if test "${ac_cv_type_pid_t+set}" = set; then
10800 echo $ECHO_N "(cached) $ECHO_C" >&6
10801else
10802 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10803/* confdefs.h. */
10804_ACEOF
10805cat confdefs.h >>conftest.$ac_ext
10806cat >>conftest.$ac_ext <<_ACEOF
10807/* end confdefs.h. */
10808$ac_includes_default
10809int
10810main ()
10811{
b61ff9c8 10812if ((pid_t *) 0)
ba479fd2 10813 return 0;
b61ff9c8 10814if (sizeof (pid_t))
ba479fd2
NN
10815 return 0;
10816 ;
10817 return 0;
10818}
10819_ACEOF
10820rm -f conftest.$ac_objext
b61ff9c8
BS
10821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10822 (eval $ac_compile) 2>conftest.er1
ba479fd2 10823 ac_status=$?
86da66b5
HPN
10824 grep -v '^ *+' conftest.er1 >conftest.err
10825 rm -f conftest.er1
10826 cat conftest.err >&5
ba479fd2 10827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10828 (exit $ac_status); } &&
10829 { ac_try='test -z "$ac_c_werror_flag"
10830 || test ! -s conftest.err'
10831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10832 (eval $ac_try) 2>&5
10833 ac_status=$?
10834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10835 (exit $ac_status); }; } &&
10836 { ac_try='test -s conftest.$ac_objext'
10837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10838 (eval $ac_try) 2>&5
10839 ac_status=$?
10840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10841 (exit $ac_status); }; }; then
cb65112a 10842 ac_cv_type_pid_t=yes
c375c43b 10843else
ba479fd2
NN
10844 echo "$as_me: failed program was:" >&5
10845sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10846
b61ff9c8 10847ac_cv_type_pid_t=no
ba479fd2 10848fi
b61ff9c8 10849rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10850fi
b61ff9c8
BS
10851echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10852echo "${ECHO_T}$ac_cv_type_pid_t" >&6
ba479fd2
NN
10853if test $ac_cv_type_pid_t = yes; then
10854 :
10855else
10856
10857cat >>confdefs.h <<_ACEOF
c375c43b 10858#define pid_t int
ba479fd2 10859_ACEOF
c375c43b
KG
10860
10861fi
10862
ba479fd2 10863
b61ff9c8
BS
10864
10865for ac_header in unistd.h vfork.h
ba479fd2
NN
10866do
10867as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b61ff9c8
BS
10868echo "$as_me:$LINENO: checking for $ac_header" >&5
10869echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10870if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 10871 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10872else
18fc9bd4 10873 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10874/* confdefs.h. */
10875_ACEOF
10876cat confdefs.h >>conftest.$ac_ext
10877cat >>conftest.$ac_ext <<_ACEOF
10878/* end confdefs.h. */
10879#include <$ac_header>
10880_ACEOF
b61ff9c8
BS
10881if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10882 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
10883 ac_status=$?
10884 grep -v '^ *+' conftest.er1 >conftest.err
10885 rm -f conftest.er1
10886 cat conftest.err >&5
10887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10888 (exit $ac_status); } >/dev/null; then
10889 if test -s conftest.err; then
10890 ac_cpp_err=$ac_c_preproc_warn_flag
10891 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10892 else
10893 ac_cpp_err=
10894 fi
10895else
10896 ac_cpp_err=yes
10897fi
10898if test -z "$ac_cpp_err"; then
18fc9bd4 10899 eval "$as_ac_Header=yes"
ba479fd2
NN
10900else
10901 echo "$as_me: failed program was:" >&5
10902sed 's/^/| /' conftest.$ac_ext >&5
10903
18fc9bd4 10904 eval "$as_ac_Header=no"
ba479fd2
NN
10905fi
10906rm -f conftest.err conftest.$ac_ext
c375c43b 10907fi
b61ff9c8
BS
10908echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10909echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
10910if test `eval echo '${'$as_ac_Header'}'` = yes; then
10911 cat >>confdefs.h <<_ACEOF
10912#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10913_ACEOF
6e3f3080
NN
10914
10915fi
ba479fd2
NN
10916done
10917
10918
10919
10920for ac_func in fork vfork
10921do
10922as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b61ff9c8
BS
10923echo "$as_me:$LINENO: checking for $ac_func" >&5
10924echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10925if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
10926 echo $ECHO_N "(cached) $ECHO_C" >&6
10927else
10928 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10929/* confdefs.h. */
10930_ACEOF
10931cat confdefs.h >>conftest.$ac_ext
10932cat >>conftest.$ac_ext <<_ACEOF
10933/* end confdefs.h. */
86da66b5
HPN
10934/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10935 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10936#define $ac_func innocuous_$ac_func
10937
c375c43b 10938/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10939 which can conflict with char $ac_func (); below.
10940 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10941 <limits.h> exists even on freestanding compilers. */
86da66b5 10942
ba479fd2
NN
10943#ifdef __STDC__
10944# include <limits.h>
10945#else
10946# include <assert.h>
10947#endif
86da66b5
HPN
10948
10949#undef $ac_func
10950
b61ff9c8 10951/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10952#ifdef __cplusplus
10953extern "C"
b61ff9c8 10954{
ba479fd2 10955#endif
b61ff9c8
BS
10956/* We use char because int might match the return type of a gcc2
10957 builtin and then its argument prototype would still apply. */
ba479fd2 10958char $ac_func ();
c375c43b
KG
10959/* The GNU C library defines this for functions which it implements
10960 to always fail with ENOSYS. Some functions are actually named
10961 something starting with __ and the normal name is an alias. */
b61ff9c8 10962#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b 10963choke me
b61ff9c8
BS
10964#else
10965char (*f) () = $ac_func;
10966#endif
10967#ifdef __cplusplus
10968}
c375c43b
KG
10969#endif
10970
ba479fd2
NN
10971int
10972main ()
10973{
b61ff9c8 10974return f != $ac_func;
ba479fd2
NN
10975 ;
10976 return 0;
10977}
10978_ACEOF
10979rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
10980if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10981 (eval $ac_link) 2>conftest.er1
ba479fd2 10982 ac_status=$?
86da66b5
HPN
10983 grep -v '^ *+' conftest.er1 >conftest.err
10984 rm -f conftest.er1
10985 cat conftest.err >&5
ba479fd2 10986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10987 (exit $ac_status); } &&
10988 { ac_try='test -z "$ac_c_werror_flag"
10989 || test ! -s conftest.err'
10990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10991 (eval $ac_try) 2>&5
10992 ac_status=$?
10993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10994 (exit $ac_status); }; } &&
10995 { ac_try='test -s conftest$ac_exeext'
10996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10997 (eval $ac_try) 2>&5
10998 ac_status=$?
10999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11000 (exit $ac_status); }; }; then
ba479fd2
NN
11001 eval "$as_ac_var=yes"
11002else
11003 echo "$as_me: failed program was:" >&5
11004sed 's/^/| /' conftest.$ac_ext >&5
11005
b61ff9c8 11006eval "$as_ac_var=no"
ba479fd2 11007fi
b61ff9c8 11008rm -f conftest.err conftest.$ac_objext \
86da66b5 11009 conftest$ac_exeext conftest.$ac_ext
ba479fd2 11010fi
b61ff9c8
BS
11011echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11012echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
11013if test `eval echo '${'$as_ac_var'}'` = yes; then
11014 cat >>confdefs.h <<_ACEOF
11015#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11016_ACEOF
11017
c375c43b 11018fi
ba479fd2 11019done
c375c43b 11020
ba479fd2 11021if test "x$ac_cv_func_fork" = xyes; then
b61ff9c8
BS
11022 echo "$as_me:$LINENO: checking for working fork" >&5
11023echo $ECHO_N "checking for working fork... $ECHO_C" >&6
ba479fd2
NN
11024if test "${ac_cv_func_fork_works+set}" = set; then
11025 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 11026else
ba479fd2
NN
11027 if test "$cross_compiling" = yes; then
11028 ac_cv_func_fork_works=cross
11029else
11030 cat >conftest.$ac_ext <<_ACEOF
b61ff9c8
BS
11031/* By Ruediger Kuhlmann. */
11032 #include <sys/types.h>
11033 #if HAVE_UNISTD_H
11034 # include <unistd.h>
11035 #endif
11036 /* Some systems only have a dummy stub for fork() */
11037 int main ()
11038 {
11039 if (fork() < 0)
11040 exit (1);
11041 exit (0);
11042 }
1a4b763e
BS
11043_ACEOF
11044rm -f conftest$ac_exeext
b61ff9c8
BS
11045if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11046 (eval $ac_link) 2>&5
1a4b763e
BS
11047 ac_status=$?
11048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11049 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
11050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11051 (eval $ac_try) 2>&5
ba479fd2
NN
11052 ac_status=$?
11053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11054 (exit $ac_status); }; }; then
11055 ac_cv_func_fork_works=yes
11056else
11057 echo "$as_me: program exited with status $ac_status" >&5
11058echo "$as_me: failed program was:" >&5
11059sed 's/^/| /' conftest.$ac_ext >&5
11060
11061( exit $ac_status )
11062ac_cv_func_fork_works=no
11063fi
b61ff9c8 11064rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
11065fi
11066fi
b61ff9c8
BS
11067echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
11068echo "${ECHO_T}$ac_cv_func_fork_works" >&6
ba479fd2
NN
11069
11070else
11071 ac_cv_func_fork_works=$ac_cv_func_fork
11072fi
11073if test "x$ac_cv_func_fork_works" = xcross; then
11074 case $host in
11075 *-*-amigaos* | *-*-msdosdjgpp*)
11076 # Override, as these systems have only a dummy fork() stub
11077 ac_cv_func_fork_works=no
11078 ;;
11079 *)
11080 ac_cv_func_fork_works=yes
11081 ;;
11082 esac
11083 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11084echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 11085fi
c375c43b 11086ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2 11087if test "x$ac_cv_func_vfork" = xyes; then
b61ff9c8
BS
11088 echo "$as_me:$LINENO: checking for working vfork" >&5
11089echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
ba479fd2
NN
11090if test "${ac_cv_func_vfork_works+set}" = set; then
11091 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 11092else
ba479fd2
NN
11093 if test "$cross_compiling" = yes; then
11094 ac_cv_func_vfork_works=cross
11095else
11096 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11097/* confdefs.h. */
11098_ACEOF
11099cat confdefs.h >>conftest.$ac_ext
11100cat >>conftest.$ac_ext <<_ACEOF
11101/* end confdefs.h. */
c375c43b 11102/* Thanks to Paul Eggert for this test. */
b61ff9c8
BS
11103#include <stdio.h>
11104#include <stdlib.h>
11105#include <sys/types.h>
11106#include <sys/stat.h>
ba479fd2 11107#include <sys/wait.h>
b61ff9c8
BS
11108#if HAVE_UNISTD_H
11109# include <unistd.h>
11110#endif
11111#if HAVE_VFORK_H
ba479fd2 11112# include <vfork.h>
c375c43b
KG
11113#endif
11114/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
11115 argument registers are propagated back to the parent. The compiler
11116 is told about this with #include <vfork.h>, but some compilers
11117 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11118 static variable whose address is put into a register that is
11119 clobbered by the vfork. */
11120static void
c375c43b
KG
11121#ifdef __cplusplus
11122sparc_address_test (int arg)
ba479fd2 11123# else
c375c43b
KG
11124sparc_address_test (arg) int arg;
11125#endif
11126{
11127 static pid_t child;
11128 if (!child) {
11129 child = vfork ();
11130 if (child < 0) {
11131 perror ("vfork");
11132 _exit(2);
11133 }
11134 if (!child) {
11135 arg = getpid();
11136 write(-1, "", 0);
11137 _exit (arg);
11138 }
11139 }
11140}
ba479fd2
NN
11141
11142int
11143main ()
11144{
c375c43b
KG
11145 pid_t parent = getpid ();
11146 pid_t child;
11147
ba479fd2 11148 sparc_address_test (0);
c375c43b
KG
11149
11150 child = vfork ();
11151
11152 if (child == 0) {
ba479fd2
NN
11153 /* Here is another test for sparc vfork register problems. This
11154 test uses lots of local variables, at least as many local
11155 variables as main has allocated so far including compiler
11156 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11157 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11158 reuse the register of parent for one of the local variables,
11159 since it will think that parent can't possibly be used any more
11160 in this routine. Assigning to the local variable will thus
11161 munge parent in the parent process. */
c375c43b
KG
11162 pid_t
11163 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11164 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11165 /* Convince the compiler that p..p7 are live; otherwise, it might
11166 use the same hardware register for all 8 local variables. */
11167 if (p != p1 || p != p2 || p != p3 || p != p4
11168 || p != p5 || p != p6 || p != p7)
11169 _exit(1);
11170
ba479fd2
NN
11171 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11172 from child file descriptors. If the child closes a descriptor
11173 before it execs or exits, this munges the parent's descriptor
11174 as well. Test for this by closing stdout in the child. */
c375c43b
KG
11175 _exit(close(fileno(stdout)) != 0);
11176 } else {
11177 int status;
11178 struct stat st;
11179
11180 while (wait(&status) != child)
11181 ;
b61ff9c8 11182 exit(
c375c43b
KG
11183 /* Was there some problem with vforking? */
11184 child < 0
11185
11186 /* Did the child fail? (This shouldn't happen.) */
11187 || status
11188
11189 /* Did the vfork/compiler bug occur? */
11190 || parent != getpid()
11191
11192 /* Did the file descriptor bug occur? */
11193 || fstat(fileno(stdout), &st) != 0
11194 );
11195 }
11196}
ba479fd2
NN
11197_ACEOF
11198rm -f conftest$ac_exeext
b61ff9c8
BS
11199if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11200 (eval $ac_link) 2>&5
ba479fd2
NN
11201 ac_status=$?
11202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11203 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
11204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11205 (eval $ac_try) 2>&5
ba479fd2
NN
11206 ac_status=$?
11207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11208 (exit $ac_status); }; }; then
c375c43b
KG
11209 ac_cv_func_vfork_works=yes
11210else
ba479fd2
NN
11211 echo "$as_me: program exited with status $ac_status" >&5
11212echo "$as_me: failed program was:" >&5
11213sed 's/^/| /' conftest.$ac_ext >&5
11214
11215( exit $ac_status )
11216ac_cv_func_vfork_works=no
cafe096b 11217fi
b61ff9c8 11218rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 11219fi
ba479fd2 11220fi
b61ff9c8
BS
11221echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
11222echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 11223
ba479fd2
NN
11224fi;
11225if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 11226 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
11227 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11228echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
11229fi
11230
ba479fd2
NN
11231if test "x$ac_cv_func_vfork_works" = xyes; then
11232
11233cat >>confdefs.h <<\_ACEOF
11234#define HAVE_WORKING_VFORK 1
11235_ACEOF
11236
11237else
11238
11239cat >>confdefs.h <<\_ACEOF
c375c43b 11240#define vfork fork
ba479fd2 11241_ACEOF
c375c43b
KG
11242
11243fi
ba479fd2
NN
11244if test "x$ac_cv_func_fork_works" = xyes; then
11245
11246cat >>confdefs.h <<\_ACEOF
11247#define HAVE_WORKING_FORK 1
11248_ACEOF
11249
11250fi
11251
c375c43b 11252
81bf3d9e 11253
dfb77e37
KC
11254 if test "X$prefix" = "XNONE"; then
11255 acl_final_prefix="$ac_default_prefix"
11256 else
11257 acl_final_prefix="$prefix"
11258 fi
11259 if test "X$exec_prefix" = "XNONE"; then
11260 acl_final_exec_prefix='${prefix}'
11261 else
11262 acl_final_exec_prefix="$exec_prefix"
11263 fi
11264 acl_save_prefix="$prefix"
11265 prefix="$acl_final_prefix"
11266 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
11267 prefix="$acl_save_prefix"
f91abfce
TT
11268
11269
b61ff9c8 11270# Check whether --with-gnu-ld or --without-gnu-ld was given.
dfb77e37 11271if test "${with_gnu_ld+set}" = set; then
b61ff9c8
BS
11272 withval="$with_gnu_ld"
11273 test "$withval" = no || with_gnu_ld=yes
ba479fd2 11274else
dfb77e37 11275 with_gnu_ld=no
b61ff9c8 11276fi;
dfb77e37
KC
11277# Prepare PATH_SEPARATOR.
11278# The user is always right.
11279if test "${PATH_SEPARATOR+set}" != set; then
11280 echo "#! /bin/sh" >conf$$.sh
11281 echo "exit 0" >>conf$$.sh
11282 chmod +x conf$$.sh
11283 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11284 PATH_SEPARATOR=';'
ba479fd2 11285 else
dfb77e37 11286 PATH_SEPARATOR=:
ba479fd2 11287 fi
dfb77e37
KC
11288 rm -f conf$$.sh
11289fi
11290ac_prog=ld
11291if test "$GCC" = yes; then
11292 # Check if gcc -print-prog-name=ld gives a path.
b61ff9c8
BS
11293 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
11294echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
dfb77e37
KC
11295 case $host in
11296 *-*-mingw*)
11297 # gcc leaves a trailing carriage return which upsets mingw
11298 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11299 *)
11300 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11301 esac
11302 case $ac_prog in
11303 # Accept absolute paths.
11304 [\\/]* | [A-Za-z]:[\\/]*)
11305 re_direlt='/[^/][^/]*/\.\./'
11306 # Canonicalize the path of ld
11307 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
11308 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
11309 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
11310 done
11311 test -z "$LD" && LD="$ac_prog"
11312 ;;
11313 "")
11314 # If it fails, then pretend we aren't using GCC.
11315 ac_prog=ld
11316 ;;
11317 *)
11318 # If it is relative, then search for the first ld in PATH.
11319 with_gnu_ld=unknown
11320 ;;
11321 esac
11322elif test "$with_gnu_ld" = yes; then
b61ff9c8
BS
11323 echo "$as_me:$LINENO: checking for GNU ld" >&5
11324echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 11325else
b61ff9c8
BS
11326 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
11327echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 11328fi
dfb77e37
KC
11329if test "${acl_cv_path_LD+set}" = set; then
11330 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 11331else
dfb77e37
KC
11332 if test -z "$LD"; then
11333 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
11334 for ac_dir in $PATH; do
11335 test -z "$ac_dir" && ac_dir=.
11336 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11337 acl_cv_path_LD="$ac_dir/$ac_prog"
11338 # Check to see if the program is GNU ld. I'd rather use --version,
11339 # but apparently some GNU ld's only accept -v.
11340 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
11341 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
11342 test "$with_gnu_ld" != no && break
11343 else
11344 test "$with_gnu_ld" != yes && break
11345 fi
dfb77e37
KC
11346 fi
11347 done
11348 IFS="$ac_save_ifs"
11349else
11350 acl_cv_path_LD="$LD" # Let the user override the test with a path.
11351fi
11352fi
ba479fd2 11353
dfb77e37
KC
11354LD="$acl_cv_path_LD"
11355if test -n "$LD"; then
b61ff9c8
BS
11356 echo "$as_me:$LINENO: result: $LD" >&5
11357echo "${ECHO_T}$LD" >&6
dfb77e37 11358else
b61ff9c8
BS
11359 echo "$as_me:$LINENO: result: no" >&5
11360echo "${ECHO_T}no" >&6
ba479fd2 11361fi
dfb77e37
KC
11362test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
11363echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
11364 { (exit 1); exit 1; }; }
b61ff9c8
BS
11365echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
11366echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
dfb77e37
KC
11367if test "${acl_cv_prog_gnu_ld+set}" = set; then
11368 echo $ECHO_N "(cached) $ECHO_C" >&6
11369else
11370 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
11371if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
11372 acl_cv_prog_gnu_ld=yes
11373else
11374 acl_cv_prog_gnu_ld=no
11375fi
dfb77e37 11376fi
b61ff9c8
BS
11377echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
11378echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
dfb77e37
KC
11379with_gnu_ld=$acl_cv_prog_gnu_ld
11380
11381
11382
b61ff9c8
BS
11383 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
11384echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
dfb77e37
KC
11385if test "${acl_cv_rpath+set}" = set; then
11386 echo $ECHO_N "(cached) $ECHO_C" >&6
11387else
11388
11389 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
11390 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
11391 . ./conftest.sh
11392 rm -f ./conftest.sh
11393 acl_cv_rpath=done
ba479fd2 11394
eb158727 11395fi
b61ff9c8
BS
11396echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
11397echo "${ECHO_T}$acl_cv_rpath" >&6
dfb77e37
KC
11398 wl="$acl_cv_wl"
11399 libext="$acl_cv_libext"
11400 shlibext="$acl_cv_shlibext"
11401 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
11402 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
11403 hardcode_direct="$acl_cv_hardcode_direct"
11404 hardcode_minus_L="$acl_cv_hardcode_minus_L"
b61ff9c8 11405 # Check whether --enable-rpath or --disable-rpath was given.
dfb77e37 11406if test "${enable_rpath+set}" = set; then
b61ff9c8
BS
11407 enableval="$enable_rpath"
11408 :
dfb77e37
KC
11409else
11410 enable_rpath=yes
b61ff9c8 11411fi;
8b1f719a 11412
a6ccdbab 11413
dfb77e37
KC
11414
11415
11416
11417
11418
b639c3c2
JJ
11419 use_additional=yes
11420
11421 acl_save_prefix="$prefix"
11422 prefix="$acl_final_prefix"
11423 acl_save_exec_prefix="$exec_prefix"
11424 exec_prefix="$acl_final_exec_prefix"
11425
11426 eval additional_includedir=\"$includedir\"
11427 eval additional_libdir=\"$libdir\"
11428
11429 exec_prefix="$acl_save_exec_prefix"
11430 prefix="$acl_save_prefix"
dfb77e37
KC
11431
11432
b61ff9c8 11433# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
8b1f719a 11434if test "${with_libiconv_prefix+set}" = set; then
b61ff9c8
BS
11435 withval="$with_libiconv_prefix"
11436
8b1f719a 11437 if test "X$withval" = "Xno"; then
b639c3c2 11438 use_additional=no
8b1f719a
PB
11439 else
11440 if test "X$withval" = "X"; then
dfb77e37
KC
11441
11442 acl_save_prefix="$prefix"
11443 prefix="$acl_final_prefix"
11444 acl_save_exec_prefix="$exec_prefix"
11445 exec_prefix="$acl_final_exec_prefix"
11446
b639c3c2
JJ
11447 eval additional_includedir=\"$includedir\"
11448 eval additional_libdir=\"$libdir\"
dfb77e37
KC
11449
11450 exec_prefix="$acl_save_exec_prefix"
11451 prefix="$acl_save_prefix"
11452
8b1f719a 11453 else
b639c3c2
JJ
11454 additional_includedir="$withval/include"
11455 additional_libdir="$withval/lib"
8b1f719a
PB
11456 fi
11457 fi
11458
b61ff9c8 11459fi;
dfb77e37
KC
11460 LIBICONV=
11461 LTLIBICONV=
11462 INCICONV=
11463 rpathdirs=
11464 ltrpathdirs=
11465 names_already_handled=
11466 names_next_round='iconv '
11467 while test -n "$names_next_round"; do
11468 names_this_round="$names_next_round"
11469 names_next_round=
11470 for name in $names_this_round; do
11471 already_handled=
11472 for n in $names_already_handled; do
11473 if test "$n" = "$name"; then
11474 already_handled=yes
11475 break
11476 fi
11477 done
11478 if test -z "$already_handled"; then
11479 names_already_handled="$names_already_handled $name"
11480 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11481 eval value=\"\$HAVE_LIB$uppername\"
11482 if test -n "$value"; then
11483 if test "$value" = yes; then
11484 eval value=\"\$LIB$uppername\"
11485 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11486 eval value=\"\$LTLIB$uppername\"
11487 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11488 else
11489 :
11490 fi
11491 else
11492 found_dir=
11493 found_la=
11494 found_so=
11495 found_a=
b639c3c2
JJ
11496 if test $use_additional = yes; then
11497 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11498 found_dir="$additional_libdir"
11499 found_so="$additional_libdir/lib$name.$shlibext"
11500 if test -f "$additional_libdir/lib$name.la"; then
11501 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
11502 fi
11503 else
b639c3c2
JJ
11504 if test -f "$additional_libdir/lib$name.$libext"; then
11505 found_dir="$additional_libdir"
11506 found_a="$additional_libdir/lib$name.$libext"
11507 if test -f "$additional_libdir/lib$name.la"; then
11508 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
11509 fi
11510 fi
11511 fi
11512 fi
11513 if test "X$found_dir" = "X"; then
11514 for x in $LDFLAGS $LTLIBICONV; do
11515
11516 acl_save_prefix="$prefix"
11517 prefix="$acl_final_prefix"
11518 acl_save_exec_prefix="$exec_prefix"
11519 exec_prefix="$acl_final_exec_prefix"
11520 eval x=\"$x\"
11521 exec_prefix="$acl_save_exec_prefix"
11522 prefix="$acl_save_prefix"
11523
11524 case "$x" in
11525 -L*)
11526 dir=`echo "X$x" | sed -e 's/^X-L//'`
11527 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11528 found_dir="$dir"
11529 found_so="$dir/lib$name.$shlibext"
11530 if test -f "$dir/lib$name.la"; then
11531 found_la="$dir/lib$name.la"
11532 fi
11533 else
11534 if test -f "$dir/lib$name.$libext"; then
11535 found_dir="$dir"
11536 found_a="$dir/lib$name.$libext"
11537 if test -f "$dir/lib$name.la"; then
11538 found_la="$dir/lib$name.la"
11539 fi
11540 fi
11541 fi
11542 ;;
11543 esac
11544 if test "X$found_dir" != "X"; then
11545 break
11546 fi
11547 done
11548 fi
11549 if test "X$found_dir" != "X"; then
11550 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
11551 if test "X$found_so" != "X"; then
11552 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11553 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11554 else
11555 haveit=
11556 for x in $ltrpathdirs; do
11557 if test "X$x" = "X$found_dir"; then
11558 haveit=yes
11559 break
11560 fi
11561 done
11562 if test -z "$haveit"; then
11563 ltrpathdirs="$ltrpathdirs $found_dir"
11564 fi
11565 if test "$hardcode_direct" = yes; then
11566 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11567 else
11568 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11569 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11570 haveit=
11571 for x in $rpathdirs; do
11572 if test "X$x" = "X$found_dir"; then
11573 haveit=yes
11574 break
11575 fi
11576 done
11577 if test -z "$haveit"; then
11578 rpathdirs="$rpathdirs $found_dir"
11579 fi
11580 else
11581 haveit=
11582 for x in $LDFLAGS $LIBICONV; do
11583
11584 acl_save_prefix="$prefix"
11585 prefix="$acl_final_prefix"
11586 acl_save_exec_prefix="$exec_prefix"
11587 exec_prefix="$acl_final_exec_prefix"
11588 eval x=\"$x\"
11589 exec_prefix="$acl_save_exec_prefix"
11590 prefix="$acl_save_prefix"
11591
11592 if test "X$x" = "X-L$found_dir"; then
11593 haveit=yes
11594 break
11595 fi
11596 done
11597 if test -z "$haveit"; then
11598 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
11599 fi
11600 if test "$hardcode_minus_L" != no; then
11601 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11602 else
11603 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11604 fi
11605 fi
11606 fi
11607 fi
11608 else
11609 if test "X$found_a" != "X"; then
11610 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
11611 else
11612 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
11613 fi
11614 fi
11615 additional_includedir=
11616 case "$found_dir" in
11617 */lib | */lib/)
11618 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11619 additional_includedir="$basedir/include"
11620 ;;
11621 esac
11622 if test "X$additional_includedir" != "X"; then
11623 if test "X$additional_includedir" != "X/usr/include"; then
11624 haveit=
11625 if test "X$additional_includedir" = "X/usr/local/include"; then
11626 if test -n "$GCC"; then
11627 case $host_os in
18fc9bd4 11628 linux*) haveit=yes;;
dfb77e37
KC
11629 esac
11630 fi
11631 fi
11632 if test -z "$haveit"; then
11633 for x in $CPPFLAGS $INCICONV; do
11634
11635 acl_save_prefix="$prefix"
11636 prefix="$acl_final_prefix"
11637 acl_save_exec_prefix="$exec_prefix"
11638 exec_prefix="$acl_final_exec_prefix"
11639 eval x=\"$x\"
11640 exec_prefix="$acl_save_exec_prefix"
11641 prefix="$acl_save_prefix"
11642
11643 if test "X$x" = "X-I$additional_includedir"; then
11644 haveit=yes
11645 break
11646 fi
11647 done
11648 if test -z "$haveit"; then
11649 if test -d "$additional_includedir"; then
11650 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
11651 fi
11652 fi
11653 fi
11654 fi
11655 fi
11656 if test -n "$found_la"; then
11657 save_libdir="$libdir"
11658 case "$found_la" in
11659 */* | *\\*) . "$found_la" ;;
11660 *) . "./$found_la" ;;
11661 esac
11662 libdir="$save_libdir"
11663 for dep in $dependency_libs; do
11664 case "$dep" in
11665 -L*)
11666 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11667 if test "X$additional_libdir" != "X/usr/lib"; then
11668 haveit=
11669 if test "X$additional_libdir" = "X/usr/local/lib"; then
11670 if test -n "$GCC"; then
11671 case $host_os in
18fc9bd4 11672 linux*) haveit=yes;;
dfb77e37
KC
11673 esac
11674 fi
11675 fi
11676 if test -z "$haveit"; then
11677 haveit=
11678 for x in $LDFLAGS $LIBICONV; do
11679
11680 acl_save_prefix="$prefix"
11681 prefix="$acl_final_prefix"
11682 acl_save_exec_prefix="$exec_prefix"
11683 exec_prefix="$acl_final_exec_prefix"
11684 eval x=\"$x\"
11685 exec_prefix="$acl_save_exec_prefix"
11686 prefix="$acl_save_prefix"
11687
11688 if test "X$x" = "X-L$additional_libdir"; then
11689 haveit=yes
11690 break
11691 fi
11692 done
11693 if test -z "$haveit"; then
11694 if test -d "$additional_libdir"; then
11695 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
11696 fi
11697 fi
11698 haveit=
11699 for x in $LDFLAGS $LTLIBICONV; do
11700
11701 acl_save_prefix="$prefix"
11702 prefix="$acl_final_prefix"
11703 acl_save_exec_prefix="$exec_prefix"
11704 exec_prefix="$acl_final_exec_prefix"
11705 eval x=\"$x\"
11706 exec_prefix="$acl_save_exec_prefix"
11707 prefix="$acl_save_prefix"
11708
11709 if test "X$x" = "X-L$additional_libdir"; then
11710 haveit=yes
11711 break
11712 fi
11713 done
11714 if test -z "$haveit"; then
11715 if test -d "$additional_libdir"; then
11716 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
11717 fi
11718 fi
11719 fi
11720 fi
11721 ;;
11722 -R*)
11723 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11724 if test "$enable_rpath" != no; then
11725 haveit=
11726 for x in $rpathdirs; do
11727 if test "X$x" = "X$dir"; then
11728 haveit=yes
11729 break
11730 fi
11731 done
11732 if test -z "$haveit"; then
11733 rpathdirs="$rpathdirs $dir"
11734 fi
11735 haveit=
11736 for x in $ltrpathdirs; do
11737 if test "X$x" = "X$dir"; then
11738 haveit=yes
11739 break
11740 fi
11741 done
11742 if test -z "$haveit"; then
11743 ltrpathdirs="$ltrpathdirs $dir"
11744 fi
11745 fi
11746 ;;
11747 -l*)
11748 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11749 ;;
11750 *.la)
11751 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11752 ;;
11753 *)
11754 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
11755 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
11756 ;;
11757 esac
11758 done
11759 fi
11760 else
11761 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11762 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
11763 fi
11764 fi
11765 fi
11766 done
11767 done
11768 if test "X$rpathdirs" != "X"; then
11769 if test -n "$hardcode_libdir_separator"; then
11770 alldirs=
11771 for found_dir in $rpathdirs; do
11772 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11773 done
11774 acl_save_libdir="$libdir"
11775 libdir="$alldirs"
11776 eval flag=\"$hardcode_libdir_flag_spec\"
11777 libdir="$acl_save_libdir"
11778 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11779 else
11780 for found_dir in $rpathdirs; do
11781 acl_save_libdir="$libdir"
11782 libdir="$found_dir"
11783 eval flag=\"$hardcode_libdir_flag_spec\"
11784 libdir="$acl_save_libdir"
11785 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11786 done
11787 fi
11788 fi
11789 if test "X$ltrpathdirs" != "X"; then
11790 for found_dir in $ltrpathdirs; do
11791 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11792 done
11793 fi
11794
11795
11796
11797
11798
11799
11800
11801 am_save_CPPFLAGS="$CPPFLAGS"
11802
11803 for element in $INCICONV; do
11804 haveit=
11805 for x in $CPPFLAGS; do
11806
11807 acl_save_prefix="$prefix"
11808 prefix="$acl_final_prefix"
11809 acl_save_exec_prefix="$exec_prefix"
11810 exec_prefix="$acl_final_exec_prefix"
11811 eval x=\"$x\"
11812 exec_prefix="$acl_save_exec_prefix"
11813 prefix="$acl_save_prefix"
11814
11815 if test "X$x" = "X$element"; then
11816 haveit=yes
11817 break
11818 fi
11819 done
11820 if test -z "$haveit"; then
11821 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11822 fi
11823 done
eb158727
ZW
11824
11825
b61ff9c8
BS
11826 echo "$as_me:$LINENO: checking for iconv" >&5
11827echo $ECHO_N "checking for iconv... $ECHO_C" >&6
ba479fd2
NN
11828if test "${am_cv_func_iconv+set}" = set; then
11829 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11830else
ba479fd2 11831
f91abfce
TT
11832 am_cv_func_iconv="no, consider installing GNU libiconv"
11833 am_cv_lib_iconv=no
ba479fd2 11834 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11835/* confdefs.h. */
11836_ACEOF
11837cat confdefs.h >>conftest.$ac_ext
11838cat >>conftest.$ac_ext <<_ACEOF
11839/* end confdefs.h. */
f91abfce
TT
11840#include <stdlib.h>
11841#include <iconv.h>
ba479fd2
NN
11842int
11843main ()
11844{
f91abfce
TT
11845iconv_t cd = iconv_open("","");
11846 iconv(cd,NULL,NULL,NULL,NULL);
11847 iconv_close(cd);
ba479fd2
NN
11848 ;
11849 return 0;
11850}
11851_ACEOF
11852rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11853if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11854 (eval $ac_link) 2>conftest.er1
ba479fd2 11855 ac_status=$?
86da66b5
HPN
11856 grep -v '^ *+' conftest.er1 >conftest.err
11857 rm -f conftest.er1
11858 cat conftest.err >&5
ba479fd2 11859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11860 (exit $ac_status); } &&
11861 { ac_try='test -z "$ac_c_werror_flag"
11862 || test ! -s conftest.err'
11863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11864 (eval $ac_try) 2>&5
11865 ac_status=$?
11866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11867 (exit $ac_status); }; } &&
11868 { ac_try='test -s conftest$ac_exeext'
11869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11870 (eval $ac_try) 2>&5
11871 ac_status=$?
11872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11873 (exit $ac_status); }; }; then
f91abfce
TT
11874 am_cv_func_iconv=yes
11875else
ba479fd2
NN
11876 echo "$as_me: failed program was:" >&5
11877sed 's/^/| /' conftest.$ac_ext >&5
11878
f91abfce 11879fi
b61ff9c8 11880rm -f conftest.err conftest.$ac_objext \
86da66b5 11881 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11882 if test "$am_cv_func_iconv" != yes; then
11883 am_save_LIBS="$LIBS"
dfb77e37 11884 LIBS="$LIBS $LIBICONV"
ba479fd2 11885 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11886/* confdefs.h. */
11887_ACEOF
11888cat confdefs.h >>conftest.$ac_ext
11889cat >>conftest.$ac_ext <<_ACEOF
11890/* end confdefs.h. */
f91abfce
TT
11891#include <stdlib.h>
11892#include <iconv.h>
ba479fd2
NN
11893int
11894main ()
11895{
f91abfce
TT
11896iconv_t cd = iconv_open("","");
11897 iconv(cd,NULL,NULL,NULL,NULL);
11898 iconv_close(cd);
ba479fd2
NN
11899 ;
11900 return 0;
11901}
11902_ACEOF
11903rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11904if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11905 (eval $ac_link) 2>conftest.er1
ba479fd2 11906 ac_status=$?
86da66b5
HPN
11907 grep -v '^ *+' conftest.er1 >conftest.err
11908 rm -f conftest.er1
11909 cat conftest.err >&5
ba479fd2 11910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11911 (exit $ac_status); } &&
11912 { ac_try='test -z "$ac_c_werror_flag"
11913 || test ! -s conftest.err'
11914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11915 (eval $ac_try) 2>&5
11916 ac_status=$?
11917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11918 (exit $ac_status); }; } &&
11919 { ac_try='test -s conftest$ac_exeext'
11920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11921 (eval $ac_try) 2>&5
11922 ac_status=$?
11923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11924 (exit $ac_status); }; }; then
f91abfce
TT
11925 am_cv_lib_iconv=yes
11926 am_cv_func_iconv=yes
11927else
ba479fd2
NN
11928 echo "$as_me: failed program was:" >&5
11929sed 's/^/| /' conftest.$ac_ext >&5
11930
f91abfce 11931fi
b61ff9c8 11932rm -f conftest.err conftest.$ac_objext \
86da66b5 11933 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11934 LIBS="$am_save_LIBS"
11935 fi
6e3f3080 11936
ba479fd2 11937fi
b61ff9c8
BS
11938echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
11939echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 11940 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11941
11942cat >>confdefs.h <<\_ACEOF
f91abfce 11943#define HAVE_ICONV 1
ba479fd2 11944_ACEOF
f91abfce 11945
dfb77e37
KC
11946 fi
11947 if test "$am_cv_lib_iconv" = yes; then
b61ff9c8
BS
11948 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
11949echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
11950 echo "$as_me:$LINENO: result: $LIBICONV" >&5
11951echo "${ECHO_T}$LIBICONV" >&6
dfb77e37
KC
11952 else
11953 CPPFLAGS="$am_save_CPPFLAGS"
11954 LIBICONV=
11955 LTLIBICONV=
11956 fi
11957
11958
11959
11960 if test "$am_cv_func_iconv" = yes; then
b61ff9c8
BS
11961 echo "$as_me:$LINENO: checking for iconv declaration" >&5
11962echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
ba479fd2
NN
11963 if test "${am_cv_proto_iconv+set}" = set; then
11964 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11965else
ba479fd2
NN
11966
11967 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11968/* confdefs.h. */
11969_ACEOF
11970cat confdefs.h >>conftest.$ac_ext
11971cat >>conftest.$ac_ext <<_ACEOF
11972/* end confdefs.h. */
f91abfce
TT
11973
11974#include <stdlib.h>
11975#include <iconv.h>
11976extern
11977#ifdef __cplusplus
11978"C"
11979#endif
11980#if defined(__STDC__) || defined(__cplusplus)
11981size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11982#else
11983size_t iconv();
11984#endif
11985
ba479fd2
NN
11986int
11987main ()
11988{
f91abfce 11989
ba479fd2
NN
11990 ;
11991 return 0;
11992}
11993_ACEOF
11994rm -f conftest.$ac_objext
b61ff9c8
BS
11995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11996 (eval $ac_compile) 2>conftest.er1
ba479fd2 11997 ac_status=$?
86da66b5
HPN
11998 grep -v '^ *+' conftest.er1 >conftest.err
11999 rm -f conftest.er1
12000 cat conftest.err >&5
ba479fd2 12001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12002 (exit $ac_status); } &&
12003 { ac_try='test -z "$ac_c_werror_flag"
12004 || test ! -s conftest.err'
12005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12006 (eval $ac_try) 2>&5
12007 ac_status=$?
12008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12009 (exit $ac_status); }; } &&
12010 { ac_try='test -s conftest.$ac_objext'
12011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12012 (eval $ac_try) 2>&5
12013 ac_status=$?
12014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12015 (exit $ac_status); }; }; then
f91abfce
TT
12016 am_cv_proto_iconv_arg1=""
12017else
ba479fd2
NN
12018 echo "$as_me: failed program was:" >&5
12019sed 's/^/| /' conftest.$ac_ext >&5
12020
b61ff9c8 12021am_cv_proto_iconv_arg1="const"
f91abfce 12022fi
b61ff9c8 12023rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
12024 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);"
12025fi
12026
12027 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
b61ff9c8 12028 echo "$as_me:$LINENO: result: ${ac_t:-
ba479fd2
NN
12029 }$am_cv_proto_iconv" >&5
12030echo "${ECHO_T}${ac_t:-
b61ff9c8 12031 }$am_cv_proto_iconv" >&6
ba479fd2
NN
12032
12033cat >>confdefs.h <<_ACEOF
f91abfce 12034#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 12035_ACEOF
f91abfce
TT
12036
12037 fi
f91abfce 12038
56694dd9
ZW
12039# Until we have in-tree GNU iconv:
12040LIBICONV_DEP=
12041
12042
18fc9bd4 12043
b61ff9c8
BS
12044 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
12045echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
18fc9bd4
RG
12046if test "${am_cv_val_LC_MESSAGES+set}" = set; then
12047 echo $ECHO_N "(cached) $ECHO_C" >&6
12048else
12049 cat >conftest.$ac_ext <<_ACEOF
12050/* confdefs.h. */
12051_ACEOF
12052cat confdefs.h >>conftest.$ac_ext
12053cat >>conftest.$ac_ext <<_ACEOF
12054/* end confdefs.h. */
12055#include <locale.h>
12056int
12057main ()
12058{
12059return LC_MESSAGES
12060 ;
12061 return 0;
12062}
12063_ACEOF
12064rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
12065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12066 (eval $ac_link) 2>conftest.er1
18fc9bd4
RG
12067 ac_status=$?
12068 grep -v '^ *+' conftest.er1 >conftest.err
12069 rm -f conftest.er1
12070 cat conftest.err >&5
12071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12072 (exit $ac_status); } &&
12073 { ac_try='test -z "$ac_c_werror_flag"
12074 || test ! -s conftest.err'
12075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12076 (eval $ac_try) 2>&5
12077 ac_status=$?
12078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12079 (exit $ac_status); }; } &&
12080 { ac_try='test -s conftest$ac_exeext'
12081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12082 (eval $ac_try) 2>&5
12083 ac_status=$?
12084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12085 (exit $ac_status); }; }; then
18fc9bd4
RG
12086 am_cv_val_LC_MESSAGES=yes
12087else
12088 echo "$as_me: failed program was:" >&5
12089sed 's/^/| /' conftest.$ac_ext >&5
12090
b61ff9c8 12091am_cv_val_LC_MESSAGES=no
18fc9bd4 12092fi
b61ff9c8 12093rm -f conftest.err conftest.$ac_objext \
18fc9bd4
RG
12094 conftest$ac_exeext conftest.$ac_ext
12095fi
b61ff9c8
BS
12096echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
12097echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
18fc9bd4
RG
12098 if test $am_cv_val_LC_MESSAGES = yes; then
12099
12100cat >>confdefs.h <<\_ACEOF
12101#define HAVE_LC_MESSAGES 1
12102_ACEOF
12103
12104 fi
12105
f91abfce 12106
a03ea89b 12107
b61ff9c8
BS
12108 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
12109echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
a03ea89b
BM
12110if test "${am_cv_langinfo_codeset+set}" = set; then
12111 echo $ECHO_N "(cached) $ECHO_C" >&6
12112else
12113 cat >conftest.$ac_ext <<_ACEOF
12114/* confdefs.h. */
12115_ACEOF
12116cat confdefs.h >>conftest.$ac_ext
12117cat >>conftest.$ac_ext <<_ACEOF
12118/* end confdefs.h. */
12119#include <langinfo.h>
12120int
12121main ()
12122{
12123char* cs = nl_langinfo(CODESET);
12124 ;
12125 return 0;
12126}
12127_ACEOF
12128rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
12129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12130 (eval $ac_link) 2>conftest.er1
a03ea89b
BM
12131 ac_status=$?
12132 grep -v '^ *+' conftest.er1 >conftest.err
12133 rm -f conftest.er1
12134 cat conftest.err >&5
12135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12136 (exit $ac_status); } &&
12137 { ac_try='test -z "$ac_c_werror_flag"
12138 || test ! -s conftest.err'
12139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12140 (eval $ac_try) 2>&5
12141 ac_status=$?
12142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12143 (exit $ac_status); }; } &&
12144 { ac_try='test -s conftest$ac_exeext'
12145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12146 (eval $ac_try) 2>&5
12147 ac_status=$?
12148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12149 (exit $ac_status); }; }; then
a03ea89b
BM
12150 am_cv_langinfo_codeset=yes
12151else
12152 echo "$as_me: failed program was:" >&5
12153sed 's/^/| /' conftest.$ac_ext >&5
12154
b61ff9c8 12155am_cv_langinfo_codeset=no
a03ea89b 12156fi
b61ff9c8 12157rm -f conftest.err conftest.$ac_objext \
a03ea89b
BM
12158 conftest$ac_exeext conftest.$ac_ext
12159
12160fi
b61ff9c8
BS
12161echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
12162echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
a03ea89b
BM
12163 if test $am_cv_langinfo_codeset = yes; then
12164
12165cat >>confdefs.h <<\_ACEOF
12166#define HAVE_LANGINFO_CODESET 1
12167_ACEOF
12168
12169 fi
12170
12171
86cf1cbd
KG
12172# We will need to find libiberty.h and ansidecl.h
12173saved_CFLAGS="$CFLAGS"
12174CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
6a257778 12196
ad6717df
PB
12197
12198
0d667716
KG
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
367e8319 12209
0d667716
KG
12210
12211
7391b66c 12212
ed5b9f96
GK
12213
12214for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
12215 strsignal strstr strverscmp \
12216 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 12217 free basename getopt clock getpagesize clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
81bf3d9e 12218do
ad6717df 12219 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12220echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12221echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12222if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12223 echo $ECHO_N "(cached) $ECHO_C" >&6
12224else
12225 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12226/* confdefs.h. */
12227_ACEOF
12228cat confdefs.h >>conftest.$ac_ext
12229cat >>conftest.$ac_ext <<_ACEOF
12230/* end confdefs.h. */
7afe8c41
KG
12231#undef $ac_tr_decl
12232#define $ac_tr_decl 1
ba479fd2 12233
d02af173 12234#include "ansidecl.h"
86cf1cbd 12235#include "system.h"
f31e826b 12236
ba479fd2
NN
12237int
12238main ()
12239{
86cf1cbd
KG
12240#ifndef $ac_func
12241char *(*pfn) = (char *(*)) $ac_func ;
12242#endif
ba479fd2
NN
12243 ;
12244 return 0;
12245}
12246_ACEOF
12247rm -f conftest.$ac_objext
b61ff9c8
BS
12248if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12249 (eval $ac_compile) 2>conftest.er1
ba479fd2 12250 ac_status=$?
86da66b5
HPN
12251 grep -v '^ *+' conftest.er1 >conftest.err
12252 rm -f conftest.er1
12253 cat conftest.err >&5
ba479fd2 12254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12255 (exit $ac_status); } &&
12256 { ac_try='test -z "$ac_c_werror_flag"
12257 || test ! -s conftest.err'
12258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12259 (eval $ac_try) 2>&5
12260 ac_status=$?
12261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12262 (exit $ac_status); }; } &&
12263 { ac_try='test -s conftest.$ac_objext'
12264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12265 (eval $ac_try) 2>&5
12266 ac_status=$?
12267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12268 (exit $ac_status); }; }; then
f31e826b 12269 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 12270else
ba479fd2
NN
12271 echo "$as_me: failed program was:" >&5
12272sed 's/^/| /' conftest.$ac_ext >&5
12273
b61ff9c8 12274eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 12275fi
b61ff9c8 12276rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
12277fi
12278
f31e826b 12279if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12280 echo "$as_me:$LINENO: result: yes" >&5
12281echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 12282#define $ac_tr_decl 1
ba479fd2
NN
12283_ACEOF
12284
81bf3d9e 12285else
b61ff9c8
BS
12286 echo "$as_me:$LINENO: result: no" >&5
12287echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 12288#define $ac_tr_decl 0
ba479fd2
NN
12289_ACEOF
12290
81bf3d9e
RH
12291fi
12292
12293done
ba479fd2 12294
ba479fd2 12295
ba479fd2 12296
81bf3d9e 12297
81bf3d9e
RH
12298
12299for ac_func in getrlimit setrlimit getrusage
12300do
ad6717df 12301 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12302echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12303echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12304if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12305 echo $ECHO_N "(cached) $ECHO_C" >&6
12306else
12307 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12308/* confdefs.h. */
12309_ACEOF
12310cat confdefs.h >>conftest.$ac_ext
12311cat >>conftest.$ac_ext <<_ACEOF
12312/* end confdefs.h. */
7afe8c41
KG
12313#undef $ac_tr_decl
12314#define $ac_tr_decl 1
ba479fd2 12315
d02af173 12316#include "ansidecl.h"
86cf1cbd 12317#include "system.h"
81bf3d9e
RH
12318#ifdef HAVE_SYS_RESOURCE_H
12319#include <sys/resource.h>
12320#endif
12321
f31e826b 12322
ba479fd2
NN
12323int
12324main ()
12325{
86cf1cbd
KG
12326#ifndef $ac_func
12327char *(*pfn) = (char *(*)) $ac_func ;
12328#endif
ba479fd2
NN
12329 ;
12330 return 0;
12331}
12332_ACEOF
12333rm -f conftest.$ac_objext
b61ff9c8
BS
12334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12335 (eval $ac_compile) 2>conftest.er1
ba479fd2 12336 ac_status=$?
86da66b5
HPN
12337 grep -v '^ *+' conftest.er1 >conftest.err
12338 rm -f conftest.er1
12339 cat conftest.err >&5
ba479fd2 12340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12341 (exit $ac_status); } &&
12342 { ac_try='test -z "$ac_c_werror_flag"
12343 || test ! -s conftest.err'
12344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12345 (eval $ac_try) 2>&5
12346 ac_status=$?
12347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12348 (exit $ac_status); }; } &&
12349 { ac_try='test -s conftest.$ac_objext'
12350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12351 (eval $ac_try) 2>&5
12352 ac_status=$?
12353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12354 (exit $ac_status); }; }; then
f31e826b 12355 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 12356else
ba479fd2
NN
12357 echo "$as_me: failed program was:" >&5
12358sed 's/^/| /' conftest.$ac_ext >&5
12359
b61ff9c8 12360eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 12361fi
b61ff9c8 12362rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
12363fi
12364
f31e826b 12365if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12366 echo "$as_me:$LINENO: result: yes" >&5
12367echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 12368#define $ac_tr_decl 1
ba479fd2
NN
12369_ACEOF
12370
81bf3d9e 12371else
b61ff9c8
BS
12372 echo "$as_me:$LINENO: result: no" >&5
12373echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 12374#define $ac_tr_decl 0
ba479fd2
NN
12375_ACEOF
12376
81bf3d9e
RH
12377fi
12378
12379done
86cf1cbd 12380
81bf3d9e 12381
ba479fd2 12382cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12383/* confdefs.h. */
12384_ACEOF
12385cat confdefs.h >>conftest.$ac_ext
12386cat >>conftest.$ac_ext <<_ACEOF
12387/* end confdefs.h. */
b2522d2b
HPN
12388
12389#include "ansidecl.h"
12390#include "system.h"
12391#ifdef HAVE_SYS_RESOURCE_H
12392#include <sys/resource.h>
12393#endif
12394
ba479fd2
NN
12395int
12396main ()
12397{
b2522d2b 12398rlim_t l = 0;
ba479fd2
NN
12399 ;
12400 return 0;
12401}
12402_ACEOF
12403rm -f conftest.$ac_objext
b61ff9c8
BS
12404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12405 (eval $ac_compile) 2>conftest.er1
ba479fd2 12406 ac_status=$?
86da66b5
HPN
12407 grep -v '^ *+' conftest.er1 >conftest.err
12408 rm -f conftest.er1
12409 cat conftest.err >&5
ba479fd2 12410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12411 (exit $ac_status); } &&
12412 { ac_try='test -z "$ac_c_werror_flag"
12413 || test ! -s conftest.err'
12414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12415 (eval $ac_try) 2>&5
12416 ac_status=$?
12417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12418 (exit $ac_status); }; } &&
12419 { ac_try='test -s conftest.$ac_objext'
12420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12421 (eval $ac_try) 2>&5
12422 ac_status=$?
12423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12424 (exit $ac_status); }; }; then
b2522d2b
HPN
12425 :
12426else
ba479fd2
NN
12427 echo "$as_me: failed program was:" >&5
12428sed 's/^/| /' conftest.$ac_ext >&5
12429
12430
12431cat >>confdefs.h <<\_ACEOF
b2522d2b 12432#define rlim_t long
ba479fd2 12433_ACEOF
b2522d2b
HPN
12434
12435fi
b61ff9c8 12436rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 12437
2102b2fe
RS
12438# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
12439# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
12440# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
12441# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 12442
351df804 12443for ac_func in ldgetname
c1800ec8 12444do
ad6717df 12445 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12446echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12447echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12448if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12449 echo $ECHO_N "(cached) $ECHO_C" >&6
12450else
12451 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12452/* confdefs.h. */
12453_ACEOF
12454cat confdefs.h >>conftest.$ac_ext
12455cat >>conftest.$ac_ext <<_ACEOF
12456/* end confdefs.h. */
c1800ec8
ZW
12457#undef $ac_tr_decl
12458#define $ac_tr_decl 1
ba479fd2 12459
351df804
KG
12460#include "ansidecl.h"
12461#include "system.h"
12462#ifdef HAVE_LDFCN_H
2102b2fe
RS
12463#undef FREAD
12464#undef FWRITE
351df804
KG
12465#include <ldfcn.h>
12466#endif
12467
12468
ba479fd2
NN
12469int
12470main ()
12471{
351df804
KG
12472#ifndef $ac_func
12473char *(*pfn) = (char *(*)) $ac_func ;
12474#endif
ba479fd2
NN
12475 ;
12476 return 0;
12477}
12478_ACEOF
12479rm -f conftest.$ac_objext
b61ff9c8
BS
12480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12481 (eval $ac_compile) 2>conftest.er1
ba479fd2 12482 ac_status=$?
86da66b5
HPN
12483 grep -v '^ *+' conftest.er1 >conftest.err
12484 rm -f conftest.er1
12485 cat conftest.err >&5
ba479fd2 12486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12487 (exit $ac_status); } &&
12488 { ac_try='test -z "$ac_c_werror_flag"
12489 || test ! -s conftest.err'
12490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12491 (eval $ac_try) 2>&5
12492 ac_status=$?
12493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12494 (exit $ac_status); }; } &&
12495 { ac_try='test -s conftest.$ac_objext'
12496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12497 (eval $ac_try) 2>&5
12498 ac_status=$?
12499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12500 (exit $ac_status); }; }; then
351df804
KG
12501 eval "gcc_cv_have_decl_$ac_func=yes"
12502else
ba479fd2
NN
12503 echo "$as_me: failed program was:" >&5
12504sed 's/^/| /' conftest.$ac_ext >&5
12505
b61ff9c8 12506eval "gcc_cv_have_decl_$ac_func=no"
351df804 12507fi
b61ff9c8 12508rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
12509fi
12510
12511if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12512 echo "$as_me:$LINENO: result: yes" >&5
12513echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 12514#define $ac_tr_decl 1
ba479fd2
NN
12515_ACEOF
12516
351df804 12517else
b61ff9c8
BS
12518 echo "$as_me:$LINENO: result: no" >&5
12519echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 12520#define $ac_tr_decl 0
ba479fd2
NN
12521_ACEOF
12522
351df804
KG
12523fi
12524
12525done
ba479fd2 12526
351df804
KG
12527
12528
12529for ac_func in times
12530do
ad6717df 12531 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12532echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12533echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12534if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12535 echo $ECHO_N "(cached) $ECHO_C" >&6
12536else
12537 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12538/* confdefs.h. */
12539_ACEOF
12540cat confdefs.h >>conftest.$ac_ext
12541cat >>conftest.$ac_ext <<_ACEOF
12542/* end confdefs.h. */
351df804
KG
12543#undef $ac_tr_decl
12544#define $ac_tr_decl 1
ba479fd2 12545
c1800ec8
ZW
12546#include "ansidecl.h"
12547#include "system.h"
12548#ifdef HAVE_SYS_TIMES_H
12549#include <sys/times.h>
12550#endif
12551
12552
ba479fd2
NN
12553int
12554main ()
12555{
c1800ec8
ZW
12556#ifndef $ac_func
12557char *(*pfn) = (char *(*)) $ac_func ;
12558#endif
ba479fd2
NN
12559 ;
12560 return 0;
12561}
12562_ACEOF
12563rm -f conftest.$ac_objext
b61ff9c8
BS
12564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12565 (eval $ac_compile) 2>conftest.er1
ba479fd2 12566 ac_status=$?
86da66b5
HPN
12567 grep -v '^ *+' conftest.er1 >conftest.err
12568 rm -f conftest.er1
12569 cat conftest.err >&5
ba479fd2 12570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12571 (exit $ac_status); } &&
12572 { ac_try='test -z "$ac_c_werror_flag"
12573 || test ! -s conftest.err'
12574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12575 (eval $ac_try) 2>&5
12576 ac_status=$?
12577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12578 (exit $ac_status); }; } &&
12579 { ac_try='test -s conftest.$ac_objext'
12580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12581 (eval $ac_try) 2>&5
12582 ac_status=$?
12583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12584 (exit $ac_status); }; }; then
2f41c1d6
PB
12585 eval "gcc_cv_have_decl_$ac_func=yes"
12586else
12587 echo "$as_me: failed program was:" >&5
12588sed 's/^/| /' conftest.$ac_ext >&5
ab22c1fa 12589
b61ff9c8 12590eval "gcc_cv_have_decl_$ac_func=no"
2f41c1d6 12591fi
b61ff9c8 12592rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
12593fi
12594
12595if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12596 echo "$as_me:$LINENO: result: yes" >&5
12597echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 12598#define $ac_tr_decl 1
ba479fd2
NN
12599_ACEOF
12600
c1800ec8 12601else
b61ff9c8
BS
12602 echo "$as_me:$LINENO: result: no" >&5
12603echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 12604#define $ac_tr_decl 0
ba479fd2
NN
12605_ACEOF
12606
c1800ec8
ZW
12607fi
12608
12609done
c1800ec8
ZW
12610
12611
4f6d8cc8
GK
12612
12613for ac_func in sigaltstack
12614do
12615 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12616echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12617echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12618if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
4f6d8cc8
GK
12619 echo $ECHO_N "(cached) $ECHO_C" >&6
12620else
12621 cat >conftest.$ac_ext <<_ACEOF
12622/* confdefs.h. */
12623_ACEOF
12624cat confdefs.h >>conftest.$ac_ext
12625cat >>conftest.$ac_ext <<_ACEOF
12626/* end confdefs.h. */
12627#undef $ac_tr_decl
12628#define $ac_tr_decl 1
12629
12630#include "ansidecl.h"
12631#include "system.h"
12632#include <signal.h>
12633
12634
12635int
12636main ()
12637{
12638#ifndef $ac_func
12639char *(*pfn) = (char *(*)) $ac_func ;
12640#endif
12641 ;
12642 return 0;
12643}
12644_ACEOF
12645rm -f conftest.$ac_objext
b61ff9c8
BS
12646if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12647 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
12648 ac_status=$?
12649 grep -v '^ *+' conftest.er1 >conftest.err
12650 rm -f conftest.er1
12651 cat conftest.err >&5
12652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12653 (exit $ac_status); } &&
12654 { ac_try='test -z "$ac_c_werror_flag"
12655 || test ! -s conftest.err'
12656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12657 (eval $ac_try) 2>&5
12658 ac_status=$?
12659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12660 (exit $ac_status); }; } &&
12661 { ac_try='test -s conftest.$ac_objext'
12662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12663 (eval $ac_try) 2>&5
12664 ac_status=$?
12665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12666 (exit $ac_status); }; }; then
8b1f719a
PB
12667 eval "gcc_cv_have_decl_$ac_func=yes"
12668else
12669 echo "$as_me: failed program was:" >&5
12670sed 's/^/| /' conftest.$ac_ext >&5
4f6d8cc8 12671
b61ff9c8 12672eval "gcc_cv_have_decl_$ac_func=no"
4f6d8cc8 12673fi
b61ff9c8 12674rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8
GK
12675fi
12676
12677if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12678 echo "$as_me:$LINENO: result: yes" >&5
12679echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
12680#define $ac_tr_decl 1
12681_ACEOF
12682
12683else
b61ff9c8
BS
12684 echo "$as_me:$LINENO: result: no" >&5
12685echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
12686#define $ac_tr_decl 0
12687_ACEOF
12688
12689fi
12690
12691done
12692
12693
c1800ec8 12694# More time-related stuff.
b61ff9c8
BS
12695echo "$as_me:$LINENO: checking for struct tms" >&5
12696echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
ba479fd2
NN
12697if test "${ac_cv_struct_tms+set}" = set; then
12698 echo $ECHO_N "(cached) $ECHO_C" >&6
12699else
12700
12701cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12702/* confdefs.h. */
12703_ACEOF
12704cat confdefs.h >>conftest.$ac_ext
12705cat >>conftest.$ac_ext <<_ACEOF
12706/* end confdefs.h. */
c1800ec8
ZW
12707
12708#include "ansidecl.h"
12709#include "system.h"
12710#ifdef HAVE_SYS_TIMES_H
12711#include <sys/times.h>
12712#endif
12713
ba479fd2
NN
12714int
12715main ()
12716{
c1800ec8 12717struct tms tms;
ba479fd2
NN
12718 ;
12719 return 0;
12720}
12721_ACEOF
12722rm -f conftest.$ac_objext
b61ff9c8
BS
12723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12724 (eval $ac_compile) 2>conftest.er1
ba479fd2 12725 ac_status=$?
86da66b5
HPN
12726 grep -v '^ *+' conftest.er1 >conftest.err
12727 rm -f conftest.er1
12728 cat conftest.err >&5
ba479fd2 12729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12730 (exit $ac_status); } &&
12731 { ac_try='test -z "$ac_c_werror_flag"
12732 || test ! -s conftest.err'
12733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12734 (eval $ac_try) 2>&5
12735 ac_status=$?
12736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12737 (exit $ac_status); }; } &&
12738 { ac_try='test -s conftest.$ac_objext'
12739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12740 (eval $ac_try) 2>&5
12741 ac_status=$?
12742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12743 (exit $ac_status); }; }; then
c1800ec8
ZW
12744 ac_cv_struct_tms=yes
12745else
ba479fd2
NN
12746 echo "$as_me: failed program was:" >&5
12747sed 's/^/| /' conftest.$ac_ext >&5
12748
b61ff9c8 12749ac_cv_struct_tms=no
c1800ec8 12750fi
b61ff9c8 12751rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 12752fi
b61ff9c8
BS
12753echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
12754echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 12755if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
12756
12757cat >>confdefs.h <<\_ACEOF
c1800ec8 12758#define HAVE_STRUCT_TMS 1
ba479fd2 12759_ACEOF
c1800ec8
ZW
12760
12761fi
12762
12763# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
12764# revisit after autoconf 2.50.
b61ff9c8
BS
12765echo "$as_me:$LINENO: checking for clock_t" >&5
12766echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
ba479fd2
NN
12767if test "${gcc_cv_type_clock_t+set}" = set; then
12768 echo $ECHO_N "(cached) $ECHO_C" >&6
12769else
12770
12771cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12772/* confdefs.h. */
12773_ACEOF
12774cat confdefs.h >>conftest.$ac_ext
12775cat >>conftest.$ac_ext <<_ACEOF
12776/* end confdefs.h. */
c1800ec8
ZW
12777
12778#include "ansidecl.h"
12779#include "system.h"
12780
ba479fd2
NN
12781int
12782main ()
12783{
c1800ec8 12784clock_t x;
ba479fd2
NN
12785 ;
12786 return 0;
12787}
12788_ACEOF
12789rm -f conftest.$ac_objext
b61ff9c8
BS
12790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12791 (eval $ac_compile) 2>conftest.er1
ba479fd2 12792 ac_status=$?
86da66b5
HPN
12793 grep -v '^ *+' conftest.er1 >conftest.err
12794 rm -f conftest.er1
12795 cat conftest.err >&5
ba479fd2 12796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12797 (exit $ac_status); } &&
12798 { ac_try='test -z "$ac_c_werror_flag"
12799 || test ! -s conftest.err'
12800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12801 (eval $ac_try) 2>&5
12802 ac_status=$?
12803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12804 (exit $ac_status); }; } &&
12805 { ac_try='test -s conftest.$ac_objext'
12806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12807 (eval $ac_try) 2>&5
12808 ac_status=$?
12809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12810 (exit $ac_status); }; }; then
c1800ec8
ZW
12811 gcc_cv_type_clock_t=yes
12812else
ba479fd2
NN
12813 echo "$as_me: failed program was:" >&5
12814sed 's/^/| /' conftest.$ac_ext >&5
12815
b61ff9c8 12816gcc_cv_type_clock_t=no
c1800ec8 12817fi
b61ff9c8 12818rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 12819fi
b61ff9c8
BS
12820echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
12821echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 12822if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
12823
12824cat >>confdefs.h <<\_ACEOF
c1800ec8 12825#define HAVE_CLOCK_T 1
ba479fd2 12826_ACEOF
c1800ec8
ZW
12827
12828fi
12829
eb70d86d
AS
12830# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
12831CFLAGS="$saved_CFLAGS"
12832
b61ff9c8 12833# Check whether --enable-initfini-array or --disable-initfini-array was given.
07cf4226 12834if test "${enable_initfini_array+set}" = set; then
b61ff9c8
BS
12835 enableval="$enable_initfini_array"
12836
07cf4226 12837else
ba479fd2 12838
b61ff9c8
BS
12839echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
12840echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
ba479fd2
NN
12841if test "${gcc_cv_initfini_array+set}" = set; then
12842 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 12843else
eb70d86d 12844 if test "$cross_compiling" = yes; then
918c4fe4 12845 gcc_cv_initfini_array=no
eb70d86d 12846else
ba479fd2 12847 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12848/* confdefs.h. */
12849_ACEOF
12850cat confdefs.h >>conftest.$ac_ext
12851cat >>conftest.$ac_ext <<_ACEOF
12852/* end confdefs.h. */
eb70d86d 12853
07cf4226
DM
12854static int x = -1;
12855int main (void) { return x; }
12856int foo (void) { x = 0; }
12857int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
12858_ACEOF
12859rm -f conftest$ac_exeext
b61ff9c8
BS
12860if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12861 (eval $ac_link) 2>&5
ba479fd2
NN
12862 ac_status=$?
12863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12864 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
12865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12866 (eval $ac_try) 2>&5
ba479fd2
NN
12867 ac_status=$?
12868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12869 (exit $ac_status); }; }; then
918c4fe4 12870 gcc_cv_initfini_array=yes
eb70d86d 12871else
ba479fd2
NN
12872 echo "$as_me: program exited with status $ac_status" >&5
12873echo "$as_me: failed program was:" >&5
12874sed 's/^/| /' conftest.$ac_ext >&5
12875
12876( exit $ac_status )
12877gcc_cv_initfini_array=no
eb70d86d 12878fi
b61ff9c8 12879rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 12880fi
07cf4226 12881fi
b61ff9c8
BS
12882echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
12883echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 12884 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 12885
b61ff9c8 12886fi;
63cf211a 12887if test $enable_initfini_array = yes; then
ba479fd2
NN
12888
12889cat >>confdefs.h <<\_ACEOF
eb70d86d 12890#define HAVE_INITFINI_ARRAY 1
ba479fd2 12891_ACEOF
07cf4226 12892
eb70d86d 12893fi
81bf3d9e 12894
ba479fd2 12895# mkdir takes a single argument on some systems.
b61ff9c8
BS
12896echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
12897echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
ba479fd2
NN
12898if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
12899 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 12900else
ba479fd2 12901 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12902/* confdefs.h. */
12903_ACEOF
12904cat confdefs.h >>conftest.$ac_ext
12905cat >>conftest.$ac_ext <<_ACEOF
12906/* end confdefs.h. */
75923b2f
MK
12907
12908#include <sys/types.h>
12909#ifdef HAVE_SYS_STAT_H
12910# include <sys/stat.h>
12911#endif
12912#ifdef HAVE_UNISTD_H
12913# include <unistd.h>
12914#endif
12915#ifdef HAVE_DIRECT_H
12916# include <direct.h>
12917#endif
ba479fd2
NN
12918int
12919main ()
12920{
75923b2f 12921mkdir ("foo", 0);
ba479fd2
NN
12922 ;
12923 return 0;
12924}
12925_ACEOF
12926rm -f conftest.$ac_objext
b61ff9c8
BS
12927if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12928 (eval $ac_compile) 2>conftest.er1
ba479fd2 12929 ac_status=$?
86da66b5
HPN
12930 grep -v '^ *+' conftest.er1 >conftest.err
12931 rm -f conftest.er1
12932 cat conftest.err >&5
ba479fd2 12933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12934 (exit $ac_status); } &&
12935 { ac_try='test -z "$ac_c_werror_flag"
12936 || test ! -s conftest.err'
12937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12938 (eval $ac_try) 2>&5
12939 ac_status=$?
12940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12941 (exit $ac_status); }; } &&
12942 { ac_try='test -s conftest.$ac_objext'
12943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12944 (eval $ac_try) 2>&5
12945 ac_status=$?
12946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12947 (exit $ac_status); }; }; then
75923b2f
MK
12948 gcc_cv_mkdir_takes_one_arg=no
12949else
ba479fd2
NN
12950 echo "$as_me: failed program was:" >&5
12951sed 's/^/| /' conftest.$ac_ext >&5
12952
b61ff9c8 12953gcc_cv_mkdir_takes_one_arg=yes
75923b2f 12954fi
b61ff9c8 12955rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 12956fi
b61ff9c8
BS
12957echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
12958echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 12959if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
12960
12961cat >>confdefs.h <<\_ACEOF
75923b2f 12962#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 12963_ACEOF
75923b2f
MK
12964
12965fi
12966
12967
861bb6c1
JL
12968# File extensions
12969manext='.1'
12970objext='.o'
12971
12972
12973
4977bab6 12974# With Setjmp/Longjmp based exception handling.
b61ff9c8 12975# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
4977bab6 12976if test "${enable_sjlj_exceptions+set}" = set; then
b61ff9c8 12977 enableval="$enable_sjlj_exceptions"
399fe3e1
JDA
12978 case $target in
12979 *-*-hpux10*)
12980 if test $enableval != yes; then
12981 { echo "$as_me:$LINENO: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&5
12982echo "$as_me: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&2;}
12983 enableval=yes
12984 fi
12985 ;;
12986esac
12987force_sjlj_exceptions=yes
12988else
12989 case $target in
12990 *-*-hpux10*)
12991 force_sjlj_exceptions=yes
12992 enableval=yes
12993 ;;
12994 *)
12995 force_sjlj_exceptions=no
12996 ;;
12997esac
12998fi;
12999if test $force_sjlj_exceptions = yes; then
b61ff9c8 13000 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 13001
ba479fd2
NN
13002cat >>confdefs.h <<_ACEOF
13003#define CONFIG_SJLJ_EXCEPTIONS $sjlj
13004_ACEOF
4977bab6 13005
399fe3e1 13006fi
4977bab6 13007
443728bb
L
13008# For platforms with the unwind ABI which includes an unwind library,
13009# libunwind, we can choose to use the system libunwind.
4977bab6 13010
b61ff9c8 13011# Check whether --with-system-libunwind or --without-system-libunwind was given.
443728bb 13012if test "${with_system_libunwind+set}" = set; then
b61ff9c8 13013 withval="$with_system_libunwind"
4977bab6 13014
b61ff9c8 13015fi;
4977bab6 13016
e64f5acf
SE
13017# config.gcc also contains tests of with_system_libunwind.
13018if test x$with_system_libunwind = xyes; then
13019
13020cat >>confdefs.h <<\_ACEOF
13021#define HAVE_GETIPINFO 1
13022_ACEOF
13023
13024fi
13025
34a86c2b
NN
13026# --------------------------------------------------------
13027# Build, host, and target specific configuration fragments
13028# --------------------------------------------------------
13029
5b28c537
NN
13030# Collect build-machine-specific information.
13031. ${srcdir}/config.build
13032
a89ea0df
NN
13033# Collect host-machine-specific information.
13034. ${srcdir}/config.host
13035
ef69da62 13036target_gtfiles=
a89ea0df
NN
13037
13038# Collect target-machine-specific information.
8ad9fb33 13039. ${srcdir}/config.gcc
861bb6c1
JL
13040
13041extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 13042extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
13043
13044# Default the target-machine variables that were not explicitly set.
75bffa71 13045if test x"$tm_file" = x
861bb6c1
JL
13046then tm_file=$cpu_type/$cpu_type.h; fi
13047
6b2adea9 13048if test x"$extra_headers" = x
861bb6c1
JL
13049then extra_headers=; fi
13050
75bffa71 13051if test x$md_file = x
e98e406f 13052then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 13053
75bffa71 13054if test x$out_file = x
861bb6c1
JL
13055then out_file=$cpu_type/$cpu_type.c; fi
13056
75bffa71 13057if test x"$tmake_file" = x
861bb6c1
JL
13058then tmake_file=$cpu_type/t-$cpu_type
13059fi
13060
90e6a802 13061if test x"$dwarf2" = xyes
756ee602 13062then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
13063fi
13064
861bb6c1 13065# Say what files are being used for the output code and MD file.
11642c3a 13066echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
13067echo "Using \`$srcdir/config/$md_file' as machine description file."
13068
11642c3a 13069# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
13070# about them and drop them.
13071
11642c3a
ZW
13072bx=
13073for x in $build_xm_file; do
13074 if test -f $srcdir/config/$x
13075 then bx="$bx $x"
ba479fd2
NN
13076 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13077echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13078 fi
13079done
13080build_xm_file="$bx"
13081
13082hx=
13083for x in $host_xm_file; do
13084 if test -f $srcdir/config/$x
13085 then hx="$hx $x"
ba479fd2
NN
13086 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13087echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13088 fi
13089done
13090host_xm_file="$hx"
13091
13092tx=
13093for x in $xm_file; do
13094 if test -f $srcdir/config/$x
13095 then tx="$tx $x"
ba479fd2
NN
13096 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13097echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13098 fi
13099done
13100xm_file="$tx"
13101
861bb6c1
JL
13102count=a
13103for f in $tm_file; do
13104 count=${count}x
13105done
75bffa71 13106if test $count = ax; then
861bb6c1
JL
13107 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
13108else
13109 echo "Using the following target machine macro files:"
13110 for f in $tm_file; do
13111 echo " $srcdir/config/$f"
13112 done
13113fi
13114
4977bab6 13115if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
13116
13117cat >>confdefs.h <<\_ACEOF
4977bab6 13118#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 13119_ACEOF
4977bab6
ZW
13120
13121fi
13122
99fa8911
AP
13123if test x$use_long_long_for_widest_fast_int = xyes; then
13124
13125cat >>confdefs.h <<\_ACEOF
13126#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
13127_ACEOF
13128
13129fi
13130
861bb6c1
JL
13131count=a
13132for f in $host_xm_file; do
13133 count=${count}x
13134done
11642c3a
ZW
13135if test $count = a; then
13136 :
13137elif test $count = ax; then
861bb6c1
JL
13138 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
13139else
13140 echo "Using the following host machine macro files:"
13141 for f in $host_xm_file; do
13142 echo " $srcdir/config/$f"
13143 done
13144fi
476d9098 13145echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 13146
75bffa71 13147if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
13148 count=a
13149 for f in $build_xm_file; do
13150 count=${count}x
13151 done
11642c3a
ZW
13152 if test $count = a; then
13153 :
13154 elif test $count = ax; then
861bb6c1
JL
13155 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
13156 else
13157 echo "Using the following build machine macro files:"
13158 for f in $build_xm_file; do
13159 echo " $srcdir/config/$f"
13160 done
13161 fi
13162fi
13163
4f6d8cc8 13164case ${host} in
b8ec3cc8 13165 powerpc*-*-darwin*)
b61ff9c8
BS
13166 echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
13167echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6
4f6d8cc8
GK
13168if test "${gcc_cv_mcontext_underscores+set}" = set; then
13169 echo $ECHO_N "(cached) $ECHO_C" >&6
13170else
13171 cat >conftest.$ac_ext <<_ACEOF
13172
ba7da42a 13173#include <sys/cdefs.h>
de4fb767 13174#include <sys/signal.h>
4f6d8cc8
GK
13175#include <ucontext.h>
13176int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
13177
13178_ACEOF
13179rm -f conftest.$ac_objext
b61ff9c8
BS
13180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13181 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
13182 ac_status=$?
13183 grep -v '^ *+' conftest.er1 >conftest.err
13184 rm -f conftest.er1
13185 cat conftest.err >&5
13186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13187 (exit $ac_status); } &&
13188 { ac_try='test -z "$ac_c_werror_flag"
13189 || test ! -s conftest.err'
13190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13191 (eval $ac_try) 2>&5
13192 ac_status=$?
13193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13194 (exit $ac_status); }; } &&
13195 { ac_try='test -s conftest.$ac_objext'
13196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13197 (eval $ac_try) 2>&5
13198 ac_status=$?
13199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13200 (exit $ac_status); }; }; then
4f6d8cc8
GK
13201 gcc_cv_mcontext_underscores=no
13202else
13203 echo "$as_me: failed program was:" >&5
13204sed 's/^/| /' conftest.$ac_ext >&5
13205
b61ff9c8 13206gcc_cv_mcontext_underscores=yes
4f6d8cc8 13207fi
b61ff9c8 13208rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8 13209fi
b61ff9c8
BS
13210echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
13211echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6
4f6d8cc8
GK
13212 if test $gcc_cv_mcontext_underscores = yes; then
13213
13214cat >>confdefs.h <<\_ACEOF
13215#define HAS_MCONTEXT_T_UNDERSCORES
13216_ACEOF
13217
13218 fi
13219 ;;
13220esac
13221
8bb915b6
NN
13222# ---------
13223# Threading
13224# ---------
13225
c2e494a8 13226# Check if a valid thread package
615be2cf 13227case ${enable_threads} in
c2e494a8
NN
13228 "" | no)
13229 # No threads
13230 target_thread_file='single'
13231 ;;
13232 yes)
13233 # default
13234 target_thread_file='single'
13235 ;;
18167442 13236 aix | dce | gnat | irix | posix | posix95 | rtems | \
d9dced13 13237 single | solaris | vxworks | win32 | mipssde)
615be2cf 13238 target_thread_file=${enable_threads}
c2e494a8
NN
13239 ;;
13240 *)
615be2cf 13241 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
13242 exit 1
13243 ;;
13244esac
13245
13246if test x${thread_file} = x; then
13247 # No thread file set by target-specific clauses in config.gcc,
13248 # so use file chosen by default logic above
13249 thread_file=${target_thread_file}
861bb6c1
JL
13250fi
13251
8bb915b6
NN
13252# Make gthr-default.h if we have a thread file.
13253gthread_flags=
13254if test $thread_file != single; then
13255 rm -f gthr-default.h
13256 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
13257 gthread_flags=-DHAVE_GTHR_DEFAULT
13258fi
13259
13260
13261# --------
13262# UNSORTED
13263# --------
13264
18fbf599 13265use_cxa_atexit=no
2121a768
JT
13266if test x$enable___cxa_atexit = xyes || \
13267 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599 13268 if test x$host = x$target; then
97388150
DS
13269 case $host in
13270 # mingw32 doesn't have __cxa_atexit but uses atexit registration
13271 # keyed to flag_use_cxa_atexit
13272 *-*-mingw32*)
13273 use_cxa_atexit=yes
13274 ;;
13275 *)
b61ff9c8
BS
13276 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
13277echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
354b7da5
DH
13278if test "${ac_cv_func___cxa_atexit+set}" = set; then
13279 echo $ECHO_N "(cached) $ECHO_C" >&6
13280else
13281 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
13282/* confdefs.h. */
13283_ACEOF
13284cat confdefs.h >>conftest.$ac_ext
13285cat >>conftest.$ac_ext <<_ACEOF
13286/* end confdefs.h. */
86da66b5
HPN
13287/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
13288 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13289#define __cxa_atexit innocuous___cxa_atexit
13290
354b7da5
DH
13291/* System header to define __stub macros and hopefully few prototypes,
13292 which can conflict with char __cxa_atexit (); below.
13293 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13294 <limits.h> exists even on freestanding compilers. */
86da66b5 13295
354b7da5
DH
13296#ifdef __STDC__
13297# include <limits.h>
13298#else
13299# include <assert.h>
13300#endif
86da66b5
HPN
13301
13302#undef __cxa_atexit
13303
b61ff9c8 13304/* Override any gcc2 internal prototype to avoid an error. */
354b7da5
DH
13305#ifdef __cplusplus
13306extern "C"
b61ff9c8 13307{
354b7da5 13308#endif
b61ff9c8
BS
13309/* We use char because int might match the return type of a gcc2
13310 builtin and then its argument prototype would still apply. */
354b7da5
DH
13311char __cxa_atexit ();
13312/* The GNU C library defines this for functions which it implements
13313 to always fail with ENOSYS. Some functions are actually named
13314 something starting with __ and the normal name is an alias. */
b61ff9c8 13315#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
354b7da5 13316choke me
b61ff9c8
BS
13317#else
13318char (*f) () = __cxa_atexit;
13319#endif
13320#ifdef __cplusplus
13321}
354b7da5
DH
13322#endif
13323
13324int
13325main ()
13326{
b61ff9c8 13327return f != __cxa_atexit;
354b7da5
DH
13328 ;
13329 return 0;
13330}
13331_ACEOF
13332rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
13333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13334 (eval $ac_link) 2>conftest.er1
354b7da5 13335 ac_status=$?
86da66b5
HPN
13336 grep -v '^ *+' conftest.er1 >conftest.err
13337 rm -f conftest.er1
13338 cat conftest.err >&5
354b7da5 13339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13340 (exit $ac_status); } &&
13341 { ac_try='test -z "$ac_c_werror_flag"
13342 || test ! -s conftest.err'
13343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13344 (eval $ac_try) 2>&5
13345 ac_status=$?
13346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13347 (exit $ac_status); }; } &&
13348 { ac_try='test -s conftest$ac_exeext'
13349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13350 (eval $ac_try) 2>&5
13351 ac_status=$?
13352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13353 (exit $ac_status); }; }; then
354b7da5
DH
13354 ac_cv_func___cxa_atexit=yes
13355else
13356 echo "$as_me: failed program was:" >&5
13357sed 's/^/| /' conftest.$ac_ext >&5
13358
b61ff9c8 13359ac_cv_func___cxa_atexit=no
354b7da5 13360fi
b61ff9c8 13361rm -f conftest.err conftest.$ac_objext \
86da66b5 13362 conftest$ac_exeext conftest.$ac_ext
354b7da5 13363fi
b61ff9c8
BS
13364echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
13365echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
354b7da5 13366if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
13367 use_cxa_atexit=yes
13368else
13369 echo "__cxa_atexit can't be enabled on this target"
13370fi
13371
5f60e48f 13372 ;;
97388150 13373 esac
18fbf599
PB
13374 else
13375 # We can't check for __cxa_atexit when building a cross, so assume
13376 # it is available
13377 use_cxa_atexit=yes
13378 fi
13379 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
13380
13381cat >>confdefs.h <<\_ACEOF
c7b5e395 13382#define DEFAULT_USE_CXA_ATEXIT 2
ba479fd2 13383_ACEOF
2121a768 13384
18fbf599 13385 fi
2121a768
JT
13386fi
13387
e64f5acf
SE
13388use_getipinfo=yes
13389if test x$with_system_libunwind = xyes; then
13390 if test x$host = x$target; then
b61ff9c8
BS
13391 echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5
13392echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6
e64f5acf
SE
13393if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
13394 echo $ECHO_N "(cached) $ECHO_C" >&6
13395else
13396 ac_func_search_save_LIBS=$LIBS
b61ff9c8 13397ac_cv_search__Unwind_GetIPInfo=no
e64f5acf
SE
13398cat >conftest.$ac_ext <<_ACEOF
13399/* confdefs.h. */
13400_ACEOF
13401cat confdefs.h >>conftest.$ac_ext
13402cat >>conftest.$ac_ext <<_ACEOF
13403/* end confdefs.h. */
13404
b61ff9c8 13405/* Override any gcc2 internal prototype to avoid an error. */
e64f5acf
SE
13406#ifdef __cplusplus
13407extern "C"
13408#endif
b61ff9c8
BS
13409/* We use char because int might match the return type of a gcc2
13410 builtin and then its argument prototype would still apply. */
e64f5acf
SE
13411char _Unwind_GetIPInfo ();
13412int
13413main ()
13414{
b61ff9c8 13415_Unwind_GetIPInfo ();
e64f5acf
SE
13416 ;
13417 return 0;
13418}
13419_ACEOF
b61ff9c8
BS
13420rm -f conftest.$ac_objext conftest$ac_exeext
13421if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13422 (eval $ac_link) 2>conftest.er1
e64f5acf
SE
13423 ac_status=$?
13424 grep -v '^ *+' conftest.er1 >conftest.err
13425 rm -f conftest.er1
13426 cat conftest.err >&5
13427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13428 (exit $ac_status); } &&
13429 { ac_try='test -z "$ac_c_werror_flag"
13430 || test ! -s conftest.err'
13431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13432 (eval $ac_try) 2>&5
13433 ac_status=$?
13434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13435 (exit $ac_status); }; } &&
13436 { ac_try='test -s conftest$ac_exeext'
13437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13438 (eval $ac_try) 2>&5
13439 ac_status=$?
13440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13441 (exit $ac_status); }; }; then
13442 ac_cv_search__Unwind_GetIPInfo="none required"
e64f5acf
SE
13443else
13444 echo "$as_me: failed program was:" >&5
13445sed 's/^/| /' conftest.$ac_ext >&5
13446
1a4b763e 13447fi
b61ff9c8
BS
13448rm -f conftest.err conftest.$ac_objext \
13449 conftest$ac_exeext conftest.$ac_ext
13450if test "$ac_cv_search__Unwind_GetIPInfo" = no; then
13451 for ac_lib in unwind; do
13452 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13453 cat >conftest.$ac_ext <<_ACEOF
13454/* confdefs.h. */
13455_ACEOF
13456cat confdefs.h >>conftest.$ac_ext
13457cat >>conftest.$ac_ext <<_ACEOF
13458/* end confdefs.h. */
2f41c1d6 13459
b61ff9c8
BS
13460/* Override any gcc2 internal prototype to avoid an error. */
13461#ifdef __cplusplus
13462extern "C"
13463#endif
13464/* We use char because int might match the return type of a gcc2
13465 builtin and then its argument prototype would still apply. */
13466char _Unwind_GetIPInfo ();
13467int
13468main ()
13469{
13470_Unwind_GetIPInfo ();
13471 ;
13472 return 0;
13473}
13474_ACEOF
13475rm -f conftest.$ac_objext conftest$ac_exeext
13476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13477 (eval $ac_link) 2>conftest.er1
13478 ac_status=$?
13479 grep -v '^ *+' conftest.er1 >conftest.err
13480 rm -f conftest.er1
13481 cat conftest.err >&5
13482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13483 (exit $ac_status); } &&
13484 { ac_try='test -z "$ac_c_werror_flag"
13485 || test ! -s conftest.err'
13486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13487 (eval $ac_try) 2>&5
13488 ac_status=$?
13489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13490 (exit $ac_status); }; } &&
13491 { ac_try='test -s conftest$ac_exeext'
13492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13493 (eval $ac_try) 2>&5
13494 ac_status=$?
13495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13496 (exit $ac_status); }; }; then
13497 ac_cv_search__Unwind_GetIPInfo="-l$ac_lib"
13498break
1a4b763e 13499else
b61ff9c8
BS
13500 echo "$as_me: failed program was:" >&5
13501sed 's/^/| /' conftest.$ac_ext >&5
13502
13503fi
13504rm -f conftest.err conftest.$ac_objext \
13505 conftest$ac_exeext conftest.$ac_ext
13506 done
a6ccdbab 13507fi
a6ccdbab
EC
13508LIBS=$ac_func_search_save_LIBS
13509fi
b61ff9c8
BS
13510echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5
13511echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6
13512if test "$ac_cv_search__Unwind_GetIPInfo" != no; then
13513 test "$ac_cv_search__Unwind_GetIPInfo" = "none required" || LIBS="$ac_cv_search__Unwind_GetIPInfo $LIBS"
a6ccdbab
EC
13514
13515else
13516 use_getipinfo=no
13517fi
13518
13519 fi
13520fi
13521
13522if test x$use_getipinfo = xyes; then
13523
13524cat >>confdefs.h <<\_ACEOF
13525#define HAVE_GETIPINFO 1
e64f5acf
SE
13526_ACEOF
13527
13528else
13529 echo "The system unwind library does not support _Unwind_GetIPInfo."
13530fi
13531
a5381466 13532# Look for a file containing extra machine modes.
1c0ca89d
ZW
13533if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
13534 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
13535
13536
13537cat >>confdefs.h <<_ACEOF
e22340b0 13538#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 13539_ACEOF
a5381466
ZW
13540
13541fi
13542
75685792
RS
13543# Convert extra_options into a form suitable for Makefile use.
13544extra_opt_files=
13545for f in $extra_options; do
13546 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
13547done
13548
13549
b7cb92ad 13550# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 13551# the first file included by config.h.
4977bab6 13552# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 13553# as well. If host!=build, we are in error and need to do more
db81d74a 13554# work to find out the build config parameters.
75bffa71 13555if test x$host = x$build
db81d74a 13556then
eaf4e618 13557 build_auto=auto-host.h
b7cb92ad
JL
13558else
13559 # We create a subdir, then run autoconf in the subdir.
13560 # To prevent recursion we set host and build for the new
13561 # invocation of configure to the build for this invocation
ba479fd2 13562 # of configure.
b7cb92ad
JL
13563 tempdir=build.$$
13564 rm -rf $tempdir
13565 mkdir $tempdir
13566 cd $tempdir
13567 case ${srcdir} in
255b8a49 13568 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
13569 *) realsrcdir=../${srcdir};;
13570 esac
d920e825
L
13571 saved_CFLAGS="${CFLAGS}"
13572 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
13573 ${realsrcdir}/configure \
33e70558 13574 --enable-languages=${enable_languages-all} \
534d0cc0 13575 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 13576 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
13577
13578 # We just finished tests for the build machine, so rename
13579 # the file auto-build.h in the gcc directory.
13580 mv auto-host.h ../auto-build.h
13581 cd ..
13582 rm -rf $tempdir
eaf4e618 13583 build_auto=auto-build.h
db81d74a
RH
13584fi
13585
06f0b04c 13586
eaf4e618 13587tm_file="${tm_file} defaults.h"
4977bab6
ZW
13588tm_p_file="${tm_p_file} tm-preds.h"
13589host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
13590build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 13591# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 13592# put this back in temporarily.
232b67d9 13593xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 13594
34a86c2b
NN
13595# --------
13596# UNSORTED
13597# --------
13598
cc1e60ea 13599# Compile in configure arguments.
8105825d 13600if test -f configargs.h ; then
cc1e60ea 13601 # Being re-configured.
022dae81 13602 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
13603 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
13604else
13605 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
13606fi
eeae7b41
DJ
13607
13608# Double all backslashes and backslash all quotes to turn
13609# gcc_config_arguments into a C string.
13610sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
13611$gcc_config_arguments
13612EOF
13613gcc_config_arguments_str=`cat conftest.out`
13614rm -f conftest.out
13615
cc1e60ea
JM
13616cat > configargs.h <<EOF
13617/* Generated automatically. */
eeae7b41 13618static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 13619static const char thread_model[] = "$thread_file";
7816bea0
DJ
13620
13621static const struct {
13622 const char *name, *value;
13623} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
13624EOF
13625
ab87f8c8 13626# Internationalization
18fc9bd4
RG
13627# If we haven't got the data from the intl directory,
13628# assume NLS is disabled.
13629USE_NLS=no
13630LIBINTL=
13631LIBINTL_DEP=
13632INCINTL=
13633XGETTEXT=
13634GMSGFMT=
13635POSUB=
13636
13637if test -f ../intl/config.intl; then
13638 . ../intl/config.intl
13639fi
b61ff9c8
BS
13640echo "$as_me:$LINENO: checking whether NLS is requested" >&5
13641echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
18fc9bd4 13642if test x"$USE_NLS" != xyes; then
b61ff9c8
BS
13643 echo "$as_me:$LINENO: result: no" >&5
13644echo "${ECHO_T}no" >&6
18fc9bd4 13645else
b61ff9c8
BS
13646 echo "$as_me:$LINENO: result: yes" >&5
13647echo "${ECHO_T}yes" >&6
18fc9bd4
RG
13648
13649cat >>confdefs.h <<\_ACEOF
13650#define ENABLE_NLS 1
13651_ACEOF
13652
13653
b61ff9c8
BS
13654 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
13655echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
18fc9bd4
RG
13656 # Look for .po and .gmo files in the source directory.
13657 CATALOGS=
13658 XLINGUAS=
13659 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
13660 # If there aren't any .gmo files the shell will give us the
13661 # literal string "../path/to/srcdir/po/*.gmo" which has to be
13662 # weeded out.
13663 case "$cat" in *\**)
13664 continue;;
13665 esac
13666 # The quadruple backslash is collapsed to a double backslash
13667 # by the backticks, then collapsed again by the double quotes,
13668 # leaving us with one backslash in the sed expression (right
13669 # before the dot that mustn't act as a wildcard).
13670 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
13671 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
13672 # The user is allowed to set LINGUAS to a list of languages to
13673 # install catalogs for. If it's empty that means "all of them."
13674 if test "x$LINGUAS" = x; then
13675 CATALOGS="$CATALOGS $cat"
13676 XLINGUAS="$XLINGUAS $lang"
13677 else
13678 case "$LINGUAS" in *$lang*)
13679 CATALOGS="$CATALOGS $cat"
13680 XLINGUAS="$XLINGUAS $lang"
13681 ;;
13682 esac
13683 fi
13684 done
13685 LINGUAS="$XLINGUAS"
b61ff9c8
BS
13686 echo "$as_me:$LINENO: result: $LINGUAS" >&5
13687echo "${ECHO_T}$LINGUAS" >&6
18fc9bd4
RG
13688
13689
13690 DATADIRNAME=share
13691
13692 INSTOBJEXT=.mo
13693
13694 GENCAT=gencat
13695
13696 CATOBJEXT=.gmo
13697
13698fi
861bb6c1 13699
56694dd9
ZW
13700# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
13701# -liconv on the link line twice.
13702case "$LIBINTL" in *$LIBICONV*)
13703 LIBICONV= ;;
13704esac
dc6746e7 13705
b61ff9c8 13706# Check whether --enable-secureplt or --disable-secureplt was given.
7f970b70 13707if test "${enable_secureplt+set}" = set; then
b61ff9c8 13708 enableval="$enable_secureplt"
7f970b70 13709
b61ff9c8 13710fi;
7f970b70 13711
56694dd9 13712# Windows32 Registry support for specifying GCC installation paths.
b61ff9c8 13713# Check whether --enable-win32-registry or --disable-win32-registry was given.
56694dd9 13714if test "${enable_win32_registry+set}" = set; then
b61ff9c8 13715 enableval="$enable_win32_registry"
dc6746e7 13716
b61ff9c8 13717fi;
ba479fd2 13718
a1286ef5
ZW
13719case $host_os in
13720 win32 | pe | cygwin* | mingw32* | uwin*)
13721 if test "x$enable_win32_registry" != xno; then
b61ff9c8
BS
13722 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
13723echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
ba479fd2
NN
13724if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
13725 echo $ECHO_N "(cached) $ECHO_C" >&6
13726else
13727 ac_func_search_save_LIBS=$LIBS
b61ff9c8 13728ac_cv_search_RegOpenKeyExA=no
ba479fd2 13729cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
13730/* confdefs.h. */
13731_ACEOF
13732cat confdefs.h >>conftest.$ac_ext
13733cat >>conftest.$ac_ext <<_ACEOF
13734/* end confdefs.h. */
861bb6c1 13735
b61ff9c8 13736/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
13737#ifdef __cplusplus
13738extern "C"
13739#endif
b61ff9c8
BS
13740/* We use char because int might match the return type of a gcc2
13741 builtin and then its argument prototype would still apply. */
ba479fd2
NN
13742char RegOpenKeyExA ();
13743int
13744main ()
13745{
b61ff9c8 13746RegOpenKeyExA ();
ba479fd2
NN
13747 ;
13748 return 0;
13749}
13750_ACEOF
b61ff9c8
BS
13751rm -f conftest.$ac_objext conftest$ac_exeext
13752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13753 (eval $ac_link) 2>conftest.er1
ba479fd2 13754 ac_status=$?
86da66b5
HPN
13755 grep -v '^ *+' conftest.er1 >conftest.err
13756 rm -f conftest.er1
13757 cat conftest.err >&5
ba479fd2 13758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13759 (exit $ac_status); } &&
13760 { ac_try='test -z "$ac_c_werror_flag"
13761 || test ! -s conftest.err'
13762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13763 (eval $ac_try) 2>&5
13764 ac_status=$?
13765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13766 (exit $ac_status); }; } &&
13767 { ac_try='test -s conftest$ac_exeext'
13768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13769 (eval $ac_try) 2>&5
13770 ac_status=$?
13771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13772 (exit $ac_status); }; }; then
13773 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 13774else
ba479fd2
NN
13775 echo "$as_me: failed program was:" >&5
13776sed 's/^/| /' conftest.$ac_ext >&5
13777
1a4b763e 13778fi
b61ff9c8
BS
13779rm -f conftest.err conftest.$ac_objext \
13780 conftest$ac_exeext conftest.$ac_ext
13781if test "$ac_cv_search_RegOpenKeyExA" = no; then
13782 for ac_lib in advapi32; do
13783 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13784 cat >conftest.$ac_ext <<_ACEOF
13785/* confdefs.h. */
13786_ACEOF
13787cat confdefs.h >>conftest.$ac_ext
13788cat >>conftest.$ac_ext <<_ACEOF
13789/* end confdefs.h. */
2f41c1d6 13790
b61ff9c8
BS
13791/* Override any gcc2 internal prototype to avoid an error. */
13792#ifdef __cplusplus
13793extern "C"
13794#endif
13795/* We use char because int might match the return type of a gcc2
13796 builtin and then its argument prototype would still apply. */
13797char RegOpenKeyExA ();
13798int
13799main ()
13800{
13801RegOpenKeyExA ();
13802 ;
13803 return 0;
13804}
13805_ACEOF
13806rm -f conftest.$ac_objext conftest$ac_exeext
13807if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13808 (eval $ac_link) 2>conftest.er1
13809 ac_status=$?
13810 grep -v '^ *+' conftest.er1 >conftest.err
13811 rm -f conftest.er1
13812 cat conftest.err >&5
13813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13814 (exit $ac_status); } &&
13815 { ac_try='test -z "$ac_c_werror_flag"
13816 || test ! -s conftest.err'
13817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13818 (eval $ac_try) 2>&5
13819 ac_status=$?
13820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13821 (exit $ac_status); }; } &&
13822 { ac_try='test -s conftest$ac_exeext'
13823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13824 (eval $ac_try) 2>&5
13825 ac_status=$?
13826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13827 (exit $ac_status); }; }; then
13828 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
13829break
1a4b763e 13830else
b61ff9c8
BS
13831 echo "$as_me: failed program was:" >&5
13832sed 's/^/| /' conftest.$ac_ext >&5
13833
13834fi
13835rm -f conftest.err conftest.$ac_objext \
13836 conftest$ac_exeext conftest.$ac_ext
13837 done
dd7f7a6e
EC
13838fi
13839LIBS=$ac_func_search_save_LIBS
13840fi
b61ff9c8
BS
13841echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
13842echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
13843if test "$ac_cv_search_RegOpenKeyExA" != no; then
13844 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
dd7f7a6e
EC
13845
13846else
13847 enable_win32_registry=no
13848fi
13849
13850 fi
13851
13852 if test "x$enable_win32_registry" != xno; then
13853
13854cat >>confdefs.h <<\_ACEOF
13855#define ENABLE_WIN32_REGISTRY 1
13856_ACEOF
13857
13858
13859 if test "x$enable_win32_registry" != xyes \
13860 && test "x$enable_win32_registry" != x; then
13861
13862cat >>confdefs.h <<_ACEOF
13863#define WIN32_REGISTRY_KEY "$enable_win32_registry"
13864_ACEOF
13865
13866 fi
13867 fi
13868 ;;
13869esac
ab87f8c8 13870
56694dd9
ZW
13871# Get an absolute path to the GCC top-level source directory
13872holddir=`${PWDCMD-pwd}`
13873cd $srcdir
13874topdir=`${PWDCMD-pwd}`
13875cd $holddir
ab87f8c8 13876
56694dd9 13877# Conditionalize the makefile for this host machine.
2ed26f6b 13878xmake_file=
c406e779 13879for f in ${host_xmake_file}
56694dd9
ZW
13880do
13881 if test -f ${srcdir}/config/$f
13882 then
2ed26f6b 13883 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
13884 fi
13885done
093e61a6 13886
56694dd9 13887# Conditionalize the makefile for this target machine.
2ed26f6b 13888tmake_file_=
c406e779 13889for f in ${tmake_file}
56694dd9
ZW
13890do
13891 if test -f ${srcdir}/config/$f
13892 then
2ed26f6b 13893 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
13894 fi
13895done
2ed26f6b 13896tmake_file="${tmake_file_}"
71a94577 13897
5395b47b
NN
13898# This is a terrible hack which will go away some day.
13899host_cc_for_libada=${CC}
1e3fad21
NN
13900
13901
ab87f8c8
JL
13902out_object_file=`basename $out_file .c`.o
13903
75685792
RS
13904tm_file_list="options.h"
13905tm_include_list="options.h"
ab87f8c8 13906for f in $tm_file; do
64ccbc99 13907 case $f in
3ca43df7
RS
13908 ./* )
13909 f=`echo $f | sed 's/^..//'`
13910 tm_file_list="${tm_file_list} $f"
13911 tm_include_list="${tm_include_list} $f"
13912 ;;
d02af173 13913 defaults.h )
e22340b0
ZW
13914 tm_file_list="${tm_file_list} \$(srcdir)/$f"
13915 tm_include_list="${tm_include_list} $f"
13916 ;;
13917 * )
13918 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
13919 tm_include_list="${tm_include_list} config/$f"
13920 ;;
64ccbc99 13921 esac
ab87f8c8
JL
13922done
13923
11642c3a 13924tm_p_file_list=
e22340b0 13925tm_p_include_list=
11642c3a 13926for f in $tm_p_file; do
4977bab6
ZW
13927 case $f in
13928 tm-preds.h )
e22340b0
ZW
13929 tm_p_file_list="${tm_p_file_list} $f"
13930 tm_p_include_list="${tm_p_include_list} $f"
13931 ;;
13932 * )
13933 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
13934 tm_p_include_list="${tm_p_include_list} config/$f"
13935 esac
13936done
13937
13938xm_file_list=
13939xm_include_list=
13940for f in $xm_file; do
13941 case $f in
13942 ansidecl.h )
13943 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
13944 xm_include_list="${xm_include_list} $f"
13945 ;;
13946 auto-host.h )
13947 xm_file_list="${xm_file_list} $f"
13948 xm_include_list="${xm_include_list} $f"
13949 ;;
13950 * )
13951 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
13952 xm_include_list="${xm_include_list} config/$f"
13953 ;;
4977bab6 13954 esac
11642c3a
ZW
13955done
13956
ab87f8c8 13957host_xm_file_list=
e22340b0 13958host_xm_include_list=
ab87f8c8 13959for f in $host_xm_file; do
64ccbc99 13960 case $f in
d02af173 13961 ansidecl.h )
e22340b0
ZW
13962 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
13963 host_xm_include_list="${host_xm_include_list} $f"
13964 ;;
e2500fed 13965 auto-host.h )
e22340b0
ZW
13966 host_xm_file_list="${host_xm_file_list} $f"
13967 host_xm_include_list="${host_xm_include_list} $f"
13968 ;;
13969 * )
13970 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
13971 host_xm_include_list="${host_xm_include_list} config/$f"
13972 ;;
64ccbc99 13973 esac
ab87f8c8
JL
13974done
13975
13976build_xm_file_list=
13977for f in $build_xm_file; do
64ccbc99 13978 case $f in
d02af173 13979 ansidecl.h )
e22340b0
ZW
13980 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
13981 build_xm_include_list="${build_xm_include_list} $f"
13982 ;;
e2500fed 13983 auto-build.h | auto-host.h )
e22340b0
ZW
13984 build_xm_file_list="${build_xm_file_list} $f"
13985 build_xm_include_list="${build_xm_include_list} $f"
13986 ;;
13987 * )
13988 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
13989 build_xm_include_list="${build_xm_include_list} config/$f"
13990 ;;
64ccbc99 13991 esac
ab87f8c8
JL
13992done
13993
2989d30c
GK
13994# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
13995# cross-compiler which does not use the native headers and libraries.
a078a589 13996# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
13997CROSS=
13998ALL=all.internal
13999SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
14000
14001if test "x$with_build_sysroot" != x; then
14da6073 14002 build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
14003else
14004 # This value is used, even on a native system, because
14005 # CROSS_SYSTEM_HEADER_DIR is just
14006 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
14007 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
14008fi
14009
ab87f8c8
JL
14010if test x$host != x$target
14011then
2989d30c 14012 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
a078a589 14013 ALL=all.cross
160633c6 14014 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 14015 case "$host","$target" in
3a7e8b87
GK
14016 # Darwin crosses can use the host system's libraries and headers,
14017 # because of the fat library support. Of course, it must be the
14018 # same version of Darwin on both sides. Allow the user to
14019 # just say --target=foo-darwin without a version number to mean
14020 # "the version on this system".
14021 *-*-darwin*,*-*-darwin*)
14022 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
14023 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
14024 if test $hostos = $targetos -o $targetos = darwin ; then
14025 CROSS=
14026 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
14027 with_headers=yes
14028 fi
14029 ;;
14030
343f59d9
AM
14031 i?86-*-*,x86_64-*-* \
14032 | powerpc*-*-*,powerpc64*-*-*)
14033 CROSS="$CROSS -DNATIVE_CROSS" ;;
14034 esac
7a615b25 14035elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 14036 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
14037fi
14038
b39d221a
EC
14039# If this is a cross-compiler that does not
14040# have its own set of headers then define
14041# inhibit_libc
14042
dc06db20
R
14043# If this is using newlib, without having the headers available now,
14044# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
14045# This prevents libgcc2 from containing any code which requires libc
14046# support.
a929bc28 14047: ${inhibit_libc=false}
dc06db20
R
14048if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
14049 test x$with_newlib = xyes ; } &&
e50084fa 14050 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 14051 inhibit_libc=true
b39d221a
EC
14052fi
14053
14054
a078a589
ZW
14055# When building gcc with a cross-compiler, we need to adjust things so
14056# that the generator programs are still built with the native compiler.
14057# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
14058
14059# These are the normal (build=host) settings:
ba479fd2
NN
14060CC_FOR_BUILD='$(CC)'
14061BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 14062STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
14063
14064# Possibly disable fixproto, on a per-target basis.
14065case ${use_fixproto} in
14066 no)
14067 STMP_FIXPROTO=
14068 ;;
14069 yes)
14070 STMP_FIXPROTO=stmp-fixproto
14071 ;;
14072esac
14073
a078a589 14074
83599948
NS
14075# And these apply if build != host, or we are generating coverage data
14076if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 14077then
b11e4747 14078 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 14079
7a615b25 14080 if test "x$TARGET_SYSTEM_ROOT" = x; then
d8e5117d 14081 if test "x$STMP_FIXPROTO" != x; then
de253ca4
GK
14082 STMP_FIXPROTO=stmp-install-fixproto
14083 fi
7a615b25 14084 fi
ab87f8c8
JL
14085fi
14086
14087# Expand extra_headers to include complete path.
14088# This substitutes for lots of t-* files.
14089extra_headers_list=
b1ef58c8
NN
14090# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
14091for file in ${extra_headers} ; do
14092 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
14093done
ab87f8c8 14094
1617e5ee
GK
14095# If use_gcc_tgmath is set, append ginclude/tgmath.h.
14096if test x"$use_gcc_tgmath" = xyes
14097then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h"
14098fi
14099
c38f02df
ILT
14100# Define collect2 in Makefile.
14101case $host_can_use_collect2 in
14102 no) collect2= ;;
14103 *) collect2='collect2$(exeext)' ;;
14104esac
14105
14106
ab87f8c8 14107# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
14108case $use_collect2 in
14109 no) use_collect2= ;;
14110 "") ;;
ba479fd2 14111 *)
34a86c2b
NN
14112 host_xm_defines="${host_xm_defines} USE_COLLECT2"
14113 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
14114 case $host_can_use_collect2 in
14115 no)
14116 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
14117echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
14118 { (exit 1); exit 1; }; }
14119 ;;
14120 esac
34a86c2b
NN
14121 ;;
14122esac
ab87f8c8 14123
8bb915b6
NN
14124# ---------------------------
14125# Assembler & linker features
14126# ---------------------------
14127
da0f6381
PB
14128# During stage 2, ld is actually gcc/collect-ld, which is a small script to
14129# discern between when to use prev-ld/ld-new and when to use ld/ld-new.
14130# However when ld-new is first executed from the build tree, libtool will
14131# relink it as .libs/lt-ld-new, so that it can give it an RPATH that refers
14132# to the build tree. While doing this we need to use the previous-stage
14133# linker, or we have an infinite loop. The presence of a shell script as
14134# ld/ld-new, and the fact that the script *uses ld itself*, is what confuses
14135# the gcc/collect-ld script. So we need to know how libtool works, or
14136# exec-tool will fail.
e8b05380 14137
da0f6381
PB
14138
14139
14140
14141macro_version='2.1a'
14142macro_revision='1.2435'
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155ltmain="$ac_aux_dir/ltmain.sh"
14156
14157# Set options
14158
14159enable_dlopen=no
14160
14161
14162enable_win32_dll=no
14163
14164
14165# Check whether --enable-shared or --disable-shared was given.
14166if test "${enable_shared+set}" = set; then
14167 enableval="$enable_shared"
14168 p=${PACKAGE-default}
14169 case $enableval in
14170 yes) enable_shared=yes ;;
14171 no) enable_shared=no ;;
14172 *)
14173 enable_shared=no
14174 # Look at the argument we got. We use all the common list separators.
14175 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
14176 for pkg in $enableval; do
14177 IFS="$lt_save_ifs"
14178 if test "X$pkg" = "X$p"; then
14179 enable_shared=yes
14180 fi
14181 done
14182 IFS="$lt_save_ifs"
14183 ;;
14184 esac
e8b05380 14185else
da0f6381
PB
14186 enable_shared=yes
14187fi;
e8b05380 14188
da0f6381
PB
14189
14190
14191
14192
14193
14194
14195
14196# Check whether --enable-static or --disable-static was given.
14197if test "${enable_static+set}" = set; then
14198 enableval="$enable_static"
14199 p=${PACKAGE-default}
14200 case $enableval in
14201 yes) enable_static=yes ;;
14202 no) enable_static=no ;;
14203 *)
14204 enable_static=no
14205 # Look at the argument we got. We use all the common list separators.
14206 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
14207 for pkg in $enableval; do
14208 IFS="$lt_save_ifs"
14209 if test "X$pkg" = "X$p"; then
14210 enable_static=yes
14211 fi
14212 done
14213 IFS="$lt_save_ifs"
14214 ;;
14215 esac
e8b05380 14216else
da0f6381
PB
14217 enable_static=yes
14218fi;
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228# Check whether --with-pic or --without-pic was given.
14229if test "${with_pic+set}" = set; then
14230 withval="$with_pic"
14231 pic_mode="$withval"
14232else
14233 pic_mode=default
14234fi;
14235
14236test -z "$pic_mode" && pic_mode=default
14237
14238
14239
14240
14241
14242
14243
14244# Check whether --enable-fast-install or --disable-fast-install was given.
14245if test "${enable_fast_install+set}" = set; then
14246 enableval="$enable_fast_install"
14247 p=${PACKAGE-default}
14248 case $enableval in
14249 yes) enable_fast_install=yes ;;
14250 no) enable_fast_install=no ;;
14251 *)
14252 enable_fast_install=no
14253 # Look at the argument we got. We use all the common list separators.
14254 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
14255 for pkg in $enableval; do
14256 IFS="$lt_save_ifs"
14257 if test "X$pkg" = "X$p"; then
14258 enable_fast_install=yes
14259 fi
14260 done
14261 IFS="$lt_save_ifs"
14262 ;;
14263 esac
14264else
14265 enable_fast_install=yes
14266fi;
14267
14268
14269
14270
14271
14272
14273
14274
14275echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
14276echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
14277if test "${lt_cv_path_SED+set}" = set; then
e8b05380
PB
14278 echo $ECHO_N "(cached) $ECHO_C" >&6
14279else
da0f6381
PB
14280 # Loop through the user's path and test for sed and gsed.
14281# Then use that list of sed's as ones to test for truncation.
14282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380
PB
14283for as_dir in $PATH
14284do
14285 IFS=$as_save_IFS
14286 test -z "$as_dir" && as_dir=.
da0f6381
PB
14287 for lt_ac_prog in sed gsed; do
14288 for ac_exec_ext in '' $ac_executable_extensions; do
14289 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
14290 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
14291 fi
14292 done
14293 done
e8b05380 14294done
da0f6381
PB
14295IFS=$as_save_IFS
14296lt_ac_max=0
14297lt_ac_count=0
14298# Add /usr/xpg4/bin/sed as it is typically found on Solaris
14299# along with /bin/sed that truncates output.
14300for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
14301 test ! -f $lt_ac_sed && continue
14302 cat /dev/null > conftest.in
14303 lt_ac_count=0
14304 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
14305 # Check for GNU sed and select it if it is found.
14306 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
14307 lt_cv_path_SED=$lt_ac_sed
14308 break
14309 fi
14310 while true; do
14311 cat conftest.in conftest.in >conftest.tmp
14312 mv conftest.tmp conftest.in
14313 cp conftest.in conftest.nl
14314 echo >>conftest.nl
14315 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
14316 cmp -s conftest.out conftest.nl || break
14317 # 10000 chars as input seems more than enough
14318 test $lt_ac_count -gt 10 && break
14319 lt_ac_count=`expr $lt_ac_count + 1`
14320 if test $lt_ac_count -gt $lt_ac_max; then
14321 lt_ac_max=$lt_ac_count
14322 lt_cv_path_SED=$lt_ac_sed
14323 fi
14324 done
e8b05380
PB
14325done
14326
e8b05380 14327fi
b61ff9c8 14328
da0f6381 14329SED=$lt_cv_path_SED
e8b05380 14330
da0f6381
PB
14331echo "$as_me:$LINENO: result: $SED" >&5
14332echo "${ECHO_T}$SED" >&6
e8b05380 14333
da0f6381
PB
14334test -z "$SED" && SED=sed
14335Xsed="$SED -e 1s/^X//"
e8b05380 14336
e8b05380
PB
14337
14338
ad9c4d9f 14339
da0f6381
PB
14340
14341
14342
14343
14344
14345
14346
14347echo "$as_me:$LINENO: checking for fgrep" >&5
14348echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
14349if test "${ac_cv_prog_fgrep+set}" = set; then
14350 echo $ECHO_N "(cached) $ECHO_C" >&6
e8b05380 14351else
da0f6381
PB
14352 if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1
14353 then ac_cv_prog_fgrep='grep -F'
14354 else ac_cv_prog_fgrep='fgrep'
14355 fi
981d4858 14356fi
da0f6381
PB
14357echo "$as_me:$LINENO: result: $ac_cv_prog_fgrep" >&5
14358echo "${ECHO_T}$ac_cv_prog_fgrep" >&6
14359 FGREP=$ac_cv_prog_fgrep
9e423e6d 14360
9f18db39 14361
da0f6381 14362test -z "$GREP" && GREP=grep
9f18db39 14363
da0f6381
PB
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382# Check whether --with-gnu-ld or --without-gnu-ld was given.
14383if test "${with_gnu_ld+set}" = set; then
14384 withval="$with_gnu_ld"
14385 test "$withval" = no || with_gnu_ld=yes
14386else
14387 with_gnu_ld=no
14388fi;
14389ac_prog=ld
14390if test "$GCC" = yes; then
14391 # Check if gcc -print-prog-name=ld gives a path.
14392 echo "$as_me:$LINENO: checking for ld used by $CC" >&5
14393echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
14394 case $host in
14395 *-*-mingw*)
14396 # gcc leaves a trailing carriage return which upsets mingw
14397 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
14398 *)
14399 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
14400 esac
14401 case $ac_prog in
14402 # Accept absolute paths.
14403 [\\/]* | ?:[\\/]*)
14404 re_direlt='/[^/][^/]*/\.\./'
14405 # Canonicalize the pathname of ld
14406 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
14407 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
14408 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
14409 done
14410 test -z "$LD" && LD="$ac_prog"
14411 ;;
14412 "")
14413 # If it fails, then pretend we aren't using GCC.
14414 ac_prog=ld
14415 ;;
14416 *)
14417 # If it is relative, then search for the first ld in PATH.
14418 with_gnu_ld=unknown
14419 ;;
14420 esac
14421elif test "$with_gnu_ld" = yes; then
14422 echo "$as_me:$LINENO: checking for GNU ld" >&5
14423echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
14424else
14425 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
14426echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
14427fi
14428if test "${lt_cv_path_LD+set}" = set; then
14429 echo $ECHO_N "(cached) $ECHO_C" >&6
14430else
14431 if test -z "$LD"; then
14432 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14433 for ac_dir in $PATH; do
14434 IFS="$lt_save_ifs"
14435 test -z "$ac_dir" && ac_dir=.
14436 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
14437 lt_cv_path_LD="$ac_dir/$ac_prog"
14438 # Check to see if the program is GNU ld. I'd rather use --version,
14439 # but apparently some variants of GNU ld only accept -v.
14440 # Break only if it was the GNU/non-GNU ld that we prefer.
14441 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
14442 *GNU* | *'with BFD'*)
14443 test "$with_gnu_ld" != no && break
14444 ;;
14445 *)
14446 test "$with_gnu_ld" != yes && break
14447 ;;
14448 esac
14449 fi
14450 done
14451 IFS="$lt_save_ifs"
14452else
14453 lt_cv_path_LD="$LD" # Let the user override the test with a path.
14454fi
14455fi
14456
14457LD="$lt_cv_path_LD"
14458if test -n "$LD"; then
14459 echo "$as_me:$LINENO: result: $LD" >&5
14460echo "${ECHO_T}$LD" >&6
14461else
14462 echo "$as_me:$LINENO: result: no" >&5
14463echo "${ECHO_T}no" >&6
14464fi
14465test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
14466echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
14467 { (exit 1); exit 1; }; }
14468echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
14469echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
14470if test "${lt_cv_prog_gnu_ld+set}" = set; then
14471 echo $ECHO_N "(cached) $ECHO_C" >&6
14472else
14473 # I'd rather use --version here, but apparently some GNU lds only accept -v.
14474case `$LD -v 2>&1 </dev/null` in
14475*GNU* | *'with BFD'*)
14476 lt_cv_prog_gnu_ld=yes
14477 ;;
14478*)
14479 lt_cv_prog_gnu_ld=no
14480 ;;
14481esac
14482fi
14483echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
14484echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
14485with_gnu_ld=$lt_cv_prog_gnu_ld
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
14497echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6
14498if test "${lt_cv_path_NM+set}" = set; then
14499 echo $ECHO_N "(cached) $ECHO_C" >&6
14500else
14501 if test -n "$NM"; then
14502 # Let the user override the test.
14503 lt_cv_path_NM="$NM"
14504else
14505 lt_nm_to_check="${ac_tool_prefix}nm"
14506 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
14507 lt_nm_to_check="$lt_nm_to_check nm"
14508 fi
14509 for lt_tmp_nm in $lt_nm_to_check; do
14510 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14511 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
14512 IFS="$lt_save_ifs"
14513 test -z "$ac_dir" && ac_dir=.
14514 tmp_nm="$ac_dir/$lt_tmp_nm"
14515 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
14516 # Check to see if the nm accepts a BSD-compat flag.
14517 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
14518 # nm: unknown option "B" ignored
14519 # Tru64's nm complains that /dev/null is an invalid object file
14520 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
14521 */dev/null* | *'Invalid file or object type'*)
14522 lt_cv_path_NM="$tmp_nm -B"
14523 break
14524 ;;
14525 *)
14526 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
14527 */dev/null*)
14528 lt_cv_path_NM="$tmp_nm -p"
14529 break
14530 ;;
14531 *)
14532 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
14533 continue # so that we can try to find one that supports BSD flags
14534 ;;
14535 esac
14536 ;;
14537 esac
14538 fi
14539 done
14540 IFS="$lt_save_ifs"
14541 done
14542 : ${lt_cv_path_NM=no}
14543fi
14544fi
14545echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
14546echo "${ECHO_T}$lt_cv_path_NM" >&6
14547if test "$lt_cv_path_NM" != "no"; then
14548 NM="$lt_cv_path_NM"
14549else
14550 # Didn't find any BSD compatible name lister, look for dumpbin.
14551 if test -n "$ac_tool_prefix"; then
14552 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
14553 do
14554 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14555set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14556echo "$as_me:$LINENO: checking for $ac_word" >&5
14557echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14558if test "${ac_cv_prog_DUMPBIN+set}" = set; then
14559 echo $ECHO_N "(cached) $ECHO_C" >&6
14560else
14561 if test -n "$DUMPBIN"; then
14562 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
14563else
14564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14565for as_dir in $PATH
14566do
14567 IFS=$as_save_IFS
14568 test -z "$as_dir" && as_dir=.
14569 for ac_exec_ext in '' $ac_executable_extensions; do
14570 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14571 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
14572 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14573 break 2
14574 fi
14575done
14576done
14577
14578fi
14579fi
14580DUMPBIN=$ac_cv_prog_DUMPBIN
14581if test -n "$DUMPBIN"; then
14582 echo "$as_me:$LINENO: result: $DUMPBIN" >&5
14583echo "${ECHO_T}$DUMPBIN" >&6
14584else
14585 echo "$as_me:$LINENO: result: no" >&5
14586echo "${ECHO_T}no" >&6
14587fi
14588
14589 test -n "$DUMPBIN" && break
14590 done
14591fi
14592if test -z "$DUMPBIN"; then
14593 ac_ct_DUMPBIN=$DUMPBIN
14594 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
14595do
14596 # Extract the first word of "$ac_prog", so it can be a program name with args.
14597set dummy $ac_prog; ac_word=$2
14598echo "$as_me:$LINENO: checking for $ac_word" >&5
14599echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14600if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
14601 echo $ECHO_N "(cached) $ECHO_C" >&6
14602else
14603 if test -n "$ac_ct_DUMPBIN"; then
14604 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
14605else
14606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14607for as_dir in $PATH
14608do
14609 IFS=$as_save_IFS
14610 test -z "$as_dir" && as_dir=.
14611 for ac_exec_ext in '' $ac_executable_extensions; do
14612 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14613 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
14614 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14615 break 2
14616 fi
14617done
14618done
14619
14620fi
14621fi
14622ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
14623if test -n "$ac_ct_DUMPBIN"; then
14624 echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
14625echo "${ECHO_T}$ac_ct_DUMPBIN" >&6
14626else
14627 echo "$as_me:$LINENO: result: no" >&5
14628echo "${ECHO_T}no" >&6
14629fi
14630
14631 test -n "$ac_ct_DUMPBIN" && break
14632done
14633test -n "$ac_ct_DUMPBIN" || ac_ct_DUMPBIN=":"
14634
14635 DUMPBIN=$ac_ct_DUMPBIN
14636fi
14637
14638
14639 if test "$DUMPBIN" != ":"; then
14640 NM="$DUMPBIN"
14641 fi
14642fi
14643test -z "$NM" && NM=nm
14644
14645
14646
14647
14648
14649
14650echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
14651echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6
14652if test "${lt_cv_nm_interface+set}" = set; then
14653 echo $ECHO_N "(cached) $ECHO_C" >&6
14654else
14655 lt_cv_nm_interface="BSD nm"
14656 echo "int some_variable = 0;" > conftest.$ac_ext
3d4e720a 14657 (eval echo "\"\$as_me:14657: $ac_compile\"" >&5)
da0f6381
PB
14658 (eval "$ac_compile" 2>conftest.err)
14659 cat conftest.err >&5
3d4e720a 14660 (eval echo "\"\$as_me:14660: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
da0f6381
PB
14661 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
14662 cat conftest.err >&5
3d4e720a 14663 (eval echo "\"\$as_me:14663: output\"" >&5)
da0f6381
PB
14664 cat conftest.out >&5
14665 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
14666 lt_cv_nm_interface="MS dumpbin"
14667 fi
14668 rm -f conftest*
14669fi
14670echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
14671echo "${ECHO_T}$lt_cv_nm_interface" >&6
14672
14673echo "$as_me:$LINENO: checking whether ln -s works" >&5
14674echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
14675LN_S=$as_ln_s
14676if test "$LN_S" = "ln -s"; then
14677 echo "$as_me:$LINENO: result: yes" >&5
14678echo "${ECHO_T}yes" >&6
14679else
14680 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
14681echo "${ECHO_T}no, using $LN_S" >&6
14682fi
14683
14684# find the maximum length of command line arguments
14685echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
14686echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
14687if test "${lt_cv_sys_max_cmd_len+set}" = set; then
14688 echo $ECHO_N "(cached) $ECHO_C" >&6
14689else
14690 i=0
14691 teststring="ABCD"
14692
14693 case $build_os in
14694 msdosdjgpp*)
14695 # On DJGPP, this test can blow up pretty badly due to problems in libc
14696 # (any single argument exceeding 2000 bytes causes a buffer overrun
14697 # during glob expansion). Even if it were fixed, the result of this
14698 # check would be larger than it should be.
14699 lt_cv_sys_max_cmd_len=12288; # 12K is about right
14700 ;;
14701
14702 gnu*)
14703 # Under GNU Hurd, this test is not required because there is
14704 # no limit to the length of command line arguments.
14705 # Libtool will interpret -1 as no limit whatsoever
14706 lt_cv_sys_max_cmd_len=-1;
14707 ;;
14708
14709 cygwin* | mingw*)
14710 # On Win9x/ME, this test blows up -- it succeeds, but takes
14711 # about 5 minutes as the teststring grows exponentially.
14712 # Worse, since 9x/ME are not pre-emptively multitasking,
14713 # you end up with a "frozen" computer, even though with patience
14714 # the test eventually succeeds (with a max line length of 256k).
14715 # Instead, let's just punt: use the minimum linelength reported by
14716 # all of the supported platforms: 8192 (on NT/2K/XP).
14717 lt_cv_sys_max_cmd_len=8192;
14718 ;;
14719
14720 amigaos*)
14721 # On AmigaOS with pdksh, this test takes hours, literally.
14722 # So we just punt and use a minimum line length of 8192.
14723 lt_cv_sys_max_cmd_len=8192;
14724 ;;
14725
14726 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
14727 # This has been around since 386BSD, at least. Likely further.
14728 if test -x /sbin/sysctl; then
14729 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
14730 elif test -x /usr/sbin/sysctl; then
14731 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
14732 else
14733 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
14734 fi
14735 # And add a safety zone
14736 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
14737 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
14738 ;;
14739
14740 interix*)
14741 # We know the value 262144 and hardcode it with a safety zone (like BSD)
14742 lt_cv_sys_max_cmd_len=196608
14743 ;;
14744
14745 osf*)
14746 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
14747 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
14748 # nice to cause kernel panics so lets avoid the loop below.
14749 # First set a reasonable default.
14750 lt_cv_sys_max_cmd_len=16384
14751 #
14752 if test -x /sbin/sysconfig; then
14753 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
14754 *1*) lt_cv_sys_max_cmd_len=-1 ;;
14755 esac
14756 fi
14757 ;;
14758 sco3.2v5*)
14759 lt_cv_sys_max_cmd_len=102400
14760 ;;
14761 sysv5* | sco5v6* | sysv4.2uw2*)
14762 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
14763 if test -n "$kargmax"; then
14764 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
14765 else
14766 lt_cv_sys_max_cmd_len=32768
14767 fi
14768 ;;
14769 *)
14770 lt_cv_sys_max_cmd_len=`getconf ARG_MAX 2> /dev/null`
14771 if test -n $lt_cv_sys_max_cmd_len; then
14772 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
14773 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
14774 else
14775 # Make teststring a little bigger before we do anything with it.
14776 # a 1K string should be a reasonable start.
14777 for i in 1 2 3 4 5 6 7 8 ; do
14778 teststring=$teststring$teststring
14779 done
14780 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
14781 # If test is not a shell built-in, we'll probably end up computing a
14782 # maximum length that is only half of the actual maximum length, but
14783 # we can't tell.
14784 while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
14785 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
14786 test $i != 17 # 1/2 MB should be enough
14787 do
14788 i=`expr $i + 1`
14789 teststring=$teststring$teststring
14790 done
14791 # Only check the string length outside the loop.
14792 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
14793 teststring=
14794 # Add a significant safety factor because C++ compilers can tack on
14795 # massive amounts of additional arguments before passing them to the
14796 # linker. It appears as though 1/2 is a usable value.
14797 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
14798 fi
14799 ;;
14800 esac
14801
14802fi
14803
14804if test -n $lt_cv_sys_max_cmd_len ; then
14805 echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
14806echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
14807else
14808 echo "$as_me:$LINENO: result: none" >&5
14809echo "${ECHO_T}none" >&6
14810fi
14811max_cmd_len=$lt_cv_sys_max_cmd_len
14812
14813
14814
14815
14816
14817
14818
14819: ${CP="cp -f"}
14820: ${MV="mv -f"}
14821: ${RM="rm -f"}
14822
14823echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
14824echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6
14825# Try some XSI features
14826xsi_shell=no
14827( _lt_dummy="a/b/c"
14828 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
14829 = c,a/b,, ) >/dev/null 2>&1 \
14830 && xsi_shell=yes
14831echo "$as_me:$LINENO: result: $xsi_shell" >&5
14832echo "${ECHO_T}$xsi_shell" >&6
14833
14834
14835echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
14836echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6
14837lt_shell_append=no
14838( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
14839 >/dev/null 2>&1 \
14840 && lt_shell_append=yes
14841echo "$as_me:$LINENO: result: $lt_shell_append" >&5
14842echo "${ECHO_T}$lt_shell_append" >&6
14843
14844
14845if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
14846 lt_unset=unset
14847else
14848 lt_unset=false
14849fi
14850
14851
14852
14853
14854
14855# test EBCDIC or ASCII
14856case `echo X|tr X '\101'` in
14857 A) # ASCII based system
14858 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
14859 lt_SP2NL='tr \040 \012'
14860 lt_NL2SP='tr \015\012 \040\040'
14861 ;;
14862 *) # EBCDIC based system
14863 lt_SP2NL='tr \100 \n'
14864 lt_NL2SP='tr \r\n \100\100'
14865 ;;
14866esac
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
14877echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
14878if test "${lt_cv_ld_reload_flag+set}" = set; then
14879 echo $ECHO_N "(cached) $ECHO_C" >&6
14880else
14881 lt_cv_ld_reload_flag='-r'
14882fi
14883echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
14884echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
14885reload_flag=$lt_cv_ld_reload_flag
14886case $reload_flag in
14887"" | " "*) ;;
14888*) reload_flag=" $reload_flag" ;;
14889esac
14890reload_cmds='$LD$reload_flag -o $output$reload_objs'
14891case $host_os in
14892 darwin*)
14893 if test "$GCC" = yes; then
14894 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
14895 else
14896 reload_cmds='$LD$reload_flag -o $output$reload_objs'
14897 fi
14898 ;;
14899esac
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
14911echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6
14912if test "${lt_cv_deplibs_check_method+set}" = set; then
14913 echo $ECHO_N "(cached) $ECHO_C" >&6
14914else
14915 lt_cv_file_magic_cmd='$MAGIC_CMD'
14916lt_cv_file_magic_test_file=
14917lt_cv_deplibs_check_method='unknown'
14918# Need to set the preceding variable on all platforms that support
14919# interlibrary dependencies.
14920# 'none' -- dependencies not supported.
14921# `unknown' -- same as none, but documents that we really don't know.
14922# 'pass_all' -- all dependencies passed with no checks.
14923# 'test_compile' -- check by making test program.
14924# 'file_magic [[regex]]' -- check by looking for files in library path
14925# which responds to the $file_magic_cmd with a given extended regex.
14926# If you have `file' or equivalent on your system and you're not sure
14927# whether `pass_all' will *always* work, you probably want this one.
14928
14929case $host_os in
14930aix[4-9]*)
14931 lt_cv_deplibs_check_method=pass_all
14932 ;;
14933
14934beos*)
14935 lt_cv_deplibs_check_method=pass_all
14936 ;;
14937
14938bsdi[45]*)
14939 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
14940 lt_cv_file_magic_cmd='/usr/bin/file -L'
14941 lt_cv_file_magic_test_file=/shlib/libc.so
14942 ;;
14943
14944cygwin*)
14945 # func_win32_libid is a shell function defined in ltmain.sh
14946 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
14947 lt_cv_file_magic_cmd='func_win32_libid'
14948 ;;
14949
14950mingw* | pw32*)
14951 # Base MSYS/MinGW do not provide the 'file' command needed by
14952 # func_win32_libid shell function, so use a weaker test based on 'objdump',
14953 # unless we find 'file', for example because we are cross-compiling.
14954 if ( file / ) >/dev/null 2>&1; then
14955 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
14956 lt_cv_file_magic_cmd='func_win32_libid'
14957 else
14958 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
14959 lt_cv_file_magic_cmd='$OBJDUMP -f'
14960 fi
14961 ;;
14962
14963darwin* | rhapsody*)
14964 lt_cv_deplibs_check_method=pass_all
14965 ;;
14966
14967freebsd* | dragonfly*)
14968 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
14969 case $host_cpu in
14970 i*86 )
14971 # Not sure whether the presence of OpenBSD here was a mistake.
14972 # Let's accept both of them until this is cleared up.
14973 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
14974 lt_cv_file_magic_cmd=/usr/bin/file
14975 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
14976 ;;
14977 esac
14978 else
14979 lt_cv_deplibs_check_method=pass_all
14980 fi
14981 ;;
14982
14983gnu*)
14984 lt_cv_deplibs_check_method=pass_all
14985 ;;
14986
14987hpux10.20* | hpux11*)
14988 lt_cv_file_magic_cmd=/usr/bin/file
14989 case $host_cpu in
14990 ia64*)
14991 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
14992 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
14993 ;;
14994 hppa*64*)
14995 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
14996 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
14997 ;;
14998 *)
14999 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
15000 lt_cv_file_magic_test_file=/usr/lib/libc.sl
15001 ;;
15002 esac
15003 ;;
15004
15005interix[3-9]*)
15006 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
15007 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
15008 ;;
15009
15010irix5* | irix6* | nonstopux*)
15011 case $LD in
15012 *-32|*"-32 ") libmagic=32-bit;;
15013 *-n32|*"-n32 ") libmagic=N32;;
15014 *-64|*"-64 ") libmagic=64-bit;;
15015 *) libmagic=never-match;;
15016 esac
15017 lt_cv_deplibs_check_method=pass_all
15018 ;;
15019
15020# This must be Linux ELF.
15021linux* | k*bsd*-gnu)
15022 lt_cv_deplibs_check_method=pass_all
15023 ;;
15024
15025netbsd*)
15026 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
15027 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
15028 else
15029 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
15030 fi
15031 ;;
15032
15033newos6*)
15034 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
15035 lt_cv_file_magic_cmd=/usr/bin/file
15036 lt_cv_file_magic_test_file=/usr/lib/libnls.so
15037 ;;
15038
15039*nto* | *qnx*)
15040 lt_cv_deplibs_check_method=pass_all
15041 ;;
15042
15043openbsd*)
15044 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15045 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
15046 else
15047 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
15048 fi
15049 ;;
15050
15051osf3* | osf4* | osf5*)
15052 lt_cv_deplibs_check_method=pass_all
15053 ;;
15054
15055rdos*)
15056 lt_cv_deplibs_check_method=pass_all
15057 ;;
15058
15059solaris*)
15060 lt_cv_deplibs_check_method=pass_all
15061 ;;
15062
15063sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
15064 lt_cv_deplibs_check_method=pass_all
15065 ;;
15066
15067sysv4 | sysv4.3*)
15068 case $host_vendor in
15069 motorola)
15070 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
15071 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
15072 ;;
15073 ncr)
15074 lt_cv_deplibs_check_method=pass_all
15075 ;;
15076 sequent)
15077 lt_cv_file_magic_cmd='/bin/file'
15078 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
15079 ;;
15080 sni)
15081 lt_cv_file_magic_cmd='/bin/file'
15082 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
15083 lt_cv_file_magic_test_file=/lib/libc.so
15084 ;;
15085 siemens)
15086 lt_cv_deplibs_check_method=pass_all
15087 ;;
15088 pc)
15089 lt_cv_deplibs_check_method=pass_all
15090 ;;
15091 esac
15092 ;;
15093
15094tpf*)
15095 lt_cv_deplibs_check_method=pass_all
15096 ;;
15097esac
15098
15099fi
15100echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
15101echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
15102file_magic_cmd=$lt_cv_file_magic_cmd
15103deplibs_check_method=$lt_cv_deplibs_check_method
15104test -z "$deplibs_check_method" && deplibs_check_method=unknown
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117if test -n "$ac_tool_prefix"; then
15118 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
15119set dummy ${ac_tool_prefix}ar; ac_word=$2
15120echo "$as_me:$LINENO: checking for $ac_word" >&5
15121echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15122if test "${ac_cv_prog_AR+set}" = set; then
15123 echo $ECHO_N "(cached) $ECHO_C" >&6
15124else
15125 if test -n "$AR"; then
15126 ac_cv_prog_AR="$AR" # Let the user override the test.
15127else
15128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15129for as_dir in $PATH
15130do
15131 IFS=$as_save_IFS
15132 test -z "$as_dir" && as_dir=.
15133 for ac_exec_ext in '' $ac_executable_extensions; do
15134 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15135 ac_cv_prog_AR="${ac_tool_prefix}ar"
15136 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15137 break 2
15138 fi
15139done
15140done
15141
15142fi
15143fi
15144AR=$ac_cv_prog_AR
15145if test -n "$AR"; then
15146 echo "$as_me:$LINENO: result: $AR" >&5
15147echo "${ECHO_T}$AR" >&6
15148else
15149 echo "$as_me:$LINENO: result: no" >&5
15150echo "${ECHO_T}no" >&6
15151fi
15152
15153fi
15154if test -z "$ac_cv_prog_AR"; then
15155 ac_ct_AR=$AR
15156 # Extract the first word of "ar", so it can be a program name with args.
15157set dummy ar; ac_word=$2
15158echo "$as_me:$LINENO: checking for $ac_word" >&5
15159echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15160if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
15161 echo $ECHO_N "(cached) $ECHO_C" >&6
15162else
15163 if test -n "$ac_ct_AR"; then
15164 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
15165else
15166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15167for as_dir in $PATH
15168do
15169 IFS=$as_save_IFS
15170 test -z "$as_dir" && as_dir=.
15171 for ac_exec_ext in '' $ac_executable_extensions; do
15172 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15173 ac_cv_prog_ac_ct_AR="ar"
15174 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15175 break 2
15176 fi
15177done
15178done
15179
15180 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
15181fi
15182fi
15183ac_ct_AR=$ac_cv_prog_ac_ct_AR
15184if test -n "$ac_ct_AR"; then
15185 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
15186echo "${ECHO_T}$ac_ct_AR" >&6
15187else
15188 echo "$as_me:$LINENO: result: no" >&5
15189echo "${ECHO_T}no" >&6
15190fi
15191
15192 AR=$ac_ct_AR
15193else
15194 AR="$ac_cv_prog_AR"
15195fi
15196
15197test -z "$AR" && AR=ar
15198test -z "$AR_FLAGS" && AR_FLAGS=cru
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210if test -n "$ac_tool_prefix"; then
15211 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
15212set dummy ${ac_tool_prefix}strip; ac_word=$2
15213echo "$as_me:$LINENO: checking for $ac_word" >&5
15214echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15215if test "${ac_cv_prog_STRIP+set}" = set; then
15216 echo $ECHO_N "(cached) $ECHO_C" >&6
15217else
15218 if test -n "$STRIP"; then
15219 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
15220else
15221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15222for as_dir in $PATH
15223do
15224 IFS=$as_save_IFS
15225 test -z "$as_dir" && as_dir=.
15226 for ac_exec_ext in '' $ac_executable_extensions; do
15227 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15228 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
15229 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15230 break 2
15231 fi
15232done
15233done
15234
15235fi
15236fi
15237STRIP=$ac_cv_prog_STRIP
15238if test -n "$STRIP"; then
15239 echo "$as_me:$LINENO: result: $STRIP" >&5
15240echo "${ECHO_T}$STRIP" >&6
15241else
15242 echo "$as_me:$LINENO: result: no" >&5
15243echo "${ECHO_T}no" >&6
15244fi
15245
15246fi
15247if test -z "$ac_cv_prog_STRIP"; then
15248 ac_ct_STRIP=$STRIP
15249 # Extract the first word of "strip", so it can be a program name with args.
15250set dummy strip; ac_word=$2
15251echo "$as_me:$LINENO: checking for $ac_word" >&5
15252echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15253if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
15254 echo $ECHO_N "(cached) $ECHO_C" >&6
15255else
15256 if test -n "$ac_ct_STRIP"; then
15257 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
15258else
15259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15260for as_dir in $PATH
15261do
15262 IFS=$as_save_IFS
15263 test -z "$as_dir" && as_dir=.
15264 for ac_exec_ext in '' $ac_executable_extensions; do
15265 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15266 ac_cv_prog_ac_ct_STRIP="strip"
15267 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15268 break 2
15269 fi
15270done
15271done
15272
15273 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
15274fi
15275fi
15276ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
15277if test -n "$ac_ct_STRIP"; then
15278 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
15279echo "${ECHO_T}$ac_ct_STRIP" >&6
15280else
15281 echo "$as_me:$LINENO: result: no" >&5
15282echo "${ECHO_T}no" >&6
15283fi
15284
15285 STRIP=$ac_ct_STRIP
15286else
15287 STRIP="$ac_cv_prog_STRIP"
15288fi
15289
15290test -z "$STRIP" && STRIP=:
15291
15292
15293
15294
15295
15296
15297if test -n "$ac_tool_prefix"; then
15298 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
15299set dummy ${ac_tool_prefix}ranlib; ac_word=$2
15300echo "$as_me:$LINENO: checking for $ac_word" >&5
15301echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15302if test "${ac_cv_prog_RANLIB+set}" = set; then
15303 echo $ECHO_N "(cached) $ECHO_C" >&6
15304else
15305 if test -n "$RANLIB"; then
15306 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
15307else
15308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15309for as_dir in $PATH
15310do
15311 IFS=$as_save_IFS
15312 test -z "$as_dir" && as_dir=.
15313 for ac_exec_ext in '' $ac_executable_extensions; do
15314 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15315 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
15316 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15317 break 2
15318 fi
15319done
15320done
15321
15322fi
15323fi
15324RANLIB=$ac_cv_prog_RANLIB
15325if test -n "$RANLIB"; then
15326 echo "$as_me:$LINENO: result: $RANLIB" >&5
15327echo "${ECHO_T}$RANLIB" >&6
15328else
15329 echo "$as_me:$LINENO: result: no" >&5
15330echo "${ECHO_T}no" >&6
15331fi
15332
15333fi
15334if test -z "$ac_cv_prog_RANLIB"; then
15335 ac_ct_RANLIB=$RANLIB
15336 # Extract the first word of "ranlib", so it can be a program name with args.
15337set dummy ranlib; ac_word=$2
15338echo "$as_me:$LINENO: checking for $ac_word" >&5
15339echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15340if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
15341 echo $ECHO_N "(cached) $ECHO_C" >&6
15342else
15343 if test -n "$ac_ct_RANLIB"; then
15344 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
15345else
15346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15347for as_dir in $PATH
15348do
15349 IFS=$as_save_IFS
15350 test -z "$as_dir" && as_dir=.
15351 for ac_exec_ext in '' $ac_executable_extensions; do
15352 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15353 ac_cv_prog_ac_ct_RANLIB="ranlib"
15354 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15355 break 2
15356 fi
15357done
15358done
15359
15360 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
15361fi
15362fi
15363ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
15364if test -n "$ac_ct_RANLIB"; then
15365 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
15366echo "${ECHO_T}$ac_ct_RANLIB" >&6
15367else
15368 echo "$as_me:$LINENO: result: no" >&5
15369echo "${ECHO_T}no" >&6
15370fi
15371
15372 RANLIB=$ac_ct_RANLIB
15373else
15374 RANLIB="$ac_cv_prog_RANLIB"
15375fi
15376
15377test -z "$RANLIB" && RANLIB=:
15378
15379
15380
15381
15382
15383
15384# Determine commands to create old-style static archives.
15385old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
15386old_postinstall_cmds='chmod 644 $oldlib'
15387old_postuninstall_cmds=
15388
15389if test -n "$RANLIB"; then
15390 case $host_os in
15391 openbsd*)
15392 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
15393 ;;
15394 *)
15395 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
15396 ;;
15397 esac
15398 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
15399fi
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434# If no C compiler was specified, use CC.
15435LTCC=${LTCC-"$CC"}
15436
15437# If no C compiler flags were specified, use CFLAGS.
15438LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
15439
15440# Allow CC to be a program name with arguments.
15441compiler=$CC
15442
15443
15444# Check for command to grab the raw symbol name followed by C symbol from nm.
15445echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
15446echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
15447if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
15448 echo $ECHO_N "(cached) $ECHO_C" >&6
15449else
15450
15451# These are sane defaults that work on at least a few old systems.
15452# [They come from Ultrix. What could be older than Ultrix?!! ;)]
15453
15454# Character class describing NM global symbol codes.
15455symcode='[BCDEGRST]'
15456
15457# Regexp to match symbols that can be accessed directly from C.
15458sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
15459
15460# Define system-specific variables.
15461case $host_os in
15462aix*)
15463 symcode='[BCDT]'
15464 ;;
15465cygwin* | mingw* | pw32*)
15466 symcode='[ABCDGISTW]'
15467 ;;
15468hpux*)
15469 if test "$host_cpu" = ia64; then
15470 symcode='[ABCDEGRST]'
15471 fi
15472 ;;
15473irix* | nonstopux*)
15474 symcode='[BCDEGRST]'
15475 ;;
15476osf*)
15477 symcode='[BCDEGQRST]'
15478 ;;
15479solaris*)
15480 symcode='[BDRT]'
15481 ;;
15482sco3.2v5*)
15483 symcode='[DT]'
15484 ;;
15485sysv4.2uw2*)
15486 symcode='[DT]'
15487 ;;
15488sysv5* | sco5v6* | unixware* | OpenUNIX*)
15489 symcode='[ABDT]'
15490 ;;
15491sysv4)
15492 symcode='[DFNSTU]'
15493 ;;
15494esac
15495
15496# If we're using GNU nm, then use its standard symbol codes.
15497case `$NM -V 2>&1` in
15498*GNU* | *'with BFD'*)
15499 symcode='[ABCDGIRSTW]' ;;
15500esac
15501
15502# Transform an extracted symbol line into a proper C declaration.
15503# Some systems (esp. on ia64) link data and code symbols differently,
15504# so use this general approach.
15505lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
15506
15507# Transform an extracted symbol line into symbol name and symbol address
15508lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
15509
15510# Handle CRLF in mingw tool chain
15511opt_cr=
15512case $build_os in
15513mingw*)
15514 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
15515 ;;
15516esac
15517
15518# Try without a prefix underscore, then with it.
15519for ac_symprfx in "" "_"; do
15520
15521 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
15522 symxfrm="\\1 $ac_symprfx\\2 \\2"
15523
15524 # Write the raw and C identifiers.
15525 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
15526 # Fake it for dumpbin and say T for any non-static function
15527 # and D for any global variable.
15528 # Also find C++ and __fastcall symbols from MSVC++,
15529 # which start with @ or ?.
15530 lt_cv_sys_global_symbol_pipe="$AWK '"\
15531" {last_section=section; section=\$ 3};"\
15532" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
15533" \$ 0!~/External *\|/{next};"\
15534" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
15535" {if(hide[section]) next};"\
15536" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
15537" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
15538" s[1]~/^[@?]/{print s[1], s[1]; next};"\
15539" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
15540" ' prfx=^$ac_symprfx"
15541 else
15542 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
15543 fi
15544
15545 # Check to see that the pipe works correctly.
15546 pipe_works=no
15547
15548 rm -f conftest*
15549 cat > conftest.$ac_ext <<_LT_EOF
15550#ifdef __cplusplus
15551extern "C" {
15552#endif
15553char nm_test_var;
15554void nm_test_func(void);
15555void nm_test_func(void){}
15556#ifdef __cplusplus
15557}
15558#endif
15559int main(){nm_test_var='a';nm_test_func();return(0);}
15560_LT_EOF
15561
15562 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15563 (eval $ac_compile) 2>&5
15564 ac_status=$?
15565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15566 (exit $ac_status); }; then
15567 # Now try to grab the symbols.
15568 nlist=conftest.nm
15569 if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
15570 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
15571 ac_status=$?
15572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15573 (exit $ac_status); } && test -s "$nlist"; then
15574 # Try sorting and uniquifying the output.
15575 if sort "$nlist" | uniq > "$nlist"T; then
15576 mv -f "$nlist"T "$nlist"
15577 else
15578 rm -f "$nlist"T
15579 fi
15580
15581 # Make sure that we snagged all the symbols we need.
15582 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
15583 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
15584 cat <<_LT_EOF > conftest.$ac_ext
15585#ifdef __cplusplus
15586extern "C" {
15587#endif
15588
15589_LT_EOF
15590 # Now generate the symbol file.
15591 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
15592
15593 cat <<_LT_EOF >> conftest.$ac_ext
15594
15595/* The mapping between symbol names and symbols. */
15596const struct {
15597 const char *name;
15598 void *address;
15599}
15600lt__PROGRAM__LTX_preloaded_symbols[] =
15601{
15602 { "@PROGRAM@", (void *) 0 },
15603_LT_EOF
15604 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
15605 cat <<\_LT_EOF >> conftest.$ac_ext
15606 {0, (void *) 0}
15607};
15608
15609/* This works around a problem in FreeBSD linker */
15610#ifdef FREEBSD_WORKAROUND
15611static const void *lt_preloaded_setup() {
15612 return lt__PROGRAM__LTX_preloaded_symbols;
15613}
15614#endif
15615
15616#ifdef __cplusplus
15617}
15618#endif
15619_LT_EOF
15620 # Now try linking the two files.
15621 mv conftest.$ac_objext conftstm.$ac_objext
15622 lt_save_LIBS="$LIBS"
15623 lt_save_CFLAGS="$CFLAGS"
15624 LIBS="conftstm.$ac_objext"
15625 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
15626 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15627 (eval $ac_link) 2>&5
15628 ac_status=$?
15629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15630 (exit $ac_status); } && test -s conftest${ac_exeext}; then
15631 pipe_works=yes
15632 fi
15633 LIBS="$lt_save_LIBS"
15634 CFLAGS="$lt_save_CFLAGS"
15635 else
15636 echo "cannot find nm_test_func in $nlist" >&5
15637 fi
15638 else
15639 echo "cannot find nm_test_var in $nlist" >&5
15640 fi
15641 else
15642 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
15643 fi
15644 else
15645 echo "$progname: failed program was:" >&5
15646 cat conftest.$ac_ext >&5
15647 fi
15648 rm -f conftest* conftst*
15649
15650 # Do not use the global_symbol_pipe unless it works.
15651 if test "$pipe_works" = yes; then
15652 break
15653 else
15654 lt_cv_sys_global_symbol_pipe=
15655 fi
15656done
15657
15658fi
15659
15660if test -z "$lt_cv_sys_global_symbol_pipe"; then
15661 lt_cv_sys_global_symbol_to_cdecl=
15662fi
15663if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
15664 echo "$as_me:$LINENO: result: failed" >&5
15665echo "${ECHO_T}failed" >&6
15666else
15667 echo "$as_me:$LINENO: result: ok" >&5
15668echo "${ECHO_T}ok" >&6
15669fi
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
15688if test "${enable_libtool_lock+set}" = set; then
15689 enableval="$enable_libtool_lock"
15690
15691fi;
15692test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
15693
15694# Some flags need to be propagated to the compiler or linker for good
15695# libtool support.
15696case $host in
15697ia64-*-hpux*)
15698 # Find out which ABI we are using.
15699 echo 'int i;' > conftest.$ac_ext
15700 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15701 (eval $ac_compile) 2>&5
15702 ac_status=$?
15703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15704 (exit $ac_status); }; then
15705 case `/usr/bin/file conftest.$ac_objext` in
15706 *ELF-32*)
15707 HPUX_IA64_MODE="32"
15708 ;;
15709 *ELF-64*)
15710 HPUX_IA64_MODE="64"
15711 ;;
15712 esac
15713 fi
15714 rm -rf conftest*
15715 ;;
15716*-*-irix6*)
15717 # Find out which ABI we are using.
3d4e720a 15718 echo '#line 15718 "configure"' > conftest.$ac_ext
da0f6381
PB
15719 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15720 (eval $ac_compile) 2>&5
15721 ac_status=$?
15722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15723 (exit $ac_status); }; then
15724 if test "$lt_cv_prog_gnu_ld" = yes; then
15725 case `/usr/bin/file conftest.$ac_objext` in
15726 *32-bit*)
15727 LD="${LD-ld} -melf32bsmip"
15728 ;;
15729 *N32*)
15730 LD="${LD-ld} -melf32bmipn32"
15731 ;;
15732 *64-bit*)
15733 LD="${LD-ld} -melf64bmip"
15734 ;;
15735 esac
15736 else
15737 case `/usr/bin/file conftest.$ac_objext` in
15738 *32-bit*)
15739 LD="${LD-ld} -32"
15740 ;;
15741 *N32*)
15742 LD="${LD-ld} -n32"
15743 ;;
15744 *64-bit*)
15745 LD="${LD-ld} -64"
15746 ;;
15747 esac
15748 fi
15749 fi
15750 rm -rf conftest*
15751 ;;
15752
15753x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
15754s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
15755 # Find out which ABI we are using.
15756 echo 'int i;' > conftest.$ac_ext
15757 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15758 (eval $ac_compile) 2>&5
15759 ac_status=$?
15760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15761 (exit $ac_status); }; then
15762 case `/usr/bin/file conftest.o` in
15763 *32-bit*)
15764 case $host in
15765 x86_64-*kfreebsd*-gnu)
15766 LD="${LD-ld} -m elf_i386_fbsd"
15767 ;;
15768 x86_64-*linux*)
15769 LD="${LD-ld} -m elf_i386"
15770 ;;
15771 ppc64-*linux*|powerpc64-*linux*)
15772 LD="${LD-ld} -m elf32ppclinux"
15773 ;;
15774 s390x-*linux*)
15775 LD="${LD-ld} -m elf_s390"
15776 ;;
15777 sparc64-*linux*)
15778 LD="${LD-ld} -m elf32_sparc"
15779 ;;
15780 esac
15781 ;;
15782 *64-bit*)
15783 case $host in
15784 x86_64-*kfreebsd*-gnu)
15785 LD="${LD-ld} -m elf_x86_64_fbsd"
15786 ;;
15787 x86_64-*linux*)
15788 LD="${LD-ld} -m elf_x86_64"
15789 ;;
15790 ppc*-*linux*|powerpc*-*linux*)
15791 LD="${LD-ld} -m elf64ppc"
15792 ;;
15793 s390*-*linux*|s390*-*tpf*)
15794 LD="${LD-ld} -m elf64_s390"
15795 ;;
15796 sparc*-*linux*)
15797 LD="${LD-ld} -m elf64_sparc"
15798 ;;
15799 esac
15800 ;;
15801 esac
15802 fi
15803 rm -rf conftest*
15804 ;;
15805
15806*-*-sco3.2v5*)
15807 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
15808 SAVE_CFLAGS="$CFLAGS"
15809 CFLAGS="$CFLAGS -belf"
15810 echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
15811echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
15812if test "${lt_cv_cc_needs_belf+set}" = set; then
15813 echo $ECHO_N "(cached) $ECHO_C" >&6
15814else
15815 ac_ext=c
15816ac_cpp='$CPP $CPPFLAGS'
15817ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15818ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15819ac_compiler_gnu=$ac_cv_c_compiler_gnu
15820
15821 cat >conftest.$ac_ext <<_ACEOF
15822/* confdefs.h. */
15823_ACEOF
15824cat confdefs.h >>conftest.$ac_ext
15825cat >>conftest.$ac_ext <<_ACEOF
15826/* end confdefs.h. */
15827
15828int
15829main ()
15830{
15831
15832 ;
15833 return 0;
15834}
15835_ACEOF
15836rm -f conftest.$ac_objext conftest$ac_exeext
15837if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15838 (eval $ac_link) 2>conftest.er1
15839 ac_status=$?
15840 grep -v '^ *+' conftest.er1 >conftest.err
15841 rm -f conftest.er1
15842 cat conftest.err >&5
15843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15844 (exit $ac_status); } &&
15845 { ac_try='test -z "$ac_c_werror_flag"
15846 || test ! -s conftest.err'
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); }; } &&
15852 { ac_try='test -s conftest$ac_exeext'
15853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15854 (eval $ac_try) 2>&5
15855 ac_status=$?
15856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15857 (exit $ac_status); }; }; then
15858 lt_cv_cc_needs_belf=yes
15859else
15860 echo "$as_me: failed program was:" >&5
15861sed 's/^/| /' conftest.$ac_ext >&5
15862
15863lt_cv_cc_needs_belf=no
15864fi
15865rm -f conftest.err conftest.$ac_objext \
15866 conftest$ac_exeext conftest.$ac_ext
15867 ac_ext=c
15868ac_cpp='$CPP $CPPFLAGS'
15869ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15870ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15871ac_compiler_gnu=$ac_cv_c_compiler_gnu
15872
15873fi
15874echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
15875echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
15876 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
15877 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
15878 CFLAGS="$SAVE_CFLAGS"
15879 fi
15880 ;;
15881sparc*-*solaris*)
15882 # Find out which ABI we are using.
15883 echo 'int i;' > conftest.$ac_ext
15884 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15885 (eval $ac_compile) 2>&5
15886 ac_status=$?
15887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15888 (exit $ac_status); }; then
15889 case `/usr/bin/file conftest.o` in
15890 *64-bit*)
15891 case $lt_cv_prog_gnu_ld in
15892 yes*) LD="${LD-ld} -m elf64_sparc" ;;
15893 *) LD="${LD-ld} -64" ;;
15894 esac
15895 ;;
15896 esac
15897 fi
15898 rm -rf conftest*
15899 ;;
15900esac
15901
15902need_locks="$enable_libtool_lock"
15903
15904
15905for ac_header in dlfcn.h
15906do
15907as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15908echo "$as_me:$LINENO: checking for $ac_header" >&5
15909echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15910if eval "test \"\${$as_ac_Header+set}\" = set"; then
15911 echo $ECHO_N "(cached) $ECHO_C" >&6
15912else
15913 cat >conftest.$ac_ext <<_ACEOF
15914/* confdefs.h. */
15915_ACEOF
15916cat confdefs.h >>conftest.$ac_ext
15917cat >>conftest.$ac_ext <<_ACEOF
15918/* end confdefs.h. */
15919#include <$ac_header>
15920_ACEOF
15921if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15922 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15923 ac_status=$?
15924 grep -v '^ *+' conftest.er1 >conftest.err
15925 rm -f conftest.er1
15926 cat conftest.err >&5
15927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15928 (exit $ac_status); } >/dev/null; then
15929 if test -s conftest.err; then
15930 ac_cpp_err=$ac_c_preproc_warn_flag
15931 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15932 else
15933 ac_cpp_err=
15934 fi
15935else
15936 ac_cpp_err=yes
15937fi
15938if test -z "$ac_cpp_err"; then
15939 eval "$as_ac_Header=yes"
15940else
15941 echo "$as_me: failed program was:" >&5
15942sed 's/^/| /' conftest.$ac_ext >&5
15943
15944 eval "$as_ac_Header=no"
15945fi
15946rm -f conftest.err conftest.$ac_ext
15947fi
15948echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15949echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15950if test `eval echo '${'$as_ac_Header'}'` = yes; then
15951 cat >>confdefs.h <<_ACEOF
15952#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15953_ACEOF
15954
15955fi
15956done
15957
15958
15959
15960# This can be used to rebuild libtool when needed
15961LIBTOOL_DEPS="$ltmain"
15962
15963# Always use our own libtool.
15964LIBTOOL='$(SHELL) $(top_builddir)/libtool'
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990test -z "$LN_S" && LN_S="ln -s"
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005if test -n "${ZSH_VERSION+set}" ; then
16006 setopt NO_GLOB_SUBST
16007fi
16008
16009echo "$as_me:$LINENO: checking for objdir" >&5
16010echo $ECHO_N "checking for objdir... $ECHO_C" >&6
16011if test "${lt_cv_objdir+set}" = set; then
16012 echo $ECHO_N "(cached) $ECHO_C" >&6
16013else
16014 rm -f .libs 2>/dev/null
16015mkdir .libs 2>/dev/null
16016if test -d .libs; then
16017 lt_cv_objdir=.libs
16018else
16019 # MS-DOS does not allow filenames that begin with a dot.
16020 lt_cv_objdir=_libs
16021fi
16022rmdir .libs 2>/dev/null
16023fi
16024echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
16025echo "${ECHO_T}$lt_cv_objdir" >&6
16026objdir=$lt_cv_objdir
16027
16028
16029
16030
16031
16032cat >>confdefs.h <<_ACEOF
16033#define LT_OBJDIR "$lt_cv_objdir/"
16034_ACEOF
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052case $host_os in
16053aix3*)
16054 # AIX sometimes has problems with the GCC collect2 program. For some
16055 # reason, if we set the COLLECT_NAMES environment variable, the problems
16056 # vanish in a puff of smoke.
16057 if test "X${COLLECT_NAMES+set}" != Xset; then
16058 COLLECT_NAMES=
16059 export COLLECT_NAMES
16060 fi
16061 ;;
16062esac
16063
16064# Sed substitution that helps us do robust quoting. It backslashifies
16065# metacharacters that are still active within double-quoted strings.
16066sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
16067
16068# Same as above, but do not quote variable references.
16069double_quote_subst='s/\(["`\\]\)/\\\1/g'
16070
16071# Sed substitution to delay expansion of an escaped shell variable in a
16072# double_quote_subst'ed string.
16073delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
16074
16075# Sed substitution to delay expansion of an escaped single quote.
16076delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
16077
16078# Sed substitution to avoid accidental globbing in evaled expressions
16079no_glob_subst='s/\*/\\\*/g'
16080
16081# Global variables:
16082ofile=libtool
16083can_build_shared=yes
16084
16085# All known linkers require a `.a' archive for static linking (except MSVC,
16086# which needs '.lib').
16087libext=a
16088
16089with_gnu_ld="$lt_cv_prog_gnu_ld"
16090
16091old_CC="$CC"
16092old_CFLAGS="$CFLAGS"
16093
16094# Set sane defaults for various variables
16095test -z "$CC" && CC=cc
16096test -z "$LTCC" && LTCC=$CC
16097test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
16098test -z "$LD" && LD=ld
16099test -z "$ac_objext" && ac_objext=o
16100
16101for cc_temp in $compiler""; do
16102 case $cc_temp in
16103 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
16104 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
16105 \-*) ;;
16106 *) break;;
16107 esac
16108done
16109cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
16110
16111
16112# Only perform the check for file, if the check method requires it
16113test -z "$MAGIC_CMD" && MAGIC_CMD=file
16114case $deplibs_check_method in
16115file_magic*)
16116 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
16117 echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
16118echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
16119if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
16120 echo $ECHO_N "(cached) $ECHO_C" >&6
16121else
16122 case $MAGIC_CMD in
16123[\\/*] | ?:[\\/]*)
16124 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
16125 ;;
16126*)
16127 lt_save_MAGIC_CMD="$MAGIC_CMD"
16128 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16129 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
16130 for ac_dir in $ac_dummy; do
16131 IFS="$lt_save_ifs"
16132 test -z "$ac_dir" && ac_dir=.
16133 if test -f $ac_dir/${ac_tool_prefix}file; then
16134 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
16135 if test -n "$file_magic_test_file"; then
16136 case $deplibs_check_method in
16137 "file_magic "*)
16138 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
16139 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16140 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
16141 $EGREP "$file_magic_regex" > /dev/null; then
16142 :
16143 else
16144 cat <<_LT_EOF 1>&2
16145
16146*** Warning: the command libtool uses to detect shared libraries,
16147*** $file_magic_cmd, produces output that libtool cannot recognize.
16148*** The result is that libtool may fail to recognize shared libraries
16149*** as such. This will affect the creation of libtool libraries that
16150*** depend on shared libraries, but programs linked with such libtool
16151*** libraries will work regardless of this problem. Nevertheless, you
16152*** may want to report the problem to your system manager and/or to
16153*** bug-libtool@gnu.org
16154
16155_LT_EOF
16156 fi ;;
16157 esac
16158 fi
16159 break
16160 fi
16161 done
16162 IFS="$lt_save_ifs"
16163 MAGIC_CMD="$lt_save_MAGIC_CMD"
16164 ;;
16165esac
16166fi
16167
16168MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16169if test -n "$MAGIC_CMD"; then
16170 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
16171echo "${ECHO_T}$MAGIC_CMD" >&6
16172else
16173 echo "$as_me:$LINENO: result: no" >&5
16174echo "${ECHO_T}no" >&6
16175fi
16176
16177
16178
16179
16180
16181if test -z "$lt_cv_path_MAGIC_CMD"; then
16182 if test -n "$ac_tool_prefix"; then
16183 echo "$as_me:$LINENO: checking for file" >&5
16184echo $ECHO_N "checking for file... $ECHO_C" >&6
16185if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
16186 echo $ECHO_N "(cached) $ECHO_C" >&6
16187else
16188 case $MAGIC_CMD in
16189[\\/*] | ?:[\\/]*)
16190 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
16191 ;;
16192*)
16193 lt_save_MAGIC_CMD="$MAGIC_CMD"
16194 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16195 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
16196 for ac_dir in $ac_dummy; do
16197 IFS="$lt_save_ifs"
16198 test -z "$ac_dir" && ac_dir=.
16199 if test -f $ac_dir/file; then
16200 lt_cv_path_MAGIC_CMD="$ac_dir/file"
16201 if test -n "$file_magic_test_file"; then
16202 case $deplibs_check_method in
16203 "file_magic "*)
16204 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
16205 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16206 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
16207 $EGREP "$file_magic_regex" > /dev/null; then
16208 :
16209 else
16210 cat <<_LT_EOF 1>&2
16211
16212*** Warning: the command libtool uses to detect shared libraries,
16213*** $file_magic_cmd, produces output that libtool cannot recognize.
16214*** The result is that libtool may fail to recognize shared libraries
16215*** as such. This will affect the creation of libtool libraries that
16216*** depend on shared libraries, but programs linked with such libtool
16217*** libraries will work regardless of this problem. Nevertheless, you
16218*** may want to report the problem to your system manager and/or to
16219*** bug-libtool@gnu.org
16220
16221_LT_EOF
16222 fi ;;
16223 esac
16224 fi
16225 break
16226 fi
16227 done
16228 IFS="$lt_save_ifs"
16229 MAGIC_CMD="$lt_save_MAGIC_CMD"
16230 ;;
16231esac
16232fi
16233
16234MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16235if test -n "$MAGIC_CMD"; then
16236 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
16237echo "${ECHO_T}$MAGIC_CMD" >&6
16238else
16239 echo "$as_me:$LINENO: result: no" >&5
16240echo "${ECHO_T}no" >&6
16241fi
16242
16243
16244 else
16245 MAGIC_CMD=:
16246 fi
16247fi
16248
16249 fi
16250 ;;
16251esac
16252
16253# Use C for the default configuration in the libtool script
16254
16255lt_save_CC="$CC"
16256ac_ext=c
16257ac_cpp='$CPP $CPPFLAGS'
16258ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16259ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16260ac_compiler_gnu=$ac_cv_c_compiler_gnu
16261
16262
16263# Source file extension for C test sources.
16264ac_ext=c
16265
16266# Object file extension for compiled C test sources.
16267objext=o
16268objext=$objext
16269
16270# Code to be used in simple compile tests
16271lt_simple_compile_test_code="int some_variable = 0;"
16272
16273# Code to be used in simple link tests
16274lt_simple_link_test_code='int main(){return(0);}'
16275
16276
16277
16278
16279
16280
16281
16282# If no C compiler was specified, use CC.
16283LTCC=${LTCC-"$CC"}
16284
16285# If no C compiler flags were specified, use CFLAGS.
16286LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
16287
16288# Allow CC to be a program name with arguments.
16289compiler=$CC
16290
16291# Save the default compiler, since it gets overwritten when the other
16292# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
16293compiler_DEFAULT=$CC
16294
16295# save warnings/boilerplate of simple test code
16296ac_outfile=conftest.$ac_objext
16297echo "$lt_simple_compile_test_code" >conftest.$ac_ext
16298eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
16299_lt_compiler_boilerplate=`cat conftest.err`
16300$RM conftest*
16301
16302ac_outfile=conftest.$ac_objext
16303echo "$lt_simple_link_test_code" >conftest.$ac_ext
16304eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
16305_lt_linker_boilerplate=`cat conftest.err`
16306$RM conftest*
16307
16308
16309## CAVEAT EMPTOR:
16310## There is no encapsulation within the following macros, do not change
16311## the running order or otherwise move them around unless you know exactly
16312## what you are doing...
16313if test -n "$compiler"; then
16314
16315lt_prog_compiler_no_builtin_flag=
16316
16317if test "$GCC" = yes; then
16318 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
16319
16320 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
16321echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
16322if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
16323 echo $ECHO_N "(cached) $ECHO_C" >&6
16324else
16325 lt_cv_prog_compiler_rtti_exceptions=no
16326 ac_outfile=conftest.$ac_objext
16327 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16328 lt_compiler_flag="-fno-rtti -fno-exceptions"
16329 # Insert the option either (1) after the last *FLAGS variable, or
16330 # (2) before a word containing "conftest.", or (3) at the end.
16331 # Note that $ac_compile itself does not contain backslashes and begins
16332 # with a dollar sign (not a hyphen), so the echo should work correctly.
16333 # The option is referenced via a variable to avoid confusing sed.
16334 lt_compile=`echo "$ac_compile" | $SED \
16335 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16336 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16337 -e 's:$: $lt_compiler_flag:'`
3d4e720a 16338 (eval echo "\"\$as_me:16338: $lt_compile\"" >&5)
da0f6381
PB
16339 (eval "$lt_compile" 2>conftest.err)
16340 ac_status=$?
16341 cat conftest.err >&5
3d4e720a 16342 echo "$as_me:16342: \$? = $ac_status" >&5
da0f6381
PB
16343 if (exit $ac_status) && test -s "$ac_outfile"; then
16344 # The compiler can only warn and ignore the option if not recognized
16345 # So say no if there are warnings other than the usual output.
16346 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
16347 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16348 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16349 lt_cv_prog_compiler_rtti_exceptions=yes
16350 fi
16351 fi
16352 $RM conftest*
16353
16354fi
16355echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
16356echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
16357
16358if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
16359 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
16360else
16361 :
16362fi
16363
16364fi
16365
16366
16367
16368
16369
16370
16371 lt_prog_compiler_wl=
16372lt_prog_compiler_pic=
16373lt_prog_compiler_static=
16374
16375echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
16376echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
16377
16378 if test "$GCC" = yes; then
16379 lt_prog_compiler_wl='-Wl,'
16380 lt_prog_compiler_static='-static'
16381
16382 case $host_os in
16383 aix*)
16384 # All AIX code is PIC.
16385 if test "$host_cpu" = ia64; then
16386 # AIX 5 now supports IA64 processor
16387 lt_prog_compiler_static='-Bstatic'
16388 fi
16389 ;;
16390
16391 amigaos*)
16392 if test "$host_cpu" = m68k; then
16393 # FIXME: we need at least 68020 code to build shared libraries, but
16394 # adding the `-m68020' flag to GCC prevents building anything better,
16395 # like `-m68040'.
16396 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
16397 fi
16398 ;;
16399
16400 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
16401 # PIC is the default for these OSes.
16402 ;;
16403
16404 mingw* | cygwin* | pw32* | os2*)
16405 # This hack is so that the source file can tell whether it is being
16406 # built for inclusion in a dll (and should export symbols for example).
16407 # Although the cygwin gcc ignores -fPIC, still need this for old-style
16408 # (--disable-auto-import) libraries
16409 lt_prog_compiler_pic='-DDLL_EXPORT'
16410 ;;
16411
16412 darwin* | rhapsody*)
16413 # PIC is the default on this platform
16414 # Common symbols not allowed in MH_DYLIB files
16415 lt_prog_compiler_pic='-fno-common'
16416 ;;
16417
16418 hpux*)
16419 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16420 # not for PA HP-UX.
16421 case $host_cpu in
16422 hppa*64*|ia64*)
16423 # +Z the default
16424 ;;
16425 *)
16426 lt_prog_compiler_pic='-fPIC'
16427 ;;
16428 esac
16429 ;;
16430
16431 interix[3-9]*)
16432 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
16433 # Instead, we relocate shared libraries at runtime.
16434 ;;
16435
16436 msdosdjgpp*)
16437 # Just because we use GCC doesn't mean we suddenly get shared libraries
16438 # on systems that don't support them.
16439 lt_prog_compiler_can_build_shared=no
16440 enable_shared=no
16441 ;;
16442
16443 *nto* | *qnx*)
16444 # QNX uses GNU C++, but need to define -shared option too, otherwise
16445 # it will coredump.
16446 lt_prog_compiler_pic='-fPIC -shared'
16447 ;;
16448
16449 sysv4*MP*)
16450 if test -d /usr/nec; then
16451 lt_prog_compiler_pic=-Kconform_pic
16452 fi
16453 ;;
16454
16455 *)
16456 lt_prog_compiler_pic='-fPIC'
16457 ;;
16458 esac
16459 else
16460 # PORTME Check for flag to pass linker flags through the system compiler.
16461 case $host_os in
16462 aix*)
16463 lt_prog_compiler_wl='-Wl,'
16464 if test "$host_cpu" = ia64; then
16465 # AIX 5 now supports IA64 processor
16466 lt_prog_compiler_static='-Bstatic'
16467 else
16468 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
16469 fi
16470 ;;
16471 darwin*)
16472 # PIC is the default on this platform
16473 # Common symbols not allowed in MH_DYLIB files
16474 case $cc_basename in
16475 xlc*)
16476 lt_prog_compiler_pic='-qnocommon'
16477 lt_prog_compiler_wl='-Wl,'
16478 ;;
16479 esac
16480 ;;
16481
16482 mingw* | cygwin* | pw32* | os2*)
16483 # This hack is so that the source file can tell whether it is being
16484 # built for inclusion in a dll (and should export symbols for example).
16485 lt_prog_compiler_pic='-DDLL_EXPORT'
16486 ;;
16487
16488 hpux9* | hpux10* | hpux11*)
16489 lt_prog_compiler_wl='-Wl,'
16490 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16491 # not for PA HP-UX.
16492 case $host_cpu in
16493 hppa*64*|ia64*)
16494 # +Z the default
16495 ;;
16496 *)
16497 lt_prog_compiler_pic='+Z'
16498 ;;
16499 esac
16500 # Is there a better lt_prog_compiler_static that works with the bundled CC?
16501 lt_prog_compiler_static='${wl}-a ${wl}archive'
16502 ;;
16503
16504 irix5* | irix6* | nonstopux*)
16505 lt_prog_compiler_wl='-Wl,'
16506 # PIC (with -KPIC) is the default.
16507 lt_prog_compiler_static='-non_shared'
16508 ;;
16509
16510 linux* | k*bsd*-gnu)
16511 case $cc_basename in
16512 icc* | ecc*)
16513 lt_prog_compiler_wl='-Wl,'
16514 lt_prog_compiler_pic='-KPIC'
16515 lt_prog_compiler_static='-static'
16516 ;;
16517 pgcc* | pgf77* | pgf90* | pgf95*)
16518 # Portland Group compilers (*not* the Pentium gcc compiler,
16519 # which looks to be a dead project)
16520 lt_prog_compiler_wl='-Wl,'
16521 lt_prog_compiler_pic='-fpic'
16522 lt_prog_compiler_static='-Bstatic'
16523 ;;
16524 ccc*)
16525 lt_prog_compiler_wl='-Wl,'
16526 # All Alpha code is PIC.
16527 lt_prog_compiler_static='-non_shared'
16528 ;;
16529 *)
16530 case `$CC -V 2>&1 | sed 5q` in
16531 *Sun\ C*)
16532 # Sun C 5.9
16533 lt_prog_compiler_pic='-KPIC'
16534 lt_prog_compiler_static='-Bstatic'
16535 lt_prog_compiler_wl='-Wl,'
16536 ;;
16537 *Sun\ F*)
16538 # Sun Fortran 8.3 passes all unrecognized flags to the linker
16539 lt_prog_compiler_pic='-KPIC'
16540 lt_prog_compiler_static='-Bstatic'
16541 lt_prog_compiler_wl=''
16542 ;;
16543 esac
16544 ;;
16545 esac
16546 ;;
16547
16548 newsos6)
16549 lt_prog_compiler_pic='-KPIC'
16550 lt_prog_compiler_static='-Bstatic'
16551 ;;
16552
16553 *nto* | *qnx*)
16554 # QNX uses GNU C++, but need to define -shared option too, otherwise
16555 # it will coredump.
16556 lt_prog_compiler_pic='-fPIC -shared'
16557 ;;
16558
16559 osf3* | osf4* | osf5*)
16560 lt_prog_compiler_wl='-Wl,'
16561 # All OSF/1 code is PIC.
16562 lt_prog_compiler_static='-non_shared'
16563 ;;
16564
16565 rdos*)
16566 lt_prog_compiler_static='-non_shared'
16567 ;;
16568
16569 solaris*)
16570 lt_prog_compiler_pic='-KPIC'
16571 lt_prog_compiler_static='-Bstatic'
16572 case $cc_basename in
16573 f77* | f90* | f95*)
16574 lt_prog_compiler_wl='-Qoption ld ';;
16575 *)
16576 lt_prog_compiler_wl='-Wl,';;
16577 esac
16578 ;;
16579
16580 sunos4*)
16581 lt_prog_compiler_wl='-Qoption ld '
16582 lt_prog_compiler_pic='-PIC'
16583 lt_prog_compiler_static='-Bstatic'
16584 ;;
16585
16586 sysv4 | sysv4.2uw2* | sysv4.3*)
16587 lt_prog_compiler_wl='-Wl,'
16588 lt_prog_compiler_pic='-KPIC'
16589 lt_prog_compiler_static='-Bstatic'
16590 ;;
16591
16592 sysv4*MP*)
16593 if test -d /usr/nec ;then
16594 lt_prog_compiler_pic='-Kconform_pic'
16595 lt_prog_compiler_static='-Bstatic'
16596 fi
16597 ;;
16598
16599 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
16600 lt_prog_compiler_wl='-Wl,'
16601 lt_prog_compiler_pic='-KPIC'
16602 lt_prog_compiler_static='-Bstatic'
16603 ;;
16604
16605 unicos*)
16606 lt_prog_compiler_wl='-Wl,'
16607 lt_prog_compiler_can_build_shared=no
16608 ;;
16609
16610 uts4*)
16611 lt_prog_compiler_pic='-pic'
16612 lt_prog_compiler_static='-Bstatic'
16613 ;;
16614
16615 *)
16616 lt_prog_compiler_can_build_shared=no
16617 ;;
16618 esac
16619 fi
16620
16621case $host_os in
16622 # For platforms which do not support PIC, -DPIC is meaningless:
16623 *djgpp*)
16624 lt_prog_compiler_pic=
16625 ;;
16626 *)
16627 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
16628 ;;
16629esac
16630echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
16631echo "${ECHO_T}$lt_prog_compiler_pic" >&6
16632
16633
16634
16635
16636
16637
16638#
16639# Check to make sure the PIC flag actually works.
16640#
16641if test -n "$lt_prog_compiler_pic"; then
16642 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
16643echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
16644if test "${lt_prog_compiler_pic_works+set}" = set; then
16645 echo $ECHO_N "(cached) $ECHO_C" >&6
16646else
16647 lt_prog_compiler_pic_works=no
16648 ac_outfile=conftest.$ac_objext
16649 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16650 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
16651 # Insert the option either (1) after the last *FLAGS variable, or
16652 # (2) before a word containing "conftest.", or (3) at the end.
16653 # Note that $ac_compile itself does not contain backslashes and begins
16654 # with a dollar sign (not a hyphen), so the echo should work correctly.
16655 # The option is referenced via a variable to avoid confusing sed.
16656 lt_compile=`echo "$ac_compile" | $SED \
16657 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16658 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16659 -e 's:$: $lt_compiler_flag:'`
3d4e720a 16660 (eval echo "\"\$as_me:16660: $lt_compile\"" >&5)
da0f6381
PB
16661 (eval "$lt_compile" 2>conftest.err)
16662 ac_status=$?
16663 cat conftest.err >&5
3d4e720a 16664 echo "$as_me:16664: \$? = $ac_status" >&5
da0f6381
PB
16665 if (exit $ac_status) && test -s "$ac_outfile"; then
16666 # The compiler can only warn and ignore the option if not recognized
16667 # So say no if there are warnings other than the usual output.
16668 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
16669 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16670 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16671 lt_prog_compiler_pic_works=yes
16672 fi
16673 fi
16674 $RM conftest*
16675
16676fi
16677echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
16678echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
16679
16680if test x"$lt_prog_compiler_pic_works" = xyes; then
16681 case $lt_prog_compiler_pic in
16682 "" | " "*) ;;
16683 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
16684 esac
16685else
16686 lt_prog_compiler_pic=
16687 lt_prog_compiler_can_build_shared=no
16688fi
16689
16690fi
16691
16692
16693
16694
16695
16696
16697#
16698# Check to make sure the static flag actually works.
16699#
16700wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
16701echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
16702echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
16703if test "${lt_prog_compiler_static_works+set}" = set; then
16704 echo $ECHO_N "(cached) $ECHO_C" >&6
16705else
16706 lt_prog_compiler_static_works=no
16707 save_LDFLAGS="$LDFLAGS"
16708 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
16709 echo "$lt_simple_link_test_code" > conftest.$ac_ext
16710 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
16711 # The linker can only warn and ignore the option if not recognized
16712 # So say no if there are warnings
16713 if test -s conftest.err; then
16714 # Append any errors to the config.log.
16715 cat conftest.err 1>&5
16716 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
16717 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16718 if diff conftest.exp conftest.er2 >/dev/null; then
16719 lt_prog_compiler_static_works=yes
16720 fi
16721 else
16722 lt_prog_compiler_static_works=yes
16723 fi
16724 fi
16725 $RM conftest*
16726 LDFLAGS="$save_LDFLAGS"
16727
16728fi
16729echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
16730echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
16731
16732if test x"$lt_prog_compiler_static_works" = xyes; then
16733 :
16734else
16735 lt_prog_compiler_static=
16736fi
16737
16738
16739
16740
16741
16742
16743
16744 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
16745echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
16746if test "${lt_cv_prog_compiler_c_o+set}" = set; then
16747 echo $ECHO_N "(cached) $ECHO_C" >&6
16748else
16749 lt_cv_prog_compiler_c_o=no
16750 $RM -r conftest 2>/dev/null
16751 mkdir conftest
16752 cd conftest
16753 mkdir out
16754 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16755
16756 lt_compiler_flag="-o out/conftest2.$ac_objext"
16757 # Insert the option either (1) after the last *FLAGS variable, or
16758 # (2) before a word containing "conftest.", or (3) at the end.
16759 # Note that $ac_compile itself does not contain backslashes and begins
16760 # with a dollar sign (not a hyphen), so the echo should work correctly.
16761 lt_compile=`echo "$ac_compile" | $SED \
16762 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16763 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16764 -e 's:$: $lt_compiler_flag:'`
3d4e720a 16765 (eval echo "\"\$as_me:16765: $lt_compile\"" >&5)
da0f6381
PB
16766 (eval "$lt_compile" 2>out/conftest.err)
16767 ac_status=$?
16768 cat out/conftest.err >&5
3d4e720a 16769 echo "$as_me:16769: \$? = $ac_status" >&5
da0f6381
PB
16770 if (exit $ac_status) && test -s out/conftest2.$ac_objext
16771 then
16772 # The compiler can only warn and ignore the option if not recognized
16773 # So say no if there are warnings
16774 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
16775 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
16776 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
16777 lt_cv_prog_compiler_c_o=yes
16778 fi
16779 fi
16780 chmod u+w . 2>&5
16781 $RM conftest*
16782 # SGI C++ compiler will create directory out/ii_files/ for
16783 # template instantiation
16784 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
16785 $RM out/* && rmdir out
16786 cd ..
16787 $RM -r conftest
16788 $RM conftest*
16789
16790fi
16791echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
16792echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
16793
16794
16795
16796
16797
16798
16799 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
16800echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
16801if test "${lt_cv_prog_compiler_c_o+set}" = set; then
16802 echo $ECHO_N "(cached) $ECHO_C" >&6
16803else
16804 lt_cv_prog_compiler_c_o=no
16805 $RM -r conftest 2>/dev/null
16806 mkdir conftest
16807 cd conftest
16808 mkdir out
16809 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16810
16811 lt_compiler_flag="-o out/conftest2.$ac_objext"
16812 # Insert the option either (1) after the last *FLAGS variable, or
16813 # (2) before a word containing "conftest.", or (3) at the end.
16814 # Note that $ac_compile itself does not contain backslashes and begins
16815 # with a dollar sign (not a hyphen), so the echo should work correctly.
16816 lt_compile=`echo "$ac_compile" | $SED \
16817 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16818 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16819 -e 's:$: $lt_compiler_flag:'`
3d4e720a 16820 (eval echo "\"\$as_me:16820: $lt_compile\"" >&5)
da0f6381
PB
16821 (eval "$lt_compile" 2>out/conftest.err)
16822 ac_status=$?
16823 cat out/conftest.err >&5
3d4e720a 16824 echo "$as_me:16824: \$? = $ac_status" >&5
da0f6381
PB
16825 if (exit $ac_status) && test -s out/conftest2.$ac_objext
16826 then
16827 # The compiler can only warn and ignore the option if not recognized
16828 # So say no if there are warnings
16829 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
16830 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
16831 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
16832 lt_cv_prog_compiler_c_o=yes
16833 fi
16834 fi
16835 chmod u+w . 2>&5
16836 $RM conftest*
16837 # SGI C++ compiler will create directory out/ii_files/ for
16838 # template instantiation
16839 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
16840 $RM out/* && rmdir out
16841 cd ..
16842 $RM -r conftest
16843 $RM conftest*
16844
16845fi
16846echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
16847echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
16848
16849
16850
16851
16852hard_links="nottested"
16853if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
16854 # do not overwrite the value of need_locks provided by the user
16855 echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
16856echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
16857 hard_links=yes
16858 $RM conftest*
16859 ln conftest.a conftest.b 2>/dev/null && hard_links=no
16860 touch conftest.a
16861 ln conftest.a conftest.b 2>&5 || hard_links=no
16862 ln conftest.a conftest.b 2>/dev/null && hard_links=no
16863 echo "$as_me:$LINENO: result: $hard_links" >&5
16864echo "${ECHO_T}$hard_links" >&6
16865 if test "$hard_links" = no; then
16866 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
16867echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
16868 need_locks=warn
16869 fi
16870else
16871 need_locks=no
16872fi
16873
16874
16875
16876
16877
16878
16879 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
16880echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
16881
16882 runpath_var=
16883 allow_undefined_flag=
16884 always_export_symbols=no
16885 archive_cmds=
16886 archive_expsym_cmds=
16887 compiler_needs_object=no
16888 enable_shared_with_static_runtimes=no
16889 export_dynamic_flag_spec=
16890 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
16891 hardcode_automatic=no
16892 hardcode_direct=no
16893 hardcode_direct_absolute=no
16894 hardcode_libdir_flag_spec=
16895 hardcode_libdir_flag_spec_ld=
16896 hardcode_libdir_separator=
16897 hardcode_minus_L=no
16898 hardcode_shlibpath_var=unsupported
16899 inherit_rpath=no
16900 link_all_deplibs=unknown
16901 module_cmds=
16902 module_expsym_cmds=
16903 old_archive_from_new_cmds=
16904 old_archive_from_expsyms_cmds=
16905 thread_safe_flag_spec=
16906 whole_archive_flag_spec=
16907 # include_expsyms should be a list of space-separated symbols to be *always*
16908 # included in the symbol list
16909 include_expsyms=
16910 # exclude_expsyms can be an extended regexp of symbols to exclude
16911 # it will be wrapped by ` (' and `)$', so one must not match beginning or
16912 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
16913 # as well as any symbol that contains `d'.
16914 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
16915 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
16916 # platforms (ab)use it in PIC code, but their linkers get confused if
16917 # the symbol is explicitly referenced. Since portable code cannot
16918 # rely on this symbol name, it's probably fine to never include it in
16919 # preloaded symbol tables.
16920 extract_expsyms_cmds=
16921
16922 case $host_os in
16923 cygwin* | mingw* | pw32*)
16924 # FIXME: the MSVC++ port hasn't been tested in a loooong time
16925 # When not using gcc, we currently assume that we are using
16926 # Microsoft Visual C++.
16927 if test "$GCC" != yes; then
16928 with_gnu_ld=no
16929 fi
16930 ;;
16931 interix*)
16932 # we just hope/assume this is gcc and not c89 (= MSVC++)
16933 with_gnu_ld=yes
16934 ;;
16935 openbsd*)
16936 with_gnu_ld=no
16937 ;;
16938 esac
16939
16940 ld_shlibs=yes
16941 if test "$with_gnu_ld" = yes; then
16942 # If archive_cmds runs LD, not CC, wlarc should be empty
16943 wlarc='${wl}'
16944
16945 # Set some defaults for GNU ld with shared library support. These
16946 # are reset later if shared libraries are not supported. Putting them
16947 # here allows them to be overridden if necessary.
16948 runpath_var=LD_RUN_PATH
16949 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
16950 export_dynamic_flag_spec='${wl}--export-dynamic'
16951 # ancient GNU ld didn't support --whole-archive et. al.
16952 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
16953 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
16954 else
16955 whole_archive_flag_spec=
16956 fi
16957 supports_anon_versioning=no
16958 case `$LD -v 2>&1` in
16959 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
16960 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
16961 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
16962 *\ 2.11.*) ;; # other 2.11 versions
16963 *) supports_anon_versioning=yes ;;
16964 esac
16965
16966 # See if GNU ld supports shared libraries.
16967 case $host_os in
16968 aix[3-9]*)
16969 # On AIX/PPC, the GNU linker is very broken
16970 if test "$host_cpu" != ia64; then
16971 ld_shlibs=no
16972 cat <<_LT_EOF 1>&2
16973
16974*** Warning: the GNU linker, at least up to release 2.9.1, is reported
16975*** to be unable to reliably create shared libraries on AIX.
16976*** Therefore, libtool is disabling shared libraries support. If you
16977*** really care for shared libraries, you may want to modify your PATH
16978*** so that a non-GNU linker is found, and then restart.
16979
16980_LT_EOF
16981 fi
16982 ;;
16983
16984 amigaos*)
16985 if test "$host_cpu" = m68k; then
16986 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
16987 hardcode_libdir_flag_spec='-L$libdir'
16988 hardcode_minus_L=yes
16989 fi
16990
16991 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
16992 # that the semantics of dynamic libraries on AmigaOS, at least up
16993 # to version 4, is to share data among multiple programs linked
16994 # with the same dynamic library. Since this doesn't match the
16995 # behavior of shared libraries on other platforms, we can't use
16996 # them.
16997 ld_shlibs=no
16998 ;;
16999
17000 beos*)
17001 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17002 allow_undefined_flag=unsupported
17003 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
17004 # support --undefined. This deserves some investigation. FIXME
17005 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17006 else
17007 ld_shlibs=no
17008 fi
17009 ;;
17010
17011 cygwin* | mingw* | pw32*)
17012 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
17013 # as there is no search path for DLLs.
17014 hardcode_libdir_flag_spec='-L$libdir'
17015 allow_undefined_flag=unsupported
17016 always_export_symbols=no
17017 enable_shared_with_static_runtimes=yes
17018 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
17019
17020 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
17021 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17022 # If the export-symbols file already is a .def file (1st line
17023 # is EXPORTS), use it as is; otherwise, prepend...
17024 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
17025 cp $export_symbols $output_objdir/$soname.def;
17026 else
17027 echo EXPORTS > $output_objdir/$soname.def;
17028 cat $export_symbols >> $output_objdir/$soname.def;
17029 fi~
17030 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17031 else
17032 ld_shlibs=no
17033 fi
17034 ;;
17035
17036 interix[3-9]*)
17037 hardcode_direct=no
17038 hardcode_shlibpath_var=no
17039 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
17040 export_dynamic_flag_spec='${wl}-E'
17041 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
17042 # Instead, shared libraries are loaded at an image base (0x10000000 by
17043 # default) and relocated if they conflict, which is a slow very memory
17044 # consuming and fragmenting process. To avoid this, we pick a random,
17045 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
17046 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
17047 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
17048 archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
17049 ;;
17050
17051 gnu* | linux* | tpf* | k*bsd*-gnu)
17052 tmp_diet=no
17053 if test "$host_os" = linux-dietlibc; then
17054 case $cc_basename in
17055 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
17056 esac
17057 fi
17058 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
17059 && test "$tmp_diet" = no
17060 then
17061 tmp_addflag=
17062 case $cc_basename,$host_cpu in
17063 pgcc*) # Portland Group C compiler
17064 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
17065 tmp_addflag=' $pic_flag'
17066 ;;
17067 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
17068 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
17069 tmp_addflag=' $pic_flag -Mnomain' ;;
17070 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
17071 tmp_addflag=' -i_dynamic' ;;
17072 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
17073 tmp_addflag=' -i_dynamic -nofor_main' ;;
17074 ifc* | ifort*) # Intel Fortran compiler
17075 tmp_addflag=' -nofor_main' ;;
17076 esac
17077 case `$CC -V 2>&1 | sed 5q` in
17078 *Sun\ C*) # Sun C 5.9
17079 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
17080 compiler_needs_object=yes
17081 tmp_sharedflag='-G' ;;
17082 *Sun\ F*) # Sun Fortran 8.3
17083 tmp_sharedflag='-G' ;;
17084 *)
17085 tmp_sharedflag='-shared' ;;
17086 esac
17087 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17088
17089 if test "x$supports_anon_versioning" = xyes; then
17090 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
17091 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
17092 echo "local: *; };" >> $output_objdir/$libname.ver~
17093 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
17094 fi
17095 else
17096 ld_shlibs=no
17097 fi
17098 ;;
17099
17100 netbsd*)
17101 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
17102 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
17103 wlarc=
17104 else
17105 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17106 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17107 fi
17108 ;;
17109
17110 solaris*)
17111 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
17112 ld_shlibs=no
17113 cat <<_LT_EOF 1>&2
17114
17115*** Warning: The releases 2.8.* of the GNU linker cannot reliably
17116*** create shared libraries on Solaris systems. Therefore, libtool
17117*** is disabling shared libraries support. We urge you to upgrade GNU
17118*** binutils to release 2.9.1 or newer. Another option is to modify
17119*** your PATH or compiler configuration so that the native linker is
17120*** used, and then restart.
17121
17122_LT_EOF
17123 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17124 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17125 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17126 else
17127 ld_shlibs=no
17128 fi
17129 ;;
17130
17131 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
17132 case `$LD -v 2>&1` in
17133 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
17134 ld_shlibs=no
17135 cat <<_LT_EOF 1>&2
17136
17137*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
17138*** reliably create shared libraries on SCO systems. Therefore, libtool
17139*** is disabling shared libraries support. We urge you to upgrade GNU
17140*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
17141*** your PATH or compiler configuration so that the native linker is
17142*** used, and then restart.
17143
17144_LT_EOF
17145 ;;
17146 *)
17147 # For security reasons, it is highly recommended that you always
17148 # use absolute paths for naming shared libraries, and exclude the
17149 # DT_RUNPATH tag from executables and libraries. But doing so
17150 # requires that you compile everything twice, which is a pain.
17151 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17152 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17153 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17154 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17155 else
17156 ld_shlibs=no
17157 fi
17158 ;;
17159 esac
17160 ;;
17161
17162 sunos4*)
17163 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17164 wlarc=
17165 hardcode_direct=yes
17166 hardcode_shlibpath_var=no
17167 ;;
17168
17169 *)
17170 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17171 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17172 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17173 else
17174 ld_shlibs=no
17175 fi
17176 ;;
17177 esac
17178
17179 if test "$ld_shlibs" = no; then
17180 runpath_var=
17181 hardcode_libdir_flag_spec=
17182 export_dynamic_flag_spec=
17183 whole_archive_flag_spec=
17184 fi
17185 else
17186 # PORTME fill in a description of your system's linker (not GNU ld)
17187 case $host_os in
17188 aix3*)
17189 allow_undefined_flag=unsupported
17190 always_export_symbols=yes
17191 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
17192 # Note: this linker hardcodes the directories in LIBPATH if there
17193 # are no directories specified by -L.
17194 hardcode_minus_L=yes
17195 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
17196 # Neither direct hardcoding nor static linking is supported with a
17197 # broken collect2.
17198 hardcode_direct=unsupported
17199 fi
17200 ;;
17201
17202 aix[4-9]*)
17203 if test "$host_cpu" = ia64; then
17204 # On IA64, the linker does run time linking by default, so we don't
17205 # have to do anything special.
17206 aix_use_runtimelinking=no
17207 exp_sym_flag='-Bexport'
17208 no_entry_flag=""
17209 else
17210 # If we're using GNU nm, then we don't want the "-C" option.
17211 # -C means demangle to AIX nm, but means don't demangle with GNU nm
17212 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
17213 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
17214 else
17215 export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
17216 fi
17217 aix_use_runtimelinking=no
17218
17219 # Test if we are trying to use run time linking or normal
17220 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
17221 # need to do runtime linking.
17222 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
17223 for ld_flag in $LDFLAGS; do
17224 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
17225 aix_use_runtimelinking=yes
17226 break
17227 fi
17228 done
17229 ;;
17230 esac
17231
17232 exp_sym_flag='-bexport'
17233 no_entry_flag='-bnoentry'
17234 fi
17235
17236 # When large executables or shared objects are built, AIX ld can
17237 # have problems creating the table of contents. If linking a library
17238 # or program results in "error TOC overflow" add -mminimal-toc to
17239 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
17240 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
17241
17242 archive_cmds=''
17243 hardcode_direct=yes
17244 hardcode_direct_absolute=yes
17245 hardcode_libdir_separator=':'
17246 link_all_deplibs=yes
17247 file_list_spec='${wl}-f,'
17248
17249 if test "$GCC" = yes; then
17250 case $host_os in aix4.[012]|aix4.[012].*)
17251 # We only want to do this on AIX 4.2 and lower, the check
17252 # below for broken collect2 doesn't work under 4.3+
17253 collect2name=`${CC} -print-prog-name=collect2`
17254 if test -f "$collect2name" &&
17255 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
17256 then
17257 # We have reworked collect2
17258 :
17259 else
17260 # We have old collect2
17261 hardcode_direct=unsupported
17262 # It fails to find uninstalled libraries when the uninstalled
17263 # path is not listed in the libpath. Setting hardcode_minus_L
17264 # to unsupported forces relinking
17265 hardcode_minus_L=yes
17266 hardcode_libdir_flag_spec='-L$libdir'
17267 hardcode_libdir_separator=
17268 fi
17269 ;;
17270 esac
17271 shared_flag='-shared'
17272 if test "$aix_use_runtimelinking" = yes; then
17273 shared_flag="$shared_flag "'${wl}-G'
17274 fi
17275 else
17276 # not using gcc
17277 if test "$host_cpu" = ia64; then
17278 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
17279 # chokes on -Wl,-G. The following line is correct:
17280 shared_flag='-G'
17281 else
17282 if test "$aix_use_runtimelinking" = yes; then
17283 shared_flag='${wl}-G'
17284 else
17285 shared_flag='${wl}-bM:SRE'
17286 fi
17287 fi
17288 fi
17289
17290 # It seems that -bexpall does not export symbols beginning with
17291 # underscore (_), so it is better to generate a list of symbols to export.
17292 always_export_symbols=yes
17293 if test "$aix_use_runtimelinking" = yes; then
17294 # Warning - without using the other runtime loading flags (-brtl),
17295 # -berok will link without error, but may produce a broken library.
17296 allow_undefined_flag='-berok'
17297 # Determine the default libpath from the value encoded in an
17298 # empty executable.
17299 cat >conftest.$ac_ext <<_ACEOF
17300/* confdefs.h. */
17301_ACEOF
17302cat confdefs.h >>conftest.$ac_ext
17303cat >>conftest.$ac_ext <<_ACEOF
17304/* end confdefs.h. */
17305
17306int
17307main ()
17308{
17309
17310 ;
17311 return 0;
17312}
17313_ACEOF
17314rm -f conftest.$ac_objext conftest$ac_exeext
17315if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17316 (eval $ac_link) 2>conftest.er1
17317 ac_status=$?
17318 grep -v '^ *+' conftest.er1 >conftest.err
17319 rm -f conftest.er1
17320 cat conftest.err >&5
17321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17322 (exit $ac_status); } &&
17323 { ac_try='test -z "$ac_c_werror_flag"
17324 || test ! -s conftest.err'
17325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17326 (eval $ac_try) 2>&5
17327 ac_status=$?
17328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17329 (exit $ac_status); }; } &&
17330 { ac_try='test -s conftest$ac_exeext'
17331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17332 (eval $ac_try) 2>&5
17333 ac_status=$?
17334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17335 (exit $ac_status); }; }; then
17336
17337lt_aix_libpath_sed='
17338 /Import File Strings/,/^$/ {
17339 /^0/ {
17340 s/^0 *\(.*\)$/\1/
17341 p
17342 }
17343 }'
17344aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17345# Check for a 64-bit object if we didn't find anything.
17346if test -z "$aix_libpath"; then
17347 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17348fi
17349else
17350 echo "$as_me: failed program was:" >&5
17351sed 's/^/| /' conftest.$ac_ext >&5
17352
17353fi
17354rm -f conftest.err conftest.$ac_objext \
17355 conftest$ac_exeext conftest.$ac_ext
17356if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17357
17358 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
17359 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
17360 else
17361 if test "$host_cpu" = ia64; then
17362 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
17363 allow_undefined_flag="-z nodefs"
17364 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
17365 else
17366 # Determine the default libpath from the value encoded in an
17367 # empty executable.
17368 cat >conftest.$ac_ext <<_ACEOF
17369/* confdefs.h. */
17370_ACEOF
17371cat confdefs.h >>conftest.$ac_ext
17372cat >>conftest.$ac_ext <<_ACEOF
17373/* end confdefs.h. */
17374
17375int
17376main ()
17377{
17378
17379 ;
17380 return 0;
17381}
17382_ACEOF
17383rm -f conftest.$ac_objext conftest$ac_exeext
17384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17385 (eval $ac_link) 2>conftest.er1
17386 ac_status=$?
17387 grep -v '^ *+' conftest.er1 >conftest.err
17388 rm -f conftest.er1
17389 cat conftest.err >&5
17390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17391 (exit $ac_status); } &&
17392 { ac_try='test -z "$ac_c_werror_flag"
17393 || test ! -s conftest.err'
17394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17395 (eval $ac_try) 2>&5
17396 ac_status=$?
17397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17398 (exit $ac_status); }; } &&
17399 { ac_try='test -s conftest$ac_exeext'
17400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17401 (eval $ac_try) 2>&5
17402 ac_status=$?
17403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17404 (exit $ac_status); }; }; then
17405
17406lt_aix_libpath_sed='
17407 /Import File Strings/,/^$/ {
17408 /^0/ {
17409 s/^0 *\(.*\)$/\1/
17410 p
17411 }
17412 }'
17413aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17414# Check for a 64-bit object if we didn't find anything.
17415if test -z "$aix_libpath"; then
17416 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17417fi
17418else
17419 echo "$as_me: failed program was:" >&5
17420sed 's/^/| /' conftest.$ac_ext >&5
17421
17422fi
17423rm -f conftest.err conftest.$ac_objext \
17424 conftest$ac_exeext conftest.$ac_ext
17425if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17426
17427 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
17428 # Warning - without using the other run time loading flags,
17429 # -berok will link without error, but may produce a broken library.
17430 no_undefined_flag=' ${wl}-bernotok'
17431 allow_undefined_flag=' ${wl}-berok'
17432 # Exported symbols can be pulled into shared objects from archives
17433 whole_archive_flag_spec='$convenience'
17434 archive_cmds_need_lc=yes
17435 # This is similar to how AIX traditionally builds its shared libraries.
17436 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
17437 fi
17438 fi
17439 ;;
17440
17441 amigaos*)
17442 if test "$host_cpu" = m68k; then
17443 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
17444 hardcode_libdir_flag_spec='-L$libdir'
17445 hardcode_minus_L=yes
17446 fi
17447 # see comment about different semantics on the GNU ld section
17448 ld_shlibs=no
17449 ;;
17450
17451 bsdi[45]*)
17452 export_dynamic_flag_spec=-rdynamic
17453 ;;
17454
17455 cygwin* | mingw* | pw32*)
17456 # When not using gcc, we currently assume that we are using
17457 # Microsoft Visual C++.
17458 # hardcode_libdir_flag_spec is actually meaningless, as there is
17459 # no search path for DLLs.
17460 hardcode_libdir_flag_spec=' '
17461 allow_undefined_flag=unsupported
17462 # Tell ltmain to make .lib files, not .a files.
17463 libext=lib
17464 # Tell ltmain to make .dll files, not .so files.
17465 shrext_cmds=".dll"
17466 # FIXME: Setting linknames here is a bad hack.
17467 archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
17468 # The linker will automatically build a .lib file if we build a DLL.
17469 old_archive_from_new_cmds='true'
17470 # FIXME: Should let the user specify the lib program.
17471 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
17472 fix_srcfile_path='`cygpath -w "$srcfile"`'
17473 enable_shared_with_static_runtimes=yes
17474 ;;
17475
17476 darwin* | rhapsody*)
17477 case $host_os in
17478 rhapsody* | darwin1.[012])
17479 allow_undefined_flag='${wl}-undefined ${wl}suppress'
17480 ;;
17481 *) # Darwin 1.3 on
17482 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
17483 10.[012])
17484 allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
17485 ;;
17486 10.*)
17487 allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
17488 ;;
17489 esac
17490 ;;
17491 esac
17492 archive_cmds_need_lc=no
17493 hardcode_direct=no
17494 hardcode_automatic=yes
17495 hardcode_shlibpath_var=unsupported
17496 whole_archive_flag_spec=''
17497 link_all_deplibs=yes
17498 if test "$GCC" = yes ; then
17499 if test "${lt_cv_apple_cc_single_mod+set}" = set; then
17500 echo $ECHO_N "(cached) $ECHO_C" >&6
17501else
17502 lt_cv_apple_cc_single_mod=no
17503 if test -z "${LT_MULTI_MODULE}"; then
17504 # By default we will add the -single_module flag. You can override
17505 # by either setting the environment variable LT_MULTI_MODULE
17506 # non-empty at configure time, or by adding -multi-module to the
17507 # link flags.
17508 echo "int foo(void){return 1;}" > conftest.c
17509 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
17510 -dynamiclib ${wl}-single_module conftest.c
17511 if test -f libconftest.dylib; then
17512 lt_cv_apple_cc_single_mod=yes
17513 rm libconftest.dylib
17514 fi
17515 rm conftest.$ac_ext
17516 fi
17517fi
17518
17519 output_verbose_link_cmd=echo
17520 if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
17521 archive_cmds='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
17522 archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17523 else
17524 archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
17525 archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17526 fi
17527 module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
17528 module_expsym_cmds='sed -e "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17529 else
17530 case $cc_basename in
17531 xlc*)
17532 output_verbose_link_cmd=echo
17533 archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
17534 module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
17535 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
17536 archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17537 module_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17538 ;;
17539 *)
17540 ld_shlibs=no
17541 ;;
17542 esac
17543 fi
17544 ;;
17545
17546 dgux*)
17547 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17548 hardcode_libdir_flag_spec='-L$libdir'
17549 hardcode_shlibpath_var=no
17550 ;;
17551
17552 freebsd1*)
17553 ld_shlibs=no
17554 ;;
17555
17556 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
17557 # support. Future versions do this automatically, but an explicit c++rt0.o
17558 # does not break anything, and helps significantly (at the cost of a little
17559 # extra space).
17560 freebsd2.2*)
17561 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
17562 hardcode_libdir_flag_spec='-R$libdir'
17563 hardcode_direct=yes
17564 hardcode_shlibpath_var=no
17565 ;;
17566
17567 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
17568 freebsd2*)
17569 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17570 hardcode_direct=yes
17571 hardcode_minus_L=yes
17572 hardcode_shlibpath_var=no
17573 ;;
17574
17575 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
17576 freebsd* | dragonfly*)
17577 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
17578 hardcode_libdir_flag_spec='-R$libdir'
17579 hardcode_direct=yes
17580 hardcode_shlibpath_var=no
17581 ;;
17582
17583 hpux9*)
17584 if test "$GCC" = yes; then
17585 archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
17586 else
17587 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
17588 fi
17589 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
17590 hardcode_libdir_separator=:
17591 hardcode_direct=yes
17592
17593 # hardcode_minus_L: Not really in the search PATH,
17594 # but as the default location of the library.
17595 hardcode_minus_L=yes
17596 export_dynamic_flag_spec='${wl}-E'
17597 ;;
17598
17599 hpux10*)
17600 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
17601 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17602 else
17603 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
17604 fi
17605 if test "$with_gnu_ld" = no; then
17606 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
17607 hardcode_libdir_flag_spec_ld='+b $libdir'
17608 hardcode_libdir_separator=:
17609 hardcode_direct=yes
17610 hardcode_direct_absolute=yes
17611 export_dynamic_flag_spec='${wl}-E'
17612 # hardcode_minus_L: Not really in the search PATH,
17613 # but as the default location of the library.
17614 hardcode_minus_L=yes
17615 fi
17616 ;;
17617
17618 hpux11*)
17619 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
17620 case $host_cpu in
17621 hppa*64*)
17622 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17623 ;;
17624 ia64*)
17625 archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17626 ;;
17627 *)
17628 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17629 ;;
17630 esac
17631 else
17632 case $host_cpu in
17633 hppa*64*)
17634 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17635 ;;
17636 ia64*)
17637 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17638 ;;
17639 *)
17640 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17641 ;;
17642 esac
17643 fi
17644 if test "$with_gnu_ld" = no; then
17645 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
17646 hardcode_libdir_separator=:
17647
17648 case $host_cpu in
17649 hppa*64*|ia64*)
17650 hardcode_direct=no
17651 hardcode_shlibpath_var=no
17652 ;;
17653 *)
17654 hardcode_direct=yes
17655 hardcode_direct_absolute=yes
17656 export_dynamic_flag_spec='${wl}-E'
17657
17658 # hardcode_minus_L: Not really in the search PATH,
17659 # but as the default location of the library.
17660 hardcode_minus_L=yes
17661 ;;
17662 esac
17663 fi
17664 ;;
17665
17666 irix5* | irix6* | nonstopux*)
17667 if test "$GCC" = yes; then
17668 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
17669 # Try to use the -exported_symbol ld option, if it does not
17670 # work, assume that -exports_file does not work either and
17671 # implicitly export all symbols.
17672 save_LDFLAGS="$LDFLAGS"
17673 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
17674 cat >conftest.$ac_ext <<_ACEOF
17675int foo(void) {}
17676_ACEOF
17677rm -f conftest.$ac_objext conftest$ac_exeext
17678if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17679 (eval $ac_link) 2>conftest.er1
17680 ac_status=$?
17681 grep -v '^ *+' conftest.er1 >conftest.err
17682 rm -f conftest.er1
17683 cat conftest.err >&5
17684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17685 (exit $ac_status); } &&
17686 { ac_try='test -z "$ac_c_werror_flag"
17687 || test ! -s conftest.err'
17688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17689 (eval $ac_try) 2>&5
17690 ac_status=$?
17691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17692 (exit $ac_status); }; } &&
17693 { ac_try='test -s conftest$ac_exeext'
17694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17695 (eval $ac_try) 2>&5
17696 ac_status=$?
17697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17698 (exit $ac_status); }; }; then
17699 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
17700
17701else
17702 echo "$as_me: failed program was:" >&5
17703sed 's/^/| /' conftest.$ac_ext >&5
17704
17705fi
17706rm -f conftest.err conftest.$ac_objext \
17707 conftest$ac_exeext conftest.$ac_ext
17708 LDFLAGS="$save_LDFLAGS"
17709 else
17710 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
17711 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
17712 fi
17713 archive_cmds_need_lc='no'
17714 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17715 hardcode_libdir_separator=:
17716 inherit_rpath=yes
17717 link_all_deplibs=yes
17718 ;;
17719
17720 netbsd*)
17721 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
17722 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
17723 else
17724 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
17725 fi
17726 hardcode_libdir_flag_spec='-R$libdir'
17727 hardcode_direct=yes
17728 hardcode_shlibpath_var=no
17729 ;;
17730
17731 newsos6)
17732 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17733 hardcode_direct=yes
17734 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17735 hardcode_libdir_separator=:
17736 hardcode_shlibpath_var=no
17737 ;;
17738
17739 *nto* | *qnx*)
17740 ;;
17741
17742 openbsd*)
17743 hardcode_direct=yes
17744 hardcode_shlibpath_var=no
17745 hardcode_direct_absolute=yes
17746 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
17747 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17748 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
17749 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
17750 export_dynamic_flag_spec='${wl}-E'
17751 else
17752 case $host_os in
17753 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
17754 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17755 hardcode_libdir_flag_spec='-R$libdir'
17756 ;;
17757 *)
17758 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17759 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
17760 ;;
17761 esac
17762 fi
17763 ;;
17764
17765 os2*)
17766 hardcode_libdir_flag_spec='-L$libdir'
17767 hardcode_minus_L=yes
17768 allow_undefined_flag=unsupported
17769 archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
17770 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
17771 ;;
17772
17773 osf3*)
17774 if test "$GCC" = yes; then
17775 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
17776 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
17777 else
17778 allow_undefined_flag=' -expect_unresolved \*'
17779 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
17780 fi
17781 archive_cmds_need_lc='no'
17782 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17783 hardcode_libdir_separator=:
17784 ;;
17785
17786 osf4* | osf5*) # as osf3* with the addition of -msym flag
17787 if test "$GCC" = yes; then
17788 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
17789 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
17790 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17791 else
17792 allow_undefined_flag=' -expect_unresolved \*'
17793 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
17794 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
17795 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
17796
17797 # Both c and cxx compiler support -rpath directly
17798 hardcode_libdir_flag_spec='-rpath $libdir'
17799 fi
17800 archive_cmds_need_lc='no'
17801 hardcode_libdir_separator=:
17802 ;;
17803
17804 solaris*)
17805 no_undefined_flag=' -z defs'
17806 if test "$GCC" = yes; then
17807 wlarc='${wl}'
17808 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17809 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17810 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
17811 else
17812 case `$CC -V 2>&1` in
17813 *"Compilers 5.0"*)
17814 wlarc=''
17815 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
17816 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17817 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
17818 ;;
17819 *)
17820 wlarc='${wl}'
17821 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
17822 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17823 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
17824 ;;
17825 esac
17826 fi
17827 hardcode_libdir_flag_spec='-R$libdir'
17828 hardcode_shlibpath_var=no
17829 case $host_os in
17830 solaris2.[0-5] | solaris2.[0-5].*) ;;
17831 *)
17832 # The compiler driver will combine and reorder linker options,
17833 # but understands `-z linker_flag'. GCC discards it without `$wl',
17834 # but is careful enough not to reorder.
17835 # Supported since Solaris 2.6 (maybe 2.5.1?)
17836 if test "$GCC" = yes; then
17837 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
17838 else
17839 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
17840 fi
17841 ;;
17842 esac
17843 link_all_deplibs=yes
17844 ;;
17845
17846 sunos4*)
17847 if test "x$host_vendor" = xsequent; then
17848 # Use $CC to link under sequent, because it throws in some extra .o
17849 # files that make .init and .fini sections work.
17850 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
17851 else
17852 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
17853 fi
17854 hardcode_libdir_flag_spec='-L$libdir'
17855 hardcode_direct=yes
17856 hardcode_minus_L=yes
17857 hardcode_shlibpath_var=no
17858 ;;
17859
17860 sysv4)
17861 case $host_vendor in
17862 sni)
17863 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17864 hardcode_direct=yes # is this really true???
17865 ;;
17866 siemens)
17867 ## LD is ld it makes a PLAMLIB
17868 ## CC just makes a GrossModule.
17869 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
17870 reload_cmds='$CC -r -o $output$reload_objs'
17871 hardcode_direct=no
17872 ;;
17873 motorola)
17874 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17875 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
17876 ;;
17877 esac
17878 runpath_var='LD_RUN_PATH'
17879 hardcode_shlibpath_var=no
17880 ;;
17881
17882 sysv4.3*)
17883 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17884 hardcode_shlibpath_var=no
17885 export_dynamic_flag_spec='-Bexport'
17886 ;;
17887
17888 sysv4*MP*)
17889 if test -d /usr/nec; then
17890 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17891 hardcode_shlibpath_var=no
17892 runpath_var=LD_RUN_PATH
17893 hardcode_runpath_var=yes
17894 ld_shlibs=yes
17895 fi
17896 ;;
17897
17898 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
17899 no_undefined_flag='${wl}-z,text'
17900 archive_cmds_need_lc=no
17901 hardcode_shlibpath_var=no
17902 runpath_var='LD_RUN_PATH'
17903
17904 if test "$GCC" = yes; then
17905 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17906 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17907 else
17908 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17909 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17910 fi
17911 ;;
17912
17913 sysv5* | sco3.2v5* | sco5v6*)
17914 # Note: We can NOT use -z defs as we might desire, because we do not
17915 # link with -lc, and that would cause any symbols used from libc to
17916 # always be unresolved, which means just about no library would
17917 # ever link correctly. If we're not using GNU ld we use -z text
17918 # though, which does catch some bad symbols but isn't as heavy-handed
17919 # as -z defs.
17920 no_undefined_flag='${wl}-z,text'
17921 allow_undefined_flag='${wl}-z,nodefs'
17922 archive_cmds_need_lc=no
17923 hardcode_shlibpath_var=no
17924 hardcode_libdir_flag_spec='${wl}-R,$libdir'
17925 hardcode_libdir_separator=':'
17926 link_all_deplibs=yes
17927 export_dynamic_flag_spec='${wl}-Bexport'
17928 runpath_var='LD_RUN_PATH'
17929
17930 if test "$GCC" = yes; then
17931 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17932 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17933 else
17934 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17935 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17936 fi
17937 ;;
17938
17939 uts4*)
17940 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17941 hardcode_libdir_flag_spec='-L$libdir'
17942 hardcode_shlibpath_var=no
17943 ;;
17944
17945 *)
17946 ld_shlibs=no
17947 ;;
17948 esac
17949
17950 if test x$host_vendor = xsni; then
17951 case $host in
17952 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
17953 export_dynamic_flag_spec='${wl}-Blargedynsym'
17954 ;;
17955 esac
17956 fi
17957 fi
17958
17959echo "$as_me:$LINENO: result: $ld_shlibs" >&5
17960echo "${ECHO_T}$ld_shlibs" >&6
17961test "$ld_shlibs" = no && can_build_shared=no
17962
17963with_gnu_ld=$with_gnu_ld
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979#
17980# Do we need to explicitly link libc?
17981#
17982case "x$archive_cmds_need_lc" in
17983x|xyes)
17984 # Assume -lc should be added
17985 archive_cmds_need_lc=yes
17986
17987 if test "$enable_shared" = yes && test "$GCC" = yes; then
17988 case $archive_cmds in
17989 *'~'*)
17990 # FIXME: we may have to deal with multi-command sequences.
17991 ;;
17992 '$CC '*)
17993 # Test whether the compiler implicitly links with -lc since on some
17994 # systems, -lgcc has to come before -lc. If gcc already passes -lc
17995 # to ld, don't add -lc before -lgcc.
17996 echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
17997echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
17998 $RM conftest*
17999 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
18000
18001 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18002 (eval $ac_compile) 2>&5
18003 ac_status=$?
18004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18005 (exit $ac_status); } 2>conftest.err; then
18006 soname=conftest
18007 lib=conftest
18008 libobjs=conftest.$ac_objext
18009 deplibs=
18010 wl=$lt_prog_compiler_wl
18011 pic_flag=$lt_prog_compiler_pic
18012 compiler_flags=-v
18013 linker_flags=-v
18014 verstring=
18015 output_objdir=.
18016 libname=conftest
18017 lt_save_allow_undefined_flag=$allow_undefined_flag
18018 allow_undefined_flag=
18019 if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
18020 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
18021 ac_status=$?
18022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18023 (exit $ac_status); }
18024 then
18025 archive_cmds_need_lc=no
18026 else
18027 archive_cmds_need_lc=yes
18028 fi
18029 allow_undefined_flag=$lt_save_allow_undefined_flag
18030 else
18031 cat conftest.err 1>&5
18032 fi
18033 $RM conftest*
18034 echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
18035echo "${ECHO_T}$archive_cmds_need_lc" >&6
18036 ;;
18037 esac
18038 fi
18039 ;;
18040esac
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
18199echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
18200withGCC=$GCC
18201if test "$withGCC" = yes; then
18202 case $host_os in
18203 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
18204 *) lt_awk_arg="/^libraries:/" ;;
18205 esac
18206 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
18207 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
18208 # if the path contains ";" then we assume it to be the separator
18209 # otherwise default to the standard path separator (i.e. ":") - it is
18210 # assumed that no part of a normal pathname contains ";" but that should
18211 # okay in the real world where ";" in dirpaths is itself problematic.
18212 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
18213 else
18214 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
18215 fi
18216 # Ok, now we have the path, separated by spaces, we can step through it
18217 # and add multilib dir if necessary.
18218 lt_tmp_lt_search_path_spec=
18219 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
18220 for lt_sys_path in $lt_search_path_spec; do
18221 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
18222 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
18223 else
18224 test -d "$lt_sys_path" && \
18225 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
18226 fi
18227 done
18228 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
18229BEGIN {RS=" "; FS="/|\n";} {
18230 lt_foo="";
18231 lt_count=0;
18232 for (lt_i = NF; lt_i > 0; lt_i--) {
18233 if ($lt_i != "" && $lt_i != ".") {
18234 if ($lt_i == "..") {
18235 lt_count++;
18236 } else {
18237 if (lt_count == 0) {
18238 lt_foo="/" $lt_i lt_foo;
18239 } else {
18240 lt_count--;
18241 }
18242 }
18243 }
18244 }
18245 if (lt_foo != "") { lt_freq[lt_foo]++; }
18246 if (lt_freq[lt_foo] == 1) { print lt_foo; }
18247}'`
18248 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
18249else
18250 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
18251fi
18252library_names_spec=
18253libname_spec='lib$name'
18254soname_spec=
18255shrext_cmds=".so"
18256postinstall_cmds=
18257postuninstall_cmds=
18258finish_cmds=
18259finish_eval=
18260shlibpath_var=
18261shlibpath_overrides_runpath=unknown
18262version_type=none
18263dynamic_linker="$host_os ld.so"
18264sys_lib_dlsearch_path_spec="/lib /usr/lib"
18265need_lib_prefix=unknown
18266hardcode_into_libs=no
18267
18268# when you set need_version to no, make sure it does not cause -set_version
18269# flags to be left without arguments
18270need_version=unknown
18271
18272case $host_os in
18273aix3*)
18274 version_type=linux
18275 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
18276 shlibpath_var=LIBPATH
18277
18278 # AIX 3 has no versioning support, so we append a major version to the name.
18279 soname_spec='${libname}${release}${shared_ext}$major'
18280 ;;
18281
18282aix[4-9]*)
18283 version_type=linux
18284 need_lib_prefix=no
18285 need_version=no
18286 hardcode_into_libs=yes
18287 if test "$host_cpu" = ia64; then
18288 # AIX 5 supports IA64
18289 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
18290 shlibpath_var=LD_LIBRARY_PATH
18291 else
18292 # With GCC up to 2.95.x, collect2 would create an import file
18293 # for dependence libraries. The import file would start with
18294 # the line `#! .'. This would cause the generated library to
18295 # depend on `.', always an invalid library. This was fixed in
18296 # development snapshots of GCC prior to 3.0.
18297 case $host_os in
18298 aix4 | aix4.[01] | aix4.[01].*)
18299 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
18300 echo ' yes '
18301 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
18302 :
18303 else
18304 can_build_shared=no
18305 fi
18306 ;;
18307 esac
18308 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
18309 # soname into executable. Probably we can add versioning support to
18310 # collect2, so additional links can be useful in future.
18311 if test "$aix_use_runtimelinking" = yes; then
18312 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
18313 # instead of lib<name>.a to let people know that these are not
18314 # typical AIX shared libraries.
18315 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18316 else
18317 # We preserve .a as extension for shared libraries through AIX4.2
18318 # and later when we are not doing run time linking.
18319 library_names_spec='${libname}${release}.a $libname.a'
18320 soname_spec='${libname}${release}${shared_ext}$major'
18321 fi
18322 shlibpath_var=LIBPATH
18323 fi
18324 ;;
18325
18326amigaos*)
18327 if test "$host_cpu" = m68k; then
18328 library_names_spec='$libname.ixlibrary $libname.a'
18329 # Create ${libname}_ixlibrary.a entries in /sys/libs.
18330 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
18331 else
18332 dynamic_linker=no
18333 fi
18334 ;;
18335
18336beos*)
18337 library_names_spec='${libname}${shared_ext}'
18338 dynamic_linker="$host_os ld.so"
18339 shlibpath_var=LIBRARY_PATH
18340 ;;
18341
18342bsdi[45]*)
18343 version_type=linux
18344 need_version=no
18345 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18346 soname_spec='${libname}${release}${shared_ext}$major'
18347 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
18348 shlibpath_var=LD_LIBRARY_PATH
18349 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
18350 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
18351 # the default ld.so.conf also contains /usr/contrib/lib and
18352 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
18353 # libtool to hard-code these into programs
18354 ;;
18355
18356cygwin* | mingw* | pw32*)
18357 version_type=windows
18358 shrext_cmds=".dll"
18359 need_version=no
18360 need_lib_prefix=no
18361
18362 case $withGCC,$host_os in
18363 yes,cygwin* | yes,mingw* | yes,pw32*)
18364 library_names_spec='$libname.dll.a'
18365 # DLL is installed to $(libdir)/../bin by postinstall_cmds
18366 postinstall_cmds='base_file=`basename \${file}`~
18367 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
18368 dldir=$destdir/`dirname \$dlpath`~
18369 test -d \$dldir || mkdir -p \$dldir~
18370 $install_prog $dir/$dlname \$dldir/$dlname~
18371 chmod a+x \$dldir/$dlname~
18372 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
18373 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
18374 fi'
18375 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
18376 dlpath=$dir/\$dldll~
18377 $RM \$dlpath'
18378 shlibpath_overrides_runpath=yes
18379
18380 case $host_os in
18381 cygwin*)
18382 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
18383 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18384 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
18385 ;;
18386 mingw*)
18387 # MinGW DLLs use traditional 'lib' prefix
18388 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18389 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
18390 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
18391 # It is most probably a Windows format PATH printed by
18392 # mingw gcc, but we are running on Cygwin. Gcc prints its search
18393 # path with ; separators, and with drive letters. We can handle the
18394 # drive letters (cygwin fileutils understands them), so leave them,
18395 # especially as we might pass files found there to a mingw objdump,
18396 # which wouldn't understand a cygwinified path. Ahh.
18397 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
18398 else
18399 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
18400 fi
18401 ;;
18402 pw32*)
18403 # pw32 DLLs use 'pw' prefix rather than 'lib'
18404 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18405 ;;
18406 esac
18407 ;;
18408
18409 *)
18410 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
18411 ;;
18412 esac
18413 dynamic_linker='Win32 ld.exe'
18414 # FIXME: first we should search . and the directory the executable is in
18415 shlibpath_var=PATH
18416 ;;
18417
18418darwin* | rhapsody*)
18419 dynamic_linker="$host_os dyld"
18420 version_type=darwin
18421 need_lib_prefix=no
18422 need_version=no
18423 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
18424 soname_spec='${libname}${release}${major}$shared_ext'
18425 shlibpath_overrides_runpath=yes
18426 shlibpath_var=DYLD_LIBRARY_PATH
18427 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
18428
18429 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
18430 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
18431 ;;
18432
18433dgux*)
18434 version_type=linux
18435 need_lib_prefix=no
18436 need_version=no
18437 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
18438 soname_spec='${libname}${release}${shared_ext}$major'
18439 shlibpath_var=LD_LIBRARY_PATH
18440 ;;
18441
18442freebsd1*)
18443 dynamic_linker=no
18444 ;;
18445
18446freebsd* | dragonfly*)
18447 # DragonFly does not have aout. When/if they implement a new
18448 # versioning mechanism, adjust this.
18449 if test -x /usr/bin/objformat; then
18450 objformat=`/usr/bin/objformat`
18451 else
18452 case $host_os in
18453 freebsd[123]*) objformat=aout ;;
18454 *) objformat=elf ;;
18455 esac
18456 fi
18457 version_type=freebsd-$objformat
18458 case $version_type in
18459 freebsd-elf*)
18460 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
18461 need_version=no
18462 need_lib_prefix=no
18463 ;;
18464 freebsd-*)
18465 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
18466 need_version=yes
18467 ;;
18468 esac
18469 shlibpath_var=LD_LIBRARY_PATH
18470 case $host_os in
18471 freebsd2*)
18472 shlibpath_overrides_runpath=yes
18473 ;;
18474 freebsd3.[01]* | freebsdelf3.[01]*)
18475 shlibpath_overrides_runpath=yes
18476 hardcode_into_libs=yes
18477 ;;
18478 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
18479 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
18480 shlibpath_overrides_runpath=no
18481 hardcode_into_libs=yes
18482 ;;
18483 *) # from 4.6 on, and DragonFly
18484 shlibpath_overrides_runpath=yes
18485 hardcode_into_libs=yes
18486 ;;
18487 esac
18488 ;;
18489
18490gnu*)
18491 version_type=linux
18492 need_lib_prefix=no
18493 need_version=no
18494 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
18495 soname_spec='${libname}${release}${shared_ext}$major'
18496 shlibpath_var=LD_LIBRARY_PATH
18497 hardcode_into_libs=yes
18498 ;;
18499
18500hpux9* | hpux10* | hpux11*)
18501 # Give a soname corresponding to the major version so that dld.sl refuses to
18502 # link against other versions.
18503 version_type=sunos
18504 need_lib_prefix=no
18505 need_version=no
18506 case $host_cpu in
18507 ia64*)
18508 shrext_cmds='.so'
18509 hardcode_into_libs=yes
18510 dynamic_linker="$host_os dld.so"
18511 shlibpath_var=LD_LIBRARY_PATH
18512 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18513 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18514 soname_spec='${libname}${release}${shared_ext}$major'
18515 if test "X$HPUX_IA64_MODE" = X32; then
18516 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
18517 else
18518 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
18519 fi
18520 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18521 ;;
18522 hppa*64*)
18523 shrext_cmds='.sl'
18524 hardcode_into_libs=yes
18525 dynamic_linker="$host_os dld.sl"
18526 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
18527 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18528 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18529 soname_spec='${libname}${release}${shared_ext}$major'
18530 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
18531 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18532 ;;
18533 *)
18534 shrext_cmds='.sl'
18535 dynamic_linker="$host_os dld.sl"
18536 shlibpath_var=SHLIB_PATH
18537 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
18538 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18539 soname_spec='${libname}${release}${shared_ext}$major'
18540 ;;
18541 esac
18542 # HP-UX runs *really* slowly unless shared libraries are mode 555.
18543 postinstall_cmds='chmod 555 $lib'
18544 ;;
18545
18546interix[3-9]*)
18547 version_type=linux
18548 need_lib_prefix=no
18549 need_version=no
18550 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
18551 soname_spec='${libname}${release}${shared_ext}$major'
18552 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
18553 shlibpath_var=LD_LIBRARY_PATH
18554 shlibpath_overrides_runpath=no
18555 hardcode_into_libs=yes
18556 ;;
18557
18558irix5* | irix6* | nonstopux*)
18559 case $host_os in
18560 nonstopux*) version_type=nonstopux ;;
18561 *)
18562 if test "$lt_cv_prog_gnu_ld" = yes; then
18563 version_type=linux
18564 else
18565 version_type=irix
18566 fi ;;
18567 esac
18568 need_lib_prefix=no
18569 need_version=no
18570 soname_spec='${libname}${release}${shared_ext}$major'
18571 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
18572 case $host_os in
18573 irix5* | nonstopux*)
18574 libsuff= shlibsuff=
18575 ;;
18576 *)
18577 case $LD in # libtool.m4 will add one of these switches to LD
18578 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
18579 libsuff= shlibsuff= libmagic=32-bit;;
18580 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
18581 libsuff=32 shlibsuff=N32 libmagic=N32;;
18582 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
18583 libsuff=64 shlibsuff=64 libmagic=64-bit;;
18584 *) libsuff= shlibsuff= libmagic=never-match;;
18585 esac
18586 ;;
18587 esac
18588 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
18589 shlibpath_overrides_runpath=no
18590 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
18591 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
18592 hardcode_into_libs=yes
18593 ;;
18594
18595# No shared lib support for Linux oldld, aout, or coff.
18596linux*oldld* | linux*aout* | linux*coff*)
18597 dynamic_linker=no
18598 ;;
18599
18600# This must be Linux ELF.
18601linux* | k*bsd*-gnu)
18602 version_type=linux
18603 need_lib_prefix=no
18604 need_version=no
18605 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18606 soname_spec='${libname}${release}${shared_ext}$major'
18607 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
18608 shlibpath_var=LD_LIBRARY_PATH
18609 shlibpath_overrides_runpath=no
18610 # Some binutils ld are patched to set DT_RUNPATH
18611 save_LDFLAGS=$LDFLAGS
18612 save_libdir=$libdir
18613 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
18614 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
18615 cat >conftest.$ac_ext <<_ACEOF
18616/* confdefs.h. */
18617_ACEOF
18618cat confdefs.h >>conftest.$ac_ext
18619cat >>conftest.$ac_ext <<_ACEOF
18620/* end confdefs.h. */
18621
18622int
18623main ()
18624{
18625
18626 ;
18627 return 0;
18628}
18629_ACEOF
18630rm -f conftest.$ac_objext conftest$ac_exeext
18631if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18632 (eval $ac_link) 2>conftest.er1
18633 ac_status=$?
18634 grep -v '^ *+' conftest.er1 >conftest.err
18635 rm -f conftest.er1
18636 cat conftest.err >&5
18637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18638 (exit $ac_status); } &&
18639 { ac_try='test -z "$ac_c_werror_flag"
18640 || test ! -s conftest.err'
18641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18642 (eval $ac_try) 2>&5
18643 ac_status=$?
18644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18645 (exit $ac_status); }; } &&
18646 { ac_try='test -s conftest$ac_exeext'
18647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18648 (eval $ac_try) 2>&5
18649 ac_status=$?
18650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18651 (exit $ac_status); }; }; then
18652 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir"; then
18653 shlibpath_overrides_runpath=yes
18654fi
18655
18656else
18657 echo "$as_me: failed program was:" >&5
18658sed 's/^/| /' conftest.$ac_ext >&5
18659
18660fi
18661rm -f conftest.err conftest.$ac_objext \
18662 conftest$ac_exeext conftest.$ac_ext
18663 LDFLAGS=$save_LDFLAGS
18664 libdir=$save_libdir
18665
18666 # This implies no fast_install, which is unacceptable.
18667 # Some rework will be needed to allow for fast_install
18668 # before this can be enabled.
18669 hardcode_into_libs=yes
18670
18671 # Append ld.so.conf contents to the search path
18672 if test -f /etc/ld.so.conf; then
18673 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
18674 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
18675 fi
18676
18677 # We used to test for /lib/ld.so.1 and disable shared libraries on
18678 # powerpc, because MkLinux only supported shared libraries with the
18679 # GNU dynamic linker. Since this was broken with cross compilers,
18680 # most powerpc-linux boxes support dynamic linking these days and
18681 # people can always --disable-shared, the test was removed, and we
18682 # assume the GNU/Linux dynamic linker is in use.
18683 dynamic_linker='GNU/Linux ld.so'
18684 ;;
18685
18686netbsd*)
18687 version_type=sunos
18688 need_lib_prefix=no
18689 need_version=no
18690 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
18691 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18692 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18693 dynamic_linker='NetBSD (a.out) ld.so'
18694 else
18695 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
18696 soname_spec='${libname}${release}${shared_ext}$major'
18697 dynamic_linker='NetBSD ld.elf_so'
18698 fi
18699 shlibpath_var=LD_LIBRARY_PATH
18700 shlibpath_overrides_runpath=yes
18701 hardcode_into_libs=yes
18702 ;;
18703
18704newsos6)
18705 version_type=linux
18706 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18707 shlibpath_var=LD_LIBRARY_PATH
18708 shlibpath_overrides_runpath=yes
18709 ;;
18710
18711*nto* | *qnx*)
18712 version_type=qnx
18713 need_lib_prefix=no
18714 need_version=no
18715 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18716 soname_spec='${libname}${release}${shared_ext}$major'
18717 shlibpath_var=LD_LIBRARY_PATH
18718 shlibpath_overrides_runpath=no
18719 hardcode_into_libs=yes
18720 dynamic_linker='ldqnx.so'
18721 ;;
18722
18723openbsd*)
18724 version_type=sunos
18725 sys_lib_dlsearch_path_spec="/usr/lib"
18726 need_lib_prefix=no
18727 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
18728 case $host_os in
18729 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
18730 *) need_version=no ;;
18731 esac
18732 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18733 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18734 shlibpath_var=LD_LIBRARY_PATH
18735 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
18736 case $host_os in
18737 openbsd2.[89] | openbsd2.[89].*)
18738 shlibpath_overrides_runpath=no
18739 ;;
18740 *)
18741 shlibpath_overrides_runpath=yes
18742 ;;
18743 esac
18744 else
18745 shlibpath_overrides_runpath=yes
18746 fi
18747 ;;
18748
18749os2*)
18750 libname_spec='$name'
18751 shrext_cmds=".dll"
18752 need_lib_prefix=no
18753 library_names_spec='$libname${shared_ext} $libname.a'
18754 dynamic_linker='OS/2 ld.exe'
18755 shlibpath_var=LIBPATH
18756 ;;
18757
18758osf3* | osf4* | osf5*)
18759 version_type=osf
18760 need_lib_prefix=no
18761 need_version=no
18762 soname_spec='${libname}${release}${shared_ext}$major'
18763 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18764 shlibpath_var=LD_LIBRARY_PATH
18765 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
18766 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
18767 ;;
18768
18769rdos*)
18770 dynamic_linker=no
18771 ;;
18772
18773solaris*)
18774 version_type=linux
18775 need_lib_prefix=no
18776 need_version=no
18777 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18778 soname_spec='${libname}${release}${shared_ext}$major'
18779 shlibpath_var=LD_LIBRARY_PATH
18780 shlibpath_overrides_runpath=yes
18781 hardcode_into_libs=yes
18782 # ldd complains unless libraries are executable
18783 postinstall_cmds='chmod +x $lib'
18784 ;;
18785
18786sunos4*)
18787 version_type=sunos
18788 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18789 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
18790 shlibpath_var=LD_LIBRARY_PATH
18791 shlibpath_overrides_runpath=yes
18792 if test "$with_gnu_ld" = yes; then
18793 need_lib_prefix=no
18794 fi
18795 need_version=yes
18796 ;;
18797
18798sysv4 | sysv4.3*)
18799 version_type=linux
18800 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18801 soname_spec='${libname}${release}${shared_ext}$major'
18802 shlibpath_var=LD_LIBRARY_PATH
18803 case $host_vendor in
18804 sni)
18805 shlibpath_overrides_runpath=no
18806 need_lib_prefix=no
18807 runpath_var=LD_RUN_PATH
18808 ;;
18809 siemens)
18810 need_lib_prefix=no
18811 ;;
18812 motorola)
18813 need_lib_prefix=no
18814 need_version=no
18815 shlibpath_overrides_runpath=no
18816 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
18817 ;;
18818 esac
18819 ;;
18820
18821sysv4*MP*)
18822 if test -d /usr/nec ;then
18823 version_type=linux
18824 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
18825 soname_spec='$libname${shared_ext}.$major'
18826 shlibpath_var=LD_LIBRARY_PATH
18827 fi
18828 ;;
18829
18830sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
18831 version_type=freebsd-elf
18832 need_lib_prefix=no
18833 need_version=no
18834 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
18835 soname_spec='${libname}${release}${shared_ext}$major'
18836 shlibpath_var=LD_LIBRARY_PATH
18837 shlibpath_overrides_runpath=yes
18838 hardcode_into_libs=yes
18839 if test "$with_gnu_ld" = yes; then
18840 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
18841 else
18842 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
18843 case $host_os in
18844 sco3.2v5*)
18845 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
18846 ;;
18847 esac
18848 fi
18849 sys_lib_dlsearch_path_spec='/usr/lib'
18850 ;;
18851
18852tpf*)
18853 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
18854 version_type=linux
18855 need_lib_prefix=no
18856 need_version=no
18857 library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18858 shlibpath_var=LD_LIBRARY_PATH
18859 shlibpath_overrides_runpath=no
18860 hardcode_into_libs=yes
18861 ;;
18862
18863uts4*)
18864 version_type=linux
18865 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18866 soname_spec='${libname}${release}${shared_ext}$major'
18867 shlibpath_var=LD_LIBRARY_PATH
18868 ;;
18869
18870*)
18871 dynamic_linker=no
18872 ;;
18873esac
18874echo "$as_me:$LINENO: result: $dynamic_linker" >&5
18875echo "${ECHO_T}$dynamic_linker" >&6
18876test "$dynamic_linker" = no && can_build_shared=no
18877
18878variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
18879if test "$GCC" = yes; then
18880 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
18881fi
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
18970echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
18971hardcode_action=
18972if test -n "$hardcode_libdir_flag_spec" ||
18973 test -n "$runpath_var" ||
18974 test "X$hardcode_automatic" = "Xyes" ; then
18975
18976 # We can hardcode non-existent directories.
18977 if test "$hardcode_direct" != no &&
18978 # If the only mechanism to avoid hardcoding is shlibpath_var, we
18979 # have to relink, otherwise we might link with an installed library
18980 # when we should be linking with a yet-to-be-installed one
18981 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
18982 test "$hardcode_minus_L" != no; then
18983 # Linking always hardcodes the temporary library directory.
18984 hardcode_action=relink
18985 else
18986 # We can link without hardcoding, and we can hardcode nonexisting dirs.
18987 hardcode_action=immediate
18988 fi
18989else
18990 # We cannot hardcode anything, or else we can only hardcode existing
18991 # directories.
18992 hardcode_action=unsupported
18993fi
18994echo "$as_me:$LINENO: result: $hardcode_action" >&5
18995echo "${ECHO_T}$hardcode_action" >&6
18996
18997if test "$hardcode_action" = relink ||
18998 test "$inherit_rpath" = yes; then
18999 # Fast installation is not supported
19000 enable_fast_install=no
19001elif test "$shlibpath_overrides_runpath" = yes ||
19002 test "$enable_shared" = no; then
19003 # Fast installation is not necessary
19004 enable_fast_install=needless
19005fi
19006
19007
19008
19009
19010
19011
19012 if test "x$enable_dlopen" != xyes; then
19013 enable_dlopen=unknown
19014 enable_dlopen_self=unknown
19015 enable_dlopen_self_static=unknown
19016else
19017 lt_cv_dlopen=no
19018 lt_cv_dlopen_libs=
19019
19020 case $host_os in
19021 beos*)
19022 lt_cv_dlopen="load_add_on"
19023 lt_cv_dlopen_libs=
19024 lt_cv_dlopen_self=yes
19025 ;;
19026
19027 mingw* | pw32*)
19028 lt_cv_dlopen="LoadLibrary"
19029 lt_cv_dlopen_libs=
19030 ;;
19031
19032 cygwin*)
19033 lt_cv_dlopen="dlopen"
19034 lt_cv_dlopen_libs=
19035 ;;
19036
19037 darwin*)
19038 # if libdl is installed we need to link against it
19039 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19040echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
19041if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19042 echo $ECHO_N "(cached) $ECHO_C" >&6
19043else
19044 ac_check_lib_save_LIBS=$LIBS
19045LIBS="-ldl $LIBS"
19046cat >conftest.$ac_ext <<_ACEOF
19047/* confdefs.h. */
19048_ACEOF
19049cat confdefs.h >>conftest.$ac_ext
19050cat >>conftest.$ac_ext <<_ACEOF
19051/* end confdefs.h. */
19052
19053/* Override any gcc2 internal prototype to avoid an error. */
19054#ifdef __cplusplus
19055extern "C"
19056#endif
19057/* We use char because int might match the return type of a gcc2
19058 builtin and then its argument prototype would still apply. */
19059char dlopen ();
19060int
19061main ()
19062{
19063dlopen ();
19064 ;
19065 return 0;
19066}
19067_ACEOF
19068rm -f conftest.$ac_objext conftest$ac_exeext
19069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19070 (eval $ac_link) 2>conftest.er1
19071 ac_status=$?
19072 grep -v '^ *+' conftest.er1 >conftest.err
19073 rm -f conftest.er1
19074 cat conftest.err >&5
19075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19076 (exit $ac_status); } &&
19077 { ac_try='test -z "$ac_c_werror_flag"
19078 || test ! -s conftest.err'
19079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19080 (eval $ac_try) 2>&5
19081 ac_status=$?
19082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19083 (exit $ac_status); }; } &&
19084 { ac_try='test -s conftest$ac_exeext'
19085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19086 (eval $ac_try) 2>&5
19087 ac_status=$?
19088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19089 (exit $ac_status); }; }; then
19090 ac_cv_lib_dl_dlopen=yes
19091else
19092 echo "$as_me: failed program was:" >&5
19093sed 's/^/| /' conftest.$ac_ext >&5
19094
19095ac_cv_lib_dl_dlopen=no
19096fi
19097rm -f conftest.err conftest.$ac_objext \
19098 conftest$ac_exeext conftest.$ac_ext
19099LIBS=$ac_check_lib_save_LIBS
19100fi
19101echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19102echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
19103if test $ac_cv_lib_dl_dlopen = yes; then
19104 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
19105else
19106
19107 lt_cv_dlopen="dyld"
19108 lt_cv_dlopen_libs=
19109 lt_cv_dlopen_self=yes
19110
19111fi
19112
19113 ;;
19114
19115 *)
19116 echo "$as_me:$LINENO: checking for shl_load" >&5
19117echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
19118if test "${ac_cv_func_shl_load+set}" = set; then
19119 echo $ECHO_N "(cached) $ECHO_C" >&6
19120else
19121 cat >conftest.$ac_ext <<_ACEOF
19122/* confdefs.h. */
19123_ACEOF
19124cat confdefs.h >>conftest.$ac_ext
19125cat >>conftest.$ac_ext <<_ACEOF
19126/* end confdefs.h. */
19127/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
19128 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19129#define shl_load innocuous_shl_load
19130
19131/* System header to define __stub macros and hopefully few prototypes,
19132 which can conflict with char shl_load (); below.
19133 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19134 <limits.h> exists even on freestanding compilers. */
19135
19136#ifdef __STDC__
19137# include <limits.h>
19138#else
19139# include <assert.h>
19140#endif
19141
19142#undef shl_load
19143
19144/* Override any gcc2 internal prototype to avoid an error. */
19145#ifdef __cplusplus
19146extern "C"
19147{
19148#endif
19149/* We use char because int might match the return type of a gcc2
19150 builtin and then its argument prototype would still apply. */
19151char shl_load ();
19152/* The GNU C library defines this for functions which it implements
19153 to always fail with ENOSYS. Some functions are actually named
19154 something starting with __ and the normal name is an alias. */
19155#if defined (__stub_shl_load) || defined (__stub___shl_load)
19156choke me
19157#else
19158char (*f) () = shl_load;
19159#endif
19160#ifdef __cplusplus
19161}
19162#endif
19163
19164int
19165main ()
19166{
19167return f != shl_load;
19168 ;
19169 return 0;
19170}
19171_ACEOF
19172rm -f conftest.$ac_objext conftest$ac_exeext
19173if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19174 (eval $ac_link) 2>conftest.er1
19175 ac_status=$?
19176 grep -v '^ *+' conftest.er1 >conftest.err
19177 rm -f conftest.er1
19178 cat conftest.err >&5
19179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19180 (exit $ac_status); } &&
19181 { ac_try='test -z "$ac_c_werror_flag"
19182 || test ! -s conftest.err'
19183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19184 (eval $ac_try) 2>&5
19185 ac_status=$?
19186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19187 (exit $ac_status); }; } &&
19188 { ac_try='test -s conftest$ac_exeext'
19189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19190 (eval $ac_try) 2>&5
19191 ac_status=$?
19192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19193 (exit $ac_status); }; }; then
19194 ac_cv_func_shl_load=yes
19195else
19196 echo "$as_me: failed program was:" >&5
19197sed 's/^/| /' conftest.$ac_ext >&5
19198
19199ac_cv_func_shl_load=no
19200fi
19201rm -f conftest.err conftest.$ac_objext \
19202 conftest$ac_exeext conftest.$ac_ext
19203fi
19204echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
19205echo "${ECHO_T}$ac_cv_func_shl_load" >&6
19206if test $ac_cv_func_shl_load = yes; then
19207 lt_cv_dlopen="shl_load"
19208else
19209 echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
19210echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
19211if test "${ac_cv_lib_dld_shl_load+set}" = set; then
19212 echo $ECHO_N "(cached) $ECHO_C" >&6
19213else
19214 ac_check_lib_save_LIBS=$LIBS
19215LIBS="-ldld $LIBS"
19216cat >conftest.$ac_ext <<_ACEOF
19217/* confdefs.h. */
19218_ACEOF
19219cat confdefs.h >>conftest.$ac_ext
19220cat >>conftest.$ac_ext <<_ACEOF
19221/* end confdefs.h. */
19222
19223/* Override any gcc2 internal prototype to avoid an error. */
19224#ifdef __cplusplus
19225extern "C"
19226#endif
19227/* We use char because int might match the return type of a gcc2
19228 builtin and then its argument prototype would still apply. */
19229char shl_load ();
19230int
19231main ()
19232{
19233shl_load ();
19234 ;
19235 return 0;
19236}
19237_ACEOF
19238rm -f conftest.$ac_objext conftest$ac_exeext
19239if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19240 (eval $ac_link) 2>conftest.er1
19241 ac_status=$?
19242 grep -v '^ *+' conftest.er1 >conftest.err
19243 rm -f conftest.er1
19244 cat conftest.err >&5
19245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19246 (exit $ac_status); } &&
19247 { ac_try='test -z "$ac_c_werror_flag"
19248 || test ! -s conftest.err'
19249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19250 (eval $ac_try) 2>&5
19251 ac_status=$?
19252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19253 (exit $ac_status); }; } &&
19254 { ac_try='test -s conftest$ac_exeext'
19255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19256 (eval $ac_try) 2>&5
19257 ac_status=$?
19258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19259 (exit $ac_status); }; }; then
19260 ac_cv_lib_dld_shl_load=yes
19261else
19262 echo "$as_me: failed program was:" >&5
19263sed 's/^/| /' conftest.$ac_ext >&5
19264
19265ac_cv_lib_dld_shl_load=no
19266fi
19267rm -f conftest.err conftest.$ac_objext \
19268 conftest$ac_exeext conftest.$ac_ext
19269LIBS=$ac_check_lib_save_LIBS
19270fi
19271echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
19272echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
19273if test $ac_cv_lib_dld_shl_load = yes; then
19274 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
19275else
19276 echo "$as_me:$LINENO: checking for dlopen" >&5
19277echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
19278if test "${ac_cv_func_dlopen+set}" = set; then
19279 echo $ECHO_N "(cached) $ECHO_C" >&6
19280else
19281 cat >conftest.$ac_ext <<_ACEOF
19282/* confdefs.h. */
19283_ACEOF
19284cat confdefs.h >>conftest.$ac_ext
19285cat >>conftest.$ac_ext <<_ACEOF
19286/* end confdefs.h. */
19287/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
19288 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19289#define dlopen innocuous_dlopen
19290
19291/* System header to define __stub macros and hopefully few prototypes,
19292 which can conflict with char dlopen (); below.
19293 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19294 <limits.h> exists even on freestanding compilers. */
19295
19296#ifdef __STDC__
19297# include <limits.h>
19298#else
19299# include <assert.h>
19300#endif
19301
19302#undef dlopen
19303
19304/* Override any gcc2 internal prototype to avoid an error. */
19305#ifdef __cplusplus
19306extern "C"
19307{
19308#endif
19309/* We use char because int might match the return type of a gcc2
19310 builtin and then its argument prototype would still apply. */
19311char dlopen ();
19312/* The GNU C library defines this for functions which it implements
19313 to always fail with ENOSYS. Some functions are actually named
19314 something starting with __ and the normal name is an alias. */
19315#if defined (__stub_dlopen) || defined (__stub___dlopen)
19316choke me
19317#else
19318char (*f) () = dlopen;
19319#endif
19320#ifdef __cplusplus
19321}
19322#endif
19323
19324int
19325main ()
19326{
19327return f != dlopen;
19328 ;
19329 return 0;
19330}
19331_ACEOF
19332rm -f conftest.$ac_objext conftest$ac_exeext
19333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19334 (eval $ac_link) 2>conftest.er1
19335 ac_status=$?
19336 grep -v '^ *+' conftest.er1 >conftest.err
19337 rm -f conftest.er1
19338 cat conftest.err >&5
19339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19340 (exit $ac_status); } &&
19341 { ac_try='test -z "$ac_c_werror_flag"
19342 || test ! -s conftest.err'
19343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19344 (eval $ac_try) 2>&5
19345 ac_status=$?
19346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19347 (exit $ac_status); }; } &&
19348 { ac_try='test -s conftest$ac_exeext'
19349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19350 (eval $ac_try) 2>&5
19351 ac_status=$?
19352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19353 (exit $ac_status); }; }; then
19354 ac_cv_func_dlopen=yes
19355else
19356 echo "$as_me: failed program was:" >&5
19357sed 's/^/| /' conftest.$ac_ext >&5
19358
19359ac_cv_func_dlopen=no
19360fi
19361rm -f conftest.err conftest.$ac_objext \
19362 conftest$ac_exeext conftest.$ac_ext
19363fi
19364echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
19365echo "${ECHO_T}$ac_cv_func_dlopen" >&6
19366if test $ac_cv_func_dlopen = yes; then
19367 lt_cv_dlopen="dlopen"
19368else
19369 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19370echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
19371if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19372 echo $ECHO_N "(cached) $ECHO_C" >&6
19373else
19374 ac_check_lib_save_LIBS=$LIBS
19375LIBS="-ldl $LIBS"
19376cat >conftest.$ac_ext <<_ACEOF
19377/* confdefs.h. */
19378_ACEOF
19379cat confdefs.h >>conftest.$ac_ext
19380cat >>conftest.$ac_ext <<_ACEOF
19381/* end confdefs.h. */
19382
19383/* Override any gcc2 internal prototype to avoid an error. */
19384#ifdef __cplusplus
19385extern "C"
19386#endif
19387/* We use char because int might match the return type of a gcc2
19388 builtin and then its argument prototype would still apply. */
19389char dlopen ();
19390int
19391main ()
19392{
19393dlopen ();
19394 ;
19395 return 0;
19396}
19397_ACEOF
19398rm -f conftest.$ac_objext conftest$ac_exeext
19399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19400 (eval $ac_link) 2>conftest.er1
19401 ac_status=$?
19402 grep -v '^ *+' conftest.er1 >conftest.err
19403 rm -f conftest.er1
19404 cat conftest.err >&5
19405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19406 (exit $ac_status); } &&
19407 { ac_try='test -z "$ac_c_werror_flag"
19408 || test ! -s conftest.err'
19409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19410 (eval $ac_try) 2>&5
19411 ac_status=$?
19412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19413 (exit $ac_status); }; } &&
19414 { ac_try='test -s conftest$ac_exeext'
19415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19416 (eval $ac_try) 2>&5
19417 ac_status=$?
19418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19419 (exit $ac_status); }; }; then
19420 ac_cv_lib_dl_dlopen=yes
19421else
19422 echo "$as_me: failed program was:" >&5
19423sed 's/^/| /' conftest.$ac_ext >&5
19424
19425ac_cv_lib_dl_dlopen=no
19426fi
19427rm -f conftest.err conftest.$ac_objext \
19428 conftest$ac_exeext conftest.$ac_ext
19429LIBS=$ac_check_lib_save_LIBS
19430fi
19431echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19432echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
19433if test $ac_cv_lib_dl_dlopen = yes; then
19434 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
19435else
19436 echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
19437echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
19438if test "${ac_cv_lib_svld_dlopen+set}" = set; then
19439 echo $ECHO_N "(cached) $ECHO_C" >&6
19440else
19441 ac_check_lib_save_LIBS=$LIBS
19442LIBS="-lsvld $LIBS"
19443cat >conftest.$ac_ext <<_ACEOF
19444/* confdefs.h. */
19445_ACEOF
19446cat confdefs.h >>conftest.$ac_ext
19447cat >>conftest.$ac_ext <<_ACEOF
19448/* end confdefs.h. */
19449
19450/* Override any gcc2 internal prototype to avoid an error. */
19451#ifdef __cplusplus
19452extern "C"
19453#endif
19454/* We use char because int might match the return type of a gcc2
19455 builtin and then its argument prototype would still apply. */
19456char dlopen ();
19457int
19458main ()
19459{
19460dlopen ();
19461 ;
19462 return 0;
19463}
19464_ACEOF
19465rm -f conftest.$ac_objext conftest$ac_exeext
19466if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19467 (eval $ac_link) 2>conftest.er1
19468 ac_status=$?
19469 grep -v '^ *+' conftest.er1 >conftest.err
19470 rm -f conftest.er1
19471 cat conftest.err >&5
19472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19473 (exit $ac_status); } &&
19474 { ac_try='test -z "$ac_c_werror_flag"
19475 || test ! -s conftest.err'
19476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19477 (eval $ac_try) 2>&5
19478 ac_status=$?
19479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19480 (exit $ac_status); }; } &&
19481 { ac_try='test -s conftest$ac_exeext'
19482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19483 (eval $ac_try) 2>&5
19484 ac_status=$?
19485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19486 (exit $ac_status); }; }; then
19487 ac_cv_lib_svld_dlopen=yes
19488else
19489 echo "$as_me: failed program was:" >&5
19490sed 's/^/| /' conftest.$ac_ext >&5
19491
19492ac_cv_lib_svld_dlopen=no
19493fi
19494rm -f conftest.err conftest.$ac_objext \
19495 conftest$ac_exeext conftest.$ac_ext
19496LIBS=$ac_check_lib_save_LIBS
19497fi
19498echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
19499echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
19500if test $ac_cv_lib_svld_dlopen = yes; then
19501 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
19502else
19503 echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
19504echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
19505if test "${ac_cv_lib_dld_dld_link+set}" = set; then
19506 echo $ECHO_N "(cached) $ECHO_C" >&6
19507else
19508 ac_check_lib_save_LIBS=$LIBS
19509LIBS="-ldld $LIBS"
19510cat >conftest.$ac_ext <<_ACEOF
19511/* confdefs.h. */
19512_ACEOF
19513cat confdefs.h >>conftest.$ac_ext
19514cat >>conftest.$ac_ext <<_ACEOF
19515/* end confdefs.h. */
19516
19517/* Override any gcc2 internal prototype to avoid an error. */
19518#ifdef __cplusplus
19519extern "C"
19520#endif
19521/* We use char because int might match the return type of a gcc2
19522 builtin and then its argument prototype would still apply. */
19523char dld_link ();
19524int
19525main ()
19526{
19527dld_link ();
19528 ;
19529 return 0;
19530}
19531_ACEOF
19532rm -f conftest.$ac_objext conftest$ac_exeext
19533if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19534 (eval $ac_link) 2>conftest.er1
19535 ac_status=$?
19536 grep -v '^ *+' conftest.er1 >conftest.err
19537 rm -f conftest.er1
19538 cat conftest.err >&5
19539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19540 (exit $ac_status); } &&
19541 { ac_try='test -z "$ac_c_werror_flag"
19542 || test ! -s conftest.err'
19543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19544 (eval $ac_try) 2>&5
19545 ac_status=$?
19546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19547 (exit $ac_status); }; } &&
19548 { ac_try='test -s conftest$ac_exeext'
19549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19550 (eval $ac_try) 2>&5
19551 ac_status=$?
19552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19553 (exit $ac_status); }; }; then
19554 ac_cv_lib_dld_dld_link=yes
19555else
19556 echo "$as_me: failed program was:" >&5
19557sed 's/^/| /' conftest.$ac_ext >&5
19558
19559ac_cv_lib_dld_dld_link=no
19560fi
19561rm -f conftest.err conftest.$ac_objext \
19562 conftest$ac_exeext conftest.$ac_ext
19563LIBS=$ac_check_lib_save_LIBS
19564fi
19565echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
19566echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
19567if test $ac_cv_lib_dld_dld_link = yes; then
19568 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
19569fi
19570
19571
19572fi
19573
19574
19575fi
19576
19577
19578fi
19579
19580
19581fi
19582
19583
19584fi
19585
19586 ;;
19587 esac
19588
19589 if test "x$lt_cv_dlopen" != xno; then
19590 enable_dlopen=yes
19591 else
19592 enable_dlopen=no
19593 fi
19594
19595 case $lt_cv_dlopen in
19596 dlopen)
19597 save_CPPFLAGS="$CPPFLAGS"
19598 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
19599
19600 save_LDFLAGS="$LDFLAGS"
19601 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
19602
19603 save_LIBS="$LIBS"
19604 LIBS="$lt_cv_dlopen_libs $LIBS"
19605
19606 echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
19607echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
19608if test "${lt_cv_dlopen_self+set}" = set; then
19609 echo $ECHO_N "(cached) $ECHO_C" >&6
19610else
19611 if test "$cross_compiling" = yes; then :
19612 lt_cv_dlopen_self=cross
19613else
19614 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
19615 lt_status=$lt_dlunknown
19616 cat > conftest.$ac_ext <<_LT_EOF
3d4e720a 19617#line 19617 "configure"
da0f6381
PB
19618#include "confdefs.h"
19619
19620#if HAVE_DLFCN_H
19621#include <dlfcn.h>
19622#endif
19623
19624#include <stdio.h>
19625
19626#ifdef RTLD_GLOBAL
19627# define LT_DLGLOBAL RTLD_GLOBAL
19628#else
19629# ifdef DL_GLOBAL
19630# define LT_DLGLOBAL DL_GLOBAL
19631# else
19632# define LT_DLGLOBAL 0
19633# endif
19634#endif
19635
19636/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
19637 find out it does not work in some platform. */
19638#ifndef LT_DLLAZY_OR_NOW
19639# ifdef RTLD_LAZY
19640# define LT_DLLAZY_OR_NOW RTLD_LAZY
19641# else
19642# ifdef DL_LAZY
19643# define LT_DLLAZY_OR_NOW DL_LAZY
19644# else
19645# ifdef RTLD_NOW
19646# define LT_DLLAZY_OR_NOW RTLD_NOW
19647# else
19648# ifdef DL_NOW
19649# define LT_DLLAZY_OR_NOW DL_NOW
19650# else
19651# define LT_DLLAZY_OR_NOW 0
19652# endif
19653# endif
19654# endif
19655# endif
19656#endif
19657
19658#ifdef __cplusplus
19659extern "C" void exit (int);
19660#endif
19661
19662void fnord() { int i=42;}
19663int main ()
19664{
19665 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
19666 int status = $lt_dlunknown;
19667
19668 if (self)
19669 {
19670 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
19671 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
19672 /* dlclose (self); */
19673 }
19674 else
19675 puts (dlerror ());
19676
19677 exit (status);
19678}
19679_LT_EOF
19680 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19681 (eval $ac_link) 2>&5
19682 ac_status=$?
19683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19684 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
19685 (./conftest; exit; ) >&5 2>/dev/null
19686 lt_status=$?
19687 case x$lt_status in
19688 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
19689 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
19690 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
19691 esac
19692 else :
19693 # compilation failed
19694 lt_cv_dlopen_self=no
19695 fi
19696fi
19697rm -fr conftest*
19698
19699
19700fi
19701echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
19702echo "${ECHO_T}$lt_cv_dlopen_self" >&6
19703
19704 if test "x$lt_cv_dlopen_self" = xyes; then
19705 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
19706 echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
19707echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
19708if test "${lt_cv_dlopen_self_static+set}" = set; then
19709 echo $ECHO_N "(cached) $ECHO_C" >&6
19710else
19711 if test "$cross_compiling" = yes; then :
19712 lt_cv_dlopen_self_static=cross
19713else
19714 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
19715 lt_status=$lt_dlunknown
19716 cat > conftest.$ac_ext <<_LT_EOF
3d4e720a 19717#line 19717 "configure"
da0f6381
PB
19718#include "confdefs.h"
19719
19720#if HAVE_DLFCN_H
19721#include <dlfcn.h>
19722#endif
19723
19724#include <stdio.h>
19725
19726#ifdef RTLD_GLOBAL
19727# define LT_DLGLOBAL RTLD_GLOBAL
19728#else
19729# ifdef DL_GLOBAL
19730# define LT_DLGLOBAL DL_GLOBAL
19731# else
19732# define LT_DLGLOBAL 0
19733# endif
19734#endif
19735
19736/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
19737 find out it does not work in some platform. */
19738#ifndef LT_DLLAZY_OR_NOW
19739# ifdef RTLD_LAZY
19740# define LT_DLLAZY_OR_NOW RTLD_LAZY
19741# else
19742# ifdef DL_LAZY
19743# define LT_DLLAZY_OR_NOW DL_LAZY
19744# else
19745# ifdef RTLD_NOW
19746# define LT_DLLAZY_OR_NOW RTLD_NOW
19747# else
19748# ifdef DL_NOW
19749# define LT_DLLAZY_OR_NOW DL_NOW
19750# else
19751# define LT_DLLAZY_OR_NOW 0
19752# endif
19753# endif
19754# endif
19755# endif
19756#endif
19757
19758#ifdef __cplusplus
19759extern "C" void exit (int);
19760#endif
19761
19762void fnord() { int i=42;}
19763int main ()
19764{
19765 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
19766 int status = $lt_dlunknown;
19767
19768 if (self)
19769 {
19770 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
19771 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
19772 /* dlclose (self); */
19773 }
19774 else
19775 puts (dlerror ());
19776
19777 exit (status);
19778}
19779_LT_EOF
19780 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19781 (eval $ac_link) 2>&5
19782 ac_status=$?
19783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19784 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
19785 (./conftest; exit; ) >&5 2>/dev/null
19786 lt_status=$?
19787 case x$lt_status in
19788 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
19789 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
19790 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
19791 esac
19792 else :
19793 # compilation failed
19794 lt_cv_dlopen_self_static=no
19795 fi
19796fi
19797rm -fr conftest*
19798
19799
19800fi
19801echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
19802echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
19803 fi
19804
19805 CPPFLAGS="$save_CPPFLAGS"
19806 LDFLAGS="$save_LDFLAGS"
19807 LIBS="$save_LIBS"
19808 ;;
19809 esac
19810
19811 case $lt_cv_dlopen_self in
19812 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
19813 *) enable_dlopen_self=unknown ;;
19814 esac
19815
19816 case $lt_cv_dlopen_self_static in
19817 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
19818 *) enable_dlopen_self_static=unknown ;;
19819 esac
19820fi
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838striplib=
19839old_striplib=
19840echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
19841echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
19842if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
19843 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
19844 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
19845 echo "$as_me:$LINENO: result: yes" >&5
19846echo "${ECHO_T}yes" >&6
19847else
19848# FIXME - insert some real tests, host_os isn't really good enough
19849 case $host_os in
19850 darwin*)
19851 if test -n "$STRIP" ; then
19852 striplib="$STRIP -x"
19853 old_striplib="$STRIP -S"
19854 echo "$as_me:$LINENO: result: yes" >&5
19855echo "${ECHO_T}yes" >&6
19856 else
19857 echo "$as_me:$LINENO: result: no" >&5
19858echo "${ECHO_T}no" >&6
19859 fi
19860 ;;
19861 *)
19862 echo "$as_me:$LINENO: result: no" >&5
19863echo "${ECHO_T}no" >&6
19864 ;;
19865 esac
19866fi
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879 # Report which library types will actually be built
19880 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
19881echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
19882 echo "$as_me:$LINENO: result: $can_build_shared" >&5
19883echo "${ECHO_T}$can_build_shared" >&6
19884
19885 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
19886echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
19887 test "$can_build_shared" = "no" && enable_shared=no
19888
19889 # On AIX, shared libraries and static libraries use the same namespace, and
19890 # are all built from PIC.
19891 case $host_os in
19892 aix3*)
19893 test "$enable_shared" = yes && enable_static=no
19894 if test -n "$RANLIB"; then
19895 archive_cmds="$archive_cmds~\$RANLIB \$lib"
19896 postinstall_cmds='$RANLIB $lib'
19897 fi
19898 ;;
19899
19900 aix[4-9]*)
19901 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
19902 test "$enable_shared" = yes && enable_static=no
19903 fi
19904 ;;
19905 esac
19906 echo "$as_me:$LINENO: result: $enable_shared" >&5
19907echo "${ECHO_T}$enable_shared" >&6
19908
19909 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
19910echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
19911 # Make sure either enable_shared or enable_static is yes.
19912 test "$enable_shared" = yes || enable_static=yes
19913 echo "$as_me:$LINENO: result: $enable_static" >&5
19914echo "${ECHO_T}$enable_static" >&6
19915
19916
19917
19918
19919fi
19920ac_ext=c
19921ac_cpp='$CPP $CPPFLAGS'
19922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19924ac_compiler_gnu=$ac_cv_c_compiler_gnu
19925
19926CC="$lt_save_CC"
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943# Only expand once:
19944
19945
19946
19947
19948
19949# Identify the assembler which will work hand-in-glove with the newly
19950# built GCC, so that we can examine its features. This is the assembler
19951# which will be driven by the driver program.
19952#
19953# If build != host, and we aren't building gas in-tree, we identify a
19954# build->target assembler and hope that it will have the same features
19955# as the host->target assembler we'll be using.
19956gcc_cv_gas_major_version=
19957gcc_cv_gas_minor_version=
19958gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
19959
19960if test "${gcc_cv_as+set}" = set; then
19961 :
19962else
19963
19964if test -x "$DEFAULT_ASSEMBLER"; then
19965 gcc_cv_as="$DEFAULT_ASSEMBLER"
19966elif test -f $gcc_cv_as_gas_srcdir/configure.in \
19967 && test -f ../gas/Makefile \
19968 && test x$build = x$host; then
19969 gcc_cv_as=../gas/as-new$build_exeext
19970elif test -x as$build_exeext; then
19971 # Build using assembler in the current directory.
19972 gcc_cv_as=./as$build_exeext
19973elif test -x $AS_FOR_TARGET; then
19974 gcc_cv_as="$AS_FOR_TARGET"
19975else
19976 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
19977set dummy $AS_FOR_TARGET; ac_word=$2
19978echo "$as_me:$LINENO: checking for $ac_word" >&5
19979echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19980if test "${ac_cv_path_gcc_cv_as+set}" = set; then
19981 echo $ECHO_N "(cached) $ECHO_C" >&6
19982else
19983 case $gcc_cv_as in
19984 [\\/]* | ?:[\\/]*)
19985 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
19986 ;;
19987 *)
19988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19989for as_dir in $PATH
19990do
19991 IFS=$as_save_IFS
19992 test -z "$as_dir" && as_dir=.
19993 for ac_exec_ext in '' $ac_executable_extensions; do
19994 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19995 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
19996 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19997 break 2
19998 fi
19999done
20000done
20001
20002 ;;
20003esac
20004fi
20005gcc_cv_as=$ac_cv_path_gcc_cv_as
20006
20007if test -n "$gcc_cv_as"; then
20008 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
20009echo "${ECHO_T}$gcc_cv_as" >&6
20010else
20011 echo "$as_me:$LINENO: result: no" >&5
20012echo "${ECHO_T}no" >&6
20013fi
20014
20015fi
20016fi
20017
20018
20019ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
20020
20021case "$ORIGINAL_AS_FOR_TARGET" in
20022 ./as | ./as$build_exeext) ;;
20023 *) ac_config_files="$ac_config_files as:exec-tool.in"
20024 ;;
20025esac
20026
20027echo "$as_me:$LINENO: checking what assembler to use" >&5
20028echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
20029if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
20030 # Single tree build which includes gas. We want to prefer it
20031 # over whatever linker top-level may have detected, since
20032 # we'll use what we're building after installation anyway.
20033 echo "$as_me:$LINENO: result: newly built gas" >&5
20034echo "${ECHO_T}newly built gas" >&6
20035 in_tree_gas=yes
20036 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20037for f in $gcc_cv_as_bfd_srcdir/configure \
20038 $gcc_cv_as_gas_srcdir/configure \
20039 $gcc_cv_as_gas_srcdir/configure.in \
20040 $gcc_cv_as_gas_srcdir/Makefile.in ; do
20041 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20042 if test x$gcc_cv_gas_version != x; then
20043 break
20044 fi
20045done
20046gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
20047gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20048gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
20049case $gcc_cv_gas_patch_version in
20050 "") gcc_cv_gas_patch_version="0" ;;
20051esac
20052gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
20053 + $gcc_cv_gas_minor_version \) \* 1000 \
20054 + $gcc_cv_gas_patch_version`
20055
20056 in_tree_gas_is_elf=no
20057 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
20058 || (grep 'obj_format = multi' ../gas/Makefile \
20059 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
20060 then
20061 in_tree_gas_is_elf=yes
20062 fi
20063else
20064 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
20065echo "${ECHO_T}$gcc_cv_as" >&6
20066 in_tree_gas=no
20067fi
20068
20069# Identify the linker which will work hand-in-glove with the newly
20070# built GCC, so that we can examine its features. This is the linker
20071# which will be driven by the driver program.
20072#
20073# If build != host, and we aren't building gas in-tree, we identify a
20074# build->target linker and hope that it will have the same features
20075# as the host->target linker we'll be using.
20076gcc_cv_gld_major_version=
20077gcc_cv_gld_minor_version=
20078gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
20079gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20080
20081if test "${gcc_cv_ld+set}" = set; then
20082 :
20083else
20084
20085if test -x "$DEFAULT_LINKER"; then
20086 gcc_cv_ld="$DEFAULT_LINKER"
20087elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
20088 && test -f ../ld/Makefile \
20089 && test x$build = x$host; then
20090 gcc_cv_ld=../ld/ld-new$build_exeext
e8b05380
PB
20091elif test -x collect-ld$build_exeext; then
20092 # Build using linker in the current directory.
20093 gcc_cv_ld=./collect-ld$build_exeext
20094elif test -x $LD_FOR_TARGET; then
20095 gcc_cv_ld="$LD_FOR_TARGET"
20096else
20097 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
20098set dummy $LD_FOR_TARGET; ac_word=$2
b61ff9c8
BS
20099echo "$as_me:$LINENO: checking for $ac_word" >&5
20100echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 20101if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
d739199a
DJ
20102 echo $ECHO_N "(cached) $ECHO_C" >&6
20103else
e8b05380 20104 case $gcc_cv_ld in
d739199a 20105 [\\/]* | ?:[\\/]*)
e8b05380 20106 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
20107 ;;
20108 *)
20109 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20110for as_dir in $PATH
20111do
20112 IFS=$as_save_IFS
20113 test -z "$as_dir" && as_dir=.
20114 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 20115 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 20116 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
20117 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20118 break 2
20119 fi
20120done
20121done
20122
20123 ;;
20124esac
20125fi
e8b05380 20126gcc_cv_ld=$ac_cv_path_gcc_cv_ld
b61ff9c8 20127
e8b05380 20128if test -n "$gcc_cv_ld"; then
b61ff9c8
BS
20129 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
20130echo "${ECHO_T}$gcc_cv_ld" >&6
d739199a 20131else
b61ff9c8
BS
20132 echo "$as_me:$LINENO: result: no" >&5
20133echo "${ECHO_T}no" >&6
d739199a
DJ
20134fi
20135
20136fi
e8b05380
PB
20137fi
20138
20139
20140ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
20141
be0fe523
PB
20142case "$ORIGINAL_LD_FOR_TARGET" in
20143 ./collect-ld | ./collect-ld$build_exeext) ;;
b61ff9c8 20144 *) ac_config_files="$ac_config_files collect-ld:exec-tool.in"
be0fe523
PB
20145 ;;
20146esac
e8b05380 20147
b61ff9c8
BS
20148echo "$as_me:$LINENO: checking what linker to use" >&5
20149echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
e8b05380
PB
20150if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
20151 # Single tree build which includes ld. We want to prefer it
20152 # over whatever linker top-level may have detected, since
20153 # we'll use what we're building after installation anyway.
b61ff9c8
BS
20154 echo "$as_me:$LINENO: result: newly built ld" >&5
20155echo "${ECHO_T}newly built ld" >&6
e8b05380
PB
20156 in_tree_ld=yes
20157 in_tree_ld_is_elf=no
20158 if (grep 'EMUL = .*elf' ../ld/Makefile \
20159 || grep 'EMUL = .*linux' ../ld/Makefile \
20160 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
20161 in_tree_ld_is_elf=yes
20162 fi
20163 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
20164 do
20165 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20166 if test x$gcc_cv_gld_version != x; then
20167 break
20168 fi
20169 done
20170 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
20171 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20172else
b61ff9c8
BS
20173 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
20174echo "${ECHO_T}$gcc_cv_ld" >&6
e8b05380
PB
20175 in_tree_ld=no
20176fi
20177
20178# Figure out what nm we will be using.
20179gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
20180if test "${gcc_cv_nm+set}" = set; then
20181 :
20182else
20183
20184if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20185 && test -f ../binutils/Makefile \
20186 && test x$build = x$host; then
e8b05380
PB
20187 gcc_cv_nm=../binutils/nm-new$build_exeext
20188elif test -x nm$build_exeext; then
20189 gcc_cv_nm=./nm$build_exeext
20190elif test -x $NM_FOR_TARGET; then
20191 gcc_cv_nm="$NM_FOR_TARGET"
20192else
20193 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
20194set dummy $NM_FOR_TARGET; ac_word=$2
b61ff9c8
BS
20195echo "$as_me:$LINENO: checking for $ac_word" >&5
20196echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 20197if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
d739199a
DJ
20198 echo $ECHO_N "(cached) $ECHO_C" >&6
20199else
e8b05380 20200 case $gcc_cv_nm in
d739199a 20201 [\\/]* | ?:[\\/]*)
e8b05380 20202 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
20203 ;;
20204 *)
20205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20206for as_dir in $PATH
20207do
20208 IFS=$as_save_IFS
20209 test -z "$as_dir" && as_dir=.
20210 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 20211 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 20212 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
20213 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20214 break 2
20215 fi
20216done
20217done
20218
20219 ;;
20220esac
20221fi
e8b05380 20222gcc_cv_nm=$ac_cv_path_gcc_cv_nm
b61ff9c8 20223
e8b05380 20224if test -n "$gcc_cv_nm"; then
b61ff9c8
BS
20225 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
20226echo "${ECHO_T}$gcc_cv_nm" >&6
d739199a 20227else
b61ff9c8
BS
20228 echo "$as_me:$LINENO: result: no" >&5
20229echo "${ECHO_T}no" >&6
d739199a
DJ
20230fi
20231
20232fi
e8b05380 20233fi
d739199a 20234
e8b05380 20235
b61ff9c8
BS
20236echo "$as_me:$LINENO: checking what nm to use" >&5
20237echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
e8b05380
PB
20238if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
20239 # Single tree build which includes binutils.
b61ff9c8
BS
20240 echo "$as_me:$LINENO: result: newly built nm" >&5
20241echo "${ECHO_T}newly built nm" >&6
e8b05380
PB
20242 in_tree_nm=yes
20243else
b61ff9c8
BS
20244 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
20245echo "${ECHO_T}$gcc_cv_nm" >&6
e8b05380
PB
20246 in_tree_nm=no
20247fi
20248
20249ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
20250
be0fe523
PB
20251case "$ORIGINAL_NM_FOR_TARGET" in
20252 ./nm | ./nm$build_exeext) ;;
b61ff9c8 20253 *) ac_config_files="$ac_config_files nm:exec-tool.in"
be0fe523
PB
20254 ;;
20255esac
20256
e8b05380
PB
20257
20258# Figure out what objdump we will be using.
20259if test "${gcc_cv_objdump+set}" = set; then
20260 :
20261else
20262
20263if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20264 && test -f ../binutils/Makefile \
20265 && test x$build = x$host; then
e8b05380
PB
20266 # Single tree build which includes binutils.
20267 gcc_cv_objdump=../binutils/objdump$build_exeext
20268elif test -x objdump$build_exeext; then
20269 gcc_cv_objdump=./objdump$build_exeext
20270elif test -x $OBJDUMP_FOR_TARGET; then
20271 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
20272else
20273 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
20274set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
b61ff9c8
BS
20275echo "$as_me:$LINENO: checking for $ac_word" >&5
20276echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 20277if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
9f18db39
PB
20278 echo $ECHO_N "(cached) $ECHO_C" >&6
20279else
e8b05380 20280 case $gcc_cv_objdump in
9f18db39 20281 [\\/]* | ?:[\\/]*)
e8b05380 20282 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
20283 ;;
20284 *)
20285 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 20286for as_dir in $PATH
9f18db39
PB
20287do
20288 IFS=$as_save_IFS
20289 test -z "$as_dir" && as_dir=.
20290 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 20291 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 20292 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
9f18db39
PB
20293 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20294 break 2
20295 fi
20296done
20297done
779243f7 20298
9f18db39
PB
20299 ;;
20300esac
20301fi
e8b05380 20302gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
b61ff9c8 20303
e8b05380 20304if test -n "$gcc_cv_objdump"; then
b61ff9c8
BS
20305 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
20306echo "${ECHO_T}$gcc_cv_objdump" >&6
9f18db39 20307else
b61ff9c8
BS
20308 echo "$as_me:$LINENO: result: no" >&5
20309echo "${ECHO_T}no" >&6
9f18db39
PB
20310fi
20311
e8b05380
PB
20312fi
20313fi
9f18db39 20314
e8b05380 20315
b61ff9c8
BS
20316echo "$as_me:$LINENO: checking what objdump to use" >&5
20317echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
e8b05380
PB
20318if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
20319 # Single tree build which includes binutils.
b61ff9c8
BS
20320 echo "$as_me:$LINENO: result: newly built objdump" >&5
20321echo "${ECHO_T}newly built objdump" >&6
e8b05380 20322elif test x$gcc_cv_objdump = x; then
b61ff9c8
BS
20323 echo "$as_me:$LINENO: result: not found" >&5
20324echo "${ECHO_T}not found" >&6
e8b05380 20325else
b61ff9c8
BS
20326 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
20327echo "${ECHO_T}$gcc_cv_objdump" >&6
a2eafc76 20328fi
3cae5780 20329
981d4858 20330# Figure out what assembler alignment features are present.
b61ff9c8
BS
20331echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
20332echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
ba479fd2
NN
20333if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
20334 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20335else
20336 gcc_cv_as_balign_and_p2align=no
20337 if test $in_tree_gas = yes; then
20338 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
20339 then gcc_cv_as_balign_and_p2align=yes
20340fi
20341 elif test x$gcc_cv_as != x; then
6e3f3080 20342 echo '.balign 4
8ada417f 20343.p2align 2' > conftest.s
ba479fd2
NN
20344 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20346 (eval $ac_try) 2>&5
20347 ac_status=$?
20348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20349 (exit $ac_status); }; }
8ada417f
ZW
20350 then
20351 gcc_cv_as_balign_and_p2align=yes
20352 else
20353 echo "configure: failed program was" >&5
20354 cat conftest.s >&5
20355 fi
20356 rm -f conftest.o conftest.s
20357 fi
20358fi
b61ff9c8
BS
20359echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
20360echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 20361if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
20362
20363cat >>confdefs.h <<\_ACEOF
981d4858 20364#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 20365_ACEOF
981d4858 20366
ad9c4d9f
NN
20367fi
20368
b61ff9c8
BS
20369echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
20370echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
ba479fd2
NN
20371if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
20372 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20373else
20374 gcc_cv_as_max_skip_p2align=no
20375 if test $in_tree_gas = yes; then
20376 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
20377 then gcc_cv_as_max_skip_p2align=yes
20378fi
20379 elif test x$gcc_cv_as != x; then
6e3f3080 20380 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
20381 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20383 (eval $ac_try) 2>&5
20384 ac_status=$?
20385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20386 (exit $ac_status); }; }
8ada417f
ZW
20387 then
20388 gcc_cv_as_max_skip_p2align=yes
20389 else
20390 echo "configure: failed program was" >&5
20391 cat conftest.s >&5
20392 fi
20393 rm -f conftest.o conftest.s
20394 fi
ad9c4d9f 20395fi
b61ff9c8
BS
20396echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
20397echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 20398if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
20399
20400cat >>confdefs.h <<\_ACEOF
9e423e6d 20401#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 20402_ACEOF
9e423e6d 20403
9e423e6d 20404fi
ad9c4d9f 20405
b61ff9c8
BS
20406echo "$as_me:$LINENO: checking assembler for .literal16" >&5
20407echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6
5708d18d
MS
20408if test "${gcc_cv_as_literal16+set}" = set; then
20409 echo $ECHO_N "(cached) $ECHO_C" >&6
20410else
20411 gcc_cv_as_literal16=no
20412 if test $in_tree_gas = yes; then
20413 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
20414 then gcc_cv_as_literal16=yes
20415fi
20416 elif test x$gcc_cv_as != x; then
20417 echo '.literal16' > conftest.s
20418 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20420 (eval $ac_try) 2>&5
20421 ac_status=$?
20422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20423 (exit $ac_status); }; }
20424 then
20425 gcc_cv_as_literal16=yes
20426 else
20427 echo "configure: failed program was" >&5
20428 cat conftest.s >&5
20429 fi
20430 rm -f conftest.o conftest.s
20431 fi
20432fi
b61ff9c8
BS
20433echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5
20434echo "${ECHO_T}$gcc_cv_as_literal16" >&6
5708d18d
MS
20435if test $gcc_cv_as_literal16 = yes; then
20436
20437cat >>confdefs.h <<\_ACEOF
20438#define HAVE_GAS_LITERAL16 1
20439_ACEOF
20440
20441fi
20442
b61ff9c8
BS
20443echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
20444echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
ba479fd2
NN
20445if test "${gcc_cv_as_subsection_m1+set}" = set; then
20446 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20447else
20448 gcc_cv_as_subsection_m1=no
20449 if test $in_tree_gas = yes; then
20450 if test $in_tree_gas_is_elf = yes \
20451 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
20452 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 20453fi
8ada417f 20454 elif test x$gcc_cv_as != x; then
6e3f3080 20455 echo 'conftest_label1: .word 0
d1accaa3
JJ
20456.subsection -1
20457conftest_label2: .word 0
8ada417f 20458.previous' > conftest.s
ba479fd2
NN
20459 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20461 (eval $ac_try) 2>&5
20462 ac_status=$?
20463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20464 (exit $ac_status); }; }
8ada417f
ZW
20465 then
20466 if test x$gcc_cv_nm != x; then
20467 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
20468 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
20469 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
20470 then :
20471 else gcc_cv_as_subsection_m1=yes
20472 fi
20473 rm -f conftest.nm1 conftest.nm2
20474 fi
20475 else
20476 echo "configure: failed program was" >&5
20477 cat conftest.s >&5
20478 fi
20479 rm -f conftest.o conftest.s
20480 fi
981d4858 20481fi
b61ff9c8
BS
20482echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
20483echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 20484if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
20485
20486cat >>confdefs.h <<\_ACEOF
981d4858 20487#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 20488_ACEOF
981d4858 20489
d1accaa3 20490fi
ad9c4d9f 20491
b61ff9c8
BS
20492echo "$as_me:$LINENO: checking assembler for .weak" >&5
20493echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
ba479fd2
NN
20494if test "${gcc_cv_as_weak+set}" = set; then
20495 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20496else
20497 gcc_cv_as_weak=no
20498 if test $in_tree_gas = yes; then
20499 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
20500 then gcc_cv_as_weak=yes
ad9c4d9f 20501fi
8ada417f 20502 elif test x$gcc_cv_as != x; then
6e3f3080 20503 echo ' .weak foobar' > conftest.s
ba479fd2
NN
20504 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20506 (eval $ac_try) 2>&5
20507 ac_status=$?
20508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20509 (exit $ac_status); }; }
8ada417f
ZW
20510 then
20511 gcc_cv_as_weak=yes
20512 else
20513 echo "configure: failed program was" >&5
20514 cat conftest.s >&5
20515 fi
20516 rm -f conftest.o conftest.s
20517 fi
981d4858 20518fi
b61ff9c8
BS
20519echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
20520echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 20521if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
20522
20523cat >>confdefs.h <<\_ACEOF
981d4858 20524#define HAVE_GAS_WEAK 1
ba479fd2 20525_ACEOF
981d4858 20526
12822146 20527fi
ad9c4d9f 20528
b61ff9c8
BS
20529echo "$as_me:$LINENO: checking assembler for .weakref" >&5
20530echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
a0203ca7
AO
20531if test "${gcc_cv_as_weakref+set}" = set; then
20532 echo $ECHO_N "(cached) $ECHO_C" >&6
20533else
20534 gcc_cv_as_weakref=no
20535 if test $in_tree_gas = yes; then
20536 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
20537 then gcc_cv_as_weakref=yes
20538fi
20539 elif test x$gcc_cv_as != x; then
20540 echo ' .weakref foobar, barfnot' > conftest.s
20541 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20543 (eval $ac_try) 2>&5
20544 ac_status=$?
20545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20546 (exit $ac_status); }; }
20547 then
20548 gcc_cv_as_weakref=yes
20549 else
20550 echo "configure: failed program was" >&5
20551 cat conftest.s >&5
20552 fi
20553 rm -f conftest.o conftest.s
20554 fi
20555fi
b61ff9c8
BS
20556echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
20557echo "${ECHO_T}$gcc_cv_as_weakref" >&6
a0203ca7
AO
20558if test $gcc_cv_as_weakref = yes; then
20559
20560cat >>confdefs.h <<\_ACEOF
20561#define HAVE_GAS_WEAKREF 1
20562_ACEOF
20563
20564fi
20565
b61ff9c8
BS
20566echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
20567echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
e41f3691
JDA
20568if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
20569 echo $ECHO_N "(cached) $ECHO_C" >&6
20570else
20571 gcc_cv_as_nsubspa_comdat=no
20572 if test $in_tree_gas = yes; then
20573 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
20574 then gcc_cv_as_nsubspa_comdat=yes
20575fi
20576 elif test x$gcc_cv_as != x; then
20577 echo ' .SPACE $TEXT$
20578 .NSUBSPA $CODE$,COMDAT' > conftest.s
20579 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20581 (eval $ac_try) 2>&5
20582 ac_status=$?
20583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20584 (exit $ac_status); }; }
20585 then
20586 gcc_cv_as_nsubspa_comdat=yes
20587 else
20588 echo "configure: failed program was" >&5
20589 cat conftest.s >&5
20590 fi
20591 rm -f conftest.o conftest.s
20592 fi
20593fi
b61ff9c8
BS
20594echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
20595echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
e41f3691
JDA
20596if test $gcc_cv_as_nsubspa_comdat = yes; then
20597
20598cat >>confdefs.h <<\_ACEOF
20599#define HAVE_GAS_NSUBSPA_COMDAT 1
20600_ACEOF
20601
20602fi
20603
8ada417f
ZW
20604# .hidden needs to be supported in both the assembler and the linker,
20605# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
20606# This is irritatingly difficult to feature test for; we have to check the
20607# date string after the version number. If we've got an in-tree
20608# ld, we don't know its patchlevel version, so we set the baseline at 2.13
20609# to be safe.
20610# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
b61ff9c8
BS
20611echo "$as_me:$LINENO: checking assembler for .hidden" >&5
20612echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
ba479fd2
NN
20613if test "${gcc_cv_as_hidden+set}" = set; then
20614 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20615else
20616 gcc_cv_as_hidden=no
20617 if test $in_tree_gas = yes; then
20618 if test $in_tree_gas_is_elf = yes \
20619 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
20620 then gcc_cv_as_hidden=yes
20621fi
20622 elif test x$gcc_cv_as != x; then
6e3f3080 20623 echo ' .hidden foobar
8ada417f 20624foobar:' > conftest.s
ba479fd2
NN
20625 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20627 (eval $ac_try) 2>&5
20628 ac_status=$?
20629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20630 (exit $ac_status); }; }
8ada417f
ZW
20631 then
20632 gcc_cv_as_hidden=yes
20633 else
20634 echo "configure: failed program was" >&5
20635 cat conftest.s >&5
20636 fi
20637 rm -f conftest.o conftest.s
20638 fi
20639fi
b61ff9c8
BS
20640echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
20641echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 20642
ad9c4d9f 20643
b61ff9c8
BS
20644echo "$as_me:$LINENO: checking linker for .hidden support" >&5
20645echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
ba479fd2
NN
20646if test "${gcc_cv_ld_hidden+set}" = set; then
20647 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20648else
20649 if test $in_tree_ld = yes ; then
20650 gcc_cv_ld_hidden=no
20651 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 \
20652 && test $in_tree_ld_is_elf = yes; then
20653 gcc_cv_ld_hidden=yes
20654 fi
20655else
20656 gcc_cv_ld_hidden=yes
bace148a 20657 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
20658 if echo "$ld_ver" | grep GNU > /dev/null; then
20659 ld_vers=`echo $ld_ver | sed -n \
115e6e55 20660 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
8ada417f 20661 ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
11176d2a
JB
20662 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
20663 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
20664 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
20665 if test 0"$ld_date" -lt 20020404; then
20666 if test -n "$ld_date"; then
20667 # If there was date string, but was earlier than 2002-04-04, fail
20668 gcc_cv_ld_hidden=no
20669 elif test -z "$ld_vers"; then
20670 # If there was no date string nor ld version number, something is wrong
20671 gcc_cv_ld_hidden=no
20672 else
8ada417f
ZW
20673 test -z "$ld_vers_patch" && ld_vers_patch=0
20674 if test "$ld_vers_major" -lt 2; then
20675 gcc_cv_ld_hidden=no
20676 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
20677 gcc_cv_ld_hidden="no"
20678 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
20679 gcc_cv_ld_hidden=no
c72931a6 20680 fi
8ada417f 20681 fi
789b7de5 20682 fi
8ada417f 20683 else
28690784 20684 case "${target}" in
b0fd7d27 20685 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
20686 gcc_cv_ld_hidden=yes
20687 ;;
20688 *)
20689 gcc_cv_ld_hidden=no
20690 ;;
20691 esac
8ada417f
ZW
20692 fi
20693fi
6d07784a 20694fi
b61ff9c8
BS
20695echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
20696echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 20697libgcc_visibility=no
ad9c4d9f 20698
232b67d9 20699
8e3940b2 20700if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 20701 libgcc_visibility=yes
ba479fd2
NN
20702
20703cat >>confdefs.h <<\_ACEOF
8ada417f 20704#define HAVE_GAS_HIDDEN 1
ba479fd2 20705_ACEOF
ad9c4d9f
NN
20706
20707fi
20708
8ada417f 20709# Check if we have .[us]leb128, and support symbol arithmetic with it.
b61ff9c8
BS
20710echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
20711echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
ba479fd2
NN
20712if test "${gcc_cv_as_leb128+set}" = set; then
20713 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20714else
20715 gcc_cv_as_leb128=no
20716 if test $in_tree_gas = yes; then
20717 if test $in_tree_gas_is_elf = yes \
20718 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
20719 then gcc_cv_as_leb128=yes
20720fi
20721 elif test x$gcc_cv_as != x; then
6e3f3080 20722 echo ' .data
b7460f24
RH
20723 .uleb128 L2 - L1
20724L1:
20725 .uleb128 1280
20726 .sleb128 -1010
8ada417f 20727L2:' > conftest.s
ba479fd2
NN
20728 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20730 (eval $ac_try) 2>&5
20731 ac_status=$?
20732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20733 (exit $ac_status); }; }
8ada417f
ZW
20734 then
20735 # GAS versions before 2.11 do not support uleb128,
20736 # despite appearing to.
20737 # ??? There exists an elf-specific test that will crash
20738 # the assembler. Perhaps it's better to figure out whether
20739 # arbitrary sections are supported and try the test.
bace148a 20740 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f 20741 if echo "$as_ver" | grep GNU > /dev/null; then
ddcd0f6f 20742 as_vers=`echo $as_ver | sed -n \
115e6e55 20743 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
ddcd0f6f
BS
20744 as_major=`expr "$as_vers" : '\([0-9]*\)'`
20745 as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
20746 if test $as_major -eq 2 && test $as_minor -lt 11
20747 then :
20748 else gcc_cv_as_leb128=yes
20749 fi
20750 fi
20751 else
20752 echo "configure: failed program was" >&5
20753 cat conftest.s >&5
20754 fi
20755 rm -f conftest.o conftest.s
20756 fi
b7460f24 20757fi
b61ff9c8
BS
20758echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
20759echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 20760if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
20761
20762cat >>confdefs.h <<\_ACEOF
b7460f24 20763#define HAVE_AS_LEB128 1
ba479fd2 20764_ACEOF
b7460f24
RH
20765
20766fi
ad9c4d9f 20767
8ada417f
ZW
20768# GAS versions up to and including 2.11.0 may mis-optimize
20769# .eh_frame data.
b61ff9c8
BS
20770echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
20771echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
ba479fd2
NN
20772if test "${gcc_cv_as_eh_frame+set}" = set; then
20773 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20774else
20775 gcc_cv_as_eh_frame=no
20776 if test $in_tree_gas = yes; then
20777 if test $in_tree_gas_is_elf = yes \
20778 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
20779 then gcc_cv_as_eh_frame=yes
ad9c4d9f 20780fi
8ada417f 20781 elif test x$gcc_cv_as != x; then
6e3f3080 20782 echo ' .text
c64688ae
RH
20783.LFB1:
20784 .4byte 0
20785.L1:
20786 .4byte 0
20787.LFE1:
20788 .section .eh_frame,"aw",@progbits
20789__FRAME_BEGIN__:
20790 .4byte .LECIE1-.LSCIE1
20791.LSCIE1:
20792 .4byte 0x0
20793 .byte 0x1
20794 .ascii "z\0"
20795 .byte 0x1
20796 .byte 0x78
20797 .byte 0x1a
20798 .byte 0x0
20799 .byte 0x4
20800 .4byte 1
20801 .p2align 1
20802.LECIE1:
20803.LSFDE1:
20804 .4byte .LEFDE1-.LASFDE1
20805.LASFDE1:
20806 .4byte .LASFDE1-__FRAME_BEGIN__
20807 .4byte .LFB1
20808 .4byte .LFE1-.LFB1
20809 .byte 0x4
20810 .4byte .LFE1-.LFB1
20811 .byte 0x4
20812 .4byte .L1-.LFB1
8ada417f 20813.LEFDE1:' > conftest.s
ba479fd2
NN
20814 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20816 (eval $ac_try) 2>&5
20817 ac_status=$?
20818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20819 (exit $ac_status); }; }
8ada417f
ZW
20820 then
20821 cat > conftest.lit <<EOF
c64688ae
RH
20822 0000 10000000 00000000 017a0001 781a0004 .........z..x...
20823 0010 01000000 12000000 18000000 00000000 ................
093e61a6 20824 0020 08000000 04080000 0044 .........D
01efb963 20825EOF
ba479fd2 20826cat > conftest.big <<EOF
01efb963
AS
20827 0000 00000010 00000000 017a0001 781a0004 .........z..x...
20828 0010 00000001 00000012 00000018 00000000 ................
093e61a6 20829 0020 00000008 04000000 0844 .........D
c64688ae 20830EOF
8ada417f
ZW
20831 # If the assembler didn't choke, and we can objdump,
20832 # and we got the correct data, then succeed.
dbc02e7f
AS
20833 # The text in the here-document typically retains its unix-style line
20834 # endings, while the output of objdump will use host line endings.
20835 # Therefore, use diff -b for the comparisons.
8ada417f
ZW
20836 if test x$gcc_cv_objdump != x \
20837 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
20838 | tail -3 > conftest.got \
dbc02e7f
AS
20839 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
20840 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
8ada417f
ZW
20841 then
20842 gcc_cv_as_eh_frame=yes
ba479fd2
NN
20843 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
20844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20845 (eval $ac_try) 2>&5
20846 ac_status=$?
20847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20848 (exit $ac_status); }; }; then
8ada417f
ZW
20849 gcc_cv_as_eh_frame=buggy
20850 else
20851 # Uh oh, what do we do now?
20852 gcc_cv_as_eh_frame=no
20853 fi
20854 else
20855 echo "configure: failed program was" >&5
20856 cat conftest.s >&5
20857 fi
20858 rm -f conftest.o conftest.s
20859 fi
c64688ae 20860fi
b61ff9c8
BS
20861echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
20862echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 20863
6e3f3080 20864
63cf211a 20865if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
20866
20867cat >>confdefs.h <<\_ACEOF
8ada417f 20868#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 20869_ACEOF
ad9c4d9f
NN
20870
20871fi
20872
b61ff9c8
BS
20873echo "$as_me:$LINENO: checking assembler for section merging support" >&5
20874echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
ba479fd2
NN
20875if test "${gcc_cv_as_shf_merge+set}" = set; then
20876 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20877else
20878 gcc_cv_as_shf_merge=no
20879 if test $in_tree_gas = yes; then
20880 if test $in_tree_gas_is_elf = yes \
20881 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
20882 then gcc_cv_as_shf_merge=yes
20883fi
20884 elif test x$gcc_cv_as != x; then
6e3f3080 20885 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
20886 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
20887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20888 (eval $ac_try) 2>&5
20889 ac_status=$?
20890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20891 (exit $ac_status); }; }
8ada417f
ZW
20892 then
20893 gcc_cv_as_shf_merge=yes
20894 else
20895 echo "configure: failed program was" >&5
20896 cat conftest.s >&5
20897 fi
20898 rm -f conftest.o conftest.s
20899 fi
201556f0 20900fi
b61ff9c8
BS
20901echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
20902echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 20903
c18a5b6c 20904if test $gcc_cv_as_shf_merge = no; then
b61ff9c8
BS
20905 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
20906echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
c18a5b6c
MM
20907if test "${gcc_cv_as_shf_merge+set}" = set; then
20908 echo $ECHO_N "(cached) $ECHO_C" >&6
20909else
20910 gcc_cv_as_shf_merge=no
20911 if test $in_tree_gas = yes; then
20912 if test $in_tree_gas_is_elf = yes \
20913 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
20914 then gcc_cv_as_shf_merge=yes
20915fi
20916 elif test x$gcc_cv_as != x; then
20917 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
20918 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
20919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20920 (eval $ac_try) 2>&5
20921 ac_status=$?
20922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20923 (exit $ac_status); }; }
20924 then
20925 gcc_cv_as_shf_merge=yes
20926 else
20927 echo "configure: failed program was" >&5
20928 cat conftest.s >&5
20929 fi
20930 rm -f conftest.o conftest.s
20931 fi
20932fi
b61ff9c8
BS
20933echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
20934echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
c18a5b6c
MM
20935
20936fi
8ad9fb33 20937
ba479fd2 20938cat >>confdefs.h <<_ACEOF
8ad9fb33 20939#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 20940_ACEOF
201556f0 20941
201556f0 20942
b61ff9c8
BS
20943echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
20944echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
20945if test "${gcc_cv_as_comdat_group+set}" = set; then
20946 echo $ECHO_N "(cached) $ECHO_C" >&6
20947else
20948 gcc_cv_as_comdat_group=no
20949 if test $in_tree_gas = yes; then
20950 if test $in_tree_gas_is_elf = yes \
11176d2a 20951 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
20952 then gcc_cv_as_comdat_group=yes
20953fi
20954 elif test x$gcc_cv_as != x; then
20955 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
20956 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
20957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20958 (eval $ac_try) 2>&5
20959 ac_status=$?
20960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20961 (exit $ac_status); }; }
20962 then
20963 gcc_cv_as_comdat_group=yes
20964 else
20965 echo "configure: failed program was" >&5
20966 cat conftest.s >&5
20967 fi
20968 rm -f conftest.o conftest.s
20969 fi
20970fi
b61ff9c8
BS
20971echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
20972echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
c18a5b6c
MM
20973
20974if test $gcc_cv_as_comdat_group = yes; then
20975 gcc_cv_as_comdat_group_percent=no
20976else
b61ff9c8
BS
20977 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
20978echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
20979if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
20980 echo $ECHO_N "(cached) $ECHO_C" >&6
20981else
20982 gcc_cv_as_comdat_group_percent=no
20983 if test $in_tree_gas = yes; then
20984 if test $in_tree_gas_is_elf = yes \
11176d2a 20985 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
20986 then gcc_cv_as_comdat_group_percent=yes
20987fi
20988 elif test x$gcc_cv_as != x; then
20989 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
20990 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
20991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20992 (eval $ac_try) 2>&5
20993 ac_status=$?
20994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20995 (exit $ac_status); }; }
20996 then
20997 gcc_cv_as_comdat_group_percent=yes
20998 else
20999 echo "configure: failed program was" >&5
21000 cat conftest.s >&5
21001 fi
21002 rm -f conftest.o conftest.s
21003 fi
21004fi
b61ff9c8
BS
21005echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
21006echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
c18a5b6c
MM
21007
21008fi
11176d2a
JB
21009if test $in_tree_ld != yes && test x"$ld_vers" != x; then
21010 comdat_group=yes
21011 if test 0"$ld_date" -lt 20050308; then
21012 if test -n "$ld_date"; then
21013 # If there was date string, but was earlier than 2005-03-08, fail
21014 comdat_group=no
21015 elif test "$ld_vers_major" -lt 2; then
21016 comdat_group=no
21017 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
21018 comdat_group=no
21019 fi
21020 fi
1cf0118d
RO
21021else
21022 # assume linkers other than GNU ld don't support COMDAT group
21023 comdat_group=no
21024fi
21025if test $comdat_group = no; then
21026 gcc_cv_as_comdat_group=no
21027 gcc_cv_as_comdat_group_percent=no
11176d2a 21028fi
c18a5b6c
MM
21029
21030cat >>confdefs.h <<_ACEOF
11176d2a 21031#define HAVE_COMDAT_GROUP `if test $gcc_cv_as_comdat_group = yes || test $gcc_cv_as_comdat_group_percent = yes; then echo 1; else echo 0; fi`
c18a5b6c
MM
21032_ACEOF
21033
21034
8ada417f 21035# Thread-local storage - the check is heavily parametrized.
f996902d
RH
21036conftest_s=
21037tls_first_major=
21038tls_first_minor=
9739c90c 21039tls_as_opt=
f996902d 21040case "$target" in
6f9b006d
RH
21041 alpha*-*-*)
21042 conftest_s='
21043 .section ".tdata","awT",@progbits
21044foo: .long 25
21045 .text
21046 ldq $27,__tls_get_addr($29) !literal!1
21047 lda $16,foo($29) !tlsgd!1
21048 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
21049 ldq $27,__tls_get_addr($29) !literal!2
21050 lda $16,foo($29) !tlsldm!2
21051 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
21052 ldq $1,foo($29) !gotdtprel
21053 ldah $2,foo($29) !dtprelhi
21054 lda $3,foo($2) !dtprello
21055 lda $4,foo($29) !dtprel
21056 ldq $1,foo($29) !gottprel
21057 ldah $2,foo($29) !tprelhi
21058 lda $3,foo($2) !tprello
21059 lda $4,foo($29) !tprel'
21060 tls_first_major=2
21061 tls_first_minor=13
2f3321ca 21062 tls_as_opt=--fatal-warnings
6f9b006d 21063 ;;
e4dd71de
AH
21064 frv*-*-*)
21065 conftest_s='
21066 .section ".tdata","awT",@progbits
21067x: .long 25
21068 .text
21069 call #gettlsoff(x)'
21070 tls_first_major=2
21071 tls_first_minor=14
21072 ;;
51076f96
RC
21073 hppa*-*-linux*)
21074 conftest_s='
21075t1: .reg %r20
21076t2: .reg %r21
21077gp: .reg %r19
21078 .section ".tdata","awT",@progbits
21079foo: .long 25
21080 .text
21081 .align 4
21082 addil LT%foo-$tls_gdidx$,gp
21083 ldo RT%foo-$tls_gdidx$(%r1),%arg0
21084 b __tls_get_addr
21085 nop
21086 addil LT%foo-$tls_ldidx$,gp
21087 b __tls_get_addr
21088 ldo RT%foo-$tls_ldidx$(%r1),%arg0
21089 addil LR%foo-$tls_dtpoff$,%ret0
21090 ldo RR%foo-$tls_dtpoff$(%r1),%t1
21091 mfctl %cr27,%t1
21092 addil LT%foo-$tls_ieoff$,gp
21093 ldw RT%foo-$tls_ieoff$(%r1),%t2
21094 add %t1,%t2,%t3
21095 mfctl %cr27,%t1
21096 addil LR%foo-$tls_leoff$,%t1
21097 ldo RR%foo-$tls_leoff$(%r1),%t2'
21098 tls_first_major=2
21099 tls_first_minor=15
21100 tls_as_opt=--fatal-warnings
21101 ;;
d3585b76
DJ
21102 arm*-*-*)
21103 conftest_s='
21104 .section ".tdata","awT",%progbits
21105foo: .long 25
21106 .text
21107.word foo(gottpoff)
21108.word foo(tpoff)
21109.word foo(tlsgd)
21110.word foo(tlsldm)
21111.word foo(tlsldo)'
21112 tls_first_major=2
21113 tls_first_minor=17
21114 ;;
f996902d
RH
21115 i[34567]86-*-*)
21116 conftest_s='
21117 .section ".tdata","awT",@progbits
21118foo: .long 25
21119 .text
21120 movl %gs:0, %eax
21121 leal foo@TLSGD(,%ebx,1), %eax
21122 leal foo@TLSLDM(%ebx), %eax
21123 leal foo@DTPOFF(%eax), %edx
21124 movl foo@GOTTPOFF(%ebx), %eax
21125 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
21126 addl foo@GOTNTPOFF(%ebx), %eax
21127 movl foo@INDNTPOFF, %eax
f996902d
RH
21128 movl $foo@TPOFF, %eax
21129 subl $foo@TPOFF, %eax
21130 leal foo@NTPOFF(%ecx), %eax'
21131 tls_first_major=2
75d38379 21132 tls_first_minor=14
2f3321ca 21133 tls_as_opt=--fatal-warnings
75d38379
JJ
21134 ;;
21135 x86_64-*-*)
21136 conftest_s='
21137 .section ".tdata","awT",@progbits
21138foo: .long 25
21139 .text
21140 movq %fs:0, %rax
21141 leaq foo@TLSGD(%rip), %rdi
21142 leaq foo@TLSLD(%rip), %rdi
21143 leaq foo@DTPOFF(%rax), %rdx
21144 movq foo@GOTTPOFF(%rip), %rax
21145 movq $foo@TPOFF, %rax'
21146 tls_first_major=2
21147 tls_first_minor=14
2f3321ca 21148 tls_as_opt=--fatal-warnings
f996902d 21149 ;;
7b6e506e
RH
21150 ia64-*-*)
21151 conftest_s='
21152 .section ".tdata","awT",@progbits
21153foo: data8 25
21154 .text
21155 addl r16 = @ltoff(@dtpmod(foo#)), gp
21156 addl r17 = @ltoff(@dtprel(foo#)), gp
21157 addl r18 = @ltoff(@tprel(foo#)), gp
21158 addl r19 = @dtprel(foo#), gp
21159 adds r21 = @dtprel(foo#), r13
21160 movl r23 = @dtprel(foo#)
21161 addl r20 = @tprel(foo#), gp
21162 adds r22 = @tprel(foo#), r13
21163 movl r24 = @tprel(foo#)'
21164 tls_first_major=2
21165 tls_first_minor=13
2f3321ca 21166 tls_as_opt=--fatal-warnings
7b6e506e 21167 ;;
69229b81
DJ
21168 mips*-*-*)
21169 conftest_s='
21170 .section .tdata,"awT",@progbits
21171x:
21172 .word 2
21173 .text
21174 addiu $4, $28, %tlsgd(x)
21175 addiu $4, $28, %tlsldm(x)
21176 lui $4, %dtprel_hi(x)
21177 addiu $4, $4, %dtprel_lo(x)
21178 lw $4, %gottprel(x)($28)
21179 lui $4, %tprel_hi(x)
21180 addiu $4, $4, %tprel_lo(x)'
21181 tls_first_major=2
21182 tls_first_minor=16
21183 tls_as_opt='-32 --fatal-warnings'
21184 ;;
c4501e62
JJ
21185 powerpc-*-*)
21186 conftest_s='
21187 .section ".tdata","awT",@progbits
21188 .align 2
21189ld0: .space 4
21190ld1: .space 4
21191x1: .space 4
21192x2: .space 4
21193x3: .space 4
21194 .text
21195 addi 3,31,ld0@got@tlsgd
21196 bl __tls_get_addr
21197 addi 3,31,x1@got@tlsld
21198 bl __tls_get_addr
21199 addi 9,3,x1@dtprel
21200 addis 9,3,x2@dtprel@ha
21201 addi 9,9,x2@dtprel@l
21202 lwz 9,x3@got@tprel(31)
21203 add 9,9,x@tls
21204 addi 9,2,x1@tprel
21205 addis 9,2,x2@tprel@ha
21206 addi 9,9,x2@tprel@l'
21207 tls_first_major=2
21208 tls_first_minor=14
2f3321ca 21209 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
21210 ;;
21211 powerpc64-*-*)
21212 conftest_s='
21213 .section ".tdata","awT",@progbits
21214 .align 3
21215ld0: .space 8
21216ld1: .space 8
21217x1: .space 8
21218x2: .space 8
21219x3: .space 8
21220 .text
21221 addi 3,2,ld0@got@tlsgd
21222 bl .__tls_get_addr
21223 nop
21224 addi 3,2,ld1@toc
21225 bl .__tls_get_addr
21226 nop
21227 addi 3,2,x1@got@tlsld
21228 bl .__tls_get_addr
21229 nop
21230 addi 9,3,x1@dtprel
21231 bl .__tls_get_addr
21232 nop
21233 addis 9,3,x2@dtprel@ha
21234 addi 9,9,x2@dtprel@l
21235 bl .__tls_get_addr
21236 nop
21237 ld 9,x3@got@dtprel(2)
21238 add 9,9,3
21239 bl .__tls_get_addr
21240 nop'
21241 tls_first_major=2
21242 tls_first_minor=14
2f3321ca 21243 tls_as_opt="-a64 --fatal-warnings"
c4501e62 21244 ;;
fd3cd001
UW
21245 s390-*-*)
21246 conftest_s='
21247 .section ".tdata","awT",@progbits
21248foo: .long 25
21249 .text
21250 .long foo@TLSGD
21251 .long foo@TLSLDM
21252 .long foo@DTPOFF
21253 .long foo@NTPOFF
21254 .long foo@GOTNTPOFF
21255 .long foo@INDNTPOFF
21256 l %r1,foo@GOTNTPOFF(%r12)
21257 l %r1,0(%r1):tls_load:foo
21258 bas %r14,0(%r1,%r13):tls_gdcall:foo
21259 bas %r14,0(%r1,%r13):tls_ldcall:foo'
21260 tls_first_major=2
21261 tls_first_minor=14
2f3321ca 21262 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
21263 ;;
21264 s390x-*-*)
21265 conftest_s='
21266 .section ".tdata","awT",@progbits
21267foo: .long 25
21268 .text
21269 .quad foo@TLSGD
21270 .quad foo@TLSLDM
21271 .quad foo@DTPOFF
21272 .quad foo@NTPOFF
21273 .quad foo@GOTNTPOFF
21274 lg %r1,foo@GOTNTPOFF(%r12)
21275 larl %r1,foo@INDNTPOFF
21276 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
21277 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
21278 tls_first_major=2
21279 tls_first_minor=14
2f3321ca 21280 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 21281 ;;
9ff13962
KK
21282 sh-*-* | sh[34]-*-*)
21283 conftest_s='
21284 .section ".tdata","awT",@progbits
21285foo: .long 25
21286 .text
21287 .long foo@TLSGD
21288 .long foo@TLSLDM
21289 .long foo@DTPOFF
21290 .long foo@GOTTPOFF
21291 .long foo@TPOFF'
21292 tls_first_major=2
21293 tls_first_minor=13
2f3321ca 21294 tls_as_opt=--fatal-warnings
9ff13962 21295 ;;
5751a10b 21296 sparc*-*-*)
2f3321ca 21297 case "$target" in
7935dc1b
EB
21298 sparc*-sun-solaris2.[56789]*)
21299 # TLS was introduced in the Solaris 9 4/04 release but
21300 # we do not enable it by default on Solaris 9 either.
21301 if test "x$enable_tls" = xyes ; then
21302 on_solaris=yes
21303 else
21304 enable_tls=no;
21305 fi
21306 ;;
2f3321ca
EB
21307 sparc*-sun-solaris2.*)
21308 on_solaris=yes
21309 ;;
21310 *)
21311 on_solaris=no
21312 ;;
21313 esac
21314 if test x$on_solaris = xyes && test x$gas_flag = xno; then
21315 conftest_s='
21316 .section ".tdata",#alloc,#write,#tls
21317foo: .long 25
21318 .text
21319 sethi %tgd_hi22(foo), %o0
21320 add %o0, %tgd_lo10(foo), %o1
21321 add %l7, %o1, %o0, %tgd_add(foo)
21322 call __tls_get_addr, %tgd_call(foo)
21323 sethi %tldm_hi22(foo), %l1
21324 add %l1, %tldm_lo10(foo), %l2
21325 add %l7, %l2, %o0, %tldm_add(foo)
21326 call __tls_get_addr, %tldm_call(foo)
21327 sethi %tldo_hix22(foo), %l3
21328 xor %l3, %tldo_lox10(foo), %l4
21329 add %o0, %l4, %l5, %tldo_add(foo)
21330 sethi %tie_hi22(foo), %o3
21331 add %o3, %tie_lo10(foo), %o3
21332 ld [%l7 + %o3], %o2, %tie_ld(foo)
21333 add %g7, %o2, %o4, %tie_add(foo)
21334 sethi %tle_hix22(foo), %l1
21335 xor %l1, %tle_lox10(foo), %o5
21336 ld [%g7 + %o5], %o1'
21337 tls_first_major=0
21338 tls_first_minor=0
21339 else
21340 conftest_s='
5751a10b
JJ
21341 .section ".tdata","awT",@progbits
21342foo: .long 25
21343 .text
21344 sethi %tgd_hi22(foo), %o0
21345 add %o0, %tgd_lo10(foo), %o1
21346 add %l7, %o1, %o0, %tgd_add(foo)
21347 call __tls_get_addr, %tgd_call(foo)
21348 sethi %tldm_hi22(foo), %l1
21349 add %l1, %tldm_lo10(foo), %l2
21350 add %l7, %l2, %o0, %tldm_add(foo)
21351 call __tls_get_addr, %tldm_call(foo)
21352 sethi %tldo_hix22(foo), %l3
21353 xor %l3, %tldo_lox10(foo), %l4
21354 add %o0, %l4, %l5, %tldo_add(foo)
21355 sethi %tie_hi22(foo), %o3
21356 add %o3, %tie_lo10(foo), %o3
21357 ld [%l7 + %o3], %o2, %tie_ld(foo)
21358 add %g7, %o2, %o4, %tie_add(foo)
21359 sethi %tle_hix22(foo), %l1
21360 xor %l1, %tle_lox10(foo), %o5
21361 ld [%g7 + %o5], %o1'
21362 tls_first_major=2
21363 tls_first_minor=14
2f3321ca
EB
21364 tls_as_opt="-32 --fatal-warnings"
21365 fi
5751a10b 21366 ;;
f996902d 21367esac
8dea1cca
DD
21368set_have_as_tls=no
21369if test "x$enable_tls" = xno ; then
21370 : # TLS explicitly disabled.
21371elif test "x$enable_tls" = xyes ; then
21372 set_have_as_tls=yes # TLS explicitly enabled.
21373elif test -z "$tls_first_major"; then
8ada417f
ZW
21374 : # If we don't have a check, assume no support.
21375else
b61ff9c8
BS
21376 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
21377echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
ba479fd2
NN
21378if test "${gcc_cv_as_tls+set}" = set; then
21379 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
21380else
21381 gcc_cv_as_tls=no
21382 if test $in_tree_gas = yes; then
21383 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
21384 then gcc_cv_as_tls=yes
ad9c4d9f 21385fi
8ada417f 21386 elif test x$gcc_cv_as != x; then
6e3f3080 21387 echo "$conftest_s" > conftest.s
2f3321ca 21388 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
21389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21390 (eval $ac_try) 2>&5
21391 ac_status=$?
21392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21393 (exit $ac_status); }; }
8ada417f
ZW
21394 then
21395 gcc_cv_as_tls=yes
21396 else
21397 echo "configure: failed program was" >&5
21398 cat conftest.s >&5
21399 fi
21400 rm -f conftest.o conftest.s
f996902d 21401 fi
f996902d 21402fi
b61ff9c8
BS
21403echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
21404echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 21405if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
21406 set_have_as_tls=yes
21407fi
21408fi
21409if test $set_have_as_tls = yes ; then
ba479fd2
NN
21410
21411cat >>confdefs.h <<\_ACEOF
f996902d 21412#define HAVE_AS_TLS 1
ba479fd2 21413_ACEOF
f996902d 21414
8ada417f
ZW
21415fi
21416
21417# Target-specific assembler checks.
f996902d 21418
b61ff9c8
BS
21419echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
21420echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
7e9d8517
L
21421gcc_cv_ld_static_dynamic=no
21422if test $in_tree_ld = yes ; then
21423 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
21424 gcc_cv_ld_static_dynamic=yes
21425 fi
21426elif test x$gcc_cv_ld != x; then
21427 # Check if linker supports -Bstatic/-Bdynamic option
21428 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
21429 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
21430 gcc_cv_ld_static_dynamic=yes
21431 fi
21432fi
21433if test x"$gcc_cv_ld_static_dynamic" = xyes; then
21434
21435cat >>confdefs.h <<\_ACEOF
21436#define HAVE_LD_STATIC_DYNAMIC 1
21437_ACEOF
21438
21439fi
b61ff9c8
BS
21440echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
21441echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
7e9d8517 21442
d594623a 21443if test x"$demangler_in_ld" = xyes; then
b61ff9c8
BS
21444 echo "$as_me:$LINENO: checking linker --demangle support" >&5
21445echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
d594623a
L
21446 gcc_cv_ld_demangle=no
21447 if test $in_tree_ld = yes; then
21448 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 \
21449 gcc_cv_ld_demangle=yes
21450 fi
21451 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
21452 # Check if the GNU linker supports --demangle option
21453 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
21454 gcc_cv_ld_demangle=yes
21455 fi
21456 fi
21457 if test x"$gcc_cv_ld_demangle" = xyes; then
21458
21459cat >>confdefs.h <<\_ACEOF
21460#define HAVE_LD_DEMANGLE 1
21461_ACEOF
21462
21463 fi
b61ff9c8
BS
21464 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
21465echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
d594623a
L
21466fi
21467
3a37b08e
RH
21468case "$target" in
21469 # All TARGET_ABI_OSF targets.
21470 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
b61ff9c8
BS
21471 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
21472echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
21473if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
21474 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 21475else
8ada417f
ZW
21476 gcc_cv_as_alpha_explicit_relocs=no
21477 if test $in_tree_gas = yes; then
21478 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21479 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 21480fi
8ada417f 21481 elif test x$gcc_cv_as != x; then
6e3f3080 21482 echo ' .set nomacro
3a37b08e
RH
21483 .text
21484 extbl $3, $2, $3 !lituse_bytoff!1
21485 ldq $2, a($29) !literal!1
21486 ldq $4, b($29) !literal!2
21487 ldq_u $3, 0($2) !lituse_base!1
21488 ldq $27, f($29) !literal!5
21489 jsr $26, ($27), f !lituse_jsr!5
21490 ldah $29, 0($26) !gpdisp!3
21491 lda $0, c($29) !gprel
21492 ldah $1, d($29) !gprelhigh
21493 lda $1, d($1) !gprellow
8ada417f 21494 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
21495 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21497 (eval $ac_try) 2>&5
21498 ac_status=$?
21499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21500 (exit $ac_status); }; }
8ada417f
ZW
21501 then
21502 gcc_cv_as_alpha_explicit_relocs=yes
21503 else
21504 echo "configure: failed program was" >&5
21505 cat conftest.s >&5
21506 fi
21507 rm -f conftest.o conftest.s
21508 fi
cafe096b 21509fi
b61ff9c8
BS
21510echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
21511echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 21512if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
21513
21514cat >>confdefs.h <<\_ACEOF
3a37b08e 21515#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 21516_ACEOF
3a37b08e 21517
d006f5eb 21518fi
b61ff9c8
BS
21519 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
21520echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
d006f5eb
RH
21521if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
21522 echo $ECHO_N "(cached) $ECHO_C" >&6
21523else
21524 gcc_cv_as_alpha_jsrdirect_relocs=no
21525 if test $in_tree_gas = yes; then
21526 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
21527 then gcc_cv_as_alpha_jsrdirect_relocs=yes
21528fi
21529 elif test x$gcc_cv_as != x; then
21530 echo ' .set nomacro
21531 .text
21532 ldq $27, a($29) !literal!1
21533 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
21534 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21536 (eval $ac_try) 2>&5
21537 ac_status=$?
21538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21539 (exit $ac_status); }; }
21540 then
21541 gcc_cv_as_alpha_jsrdirect_relocs=yes
21542 else
21543 echo "configure: failed program was" >&5
21544 cat conftest.s >&5
21545 fi
21546 rm -f conftest.o conftest.s
21547 fi
21548fi
b61ff9c8
BS
21549echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
21550echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
d006f5eb
RH
21551if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
21552
21553cat >>confdefs.h <<\_ACEOF
21554#define HAVE_AS_JSRDIRECT_RELOCS 1
21555_ACEOF
21556
86da66b5
HPN
21557fi
21558 ;;
21559
21560 cris-*-*)
b61ff9c8
BS
21561 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
21562echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
86da66b5
HPN
21563if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
21564 echo $ECHO_N "(cached) $ECHO_C" >&6
21565else
21566 gcc_cv_as_cris_no_mul_bug=no
21567 if test $in_tree_gas = yes; then
21568 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
21569 then gcc_cv_as_cris_no_mul_bug=yes
21570fi
21571 elif test x$gcc_cv_as != x; then
21572 echo '.text' > conftest.s
21573 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
21574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21575 (eval $ac_try) 2>&5
21576 ac_status=$?
21577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21578 (exit $ac_status); }; }
21579 then
21580 gcc_cv_as_cris_no_mul_bug=yes
21581 else
21582 echo "configure: failed program was" >&5
21583 cat conftest.s >&5
21584 fi
21585 rm -f conftest.o conftest.s
21586 fi
21587fi
b61ff9c8
BS
21588echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
21589echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
86da66b5
HPN
21590if test $gcc_cv_as_cris_no_mul_bug = yes; then
21591
21592cat >>confdefs.h <<\_ACEOF
21593#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
21594_ACEOF
21595
8ada417f 21596fi
3a37b08e 21597 ;;
8ada417f 21598
1cb36a98 21599 sparc*-*-*)
b61ff9c8
BS
21600 echo "$as_me:$LINENO: checking assembler for .register" >&5
21601echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
ba479fd2
NN
21602if test "${gcc_cv_as_sparc_register_op+set}" = set; then
21603 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 21604else
8ada417f
ZW
21605 gcc_cv_as_sparc_register_op=no
21606 if test x$gcc_cv_as != x; then
6e3f3080 21607 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
21608 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21610 (eval $ac_try) 2>&5
21611 ac_status=$?
21612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21613 (exit $ac_status); }; }
8ada417f
ZW
21614 then
21615 gcc_cv_as_sparc_register_op=yes
21616 else
21617 echo "configure: failed program was" >&5
21618 cat conftest.s >&5
21619 fi
21620 rm -f conftest.o conftest.s
21621 fi
cafe096b 21622fi
b61ff9c8
BS
21623echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
21624echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 21625if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
21626
21627cat >>confdefs.h <<\_ACEOF
1cb36a98 21628#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 21629_ACEOF
1cb36a98 21630
8ada417f 21631fi
1cb36a98 21632
b61ff9c8
BS
21633 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
21634echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
ba479fd2
NN
21635if test "${gcc_cv_as_sparc_relax+set}" = set; then
21636 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 21637else
8ada417f
ZW
21638 gcc_cv_as_sparc_relax=no
21639 if test x$gcc_cv_as != x; then
6e3f3080 21640 echo '.text' > conftest.s
ba479fd2
NN
21641 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
21642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21643 (eval $ac_try) 2>&5
21644 ac_status=$?
21645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21646 (exit $ac_status); }; }
8ada417f
ZW
21647 then
21648 gcc_cv_as_sparc_relax=yes
21649 else
21650 echo "configure: failed program was" >&5
21651 cat conftest.s >&5
21652 fi
21653 rm -f conftest.o conftest.s
21654 fi
cafe096b 21655fi
b61ff9c8
BS
21656echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
21657echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 21658if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
21659
21660cat >>confdefs.h <<\_ACEOF
e95b1e6a 21661#define HAVE_AS_RELAX_OPTION 1
ba479fd2 21662_ACEOF
e95b1e6a 21663
8ada417f 21664fi
e95b1e6a 21665
b61ff9c8
BS
21666 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
21667echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
ba479fd2
NN
21668if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
21669 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 21670else
8ada417f
ZW
21671 gcc_cv_as_sparc_ua_pcrel=no
21672 if test x$gcc_cv_as != x; then
6e3f3080 21673 echo '.text
8ada417f
ZW
21674foo:
21675 nop
21676.data
21677.align 4
21678.byte 0
21679.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
21680 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
21681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21682 (eval $ac_try) 2>&5
21683 ac_status=$?
21684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21685 (exit $ac_status); }; }
8ada417f
ZW
21686 then
21687 if test x$gcc_cv_ld != x \
21688 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
21689 gcc_cv_as_sparc_ua_pcrel=yes
21690 fi
21691 rm -f conftest
21692 else
21693 echo "configure: failed program was" >&5
21694 cat conftest.s >&5
21695 fi
21696 rm -f conftest.o conftest.s
21697 fi
cafe096b 21698fi
b61ff9c8
BS
21699echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
21700echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 21701if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
21702
21703cat >>confdefs.h <<\_ACEOF
17e9e88c 21704#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 21705_ACEOF
17e9e88c 21706
17e9e88c 21707
b61ff9c8
BS
21708 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
21709echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
ba479fd2
NN
21710if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
21711 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 21712else
8ada417f
ZW
21713 gcc_cv_as_sparc_ua_pcrel_hidden=no
21714 if test x$gcc_cv_as != x; then
6e3f3080 21715 echo '.data
8ada417f
ZW
21716.align 4
21717.byte 0x31
21718.uaword %r_disp32(foo)
21719.byte 0x32, 0x33, 0x34
21720.global foo
21721.hidden foo
21722foo:
21723.skip 4' > conftest.s
ba479fd2
NN
21724 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
21725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21726 (eval $ac_try) 2>&5
21727 ac_status=$?
21728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21729 (exit $ac_status); }; }
8ada417f
ZW
21730 then
21731 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
21732 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
21733 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
21734 | grep ' 31000000 07323334' > /dev/null 2>&1; then
21735 if $gcc_cv_objdump -R conftest 2> /dev/null \
21736 | grep 'DISP32' > /dev/null 2>&1; then
21737 :
21738 else
21739 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 21740 fi
8ada417f
ZW
21741 fi
21742 rm -f conftest
21743 else
21744 echo "configure: failed program was" >&5
21745 cat conftest.s >&5
21746 fi
21747 rm -f conftest.o conftest.s
21748 fi
cafe096b 21749fi
b61ff9c8
BS
21750echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
21751echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 21752if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
21753
21754cat >>confdefs.h <<\_ACEOF
cf7b8b0d 21755#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 21756_ACEOF
cf7b8b0d 21757
8ada417f 21758fi
ba479fd2 21759
8ada417f 21760fi # unaligned pcrel relocs
cf7b8b0d 21761
b61ff9c8
BS
21762 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
21763echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
ba479fd2
NN
21764if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
21765 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 21766else
8ada417f
ZW
21767 gcc_cv_as_sparc_offsetable_lo10=no
21768 if test x$gcc_cv_as != x; then
6e3f3080 21769 echo '.text
8ada417f
ZW
21770 or %g1, %lo(ab) + 12, %g1
21771 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
21772 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
21773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21774 (eval $ac_try) 2>&5
21775 ac_status=$?
21776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21777 (exit $ac_status); }; }
8ada417f
ZW
21778 then
21779 if test x$gcc_cv_objdump != x \
ecb0ccbc 21780 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 21781 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 21782 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
21783 fi
21784 else
21785 echo "configure: failed program was" >&5
21786 cat conftest.s >&5
21787 fi
21788 rm -f conftest.o conftest.s
21789 fi
cafe096b 21790fi
b61ff9c8
BS
21791echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
21792echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 21793if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
21794
21795cat >>confdefs.h <<\_ACEOF
1cb36a98 21796#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 21797_ACEOF
1cb36a98 21798
8ada417f 21799fi
1cb36a98
RH
21800 ;;
21801
c307e6dd 21802 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
21803 case $target_os in
21804 cygwin* | pe | mingw32*)
21805 # Used for DWARF 2 in PE
b61ff9c8
BS
21806 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
21807echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
d38bc601
BF
21808if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
21809 echo $ECHO_N "(cached) $ECHO_C" >&6
21810else
21811 gcc_cv_as_ix86_pe_secrel32=no
21812 if test $in_tree_gas = yes; then
21813 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
21814 then gcc_cv_as_ix86_pe_secrel32=yes
21815fi
21816 elif test x$gcc_cv_as != x; then
21817 echo '.text
21818foo: nop
21819.data
21820 .secrel32 foo' > conftest.s
21821 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21823 (eval $ac_try) 2>&5
21824 ac_status=$?
21825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21826 (exit $ac_status); }; }
21827 then
21828 if test x$gcc_cv_ld != x \
21829 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
21830 gcc_cv_as_ix86_pe_secrel32=yes
21831 fi
21832 rm -f conftest
21833 else
21834 echo "configure: failed program was" >&5
21835 cat conftest.s >&5
21836 fi
21837 rm -f conftest.o conftest.s
21838 fi
21839fi
b61ff9c8
BS
21840echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
21841echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
d38bc601
BF
21842if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
21843
21844cat >>confdefs.h <<\_ACEOF
21845#define HAVE_GAS_PE_SECREL32_RELOC 1
21846_ACEOF
21847
21848fi
21849 ;;
21850 esac
21851
b61ff9c8
BS
21852 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
21853echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
ba479fd2
NN
21854if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
21855 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
21856else
21857 gcc_cv_as_ix86_filds_fists=no
21858 if test $in_tree_gas = yes; then
21859 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
21860 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 21861fi
8ada417f 21862 elif test x$gcc_cv_as != x; then
6e3f3080 21863 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
21864 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21866 (eval $ac_try) 2>&5
21867 ac_status=$?
21868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21869 (exit $ac_status); }; }
8ada417f
ZW
21870 then
21871 gcc_cv_as_ix86_filds_fists=yes
21872 else
21873 echo "configure: failed program was" >&5
21874 cat conftest.s >&5
981d4858 21875 fi
8ada417f
ZW
21876 rm -f conftest.o conftest.s
21877 fi
21878fi
b61ff9c8
BS
21879echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
21880echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 21881if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
21882
21883cat >>confdefs.h <<\_ACEOF
8ada417f 21884#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 21885_ACEOF
ad9c4d9f 21886
f6f5dff2
RO
21887fi
21888
b61ff9c8
BS
21889 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
21890echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
ba479fd2
NN
21891if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
21892 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
21893else
21894 gcc_cv_as_ix86_cmov_sun_syntax=no
21895 if test x$gcc_cv_as != x; then
6e3f3080 21896 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
21897 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21899 (eval $ac_try) 2>&5
21900 ac_status=$?
21901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21902 (exit $ac_status); }; }
f6f5dff2
RO
21903 then
21904 gcc_cv_as_ix86_cmov_sun_syntax=yes
21905 else
21906 echo "configure: failed program was" >&5
21907 cat conftest.s >&5
21908 fi
21909 rm -f conftest.o conftest.s
21910 fi
21911fi
b61ff9c8
BS
21912echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
21913echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 21914if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
21915
21916cat >>confdefs.h <<\_ACEOF
f6f5dff2 21917#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 21918_ACEOF
f6f5dff2 21919
b6c03bcd
RS
21920fi
21921
b61ff9c8
BS
21922 echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5
21923echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6
b6c03bcd
RS
21924if test "${gcc_cv_as_ix86_ffreep+set}" = set; then
21925 echo $ECHO_N "(cached) $ECHO_C" >&6
21926else
21927 gcc_cv_as_ix86_ffreep=no
21928 if test x$gcc_cv_as != x; then
21929 echo 'ffreep %st(1)' > conftest.s
21930 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21932 (eval $ac_try) 2>&5
21933 ac_status=$?
21934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21935 (exit $ac_status); }; }
21936 then
21937 gcc_cv_as_ix86_ffreep=yes
21938 else
21939 echo "configure: failed program was" >&5
21940 cat conftest.s >&5
21941 fi
21942 rm -f conftest.o conftest.s
21943 fi
21944fi
b61ff9c8
BS
21945echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5
21946echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6
b6c03bcd
RS
21947if test $gcc_cv_as_ix86_ffreep = yes; then
21948
21949cat >>confdefs.h <<\_ACEOF
21950#define HAVE_AS_IX86_FFREEP 1
21951_ACEOF
21952
38ca3765
UB
21953fi
21954
b61ff9c8
BS
21955 echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5
21956echo $ECHO_N "checking assembler for sahf mnemonic... $ECHO_C" >&6
38ca3765
UB
21957if test "${gcc_cv_as_ix86_sahf+set}" = set; then
21958 echo $ECHO_N "(cached) $ECHO_C" >&6
21959else
21960 gcc_cv_as_ix86_sahf=no
21961 if test x$gcc_cv_as != x; then
21962 echo 'sahf' > conftest.s
21963 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21965 (eval $ac_try) 2>&5
21966 ac_status=$?
21967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21968 (exit $ac_status); }; }
21969 then
21970 gcc_cv_as_ix86_sahf=yes
21971 else
21972 echo "configure: failed program was" >&5
21973 cat conftest.s >&5
21974 fi
21975 rm -f conftest.o conftest.s
21976 fi
21977fi
b61ff9c8
BS
21978echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_sahf" >&5
21979echo "${ECHO_T}$gcc_cv_as_ix86_sahf" >&6
38ca3765
UB
21980if test $gcc_cv_as_ix86_sahf = yes; then
21981
21982cat >>confdefs.h <<\_ACEOF
21983#define HAVE_AS_IX86_SAHF 1
21984_ACEOF
21985
68b92f78
RS
21986fi
21987
b61ff9c8
BS
21988 echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5
21989echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6
68b92f78
RS
21990if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then
21991 echo $ECHO_N "(cached) $ECHO_C" >&6
21992else
21993 gcc_cv_as_ix86_diff_sect_delta=no
21994 if test x$gcc_cv_as != x; then
21995 echo '.section .rodata
21996.L1:
21997 .long .L2-.L1
21998 .long .L3-.L1
21999 .text
22000.L3: nop
22001.L2: nop' > conftest.s
22002 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22004 (eval $ac_try) 2>&5
22005 ac_status=$?
22006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22007 (exit $ac_status); }; }
22008 then
22009 gcc_cv_as_ix86_diff_sect_delta=yes
22010 else
22011 echo "configure: failed program was" >&5
22012 cat conftest.s >&5
22013 fi
22014 rm -f conftest.o conftest.s
22015 fi
22016fi
b61ff9c8
BS
22017echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
22018echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6
68b92f78
RS
22019if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
22020
22021cat >>confdefs.h <<\_ACEOF
22022#define HAVE_AS_IX86_DIFF_SECT_DELTA 1
22023_ACEOF
22024
ad9c4d9f
NN
22025fi
22026
6f3ca281
ZW
22027 # This one is used unconditionally by i386.[ch]; it is to be defined
22028 # to 1 if the feature is present, 0 otherwise.
b61ff9c8
BS
22029 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
22030echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
ba479fd2
NN
22031if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
22032 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22033else
22034 gcc_cv_as_ix86_gotoff_in_data=no
22035 if test $in_tree_gas = yes; then
22036 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
22037 then gcc_cv_as_ix86_gotoff_in_data=yes
22038fi
22039 elif test x$gcc_cv_as != x; then
6e3f3080 22040 echo ' .text
f88c65f7
RH
22041.L0:
22042 nop
22043 .data
8ada417f 22044 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
22045 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22047 (eval $ac_try) 2>&5
22048 ac_status=$?
22049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22050 (exit $ac_status); }; }
8ada417f
ZW
22051 then
22052 gcc_cv_as_ix86_gotoff_in_data=yes
22053 else
22054 echo "configure: failed program was" >&5
22055 cat conftest.s >&5
f88c65f7 22056 fi
8ada417f
ZW
22057 rm -f conftest.o conftest.s
22058 fi
22059fi
b61ff9c8
BS
22060echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
22061echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 22062
6f3ca281 22063
ba479fd2 22064cat >>confdefs.h <<_ACEOF
6f3ca281 22065#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 22066_ACEOF
f88c65f7 22067
1cb36a98 22068 ;;
ef1ecf87
RH
22069
22070 ia64*-*-*)
b61ff9c8
BS
22071 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
22072echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
ba479fd2
NN
22073if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
22074 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 22075else
8ada417f
ZW
22076 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
22077 if test $in_tree_gas = yes; then
22078 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
22079 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 22080fi
8ada417f 22081 elif test x$gcc_cv_as != x; then
6e3f3080 22082 echo ' .text
ef1ecf87
RH
22083 addl r15 = @ltoffx(x#), gp
22084 ;;
cfa9ee99 22085 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
22086 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22088 (eval $ac_try) 2>&5
22089 ac_status=$?
22090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22091 (exit $ac_status); }; }
8ada417f 22092 then
cfa9ee99 22093 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
22094 else
22095 echo "configure: failed program was" >&5
22096 cat conftest.s >&5
2c4a9cff 22097 fi
8ada417f
ZW
22098 rm -f conftest.o conftest.s
22099 fi
22100fi
b61ff9c8
BS
22101echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
22102echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 22103if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
22104
22105cat >>confdefs.h <<\_ACEOF
cfa9ee99 22106#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 22107_ACEOF
8ada417f 22108
cfa9ee99 22109fi
8ada417f 22110
2c4a9cff 22111 ;;
8ada417f 22112
2c4a9cff 22113 powerpc*-*-*)
8ada417f 22114 case $target in
432218ba
DE
22115 *-*-aix*) conftest_s=' .machine "pwr5"
22116 .csect .text[PR]
6b37db3c 22117 mfcr 3,128';;
8af4d362 22118 *-*-darwin*)
b61ff9c8
BS
22119 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
22120echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
8af4d362
PB
22121if test "${gcc_cv_as_machine_directive+set}" = set; then
22122 echo $ECHO_N "(cached) $ECHO_C" >&6
22123else
22124 gcc_cv_as_machine_directive=no
22125 if test x$gcc_cv_as != x; then
22126 echo ' .machine ppc7400' > conftest.s
22127 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22129 (eval $ac_try) 2>&5
22130 ac_status=$?
22131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22132 (exit $ac_status); }; }
22133 then
22134 gcc_cv_as_machine_directive=yes
22135 else
22136 echo "configure: failed program was" >&5
22137 cat conftest.s >&5
22138 fi
22139 rm -f conftest.o conftest.s
22140 fi
22141fi
b61ff9c8
BS
22142echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
22143echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
8af4d362
PB
22144
22145 if test x$gcc_cv_as_machine_directive != xyes; then
22146 echo "*** This target requires an assembler supporting \".machine\"" >&2
22147 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
22148 test x$build = x$target && exit 1
22149 fi
22150 conftest_s=' .text
6b37db3c 22151 mfcr r3,128';;
4c67db14 22152 *) conftest_s=' .machine power4
d2ab3e37 22153 .text
6b37db3c 22154 mfcr 3,128';;
8ada417f 22155 esac
8ada417f 22156
b61ff9c8
BS
22157 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
22158echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
ba479fd2
NN
22159if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
22160 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 22161else
8ada417f
ZW
22162 gcc_cv_as_powerpc_mfcrf=no
22163 if test $in_tree_gas = yes; then
22164 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
22165 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 22166fi
8ada417f 22167 elif test x$gcc_cv_as != x; then
6e3f3080 22168 echo "$conftest_s" > conftest.s
ba479fd2
NN
22169 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22171 (eval $ac_try) 2>&5
22172 ac_status=$?
22173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22174 (exit $ac_status); }; }
8ada417f
ZW
22175 then
22176 gcc_cv_as_powerpc_mfcrf=yes
22177 else
22178 echo "configure: failed program was" >&5
22179 cat conftest.s >&5
22180 fi
22181 rm -f conftest.o conftest.s
22182 fi
2c4a9cff 22183fi
b61ff9c8
BS
22184echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
22185echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 22186if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
22187
22188cat >>confdefs.h <<\_ACEOF
2c4a9cff 22189#define HAVE_AS_MFCRF 1
ba479fd2 22190_ACEOF
ef1ecf87 22191
8ada417f 22192fi
432218ba
DE
22193
22194 case $target in
22195 *-*-aix*) conftest_s=' .machine "pwr5"
22196 .csect .text[PR]
22197 popcntb 3,3';;
22198 *) conftest_s=' .machine power5
22199 .text
22200 popcntb 3,3';;
22201 esac
22202
b61ff9c8
BS
22203 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
22204echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
432218ba
DE
22205if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
22206 echo $ECHO_N "(cached) $ECHO_C" >&6
22207else
22208 gcc_cv_as_powerpc_popcntb=no
22209 if test $in_tree_gas = yes; then
22210 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
22211 then gcc_cv_as_powerpc_popcntb=yes
22212fi
22213 elif test x$gcc_cv_as != x; then
22214 echo "$conftest_s" > conftest.s
22215 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22217 (eval $ac_try) 2>&5
22218 ac_status=$?
22219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22220 (exit $ac_status); }; }
22221 then
22222 gcc_cv_as_powerpc_popcntb=yes
22223 else
22224 echo "configure: failed program was" >&5
22225 cat conftest.s >&5
22226 fi
22227 rm -f conftest.o conftest.s
22228 fi
22229fi
b61ff9c8
BS
22230echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
22231echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
432218ba
DE
22232if test $gcc_cv_as_powerpc_popcntb = yes; then
22233
22234cat >>confdefs.h <<\_ACEOF
22235#define HAVE_AS_POPCNTB 1
22236_ACEOF
22237
9719f3b7
DE
22238fi
22239
22240 case $target in
22241 *-*-aix*) conftest_s=' .machine "pwr5x"
22242 .csect .text[PR]
22243 frin 1,1';;
1e04bfdc 22244 *) conftest_s=' .machine power5
9719f3b7
DE
22245 .text
22246 frin 1,1';;
22247 esac
22248
b61ff9c8
BS
22249 echo "$as_me:$LINENO: checking assembler for fp round support" >&5
22250echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
9719f3b7
DE
22251if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
22252 echo $ECHO_N "(cached) $ECHO_C" >&6
22253else
22254 gcc_cv_as_powerpc_fprnd=no
22255 if test $in_tree_gas = yes; then
22256 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
22257 then gcc_cv_as_powerpc_fprnd=yes
22258fi
22259 elif test x$gcc_cv_as != x; then
22260 echo "$conftest_s" > conftest.s
22261 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22263 (eval $ac_try) 2>&5
22264 ac_status=$?
22265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22266 (exit $ac_status); }; }
22267 then
22268 gcc_cv_as_powerpc_fprnd=yes
22269 else
22270 echo "configure: failed program was" >&5
22271 cat conftest.s >&5
22272 fi
22273 rm -f conftest.o conftest.s
22274 fi
22275fi
b61ff9c8
BS
22276echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
22277echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
9719f3b7
DE
22278if test $gcc_cv_as_powerpc_fprnd = yes; then
22279
22280cat >>confdefs.h <<\_ACEOF
22281#define HAVE_AS_FPRND 1
22282_ACEOF
22283
44cd321e
PS
22284fi
22285
22286 case $target in
22287 *-*-aix*) conftest_s=' .machine "pwr6"
22288 .csect .text[PR]
22289 mffgpr 1,3';;
22290 *) conftest_s=' .machine power6
22291 .text
22292 mffgpr 1,3';;
22293 esac
22294
b61ff9c8
BS
22295 echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5
22296echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6
44cd321e
PS
22297if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then
22298 echo $ECHO_N "(cached) $ECHO_C" >&6
22299else
22300 gcc_cv_as_powerpc_mfpgpr=no
22301 if test $in_tree_gas = yes; then
22302 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
22303 then gcc_cv_as_powerpc_mfpgpr=yes
22304fi
22305 elif test x$gcc_cv_as != x; then
22306 echo "$conftest_s" > conftest.s
22307 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22309 (eval $ac_try) 2>&5
22310 ac_status=$?
22311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22312 (exit $ac_status); }; }
22313 then
22314 gcc_cv_as_powerpc_mfpgpr=yes
22315 else
22316 echo "configure: failed program was" >&5
22317 cat conftest.s >&5
22318 fi
22319 rm -f conftest.o conftest.s
22320 fi
22321fi
b61ff9c8
BS
22322echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5
22323echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6
44cd321e
PS
22324if test $gcc_cv_as_powerpc_mfpgpr = yes; then
22325
22326cat >>confdefs.h <<\_ACEOF
22327#define HAVE_AS_MFPGPR 1
22328_ACEOF
22329
432218ba
DE
22330fi
22331
7f970b70
AM
22332 case $target in
22333 *-*-aix*) conftest_s=' .csect .text[PR]
22334LCF..0:
22335 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
22336 *-*-darwin*)
22337 conftest_s=' .text
22338LCF0:
22339 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
22340 *) conftest_s=' .text
22341.LCF0:
22342 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
22343 esac
22344
b61ff9c8
BS
22345 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
22346echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
695d8830
AS
22347if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
22348 echo $ECHO_N "(cached) $ECHO_C" >&6
22349else
22350 gcc_cv_as_powerpc_rel16=no
22351 if test $in_tree_gas = yes; then
22352 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
22353 then gcc_cv_as_powerpc_rel16=yes
22354fi
22355 elif test x$gcc_cv_as != x; then
22356 echo "$conftest_s" > conftest.s
22357 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
22358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22359 (eval $ac_try) 2>&5
22360 ac_status=$?
22361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22362 (exit $ac_status); }; }
22363 then
22364 gcc_cv_as_powerpc_rel16=yes
22365 else
22366 echo "configure: failed program was" >&5
22367 cat conftest.s >&5
22368 fi
22369 rm -f conftest.o conftest.s
22370 fi
22371fi
b61ff9c8
BS
22372echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
22373echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
695d8830
AS
22374if test $gcc_cv_as_powerpc_rel16 = yes; then
22375
22376cat >>confdefs.h <<\_ACEOF
22377#define HAVE_AS_REL16 1
22378_ACEOF
22379
22380fi
22381
b639c3c2
JJ
22382 case $target in
22383 *-*-aix*) conftest_s=' .machine "pwr6"
22384 .csect .text[PR]
22385 cmpb 3,4,5';;
22386 *) conftest_s=' .machine power6
22387 .text
22388 cmpb 3,4,5';;
22389 esac
22390
b61ff9c8
BS
22391 echo "$as_me:$LINENO: checking assembler for compare bytes support" >&5
22392echo $ECHO_N "checking assembler for compare bytes support... $ECHO_C" >&6
b639c3c2
JJ
22393if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then
22394 echo $ECHO_N "(cached) $ECHO_C" >&6
22395else
22396 gcc_cv_as_powerpc_cmpb=no
22397 if test $in_tree_gas = yes; then
22398 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
22399 then gcc_cv_as_powerpc_cmpb=yes
22400fi
22401 elif test x$gcc_cv_as != x; then
22402 echo "$conftest_s" > conftest.s
22403 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
22404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22405 (eval $ac_try) 2>&5
22406 ac_status=$?
22407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22408 (exit $ac_status); }; }
22409 then
22410 gcc_cv_as_powerpc_cmpb=yes
22411 else
22412 echo "configure: failed program was" >&5
22413 cat conftest.s >&5
22414 fi
22415 rm -f conftest.o conftest.s
22416 fi
22417fi
b61ff9c8
BS
22418echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_cmpb" >&5
22419echo "${ECHO_T}$gcc_cv_as_powerpc_cmpb" >&6
b639c3c2
JJ
22420if test $gcc_cv_as_powerpc_cmpb = yes; then
22421
22422cat >>confdefs.h <<\_ACEOF
22423#define HAVE_AS_CMPB 1
22424_ACEOF
22425
22426fi
22427
22428 case $target in
22429 *-*-aix*) conftest_s=' .machine "pwr6"
22430 .csect .text[PR]
0d74c0ee 22431 dadd 1,2,3';;
b639c3c2
JJ
22432 *) conftest_s=' .machine power6
22433 .text
0d74c0ee 22434 dadd 1,2,3';;
b639c3c2
JJ
22435 esac
22436
b61ff9c8
BS
22437 echo "$as_me:$LINENO: checking assembler for decimal float support" >&5
22438echo $ECHO_N "checking assembler for decimal float support... $ECHO_C" >&6
b639c3c2
JJ
22439if test "${gcc_cv_as_powerpc_dfp+set}" = set; then
22440 echo $ECHO_N "(cached) $ECHO_C" >&6
22441else
22442 gcc_cv_as_powerpc_dfp=no
22443 if test $in_tree_gas = yes; then
22444 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
22445 then gcc_cv_as_powerpc_dfp=yes
22446fi
22447 elif test x$gcc_cv_as != x; then
22448 echo "$conftest_s" > conftest.s
22449 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
22450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22451 (eval $ac_try) 2>&5
22452 ac_status=$?
22453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22454 (exit $ac_status); }; }
22455 then
22456 gcc_cv_as_powerpc_dfp=yes
22457 else
22458 echo "configure: failed program was" >&5
22459 cat conftest.s >&5
22460 fi
22461 rm -f conftest.o conftest.s
22462 fi
22463fi
b61ff9c8
BS
22464echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_dfp" >&5
22465echo "${ECHO_T}$gcc_cv_as_powerpc_dfp" >&6
b639c3c2
JJ
22466if test $gcc_cv_as_powerpc_dfp = yes; then
22467
22468cat >>confdefs.h <<\_ACEOF
22469#define HAVE_AS_DFP 1
22470_ACEOF
22471
e51917ae
JM
22472fi
22473
b61ff9c8
BS
22474 echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
22475echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
e51917ae
JM
22476if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then
22477 echo $ECHO_N "(cached) $ECHO_C" >&6
22478else
22479 gcc_cv_as_powerpc_gnu_attribute=no
22480 if test $in_tree_gas = yes; then
22481 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
22482 then gcc_cv_as_powerpc_gnu_attribute=yes
22483fi
22484 elif test x$gcc_cv_as != x; then
22485 echo '.gnu_attribute 4,1' > conftest.s
22486 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22488 (eval $ac_try) 2>&5
22489 ac_status=$?
22490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22491 (exit $ac_status); }; }
22492 then
22493 gcc_cv_as_powerpc_gnu_attribute=yes
22494 else
22495 echo "configure: failed program was" >&5
22496 cat conftest.s >&5
22497 fi
22498 rm -f conftest.o conftest.s
22499 fi
22500fi
b61ff9c8
BS
22501echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_gnu_attribute" >&5
22502echo "${ECHO_T}$gcc_cv_as_powerpc_gnu_attribute" >&6
e51917ae
JM
22503if test $gcc_cv_as_powerpc_gnu_attribute = yes; then
22504
22505cat >>confdefs.h <<\_ACEOF
22506#define HAVE_AS_GNU_ATTRIBUTE 1
22507_ACEOF
22508
7f970b70 22509fi
8ada417f
ZW
22510 ;;
22511
22512 mips*-*-*)
b61ff9c8
BS
22513 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
22514echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
22515if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
22516 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22517else
22518 gcc_cv_as_mips_explicit_relocs=no
22519 if test $in_tree_gas = yes; then
22520 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
22521 then gcc_cv_as_mips_explicit_relocs=yes
22522fi
22523 elif test x$gcc_cv_as != x; then
6e3f3080 22524 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
22525 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22527 (eval $ac_try) 2>&5
22528 ac_status=$?
22529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22530 (exit $ac_status); }; }
8ada417f
ZW
22531 then
22532 gcc_cv_as_mips_explicit_relocs=yes
22533 else
22534 echo "configure: failed program was" >&5
22535 cat conftest.s >&5
ef1ecf87 22536 fi
8ada417f
ZW
22537 rm -f conftest.o conftest.s
22538 fi
22539fi
b61ff9c8
BS
22540echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
22541echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
22542if test $gcc_cv_as_mips_explicit_relocs = yes; then
22543 if test x$target_cpu_default = x
22544 then target_cpu_default=MASK_EXPLICIT_RELOCS
22545 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
22546 fi
4551169f 22547fi
b61ff9c8
BS
22548 echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5
22549echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6
4551169f
RS
22550if test "${gcc_cv_as_mips_no_shared+set}" = set; then
22551 echo $ECHO_N "(cached) $ECHO_C" >&6
22552else
22553 gcc_cv_as_mips_no_shared=no
22554 if test $in_tree_gas = yes; then
22555 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
22556 then gcc_cv_as_mips_no_shared=yes
22557fi
22558 elif test x$gcc_cv_as != x; then
22559 echo 'nop' > conftest.s
22560 if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5'
22561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22562 (eval $ac_try) 2>&5
22563 ac_status=$?
22564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22565 (exit $ac_status); }; }
22566 then
22567 gcc_cv_as_mips_no_shared=yes
22568 else
22569 echo "configure: failed program was" >&5
22570 cat conftest.s >&5
22571 fi
22572 rm -f conftest.o conftest.s
22573 fi
22574fi
b61ff9c8
BS
22575echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5
22576echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6
4551169f
RS
22577if test $gcc_cv_as_mips_no_shared = yes; then
22578
22579cat >>confdefs.h <<\_ACEOF
22580#define HAVE_AS_NO_SHARED 1
22581_ACEOF
22582
dcb957d9
JM
22583fi
22584
b61ff9c8
BS
22585 echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
22586echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
dcb957d9
JM
22587if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then
22588 echo $ECHO_N "(cached) $ECHO_C" >&6
22589else
22590 gcc_cv_as_mips_gnu_attribute=no
22591 if test $in_tree_gas = yes; then
22592 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
22593 then gcc_cv_as_mips_gnu_attribute=yes
22594fi
22595 elif test x$gcc_cv_as != x; then
22596 echo '.gnu_attribute 4,1' > conftest.s
22597 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22599 (eval $ac_try) 2>&5
22600 ac_status=$?
22601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22602 (exit $ac_status); }; }
22603 then
22604 gcc_cv_as_mips_gnu_attribute=yes
22605 else
22606 echo "configure: failed program was" >&5
22607 cat conftest.s >&5
22608 fi
22609 rm -f conftest.o conftest.s
22610 fi
22611fi
b61ff9c8
BS
22612echo "$as_me:$LINENO: result: $gcc_cv_as_mips_gnu_attribute" >&5
22613echo "${ECHO_T}$gcc_cv_as_mips_gnu_attribute" >&6
dcb957d9
JM
22614if test $gcc_cv_as_mips_gnu_attribute = yes; then
22615
22616cat >>confdefs.h <<\_ACEOF
22617#define HAVE_AS_GNU_ATTRIBUTE 1
22618_ACEOF
22619
a44380d2
JM
22620fi
22621
b61ff9c8
BS
22622 echo "$as_me:$LINENO: checking assembler for .dtprelword support" >&5
22623echo $ECHO_N "checking assembler for .dtprelword support... $ECHO_C" >&6
a44380d2
JM
22624if test "${gcc_cv_as_mips_dtprelword+set}" = set; then
22625 echo $ECHO_N "(cached) $ECHO_C" >&6
22626else
22627 gcc_cv_as_mips_dtprelword=no
22628 if test $in_tree_gas = yes; then
22629 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
22630 then gcc_cv_as_mips_dtprelword=yes
22631fi
22632 elif test x$gcc_cv_as != x; then
22633 echo '.section .tdata,"awT",@progbits
22634x:
22635 .word 2
22636 .text
22637 .dtprelword x+0x8000' > conftest.s
22638 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22640 (eval $ac_try) 2>&5
22641 ac_status=$?
22642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22643 (exit $ac_status); }; }
22644 then
22645 gcc_cv_as_mips_dtprelword=yes
22646 else
22647 echo "configure: failed program was" >&5
22648 cat conftest.s >&5
22649 fi
22650 rm -f conftest.o conftest.s
22651 fi
22652fi
b61ff9c8
BS
22653echo "$as_me:$LINENO: result: $gcc_cv_as_mips_dtprelword" >&5
22654echo "${ECHO_T}$gcc_cv_as_mips_dtprelword" >&6
a44380d2
JM
22655if test $gcc_cv_as_mips_dtprelword = yes; then
22656
22657cat >>confdefs.h <<\_ACEOF
22658#define HAVE_AS_DTPRELWORD 1
22659_ACEOF
22660
8ada417f 22661fi
dbad5e72
SE
22662 ;;
22663esac
8ada417f 22664
dbad5e72
SE
22665# Mips and HP-UX need the GNU assembler.
22666# Linux on IA64 might be able to use the Intel assembler.
22667
22668case "$target" in
22669 mips*-*-* | *-*-hpux* )
82563d35
RS
22670 if test x$gas_flag = xyes \
22671 || test x"$host" != x"$build" \
22672 || test ! -x "$gcc_cv_as" \
22673 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
22674 :
22675 else
22676 echo "*** This configuration requires the GNU assembler" >&2
22677 exit 1
22678 fi
ef1ecf87 22679 ;;
1cb36a98 22680esac
dbad5e72 22681
9d147085
RH
22682# ??? Not all targets support dwarf2 debug_line, even within a version
22683# of gas. Moreover, we need to emit a valid instruction to trigger any
22684# info to the output file. So, as supported targets are added to gas 2.11,
22685# add some instruction here to (also) show we expect this might work.
22686# ??? Once 2.11 is released, probably need to add first known working
22687# version to the per-target configury.
22688case "$target" in
80486e06 22689 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 22690 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
714f737f 22691 | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* | spu-*-*)
9d147085
RH
22692 insn="nop"
22693 ;;
57116d8d 22694 ia64*-*-* | s390*-*-*)
9d147085
RH
22695 insn="nop 0"
22696 ;;
2853bc5a
HPN
22697 mmix-*-*)
22698 insn="swym 0"
22699 ;;
8ada417f
ZW
22700esac
22701if test x"$insn" != x; then
22702 conftest_s="\
22703 .file 1 \"conftest.s\"
22704 .loc 1 3 0
22705 $insn"
b61ff9c8
BS
22706 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
22707echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
ba479fd2
NN
22708if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
22709 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22710else
22711 gcc_cv_as_dwarf2_debug_line=no
22712 if test $in_tree_gas = yes; then
22713 if test $in_tree_gas_is_elf = yes \
22714 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
22715 then gcc_cv_as_dwarf2_debug_line=yes
22716fi
22717 elif test x$gcc_cv_as != x; then
6e3f3080 22718 echo "$conftest_s" > conftest.s
ba479fd2
NN
22719 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22721 (eval $ac_try) 2>&5
22722 ac_status=$?
22723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22724 (exit $ac_status); }; }
8ada417f 22725 then
080a5bb0
EB
22726 if test x$gcc_cv_objdump != x \
22727 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
22728 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
22729 gcc_cv_as_dwarf2_debug_line=yes
22730 fi
22731 else
22732 echo "configure: failed program was" >&5
22733 cat conftest.s >&5
22734 fi
22735 rm -f conftest.o conftest.s
22736 fi
22737fi
b61ff9c8
BS
22738echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
22739echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 22740
ad9c4d9f 22741
8ada417f
ZW
22742# The .debug_line file table must be in the exact order that
22743# we specified the files, since these indices are also used
22744# by DW_AT_decl_file. Approximate this test by testing if
22745# the assembler bitches if the same index is assigned twice.
b61ff9c8
BS
22746 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
22747echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
ba479fd2
NN
22748if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
22749 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22750else
22751 gcc_cv_as_dwarf2_file_buggy=no
22752 if test x$gcc_cv_as != x; then
6e3f3080 22753 echo ' .file 1 "foo.s"
8ada417f 22754 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
22755 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22757 (eval $ac_try) 2>&5
22758 ac_status=$?
22759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22760 (exit $ac_status); }; }
8ada417f
ZW
22761 then
22762 gcc_cv_as_dwarf2_file_buggy=yes
22763 else
22764 echo "configure: failed program was" >&5
22765 cat conftest.s >&5
22766 fi
22767 rm -f conftest.o conftest.s
22768 fi
ad9c4d9f 22769fi
b61ff9c8
BS
22770echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
22771echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
22772
22773
22774 if test $gcc_cv_as_dwarf2_debug_line = yes \
22775 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
22776
22777cat >>confdefs.h <<\_ACEOF
9d147085 22778#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 22779_ACEOF
9d147085 22780
8ada417f 22781 fi
ad9c4d9f 22782
b61ff9c8
BS
22783 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
22784echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
ba479fd2
NN
22785if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
22786 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22787else
22788 gcc_cv_as_gdwarf2_flag=no
22789 if test $in_tree_gas = yes; then
22790 if test $in_tree_gas_is_elf = yes \
22791 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
22792 then gcc_cv_as_gdwarf2_flag=yes
22793fi
22794 elif test x$gcc_cv_as != x; then
6e3f3080 22795 echo "$insn" > conftest.s
ba479fd2
NN
22796 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
22797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22798 (eval $ac_try) 2>&5
22799 ac_status=$?
22800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22801 (exit $ac_status); }; }
8ada417f
ZW
22802 then
22803 gcc_cv_as_gdwarf2_flag=yes
22804 else
22805 echo "configure: failed program was" >&5
22806 cat conftest.s >&5
22807 fi
22808 rm -f conftest.o conftest.s
22809 fi
ad9c4d9f 22810fi
b61ff9c8
BS
22811echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
22812echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 22813if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
22814
22815cat >>confdefs.h <<\_ACEOF
5f0e9ea2 22816#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 22817_ACEOF
5f0e9ea2
GK
22818
22819fi
ad9c4d9f 22820
b61ff9c8
BS
22821 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
22822echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
ba479fd2
NN
22823if test "${gcc_cv_as_gstabs_flag+set}" = set; then
22824 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22825else
22826 gcc_cv_as_gstabs_flag=no
22827 if test $in_tree_gas = yes; then
22828 if test $in_tree_gas_is_elf = yes \
22829 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
22830 then gcc_cv_as_gstabs_flag=yes
22831fi
22832 elif test x$gcc_cv_as != x; then
6e3f3080 22833 echo "$insn" > conftest.s
ba479fd2
NN
22834 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
22835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22836 (eval $ac_try) 2>&5
22837 ac_status=$?
22838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22839 (exit $ac_status); }; }
8ada417f
ZW
22840 then
22841 # The native Solaris 9/Intel assembler doesn't understand --gstabs
22842 # and warns about it, but still exits successfully. So check for
22843 # this.
ba479fd2
NN
22844 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
22845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22846 (eval $ac_try) 2>&5
22847 ac_status=$?
22848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22849 (exit $ac_status); }; }
8ada417f
ZW
22850 then :
22851 else gcc_cv_as_gstabs_flag=yes
22852 fi
22853 else
22854 echo "configure: failed program was" >&5
22855 cat conftest.s >&5
22856 fi
22857 rm -f conftest.o conftest.s
22858 fi
ad9c4d9f 22859fi
b61ff9c8
BS
22860echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
22861echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 22862if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
22863
22864cat >>confdefs.h <<\_ACEOF
5f0e9ea2 22865#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 22866_ACEOF
5f0e9ea2 22867
c8aea42c
PB
22868fi
22869
b61ff9c8
BS
22870 echo "$as_me:$LINENO: checking assembler for --debug-prefix-map option" >&5
22871echo $ECHO_N "checking assembler for --debug-prefix-map option... $ECHO_C" >&6
c8aea42c
PB
22872if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then
22873 echo $ECHO_N "(cached) $ECHO_C" >&6
22874else
22875 gcc_cv_as_debug_prefix_map_flag=no
22876 if test $in_tree_gas = yes; then
303a4698 22877 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
c8aea42c
PB
22878 then gcc_cv_as_debug_prefix_map_flag=yes
22879fi
22880 elif test x$gcc_cv_as != x; then
22881 echo "$insn" > conftest.s
22882 if { ac_try='$gcc_cv_as --debug-prefix-map /a=/b -o conftest.o conftest.s >&5'
22883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22884 (eval $ac_try) 2>&5
22885 ac_status=$?
22886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22887 (exit $ac_status); }; }
22888 then
22889 gcc_cv_as_debug_prefix_map_flag=yes
22890 else
22891 echo "configure: failed program was" >&5
22892 cat conftest.s >&5
22893 fi
22894 rm -f conftest.o conftest.s
22895 fi
22896fi
b61ff9c8
BS
22897echo "$as_me:$LINENO: result: $gcc_cv_as_debug_prefix_map_flag" >&5
22898echo "${ECHO_T}$gcc_cv_as_debug_prefix_map_flag" >&6
c8aea42c
PB
22899if test $gcc_cv_as_debug_prefix_map_flag = yes; then
22900
22901cat >>confdefs.h <<\_ACEOF
22902#define HAVE_AS_DEBUG_PREFIX_MAP 1
22903_ACEOF
22904
5f0e9ea2 22905fi
8ada417f 22906fi
5f0e9ea2 22907
b61ff9c8
BS
22908echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5
22909echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6
03943c05
AO
22910if test "${gcc_cv_as_line_zero+set}" = set; then
22911 echo $ECHO_N "(cached) $ECHO_C" >&6
22912else
22913 gcc_cv_as_line_zero=no
22914 if test $in_tree_gas = yes; then
cf0eb7a1
AO
22915 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
22916 then gcc_cv_as_line_zero=yes
03943c05
AO
22917fi
22918 elif test "x$gcc_cv_as" != x; then
22919 { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
22920 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
22921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22922 (eval $ac_try) 2>&5
22923 ac_status=$?
22924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22925 (exit $ac_status); }; } &&
22926 test "x`cat conftest.out`" = x
22927 then
22928 gcc_cv_as_line_zero=yes
22929 else
22930 echo "configure: failed program was" >&5
22931 cat conftest.s >&5
22932 echo "configure: error output was" >&5
22933 cat conftest.out >&5
22934 fi
22935 rm -f conftest.o conftest.s conftest.out
22936 fi
22937fi
b61ff9c8
BS
22938echo "$as_me:$LINENO: result: $gcc_cv_as_line_zero" >&5
22939echo "${ECHO_T}$gcc_cv_as_line_zero" >&6
03943c05
AO
22940if test "x$gcc_cv_as_line_zero" = xyes; then
22941
22942cat >>confdefs.h <<\_ACEOF
22943#define HAVE_AS_LINE_ZERO 1
22944_ACEOF
22945
22946fi
22947
b61ff9c8
BS
22948echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
22949echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 22950gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 22951if test $in_tree_ld = yes ; then
5408ac6c
HPN
22952 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 \
22953 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
22954 gcc_cv_ld_ro_rw_mix=read-write
22955 fi
22956elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
22957 echo '.section myfoosect, "a"' > conftest1.s
22958 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 22959 echo '.byte 1' >> conftest2.s
90e145da 22960 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 22961 echo '.byte 0' >> conftest3.s
6cd656d0
KC
22962 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
22963 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
22964 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 22965 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 22966 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 22967 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 22968 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
22969 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
22970 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
22971 gcc_cv_ld_ro_rw_mix=read-only
22972 else
22973 gcc_cv_ld_ro_rw_mix=read-write
22974 fi
22975 fi
22976 fi
22977 rm -f conftest.* conftest[123].*
22978fi
22979if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
22980
22981cat >>confdefs.h <<\_ACEOF
96d0f4dc 22982#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 22983_ACEOF
96d0f4dc
JJ
22984
22985fi
b61ff9c8
BS
22986echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
22987echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 22988
b61ff9c8
BS
22989echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
22990echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 22991gcc_cv_ld_eh_frame_hdr=no
34a86c2b 22992if test $in_tree_ld = yes ; then
5408ac6c
HPN
22993 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 \
22994 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
22995 gcc_cv_ld_eh_frame_hdr=yes
22996 fi
22997elif test x$gcc_cv_ld != x; then
22998 # Check if linker supports --eh-frame-hdr option
22999 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
23000 gcc_cv_ld_eh_frame_hdr=yes
23001 fi
23002fi
232b67d9 23003
275b60d6 23004if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
23005
23006cat >>confdefs.h <<\_ACEOF
275b60d6 23007#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 23008_ACEOF
275b60d6
JJ
23009
23010fi
b61ff9c8
BS
23011echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
23012echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 23013
b61ff9c8
BS
23014echo "$as_me:$LINENO: checking linker position independent executable support" >&5
23015echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
23016gcc_cv_ld_pie=no
23017if test $in_tree_ld = yes ; then
5408ac6c
HPN
23018 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 \
23019 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
23020 gcc_cv_ld_pie=yes
23021 fi
23022elif test x$gcc_cv_ld != x; then
23023 # Check if linker supports -pie option
23024 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
23025 gcc_cv_ld_pie=yes
23026 fi
23027fi
23028if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
23029
23030cat >>confdefs.h <<\_ACEOF
24a4dd31 23031#define HAVE_LD_PIE 1
ba479fd2 23032_ACEOF
24a4dd31
JJ
23033
23034fi
b61ff9c8
BS
23035echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
23036echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 23037
b61ff9c8
BS
23038echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5
23039echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6
22ba88ef 23040gcc_cv_ld_eh_gc_sections=no
b639c3c2
JJ
23041if test $in_tree_ld = yes ; then
23042 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 17 -o "$gcc_cv_gld_major_version" -gt 2 \
23043 && test $in_tree_ld_is_elf = yes; then
23044 gcc_cv_ld_eh_gc_sections=yes
23045 fi
23046elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
23047 cat > conftest.s <<EOF
23048 .section .text
23049.globl _start
23050 .type _start, @function
23051_start:
23052 .long foo
23053 .size _start, .-_start
23054 .section .text.foo,"ax",@progbits
23055 .type foo, @function
23056foo:
23057 .long 0
23058 .size foo, .-foo
23059 .section .gcc_except_table.foo,"a",@progbits
23060.L0:
23061 .long 0
23062 .section .eh_frame,"a",@progbits
23063 .long .L0
23064EOF
23065 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
23066 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
23067 | grep "gc-sections option ignored" > /dev/null; then
23068 gcc_cv_ld_eh_gc_sections=no
23069 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
23070 gcc_cv_ld_eh_gc_sections=yes
23071 # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
23072 if test x$gcc_cv_as_comdat_group != xyes; then
23073 gcc_cv_ld_eh_gc_sections=no
23074 cat > conftest.s <<EOF
23075 .section .text
23076.globl _start
23077 .type _start, @function
23078_start:
23079 .long foo
23080 .size _start, .-_start
23081 .section .gnu.linkonce.t.foo,"ax",@progbits
23082 .type foo, @function
23083foo:
23084 .long 0
23085 .size foo, .-foo
23086 .section .gcc_except_table.foo,"a",@progbits
23087.L0:
23088 .long 0
23089 .section .eh_frame,"a",@progbits
23090 .long .L0
23091EOF
23092 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
23093 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
23094 | grep "gc-sections option ignored" > /dev/null; then
23095 gcc_cv_ld_eh_gc_sections=no
23096 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
23097 gcc_cv_ld_eh_gc_sections=yes
23098 fi
23099 fi
23100 fi
23101 fi
23102 fi
23103 rm -f conftest.s conftest.o conftest
23104fi
e9d207d9
EB
23105case "$target" in
23106 hppa*-*-linux*)
23107 # ??? This apparently exposes a binutils bug with PC-relative relocations.
23108 gcc_cv_ld_eh_gc_sections=no
23109 ;;
23110esac
22ba88ef
EB
23111if test x$gcc_cv_ld_eh_gc_sections = xyes; then
23112
23113cat >>confdefs.h <<\_ACEOF
23114#define HAVE_LD_EH_GC_SECTIONS 1
23115_ACEOF
23116
23117fi
b61ff9c8
BS
23118echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5
23119echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6
22ba88ef 23120
8bb915b6
NN
23121# --------
23122# UNSORTED
23123# --------
23124
b61ff9c8
BS
23125echo "$as_me:$LINENO: checking linker --as-needed support" >&5
23126echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
23127if test "${gcc_cv_ld_as_needed+set}" = set; then
23128 echo $ECHO_N "(cached) $ECHO_C" >&6
23129else
23130 gcc_cv_ld_as_needed=no
765f1bf9
AM
23131if test $in_tree_ld = yes ; then
23132 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 \
23133 && test $in_tree_ld_is_elf = yes; then
23134 gcc_cv_ld_as_needed=yes
23135 fi
23136elif test x$gcc_cv_ld != x; then
23137 # Check if linker supports --as-needed and --no-as-needed options
23138 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
23139 gcc_cv_ld_as_needed=yes
23140 fi
23141fi
82e923f6
RS
23142
23143fi
b61ff9c8
BS
23144echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
23145echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
23146if test x"$gcc_cv_ld_as_needed" = xyes; then
23147
23148cat >>confdefs.h <<\_ACEOF
23149#define HAVE_LD_AS_NEEDED 1
23150_ACEOF
23151
23152fi
765f1bf9 23153
d82bf747
AM
23154case "$target:$tm_file" in
23155 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
b61ff9c8
BS
23156 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
23157echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
85b776df
AM
23158if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
23159 echo $ECHO_N "(cached) $ECHO_C" >&6
23160else
23161 gcc_cv_ld_no_dot_syms=no
23162 if test $in_tree_ld = yes ; then
23163 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
23164 gcc_cv_ld_no_dot_syms=yes
23165 fi
23166 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
23167 cat > conftest1.s <<EOF
23168 .text
23169 bl .foo
23170EOF
23171 cat > conftest2.s <<EOF
23172 .section ".opd","aw"
23173 .align 3
23174 .globl foo
23175 .type foo,@function
23176foo:
23177 .quad .LEfoo,.TOC.@tocbase,0
23178 .text
23179.LEfoo:
23180 blr
23181 .size foo,.-.LEfoo
23182EOF
23183 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
23184 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
23185 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
23186 gcc_cv_ld_no_dot_syms=yes
23187 fi
23188 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
23189 fi
23190
23191fi
b61ff9c8
BS
23192echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
23193echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
85b776df
AM
23194 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
23195
23196cat >>confdefs.h <<\_ACEOF
23197#define HAVE_LD_NO_DOT_SYMS 1
23198_ACEOF
23199
23200 fi
23201 ;;
23202esac
23203
b61ff9c8
BS
23204echo "$as_me:$LINENO: checking linker --sysroot support" >&5
23205echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
380e5ca4
MM
23206if test "${gcc_cv_ld_sysroot+set}" = set; then
23207 echo $ECHO_N "(cached) $ECHO_C" >&6
23208else
23209 gcc_cv_ld_sysroot=no
23210 if test $in_tree_ld = yes ; then
23211 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 ; then
7032df40 23212 gcc_cv_ld_sysroot=yes
380e5ca4
MM
23213 fi
23214 elif test x$gcc_cv_ld != x; then
23215 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
23216 gcc_cv_ld_sysroot=yes
23217 fi
23218 fi
23219fi
b61ff9c8
BS
23220echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
23221echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
380e5ca4
MM
23222if test x"$gcc_cv_ld_sysroot" = xyes; then
23223
23224cat >>confdefs.h <<\_ACEOF
23225#define HAVE_LD_SYSROOT 1
23226_ACEOF
23227
23228fi
23229
9fb28a67 23230if test x$with_sysroot = x && test x$host = x$target \
c794c06f
CD
23231 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
23232 && test "$prefix" != "NONE"; then
ba479fd2
NN
23233
23234cat >>confdefs.h <<_ACEOF
793e9558 23235#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 23236_ACEOF
793e9558
PB
23237
23238fi
23239
77008252 23240# Test for stack protector support in target C library.
b61ff9c8
BS
23241echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5
23242echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6
77008252
JJ
23243if test "${gcc_cv_libc_provides_ssp+set}" = set; then
23244 echo $ECHO_N "(cached) $ECHO_C" >&6
23245else
23246 gcc_cv_libc_provides_ssp=no
a6ccdbab
EC
23247 case "$target" in
23248 *-*-linux*)
77008252
JJ
23249 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
23250 if test "x$with_sysroot" = x; then
23251 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
23252 elif test "x$with_build_sysroot" != "x"; then
23253 glibc_header_dir="${with_build_sysroot}/usr/include"
77008252
JJ
23254 elif test "x$with_sysroot" = xyes; then
23255 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
23256 else
23257 glibc_header_dir="${with_sysroot}/usr/include"
23258 fi
23259 else
23260 glibc_header_dir=/usr/include
23261 fi
23262 # glibc 2.4 and later provides __stack_chk_fail and
23263 # either __stack_chk_guard, or TLS access to stack guard canary.
23264 if test -f $glibc_header_dir/features.h \
23265 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
23266 $glibc_header_dir/features.h > /dev/null; then
23267 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
23268 $glibc_header_dir/features.h > /dev/null; then
23269 gcc_cv_libc_provides_ssp=yes
23270 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
23271 $glibc_header_dir/features.h > /dev/null \
23272 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
23273 $glibc_header_dir/features.h > /dev/null; then
23274 gcc_cv_libc_provides_ssp=yes
fed6d628
BF
23275 elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \
23276 $glibc_header_dir/features.h > /dev/null && \
23277 test -f $glibc_header_dir/bits/uClibc_config.h && \
23278 $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \
23279 $glibc_header_dir/bits/uClibc_config.h > /dev/null; then
23280 gcc_cv_libc_provides_ssp=yes
77008252 23281 fi
fed6d628 23282 fi
a6ccdbab
EC
23283 ;;
23284 *-*-darwin*)
b61ff9c8
BS
23285 echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5
23286echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6
a6ccdbab
EC
23287if test "${ac_cv_func___stack_chk_fail+set}" = set; then
23288 echo $ECHO_N "(cached) $ECHO_C" >&6
23289else
23290 cat >conftest.$ac_ext <<_ACEOF
23291/* confdefs.h. */
23292_ACEOF
23293cat confdefs.h >>conftest.$ac_ext
23294cat >>conftest.$ac_ext <<_ACEOF
23295/* end confdefs.h. */
23296/* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail.
23297 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23298#define __stack_chk_fail innocuous___stack_chk_fail
23299
23300/* System header to define __stub macros and hopefully few prototypes,
23301 which can conflict with char __stack_chk_fail (); below.
23302 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23303 <limits.h> exists even on freestanding compilers. */
23304
23305#ifdef __STDC__
23306# include <limits.h>
23307#else
23308# include <assert.h>
23309#endif
23310
23311#undef __stack_chk_fail
23312
b61ff9c8 23313/* Override any gcc2 internal prototype to avoid an error. */
a6ccdbab
EC
23314#ifdef __cplusplus
23315extern "C"
b61ff9c8 23316{
a6ccdbab 23317#endif
b61ff9c8
BS
23318/* We use char because int might match the return type of a gcc2
23319 builtin and then its argument prototype would still apply. */
a6ccdbab
EC
23320char __stack_chk_fail ();
23321/* The GNU C library defines this for functions which it implements
23322 to always fail with ENOSYS. Some functions are actually named
23323 something starting with __ and the normal name is an alias. */
b61ff9c8 23324#if defined (__stub___stack_chk_fail) || defined (__stub_____stack_chk_fail)
a6ccdbab 23325choke me
b61ff9c8
BS
23326#else
23327char (*f) () = __stack_chk_fail;
23328#endif
23329#ifdef __cplusplus
23330}
a6ccdbab
EC
23331#endif
23332
23333int
23334main ()
23335{
b61ff9c8 23336return f != __stack_chk_fail;
a6ccdbab
EC
23337 ;
23338 return 0;
23339}
23340_ACEOF
23341rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
23342if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23343 (eval $ac_link) 2>conftest.er1
a6ccdbab
EC
23344 ac_status=$?
23345 grep -v '^ *+' conftest.er1 >conftest.err
23346 rm -f conftest.er1
23347 cat conftest.err >&5
23348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
23349 (exit $ac_status); } &&
23350 { ac_try='test -z "$ac_c_werror_flag"
23351 || test ! -s conftest.err'
23352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23353 (eval $ac_try) 2>&5
23354 ac_status=$?
23355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23356 (exit $ac_status); }; } &&
23357 { ac_try='test -s conftest$ac_exeext'
23358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23359 (eval $ac_try) 2>&5
23360 ac_status=$?
23361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23362 (exit $ac_status); }; }; then
8b1f719a
PB
23363 ac_cv_func___stack_chk_fail=yes
23364else
a6ccdbab
EC
23365 echo "$as_me: failed program was:" >&5
23366sed 's/^/| /' conftest.$ac_ext >&5
23367
b61ff9c8 23368ac_cv_func___stack_chk_fail=no
a6ccdbab 23369fi
b61ff9c8 23370rm -f conftest.err conftest.$ac_objext \
a6ccdbab
EC
23371 conftest$ac_exeext conftest.$ac_ext
23372fi
b61ff9c8
BS
23373echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5
23374echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6
a6ccdbab
EC
23375if test $ac_cv_func___stack_chk_fail = yes; then
23376 gcc_cv_libc_provides_ssp=yes
23377else
23378 echo "no __stack_chk_fail on this target"
77008252 23379fi
a6ccdbab
EC
23380
23381 ;;
77008252 23382 *) gcc_cv_libc_provides_ssp=no ;;
a6ccdbab
EC
23383 esac
23384fi
b61ff9c8
BS
23385echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
23386echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6
a6ccdbab 23387
77008252
JJ
23388if test x$gcc_cv_libc_provides_ssp = xyes; then
23389
23390cat >>confdefs.h <<\_ACEOF
23391#define TARGET_LIBC_PROVIDES_SSP 1
23392_ACEOF
23393
23394fi
23395
ed965309
JJ
23396# Check if TFmode long double should be used by default or not.
23397# Some glibc targets used DFmode long double, but with glibc 2.4
23398# and later they can use TFmode.
23399case "$target" in
f7cc5390
JM
23400 powerpc*-*-linux* | \
23401 powerpc*-*-gnu* | \
ed965309
JJ
23402 sparc*-*-linux* | \
23403 s390*-*-linux* | \
23404 alpha*-*-linux*)
23405
b61ff9c8 23406# Check whether --with-long-double-128 or --without-long-double-128 was given.
ed965309 23407if test "${with_long_double_128+set}" = set; then
b61ff9c8
BS
23408 withval="$with_long_double_128"
23409 gcc_cv_target_ldbl128="$with_long_double_128"
ed965309
JJ
23410else
23411 gcc_cv_target_ldbl128=no
23412 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
23413 if test "x$with_sysroot" = x; then
23414 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
23415 elif test "x$with_build_sysroot" != "x"; then
23416 glibc_header_dir="${with_build_sysroot}/usr/include"
ed965309
JJ
23417 elif test "x$with_sysroot" = xyes; then
23418 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
23419 else
23420 glibc_header_dir="${with_sysroot}/usr/include"
23421 fi
23422 else
23423 glibc_header_dir=/usr/include
23424 fi
65280f6c 23425 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
ed965309
JJ
23426 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
23427 && gcc_cv_target_ldbl128=yes
65280f6c 23428
b61ff9c8 23429fi;
ed965309
JJ
23430 ;;
23431esac
23432if test x$gcc_cv_target_ldbl128 = xyes; then
23433
23434cat >>confdefs.h <<\_ACEOF
23435#define TARGET_DEFAULT_LONG_DOUBLE_128 1
23436_ACEOF
23437
23438fi
23439
81bf3d9e 23440# Find out what GC implementation we want, or may, use.
ba479fd2 23441
b61ff9c8 23442# Check whether --with-gc or --without-gc was given.
81bf3d9e 23443if test "${with_gc+set}" = set; then
b61ff9c8
BS
23444 withval="$with_gc"
23445 case "$withval" in
08cee789 23446 page)
81bf3d9e 23447 GGC=ggc-$withval
08cee789
DJ
23448 ;;
23449 zone)
23450 GGC=ggc-$withval
23451
23452cat >>confdefs.h <<\_ACEOF
23453#define GGC_ZONE 1
23454_ACEOF
23455
81bf3d9e
RH
23456 ;;
23457 *)
ba479fd2
NN
23458 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
23459echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
23460 { (exit 1); exit 1; }; }
81bf3d9e
RH
23461 ;;
23462esac
23463else
005537df 23464 GGC=ggc-page
b61ff9c8 23465fi;
81bf3d9e
RH
23466
23467echo "Using $GGC for garbage collection."
23468
3c809ba4 23469# Use the system's zlib library.
b8dad04b
ZW
23470zlibdir=-L../zlib
23471zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 23472
b61ff9c8 23473# Check whether --with-system-zlib or --without-system-zlib was given.
3c809ba4 23474if test "${with_system_zlib+set}" = set; then
b61ff9c8
BS
23475 withval="$with_system_zlib"
23476 zlibdir=
3c809ba4
AG
23477zlibinc=
23478
b61ff9c8 23479fi;
b8ec3cc8 23480
703d89ab 23481
ab22c1fa 23482
1a4b763e 23483
b61ff9c8
BS
23484echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
23485echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
23486 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
dc6746e7 23487if test "${enable_maintainer_mode+set}" = set; then
b61ff9c8
BS
23488 enableval="$enable_maintainer_mode"
23489 maintainer_mode=$enableval
dc6746e7
PT
23490else
23491 maintainer_mode=no
b61ff9c8 23492fi;
a6ccdbab 23493
b61ff9c8
BS
23494echo "$as_me:$LINENO: result: $maintainer_mode" >&5
23495echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
23496
23497if test "$maintainer_mode" = "yes"; then
23498 MAINT=''
23499else
23500 MAINT='#'
23501fi
23502
8bb915b6
NN
23503# --------------
23504# Language hooks
23505# --------------
23506
861bb6c1
JL
23507# Make empty files to contain the specs and options for each language.
23508# Then add #include lines to for a compiler that has specs and/or options.
23509
cc11cc9b 23510subdirs=
d7b42618 23511lang_opt_files=
861bb6c1 23512lang_specs_files=
3103b7db 23513lang_tree_files=
861bb6c1
JL
23514# These (without "all_") are set in each config-lang.in.
23515# `language' must be a single word so is spelled singularly.
23516all_languages=
861bb6c1 23517all_compilers=
fa958513 23518all_outputs='Makefile gccbug libada-mk'
861bb6c1 23519# List of language makefile fragments.
2ed26f6b
ZW
23520all_lang_makefrags=
23521# List of language subdirectory makefiles. Deprecated.
861bb6c1 23522all_lang_makefiles=
703d89ab 23523# Additional files for gengtype
ef69da62 23524all_gtfiles="$target_gtfiles"
861bb6c1 23525
cc11cc9b
PB
23526# These are the languages that are set in --enable-languages,
23527# and are available in the GCC tree.
23528all_selected_languages=
23529
861bb6c1
JL
23530# Add the language fragments.
23531# Languages are added via two mechanisms. Some information must be
23532# recorded in makefile variables, these are defined in config-lang.in.
23533# We accumulate them and plug them into the main Makefile.
23534# The other mechanism is a set of hooks for each of the main targets
23535# like `clean', `install', etc.
23536
861bb6c1 23537language_hooks="Make-hooks"
861bb6c1 23538
cc11cc9b 23539for lang in ${srcdir}/*/config-lang.in
861bb6c1 23540do
1546bb64
PB
23541 test "$lang" = "${srcdir}/*/config-lang.in" && continue
23542
cc11cc9b
PB
23543 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
23544 if test "x$lang_alias" = x
23545 then
23546 echo "$lang doesn't set \$language." 1>&2
23547 exit 1
23548 fi
23549 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
23550 subdirs="$subdirs $subdir"
349c3166
OH
23551
23552 # $gcc_subdir is where the gcc integration files are to be found
23553 # for a language, both for internal compiler purposes (compiler
23554 # sources implementing front-end to GCC tree converters), and for
23555 # build infrastructure purposes (Make-lang.in, etc.)
23556 #
23557 # This will be <subdir> (relative to $srcdir) if a line like
23558 # gcc_subdir="<subdir>" or gcc_subdir=<subdir>
23559 # is found in <langdir>/config-lang.in, and will remain <langdir>
23560 # otherwise.
23561 #
23562 # Except for the language alias (fetched above), the regular
23563 # "config-lang.in" contents are always retrieved from $gcc_subdir,
23564 # so a <langdir>/config-lang.in setting gcc_subdir typically sets
23565 # only this and the language alias.
23566
23567 gcc_subdir=`sed -n -e 's,^gcc_subdir=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^gcc_subdir=\([^ ]*\).*$,\1,p' $lang`
23568 if [ "$gcc_subdir" = "" ]; then
23569 gcc_subdir="$subdir"
23570 fi
23571
cc11cc9b
PB
23572 case ",$enable_languages," in
23573 *,$lang_alias,*)
23574 all_selected_languages="$all_selected_languages $lang_alias"
349c3166
OH
23575 if test -f $srcdir/$gcc_subdir/lang-specs.h; then
23576 lang_specs_files="$lang_specs_files $srcdir/$gcc_subdir/lang-specs.h"
cc11cc9b
PB
23577 fi
23578 ;;
23579 esac
23580
cc11cc9b
PB
23581 language=
23582 boot_language=
23583 compilers=
cc11cc9b
PB
23584 outputs=
23585 gtfiles=
1546bb64 23586 subdir_requires=
349c3166 23587 . ${srcdir}/$gcc_subdir/config-lang.in
cc11cc9b
PB
23588 if test "x$language" = x
23589 then
349c3166 23590 echo "${srcdir}/$gcc_subdir/config-lang.in doesn't set \$language." 1>&2
cc11cc9b
PB
23591 exit 1
23592 fi
1546bb64
PB
23593
23594 ok=:
23595 case ",$enable_languages," in
23596 *,$lang_alias,*) ;;
23597 *)
23598 for i in $subdir_requires; do
b6348cb3 23599 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
23600 ok=false
23601 break
23602 done
23603 ;;
23604 esac
23605 $ok || continue
23606
349c3166
OH
23607 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in"
23608 if test -f $srcdir/$gcc_subdir/lang.opt; then
23609 lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt"
1546bb64 23610 fi
349c3166
OH
23611 if test -f $srcdir/$gcc_subdir/$subdir-tree.def; then
23612 lang_tree_files="$lang_tree_files $srcdir/$gcc_subdir/$subdir-tree.def"
1546bb64 23613 fi
349c3166
OH
23614 if test -f ${srcdir}/$gcc_subdir/Makefile.in
23615 then all_lang_makefiles="$gcc_subdir/Makefile"
cc11cc9b
PB
23616 fi
23617 all_languages="$all_languages $language"
cc11cc9b 23618 all_compilers="$all_compilers $compilers"
cc11cc9b 23619 all_outputs="$all_outputs $outputs"
703d89ab 23620 all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
861bb6c1
JL
23621done
23622
8ac9d31f
TJ
23623# Pick up gtfiles for c
23624gtfiles=
8ac9d31f 23625. ${srcdir}/c-config-lang.in
703d89ab 23626all_gtfiles="$all_gtfiles [c] $gtfiles"
8ac9d31f 23627
cbc59f01 23628check_languages=
cc11cc9b 23629for language in $all_selected_languages
cbc59f01 23630do
cc11cc9b 23631 check_languages="$check_languages check-$language"
cbc59f01
DD
23632done
23633
62b81e45 23634# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 23635# lang.${target}. Only do so for selected languages.
861bb6c1
JL
23636
23637rm -f Make-hooks
23638touch Make-hooks
bd97af06 23639target_list="all.cross start.encap rest.encap tags \
bcc3d150
BM
23640 install-common install-man install-info install-pdf dvi pdf \
23641 html uninstall info man srcextra srcman srcinfo \
8b1f719a 23642 mostlyclean clean distclean maintainer-clean"
cc11cc9b 23643
861bb6c1
JL
23644for t in $target_list
23645do
23646 x=
cc11cc9b 23647 for lang in $all_selected_languages
861bb6c1 23648 do
cc11cc9b 23649 x="$x $lang.$t"
861bb6c1
JL
23650 done
23651 echo "lang.$t: $x" >> Make-hooks
23652done
23653
8bb915b6
NN
23654# --------
23655# UNSORTED
23656# --------
23657
cc06d68c 23658# Create .gdbinit.
861bb6c1 23659
cc06d68c
GP
23660echo "dir ." > .gdbinit
23661echo "dir ${srcdir}" >> .gdbinit
23662if test x$gdb_needs_out_file_path = xyes
23663then
23664 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
23665fi
23666if test "x$subdirs" != x; then
23667 for s in $subdirs
23668 do
23669 echo "dir ${srcdir}/$s" >> .gdbinit
23670 done
861bb6c1 23671fi
cc06d68c 23672echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 23673
15c723f3 23674gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)'
d062c304
JL
23675
23676
2ce3c6c6 23677
2bbea3a6
RH
23678# Find a directory in which to install a shared libgcc.
23679
b61ff9c8 23680# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
2bbea3a6 23681if test "${enable_version_specific_runtime_libs+set}" = set; then
b61ff9c8 23682 enableval="$enable_version_specific_runtime_libs"
ba479fd2 23683
b61ff9c8 23684fi;
2bbea3a6
RH
23685
23686
b61ff9c8 23687# Check whether --with-slibdir or --without-slibdir was given.
5b15f277 23688if test "${with_slibdir+set}" = set; then
b61ff9c8
BS
23689 withval="$with_slibdir"
23690 slibdir="$with_slibdir"
5b15f277
RH
23691else
23692 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 23693 slibdir='$(libsubdir)'
5b15f277 23694elif test "$host" != "$target"; then
2bbea3a6
RH
23695 slibdir='$(build_tooldir)/lib'
23696else
5b15f277 23697 slibdir='$(libdir)'
2bbea3a6 23698fi
b61ff9c8 23699fi;
2bbea3a6
RH
23700
23701
22482f74 23702
b61ff9c8 23703# Check whether --with-datarootdir or --without-datarootdir was given.
22482f74 23704if test "${with_datarootdir+set}" = set; then
b61ff9c8
BS
23705 withval="$with_datarootdir"
23706 datarootdir="\${prefix}/$with_datarootdir"
22482f74
MS
23707else
23708 datarootdir='$(prefix)/share'
b61ff9c8 23709fi;
22482f74
MS
23710
23711
a6ccdbab 23712
b61ff9c8 23713# Check whether --with-docdir or --without-docdir was given.
22482f74 23714if test "${with_docdir+set}" = set; then
b61ff9c8
BS
23715 withval="$with_docdir"
23716 docdir="\${prefix}/$with_docdir"
22482f74
MS
23717else
23718 docdir='$(datarootdir)'
b61ff9c8 23719fi;
703d89ab 23720
ab22c1fa 23721
1a4b763e 23722
b61ff9c8 23723# Check whether --with-htmldir or --without-htmldir was given.
22482f74 23724if test "${with_htmldir+set}" = set; then
b61ff9c8
BS
23725 withval="$with_htmldir"
23726 htmldir="\${prefix}/$with_htmldir"
22482f74
MS
23727else
23728 htmldir='$(docdir)'
b61ff9c8 23729fi;
861bb6c1
JL
23730
23731
703d89ab 23732# Substitute configuration variables
861bb6c1
JL
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
23775
23776
9b16d2c4 23777
e9a25f70 23778
6e26218f 23779
c8724862 23780
11642c3a
ZW
23781
23782
23783
3d9d2476 23784
e2500fed 23785
a0e527e3 23786
51b9ff45 23787
861bb6c1 23788
6e3f3080
NN
23789# Echo link setup.
23790if test x${build} = x${host} ; then
23791 if test x${host} = x${target} ; then
23792 echo "Links are now set up to build a native compiler for ${target}." 1>&2
23793 else
23794 echo "Links are now set up to build a cross-compiler" 1>&2
23795 echo " from ${host} to ${target}." 1>&2
23796 fi
23797else
23798 if test x${host} = x${target} ; then
23799 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
23800 echo " for ${target}." 1>&2
23801 else
23802 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
23803 echo " from ${host} to ${target}." 1>&2
23804 fi
23805fi
23806
6de9cd9a
DN
23807
23808
23809
6e3f3080
NN
23810# Configure the subdirectories
23811# AC_CONFIG_SUBDIRS($subdirs)
23812
23813# Create the Makefile
23814# and configure language subdirectories
b61ff9c8 23815 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
23816
23817
b61ff9c8 23818 ac_config_commands="$ac_config_commands default"
914c5af7 23819
ba479fd2 23820cat >confcache <<\_ACEOF
6e3f3080
NN
23821# This file is a shell script that caches the results of configure
23822# tests run on this system so they can be shared between configure
ba479fd2
NN
23823# scripts and configure runs, see configure's option --config-cache.
23824# It is not useful on other systems. If it contains results you don't
23825# want to keep, you may remove or edit it.
6e3f3080 23826#
ba479fd2
NN
23827# config.status only pays attention to the cache file if you give it
23828# the --recheck option to rerun configure.
6e3f3080 23829#
ba479fd2
NN
23830# `ac_cv_env_foo' variables (set or unset) will be overridden when
23831# loading this file, other *unset* `ac_cv_foo' will be assigned the
23832# following values.
23833
23834_ACEOF
23835
6e3f3080
NN
23836# The following way of writing the cache mishandles newlines in values,
23837# but we know of no workaround that is simple, portable, and efficient.
b61ff9c8 23838# So, don't put newlines in cache variables' values.
6e3f3080
NN
23839# Ultrix sh set writes to stderr and can't be redirected directly,
23840# and sets the high bit in the cache file unless we assign to the vars.
b61ff9c8 23841{
ba479fd2 23842 (set) 2>&1 |
b61ff9c8
BS
23843 case `(ac_space=' '; set | grep ac_space) 2>&1` in
23844 *ac_space=\ *)
ba479fd2
NN
23845 # `set' does not quote correctly, so add quotes (double-quote
23846 # substitution turns \\\\ into \\, and sed turns \\ into \).
23847 sed -n \
86da66b5
HPN
23848 "s/'/'\\\\''/g;
23849 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
b61ff9c8 23850 ;;
ba479fd2
NN
23851 *)
23852 # `set' quotes correctly as required by POSIX, so do not add quotes.
b61ff9c8
BS
23853 sed -n \
23854 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 23855 ;;
b61ff9c8
BS
23856 esac;
23857} |
ba479fd2
NN
23858 sed '
23859 t clear
b61ff9c8 23860 : clear
ba479fd2
NN
23861 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23862 t end
b61ff9c8
BS
23863 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23864 : end' >>confcache
23865if diff $cache_file confcache >/dev/null 2>&1; then :; else
23866 if test -w $cache_file; then
23867 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
ba479fd2 23868 cat confcache >$cache_file
6e3f3080 23869 else
b61ff9c8 23870 echo "not updating unwritable cache $cache_file"
6e3f3080
NN
23871 fi
23872fi
23873rm -f confcache
23874
23875test "x$prefix" = xNONE && prefix=$ac_default_prefix
23876# Let make expand exec_prefix.
23877test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23878
b61ff9c8
BS
23879# VPATH may cause trouble with some makes, so we remove $(srcdir),
23880# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23881# trailing colons and then remove the whole line if VPATH becomes empty
23882# (actually we leave an empty line to preserve line numbers).
23883if test "x$srcdir" = x.; then
23884 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23885s/:*\$(srcdir):*/:/;
23886s/:*\${srcdir}:*/:/;
23887s/:*@srcdir@:*/:/;
23888s/^\([^=]*=[ ]*\):*/\1/;
23889s/:*$//;
23890s/^[^=]*=[ ]*$//;
23891}'
23892fi
23893
63cf211a 23894DEFS=-DHAVE_CONFIG_H
6e3f3080 23895
ba479fd2
NN
23896ac_libobjs=
23897ac_ltlibobjs=
23898for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23899 # 1. Remove the extension, and $U if already installed.
b61ff9c8
BS
23900 ac_i=`echo "$ac_i" |
23901 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
23902 # 2. Add them.
23903 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
23904 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
ba479fd2
NN
23905done
23906LIBOBJS=$ac_libobjs
63cf211a 23907
ba479fd2
NN
23908LTLIBOBJS=$ac_ltlibobjs
23909
23910
23911
23912: ${CONFIG_STATUS=./config.status}
23913ac_clean_files_save=$ac_clean_files
23914ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23915{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23916echo "$as_me: creating $CONFIG_STATUS" >&6;}
23917cat >$CONFIG_STATUS <<_ACEOF
23918#! $SHELL
23919# Generated by $as_me.
6e3f3080
NN
23920# Run this file to recreate the current configuration.
23921# Compiler output produced by configure, useful for debugging
ba479fd2 23922# configure, is in config.log if it exists.
6e3f3080 23923
ba479fd2
NN
23924debug=false
23925ac_cs_recheck=false
23926ac_cs_silent=false
23927SHELL=\${CONFIG_SHELL-$SHELL}
23928_ACEOF
23929
23930cat >>$CONFIG_STATUS <<\_ACEOF
23931## --------------------- ##
23932## M4sh Initialization. ##
23933## --------------------- ##
23934
b61ff9c8 23935# Be Bourne compatible
ba479fd2
NN
23936if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23937 emulate sh
23938 NULLCMD=:
23939 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23940 # is contrary to our usage. Disable this feature.
23941 alias -g '${1+"$@"}'='"$@"'
b61ff9c8
BS
23942elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23943 set -o posix
2f41c1d6 23944fi
b61ff9c8 23945DUALCASE=1; export DUALCASE # for MKS sh
ab22c1fa 23946
1a4b763e
BS
23947# Support unset when possible.
23948if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23949 as_unset=unset
23950else
23951 as_unset=false
23952fi
23953
ab22c1fa 23954
1a4b763e 23955# Work around bugs in pre-3.0 UWIN ksh.
b61ff9c8 23956$as_unset ENV MAIL MAILPATH
1a4b763e
BS
23957PS1='$ '
23958PS2='> '
23959PS4='+ '
23960
23961# NLS nuisances.
23962for as_var in \
23963 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23964 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23965 LC_TELEPHONE LC_TIME
2f41c1d6 23966do
1a4b763e
BS
23967 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23968 eval $as_var=C; export $as_var
23969 else
b61ff9c8 23970 $as_unset $as_var
1a4b763e
BS
23971 fi
23972done
23973
23974# Required to use basename.
b61ff9c8 23975if expr a : '\(a\)' >/dev/null 2>&1; then
1a4b763e
BS
23976 as_expr=expr
23977else
23978 as_expr=false
23979fi
23980
b61ff9c8 23981if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
1a4b763e
BS
23982 as_basename=basename
23983else
23984 as_basename=false
23985fi
23986
23987
23988# Name of the executable.
b61ff9c8 23989as_me=`$as_basename "$0" ||
1a4b763e
BS
23990$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23991 X"$0" : 'X\(//\)$' \| \
b61ff9c8
BS
23992 X"$0" : 'X\(/\)$' \| \
23993 . : '\(.\)' 2>/dev/null ||
1a4b763e 23994echo X/"$0" |
b61ff9c8
BS
23995 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
23996 /^X\/\(\/\/\)$/{ s//\1/; q; }
23997 /^X\/\(\/\).*/{ s//\1/; q; }
23998 s/.*/./; q'`
1a4b763e 23999
b61ff9c8
BS
24000
24001# PATH needs CR, and LINENO needs CR and PATH.
24002# Avoid depending upon Character Ranges.
24003as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24004as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24005as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24006as_cr_digits='0123456789'
24007as_cr_alnum=$as_cr_Letters$as_cr_digits
24008
24009# The user is always right.
24010if test "${PATH_SEPARATOR+set}" != set; then
24011 echo "#! /bin/sh" >conf$$.sh
24012 echo "exit 0" >>conf$$.sh
24013 chmod +x conf$$.sh
24014 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24015 PATH_SEPARATOR=';'
24016 else
24017 PATH_SEPARATOR=:
24018 fi
24019 rm -f conf$$.sh
24020fi
1a4b763e
BS
24021
24022
b61ff9c8
BS
24023 as_lineno_1=$LINENO
24024 as_lineno_2=$LINENO
24025 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
24026 test "x$as_lineno_1" != "x$as_lineno_2" &&
24027 test "x$as_lineno_3" = "x$as_lineno_2" || {
24028 # Find who we are. Look in the path if we contain no path at all
24029 # relative or not.
24030 case $0 in
24031 *[\\/]* ) as_myself=$0 ;;
24032 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24033for as_dir in $PATH
24034do
24035 IFS=$as_save_IFS
24036 test -z "$as_dir" && as_dir=.
24037 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24038done
1a4b763e 24039
b61ff9c8
BS
24040 ;;
24041 esac
24042 # We did not find ourselves, most probably we were run as `sh COMMAND'
24043 # in which case we are not to be found in the path.
24044 if test "x$as_myself" = x; then
24045 as_myself=$0
24046 fi
24047 if test ! -f "$as_myself"; then
24048 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
24049echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
24050 { (exit 1); exit 1; }; }
24051 fi
24052 case $CONFIG_SHELL in
24053 '')
24054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24055for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
24056do
24057 IFS=$as_save_IFS
24058 test -z "$as_dir" && as_dir=.
24059 for as_base in sh bash ksh sh5; do
24060 case $as_dir in
24061 /*)
24062 if ("$as_dir/$as_base" -c '
8b1f719a
PB
24063 as_lineno_1=$LINENO
24064 as_lineno_2=$LINENO
b61ff9c8 24065 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
8b1f719a 24066 test "x$as_lineno_1" != "x$as_lineno_2" &&
b61ff9c8
BS
24067 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
24068 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
24069 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
24070 CONFIG_SHELL=$as_dir/$as_base
24071 export CONFIG_SHELL
24072 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
24073 fi;;
24074 esac
24075 done
24076done
24077;;
24078 esac
ba479fd2
NN
24079
24080 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24081 # uniformly replaced by the line number. The first 'sed' inserts a
b61ff9c8
BS
24082 # line-number line before each line; the second 'sed' does the real
24083 # work. The second script uses 'N' to pair each line-number line
24084 # with the numbered line, and appends trailing '-' during
24085 # substitution so that $LINENO is not a special case at line end.
ba479fd2 24086 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b61ff9c8
BS
24087 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
24088 sed '=' <$as_myself |
ba479fd2
NN
24089 sed '
24090 N
b61ff9c8
BS
24091 s,$,-,
24092 : loop
24093 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
ba479fd2 24094 t loop
b61ff9c8
BS
24095 s,-$,,
24096 s,^['$as_cr_digits']*\n,,
ba479fd2 24097 ' >$as_me.lineno &&
b61ff9c8
BS
24098 chmod +x $as_me.lineno ||
24099 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
24100echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
ba479fd2
NN
24101 { (exit 1); exit 1; }; }
24102
24103 # Don't try to exec as it changes $[0], causing all sort of problems
24104 # (the dirname of $[0] is not the place where we might find the
b61ff9c8
BS
24105 # original and so on. Autoconf is especially sensible to this).
24106 . ./$as_me.lineno
ba479fd2
NN
24107 # Exit status is that of the last command.
24108 exit
24109}
24110
24111
b61ff9c8
BS
24112case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
24113 *c*,-n*) ECHO_N= ECHO_C='
24114' ECHO_T=' ' ;;
24115 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
24116 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
ba479fd2
NN
24117esac
24118
b61ff9c8 24119if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
24120 as_expr=expr
24121else
24122 as_expr=false
24123fi
24124
24125rm -f conf$$ conf$$.exe conf$$.file
24126echo >conf$$.file
24127if ln -s conf$$.file conf$$ 2>/dev/null; then
b61ff9c8
BS
24128 # We could just check for DJGPP; but this test a) works b) is more generic
24129 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24130 if test -f conf$$.exe; then
24131 # Don't use ln at all; we don't have any links
ba479fd2 24132 as_ln_s='cp -p'
b61ff9c8
BS
24133 else
24134 as_ln_s='ln -s'
24135 fi
ba479fd2
NN
24136elif ln conf$$.file conf$$ 2>/dev/null; then
24137 as_ln_s=ln
24138else
24139 as_ln_s='cp -p'
24140fi
b61ff9c8 24141rm -f conf$$ conf$$.exe conf$$.file
ba479fd2
NN
24142
24143if mkdir -p . 2>/dev/null; then
24144 as_mkdir_p=:
24145else
86da66b5 24146 test -d ./-p && rmdir ./-p
ba479fd2
NN
24147 as_mkdir_p=false
24148fi
24149
b61ff9c8 24150as_executable_p="test -f"
ba479fd2
NN
24151
24152# Sed expression to map a string onto a valid CPP name.
86da66b5 24153as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
24154
24155# Sed expression to map a string onto a valid variable name.
86da66b5 24156as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
24157
24158
b61ff9c8
BS
24159# IFS
24160# We need space, tab and new line, in precisely that order.
24161as_nl='
24162'
24163IFS=" $as_nl"
24164
24165# CDPATH.
24166$as_unset CDPATH
24167
ba479fd2
NN
24168exec 6>&1
24169
b61ff9c8 24170# Open the log real soon, to keep \$[0] and so on meaningful, and to
ba479fd2 24171# report actual input values of CONFIG_FILES etc. instead of their
b61ff9c8
BS
24172# values after options handling. Logging --version etc. is OK.
24173exec 5>>config.log
24174{
24175 echo
24176 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24177## Running $as_me. ##
24178_ASBOX
24179} >&5
24180cat >&5 <<_CSEOF
24181
ba479fd2 24182This file was extended by $as_me, which was
b61ff9c8 24183generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
24184
24185 CONFIG_FILES = $CONFIG_FILES
24186 CONFIG_HEADERS = $CONFIG_HEADERS
24187 CONFIG_LINKS = $CONFIG_LINKS
24188 CONFIG_COMMANDS = $CONFIG_COMMANDS
24189 $ $0 $@
24190
b61ff9c8
BS
24191_CSEOF
24192echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
24193echo >&5
ba479fd2
NN
24194_ACEOF
24195
24196# Files that config.status was made for.
b61ff9c8
BS
24197if test -n "$ac_config_files"; then
24198 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
24199fi
2f41c1d6 24200
b61ff9c8
BS
24201if test -n "$ac_config_headers"; then
24202 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
24203fi
24204
24205if test -n "$ac_config_links"; then
24206 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
24207fi
24208
24209if test -n "$ac_config_commands"; then
24210 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
24211fi
ba479fd2
NN
24212
24213cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8 24214
ba479fd2
NN
24215ac_cs_usage="\
24216\`$as_me' instantiates files from templates according to the
24217current configuration.
24218
24219Usage: $0 [OPTIONS] [FILE]...
24220
24221 -h, --help print this help, then exit
b61ff9c8 24222 -V, --version print version number, then exit
ba479fd2
NN
24223 -q, --quiet do not print progress messages
24224 -d, --debug don't remove temporary files
24225 --recheck update $as_me by reconfiguring in the same conditions
24226 --file=FILE[:TEMPLATE]
86da66b5 24227 instantiate the configuration file FILE
ba479fd2 24228 --header=FILE[:TEMPLATE]
86da66b5 24229 instantiate the configuration header FILE
ba479fd2
NN
24230
24231Configuration files:
24232$config_files
24233
24234Configuration headers:
24235$config_headers
24236
24237Configuration commands:
24238$config_commands
24239
24240Report bugs to <bug-autoconf@gnu.org>."
1a4b763e 24241_ACEOF
b61ff9c8 24242
ba479fd2
NN
24243cat >>$CONFIG_STATUS <<_ACEOF
24244ac_cs_version="\\
24245config.status
b61ff9c8
BS
24246configured by $0, generated by GNU Autoconf 2.59,
24247 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
ba479fd2 24248
b61ff9c8 24249Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
24250This config.status script is free software; the Free Software Foundation
24251gives unlimited permission to copy, distribute and modify it."
b61ff9c8 24252srcdir=$srcdir
ba479fd2
NN
24253_ACEOF
24254
24255cat >>$CONFIG_STATUS <<\_ACEOF
24256# If no file are specified by the user, then we need to provide default
24257# value. By we need to know if files were specified by the user.
24258ac_need_defaults=:
24259while test $# != 0
24260do
24261 case $1 in
24262 --*=*)
b61ff9c8
BS
24263 ac_option=`expr "x$1" : 'x\([^=]*\)='`
24264 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
ba479fd2
NN
24265 ac_shift=:
24266 ;;
b61ff9c8 24267 -*)
ba479fd2
NN
24268 ac_option=$1
24269 ac_optarg=$2
24270 ac_shift=shift
24271 ;;
b61ff9c8
BS
24272 *) # This is not an option, so the user has probably given explicit
24273 # arguments.
24274 ac_option=$1
24275 ac_need_defaults=false;;
ba479fd2
NN
24276 esac
24277
24278 case $ac_option in
24279 # Handling of the options.
b61ff9c8
BS
24280_ACEOF
24281cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
24282 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24283 ac_cs_recheck=: ;;
b61ff9c8
BS
24284 --version | --vers* | -V )
24285 echo "$ac_cs_version"; exit 0 ;;
24286 --he | --h)
24287 # Conflict between --help and --header
24288 { { echo "$as_me:$LINENO: error: ambiguous option: $1
24289Try \`$0 --help' for more information." >&5
24290echo "$as_me: error: ambiguous option: $1
24291Try \`$0 --help' for more information." >&2;}
24292 { (exit 1); exit 1; }; };;
24293 --help | --hel | -h )
24294 echo "$ac_cs_usage"; exit 0 ;;
24295 --debug | --d* | -d )
ba479fd2
NN
24296 debug=: ;;
24297 --file | --fil | --fi | --f )
24298 $ac_shift
24299 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
24300 ac_need_defaults=false;;
24301 --header | --heade | --head | --hea )
24302 $ac_shift
24303 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
24304 ac_need_defaults=false;;
24305 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24306 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24307 ac_cs_silent=: ;;
24308
24309 # This is an error.
b61ff9c8
BS
24310 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
24311Try \`$0 --help' for more information." >&5
24312echo "$as_me: error: unrecognized option: $1
24313Try \`$0 --help' for more information." >&2;}
ba479fd2
NN
24314 { (exit 1); exit 1; }; } ;;
24315
b61ff9c8 24316 *) ac_config_targets="$ac_config_targets $1" ;;
ba479fd2
NN
24317
24318 esac
24319 shift
6e3f3080 24320done
ba479fd2
NN
24321
24322ac_configure_extra_args=
24323
24324if $ac_cs_silent; then
24325 exec 6>/dev/null
24326 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
24327fi
24328
ba479fd2
NN
24329_ACEOF
24330cat >>$CONFIG_STATUS <<_ACEOF
24331if \$ac_cs_recheck; then
b61ff9c8
BS
24332 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24333 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
ba479fd2 24334fi
861bb6c1 24335
ba479fd2
NN
24336_ACEOF
24337
24338cat >>$CONFIG_STATUS <<_ACEOF
24339#
b61ff9c8 24340# INIT-COMMANDS section.
ba479fd2 24341#
b61ff9c8 24342
ba479fd2 24343subdirs='$subdirs'
ba479fd2
NN
24344
24345_ACEOF
24346
1a4b763e 24347
b61ff9c8
BS
24348
24349cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
24350for ac_config_target in $ac_config_targets
24351do
b61ff9c8
BS
24352 case "$ac_config_target" in
24353 # Handling of arguments.
24354 "as" ) CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
24355 "collect-ld" ) CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
24356 "nm" ) CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
24357 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
24358 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24359 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
ba479fd2
NN
24360 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24361echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24362 { (exit 1); exit 1; }; };;
861bb6c1 24363 esac
ba479fd2
NN
24364done
24365
24366# If the user did not use the arguments to specify the items to instantiate,
24367# then the envvar interface is used. Set only those that are not.
24368# We use the long form for the default assignment because of an extremely
24369# bizarre bug on SunOS 4.1.3.
24370if $ac_need_defaults; then
24371 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24372 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24373 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24374fi
24375
24376# Have a temporary directory for convenience. Make it in the build tree
b61ff9c8 24377# simply because there is no reason to put it here, and in addition,
ba479fd2 24378# creating and moving files from /tmp can sometimes cause problems.
b61ff9c8 24379# Create a temporary directory, and hook for its removal unless debugging.
ba479fd2
NN
24380$debug ||
24381{
b61ff9c8 24382 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
ba479fd2
NN
24383 trap '{ (exit 1); exit 1; }' 1 2 13 15
24384}
b61ff9c8 24385
ba479fd2 24386# Create a (secure) tmp directory for tmp files.
6e3f3080 24387
ba479fd2 24388{
b61ff9c8 24389 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
ba479fd2
NN
24390 test -n "$tmp" && test -d "$tmp"
24391} ||
24392{
b61ff9c8
BS
24393 tmp=./confstat$$-$RANDOM
24394 (umask 077 && mkdir $tmp)
ba479fd2
NN
24395} ||
24396{
24397 echo "$me: cannot create a temporary directory in ." >&2
24398 { (exit 1); exit 1; }
24399}
24400
b61ff9c8
BS
24401_ACEOF
24402
24403cat >>$CONFIG_STATUS <<_ACEOF
24404
ba479fd2 24405#
b61ff9c8 24406# CONFIG_FILES section.
ba479fd2
NN
24407#
24408
24409# No need to generate the scripts if there are no CONFIG_FILES.
24410# This happens for instance when ./config.status config.h
b61ff9c8
BS
24411if test -n "\$CONFIG_FILES"; then
24412 # Protect against being on the right side of a sed subst in config.status.
24413 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24414 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24415s,@SHELL@,$SHELL,;t t
24416s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24417s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24418s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24419s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24420s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24421s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24422s,@exec_prefix@,$exec_prefix,;t t
24423s,@prefix@,$prefix,;t t
24424s,@program_transform_name@,$program_transform_name,;t t
24425s,@bindir@,$bindir,;t t
24426s,@sbindir@,$sbindir,;t t
24427s,@libexecdir@,$libexecdir,;t t
24428s,@datadir@,$datadir,;t t
24429s,@sysconfdir@,$sysconfdir,;t t
24430s,@sharedstatedir@,$sharedstatedir,;t t
24431s,@localstatedir@,$localstatedir,;t t
24432s,@libdir@,$libdir,;t t
24433s,@includedir@,$includedir,;t t
24434s,@oldincludedir@,$oldincludedir,;t t
24435s,@infodir@,$infodir,;t t
24436s,@mandir@,$mandir,;t t
24437s,@build_alias@,$build_alias,;t t
24438s,@host_alias@,$host_alias,;t t
24439s,@target_alias@,$target_alias,;t t
24440s,@DEFS@,$DEFS,;t t
24441s,@ECHO_C@,$ECHO_C,;t t
24442s,@ECHO_N@,$ECHO_N,;t t
24443s,@ECHO_T@,$ECHO_T,;t t
24444s,@LIBS@,$LIBS,;t t
24445s,@build@,$build,;t t
24446s,@build_cpu@,$build_cpu,;t t
24447s,@build_vendor@,$build_vendor,;t t
24448s,@build_os@,$build_os,;t t
24449s,@host@,$host,;t t
24450s,@host_cpu@,$host_cpu,;t t
24451s,@host_vendor@,$host_vendor,;t t
24452s,@host_os@,$host_os,;t t
24453s,@target@,$target,;t t
24454s,@target_cpu@,$target_cpu,;t t
24455s,@target_vendor@,$target_vendor,;t t
24456s,@target_os@,$target_os,;t t
24457s,@target_noncanonical@,$target_noncanonical,;t t
24458s,@build_libsubdir@,$build_libsubdir,;t t
24459s,@build_subdir@,$build_subdir,;t t
24460s,@host_subdir@,$host_subdir,;t t
24461s,@target_subdir@,$target_subdir,;t t
24462s,@GENINSRC@,$GENINSRC,;t t
24463s,@CC@,$CC,;t t
24464s,@CFLAGS@,$CFLAGS,;t t
24465s,@LDFLAGS@,$LDFLAGS,;t t
24466s,@CPPFLAGS@,$CPPFLAGS,;t t
24467s,@ac_ct_CC@,$ac_ct_CC,;t t
24468s,@EXEEXT@,$EXEEXT,;t t
24469s,@OBJEXT@,$OBJEXT,;t t
3d4e720a
ST
24470s,@GNATBIND@,$GNATBIND,;t t
24471s,@ac_ct_GNATBIND@,$ac_ct_GNATBIND,;t t
24472s,@GNATMAKE@,$GNATMAKE,;t t
24473s,@ac_ct_GNATMAKE@,$ac_ct_GNATMAKE,;t t
b61ff9c8
BS
24474s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
24475s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
24476s,@CPP@,$CPP,;t t
24477s,@EGREP@,$EGREP,;t t
24478s,@loose_warn@,$loose_warn,;t t
24479s,@cxx_compat_warn@,$cxx_compat_warn,;t t
24480s,@strict_warn@,$strict_warn,;t t
24481s,@warn_cflags@,$warn_cflags,;t t
24482s,@nocommon_flag@,$nocommon_flag,;t t
24483s,@TREEBROWSER@,$TREEBROWSER,;t t
24484s,@valgrind_path@,$valgrind_path,;t t
24485s,@valgrind_path_defines@,$valgrind_path_defines,;t t
24486s,@valgrind_command@,$valgrind_command,;t t
24487s,@coverage_flags@,$coverage_flags,;t t
24488s,@enable_multilib@,$enable_multilib,;t t
24489s,@enable_decimal_float@,$enable_decimal_float,;t t
24490s,@enable_fixed_point@,$enable_fixed_point,;t t
24491s,@enable_shared@,$enable_shared,;t t
24492s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
24493s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
24494s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
24495s,@onestep@,$onestep,;t t
24496s,@PKGVERSION@,$PKGVERSION,;t t
24497s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
24498s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
24499s,@datarootdir@,$datarootdir,;t t
24500s,@docdir@,$docdir,;t t
24501s,@htmldir@,$htmldir,;t t
24502s,@SET_MAKE@,$SET_MAKE,;t t
24503s,@AWK@,$AWK,;t t
24504s,@LN_S@,$LN_S,;t t
24505s,@LN@,$LN,;t t
24506s,@RANLIB@,$RANLIB,;t t
24507s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24508s,@ranlib_flags@,$ranlib_flags,;t t
24509s,@INSTALL@,$INSTALL,;t t
24510s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24511s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24512s,@make_compare_target@,$make_compare_target,;t t
24513s,@have_mktemp_command@,$have_mktemp_command,;t t
24514s,@MAKEINFO@,$MAKEINFO,;t t
24515s,@BUILD_INFO@,$BUILD_INFO,;t t
24516s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
24517s,@FLEX@,$FLEX,;t t
24518s,@BISON@,$BISON,;t t
24519s,@NM@,$NM,;t t
24520s,@AR@,$AR,;t t
24521s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
24522s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
24523s,@LDEXP_LIB@,$LDEXP_LIB,;t t
24524s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
24525s,@LIBICONV@,$LIBICONV,;t t
24526s,@LTLIBICONV@,$LTLIBICONV,;t t
24527s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
24528s,@manext@,$manext,;t t
24529s,@objext@,$objext,;t t
24530s,@gthread_flags@,$gthread_flags,;t t
24531s,@extra_modes_file@,$extra_modes_file,;t t
24532s,@extra_opt_files@,$extra_opt_files,;t t
24533s,@USE_NLS@,$USE_NLS,;t t
24534s,@LIBINTL@,$LIBINTL,;t t
24535s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
24536s,@INCINTL@,$INCINTL,;t t
24537s,@XGETTEXT@,$XGETTEXT,;t t
24538s,@GMSGFMT@,$GMSGFMT,;t t
24539s,@POSUB@,$POSUB,;t t
24540s,@CATALOGS@,$CATALOGS,;t t
24541s,@DATADIRNAME@,$DATADIRNAME,;t t
24542s,@INSTOBJEXT@,$INSTOBJEXT,;t t
24543s,@GENCAT@,$GENCAT,;t t
24544s,@CATOBJEXT@,$CATOBJEXT,;t t
24545s,@host_cc_for_libada@,$host_cc_for_libada,;t t
24546s,@CROSS@,$CROSS,;t t
24547s,@ALL@,$ALL,;t t
24548s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
24549s,@inhibit_libc@,$inhibit_libc,;t t
24550s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
24551s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
24552s,@STMP_FIXINC@,$STMP_FIXINC,;t t
24553s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
24554s,@collect2@,$collect2,;t t
da0f6381
PB
24555s,@LIBTOOL@,$LIBTOOL,;t t
24556s,@SED@,$SED,;t t
24557s,@FGREP@,$FGREP,;t t
24558s,@GREP@,$GREP,;t t
24559s,@LD@,$LD,;t t
24560s,@DUMPBIN@,$DUMPBIN,;t t
24561s,@ac_ct_DUMPBIN@,$ac_ct_DUMPBIN,;t t
24562s,@ac_ct_AR@,$ac_ct_AR,;t t
24563s,@STRIP@,$STRIP,;t t
24564s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
24565s,@lt_ECHO@,$lt_ECHO,;t t
24566s,@objdir@,$objdir,;t t
24567s,@enable_fast_install@,$enable_fast_install,;t t
b61ff9c8
BS
24568s,@gcc_cv_as@,$gcc_cv_as,;t t
24569s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
24570s,@gcc_cv_ld@,$gcc_cv_ld,;t t
24571s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
24572s,@gcc_cv_nm@,$gcc_cv_nm,;t t
24573s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
24574s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
24575s,@libgcc_visibility@,$libgcc_visibility,;t t
24576s,@GGC@,$GGC,;t t
24577s,@zlibdir@,$zlibdir,;t t
24578s,@zlibinc@,$zlibinc,;t t
24579s,@MAINT@,$MAINT,;t t
24580s,@gcc_tooldir@,$gcc_tooldir,;t t
24581s,@dollar@,$dollar,;t t
24582s,@slibdir@,$slibdir,;t t
b61ff9c8
BS
24583s,@subdirs@,$subdirs,;t t
24584s,@srcdir@,$srcdir,;t t
24585s,@all_compilers@,$all_compilers,;t t
24586s,@all_gtfiles@,$all_gtfiles,;t t
24587s,@all_lang_makefrags@,$all_lang_makefrags,;t t
24588s,@all_lang_makefiles@,$all_lang_makefiles,;t t
24589s,@all_languages@,$all_languages,;t t
24590s,@all_selected_languages@,$all_selected_languages,;t t
24591s,@build_exeext@,$build_exeext,;t t
24592s,@build_install_headers_dir@,$build_install_headers_dir,;t t
24593s,@build_xm_file_list@,$build_xm_file_list,;t t
24594s,@build_xm_include_list@,$build_xm_include_list,;t t
24595s,@build_xm_defines@,$build_xm_defines,;t t
a0e527e3 24596s,@build_file_translate@,$build_file_translate,;t t
b61ff9c8
BS
24597s,@check_languages@,$check_languages,;t t
24598s,@cpp_install_dir@,$cpp_install_dir,;t t
24599s,@xmake_file@,$xmake_file,;t t
24600s,@tmake_file@,$tmake_file,;t t
24601s,@extra_gcc_objs@,$extra_gcc_objs,;t t
24602s,@extra_headers_list@,$extra_headers_list,;t t
24603s,@extra_objs@,$extra_objs,;t t
24604s,@extra_parts@,$extra_parts,;t t
24605s,@extra_passes@,$extra_passes,;t t
24606s,@extra_programs@,$extra_programs,;t t
24607s,@float_h_file@,$float_h_file,;t t
24608s,@gcc_config_arguments@,$gcc_config_arguments,;t t
24609s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
24610s,@host_exeext@,$host_exeext,;t t
24611s,@host_xm_file_list@,$host_xm_file_list,;t t
24612s,@host_xm_include_list@,$host_xm_include_list,;t t
24613s,@host_xm_defines@,$host_xm_defines,;t t
24614s,@out_host_hook_obj@,$out_host_hook_obj,;t t
24615s,@install@,$install,;t t
24616s,@lang_opt_files@,$lang_opt_files,;t t
24617s,@lang_specs_files@,$lang_specs_files,;t t
24618s,@lang_tree_files@,$lang_tree_files,;t t
24619s,@local_prefix@,$local_prefix,;t t
24620s,@md_file@,$md_file,;t t
24621s,@objc_boehm_gc@,$objc_boehm_gc,;t t
24622s,@out_file@,$out_file,;t t
24623s,@out_object_file@,$out_object_file,;t t
24624s,@thread_file@,$thread_file,;t t
24625s,@tm_file_list@,$tm_file_list,;t t
24626s,@tm_include_list@,$tm_include_list,;t t
24627s,@tm_defines@,$tm_defines,;t t
24628s,@tm_p_file_list@,$tm_p_file_list,;t t
24629s,@tm_p_include_list@,$tm_p_include_list,;t t
24630s,@xm_file_list@,$xm_file_list,;t t
24631s,@xm_include_list@,$xm_include_list,;t t
24632s,@xm_defines@,$xm_defines,;t t
24633s,@c_target_objs@,$c_target_objs,;t t
24634s,@cxx_target_objs@,$cxx_target_objs,;t t
24635s,@target_cpu_default@,$target_cpu_default,;t t
24636s,@GMPLIBS@,$GMPLIBS,;t t
24637s,@GMPINC@,$GMPINC,;t t
24638s,@LIBOBJS@,$LIBOBJS,;t t
24639s,@LTLIBOBJS@,$LTLIBOBJS,;t t
24640/@language_hooks@/r $language_hooks
24641s,@language_hooks@,,;t t
24642CEOF
24643
24644_ACEOF
24645
24646 cat >>$CONFIG_STATUS <<\_ACEOF
24647 # Split the substitutions into bite-sized pieces for seds with
24648 # small command number limits, like on Digital OSF/1 and HP-UX.
24649 ac_max_sed_lines=48
24650 ac_sed_frag=1 # Number of current file.
24651 ac_beg=1 # First line for current file.
24652 ac_end=$ac_max_sed_lines # Line after last line for current file.
24653 ac_more_lines=:
24654 ac_sed_cmds=
24655 while $ac_more_lines; do
24656 if test $ac_beg -gt 1; then
24657 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24658 else
24659 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24660 fi
24661 if test ! -s $tmp/subs.frag; then
24662 ac_more_lines=false
24663 else
24664 # The purpose of the label and of the branching condition is to
24665 # speed up the sed processing (if there are no `@' at all, there
24666 # is no need to browse any of the substitutions).
24667 # These are the two extra sed commands mentioned above.
24668 (echo ':t
24669 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24670 if test -z "$ac_sed_cmds"; then
24671 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24672 else
24673 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24674 fi
24675 ac_sed_frag=`expr $ac_sed_frag + 1`
24676 ac_beg=$ac_end
24677 ac_end=`expr $ac_end + $ac_max_sed_lines`
24678 fi
24679 done
24680 if test -z "$ac_sed_cmds"; then
24681 ac_sed_cmds=cat
1a4b763e 24682 fi
b61ff9c8 24683fi # test -n "$CONFIG_FILES"
1a4b763e 24684
1a4b763e 24685_ACEOF
ba479fd2 24686cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8
BS
24687for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24688 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24689 case $ac_file in
24690 - | *:- | *:-:* ) # input from stdin
24691 cat >$tmp/stdin
24692 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24693 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24694 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24695 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24696 * ) ac_file_in=$ac_file.in ;;
703d89ab
ZW
24697 esac
24698
b61ff9c8
BS
24699 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24700 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
ba479fd2 24701$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
24702 X"$ac_file" : 'X\(//\)[^/]' \| \
24703 X"$ac_file" : 'X\(//\)$' \| \
b61ff9c8
BS
24704 X"$ac_file" : 'X\(/\)' \| \
24705 . : '\(.\)' 2>/dev/null ||
ba479fd2 24706echo X"$ac_file" |
b61ff9c8
BS
24707 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24708 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24709 /^X\(\/\/\)$/{ s//\1/; q; }
24710 /^X\(\/\).*/{ s//\1/; q; }
24711 s/.*/./; q'`
24712 { if $as_mkdir_p; then
24713 mkdir -p "$ac_dir"
24714 else
24715 as_dir="$ac_dir"
ba479fd2 24716 as_dirs=
b61ff9c8
BS
24717 while test ! -d "$as_dir"; do
24718 as_dirs="$as_dir $as_dirs"
24719 as_dir=`(dirname "$as_dir") 2>/dev/null ||
ba479fd2 24720$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
24721 X"$as_dir" : 'X\(//\)[^/]' \| \
24722 X"$as_dir" : 'X\(//\)$' \| \
b61ff9c8
BS
24723 X"$as_dir" : 'X\(/\)' \| \
24724 . : '\(.\)' 2>/dev/null ||
ba479fd2 24725echo X"$as_dir" |
b61ff9c8
BS
24726 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24727 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24728 /^X\(\/\/\)$/{ s//\1/; q; }
24729 /^X\(\/\).*/{ s//\1/; q; }
24730 s/.*/./; q'`
ba479fd2 24731 done
b61ff9c8
BS
24732 test ! -n "$as_dirs" || mkdir $as_dirs
24733 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24734echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
ba479fd2 24735 { (exit 1); exit 1; }; }; }
b61ff9c8 24736
ba479fd2
NN
24737 ac_builddir=.
24738
b61ff9c8 24739if test "$ac_dir" != .; then
ba479fd2 24740 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b61ff9c8
BS
24741 # A "../" for each directory in $ac_dir_suffix.
24742 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24743else
24744 ac_dir_suffix= ac_top_builddir=
24745fi
ba479fd2
NN
24746
24747case $srcdir in
b61ff9c8 24748 .) # No --srcdir option. We are building in place.
ba479fd2 24749 ac_srcdir=.
b61ff9c8
BS
24750 if test -z "$ac_top_builddir"; then
24751 ac_top_srcdir=.
24752 else
24753 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24754 fi ;;
24755 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 24756 ac_srcdir=$srcdir$ac_dir_suffix;
b61ff9c8
BS
24757 ac_top_srcdir=$srcdir ;;
24758 *) # Relative path.
24759 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24760 ac_top_srcdir=$ac_top_builddir$srcdir ;;
ba479fd2 24761esac
ba479fd2 24762
b61ff9c8
BS
24763# Do not use `cd foo && pwd` to compute absolute paths, because
24764# the directories may not exist.
24765case `pwd` in
24766.) ac_abs_builddir="$ac_dir";;
24767*)
24768 case "$ac_dir" in
24769 .) ac_abs_builddir=`pwd`;;
24770 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24771 *) ac_abs_builddir=`pwd`/"$ac_dir";;
24772 esac;;
24773esac
24774case $ac_abs_builddir in
24775.) ac_abs_top_builddir=${ac_top_builddir}.;;
24776*)
24777 case ${ac_top_builddir}. in
24778 .) ac_abs_top_builddir=$ac_abs_builddir;;
24779 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24780 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24781 esac;;
24782esac
24783case $ac_abs_builddir in
24784.) ac_abs_srcdir=$ac_srcdir;;
24785*)
24786 case $ac_srcdir in
24787 .) ac_abs_srcdir=$ac_abs_builddir;;
24788 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24789 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24790 esac;;
24791esac
24792case $ac_abs_builddir in
24793.) ac_abs_top_srcdir=$ac_top_srcdir;;
24794*)
24795 case $ac_top_srcdir in
24796 .) ac_abs_top_srcdir=$ac_abs_builddir;;
24797 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24798 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24799 esac;;
24800esac
703d89ab 24801
ab22c1fa 24802
1a4b763e 24803
b61ff9c8
BS
24804 if test x"$ac_file" != x-; then
24805 { echo "$as_me:$LINENO: creating $ac_file" >&5
24806echo "$as_me: creating $ac_file" >&6;}
24807 rm -f "$ac_file"
24808 fi
24809 # Let's still pretend it is `configure' which instantiates (i.e., don't
24810 # use $as_me), people would be surprised to read:
24811 # /* config.h. Generated by config.status. */
24812 if test x"$ac_file" = x-; then
24813 configure_input=
24814 else
24815 configure_input="$ac_file. "
24816 fi
24817 configure_input=$configure_input"Generated from `echo $ac_file_in |
24818 sed 's,.*/,,'` by configure."
24819
24820 # First look for the input files in the build tree, otherwise in the
24821 # src tree.
24822 ac_file_inputs=`IFS=:
24823 for f in $ac_file_in; do
24824 case $f in
24825 -) echo $tmp/stdin ;;
24826 [\\/$]*)
24827 # Absolute (can't be DOS-style, as IFS=:)
24828 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24829echo "$as_me: error: cannot find input file: $f" >&2;}
24830 { (exit 1); exit 1; }; }
24831 echo "$f";;
24832 *) # Relative
24833 if test -f "$f"; then
24834 # Build tree
24835 echo "$f"
24836 elif test -f "$srcdir/$f"; then
24837 # Source tree
24838 echo "$srcdir/$f"
24839 else
24840 # /dev/null tree
24841 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24842echo "$as_me: error: cannot find input file: $f" >&2;}
24843 { (exit 1); exit 1; }; }
24844 fi;;
24845 esac
24846 done` || { (exit 1); exit 1; }
a6ccdbab 24847_ACEOF
ba479fd2
NN
24848cat >>$CONFIG_STATUS <<_ACEOF
24849 sed "$ac_vpsub
24850$extrasub
24851_ACEOF
24852cat >>$CONFIG_STATUS <<\_ACEOF
24853:t
24854/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b61ff9c8
BS
24855s,@configure_input@,$configure_input,;t t
24856s,@srcdir@,$ac_srcdir,;t t
24857s,@abs_srcdir@,$ac_abs_srcdir,;t t
24858s,@top_srcdir@,$ac_top_srcdir,;t t
24859s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
24860s,@builddir@,$ac_builddir,;t t
24861s,@abs_builddir@,$ac_abs_builddir,;t t
24862s,@top_builddir@,$ac_top_builddir,;t t
24863s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
24864" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24865 rm -f $tmp/stdin
24866 if test x"$ac_file" != x-; then
24867 mv $tmp/out $ac_file
24868 else
24869 cat $tmp/out
24870 rm -f $tmp/out
24871 fi
24872
24873 # Run the commands associated with the file.
be0fe523 24874 case $ac_file in
b61ff9c8
BS
24875 as ) chmod +x as ;;
24876 collect-ld ) chmod +x collect-ld ;;
24877 nm ) chmod +x nm ;;
be0fe523 24878 esac
b61ff9c8
BS
24879done
24880_ACEOF
24881cat >>$CONFIG_STATUS <<\_ACEOF
24882
24883#
24884# CONFIG_HEADER section.
24885#
24886
24887# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24888# NAME is the cpp macro being defined and VALUE is the value it is being given.
24889#
24890# ac_d sets the value in "#define NAME VALUE" lines.
24891ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
24892ac_dB='[ ].*$,\1#\2'
a3bba767 24893ac_dC=' '
b61ff9c8
BS
24894ac_dD=',;t'
24895# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24896ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
24897ac_uB='$,\1#\2define\3'
24898ac_uC=' '
24899ac_uD=',;t'
24900
24901for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24902 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24903 case $ac_file in
24904 - | *:- | *:-:* ) # input from stdin
24905 cat >$tmp/stdin
24906 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24907 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24908 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24909 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24910 * ) ac_file_in=$ac_file.in ;;
24911 esac
24912
24913 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
24914echo "$as_me: creating $ac_file" >&6;}
24915
24916 # First look for the input files in the build tree, otherwise in the
24917 # src tree.
24918 ac_file_inputs=`IFS=:
24919 for f in $ac_file_in; do
24920 case $f in
24921 -) echo $tmp/stdin ;;
24922 [\\/$]*)
24923 # Absolute (can't be DOS-style, as IFS=:)
24924 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24925echo "$as_me: error: cannot find input file: $f" >&2;}
24926 { (exit 1); exit 1; }; }
24927 # Do quote $f, to prevent DOS paths from being IFS'd.
24928 echo "$f";;
24929 *) # Relative
24930 if test -f "$f"; then
24931 # Build tree
24932 echo "$f"
24933 elif test -f "$srcdir/$f"; then
24934 # Source tree
24935 echo "$srcdir/$f"
24936 else
24937 # /dev/null tree
24938 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24939echo "$as_me: error: cannot find input file: $f" >&2;}
24940 { (exit 1); exit 1; }; }
24941 fi;;
24942 esac
24943 done` || { (exit 1); exit 1; }
24944 # Remove the trailing spaces.
24945 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
24946
24947_ACEOF
24948
24949# Transform confdefs.h into two sed scripts, `conftest.defines' and
24950# `conftest.undefs', that substitutes the proper values into
24951# config.h.in to produce config.h. The first handles `#define'
24952# templates, and the second `#undef' templates.
24953# And first: Protect against being on the right side of a sed subst in
24954# config.status. Protect against being in an unquoted here document
24955# in config.status.
24956rm -f conftest.defines conftest.undefs
24957# Using a here document instead of a string reduces the quoting nightmare.
24958# Putting comments in sed scripts is not portable.
24959#
24960# `end' is used to avoid that the second main sed command (meant for
24961# 0-ary CPP macros) applies to n-ary macro definitions.
24962# See the Autoconf documentation for `clear'.
24963cat >confdef2sed.sed <<\_ACEOF
24964s/[\\&,]/\\&/g
24965s,[\\$`],\\&,g
24966t clear
24967: clear
24968s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
24969t end
24970s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
24971: end
24972_ACEOF
24973# If some macros were called several times there might be several times
24974# the same #defines, which is useless. Nevertheless, we may not want to
24975# sort them, since we want the *last* AC-DEFINE to be honored.
24976uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
24977sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
24978rm -f confdef2sed.sed
24979
24980# This sed command replaces #undef with comments. This is necessary, for
861bb6c1
JL
24981# example, in the case of _POSIX_SOURCE, which is predefined and required
24982# on some systems where configure will not decide to define it.
b61ff9c8
BS
24983cat >>conftest.undefs <<\_ACEOF
24984s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
24985_ACEOF
24986
24987# Break up conftest.defines because some shells have a limit on the size
24988# of here documents, and old seds have small limits too (100 cmds).
24989echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
24990echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
24991echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
24992echo ' :' >>$CONFIG_STATUS
24993rm -f conftest.tail
24994while grep . conftest.defines >/dev/null
ba479fd2 24995do
b61ff9c8
BS
24996 # Write a limited-size here document to $tmp/defines.sed.
24997 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
24998 # Speed up: don't consider the non `#define' lines.
24999 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
25000 # Work around the forget-to-reset-the-flag bug.
25001 echo 't clr' >>$CONFIG_STATUS
25002 echo ': clr' >>$CONFIG_STATUS
25003 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
ba479fd2 25004 echo 'CEOF
b61ff9c8
BS
25005 sed -f $tmp/defines.sed $tmp/in >$tmp/out
25006 rm -f $tmp/in
25007 mv $tmp/out $tmp/in
25008' >>$CONFIG_STATUS
25009 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
ba479fd2
NN
25010 rm -f conftest.defines
25011 mv conftest.tail conftest.defines
25012done
b61ff9c8
BS
25013rm -f conftest.defines
25014echo ' fi # grep' >>$CONFIG_STATUS
25015echo >>$CONFIG_STATUS
25016
25017# Break up conftest.undefs because some shells have a limit on the size
25018# of here documents, and old seds have small limits too (100 cmds).
25019echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
25020rm -f conftest.tail
25021while grep . conftest.undefs >/dev/null
25022do
25023 # Write a limited-size here document to $tmp/undefs.sed.
25024 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
25025 # Speed up: don't consider the non `#undef'
25026 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
25027 # Work around the forget-to-reset-the-flag bug.
25028 echo 't clr' >>$CONFIG_STATUS
25029 echo ': clr' >>$CONFIG_STATUS
25030 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
25031 echo 'CEOF
25032 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
25033 rm -f $tmp/in
25034 mv $tmp/out $tmp/in
25035' >>$CONFIG_STATUS
25036 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
25037 rm -f conftest.undefs
25038 mv conftest.tail conftest.undefs
25039done
25040rm -f conftest.undefs
ba479fd2
NN
25041
25042cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8
BS
25043 # Let's still pretend it is `configure' which instantiates (i.e., don't
25044 # use $as_me), people would be surprised to read:
25045 # /* config.h. Generated by config.status. */
25046 if test x"$ac_file" = x-; then
25047 echo "/* Generated by configure. */" >$tmp/config.h
25048 else
25049 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
25050 fi
25051 cat $tmp/in >>$tmp/config.h
25052 rm -f $tmp/in
ba479fd2 25053 if test x"$ac_file" != x-; then
b61ff9c8 25054 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
ba479fd2
NN
25055 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25056echo "$as_me: $ac_file is unchanged" >&6;}
25057 else
b61ff9c8
BS
25058 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
25059$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25060 X"$ac_file" : 'X\(//\)[^/]' \| \
25061 X"$ac_file" : 'X\(//\)$' \| \
25062 X"$ac_file" : 'X\(/\)' \| \
25063 . : '\(.\)' 2>/dev/null ||
25064echo X"$ac_file" |
25065 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25066 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25067 /^X\(\/\/\)$/{ s//\1/; q; }
25068 /^X\(\/\).*/{ s//\1/; q; }
25069 s/.*/./; q'`
25070 { if $as_mkdir_p; then
25071 mkdir -p "$ac_dir"
25072 else
25073 as_dir="$ac_dir"
25074 as_dirs=
25075 while test ! -d "$as_dir"; do
25076 as_dirs="$as_dir $as_dirs"
25077 as_dir=`(dirname "$as_dir") 2>/dev/null ||
25078$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25079 X"$as_dir" : 'X\(//\)[^/]' \| \
25080 X"$as_dir" : 'X\(//\)$' \| \
25081 X"$as_dir" : 'X\(/\)' \| \
25082 . : '\(.\)' 2>/dev/null ||
25083echo X"$as_dir" |
25084 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25085 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25086 /^X\(\/\/\)$/{ s//\1/; q; }
25087 /^X\(\/\).*/{ s//\1/; q; }
25088 s/.*/./; q'`
25089 done
25090 test ! -n "$as_dirs" || mkdir $as_dirs
25091 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
25092echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
25093 { (exit 1); exit 1; }; }; }
25094
ba479fd2 25095 rm -f $ac_file
b61ff9c8 25096 mv $tmp/config.h $ac_file
ba479fd2
NN
25097 fi
25098 else
b61ff9c8
BS
25099 cat $tmp/config.h
25100 rm -f $tmp/config.h
ba479fd2 25101 fi
b61ff9c8
BS
25102done
25103_ACEOF
25104cat >>$CONFIG_STATUS <<\_ACEOF
2f41c1d6 25105
b61ff9c8
BS
25106#
25107# CONFIG_COMMANDS section.
25108#
25109for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
25110 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
25111 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
25112 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
25113$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25114 X"$ac_dest" : 'X\(//\)[^/]' \| \
25115 X"$ac_dest" : 'X\(//\)$' \| \
25116 X"$ac_dest" : 'X\(/\)' \| \
25117 . : '\(.\)' 2>/dev/null ||
25118echo X"$ac_dest" |
25119 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25120 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25121 /^X\(\/\/\)$/{ s//\1/; q; }
25122 /^X\(\/\).*/{ s//\1/; q; }
25123 s/.*/./; q'`
25124 { if $as_mkdir_p; then
25125 mkdir -p "$ac_dir"
25126 else
25127 as_dir="$ac_dir"
25128 as_dirs=
25129 while test ! -d "$as_dir"; do
25130 as_dirs="$as_dir $as_dirs"
25131 as_dir=`(dirname "$as_dir") 2>/dev/null ||
25132$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25133 X"$as_dir" : 'X\(//\)[^/]' \| \
25134 X"$as_dir" : 'X\(//\)$' \| \
25135 X"$as_dir" : 'X\(/\)' \| \
25136 . : '\(.\)' 2>/dev/null ||
25137echo X"$as_dir" |
25138 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25139 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25140 /^X\(\/\/\)$/{ s//\1/; q; }
25141 /^X\(\/\).*/{ s//\1/; q; }
25142 s/.*/./; q'`
25143 done
25144 test ! -n "$as_dirs" || mkdir $as_dirs
25145 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
25146echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
25147 { (exit 1); exit 1; }; }; }
2f41c1d6 25148
b61ff9c8 25149 ac_builddir=.
2f41c1d6 25150
b61ff9c8
BS
25151if test "$ac_dir" != .; then
25152 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
25153 # A "../" for each directory in $ac_dir_suffix.
25154 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
25155else
25156 ac_dir_suffix= ac_top_builddir=
25157fi
25158
25159case $srcdir in
25160 .) # No --srcdir option. We are building in place.
25161 ac_srcdir=.
25162 if test -z "$ac_top_builddir"; then
25163 ac_top_srcdir=.
25164 else
25165 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
25166 fi ;;
25167 [\\/]* | ?:[\\/]* ) # Absolute path.
25168 ac_srcdir=$srcdir$ac_dir_suffix;
25169 ac_top_srcdir=$srcdir ;;
25170 *) # Relative path.
25171 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
25172 ac_top_srcdir=$ac_top_builddir$srcdir ;;
25173esac
25174
25175# Do not use `cd foo && pwd` to compute absolute paths, because
25176# the directories may not exist.
25177case `pwd` in
25178.) ac_abs_builddir="$ac_dir";;
25179*)
25180 case "$ac_dir" in
25181 .) ac_abs_builddir=`pwd`;;
25182 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
25183 *) ac_abs_builddir=`pwd`/"$ac_dir";;
25184 esac;;
25185esac
25186case $ac_abs_builddir in
25187.) ac_abs_top_builddir=${ac_top_builddir}.;;
25188*)
25189 case ${ac_top_builddir}. in
25190 .) ac_abs_top_builddir=$ac_abs_builddir;;
25191 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
25192 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
25193 esac;;
25194esac
25195case $ac_abs_builddir in
25196.) ac_abs_srcdir=$ac_srcdir;;
25197*)
25198 case $ac_srcdir in
25199 .) ac_abs_srcdir=$ac_abs_builddir;;
25200 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
25201 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
25202 esac;;
25203esac
25204case $ac_abs_builddir in
25205.) ac_abs_top_srcdir=$ac_top_srcdir;;
25206*)
25207 case $ac_top_srcdir in
25208 .) ac_abs_top_srcdir=$ac_abs_builddir;;
25209 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
25210 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
25211 esac;;
25212esac
25213
25214
25215 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
25216echo "$as_me: executing $ac_dest commands" >&6;}
25217 case $ac_dest in
25218 default )
f1faaabd
NN
25219case ${CONFIG_HEADERS} in
25220 *auto-host.h:config.in*)
25221 echo > cstamp-h ;;
861bb6c1 25222esac
2ed26f6b 25223# Make sure all the subdirs exist.
3b620440 25224for d in $subdirs doc build
2ed26f6b 25225do
2ed26f6b 25226 test -d $d || mkdir $d
2ed26f6b 25227done
ba479fd2
NN
25228 ;;
25229 esac
b61ff9c8
BS
25230done
25231_ACEOF
cafe096b 25232
b61ff9c8 25233cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
25234
25235{ (exit 0); exit 0; }
25236_ACEOF
861bb6c1 25237chmod +x $CONFIG_STATUS
ba479fd2
NN
25238ac_clean_files=$ac_clean_files_save
25239
25240
25241# configure is writing to config.log, and then calls config.status.
25242# config.status does its own redirection, appending to config.log.
25243# Unfortunately, on DOS this fails, as config.log is still kept open
25244# by configure, so config.status won't be able to write to it; its
25245# output is simply discarded. So we exec the FD to /dev/null,
25246# effectively closing config.log, so it can be properly (re)opened and
25247# appended to by config.status. When coming back to configure, we
25248# need to make the FD available again.
25249if test "$no_create" != yes; then
25250 ac_cs_success=:
25251 ac_config_status_args=
25252 test "$silent" = yes &&
25253 ac_config_status_args="$ac_config_status_args --quiet"
25254 exec 5>/dev/null
25255 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
25256 exec 5>>config.log
25257 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25258 # would make configure fail if this is the last instruction.
25259 $ac_cs_success || { (exit 1); exit 1; }
25260fi
861bb6c1 25261