]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
re PR c++/35320 (ICE with invalid friend declaration)
[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
f8c33439 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 BUILD_LDFLAGS 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 fortran_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
f8c33439 871 if test ! -r $srcdir/$ac_unique_file; then
861bb6c1
JL
872 srcdir=..
873 fi
874else
875 ac_srcdir_defaulted=no
876fi
f8c33439 877if test ! -r $srcdir/$ac_unique_file; then
b61ff9c8
BS
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
f8c33439 886(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
b61ff9c8 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
922e3e33 1049 --enable-cld enable -mcld by default for 32bit x86
ba479fd2
NN
1050 --disable-win32-registry
1051 disable lookup of installation paths in the
1052 Registry on Windows hosts
1053 --enable-win32-registry enable registry lookup (default)
1054 --enable-win32-registry=KEY
1055 use KEY instead of GCC version as the last portion
1056 of the registry key
da0f6381
PB
1057 --enable-shared[=PKGS]
1058 build shared libraries [default=yes]
1059 --enable-static[=PKGS]
1060 build static libraries [default=yes]
1061 --enable-fast-install[=PKGS]
1062 optimize for fast installation [default=yes]
1063 --disable-libtool-lock avoid locking (might break parallel builds)
ba479fd2
NN
1064 --enable-maintainer-mode
1065 enable make rules and dependencies not useful
1066 (and sometimes confusing) to the casual installer
1067 --enable-version-specific-runtime-libs
1068 specify that runtime libraries should be
1069 installed in a compiler-specific directory
093e61a6 1070
ba479fd2
NN
1071Optional Packages:
1072 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1073 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1546bb64 1074 --with-build-libsubdir=DIR Directory where to find libraries for build system
ba479fd2
NN
1075 --with-local-prefix=DIR specifies directory to put local include
1076 --with-gxx-include-dir=DIR
1077 specifies directory to put g++ header files
1078 --with-cpp-install-dir=DIR
1079 install the user visible C preprocessor in DIR
1080 (relative to PREFIX) as well as PREFIX/bin
1081 --with-gnu-ld arrange to work with GNU ld.
1082 --with-ld arrange to use the specified ld (full pathname)
d594623a 1083 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
1084 --with-gnu-as arrange to work with GNU as
1085 --with-as arrange to use the specified as (full pathname)
1086 --with-stabs arrange to use stabs instead of host debug format
1087 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
1088 --with-build-sysroot=sysroot
1089 use sysroot as the system root during the build
ba479fd2 1090 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
2f41c1d6
PB
1091 --with-pkgversion=PKG Use PKG in the version string in place of "GCC"
1092 --with-bugurl=URL Direct users to URL to report a bug
dfb77e37
KC
1093 --with-gnu-ld assume the C compiler uses GNU ld default=no
1094 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1095 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 1096 --with-system-libunwind use installed libunwind
da0f6381
PB
1097 --with-pic try to use only PIC/non-PIC objects [default=use
1098 both]
1099 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
ed965309 1100 --with-long-double-128 Use 128-bit long double by default.
59415997 1101 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
1102 with the compiler
1103 --with-system-zlib use installed libz
22482f74
MS
1104 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
1105 --with-datarootdir=DIR Use DIR as the data root [PREFIX/share]
1106 --with-docdir=DIR Install documentation in DIR [DATAROOTDIR]
1107 --with-htmldir=DIR html documentation in in DIR [DOCDIR]
13c22933 1108
ba479fd2
NN
1109Some influential environment variables:
1110 CC C compiler command
1111 CFLAGS C compiler flags
1112 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1113 nonstandard directory <lib dir>
b61ff9c8
BS
1114 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
1115 headers in a nonstandard directory <include dir>
ba479fd2 1116 CPP C preprocessor
6de9cd9a
DN
1117 GMPLIBS How to link GMP
1118 GMPINC How to find GMP include files
13c22933 1119
ba479fd2
NN
1120Use these variables to override the choices made by `configure' or to help
1121it to find libraries and programs with nonstandard names/locations.
73458fb7 1122
ba479fd2
NN
1123_ACEOF
1124fi
6e3f3080 1125
ba479fd2
NN
1126if test "$ac_init_help" = "recursive"; then
1127 # If there are subdirs, report their specific --help.
b61ff9c8 1128 ac_popdir=`pwd`
ba479fd2 1129 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
b61ff9c8 1130 test -d $ac_dir || continue
ba479fd2
NN
1131 ac_builddir=.
1132
b61ff9c8 1133if test "$ac_dir" != .; then
ba479fd2 1134 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b61ff9c8
BS
1135 # A "../" for each directory in $ac_dir_suffix.
1136 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1137else
1138 ac_dir_suffix= ac_top_builddir=
1139fi
ba479fd2
NN
1140
1141case $srcdir in
b61ff9c8 1142 .) # No --srcdir option. We are building in place.
ba479fd2 1143 ac_srcdir=.
b61ff9c8
BS
1144 if test -z "$ac_top_builddir"; then
1145 ac_top_srcdir=.
1146 else
1147 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1148 fi ;;
1149 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 1150 ac_srcdir=$srcdir$ac_dir_suffix;
b61ff9c8
BS
1151 ac_top_srcdir=$srcdir ;;
1152 *) # Relative path.
1153 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1154 ac_top_srcdir=$ac_top_builddir$srcdir ;;
1155esac
1156
1157# Do not use `cd foo && pwd` to compute absolute paths, because
1158# the directories may not exist.
1159case `pwd` in
1160.) ac_abs_builddir="$ac_dir";;
1161*)
1162 case "$ac_dir" in
1163 .) ac_abs_builddir=`pwd`;;
1164 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1165 *) ac_abs_builddir=`pwd`/"$ac_dir";;
1166 esac;;
1167esac
1168case $ac_abs_builddir in
1169.) ac_abs_top_builddir=${ac_top_builddir}.;;
1170*)
1171 case ${ac_top_builddir}. in
1172 .) ac_abs_top_builddir=$ac_abs_builddir;;
1173 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1174 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1175 esac;;
1176esac
1177case $ac_abs_builddir in
1178.) ac_abs_srcdir=$ac_srcdir;;
1179*)
1180 case $ac_srcdir in
1181 .) ac_abs_srcdir=$ac_abs_builddir;;
1182 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1183 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1184 esac;;
1185esac
1186case $ac_abs_builddir in
1187.) ac_abs_top_srcdir=$ac_top_srcdir;;
1188*)
1189 case $ac_top_srcdir in
1190 .) ac_abs_top_srcdir=$ac_abs_builddir;;
1191 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1192 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1193 esac;;
86da66b5 1194esac
b61ff9c8
BS
1195
1196 cd $ac_dir
1197 # Check for guested configure; otherwise get Cygnus style configure.
1198 if test -f $ac_srcdir/configure.gnu; then
1199 echo
1200 $SHELL $ac_srcdir/configure.gnu --help=recursive
1201 elif test -f $ac_srcdir/configure; then
1202 echo
1203 $SHELL $ac_srcdir/configure --help=recursive
1204 elif test -f $ac_srcdir/configure.ac ||
1205 test -f $ac_srcdir/configure.in; then
1206 echo
1207 $ac_configure --help
ba479fd2
NN
1208 else
1209 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
b61ff9c8
BS
1210 fi
1211 cd $ac_popdir
ba479fd2
NN
1212 done
1213fi
1214
b61ff9c8 1215test -n "$ac_init_help" && exit 0
ba479fd2
NN
1216if $ac_init_version; then
1217 cat <<\_ACEOF
1218
b61ff9c8 1219Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1220This configure script is free software; the Free Software Foundation
1221gives unlimited permission to copy, distribute and modify it.
1222_ACEOF
b61ff9c8 1223 exit 0
ba479fd2 1224fi
b61ff9c8
BS
1225exec 5>config.log
1226cat >&5 <<_ACEOF
ba479fd2
NN
1227This file contains any messages produced by compilers while
1228running configure, to aid debugging if configure makes a mistake.
1229
1230It was created by $as_me, which was
b61ff9c8 1231generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1232
1233 $ $0 $@
1234
1235_ACEOF
1236{
1237cat <<_ASUNAME
1238## --------- ##
1239## Platform. ##
1240## --------- ##
1241
1242hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1243uname -m = `(uname -m) 2>/dev/null || echo unknown`
1244uname -r = `(uname -r) 2>/dev/null || echo unknown`
1245uname -s = `(uname -s) 2>/dev/null || echo unknown`
1246uname -v = `(uname -v) 2>/dev/null || echo unknown`
1247
1248/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1249/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1250
1251/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1252/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1253/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
b61ff9c8 1254hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
ba479fd2
NN
1255/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1256/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1257/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1258
1259_ASUNAME
1260
1261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1262for as_dir in $PATH
1263do
1264 IFS=$as_save_IFS
1265 test -z "$as_dir" && as_dir=.
1266 echo "PATH: $as_dir"
1267done
1268
1269} >&5
1270
1271cat >&5 <<_ACEOF
1272
1273
1274## ----------- ##
1275## Core tests. ##
1276## ----------- ##
1277
1278_ACEOF
1279
1280
1281# Keep a trace of the command line.
1282# Strip out --no-create and --no-recursion so they do not pile up.
1283# Strip out --silent because we don't want to record it for future runs.
1284# Also quote any args containing shell meta-characters.
1285# Make two passes to allow for proper duplicate-argument suppression.
1286ac_configure_args=
1287ac_configure_args0=
1288ac_configure_args1=
b61ff9c8 1289ac_sep=
ba479fd2
NN
1290ac_must_keep_next=false
1291for ac_pass in 1 2
1292do
1293 for ac_arg
1294 do
1295 case $ac_arg in
1296 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1297 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1298 | -silent | --silent | --silen | --sile | --sil)
1299 continue ;;
b61ff9c8 1300 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ba479fd2
NN
1301 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1302 esac
1303 case $ac_pass in
1304 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1305 2)
1306 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1307 if test $ac_must_keep_next = true; then
86da66b5 1308 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1309 else
86da66b5
HPN
1310 case $ac_arg in
1311 *=* | --config-cache | -C | -disable-* | --disable-* \
1312 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1313 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1314 | -with-* | --with-* | -without-* | --without-* | --x)
1315 case "$ac_configure_args0 " in
1316 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1317 esac
1318 ;;
1319 -* ) ac_must_keep_next=true ;;
1320 esac
ba479fd2 1321 fi
b61ff9c8
BS
1322 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1323 # Get rid of the leading space.
1324 ac_sep=" "
ba479fd2
NN
1325 ;;
1326 esac
1327 done
1328done
1329$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1330$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1331
1332# When interrupted or exit'd, cleanup temporary files, and complete
1333# config.log. We remove comments because anyway the quotes in there
1334# would cause problems or look ugly.
b61ff9c8
BS
1335# WARNING: Be sure not to use single quotes in there, as some shells,
1336# such as our DU 5.0 friend, will then `close' the trap.
ba479fd2
NN
1337trap 'exit_status=$?
1338 # Save into config.log some information that might help in debugging.
1339 {
1340 echo
1341
1342 cat <<\_ASBOX
1343## ---------------- ##
1344## Cache variables. ##
1345## ---------------- ##
1346_ASBOX
1347 echo
1348 # The following way of writing the cache mishandles newlines in values,
b61ff9c8 1349{
ba479fd2 1350 (set) 2>&1 |
b61ff9c8
BS
1351 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1352 *ac_space=\ *)
ba479fd2 1353 sed -n \
b61ff9c8
BS
1354 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1355 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1356 ;;
ba479fd2 1357 *)
b61ff9c8
BS
1358 sed -n \
1359 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 1360 ;;
b61ff9c8
BS
1361 esac;
1362}
ba479fd2
NN
1363 echo
1364
1365 cat <<\_ASBOX
1366## ----------------- ##
1367## Output variables. ##
1368## ----------------- ##
1369_ASBOX
1370 echo
1371 for ac_var in $ac_subst_vars
1372 do
b61ff9c8
BS
1373 eval ac_val=$`echo $ac_var`
1374 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1375 done | sort
1376 echo
1377
1378 if test -n "$ac_subst_files"; then
1379 cat <<\_ASBOX
b61ff9c8
BS
1380## ------------- ##
1381## Output files. ##
1382## ------------- ##
ba479fd2
NN
1383_ASBOX
1384 echo
1385 for ac_var in $ac_subst_files
1386 do
b61ff9c8
BS
1387 eval ac_val=$`echo $ac_var`
1388 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1389 done | sort
1390 echo
1391 fi
1392
1393 if test -s confdefs.h; then
1394 cat <<\_ASBOX
1395## ----------- ##
1396## confdefs.h. ##
1397## ----------- ##
1398_ASBOX
1399 echo
b61ff9c8 1400 sed "/^$/d" confdefs.h | sort
ba479fd2
NN
1401 echo
1402 fi
1403 test "$ac_signal" != 0 &&
1404 echo "$as_me: caught signal $ac_signal"
1405 echo "$as_me: exit $exit_status"
1406 } >&5
b61ff9c8
BS
1407 rm -f core *.core &&
1408 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
ba479fd2 1409 exit $exit_status
b61ff9c8 1410 ' 0
ba479fd2
NN
1411for ac_signal in 1 2 13 15; do
1412 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1413done
1414ac_signal=0
1415
1416# confdefs.h avoids OS command line length limits that DEFS can exceed.
b61ff9c8
BS
1417rm -rf conftest* confdefs.h
1418# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1419echo >confdefs.h
ba479fd2
NN
1420
1421# Predefined preprocessor variables.
1422
1423cat >>confdefs.h <<_ACEOF
1424#define PACKAGE_NAME "$PACKAGE_NAME"
1425_ACEOF
1426
1427
1428cat >>confdefs.h <<_ACEOF
1429#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1430_ACEOF
1431
1432
1433cat >>confdefs.h <<_ACEOF
1434#define PACKAGE_VERSION "$PACKAGE_VERSION"
1435_ACEOF
1436
1437
1438cat >>confdefs.h <<_ACEOF
1439#define PACKAGE_STRING "$PACKAGE_STRING"
1440_ACEOF
1441
1442
1443cat >>confdefs.h <<_ACEOF
1444#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1445_ACEOF
1446
1447
1448# Let the site file select an alternate cache file if it wants to.
1449# Prefer explicitly selected file to automatically selected ones.
b61ff9c8
BS
1450if test -z "$CONFIG_SITE"; then
1451 if test "x$prefix" != xNONE; then
1452 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1453 else
1454 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1455 fi
ba479fd2 1456fi
b61ff9c8 1457for ac_site_file in $CONFIG_SITE; do
ba479fd2
NN
1458 if test -r "$ac_site_file"; then
1459 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1460echo "$as_me: loading site script $ac_site_file" >&6;}
1461 sed 's/^/| /' "$ac_site_file" >&5
1462 . "$ac_site_file"
1463 fi
1464done
1465
1466if test -r "$cache_file"; then
1467 # Some versions of bash will fail to source /dev/null (special
1468 # files actually), so we avoid doing that.
1469 if test -f "$cache_file"; then
1470 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1471echo "$as_me: loading cache $cache_file" >&6;}
1472 case $cache_file in
b61ff9c8
BS
1473 [\\/]* | ?:[\\/]* ) . $cache_file;;
1474 *) . ./$cache_file;;
ba479fd2
NN
1475 esac
1476 fi
1477else
1478 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1479echo "$as_me: creating cache $cache_file" >&6;}
1480 >$cache_file
1481fi
1482
1483# Check that the precious variables saved in the cache have kept the same
1484# value.
1485ac_cache_corrupted=false
b61ff9c8
BS
1486for ac_var in `(set) 2>&1 |
1487 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1488 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1489 eval ac_new_set=\$ac_env_${ac_var}_set
b61ff9c8
BS
1490 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1491 eval ac_new_val="\$ac_env_${ac_var}_value"
ba479fd2
NN
1492 case $ac_old_set,$ac_new_set in
1493 set,)
1494 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1495echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1496 ac_cache_corrupted=: ;;
1497 ,set)
1498 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1499echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1500 ac_cache_corrupted=: ;;
1501 ,);;
1502 *)
1503 if test "x$ac_old_val" != "x$ac_new_val"; then
deb984e6
PB
1504 # differences in whitespace do not lead to failure.
1505 ac_old_val_w=`echo x $ac_old_val`
1506 ac_new_val_w=`echo x $ac_new_val`
1507 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1508 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1509echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
deb984e6
PB
1510 ac_cache_corrupted=:
1511 else
1512 { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1513echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1514 eval $ac_var=\$ac_old_val
1515 fi
1516 { echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1517echo "$as_me: former value: \`$ac_old_val'" >&2;}
1518 { echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1519echo "$as_me: current value: \`$ac_new_val'" >&2;}
ba479fd2
NN
1520 fi;;
1521 esac
1522 # Pass precious variables to config.status.
1523 if test "$ac_new_set" = set; then
1524 case $ac_new_val in
b61ff9c8
BS
1525 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1526 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
ba479fd2
NN
1527 *) ac_arg=$ac_var=$ac_new_val ;;
1528 esac
1529 case " $ac_configure_args " in
1530 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1531 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1532 esac
1533 fi
1534done
1535if $ac_cache_corrupted; then
1536 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1537echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1538 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1539echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1540 { (exit 1); exit 1; }; }
1541fi
1542
b61ff9c8
BS
1543ac_ext=c
1544ac_cpp='$CPP $CPPFLAGS'
1545ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1546ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1547ac_compiler_gnu=$ac_cv_c_compiler_gnu
1548
ba479fd2
NN
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
914c5af7 1567
b61ff9c8 1568 ac_config_headers="$ac_config_headers auto-host.h:config.in"
ba479fd2
NN
1569
1570
9f18db39
PB
1571gcc_version=`cat $srcdir/BASE-VER`
1572
ba479fd2
NN
1573# Determine the host, build, and target systems
1574ac_aux_dir=
b61ff9c8
BS
1575for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1576 if test -f $ac_dir/install-sh; then
ba479fd2
NN
1577 ac_aux_dir=$ac_dir
1578 ac_install_sh="$ac_aux_dir/install-sh -c"
1579 break
b61ff9c8 1580 elif test -f $ac_dir/install.sh; then
ba479fd2
NN
1581 ac_aux_dir=$ac_dir
1582 ac_install_sh="$ac_aux_dir/install.sh -c"
1583 break
b61ff9c8 1584 elif test -f $ac_dir/shtool; then
ba479fd2
NN
1585 ac_aux_dir=$ac_dir
1586 ac_install_sh="$ac_aux_dir/shtool install -c"
1587 break
1588 fi
1589done
1590if test -z "$ac_aux_dir"; then
b61ff9c8
BS
1591 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1592echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
ba479fd2
NN
1593 { (exit 1); exit 1; }; }
1594fi
b61ff9c8
BS
1595ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1596ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1597ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba479fd2
NN
1598
1599# Make sure we can run config.sub.
b61ff9c8
BS
1600$ac_config_sub sun4 >/dev/null 2>&1 ||
1601 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1602echo "$as_me: error: cannot run $ac_config_sub" >&2;}
ba479fd2
NN
1603 { (exit 1); exit 1; }; }
1604
b61ff9c8
BS
1605echo "$as_me:$LINENO: checking build system type" >&5
1606echo $ECHO_N "checking build system type... $ECHO_C" >&6
ba479fd2
NN
1607if test "${ac_cv_build+set}" = set; then
1608 echo $ECHO_N "(cached) $ECHO_C" >&6
1609else
b61ff9c8
BS
1610 ac_cv_build_alias=$build_alias
1611test -z "$ac_cv_build_alias" &&
1612 ac_cv_build_alias=`$ac_config_guess`
1613test -z "$ac_cv_build_alias" &&
ba479fd2
NN
1614 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1615echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1616 { (exit 1); exit 1; }; }
b61ff9c8
BS
1617ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1618 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1619echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
ba479fd2
NN
1620 { (exit 1); exit 1; }; }
1621
1622fi
b61ff9c8
BS
1623echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1624echo "${ECHO_T}$ac_cv_build" >&6
ba479fd2 1625build=$ac_cv_build
b61ff9c8
BS
1626build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1627build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1628build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1629
1630
1631echo "$as_me:$LINENO: checking host system type" >&5
1632echo $ECHO_N "checking host system type... $ECHO_C" >&6
ba479fd2
NN
1633if test "${ac_cv_host+set}" = set; then
1634 echo $ECHO_N "(cached) $ECHO_C" >&6
1635else
b61ff9c8
BS
1636 ac_cv_host_alias=$host_alias
1637test -z "$ac_cv_host_alias" &&
1638 ac_cv_host_alias=$ac_cv_build_alias
1639ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1640 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1641echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
ba479fd2
NN
1642 { (exit 1); exit 1; }; }
1643
1644fi
b61ff9c8
BS
1645echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1646echo "${ECHO_T}$ac_cv_host" >&6
ba479fd2 1647host=$ac_cv_host
b61ff9c8
BS
1648host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1649host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1650host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1651
1652
1653echo "$as_me:$LINENO: checking target system type" >&5
1654echo $ECHO_N "checking target system type... $ECHO_C" >&6
ba479fd2
NN
1655if test "${ac_cv_target+set}" = set; then
1656 echo $ECHO_N "(cached) $ECHO_C" >&6
1657else
b61ff9c8
BS
1658 ac_cv_target_alias=$target_alias
1659test "x$ac_cv_target_alias" = "x" &&
1660 ac_cv_target_alias=$ac_cv_host_alias
1661ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1662 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1663echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
ba479fd2
NN
1664 { (exit 1); exit 1; }; }
1665
1666fi
b61ff9c8
BS
1667echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1668echo "${ECHO_T}$ac_cv_target" >&6
ba479fd2 1669target=$ac_cv_target
b61ff9c8
BS
1670target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1671target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1672target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba479fd2
NN
1673
1674
1675# The aliases save the names the user supplied, while $host etc.
1676# will get canonicalized.
1677test -n "$target_alias" &&
1678 test "$program_prefix$program_suffix$program_transform_name" = \
1679 NONENONEs,x,x, &&
1680 program_prefix=${target_alias}-
1681
1682# Determine the noncanonical target name, for directory use.
18fc9bd4
RG
1683 case ${build_alias} in
1684 "") build_noncanonical=${build} ;;
1685 *) build_noncanonical=${build_alias} ;;
1686esac
1687
1688 case ${host_alias} in
1689 "") host_noncanonical=${build_noncanonical} ;;
1690 *) host_noncanonical=${host_alias} ;;
1691esac
1692
1693 case ${target_alias} in
1694 "") target_noncanonical=${host_noncanonical} ;;
1695 *) target_noncanonical=${target_alias} ;;
1696esac
1697
1698
1699
8f1529e6
L
1700
1701# Determine the target- and build-specific subdirectories
57255173
PB
1702
1703# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
1704# have matching libraries, they should use host libraries: Makefile.tpl
1705# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
1706# However, they still use the build modules, because the corresponding
1707# host modules (e.g. bison) are only built for the host when bootstrap
1708# finishes. So:
1709# - build_subdir is where we find build modules, and never changes.
1710# - build_libsubdir is where we find build libraries, and can be overridden.
1711
1712# Prefix 'build-' so this never conflicts with target_subdir.
18fc9bd4 1713build_subdir="build-${build_noncanonical}"
1546bb64 1714
b61ff9c8 1715# Check whether --with-build-libsubdir or --without-build-libsubdir was given.
1546bb64 1716if test "${with_build_libsubdir+set}" = set; then
b61ff9c8
BS
1717 withval="$with_build_libsubdir"
1718 build_libsubdir="$withval"
1546bb64
PB
1719else
1720 build_libsubdir="$build_subdir"
b61ff9c8 1721fi;
18fc9bd4
RG
1722# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1723if ( test $srcdir = . && test -d gcc ) \
1724 || test -d $srcdir/../host-${host_noncanonical}; then
1725 host_subdir="host-${host_noncanonical}"
1726else
1727 host_subdir=.
1728fi
1729# No prefix.
1730target_subdir=${target_noncanonical}
1731
73458fb7 1732
093e61a6 1733# Set program_transform_name
13c22933 1734test "$program_prefix" != NONE &&
b61ff9c8 1735 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1736# Use a double $ so make ignores it.
1737test "$program_suffix" != NONE &&
b61ff9c8 1738 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
ba479fd2
NN
1739# Double any \ or $. echo might interpret backslashes.
1740# By default was `s,x,x', remove it if useless.
1741cat <<\_ACEOF >conftest.sed
1742s/[\\$]/&&/g;s/;s,x,x,$//
1743_ACEOF
1744program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
b61ff9c8 1745rm conftest.sed
13c22933
JJ
1746
1747
34a86c2b
NN
1748# Check for bogus environment variables.
1749# Test if LIBRARY_PATH contains the notation for the current directory
1750# since this would lead to problems installing/building glibc.
1751# LIBRARY_PATH contains the current directory if one of the following
1752# is true:
1753# - one of the terminals (":" and ";") is the first or last sign
1754# - two terminals occur directly after each other
1755# - the path contains an element with a dot in it
b61ff9c8
BS
1756echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1757echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1758case ${LIBRARY_PATH} in
1759 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1760 library_path_setting="contains current directory"
1761 ;;
1762 *)
1763 library_path_setting="ok"
1764 ;;
1765esac
b61ff9c8
BS
1766echo "$as_me:$LINENO: result: $library_path_setting" >&5
1767echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1768if test "$library_path_setting" != "ok"; then
ba479fd2 1769{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1770*** LIBRARY_PATH shouldn't contain the current directory when
1771*** building gcc. Please change the environment variable
ba479fd2
NN
1772*** and run configure again." >&5
1773echo "$as_me: error:
1774*** LIBRARY_PATH shouldn't contain the current directory when
1775*** building gcc. Please change the environment variable
1776*** and run configure again." >&2;}
1777 { (exit 1); exit 1; }; }
e9a25f70
JL
1778fi
1779
34a86c2b
NN
1780# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1781# since this would lead to problems installing/building glibc.
1782# GCC_EXEC_PREFIX contains the current directory if one of the following
1783# is true:
1784# - one of the terminals (":" and ";") is the first or last sign
1785# - two terminals occur directly after each other
1786# - the path contains an element with a dot in it
b61ff9c8
BS
1787echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1788echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1789case ${GCC_EXEC_PREFIX} in
1790 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1791 gcc_exec_prefix_setting="contains current directory"
1792 ;;
1793 *)
1794 gcc_exec_prefix_setting="ok"
1795 ;;
1796esac
b61ff9c8
BS
1797echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1798echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1799if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1800{ { echo "$as_me:$LINENO: error:
1801*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1802*** building gcc. Please change the environment variable
1803*** and run configure again." >&5
1804echo "$as_me: error:
cafe096b
EC
1805*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1806*** building gcc. Please change the environment variable
ba479fd2
NN
1807*** and run configure again." >&2;}
1808 { (exit 1); exit 1; }; }
34a86c2b
NN
1809fi
1810
1811# -----------
1812# Directories
1813# -----------
1814
1815# Specify the local prefix
1816local_prefix=
ba479fd2 1817
b61ff9c8 1818# Check whether --with-local-prefix or --without-local-prefix was given.
34a86c2b 1819if test "${with_local_prefix+set}" = set; then
b61ff9c8
BS
1820 withval="$with_local_prefix"
1821 case "${withval}" in
ba479fd2
NN
1822yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1823echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1824 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1825no) ;;
1826*) local_prefix=$with_local_prefix ;;
1827esac
b61ff9c8 1828fi;
34a86c2b
NN
1829
1830# Default local prefix if it is empty
1831if test x$local_prefix = x; then
1832 local_prefix=/usr/local
1833fi
1834
1835# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1836# passed in by the toplevel make and thus we'd get different behavior
1837# depending on where we built the sources.
1838gcc_gxx_include_dir=
1839# Specify the g++ header file directory
ba479fd2 1840
b61ff9c8 1841# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
34a86c2b 1842if test "${with_gxx_include_dir+set}" = set; then
b61ff9c8
BS
1843 withval="$with_gxx_include_dir"
1844 case "${withval}" in
ba479fd2
NN
1845yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1846echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1847 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1848no) ;;
1849*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1850esac
b61ff9c8 1851fi;
34a86c2b 1852
0f57bf40 1853# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
34a86c2b
NN
1854if test x${gcc_gxx_include_dir} = x; then
1855 if test x${enable_version_specific_runtime_libs} = xyes; then
1856 gcc_gxx_include_dir='${libsubdir}/include/c++'
1857 else
0f57bf40
MM
1858 libstdcxx_incdir='include/c++/$(version)'
1859 if test x$host != x$target; then
1860 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
1861 fi
15c723f3 1862 gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
34a86c2b
NN
1863 fi
1864fi
1865
ba479fd2 1866
b61ff9c8 1867# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
34a86c2b 1868if test "${with_cpp_install_dir+set}" = set; then
b61ff9c8
BS
1869 withval="$with_cpp_install_dir"
1870 if test x$withval = xyes; then
ba479fd2
NN
1871 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1872echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1873 { (exit 1); exit 1; }; }
34a86c2b
NN
1874elif test x$withval != xno; then
1875 cpp_install_dir=$withval
1876fi
b61ff9c8 1877fi;
34a86c2b 1878
51b9ff45 1879# We would like to our source tree to be readonly. However when releases or
ba479fd2 1880# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1881# various formats of manuals need to be included along with the rest of the
ba479fd2 1882# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1883# just that.
1884
b61ff9c8
BS
1885echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1886echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1887 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45 1888if test "${enable_generated_files_in_srcdir+set}" = set; then
b61ff9c8
BS
1889 enableval="$enable_generated_files_in_srcdir"
1890 generated_files_in_srcdir=$enableval
51b9ff45 1891else
03787dfd 1892 generated_files_in_srcdir=no
b61ff9c8 1893fi;
1a4b763e 1894
b61ff9c8
BS
1895echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1896echo "${ECHO_T}$generated_files_in_srcdir" >&6
03787dfd
KC
1897
1898if test "$generated_files_in_srcdir" = "yes"; then
1899 GENINSRC=''
03787dfd
KC
1900else
1901 GENINSRC='#'
03787dfd
KC
1902fi
1903
1904
34a86c2b
NN
1905# -------------------
1906# Find default linker
1907# -------------------
1908
1909# With GNU ld
ba479fd2 1910
b61ff9c8 1911# Check whether --with-gnu-ld or --without-gnu-ld was given.
34a86c2b 1912if test "${with_gnu_ld+set}" = set; then
b61ff9c8
BS
1913 withval="$with_gnu_ld"
1914 gnu_ld_flag="$with_gnu_ld"
34a86c2b
NN
1915else
1916 gnu_ld_flag=no
b61ff9c8 1917fi;
6e3f3080 1918
63cf211a 1919# With pre-defined ld
ba479fd2 1920
b61ff9c8 1921# Check whether --with-ld or --without-ld was given.
34a86c2b 1922if test "${with_ld+set}" = set; then
b61ff9c8
BS
1923 withval="$with_ld"
1924 DEFAULT_LINKER="$with_ld"
1925fi;
34a86c2b
NN
1926if test x"${DEFAULT_LINKER+set}" = x"set"; then
1927 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1928 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1929echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1930 { (exit 1); exit 1; }; }
34a86c2b
NN
1931 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1932 gnu_ld_flag=yes
1933 fi
ba479fd2
NN
1934
1935cat >>confdefs.h <<_ACEOF
34a86c2b 1936#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1937_ACEOF
34a86c2b
NN
1938
1939fi
1940
2091ff66
NF
1941gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
1942
1943cat >>confdefs.h <<_ACEOF
1944#define HAVE_GNU_LD $gnu_ld
1945_ACEOF
1946
1947
b61ff9c8
BS
1948echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1949echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1950if test x"${DEFAULT_LINKER+set}" = x"set"; then
1951 if test x"$gnu_ld_flag" = x"no"; then
b61ff9c8
BS
1952 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1953echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1954 else
b61ff9c8
BS
1955 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1956echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1957 fi
1958else
b61ff9c8
BS
1959 echo "$as_me:$LINENO: result: no" >&5
1960echo "${ECHO_T}no" >&6
34a86c2b
NN
1961fi
1962
d594623a
L
1963# With demangler in GNU ld
1964
b61ff9c8 1965# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
d594623a 1966if test "${with_demangler_in_ld+set}" = set; then
b61ff9c8
BS
1967 withval="$with_demangler_in_ld"
1968 demangler_in_ld="$with_demangler_in_ld"
d594623a
L
1969else
1970 demangler_in_ld=no
b61ff9c8 1971fi;
d594623a 1972
34a86c2b
NN
1973# ----------------------
1974# Find default assembler
1975# ----------------------
1976
1977# With GNU as
ba479fd2 1978
b61ff9c8 1979# Check whether --with-gnu-as or --without-gnu-as was given.
34a86c2b 1980if test "${with_gnu_as+set}" = set; then
b61ff9c8
BS
1981 withval="$with_gnu_as"
1982 gas_flag="$with_gnu_as"
34a86c2b
NN
1983else
1984 gas_flag=no
b61ff9c8 1985fi;
ab22c1fa 1986
1a4b763e 1987
b61ff9c8 1988# Check whether --with-as or --without-as was given.
34a86c2b 1989if test "${with_as+set}" = set; then
b61ff9c8
BS
1990 withval="$with_as"
1991 DEFAULT_ASSEMBLER="$with_as"
1992fi;
34a86c2b
NN
1993if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1994 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1995 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1996echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1997 { (exit 1); exit 1; }; }
34a86c2b
NN
1998 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1999 gas_flag=yes
2000 fi
ba479fd2
NN
2001
2002cat >>confdefs.h <<_ACEOF
34a86c2b 2003#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 2004_ACEOF
34a86c2b
NN
2005
2006fi
2007
dc60b775
CD
2008gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
2009
2010cat >>confdefs.h <<_ACEOF
2011#define HAVE_GNU_AS $gnu_as
2012_ACEOF
2013
2014
b61ff9c8
BS
2015echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
2016echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
2017if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2018 if test x"$gas_flag" = x"no"; then
b61ff9c8
BS
2019 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
2020echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 2021 else
b61ff9c8
BS
2022 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
2023echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
2024 fi
2025else
b61ff9c8
BS
2026 echo "$as_me:$LINENO: result: no" >&5
2027echo "${ECHO_T}no" >&6
34a86c2b
NN
2028fi
2029
2030# ---------------
2031# Find C compiler
2032# ---------------
2033
426ca3ca
RO
2034# If a non-executable a.out is present (e.g. created by GNU as above even if
2035# invoked with -v only), the IRIX 6 native ld just overwrites the existing
2036# file, even when creating an executable, so an execution test fails.
2037# Remove possible default executable files to avoid this.
2038#
2039# FIXME: This really belongs into AC_PROG_CC and can be removed once
2040# Autoconf includes it.
2041rm -f a.out a.exe b.out
2042
34a86c2b 2043# Find the native compiler
ba479fd2
NN
2044ac_ext=c
2045ac_cpp='$CPP $CPPFLAGS'
2046ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2047ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2048ac_compiler_gnu=$ac_cv_c_compiler_gnu
2049if test -n "$ac_tool_prefix"; then
2050 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2051set dummy ${ac_tool_prefix}gcc; ac_word=$2
b61ff9c8
BS
2052echo "$as_me:$LINENO: checking for $ac_word" >&5
2053echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2054if test "${ac_cv_prog_CC+set}" = set; then
2055 echo $ECHO_N "(cached) $ECHO_C" >&6
2056else
2057 if test -n "$CC"; then
2058 ac_cv_prog_CC="$CC" # Let the user override the test.
2059else
2060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2061for as_dir in $PATH
2062do
2063 IFS=$as_save_IFS
2064 test -z "$as_dir" && as_dir=.
2065 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2066 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2067 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2068 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2069 break 2
2070 fi
2071done
2072done
2073
2074fi
2075fi
2076CC=$ac_cv_prog_CC
2077if test -n "$CC"; then
b61ff9c8
BS
2078 echo "$as_me:$LINENO: result: $CC" >&5
2079echo "${ECHO_T}$CC" >&6
ba479fd2 2080else
b61ff9c8
BS
2081 echo "$as_me:$LINENO: result: no" >&5
2082echo "${ECHO_T}no" >&6
ba479fd2
NN
2083fi
2084
2085fi
2086if test -z "$ac_cv_prog_CC"; then
2087 ac_ct_CC=$CC
2088 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 2089set dummy gcc; ac_word=$2
b61ff9c8
BS
2090echo "$as_me:$LINENO: checking for $ac_word" >&5
2091echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2092if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2093 echo $ECHO_N "(cached) $ECHO_C" >&6
2094else
2095 if test -n "$ac_ct_CC"; then
2096 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2097else
2098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2099for as_dir in $PATH
2100do
2101 IFS=$as_save_IFS
2102 test -z "$as_dir" && as_dir=.
2103 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2104 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2105 ac_cv_prog_ac_ct_CC="gcc"
2106 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2107 break 2
2108 fi
2109done
2110done
2111
2112fi
2113fi
2114ac_ct_CC=$ac_cv_prog_ac_ct_CC
2115if test -n "$ac_ct_CC"; then
b61ff9c8
BS
2116 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2117echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 2118else
b61ff9c8
BS
2119 echo "$as_me:$LINENO: result: no" >&5
2120echo "${ECHO_T}no" >&6
ba479fd2
NN
2121fi
2122
b61ff9c8 2123 CC=$ac_ct_CC
ba479fd2
NN
2124else
2125 CC="$ac_cv_prog_CC"
2126fi
2127
2128if test -z "$CC"; then
b61ff9c8
BS
2129 if test -n "$ac_tool_prefix"; then
2130 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
ba479fd2 2131set dummy ${ac_tool_prefix}cc; ac_word=$2
b61ff9c8
BS
2132echo "$as_me:$LINENO: checking for $ac_word" >&5
2133echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2134if test "${ac_cv_prog_CC+set}" = set; then
2135 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
2136else
2137 if test -n "$CC"; then
2138 ac_cv_prog_CC="$CC" # Let the user override the test.
2139else
ba479fd2
NN
2140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2141for as_dir in $PATH
2142do
2143 IFS=$as_save_IFS
2144 test -z "$as_dir" && as_dir=.
2145 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2146 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2147 ac_cv_prog_CC="${ac_tool_prefix}cc"
2148 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2149 break 2
2150 fi
2151done
2152done
2153
cd9e5e7c
MK
2154fi
2155fi
ba479fd2 2156CC=$ac_cv_prog_CC
cd9e5e7c 2157if test -n "$CC"; then
b61ff9c8
BS
2158 echo "$as_me:$LINENO: result: $CC" >&5
2159echo "${ECHO_T}$CC" >&6
2f41c1d6 2160else
b61ff9c8
BS
2161 echo "$as_me:$LINENO: result: no" >&5
2162echo "${ECHO_T}no" >&6
2f41c1d6
PB
2163fi
2164
b61ff9c8
BS
2165fi
2166if test -z "$ac_cv_prog_CC"; then
2167 ac_ct_CC=$CC
2168 # Extract the first word of "cc", so it can be a program name with args.
2169set dummy cc; ac_word=$2
2170echo "$as_me:$LINENO: checking for $ac_word" >&5
2171echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2172if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2173 echo $ECHO_N "(cached) $ECHO_C" >&6
2174else
2175 if test -n "$ac_ct_CC"; then
2176 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2177else
2178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2179for as_dir in $PATH
2180do
2181 IFS=$as_save_IFS
2182 test -z "$as_dir" && as_dir=.
2183 for ac_exec_ext in '' $ac_executable_extensions; do
2184 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2185 ac_cv_prog_ac_ct_CC="cc"
2186 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2187 break 2
1a4b763e 2188 fi
b61ff9c8
BS
2189done
2190done
2191
2192fi
2193fi
2194ac_ct_CC=$ac_cv_prog_ac_ct_CC
2195if test -n "$ac_ct_CC"; then
2196 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2197echo "${ECHO_T}$ac_ct_CC" >&6
2198else
2199 echo "$as_me:$LINENO: result: no" >&5
2200echo "${ECHO_T}no" >&6
2201fi
2202
2203 CC=$ac_ct_CC
2204else
2205 CC="$ac_cv_prog_CC"
2206fi
2207
ba479fd2 2208fi
6e3f3080
NN
2209if test -z "$CC"; then
2210 # Extract the first word of "cc", so it can be a program name with args.
2211set dummy cc; ac_word=$2
b61ff9c8
BS
2212echo "$as_me:$LINENO: checking for $ac_word" >&5
2213echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2214if test "${ac_cv_prog_CC+set}" = set; then
2215 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2216else
2217 if test -n "$CC"; then
2218 ac_cv_prog_CC="$CC" # Let the user override the test.
2219else
2220 ac_prog_rejected=no
ba479fd2
NN
2221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2222for as_dir in $PATH
2223do
2224 IFS=$as_save_IFS
2225 test -z "$as_dir" && as_dir=.
2226 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2227 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2228 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2229 ac_prog_rejected=yes
2230 continue
2231 fi
2232 ac_cv_prog_CC="cc"
2233 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2234 break 2
2235 fi
2236done
2237done
2238
6e3f3080
NN
2239if test $ac_prog_rejected = yes; then
2240 # We found a bogon in the path, so make sure we never use it.
2241 set dummy $ac_cv_prog_CC
2242 shift
ba479fd2 2243 if test $# != 0; then
6e3f3080
NN
2244 # We chose a different compiler from the bogus one.
2245 # However, it has the same basename, so the bogon will be chosen
2246 # first if we set CC to just the basename; use the full file name.
2247 shift
ba479fd2 2248 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2249 fi
6e3f3080
NN
2250fi
2251fi
2252fi
ba479fd2 2253CC=$ac_cv_prog_CC
6e3f3080 2254if test -n "$CC"; then
b61ff9c8
BS
2255 echo "$as_me:$LINENO: result: $CC" >&5
2256echo "${ECHO_T}$CC" >&6
e9a25f70 2257else
b61ff9c8
BS
2258 echo "$as_me:$LINENO: result: no" >&5
2259echo "${ECHO_T}no" >&6
e9a25f70 2260fi
6e3f3080 2261
ba479fd2
NN
2262fi
2263if test -z "$CC"; then
2264 if test -n "$ac_tool_prefix"; then
b61ff9c8 2265 for ac_prog in cl
ba479fd2
NN
2266 do
2267 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2268set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b61ff9c8
BS
2269echo "$as_me:$LINENO: checking for $ac_word" >&5
2270echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2271if test "${ac_cv_prog_CC+set}" = set; then
2272 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2273else
6e3f3080
NN
2274 if test -n "$CC"; then
2275 ac_cv_prog_CC="$CC" # Let the user override the test.
2276else
ba479fd2
NN
2277as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2278for as_dir in $PATH
2279do
2280 IFS=$as_save_IFS
2281 test -z "$as_dir" && as_dir=.
2282 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2283 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2284 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2285 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2286 break 2
2287 fi
2288done
2289done
2290
093e61a6 2291fi
6e3f3080 2292fi
ba479fd2 2293CC=$ac_cv_prog_CC
6e3f3080 2294if test -n "$CC"; then
b61ff9c8
BS
2295 echo "$as_me:$LINENO: result: $CC" >&5
2296echo "${ECHO_T}$CC" >&6
6e3f3080 2297else
b61ff9c8
BS
2298 echo "$as_me:$LINENO: result: no" >&5
2299echo "${ECHO_T}no" >&6
093e61a6 2300fi
cafe096b 2301
ba479fd2
NN
2302 test -n "$CC" && break
2303 done
2304fi
2305if test -z "$CC"; then
2306 ac_ct_CC=$CC
b61ff9c8 2307 for ac_prog in cl
ba479fd2
NN
2308do
2309 # Extract the first word of "$ac_prog", so it can be a program name with args.
2310set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
2311echo "$as_me:$LINENO: checking for $ac_word" >&5
2312echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2313if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2314 echo $ECHO_N "(cached) $ECHO_C" >&6
2315else
2316 if test -n "$ac_ct_CC"; then
2317 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2318else
2319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2320for as_dir in $PATH
2321do
2322 IFS=$as_save_IFS
2323 test -z "$as_dir" && as_dir=.
2324 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2325 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2326 ac_cv_prog_ac_ct_CC="$ac_prog"
2327 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2328 break 2
2329 fi
2330done
2331done
6e3f3080 2332
ba479fd2
NN
2333fi
2334fi
2335ac_ct_CC=$ac_cv_prog_ac_ct_CC
2336if test -n "$ac_ct_CC"; then
b61ff9c8
BS
2337 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2338echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 2339else
b61ff9c8
BS
2340 echo "$as_me:$LINENO: result: no" >&5
2341echo "${ECHO_T}no" >&6
ba479fd2 2342fi
6e3f3080 2343
ba479fd2
NN
2344 test -n "$ac_ct_CC" && break
2345done
63cf211a 2346
b61ff9c8 2347 CC=$ac_ct_CC
ba479fd2
NN
2348fi
2349
2350fi
2351
2352
2353test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2354See \`config.log' for more details." >&5
2355echo "$as_me: error: no acceptable C compiler found in \$PATH
2356See \`config.log' for more details." >&2;}
2357 { (exit 1); exit 1; }; }
2358
2359# Provide some information about the compiler.
b61ff9c8
BS
2360echo "$as_me:$LINENO:" \
2361 "checking for C compiler version" >&5
ba479fd2 2362ac_compiler=`set X $ac_compile; echo $2`
b61ff9c8
BS
2363{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2364 (eval $ac_compiler --version </dev/null >&5) 2>&5
ba479fd2
NN
2365 ac_status=$?
2366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2367 (exit $ac_status); }
b61ff9c8
BS
2368{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2369 (eval $ac_compiler -v </dev/null >&5) 2>&5
ba479fd2
NN
2370 ac_status=$?
2371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2372 (exit $ac_status); }
b61ff9c8
BS
2373{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2374 (eval $ac_compiler -V </dev/null >&5) 2>&5
ba479fd2
NN
2375 ac_status=$?
2376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2377 (exit $ac_status); }
2378
2379cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2380/* confdefs.h. */
2381_ACEOF
2382cat confdefs.h >>conftest.$ac_ext
2383cat >>conftest.$ac_ext <<_ACEOF
2384/* end confdefs.h. */
2385
2386int
2387main ()
2388{
63cf211a 2389
ba479fd2
NN
2390 ;
2391 return 0;
2392}
2393_ACEOF
2394ac_clean_files_save=$ac_clean_files
2395ac_clean_files="$ac_clean_files a.out a.exe b.out"
2396# Try to create an executable without -o first, disregard a.out.
2397# It will help us diagnose broken compilers, and finding out an intuition
2398# of exeext.
b61ff9c8
BS
2399echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2400echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2 2401ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
b61ff9c8
BS
2402if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2403 (eval $ac_link_default) 2>&5
ba479fd2
NN
2404 ac_status=$?
2405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2406 (exit $ac_status); }; then
b61ff9c8
BS
2407 # Find the output, starting from the most likely. This scheme is
2408# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2409# resort.
2410
2411# Be careful to initialize this variable, since it used to be cached.
2412# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2413ac_cv_exeext=
2414# b.out is created by i960 compilers.
2415for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
ba479fd2
NN
2416do
2417 test -f "$ac_file" || continue
2418 case $ac_file in
b61ff9c8
BS
2419 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2420 ;;
2421 conftest.$ac_ext )
2422 # This is the source file.
86da66b5 2423 ;;
ba479fd2 2424 [ab].out )
86da66b5
HPN
2425 # We found the default executable, but exeext='' is most
2426 # certainly right.
2427 break;;
ba479fd2 2428 *.* )
b61ff9c8
BS
2429 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2430 # FIXME: I believe we export ac_cv_exeext for Libtool,
2431 # but it would be cool to find out if it's true. Does anybody
2432 # maintain Libtool? --akim.
2433 export ac_cv_exeext
86da66b5 2434 break;;
ba479fd2 2435 * )
86da66b5 2436 break;;
ba479fd2
NN
2437 esac
2438done
2439else
2440 echo "$as_me: failed program was:" >&5
2441sed 's/^/| /' conftest.$ac_ext >&5
2442
2443{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2444See \`config.log' for more details." >&5
2445echo "$as_me: error: C compiler cannot create executables
2446See \`config.log' for more details." >&2;}
2447 { (exit 77); exit 77; }; }
2448fi
2449
2450ac_exeext=$ac_cv_exeext
b61ff9c8
BS
2451echo "$as_me:$LINENO: result: $ac_file" >&5
2452echo "${ECHO_T}$ac_file" >&6
ba479fd2 2453
b61ff9c8 2454# Check the compiler produces executables we can run. If not, either
ba479fd2 2455# the compiler is broken, or we cross compile.
b61ff9c8
BS
2456echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2457echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
ba479fd2
NN
2458# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2459# If not cross compiling, check that we can run a simple program.
2460if test "$cross_compiling" != yes; then
2461 if { ac_try='./$ac_file'
b61ff9c8
BS
2462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2463 (eval $ac_try) 2>&5
ba479fd2
NN
2464 ac_status=$?
2465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2466 (exit $ac_status); }; }; then
2467 cross_compiling=no
6e3f3080 2468 else
ba479fd2
NN
2469 if test "$cross_compiling" = maybe; then
2470 cross_compiling=yes
2471 else
2472 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2473If you meant to cross compile, use \`--host'.
2474See \`config.log' for more details." >&5
2475echo "$as_me: error: cannot run C compiled programs.
2476If you meant to cross compile, use \`--host'.
2477See \`config.log' for more details." >&2;}
2478 { (exit 1); exit 1; }; }
2479 fi
6e3f3080
NN
2480 fi
2481fi
b61ff9c8
BS
2482echo "$as_me:$LINENO: result: yes" >&5
2483echo "${ECHO_T}yes" >&6
ba479fd2
NN
2484
2485rm -f a.out a.exe conftest$ac_cv_exeext b.out
2486ac_clean_files=$ac_clean_files_save
b61ff9c8 2487# Check the compiler produces executables we can run. If not, either
ba479fd2 2488# the compiler is broken, or we cross compile.
b61ff9c8
BS
2489echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2490echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2491echo "$as_me:$LINENO: result: $cross_compiling" >&5
2492echo "${ECHO_T}$cross_compiling" >&6
2493
2494echo "$as_me:$LINENO: checking for suffix of executables" >&5
2495echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2496if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2497 (eval $ac_link) 2>&5
ba479fd2
NN
2498 ac_status=$?
2499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2500 (exit $ac_status); }; then
2501 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2502# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2503# work properly (i.e., refer to `conftest.exe'), while it won't with
2504# `rm'.
2505for ac_file in conftest.exe conftest conftest.*; do
2506 test -f "$ac_file" || continue
2507 case $ac_file in
b61ff9c8 2508 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
ba479fd2 2509 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b61ff9c8 2510 export ac_cv_exeext
86da66b5 2511 break;;
ba479fd2
NN
2512 * ) break;;
2513 esac
2514done
e9a25f70 2515else
ba479fd2
NN
2516 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2517See \`config.log' for more details." >&5
2518echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2519See \`config.log' for more details." >&2;}
2520 { (exit 1); exit 1; }; }
2521fi
2522
2523rm -f conftest$ac_cv_exeext
b61ff9c8
BS
2524echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2525echo "${ECHO_T}$ac_cv_exeext" >&6
ba479fd2
NN
2526
2527rm -f conftest.$ac_ext
2528EXEEXT=$ac_cv_exeext
2529ac_exeext=$EXEEXT
b61ff9c8
BS
2530echo "$as_me:$LINENO: checking for suffix of object files" >&5
2531echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
ba479fd2
NN
2532if test "${ac_cv_objext+set}" = set; then
2533 echo $ECHO_N "(cached) $ECHO_C" >&6
2534else
2535 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2536/* confdefs.h. */
2537_ACEOF
2538cat confdefs.h >>conftest.$ac_ext
2539cat >>conftest.$ac_ext <<_ACEOF
2540/* end confdefs.h. */
2541
2542int
2543main ()
2544{
6e3f3080 2545
ba479fd2
NN
2546 ;
2547 return 0;
2548}
2549_ACEOF
2550rm -f conftest.o conftest.obj
b61ff9c8
BS
2551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2552 (eval $ac_compile) 2>&5
ba479fd2
NN
2553 ac_status=$?
2554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2555 (exit $ac_status); }; then
b61ff9c8 2556 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
ba479fd2 2557 case $ac_file in
b61ff9c8 2558 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
ba479fd2
NN
2559 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2560 break;;
2561 esac
2562done
63cf211a 2563else
ba479fd2
NN
2564 echo "$as_me: failed program was:" >&5
2565sed 's/^/| /' conftest.$ac_ext >&5
2566
2567{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2568See \`config.log' for more details." >&5
2569echo "$as_me: error: cannot compute suffix of object files: cannot compile
2570See \`config.log' for more details." >&2;}
2571 { (exit 1); exit 1; }; }
2572fi
2573
2574rm -f conftest.$ac_cv_objext conftest.$ac_ext
2575fi
b61ff9c8
BS
2576echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2577echo "${ECHO_T}$ac_cv_objext" >&6
ba479fd2
NN
2578OBJEXT=$ac_cv_objext
2579ac_objext=$OBJEXT
b61ff9c8
BS
2580echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2581echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
ba479fd2
NN
2582if test "${ac_cv_c_compiler_gnu+set}" = set; then
2583 echo $ECHO_N "(cached) $ECHO_C" >&6
2584else
2585 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2586/* confdefs.h. */
2587_ACEOF
2588cat confdefs.h >>conftest.$ac_ext
2589cat >>conftest.$ac_ext <<_ACEOF
2590/* end confdefs.h. */
2591
2592int
2593main ()
2594{
2595#ifndef __GNUC__
2596 choke me
2597#endif
6e3f3080 2598
ba479fd2
NN
2599 ;
2600 return 0;
2601}
2602_ACEOF
2603rm -f conftest.$ac_objext
b61ff9c8
BS
2604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2605 (eval $ac_compile) 2>conftest.er1
ba479fd2 2606 ac_status=$?
86da66b5
HPN
2607 grep -v '^ *+' conftest.er1 >conftest.err
2608 rm -f conftest.er1
2609 cat conftest.err >&5
ba479fd2 2610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2611 (exit $ac_status); } &&
2612 { ac_try='test -z "$ac_c_werror_flag"
2613 || test ! -s conftest.err'
2614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2615 (eval $ac_try) 2>&5
2616 ac_status=$?
2617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2618 (exit $ac_status); }; } &&
2619 { ac_try='test -s conftest.$ac_objext'
2620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2621 (eval $ac_try) 2>&5
2622 ac_status=$?
2623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2624 (exit $ac_status); }; }; then
ba479fd2
NN
2625 ac_compiler_gnu=yes
2626else
2627 echo "$as_me: failed program was:" >&5
2628sed 's/^/| /' conftest.$ac_ext >&5
2629
b61ff9c8 2630ac_compiler_gnu=no
ba479fd2 2631fi
b61ff9c8 2632rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2633ac_cv_c_compiler_gnu=$ac_compiler_gnu
2634
2635fi
b61ff9c8
BS
2636echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2637echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
ba479fd2
NN
2638GCC=`test $ac_compiler_gnu = yes && echo yes`
2639ac_test_CFLAGS=${CFLAGS+set}
2640ac_save_CFLAGS=$CFLAGS
b61ff9c8
BS
2641CFLAGS="-g"
2642echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2643echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
ba479fd2
NN
2644if test "${ac_cv_prog_cc_g+set}" = set; then
2645 echo $ECHO_N "(cached) $ECHO_C" >&6
2646else
b61ff9c8 2647 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2648/* confdefs.h. */
2649_ACEOF
2650cat confdefs.h >>conftest.$ac_ext
2651cat >>conftest.$ac_ext <<_ACEOF
2652/* end confdefs.h. */
2653
2654int
2655main ()
2656{
2657
2658 ;
2659 return 0;
2660}
2661_ACEOF
2662rm -f conftest.$ac_objext
b61ff9c8
BS
2663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2664 (eval $ac_compile) 2>conftest.er1
ba479fd2 2665 ac_status=$?
86da66b5
HPN
2666 grep -v '^ *+' conftest.er1 >conftest.err
2667 rm -f conftest.er1
2668 cat conftest.err >&5
ba479fd2 2669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2670 (exit $ac_status); } &&
2671 { ac_try='test -z "$ac_c_werror_flag"
2672 || test ! -s conftest.err'
2673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2674 (eval $ac_try) 2>&5
2675 ac_status=$?
2676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2677 (exit $ac_status); }; } &&
2678 { ac_try='test -s conftest.$ac_objext'
2679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2680 (eval $ac_try) 2>&5
2681 ac_status=$?
2682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2683 (exit $ac_status); }; }; then
1a4b763e
BS
2684 ac_cv_prog_cc_g=yes
2685else
2686 echo "$as_me: failed program was:" >&5
2687sed 's/^/| /' conftest.$ac_ext >&5
2688
b61ff9c8
BS
2689ac_cv_prog_cc_g=no
2690fi
2691rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2692fi
2693echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2694echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2695if test "$ac_test_CFLAGS" = set; then
2696 CFLAGS=$ac_save_CFLAGS
2697elif test $ac_cv_prog_cc_g = yes; then
2698 if test "$GCC" = yes; then
2699 CFLAGS="-g -O2"
2700 else
2701 CFLAGS="-g"
2702 fi
2703else
2704 if test "$GCC" = yes; then
2705 CFLAGS="-O2"
2706 else
2707 CFLAGS=
2708 fi
2709fi
2710echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2711echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2712if test "${ac_cv_prog_cc_stdc+set}" = set; then
2713 echo $ECHO_N "(cached) $ECHO_C" >&6
2714else
2715 ac_cv_prog_cc_stdc=no
2716ac_save_CC=$CC
2717cat >conftest.$ac_ext <<_ACEOF
1a4b763e
BS
2718/* confdefs.h. */
2719_ACEOF
2720cat confdefs.h >>conftest.$ac_ext
2721cat >>conftest.$ac_ext <<_ACEOF
2722/* end confdefs.h. */
b61ff9c8
BS
2723#include <stdarg.h>
2724#include <stdio.h>
2725#include <sys/types.h>
2726#include <sys/stat.h>
2727/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2728struct buf { int x; };
2729FILE * (*rcsopen) (struct buf *, struct stat *, int);
2730static char *e (p, i)
2731 char **p;
2732 int i;
1a4b763e 2733{
b61ff9c8 2734 return p[i];
1a4b763e 2735}
b61ff9c8
BS
2736static char *f (char * (*g) (char **, int), char **p, ...)
2737{
2738 char *s;
2739 va_list v;
2740 va_start (v,p);
2741 s = g (p, va_arg (v,int));
2742 va_end (v);
2743 return s;
2744}
2745
2746/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2747 function prototypes and stuff, but not '\xHH' hex character constants.
2748 These don't provoke an error unfortunately, instead are silently treated
2749 as 'x'. The following induces an error, until -std1 is added to get
2750 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2751 array size at least. It's necessary to write '\x00'==0 to get something
2752 that's true only with -std1. */
2753int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2754
2755int test (int i, double x);
2756struct s1 {int (*f) (int a);};
2757struct s2 {int (*f) (double a);};
2758int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2759int argc;
2760char **argv;
2761int
2762main ()
2763{
2764return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2765 ;
2766 return 0;
2767}
2768_ACEOF
2769# Don't try gcc -ansi; that turns off useful extensions and
2770# breaks some systems' header files.
2771# AIX -qlanglvl=ansi
2772# Ultrix and OSF/1 -std1
2773# HP-UX 10.20 and later -Ae
2774# HP-UX older versions -Aa -D_HPUX_SOURCE
2775# SVR4 -Xc -D__EXTENSIONS__
2776for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2777do
2778 CC="$ac_save_CC $ac_arg"
2779 rm -f conftest.$ac_objext
2780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2781 (eval $ac_compile) 2>conftest.er1
2782 ac_status=$?
1a4b763e
BS
2783 grep -v '^ *+' conftest.er1 >conftest.err
2784 rm -f conftest.er1
2785 cat conftest.err >&5
2f41c1d6 2786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2787 (exit $ac_status); } &&
2788 { ac_try='test -z "$ac_c_werror_flag"
2789 || test ! -s conftest.err'
2790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2791 (eval $ac_try) 2>&5
2792 ac_status=$?
2793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2794 (exit $ac_status); }; } &&
2795 { ac_try='test -s conftest.$ac_objext'
2796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2797 (eval $ac_try) 2>&5
2798 ac_status=$?
2799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2800 (exit $ac_status); }; }; then
2801 ac_cv_prog_cc_stdc=$ac_arg
2802break
1a4b763e
BS
2803else
2804 echo "$as_me: failed program was:" >&5
2805sed 's/^/| /' conftest.$ac_ext >&5
2806
b61ff9c8
BS
2807fi
2808rm -f conftest.err conftest.$ac_objext
2809done
2810rm -f conftest.$ac_ext conftest.$ac_objext
2811CC=$ac_save_CC
2812
2813fi
2814
2815case "x$ac_cv_prog_cc_stdc" in
2816 x|xno)
2817 echo "$as_me:$LINENO: result: none needed" >&5
2818echo "${ECHO_T}none needed" >&6 ;;
2819 *)
2820 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2821echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2822 CC="$CC $ac_cv_prog_cc_stdc" ;;
2823esac
2824
2825# Some people use a C++ compiler to compile C. Since we use `exit',
2826# in C++ we need to declare it. In case someone uses the same compiler
2827# for both compiling C and C++ we need to have the C++ compiler decide
2828# the declaration of exit, since it's the most demanding environment.
2829cat >conftest.$ac_ext <<_ACEOF
2830#ifndef __cplusplus
2831 choke me
2832#endif
2833_ACEOF
2834rm -f conftest.$ac_objext
2835if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2836 (eval $ac_compile) 2>conftest.er1
2837 ac_status=$?
2838 grep -v '^ *+' conftest.er1 >conftest.err
2839 rm -f conftest.er1
2840 cat conftest.err >&5
2841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2842 (exit $ac_status); } &&
2843 { ac_try='test -z "$ac_c_werror_flag"
2844 || test ! -s conftest.err'
2845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2846 (eval $ac_try) 2>&5
2847 ac_status=$?
2848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2849 (exit $ac_status); }; } &&
2850 { ac_try='test -s conftest.$ac_objext'
2851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2852 (eval $ac_try) 2>&5
2853 ac_status=$?
2854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2855 (exit $ac_status); }; }; then
2856 for ac_declaration in \
2857 '' \
2858 'extern "C" void std::exit (int) throw (); using std::exit;' \
2859 'extern "C" void std::exit (int); using std::exit;' \
2860 'extern "C" void exit (int) throw ();' \
2861 'extern "C" void exit (int);' \
2862 'void exit (int);'
2863do
2864 cat >conftest.$ac_ext <<_ACEOF
1a4b763e
BS
2865/* confdefs.h. */
2866_ACEOF
2867cat confdefs.h >>conftest.$ac_ext
2868cat >>conftest.$ac_ext <<_ACEOF
2869/* end confdefs.h. */
b61ff9c8
BS
2870$ac_declaration
2871#include <stdlib.h>
1a4b763e
BS
2872int
2873main ()
2874{
b61ff9c8 2875exit (42);
1a4b763e
BS
2876 ;
2877 return 0;
2878}
2879_ACEOF
2880rm -f conftest.$ac_objext
b61ff9c8
BS
2881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2882 (eval $ac_compile) 2>conftest.er1
2f41c1d6 2883 ac_status=$?
1a4b763e
BS
2884 grep -v '^ *+' conftest.er1 >conftest.err
2885 rm -f conftest.er1
2886 cat conftest.err >&5
2f41c1d6 2887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2888 (exit $ac_status); } &&
2889 { ac_try='test -z "$ac_c_werror_flag"
2890 || test ! -s conftest.err'
2891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2892 (eval $ac_try) 2>&5
2893 ac_status=$?
2894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2895 (exit $ac_status); }; } &&
2896 { ac_try='test -s conftest.$ac_objext'
2897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2898 (eval $ac_try) 2>&5
2899 ac_status=$?
2900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2901 (exit $ac_status); }; }; then
2902 :
ab22c1fa
CF
2903else
2904 echo "$as_me: failed program was:" >&5
2905sed 's/^/| /' conftest.$ac_ext >&5
2906
b61ff9c8 2907continue
2f41c1d6 2908fi
b61ff9c8
BS
2909rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2910 cat >conftest.$ac_ext <<_ACEOF
ab22c1fa
CF
2911/* confdefs.h. */
2912_ACEOF
2913cat confdefs.h >>conftest.$ac_ext
2914cat >>conftest.$ac_ext <<_ACEOF
2915/* end confdefs.h. */
b61ff9c8 2916$ac_declaration
2f41c1d6
PB
2917int
2918main ()
2919{
b61ff9c8 2920exit (42);
2f41c1d6
PB
2921 ;
2922 return 0;
2923}
2924_ACEOF
b61ff9c8
BS
2925rm -f conftest.$ac_objext
2926if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2927 (eval $ac_compile) 2>conftest.er1
2f41c1d6 2928 ac_status=$?
ab22c1fa
CF
2929 grep -v '^ *+' conftest.er1 >conftest.err
2930 rm -f conftest.er1
2931 cat conftest.err >&5
a3bba767 2932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2933 (exit $ac_status); } &&
2934 { ac_try='test -z "$ac_c_werror_flag"
2935 || test ! -s conftest.err'
2936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2937 (eval $ac_try) 2>&5
2938 ac_status=$?
2939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2940 (exit $ac_status); }; } &&
2941 { ac_try='test -s conftest.$ac_objext'
2942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2943 (eval $ac_try) 2>&5
2944 ac_status=$?
2945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2946 (exit $ac_status); }; }; then
2947 break
ab22c1fa
CF
2948else
2949 echo "$as_me: failed program was:" >&5
2950sed 's/^/| /' conftest.$ac_ext >&5
2951
2f41c1d6 2952fi
b61ff9c8 2953rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2f41c1d6 2954done
b61ff9c8
BS
2955rm -f conftest*
2956if test -n "$ac_declaration"; then
2957 echo '#ifdef __cplusplus' >>confdefs.h
2958 echo $ac_declaration >>confdefs.h
2959 echo '#endif' >>confdefs.h
2f41c1d6 2960fi
2f41c1d6 2961
b61ff9c8
BS
2962else
2963 echo "$as_me: failed program was:" >&5
2964sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2965
b61ff9c8
BS
2966fi
2967rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2968ac_ext=c
2969ac_cpp='$CPP $CPPFLAGS'
2970ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2971ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2972ac_compiler_gnu=$ac_cv_c_compiler_gnu
2973
2974if test "x$CC" != xcc; then
b61ff9c8
BS
2975 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2976echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
ba479fd2 2977else
b61ff9c8
BS
2978 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2979echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
ba479fd2
NN
2980fi
2981set dummy $CC; ac_cc=`echo $2 |
2982 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
b61ff9c8 2983if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
ba479fd2
NN
2984 echo $ECHO_N "(cached) $ECHO_C" >&6
2985else
2986 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2987/* confdefs.h. */
2988_ACEOF
2989cat confdefs.h >>conftest.$ac_ext
2990cat >>conftest.$ac_ext <<_ACEOF
2991/* end confdefs.h. */
2992
2993int
2994main ()
2995{
2996
2997 ;
2998 return 0;
2999}
3000_ACEOF
3ec83fc2
RH
3001# Make sure it works both with $CC and with simple cc.
3002# We do the test twice because some compilers refuse to overwrite an
3003# existing .o file with -o, though they will create one.
b61ff9c8
BS
3004ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
3005if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3006 (eval $ac_try) 2>&5
ba479fd2
NN
3007 ac_status=$?
3008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3009 (exit $ac_status); } &&
b61ff9c8
BS
3010 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3011 (eval $ac_try) 2>&5
ba479fd2
NN
3012 ac_status=$?
3013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3014 (exit $ac_status); };
3ec83fc2
RH
3015then
3016 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
3017 if test "x$CC" != xcc; then
3018 # Test first that cc exists at all.
ba479fd2 3019 if { ac_try='cc -c conftest.$ac_ext >&5'
b61ff9c8
BS
3020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3021 (eval $ac_try) 2>&5
ba479fd2
NN
3022 ac_status=$?
3023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3024 (exit $ac_status); }; }; then
b61ff9c8
BS
3025 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
3026 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3027 (eval $ac_try) 2>&5
ba479fd2
NN
3028 ac_status=$?
3029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3030 (exit $ac_status); } &&
b61ff9c8
BS
3031 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3032 (eval $ac_try) 2>&5
ba479fd2
NN
3033 ac_status=$?
3034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3035 (exit $ac_status); };
3ec83fc2 3036 then
86da66b5
HPN
3037 # cc works too.
3038 :
3ec83fc2 3039 else
86da66b5
HPN
3040 # cc exists but doesn't like -o.
3041 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
3042 fi
3043 fi
3044 fi
3045else
3046 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3047fi
b61ff9c8 3048rm -f conftest*
3ec83fc2
RH
3049
3050fi
b61ff9c8
BS
3051if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
3052 echo "$as_me:$LINENO: result: yes" >&5
3053echo "${ECHO_T}yes" >&6
3ec83fc2 3054else
b61ff9c8
BS
3055 echo "$as_me:$LINENO: result: no" >&5
3056echo "${ECHO_T}no" >&6
ba479fd2
NN
3057
3058cat >>confdefs.h <<\_ACEOF
3ec83fc2 3059#define NO_MINUS_C_MINUS_O 1
ba479fd2 3060_ACEOF
3ec83fc2
RH
3061
3062fi
3063
3b620440
KC
3064# expand $ac_aux_dir to an absolute path
3065am_aux_dir=`cd $ac_aux_dir && pwd`
3066
3067# FIXME: we rely on the cache variable name because
3068# there is no other way.
3069set dummy $CC
3070ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
3071if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
3072 # Losing compiler, so override with the script.
3073 # FIXME: It is wrong to rewrite CC.
3074 # But if we don't then we get into trouble of one sort or another.
3075 # A longer-term fix would be to have automake use am__CC in this case,
3076 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3077 CC="$am_aux_dir/compile $CC"
3078fi
3079
3d4e720a
ST
3080
3081
3082
3083if test -n "$ac_tool_prefix"; then
3084 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
3085set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
3086echo "$as_me:$LINENO: checking for $ac_word" >&5
3087echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3088if test "${ac_cv_prog_GNATBIND+set}" = set; then
3089 echo $ECHO_N "(cached) $ECHO_C" >&6
3090else
3091 if test -n "$GNATBIND"; then
3092 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
3093else
3094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3095for as_dir in $PATH
3096do
3097 IFS=$as_save_IFS
3098 test -z "$as_dir" && as_dir=.
3099 for ac_exec_ext in '' $ac_executable_extensions; do
3100 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3101 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
3102 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3103 break 2
3104 fi
3105done
3106done
3107
3108fi
3109fi
3110GNATBIND=$ac_cv_prog_GNATBIND
3111if test -n "$GNATBIND"; then
3112 echo "$as_me:$LINENO: result: $GNATBIND" >&5
3113echo "${ECHO_T}$GNATBIND" >&6
3114else
3115 echo "$as_me:$LINENO: result: no" >&5
3116echo "${ECHO_T}no" >&6
3117fi
3118
3119fi
3120if test -z "$ac_cv_prog_GNATBIND"; then
3121 ac_ct_GNATBIND=$GNATBIND
3122 # Extract the first word of "gnatbind", so it can be a program name with args.
3123set dummy gnatbind; ac_word=$2
3124echo "$as_me:$LINENO: checking for $ac_word" >&5
3125echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3126if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then
3127 echo $ECHO_N "(cached) $ECHO_C" >&6
3128else
3129 if test -n "$ac_ct_GNATBIND"; then
3130 ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
3131else
3132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3133for as_dir in $PATH
3134do
3135 IFS=$as_save_IFS
3136 test -z "$as_dir" && as_dir=.
3137 for ac_exec_ext in '' $ac_executable_extensions; do
3138 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3139 ac_cv_prog_ac_ct_GNATBIND="gnatbind"
3140 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3141 break 2
3142 fi
3143done
3144done
3145
3146 test -z "$ac_cv_prog_ac_ct_GNATBIND" && ac_cv_prog_ac_ct_GNATBIND="no"
3147fi
3148fi
3149ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
3150if test -n "$ac_ct_GNATBIND"; then
3151 echo "$as_me:$LINENO: result: $ac_ct_GNATBIND" >&5
3152echo "${ECHO_T}$ac_ct_GNATBIND" >&6
3153else
3154 echo "$as_me:$LINENO: result: no" >&5
3155echo "${ECHO_T}no" >&6
3156fi
3157
3158 GNATBIND=$ac_ct_GNATBIND
3159else
3160 GNATBIND="$ac_cv_prog_GNATBIND"
3161fi
3162
3163if test -n "$ac_tool_prefix"; then
3164 # Extract the first word of "${ac_tool_prefix}gnatmake", so it can be a program name with args.
3165set dummy ${ac_tool_prefix}gnatmake; ac_word=$2
3166echo "$as_me:$LINENO: checking for $ac_word" >&5
3167echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3168if test "${ac_cv_prog_GNATMAKE+set}" = set; then
3169 echo $ECHO_N "(cached) $ECHO_C" >&6
3170else
3171 if test -n "$GNATMAKE"; then
3172 ac_cv_prog_GNATMAKE="$GNATMAKE" # Let the user override the test.
3173else
3174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3175for as_dir in $PATH
3176do
3177 IFS=$as_save_IFS
3178 test -z "$as_dir" && as_dir=.
3179 for ac_exec_ext in '' $ac_executable_extensions; do
3180 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3181 ac_cv_prog_GNATMAKE="${ac_tool_prefix}gnatmake"
3182 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3183 break 2
3184 fi
3185done
3186done
3187
3188fi
3189fi
3190GNATMAKE=$ac_cv_prog_GNATMAKE
3191if test -n "$GNATMAKE"; then
3192 echo "$as_me:$LINENO: result: $GNATMAKE" >&5
3193echo "${ECHO_T}$GNATMAKE" >&6
3194else
3195 echo "$as_me:$LINENO: result: no" >&5
3196echo "${ECHO_T}no" >&6
3197fi
3198
3199fi
3200if test -z "$ac_cv_prog_GNATMAKE"; then
3201 ac_ct_GNATMAKE=$GNATMAKE
3202 # Extract the first word of "gnatmake", so it can be a program name with args.
3203set dummy gnatmake; ac_word=$2
3204echo "$as_me:$LINENO: checking for $ac_word" >&5
3205echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3206if test "${ac_cv_prog_ac_ct_GNATMAKE+set}" = set; then
3207 echo $ECHO_N "(cached) $ECHO_C" >&6
3208else
3209 if test -n "$ac_ct_GNATMAKE"; then
3210 ac_cv_prog_ac_ct_GNATMAKE="$ac_ct_GNATMAKE" # Let the user override the test.
3211else
3212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3213for as_dir in $PATH
3214do
3215 IFS=$as_save_IFS
3216 test -z "$as_dir" && as_dir=.
3217 for ac_exec_ext in '' $ac_executable_extensions; do
3218 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3219 ac_cv_prog_ac_ct_GNATMAKE="gnatmake"
3220 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3221 break 2
3222 fi
3223done
3224done
3225
3226 test -z "$ac_cv_prog_ac_ct_GNATMAKE" && ac_cv_prog_ac_ct_GNATMAKE="no"
3227fi
3228fi
3229ac_ct_GNATMAKE=$ac_cv_prog_ac_ct_GNATMAKE
3230if test -n "$ac_ct_GNATMAKE"; then
3231 echo "$as_me:$LINENO: result: $ac_ct_GNATMAKE" >&5
3232echo "${ECHO_T}$ac_ct_GNATMAKE" >&6
3233else
3234 echo "$as_me:$LINENO: result: no" >&5
3235echo "${ECHO_T}no" >&6
3236fi
3237
3238 GNATMAKE=$ac_ct_GNATMAKE
3239else
3240 GNATMAKE="$ac_cv_prog_GNATMAKE"
3241fi
3242
3243echo "$as_me:$LINENO: checking whether compiler driver understands Ada" >&5
3244echo $ECHO_N "checking whether compiler driver understands Ada... $ECHO_C" >&6
3245if test "${acx_cv_cc_gcc_supports_ada+set}" = set; then
3246 echo $ECHO_N "(cached) $ECHO_C" >&6
3247else
3248 cat >conftest.adb <<EOF
3249procedure conftest is begin null; end conftest;
3250EOF
3251acx_cv_cc_gcc_supports_ada=no
3252# There is a bug in old released versions of GCC which causes the
3253# driver to exit successfully when the appropriate language module
3254# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
3255# Therefore we must check for the error message as well as an
3256# unsuccessful exit.
3257# Other compilers, like HP Tru64 UNIX cc, exit successfully when
3258# given a .adb file, but produce no object file. So we must check
3259# if an object file was really produced to guard against this.
3260errors=`(${CC} -I"$srcdir"/ada -c conftest.adb) 2>&1 || echo failure`
3261if test x"$errors" = x && test -f conftest.$ac_objext; then
3262 acx_cv_cc_gcc_supports_ada=yes
3263fi
3264rm -f conftest.*
3265fi
3266echo "$as_me:$LINENO: result: $acx_cv_cc_gcc_supports_ada" >&5
3267echo "${ECHO_T}$acx_cv_cc_gcc_supports_ada" >&6
3268
3269if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
3270 have_gnat=yes
3271else
3272 have_gnat=no
3273fi
3274
3275
414d23ae
HPN
3276# autoconf is lame and doesn't give us any substitution variable for this.
3277if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
3278 NO_MINUS_C_MINUS_O=yes
3279else
3280 OUTPUT_OPTION='-o $@'
3281fi
3282
3283
3284
ec6c7392
PB
3285# Remove the -O2: for historical reasons, unless bootstrapping we prefer
3286# optimizations to be activated explicitly by the toplevel.
3287case "$CC" in
3288 */prev-gcc/xgcc*) ;;
3289 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
3290esac
3291
3292
73458fb7
NN
3293# -------------------------
3294# Check C compiler features
3295# -------------------------
3296
60d26958 3297
ba479fd2
NN
3298ac_ext=c
3299ac_cpp='$CPP $CPPFLAGS'
3300ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3301ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3302ac_compiler_gnu=$ac_cv_c_compiler_gnu
b61ff9c8
BS
3303echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3304echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
3305# On Suns, sometimes $CPP names a directory.
3306if test -n "$CPP" && test -d "$CPP"; then
3307 CPP=
3308fi
3309if test -z "$CPP"; then
ba479fd2
NN
3310 if test "${ac_cv_prog_CPP+set}" = set; then
3311 echo $ECHO_N "(cached) $ECHO_C" >&6
3312else
3313 # Double quotes because CPP needs to be expanded
3314 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3315 do
3316 ac_preproc_ok=false
3317for ac_c_preproc_warn_flag in '' yes
3318do
3319 # Use a header file that comes with gcc, so configuring glibc
3320 # with a fresh cross-compiler works.
3321 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3322 # <limits.h> exists even on freestanding compilers.
84c041a1 3323 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
3324 # not just through cpp. "Syntax error" is here to catch this case.
3325 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3326/* confdefs.h. */
3327_ACEOF
3328cat confdefs.h >>conftest.$ac_ext
3329cat >>conftest.$ac_ext <<_ACEOF
3330/* end confdefs.h. */
3331#ifdef __STDC__
3332# include <limits.h>
3333#else
3334# include <assert.h>
3335#endif
86da66b5 3336 Syntax error
ba479fd2 3337_ACEOF
b61ff9c8
BS
3338if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3339 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3340 ac_status=$?
3341 grep -v '^ *+' conftest.er1 >conftest.err
3342 rm -f conftest.er1
3343 cat conftest.err >&5
3344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3345 (exit $ac_status); } >/dev/null; then
3346 if test -s conftest.err; then
3347 ac_cpp_err=$ac_c_preproc_warn_flag
3348 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3349 else
3350 ac_cpp_err=
3351 fi
3352else
3353 ac_cpp_err=yes
3354fi
3355if test -z "$ac_cpp_err"; then
093e61a6 3356 :
cafe096b 3357else
ba479fd2
NN
3358 echo "$as_me: failed program was:" >&5
3359sed 's/^/| /' conftest.$ac_ext >&5
3360
3361 # Broken: fails on valid input.
3362continue
3363fi
3364rm -f conftest.err conftest.$ac_ext
3365
b61ff9c8 3366 # OK, works on sane cases. Now check whether non-existent headers
ba479fd2
NN
3367 # can be detected and how.
3368 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3369/* confdefs.h. */
3370_ACEOF
3371cat confdefs.h >>conftest.$ac_ext
3372cat >>conftest.$ac_ext <<_ACEOF
3373/* end confdefs.h. */
3374#include <ac_nonexistent.h>
3375_ACEOF
b61ff9c8
BS
3376if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3377 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3378 ac_status=$?
3379 grep -v '^ *+' conftest.er1 >conftest.err
3380 rm -f conftest.er1
3381 cat conftest.err >&5
3382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3383 (exit $ac_status); } >/dev/null; then
3384 if test -s conftest.err; then
3385 ac_cpp_err=$ac_c_preproc_warn_flag
3386 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3387 else
3388 ac_cpp_err=
3389 fi
3390else
3391 ac_cpp_err=yes
3392fi
3393if test -z "$ac_cpp_err"; then
ba479fd2
NN
3394 # Broken: success on invalid input.
3395continue
3396else
3397 echo "$as_me: failed program was:" >&5
3398sed 's/^/| /' conftest.$ac_ext >&5
3399
3400 # Passes both tests.
3401ac_preproc_ok=:
3402break
3403fi
3404rm -f conftest.err conftest.$ac_ext
3405
3406done
3407# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3408rm -f conftest.err conftest.$ac_ext
3409if $ac_preproc_ok; then
3410 break
3411fi
3412
3413 done
3414 ac_cv_prog_CPP=$CPP
3415
3416fi
3417 CPP=$ac_cv_prog_CPP
3418else
3419 ac_cv_prog_CPP=$CPP
3420fi
b61ff9c8
BS
3421echo "$as_me:$LINENO: result: $CPP" >&5
3422echo "${ECHO_T}$CPP" >&6
ba479fd2
NN
3423ac_preproc_ok=false
3424for ac_c_preproc_warn_flag in '' yes
3425do
3426 # Use a header file that comes with gcc, so configuring glibc
3427 # with a fresh cross-compiler works.
3428 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3429 # <limits.h> exists even on freestanding compilers.
3430 # On the NeXT, cc -E runs the code through the compiler's parser,
3431 # not just through cpp. "Syntax error" is here to catch this case.
3432 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3433/* confdefs.h. */
3434_ACEOF
3435cat confdefs.h >>conftest.$ac_ext
3436cat >>conftest.$ac_ext <<_ACEOF
3437/* end confdefs.h. */
3438#ifdef __STDC__
3439# include <limits.h>
3440#else
3441# include <assert.h>
3442#endif
86da66b5 3443 Syntax error
ba479fd2 3444_ACEOF
b61ff9c8
BS
3445if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3446 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3447 ac_status=$?
3448 grep -v '^ *+' conftest.er1 >conftest.err
3449 rm -f conftest.er1
3450 cat conftest.err >&5
3451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3452 (exit $ac_status); } >/dev/null; then
3453 if test -s conftest.err; then
3454 ac_cpp_err=$ac_c_preproc_warn_flag
3455 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3456 else
3457 ac_cpp_err=
3458 fi
3459else
3460 ac_cpp_err=yes
3461fi
3462if test -z "$ac_cpp_err"; then
6e3f3080 3463 :
414d23ae 3464else
ba479fd2
NN
3465 echo "$as_me: failed program was:" >&5
3466sed 's/^/| /' conftest.$ac_ext >&5
3467
3468 # Broken: fails on valid input.
3469continue
3470fi
3471rm -f conftest.err conftest.$ac_ext
3472
b61ff9c8 3473 # OK, works on sane cases. Now check whether non-existent headers
ba479fd2
NN
3474 # can be detected and how.
3475 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3476/* confdefs.h. */
3477_ACEOF
3478cat confdefs.h >>conftest.$ac_ext
3479cat >>conftest.$ac_ext <<_ACEOF
3480/* end confdefs.h. */
3481#include <ac_nonexistent.h>
3482_ACEOF
b61ff9c8
BS
3483if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3484 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3485 ac_status=$?
3486 grep -v '^ *+' conftest.er1 >conftest.err
3487 rm -f conftest.er1
3488 cat conftest.err >&5
3489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3490 (exit $ac_status); } >/dev/null; then
3491 if test -s conftest.err; then
3492 ac_cpp_err=$ac_c_preproc_warn_flag
3493 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3494 else
3495 ac_cpp_err=
3496 fi
3497else
3498 ac_cpp_err=yes
3499fi
3500if test -z "$ac_cpp_err"; then
ba479fd2
NN
3501 # Broken: success on invalid input.
3502continue
3503else
3504 echo "$as_me: failed program was:" >&5
3505sed 's/^/| /' conftest.$ac_ext >&5
3506
3507 # Passes both tests.
3508ac_preproc_ok=:
3509break
63cf211a 3510fi
ba479fd2
NN
3511rm -f conftest.err conftest.$ac_ext
3512
3513done
3514# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3515rm -f conftest.err conftest.$ac_ext
3516if $ac_preproc_ok; then
3517 :
6e3f3080 3518else
ba479fd2
NN
3519 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3520See \`config.log' for more details." >&5
3521echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3522See \`config.log' for more details." >&2;}
3523 { (exit 1); exit 1; }; }
6e3f3080
NN
3524fi
3525
ba479fd2
NN
3526ac_ext=c
3527ac_cpp='$CPP $CPPFLAGS'
3528ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3529ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3530ac_compiler_gnu=$ac_cv_c_compiler_gnu
3531
b5472e1d 3532
60d26958
PB
3533echo "$as_me:$LINENO: checking for egrep" >&5
3534echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3535if test "${ac_cv_prog_egrep+set}" = set; then
3536 echo $ECHO_N "(cached) $ECHO_C" >&6
3537else
3538 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3539 then ac_cv_prog_egrep='grep -E'
3540 else ac_cv_prog_egrep='egrep'
3541 fi
3542fi
3543echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3544echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3545 EGREP=$ac_cv_prog_egrep
3546
3547
3548echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3549echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3550if test "${ac_cv_header_stdc+set}" = set; then
ba479fd2 3551 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3552else
ba479fd2 3553 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3554/* confdefs.h. */
3555_ACEOF
3556cat confdefs.h >>conftest.$ac_ext
3557cat >>conftest.$ac_ext <<_ACEOF
3558/* end confdefs.h. */
60d26958
PB
3559#include <stdlib.h>
3560#include <stdarg.h>
3561#include <string.h>
3562#include <float.h>
3563
3564int
3565main ()
3566{
414d23ae 3567
60d26958
PB
3568 ;
3569 return 0;
3570}
ba479fd2
NN
3571_ACEOF
3572rm -f conftest.$ac_objext
b61ff9c8
BS
3573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3574 (eval $ac_compile) 2>conftest.er1
ba479fd2 3575 ac_status=$?
86da66b5
HPN
3576 grep -v '^ *+' conftest.er1 >conftest.err
3577 rm -f conftest.er1
3578 cat conftest.err >&5
ba479fd2 3579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3580 (exit $ac_status); } &&
3581 { ac_try='test -z "$ac_c_werror_flag"
3582 || test ! -s conftest.err'
3583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3584 (eval $ac_try) 2>&5
3585 ac_status=$?
3586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3587 (exit $ac_status); }; } &&
3588 { ac_try='test -s conftest.$ac_objext'
3589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3590 (eval $ac_try) 2>&5
3591 ac_status=$?
3592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3593 (exit $ac_status); }; }; then
60d26958 3594 ac_cv_header_stdc=yes
414d23ae 3595else
ba479fd2
NN
3596 echo "$as_me: failed program was:" >&5
3597sed 's/^/| /' conftest.$ac_ext >&5
3598
60d26958 3599ac_cv_header_stdc=no
414d23ae 3600fi
b61ff9c8 3601rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3602
60d26958
PB
3603if test $ac_cv_header_stdc = yes; then
3604 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3605 cat >conftest.$ac_ext <<_ACEOF
3606/* confdefs.h. */
3607_ACEOF
3608cat confdefs.h >>conftest.$ac_ext
3609cat >>conftest.$ac_ext <<_ACEOF
3610/* end confdefs.h. */
3611#include <string.h>
3612
3613_ACEOF
3614if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3615 $EGREP "memchr" >/dev/null 2>&1; then
3616 :
3617else
3618 ac_cv_header_stdc=no
414d23ae 3619fi
60d26958 3620rm -f conftest*
86da66b5 3621
60d26958 3622fi
86da66b5 3623
60d26958
PB
3624if test $ac_cv_header_stdc = yes; then
3625 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3626 cat >conftest.$ac_ext <<_ACEOF
3627/* confdefs.h. */
3628_ACEOF
3629cat confdefs.h >>conftest.$ac_ext
3630cat >>conftest.$ac_ext <<_ACEOF
3631/* end confdefs.h. */
3632#include <stdlib.h>
3633
3634_ACEOF
3635if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3636 $EGREP "free" >/dev/null 2>&1; then
3637 :
3638else
3639 ac_cv_header_stdc=no
3640fi
3641rm -f conftest*
3642
3643fi
3644
3645if test $ac_cv_header_stdc = yes; then
3646 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3647 if test "$cross_compiling" = yes; then
3648 :
3649else
3650 cat >conftest.$ac_ext <<_ACEOF
3651/* confdefs.h. */
3652_ACEOF
3653cat confdefs.h >>conftest.$ac_ext
3654cat >>conftest.$ac_ext <<_ACEOF
3655/* end confdefs.h. */
3656#include <ctype.h>
3657#if ((' ' & 0x0FF) == 0x020)
3658# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3659# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3660#else
3661# define ISLOWER(c) \
3662 (('a' <= (c) && (c) <= 'i') \
3663 || ('j' <= (c) && (c) <= 'r') \
3664 || ('s' <= (c) && (c) <= 'z'))
3665# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
86da66b5 3666#endif
60d26958
PB
3667
3668#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3669int
3670main ()
3671{
3672 int i;
3673 for (i = 0; i < 256; i++)
3674 if (XOR (islower (i), ISLOWER (i))
3675 || toupper (i) != TOUPPER (i))
3676 exit(2);
3677 exit (0);
3678}
ba479fd2 3679_ACEOF
60d26958
PB
3680rm -f conftest$ac_exeext
3681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3682 (eval $ac_link) 2>&5
3683 ac_status=$?
3684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3685 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3687 (eval $ac_try) 2>&5
3688 ac_status=$?
3689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3690 (exit $ac_status); }; }; then
3691 :
3692else
3693 echo "$as_me: program exited with status $ac_status" >&5
3694echo "$as_me: failed program was:" >&5
3695sed 's/^/| /' conftest.$ac_ext >&5
414d23ae 3696
60d26958
PB
3697( exit $ac_status )
3698ac_cv_header_stdc=no
3699fi
3700rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3701fi
3702fi
3703fi
3704echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3705echo "${ECHO_T}$ac_cv_header_stdc" >&6
3706if test $ac_cv_header_stdc = yes; then
414d23ae 3707
60d26958
PB
3708cat >>confdefs.h <<\_ACEOF
3709#define STDC_HEADERS 1
3710_ACEOF
bf3b7cd3 3711
60d26958
PB
3712fi
3713
3714# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3725 inttypes.h stdint.h unistd.h
3726do
3727as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3728echo "$as_me:$LINENO: checking for $ac_header" >&5
3729echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3730if eval "test \"\${$as_ac_Header+set}\" = set"; then
1a4b763e
BS
3731 echo $ECHO_N "(cached) $ECHO_C" >&6
3732else
60d26958
PB
3733 cat >conftest.$ac_ext <<_ACEOF
3734/* confdefs.h. */
3735_ACEOF
3736cat confdefs.h >>conftest.$ac_ext
3737cat >>conftest.$ac_ext <<_ACEOF
3738/* end confdefs.h. */
3739$ac_includes_default
3740
3741#include <$ac_header>
3742_ACEOF
3743rm -f conftest.$ac_objext
3744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3745 (eval $ac_compile) 2>conftest.er1
3746 ac_status=$?
3747 grep -v '^ *+' conftest.er1 >conftest.err
3748 rm -f conftest.er1
3749 cat conftest.err >&5
3750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3751 (exit $ac_status); } &&
3752 { ac_try='test -z "$ac_c_werror_flag"
3753 || test ! -s conftest.err'
3754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3755 (eval $ac_try) 2>&5
3756 ac_status=$?
3757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3758 (exit $ac_status); }; } &&
3759 { ac_try='test -s conftest.$ac_objext'
3760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3761 (eval $ac_try) 2>&5
3762 ac_status=$?
3763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3764 (exit $ac_status); }; }; then
3765 eval "$as_ac_Header=yes"
3766else
3767 echo "$as_me: failed program was:" >&5
3768sed 's/^/| /' conftest.$ac_ext >&5
3769
3770eval "$as_ac_Header=no"
b61ff9c8 3771fi
60d26958
PB
3772rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3773fi
3774echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3775echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3776if test `eval echo '${'$as_ac_Header'}'` = yes; then
3777 cat >>confdefs.h <<_ACEOF
3778#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3779_ACEOF
1a4b763e 3780
60d26958 3781fi
1a4b763e 3782
60d26958
PB
3783done
3784
3785
3786
3787 if test "${ac_cv_header_minix_config_h+set}" = set; then
3788 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3789echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3790if test "${ac_cv_header_minix_config_h+set}" = set; then
3791 echo $ECHO_N "(cached) $ECHO_C" >&6
3792fi
3793echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3794echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3795else
3796 # Is the header compilable?
3797echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3798echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3799cat >conftest.$ac_ext <<_ACEOF
3800/* confdefs.h. */
3801_ACEOF
3802cat confdefs.h >>conftest.$ac_ext
3803cat >>conftest.$ac_ext <<_ACEOF
3804/* end confdefs.h. */
3805$ac_includes_default
3806#include <minix/config.h>
3807_ACEOF
3808rm -f conftest.$ac_objext
3809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3810 (eval $ac_compile) 2>conftest.er1
3811 ac_status=$?
3812 grep -v '^ *+' conftest.er1 >conftest.err
3813 rm -f conftest.er1
3814 cat conftest.err >&5
3815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3816 (exit $ac_status); } &&
3817 { ac_try='test -z "$ac_c_werror_flag"
3818 || test ! -s conftest.err'
3819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3820 (eval $ac_try) 2>&5
3821 ac_status=$?
3822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3823 (exit $ac_status); }; } &&
3824 { ac_try='test -s conftest.$ac_objext'
3825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3826 (eval $ac_try) 2>&5
3827 ac_status=$?
3828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3829 (exit $ac_status); }; }; then
3830 ac_header_compiler=yes
3831else
3832 echo "$as_me: failed program was:" >&5
3833sed 's/^/| /' conftest.$ac_ext >&5
3834
3835ac_header_compiler=no
3836fi
3837rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3838echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3839echo "${ECHO_T}$ac_header_compiler" >&6
3840
3841# Is the header present?
3842echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3843echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3844cat >conftest.$ac_ext <<_ACEOF
3845/* confdefs.h. */
3846_ACEOF
3847cat confdefs.h >>conftest.$ac_ext
3848cat >>conftest.$ac_ext <<_ACEOF
3849/* end confdefs.h. */
3850#include <minix/config.h>
3851_ACEOF
3852if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3853 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3854 ac_status=$?
3855 grep -v '^ *+' conftest.er1 >conftest.err
3856 rm -f conftest.er1
3857 cat conftest.err >&5
3858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3859 (exit $ac_status); } >/dev/null; then
3860 if test -s conftest.err; then
3861 ac_cpp_err=$ac_c_preproc_warn_flag
3862 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3863 else
3864 ac_cpp_err=
3865 fi
3866else
3867 ac_cpp_err=yes
3868fi
3869if test -z "$ac_cpp_err"; then
3870 ac_header_preproc=yes
3871else
3872 echo "$as_me: failed program was:" >&5
3873sed 's/^/| /' conftest.$ac_ext >&5
3874
3875 ac_header_preproc=no
3876fi
3877rm -f conftest.err conftest.$ac_ext
3878echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3879echo "${ECHO_T}$ac_header_preproc" >&6
3880
3881# So? What about this header?
3882case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3883 yes:no: )
3884 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3885echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3886 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
3887echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
3888 ac_header_preproc=yes
3889 ;;
3890 no:yes:* )
3891 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3892echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3893 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3894echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3895 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
3896echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
3897 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
3898echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
3899 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3900echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3901 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
3902echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
3903 (
3904 cat <<\_ASBOX
3905## ------------------------------------------ ##
3906## Report this to the AC_PACKAGE_NAME lists. ##
3907## ------------------------------------------ ##
3908_ASBOX
3909 ) |
3910 sed "s/^/$as_me: WARNING: /" >&2
3911 ;;
3912esac
3913echo "$as_me:$LINENO: checking for minix/config.h" >&5
3914echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3915if test "${ac_cv_header_minix_config_h+set}" = set; then
3916 echo $ECHO_N "(cached) $ECHO_C" >&6
3917else
3918 ac_cv_header_minix_config_h=$ac_header_preproc
3919fi
3920echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3921echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3922
3923fi
3924if test $ac_cv_header_minix_config_h = yes; then
3925 MINIX=yes
3926else
3927 MINIX=
3928fi
3929
3930
3931 if test "$MINIX" = yes; then
3932
3933cat >>confdefs.h <<\_ACEOF
3934#define _POSIX_SOURCE 1
3935_ACEOF
3936
3937
3938cat >>confdefs.h <<\_ACEOF
3939#define _POSIX_1_SOURCE 2
3940_ACEOF
3941
3942
3943cat >>confdefs.h <<\_ACEOF
3944#define _MINIX 1
3945_ACEOF
3946
3947 fi
3948
3949
3950
3951 echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
3952echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6
3953if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
bf3b7cd3
JD
3954 echo $ECHO_N "(cached) $ECHO_C" >&6
3955else
3956 cat >conftest.$ac_ext <<_ACEOF
3957/* confdefs.h. */
3958_ACEOF
3959cat confdefs.h >>conftest.$ac_ext
3960cat >>conftest.$ac_ext <<_ACEOF
3961/* end confdefs.h. */
bf3b7cd3 3962
60d26958
PB
3963# define __EXTENSIONS__ 1
3964 $ac_includes_default
bf3b7cd3
JD
3965int
3966main ()
3967{
3968
3969 ;
3970 return 0;
3971}
3972_ACEOF
3973rm -f conftest.$ac_objext
b61ff9c8
BS
3974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3975 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3976 ac_status=$?
3977 grep -v '^ *+' conftest.er1 >conftest.err
3978 rm -f conftest.er1
3979 cat conftest.err >&5
3980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3981 (exit $ac_status); } &&
3982 { ac_try='test -z "$ac_c_werror_flag"
3983 || test ! -s conftest.err'
3984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3985 (eval $ac_try) 2>&5
3986 ac_status=$?
3987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3988 (exit $ac_status); }; } &&
3989 { ac_try='test -s conftest.$ac_objext'
3990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3991 (eval $ac_try) 2>&5
3992 ac_status=$?
3993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3994 (exit $ac_status); }; }; then
60d26958 3995 ac_cv_safe_to_define___extensions__=yes
bf3b7cd3
JD
3996else
3997 echo "$as_me: failed program was:" >&5
3998sed 's/^/| /' conftest.$ac_ext >&5
3999
60d26958 4000ac_cv_safe_to_define___extensions__=no
bf3b7cd3 4001fi
b61ff9c8 4002rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
60d26958
PB
4003fi
4004echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4005echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6
4006 test $ac_cv_safe_to_define___extensions__ = yes &&
4007 cat >>confdefs.h <<\_ACEOF
4008#define __EXTENSIONS__ 1
4009_ACEOF
bf3b7cd3 4010
60d26958
PB
4011 cat >>confdefs.h <<\_ACEOF
4012#define _ALL_SOURCE 1
4013_ACEOF
4014
4015 cat >>confdefs.h <<\_ACEOF
4016#define _GNU_SOURCE 1
4017_ACEOF
4018
4019 cat >>confdefs.h <<\_ACEOF
4020#define _POSIX_PTHREAD_SEMANTICS 1
4021_ACEOF
4022
4023 cat >>confdefs.h <<\_ACEOF
4024#define _TANDEM_SOURCE 1
4025_ACEOF
4026
4027
4028ac_ext=c
4029ac_cpp='$CPP $CPPFLAGS'
4030ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4031ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4032ac_compiler_gnu=$ac_cv_c_compiler_gnu
4033echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4034echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
4035# On Suns, sometimes $CPP names a directory.
4036if test -n "$CPP" && test -d "$CPP"; then
4037 CPP=
4038fi
4039if test -z "$CPP"; then
4040 if test "${ac_cv_prog_CPP+set}" = set; then
4041 echo $ECHO_N "(cached) $ECHO_C" >&6
4042else
4043 # Double quotes because CPP needs to be expanded
4044 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4045 do
4046 ac_preproc_ok=false
4047for ac_c_preproc_warn_flag in '' yes
4048do
4049 # Use a header file that comes with gcc, so configuring glibc
4050 # with a fresh cross-compiler works.
4051 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4052 # <limits.h> exists even on freestanding compilers.
4053 # On the NeXT, cc -E runs the code through the compiler's parser,
4054 # not just through cpp. "Syntax error" is here to catch this case.
bf3b7cd3
JD
4055 cat >conftest.$ac_ext <<_ACEOF
4056/* confdefs.h. */
4057_ACEOF
4058cat confdefs.h >>conftest.$ac_ext
4059cat >>conftest.$ac_ext <<_ACEOF
4060/* end confdefs.h. */
60d26958
PB
4061#ifdef __STDC__
4062# include <limits.h>
4063#else
4064# include <assert.h>
4065#endif
4066 Syntax error
bf3b7cd3 4067_ACEOF
60d26958
PB
4068if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4069 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4070 ac_status=$?
4071 grep -v '^ *+' conftest.er1 >conftest.err
4072 rm -f conftest.er1
4073 cat conftest.err >&5
4074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4075 (exit $ac_status); } >/dev/null; then
4076 if test -s conftest.err; then
4077 ac_cpp_err=$ac_c_preproc_warn_flag
4078 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4079 else
4080 ac_cpp_err=
4081 fi
4082else
4083 ac_cpp_err=yes
4084fi
4085if test -z "$ac_cpp_err"; then
bf3b7cd3
JD
4086 :
4087else
60d26958
PB
4088 echo "$as_me: failed program was:" >&5
4089sed 's/^/| /' conftest.$ac_ext >&5
4090
4091 # Broken: fails on valid input.
4092continue
bf3b7cd3 4093fi
60d26958
PB
4094rm -f conftest.err conftest.$ac_ext
4095
4096 # OK, works on sane cases. Now check whether non-existent headers
4097 # can be detected and how.
4098 cat >conftest.$ac_ext <<_ACEOF
4099/* confdefs.h. */
4100_ACEOF
4101cat confdefs.h >>conftest.$ac_ext
4102cat >>conftest.$ac_ext <<_ACEOF
4103/* end confdefs.h. */
4104#include <ac_nonexistent.h>
4105_ACEOF
4106if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4107 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4108 ac_status=$?
4109 grep -v '^ *+' conftest.er1 >conftest.err
4110 rm -f conftest.er1
4111 cat conftest.err >&5
4112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4113 (exit $ac_status); } >/dev/null; then
4114 if test -s conftest.err; then
4115 ac_cpp_err=$ac_c_preproc_warn_flag
4116 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4117 else
4118 ac_cpp_err=
4119 fi
4120else
4121 ac_cpp_err=yes
4122fi
4123if test -z "$ac_cpp_err"; then
4124 # Broken: success on invalid input.
4125continue
4126else
4127 echo "$as_me: failed program was:" >&5
4128sed 's/^/| /' conftest.$ac_ext >&5
bf3b7cd3 4129
60d26958
PB
4130 # Passes both tests.
4131ac_preproc_ok=:
4132break
bf3b7cd3 4133fi
60d26958 4134rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4135
60d26958
PB
4136done
4137# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4138rm -f conftest.err conftest.$ac_ext
4139if $ac_preproc_ok; then
4140 break
4141fi
4142
4143 done
4144 ac_cv_prog_CPP=$CPP
4145
4146fi
4147 CPP=$ac_cv_prog_CPP
4148else
4149 ac_cv_prog_CPP=$CPP
4150fi
4151echo "$as_me:$LINENO: result: $CPP" >&5
4152echo "${ECHO_T}$CPP" >&6
4153ac_preproc_ok=false
4154for ac_c_preproc_warn_flag in '' yes
4155do
4156 # Use a header file that comes with gcc, so configuring glibc
4157 # with a fresh cross-compiler works.
4158 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4159 # <limits.h> exists even on freestanding compilers.
4160 # On the NeXT, cc -E runs the code through the compiler's parser,
4161 # not just through cpp. "Syntax error" is here to catch this case.
bf3b7cd3
JD
4162 cat >conftest.$ac_ext <<_ACEOF
4163/* confdefs.h. */
4164_ACEOF
4165cat confdefs.h >>conftest.$ac_ext
4166cat >>conftest.$ac_ext <<_ACEOF
4167/* end confdefs.h. */
60d26958
PB
4168#ifdef __STDC__
4169# include <limits.h>
4170#else
4171# include <assert.h>
4172#endif
4173 Syntax error
bf3b7cd3 4174_ACEOF
60d26958
PB
4175if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4176 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4177 ac_status=$?
4178 grep -v '^ *+' conftest.er1 >conftest.err
4179 rm -f conftest.er1
4180 cat conftest.err >&5
4181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4182 (exit $ac_status); } >/dev/null; then
4183 if test -s conftest.err; then
4184 ac_cpp_err=$ac_c_preproc_warn_flag
4185 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4186 else
4187 ac_cpp_err=
4188 fi
bf3b7cd3 4189else
60d26958 4190 ac_cpp_err=yes
bf3b7cd3 4191fi
60d26958
PB
4192if test -z "$ac_cpp_err"; then
4193 :
4194else
4195 echo "$as_me: failed program was:" >&5
4196sed 's/^/| /' conftest.$ac_ext >&5
bf3b7cd3 4197
60d26958
PB
4198 # Broken: fails on valid input.
4199continue
bf3b7cd3 4200fi
60d26958 4201rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4202
60d26958
PB
4203 # OK, works on sane cases. Now check whether non-existent headers
4204 # can be detected and how.
bf3b7cd3
JD
4205 cat >conftest.$ac_ext <<_ACEOF
4206/* confdefs.h. */
4207_ACEOF
4208cat confdefs.h >>conftest.$ac_ext
4209cat >>conftest.$ac_ext <<_ACEOF
4210/* end confdefs.h. */
60d26958 4211#include <ac_nonexistent.h>
bf3b7cd3 4212_ACEOF
60d26958
PB
4213if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4214 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
bf3b7cd3 4215 ac_status=$?
60d26958
PB
4216 grep -v '^ *+' conftest.er1 >conftest.err
4217 rm -f conftest.er1
4218 cat conftest.err >&5
bf3b7cd3 4219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
60d26958
PB
4220 (exit $ac_status); } >/dev/null; then
4221 if test -s conftest.err; then
4222 ac_cpp_err=$ac_c_preproc_warn_flag
4223 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4224 else
4225 ac_cpp_err=
4226 fi
bf3b7cd3 4227else
60d26958
PB
4228 ac_cpp_err=yes
4229fi
4230if test -z "$ac_cpp_err"; then
4231 # Broken: success on invalid input.
4232continue
4233else
4234 echo "$as_me: failed program was:" >&5
bf3b7cd3
JD
4235sed 's/^/| /' conftest.$ac_ext >&5
4236
60d26958
PB
4237 # Passes both tests.
4238ac_preproc_ok=:
4239break
1a4b763e 4240fi
60d26958 4241rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4242
60d26958
PB
4243done
4244# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4245rm -f conftest.err conftest.$ac_ext
4246if $ac_preproc_ok; then
4247 :
4248else
4249 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4250See \`config.log' for more details." >&5
4251echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4252See \`config.log' for more details." >&2;}
4253 { (exit 1); exit 1; }; }
bf3b7cd3
JD
4254fi
4255
60d26958
PB
4256ac_ext=c
4257ac_cpp='$CPP $CPPFLAGS'
4258ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4259ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4260ac_compiler_gnu=$ac_cv_c_compiler_gnu
bf3b7cd3 4261
60d26958
PB
4262echo "$as_me:$LINENO: checking for inline" >&5
4263echo $ECHO_N "checking for inline... $ECHO_C" >&6
4264if test "${ac_cv_c_inline+set}" = set; then
bf3b7cd3
JD
4265 echo $ECHO_N "(cached) $ECHO_C" >&6
4266else
60d26958
PB
4267 ac_cv_c_inline=no
4268for ac_kw in inline __inline__ __inline; do
bf3b7cd3
JD
4269 cat >conftest.$ac_ext <<_ACEOF
4270/* confdefs.h. */
4271_ACEOF
4272cat confdefs.h >>conftest.$ac_ext
4273cat >>conftest.$ac_ext <<_ACEOF
4274/* end confdefs.h. */
60d26958
PB
4275#ifndef __cplusplus
4276typedef int foo_t;
4277static $ac_kw foo_t static_foo () {return 0; }
4278$ac_kw foo_t foo () {return 0; }
4279#endif
bf3b7cd3 4280
bf3b7cd3
JD
4281_ACEOF
4282rm -f conftest.$ac_objext
b61ff9c8
BS
4283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4284 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4285 ac_status=$?
4286 grep -v '^ *+' conftest.er1 >conftest.err
4287 rm -f conftest.er1
4288 cat conftest.err >&5
4289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4290 (exit $ac_status); } &&
4291 { ac_try='test -z "$ac_c_werror_flag"
4292 || test ! -s conftest.err'
4293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4294 (eval $ac_try) 2>&5
4295 ac_status=$?
4296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4297 (exit $ac_status); }; } &&
4298 { ac_try='test -s conftest.$ac_objext'
4299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4300 (eval $ac_try) 2>&5
4301 ac_status=$?
4302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4303 (exit $ac_status); }; }; then
60d26958 4304 ac_cv_c_inline=$ac_kw; break
bf3b7cd3
JD
4305else
4306 echo "$as_me: failed program was:" >&5
4307sed 's/^/| /' conftest.$ac_ext >&5
4308
bf3b7cd3 4309fi
b61ff9c8 4310rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
60d26958 4311done
bf3b7cd3
JD
4312
4313fi
60d26958
PB
4314echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
4315echo "${ECHO_T}$ac_cv_c_inline" >&6
bf3b7cd3 4316
60d26958
PB
4317
4318case $ac_cv_c_inline in
4319 inline | yes) ;;
4320 *)
4321 case $ac_cv_c_inline in
4322 no) ac_val=;;
4323 *) ac_val=$ac_cv_c_inline;;
4324 esac
4325 cat >>confdefs.h <<_ACEOF
4326#ifndef __cplusplus
4327#define inline $ac_val
4328#endif
4329_ACEOF
4330 ;;
4331esac
bf3b7cd3
JD
4332
4333
60d26958 4334# sizeof(char) is 1 by definition.
b61ff9c8
BS
4335echo "$as_me:$LINENO: checking for void *" >&5
4336echo $ECHO_N "checking for void *... $ECHO_C" >&6
bf3b7cd3
JD
4337if test "${ac_cv_type_void_p+set}" = set; then
4338 echo $ECHO_N "(cached) $ECHO_C" >&6
4339else
4340 cat >conftest.$ac_ext <<_ACEOF
4341/* confdefs.h. */
4342_ACEOF
4343cat confdefs.h >>conftest.$ac_ext
4344cat >>conftest.$ac_ext <<_ACEOF
4345/* end confdefs.h. */
4346$ac_includes_default
4347int
4348main ()
4349{
b61ff9c8 4350if ((void * *) 0)
bf3b7cd3 4351 return 0;
b61ff9c8 4352if (sizeof (void *))
bf3b7cd3
JD
4353 return 0;
4354 ;
4355 return 0;
4356}
4357_ACEOF
4358rm -f conftest.$ac_objext
b61ff9c8
BS
4359if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4360 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4361 ac_status=$?
4362 grep -v '^ *+' conftest.er1 >conftest.err
4363 rm -f conftest.er1
4364 cat conftest.err >&5
4365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4366 (exit $ac_status); } &&
4367 { ac_try='test -z "$ac_c_werror_flag"
4368 || test ! -s conftest.err'
4369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4370 (eval $ac_try) 2>&5
4371 ac_status=$?
4372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4373 (exit $ac_status); }; } &&
4374 { ac_try='test -s conftest.$ac_objext'
4375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4376 (eval $ac_try) 2>&5
4377 ac_status=$?
4378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4379 (exit $ac_status); }; }; then
bf3b7cd3
JD
4380 ac_cv_type_void_p=yes
4381else
4382 echo "$as_me: failed program was:" >&5
4383sed 's/^/| /' conftest.$ac_ext >&5
4384
b61ff9c8 4385ac_cv_type_void_p=no
bf3b7cd3 4386fi
b61ff9c8 4387rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4388fi
b61ff9c8
BS
4389echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
4390echo "${ECHO_T}$ac_cv_type_void_p" >&6
bf3b7cd3 4391
b61ff9c8
BS
4392echo "$as_me:$LINENO: checking size of void *" >&5
4393echo $ECHO_N "checking size of void *... $ECHO_C" >&6
ba479fd2
NN
4394if test "${ac_cv_sizeof_void_p+set}" = set; then
4395 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 4396else
b61ff9c8
BS
4397 if test "$ac_cv_type_void_p" = yes; then
4398 # The cast to unsigned long works around a bug in the HP C Compiler
4399 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4400 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4401 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4402 if test "$cross_compiling" = yes; then
4403 # Depending upon the size, compute the lo and hi bounds.
4404cat >conftest.$ac_ext <<_ACEOF
4405/* confdefs.h. */
4406_ACEOF
4407cat confdefs.h >>conftest.$ac_ext
4408cat >>conftest.$ac_ext <<_ACEOF
4409/* end confdefs.h. */
4410$ac_includes_default
4411int
4412main ()
4413{
b61ff9c8 4414static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
bf3b7cd3
JD
4415test_array [0] = 0
4416
4417 ;
4418 return 0;
4419}
4420_ACEOF
4421rm -f conftest.$ac_objext
b61ff9c8
BS
4422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4423 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4424 ac_status=$?
4425 grep -v '^ *+' conftest.er1 >conftest.err
4426 rm -f conftest.er1
4427 cat conftest.err >&5
4428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4429 (exit $ac_status); } &&
4430 { ac_try='test -z "$ac_c_werror_flag"
4431 || test ! -s conftest.err'
4432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4433 (eval $ac_try) 2>&5
4434 ac_status=$?
4435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4436 (exit $ac_status); }; } &&
4437 { ac_try='test -s conftest.$ac_objext'
4438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4439 (eval $ac_try) 2>&5
4440 ac_status=$?
4441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4442 (exit $ac_status); }; }; then
bf3b7cd3
JD
4443 ac_lo=0 ac_mid=0
4444 while :; do
4445 cat >conftest.$ac_ext <<_ACEOF
4446/* confdefs.h. */
4447_ACEOF
4448cat confdefs.h >>conftest.$ac_ext
4449cat >>conftest.$ac_ext <<_ACEOF
4450/* end confdefs.h. */
4451$ac_includes_default
4452int
4453main ()
4454{
b61ff9c8 4455static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
4456test_array [0] = 0
4457
4458 ;
4459 return 0;
4460}
4461_ACEOF
4462rm -f conftest.$ac_objext
b61ff9c8
BS
4463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4464 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4465 ac_status=$?
4466 grep -v '^ *+' conftest.er1 >conftest.err
4467 rm -f conftest.er1
4468 cat conftest.err >&5
4469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4470 (exit $ac_status); } &&
4471 { ac_try='test -z "$ac_c_werror_flag"
4472 || test ! -s conftest.err'
4473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4474 (eval $ac_try) 2>&5
4475 ac_status=$?
4476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4477 (exit $ac_status); }; } &&
4478 { ac_try='test -s conftest.$ac_objext'
4479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4480 (eval $ac_try) 2>&5
4481 ac_status=$?
4482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4483 (exit $ac_status); }; }; then
bf3b7cd3
JD
4484 ac_hi=$ac_mid; break
4485else
4486 echo "$as_me: failed program was:" >&5
4487sed 's/^/| /' conftest.$ac_ext >&5
4488
b61ff9c8
BS
4489ac_lo=`expr $ac_mid + 1`
4490 if test $ac_lo -le $ac_mid; then
4491 ac_lo= ac_hi=
4492 break
4493 fi
4494 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4495fi
b61ff9c8 4496rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4497 done
4498else
4499 echo "$as_me: failed program was:" >&5
4500sed 's/^/| /' conftest.$ac_ext >&5
4501
b61ff9c8 4502cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4503/* confdefs.h. */
4504_ACEOF
4505cat confdefs.h >>conftest.$ac_ext
4506cat >>conftest.$ac_ext <<_ACEOF
4507/* end confdefs.h. */
4508$ac_includes_default
4509int
4510main ()
4511{
b61ff9c8 4512static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
bf3b7cd3
JD
4513test_array [0] = 0
4514
4515 ;
4516 return 0;
4517}
4518_ACEOF
4519rm -f conftest.$ac_objext
b61ff9c8
BS
4520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4521 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4522 ac_status=$?
4523 grep -v '^ *+' conftest.er1 >conftest.err
4524 rm -f conftest.er1
4525 cat conftest.err >&5
4526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4527 (exit $ac_status); } &&
4528 { ac_try='test -z "$ac_c_werror_flag"
4529 || test ! -s conftest.err'
4530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4531 (eval $ac_try) 2>&5
4532 ac_status=$?
4533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4534 (exit $ac_status); }; } &&
4535 { ac_try='test -s conftest.$ac_objext'
4536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4537 (eval $ac_try) 2>&5
4538 ac_status=$?
4539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4540 (exit $ac_status); }; }; then
bf3b7cd3
JD
4541 ac_hi=-1 ac_mid=-1
4542 while :; do
4543 cat >conftest.$ac_ext <<_ACEOF
4544/* confdefs.h. */
4545_ACEOF
4546cat confdefs.h >>conftest.$ac_ext
4547cat >>conftest.$ac_ext <<_ACEOF
4548/* end confdefs.h. */
4549$ac_includes_default
4550int
4551main ()
4552{
b61ff9c8 4553static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
bf3b7cd3
JD
4554test_array [0] = 0
4555
4556 ;
4557 return 0;
4558}
4559_ACEOF
4560rm -f conftest.$ac_objext
b61ff9c8
BS
4561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4562 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4563 ac_status=$?
4564 grep -v '^ *+' conftest.er1 >conftest.err
4565 rm -f conftest.er1
4566 cat conftest.err >&5
4567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4568 (exit $ac_status); } &&
4569 { ac_try='test -z "$ac_c_werror_flag"
4570 || test ! -s conftest.err'
4571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4572 (eval $ac_try) 2>&5
4573 ac_status=$?
4574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4575 (exit $ac_status); }; } &&
4576 { ac_try='test -s conftest.$ac_objext'
4577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4578 (eval $ac_try) 2>&5
4579 ac_status=$?
4580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4581 (exit $ac_status); }; }; then
bf3b7cd3
JD
4582 ac_lo=$ac_mid; break
4583else
4584 echo "$as_me: failed program was:" >&5
4585sed 's/^/| /' conftest.$ac_ext >&5
4586
b61ff9c8
BS
4587ac_hi=`expr '(' $ac_mid ')' - 1`
4588 if test $ac_mid -le $ac_hi; then
4589 ac_lo= ac_hi=
4590 break
4591 fi
4592 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4593fi
b61ff9c8 4594rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4595 done
4596else
4597 echo "$as_me: failed program was:" >&5
4598sed 's/^/| /' conftest.$ac_ext >&5
4599
b61ff9c8 4600ac_lo= ac_hi=
bf3b7cd3 4601fi
b61ff9c8 4602rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4603fi
b61ff9c8 4604rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4605# Binary search between lo and hi bounds.
4606while test "x$ac_lo" != "x$ac_hi"; do
4607 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4608 cat >conftest.$ac_ext <<_ACEOF
4609/* confdefs.h. */
4610_ACEOF
4611cat confdefs.h >>conftest.$ac_ext
4612cat >>conftest.$ac_ext <<_ACEOF
4613/* end confdefs.h. */
4614$ac_includes_default
4615int
4616main ()
4617{
b61ff9c8 4618static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
4619test_array [0] = 0
4620
4621 ;
4622 return 0;
4623}
4624_ACEOF
4625rm -f conftest.$ac_objext
b61ff9c8
BS
4626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4627 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4628 ac_status=$?
4629 grep -v '^ *+' conftest.er1 >conftest.err
4630 rm -f conftest.er1
4631 cat conftest.err >&5
4632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4633 (exit $ac_status); } &&
4634 { ac_try='test -z "$ac_c_werror_flag"
4635 || test ! -s conftest.err'
4636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4637 (eval $ac_try) 2>&5
4638 ac_status=$?
4639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4640 (exit $ac_status); }; } &&
4641 { ac_try='test -s conftest.$ac_objext'
4642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4643 (eval $ac_try) 2>&5
4644 ac_status=$?
4645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4646 (exit $ac_status); }; }; then
bf3b7cd3
JD
4647 ac_hi=$ac_mid
4648else
4649 echo "$as_me: failed program was:" >&5
4650sed 's/^/| /' conftest.$ac_ext >&5
4651
b61ff9c8 4652ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 4653fi
b61ff9c8 4654rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4655done
4656case $ac_lo in
4657?*) ac_cv_sizeof_void_p=$ac_lo;;
b61ff9c8 4658'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 4659See \`config.log' for more details." >&5
b61ff9c8 4660echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 4661See \`config.log' for more details." >&2;}
b61ff9c8 4662 { (exit 1); exit 1; }; } ;;
bf3b7cd3 4663esac
b61ff9c8
BS
4664else
4665 if test "$cross_compiling" = yes; then
4666 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4667See \`config.log' for more details." >&5
4668echo "$as_me: error: cannot run test program while cross compiling
4669See \`config.log' for more details." >&2;}
4670 { (exit 1); exit 1; }; }
bf3b7cd3
JD
4671else
4672 cat >conftest.$ac_ext <<_ACEOF
4673/* confdefs.h. */
4674_ACEOF
4675cat confdefs.h >>conftest.$ac_ext
4676cat >>conftest.$ac_ext <<_ACEOF
4677/* end confdefs.h. */
4678$ac_includes_default
b61ff9c8
BS
4679long longval () { return (long) (sizeof (void *)); }
4680unsigned long ulongval () { return (long) (sizeof (void *)); }
bf3b7cd3
JD
4681#include <stdio.h>
4682#include <stdlib.h>
4683int
4684main ()
4685{
4686
4687 FILE *f = fopen ("conftest.val", "w");
4688 if (! f)
b61ff9c8
BS
4689 exit (1);
4690 if (((long) (sizeof (void *))) < 0)
bf3b7cd3 4691 {
b61ff9c8
BS
4692 long i = longval ();
4693 if (i != ((long) (sizeof (void *))))
4694 exit (1);
bf3b7cd3
JD
4695 fprintf (f, "%ld\n", i);
4696 }
4697 else
4698 {
b61ff9c8
BS
4699 unsigned long i = ulongval ();
4700 if (i != ((long) (sizeof (void *))))
4701 exit (1);
bf3b7cd3
JD
4702 fprintf (f, "%lu\n", i);
4703 }
b61ff9c8 4704 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
4705
4706 ;
4707 return 0;
4708}
4709_ACEOF
4710rm -f conftest$ac_exeext
b61ff9c8
BS
4711if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4712 (eval $ac_link) 2>&5
bf3b7cd3
JD
4713 ac_status=$?
4714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4715 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
4716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4717 (eval $ac_try) 2>&5
bf3b7cd3
JD
4718 ac_status=$?
4719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4720 (exit $ac_status); }; }; then
4721 ac_cv_sizeof_void_p=`cat conftest.val`
4722else
4723 echo "$as_me: program exited with status $ac_status" >&5
4724echo "$as_me: failed program was:" >&5
4725sed 's/^/| /' conftest.$ac_ext >&5
4726
4727( exit $ac_status )
b61ff9c8 4728{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 4729See \`config.log' for more details." >&5
b61ff9c8 4730echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 4731See \`config.log' for more details." >&2;}
b61ff9c8
BS
4732 { (exit 1); exit 1; }; }
4733fi
4734rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4735fi
4736fi
4737rm -f conftest.val
b61ff9c8
BS
4738else
4739 ac_cv_sizeof_void_p=0
bf3b7cd3 4740fi
b61ff9c8
BS
4741fi
4742echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
4743echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
bf3b7cd3
JD
4744cat >>confdefs.h <<_ACEOF
4745#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4746_ACEOF
4747
4748
b61ff9c8
BS
4749echo "$as_me:$LINENO: checking for short" >&5
4750echo $ECHO_N "checking for short... $ECHO_C" >&6
bf3b7cd3
JD
4751if test "${ac_cv_type_short+set}" = set; then
4752 echo $ECHO_N "(cached) $ECHO_C" >&6
4753else
4754 cat >conftest.$ac_ext <<_ACEOF
4755/* confdefs.h. */
4756_ACEOF
4757cat confdefs.h >>conftest.$ac_ext
4758cat >>conftest.$ac_ext <<_ACEOF
4759/* end confdefs.h. */
4760$ac_includes_default
4761int
4762main ()
4763{
b61ff9c8 4764if ((short *) 0)
bf3b7cd3 4765 return 0;
b61ff9c8 4766if (sizeof (short))
bf3b7cd3
JD
4767 return 0;
4768 ;
4769 return 0;
4770}
4771_ACEOF
4772rm -f conftest.$ac_objext
b61ff9c8
BS
4773if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4774 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4775 ac_status=$?
4776 grep -v '^ *+' conftest.er1 >conftest.err
4777 rm -f conftest.er1
4778 cat conftest.err >&5
4779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4780 (exit $ac_status); } &&
4781 { ac_try='test -z "$ac_c_werror_flag"
4782 || test ! -s conftest.err'
4783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4784 (eval $ac_try) 2>&5
4785 ac_status=$?
4786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4787 (exit $ac_status); }; } &&
4788 { ac_try='test -s conftest.$ac_objext'
4789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4790 (eval $ac_try) 2>&5
4791 ac_status=$?
4792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4793 (exit $ac_status); }; }; then
bf3b7cd3
JD
4794 ac_cv_type_short=yes
4795else
4796 echo "$as_me: failed program was:" >&5
4797sed 's/^/| /' conftest.$ac_ext >&5
4798
b61ff9c8 4799ac_cv_type_short=no
bf3b7cd3 4800fi
b61ff9c8 4801rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4802fi
b61ff9c8
BS
4803echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
4804echo "${ECHO_T}$ac_cv_type_short" >&6
bf3b7cd3 4805
b61ff9c8
BS
4806echo "$as_me:$LINENO: checking size of short" >&5
4807echo $ECHO_N "checking size of short... $ECHO_C" >&6
bf3b7cd3
JD
4808if test "${ac_cv_sizeof_short+set}" = set; then
4809 echo $ECHO_N "(cached) $ECHO_C" >&6
4810else
b61ff9c8
BS
4811 if test "$ac_cv_type_short" = yes; then
4812 # The cast to unsigned long works around a bug in the HP C Compiler
4813 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4814 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4815 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4816 if test "$cross_compiling" = yes; then
4817 # Depending upon the size, compute the lo and hi bounds.
4818cat >conftest.$ac_ext <<_ACEOF
4819/* confdefs.h. */
4820_ACEOF
4821cat confdefs.h >>conftest.$ac_ext
4822cat >>conftest.$ac_ext <<_ACEOF
4823/* end confdefs.h. */
4824$ac_includes_default
4825int
4826main ()
4827{
b61ff9c8 4828static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
bf3b7cd3
JD
4829test_array [0] = 0
4830
4831 ;
4832 return 0;
4833}
4834_ACEOF
4835rm -f conftest.$ac_objext
b61ff9c8
BS
4836if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4837 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4838 ac_status=$?
4839 grep -v '^ *+' conftest.er1 >conftest.err
4840 rm -f conftest.er1
4841 cat conftest.err >&5
4842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4843 (exit $ac_status); } &&
4844 { ac_try='test -z "$ac_c_werror_flag"
4845 || test ! -s conftest.err'
4846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4847 (eval $ac_try) 2>&5
4848 ac_status=$?
4849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4850 (exit $ac_status); }; } &&
4851 { ac_try='test -s conftest.$ac_objext'
4852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4853 (eval $ac_try) 2>&5
4854 ac_status=$?
4855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4856 (exit $ac_status); }; }; then
bf3b7cd3
JD
4857 ac_lo=0 ac_mid=0
4858 while :; do
4859 cat >conftest.$ac_ext <<_ACEOF
4860/* confdefs.h. */
4861_ACEOF
4862cat confdefs.h >>conftest.$ac_ext
4863cat >>conftest.$ac_ext <<_ACEOF
4864/* end confdefs.h. */
4865$ac_includes_default
4866int
4867main ()
4868{
b61ff9c8 4869static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
4870test_array [0] = 0
4871
4872 ;
4873 return 0;
4874}
4875_ACEOF
4876rm -f conftest.$ac_objext
b61ff9c8
BS
4877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4878 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4879 ac_status=$?
4880 grep -v '^ *+' conftest.er1 >conftest.err
4881 rm -f conftest.er1
4882 cat conftest.err >&5
4883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4884 (exit $ac_status); } &&
4885 { ac_try='test -z "$ac_c_werror_flag"
4886 || test ! -s conftest.err'
4887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4888 (eval $ac_try) 2>&5
4889 ac_status=$?
4890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4891 (exit $ac_status); }; } &&
4892 { ac_try='test -s conftest.$ac_objext'
4893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4894 (eval $ac_try) 2>&5
4895 ac_status=$?
4896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4897 (exit $ac_status); }; }; then
bf3b7cd3
JD
4898 ac_hi=$ac_mid; break
4899else
4900 echo "$as_me: failed program was:" >&5
4901sed 's/^/| /' conftest.$ac_ext >&5
4902
b61ff9c8
BS
4903ac_lo=`expr $ac_mid + 1`
4904 if test $ac_lo -le $ac_mid; then
4905 ac_lo= ac_hi=
4906 break
4907 fi
4908 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4909fi
b61ff9c8 4910rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4911 done
4912else
4913 echo "$as_me: failed program was:" >&5
4914sed 's/^/| /' conftest.$ac_ext >&5
4915
b61ff9c8 4916cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4917/* confdefs.h. */
4918_ACEOF
4919cat confdefs.h >>conftest.$ac_ext
4920cat >>conftest.$ac_ext <<_ACEOF
4921/* end confdefs.h. */
4922$ac_includes_default
4923int
4924main ()
4925{
b61ff9c8 4926static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
bf3b7cd3
JD
4927test_array [0] = 0
4928
4929 ;
4930 return 0;
4931}
4932_ACEOF
4933rm -f conftest.$ac_objext
b61ff9c8
BS
4934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4935 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4936 ac_status=$?
4937 grep -v '^ *+' conftest.er1 >conftest.err
4938 rm -f conftest.er1
4939 cat conftest.err >&5
4940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4941 (exit $ac_status); } &&
4942 { ac_try='test -z "$ac_c_werror_flag"
4943 || test ! -s conftest.err'
4944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4945 (eval $ac_try) 2>&5
4946 ac_status=$?
4947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4948 (exit $ac_status); }; } &&
4949 { ac_try='test -s conftest.$ac_objext'
4950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4951 (eval $ac_try) 2>&5
4952 ac_status=$?
4953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4954 (exit $ac_status); }; }; then
bf3b7cd3
JD
4955 ac_hi=-1 ac_mid=-1
4956 while :; do
4957 cat >conftest.$ac_ext <<_ACEOF
4958/* confdefs.h. */
4959_ACEOF
4960cat confdefs.h >>conftest.$ac_ext
4961cat >>conftest.$ac_ext <<_ACEOF
4962/* end confdefs.h. */
4963$ac_includes_default
4964int
4965main ()
4966{
b61ff9c8 4967static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
bf3b7cd3
JD
4968test_array [0] = 0
4969
4970 ;
4971 return 0;
4972}
4973_ACEOF
4974rm -f conftest.$ac_objext
b61ff9c8
BS
4975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4976 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4977 ac_status=$?
4978 grep -v '^ *+' conftest.er1 >conftest.err
4979 rm -f conftest.er1
4980 cat conftest.err >&5
4981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4982 (exit $ac_status); } &&
4983 { ac_try='test -z "$ac_c_werror_flag"
4984 || test ! -s conftest.err'
4985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4986 (eval $ac_try) 2>&5
4987 ac_status=$?
4988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4989 (exit $ac_status); }; } &&
4990 { ac_try='test -s conftest.$ac_objext'
4991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4992 (eval $ac_try) 2>&5
4993 ac_status=$?
4994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4995 (exit $ac_status); }; }; then
bf3b7cd3
JD
4996 ac_lo=$ac_mid; break
4997else
4998 echo "$as_me: failed program was:" >&5
4999sed 's/^/| /' conftest.$ac_ext >&5
5000
b61ff9c8
BS
5001ac_hi=`expr '(' $ac_mid ')' - 1`
5002 if test $ac_mid -le $ac_hi; then
5003 ac_lo= ac_hi=
5004 break
5005 fi
5006 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5007fi
b61ff9c8 5008rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5009 done
5010else
5011 echo "$as_me: failed program was:" >&5
5012sed 's/^/| /' conftest.$ac_ext >&5
5013
b61ff9c8 5014ac_lo= ac_hi=
bf3b7cd3 5015fi
b61ff9c8 5016rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5017fi
b61ff9c8 5018rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5019# Binary search between lo and hi bounds.
5020while test "x$ac_lo" != "x$ac_hi"; do
5021 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5022 cat >conftest.$ac_ext <<_ACEOF
5023/* confdefs.h. */
5024_ACEOF
5025cat confdefs.h >>conftest.$ac_ext
5026cat >>conftest.$ac_ext <<_ACEOF
5027/* end confdefs.h. */
5028$ac_includes_default
5029int
5030main ()
5031{
b61ff9c8 5032static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
5033test_array [0] = 0
5034
5035 ;
5036 return 0;
5037}
5038_ACEOF
5039rm -f conftest.$ac_objext
b61ff9c8
BS
5040if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5041 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5042 ac_status=$?
5043 grep -v '^ *+' conftest.er1 >conftest.err
5044 rm -f conftest.er1
5045 cat conftest.err >&5
5046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5047 (exit $ac_status); } &&
5048 { ac_try='test -z "$ac_c_werror_flag"
5049 || test ! -s conftest.err'
5050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5051 (eval $ac_try) 2>&5
5052 ac_status=$?
5053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5054 (exit $ac_status); }; } &&
5055 { ac_try='test -s conftest.$ac_objext'
5056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5057 (eval $ac_try) 2>&5
5058 ac_status=$?
5059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5060 (exit $ac_status); }; }; then
bf3b7cd3
JD
5061 ac_hi=$ac_mid
5062else
5063 echo "$as_me: failed program was:" >&5
5064sed 's/^/| /' conftest.$ac_ext >&5
5065
b61ff9c8 5066ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5067fi
b61ff9c8 5068rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5069done
5070case $ac_lo in
5071?*) ac_cv_sizeof_short=$ac_lo;;
b61ff9c8 5072'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 5073See \`config.log' for more details." >&5
b61ff9c8 5074echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 5075See \`config.log' for more details." >&2;}
b61ff9c8 5076 { (exit 1); exit 1; }; } ;;
bf3b7cd3 5077esac
b61ff9c8
BS
5078else
5079 if test "$cross_compiling" = yes; then
5080 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5081See \`config.log' for more details." >&5
5082echo "$as_me: error: cannot run test program while cross compiling
5083See \`config.log' for more details." >&2;}
5084 { (exit 1); exit 1; }; }
8b1f719a
PB
5085else
5086 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5087/* confdefs.h. */
5088_ACEOF
5089cat confdefs.h >>conftest.$ac_ext
5090cat >>conftest.$ac_ext <<_ACEOF
5091/* end confdefs.h. */
5092$ac_includes_default
b61ff9c8
BS
5093long longval () { return (long) (sizeof (short)); }
5094unsigned long ulongval () { return (long) (sizeof (short)); }
bf3b7cd3
JD
5095#include <stdio.h>
5096#include <stdlib.h>
5097int
5098main ()
5099{
5100
5101 FILE *f = fopen ("conftest.val", "w");
5102 if (! f)
b61ff9c8
BS
5103 exit (1);
5104 if (((long) (sizeof (short))) < 0)
bf3b7cd3 5105 {
b61ff9c8
BS
5106 long i = longval ();
5107 if (i != ((long) (sizeof (short))))
5108 exit (1);
bf3b7cd3
JD
5109 fprintf (f, "%ld\n", i);
5110 }
5111 else
5112 {
b61ff9c8
BS
5113 unsigned long i = ulongval ();
5114 if (i != ((long) (sizeof (short))))
5115 exit (1);
bf3b7cd3
JD
5116 fprintf (f, "%lu\n", i);
5117 }
b61ff9c8 5118 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5119
5120 ;
5121 return 0;
5122}
5123_ACEOF
5124rm -f conftest$ac_exeext
b61ff9c8
BS
5125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5126 (eval $ac_link) 2>&5
bf3b7cd3
JD
5127 ac_status=$?
5128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5129 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5131 (eval $ac_try) 2>&5
bf3b7cd3
JD
5132 ac_status=$?
5133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5134 (exit $ac_status); }; }; then
5135 ac_cv_sizeof_short=`cat conftest.val`
5136else
5137 echo "$as_me: program exited with status $ac_status" >&5
5138echo "$as_me: failed program was:" >&5
5139sed 's/^/| /' conftest.$ac_ext >&5
5140
5141( exit $ac_status )
b61ff9c8 5142{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 5143See \`config.log' for more details." >&5
b61ff9c8 5144echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 5145See \`config.log' for more details." >&2;}
b61ff9c8
BS
5146 { (exit 1); exit 1; }; }
5147fi
5148rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5149fi
5150fi
5151rm -f conftest.val
b61ff9c8
BS
5152else
5153 ac_cv_sizeof_short=0
bf3b7cd3 5154fi
b61ff9c8
BS
5155fi
5156echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
5157echo "${ECHO_T}$ac_cv_sizeof_short" >&6
bf3b7cd3
JD
5158cat >>confdefs.h <<_ACEOF
5159#define SIZEOF_SHORT $ac_cv_sizeof_short
5160_ACEOF
5161
5162
b61ff9c8
BS
5163echo "$as_me:$LINENO: checking for int" >&5
5164echo $ECHO_N "checking for int... $ECHO_C" >&6
bf3b7cd3
JD
5165if test "${ac_cv_type_int+set}" = set; then
5166 echo $ECHO_N "(cached) $ECHO_C" >&6
5167else
5168 cat >conftest.$ac_ext <<_ACEOF
5169/* confdefs.h. */
5170_ACEOF
5171cat confdefs.h >>conftest.$ac_ext
5172cat >>conftest.$ac_ext <<_ACEOF
5173/* end confdefs.h. */
5174$ac_includes_default
5175int
5176main ()
5177{
b61ff9c8 5178if ((int *) 0)
bf3b7cd3 5179 return 0;
b61ff9c8 5180if (sizeof (int))
bf3b7cd3
JD
5181 return 0;
5182 ;
5183 return 0;
5184}
5185_ACEOF
5186rm -f conftest.$ac_objext
b61ff9c8
BS
5187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5188 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5189 ac_status=$?
5190 grep -v '^ *+' conftest.er1 >conftest.err
5191 rm -f conftest.er1
5192 cat conftest.err >&5
5193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5194 (exit $ac_status); } &&
5195 { ac_try='test -z "$ac_c_werror_flag"
5196 || test ! -s conftest.err'
5197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5198 (eval $ac_try) 2>&5
5199 ac_status=$?
5200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5201 (exit $ac_status); }; } &&
5202 { ac_try='test -s conftest.$ac_objext'
5203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5204 (eval $ac_try) 2>&5
5205 ac_status=$?
5206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5207 (exit $ac_status); }; }; then
bf3b7cd3
JD
5208 ac_cv_type_int=yes
5209else
5210 echo "$as_me: failed program was:" >&5
5211sed 's/^/| /' conftest.$ac_ext >&5
5212
b61ff9c8 5213ac_cv_type_int=no
bf3b7cd3 5214fi
b61ff9c8 5215rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5216fi
b61ff9c8
BS
5217echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5218echo "${ECHO_T}$ac_cv_type_int" >&6
bf3b7cd3 5219
b61ff9c8
BS
5220echo "$as_me:$LINENO: checking size of int" >&5
5221echo $ECHO_N "checking size of int... $ECHO_C" >&6
bf3b7cd3
JD
5222if test "${ac_cv_sizeof_int+set}" = set; then
5223 echo $ECHO_N "(cached) $ECHO_C" >&6
5224else
b61ff9c8
BS
5225 if test "$ac_cv_type_int" = yes; then
5226 # The cast to unsigned long works around a bug in the HP C Compiler
5227 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5228 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5229 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5230 if test "$cross_compiling" = yes; then
5231 # Depending upon the size, compute the lo and hi bounds.
5232cat >conftest.$ac_ext <<_ACEOF
5233/* confdefs.h. */
5234_ACEOF
5235cat confdefs.h >>conftest.$ac_ext
5236cat >>conftest.$ac_ext <<_ACEOF
5237/* end confdefs.h. */
5238$ac_includes_default
5239int
5240main ()
5241{
b61ff9c8 5242static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
bf3b7cd3
JD
5243test_array [0] = 0
5244
5245 ;
5246 return 0;
5247}
5248_ACEOF
5249rm -f conftest.$ac_objext
b61ff9c8
BS
5250if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5251 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5252 ac_status=$?
5253 grep -v '^ *+' conftest.er1 >conftest.err
5254 rm -f conftest.er1
5255 cat conftest.err >&5
5256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5257 (exit $ac_status); } &&
5258 { ac_try='test -z "$ac_c_werror_flag"
5259 || test ! -s conftest.err'
5260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5261 (eval $ac_try) 2>&5
5262 ac_status=$?
5263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5264 (exit $ac_status); }; } &&
5265 { ac_try='test -s conftest.$ac_objext'
5266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5267 (eval $ac_try) 2>&5
5268 ac_status=$?
5269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5270 (exit $ac_status); }; }; then
bf3b7cd3
JD
5271 ac_lo=0 ac_mid=0
5272 while :; do
5273 cat >conftest.$ac_ext <<_ACEOF
5274/* confdefs.h. */
5275_ACEOF
5276cat confdefs.h >>conftest.$ac_ext
5277cat >>conftest.$ac_ext <<_ACEOF
5278/* end confdefs.h. */
5279$ac_includes_default
5280int
5281main ()
5282{
b61ff9c8 5283static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
5284test_array [0] = 0
5285
5286 ;
5287 return 0;
5288}
5289_ACEOF
5290rm -f conftest.$ac_objext
b61ff9c8
BS
5291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5292 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5293 ac_status=$?
5294 grep -v '^ *+' conftest.er1 >conftest.err
5295 rm -f conftest.er1
5296 cat conftest.err >&5
5297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5298 (exit $ac_status); } &&
5299 { ac_try='test -z "$ac_c_werror_flag"
5300 || test ! -s conftest.err'
5301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5302 (eval $ac_try) 2>&5
5303 ac_status=$?
5304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5305 (exit $ac_status); }; } &&
5306 { ac_try='test -s conftest.$ac_objext'
5307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5308 (eval $ac_try) 2>&5
5309 ac_status=$?
5310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5311 (exit $ac_status); }; }; then
bf3b7cd3
JD
5312 ac_hi=$ac_mid; break
5313else
5314 echo "$as_me: failed program was:" >&5
5315sed 's/^/| /' conftest.$ac_ext >&5
5316
b61ff9c8
BS
5317ac_lo=`expr $ac_mid + 1`
5318 if test $ac_lo -le $ac_mid; then
5319 ac_lo= ac_hi=
5320 break
5321 fi
5322 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 5323fi
b61ff9c8 5324rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5325 done
5326else
5327 echo "$as_me: failed program was:" >&5
5328sed 's/^/| /' conftest.$ac_ext >&5
5329
b61ff9c8 5330cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5331/* confdefs.h. */
5332_ACEOF
5333cat confdefs.h >>conftest.$ac_ext
5334cat >>conftest.$ac_ext <<_ACEOF
5335/* end confdefs.h. */
5336$ac_includes_default
5337int
5338main ()
5339{
b61ff9c8 5340static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
bf3b7cd3
JD
5341test_array [0] = 0
5342
5343 ;
5344 return 0;
5345}
5346_ACEOF
5347rm -f conftest.$ac_objext
b61ff9c8
BS
5348if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5349 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5350 ac_status=$?
5351 grep -v '^ *+' conftest.er1 >conftest.err
5352 rm -f conftest.er1
5353 cat conftest.err >&5
5354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5355 (exit $ac_status); } &&
5356 { ac_try='test -z "$ac_c_werror_flag"
5357 || test ! -s conftest.err'
5358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5359 (eval $ac_try) 2>&5
5360 ac_status=$?
5361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5362 (exit $ac_status); }; } &&
5363 { ac_try='test -s conftest.$ac_objext'
5364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5365 (eval $ac_try) 2>&5
5366 ac_status=$?
5367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5368 (exit $ac_status); }; }; then
bf3b7cd3
JD
5369 ac_hi=-1 ac_mid=-1
5370 while :; do
5371 cat >conftest.$ac_ext <<_ACEOF
5372/* confdefs.h. */
5373_ACEOF
5374cat confdefs.h >>conftest.$ac_ext
5375cat >>conftest.$ac_ext <<_ACEOF
5376/* end confdefs.h. */
5377$ac_includes_default
5378int
5379main ()
5380{
b61ff9c8 5381static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
bf3b7cd3
JD
5382test_array [0] = 0
5383
5384 ;
5385 return 0;
5386}
5387_ACEOF
5388rm -f conftest.$ac_objext
b61ff9c8
BS
5389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5390 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5391 ac_status=$?
5392 grep -v '^ *+' conftest.er1 >conftest.err
5393 rm -f conftest.er1
5394 cat conftest.err >&5
5395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5396 (exit $ac_status); } &&
5397 { ac_try='test -z "$ac_c_werror_flag"
5398 || test ! -s conftest.err'
5399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5400 (eval $ac_try) 2>&5
5401 ac_status=$?
5402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5403 (exit $ac_status); }; } &&
5404 { ac_try='test -s conftest.$ac_objext'
5405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5406 (eval $ac_try) 2>&5
5407 ac_status=$?
5408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5409 (exit $ac_status); }; }; then
bf3b7cd3
JD
5410 ac_lo=$ac_mid; break
5411else
5412 echo "$as_me: failed program was:" >&5
5413sed 's/^/| /' conftest.$ac_ext >&5
5414
b61ff9c8
BS
5415ac_hi=`expr '(' $ac_mid ')' - 1`
5416 if test $ac_mid -le $ac_hi; then
5417 ac_lo= ac_hi=
5418 break
5419 fi
5420 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5421fi
b61ff9c8 5422rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5423 done
5424else
5425 echo "$as_me: failed program was:" >&5
5426sed 's/^/| /' conftest.$ac_ext >&5
5427
b61ff9c8 5428ac_lo= ac_hi=
bf3b7cd3 5429fi
b61ff9c8 5430rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5431fi
b61ff9c8 5432rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5433# Binary search between lo and hi bounds.
5434while test "x$ac_lo" != "x$ac_hi"; do
5435 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5436 cat >conftest.$ac_ext <<_ACEOF
5437/* confdefs.h. */
5438_ACEOF
5439cat confdefs.h >>conftest.$ac_ext
5440cat >>conftest.$ac_ext <<_ACEOF
5441/* end confdefs.h. */
5442$ac_includes_default
5443int
5444main ()
5445{
b61ff9c8 5446static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
5447test_array [0] = 0
5448
5449 ;
5450 return 0;
5451}
5452_ACEOF
5453rm -f conftest.$ac_objext
b61ff9c8
BS
5454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5455 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5456 ac_status=$?
5457 grep -v '^ *+' conftest.er1 >conftest.err
5458 rm -f conftest.er1
5459 cat conftest.err >&5
5460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5461 (exit $ac_status); } &&
5462 { ac_try='test -z "$ac_c_werror_flag"
5463 || test ! -s conftest.err'
5464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5465 (eval $ac_try) 2>&5
5466 ac_status=$?
5467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5468 (exit $ac_status); }; } &&
5469 { ac_try='test -s conftest.$ac_objext'
5470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5471 (eval $ac_try) 2>&5
5472 ac_status=$?
5473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5474 (exit $ac_status); }; }; then
bf3b7cd3
JD
5475 ac_hi=$ac_mid
5476else
5477 echo "$as_me: failed program was:" >&5
5478sed 's/^/| /' conftest.$ac_ext >&5
5479
b61ff9c8 5480ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5481fi
b61ff9c8 5482rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5483done
5484case $ac_lo in
5485?*) ac_cv_sizeof_int=$ac_lo;;
b61ff9c8 5486'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 5487See \`config.log' for more details." >&5
b61ff9c8 5488echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 5489See \`config.log' for more details." >&2;}
b61ff9c8 5490 { (exit 1); exit 1; }; } ;;
bf3b7cd3 5491esac
b61ff9c8
BS
5492else
5493 if test "$cross_compiling" = yes; then
5494 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5495See \`config.log' for more details." >&5
5496echo "$as_me: error: cannot run test program while cross compiling
5497See \`config.log' for more details." >&2;}
5498 { (exit 1); exit 1; }; }
bf3b7cd3
JD
5499else
5500 cat >conftest.$ac_ext <<_ACEOF
5501/* confdefs.h. */
5502_ACEOF
5503cat confdefs.h >>conftest.$ac_ext
5504cat >>conftest.$ac_ext <<_ACEOF
5505/* end confdefs.h. */
5506$ac_includes_default
b61ff9c8
BS
5507long longval () { return (long) (sizeof (int)); }
5508unsigned long ulongval () { return (long) (sizeof (int)); }
bf3b7cd3
JD
5509#include <stdio.h>
5510#include <stdlib.h>
5511int
5512main ()
5513{
5514
5515 FILE *f = fopen ("conftest.val", "w");
5516 if (! f)
b61ff9c8
BS
5517 exit (1);
5518 if (((long) (sizeof (int))) < 0)
bf3b7cd3 5519 {
b61ff9c8
BS
5520 long i = longval ();
5521 if (i != ((long) (sizeof (int))))
5522 exit (1);
bf3b7cd3
JD
5523 fprintf (f, "%ld\n", i);
5524 }
5525 else
5526 {
b61ff9c8
BS
5527 unsigned long i = ulongval ();
5528 if (i != ((long) (sizeof (int))))
5529 exit (1);
bf3b7cd3
JD
5530 fprintf (f, "%lu\n", i);
5531 }
b61ff9c8 5532 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5533
5534 ;
5535 return 0;
5536}
5537_ACEOF
5538rm -f conftest$ac_exeext
b61ff9c8
BS
5539if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5540 (eval $ac_link) 2>&5
bf3b7cd3
JD
5541 ac_status=$?
5542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5543 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5545 (eval $ac_try) 2>&5
bf3b7cd3
JD
5546 ac_status=$?
5547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5548 (exit $ac_status); }; }; then
5549 ac_cv_sizeof_int=`cat conftest.val`
5550else
5551 echo "$as_me: program exited with status $ac_status" >&5
5552echo "$as_me: failed program was:" >&5
5553sed 's/^/| /' conftest.$ac_ext >&5
5554
5555( exit $ac_status )
b61ff9c8 5556{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 5557See \`config.log' for more details." >&5
b61ff9c8 5558echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 5559See \`config.log' for more details." >&2;}
b61ff9c8
BS
5560 { (exit 1); exit 1; }; }
5561fi
5562rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5563fi
5564fi
5565rm -f conftest.val
b61ff9c8
BS
5566else
5567 ac_cv_sizeof_int=0
bf3b7cd3 5568fi
b61ff9c8
BS
5569fi
5570echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5571echo "${ECHO_T}$ac_cv_sizeof_int" >&6
bf3b7cd3
JD
5572cat >>confdefs.h <<_ACEOF
5573#define SIZEOF_INT $ac_cv_sizeof_int
5574_ACEOF
5575
5576
b61ff9c8
BS
5577echo "$as_me:$LINENO: checking for long" >&5
5578echo $ECHO_N "checking for long... $ECHO_C" >&6
bf3b7cd3
JD
5579if test "${ac_cv_type_long+set}" = set; then
5580 echo $ECHO_N "(cached) $ECHO_C" >&6
5581else
5582 cat >conftest.$ac_ext <<_ACEOF
5583/* confdefs.h. */
5584_ACEOF
5585cat confdefs.h >>conftest.$ac_ext
5586cat >>conftest.$ac_ext <<_ACEOF
5587/* end confdefs.h. */
5588$ac_includes_default
5589int
5590main ()
5591{
b61ff9c8 5592if ((long *) 0)
bf3b7cd3 5593 return 0;
b61ff9c8 5594if (sizeof (long))
bf3b7cd3
JD
5595 return 0;
5596 ;
5597 return 0;
5598}
5599_ACEOF
5600rm -f conftest.$ac_objext
b61ff9c8
BS
5601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5602 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5603 ac_status=$?
5604 grep -v '^ *+' conftest.er1 >conftest.err
5605 rm -f conftest.er1
5606 cat conftest.err >&5
5607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5608 (exit $ac_status); } &&
5609 { ac_try='test -z "$ac_c_werror_flag"
5610 || test ! -s conftest.err'
5611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5612 (eval $ac_try) 2>&5
5613 ac_status=$?
5614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5615 (exit $ac_status); }; } &&
5616 { ac_try='test -s conftest.$ac_objext'
5617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5618 (eval $ac_try) 2>&5
5619 ac_status=$?
5620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5621 (exit $ac_status); }; }; then
bf3b7cd3
JD
5622 ac_cv_type_long=yes
5623else
5624 echo "$as_me: failed program was:" >&5
5625sed 's/^/| /' conftest.$ac_ext >&5
5626
b61ff9c8 5627ac_cv_type_long=no
bf3b7cd3 5628fi
b61ff9c8 5629rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5630fi
b61ff9c8
BS
5631echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5632echo "${ECHO_T}$ac_cv_type_long" >&6
bf3b7cd3 5633
b61ff9c8
BS
5634echo "$as_me:$LINENO: checking size of long" >&5
5635echo $ECHO_N "checking size of long... $ECHO_C" >&6
bf3b7cd3
JD
5636if test "${ac_cv_sizeof_long+set}" = set; then
5637 echo $ECHO_N "(cached) $ECHO_C" >&6
5638else
b61ff9c8
BS
5639 if test "$ac_cv_type_long" = yes; then
5640 # The cast to unsigned long works around a bug in the HP C Compiler
5641 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5642 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5643 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5644 if test "$cross_compiling" = yes; then
5645 # Depending upon the size, compute the lo and hi bounds.
5646cat >conftest.$ac_ext <<_ACEOF
5647/* confdefs.h. */
5648_ACEOF
5649cat confdefs.h >>conftest.$ac_ext
5650cat >>conftest.$ac_ext <<_ACEOF
5651/* end confdefs.h. */
5652$ac_includes_default
5653int
5654main ()
5655{
b61ff9c8 5656static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
bf3b7cd3
JD
5657test_array [0] = 0
5658
5659 ;
5660 return 0;
5661}
5662_ACEOF
5663rm -f conftest.$ac_objext
b61ff9c8
BS
5664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5665 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5666 ac_status=$?
5667 grep -v '^ *+' conftest.er1 >conftest.err
5668 rm -f conftest.er1
5669 cat conftest.err >&5
5670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5671 (exit $ac_status); } &&
5672 { ac_try='test -z "$ac_c_werror_flag"
5673 || test ! -s conftest.err'
5674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5675 (eval $ac_try) 2>&5
5676 ac_status=$?
5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678 (exit $ac_status); }; } &&
5679 { ac_try='test -s conftest.$ac_objext'
5680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5681 (eval $ac_try) 2>&5
5682 ac_status=$?
5683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684 (exit $ac_status); }; }; then
bf3b7cd3
JD
5685 ac_lo=0 ac_mid=0
5686 while :; do
5687 cat >conftest.$ac_ext <<_ACEOF
5688/* confdefs.h. */
5689_ACEOF
5690cat confdefs.h >>conftest.$ac_ext
5691cat >>conftest.$ac_ext <<_ACEOF
5692/* end confdefs.h. */
5693$ac_includes_default
5694int
5695main ()
5696{
b61ff9c8 5697static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
5698test_array [0] = 0
5699
5700 ;
5701 return 0;
5702}
5703_ACEOF
5704rm -f conftest.$ac_objext
b61ff9c8
BS
5705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5706 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5707 ac_status=$?
5708 grep -v '^ *+' conftest.er1 >conftest.err
5709 rm -f conftest.er1
5710 cat conftest.err >&5
5711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5712 (exit $ac_status); } &&
5713 { ac_try='test -z "$ac_c_werror_flag"
5714 || test ! -s conftest.err'
5715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5716 (eval $ac_try) 2>&5
5717 ac_status=$?
5718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5719 (exit $ac_status); }; } &&
5720 { ac_try='test -s conftest.$ac_objext'
5721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5722 (eval $ac_try) 2>&5
5723 ac_status=$?
5724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5725 (exit $ac_status); }; }; then
bf3b7cd3
JD
5726 ac_hi=$ac_mid; break
5727else
5728 echo "$as_me: failed program was:" >&5
5729sed 's/^/| /' conftest.$ac_ext >&5
5730
b61ff9c8
BS
5731ac_lo=`expr $ac_mid + 1`
5732 if test $ac_lo -le $ac_mid; then
5733 ac_lo= ac_hi=
5734 break
5735 fi
5736 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 5737fi
b61ff9c8 5738rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5739 done
5740else
5741 echo "$as_me: failed program was:" >&5
5742sed 's/^/| /' conftest.$ac_ext >&5
5743
b61ff9c8 5744cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5745/* confdefs.h. */
5746_ACEOF
5747cat confdefs.h >>conftest.$ac_ext
5748cat >>conftest.$ac_ext <<_ACEOF
5749/* end confdefs.h. */
5750$ac_includes_default
5751int
5752main ()
5753{
b61ff9c8 5754static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
bf3b7cd3
JD
5755test_array [0] = 0
5756
5757 ;
5758 return 0;
5759}
5760_ACEOF
5761rm -f conftest.$ac_objext
b61ff9c8
BS
5762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5763 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5764 ac_status=$?
5765 grep -v '^ *+' conftest.er1 >conftest.err
5766 rm -f conftest.er1
5767 cat conftest.err >&5
5768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5769 (exit $ac_status); } &&
5770 { ac_try='test -z "$ac_c_werror_flag"
5771 || test ! -s conftest.err'
5772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5773 (eval $ac_try) 2>&5
5774 ac_status=$?
5775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5776 (exit $ac_status); }; } &&
5777 { ac_try='test -s conftest.$ac_objext'
5778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5779 (eval $ac_try) 2>&5
5780 ac_status=$?
5781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5782 (exit $ac_status); }; }; then
bf3b7cd3
JD
5783 ac_hi=-1 ac_mid=-1
5784 while :; do
5785 cat >conftest.$ac_ext <<_ACEOF
5786/* confdefs.h. */
5787_ACEOF
5788cat confdefs.h >>conftest.$ac_ext
5789cat >>conftest.$ac_ext <<_ACEOF
5790/* end confdefs.h. */
5791$ac_includes_default
5792int
5793main ()
5794{
b61ff9c8 5795static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
bf3b7cd3
JD
5796test_array [0] = 0
5797
5798 ;
5799 return 0;
5800}
5801_ACEOF
5802rm -f conftest.$ac_objext
b61ff9c8
BS
5803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5804 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5805 ac_status=$?
5806 grep -v '^ *+' conftest.er1 >conftest.err
5807 rm -f conftest.er1
5808 cat conftest.err >&5
5809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5810 (exit $ac_status); } &&
5811 { ac_try='test -z "$ac_c_werror_flag"
5812 || test ! -s conftest.err'
5813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5814 (eval $ac_try) 2>&5
5815 ac_status=$?
5816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5817 (exit $ac_status); }; } &&
5818 { ac_try='test -s conftest.$ac_objext'
5819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5820 (eval $ac_try) 2>&5
5821 ac_status=$?
5822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5823 (exit $ac_status); }; }; then
bf3b7cd3
JD
5824 ac_lo=$ac_mid; break
5825else
5826 echo "$as_me: failed program was:" >&5
5827sed 's/^/| /' conftest.$ac_ext >&5
5828
b61ff9c8
BS
5829ac_hi=`expr '(' $ac_mid ')' - 1`
5830 if test $ac_mid -le $ac_hi; then
5831 ac_lo= ac_hi=
5832 break
5833 fi
5834 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5835fi
b61ff9c8 5836rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5837 done
5838else
5839 echo "$as_me: failed program was:" >&5
5840sed 's/^/| /' conftest.$ac_ext >&5
5841
b61ff9c8 5842ac_lo= ac_hi=
bf3b7cd3 5843fi
b61ff9c8 5844rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5845fi
b61ff9c8 5846rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5847# Binary search between lo and hi bounds.
5848while test "x$ac_lo" != "x$ac_hi"; do
5849 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5850 cat >conftest.$ac_ext <<_ACEOF
5851/* confdefs.h. */
5852_ACEOF
5853cat confdefs.h >>conftest.$ac_ext
5854cat >>conftest.$ac_ext <<_ACEOF
5855/* end confdefs.h. */
5856$ac_includes_default
5857int
5858main ()
5859{
b61ff9c8 5860static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
5861test_array [0] = 0
5862
5863 ;
5864 return 0;
5865}
5866_ACEOF
5867rm -f conftest.$ac_objext
b61ff9c8
BS
5868if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5869 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5870 ac_status=$?
5871 grep -v '^ *+' conftest.er1 >conftest.err
5872 rm -f conftest.er1
5873 cat conftest.err >&5
5874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5875 (exit $ac_status); } &&
5876 { ac_try='test -z "$ac_c_werror_flag"
5877 || test ! -s conftest.err'
5878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5879 (eval $ac_try) 2>&5
5880 ac_status=$?
5881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5882 (exit $ac_status); }; } &&
5883 { ac_try='test -s conftest.$ac_objext'
5884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5885 (eval $ac_try) 2>&5
5886 ac_status=$?
5887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5888 (exit $ac_status); }; }; then
bf3b7cd3
JD
5889 ac_hi=$ac_mid
5890else
5891 echo "$as_me: failed program was:" >&5
5892sed 's/^/| /' conftest.$ac_ext >&5
5893
b61ff9c8 5894ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5895fi
b61ff9c8 5896rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5897done
5898case $ac_lo in
5899?*) ac_cv_sizeof_long=$ac_lo;;
b61ff9c8 5900'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 5901See \`config.log' for more details." >&5
b61ff9c8 5902echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 5903See \`config.log' for more details." >&2;}
b61ff9c8 5904 { (exit 1); exit 1; }; } ;;
bf3b7cd3 5905esac
b61ff9c8
BS
5906else
5907 if test "$cross_compiling" = yes; then
5908 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5909See \`config.log' for more details." >&5
5910echo "$as_me: error: cannot run test program while cross compiling
5911See \`config.log' for more details." >&2;}
5912 { (exit 1); exit 1; }; }
bf3b7cd3
JD
5913else
5914 cat >conftest.$ac_ext <<_ACEOF
5915/* confdefs.h. */
5916_ACEOF
5917cat confdefs.h >>conftest.$ac_ext
5918cat >>conftest.$ac_ext <<_ACEOF
5919/* end confdefs.h. */
5920$ac_includes_default
b61ff9c8
BS
5921long longval () { return (long) (sizeof (long)); }
5922unsigned long ulongval () { return (long) (sizeof (long)); }
bf3b7cd3
JD
5923#include <stdio.h>
5924#include <stdlib.h>
5925int
5926main ()
5927{
5928
5929 FILE *f = fopen ("conftest.val", "w");
5930 if (! f)
b61ff9c8
BS
5931 exit (1);
5932 if (((long) (sizeof (long))) < 0)
bf3b7cd3 5933 {
b61ff9c8
BS
5934 long i = longval ();
5935 if (i != ((long) (sizeof (long))))
5936 exit (1);
bf3b7cd3
JD
5937 fprintf (f, "%ld\n", i);
5938 }
5939 else
5940 {
b61ff9c8
BS
5941 unsigned long i = ulongval ();
5942 if (i != ((long) (sizeof (long))))
5943 exit (1);
bf3b7cd3
JD
5944 fprintf (f, "%lu\n", i);
5945 }
b61ff9c8 5946 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5947
5948 ;
5949 return 0;
5950}
5951_ACEOF
5952rm -f conftest$ac_exeext
b61ff9c8
BS
5953if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5954 (eval $ac_link) 2>&5
bf3b7cd3
JD
5955 ac_status=$?
5956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5957 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5959 (eval $ac_try) 2>&5
bf3b7cd3
JD
5960 ac_status=$?
5961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5962 (exit $ac_status); }; }; then
5963 ac_cv_sizeof_long=`cat conftest.val`
5964else
5965 echo "$as_me: program exited with status $ac_status" >&5
5966echo "$as_me: failed program was:" >&5
5967sed 's/^/| /' conftest.$ac_ext >&5
5968
5969( exit $ac_status )
b61ff9c8 5970{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 5971See \`config.log' for more details." >&5
b61ff9c8 5972echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 5973See \`config.log' for more details." >&2;}
b61ff9c8
BS
5974 { (exit 1); exit 1; }; }
5975fi
5976rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5977fi
5978fi
5979rm -f conftest.val
b61ff9c8
BS
5980else
5981 ac_cv_sizeof_long=0
bf3b7cd3 5982fi
b61ff9c8
BS
5983fi
5984echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5985echo "${ECHO_T}$ac_cv_sizeof_long" >&6
bf3b7cd3
JD
5986cat >>confdefs.h <<_ACEOF
5987#define SIZEOF_LONG $ac_cv_sizeof_long
5988_ACEOF
5989
5990
b61ff9c8
BS
5991echo "$as_me:$LINENO: checking for long long" >&5
5992echo $ECHO_N "checking for long long... $ECHO_C" >&6
5ec1c5e6
KC
5993if test "${ac_cv_type_long_long+set}" = set; then
5994 echo $ECHO_N "(cached) $ECHO_C" >&6
5995else
5996 cat >conftest.$ac_ext <<_ACEOF
5997/* confdefs.h. */
5998_ACEOF
5999cat confdefs.h >>conftest.$ac_ext
6000cat >>conftest.$ac_ext <<_ACEOF
6001/* end confdefs.h. */
6002$ac_includes_default
6003int
6004main ()
6005{
b61ff9c8 6006if ((long long *) 0)
5ec1c5e6 6007 return 0;
b61ff9c8 6008if (sizeof (long long))
5ec1c5e6
KC
6009 return 0;
6010 ;
6011 return 0;
6012}
6013_ACEOF
6014rm -f conftest.$ac_objext
b61ff9c8
BS
6015if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6016 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
6017 ac_status=$?
6018 grep -v '^ *+' conftest.er1 >conftest.err
6019 rm -f conftest.er1
6020 cat conftest.err >&5
6021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6022 (exit $ac_status); } &&
6023 { ac_try='test -z "$ac_c_werror_flag"
6024 || test ! -s conftest.err'
6025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6026 (eval $ac_try) 2>&5
6027 ac_status=$?
6028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6029 (exit $ac_status); }; } &&
6030 { ac_try='test -s conftest.$ac_objext'
6031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6032 (eval $ac_try) 2>&5
6033 ac_status=$?
6034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6035 (exit $ac_status); }; }; then
5ec1c5e6
KC
6036 ac_cv_type_long_long=yes
6037else
6038 echo "$as_me: failed program was:" >&5
6039sed 's/^/| /' conftest.$ac_ext >&5
6040
b61ff9c8 6041ac_cv_type_long_long=no
5ec1c5e6 6042fi
b61ff9c8 6043rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 6044fi
b61ff9c8
BS
6045echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
6046echo "${ECHO_T}$ac_cv_type_long_long" >&6
5ec1c5e6
KC
6047if test $ac_cv_type_long_long = yes; then
6048
6049cat >>confdefs.h <<_ACEOF
6050#define HAVE_LONG_LONG 1
6051_ACEOF
6052
b61ff9c8
BS
6053echo "$as_me:$LINENO: checking for long long" >&5
6054echo $ECHO_N "checking for long long... $ECHO_C" >&6
bf3b7cd3
JD
6055if test "${ac_cv_type_long_long+set}" = set; then
6056 echo $ECHO_N "(cached) $ECHO_C" >&6
6057else
6058 cat >conftest.$ac_ext <<_ACEOF
6059/* confdefs.h. */
6060_ACEOF
6061cat confdefs.h >>conftest.$ac_ext
6062cat >>conftest.$ac_ext <<_ACEOF
6063/* end confdefs.h. */
6064$ac_includes_default
6065int
6066main ()
6067{
b61ff9c8 6068if ((long long *) 0)
bf3b7cd3 6069 return 0;
b61ff9c8 6070if (sizeof (long long))
bf3b7cd3
JD
6071 return 0;
6072 ;
6073 return 0;
6074}
6075_ACEOF
6076rm -f conftest.$ac_objext
b61ff9c8
BS
6077if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6078 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6079 ac_status=$?
6080 grep -v '^ *+' conftest.er1 >conftest.err
6081 rm -f conftest.er1
6082 cat conftest.err >&5
6083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6084 (exit $ac_status); } &&
6085 { ac_try='test -z "$ac_c_werror_flag"
6086 || test ! -s conftest.err'
6087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6088 (eval $ac_try) 2>&5
6089 ac_status=$?
6090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6091 (exit $ac_status); }; } &&
6092 { ac_try='test -s conftest.$ac_objext'
6093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6094 (eval $ac_try) 2>&5
6095 ac_status=$?
6096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6097 (exit $ac_status); }; }; then
6098 ac_cv_type_long_long=yes
6099else
bf3b7cd3
JD
6100 echo "$as_me: failed program was:" >&5
6101sed 's/^/| /' conftest.$ac_ext >&5
6102
b61ff9c8 6103ac_cv_type_long_long=no
bf3b7cd3 6104fi
b61ff9c8 6105rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6106fi
b61ff9c8
BS
6107echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
6108echo "${ECHO_T}$ac_cv_type_long_long" >&6
bf3b7cd3 6109
b61ff9c8
BS
6110echo "$as_me:$LINENO: checking size of long long" >&5
6111echo $ECHO_N "checking size of long long... $ECHO_C" >&6
bf3b7cd3
JD
6112if test "${ac_cv_sizeof_long_long+set}" = set; then
6113 echo $ECHO_N "(cached) $ECHO_C" >&6
6114else
b61ff9c8
BS
6115 if test "$ac_cv_type_long_long" = yes; then
6116 # The cast to unsigned long works around a bug in the HP C Compiler
6117 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6118 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6119 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
6120 if test "$cross_compiling" = yes; then
6121 # Depending upon the size, compute the lo and hi bounds.
6122cat >conftest.$ac_ext <<_ACEOF
6123/* confdefs.h. */
6124_ACEOF
6125cat confdefs.h >>conftest.$ac_ext
6126cat >>conftest.$ac_ext <<_ACEOF
6127/* end confdefs.h. */
6128$ac_includes_default
6129int
6130main ()
6131{
b61ff9c8 6132static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
bf3b7cd3
JD
6133test_array [0] = 0
6134
6135 ;
6136 return 0;
6137}
6138_ACEOF
6139rm -f conftest.$ac_objext
b61ff9c8
BS
6140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6141 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6142 ac_status=$?
6143 grep -v '^ *+' conftest.er1 >conftest.err
6144 rm -f conftest.er1
6145 cat conftest.err >&5
6146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6147 (exit $ac_status); } &&
6148 { ac_try='test -z "$ac_c_werror_flag"
6149 || test ! -s conftest.err'
6150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6151 (eval $ac_try) 2>&5
6152 ac_status=$?
6153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6154 (exit $ac_status); }; } &&
6155 { ac_try='test -s conftest.$ac_objext'
6156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6157 (eval $ac_try) 2>&5
6158 ac_status=$?
6159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6160 (exit $ac_status); }; }; then
bf3b7cd3
JD
6161 ac_lo=0 ac_mid=0
6162 while :; do
6163 cat >conftest.$ac_ext <<_ACEOF
6164/* confdefs.h. */
6165_ACEOF
6166cat confdefs.h >>conftest.$ac_ext
6167cat >>conftest.$ac_ext <<_ACEOF
6168/* end confdefs.h. */
6169$ac_includes_default
6170int
6171main ()
6172{
b61ff9c8 6173static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
6174test_array [0] = 0
6175
6176 ;
6177 return 0;
6178}
6179_ACEOF
6180rm -f conftest.$ac_objext
b61ff9c8
BS
6181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6182 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6183 ac_status=$?
6184 grep -v '^ *+' conftest.er1 >conftest.err
6185 rm -f conftest.er1
6186 cat conftest.err >&5
6187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6188 (exit $ac_status); } &&
6189 { ac_try='test -z "$ac_c_werror_flag"
6190 || test ! -s conftest.err'
6191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6192 (eval $ac_try) 2>&5
6193 ac_status=$?
6194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6195 (exit $ac_status); }; } &&
6196 { ac_try='test -s conftest.$ac_objext'
6197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6198 (eval $ac_try) 2>&5
6199 ac_status=$?
6200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6201 (exit $ac_status); }; }; then
8b1f719a 6202 ac_hi=$ac_mid; break
bf3b7cd3
JD
6203else
6204 echo "$as_me: failed program was:" >&5
6205sed 's/^/| /' conftest.$ac_ext >&5
6206
b61ff9c8
BS
6207ac_lo=`expr $ac_mid + 1`
6208 if test $ac_lo -le $ac_mid; then
6209 ac_lo= ac_hi=
6210 break
6211 fi
6212 ac_mid=`expr 2 '*' $ac_mid + 1`
8b1f719a 6213fi
b61ff9c8 6214rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8b1f719a
PB
6215 done
6216else
6217 echo "$as_me: failed program was:" >&5
6218sed 's/^/| /' conftest.$ac_ext >&5
6219
b61ff9c8 6220cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
6221/* confdefs.h. */
6222_ACEOF
6223cat confdefs.h >>conftest.$ac_ext
6224cat >>conftest.$ac_ext <<_ACEOF
6225/* end confdefs.h. */
6226$ac_includes_default
6227int
6228main ()
6229{
b61ff9c8 6230static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
bf3b7cd3
JD
6231test_array [0] = 0
6232
6233 ;
6234 return 0;
6235}
6236_ACEOF
6237rm -f conftest.$ac_objext
b61ff9c8
BS
6238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6239 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6240 ac_status=$?
6241 grep -v '^ *+' conftest.er1 >conftest.err
6242 rm -f conftest.er1
6243 cat conftest.err >&5
6244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6245 (exit $ac_status); } &&
6246 { ac_try='test -z "$ac_c_werror_flag"
6247 || test ! -s conftest.err'
6248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6249 (eval $ac_try) 2>&5
6250 ac_status=$?
6251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6252 (exit $ac_status); }; } &&
6253 { ac_try='test -s conftest.$ac_objext'
6254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6255 (eval $ac_try) 2>&5
6256 ac_status=$?
6257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6258 (exit $ac_status); }; }; then
bf3b7cd3
JD
6259 ac_hi=-1 ac_mid=-1
6260 while :; do
6261 cat >conftest.$ac_ext <<_ACEOF
6262/* confdefs.h. */
6263_ACEOF
6264cat confdefs.h >>conftest.$ac_ext
6265cat >>conftest.$ac_ext <<_ACEOF
6266/* end confdefs.h. */
6267$ac_includes_default
6268int
6269main ()
6270{
b61ff9c8 6271static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
bf3b7cd3
JD
6272test_array [0] = 0
6273
6274 ;
6275 return 0;
6276}
6277_ACEOF
6278rm -f conftest.$ac_objext
b61ff9c8
BS
6279if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6280 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6281 ac_status=$?
6282 grep -v '^ *+' conftest.er1 >conftest.err
6283 rm -f conftest.er1
6284 cat conftest.err >&5
6285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6286 (exit $ac_status); } &&
6287 { ac_try='test -z "$ac_c_werror_flag"
6288 || test ! -s conftest.err'
6289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6290 (eval $ac_try) 2>&5
6291 ac_status=$?
6292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6293 (exit $ac_status); }; } &&
6294 { ac_try='test -s conftest.$ac_objext'
6295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6296 (eval $ac_try) 2>&5
6297 ac_status=$?
6298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6299 (exit $ac_status); }; }; then
bf3b7cd3
JD
6300 ac_lo=$ac_mid; break
6301else
6302 echo "$as_me: failed program was:" >&5
6303sed 's/^/| /' conftest.$ac_ext >&5
6304
b61ff9c8
BS
6305ac_hi=`expr '(' $ac_mid ')' - 1`
6306 if test $ac_mid -le $ac_hi; then
6307 ac_lo= ac_hi=
6308 break
6309 fi
6310 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 6311fi
b61ff9c8 6312rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6313 done
6314else
6315 echo "$as_me: failed program was:" >&5
6316sed 's/^/| /' conftest.$ac_ext >&5
6317
b61ff9c8 6318ac_lo= ac_hi=
bf3b7cd3 6319fi
b61ff9c8 6320rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6321fi
b61ff9c8 6322rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6323# Binary search between lo and hi bounds.
6324while test "x$ac_lo" != "x$ac_hi"; do
6325 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6326 cat >conftest.$ac_ext <<_ACEOF
6327/* confdefs.h. */
6328_ACEOF
6329cat confdefs.h >>conftest.$ac_ext
6330cat >>conftest.$ac_ext <<_ACEOF
6331/* end confdefs.h. */
6332$ac_includes_default
6333int
6334main ()
6335{
b61ff9c8 6336static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
6337test_array [0] = 0
6338
6339 ;
6340 return 0;
6341}
6342_ACEOF
6343rm -f conftest.$ac_objext
b61ff9c8
BS
6344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6345 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6346 ac_status=$?
6347 grep -v '^ *+' conftest.er1 >conftest.err
6348 rm -f conftest.er1
6349 cat conftest.err >&5
6350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6351 (exit $ac_status); } &&
6352 { ac_try='test -z "$ac_c_werror_flag"
6353 || test ! -s conftest.err'
6354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6355 (eval $ac_try) 2>&5
6356 ac_status=$?
6357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6358 (exit $ac_status); }; } &&
6359 { ac_try='test -s conftest.$ac_objext'
6360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6361 (eval $ac_try) 2>&5
6362 ac_status=$?
6363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6364 (exit $ac_status); }; }; then
bf3b7cd3
JD
6365 ac_hi=$ac_mid
6366else
6367 echo "$as_me: failed program was:" >&5
6368sed 's/^/| /' conftest.$ac_ext >&5
6369
b61ff9c8 6370ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 6371fi
b61ff9c8 6372rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6373done
6374case $ac_lo in
6375?*) ac_cv_sizeof_long_long=$ac_lo;;
b61ff9c8 6376'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 6377See \`config.log' for more details." >&5
b61ff9c8 6378echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 6379See \`config.log' for more details." >&2;}
b61ff9c8 6380 { (exit 1); exit 1; }; } ;;
bf3b7cd3 6381esac
b61ff9c8
BS
6382else
6383 if test "$cross_compiling" = yes; then
6384 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6385See \`config.log' for more details." >&5
6386echo "$as_me: error: cannot run test program while cross compiling
6387See \`config.log' for more details." >&2;}
6388 { (exit 1); exit 1; }; }
bf3b7cd3
JD
6389else
6390 cat >conftest.$ac_ext <<_ACEOF
6391/* confdefs.h. */
6392_ACEOF
6393cat confdefs.h >>conftest.$ac_ext
6394cat >>conftest.$ac_ext <<_ACEOF
6395/* end confdefs.h. */
6396$ac_includes_default
b61ff9c8
BS
6397long longval () { return (long) (sizeof (long long)); }
6398unsigned long ulongval () { return (long) (sizeof (long long)); }
bf3b7cd3
JD
6399#include <stdio.h>
6400#include <stdlib.h>
6401int
6402main ()
6403{
6404
6405 FILE *f = fopen ("conftest.val", "w");
6406 if (! f)
b61ff9c8
BS
6407 exit (1);
6408 if (((long) (sizeof (long long))) < 0)
bf3b7cd3 6409 {
b61ff9c8
BS
6410 long i = longval ();
6411 if (i != ((long) (sizeof (long long))))
6412 exit (1);
bf3b7cd3
JD
6413 fprintf (f, "%ld\n", i);
6414 }
6415 else
6416 {
b61ff9c8
BS
6417 unsigned long i = ulongval ();
6418 if (i != ((long) (sizeof (long long))))
6419 exit (1);
bf3b7cd3
JD
6420 fprintf (f, "%lu\n", i);
6421 }
b61ff9c8 6422 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6423
6424 ;
6425 return 0;
6426}
6427_ACEOF
6428rm -f conftest$ac_exeext
b61ff9c8
BS
6429if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6430 (eval $ac_link) 2>&5
bf3b7cd3
JD
6431 ac_status=$?
6432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6433 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
6434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6435 (eval $ac_try) 2>&5
bf3b7cd3
JD
6436 ac_status=$?
6437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6438 (exit $ac_status); }; }; then
6439 ac_cv_sizeof_long_long=`cat conftest.val`
6440else
6441 echo "$as_me: program exited with status $ac_status" >&5
6442echo "$as_me: failed program was:" >&5
6443sed 's/^/| /' conftest.$ac_ext >&5
6444
6445( exit $ac_status )
b61ff9c8 6446{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 6447See \`config.log' for more details." >&5
b61ff9c8 6448echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 6449See \`config.log' for more details." >&2;}
b61ff9c8
BS
6450 { (exit 1); exit 1; }; }
6451fi
6452rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6453fi
6454fi
6455rm -f conftest.val
b61ff9c8
BS
6456else
6457 ac_cv_sizeof_long_long=0
2f41c1d6 6458fi
b61ff9c8
BS
6459fi
6460echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
6461echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
bf3b7cd3
JD
6462cat >>confdefs.h <<_ACEOF
6463#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
6464_ACEOF
6465
6466
6467fi
5ec1c5e6 6468
b61ff9c8
BS
6469echo "$as_me:$LINENO: checking for __int64" >&5
6470echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5ec1c5e6
KC
6471if test "${ac_cv_type___int64+set}" = set; then
6472 echo $ECHO_N "(cached) $ECHO_C" >&6
6473else
6474 cat >conftest.$ac_ext <<_ACEOF
6475/* confdefs.h. */
6476_ACEOF
6477cat confdefs.h >>conftest.$ac_ext
6478cat >>conftest.$ac_ext <<_ACEOF
6479/* end confdefs.h. */
6480$ac_includes_default
6481int
6482main ()
6483{
b61ff9c8 6484if ((__int64 *) 0)
5ec1c5e6 6485 return 0;
b61ff9c8 6486if (sizeof (__int64))
5ec1c5e6
KC
6487 return 0;
6488 ;
6489 return 0;
6490}
6491_ACEOF
6492rm -f conftest.$ac_objext
b61ff9c8
BS
6493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6494 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
6495 ac_status=$?
6496 grep -v '^ *+' conftest.er1 >conftest.err
6497 rm -f conftest.er1
6498 cat conftest.err >&5
6499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6500 (exit $ac_status); } &&
6501 { ac_try='test -z "$ac_c_werror_flag"
6502 || test ! -s conftest.err'
6503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6504 (eval $ac_try) 2>&5
6505 ac_status=$?
6506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6507 (exit $ac_status); }; } &&
6508 { ac_try='test -s conftest.$ac_objext'
6509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6510 (eval $ac_try) 2>&5
6511 ac_status=$?
6512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6513 (exit $ac_status); }; }; then
5ec1c5e6
KC
6514 ac_cv_type___int64=yes
6515else
6516 echo "$as_me: failed program was:" >&5
6517sed 's/^/| /' conftest.$ac_ext >&5
6518
b61ff9c8 6519ac_cv_type___int64=no
5ec1c5e6 6520fi
b61ff9c8 6521rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 6522fi
b61ff9c8
BS
6523echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
6524echo "${ECHO_T}$ac_cv_type___int64" >&6
5ec1c5e6
KC
6525if test $ac_cv_type___int64 = yes; then
6526
6527cat >>confdefs.h <<_ACEOF
6528#define HAVE___INT64 1
6529_ACEOF
6530
b61ff9c8
BS
6531echo "$as_me:$LINENO: checking for __int64" >&5
6532echo $ECHO_N "checking for __int64... $ECHO_C" >&6
bf3b7cd3
JD
6533if test "${ac_cv_type___int64+set}" = set; then
6534 echo $ECHO_N "(cached) $ECHO_C" >&6
6535else
ba479fd2 6536 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6537/* confdefs.h. */
6538_ACEOF
6539cat confdefs.h >>conftest.$ac_ext
6540cat >>conftest.$ac_ext <<_ACEOF
6541/* end confdefs.h. */
bf3b7cd3 6542$ac_includes_default
ba479fd2
NN
6543int
6544main ()
6545{
b61ff9c8 6546if ((__int64 *) 0)
bf3b7cd3 6547 return 0;
b61ff9c8 6548if (sizeof (__int64))
bf3b7cd3 6549 return 0;
ba479fd2
NN
6550 ;
6551 return 0;
6552}
6553_ACEOF
6554rm -f conftest.$ac_objext
b61ff9c8
BS
6555if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6556 (eval $ac_compile) 2>conftest.er1
ba479fd2 6557 ac_status=$?
86da66b5
HPN
6558 grep -v '^ *+' conftest.er1 >conftest.err
6559 rm -f conftest.er1
6560 cat conftest.err >&5
ba479fd2 6561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6562 (exit $ac_status); } &&
6563 { ac_try='test -z "$ac_c_werror_flag"
6564 || test ! -s conftest.err'
6565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6566 (eval $ac_try) 2>&5
6567 ac_status=$?
6568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6569 (exit $ac_status); }; } &&
6570 { ac_try='test -s conftest.$ac_objext'
6571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6572 (eval $ac_try) 2>&5
6573 ac_status=$?
6574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6575 (exit $ac_status); }; }; then
bf3b7cd3 6576 ac_cv_type___int64=yes
75b6f3fd 6577else
ba479fd2
NN
6578 echo "$as_me: failed program was:" >&5
6579sed 's/^/| /' conftest.$ac_ext >&5
6580
b61ff9c8 6581ac_cv_type___int64=no
75b6f3fd 6582fi
b61ff9c8 6583rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 6584fi
b61ff9c8
BS
6585echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
6586echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 6587
b61ff9c8
BS
6588echo "$as_me:$LINENO: checking size of __int64" >&5
6589echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
bf3b7cd3 6590if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 6591 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 6592else
b61ff9c8
BS
6593 if test "$ac_cv_type___int64" = yes; then
6594 # The cast to unsigned long works around a bug in the HP C Compiler
6595 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6596 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6597 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
6598 if test "$cross_compiling" = yes; then
6599 # Depending upon the size, compute the lo and hi bounds.
6600cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6601/* confdefs.h. */
6602_ACEOF
6603cat confdefs.h >>conftest.$ac_ext
6604cat >>conftest.$ac_ext <<_ACEOF
6605/* end confdefs.h. */
bf3b7cd3 6606$ac_includes_default
ba479fd2
NN
6607int
6608main ()
6609{
b61ff9c8 6610static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
bf3b7cd3
JD
6611test_array [0] = 0
6612
ba479fd2
NN
6613 ;
6614 return 0;
6615}
6616_ACEOF
6617rm -f conftest.$ac_objext
b61ff9c8
BS
6618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6619 (eval $ac_compile) 2>conftest.er1
ba479fd2 6620 ac_status=$?
86da66b5
HPN
6621 grep -v '^ *+' conftest.er1 >conftest.err
6622 rm -f conftest.er1
6623 cat conftest.err >&5
ba479fd2 6624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6625 (exit $ac_status); } &&
6626 { ac_try='test -z "$ac_c_werror_flag"
6627 || test ! -s conftest.err'
6628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6629 (eval $ac_try) 2>&5
6630 ac_status=$?
6631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6632 (exit $ac_status); }; } &&
6633 { ac_try='test -s conftest.$ac_objext'
6634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6635 (eval $ac_try) 2>&5
6636 ac_status=$?
6637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6638 (exit $ac_status); }; }; then
bf3b7cd3
JD
6639 ac_lo=0 ac_mid=0
6640 while :; do
6641 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6642/* confdefs.h. */
6643_ACEOF
6644cat confdefs.h >>conftest.$ac_ext
6645cat >>conftest.$ac_ext <<_ACEOF
6646/* end confdefs.h. */
bf3b7cd3 6647$ac_includes_default
ba479fd2
NN
6648int
6649main ()
6650{
b61ff9c8 6651static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
bf3b7cd3
JD
6652test_array [0] = 0
6653
ba479fd2
NN
6654 ;
6655 return 0;
6656}
6657_ACEOF
6658rm -f conftest.$ac_objext
b61ff9c8
BS
6659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6660 (eval $ac_compile) 2>conftest.er1
ba479fd2 6661 ac_status=$?
86da66b5
HPN
6662 grep -v '^ *+' conftest.er1 >conftest.err
6663 rm -f conftest.er1
6664 cat conftest.err >&5
ba479fd2 6665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6666 (exit $ac_status); } &&
6667 { ac_try='test -z "$ac_c_werror_flag"
6668 || test ! -s conftest.err'
6669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6670 (eval $ac_try) 2>&5
6671 ac_status=$?
6672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6673 (exit $ac_status); }; } &&
6674 { ac_try='test -s conftest.$ac_objext'
6675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6676 (eval $ac_try) 2>&5
6677 ac_status=$?
6678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6679 (exit $ac_status); }; }; then
bf3b7cd3 6680 ac_hi=$ac_mid; break
75e93faa 6681else
ba479fd2
NN
6682 echo "$as_me: failed program was:" >&5
6683sed 's/^/| /' conftest.$ac_ext >&5
6684
b61ff9c8
BS
6685ac_lo=`expr $ac_mid + 1`
6686 if test $ac_lo -le $ac_mid; then
6687 ac_lo= ac_hi=
6688 break
6689 fi
6690 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 6691fi
b61ff9c8 6692rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6693 done
75e93faa 6694else
bf3b7cd3
JD
6695 echo "$as_me: failed program was:" >&5
6696sed 's/^/| /' conftest.$ac_ext >&5
6697
b61ff9c8 6698cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6699/* confdefs.h. */
6700_ACEOF
6701cat confdefs.h >>conftest.$ac_ext
6702cat >>conftest.$ac_ext <<_ACEOF
6703/* end confdefs.h. */
bf3b7cd3 6704$ac_includes_default
ba479fd2
NN
6705int
6706main ()
6707{
b61ff9c8 6708static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
bf3b7cd3
JD
6709test_array [0] = 0
6710
ba479fd2
NN
6711 ;
6712 return 0;
6713}
6714_ACEOF
6715rm -f conftest.$ac_objext
b61ff9c8
BS
6716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6717 (eval $ac_compile) 2>conftest.er1
ba479fd2 6718 ac_status=$?
86da66b5
HPN
6719 grep -v '^ *+' conftest.er1 >conftest.err
6720 rm -f conftest.er1
6721 cat conftest.err >&5
ba479fd2 6722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6723 (exit $ac_status); } &&
6724 { ac_try='test -z "$ac_c_werror_flag"
6725 || test ! -s conftest.err'
6726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6727 (eval $ac_try) 2>&5
6728 ac_status=$?
6729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6730 (exit $ac_status); }; } &&
6731 { ac_try='test -s conftest.$ac_objext'
6732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6733 (eval $ac_try) 2>&5
6734 ac_status=$?
6735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6736 (exit $ac_status); }; }; then
bf3b7cd3
JD
6737 ac_hi=-1 ac_mid=-1
6738 while :; do
6739 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6740/* confdefs.h. */
6741_ACEOF
6742cat confdefs.h >>conftest.$ac_ext
6743cat >>conftest.$ac_ext <<_ACEOF
6744/* end confdefs.h. */
bf3b7cd3 6745$ac_includes_default
ba479fd2
NN
6746int
6747main ()
6748{
b61ff9c8 6749static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
bf3b7cd3
JD
6750test_array [0] = 0
6751
ba479fd2
NN
6752 ;
6753 return 0;
6754}
6755_ACEOF
6756rm -f conftest.$ac_objext
b61ff9c8
BS
6757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6758 (eval $ac_compile) 2>conftest.er1
ba479fd2 6759 ac_status=$?
86da66b5
HPN
6760 grep -v '^ *+' conftest.er1 >conftest.err
6761 rm -f conftest.er1
6762 cat conftest.err >&5
ba479fd2 6763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6764 (exit $ac_status); } &&
6765 { ac_try='test -z "$ac_c_werror_flag"
6766 || test ! -s conftest.err'
6767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6768 (eval $ac_try) 2>&5
6769 ac_status=$?
6770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6771 (exit $ac_status); }; } &&
6772 { ac_try='test -s conftest.$ac_objext'
6773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6774 (eval $ac_try) 2>&5
6775 ac_status=$?
6776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6777 (exit $ac_status); }; }; then
bf3b7cd3 6778 ac_lo=$ac_mid; break
04cabffc 6779else
ba479fd2
NN
6780 echo "$as_me: failed program was:" >&5
6781sed 's/^/| /' conftest.$ac_ext >&5
6782
b61ff9c8
BS
6783ac_hi=`expr '(' $ac_mid ')' - 1`
6784 if test $ac_mid -le $ac_hi; then
6785 ac_lo= ac_hi=
6786 break
6787 fi
6788 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 6789fi
b61ff9c8 6790rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6791 done
6792else
6793 echo "$as_me: failed program was:" >&5
6794sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 6795
b61ff9c8 6796ac_lo= ac_hi=
414d23ae 6797fi
b61ff9c8 6798rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6799fi
b61ff9c8 6800rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6801# Binary search between lo and hi bounds.
6802while test "x$ac_lo" != "x$ac_hi"; do
6803 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 6804 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6805/* confdefs.h. */
6806_ACEOF
6807cat confdefs.h >>conftest.$ac_ext
6808cat >>conftest.$ac_ext <<_ACEOF
6809/* end confdefs.h. */
bf3b7cd3 6810$ac_includes_default
ba479fd2
NN
6811int
6812main ()
6813{
b61ff9c8 6814static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
bf3b7cd3
JD
6815test_array [0] = 0
6816
ba479fd2
NN
6817 ;
6818 return 0;
6819}
6820_ACEOF
6821rm -f conftest.$ac_objext
b61ff9c8
BS
6822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6823 (eval $ac_compile) 2>conftest.er1
ba479fd2 6824 ac_status=$?
86da66b5
HPN
6825 grep -v '^ *+' conftest.er1 >conftest.err
6826 rm -f conftest.er1
6827 cat conftest.err >&5
ba479fd2 6828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6829 (exit $ac_status); } &&
6830 { ac_try='test -z "$ac_c_werror_flag"
6831 || test ! -s conftest.err'
6832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6833 (eval $ac_try) 2>&5
6834 ac_status=$?
6835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6836 (exit $ac_status); }; } &&
6837 { ac_try='test -s conftest.$ac_objext'
6838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6839 (eval $ac_try) 2>&5
6840 ac_status=$?
6841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6842 (exit $ac_status); }; }; then
bf3b7cd3 6843 ac_hi=$ac_mid
75e93faa 6844else
ba479fd2
NN
6845 echo "$as_me: failed program was:" >&5
6846sed 's/^/| /' conftest.$ac_ext >&5
6847
b61ff9c8 6848ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 6849fi
b61ff9c8 6850rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6851done
bf3b7cd3
JD
6852case $ac_lo in
6853?*) ac_cv_sizeof___int64=$ac_lo;;
b61ff9c8 6854'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6855See \`config.log' for more details." >&5
b61ff9c8 6856echo "$as_me: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6857See \`config.log' for more details." >&2;}
b61ff9c8 6858 { (exit 1); exit 1; }; } ;;
bf3b7cd3 6859esac
b61ff9c8
BS
6860else
6861 if test "$cross_compiling" = yes; then
6862 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6863See \`config.log' for more details." >&5
6864echo "$as_me: error: cannot run test program while cross compiling
6865See \`config.log' for more details." >&2;}
6866 { (exit 1); exit 1; }; }
bf3b7cd3
JD
6867else
6868 cat >conftest.$ac_ext <<_ACEOF
6869/* confdefs.h. */
6870_ACEOF
6871cat confdefs.h >>conftest.$ac_ext
6872cat >>conftest.$ac_ext <<_ACEOF
6873/* end confdefs.h. */
6874$ac_includes_default
b61ff9c8
BS
6875long longval () { return (long) (sizeof (__int64)); }
6876unsigned long ulongval () { return (long) (sizeof (__int64)); }
bf3b7cd3
JD
6877#include <stdio.h>
6878#include <stdlib.h>
6879int
6880main ()
6881{
414d23ae 6882
bf3b7cd3
JD
6883 FILE *f = fopen ("conftest.val", "w");
6884 if (! f)
b61ff9c8
BS
6885 exit (1);
6886 if (((long) (sizeof (__int64))) < 0)
bf3b7cd3 6887 {
b61ff9c8
BS
6888 long i = longval ();
6889 if (i != ((long) (sizeof (__int64))))
6890 exit (1);
bf3b7cd3
JD
6891 fprintf (f, "%ld\n", i);
6892 }
6893 else
6894 {
b61ff9c8
BS
6895 unsigned long i = ulongval ();
6896 if (i != ((long) (sizeof (__int64))))
6897 exit (1);
bf3b7cd3
JD
6898 fprintf (f, "%lu\n", i);
6899 }
b61ff9c8 6900 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6901
6902 ;
6903 return 0;
6904}
6905_ACEOF
6906rm -f conftest$ac_exeext
b61ff9c8
BS
6907if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6908 (eval $ac_link) 2>&5
bf3b7cd3
JD
6909 ac_status=$?
6910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6911 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
6912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6913 (eval $ac_try) 2>&5
bf3b7cd3
JD
6914 ac_status=$?
6915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6916 (exit $ac_status); }; }; then
6917 ac_cv_sizeof___int64=`cat conftest.val`
6918else
6919 echo "$as_me: program exited with status $ac_status" >&5
6920echo "$as_me: failed program was:" >&5
6921sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6922
bf3b7cd3 6923( exit $ac_status )
b61ff9c8 6924{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6925See \`config.log' for more details." >&5
b61ff9c8 6926echo "$as_me: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6927See \`config.log' for more details." >&2;}
b61ff9c8
BS
6928 { (exit 1); exit 1; }; }
6929fi
6930rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6931fi
6932fi
6933rm -f conftest.val
b61ff9c8
BS
6934else
6935 ac_cv_sizeof___int64=0
bf3b7cd3 6936fi
b61ff9c8
BS
6937fi
6938echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6939echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 6940cat >>confdefs.h <<_ACEOF
414d23ae 6941#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6942_ACEOF
414d23ae 6943
cafe096b 6944
414d23ae
HPN
6945fi
6946
5ec1c5e6 6947
34a86c2b
NN
6948# ---------------------
6949# Warnings and checking
6950# ---------------------
6951
b5472e1d
NN
6952# Check $CC warning features (if it's GCC).
6953# We want to use -pedantic, but we don't want warnings about
6954# * 'long long'
6955# * variadic macros
89a42ac8 6956# * overlong strings
b5472e1d
NN
6957# So, we only use -pedantic if we can disable those warnings.
6958
3bbd5a19
PB
6959loose_warn=
6960save_CFLAGS="$CFLAGS"
6961for option in -W -Wall -Wwrite-strings -Wstrict-prototypes \
6962 -Wmissing-prototypes; do
6963 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
6964
b61ff9c8
BS
6965 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
6966echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
6967if eval "test \"\${$as_acx_Woption+set}\" = set"; then
b5472e1d
NN
6968 echo $ECHO_N "(cached) $ECHO_C" >&6
6969else
3bbd5a19
PB
6970 CFLAGS="$option"
6971 cat >conftest.$ac_ext <<_ACEOF
b5472e1d
NN
6972/* confdefs.h. */
6973_ACEOF
6974cat confdefs.h >>conftest.$ac_ext
6975cat >>conftest.$ac_ext <<_ACEOF
6976/* end confdefs.h. */
6977
3bbd5a19
PB
6978int
6979main ()
6980{
6981
6982 ;
6983 return 0;
6984}
b5472e1d
NN
6985_ACEOF
6986rm -f conftest.$ac_objext
b61ff9c8
BS
6987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6988 (eval $ac_compile) 2>conftest.er1
b5472e1d
NN
6989 ac_status=$?
6990 grep -v '^ *+' conftest.er1 >conftest.err
6991 rm -f conftest.er1
6992 cat conftest.err >&5
6993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6994 (exit $ac_status); } &&
6995 { ac_try='test -z "$ac_c_werror_flag"
6996 || test ! -s conftest.err'
6997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6998 (eval $ac_try) 2>&5
6999 ac_status=$?
7000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7001 (exit $ac_status); }; } &&
7002 { ac_try='test -s conftest.$ac_objext'
7003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7004 (eval $ac_try) 2>&5
7005 ac_status=$?
7006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7007 (exit $ac_status); }; }; then
3bbd5a19 7008 eval "$as_acx_Woption=yes"
b5472e1d
NN
7009else
7010 echo "$as_me: failed program was:" >&5
7011sed 's/^/| /' conftest.$ac_ext >&5
7012
b61ff9c8 7013eval "$as_acx_Woption=no"
b5472e1d 7014fi
b61ff9c8 7015rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
7016
7017fi
b61ff9c8
BS
7018echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
7019echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3bbd5a19
PB
7020 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
7021 loose_warn="$loose_warn${loose_warn:+ }$option"
7022fi
7023
7024 done
7025CFLAGS="$save_CFLAGS"
7026
7027cxx_compat_warn=
7028save_CFLAGS="$CFLAGS"
7029for option in -Wc++-compat; do
7030 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
b5472e1d 7031
b61ff9c8
BS
7032 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
7033echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
7034if eval "test \"\${$as_acx_Woption+set}\" = set"; then
b5472e1d
NN
7035 echo $ECHO_N "(cached) $ECHO_C" >&6
7036else
3bbd5a19
PB
7037 CFLAGS="$option"
7038 cat >conftest.$ac_ext <<_ACEOF
b5472e1d
NN
7039/* confdefs.h. */
7040_ACEOF
7041cat confdefs.h >>conftest.$ac_ext
7042cat >>conftest.$ac_ext <<_ACEOF
7043/* end confdefs.h. */
7044
3bbd5a19
PB
7045int
7046main ()
7047{
7048
7049 ;
7050 return 0;
7051}
b5472e1d
NN
7052_ACEOF
7053rm -f conftest.$ac_objext
b61ff9c8
BS
7054if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7055 (eval $ac_compile) 2>conftest.er1
b5472e1d
NN
7056 ac_status=$?
7057 grep -v '^ *+' conftest.er1 >conftest.err
7058 rm -f conftest.er1
7059 cat conftest.err >&5
7060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7061 (exit $ac_status); } &&
7062 { ac_try='test -z "$ac_c_werror_flag"
7063 || test ! -s conftest.err'
7064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7065 (eval $ac_try) 2>&5
7066 ac_status=$?
7067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7068 (exit $ac_status); }; } &&
7069 { ac_try='test -s conftest.$ac_objext'
7070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7071 (eval $ac_try) 2>&5
7072 ac_status=$?
7073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7074 (exit $ac_status); }; }; then
3bbd5a19 7075 eval "$as_acx_Woption=yes"
b5472e1d
NN
7076else
7077 echo "$as_me: failed program was:" >&5
7078sed 's/^/| /' conftest.$ac_ext >&5
7079
b61ff9c8 7080eval "$as_acx_Woption=no"
b5472e1d 7081fi
b61ff9c8 7082rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
7083
7084fi
b61ff9c8
BS
7085echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
7086echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3bbd5a19
PB
7087 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
7088 cxx_compat_warn="$cxx_compat_warn${cxx_compat_warn:+ }$option"
7089fi
7090
7091 done
7092CFLAGS="$save_CFLAGS"
b5472e1d 7093
3bbd5a19
PB
7094strict_warn=
7095save_CFLAGS="$CFLAGS"
7096for option in -Wold-style-definition \
7097 -Wmissing-format-attribute; do
7098 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
7099
b61ff9c8
BS
7100 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
7101echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
7102if eval "test \"\${$as_acx_Woption+set}\" = set"; then
89a42ac8
ZW
7103 echo $ECHO_N "(cached) $ECHO_C" >&6
7104else
3bbd5a19
PB
7105 CFLAGS="$option"
7106 cat >conftest.$ac_ext <<_ACEOF
89a42ac8
ZW
7107/* confdefs.h. */
7108_ACEOF
7109cat confdefs.h >>conftest.$ac_ext
7110cat >>conftest.$ac_ext <<_ACEOF
7111/* end confdefs.h. */
7112
3bbd5a19
PB
7113int
7114main ()
7115{
7116
7117 ;
7118 return 0;
7119}
89a42ac8
ZW
7120_ACEOF
7121rm -f conftest.$ac_objext
b61ff9c8
BS
7122if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7123 (eval $ac_compile) 2>conftest.er1
89a42ac8
ZW
7124 ac_status=$?
7125 grep -v '^ *+' conftest.er1 >conftest.err
7126 rm -f conftest.er1
7127 cat conftest.err >&5
7128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7129 (exit $ac_status); } &&
7130 { ac_try='test -z "$ac_c_werror_flag"
7131 || test ! -s conftest.err'
7132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7133 (eval $ac_try) 2>&5
7134 ac_status=$?
7135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7136 (exit $ac_status); }; } &&
7137 { ac_try='test -s conftest.$ac_objext'
7138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7139 (eval $ac_try) 2>&5
7140 ac_status=$?
7141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7142 (exit $ac_status); }; }; then
3bbd5a19 7143 eval "$as_acx_Woption=yes"
89a42ac8
ZW
7144else
7145 echo "$as_me: failed program was:" >&5
7146sed 's/^/| /' conftest.$ac_ext >&5
7147
b61ff9c8 7148eval "$as_acx_Woption=no"
89a42ac8 7149fi
b61ff9c8 7150rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
89a42ac8
ZW
7151
7152fi
b61ff9c8
BS
7153echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
7154echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3bbd5a19
PB
7155 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
7156 strict_warn="$strict_warn${strict_warn:+ }$option"
34a86c2b
NN
7157fi
7158
3bbd5a19
PB
7159 done
7160CFLAGS="$save_CFLAGS"
7161
7162if test "$GCC" = yes; then
b61ff9c8 7163 echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \
3bbd5a19
PB
7164 -Wno-overlength-strings" >&5
7165echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \
b61ff9c8 7166 -Wno-overlength-strings... $ECHO_C" >&6
3bbd5a19 7167if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings+set}" = set; then
643d3bd2
NN
7168 echo $ECHO_N "(cached) $ECHO_C" >&6
7169else
7170 save_CFLAGS="$CFLAGS"
3bbd5a19
PB
7171CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros \
7172 -Wno-overlength-strings"
7173cat >conftest.$ac_ext <<_ACEOF
643d3bd2
NN
7174/* confdefs.h. */
7175_ACEOF
7176cat confdefs.h >>conftest.$ac_ext
7177cat >>conftest.$ac_ext <<_ACEOF
7178/* end confdefs.h. */
7179
3bbd5a19
PB
7180int
7181main ()
7182{
7183
7184 ;
7185 return 0;
7186}
643d3bd2
NN
7187_ACEOF
7188rm -f conftest.$ac_objext
b61ff9c8
BS
7189if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7190 (eval $ac_compile) 2>conftest.er1
643d3bd2
NN
7191 ac_status=$?
7192 grep -v '^ *+' conftest.er1 >conftest.err
7193 rm -f conftest.er1
7194 cat conftest.err >&5
7195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7196 (exit $ac_status); } &&
7197 { ac_try='test -z "$ac_c_werror_flag"
7198 || test ! -s conftest.err'
7199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7200 (eval $ac_try) 2>&5
7201 ac_status=$?
7202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7203 (exit $ac_status); }; } &&
7204 { ac_try='test -s conftest.$ac_objext'
7205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7206 (eval $ac_try) 2>&5
7207 ac_status=$?
7208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7209 (exit $ac_status); }; }; then
3bbd5a19 7210 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=yes
643d3bd2
NN
7211else
7212 echo "$as_me: failed program was:" >&5
7213sed 's/^/| /' conftest.$ac_ext >&5
7214
b61ff9c8 7215acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=no
643d3bd2 7216fi
b61ff9c8 7217rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3bbd5a19 7218CFLAGS="$save_CFLAGS"
643d3bd2 7219fi
b61ff9c8
BS
7220echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&5
7221echo "${ECHO_T}$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&6
3bbd5a19
PB
7222if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings = yes; then
7223 strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros \
7224 -Wno-overlength-strings"
643d3bd2
NN
7225fi
7226
ac0f3f39 7227
ac0f3f39 7228fi
ac0f3f39 7229
ac0f3f39 7230
b61ff9c8 7231# Check whether --enable-werror-always or --disable-werror-always was given.
09a9c095 7232if test "${enable_werror_always+set}" = set; then
b61ff9c8
BS
7233 enableval="$enable_werror_always"
7234
09a9c095
NN
7235else
7236 enable_werror_always=no
b61ff9c8 7237fi;
3bbd5a19
PB
7238if test $enable_werror_always = yes; then
7239 strict_warn="$strict_warn${strict_warn:+ }-Werror"
373477bb 7240fi
373477bb 7241
373477bb
GDR
7242
7243
7244
3bbd5a19
PB
7245# The above macros do nothing if the compiler is not GCC. However, the
7246# Makefile has more goo to add other flags, so this variabl is used to
7247# enables warnings only for GCC.
414d23ae
HPN
7248warn_cflags=
7249if test "x$GCC" = "xyes"; then
7250 warn_cflags='$(GCC_WARN_CFLAGS)'
7251fi
7252
7253
8b1f719a 7254# Enable expensive internal checks
a1286ef5
ZW
7255is_release=
7256if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
7257 is_release=yes
7258fi
a6ccdbab 7259
b61ff9c8 7260# Check whether --enable-checking or --disable-checking was given.
414d23ae 7261if test "${enable_checking+set}" = set; then
b61ff9c8
BS
7262 enableval="$enable_checking"
7263 ac_checking_flags="${enableval}"
e1bbfc5c
NS
7264else
7265
7266# Determine the default checks.
7267if test x$is_release = x ; then
7268 ac_checking_flags=yes
7269else
7270 ac_checking_flags=release
7271fi
b61ff9c8 7272fi;
e1bbfc5c 7273IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
04c3028a 7274for check in release $ac_checking_flags
e1bbfc5c
NS
7275do
7276 case $check in
cdce5c16 7277 # these set all the flags to specific states
0d475361 7278 yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
cdce5c16
NS
7279 ac_fold_checking= ; ac_gc_checking=1 ;
7280 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 7281 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7e98624c 7282 ac_tree_checking=1 ; ac_valgrind_checking= ;
1b24a790 7283 ac_types_checking=1 ;;
3089f8b5 7284 no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
cdce5c16
NS
7285 ac_fold_checking= ; ac_gc_checking= ;
7286 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 7287 ac_rtlflag_checking= ; ac_runtime_checking= ;
7e98624c
RG
7288 ac_tree_checking= ; ac_valgrind_checking= ;
7289 ac_types_checking= ;;
3089f8b5 7290 all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
cdce5c16
NS
7291 ac_fold_checking=1 ; ac_gc_checking=1 ;
7292 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
7293 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7e98624c
RG
7294 ac_tree_checking=1 ; ac_valgrind_checking= ;
7295 ac_types_checking=1 ;;
3089f8b5 7296 release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
cdce5c16
NS
7297 ac_fold_checking= ; ac_gc_checking= ;
7298 ac_gc_always_collect= ; ac_rtl_checking= ;
7299 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
7e98624c
RG
7300 ac_tree_checking= ; ac_valgrind_checking= ;
7301 ac_types_checking= ;;
cdce5c16 7302 # these enable particular checks
e1bbfc5c 7303 assert) ac_assert_checking=1 ;;
3089f8b5 7304 df) ac_df_checking=1 ;;
e1bbfc5c
NS
7305 fold) ac_fold_checking=1 ;;
7306 gc) ac_gc_checking=1 ;;
7307 gcac) ac_gc_always_collect=1 ;;
7308 misc) ac_checking=1 ;;
e1bbfc5c 7309 rtl) ac_rtl_checking=1 ;;
cdce5c16 7310 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 7311 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 7312 tree) ac_tree_checking=1 ;;
7e98624c 7313 types) ac_types_checking=1 ;;
cdce5c16 7314 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 7315 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
7316echo "$as_me: error: unknown check category $check" >&2;}
7317 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
7318 esac
7319done
7320IFS="$ac_save_IFS"
06c37c96 7321
ba479fd2
NN
7322nocommon_flag=""
7323if test x$ac_checking != x ; then
7324
7325cat >>confdefs.h <<\_ACEOF
7326#define ENABLE_CHECKING 1
7327_ACEOF
7328
7329 nocommon_flag=-fno-common
7330fi
3bbd5a19 7331
3089f8b5
PB
7332if test x$ac_df_checking != x ; then
7333
7334cat >>confdefs.h <<\_ACEOF
7335#define ENABLE_DF_CHECKING 1
7336_ACEOF
7337
7338fi
06c37c96
NS
7339if test x$ac_assert_checking != x ; then
7340
7341cat >>confdefs.h <<\_ACEOF
7342#define ENABLE_ASSERT_CHECKING 1
7343_ACEOF
7344
b53ef395 7345fi
232b67d9 7346
b53ef395
NS
7347if test x$ac_runtime_checking != x ; then
7348
7349cat >>confdefs.h <<\_ACEOF
7350#define ENABLE_RUNTIME_CHECKING 1
7351_ACEOF
7352
06c37c96 7353fi
ba479fd2
NN
7354if test x$ac_tree_checking != x ; then
7355
7356cat >>confdefs.h <<\_ACEOF
7357#define ENABLE_TREE_CHECKING 1
7358_ACEOF
7359
13f05fd0 7360 TREEBROWSER=tree-browser.o
ba479fd2 7361fi
7e98624c
RG
7362if test x$ac_types_checking != x ; then
7363
7364cat >>confdefs.h <<\_ACEOF
7365#define ENABLE_TYPES_CHECKING 1
7366_ACEOF
7367
7368fi
13f05fd0 7369
ba479fd2
NN
7370if test x$ac_rtl_checking != x ; then
7371
7372cat >>confdefs.h <<\_ACEOF
7373#define ENABLE_RTL_CHECKING 1
7374_ACEOF
7375
7376fi
7377if test x$ac_rtlflag_checking != x ; then
7378
7379cat >>confdefs.h <<\_ACEOF
7380#define ENABLE_RTL_FLAG_CHECKING 1
7381_ACEOF
7382
7383fi
7384if test x$ac_gc_checking != x ; then
7385
7386cat >>confdefs.h <<\_ACEOF
7387#define ENABLE_GC_CHECKING 1
7388_ACEOF
7389
7390fi
7391if test x$ac_gc_always_collect != x ; then
7392
7393cat >>confdefs.h <<\_ACEOF
7394#define ENABLE_GC_ALWAYS_COLLECT 1
7395_ACEOF
7396
7397fi
7398if test x$ac_fold_checking != x ; then
7399
7400cat >>confdefs.h <<\_ACEOF
7401#define ENABLE_FOLD_CHECKING 1
7402_ACEOF
7403
7404fi
7405valgrind_path_defines=
7406valgrind_command=
7407
ba479fd2 7408if test "${ac_cv_header_valgrind_h+set}" = set; then
b61ff9c8
BS
7409 echo "$as_me:$LINENO: checking for valgrind.h" >&5
7410echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
ba479fd2
NN
7411if test "${ac_cv_header_valgrind_h+set}" = set; then
7412 echo $ECHO_N "(cached) $ECHO_C" >&6
7413fi
b61ff9c8
BS
7414echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
7415echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
ba479fd2
NN
7416else
7417 # Is the header compilable?
b61ff9c8
BS
7418echo "$as_me:$LINENO: checking valgrind.h usability" >&5
7419echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
ba479fd2 7420cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7421/* confdefs.h. */
7422_ACEOF
7423cat confdefs.h >>conftest.$ac_ext
7424cat >>conftest.$ac_ext <<_ACEOF
7425/* end confdefs.h. */
7426$ac_includes_default
63cf211a 7427#include <valgrind.h>
ba479fd2
NN
7428_ACEOF
7429rm -f conftest.$ac_objext
b61ff9c8
BS
7430if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7431 (eval $ac_compile) 2>conftest.er1
ba479fd2 7432 ac_status=$?
86da66b5
HPN
7433 grep -v '^ *+' conftest.er1 >conftest.err
7434 rm -f conftest.er1
7435 cat conftest.err >&5
ba479fd2 7436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7437 (exit $ac_status); } &&
7438 { ac_try='test -z "$ac_c_werror_flag"
7439 || test ! -s conftest.err'
7440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7441 (eval $ac_try) 2>&5
7442 ac_status=$?
7443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7444 (exit $ac_status); }; } &&
7445 { ac_try='test -s conftest.$ac_objext'
7446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7447 (eval $ac_try) 2>&5
7448 ac_status=$?
7449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7450 (exit $ac_status); }; }; then
ba479fd2
NN
7451 ac_header_compiler=yes
7452else
7453 echo "$as_me: failed program was:" >&5
7454sed 's/^/| /' conftest.$ac_ext >&5
7455
b61ff9c8 7456ac_header_compiler=no
ba479fd2 7457fi
b61ff9c8
BS
7458rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7459echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7460echo "${ECHO_T}$ac_header_compiler" >&6
ba479fd2
NN
7461
7462# Is the header present?
b61ff9c8
BS
7463echo "$as_me:$LINENO: checking valgrind.h presence" >&5
7464echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
ba479fd2 7465cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7466/* confdefs.h. */
7467_ACEOF
7468cat confdefs.h >>conftest.$ac_ext
7469cat >>conftest.$ac_ext <<_ACEOF
7470/* end confdefs.h. */
7471#include <valgrind.h>
7472_ACEOF
b61ff9c8
BS
7473if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7474 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
7475 ac_status=$?
7476 grep -v '^ *+' conftest.er1 >conftest.err
7477 rm -f conftest.er1
7478 cat conftest.err >&5
7479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7480 (exit $ac_status); } >/dev/null; then
7481 if test -s conftest.err; then
7482 ac_cpp_err=$ac_c_preproc_warn_flag
7483 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7484 else
7485 ac_cpp_err=
7486 fi
7487else
7488 ac_cpp_err=yes
7489fi
7490if test -z "$ac_cpp_err"; then
ba479fd2
NN
7491 ac_header_preproc=yes
7492else
7493 echo "$as_me: failed program was:" >&5
7494sed 's/^/| /' conftest.$ac_ext >&5
7495
7496 ac_header_preproc=no
7497fi
7498rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
7499echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7500echo "${ECHO_T}$ac_header_preproc" >&6
ba479fd2
NN
7501
7502# So? What about this header?
86da66b5
HPN
7503case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7504 yes:no: )
ba479fd2
NN
7505 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
7506echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
7507 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
7508echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
7509 ac_header_preproc=yes
ba479fd2 7510 ;;
86da66b5 7511 no:yes:* )
ba479fd2
NN
7512 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
7513echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
7514 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
7515echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
7516 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
7517echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
7518 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
7519echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
7520 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
7521echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
7522 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
7523echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
b61ff9c8
BS
7524 (
7525 cat <<\_ASBOX
7526## ------------------------------------------ ##
7527## Report this to the AC_PACKAGE_NAME lists. ##
7528## ------------------------------------------ ##
7529_ASBOX
7530 ) |
7531 sed "s/^/$as_me: WARNING: /" >&2
ba479fd2
NN
7532 ;;
7533esac
b61ff9c8
BS
7534echo "$as_me:$LINENO: checking for valgrind.h" >&5
7535echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
ba479fd2
NN
7536if test "${ac_cv_header_valgrind_h+set}" = set; then
7537 echo $ECHO_N "(cached) $ECHO_C" >&6
7538else
7539 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 7540fi
b61ff9c8
BS
7541echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
7542echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
ba479fd2 7543
6e3f3080 7544fi
ba479fd2 7545if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
7546 have_valgrind_h=yes
7547else
ba479fd2 7548 have_valgrind_h=no
6938ec6c
NN
7549fi
7550
7551
ba479fd2 7552
cdce5c16 7553if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
7554 # It is certainly possible that there's valgrind but no valgrind.h.
7555 # GCC relies on making annotations so we must have both.
b61ff9c8
BS
7556 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
7557echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
ba479fd2 7558 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7559/* confdefs.h. */
7560_ACEOF
7561cat confdefs.h >>conftest.$ac_ext
7562cat >>conftest.$ac_ext <<_ACEOF
7563/* end confdefs.h. */
a207b594 7564#include <valgrind/memcheck.h>
14011ca4
AJ
7565#ifndef VALGRIND_DISCARD
7566#error VALGRIND_DISCARD not defined
7567#endif
ba479fd2 7568_ACEOF
b61ff9c8
BS
7569if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7570 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
7571 ac_status=$?
7572 grep -v '^ *+' conftest.er1 >conftest.err
7573 rm -f conftest.er1
7574 cat conftest.err >&5
7575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7576 (exit $ac_status); } >/dev/null; then
7577 if test -s conftest.err; then
7578 ac_cpp_err=$ac_c_preproc_warn_flag
7579 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7580 else
7581 ac_cpp_err=
7582 fi
7583else
7584 ac_cpp_err=yes
7585fi
7586if test -z "$ac_cpp_err"; then
a207b594
HPN
7587 gcc_cv_header_valgrind_memcheck_h=yes
7588else
ba479fd2
NN
7589 echo "$as_me: failed program was:" >&5
7590sed 's/^/| /' conftest.$ac_ext >&5
7591
a207b594
HPN
7592 gcc_cv_header_valgrind_memcheck_h=no
7593fi
ba479fd2 7594rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
7595 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
7596echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
7597 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
7598echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
ba479fd2 7599 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7600/* confdefs.h. */
7601_ACEOF
7602cat confdefs.h >>conftest.$ac_ext
7603cat >>conftest.$ac_ext <<_ACEOF
7604/* end confdefs.h. */
a207b594
HPN
7605#include <memcheck.h>
7606#ifndef VALGRIND_DISCARD
7607#error VALGRIND_DISCARD not defined
7608#endif
ba479fd2 7609_ACEOF
b61ff9c8
BS
7610if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7611 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
7612 ac_status=$?
7613 grep -v '^ *+' conftest.er1 >conftest.err
7614 rm -f conftest.er1
7615 cat conftest.err >&5
7616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7617 (exit $ac_status); } >/dev/null; then
7618 if test -s conftest.err; then
7619 ac_cpp_err=$ac_c_preproc_warn_flag
7620 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7621 else
7622 ac_cpp_err=
7623 fi
7624else
7625 ac_cpp_err=yes
7626fi
7627if test -z "$ac_cpp_err"; then
14011ca4
AJ
7628 gcc_cv_header_memcheck_h=yes
7629else
ba479fd2
NN
7630 echo "$as_me: failed program was:" >&5
7631sed 's/^/| /' conftest.$ac_ext >&5
7632
cafe096b
EC
7633 gcc_cv_header_memcheck_h=no
7634fi
ba479fd2 7635rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
7636 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
7637echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
ba479fd2 7638
56694dd9
ZW
7639# Prepare PATH_SEPARATOR.
7640# The user is always right.
7641if test "${PATH_SEPARATOR+set}" != set; then
7642 echo "#! /bin/sh" >conf$$.sh
7643 echo "exit 0" >>conf$$.sh
7644 chmod +x conf$$.sh
7645 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7646 PATH_SEPARATOR=';'
7647 else
7648 PATH_SEPARATOR=:
7649 fi
7650 rm -f conf$$.sh
7651fi
7652
7653# Find out how to test for executable files. Don't use a zero-byte file,
7654# as systems may use methods other than mode bits to determine executability.
7655cat >conf$$.file <<_ASEOF
7656#! /bin/sh
7657exit 0
7658_ASEOF
7659chmod +x conf$$.file
7660if test -x conf$$.file >/dev/null 2>&1; then
7661 ac_executable_p="test -x"
7662else
7663 ac_executable_p="test -f"
7664fi
7665rm -f conf$$.file
7666
7667# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 7668set dummy valgrind; ac_word=$2
b61ff9c8
BS
7669echo "$as_me:$LINENO: checking for $ac_word" >&5
7670echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7671if test "${ac_cv_path_valgrind_path+set}" = set; then
7672 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
7673else
7674 case "$valgrind_path" in
56694dd9
ZW
7675 [\\/]* | ?:[\\/]*)
7676 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
7677 ;;
414d23ae 7678 *)
56694dd9
ZW
7679 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
7680 for ac_dir in $PATH; do
7681 IFS="$ac_save_IFS"
7682 test -z "$ac_dir" && ac_dir=.
7683 for ac_exec_ext in '' $ac_executable_extensions; do
7684 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
7685 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
7686 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
7687 break 2
7688 fi
7689 fi
7690 done
7691 done
7692 IFS="$ac_save_IFS"
7693 ;;
414d23ae 7694esac
75e93faa 7695fi
414d23ae
HPN
7696valgrind_path="$ac_cv_path_valgrind_path"
7697if test -n "$valgrind_path"; then
b61ff9c8
BS
7698 echo "$as_me:$LINENO: result: $valgrind_path" >&5
7699echo "${ECHO_T}$valgrind_path" >&6
414d23ae 7700else
b61ff9c8
BS
7701 echo "$as_me:$LINENO: result: no" >&5
7702echo "${ECHO_T}no" >&6
414d23ae
HPN
7703fi
7704
a207b594
HPN
7705 if test "x$valgrind_path" = "x" \
7706 || (test $have_valgrind_h = no \
7707 && test $gcc_cv_header_memcheck_h = no \
7708 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
7709 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
7710echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
7711 { (exit 1); exit 1; }; }
414d23ae
HPN
7712 fi
7713 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
7714 valgrind_command="$valgrind_path -q"
ba479fd2
NN
7715
7716cat >>confdefs.h <<\_ACEOF
414d23ae 7717#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 7718_ACEOF
75e93faa 7719
a207b594 7720 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
7721
7722cat >>confdefs.h <<\_ACEOF
a207b594 7723#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 7724_ACEOF
a207b594
HPN
7725
7726 fi
14011ca4 7727 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
7728
7729cat >>confdefs.h <<\_ACEOF
14011ca4 7730#define HAVE_MEMCHECK_H 1
ba479fd2 7731_ACEOF
14011ca4
AJ
7732
7733 fi
414d23ae 7734fi
75e93faa 7735
75e93faa
ZW
7736
7737
414d23ae 7738# Enable code coverage collection
b61ff9c8 7739# Check whether --enable-coverage or --disable-coverage was given.
414d23ae 7740if test "${enable_coverage+set}" = set; then
b61ff9c8
BS
7741 enableval="$enable_coverage"
7742 case "${enableval}" in
6dd297da
NN
7743 yes|noopt)
7744 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
7745 ;;
7746 opt)
7747 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
7748 ;;
7749 no)
7750 # a.k.a. --disable-coverage
7751 coverage_flags=""
7752 ;;
7753 *)
7754 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
7755echo "$as_me: error: unknown coverage setting $enableval" >&2;}
7756 { (exit 1); exit 1; }; }
6dd297da 7757 ;;
414d23ae 7758esac
75e93faa 7759else
414d23ae 7760 coverage_flags=""
b61ff9c8 7761fi;
a3bba767 7762
2f41c1d6 7763
b61ff9c8 7764# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
1a4b763e 7765if test "${enable_gather_detailed_mem_stats+set}" = set; then
b61ff9c8
BS
7766 enableval="$enable_gather_detailed_mem_stats"
7767
439a7e54
DN
7768else
7769 enable_gather_detailed_mem_stats=no
b61ff9c8 7770fi;
439a7e54 7771if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
7772
7773cat >>confdefs.h <<\_ACEOF
439a7e54 7774#define GATHER_STATISTICS 1
ba479fd2 7775_ACEOF
439a7e54
DN
7776
7777fi
7778
73458fb7
NN
7779# -------------------------------
7780# Miscenalleous configure options
7781# -------------------------------
34a86c2b
NN
7782
7783# With stabs
ba479fd2 7784
b61ff9c8 7785# Check whether --with-stabs or --without-stabs was given.
34a86c2b 7786if test "${with_stabs+set}" = set; then
b61ff9c8
BS
7787 withval="$with_stabs"
7788 stabs="$with_stabs"
34a86c2b
NN
7789else
7790 stabs=no
b61ff9c8 7791fi;
cafe096b 7792
34a86c2b 7793# Determine whether or not multilibs are enabled.
b61ff9c8 7794# Check whether --enable-multilib or --disable-multilib was given.
34a86c2b 7795if test "${enable_multilib+set}" = set; then
b61ff9c8
BS
7796 enableval="$enable_multilib"
7797
34a86c2b
NN
7798else
7799 enable_multilib=yes
b61ff9c8 7800fi;
75e93faa 7801
34a86c2b 7802
414d23ae 7803# Enable __cxa_atexit for C++.
b61ff9c8 7804# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
414d23ae 7805if test "${enable___cxa_atexit+set}" = set; then
b61ff9c8 7806 enableval="$enable___cxa_atexit"
75e93faa 7807
b61ff9c8 7808fi;
75e93faa 7809
486aa804 7810# Enable C extension for decimal float if target supports it.
b61ff9c8 7811# Check whether --enable-decimal-float or --disable-decimal-float was given.
486aa804 7812if test "${enable_decimal_float+set}" = set; then
b61ff9c8
BS
7813 enableval="$enable_decimal_float"
7814
79b87c74
MM
7815 case $enable_decimal_float in
7816 yes | no | bid | dpd) ;;
7817 *) { { echo "$as_me:$LINENO: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
7818Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&5
7819echo "$as_me: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
7820Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&2;}
7821 { (exit 1); exit 1; }; } ;;
7822 esac
7823
7824else
7825
7826 case $target in
7827 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
a4a9df5f 7828 enable_decimal_float=yes
486aa804
BE
7829 ;;
7830 *)
7831 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
7832echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
7833 enable_decimal_float=no
7834 ;;
79b87c74 7835 esac
486aa804 7836
b61ff9c8 7837fi;
486aa804 7838
79b87c74
MM
7839dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
7840
7841cat >>confdefs.h <<_ACEOF
7842#define ENABLE_DECIMAL_FLOAT $dfp
7843_ACEOF
7844
7845
7846# x86's use BID format instead of DPD
7847case x$enable_decimal_float in
7848 xyes)
7849 case $target in
7850 i?86*-*-linux* | x86_64*-*-linux*)
7851 enable_decimal_float=bid
7852 ;;
7853 *)
7854 enable_decimal_float=dpd
7855 ;;
7856 esac
7857 ;;
7858 xno)
7859 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
7860 # dependency on libdecnumber.
7861 enable_decimal_float=dpd
7862 ;;
7863esac
486aa804
BE
7864
7865
79b87c74 7866bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
486aa804
BE
7867
7868cat >>confdefs.h <<_ACEOF
79b87c74 7869#define ENABLE_DECIMAL_BID_FORMAT $bid
486aa804
BE
7870_ACEOF
7871
7872
ab22c1fa 7873# Enable C extension for fixed-point arithmetic.
b61ff9c8 7874# Check whether --enable-fixed-point or --disable-fixed-point was given.
ab22c1fa 7875if test "${enable_fixed_point+set}" = set; then
b61ff9c8
BS
7876 enableval="$enable_fixed_point"
7877
ab22c1fa
CF
7878
7879else
7880
7881 case $target in
7882 mips*-*-*)
d5be1dd4 7883 case $host in
a0e527e3
RW
7884 mips*-sgi-irix*)
7885 { echo "$as_me:$LINENO: WARNING: fixed-point is not supported on IRIX" >&5
7886echo "$as_me: WARNING: fixed-point is not supported on IRIX" >&2;}
d5be1dd4
RS
7887 enable_fixed_point=no
7888 ;;
7889 *)
7890 enable_fixed_point=yes
7891 ;;
7892 esac
ab22c1fa
CF
7893 ;;
7894 *)
7895 { echo "$as_me:$LINENO: WARNING: fixed-point is not supported for this target" >&5
7896echo "$as_me: WARNING: fixed-point is not supported for this target" >&2;}
7897 enable_fixed_point=no
7898 ;;
7899 esac
7900
b61ff9c8 7901fi;
ab22c1fa
CF
7902
7903
7904fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi`
7905
7906cat >>confdefs.h <<_ACEOF
7907#define ENABLE_FIXED_POINT $fixedpoint
7908_ACEOF
7909
7910
414d23ae
HPN
7911# Enable threads
7912# Pass with no value to take the default
7913# Pass with a value to specify a thread package
b61ff9c8 7914# Check whether --enable-threads or --disable-threads was given.
414d23ae 7915if test "${enable_threads+set}" = set; then
b61ff9c8
BS
7916 enableval="$enable_threads"
7917
414d23ae
HPN
7918else
7919 enable_threads=''
b61ff9c8 7920fi;
2f41c1d6 7921
b61ff9c8 7922# Check whether --enable-tls or --disable-tls was given.
1a4b763e 7923if test "${enable_tls+set}" = set; then
b61ff9c8
BS
7924 enableval="$enable_tls"
7925
8dea1cca
DD
7926 case $enable_tls in
7927 yes | no) ;;
7928 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
7929Valid choices are 'yes' and 'no'." >&5
7930echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
7931Valid choices are 'yes' and 'no'." >&2;}
7932 { (exit 1); exit 1; }; } ;;
7933 esac
7934
7935else
7936 enable_tls=''
b61ff9c8 7937fi;
1a4b763e 7938
b61ff9c8 7939# Check whether --enable-objc-gc or --disable-objc-gc was given.
414d23ae 7940if test "${enable_objc_gc+set}" = set; then
b61ff9c8
BS
7941 enableval="$enable_objc_gc"
7942 if test x$enable_objc_gc = xno; then
414d23ae
HPN
7943 objc_boehm_gc=''
7944else
7945 objc_boehm_gc=1
7946fi
7947else
7948 objc_boehm_gc=''
b61ff9c8 7949fi;
75e93faa 7950
a6ccdbab 7951
b61ff9c8 7952# Check whether --with-dwarf2 or --without-dwarf2 was given.
414d23ae 7953if test "${with_dwarf2+set}" = set; then
b61ff9c8
BS
7954 withval="$with_dwarf2"
7955 dwarf2="$with_dwarf2"
75e93faa 7956else
414d23ae 7957 dwarf2=no
b61ff9c8 7958fi;
2f41c1d6 7959
b61ff9c8 7960# Check whether --enable-shared or --disable-shared was given.
1a4b763e 7961if test "${enable_shared+set}" = set; then
b61ff9c8
BS
7962 enableval="$enable_shared"
7963
414d23ae
HPN
7964 case $enable_shared in
7965 yes | no) ;;
7966 *)
7967 enable_shared=no
7968 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
7969 for pkg in $enableval; do
7970 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
7971 enable_shared=yes
7972 fi
7973 done
7974 IFS="$ac_save_ifs"
7975 ;;
7976 esac
7977
75e93faa 7978else
414d23ae 7979 enable_shared=yes
b61ff9c8 7980fi;
703d89ab 7981
ab22c1fa 7982
1a4b763e 7983
b61ff9c8 7984# Check whether --with-build-sysroot or --without-build-sysroot was given.
160633c6 7985if test "${with_build_sysroot+set}" = set; then
b61ff9c8 7986 withval="$with_build_sysroot"
160633c6 7987
b61ff9c8 7988fi;
160633c6
MM
7989
7990
b61ff9c8 7991# Check whether --with-sysroot or --without-sysroot was given.
4977bab6 7992if test "${with_sysroot+set}" = set; then
b61ff9c8
BS
7993 withval="$with_sysroot"
7994
4977bab6 7995 case ${with_sysroot} in
caa55b1e 7996 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
7997 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
7998 esac
ba479fd2 7999
4977bab6 8000 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14da6073 8001 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
4977bab6 8002
748670c2
RS
8003 if test "x$prefix" = xNONE; then
8004 test_prefix=/usr/local
8005 else
8006 test_prefix=$prefix
8007 fi
047d636f 8008 if test "x$exec_prefix" = xNONE; then
748670c2 8009 test_exec_prefix=$test_prefix
047d636f 8010 else
748670c2 8011 test_exec_prefix=$exec_prefix
047d636f
DJ
8012 fi
8013 case ${TARGET_SYSTEM_ROOT} in
91710e62 8014 "${test_prefix}"|"${test_prefix}/"*|\
748670c2
RS
8015 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
8016 '${prefix}'|'${prefix}/'*|\
91710e62 8017 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
8018 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
8019 TARGET_SYSTEM_ROOT_DEFINE="$t"
8020 ;;
8021 esac
8022
4977bab6 8023else
ba479fd2 8024
4977bab6 8025 TARGET_SYSTEM_ROOT=
db720d9a 8026 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
8027 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
8028
b61ff9c8 8029fi;
4977bab6
ZW
8030
8031
8032
8033
d1bd0ded 8034# Build with intermodule optimisations
b61ff9c8 8035# Check whether --enable-intermodule or --disable-intermodule was given.
d1bd0ded 8036if test "${enable_intermodule+set}" = set; then
b61ff9c8
BS
8037 enableval="$enable_intermodule"
8038 case ${enable_intermodule} in
0c46c5c7
KC
8039 yes) onestep="-onestep";;
8040 *) onestep="";;
d1bd0ded 8041esac
0c46c5c7
KC
8042else
8043 onestep=""
b61ff9c8 8044fi;
2f41c1d6
PB
8045
8046
8047
8048
b61ff9c8 8049# Check whether --with-pkgversion or --without-pkgversion was given.
2f41c1d6 8050if test "${with_pkgversion+set}" = set; then
b61ff9c8
BS
8051 withval="$with_pkgversion"
8052 case "$withval" in
2f41c1d6
PB
8053 yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
8054echo "$as_me: error: package version not specified" >&2;}
8055 { (exit 1); exit 1; }; } ;;
8056 no) PKGVERSION= ;;
8057 *) PKGVERSION="($withval) " ;;
8058 esac
8059else
8060 PKGVERSION="(GCC) "
8061
b61ff9c8 8062fi;
2f41c1d6
PB
8063
8064
8065
1a4b763e 8066
b61ff9c8 8067# Check whether --with-bugurl or --without-bugurl was given.
2f41c1d6 8068if test "${with_bugurl+set}" = set; then
b61ff9c8
BS
8069 withval="$with_bugurl"
8070 case "$withval" in
2f41c1d6
PB
8071 yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
8072echo "$as_me: error: bug URL not specified" >&2;}
8073 { (exit 1); exit 1; }; } ;;
8074 no) BUGURL=
8075 ;;
8076 *) BUGURL="$withval"
8077 ;;
8078 esac
8079else
8080 BUGURL="http://gcc.gnu.org/bugs.html"
8081
b61ff9c8 8082fi;
2f41c1d6
PB
8083 case ${BUGURL} in
8084 "")
8085 REPORT_BUGS_TO=
8086 REPORT_BUGS_TEXI=
8087 ;;
8088 *)
8089 REPORT_BUGS_TO="<$BUGURL>"
8090 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8091 ;;
8092 esac;
8093
ab22c1fa 8094
d1bd0ded
GK
8095
8096
f3c9f174
NN
8097# Sanity check enable_languages in case someone does not run the toplevel
8098# configure # script.
b61ff9c8 8099# Check whether --enable-languages or --disable-languages was given.
f3c9f174 8100if test "${enable_languages+set}" = set; then
b61ff9c8
BS
8101 enableval="$enable_languages"
8102 case ,${enable_languages}, in
f3c9f174
NN
8103 ,,|,yes,)
8104 # go safe -- we cannot be much sure without the toplevel
8105 # configure's
8106 # analysis of which target libs are present and usable
8107 enable_languages=c
8108 ;;
8109 *,all,*)
8110 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
8111echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
8112 { (exit 1); exit 1; }; }
8113 ;;
8114 *,c,*)
8115 ;;
8116 *)
8117 enable_languages=c,${enable_languages}
8118 ;;
8119esac
8120else
8121 enable_languages=c
b61ff9c8 8122fi;
f3c9f174 8123
9288b845
CD
8124# Used by documentation targets
8125
8126
8127
f3c9f174 8128
73458fb7
NN
8129# -------------------------
8130# Checks for other programs
8131# -------------------------
5b67ad6f 8132
b61ff9c8
BS
8133echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8134echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
8135set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
8136if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
ba479fd2 8137 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 8138else
ba479fd2 8139 cat >conftest.make <<\_ACEOF
e9a25f70 8140all:
b61ff9c8 8141 @echo 'ac_maketemp="$(MAKE)"'
ba479fd2 8142_ACEOF
e9a25f70 8143# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
b61ff9c8
BS
8144eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
8145if test -n "$ac_maketemp"; then
8146 eval ac_cv_prog_make_${ac_make}_set=yes
8147else
8148 eval ac_cv_prog_make_${ac_make}_set=no
8149fi
ba479fd2 8150rm -f conftest.make
e9a25f70 8151fi
b61ff9c8
BS
8152if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
8153 echo "$as_me:$LINENO: result: yes" >&5
8154echo "${ECHO_T}yes" >&6
e9a25f70
JL
8155 SET_MAKE=
8156else
b61ff9c8
BS
8157 echo "$as_me:$LINENO: result: no" >&5
8158echo "${ECHO_T}no" >&6
e9a25f70
JL
8159 SET_MAKE="MAKE=${MAKE-make}"
8160fi
8161
8162
861bb6c1 8163# Find some useful tools
ba479fd2 8164for ac_prog in gawk mawk nawk awk
861bb6c1 8165do
ba479fd2 8166 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 8167set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
8168echo "$as_me:$LINENO: checking for $ac_word" >&5
8169echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8170if test "${ac_cv_prog_AWK+set}" = set; then
8171 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
8172else
8173 if test -n "$AWK"; then
8174 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8175else
ba479fd2
NN
8176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8177for as_dir in $PATH
8178do
8179 IFS=$as_save_IFS
8180 test -z "$as_dir" && as_dir=.
8181 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8182 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8183 ac_cv_prog_AWK="$ac_prog"
8184 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8185 break 2
8186 fi
8187done
8188done
8189
861bb6c1
JL
8190fi
8191fi
ba479fd2 8192AWK=$ac_cv_prog_AWK
861bb6c1 8193if test -n "$AWK"; then
b61ff9c8
BS
8194 echo "$as_me:$LINENO: result: $AWK" >&5
8195echo "${ECHO_T}$AWK" >&6
861bb6c1 8196else
b61ff9c8
BS
8197 echo "$as_me:$LINENO: result: no" >&5
8198echo "${ECHO_T}no" >&6
861bb6c1
JL
8199fi
8200
ba479fd2 8201 test -n "$AWK" && break
861bb6c1
JL
8202done
8203
776dc15d 8204# We need awk to create options.c and options.h.
2c4902b9
NN
8205# Bail out if it's missing.
8206case ${AWK} in
ba479fd2
NN
8207 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
8208echo "$as_me: error: can't build without awk, bailing out" >&2;}
8209 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
8210esac
8211
b61ff9c8
BS
8212echo "$as_me:$LINENO: checking whether ln -s works" >&5
8213echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
ba479fd2
NN
8214if test "${gcc_cv_prog_LN_S+set}" = set; then
8215 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
8216else
8217 rm -f conftestdata_t
8218echo >conftestdata_f
8219if ln -s conftestdata_f conftestdata_t 2>/dev/null
8220then
8221 gcc_cv_prog_LN_S="ln -s"
8222else
8223 if ln conftestdata_f conftestdata_t 2>/dev/null
8224 then
8225 gcc_cv_prog_LN_S=ln
8226 else
35f06ae4
PB
8227 if cp -p conftestdata_f conftestdata_t 2>/dev/null
8228 then
06c3418c 8229 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
8230 else
8231 gcc_cv_prog_LN_S=cp
8232 fi
0a4b6309
RL
8233 fi
8234fi
8235rm -f conftestdata_f conftestdata_t
8236
8237fi
8238LN_S="$gcc_cv_prog_LN_S"
8239if test "$gcc_cv_prog_LN_S" = "ln -s"; then
b61ff9c8
BS
8240 echo "$as_me:$LINENO: result: yes" >&5
8241echo "${ECHO_T}yes" >&6
0a4b6309
RL
8242else
8243 if test "$gcc_cv_prog_LN_S" = "ln"; then
b61ff9c8
BS
8244 echo "$as_me:$LINENO: result: no, using ln" >&5
8245echo "${ECHO_T}no, using ln" >&6
0a4b6309 8246 else
b61ff9c8
BS
8247 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
8248echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
8249 fi
8250fi
8251
b61ff9c8
BS
8252echo "$as_me:$LINENO: checking whether ln works" >&5
8253echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
18fc9bd4
RG
8254if test "${acx_cv_prog_LN+set}" = set; then
8255 echo $ECHO_N "(cached) $ECHO_C" >&6
8256else
8257 rm -f conftestdata_t
8258echo >conftestdata_f
8259if ln conftestdata_f conftestdata_t 2>/dev/null
8260then
8261 acx_cv_prog_LN=ln
8262else
8263 acx_cv_prog_LN=no
8264fi
8265rm -f conftestdata_f conftestdata_t
8266
8267fi
8268if test $acx_cv_prog_LN = no; then
8269 LN="$LN_S"
b61ff9c8
BS
8270 echo "$as_me:$LINENO: result: no, using $LN" >&5
8271echo "${ECHO_T}no, using $LN" >&6
18fc9bd4
RG
8272else
8273 LN="$acx_cv_prog_LN"
b61ff9c8
BS
8274 echo "$as_me:$LINENO: result: yes" >&5
8275echo "${ECHO_T}yes" >&6
18fc9bd4
RG
8276fi
8277
ba479fd2
NN
8278if test -n "$ac_tool_prefix"; then
8279 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8280set dummy ${ac_tool_prefix}ranlib; ac_word=$2
b61ff9c8
BS
8281echo "$as_me:$LINENO: checking for $ac_word" >&5
8282echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8283if test "${ac_cv_prog_RANLIB+set}" = set; then
8284 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
8285else
8286 if test -n "$RANLIB"; then
8287 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8288else
ba479fd2
NN
8289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8290for as_dir in $PATH
8291do
8292 IFS=$as_save_IFS
8293 test -z "$as_dir" && as_dir=.
8294 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8295 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8296 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8297 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8298 break 2
8299 fi
8300done
8301done
8302
6e3f3080
NN
8303fi
8304fi
ba479fd2 8305RANLIB=$ac_cv_prog_RANLIB
6e3f3080 8306if test -n "$RANLIB"; then
b61ff9c8
BS
8307 echo "$as_me:$LINENO: result: $RANLIB" >&5
8308echo "${ECHO_T}$RANLIB" >&6
ba479fd2 8309else
b61ff9c8
BS
8310 echo "$as_me:$LINENO: result: no" >&5
8311echo "${ECHO_T}no" >&6
ba479fd2
NN
8312fi
8313
8314fi
8315if test -z "$ac_cv_prog_RANLIB"; then
8316 ac_ct_RANLIB=$RANLIB
8317 # Extract the first word of "ranlib", so it can be a program name with args.
8318set dummy ranlib; ac_word=$2
b61ff9c8
BS
8319echo "$as_me:$LINENO: checking for $ac_word" >&5
8320echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8321if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8322 echo $ECHO_N "(cached) $ECHO_C" >&6
8323else
8324 if test -n "$ac_ct_RANLIB"; then
8325 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8326else
8327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8328for as_dir in $PATH
8329do
8330 IFS=$as_save_IFS
8331 test -z "$as_dir" && as_dir=.
8332 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8333 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8334 ac_cv_prog_ac_ct_RANLIB="ranlib"
8335 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8336 break 2
8337 fi
8338done
8339done
8340
b61ff9c8 8341 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
ba479fd2
NN
8342fi
8343fi
8344ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8345if test -n "$ac_ct_RANLIB"; then
b61ff9c8
BS
8346 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8347echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 8348else
b61ff9c8
BS
8349 echo "$as_me:$LINENO: result: no" >&5
8350echo "${ECHO_T}no" >&6
ba479fd2
NN
8351fi
8352
b61ff9c8 8353 RANLIB=$ac_ct_RANLIB
ba479fd2
NN
8354else
8355 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
8356fi
8357
343a6100
MM
8358case "${host}" in
8359*-*-darwin*)
8360 # By default, the Darwin ranlib will not treat common symbols as
8361 # definitions when building the archive table of contents. Other
8362 # ranlibs do that; pass an option to the Darwin ranlib that makes
8363 # it behave similarly.
8364 ranlib_flags="-c"
8365 ;;
8366*)
8367 ranlib_flags=""
8368esac
8369
8370
0a4b6309
RL
8371# Find a good install program. We prefer a C program (faster),
8372# so one script is as good as another. But avoid the broken or
8373# incompatible versions:
8374# SysV /etc/install, /usr/sbin/install
8375# SunOS /usr/etc/install
8376# IRIX /sbin/install
8377# AIX /bin/install
8378# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8379# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8380# ./install, which can be erroneously created by make from ./install.sh.
b61ff9c8
BS
8381echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
8382echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 8383if test -z "$INSTALL"; then
ba479fd2
NN
8384if test "${ac_cv_path_install+set}" = set; then
8385 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
8386else
8387 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
8388 for ac_dir in $PATH; do
8389 # Account for people who put trailing slashes in PATH elements.
8390 case "$ac_dir/" in
8391 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
8392 *)
8393 # OSF1 and SCO ODT 3.0 have their own names for install.
8394 for ac_prog in ginstall scoinst install; do
8395 if test -f $ac_dir/$ac_prog; then
8396 if test $ac_prog = install &&
8397 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
8398 # AIX install. It has an incompatible calling convention.
8399 # OSF/1 installbsd also uses dspmsg, but is usable.
8400 :
8401 else
8402 ac_cv_path_install="$ac_dir/$ac_prog -c"
8403 break 2
8404 fi
8405 fi
8406 done
8407 ;;
8408 esac
8409 done
8410 IFS="$ac_save_IFS"
8411
8412fi
8413 if test "${ac_cv_path_install+set}" = set; then
8414 INSTALL="$ac_cv_path_install"
8415 else
8416 # As a last resort, use the slow shell script. We don't cache a
8417 # path for INSTALL within a source directory, because that will
8418 # break other packages using the cache if that directory is
8419 # removed, or if the path is relative.
8420 INSTALL="$ac_install_sh"
8421 fi
8422fi
b61ff9c8
BS
8423echo "$as_me:$LINENO: result: $INSTALL" >&5
8424echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
8425
8426# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8427# It thinks the first close brace ends the variable substitution.
8428test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8429
8430test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8431
861bb6c1 8432
3a000df0 8433# See if cmp has --ignore-initial.
b61ff9c8
BS
8434echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
8435echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
ba479fd2
NN
8436if test "${gcc_cv_prog_cmp_skip+set}" = set; then
8437 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
8438else
8439 echo abfoo >t1
8440 echo cdfoo >t2
269a7343 8441 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
8442 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
8443 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 8444 :
3a000df0
KC
8445 else
8446 gcc_cv_prog_cmp_skip=gnucompare
8447 fi
269a7343
KG
8448 fi
8449 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
8450 if cmp t1 t2 2 2 > /dev/null 2>&1; then
8451 if cmp t1 t2 1 1 > /dev/null 2>&1; then
8452 :
8453 else
8454 gcc_cv_prog_cmp_skip=fastcompare
8455 fi
8456 fi
3a000df0
KC
8457 fi
8458 rm t1 t2
8459
8460fi
b61ff9c8
BS
8461echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
8462echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
8463make_compare_target=$gcc_cv_prog_cmp_skip
8464
8465
8466
73458fb7
NN
8467# See if we have the mktemp command.
8468# Extract the first word of "mktemp", so it can be a program name with args.
8469set dummy mktemp; ac_word=$2
b61ff9c8
BS
8470echo "$as_me:$LINENO: checking for $ac_word" >&5
8471echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8472if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
8473 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8474else
8475 if test -n "$have_mktemp_command"; then
8476 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
8477else
ba479fd2
NN
8478as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8479for as_dir in $PATH
8480do
8481 IFS=$as_save_IFS
8482 test -z "$as_dir" && as_dir=.
8483 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8484 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8485 ac_cv_prog_have_mktemp_command="yes"
8486 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8487 break 2
8488 fi
8489done
8490done
8491
73458fb7
NN
8492 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
8493fi
8494fi
ba479fd2 8495have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 8496if test -n "$have_mktemp_command"; then
b61ff9c8
BS
8497 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
8498echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 8499else
b61ff9c8
BS
8500 echo "$as_me:$LINENO: result: no" >&5
8501echo "${ECHO_T}no" >&6
73458fb7
NN
8502fi
8503
8504
7c27e184
PB
8505# See if makeinfo has been installed and is modern enough
8506# that we can use it.
9f18db39 8507
3bbd5a19 8508 # Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 8509set dummy makeinfo; ac_word=$2
b61ff9c8
BS
8510echo "$as_me:$LINENO: checking for $ac_word" >&5
8511echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8512if test "${ac_cv_prog_MAKEINFO+set}" = set; then
8513 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8514else
8515 if test -n "$MAKEINFO"; then
8516 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
8517else
ba479fd2
NN
8518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8519for as_dir in $PATH
8520do
8521 IFS=$as_save_IFS
8522 test -z "$as_dir" && as_dir=.
8523 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8524 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8525 ac_cv_prog_MAKEINFO="makeinfo"
8526 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8527 break 2
8528 fi
8529done
8530done
8531
73458fb7
NN
8532fi
8533fi
ba479fd2 8534MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 8535if test -n "$MAKEINFO"; then
b61ff9c8
BS
8536 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
8537echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 8538else
b61ff9c8
BS
8539 echo "$as_me:$LINENO: result: no" >&5
8540echo "${ECHO_T}no" >&6
73458fb7
NN
8541fi
8542
3bbd5a19
PB
8543 if test -n "$MAKEINFO"; then
8544 # Found it, now check the version.
b61ff9c8
BS
8545 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
8546echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
ba479fd2
NN
8547if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
8548 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7 8549else
3bbd5a19
PB
8550 ac_prog_version=`eval $MAKEINFO --version 2>&1 |
8551 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
8552
8553 case $ac_prog_version in
8554 '') gcc_cv_prog_makeinfo_modern=no;;
4c471775 8555 4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;;
3bbd5a19
PB
8556 *) gcc_cv_prog_makeinfo_modern=no;;
8557 esac
73458fb7
NN
8558
8559fi
b61ff9c8
BS
8560echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
8561echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
3bbd5a19
PB
8562 else
8563 gcc_cv_prog_makeinfo_modern=no
8564 fi
8565 if test $gcc_cv_prog_makeinfo_modern = no; then
8566 MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo"
8567 fi
73458fb7 8568
73458fb7 8569if test $gcc_cv_prog_makeinfo_modern = no; then
ba479fd2
NN
8570 { echo "$as_me:$LINENO: WARNING:
8571*** Makeinfo is missing or too old.
8572*** Info documentation will not be built." >&5
8573echo "$as_me: WARNING:
cafe096b 8574*** Makeinfo is missing or too old.
ba479fd2 8575*** Info documentation will not be built." >&2;}
73458fb7
NN
8576 BUILD_INFO=
8577else
ba479fd2 8578 BUILD_INFO=info
73458fb7
NN
8579fi
8580
7c27e184 8581
73458fb7 8582# Is pod2man recent enough to regenerate manpages?
b61ff9c8
BS
8583echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
8584echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 8585if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
b61ff9c8
BS
8586 echo "$as_me:$LINENO: result: yes" >&5
8587echo "${ECHO_T}yes" >&6
ba479fd2 8588 GENERATED_MANPAGES=generated-manpages
73458fb7 8589else
b61ff9c8
BS
8590 echo "$as_me:$LINENO: result: no" >&5
8591echo "${ECHO_T}no" >&6
73458fb7
NN
8592 GENERATED_MANPAGES=
8593fi
8594
7c27e184 8595
3bbd5a19
PB
8596MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
8597
73458fb7 8598# How about lex?
7c27e184
PB
8599for ac_prog in flex
8600do
8601 # Extract the first word of "$ac_prog", so it can be a program name with args.
8602set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
8603echo "$as_me:$LINENO: checking for $ac_word" >&5
8604echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8605if test "${ac_cv_prog_FLEX+set}" = set; then
8606 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8607else
8608 if test -n "$FLEX"; then
8609 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
8610else
ba479fd2
NN
8611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8612for as_dir in $PATH
8613do
8614 IFS=$as_save_IFS
8615 test -z "$as_dir" && as_dir=.
8616 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8617 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 8618 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
8619 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8620 break 2
8621 fi
8622done
8623done
8624
73458fb7
NN
8625fi
8626fi
ba479fd2 8627FLEX=$ac_cv_prog_FLEX
73458fb7 8628if test -n "$FLEX"; then
b61ff9c8
BS
8629 echo "$as_me:$LINENO: result: $FLEX" >&5
8630echo "${ECHO_T}$FLEX" >&6
73458fb7 8631else
b61ff9c8
BS
8632 echo "$as_me:$LINENO: result: no" >&5
8633echo "${ECHO_T}no" >&6
73458fb7
NN
8634fi
8635
7c27e184
PB
8636 test -n "$FLEX" && break
8637done
8638test -n "$FLEX" || FLEX="$MISSING flex"
8639
73458fb7
NN
8640
8641# Bison?
7c27e184
PB
8642for ac_prog in bison
8643do
8644 # Extract the first word of "$ac_prog", so it can be a program name with args.
8645set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
8646echo "$as_me:$LINENO: checking for $ac_word" >&5
8647echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8648if test "${ac_cv_prog_BISON+set}" = set; then
8649 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8650else
8651 if test -n "$BISON"; then
8652 ac_cv_prog_BISON="$BISON" # Let the user override the test.
8653else
ba479fd2
NN
8654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8655for as_dir in $PATH
8656do
8657 IFS=$as_save_IFS
8658 test -z "$as_dir" && as_dir=.
8659 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8660 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 8661 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
8662 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8663 break 2
8664 fi
8665done
8666done
8667
73458fb7
NN
8668fi
8669fi
ba479fd2 8670BISON=$ac_cv_prog_BISON
73458fb7 8671if test -n "$BISON"; then
b61ff9c8
BS
8672 echo "$as_me:$LINENO: result: $BISON" >&5
8673echo "${ECHO_T}$BISON" >&6
73458fb7 8674else
b61ff9c8
BS
8675 echo "$as_me:$LINENO: result: no" >&5
8676echo "${ECHO_T}no" >&6
73458fb7
NN
8677fi
8678
7c27e184
PB
8679 test -n "$BISON" && break
8680done
8681test -n "$BISON" || BISON="$MISSING bison"
8682
8683
8684# Binutils are not build modules, unlike bison/flex/makeinfo. So we
8685# check for build == host before using them.
73458fb7 8686
f6a874ac 8687# NM
414adbdd
GK
8688if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
8689 && test -d ../binutils ; then
f6a874ac
JW
8690 NM='$(objdir)/../binutils/nm-new'
8691else
8692 # Extract the first word of "nm", so it can be a program name with args.
8693set dummy nm; ac_word=$2
b61ff9c8
BS
8694echo "$as_me:$LINENO: checking for $ac_word" >&5
8695echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
f6a874ac
JW
8696if test "${ac_cv_prog_NM+set}" = set; then
8697 echo $ECHO_N "(cached) $ECHO_C" >&6
8698else
8699 if test -n "$NM"; then
8700 ac_cv_prog_NM="$NM" # Let the user override the test.
8701else
8702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8703for as_dir in $PATH
8704do
8705 IFS=$as_save_IFS
8706 test -z "$as_dir" && as_dir=.
8707 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8708 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f6a874ac
JW
8709 ac_cv_prog_NM="nm"
8710 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8711 break 2
8712 fi
8713done
8714done
8715
8716 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
8717fi
8718fi
8719NM=$ac_cv_prog_NM
8720if test -n "$NM"; then
b61ff9c8
BS
8721 echo "$as_me:$LINENO: result: $NM" >&5
8722echo "${ECHO_T}$NM" >&6
f6a874ac 8723else
b61ff9c8
BS
8724 echo "$as_me:$LINENO: result: no" >&5
8725echo "${ECHO_T}no" >&6
f6a874ac
JW
8726fi
8727
8728fi
8729
8730# AR
414adbdd
GK
8731if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
8732 && test -d ../binutils ; then
f6a874ac
JW
8733 AR='$(objdir)/../binutils/ar'
8734else
8735 # Extract the first word of "ar", so it can be a program name with args.
8736set dummy ar; ac_word=$2
b61ff9c8
BS
8737echo "$as_me:$LINENO: checking for $ac_word" >&5
8738echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
f6a874ac
JW
8739if test "${ac_cv_prog_AR+set}" = set; then
8740 echo $ECHO_N "(cached) $ECHO_C" >&6
8741else
8742 if test -n "$AR"; then
8743 ac_cv_prog_AR="$AR" # Let the user override the test.
8744else
8745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8746for as_dir in $PATH
8747do
8748 IFS=$as_save_IFS
8749 test -z "$as_dir" && as_dir=.
8750 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8751 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f6a874ac
JW
8752 ac_cv_prog_AR="ar"
8753 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8754 break 2
8755 fi
8756done
8757done
8758
8759 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
8760fi
8761fi
8762AR=$ac_cv_prog_AR
8763if test -n "$AR"; then
b61ff9c8
BS
8764 echo "$as_me:$LINENO: result: $AR" >&5
8765echo "${ECHO_T}$AR" >&6
f6a874ac 8766else
b61ff9c8
BS
8767 echo "$as_me:$LINENO: result: no" >&5
8768echo "${ECHO_T}no" >&6
f6a874ac
JW
8769fi
8770
8771fi
8772
8773
73458fb7
NN
8774# --------------------
8775# Checks for C headers
8776# --------------------
8777
ca9bc441
NN
8778# Need to reject headers which give warnings, so that the -Werror bootstrap
8779# works later. *sigh* This needs to come before all header checks.
18fc9bd4 8780
ca9bc441
NN
8781ac_c_preproc_warn_flag=yes
8782
b61ff9c8
BS
8783echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8784echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
ba479fd2
NN
8785if test "${ac_cv_header_stdc+set}" = set; then
8786 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8787else
ba479fd2 8788 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8789/* confdefs.h. */
8790_ACEOF
8791cat confdefs.h >>conftest.$ac_ext
8792cat >>conftest.$ac_ext <<_ACEOF
8793/* end confdefs.h. */
956d6950
JL
8794#include <stdlib.h>
8795#include <stdarg.h>
8796#include <string.h>
8797#include <float.h>
ba479fd2
NN
8798
8799int
8800main ()
8801{
8802
8803 ;
8804 return 0;
8805}
8806_ACEOF
8807rm -f conftest.$ac_objext
b61ff9c8
BS
8808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8809 (eval $ac_compile) 2>conftest.er1
ba479fd2 8810 ac_status=$?
86da66b5
HPN
8811 grep -v '^ *+' conftest.er1 >conftest.err
8812 rm -f conftest.er1
8813 cat conftest.err >&5
ba479fd2 8814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8815 (exit $ac_status); } &&
8816 { ac_try='test -z "$ac_c_werror_flag"
8817 || test ! -s conftest.err'
8818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8819 (eval $ac_try) 2>&5
8820 ac_status=$?
8821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8822 (exit $ac_status); }; } &&
8823 { ac_try='test -s conftest.$ac_objext'
8824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8825 (eval $ac_try) 2>&5
8826 ac_status=$?
8827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8828 (exit $ac_status); }; }; then
956d6950
JL
8829 ac_cv_header_stdc=yes
8830else
ba479fd2
NN
8831 echo "$as_me: failed program was:" >&5
8832sed 's/^/| /' conftest.$ac_ext >&5
8833
b61ff9c8 8834ac_cv_header_stdc=no
956d6950 8835fi
b61ff9c8 8836rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
8837
8838if test $ac_cv_header_stdc = yes; then
8839 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 8840 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8841/* confdefs.h. */
8842_ACEOF
8843cat confdefs.h >>conftest.$ac_ext
8844cat >>conftest.$ac_ext <<_ACEOF
8845/* end confdefs.h. */
956d6950 8846#include <string.h>
ba479fd2
NN
8847
8848_ACEOF
956d6950 8849if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8850 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
8851 :
8852else
956d6950
JL
8853 ac_cv_header_stdc=no
8854fi
8855rm -f conftest*
8856
8857fi
8858
8859if test $ac_cv_header_stdc = yes; then
8860 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 8861 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8862/* confdefs.h. */
8863_ACEOF
8864cat confdefs.h >>conftest.$ac_ext
8865cat >>conftest.$ac_ext <<_ACEOF
8866/* end confdefs.h. */
956d6950 8867#include <stdlib.h>
ba479fd2
NN
8868
8869_ACEOF
956d6950 8870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8871 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
8872 :
8873else
956d6950
JL
8874 ac_cv_header_stdc=no
8875fi
8876rm -f conftest*
8877
8878fi
8879
8880if test $ac_cv_header_stdc = yes; then
8881 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 8882 if test "$cross_compiling" = yes; then
956d6950
JL
8883 :
8884else
ba479fd2 8885 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8886/* confdefs.h. */
8887_ACEOF
8888cat confdefs.h >>conftest.$ac_ext
8889cat >>conftest.$ac_ext <<_ACEOF
8890/* end confdefs.h. */
956d6950 8891#include <ctype.h>
ba479fd2
NN
8892#if ((' ' & 0x0FF) == 0x020)
8893# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8894# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8895#else
8896# define ISLOWER(c) \
86da66b5
HPN
8897 (('a' <= (c) && (c) <= 'i') \
8898 || ('j' <= (c) && (c) <= 'r') \
8899 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
8900# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8901#endif
63cf211a 8902
ba479fd2
NN
8903#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8904int
8905main ()
8906{
8907 int i;
8908 for (i = 0; i < 256; i++)
8909 if (XOR (islower (i), ISLOWER (i))
86da66b5 8910 || toupper (i) != TOUPPER (i))
b61ff9c8
BS
8911 exit(2);
8912 exit (0);
ba479fd2
NN
8913}
8914_ACEOF
8915rm -f conftest$ac_exeext
b61ff9c8
BS
8916if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8917 (eval $ac_link) 2>&5
ba479fd2
NN
8918 ac_status=$?
8919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
8921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8922 (eval $ac_try) 2>&5
ba479fd2
NN
8923 ac_status=$?
8924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8925 (exit $ac_status); }; }; then
956d6950
JL
8926 :
8927else
ba479fd2
NN
8928 echo "$as_me: program exited with status $ac_status" >&5
8929echo "$as_me: failed program was:" >&5
8930sed 's/^/| /' conftest.$ac_ext >&5
8931
8932( exit $ac_status )
8933ac_cv_header_stdc=no
956d6950 8934fi
b61ff9c8 8935rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 8936fi
956d6950
JL
8937fi
8938fi
b61ff9c8
BS
8939echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8940echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 8941if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
8942
8943cat >>confdefs.h <<\_ACEOF
956d6950 8944#define STDC_HEADERS 1
ba479fd2 8945_ACEOF
956d6950
JL
8946
8947fi
8948
b61ff9c8
BS
8949echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
8950echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
ba479fd2
NN
8951if test "${ac_cv_header_time+set}" = set; then
8952 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8953else
ba479fd2 8954 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8955/* confdefs.h. */
8956_ACEOF
8957cat confdefs.h >>conftest.$ac_ext
8958cat >>conftest.$ac_ext <<_ACEOF
8959/* end confdefs.h. */
956d6950
JL
8960#include <sys/types.h>
8961#include <sys/time.h>
8962#include <time.h>
ba479fd2
NN
8963
8964int
8965main ()
8966{
8967if ((struct tm *) 0)
8968return 0;
8969 ;
8970 return 0;
8971}
8972_ACEOF
8973rm -f conftest.$ac_objext
b61ff9c8
BS
8974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8975 (eval $ac_compile) 2>conftest.er1
ba479fd2 8976 ac_status=$?
86da66b5
HPN
8977 grep -v '^ *+' conftest.er1 >conftest.err
8978 rm -f conftest.er1
8979 cat conftest.err >&5
ba479fd2 8980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8981 (exit $ac_status); } &&
8982 { ac_try='test -z "$ac_c_werror_flag"
8983 || test ! -s conftest.err'
8984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8985 (eval $ac_try) 2>&5
8986 ac_status=$?
8987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8988 (exit $ac_status); }; } &&
8989 { ac_try='test -s conftest.$ac_objext'
8990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8991 (eval $ac_try) 2>&5
8992 ac_status=$?
8993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8994 (exit $ac_status); }; }; then
956d6950
JL
8995 ac_cv_header_time=yes
8996else
ba479fd2
NN
8997 echo "$as_me: failed program was:" >&5
8998sed 's/^/| /' conftest.$ac_ext >&5
8999
b61ff9c8 9000ac_cv_header_time=no
956d6950 9001fi
b61ff9c8 9002rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 9003fi
b61ff9c8
BS
9004echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
9005echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 9006if test $ac_cv_header_time = yes; then
ba479fd2
NN
9007
9008cat >>confdefs.h <<\_ACEOF
956d6950 9009#define TIME_WITH_SYS_TIME 1
ba479fd2 9010_ACEOF
956d6950
JL
9011
9012fi
9013
b61ff9c8
BS
9014echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
9015echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
18fc9bd4
RG
9016if test "${gcc_cv_header_string+set}" = set; then
9017 echo $ECHO_N "(cached) $ECHO_C" >&6
9018else
9019 cat >conftest.$ac_ext <<_ACEOF
9020/* confdefs.h. */
9021_ACEOF
9022cat confdefs.h >>conftest.$ac_ext
9023cat >>conftest.$ac_ext <<_ACEOF
9024/* end confdefs.h. */
9025#include <string.h>
9026#include <strings.h>
9027int
9028main ()
9029{
9030
9031 ;
9032 return 0;
9033}
9034_ACEOF
9035rm -f conftest.$ac_objext
b61ff9c8
BS
9036if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9037 (eval $ac_compile) 2>conftest.er1
18fc9bd4
RG
9038 ac_status=$?
9039 grep -v '^ *+' conftest.er1 >conftest.err
9040 rm -f conftest.er1
9041 cat conftest.err >&5
9042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9043 (exit $ac_status); } &&
9044 { ac_try='test -z "$ac_c_werror_flag"
9045 || test ! -s conftest.err'
9046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9047 (eval $ac_try) 2>&5
9048 ac_status=$?
9049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9050 (exit $ac_status); }; } &&
9051 { ac_try='test -s conftest.$ac_objext'
9052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9053 (eval $ac_try) 2>&5
9054 ac_status=$?
9055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9056 (exit $ac_status); }; }; then
18fc9bd4
RG
9057 gcc_cv_header_string=yes
9058else
9059 echo "$as_me: failed program was:" >&5
9060sed 's/^/| /' conftest.$ac_ext >&5
9061
b61ff9c8 9062gcc_cv_header_string=no
18fc9bd4 9063fi
b61ff9c8 9064rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18fc9bd4 9065fi
b61ff9c8
BS
9066echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
9067echo "${ECHO_T}$gcc_cv_header_string" >&6
18fc9bd4
RG
9068if test $gcc_cv_header_string = yes; then
9069
9070cat >>confdefs.h <<\_ACEOF
9071#define STRING_WITH_STRINGS 1
9072_ACEOF
9073
9074fi
9075
b61ff9c8
BS
9076echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
9077echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
ba479fd2
NN
9078if test "${ac_cv_header_sys_wait_h+set}" = set; then
9079 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 9080else
ba479fd2 9081 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9082/* confdefs.h. */
9083_ACEOF
9084cat confdefs.h >>conftest.$ac_ext
9085cat >>conftest.$ac_ext <<_ACEOF
9086/* end confdefs.h. */
e9831ca0
KG
9087#include <sys/types.h>
9088#include <sys/wait.h>
9089#ifndef WEXITSTATUS
b61ff9c8 9090# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
9091#endif
9092#ifndef WIFEXITED
ba479fd2 9093# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 9094#endif
ba479fd2
NN
9095
9096int
9097main ()
9098{
9099 int s;
9100 wait (&s);
9101 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9102 ;
9103 return 0;
9104}
9105_ACEOF
9106rm -f conftest.$ac_objext
b61ff9c8
BS
9107if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9108 (eval $ac_compile) 2>conftest.er1
ba479fd2 9109 ac_status=$?
86da66b5
HPN
9110 grep -v '^ *+' conftest.er1 >conftest.err
9111 rm -f conftest.er1
9112 cat conftest.err >&5
ba479fd2 9113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9114 (exit $ac_status); } &&
9115 { ac_try='test -z "$ac_c_werror_flag"
9116 || test ! -s conftest.err'
9117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9118 (eval $ac_try) 2>&5
9119 ac_status=$?
9120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9121 (exit $ac_status); }; } &&
9122 { ac_try='test -s conftest.$ac_objext'
9123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9124 (eval $ac_try) 2>&5
9125 ac_status=$?
9126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9127 (exit $ac_status); }; }; then
e9831ca0
KG
9128 ac_cv_header_sys_wait_h=yes
9129else
ba479fd2
NN
9130 echo "$as_me: failed program was:" >&5
9131sed 's/^/| /' conftest.$ac_ext >&5
9132
b61ff9c8 9133ac_cv_header_sys_wait_h=no
e9831ca0 9134fi
b61ff9c8 9135rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 9136fi
b61ff9c8
BS
9137echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
9138echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 9139if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
9140
9141cat >>confdefs.h <<\_ACEOF
e9831ca0 9142#define HAVE_SYS_WAIT_H 1
ba479fd2 9143_ACEOF
6e3f3080 9144
63cf211a 9145fi
6e3f3080 9146
ba479fd2
NN
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
dfb77e37
KC
9168
9169for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 9170 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 9171 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 9172 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 9173do
ba479fd2 9174as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b61ff9c8
BS
9175echo "$as_me:$LINENO: checking for $ac_header" >&5
9176echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9177if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 9178 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9179else
18fc9bd4 9180 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9181/* confdefs.h. */
9182_ACEOF
9183cat confdefs.h >>conftest.$ac_ext
9184cat >>conftest.$ac_ext <<_ACEOF
9185/* end confdefs.h. */
9186#include <$ac_header>
9187_ACEOF
b61ff9c8
BS
9188if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9189 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9190 ac_status=$?
9191 grep -v '^ *+' conftest.er1 >conftest.err
9192 rm -f conftest.er1
9193 cat conftest.err >&5
9194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9195 (exit $ac_status); } >/dev/null; then
9196 if test -s conftest.err; then
9197 ac_cpp_err=$ac_c_preproc_warn_flag
9198 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9199 else
9200 ac_cpp_err=
9201 fi
9202else
9203 ac_cpp_err=yes
9204fi
9205if test -z "$ac_cpp_err"; then
18fc9bd4 9206 eval "$as_ac_Header=yes"
ba479fd2
NN
9207else
9208 echo "$as_me: failed program was:" >&5
9209sed 's/^/| /' conftest.$ac_ext >&5
9210
18fc9bd4 9211 eval "$as_ac_Header=no"
ba479fd2
NN
9212fi
9213rm -f conftest.err conftest.$ac_ext
6e3f3080 9214fi
b61ff9c8
BS
9215echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9216echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
9217if test `eval echo '${'$as_ac_Header'}'` = yes; then
9218 cat >>confdefs.h <<_ACEOF
9219#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9220_ACEOF
9221
956d6950
JL
9222fi
9223done
9224
9225
f24af81b 9226# Check for thread headers.
b61ff9c8
BS
9227echo "$as_me:$LINENO: checking for thread.h" >&5
9228echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
ba479fd2
NN
9229if test "${ac_cv_header_thread_h+set}" = set; then
9230 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9231else
18fc9bd4 9232 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9233/* confdefs.h. */
9234_ACEOF
9235cat confdefs.h >>conftest.$ac_ext
9236cat >>conftest.$ac_ext <<_ACEOF
9237/* end confdefs.h. */
9238#include <thread.h>
9239_ACEOF
b61ff9c8
BS
9240if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9241 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9242 ac_status=$?
9243 grep -v '^ *+' conftest.er1 >conftest.err
9244 rm -f conftest.er1
9245 cat conftest.err >&5
9246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9247 (exit $ac_status); } >/dev/null; then
9248 if test -s conftest.err; then
9249 ac_cpp_err=$ac_c_preproc_warn_flag
9250 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9251 else
9252 ac_cpp_err=
9253 fi
9254else
9255 ac_cpp_err=yes
9256fi
9257if test -z "$ac_cpp_err"; then
18fc9bd4 9258 ac_cv_header_thread_h=yes
ba479fd2
NN
9259else
9260 echo "$as_me: failed program was:" >&5
9261sed 's/^/| /' conftest.$ac_ext >&5
9262
18fc9bd4 9263 ac_cv_header_thread_h=no
ba479fd2
NN
9264fi
9265rm -f conftest.err conftest.$ac_ext
6e3f3080 9266fi
b61ff9c8
BS
9267echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
9268echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 9269if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
9270 have_thread_h=yes
9271else
ba479fd2 9272 have_thread_h=
f24af81b
TT
9273fi
9274
b61ff9c8
BS
9275echo "$as_me:$LINENO: checking for pthread.h" >&5
9276echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
ba479fd2
NN
9277if test "${ac_cv_header_pthread_h+set}" = set; then
9278 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 9279else
18fc9bd4 9280 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9281/* confdefs.h. */
9282_ACEOF
9283cat confdefs.h >>conftest.$ac_ext
9284cat >>conftest.$ac_ext <<_ACEOF
9285/* end confdefs.h. */
9286#include <pthread.h>
9287_ACEOF
b61ff9c8
BS
9288if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9289 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9290 ac_status=$?
9291 grep -v '^ *+' conftest.er1 >conftest.err
9292 rm -f conftest.er1
9293 cat conftest.err >&5
9294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9295 (exit $ac_status); } >/dev/null; then
9296 if test -s conftest.err; then
9297 ac_cpp_err=$ac_c_preproc_warn_flag
9298 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9299 else
9300 ac_cpp_err=
9301 fi
9302else
9303 ac_cpp_err=yes
9304fi
9305if test -z "$ac_cpp_err"; then
18fc9bd4 9306 ac_cv_header_pthread_h=yes
ba479fd2 9307else
18fc9bd4
RG
9308 echo "$as_me: failed program was:" >&5
9309sed 's/^/| /' conftest.$ac_ext >&5
9310
9311 ac_cv_header_pthread_h=no
9312fi
9313rm -f conftest.err conftest.$ac_ext
6e3f3080 9314fi
b61ff9c8
BS
9315echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
9316echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 9317if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
9318 have_pthread_h=yes
9319else
ba479fd2 9320 have_pthread_h=
f24af81b
TT
9321fi
9322
9323
84c041a1 9324# These tests can't be done till we know if we have limits.h.
b61ff9c8
BS
9325echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
9326echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
ba479fd2
NN
9327if test "${gcc_cv_decl_char_bit+set}" = set; then
9328 echo $ECHO_N "(cached) $ECHO_C" >&6
9329else
9330 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9331/* confdefs.h. */
9332_ACEOF
9333cat confdefs.h >>conftest.$ac_ext
9334cat >>conftest.$ac_ext <<_ACEOF
9335/* end confdefs.h. */
75e93faa
ZW
9336#ifdef HAVE_LIMITS_H
9337#include <limits.h>
9338#endif
9339#ifdef CHAR_BIT
9340found
9341#endif
ba479fd2 9342_ACEOF
75e93faa 9343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9344 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
9345 gcc_cv_decl_char_bit=yes
9346else
75e93faa
ZW
9347 gcc_cv_decl_char_bit=no
9348fi
9349rm -f conftest*
9350
9351
9352fi
b61ff9c8
BS
9353echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
9354echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 9355if test $gcc_cv_decl_char_bit = no; then
b61ff9c8
BS
9356 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
9357echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
ba479fd2
NN
9358if test "${gcc_cv_c_nbby+set}" = set; then
9359 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
9360else
9361 i=8
9362 gcc_cv_c_nbby=
9363 while test $i -lt 65; do
ba479fd2 9364 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9365/* confdefs.h. */
9366_ACEOF
9367cat confdefs.h >>conftest.$ac_ext
9368cat >>conftest.$ac_ext <<_ACEOF
9369/* end confdefs.h. */
9370
9371int
9372main ()
9373{
4e70264f
ZW
9374switch(0) {
9375 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
9376 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
9377 ; }
ba479fd2
NN
9378 ;
9379 return 0;
9380}
9381_ACEOF
9382rm -f conftest.$ac_objext
b61ff9c8
BS
9383if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9384 (eval $ac_compile) 2>conftest.er1
ba479fd2 9385 ac_status=$?
86da66b5
HPN
9386 grep -v '^ *+' conftest.er1 >conftest.err
9387 rm -f conftest.er1
9388 cat conftest.err >&5
ba479fd2 9389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9390 (exit $ac_status); } &&
9391 { ac_try='test -z "$ac_c_werror_flag"
9392 || test ! -s conftest.err'
9393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9394 (eval $ac_try) 2>&5
9395 ac_status=$?
9396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9397 (exit $ac_status); }; } &&
9398 { ac_try='test -s conftest.$ac_objext'
9399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9400 (eval $ac_try) 2>&5
9401 ac_status=$?
9402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9403 (exit $ac_status); }; }; then
4e70264f 9404 gcc_cv_c_nbby=$i; break
75e93faa 9405else
ba479fd2
NN
9406 echo "$as_me: failed program was:" >&5
9407sed 's/^/| /' conftest.$ac_ext >&5
9408
75e93faa 9409fi
b61ff9c8 9410rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
9411 i=`expr $i + 1`
9412 done
9413 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
9414
9415fi
b61ff9c8
BS
9416echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
9417echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 9418if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
9419 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
9420echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
9421 { (exit 1); exit 1; }; }
75e93faa 9422else
ba479fd2
NN
9423
9424cat >>confdefs.h <<_ACEOF
75e93faa 9425#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 9426_ACEOF
75e93faa
ZW
9427
9428fi
9429fi
b61ff9c8
BS
9430echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
9431echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
ba479fd2
NN
9432if test "${ac_cv_c_bigendian+set}" = set; then
9433 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 9434else
9791c75c 9435 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 9436cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9437/* confdefs.h. */
9438_ACEOF
9439cat confdefs.h >>conftest.$ac_ext
9440cat >>conftest.$ac_ext <<_ACEOF
9441/* end confdefs.h. */
4977bab6
ZW
9442#include <sys/types.h>
9443#include <sys/param.h>
9791c75c 9444
ba479fd2
NN
9445int
9446main ()
9447{
b61ff9c8 9448#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4977bab6 9449 bogus endian macros
84c041a1 9450#endif
9791c75c 9451
ba479fd2
NN
9452 ;
9453 return 0;
9454}
9455_ACEOF
9456rm -f conftest.$ac_objext
b61ff9c8
BS
9457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9458 (eval $ac_compile) 2>conftest.er1
ba479fd2 9459 ac_status=$?
86da66b5
HPN
9460 grep -v '^ *+' conftest.er1 >conftest.err
9461 rm -f conftest.er1
9462 cat conftest.err >&5
ba479fd2 9463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9464 (exit $ac_status); } &&
9465 { ac_try='test -z "$ac_c_werror_flag"
9466 || test ! -s conftest.err'
9467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9468 (eval $ac_try) 2>&5
9469 ac_status=$?
9470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9471 (exit $ac_status); }; } &&
9472 { ac_try='test -s conftest.$ac_objext'
9473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9474 (eval $ac_try) 2>&5
9475 ac_status=$?
9476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9477 (exit $ac_status); }; }; then
2f41c1d6 9478 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 9479cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9480/* confdefs.h. */
9481_ACEOF
9482cat confdefs.h >>conftest.$ac_ext
9483cat >>conftest.$ac_ext <<_ACEOF
9484/* end confdefs.h. */
4977bab6
ZW
9485#include <sys/types.h>
9486#include <sys/param.h>
9791c75c 9487
ba479fd2
NN
9488int
9489main ()
9490{
4977bab6
ZW
9491#if BYTE_ORDER != BIG_ENDIAN
9492 not big endian
84c041a1 9493#endif
9791c75c 9494
ba479fd2
NN
9495 ;
9496 return 0;
9497}
9498_ACEOF
9499rm -f conftest.$ac_objext
b61ff9c8
BS
9500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9501 (eval $ac_compile) 2>conftest.er1
ba479fd2 9502 ac_status=$?
86da66b5
HPN
9503 grep -v '^ *+' conftest.er1 >conftest.err
9504 rm -f conftest.er1
9505 cat conftest.err >&5
ba479fd2 9506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9507 (exit $ac_status); } &&
9508 { ac_try='test -z "$ac_c_werror_flag"
9509 || test ! -s conftest.err'
9510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9511 (eval $ac_try) 2>&5
9512 ac_status=$?
9513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9514 (exit $ac_status); }; } &&
9515 { ac_try='test -s conftest.$ac_objext'
9516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9517 (eval $ac_try) 2>&5
9518 ac_status=$?
9519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9520 (exit $ac_status); }; }; then
9521 ac_cv_c_bigendian=yes
9522else
9523 echo "$as_me: failed program was:" >&5
ba479fd2
NN
9524sed 's/^/| /' conftest.$ac_ext >&5
9525
b61ff9c8 9526ac_cv_c_bigendian=no
4977bab6 9527fi
b61ff9c8 9528rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 9529else
ba479fd2
NN
9530 echo "$as_me: failed program was:" >&5
9531sed 's/^/| /' conftest.$ac_ext >&5
9532
b61ff9c8 9533# It does not; compile a test program.
9791c75c
KC
9534if test "$cross_compiling" = yes; then
9535 # try to guess the endianness by grepping values into an object file
9536 ac_cv_c_bigendian=unknown
9537 cat >conftest.$ac_ext <<_ACEOF
9538/* confdefs.h. */
9539_ACEOF
9540cat confdefs.h >>conftest.$ac_ext
9541cat >>conftest.$ac_ext <<_ACEOF
9542/* end confdefs.h. */
b61ff9c8
BS
9543short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9544short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9791c75c 9545void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
b61ff9c8
BS
9546short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9547short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9791c75c
KC
9548void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
9549int
9550main ()
9551{
9552 _ascii (); _ebcdic ();
9553 ;
9554 return 0;
9555}
9556_ACEOF
9557rm -f conftest.$ac_objext
b61ff9c8
BS
9558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9559 (eval $ac_compile) 2>conftest.er1
9791c75c
KC
9560 ac_status=$?
9561 grep -v '^ *+' conftest.er1 >conftest.err
9562 rm -f conftest.er1
9563 cat conftest.err >&5
9564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9565 (exit $ac_status); } &&
9566 { ac_try='test -z "$ac_c_werror_flag"
9567 || test ! -s conftest.err'
9568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9569 (eval $ac_try) 2>&5
9570 ac_status=$?
9571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9572 (exit $ac_status); }; } &&
9573 { ac_try='test -s conftest.$ac_objext'
9574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9575 (eval $ac_try) 2>&5
9576 ac_status=$?
9577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9578 (exit $ac_status); }; }; then
8b1f719a
PB
9579 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
9580 ac_cv_c_bigendian=yes
9581fi
9791c75c
KC
9582if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9583 if test "$ac_cv_c_bigendian" = unknown; then
9584 ac_cv_c_bigendian=no
9585 else
9586 # finding both strings is unlikely to happen, but who knows?
9587 ac_cv_c_bigendian=unknown
9588 fi
9589fi
9590else
9591 echo "$as_me: failed program was:" >&5
9592sed 's/^/| /' conftest.$ac_ext >&5
9593
4977bab6 9594fi
b61ff9c8 9595rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
9596else
9597 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9598/* confdefs.h. */
9599_ACEOF
9600cat confdefs.h >>conftest.$ac_ext
9601cat >>conftest.$ac_ext <<_ACEOF
9602/* end confdefs.h. */
9791c75c
KC
9603int
9604main ()
9605{
4977bab6
ZW
9606 /* Are we little or big endian? From Harbison&Steele. */
9607 union
9608 {
b61ff9c8
BS
9609 long l;
9610 char c[sizeof (long)];
4977bab6
ZW
9611 } u;
9612 u.l = 1;
b61ff9c8 9613 exit (u.c[sizeof (long) - 1] == 1);
4977bab6 9614}
ba479fd2
NN
9615_ACEOF
9616rm -f conftest$ac_exeext
b61ff9c8
BS
9617if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9618 (eval $ac_link) 2>&5
ba479fd2
NN
9619 ac_status=$?
9620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9621 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
9622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9623 (eval $ac_try) 2>&5
ba479fd2
NN
9624 ac_status=$?
9625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9626 (exit $ac_status); }; }; then
4977bab6
ZW
9627 ac_cv_c_bigendian=no
9628else
ba479fd2
NN
9629 echo "$as_me: program exited with status $ac_status" >&5
9630echo "$as_me: failed program was:" >&5
9631sed 's/^/| /' conftest.$ac_ext >&5
9632
9633( exit $ac_status )
9634ac_cv_c_bigendian=yes
4977bab6 9635fi
b61ff9c8 9636rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 9637fi
4977bab6 9638fi
b61ff9c8 9639rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 9640fi
b61ff9c8
BS
9641echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
9642echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
9643case $ac_cv_c_bigendian in
9644 yes)
ba479fd2
NN
9645
9646cat >>confdefs.h <<\_ACEOF
4977bab6 9647#define WORDS_BIGENDIAN 1
ba479fd2 9648_ACEOF
9791c75c
KC
9649 ;;
9650 no)
9651 ;;
9652 *)
9653 { { echo "$as_me:$LINENO: error: unknown endianness
9654presetting ac_cv_c_bigendian=no (or yes) will help" >&5
9655echo "$as_me: error: unknown endianness
9656presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
9657 { (exit 1); exit 1; }; } ;;
9658esac
84c041a1 9659
75e93faa 9660
73458fb7
NN
9661# --------
9662# UNSORTED
9663# --------
1e608388 9664
1e608388 9665
4e70264f
ZW
9666# These libraries may be used by collect2.
9667# We may need a special search path to get them linked.
b61ff9c8
BS
9668echo "$as_me:$LINENO: checking for collect2 libraries" >&5
9669echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
ba479fd2
NN
9670if test "${gcc_cv_collect2_libs+set}" = set; then
9671 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
9672else
9673 save_LIBS="$LIBS"
7f2749d4 9674for libs in '' -lld -lmld \
4e70264f
ZW
9675 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
9676 '-L/usr/lib/cmplrs/cc3.11 -lmld'
9677do
9678 LIBS="$libs"
ba479fd2 9679 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9680/* confdefs.h. */
9681_ACEOF
9682cat confdefs.h >>conftest.$ac_ext
9683cat >>conftest.$ac_ext <<_ACEOF
9684/* end confdefs.h. */
9685
b61ff9c8 9686/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9687#ifdef __cplusplus
9688extern "C"
9689#endif
b61ff9c8
BS
9690/* We use char because int might match the return type of a gcc2
9691 builtin and then its argument prototype would still apply. */
ba479fd2
NN
9692char ldopen ();
9693int
9694main ()
9695{
b61ff9c8 9696ldopen ();
ba479fd2
NN
9697 ;
9698 return 0;
9699}
9700_ACEOF
9701rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
9702if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9703 (eval $ac_link) 2>conftest.er1
ba479fd2 9704 ac_status=$?
86da66b5
HPN
9705 grep -v '^ *+' conftest.er1 >conftest.err
9706 rm -f conftest.er1
9707 cat conftest.err >&5
ba479fd2 9708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9709 (exit $ac_status); } &&
9710 { ac_try='test -z "$ac_c_werror_flag"
9711 || test ! -s conftest.err'
9712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9713 (eval $ac_try) 2>&5
9714 ac_status=$?
9715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9716 (exit $ac_status); }; } &&
9717 { ac_try='test -s conftest$ac_exeext'
9718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9719 (eval $ac_try) 2>&5
9720 ac_status=$?
9721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9722 (exit $ac_status); }; }; then
4e70264f
ZW
9723 gcc_cv_collect2_libs="$libs"; break
9724else
ba479fd2
NN
9725 echo "$as_me: failed program was:" >&5
9726sed 's/^/| /' conftest.$ac_ext >&5
9727
4e70264f 9728fi
b61ff9c8 9729rm -f conftest.err conftest.$ac_objext \
86da66b5 9730 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
9731done
9732LIBS="$save_LIBS"
9733test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
9734fi
b61ff9c8
BS
9735echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
9736echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
9737case $gcc_cv_collect2_libs in
9738 "none required") ;;
9739 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
9740esac
9741
9742
7f2749d4
RK
9743# When building Ada code on Alpha, we need exc_resume which is usually in
9744# -lexc. So test for it.
9745save_LIBS="$LIBS"
9746LIBS=
b61ff9c8
BS
9747echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
9748echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
ba479fd2
NN
9749if test "${ac_cv_search_exc_resume+set}" = set; then
9750 echo $ECHO_N "(cached) $ECHO_C" >&6
9751else
9752 ac_func_search_save_LIBS=$LIBS
b61ff9c8 9753ac_cv_search_exc_resume=no
ba479fd2 9754cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9755/* confdefs.h. */
9756_ACEOF
9757cat confdefs.h >>conftest.$ac_ext
9758cat >>conftest.$ac_ext <<_ACEOF
9759/* end confdefs.h. */
7f2749d4 9760
b61ff9c8 9761/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9762#ifdef __cplusplus
9763extern "C"
9764#endif
b61ff9c8
BS
9765/* We use char because int might match the return type of a gcc2
9766 builtin and then its argument prototype would still apply. */
ba479fd2
NN
9767char exc_resume ();
9768int
9769main ()
9770{
b61ff9c8 9771exc_resume ();
ba479fd2
NN
9772 ;
9773 return 0;
9774}
9775_ACEOF
b61ff9c8
BS
9776rm -f conftest.$ac_objext conftest$ac_exeext
9777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9778 (eval $ac_link) 2>conftest.er1
ba479fd2 9779 ac_status=$?
86da66b5
HPN
9780 grep -v '^ *+' conftest.er1 >conftest.err
9781 rm -f conftest.er1
9782 cat conftest.err >&5
ba479fd2 9783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9784 (exit $ac_status); } &&
9785 { ac_try='test -z "$ac_c_werror_flag"
9786 || test ! -s conftest.err'
9787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9788 (eval $ac_try) 2>&5
9789 ac_status=$?
9790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9791 (exit $ac_status); }; } &&
9792 { ac_try='test -s conftest$ac_exeext'
9793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9794 (eval $ac_try) 2>&5
9795 ac_status=$?
9796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9797 (exit $ac_status); }; }; then
9798 ac_cv_search_exc_resume="none required"
7f2749d4 9799else
ba479fd2
NN
9800 echo "$as_me: failed program was:" >&5
9801sed 's/^/| /' conftest.$ac_ext >&5
9802
ab22c1fa 9803fi
b61ff9c8
BS
9804rm -f conftest.err conftest.$ac_objext \
9805 conftest$ac_exeext conftest.$ac_ext
9806if test "$ac_cv_search_exc_resume" = no; then
9807 for ac_lib in exc; do
9808 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9809 cat >conftest.$ac_ext <<_ACEOF
9810/* confdefs.h. */
9811_ACEOF
9812cat confdefs.h >>conftest.$ac_ext
9813cat >>conftest.$ac_ext <<_ACEOF
9814/* end confdefs.h. */
2f41c1d6 9815
b61ff9c8
BS
9816/* Override any gcc2 internal prototype to avoid an error. */
9817#ifdef __cplusplus
9818extern "C"
9819#endif
9820/* We use char because int might match the return type of a gcc2
9821 builtin and then its argument prototype would still apply. */
9822char exc_resume ();
9823int
9824main ()
9825{
9826exc_resume ();
9827 ;
9828 return 0;
9829}
9830_ACEOF
9831rm -f conftest.$ac_objext conftest$ac_exeext
9832if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9833 (eval $ac_link) 2>conftest.er1
9834 ac_status=$?
9835 grep -v '^ *+' conftest.er1 >conftest.err
9836 rm -f conftest.er1
9837 cat conftest.err >&5
9838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9839 (exit $ac_status); } &&
9840 { ac_try='test -z "$ac_c_werror_flag"
9841 || test ! -s conftest.err'
9842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9843 (eval $ac_try) 2>&5
9844 ac_status=$?
9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846 (exit $ac_status); }; } &&
9847 { ac_try='test -s conftest$ac_exeext'
9848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9849 (eval $ac_try) 2>&5
9850 ac_status=$?
9851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9852 (exit $ac_status); }; }; then
9853 ac_cv_search_exc_resume="-l$ac_lib"
9854break
1a4b763e 9855else
b61ff9c8
BS
9856 echo "$as_me: failed program was:" >&5
9857sed 's/^/| /' conftest.$ac_ext >&5
9858
9859fi
9860rm -f conftest.err conftest.$ac_objext \
9861 conftest$ac_exeext conftest.$ac_ext
9862 done
b8ec3cc8 9863fi
b8ec3cc8
EC
9864LIBS=$ac_func_search_save_LIBS
9865fi
b61ff9c8
BS
9866echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
9867echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
9868if test "$ac_cv_search_exc_resume" != no; then
9869 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
b8ec3cc8
EC
9870
9871fi
9872
dd7f7a6e 9873GNAT_LIBEXC="$LIBS"
b8ec3cc8
EC
9874LIBS="$save_LIBS"
9875
9876
dd7f7a6e
EC
9877# Some systems put ldexp and frexp in libm instead of libc; assume
9878# they're both in the same place. jcf-dump needs them.
9879save_LIBS="$LIBS"
9880LIBS=
b61ff9c8
BS
9881echo "$as_me:$LINENO: checking for library containing ldexp" >&5
9882echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
dd7f7a6e 9883if test "${ac_cv_search_ldexp+set}" = set; then
b8ec3cc8
EC
9884 echo $ECHO_N "(cached) $ECHO_C" >&6
9885else
dd7f7a6e 9886 ac_func_search_save_LIBS=$LIBS
b61ff9c8 9887ac_cv_search_ldexp=no
dd7f7a6e 9888cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9889/* confdefs.h. */
9890_ACEOF
9891cat confdefs.h >>conftest.$ac_ext
9892cat >>conftest.$ac_ext <<_ACEOF
9893/* end confdefs.h. */
dd7f7a6e 9894
b61ff9c8 9895/* Override any gcc2 internal prototype to avoid an error. */
dd7f7a6e
EC
9896#ifdef __cplusplus
9897extern "C"
9898#endif
b61ff9c8
BS
9899/* We use char because int might match the return type of a gcc2
9900 builtin and then its argument prototype would still apply. */
dd7f7a6e 9901char ldexp ();
ba479fd2
NN
9902int
9903main ()
9904{
b61ff9c8 9905ldexp ();
ba479fd2
NN
9906 ;
9907 return 0;
9908}
9909_ACEOF
b61ff9c8
BS
9910rm -f conftest.$ac_objext conftest$ac_exeext
9911if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9912 (eval $ac_link) 2>conftest.er1
dd7f7a6e
EC
9913 ac_status=$?
9914 grep -v '^ *+' conftest.er1 >conftest.err
9915 rm -f conftest.er1
9916 cat conftest.err >&5
9917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9918 (exit $ac_status); } &&
9919 { ac_try='test -z "$ac_c_werror_flag"
9920 || test ! -s conftest.err'
9921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9922 (eval $ac_try) 2>&5
9923 ac_status=$?
9924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9925 (exit $ac_status); }; } &&
9926 { ac_try='test -s conftest$ac_exeext'
9927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9928 (eval $ac_try) 2>&5
9929 ac_status=$?
9930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9931 (exit $ac_status); }; }; then
9932 ac_cv_search_ldexp="none required"
dd7f7a6e
EC
9933else
9934 echo "$as_me: failed program was:" >&5
9935sed 's/^/| /' conftest.$ac_ext >&5
9936
1a4b763e 9937fi
b61ff9c8
BS
9938rm -f conftest.err conftest.$ac_objext \
9939 conftest$ac_exeext conftest.$ac_ext
9940if test "$ac_cv_search_ldexp" = no; then
9941 for ac_lib in m; do
9942 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9943 cat >conftest.$ac_ext <<_ACEOF
9944/* confdefs.h. */
9945_ACEOF
9946cat confdefs.h >>conftest.$ac_ext
9947cat >>conftest.$ac_ext <<_ACEOF
9948/* end confdefs.h. */
2f41c1d6 9949
b61ff9c8
BS
9950/* Override any gcc2 internal prototype to avoid an error. */
9951#ifdef __cplusplus
9952extern "C"
9953#endif
9954/* We use char because int might match the return type of a gcc2
9955 builtin and then its argument prototype would still apply. */
9956char ldexp ();
9957int
9958main ()
9959{
9960ldexp ();
9961 ;
9962 return 0;
9963}
9964_ACEOF
9965rm -f conftest.$ac_objext conftest$ac_exeext
9966if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9967 (eval $ac_link) 2>conftest.er1
9968 ac_status=$?
9969 grep -v '^ *+' conftest.er1 >conftest.err
9970 rm -f conftest.er1
9971 cat conftest.err >&5
9972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9973 (exit $ac_status); } &&
9974 { ac_try='test -z "$ac_c_werror_flag"
9975 || test ! -s conftest.err'
9976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9977 (eval $ac_try) 2>&5
9978 ac_status=$?
9979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9980 (exit $ac_status); }; } &&
9981 { ac_try='test -s conftest$ac_exeext'
9982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9983 (eval $ac_try) 2>&5
9984 ac_status=$?
9985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9986 (exit $ac_status); }; }; then
9987 ac_cv_search_ldexp="-l$ac_lib"
9988break
1a4b763e 9989else
b61ff9c8
BS
9990 echo "$as_me: failed program was:" >&5
9991sed 's/^/| /' conftest.$ac_ext >&5
9992
9993fi
9994rm -f conftest.err conftest.$ac_objext \
9995 conftest$ac_exeext conftest.$ac_ext
9996 done
dd7f7a6e
EC
9997fi
9998LIBS=$ac_func_search_save_LIBS
9999fi
b61ff9c8
BS
10000echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
10001echo "${ECHO_T}$ac_cv_search_ldexp" >&6
10002if test "$ac_cv_search_ldexp" != no; then
10003 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
dd7f7a6e
EC
10004
10005fi
10006
10007LDEXP_LIB="$LIBS"
10008LIBS="$save_LIBS"
10009
10010
10011# Use <inttypes.h> only if it exists,
10012# doesn't clash with <sys/types.h>, and declares intmax_t.
b61ff9c8
BS
10013echo "$as_me:$LINENO: checking for inttypes.h" >&5
10014echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
dd7f7a6e
EC
10015if test "${gcc_cv_header_inttypes_h+set}" = set; then
10016 echo $ECHO_N "(cached) $ECHO_C" >&6
10017else
10018 cat >conftest.$ac_ext <<_ACEOF
10019/* confdefs.h. */
10020_ACEOF
10021cat confdefs.h >>conftest.$ac_ext
10022cat >>conftest.$ac_ext <<_ACEOF
10023/* end confdefs.h. */
10024#include <sys/types.h>
10025#include <inttypes.h>
10026int
10027main ()
10028{
10029intmax_t i = -1;
10030 ;
10031 return 0;
10032}
10033_ACEOF
10034rm -f conftest.$ac_objext
b61ff9c8
BS
10035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10036 (eval $ac_compile) 2>conftest.er1
dd7f7a6e
EC
10037 ac_status=$?
10038 grep -v '^ *+' conftest.er1 >conftest.err
10039 rm -f conftest.er1
10040 cat conftest.err >&5
10041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10042 (exit $ac_status); } &&
10043 { ac_try='test -z "$ac_c_werror_flag"
10044 || test ! -s conftest.err'
10045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10046 (eval $ac_try) 2>&5
10047 ac_status=$?
10048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10049 (exit $ac_status); }; } &&
10050 { ac_try='test -s conftest.$ac_objext'
10051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10052 (eval $ac_try) 2>&5
10053 ac_status=$?
10054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10055 (exit $ac_status); }; }; then
dd7f7a6e
EC
10056 gcc_cv_header_inttypes_h=yes
10057else
10058 echo "$as_me: failed program was:" >&5
10059sed 's/^/| /' conftest.$ac_ext >&5
10060
b61ff9c8 10061gcc_cv_header_inttypes_h=no
dd7f7a6e 10062fi
b61ff9c8 10063rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e
EC
10064fi
10065
b61ff9c8
BS
10066echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
10067echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
dd7f7a6e
EC
10068if test $gcc_cv_header_inttypes_h = yes; then
10069
10070cat >>confdefs.h <<\_ACEOF
10071#define HAVE_INTTYPES_H 1
10072_ACEOF
10073
0056a9b5 10074fi
956d6950 10075
c149cc37 10076
ba479fd2
NN
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
0d667716
KG
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
ba479fd2
NN
10105
10106
10107
10108
10109
10110
10111
10112
52a6edcc 10113for ac_func in times clock kill getrlimit setrlimit atoll atoq \
0d667716
KG
10114 sysconf strsignal getrusage nl_langinfo scandir alphasort \
10115 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
10116 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 10117do
ba479fd2 10118as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b61ff9c8
BS
10119echo "$as_me:$LINENO: checking for $ac_func" >&5
10120echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10121if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
10122 echo $ECHO_N "(cached) $ECHO_C" >&6
10123else
10124 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10125/* confdefs.h. */
10126_ACEOF
10127cat confdefs.h >>conftest.$ac_ext
10128cat >>conftest.$ac_ext <<_ACEOF
10129/* end confdefs.h. */
86da66b5
HPN
10130/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10131 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10132#define $ac_func innocuous_$ac_func
10133
956d6950 10134/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10135 which can conflict with char $ac_func (); below.
10136 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10137 <limits.h> exists even on freestanding compilers. */
86da66b5 10138
ba479fd2
NN
10139#ifdef __STDC__
10140# include <limits.h>
10141#else
10142# include <assert.h>
10143#endif
86da66b5
HPN
10144
10145#undef $ac_func
10146
b61ff9c8 10147/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10148#ifdef __cplusplus
10149extern "C"
b61ff9c8 10150{
ba479fd2 10151#endif
b61ff9c8
BS
10152/* We use char because int might match the return type of a gcc2
10153 builtin and then its argument prototype would still apply. */
ba479fd2 10154char $ac_func ();
956d6950
JL
10155/* The GNU C library defines this for functions which it implements
10156 to always fail with ENOSYS. Some functions are actually named
10157 something starting with __ and the normal name is an alias. */
b61ff9c8 10158#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
956d6950 10159choke me
b61ff9c8
BS
10160#else
10161char (*f) () = $ac_func;
10162#endif
10163#ifdef __cplusplus
10164}
956d6950
JL
10165#endif
10166
ba479fd2
NN
10167int
10168main ()
10169{
b61ff9c8 10170return f != $ac_func;
ba479fd2
NN
10171 ;
10172 return 0;
10173}
10174_ACEOF
10175rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
10176if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10177 (eval $ac_link) 2>conftest.er1
ba479fd2 10178 ac_status=$?
86da66b5
HPN
10179 grep -v '^ *+' conftest.er1 >conftest.err
10180 rm -f conftest.er1
10181 cat conftest.err >&5
ba479fd2 10182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10183 (exit $ac_status); } &&
10184 { ac_try='test -z "$ac_c_werror_flag"
10185 || test ! -s conftest.err'
10186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10187 (eval $ac_try) 2>&5
10188 ac_status=$?
10189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10190 (exit $ac_status); }; } &&
10191 { ac_try='test -s conftest$ac_exeext'
10192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10193 (eval $ac_try) 2>&5
10194 ac_status=$?
10195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10196 (exit $ac_status); }; }; then
ba479fd2
NN
10197 eval "$as_ac_var=yes"
10198else
10199 echo "$as_me: failed program was:" >&5
10200sed 's/^/| /' conftest.$ac_ext >&5
10201
b61ff9c8 10202eval "$as_ac_var=no"
ba479fd2 10203fi
b61ff9c8 10204rm -f conftest.err conftest.$ac_objext \
86da66b5 10205 conftest$ac_exeext conftest.$ac_ext
ba479fd2 10206fi
b61ff9c8
BS
10207echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10208echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
10209if test `eval echo '${'$as_ac_var'}'` = yes; then
10210 cat >>confdefs.h <<_ACEOF
10211#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10212_ACEOF
956d6950 10213
956d6950
JL
10214fi
10215done
10216
6885fc87 10217
39f6c4c8 10218if test x$ac_cv_func_mbstowcs = xyes; then
b61ff9c8
BS
10219 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
10220echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
ba479fd2
NN
10221if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
10222 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
10223else
10224 if test "$cross_compiling" = yes; then
10225 gcc_cv_func_mbstowcs_works=yes
10226else
ba479fd2 10227 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10228/* confdefs.h. */
10229_ACEOF
10230cat confdefs.h >>conftest.$ac_ext
10231cat >>conftest.$ac_ext <<_ACEOF
10232/* end confdefs.h. */
39f6c4c8
KW
10233#include <stdlib.h>
10234int main()
10235{
10236 mbstowcs(0, "", 0);
10237 return 0;
10238}
ba479fd2
NN
10239_ACEOF
10240rm -f conftest$ac_exeext
b61ff9c8
BS
10241if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10242 (eval $ac_link) 2>&5
ba479fd2
NN
10243 ac_status=$?
10244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10245 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
10246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10247 (eval $ac_try) 2>&5
ba479fd2
NN
10248 ac_status=$?
10249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10250 (exit $ac_status); }; }; then
39f6c4c8
KW
10251 gcc_cv_func_mbstowcs_works=yes
10252else
ba479fd2
NN
10253 echo "$as_me: program exited with status $ac_status" >&5
10254echo "$as_me: failed program was:" >&5
10255sed 's/^/| /' conftest.$ac_ext >&5
10256
10257( exit $ac_status )
10258gcc_cv_func_mbstowcs_works=no
39f6c4c8 10259fi
b61ff9c8 10260rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 10261fi
39f6c4c8 10262fi
b61ff9c8
BS
10263echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
10264echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 10265 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
10266
10267cat >>confdefs.h <<\_ACEOF
39f6c4c8 10268#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 10269_ACEOF
39f6c4c8
KW
10270
10271 fi
10272fi
10273
b61ff9c8
BS
10274echo "$as_me:$LINENO: checking for ssize_t" >&5
10275echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
ba479fd2
NN
10276if test "${ac_cv_type_ssize_t+set}" = set; then
10277 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 10278else
ba479fd2 10279 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10280/* confdefs.h. */
10281_ACEOF
10282cat confdefs.h >>conftest.$ac_ext
10283cat >>conftest.$ac_ext <<_ACEOF
10284/* end confdefs.h. */
8b4fc07a
NN
10285$ac_includes_default
10286int
10287main ()
10288{
b61ff9c8 10289if ((ssize_t *) 0)
8b4fc07a 10290 return 0;
b61ff9c8 10291if (sizeof (ssize_t))
8b4fc07a
NN
10292 return 0;
10293 ;
10294 return 0;
10295}
ba479fd2 10296_ACEOF
8b4fc07a 10297rm -f conftest.$ac_objext
b61ff9c8
BS
10298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10299 (eval $ac_compile) 2>conftest.er1
8b4fc07a 10300 ac_status=$?
86da66b5
HPN
10301 grep -v '^ *+' conftest.er1 >conftest.err
10302 rm -f conftest.er1
10303 cat conftest.err >&5
8b4fc07a 10304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10305 (exit $ac_status); } &&
10306 { ac_try='test -z "$ac_c_werror_flag"
10307 || test ! -s conftest.err'
10308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10309 (eval $ac_try) 2>&5
10310 ac_status=$?
10311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10312 (exit $ac_status); }; } &&
10313 { ac_try='test -s conftest.$ac_objext'
10314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10315 (eval $ac_try) 2>&5
10316 ac_status=$?
10317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10318 (exit $ac_status); }; }; then
cb65112a 10319 ac_cv_type_ssize_t=yes
f12bc141 10320else
8b4fc07a
NN
10321 echo "$as_me: failed program was:" >&5
10322sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10323
b61ff9c8 10324ac_cv_type_ssize_t=no
8b4fc07a 10325fi
b61ff9c8 10326rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10327fi
b61ff9c8
BS
10328echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
10329echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
10330if test $ac_cv_type_ssize_t = yes; then
10331 :
10332else
ba479fd2 10333
8b4fc07a 10334cat >>confdefs.h <<_ACEOF
f12bc141 10335#define ssize_t int
ba479fd2 10336_ACEOF
f12bc141
ZW
10337
10338fi
10339
0b9d02c6 10340
e256b8b6
DA
10341# Try to determine the array type of the second argument of getgroups
10342# for the target system (int or gid_t).
b61ff9c8
BS
10343echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
10344echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
ba479fd2
NN
10345if test "${ac_cv_type_uid_t+set}" = set; then
10346 echo $ECHO_N "(cached) $ECHO_C" >&6
10347else
10348 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10349/* confdefs.h. */
10350_ACEOF
10351cat confdefs.h >>conftest.$ac_ext
10352cat >>conftest.$ac_ext <<_ACEOF
10353/* end confdefs.h. */
e256b8b6 10354#include <sys/types.h>
ba479fd2
NN
10355
10356_ACEOF
e256b8b6 10357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 10358 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
10359 ac_cv_type_uid_t=yes
10360else
e256b8b6
DA
10361 ac_cv_type_uid_t=no
10362fi
10363rm -f conftest*
10364
10365fi
b61ff9c8
BS
10366echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
10367echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 10368if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
10369
10370cat >>confdefs.h <<\_ACEOF
e256b8b6 10371#define uid_t int
ba479fd2 10372_ACEOF
cafe096b 10373
ba479fd2
NN
10374
10375cat >>confdefs.h <<\_ACEOF
e256b8b6 10376#define gid_t int
ba479fd2 10377_ACEOF
e256b8b6
DA
10378
10379fi
10380
b61ff9c8
BS
10381echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
10382echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
ba479fd2
NN
10383if test "${ac_cv_type_getgroups+set}" = set; then
10384 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
10385else
10386 if test "$cross_compiling" = yes; then
10387 ac_cv_type_getgroups=cross
10388else
ba479fd2 10389 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10390/* confdefs.h. */
10391_ACEOF
10392cat confdefs.h >>conftest.$ac_ext
10393cat >>conftest.$ac_ext <<_ACEOF
10394/* end confdefs.h. */
e256b8b6 10395/* Thanks to Mike Rendell for this test. */
b61ff9c8 10396#include <sys/types.h>
e256b8b6
DA
10397#define NGID 256
10398#undef MAX
10399#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
10400
10401int
10402main ()
e256b8b6
DA
10403{
10404 gid_t gidset[NGID];
10405 int i, n;
b61ff9c8 10406 union { gid_t gval; long lval; } val;
e256b8b6
DA
10407
10408 val.lval = -1;
10409 for (i = 0; i < NGID; i++)
10410 gidset[i] = val.gval;
10411 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 10412 gidset);
e256b8b6 10413 /* Exit non-zero if getgroups seems to require an array of ints. This
b61ff9c8
BS
10414 happens when gid_t is short but getgroups modifies an array of ints. */
10415 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 10416}
ba479fd2
NN
10417_ACEOF
10418rm -f conftest$ac_exeext
b61ff9c8
BS
10419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10420 (eval $ac_link) 2>&5
ba479fd2
NN
10421 ac_status=$?
10422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10423 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
10424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10425 (eval $ac_try) 2>&5
ba479fd2
NN
10426 ac_status=$?
10427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10428 (exit $ac_status); }; }; then
10429 ac_cv_type_getgroups=gid_t
63cf211a 10430else
ba479fd2
NN
10431 echo "$as_me: program exited with status $ac_status" >&5
10432echo "$as_me: failed program was:" >&5
10433sed 's/^/| /' conftest.$ac_ext >&5
10434
10435( exit $ac_status )
10436ac_cv_type_getgroups=int
e256b8b6 10437fi
b61ff9c8 10438rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 10439fi
e256b8b6 10440if test $ac_cv_type_getgroups = cross; then
ba479fd2 10441 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10442/* confdefs.h. */
10443_ACEOF
10444cat confdefs.h >>conftest.$ac_ext
10445cat >>conftest.$ac_ext <<_ACEOF
10446/* end confdefs.h. */
e256b8b6 10447#include <unistd.h>
ba479fd2
NN
10448
10449_ACEOF
e256b8b6 10450if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 10451 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
10452 ac_cv_type_getgroups=gid_t
10453else
e256b8b6
DA
10454 ac_cv_type_getgroups=int
10455fi
10456rm -f conftest*
10457
10458fi
10459fi
b61ff9c8
BS
10460echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
10461echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 10462
ba479fd2 10463cat >>confdefs.h <<_ACEOF
e256b8b6 10464#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 10465_ACEOF
e256b8b6
DA
10466
10467
10468if test "${target}" = "${build}"; then
10469 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
10470else
10471 case "${target}" in
10472 # This condition may need some tweaking. It should include all
10473 # targets where the array type of the second argument of getgroups
10474 # is int and the type of gid_t is not equivalent to int.
10475 *-*-sunos* | *-*-ultrix*)
10476 TARGET_GETGROUPS_T=int
10477 ;;
10478 *)
10479 TARGET_GETGROUPS_T=gid_t
10480 ;;
10481 esac
10482fi
10483
10484
3b0727a0 10485
b61ff9c8
BS
10486echo "$as_me:$LINENO: checking for sys/mman.h" >&5
10487echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
3b0727a0
MR
10488if test "${ac_cv_header_sys_mman_h+set}" = set; then
10489 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10490else
18fc9bd4 10491 cat >conftest.$ac_ext <<_ACEOF
3b0727a0
MR
10492/* confdefs.h. */
10493_ACEOF
10494cat confdefs.h >>conftest.$ac_ext
10495cat >>conftest.$ac_ext <<_ACEOF
10496/* end confdefs.h. */
10497#include <sys/mman.h>
10498_ACEOF
b61ff9c8
BS
10499if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10500 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3b0727a0
MR
10501 ac_status=$?
10502 grep -v '^ *+' conftest.er1 >conftest.err
10503 rm -f conftest.er1
10504 cat conftest.err >&5
10505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10506 (exit $ac_status); } >/dev/null; then
10507 if test -s conftest.err; then
10508 ac_cpp_err=$ac_c_preproc_warn_flag
10509 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10510 else
10511 ac_cpp_err=
10512 fi
10513else
10514 ac_cpp_err=yes
10515fi
10516if test -z "$ac_cpp_err"; then
10517 ac_cv_header_sys_mman_h=yes
10518else
3b0727a0
MR
10519 echo "$as_me: failed program was:" >&5
10520sed 's/^/| /' conftest.$ac_ext >&5
10521
18fc9bd4 10522 ac_cv_header_sys_mman_h=no
3b0727a0
MR
10523fi
10524rm -f conftest.err conftest.$ac_ext
10525fi
b61ff9c8
BS
10526echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
10527echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
3b0727a0
MR
10528if test $ac_cv_header_sys_mman_h = yes; then
10529 gcc_header_sys_mman_h=yes
10530else
10531 gcc_header_sys_mman_h=no
10532fi
10533
b61ff9c8
BS
10534echo "$as_me:$LINENO: checking for mmap" >&5
10535echo $ECHO_N "checking for mmap... $ECHO_C" >&6
3b0727a0
MR
10536if test "${ac_cv_func_mmap+set}" = set; then
10537 echo $ECHO_N "(cached) $ECHO_C" >&6
10538else
10539 cat >conftest.$ac_ext <<_ACEOF
10540/* confdefs.h. */
10541_ACEOF
10542cat confdefs.h >>conftest.$ac_ext
10543cat >>conftest.$ac_ext <<_ACEOF
10544/* end confdefs.h. */
10545/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
10546 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10547#define mmap innocuous_mmap
10548
10549/* System header to define __stub macros and hopefully few prototypes,
10550 which can conflict with char mmap (); below.
10551 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10552 <limits.h> exists even on freestanding compilers. */
10553
10554#ifdef __STDC__
10555# include <limits.h>
10556#else
10557# include <assert.h>
10558#endif
10559
10560#undef mmap
10561
b61ff9c8 10562/* Override any gcc2 internal prototype to avoid an error. */
3b0727a0
MR
10563#ifdef __cplusplus
10564extern "C"
b61ff9c8 10565{
3b0727a0 10566#endif
b61ff9c8
BS
10567/* We use char because int might match the return type of a gcc2
10568 builtin and then its argument prototype would still apply. */
3b0727a0
MR
10569char mmap ();
10570/* The GNU C library defines this for functions which it implements
10571 to always fail with ENOSYS. Some functions are actually named
10572 something starting with __ and the normal name is an alias. */
b61ff9c8 10573#if defined (__stub_mmap) || defined (__stub___mmap)
3b0727a0 10574choke me
b61ff9c8
BS
10575#else
10576char (*f) () = mmap;
10577#endif
10578#ifdef __cplusplus
10579}
3b0727a0
MR
10580#endif
10581
10582int
10583main ()
10584{
b61ff9c8 10585return f != mmap;
3b0727a0
MR
10586 ;
10587 return 0;
10588}
10589_ACEOF
10590rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
10591if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10592 (eval $ac_link) 2>conftest.er1
3b0727a0
MR
10593 ac_status=$?
10594 grep -v '^ *+' conftest.er1 >conftest.err
10595 rm -f conftest.er1
10596 cat conftest.err >&5
10597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10598 (exit $ac_status); } &&
10599 { ac_try='test -z "$ac_c_werror_flag"
10600 || test ! -s conftest.err'
10601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10602 (eval $ac_try) 2>&5
10603 ac_status=$?
10604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10605 (exit $ac_status); }; } &&
10606 { ac_try='test -s conftest$ac_exeext'
10607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10608 (eval $ac_try) 2>&5
10609 ac_status=$?
10610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10611 (exit $ac_status); }; }; then
8b1f719a
PB
10612 ac_cv_func_mmap=yes
10613else
10614 echo "$as_me: failed program was:" >&5
10615sed 's/^/| /' conftest.$ac_ext >&5
a6ccdbab 10616
b61ff9c8 10617ac_cv_func_mmap=no
8b1f719a 10618fi
b61ff9c8 10619rm -f conftest.err conftest.$ac_objext \
3b0727a0
MR
10620 conftest$ac_exeext conftest.$ac_ext
10621fi
b61ff9c8
BS
10622echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
10623echo "${ECHO_T}$ac_cv_func_mmap" >&6
3b0727a0
MR
10624if test $ac_cv_func_mmap = yes; then
10625 gcc_func_mmap=yes
10626else
10627 gcc_func_mmap=no
10628fi
10629
10630if test "$gcc_header_sys_mman_h" != yes \
10631 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
10632 gcc_cv_func_mmap_file=no
10633 gcc_cv_func_mmap_dev_zero=no
10634 gcc_cv_func_mmap_anon=no
10635else
b61ff9c8
BS
10636 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
10637echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
ba479fd2
NN
10638if test "${gcc_cv_func_mmap_file+set}" = set; then
10639 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 10640else
ba479fd2 10641 # Add a system to this blacklist if
1072ec3f
ZW
10642 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
10643 # memory area containing the same data that you'd get if you applied
10644 # read() to the same fd. The only system known to have a problem here
10645 # is VMS, where text files have record structure.
10646 case "$host_os" in
ba479fd2 10647 vms* | ultrix*)
1072ec3f
ZW
10648 gcc_cv_func_mmap_file=no ;;
10649 *)
10650 gcc_cv_func_mmap_file=yes;;
10651 esac
10652fi
b61ff9c8
BS
10653echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
10654echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
10655 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
10656echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
ba479fd2
NN
10657if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
10658 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
10659else
10660 # Add a system to this blacklist if it has mmap() but /dev/zero
10661 # does not exist, or if mmapping /dev/zero does not give anonymous
10662 # zeroed pages with both the following properties:
10663 # 1. If you map N consecutive pages in with one call, and then
10664 # unmap any subset of those pages, the pages that were not
10665 # explicitly unmapped remain accessible.
10666 # 2. If you map two adjacent blocks of memory and then unmap them
10667 # both at once, they must both go away.
10668 # Systems known to be in this category are Windows (all variants),
10669 # VMS, and Darwin.
10670 case "$host_os" in
2ce240d3 10671 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
10672 gcc_cv_func_mmap_dev_zero=no ;;
10673 *)
10674 gcc_cv_func_mmap_dev_zero=yes;;
10675 esac
10676fi
b61ff9c8
BS
10677echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
10678echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
10679
10680 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
b61ff9c8
BS
10681 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
10682echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
ba479fd2
NN
10683if test "${gcc_cv_decl_map_anon+set}" = set; then
10684 echo $ECHO_N "(cached) $ECHO_C" >&6
10685else
10686 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10687/* confdefs.h. */
10688_ACEOF
10689cat confdefs.h >>conftest.$ac_ext
10690cat >>conftest.$ac_ext <<_ACEOF
10691/* end confdefs.h. */
1072ec3f
ZW
10692#include <sys/types.h>
10693#include <sys/mman.h>
10694#include <unistd.h>
10695
10696#ifndef MAP_ANONYMOUS
10697#define MAP_ANONYMOUS MAP_ANON
10698#endif
10699
ba479fd2
NN
10700int
10701main ()
10702{
1072ec3f 10703int n = MAP_ANONYMOUS;
ba479fd2
NN
10704 ;
10705 return 0;
10706}
10707_ACEOF
10708rm -f conftest.$ac_objext
b61ff9c8
BS
10709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10710 (eval $ac_compile) 2>conftest.er1
ba479fd2 10711 ac_status=$?
86da66b5
HPN
10712 grep -v '^ *+' conftest.er1 >conftest.err
10713 rm -f conftest.er1
10714 cat conftest.err >&5
ba479fd2 10715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10716 (exit $ac_status); } &&
10717 { ac_try='test -z "$ac_c_werror_flag"
10718 || test ! -s conftest.err'
10719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10720 (eval $ac_try) 2>&5
10721 ac_status=$?
10722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10723 (exit $ac_status); }; } &&
10724 { ac_try='test -s conftest.$ac_objext'
10725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10726 (eval $ac_try) 2>&5
10727 ac_status=$?
10728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10729 (exit $ac_status); }; }; then
1072ec3f
ZW
10730 gcc_cv_decl_map_anon=yes
10731else
ba479fd2
NN
10732 echo "$as_me: failed program was:" >&5
10733sed 's/^/| /' conftest.$ac_ext >&5
10734
b61ff9c8 10735gcc_cv_decl_map_anon=no
1072ec3f 10736fi
b61ff9c8 10737rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 10738fi
b61ff9c8
BS
10739echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
10740echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
10741
10742 if test $gcc_cv_decl_map_anon = no; then
10743 gcc_cv_func_mmap_anon=no
10744 else
b61ff9c8
BS
10745 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
10746echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
ba479fd2
NN
10747if test "${gcc_cv_func_mmap_anon+set}" = set; then
10748 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
10749else
10750 # Add a system to this blacklist if it has mmap() and MAP_ANON or
10751 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
10752 # doesn't give anonymous zeroed pages with the same properties listed
10753 # above for use of /dev/zero.
10754 # Systems known to be in this category are Windows, VMS, and SCO Unix.
10755 case "$host_os" in
10756 vms* | cygwin* | pe | mingw* | sco* | udk* )
10757 gcc_cv_func_mmap_anon=no ;;
10758 *)
10759 gcc_cv_func_mmap_anon=yes;;
10760 esac
10761fi
b61ff9c8
BS
10762echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
10763echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
10764 fi
10765fi
10766
10767if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
10768
10769cat >>confdefs.h <<\_ACEOF
1072ec3f 10770#define HAVE_MMAP_FILE 1
ba479fd2 10771_ACEOF
1072ec3f
ZW
10772
10773fi
10774if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
10775
10776cat >>confdefs.h <<\_ACEOF
1072ec3f 10777#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 10778_ACEOF
1072ec3f
ZW
10779
10780fi
10781if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
10782
10783cat >>confdefs.h <<\_ACEOF
1072ec3f 10784#define HAVE_MMAP_ANON 1
ba479fd2 10785_ACEOF
1072ec3f
ZW
10786
10787fi
10788
b27d2bd5
MK
10789
10790case "${host}" in
ee262b6f 10791*-*-*vms*)
ba479fd2 10792 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
10793 # won't work, and it isn't easily adaptable. It makes more sense to
10794 # just force it.
10795 ac_cv_func_vfork_works=yes
10796 ;;
b27d2bd5 10797esac
b61ff9c8
BS
10798echo "$as_me:$LINENO: checking for pid_t" >&5
10799echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
ba479fd2
NN
10800if test "${ac_cv_type_pid_t+set}" = set; then
10801 echo $ECHO_N "(cached) $ECHO_C" >&6
10802else
10803 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10804/* confdefs.h. */
10805_ACEOF
10806cat confdefs.h >>conftest.$ac_ext
10807cat >>conftest.$ac_ext <<_ACEOF
10808/* end confdefs.h. */
10809$ac_includes_default
10810int
10811main ()
10812{
b61ff9c8 10813if ((pid_t *) 0)
ba479fd2 10814 return 0;
b61ff9c8 10815if (sizeof (pid_t))
ba479fd2
NN
10816 return 0;
10817 ;
10818 return 0;
10819}
10820_ACEOF
10821rm -f conftest.$ac_objext
b61ff9c8
BS
10822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10823 (eval $ac_compile) 2>conftest.er1
ba479fd2 10824 ac_status=$?
86da66b5
HPN
10825 grep -v '^ *+' conftest.er1 >conftest.err
10826 rm -f conftest.er1
10827 cat conftest.err >&5
ba479fd2 10828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10829 (exit $ac_status); } &&
10830 { ac_try='test -z "$ac_c_werror_flag"
10831 || test ! -s conftest.err'
10832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10833 (eval $ac_try) 2>&5
10834 ac_status=$?
10835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10836 (exit $ac_status); }; } &&
10837 { ac_try='test -s conftest.$ac_objext'
10838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10839 (eval $ac_try) 2>&5
10840 ac_status=$?
10841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10842 (exit $ac_status); }; }; then
cb65112a 10843 ac_cv_type_pid_t=yes
c375c43b 10844else
ba479fd2
NN
10845 echo "$as_me: failed program was:" >&5
10846sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10847
b61ff9c8 10848ac_cv_type_pid_t=no
ba479fd2 10849fi
b61ff9c8 10850rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10851fi
b61ff9c8
BS
10852echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10853echo "${ECHO_T}$ac_cv_type_pid_t" >&6
ba479fd2
NN
10854if test $ac_cv_type_pid_t = yes; then
10855 :
10856else
10857
10858cat >>confdefs.h <<_ACEOF
c375c43b 10859#define pid_t int
ba479fd2 10860_ACEOF
c375c43b
KG
10861
10862fi
10863
ba479fd2 10864
b61ff9c8
BS
10865
10866for ac_header in unistd.h vfork.h
ba479fd2
NN
10867do
10868as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b61ff9c8
BS
10869echo "$as_me:$LINENO: checking for $ac_header" >&5
10870echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10871if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 10872 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10873else
18fc9bd4 10874 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10875/* confdefs.h. */
10876_ACEOF
10877cat confdefs.h >>conftest.$ac_ext
10878cat >>conftest.$ac_ext <<_ACEOF
10879/* end confdefs.h. */
10880#include <$ac_header>
10881_ACEOF
b61ff9c8
BS
10882if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10883 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
10884 ac_status=$?
10885 grep -v '^ *+' conftest.er1 >conftest.err
10886 rm -f conftest.er1
10887 cat conftest.err >&5
10888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10889 (exit $ac_status); } >/dev/null; then
10890 if test -s conftest.err; then
10891 ac_cpp_err=$ac_c_preproc_warn_flag
10892 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10893 else
10894 ac_cpp_err=
10895 fi
10896else
10897 ac_cpp_err=yes
10898fi
10899if test -z "$ac_cpp_err"; then
18fc9bd4 10900 eval "$as_ac_Header=yes"
ba479fd2
NN
10901else
10902 echo "$as_me: failed program was:" >&5
10903sed 's/^/| /' conftest.$ac_ext >&5
10904
18fc9bd4 10905 eval "$as_ac_Header=no"
ba479fd2
NN
10906fi
10907rm -f conftest.err conftest.$ac_ext
c375c43b 10908fi
b61ff9c8
BS
10909echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10910echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
10911if test `eval echo '${'$as_ac_Header'}'` = yes; then
10912 cat >>confdefs.h <<_ACEOF
10913#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10914_ACEOF
6e3f3080
NN
10915
10916fi
ba479fd2
NN
10917done
10918
10919
10920
10921for ac_func in fork vfork
10922do
10923as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b61ff9c8
BS
10924echo "$as_me:$LINENO: checking for $ac_func" >&5
10925echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10926if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
10927 echo $ECHO_N "(cached) $ECHO_C" >&6
10928else
10929 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10930/* confdefs.h. */
10931_ACEOF
10932cat confdefs.h >>conftest.$ac_ext
10933cat >>conftest.$ac_ext <<_ACEOF
10934/* end confdefs.h. */
86da66b5
HPN
10935/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10936 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10937#define $ac_func innocuous_$ac_func
10938
c375c43b 10939/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10940 which can conflict with char $ac_func (); below.
10941 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10942 <limits.h> exists even on freestanding compilers. */
86da66b5 10943
ba479fd2
NN
10944#ifdef __STDC__
10945# include <limits.h>
10946#else
10947# include <assert.h>
10948#endif
86da66b5
HPN
10949
10950#undef $ac_func
10951
b61ff9c8 10952/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10953#ifdef __cplusplus
10954extern "C"
b61ff9c8 10955{
ba479fd2 10956#endif
b61ff9c8
BS
10957/* We use char because int might match the return type of a gcc2
10958 builtin and then its argument prototype would still apply. */
ba479fd2 10959char $ac_func ();
c375c43b
KG
10960/* The GNU C library defines this for functions which it implements
10961 to always fail with ENOSYS. Some functions are actually named
10962 something starting with __ and the normal name is an alias. */
b61ff9c8 10963#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b 10964choke me
b61ff9c8
BS
10965#else
10966char (*f) () = $ac_func;
10967#endif
10968#ifdef __cplusplus
10969}
c375c43b
KG
10970#endif
10971
ba479fd2
NN
10972int
10973main ()
10974{
b61ff9c8 10975return f != $ac_func;
ba479fd2
NN
10976 ;
10977 return 0;
10978}
10979_ACEOF
10980rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
10981if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10982 (eval $ac_link) 2>conftest.er1
ba479fd2 10983 ac_status=$?
86da66b5
HPN
10984 grep -v '^ *+' conftest.er1 >conftest.err
10985 rm -f conftest.er1
10986 cat conftest.err >&5
ba479fd2 10987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10988 (exit $ac_status); } &&
10989 { ac_try='test -z "$ac_c_werror_flag"
10990 || test ! -s conftest.err'
10991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10992 (eval $ac_try) 2>&5
10993 ac_status=$?
10994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10995 (exit $ac_status); }; } &&
10996 { ac_try='test -s conftest$ac_exeext'
10997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10998 (eval $ac_try) 2>&5
10999 ac_status=$?
11000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11001 (exit $ac_status); }; }; then
ba479fd2
NN
11002 eval "$as_ac_var=yes"
11003else
11004 echo "$as_me: failed program was:" >&5
11005sed 's/^/| /' conftest.$ac_ext >&5
11006
b61ff9c8 11007eval "$as_ac_var=no"
ba479fd2 11008fi
b61ff9c8 11009rm -f conftest.err conftest.$ac_objext \
86da66b5 11010 conftest$ac_exeext conftest.$ac_ext
ba479fd2 11011fi
b61ff9c8
BS
11012echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11013echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
11014if test `eval echo '${'$as_ac_var'}'` = yes; then
11015 cat >>confdefs.h <<_ACEOF
11016#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11017_ACEOF
11018
c375c43b 11019fi
ba479fd2 11020done
c375c43b 11021
ba479fd2 11022if test "x$ac_cv_func_fork" = xyes; then
b61ff9c8
BS
11023 echo "$as_me:$LINENO: checking for working fork" >&5
11024echo $ECHO_N "checking for working fork... $ECHO_C" >&6
ba479fd2
NN
11025if test "${ac_cv_func_fork_works+set}" = set; then
11026 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 11027else
ba479fd2
NN
11028 if test "$cross_compiling" = yes; then
11029 ac_cv_func_fork_works=cross
11030else
11031 cat >conftest.$ac_ext <<_ACEOF
b61ff9c8
BS
11032/* By Ruediger Kuhlmann. */
11033 #include <sys/types.h>
11034 #if HAVE_UNISTD_H
11035 # include <unistd.h>
11036 #endif
11037 /* Some systems only have a dummy stub for fork() */
11038 int main ()
11039 {
11040 if (fork() < 0)
11041 exit (1);
11042 exit (0);
11043 }
1a4b763e
BS
11044_ACEOF
11045rm -f conftest$ac_exeext
b61ff9c8
BS
11046if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11047 (eval $ac_link) 2>&5
1a4b763e
BS
11048 ac_status=$?
11049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11050 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
11051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11052 (eval $ac_try) 2>&5
ba479fd2
NN
11053 ac_status=$?
11054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11055 (exit $ac_status); }; }; then
11056 ac_cv_func_fork_works=yes
11057else
11058 echo "$as_me: program exited with status $ac_status" >&5
11059echo "$as_me: failed program was:" >&5
11060sed 's/^/| /' conftest.$ac_ext >&5
11061
11062( exit $ac_status )
11063ac_cv_func_fork_works=no
11064fi
b61ff9c8 11065rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
11066fi
11067fi
b61ff9c8
BS
11068echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
11069echo "${ECHO_T}$ac_cv_func_fork_works" >&6
ba479fd2
NN
11070
11071else
11072 ac_cv_func_fork_works=$ac_cv_func_fork
11073fi
11074if test "x$ac_cv_func_fork_works" = xcross; then
11075 case $host in
11076 *-*-amigaos* | *-*-msdosdjgpp*)
11077 # Override, as these systems have only a dummy fork() stub
11078 ac_cv_func_fork_works=no
11079 ;;
11080 *)
11081 ac_cv_func_fork_works=yes
11082 ;;
11083 esac
11084 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11085echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 11086fi
c375c43b 11087ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2 11088if test "x$ac_cv_func_vfork" = xyes; then
b61ff9c8
BS
11089 echo "$as_me:$LINENO: checking for working vfork" >&5
11090echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
ba479fd2
NN
11091if test "${ac_cv_func_vfork_works+set}" = set; then
11092 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 11093else
ba479fd2
NN
11094 if test "$cross_compiling" = yes; then
11095 ac_cv_func_vfork_works=cross
11096else
11097 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11098/* confdefs.h. */
11099_ACEOF
11100cat confdefs.h >>conftest.$ac_ext
11101cat >>conftest.$ac_ext <<_ACEOF
11102/* end confdefs.h. */
c375c43b 11103/* Thanks to Paul Eggert for this test. */
b61ff9c8
BS
11104#include <stdio.h>
11105#include <stdlib.h>
11106#include <sys/types.h>
11107#include <sys/stat.h>
ba479fd2 11108#include <sys/wait.h>
b61ff9c8
BS
11109#if HAVE_UNISTD_H
11110# include <unistd.h>
11111#endif
11112#if HAVE_VFORK_H
ba479fd2 11113# include <vfork.h>
c375c43b
KG
11114#endif
11115/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
11116 argument registers are propagated back to the parent. The compiler
11117 is told about this with #include <vfork.h>, but some compilers
11118 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11119 static variable whose address is put into a register that is
11120 clobbered by the vfork. */
11121static void
c375c43b
KG
11122#ifdef __cplusplus
11123sparc_address_test (int arg)
ba479fd2 11124# else
c375c43b
KG
11125sparc_address_test (arg) int arg;
11126#endif
11127{
11128 static pid_t child;
11129 if (!child) {
11130 child = vfork ();
11131 if (child < 0) {
11132 perror ("vfork");
11133 _exit(2);
11134 }
11135 if (!child) {
11136 arg = getpid();
11137 write(-1, "", 0);
11138 _exit (arg);
11139 }
11140 }
11141}
ba479fd2
NN
11142
11143int
11144main ()
11145{
c375c43b
KG
11146 pid_t parent = getpid ();
11147 pid_t child;
11148
ba479fd2 11149 sparc_address_test (0);
c375c43b
KG
11150
11151 child = vfork ();
11152
11153 if (child == 0) {
ba479fd2
NN
11154 /* Here is another test for sparc vfork register problems. This
11155 test uses lots of local variables, at least as many local
11156 variables as main has allocated so far including compiler
11157 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11158 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11159 reuse the register of parent for one of the local variables,
11160 since it will think that parent can't possibly be used any more
11161 in this routine. Assigning to the local variable will thus
11162 munge parent in the parent process. */
c375c43b
KG
11163 pid_t
11164 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11165 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11166 /* Convince the compiler that p..p7 are live; otherwise, it might
11167 use the same hardware register for all 8 local variables. */
11168 if (p != p1 || p != p2 || p != p3 || p != p4
11169 || p != p5 || p != p6 || p != p7)
11170 _exit(1);
11171
ba479fd2
NN
11172 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11173 from child file descriptors. If the child closes a descriptor
11174 before it execs or exits, this munges the parent's descriptor
11175 as well. Test for this by closing stdout in the child. */
c375c43b
KG
11176 _exit(close(fileno(stdout)) != 0);
11177 } else {
11178 int status;
11179 struct stat st;
11180
11181 while (wait(&status) != child)
11182 ;
b61ff9c8 11183 exit(
c375c43b
KG
11184 /* Was there some problem with vforking? */
11185 child < 0
11186
11187 /* Did the child fail? (This shouldn't happen.) */
11188 || status
11189
11190 /* Did the vfork/compiler bug occur? */
11191 || parent != getpid()
11192
11193 /* Did the file descriptor bug occur? */
11194 || fstat(fileno(stdout), &st) != 0
11195 );
11196 }
11197}
ba479fd2
NN
11198_ACEOF
11199rm -f conftest$ac_exeext
b61ff9c8
BS
11200if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11201 (eval $ac_link) 2>&5
ba479fd2
NN
11202 ac_status=$?
11203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11204 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
11205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11206 (eval $ac_try) 2>&5
ba479fd2
NN
11207 ac_status=$?
11208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11209 (exit $ac_status); }; }; then
c375c43b
KG
11210 ac_cv_func_vfork_works=yes
11211else
ba479fd2
NN
11212 echo "$as_me: program exited with status $ac_status" >&5
11213echo "$as_me: failed program was:" >&5
11214sed 's/^/| /' conftest.$ac_ext >&5
11215
11216( exit $ac_status )
11217ac_cv_func_vfork_works=no
cafe096b 11218fi
b61ff9c8 11219rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 11220fi
ba479fd2 11221fi
b61ff9c8
BS
11222echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
11223echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 11224
ba479fd2
NN
11225fi;
11226if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 11227 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
11228 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11229echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
11230fi
11231
ba479fd2
NN
11232if test "x$ac_cv_func_vfork_works" = xyes; then
11233
11234cat >>confdefs.h <<\_ACEOF
11235#define HAVE_WORKING_VFORK 1
11236_ACEOF
11237
11238else
11239
11240cat >>confdefs.h <<\_ACEOF
c375c43b 11241#define vfork fork
ba479fd2 11242_ACEOF
c375c43b
KG
11243
11244fi
ba479fd2
NN
11245if test "x$ac_cv_func_fork_works" = xyes; then
11246
11247cat >>confdefs.h <<\_ACEOF
11248#define HAVE_WORKING_FORK 1
11249_ACEOF
11250
11251fi
11252
c375c43b 11253
81bf3d9e 11254
dfb77e37
KC
11255 if test "X$prefix" = "XNONE"; then
11256 acl_final_prefix="$ac_default_prefix"
11257 else
11258 acl_final_prefix="$prefix"
11259 fi
11260 if test "X$exec_prefix" = "XNONE"; then
11261 acl_final_exec_prefix='${prefix}'
11262 else
11263 acl_final_exec_prefix="$exec_prefix"
11264 fi
11265 acl_save_prefix="$prefix"
11266 prefix="$acl_final_prefix"
11267 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
11268 prefix="$acl_save_prefix"
f91abfce
TT
11269
11270
b61ff9c8 11271# Check whether --with-gnu-ld or --without-gnu-ld was given.
dfb77e37 11272if test "${with_gnu_ld+set}" = set; then
b61ff9c8
BS
11273 withval="$with_gnu_ld"
11274 test "$withval" = no || with_gnu_ld=yes
ba479fd2 11275else
dfb77e37 11276 with_gnu_ld=no
b61ff9c8 11277fi;
dfb77e37
KC
11278# Prepare PATH_SEPARATOR.
11279# The user is always right.
11280if test "${PATH_SEPARATOR+set}" != set; then
11281 echo "#! /bin/sh" >conf$$.sh
11282 echo "exit 0" >>conf$$.sh
11283 chmod +x conf$$.sh
11284 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11285 PATH_SEPARATOR=';'
ba479fd2 11286 else
dfb77e37 11287 PATH_SEPARATOR=:
ba479fd2 11288 fi
dfb77e37
KC
11289 rm -f conf$$.sh
11290fi
11291ac_prog=ld
11292if test "$GCC" = yes; then
11293 # Check if gcc -print-prog-name=ld gives a path.
b61ff9c8
BS
11294 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
11295echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
dfb77e37
KC
11296 case $host in
11297 *-*-mingw*)
11298 # gcc leaves a trailing carriage return which upsets mingw
11299 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11300 *)
11301 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11302 esac
11303 case $ac_prog in
11304 # Accept absolute paths.
11305 [\\/]* | [A-Za-z]:[\\/]*)
11306 re_direlt='/[^/][^/]*/\.\./'
11307 # Canonicalize the path of ld
11308 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
11309 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
11310 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
11311 done
11312 test -z "$LD" && LD="$ac_prog"
11313 ;;
11314 "")
11315 # If it fails, then pretend we aren't using GCC.
11316 ac_prog=ld
11317 ;;
11318 *)
11319 # If it is relative, then search for the first ld in PATH.
11320 with_gnu_ld=unknown
11321 ;;
11322 esac
11323elif test "$with_gnu_ld" = yes; then
b61ff9c8
BS
11324 echo "$as_me:$LINENO: checking for GNU ld" >&5
11325echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 11326else
b61ff9c8
BS
11327 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
11328echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 11329fi
dfb77e37
KC
11330if test "${acl_cv_path_LD+set}" = set; then
11331 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 11332else
dfb77e37
KC
11333 if test -z "$LD"; then
11334 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
11335 for ac_dir in $PATH; do
11336 test -z "$ac_dir" && ac_dir=.
11337 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11338 acl_cv_path_LD="$ac_dir/$ac_prog"
11339 # Check to see if the program is GNU ld. I'd rather use --version,
11340 # but apparently some GNU ld's only accept -v.
11341 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
11342 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
11343 test "$with_gnu_ld" != no && break
11344 else
11345 test "$with_gnu_ld" != yes && break
11346 fi
dfb77e37
KC
11347 fi
11348 done
11349 IFS="$ac_save_ifs"
11350else
11351 acl_cv_path_LD="$LD" # Let the user override the test with a path.
11352fi
11353fi
ba479fd2 11354
dfb77e37
KC
11355LD="$acl_cv_path_LD"
11356if test -n "$LD"; then
b61ff9c8
BS
11357 echo "$as_me:$LINENO: result: $LD" >&5
11358echo "${ECHO_T}$LD" >&6
dfb77e37 11359else
b61ff9c8
BS
11360 echo "$as_me:$LINENO: result: no" >&5
11361echo "${ECHO_T}no" >&6
ba479fd2 11362fi
dfb77e37
KC
11363test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
11364echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
11365 { (exit 1); exit 1; }; }
b61ff9c8
BS
11366echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
11367echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
dfb77e37
KC
11368if test "${acl_cv_prog_gnu_ld+set}" = set; then
11369 echo $ECHO_N "(cached) $ECHO_C" >&6
11370else
11371 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
11372if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
11373 acl_cv_prog_gnu_ld=yes
11374else
11375 acl_cv_prog_gnu_ld=no
11376fi
dfb77e37 11377fi
b61ff9c8
BS
11378echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
11379echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
dfb77e37
KC
11380with_gnu_ld=$acl_cv_prog_gnu_ld
11381
11382
11383
b61ff9c8
BS
11384 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
11385echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
dfb77e37
KC
11386if test "${acl_cv_rpath+set}" = set; then
11387 echo $ECHO_N "(cached) $ECHO_C" >&6
11388else
11389
11390 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
11391 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
11392 . ./conftest.sh
11393 rm -f ./conftest.sh
11394 acl_cv_rpath=done
ba479fd2 11395
eb158727 11396fi
b61ff9c8
BS
11397echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
11398echo "${ECHO_T}$acl_cv_rpath" >&6
dfb77e37
KC
11399 wl="$acl_cv_wl"
11400 libext="$acl_cv_libext"
11401 shlibext="$acl_cv_shlibext"
11402 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
11403 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
11404 hardcode_direct="$acl_cv_hardcode_direct"
11405 hardcode_minus_L="$acl_cv_hardcode_minus_L"
b61ff9c8 11406 # Check whether --enable-rpath or --disable-rpath was given.
dfb77e37 11407if test "${enable_rpath+set}" = set; then
b61ff9c8
BS
11408 enableval="$enable_rpath"
11409 :
dfb77e37
KC
11410else
11411 enable_rpath=yes
b61ff9c8 11412fi;
8b1f719a 11413
a6ccdbab 11414
dfb77e37
KC
11415
11416
11417
11418
11419
b639c3c2
JJ
11420 use_additional=yes
11421
11422 acl_save_prefix="$prefix"
11423 prefix="$acl_final_prefix"
11424 acl_save_exec_prefix="$exec_prefix"
11425 exec_prefix="$acl_final_exec_prefix"
11426
11427 eval additional_includedir=\"$includedir\"
11428 eval additional_libdir=\"$libdir\"
11429
11430 exec_prefix="$acl_save_exec_prefix"
11431 prefix="$acl_save_prefix"
dfb77e37
KC
11432
11433
b61ff9c8 11434# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
8b1f719a 11435if test "${with_libiconv_prefix+set}" = set; then
b61ff9c8
BS
11436 withval="$with_libiconv_prefix"
11437
8b1f719a 11438 if test "X$withval" = "Xno"; then
b639c3c2 11439 use_additional=no
8b1f719a
PB
11440 else
11441 if test "X$withval" = "X"; then
dfb77e37
KC
11442
11443 acl_save_prefix="$prefix"
11444 prefix="$acl_final_prefix"
11445 acl_save_exec_prefix="$exec_prefix"
11446 exec_prefix="$acl_final_exec_prefix"
11447
b639c3c2
JJ
11448 eval additional_includedir=\"$includedir\"
11449 eval additional_libdir=\"$libdir\"
dfb77e37
KC
11450
11451 exec_prefix="$acl_save_exec_prefix"
11452 prefix="$acl_save_prefix"
11453
8b1f719a 11454 else
b639c3c2
JJ
11455 additional_includedir="$withval/include"
11456 additional_libdir="$withval/lib"
8b1f719a
PB
11457 fi
11458 fi
11459
b61ff9c8 11460fi;
dfb77e37
KC
11461 LIBICONV=
11462 LTLIBICONV=
11463 INCICONV=
11464 rpathdirs=
11465 ltrpathdirs=
11466 names_already_handled=
11467 names_next_round='iconv '
11468 while test -n "$names_next_round"; do
11469 names_this_round="$names_next_round"
11470 names_next_round=
11471 for name in $names_this_round; do
11472 already_handled=
11473 for n in $names_already_handled; do
11474 if test "$n" = "$name"; then
11475 already_handled=yes
11476 break
11477 fi
11478 done
11479 if test -z "$already_handled"; then
11480 names_already_handled="$names_already_handled $name"
11481 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11482 eval value=\"\$HAVE_LIB$uppername\"
11483 if test -n "$value"; then
11484 if test "$value" = yes; then
11485 eval value=\"\$LIB$uppername\"
11486 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11487 eval value=\"\$LTLIB$uppername\"
11488 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11489 else
11490 :
11491 fi
11492 else
11493 found_dir=
11494 found_la=
11495 found_so=
11496 found_a=
b639c3c2
JJ
11497 if test $use_additional = yes; then
11498 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11499 found_dir="$additional_libdir"
11500 found_so="$additional_libdir/lib$name.$shlibext"
11501 if test -f "$additional_libdir/lib$name.la"; then
11502 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
11503 fi
11504 else
b639c3c2
JJ
11505 if test -f "$additional_libdir/lib$name.$libext"; then
11506 found_dir="$additional_libdir"
11507 found_a="$additional_libdir/lib$name.$libext"
11508 if test -f "$additional_libdir/lib$name.la"; then
11509 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
11510 fi
11511 fi
11512 fi
11513 fi
11514 if test "X$found_dir" = "X"; then
11515 for x in $LDFLAGS $LTLIBICONV; do
11516
11517 acl_save_prefix="$prefix"
11518 prefix="$acl_final_prefix"
11519 acl_save_exec_prefix="$exec_prefix"
11520 exec_prefix="$acl_final_exec_prefix"
11521 eval x=\"$x\"
11522 exec_prefix="$acl_save_exec_prefix"
11523 prefix="$acl_save_prefix"
11524
11525 case "$x" in
11526 -L*)
11527 dir=`echo "X$x" | sed -e 's/^X-L//'`
11528 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11529 found_dir="$dir"
11530 found_so="$dir/lib$name.$shlibext"
11531 if test -f "$dir/lib$name.la"; then
11532 found_la="$dir/lib$name.la"
11533 fi
11534 else
11535 if test -f "$dir/lib$name.$libext"; then
11536 found_dir="$dir"
11537 found_a="$dir/lib$name.$libext"
11538 if test -f "$dir/lib$name.la"; then
11539 found_la="$dir/lib$name.la"
11540 fi
11541 fi
11542 fi
11543 ;;
11544 esac
11545 if test "X$found_dir" != "X"; then
11546 break
11547 fi
11548 done
11549 fi
11550 if test "X$found_dir" != "X"; then
11551 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
11552 if test "X$found_so" != "X"; then
11553 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11554 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11555 else
11556 haveit=
11557 for x in $ltrpathdirs; do
11558 if test "X$x" = "X$found_dir"; then
11559 haveit=yes
11560 break
11561 fi
11562 done
11563 if test -z "$haveit"; then
11564 ltrpathdirs="$ltrpathdirs $found_dir"
11565 fi
11566 if test "$hardcode_direct" = yes; then
11567 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11568 else
11569 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11570 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11571 haveit=
11572 for x in $rpathdirs; do
11573 if test "X$x" = "X$found_dir"; then
11574 haveit=yes
11575 break
11576 fi
11577 done
11578 if test -z "$haveit"; then
11579 rpathdirs="$rpathdirs $found_dir"
11580 fi
11581 else
11582 haveit=
11583 for x in $LDFLAGS $LIBICONV; do
11584
11585 acl_save_prefix="$prefix"
11586 prefix="$acl_final_prefix"
11587 acl_save_exec_prefix="$exec_prefix"
11588 exec_prefix="$acl_final_exec_prefix"
11589 eval x=\"$x\"
11590 exec_prefix="$acl_save_exec_prefix"
11591 prefix="$acl_save_prefix"
11592
11593 if test "X$x" = "X-L$found_dir"; then
11594 haveit=yes
11595 break
11596 fi
11597 done
11598 if test -z "$haveit"; then
11599 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
11600 fi
11601 if test "$hardcode_minus_L" != no; then
11602 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11603 else
11604 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11605 fi
11606 fi
11607 fi
11608 fi
11609 else
11610 if test "X$found_a" != "X"; then
11611 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
11612 else
11613 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
11614 fi
11615 fi
11616 additional_includedir=
11617 case "$found_dir" in
11618 */lib | */lib/)
11619 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11620 additional_includedir="$basedir/include"
11621 ;;
11622 esac
11623 if test "X$additional_includedir" != "X"; then
11624 if test "X$additional_includedir" != "X/usr/include"; then
11625 haveit=
11626 if test "X$additional_includedir" = "X/usr/local/include"; then
11627 if test -n "$GCC"; then
11628 case $host_os in
18fc9bd4 11629 linux*) haveit=yes;;
dfb77e37
KC
11630 esac
11631 fi
11632 fi
11633 if test -z "$haveit"; then
11634 for x in $CPPFLAGS $INCICONV; do
11635
11636 acl_save_prefix="$prefix"
11637 prefix="$acl_final_prefix"
11638 acl_save_exec_prefix="$exec_prefix"
11639 exec_prefix="$acl_final_exec_prefix"
11640 eval x=\"$x\"
11641 exec_prefix="$acl_save_exec_prefix"
11642 prefix="$acl_save_prefix"
11643
11644 if test "X$x" = "X-I$additional_includedir"; then
11645 haveit=yes
11646 break
11647 fi
11648 done
11649 if test -z "$haveit"; then
11650 if test -d "$additional_includedir"; then
11651 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
11652 fi
11653 fi
11654 fi
11655 fi
11656 fi
11657 if test -n "$found_la"; then
11658 save_libdir="$libdir"
11659 case "$found_la" in
11660 */* | *\\*) . "$found_la" ;;
11661 *) . "./$found_la" ;;
11662 esac
11663 libdir="$save_libdir"
11664 for dep in $dependency_libs; do
11665 case "$dep" in
11666 -L*)
11667 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11668 if test "X$additional_libdir" != "X/usr/lib"; then
11669 haveit=
11670 if test "X$additional_libdir" = "X/usr/local/lib"; then
11671 if test -n "$GCC"; then
11672 case $host_os in
18fc9bd4 11673 linux*) haveit=yes;;
dfb77e37
KC
11674 esac
11675 fi
11676 fi
11677 if test -z "$haveit"; then
11678 haveit=
11679 for x in $LDFLAGS $LIBICONV; do
11680
11681 acl_save_prefix="$prefix"
11682 prefix="$acl_final_prefix"
11683 acl_save_exec_prefix="$exec_prefix"
11684 exec_prefix="$acl_final_exec_prefix"
11685 eval x=\"$x\"
11686 exec_prefix="$acl_save_exec_prefix"
11687 prefix="$acl_save_prefix"
11688
11689 if test "X$x" = "X-L$additional_libdir"; then
11690 haveit=yes
11691 break
11692 fi
11693 done
11694 if test -z "$haveit"; then
11695 if test -d "$additional_libdir"; then
11696 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
11697 fi
11698 fi
11699 haveit=
11700 for x in $LDFLAGS $LTLIBICONV; do
11701
11702 acl_save_prefix="$prefix"
11703 prefix="$acl_final_prefix"
11704 acl_save_exec_prefix="$exec_prefix"
11705 exec_prefix="$acl_final_exec_prefix"
11706 eval x=\"$x\"
11707 exec_prefix="$acl_save_exec_prefix"
11708 prefix="$acl_save_prefix"
11709
11710 if test "X$x" = "X-L$additional_libdir"; then
11711 haveit=yes
11712 break
11713 fi
11714 done
11715 if test -z "$haveit"; then
11716 if test -d "$additional_libdir"; then
11717 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
11718 fi
11719 fi
11720 fi
11721 fi
11722 ;;
11723 -R*)
11724 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11725 if test "$enable_rpath" != no; then
11726 haveit=
11727 for x in $rpathdirs; do
11728 if test "X$x" = "X$dir"; then
11729 haveit=yes
11730 break
11731 fi
11732 done
11733 if test -z "$haveit"; then
11734 rpathdirs="$rpathdirs $dir"
11735 fi
11736 haveit=
11737 for x in $ltrpathdirs; do
11738 if test "X$x" = "X$dir"; then
11739 haveit=yes
11740 break
11741 fi
11742 done
11743 if test -z "$haveit"; then
11744 ltrpathdirs="$ltrpathdirs $dir"
11745 fi
11746 fi
11747 ;;
11748 -l*)
11749 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11750 ;;
11751 *.la)
11752 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11753 ;;
11754 *)
11755 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
11756 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
11757 ;;
11758 esac
11759 done
11760 fi
11761 else
11762 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11763 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
11764 fi
11765 fi
11766 fi
11767 done
11768 done
11769 if test "X$rpathdirs" != "X"; then
11770 if test -n "$hardcode_libdir_separator"; then
11771 alldirs=
11772 for found_dir in $rpathdirs; do
11773 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11774 done
11775 acl_save_libdir="$libdir"
11776 libdir="$alldirs"
11777 eval flag=\"$hardcode_libdir_flag_spec\"
11778 libdir="$acl_save_libdir"
11779 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11780 else
11781 for found_dir in $rpathdirs; do
11782 acl_save_libdir="$libdir"
11783 libdir="$found_dir"
11784 eval flag=\"$hardcode_libdir_flag_spec\"
11785 libdir="$acl_save_libdir"
11786 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11787 done
11788 fi
11789 fi
11790 if test "X$ltrpathdirs" != "X"; then
11791 for found_dir in $ltrpathdirs; do
11792 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11793 done
11794 fi
11795
11796
11797
11798
11799
11800
11801
11802 am_save_CPPFLAGS="$CPPFLAGS"
11803
11804 for element in $INCICONV; do
11805 haveit=
11806 for x in $CPPFLAGS; do
11807
11808 acl_save_prefix="$prefix"
11809 prefix="$acl_final_prefix"
11810 acl_save_exec_prefix="$exec_prefix"
11811 exec_prefix="$acl_final_exec_prefix"
11812 eval x=\"$x\"
11813 exec_prefix="$acl_save_exec_prefix"
11814 prefix="$acl_save_prefix"
11815
11816 if test "X$x" = "X$element"; then
11817 haveit=yes
11818 break
11819 fi
11820 done
11821 if test -z "$haveit"; then
11822 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11823 fi
11824 done
eb158727
ZW
11825
11826
b61ff9c8
BS
11827 echo "$as_me:$LINENO: checking for iconv" >&5
11828echo $ECHO_N "checking for iconv... $ECHO_C" >&6
ba479fd2
NN
11829if test "${am_cv_func_iconv+set}" = set; then
11830 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11831else
ba479fd2 11832
f91abfce
TT
11833 am_cv_func_iconv="no, consider installing GNU libiconv"
11834 am_cv_lib_iconv=no
ba479fd2 11835 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11836/* confdefs.h. */
11837_ACEOF
11838cat confdefs.h >>conftest.$ac_ext
11839cat >>conftest.$ac_ext <<_ACEOF
11840/* end confdefs.h. */
f91abfce
TT
11841#include <stdlib.h>
11842#include <iconv.h>
ba479fd2
NN
11843int
11844main ()
11845{
f91abfce
TT
11846iconv_t cd = iconv_open("","");
11847 iconv(cd,NULL,NULL,NULL,NULL);
11848 iconv_close(cd);
ba479fd2
NN
11849 ;
11850 return 0;
11851}
11852_ACEOF
11853rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11855 (eval $ac_link) 2>conftest.er1
ba479fd2 11856 ac_status=$?
86da66b5
HPN
11857 grep -v '^ *+' conftest.er1 >conftest.err
11858 rm -f conftest.er1
11859 cat conftest.err >&5
ba479fd2 11860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11861 (exit $ac_status); } &&
11862 { ac_try='test -z "$ac_c_werror_flag"
11863 || test ! -s conftest.err'
11864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11865 (eval $ac_try) 2>&5
11866 ac_status=$?
11867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11868 (exit $ac_status); }; } &&
11869 { ac_try='test -s conftest$ac_exeext'
11870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11871 (eval $ac_try) 2>&5
11872 ac_status=$?
11873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11874 (exit $ac_status); }; }; then
f91abfce
TT
11875 am_cv_func_iconv=yes
11876else
ba479fd2
NN
11877 echo "$as_me: failed program was:" >&5
11878sed 's/^/| /' conftest.$ac_ext >&5
11879
f91abfce 11880fi
b61ff9c8 11881rm -f conftest.err conftest.$ac_objext \
86da66b5 11882 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11883 if test "$am_cv_func_iconv" != yes; then
11884 am_save_LIBS="$LIBS"
dfb77e37 11885 LIBS="$LIBS $LIBICONV"
ba479fd2 11886 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11887/* confdefs.h. */
11888_ACEOF
11889cat confdefs.h >>conftest.$ac_ext
11890cat >>conftest.$ac_ext <<_ACEOF
11891/* end confdefs.h. */
f91abfce
TT
11892#include <stdlib.h>
11893#include <iconv.h>
ba479fd2
NN
11894int
11895main ()
11896{
f91abfce
TT
11897iconv_t cd = iconv_open("","");
11898 iconv(cd,NULL,NULL,NULL,NULL);
11899 iconv_close(cd);
ba479fd2
NN
11900 ;
11901 return 0;
11902}
11903_ACEOF
11904rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11905if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11906 (eval $ac_link) 2>conftest.er1
ba479fd2 11907 ac_status=$?
86da66b5
HPN
11908 grep -v '^ *+' conftest.er1 >conftest.err
11909 rm -f conftest.er1
11910 cat conftest.err >&5
ba479fd2 11911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11912 (exit $ac_status); } &&
11913 { ac_try='test -z "$ac_c_werror_flag"
11914 || test ! -s conftest.err'
11915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11916 (eval $ac_try) 2>&5
11917 ac_status=$?
11918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11919 (exit $ac_status); }; } &&
11920 { ac_try='test -s conftest$ac_exeext'
11921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11922 (eval $ac_try) 2>&5
11923 ac_status=$?
11924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11925 (exit $ac_status); }; }; then
f91abfce
TT
11926 am_cv_lib_iconv=yes
11927 am_cv_func_iconv=yes
11928else
ba479fd2
NN
11929 echo "$as_me: failed program was:" >&5
11930sed 's/^/| /' conftest.$ac_ext >&5
11931
f91abfce 11932fi
b61ff9c8 11933rm -f conftest.err conftest.$ac_objext \
86da66b5 11934 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11935 LIBS="$am_save_LIBS"
11936 fi
6e3f3080 11937
ba479fd2 11938fi
b61ff9c8
BS
11939echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
11940echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 11941 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11942
11943cat >>confdefs.h <<\_ACEOF
f91abfce 11944#define HAVE_ICONV 1
ba479fd2 11945_ACEOF
f91abfce 11946
dfb77e37
KC
11947 fi
11948 if test "$am_cv_lib_iconv" = yes; then
b61ff9c8
BS
11949 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
11950echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
11951 echo "$as_me:$LINENO: result: $LIBICONV" >&5
11952echo "${ECHO_T}$LIBICONV" >&6
dfb77e37
KC
11953 else
11954 CPPFLAGS="$am_save_CPPFLAGS"
11955 LIBICONV=
11956 LTLIBICONV=
11957 fi
11958
11959
11960
11961 if test "$am_cv_func_iconv" = yes; then
b61ff9c8
BS
11962 echo "$as_me:$LINENO: checking for iconv declaration" >&5
11963echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
ba479fd2
NN
11964 if test "${am_cv_proto_iconv+set}" = set; then
11965 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11966else
ba479fd2
NN
11967
11968 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11969/* confdefs.h. */
11970_ACEOF
11971cat confdefs.h >>conftest.$ac_ext
11972cat >>conftest.$ac_ext <<_ACEOF
11973/* end confdefs.h. */
f91abfce
TT
11974
11975#include <stdlib.h>
11976#include <iconv.h>
11977extern
11978#ifdef __cplusplus
11979"C"
11980#endif
11981#if defined(__STDC__) || defined(__cplusplus)
11982size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11983#else
11984size_t iconv();
11985#endif
11986
ba479fd2
NN
11987int
11988main ()
11989{
f91abfce 11990
ba479fd2
NN
11991 ;
11992 return 0;
11993}
11994_ACEOF
11995rm -f conftest.$ac_objext
b61ff9c8
BS
11996if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11997 (eval $ac_compile) 2>conftest.er1
ba479fd2 11998 ac_status=$?
86da66b5
HPN
11999 grep -v '^ *+' conftest.er1 >conftest.err
12000 rm -f conftest.er1
12001 cat conftest.err >&5
ba479fd2 12002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12003 (exit $ac_status); } &&
12004 { ac_try='test -z "$ac_c_werror_flag"
12005 || test ! -s conftest.err'
12006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12007 (eval $ac_try) 2>&5
12008 ac_status=$?
12009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12010 (exit $ac_status); }; } &&
12011 { ac_try='test -s conftest.$ac_objext'
12012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12013 (eval $ac_try) 2>&5
12014 ac_status=$?
12015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12016 (exit $ac_status); }; }; then
f91abfce
TT
12017 am_cv_proto_iconv_arg1=""
12018else
ba479fd2
NN
12019 echo "$as_me: failed program was:" >&5
12020sed 's/^/| /' conftest.$ac_ext >&5
12021
b61ff9c8 12022am_cv_proto_iconv_arg1="const"
f91abfce 12023fi
b61ff9c8 12024rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
12025 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);"
12026fi
12027
12028 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
b61ff9c8 12029 echo "$as_me:$LINENO: result: ${ac_t:-
ba479fd2
NN
12030 }$am_cv_proto_iconv" >&5
12031echo "${ECHO_T}${ac_t:-
b61ff9c8 12032 }$am_cv_proto_iconv" >&6
ba479fd2
NN
12033
12034cat >>confdefs.h <<_ACEOF
f91abfce 12035#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 12036_ACEOF
f91abfce
TT
12037
12038 fi
f91abfce 12039
56694dd9
ZW
12040# Until we have in-tree GNU iconv:
12041LIBICONV_DEP=
12042
12043
18fc9bd4 12044
b61ff9c8
BS
12045 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
12046echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
18fc9bd4
RG
12047if test "${am_cv_val_LC_MESSAGES+set}" = set; then
12048 echo $ECHO_N "(cached) $ECHO_C" >&6
12049else
12050 cat >conftest.$ac_ext <<_ACEOF
12051/* confdefs.h. */
12052_ACEOF
12053cat confdefs.h >>conftest.$ac_ext
12054cat >>conftest.$ac_ext <<_ACEOF
12055/* end confdefs.h. */
12056#include <locale.h>
12057int
12058main ()
12059{
12060return LC_MESSAGES
12061 ;
12062 return 0;
12063}
12064_ACEOF
12065rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
12066if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12067 (eval $ac_link) 2>conftest.er1
18fc9bd4
RG
12068 ac_status=$?
12069 grep -v '^ *+' conftest.er1 >conftest.err
12070 rm -f conftest.er1
12071 cat conftest.err >&5
12072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12073 (exit $ac_status); } &&
12074 { ac_try='test -z "$ac_c_werror_flag"
12075 || test ! -s conftest.err'
12076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12077 (eval $ac_try) 2>&5
12078 ac_status=$?
12079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12080 (exit $ac_status); }; } &&
12081 { ac_try='test -s conftest$ac_exeext'
12082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12083 (eval $ac_try) 2>&5
12084 ac_status=$?
12085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12086 (exit $ac_status); }; }; then
18fc9bd4
RG
12087 am_cv_val_LC_MESSAGES=yes
12088else
12089 echo "$as_me: failed program was:" >&5
12090sed 's/^/| /' conftest.$ac_ext >&5
12091
b61ff9c8 12092am_cv_val_LC_MESSAGES=no
18fc9bd4 12093fi
b61ff9c8 12094rm -f conftest.err conftest.$ac_objext \
18fc9bd4
RG
12095 conftest$ac_exeext conftest.$ac_ext
12096fi
b61ff9c8
BS
12097echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
12098echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
18fc9bd4
RG
12099 if test $am_cv_val_LC_MESSAGES = yes; then
12100
12101cat >>confdefs.h <<\_ACEOF
12102#define HAVE_LC_MESSAGES 1
12103_ACEOF
12104
12105 fi
12106
f91abfce 12107
a03ea89b 12108
b61ff9c8
BS
12109 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
12110echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
a03ea89b
BM
12111if test "${am_cv_langinfo_codeset+set}" = set; then
12112 echo $ECHO_N "(cached) $ECHO_C" >&6
12113else
12114 cat >conftest.$ac_ext <<_ACEOF
12115/* confdefs.h. */
12116_ACEOF
12117cat confdefs.h >>conftest.$ac_ext
12118cat >>conftest.$ac_ext <<_ACEOF
12119/* end confdefs.h. */
12120#include <langinfo.h>
12121int
12122main ()
12123{
12124char* cs = nl_langinfo(CODESET);
12125 ;
12126 return 0;
12127}
12128_ACEOF
12129rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
12130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12131 (eval $ac_link) 2>conftest.er1
a03ea89b
BM
12132 ac_status=$?
12133 grep -v '^ *+' conftest.er1 >conftest.err
12134 rm -f conftest.er1
12135 cat conftest.err >&5
12136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12137 (exit $ac_status); } &&
12138 { ac_try='test -z "$ac_c_werror_flag"
12139 || test ! -s conftest.err'
12140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12141 (eval $ac_try) 2>&5
12142 ac_status=$?
12143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12144 (exit $ac_status); }; } &&
12145 { ac_try='test -s conftest$ac_exeext'
12146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12147 (eval $ac_try) 2>&5
12148 ac_status=$?
12149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12150 (exit $ac_status); }; }; then
a03ea89b
BM
12151 am_cv_langinfo_codeset=yes
12152else
12153 echo "$as_me: failed program was:" >&5
12154sed 's/^/| /' conftest.$ac_ext >&5
12155
b61ff9c8 12156am_cv_langinfo_codeset=no
a03ea89b 12157fi
b61ff9c8 12158rm -f conftest.err conftest.$ac_objext \
a03ea89b
BM
12159 conftest$ac_exeext conftest.$ac_ext
12160
12161fi
b61ff9c8
BS
12162echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
12163echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
a03ea89b
BM
12164 if test $am_cv_langinfo_codeset = yes; then
12165
12166cat >>confdefs.h <<\_ACEOF
12167#define HAVE_LANGINFO_CODESET 1
12168_ACEOF
12169
12170 fi
12171
12172
86cf1cbd
KG
12173# We will need to find libiberty.h and ansidecl.h
12174saved_CFLAGS="$CFLAGS"
12175CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
6a257778 12197
ad6717df
PB
12198
12199
0d667716
KG
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
367e8319 12210
0d667716
KG
12211
12212
7391b66c 12213
ed5b9f96
GK
12214
12215for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
12216 strsignal strstr strverscmp \
12217 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 12218 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 12219do
ad6717df 12220 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12221echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12222echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12223if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12224 echo $ECHO_N "(cached) $ECHO_C" >&6
12225else
12226 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12227/* confdefs.h. */
12228_ACEOF
12229cat confdefs.h >>conftest.$ac_ext
12230cat >>conftest.$ac_ext <<_ACEOF
12231/* end confdefs.h. */
7afe8c41
KG
12232#undef $ac_tr_decl
12233#define $ac_tr_decl 1
ba479fd2 12234
d02af173 12235#include "ansidecl.h"
86cf1cbd 12236#include "system.h"
f31e826b 12237
ba479fd2
NN
12238int
12239main ()
12240{
86cf1cbd
KG
12241#ifndef $ac_func
12242char *(*pfn) = (char *(*)) $ac_func ;
12243#endif
ba479fd2
NN
12244 ;
12245 return 0;
12246}
12247_ACEOF
12248rm -f conftest.$ac_objext
b61ff9c8
BS
12249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12250 (eval $ac_compile) 2>conftest.er1
ba479fd2 12251 ac_status=$?
86da66b5
HPN
12252 grep -v '^ *+' conftest.er1 >conftest.err
12253 rm -f conftest.er1
12254 cat conftest.err >&5
ba479fd2 12255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12256 (exit $ac_status); } &&
12257 { ac_try='test -z "$ac_c_werror_flag"
12258 || test ! -s conftest.err'
12259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12260 (eval $ac_try) 2>&5
12261 ac_status=$?
12262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12263 (exit $ac_status); }; } &&
12264 { ac_try='test -s conftest.$ac_objext'
12265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12266 (eval $ac_try) 2>&5
12267 ac_status=$?
12268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12269 (exit $ac_status); }; }; then
f31e826b 12270 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 12271else
ba479fd2
NN
12272 echo "$as_me: failed program was:" >&5
12273sed 's/^/| /' conftest.$ac_ext >&5
12274
b61ff9c8 12275eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 12276fi
b61ff9c8 12277rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
12278fi
12279
f31e826b 12280if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12281 echo "$as_me:$LINENO: result: yes" >&5
12282echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 12283#define $ac_tr_decl 1
ba479fd2
NN
12284_ACEOF
12285
81bf3d9e 12286else
b61ff9c8
BS
12287 echo "$as_me:$LINENO: result: no" >&5
12288echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 12289#define $ac_tr_decl 0
ba479fd2
NN
12290_ACEOF
12291
81bf3d9e
RH
12292fi
12293
12294done
ba479fd2 12295
ba479fd2 12296
ba479fd2 12297
81bf3d9e 12298
81bf3d9e
RH
12299
12300for ac_func in getrlimit setrlimit getrusage
12301do
ad6717df 12302 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12303echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12304echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12305if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12306 echo $ECHO_N "(cached) $ECHO_C" >&6
12307else
12308 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12309/* confdefs.h. */
12310_ACEOF
12311cat confdefs.h >>conftest.$ac_ext
12312cat >>conftest.$ac_ext <<_ACEOF
12313/* end confdefs.h. */
7afe8c41
KG
12314#undef $ac_tr_decl
12315#define $ac_tr_decl 1
ba479fd2 12316
d02af173 12317#include "ansidecl.h"
86cf1cbd 12318#include "system.h"
81bf3d9e
RH
12319#ifdef HAVE_SYS_RESOURCE_H
12320#include <sys/resource.h>
12321#endif
12322
f31e826b 12323
ba479fd2
NN
12324int
12325main ()
12326{
86cf1cbd
KG
12327#ifndef $ac_func
12328char *(*pfn) = (char *(*)) $ac_func ;
12329#endif
ba479fd2
NN
12330 ;
12331 return 0;
12332}
12333_ACEOF
12334rm -f conftest.$ac_objext
b61ff9c8
BS
12335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12336 (eval $ac_compile) 2>conftest.er1
ba479fd2 12337 ac_status=$?
86da66b5
HPN
12338 grep -v '^ *+' conftest.er1 >conftest.err
12339 rm -f conftest.er1
12340 cat conftest.err >&5
ba479fd2 12341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12342 (exit $ac_status); } &&
12343 { ac_try='test -z "$ac_c_werror_flag"
12344 || test ! -s conftest.err'
12345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12346 (eval $ac_try) 2>&5
12347 ac_status=$?
12348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12349 (exit $ac_status); }; } &&
12350 { ac_try='test -s conftest.$ac_objext'
12351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12352 (eval $ac_try) 2>&5
12353 ac_status=$?
12354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12355 (exit $ac_status); }; }; then
f31e826b 12356 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 12357else
ba479fd2
NN
12358 echo "$as_me: failed program was:" >&5
12359sed 's/^/| /' conftest.$ac_ext >&5
12360
b61ff9c8 12361eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 12362fi
b61ff9c8 12363rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
12364fi
12365
f31e826b 12366if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12367 echo "$as_me:$LINENO: result: yes" >&5
12368echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 12369#define $ac_tr_decl 1
ba479fd2
NN
12370_ACEOF
12371
81bf3d9e 12372else
b61ff9c8
BS
12373 echo "$as_me:$LINENO: result: no" >&5
12374echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 12375#define $ac_tr_decl 0
ba479fd2
NN
12376_ACEOF
12377
81bf3d9e
RH
12378fi
12379
12380done
86cf1cbd 12381
81bf3d9e 12382
ba479fd2 12383cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12384/* confdefs.h. */
12385_ACEOF
12386cat confdefs.h >>conftest.$ac_ext
12387cat >>conftest.$ac_ext <<_ACEOF
12388/* end confdefs.h. */
b2522d2b
HPN
12389
12390#include "ansidecl.h"
12391#include "system.h"
12392#ifdef HAVE_SYS_RESOURCE_H
12393#include <sys/resource.h>
12394#endif
12395
ba479fd2
NN
12396int
12397main ()
12398{
b2522d2b 12399rlim_t l = 0;
ba479fd2
NN
12400 ;
12401 return 0;
12402}
12403_ACEOF
12404rm -f conftest.$ac_objext
b61ff9c8
BS
12405if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12406 (eval $ac_compile) 2>conftest.er1
ba479fd2 12407 ac_status=$?
86da66b5
HPN
12408 grep -v '^ *+' conftest.er1 >conftest.err
12409 rm -f conftest.er1
12410 cat conftest.err >&5
ba479fd2 12411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12412 (exit $ac_status); } &&
12413 { ac_try='test -z "$ac_c_werror_flag"
12414 || test ! -s conftest.err'
12415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12416 (eval $ac_try) 2>&5
12417 ac_status=$?
12418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12419 (exit $ac_status); }; } &&
12420 { ac_try='test -s conftest.$ac_objext'
12421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12422 (eval $ac_try) 2>&5
12423 ac_status=$?
12424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12425 (exit $ac_status); }; }; then
b2522d2b
HPN
12426 :
12427else
ba479fd2
NN
12428 echo "$as_me: failed program was:" >&5
12429sed 's/^/| /' conftest.$ac_ext >&5
12430
12431
12432cat >>confdefs.h <<\_ACEOF
b2522d2b 12433#define rlim_t long
ba479fd2 12434_ACEOF
b2522d2b
HPN
12435
12436fi
b61ff9c8 12437rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 12438
2102b2fe
RS
12439# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
12440# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
12441# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
12442# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 12443
351df804 12444for ac_func in ldgetname
c1800ec8 12445do
ad6717df 12446 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12447echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12448echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12449if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12450 echo $ECHO_N "(cached) $ECHO_C" >&6
12451else
12452 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12453/* confdefs.h. */
12454_ACEOF
12455cat confdefs.h >>conftest.$ac_ext
12456cat >>conftest.$ac_ext <<_ACEOF
12457/* end confdefs.h. */
c1800ec8
ZW
12458#undef $ac_tr_decl
12459#define $ac_tr_decl 1
ba479fd2 12460
351df804
KG
12461#include "ansidecl.h"
12462#include "system.h"
12463#ifdef HAVE_LDFCN_H
2102b2fe
RS
12464#undef FREAD
12465#undef FWRITE
351df804
KG
12466#include <ldfcn.h>
12467#endif
12468
12469
ba479fd2
NN
12470int
12471main ()
12472{
351df804
KG
12473#ifndef $ac_func
12474char *(*pfn) = (char *(*)) $ac_func ;
12475#endif
ba479fd2
NN
12476 ;
12477 return 0;
12478}
12479_ACEOF
12480rm -f conftest.$ac_objext
b61ff9c8
BS
12481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12482 (eval $ac_compile) 2>conftest.er1
ba479fd2 12483 ac_status=$?
86da66b5
HPN
12484 grep -v '^ *+' conftest.er1 >conftest.err
12485 rm -f conftest.er1
12486 cat conftest.err >&5
ba479fd2 12487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12488 (exit $ac_status); } &&
12489 { ac_try='test -z "$ac_c_werror_flag"
12490 || test ! -s conftest.err'
12491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12492 (eval $ac_try) 2>&5
12493 ac_status=$?
12494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12495 (exit $ac_status); }; } &&
12496 { ac_try='test -s conftest.$ac_objext'
12497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12498 (eval $ac_try) 2>&5
12499 ac_status=$?
12500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12501 (exit $ac_status); }; }; then
351df804
KG
12502 eval "gcc_cv_have_decl_$ac_func=yes"
12503else
ba479fd2
NN
12504 echo "$as_me: failed program was:" >&5
12505sed 's/^/| /' conftest.$ac_ext >&5
12506
b61ff9c8 12507eval "gcc_cv_have_decl_$ac_func=no"
351df804 12508fi
b61ff9c8 12509rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
12510fi
12511
12512if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12513 echo "$as_me:$LINENO: result: yes" >&5
12514echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 12515#define $ac_tr_decl 1
ba479fd2
NN
12516_ACEOF
12517
351df804 12518else
b61ff9c8
BS
12519 echo "$as_me:$LINENO: result: no" >&5
12520echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 12521#define $ac_tr_decl 0
ba479fd2
NN
12522_ACEOF
12523
351df804
KG
12524fi
12525
12526done
ba479fd2 12527
351df804
KG
12528
12529
12530for ac_func in times
12531do
ad6717df 12532 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12533echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12534echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12535if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12536 echo $ECHO_N "(cached) $ECHO_C" >&6
12537else
12538 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12539/* confdefs.h. */
12540_ACEOF
12541cat confdefs.h >>conftest.$ac_ext
12542cat >>conftest.$ac_ext <<_ACEOF
12543/* end confdefs.h. */
351df804
KG
12544#undef $ac_tr_decl
12545#define $ac_tr_decl 1
ba479fd2 12546
c1800ec8
ZW
12547#include "ansidecl.h"
12548#include "system.h"
12549#ifdef HAVE_SYS_TIMES_H
12550#include <sys/times.h>
12551#endif
12552
12553
ba479fd2
NN
12554int
12555main ()
12556{
c1800ec8
ZW
12557#ifndef $ac_func
12558char *(*pfn) = (char *(*)) $ac_func ;
12559#endif
ba479fd2
NN
12560 ;
12561 return 0;
12562}
12563_ACEOF
12564rm -f conftest.$ac_objext
b61ff9c8
BS
12565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12566 (eval $ac_compile) 2>conftest.er1
ba479fd2 12567 ac_status=$?
86da66b5
HPN
12568 grep -v '^ *+' conftest.er1 >conftest.err
12569 rm -f conftest.er1
12570 cat conftest.err >&5
ba479fd2 12571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12572 (exit $ac_status); } &&
12573 { ac_try='test -z "$ac_c_werror_flag"
12574 || test ! -s conftest.err'
12575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12576 (eval $ac_try) 2>&5
12577 ac_status=$?
12578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12579 (exit $ac_status); }; } &&
12580 { ac_try='test -s conftest.$ac_objext'
12581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12582 (eval $ac_try) 2>&5
12583 ac_status=$?
12584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12585 (exit $ac_status); }; }; then
2f41c1d6
PB
12586 eval "gcc_cv_have_decl_$ac_func=yes"
12587else
12588 echo "$as_me: failed program was:" >&5
12589sed 's/^/| /' conftest.$ac_ext >&5
ab22c1fa 12590
b61ff9c8 12591eval "gcc_cv_have_decl_$ac_func=no"
2f41c1d6 12592fi
b61ff9c8 12593rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
12594fi
12595
12596if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12597 echo "$as_me:$LINENO: result: yes" >&5
12598echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 12599#define $ac_tr_decl 1
ba479fd2
NN
12600_ACEOF
12601
c1800ec8 12602else
b61ff9c8
BS
12603 echo "$as_me:$LINENO: result: no" >&5
12604echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 12605#define $ac_tr_decl 0
ba479fd2
NN
12606_ACEOF
12607
c1800ec8
ZW
12608fi
12609
12610done
c1800ec8
ZW
12611
12612
4f6d8cc8
GK
12613
12614for ac_func in sigaltstack
12615do
12616 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12617echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12618echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12619if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
4f6d8cc8
GK
12620 echo $ECHO_N "(cached) $ECHO_C" >&6
12621else
12622 cat >conftest.$ac_ext <<_ACEOF
12623/* confdefs.h. */
12624_ACEOF
12625cat confdefs.h >>conftest.$ac_ext
12626cat >>conftest.$ac_ext <<_ACEOF
12627/* end confdefs.h. */
12628#undef $ac_tr_decl
12629#define $ac_tr_decl 1
12630
12631#include "ansidecl.h"
12632#include "system.h"
12633#include <signal.h>
12634
12635
12636int
12637main ()
12638{
12639#ifndef $ac_func
12640char *(*pfn) = (char *(*)) $ac_func ;
12641#endif
12642 ;
12643 return 0;
12644}
12645_ACEOF
12646rm -f conftest.$ac_objext
b61ff9c8
BS
12647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12648 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
12649 ac_status=$?
12650 grep -v '^ *+' conftest.er1 >conftest.err
12651 rm -f conftest.er1
12652 cat conftest.err >&5
12653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12654 (exit $ac_status); } &&
12655 { ac_try='test -z "$ac_c_werror_flag"
12656 || test ! -s conftest.err'
12657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12658 (eval $ac_try) 2>&5
12659 ac_status=$?
12660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12661 (exit $ac_status); }; } &&
12662 { ac_try='test -s conftest.$ac_objext'
12663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12664 (eval $ac_try) 2>&5
12665 ac_status=$?
12666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12667 (exit $ac_status); }; }; then
8b1f719a
PB
12668 eval "gcc_cv_have_decl_$ac_func=yes"
12669else
12670 echo "$as_me: failed program was:" >&5
12671sed 's/^/| /' conftest.$ac_ext >&5
4f6d8cc8 12672
b61ff9c8 12673eval "gcc_cv_have_decl_$ac_func=no"
4f6d8cc8 12674fi
b61ff9c8 12675rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8
GK
12676fi
12677
12678if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12679 echo "$as_me:$LINENO: result: yes" >&5
12680echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
12681#define $ac_tr_decl 1
12682_ACEOF
12683
12684else
b61ff9c8
BS
12685 echo "$as_me:$LINENO: result: no" >&5
12686echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
12687#define $ac_tr_decl 0
12688_ACEOF
12689
12690fi
12691
12692done
12693
12694
c1800ec8 12695# More time-related stuff.
b61ff9c8
BS
12696echo "$as_me:$LINENO: checking for struct tms" >&5
12697echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
ba479fd2
NN
12698if test "${ac_cv_struct_tms+set}" = set; then
12699 echo $ECHO_N "(cached) $ECHO_C" >&6
12700else
12701
12702cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12703/* confdefs.h. */
12704_ACEOF
12705cat confdefs.h >>conftest.$ac_ext
12706cat >>conftest.$ac_ext <<_ACEOF
12707/* end confdefs.h. */
c1800ec8
ZW
12708
12709#include "ansidecl.h"
12710#include "system.h"
12711#ifdef HAVE_SYS_TIMES_H
12712#include <sys/times.h>
12713#endif
12714
ba479fd2
NN
12715int
12716main ()
12717{
c1800ec8 12718struct tms tms;
ba479fd2
NN
12719 ;
12720 return 0;
12721}
12722_ACEOF
12723rm -f conftest.$ac_objext
b61ff9c8
BS
12724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12725 (eval $ac_compile) 2>conftest.er1
ba479fd2 12726 ac_status=$?
86da66b5
HPN
12727 grep -v '^ *+' conftest.er1 >conftest.err
12728 rm -f conftest.er1
12729 cat conftest.err >&5
ba479fd2 12730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12731 (exit $ac_status); } &&
12732 { ac_try='test -z "$ac_c_werror_flag"
12733 || test ! -s conftest.err'
12734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12735 (eval $ac_try) 2>&5
12736 ac_status=$?
12737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12738 (exit $ac_status); }; } &&
12739 { ac_try='test -s conftest.$ac_objext'
12740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12741 (eval $ac_try) 2>&5
12742 ac_status=$?
12743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12744 (exit $ac_status); }; }; then
c1800ec8
ZW
12745 ac_cv_struct_tms=yes
12746else
ba479fd2
NN
12747 echo "$as_me: failed program was:" >&5
12748sed 's/^/| /' conftest.$ac_ext >&5
12749
b61ff9c8 12750ac_cv_struct_tms=no
c1800ec8 12751fi
b61ff9c8 12752rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 12753fi
b61ff9c8
BS
12754echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
12755echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 12756if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
12757
12758cat >>confdefs.h <<\_ACEOF
c1800ec8 12759#define HAVE_STRUCT_TMS 1
ba479fd2 12760_ACEOF
c1800ec8
ZW
12761
12762fi
12763
12764# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
12765# revisit after autoconf 2.50.
b61ff9c8
BS
12766echo "$as_me:$LINENO: checking for clock_t" >&5
12767echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
ba479fd2
NN
12768if test "${gcc_cv_type_clock_t+set}" = set; then
12769 echo $ECHO_N "(cached) $ECHO_C" >&6
12770else
12771
12772cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12773/* confdefs.h. */
12774_ACEOF
12775cat confdefs.h >>conftest.$ac_ext
12776cat >>conftest.$ac_ext <<_ACEOF
12777/* end confdefs.h. */
c1800ec8
ZW
12778
12779#include "ansidecl.h"
12780#include "system.h"
12781
ba479fd2
NN
12782int
12783main ()
12784{
c1800ec8 12785clock_t x;
ba479fd2
NN
12786 ;
12787 return 0;
12788}
12789_ACEOF
12790rm -f conftest.$ac_objext
b61ff9c8
BS
12791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12792 (eval $ac_compile) 2>conftest.er1
ba479fd2 12793 ac_status=$?
86da66b5
HPN
12794 grep -v '^ *+' conftest.er1 >conftest.err
12795 rm -f conftest.er1
12796 cat conftest.err >&5
ba479fd2 12797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12798 (exit $ac_status); } &&
12799 { ac_try='test -z "$ac_c_werror_flag"
12800 || test ! -s conftest.err'
12801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12802 (eval $ac_try) 2>&5
12803 ac_status=$?
12804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12805 (exit $ac_status); }; } &&
12806 { ac_try='test -s conftest.$ac_objext'
12807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12808 (eval $ac_try) 2>&5
12809 ac_status=$?
12810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12811 (exit $ac_status); }; }; then
c1800ec8
ZW
12812 gcc_cv_type_clock_t=yes
12813else
ba479fd2
NN
12814 echo "$as_me: failed program was:" >&5
12815sed 's/^/| /' conftest.$ac_ext >&5
12816
b61ff9c8 12817gcc_cv_type_clock_t=no
c1800ec8 12818fi
b61ff9c8 12819rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 12820fi
b61ff9c8
BS
12821echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
12822echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 12823if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
12824
12825cat >>confdefs.h <<\_ACEOF
c1800ec8 12826#define HAVE_CLOCK_T 1
ba479fd2 12827_ACEOF
c1800ec8
ZW
12828
12829fi
12830
eb70d86d
AS
12831# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
12832CFLAGS="$saved_CFLAGS"
12833
b61ff9c8 12834# Check whether --enable-initfini-array or --disable-initfini-array was given.
07cf4226 12835if test "${enable_initfini_array+set}" = set; then
b61ff9c8
BS
12836 enableval="$enable_initfini_array"
12837
07cf4226 12838else
ba479fd2 12839
b61ff9c8
BS
12840echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
12841echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
ba479fd2
NN
12842if test "${gcc_cv_initfini_array+set}" = set; then
12843 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 12844else
eb70d86d 12845 if test "$cross_compiling" = yes; then
918c4fe4 12846 gcc_cv_initfini_array=no
eb70d86d 12847else
ba479fd2 12848 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12849/* confdefs.h. */
12850_ACEOF
12851cat confdefs.h >>conftest.$ac_ext
12852cat >>conftest.$ac_ext <<_ACEOF
12853/* end confdefs.h. */
eb70d86d 12854
07cf4226
DM
12855static int x = -1;
12856int main (void) { return x; }
12857int foo (void) { x = 0; }
12858int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
12859_ACEOF
12860rm -f conftest$ac_exeext
b61ff9c8
BS
12861if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12862 (eval $ac_link) 2>&5
ba479fd2
NN
12863 ac_status=$?
12864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12865 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
12866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12867 (eval $ac_try) 2>&5
ba479fd2
NN
12868 ac_status=$?
12869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12870 (exit $ac_status); }; }; then
918c4fe4 12871 gcc_cv_initfini_array=yes
eb70d86d 12872else
ba479fd2
NN
12873 echo "$as_me: program exited with status $ac_status" >&5
12874echo "$as_me: failed program was:" >&5
12875sed 's/^/| /' conftest.$ac_ext >&5
12876
12877( exit $ac_status )
12878gcc_cv_initfini_array=no
eb70d86d 12879fi
b61ff9c8 12880rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 12881fi
07cf4226 12882fi
b61ff9c8
BS
12883echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
12884echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 12885 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 12886
b61ff9c8 12887fi;
63cf211a 12888if test $enable_initfini_array = yes; then
ba479fd2
NN
12889
12890cat >>confdefs.h <<\_ACEOF
eb70d86d 12891#define HAVE_INITFINI_ARRAY 1
ba479fd2 12892_ACEOF
07cf4226 12893
eb70d86d 12894fi
81bf3d9e 12895
ba479fd2 12896# mkdir takes a single argument on some systems.
b61ff9c8
BS
12897echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
12898echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
ba479fd2
NN
12899if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
12900 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 12901else
ba479fd2 12902 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12903/* confdefs.h. */
12904_ACEOF
12905cat confdefs.h >>conftest.$ac_ext
12906cat >>conftest.$ac_ext <<_ACEOF
12907/* end confdefs.h. */
75923b2f
MK
12908
12909#include <sys/types.h>
12910#ifdef HAVE_SYS_STAT_H
12911# include <sys/stat.h>
12912#endif
12913#ifdef HAVE_UNISTD_H
12914# include <unistd.h>
12915#endif
12916#ifdef HAVE_DIRECT_H
12917# include <direct.h>
12918#endif
ba479fd2
NN
12919int
12920main ()
12921{
75923b2f 12922mkdir ("foo", 0);
ba479fd2
NN
12923 ;
12924 return 0;
12925}
12926_ACEOF
12927rm -f conftest.$ac_objext
b61ff9c8
BS
12928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12929 (eval $ac_compile) 2>conftest.er1
ba479fd2 12930 ac_status=$?
86da66b5
HPN
12931 grep -v '^ *+' conftest.er1 >conftest.err
12932 rm -f conftest.er1
12933 cat conftest.err >&5
ba479fd2 12934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12935 (exit $ac_status); } &&
12936 { ac_try='test -z "$ac_c_werror_flag"
12937 || test ! -s conftest.err'
12938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12939 (eval $ac_try) 2>&5
12940 ac_status=$?
12941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12942 (exit $ac_status); }; } &&
12943 { ac_try='test -s conftest.$ac_objext'
12944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12945 (eval $ac_try) 2>&5
12946 ac_status=$?
12947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12948 (exit $ac_status); }; }; then
75923b2f
MK
12949 gcc_cv_mkdir_takes_one_arg=no
12950else
ba479fd2
NN
12951 echo "$as_me: failed program was:" >&5
12952sed 's/^/| /' conftest.$ac_ext >&5
12953
b61ff9c8 12954gcc_cv_mkdir_takes_one_arg=yes
75923b2f 12955fi
b61ff9c8 12956rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 12957fi
b61ff9c8
BS
12958echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
12959echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 12960if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
12961
12962cat >>confdefs.h <<\_ACEOF
75923b2f 12963#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 12964_ACEOF
75923b2f
MK
12965
12966fi
12967
12968
861bb6c1
JL
12969# File extensions
12970manext='.1'
12971objext='.o'
12972
12973
12974
4977bab6 12975# With Setjmp/Longjmp based exception handling.
b61ff9c8 12976# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
4977bab6 12977if test "${enable_sjlj_exceptions+set}" = set; then
b61ff9c8 12978 enableval="$enable_sjlj_exceptions"
399fe3e1
JDA
12979 case $target in
12980 *-*-hpux10*)
12981 if test $enableval != yes; then
12982 { echo "$as_me:$LINENO: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&5
12983echo "$as_me: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&2;}
12984 enableval=yes
12985 fi
12986 ;;
12987esac
12988force_sjlj_exceptions=yes
12989else
12990 case $target in
12991 *-*-hpux10*)
12992 force_sjlj_exceptions=yes
12993 enableval=yes
12994 ;;
12995 *)
12996 force_sjlj_exceptions=no
12997 ;;
12998esac
12999fi;
13000if test $force_sjlj_exceptions = yes; then
b61ff9c8 13001 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 13002
ba479fd2
NN
13003cat >>confdefs.h <<_ACEOF
13004#define CONFIG_SJLJ_EXCEPTIONS $sjlj
13005_ACEOF
4977bab6 13006
399fe3e1 13007fi
4977bab6 13008
443728bb
L
13009# For platforms with the unwind ABI which includes an unwind library,
13010# libunwind, we can choose to use the system libunwind.
4977bab6 13011
b61ff9c8 13012# Check whether --with-system-libunwind or --without-system-libunwind was given.
443728bb 13013if test "${with_system_libunwind+set}" = set; then
b61ff9c8 13014 withval="$with_system_libunwind"
4977bab6 13015
b61ff9c8 13016fi;
4977bab6 13017
e64f5acf
SE
13018# config.gcc also contains tests of with_system_libunwind.
13019if test x$with_system_libunwind = xyes; then
13020
13021cat >>confdefs.h <<\_ACEOF
13022#define HAVE_GETIPINFO 1
13023_ACEOF
13024
13025fi
13026
34a86c2b
NN
13027# --------------------------------------------------------
13028# Build, host, and target specific configuration fragments
13029# --------------------------------------------------------
13030
5b28c537
NN
13031# Collect build-machine-specific information.
13032. ${srcdir}/config.build
13033
a89ea0df
NN
13034# Collect host-machine-specific information.
13035. ${srcdir}/config.host
13036
ef69da62 13037target_gtfiles=
a89ea0df
NN
13038
13039# Collect target-machine-specific information.
8ad9fb33 13040. ${srcdir}/config.gcc
861bb6c1
JL
13041
13042extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 13043extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
13044
13045# Default the target-machine variables that were not explicitly set.
75bffa71 13046if test x"$tm_file" = x
861bb6c1
JL
13047then tm_file=$cpu_type/$cpu_type.h; fi
13048
6b2adea9 13049if test x"$extra_headers" = x
861bb6c1
JL
13050then extra_headers=; fi
13051
75bffa71 13052if test x$md_file = x
e98e406f 13053then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 13054
75bffa71 13055if test x$out_file = x
861bb6c1
JL
13056then out_file=$cpu_type/$cpu_type.c; fi
13057
75bffa71 13058if test x"$tmake_file" = x
861bb6c1
JL
13059then tmake_file=$cpu_type/t-$cpu_type
13060fi
13061
90e6a802 13062if test x"$dwarf2" = xyes
756ee602 13063then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
13064fi
13065
861bb6c1 13066# Say what files are being used for the output code and MD file.
11642c3a 13067echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
13068echo "Using \`$srcdir/config/$md_file' as machine description file."
13069
11642c3a 13070# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
13071# about them and drop them.
13072
11642c3a
ZW
13073bx=
13074for x in $build_xm_file; do
13075 if test -f $srcdir/config/$x
13076 then bx="$bx $x"
ba479fd2
NN
13077 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13078echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13079 fi
13080done
13081build_xm_file="$bx"
13082
13083hx=
13084for x in $host_xm_file; do
13085 if test -f $srcdir/config/$x
13086 then hx="$hx $x"
ba479fd2
NN
13087 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13088echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13089 fi
13090done
13091host_xm_file="$hx"
13092
13093tx=
13094for x in $xm_file; do
13095 if test -f $srcdir/config/$x
13096 then tx="$tx $x"
ba479fd2
NN
13097 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13098echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13099 fi
13100done
13101xm_file="$tx"
13102
861bb6c1
JL
13103count=a
13104for f in $tm_file; do
13105 count=${count}x
13106done
75bffa71 13107if test $count = ax; then
861bb6c1
JL
13108 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
13109else
13110 echo "Using the following target machine macro files:"
13111 for f in $tm_file; do
13112 echo " $srcdir/config/$f"
13113 done
13114fi
13115
4977bab6 13116if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
13117
13118cat >>confdefs.h <<\_ACEOF
4977bab6 13119#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 13120_ACEOF
4977bab6
ZW
13121
13122fi
13123
99fa8911
AP
13124if test x$use_long_long_for_widest_fast_int = xyes; then
13125
13126cat >>confdefs.h <<\_ACEOF
13127#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
13128_ACEOF
13129
13130fi
13131
861bb6c1
JL
13132count=a
13133for f in $host_xm_file; do
13134 count=${count}x
13135done
11642c3a
ZW
13136if test $count = a; then
13137 :
13138elif test $count = ax; then
861bb6c1
JL
13139 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
13140else
13141 echo "Using the following host machine macro files:"
13142 for f in $host_xm_file; do
13143 echo " $srcdir/config/$f"
13144 done
13145fi
476d9098 13146echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 13147
75bffa71 13148if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
13149 count=a
13150 for f in $build_xm_file; do
13151 count=${count}x
13152 done
11642c3a
ZW
13153 if test $count = a; then
13154 :
13155 elif test $count = ax; then
861bb6c1
JL
13156 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
13157 else
13158 echo "Using the following build machine macro files:"
13159 for f in $build_xm_file; do
13160 echo " $srcdir/config/$f"
13161 done
13162 fi
13163fi
13164
4f6d8cc8 13165case ${host} in
b8ec3cc8 13166 powerpc*-*-darwin*)
b61ff9c8
BS
13167 echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
13168echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6
4f6d8cc8
GK
13169if test "${gcc_cv_mcontext_underscores+set}" = set; then
13170 echo $ECHO_N "(cached) $ECHO_C" >&6
13171else
13172 cat >conftest.$ac_ext <<_ACEOF
13173
ba7da42a 13174#include <sys/cdefs.h>
de4fb767 13175#include <sys/signal.h>
4f6d8cc8
GK
13176#include <ucontext.h>
13177int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
13178
13179_ACEOF
13180rm -f conftest.$ac_objext
b61ff9c8
BS
13181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13182 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
13183 ac_status=$?
13184 grep -v '^ *+' conftest.er1 >conftest.err
13185 rm -f conftest.er1
13186 cat conftest.err >&5
13187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13188 (exit $ac_status); } &&
13189 { ac_try='test -z "$ac_c_werror_flag"
13190 || test ! -s conftest.err'
13191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13192 (eval $ac_try) 2>&5
13193 ac_status=$?
13194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13195 (exit $ac_status); }; } &&
13196 { ac_try='test -s conftest.$ac_objext'
13197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13198 (eval $ac_try) 2>&5
13199 ac_status=$?
13200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13201 (exit $ac_status); }; }; then
4f6d8cc8
GK
13202 gcc_cv_mcontext_underscores=no
13203else
13204 echo "$as_me: failed program was:" >&5
13205sed 's/^/| /' conftest.$ac_ext >&5
13206
b61ff9c8 13207gcc_cv_mcontext_underscores=yes
4f6d8cc8 13208fi
b61ff9c8 13209rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8 13210fi
b61ff9c8
BS
13211echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
13212echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6
4f6d8cc8
GK
13213 if test $gcc_cv_mcontext_underscores = yes; then
13214
13215cat >>confdefs.h <<\_ACEOF
13216#define HAS_MCONTEXT_T_UNDERSCORES
13217_ACEOF
13218
13219 fi
13220 ;;
13221esac
13222
8bb915b6
NN
13223# ---------
13224# Threading
13225# ---------
13226
c2e494a8 13227# Check if a valid thread package
615be2cf 13228case ${enable_threads} in
c2e494a8
NN
13229 "" | no)
13230 # No threads
13231 target_thread_file='single'
13232 ;;
13233 yes)
13234 # default
13235 target_thread_file='single'
13236 ;;
18167442 13237 aix | dce | gnat | irix | posix | posix95 | rtems | \
d9dced13 13238 single | solaris | vxworks | win32 | mipssde)
615be2cf 13239 target_thread_file=${enable_threads}
c2e494a8
NN
13240 ;;
13241 *)
615be2cf 13242 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
13243 exit 1
13244 ;;
13245esac
13246
13247if test x${thread_file} = x; then
13248 # No thread file set by target-specific clauses in config.gcc,
13249 # so use file chosen by default logic above
13250 thread_file=${target_thread_file}
861bb6c1
JL
13251fi
13252
8bb915b6
NN
13253# Make gthr-default.h if we have a thread file.
13254gthread_flags=
13255if test $thread_file != single; then
13256 rm -f gthr-default.h
13257 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
13258 gthread_flags=-DHAVE_GTHR_DEFAULT
13259fi
13260
13261
13262# --------
13263# UNSORTED
13264# --------
13265
18fbf599 13266use_cxa_atexit=no
2121a768
JT
13267if test x$enable___cxa_atexit = xyes || \
13268 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599 13269 if test x$host = x$target; then
97388150
DS
13270 case $host in
13271 # mingw32 doesn't have __cxa_atexit but uses atexit registration
13272 # keyed to flag_use_cxa_atexit
13273 *-*-mingw32*)
13274 use_cxa_atexit=yes
13275 ;;
13276 *)
b61ff9c8
BS
13277 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
13278echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
354b7da5
DH
13279if test "${ac_cv_func___cxa_atexit+set}" = set; then
13280 echo $ECHO_N "(cached) $ECHO_C" >&6
13281else
13282 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
13283/* confdefs.h. */
13284_ACEOF
13285cat confdefs.h >>conftest.$ac_ext
13286cat >>conftest.$ac_ext <<_ACEOF
13287/* end confdefs.h. */
86da66b5
HPN
13288/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
13289 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13290#define __cxa_atexit innocuous___cxa_atexit
13291
354b7da5
DH
13292/* System header to define __stub macros and hopefully few prototypes,
13293 which can conflict with char __cxa_atexit (); below.
13294 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13295 <limits.h> exists even on freestanding compilers. */
86da66b5 13296
354b7da5
DH
13297#ifdef __STDC__
13298# include <limits.h>
13299#else
13300# include <assert.h>
13301#endif
86da66b5
HPN
13302
13303#undef __cxa_atexit
13304
b61ff9c8 13305/* Override any gcc2 internal prototype to avoid an error. */
354b7da5
DH
13306#ifdef __cplusplus
13307extern "C"
b61ff9c8 13308{
354b7da5 13309#endif
b61ff9c8
BS
13310/* We use char because int might match the return type of a gcc2
13311 builtin and then its argument prototype would still apply. */
354b7da5
DH
13312char __cxa_atexit ();
13313/* The GNU C library defines this for functions which it implements
13314 to always fail with ENOSYS. Some functions are actually named
13315 something starting with __ and the normal name is an alias. */
b61ff9c8 13316#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
354b7da5 13317choke me
b61ff9c8
BS
13318#else
13319char (*f) () = __cxa_atexit;
13320#endif
13321#ifdef __cplusplus
13322}
354b7da5
DH
13323#endif
13324
13325int
13326main ()
13327{
b61ff9c8 13328return f != __cxa_atexit;
354b7da5
DH
13329 ;
13330 return 0;
13331}
13332_ACEOF
13333rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
13334if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13335 (eval $ac_link) 2>conftest.er1
354b7da5 13336 ac_status=$?
86da66b5
HPN
13337 grep -v '^ *+' conftest.er1 >conftest.err
13338 rm -f conftest.er1
13339 cat conftest.err >&5
354b7da5 13340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13341 (exit $ac_status); } &&
13342 { ac_try='test -z "$ac_c_werror_flag"
13343 || test ! -s conftest.err'
13344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13345 (eval $ac_try) 2>&5
13346 ac_status=$?
13347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13348 (exit $ac_status); }; } &&
13349 { ac_try='test -s conftest$ac_exeext'
13350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13351 (eval $ac_try) 2>&5
13352 ac_status=$?
13353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13354 (exit $ac_status); }; }; then
354b7da5
DH
13355 ac_cv_func___cxa_atexit=yes
13356else
13357 echo "$as_me: failed program was:" >&5
13358sed 's/^/| /' conftest.$ac_ext >&5
13359
b61ff9c8 13360ac_cv_func___cxa_atexit=no
354b7da5 13361fi
b61ff9c8 13362rm -f conftest.err conftest.$ac_objext \
86da66b5 13363 conftest$ac_exeext conftest.$ac_ext
354b7da5 13364fi
b61ff9c8
BS
13365echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
13366echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
354b7da5 13367if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
13368 use_cxa_atexit=yes
13369else
13370 echo "__cxa_atexit can't be enabled on this target"
13371fi
13372
5f60e48f 13373 ;;
97388150 13374 esac
18fbf599
PB
13375 else
13376 # We can't check for __cxa_atexit when building a cross, so assume
13377 # it is available
13378 use_cxa_atexit=yes
13379 fi
13380 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
13381
13382cat >>confdefs.h <<\_ACEOF
c7b5e395 13383#define DEFAULT_USE_CXA_ATEXIT 2
ba479fd2 13384_ACEOF
2121a768 13385
18fbf599 13386 fi
2121a768
JT
13387fi
13388
e64f5acf
SE
13389use_getipinfo=yes
13390if test x$with_system_libunwind = xyes; then
13391 if test x$host = x$target; then
b61ff9c8
BS
13392 echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5
13393echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6
e64f5acf
SE
13394if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
13395 echo $ECHO_N "(cached) $ECHO_C" >&6
13396else
13397 ac_func_search_save_LIBS=$LIBS
b61ff9c8 13398ac_cv_search__Unwind_GetIPInfo=no
e64f5acf
SE
13399cat >conftest.$ac_ext <<_ACEOF
13400/* confdefs.h. */
13401_ACEOF
13402cat confdefs.h >>conftest.$ac_ext
13403cat >>conftest.$ac_ext <<_ACEOF
13404/* end confdefs.h. */
13405
b61ff9c8 13406/* Override any gcc2 internal prototype to avoid an error. */
e64f5acf
SE
13407#ifdef __cplusplus
13408extern "C"
13409#endif
b61ff9c8
BS
13410/* We use char because int might match the return type of a gcc2
13411 builtin and then its argument prototype would still apply. */
e64f5acf
SE
13412char _Unwind_GetIPInfo ();
13413int
13414main ()
13415{
b61ff9c8 13416_Unwind_GetIPInfo ();
e64f5acf
SE
13417 ;
13418 return 0;
13419}
13420_ACEOF
b61ff9c8
BS
13421rm -f conftest.$ac_objext conftest$ac_exeext
13422if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13423 (eval $ac_link) 2>conftest.er1
e64f5acf
SE
13424 ac_status=$?
13425 grep -v '^ *+' conftest.er1 >conftest.err
13426 rm -f conftest.er1
13427 cat conftest.err >&5
13428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13429 (exit $ac_status); } &&
13430 { ac_try='test -z "$ac_c_werror_flag"
13431 || test ! -s conftest.err'
13432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13433 (eval $ac_try) 2>&5
13434 ac_status=$?
13435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13436 (exit $ac_status); }; } &&
13437 { ac_try='test -s conftest$ac_exeext'
13438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13439 (eval $ac_try) 2>&5
13440 ac_status=$?
13441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13442 (exit $ac_status); }; }; then
13443 ac_cv_search__Unwind_GetIPInfo="none required"
e64f5acf
SE
13444else
13445 echo "$as_me: failed program was:" >&5
13446sed 's/^/| /' conftest.$ac_ext >&5
13447
1a4b763e 13448fi
b61ff9c8
BS
13449rm -f conftest.err conftest.$ac_objext \
13450 conftest$ac_exeext conftest.$ac_ext
13451if test "$ac_cv_search__Unwind_GetIPInfo" = no; then
13452 for ac_lib in unwind; do
13453 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13454 cat >conftest.$ac_ext <<_ACEOF
13455/* confdefs.h. */
13456_ACEOF
13457cat confdefs.h >>conftest.$ac_ext
13458cat >>conftest.$ac_ext <<_ACEOF
13459/* end confdefs.h. */
2f41c1d6 13460
b61ff9c8
BS
13461/* Override any gcc2 internal prototype to avoid an error. */
13462#ifdef __cplusplus
13463extern "C"
13464#endif
13465/* We use char because int might match the return type of a gcc2
13466 builtin and then its argument prototype would still apply. */
13467char _Unwind_GetIPInfo ();
13468int
13469main ()
13470{
13471_Unwind_GetIPInfo ();
13472 ;
13473 return 0;
13474}
13475_ACEOF
13476rm -f conftest.$ac_objext conftest$ac_exeext
13477if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13478 (eval $ac_link) 2>conftest.er1
13479 ac_status=$?
13480 grep -v '^ *+' conftest.er1 >conftest.err
13481 rm -f conftest.er1
13482 cat conftest.err >&5
13483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13484 (exit $ac_status); } &&
13485 { ac_try='test -z "$ac_c_werror_flag"
13486 || test ! -s conftest.err'
13487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13488 (eval $ac_try) 2>&5
13489 ac_status=$?
13490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13491 (exit $ac_status); }; } &&
13492 { ac_try='test -s conftest$ac_exeext'
13493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13494 (eval $ac_try) 2>&5
13495 ac_status=$?
13496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13497 (exit $ac_status); }; }; then
13498 ac_cv_search__Unwind_GetIPInfo="-l$ac_lib"
13499break
1a4b763e 13500else
b61ff9c8
BS
13501 echo "$as_me: failed program was:" >&5
13502sed 's/^/| /' conftest.$ac_ext >&5
13503
13504fi
13505rm -f conftest.err conftest.$ac_objext \
13506 conftest$ac_exeext conftest.$ac_ext
13507 done
a6ccdbab 13508fi
a6ccdbab
EC
13509LIBS=$ac_func_search_save_LIBS
13510fi
b61ff9c8
BS
13511echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5
13512echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6
13513if test "$ac_cv_search__Unwind_GetIPInfo" != no; then
13514 test "$ac_cv_search__Unwind_GetIPInfo" = "none required" || LIBS="$ac_cv_search__Unwind_GetIPInfo $LIBS"
a6ccdbab
EC
13515
13516else
13517 use_getipinfo=no
13518fi
13519
13520 fi
13521fi
13522
13523if test x$use_getipinfo = xyes; then
13524
13525cat >>confdefs.h <<\_ACEOF
13526#define HAVE_GETIPINFO 1
e64f5acf
SE
13527_ACEOF
13528
13529else
13530 echo "The system unwind library does not support _Unwind_GetIPInfo."
13531fi
13532
a5381466 13533# Look for a file containing extra machine modes.
1c0ca89d
ZW
13534if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
13535 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
13536
13537
13538cat >>confdefs.h <<_ACEOF
e22340b0 13539#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 13540_ACEOF
a5381466
ZW
13541
13542fi
13543
75685792
RS
13544# Convert extra_options into a form suitable for Makefile use.
13545extra_opt_files=
13546for f in $extra_options; do
13547 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
13548done
13549
13550
b7cb92ad 13551# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 13552# the first file included by config.h.
4977bab6 13553# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 13554# as well. If host!=build, we are in error and need to do more
db81d74a 13555# work to find out the build config parameters.
75bffa71 13556if test x$host = x$build
db81d74a 13557then
eaf4e618 13558 build_auto=auto-host.h
b7cb92ad
JL
13559else
13560 # We create a subdir, then run autoconf in the subdir.
13561 # To prevent recursion we set host and build for the new
13562 # invocation of configure to the build for this invocation
ba479fd2 13563 # of configure.
b7cb92ad
JL
13564 tempdir=build.$$
13565 rm -rf $tempdir
13566 mkdir $tempdir
13567 cd $tempdir
13568 case ${srcdir} in
255b8a49 13569 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
13570 *) realsrcdir=../${srcdir};;
13571 esac
d920e825
L
13572 saved_CFLAGS="${CFLAGS}"
13573 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
f8c33439 13574 LDFLAGS="${LDFLAGS_FOR_BUILD}" \
d920e825 13575 ${realsrcdir}/configure \
33e70558 13576 --enable-languages=${enable_languages-all} \
534d0cc0 13577 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 13578 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
13579
13580 # We just finished tests for the build machine, so rename
13581 # the file auto-build.h in the gcc directory.
13582 mv auto-host.h ../auto-build.h
13583 cd ..
13584 rm -rf $tempdir
eaf4e618 13585 build_auto=auto-build.h
db81d74a
RH
13586fi
13587
06f0b04c 13588
eaf4e618 13589tm_file="${tm_file} defaults.h"
4977bab6
ZW
13590tm_p_file="${tm_p_file} tm-preds.h"
13591host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
13592build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 13593# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 13594# put this back in temporarily.
232b67d9 13595xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 13596
34a86c2b
NN
13597# --------
13598# UNSORTED
13599# --------
13600
cc1e60ea 13601# Compile in configure arguments.
8105825d 13602if test -f configargs.h ; then
cc1e60ea 13603 # Being re-configured.
022dae81 13604 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
13605 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
13606else
13607 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
13608fi
eeae7b41
DJ
13609
13610# Double all backslashes and backslash all quotes to turn
13611# gcc_config_arguments into a C string.
13612sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
13613$gcc_config_arguments
13614EOF
13615gcc_config_arguments_str=`cat conftest.out`
13616rm -f conftest.out
13617
cc1e60ea
JM
13618cat > configargs.h <<EOF
13619/* Generated automatically. */
eeae7b41 13620static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 13621static const char thread_model[] = "$thread_file";
7816bea0
DJ
13622
13623static const struct {
13624 const char *name, *value;
13625} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
13626EOF
13627
ab87f8c8 13628# Internationalization
18fc9bd4
RG
13629# If we haven't got the data from the intl directory,
13630# assume NLS is disabled.
13631USE_NLS=no
13632LIBINTL=
13633LIBINTL_DEP=
13634INCINTL=
13635XGETTEXT=
13636GMSGFMT=
13637POSUB=
13638
13639if test -f ../intl/config.intl; then
13640 . ../intl/config.intl
13641fi
b61ff9c8
BS
13642echo "$as_me:$LINENO: checking whether NLS is requested" >&5
13643echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
18fc9bd4 13644if test x"$USE_NLS" != xyes; then
b61ff9c8
BS
13645 echo "$as_me:$LINENO: result: no" >&5
13646echo "${ECHO_T}no" >&6
18fc9bd4 13647else
b61ff9c8
BS
13648 echo "$as_me:$LINENO: result: yes" >&5
13649echo "${ECHO_T}yes" >&6
18fc9bd4
RG
13650
13651cat >>confdefs.h <<\_ACEOF
13652#define ENABLE_NLS 1
13653_ACEOF
13654
13655
b61ff9c8
BS
13656 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
13657echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
18fc9bd4
RG
13658 # Look for .po and .gmo files in the source directory.
13659 CATALOGS=
13660 XLINGUAS=
13661 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
13662 # If there aren't any .gmo files the shell will give us the
13663 # literal string "../path/to/srcdir/po/*.gmo" which has to be
13664 # weeded out.
13665 case "$cat" in *\**)
13666 continue;;
13667 esac
13668 # The quadruple backslash is collapsed to a double backslash
13669 # by the backticks, then collapsed again by the double quotes,
13670 # leaving us with one backslash in the sed expression (right
13671 # before the dot that mustn't act as a wildcard).
13672 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
13673 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
13674 # The user is allowed to set LINGUAS to a list of languages to
13675 # install catalogs for. If it's empty that means "all of them."
13676 if test "x$LINGUAS" = x; then
13677 CATALOGS="$CATALOGS $cat"
13678 XLINGUAS="$XLINGUAS $lang"
13679 else
13680 case "$LINGUAS" in *$lang*)
13681 CATALOGS="$CATALOGS $cat"
13682 XLINGUAS="$XLINGUAS $lang"
13683 ;;
13684 esac
13685 fi
13686 done
13687 LINGUAS="$XLINGUAS"
b61ff9c8
BS
13688 echo "$as_me:$LINENO: result: $LINGUAS" >&5
13689echo "${ECHO_T}$LINGUAS" >&6
18fc9bd4
RG
13690
13691
13692 DATADIRNAME=share
13693
13694 INSTOBJEXT=.mo
13695
13696 GENCAT=gencat
13697
13698 CATOBJEXT=.gmo
13699
13700fi
861bb6c1 13701
56694dd9
ZW
13702# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
13703# -liconv on the link line twice.
13704case "$LIBINTL" in *$LIBICONV*)
13705 LIBICONV= ;;
13706esac
dc6746e7 13707
b61ff9c8 13708# Check whether --enable-secureplt or --disable-secureplt was given.
7f970b70 13709if test "${enable_secureplt+set}" = set; then
b61ff9c8 13710 enableval="$enable_secureplt"
7f970b70 13711
b61ff9c8 13712fi;
7f970b70 13713
922e3e33
UB
13714# Check whether --enable-cld or --disable-cld was given.
13715if test "${enable_cld+set}" = set; then
13716 enableval="$enable_cld"
13717
13718else
13719 enable_cld=no
13720fi;
13721
56694dd9 13722# Windows32 Registry support for specifying GCC installation paths.
b61ff9c8 13723# Check whether --enable-win32-registry or --disable-win32-registry was given.
56694dd9 13724if test "${enable_win32_registry+set}" = set; then
b61ff9c8 13725 enableval="$enable_win32_registry"
dc6746e7 13726
b61ff9c8 13727fi;
ba479fd2 13728
a1286ef5
ZW
13729case $host_os in
13730 win32 | pe | cygwin* | mingw32* | uwin*)
13731 if test "x$enable_win32_registry" != xno; then
b61ff9c8
BS
13732 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
13733echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
ba479fd2
NN
13734if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
13735 echo $ECHO_N "(cached) $ECHO_C" >&6
13736else
13737 ac_func_search_save_LIBS=$LIBS
b61ff9c8 13738ac_cv_search_RegOpenKeyExA=no
ba479fd2 13739cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
13740/* confdefs.h. */
13741_ACEOF
13742cat confdefs.h >>conftest.$ac_ext
13743cat >>conftest.$ac_ext <<_ACEOF
13744/* end confdefs.h. */
861bb6c1 13745
b61ff9c8 13746/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
13747#ifdef __cplusplus
13748extern "C"
13749#endif
b61ff9c8
BS
13750/* We use char because int might match the return type of a gcc2
13751 builtin and then its argument prototype would still apply. */
ba479fd2
NN
13752char RegOpenKeyExA ();
13753int
13754main ()
13755{
b61ff9c8 13756RegOpenKeyExA ();
ba479fd2
NN
13757 ;
13758 return 0;
13759}
13760_ACEOF
b61ff9c8
BS
13761rm -f conftest.$ac_objext conftest$ac_exeext
13762if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13763 (eval $ac_link) 2>conftest.er1
ba479fd2 13764 ac_status=$?
86da66b5
HPN
13765 grep -v '^ *+' conftest.er1 >conftest.err
13766 rm -f conftest.er1
13767 cat conftest.err >&5
ba479fd2 13768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13769 (exit $ac_status); } &&
13770 { ac_try='test -z "$ac_c_werror_flag"
13771 || test ! -s conftest.err'
13772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13773 (eval $ac_try) 2>&5
13774 ac_status=$?
13775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13776 (exit $ac_status); }; } &&
13777 { ac_try='test -s conftest$ac_exeext'
13778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13779 (eval $ac_try) 2>&5
13780 ac_status=$?
13781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13782 (exit $ac_status); }; }; then
13783 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 13784else
ba479fd2
NN
13785 echo "$as_me: failed program was:" >&5
13786sed 's/^/| /' conftest.$ac_ext >&5
13787
1a4b763e 13788fi
b61ff9c8
BS
13789rm -f conftest.err conftest.$ac_objext \
13790 conftest$ac_exeext conftest.$ac_ext
13791if test "$ac_cv_search_RegOpenKeyExA" = no; then
13792 for ac_lib in advapi32; do
13793 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13794 cat >conftest.$ac_ext <<_ACEOF
13795/* confdefs.h. */
13796_ACEOF
13797cat confdefs.h >>conftest.$ac_ext
13798cat >>conftest.$ac_ext <<_ACEOF
13799/* end confdefs.h. */
2f41c1d6 13800
b61ff9c8
BS
13801/* Override any gcc2 internal prototype to avoid an error. */
13802#ifdef __cplusplus
13803extern "C"
13804#endif
13805/* We use char because int might match the return type of a gcc2
13806 builtin and then its argument prototype would still apply. */
13807char RegOpenKeyExA ();
13808int
13809main ()
13810{
13811RegOpenKeyExA ();
13812 ;
13813 return 0;
13814}
13815_ACEOF
13816rm -f conftest.$ac_objext conftest$ac_exeext
13817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13818 (eval $ac_link) 2>conftest.er1
13819 ac_status=$?
13820 grep -v '^ *+' conftest.er1 >conftest.err
13821 rm -f conftest.er1
13822 cat conftest.err >&5
13823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13824 (exit $ac_status); } &&
13825 { ac_try='test -z "$ac_c_werror_flag"
13826 || test ! -s conftest.err'
13827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13828 (eval $ac_try) 2>&5
13829 ac_status=$?
13830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13831 (exit $ac_status); }; } &&
13832 { ac_try='test -s conftest$ac_exeext'
13833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13834 (eval $ac_try) 2>&5
13835 ac_status=$?
13836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13837 (exit $ac_status); }; }; then
13838 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
13839break
1a4b763e 13840else
b61ff9c8
BS
13841 echo "$as_me: failed program was:" >&5
13842sed 's/^/| /' conftest.$ac_ext >&5
13843
13844fi
13845rm -f conftest.err conftest.$ac_objext \
13846 conftest$ac_exeext conftest.$ac_ext
13847 done
dd7f7a6e
EC
13848fi
13849LIBS=$ac_func_search_save_LIBS
13850fi
b61ff9c8
BS
13851echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
13852echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
13853if test "$ac_cv_search_RegOpenKeyExA" != no; then
13854 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
dd7f7a6e
EC
13855
13856else
13857 enable_win32_registry=no
13858fi
13859
13860 fi
13861
13862 if test "x$enable_win32_registry" != xno; then
13863
13864cat >>confdefs.h <<\_ACEOF
13865#define ENABLE_WIN32_REGISTRY 1
13866_ACEOF
13867
13868
13869 if test "x$enable_win32_registry" != xyes \
13870 && test "x$enable_win32_registry" != x; then
13871
13872cat >>confdefs.h <<_ACEOF
13873#define WIN32_REGISTRY_KEY "$enable_win32_registry"
13874_ACEOF
13875
13876 fi
13877 fi
13878 ;;
13879esac
ab87f8c8 13880
56694dd9
ZW
13881# Get an absolute path to the GCC top-level source directory
13882holddir=`${PWDCMD-pwd}`
13883cd $srcdir
13884topdir=`${PWDCMD-pwd}`
13885cd $holddir
ab87f8c8 13886
56694dd9 13887# Conditionalize the makefile for this host machine.
2ed26f6b 13888xmake_file=
c406e779 13889for f in ${host_xmake_file}
56694dd9
ZW
13890do
13891 if test -f ${srcdir}/config/$f
13892 then
2ed26f6b 13893 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
13894 fi
13895done
093e61a6 13896
56694dd9 13897# Conditionalize the makefile for this target machine.
2ed26f6b 13898tmake_file_=
c406e779 13899for f in ${tmake_file}
56694dd9
ZW
13900do
13901 if test -f ${srcdir}/config/$f
13902 then
2ed26f6b 13903 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
13904 fi
13905done
2ed26f6b 13906tmake_file="${tmake_file_}"
71a94577 13907
5395b47b
NN
13908# This is a terrible hack which will go away some day.
13909host_cc_for_libada=${CC}
1e3fad21
NN
13910
13911
ab87f8c8
JL
13912out_object_file=`basename $out_file .c`.o
13913
75685792
RS
13914tm_file_list="options.h"
13915tm_include_list="options.h"
ab87f8c8 13916for f in $tm_file; do
64ccbc99 13917 case $f in
3ca43df7
RS
13918 ./* )
13919 f=`echo $f | sed 's/^..//'`
13920 tm_file_list="${tm_file_list} $f"
13921 tm_include_list="${tm_include_list} $f"
13922 ;;
d02af173 13923 defaults.h )
e22340b0
ZW
13924 tm_file_list="${tm_file_list} \$(srcdir)/$f"
13925 tm_include_list="${tm_include_list} $f"
13926 ;;
13927 * )
13928 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
13929 tm_include_list="${tm_include_list} config/$f"
13930 ;;
64ccbc99 13931 esac
ab87f8c8
JL
13932done
13933
11642c3a 13934tm_p_file_list=
e22340b0 13935tm_p_include_list=
11642c3a 13936for f in $tm_p_file; do
4977bab6
ZW
13937 case $f in
13938 tm-preds.h )
e22340b0
ZW
13939 tm_p_file_list="${tm_p_file_list} $f"
13940 tm_p_include_list="${tm_p_include_list} $f"
13941 ;;
13942 * )
13943 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
13944 tm_p_include_list="${tm_p_include_list} config/$f"
13945 esac
13946done
13947
13948xm_file_list=
13949xm_include_list=
13950for f in $xm_file; do
13951 case $f in
13952 ansidecl.h )
13953 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
13954 xm_include_list="${xm_include_list} $f"
13955 ;;
13956 auto-host.h )
13957 xm_file_list="${xm_file_list} $f"
13958 xm_include_list="${xm_include_list} $f"
13959 ;;
13960 * )
13961 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
13962 xm_include_list="${xm_include_list} config/$f"
13963 ;;
4977bab6 13964 esac
11642c3a
ZW
13965done
13966
ab87f8c8 13967host_xm_file_list=
e22340b0 13968host_xm_include_list=
ab87f8c8 13969for f in $host_xm_file; do
64ccbc99 13970 case $f in
d02af173 13971 ansidecl.h )
e22340b0
ZW
13972 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
13973 host_xm_include_list="${host_xm_include_list} $f"
13974 ;;
e2500fed 13975 auto-host.h )
e22340b0
ZW
13976 host_xm_file_list="${host_xm_file_list} $f"
13977 host_xm_include_list="${host_xm_include_list} $f"
13978 ;;
13979 * )
13980 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
13981 host_xm_include_list="${host_xm_include_list} config/$f"
13982 ;;
64ccbc99 13983 esac
ab87f8c8
JL
13984done
13985
13986build_xm_file_list=
13987for f in $build_xm_file; do
64ccbc99 13988 case $f in
d02af173 13989 ansidecl.h )
e22340b0
ZW
13990 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
13991 build_xm_include_list="${build_xm_include_list} $f"
13992 ;;
e2500fed 13993 auto-build.h | auto-host.h )
e22340b0
ZW
13994 build_xm_file_list="${build_xm_file_list} $f"
13995 build_xm_include_list="${build_xm_include_list} $f"
13996 ;;
13997 * )
13998 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
13999 build_xm_include_list="${build_xm_include_list} config/$f"
14000 ;;
64ccbc99 14001 esac
ab87f8c8
JL
14002done
14003
2989d30c
GK
14004# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
14005# cross-compiler which does not use the native headers and libraries.
a078a589 14006# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
14007CROSS=
14008ALL=all.internal
14009SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
14010
14011if test "x$with_build_sysroot" != x; then
14da6073 14012 build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
14013else
14014 # This value is used, even on a native system, because
14015 # CROSS_SYSTEM_HEADER_DIR is just
14016 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
14017 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
14018fi
14019
ab87f8c8
JL
14020if test x$host != x$target
14021then
2989d30c 14022 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
a078a589 14023 ALL=all.cross
160633c6 14024 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 14025 case "$host","$target" in
3a7e8b87
GK
14026 # Darwin crosses can use the host system's libraries and headers,
14027 # because of the fat library support. Of course, it must be the
14028 # same version of Darwin on both sides. Allow the user to
14029 # just say --target=foo-darwin without a version number to mean
14030 # "the version on this system".
14031 *-*-darwin*,*-*-darwin*)
14032 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
14033 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
14034 if test $hostos = $targetos -o $targetos = darwin ; then
14035 CROSS=
14036 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
14037 with_headers=yes
14038 fi
14039 ;;
14040
343f59d9
AM
14041 i?86-*-*,x86_64-*-* \
14042 | powerpc*-*-*,powerpc64*-*-*)
14043 CROSS="$CROSS -DNATIVE_CROSS" ;;
14044 esac
7a615b25 14045elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 14046 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
14047fi
14048
b39d221a
EC
14049# If this is a cross-compiler that does not
14050# have its own set of headers then define
14051# inhibit_libc
14052
dc06db20
R
14053# If this is using newlib, without having the headers available now,
14054# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
14055# This prevents libgcc2 from containing any code which requires libc
14056# support.
a929bc28 14057: ${inhibit_libc=false}
dc06db20
R
14058if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
14059 test x$with_newlib = xyes ; } &&
e50084fa 14060 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 14061 inhibit_libc=true
b39d221a
EC
14062fi
14063
14064
a078a589
ZW
14065# When building gcc with a cross-compiler, we need to adjust things so
14066# that the generator programs are still built with the native compiler.
14067# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
14068
14069# These are the normal (build=host) settings:
ba479fd2
NN
14070CC_FOR_BUILD='$(CC)'
14071BUILD_CFLAGS='$(ALL_CFLAGS)'
f8c33439 14072BUILD_LDFLAGS='$(LDFLAGS)'
ba479fd2 14073STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
14074
14075# Possibly disable fixproto, on a per-target basis.
14076case ${use_fixproto} in
14077 no)
14078 STMP_FIXPROTO=
14079 ;;
14080 yes)
14081 STMP_FIXPROTO=stmp-fixproto
14082 ;;
14083esac
14084
a078a589 14085
83599948
NS
14086# And these apply if build != host, or we are generating coverage data
14087if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 14088then
b11e4747 14089 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
f8c33439 14090 BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
a078a589 14091
7a615b25 14092 if test "x$TARGET_SYSTEM_ROOT" = x; then
d8e5117d 14093 if test "x$STMP_FIXPROTO" != x; then
de253ca4
GK
14094 STMP_FIXPROTO=stmp-install-fixproto
14095 fi
7a615b25 14096 fi
ab87f8c8
JL
14097fi
14098
14099# Expand extra_headers to include complete path.
14100# This substitutes for lots of t-* files.
14101extra_headers_list=
b1ef58c8
NN
14102# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
14103for file in ${extra_headers} ; do
14104 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
14105done
ab87f8c8 14106
1617e5ee
GK
14107# If use_gcc_tgmath is set, append ginclude/tgmath.h.
14108if test x"$use_gcc_tgmath" = xyes
14109then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h"
14110fi
14111
c38f02df
ILT
14112# Define collect2 in Makefile.
14113case $host_can_use_collect2 in
14114 no) collect2= ;;
14115 *) collect2='collect2$(exeext)' ;;
14116esac
14117
14118
ab87f8c8 14119# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
14120case $use_collect2 in
14121 no) use_collect2= ;;
14122 "") ;;
ba479fd2 14123 *)
34a86c2b
NN
14124 host_xm_defines="${host_xm_defines} USE_COLLECT2"
14125 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
14126 case $host_can_use_collect2 in
14127 no)
14128 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
14129echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
14130 { (exit 1); exit 1; }; }
14131 ;;
14132 esac
34a86c2b
NN
14133 ;;
14134esac
ab87f8c8 14135
8bb915b6
NN
14136# ---------------------------
14137# Assembler & linker features
14138# ---------------------------
14139
da0f6381
PB
14140# During stage 2, ld is actually gcc/collect-ld, which is a small script to
14141# discern between when to use prev-ld/ld-new and when to use ld/ld-new.
14142# However when ld-new is first executed from the build tree, libtool will
14143# relink it as .libs/lt-ld-new, so that it can give it an RPATH that refers
14144# to the build tree. While doing this we need to use the previous-stage
14145# linker, or we have an infinite loop. The presence of a shell script as
14146# ld/ld-new, and the fact that the script *uses ld itself*, is what confuses
14147# the gcc/collect-ld script. So we need to know how libtool works, or
14148# exec-tool will fail.
e8b05380 14149
da0f6381
PB
14150
14151
14152
14153macro_version='2.1a'
14154macro_revision='1.2435'
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167ltmain="$ac_aux_dir/ltmain.sh"
14168
14169# Set options
14170
14171enable_dlopen=no
14172
14173
14174enable_win32_dll=no
14175
14176
14177# Check whether --enable-shared or --disable-shared was given.
14178if test "${enable_shared+set}" = set; then
14179 enableval="$enable_shared"
14180 p=${PACKAGE-default}
14181 case $enableval in
14182 yes) enable_shared=yes ;;
14183 no) enable_shared=no ;;
14184 *)
14185 enable_shared=no
14186 # Look at the argument we got. We use all the common list separators.
14187 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
14188 for pkg in $enableval; do
14189 IFS="$lt_save_ifs"
14190 if test "X$pkg" = "X$p"; then
14191 enable_shared=yes
14192 fi
14193 done
14194 IFS="$lt_save_ifs"
14195 ;;
14196 esac
e8b05380 14197else
da0f6381
PB
14198 enable_shared=yes
14199fi;
e8b05380 14200
da0f6381
PB
14201
14202
14203
14204
14205
14206
14207
14208# Check whether --enable-static or --disable-static was given.
14209if test "${enable_static+set}" = set; then
14210 enableval="$enable_static"
14211 p=${PACKAGE-default}
14212 case $enableval in
14213 yes) enable_static=yes ;;
14214 no) enable_static=no ;;
14215 *)
14216 enable_static=no
14217 # Look at the argument we got. We use all the common list separators.
14218 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
14219 for pkg in $enableval; do
14220 IFS="$lt_save_ifs"
14221 if test "X$pkg" = "X$p"; then
14222 enable_static=yes
14223 fi
14224 done
14225 IFS="$lt_save_ifs"
14226 ;;
14227 esac
e8b05380 14228else
da0f6381
PB
14229 enable_static=yes
14230fi;
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240# Check whether --with-pic or --without-pic was given.
14241if test "${with_pic+set}" = set; then
14242 withval="$with_pic"
14243 pic_mode="$withval"
14244else
14245 pic_mode=default
14246fi;
14247
14248test -z "$pic_mode" && pic_mode=default
14249
14250
14251
14252
14253
14254
14255
14256# Check whether --enable-fast-install or --disable-fast-install was given.
14257if test "${enable_fast_install+set}" = set; then
14258 enableval="$enable_fast_install"
14259 p=${PACKAGE-default}
14260 case $enableval in
14261 yes) enable_fast_install=yes ;;
14262 no) enable_fast_install=no ;;
14263 *)
14264 enable_fast_install=no
14265 # Look at the argument we got. We use all the common list separators.
14266 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
14267 for pkg in $enableval; do
14268 IFS="$lt_save_ifs"
14269 if test "X$pkg" = "X$p"; then
14270 enable_fast_install=yes
14271 fi
14272 done
14273 IFS="$lt_save_ifs"
14274 ;;
14275 esac
14276else
14277 enable_fast_install=yes
14278fi;
14279
14280
14281
14282
14283
14284
14285
14286
14287echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
14288echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
14289if test "${lt_cv_path_SED+set}" = set; then
e8b05380
PB
14290 echo $ECHO_N "(cached) $ECHO_C" >&6
14291else
da0f6381
PB
14292 # Loop through the user's path and test for sed and gsed.
14293# Then use that list of sed's as ones to test for truncation.
14294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380
PB
14295for as_dir in $PATH
14296do
14297 IFS=$as_save_IFS
14298 test -z "$as_dir" && as_dir=.
da0f6381
PB
14299 for lt_ac_prog in sed gsed; do
14300 for ac_exec_ext in '' $ac_executable_extensions; do
14301 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
14302 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
14303 fi
14304 done
14305 done
e8b05380 14306done
da0f6381
PB
14307IFS=$as_save_IFS
14308lt_ac_max=0
14309lt_ac_count=0
14310# Add /usr/xpg4/bin/sed as it is typically found on Solaris
14311# along with /bin/sed that truncates output.
14312for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
14313 test ! -f $lt_ac_sed && continue
14314 cat /dev/null > conftest.in
14315 lt_ac_count=0
14316 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
14317 # Check for GNU sed and select it if it is found.
14318 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
14319 lt_cv_path_SED=$lt_ac_sed
14320 break
14321 fi
14322 while true; do
14323 cat conftest.in conftest.in >conftest.tmp
14324 mv conftest.tmp conftest.in
14325 cp conftest.in conftest.nl
14326 echo >>conftest.nl
14327 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
14328 cmp -s conftest.out conftest.nl || break
14329 # 10000 chars as input seems more than enough
14330 test $lt_ac_count -gt 10 && break
14331 lt_ac_count=`expr $lt_ac_count + 1`
14332 if test $lt_ac_count -gt $lt_ac_max; then
14333 lt_ac_max=$lt_ac_count
14334 lt_cv_path_SED=$lt_ac_sed
14335 fi
14336 done
e8b05380
PB
14337done
14338
e8b05380 14339fi
b61ff9c8 14340
da0f6381 14341SED=$lt_cv_path_SED
e8b05380 14342
da0f6381
PB
14343echo "$as_me:$LINENO: result: $SED" >&5
14344echo "${ECHO_T}$SED" >&6
e8b05380 14345
da0f6381
PB
14346test -z "$SED" && SED=sed
14347Xsed="$SED -e 1s/^X//"
e8b05380 14348
e8b05380
PB
14349
14350
ad9c4d9f 14351
da0f6381
PB
14352
14353
14354
14355
14356
14357
14358
14359echo "$as_me:$LINENO: checking for fgrep" >&5
14360echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
14361if test "${ac_cv_prog_fgrep+set}" = set; then
14362 echo $ECHO_N "(cached) $ECHO_C" >&6
e8b05380 14363else
da0f6381
PB
14364 if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1
14365 then ac_cv_prog_fgrep='grep -F'
14366 else ac_cv_prog_fgrep='fgrep'
14367 fi
981d4858 14368fi
da0f6381
PB
14369echo "$as_me:$LINENO: result: $ac_cv_prog_fgrep" >&5
14370echo "${ECHO_T}$ac_cv_prog_fgrep" >&6
14371 FGREP=$ac_cv_prog_fgrep
9e423e6d 14372
9f18db39 14373
da0f6381 14374test -z "$GREP" && GREP=grep
9f18db39 14375
da0f6381
PB
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394# Check whether --with-gnu-ld or --without-gnu-ld was given.
14395if test "${with_gnu_ld+set}" = set; then
14396 withval="$with_gnu_ld"
14397 test "$withval" = no || with_gnu_ld=yes
14398else
14399 with_gnu_ld=no
14400fi;
14401ac_prog=ld
14402if test "$GCC" = yes; then
14403 # Check if gcc -print-prog-name=ld gives a path.
14404 echo "$as_me:$LINENO: checking for ld used by $CC" >&5
14405echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
14406 case $host in
14407 *-*-mingw*)
14408 # gcc leaves a trailing carriage return which upsets mingw
14409 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
14410 *)
14411 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
14412 esac
14413 case $ac_prog in
14414 # Accept absolute paths.
14415 [\\/]* | ?:[\\/]*)
14416 re_direlt='/[^/][^/]*/\.\./'
14417 # Canonicalize the pathname of ld
14418 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
14419 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
14420 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
14421 done
14422 test -z "$LD" && LD="$ac_prog"
14423 ;;
14424 "")
14425 # If it fails, then pretend we aren't using GCC.
14426 ac_prog=ld
14427 ;;
14428 *)
14429 # If it is relative, then search for the first ld in PATH.
14430 with_gnu_ld=unknown
14431 ;;
14432 esac
14433elif test "$with_gnu_ld" = yes; then
14434 echo "$as_me:$LINENO: checking for GNU ld" >&5
14435echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
14436else
14437 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
14438echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
14439fi
14440if test "${lt_cv_path_LD+set}" = set; then
14441 echo $ECHO_N "(cached) $ECHO_C" >&6
14442else
14443 if test -z "$LD"; then
14444 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14445 for ac_dir in $PATH; do
14446 IFS="$lt_save_ifs"
14447 test -z "$ac_dir" && ac_dir=.
14448 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
14449 lt_cv_path_LD="$ac_dir/$ac_prog"
14450 # Check to see if the program is GNU ld. I'd rather use --version,
14451 # but apparently some variants of GNU ld only accept -v.
14452 # Break only if it was the GNU/non-GNU ld that we prefer.
14453 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
14454 *GNU* | *'with BFD'*)
14455 test "$with_gnu_ld" != no && break
14456 ;;
14457 *)
14458 test "$with_gnu_ld" != yes && break
14459 ;;
14460 esac
14461 fi
14462 done
14463 IFS="$lt_save_ifs"
14464else
14465 lt_cv_path_LD="$LD" # Let the user override the test with a path.
14466fi
14467fi
14468
14469LD="$lt_cv_path_LD"
14470if test -n "$LD"; then
14471 echo "$as_me:$LINENO: result: $LD" >&5
14472echo "${ECHO_T}$LD" >&6
14473else
14474 echo "$as_me:$LINENO: result: no" >&5
14475echo "${ECHO_T}no" >&6
14476fi
14477test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
14478echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
14479 { (exit 1); exit 1; }; }
14480echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
14481echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
14482if test "${lt_cv_prog_gnu_ld+set}" = set; then
14483 echo $ECHO_N "(cached) $ECHO_C" >&6
14484else
14485 # I'd rather use --version here, but apparently some GNU lds only accept -v.
14486case `$LD -v 2>&1 </dev/null` in
14487*GNU* | *'with BFD'*)
14488 lt_cv_prog_gnu_ld=yes
14489 ;;
14490*)
14491 lt_cv_prog_gnu_ld=no
14492 ;;
14493esac
14494fi
14495echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
14496echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
14497with_gnu_ld=$lt_cv_prog_gnu_ld
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
14509echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6
14510if test "${lt_cv_path_NM+set}" = set; then
14511 echo $ECHO_N "(cached) $ECHO_C" >&6
14512else
14513 if test -n "$NM"; then
14514 # Let the user override the test.
14515 lt_cv_path_NM="$NM"
14516else
14517 lt_nm_to_check="${ac_tool_prefix}nm"
14518 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
14519 lt_nm_to_check="$lt_nm_to_check nm"
14520 fi
14521 for lt_tmp_nm in $lt_nm_to_check; do
14522 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14523 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
14524 IFS="$lt_save_ifs"
14525 test -z "$ac_dir" && ac_dir=.
14526 tmp_nm="$ac_dir/$lt_tmp_nm"
14527 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
14528 # Check to see if the nm accepts a BSD-compat flag.
14529 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
14530 # nm: unknown option "B" ignored
14531 # Tru64's nm complains that /dev/null is an invalid object file
14532 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
14533 */dev/null* | *'Invalid file or object type'*)
14534 lt_cv_path_NM="$tmp_nm -B"
14535 break
14536 ;;
14537 *)
14538 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
14539 */dev/null*)
14540 lt_cv_path_NM="$tmp_nm -p"
14541 break
14542 ;;
14543 *)
14544 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
14545 continue # so that we can try to find one that supports BSD flags
14546 ;;
14547 esac
14548 ;;
14549 esac
14550 fi
14551 done
14552 IFS="$lt_save_ifs"
14553 done
14554 : ${lt_cv_path_NM=no}
14555fi
14556fi
14557echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
14558echo "${ECHO_T}$lt_cv_path_NM" >&6
14559if test "$lt_cv_path_NM" != "no"; then
14560 NM="$lt_cv_path_NM"
14561else
14562 # Didn't find any BSD compatible name lister, look for dumpbin.
14563 if test -n "$ac_tool_prefix"; then
14564 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
14565 do
14566 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14567set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14568echo "$as_me:$LINENO: checking for $ac_word" >&5
14569echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14570if test "${ac_cv_prog_DUMPBIN+set}" = set; then
14571 echo $ECHO_N "(cached) $ECHO_C" >&6
14572else
14573 if test -n "$DUMPBIN"; then
14574 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
14575else
14576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14577for as_dir in $PATH
14578do
14579 IFS=$as_save_IFS
14580 test -z "$as_dir" && as_dir=.
14581 for ac_exec_ext in '' $ac_executable_extensions; do
14582 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14583 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
14584 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14585 break 2
14586 fi
14587done
14588done
14589
14590fi
14591fi
14592DUMPBIN=$ac_cv_prog_DUMPBIN
14593if test -n "$DUMPBIN"; then
14594 echo "$as_me:$LINENO: result: $DUMPBIN" >&5
14595echo "${ECHO_T}$DUMPBIN" >&6
14596else
14597 echo "$as_me:$LINENO: result: no" >&5
14598echo "${ECHO_T}no" >&6
14599fi
14600
14601 test -n "$DUMPBIN" && break
14602 done
14603fi
14604if test -z "$DUMPBIN"; then
14605 ac_ct_DUMPBIN=$DUMPBIN
14606 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
14607do
14608 # Extract the first word of "$ac_prog", so it can be a program name with args.
14609set dummy $ac_prog; ac_word=$2
14610echo "$as_me:$LINENO: checking for $ac_word" >&5
14611echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14612if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
14613 echo $ECHO_N "(cached) $ECHO_C" >&6
14614else
14615 if test -n "$ac_ct_DUMPBIN"; then
14616 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
14617else
14618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14619for as_dir in $PATH
14620do
14621 IFS=$as_save_IFS
14622 test -z "$as_dir" && as_dir=.
14623 for ac_exec_ext in '' $ac_executable_extensions; do
14624 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14625 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
14626 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14627 break 2
14628 fi
14629done
14630done
14631
14632fi
14633fi
14634ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
14635if test -n "$ac_ct_DUMPBIN"; then
14636 echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
14637echo "${ECHO_T}$ac_ct_DUMPBIN" >&6
14638else
14639 echo "$as_me:$LINENO: result: no" >&5
14640echo "${ECHO_T}no" >&6
14641fi
14642
14643 test -n "$ac_ct_DUMPBIN" && break
14644done
14645test -n "$ac_ct_DUMPBIN" || ac_ct_DUMPBIN=":"
14646
14647 DUMPBIN=$ac_ct_DUMPBIN
14648fi
14649
14650
14651 if test "$DUMPBIN" != ":"; then
14652 NM="$DUMPBIN"
14653 fi
14654fi
14655test -z "$NM" && NM=nm
14656
14657
14658
14659
14660
14661
14662echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
14663echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6
14664if test "${lt_cv_nm_interface+set}" = set; then
14665 echo $ECHO_N "(cached) $ECHO_C" >&6
14666else
14667 lt_cv_nm_interface="BSD nm"
14668 echo "int some_variable = 0;" > conftest.$ac_ext
f8c33439 14669 (eval echo "\"\$as_me:14669: $ac_compile\"" >&5)
da0f6381
PB
14670 (eval "$ac_compile" 2>conftest.err)
14671 cat conftest.err >&5
f8c33439 14672 (eval echo "\"\$as_me:14672: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
da0f6381
PB
14673 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
14674 cat conftest.err >&5
f8c33439 14675 (eval echo "\"\$as_me:14675: output\"" >&5)
da0f6381
PB
14676 cat conftest.out >&5
14677 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
14678 lt_cv_nm_interface="MS dumpbin"
14679 fi
14680 rm -f conftest*
14681fi
14682echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
14683echo "${ECHO_T}$lt_cv_nm_interface" >&6
14684
14685echo "$as_me:$LINENO: checking whether ln -s works" >&5
14686echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
14687LN_S=$as_ln_s
14688if test "$LN_S" = "ln -s"; then
14689 echo "$as_me:$LINENO: result: yes" >&5
14690echo "${ECHO_T}yes" >&6
14691else
14692 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
14693echo "${ECHO_T}no, using $LN_S" >&6
14694fi
14695
14696# find the maximum length of command line arguments
14697echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
14698echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
14699if test "${lt_cv_sys_max_cmd_len+set}" = set; then
14700 echo $ECHO_N "(cached) $ECHO_C" >&6
14701else
14702 i=0
14703 teststring="ABCD"
14704
14705 case $build_os in
14706 msdosdjgpp*)
14707 # On DJGPP, this test can blow up pretty badly due to problems in libc
14708 # (any single argument exceeding 2000 bytes causes a buffer overrun
14709 # during glob expansion). Even if it were fixed, the result of this
14710 # check would be larger than it should be.
14711 lt_cv_sys_max_cmd_len=12288; # 12K is about right
14712 ;;
14713
14714 gnu*)
14715 # Under GNU Hurd, this test is not required because there is
14716 # no limit to the length of command line arguments.
14717 # Libtool will interpret -1 as no limit whatsoever
14718 lt_cv_sys_max_cmd_len=-1;
14719 ;;
14720
14721 cygwin* | mingw*)
14722 # On Win9x/ME, this test blows up -- it succeeds, but takes
14723 # about 5 minutes as the teststring grows exponentially.
14724 # Worse, since 9x/ME are not pre-emptively multitasking,
14725 # you end up with a "frozen" computer, even though with patience
14726 # the test eventually succeeds (with a max line length of 256k).
14727 # Instead, let's just punt: use the minimum linelength reported by
14728 # all of the supported platforms: 8192 (on NT/2K/XP).
14729 lt_cv_sys_max_cmd_len=8192;
14730 ;;
14731
14732 amigaos*)
14733 # On AmigaOS with pdksh, this test takes hours, literally.
14734 # So we just punt and use a minimum line length of 8192.
14735 lt_cv_sys_max_cmd_len=8192;
14736 ;;
14737
14738 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
14739 # This has been around since 386BSD, at least. Likely further.
14740 if test -x /sbin/sysctl; then
14741 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
14742 elif test -x /usr/sbin/sysctl; then
14743 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
14744 else
14745 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
14746 fi
14747 # And add a safety zone
14748 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
14749 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
14750 ;;
14751
14752 interix*)
14753 # We know the value 262144 and hardcode it with a safety zone (like BSD)
14754 lt_cv_sys_max_cmd_len=196608
14755 ;;
14756
14757 osf*)
14758 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
14759 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
14760 # nice to cause kernel panics so lets avoid the loop below.
14761 # First set a reasonable default.
14762 lt_cv_sys_max_cmd_len=16384
14763 #
14764 if test -x /sbin/sysconfig; then
14765 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
14766 *1*) lt_cv_sys_max_cmd_len=-1 ;;
14767 esac
14768 fi
14769 ;;
14770 sco3.2v5*)
14771 lt_cv_sys_max_cmd_len=102400
14772 ;;
14773 sysv5* | sco5v6* | sysv4.2uw2*)
14774 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
14775 if test -n "$kargmax"; then
14776 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
14777 else
14778 lt_cv_sys_max_cmd_len=32768
14779 fi
14780 ;;
14781 *)
14782 lt_cv_sys_max_cmd_len=`getconf ARG_MAX 2> /dev/null`
14783 if test -n $lt_cv_sys_max_cmd_len; then
14784 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
14785 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
14786 else
14787 # Make teststring a little bigger before we do anything with it.
14788 # a 1K string should be a reasonable start.
14789 for i in 1 2 3 4 5 6 7 8 ; do
14790 teststring=$teststring$teststring
14791 done
14792 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
14793 # If test is not a shell built-in, we'll probably end up computing a
14794 # maximum length that is only half of the actual maximum length, but
14795 # we can't tell.
14796 while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
14797 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
14798 test $i != 17 # 1/2 MB should be enough
14799 do
14800 i=`expr $i + 1`
14801 teststring=$teststring$teststring
14802 done
14803 # Only check the string length outside the loop.
14804 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
14805 teststring=
14806 # Add a significant safety factor because C++ compilers can tack on
14807 # massive amounts of additional arguments before passing them to the
14808 # linker. It appears as though 1/2 is a usable value.
14809 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
14810 fi
14811 ;;
14812 esac
14813
14814fi
14815
14816if test -n $lt_cv_sys_max_cmd_len ; then
14817 echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
14818echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
14819else
14820 echo "$as_me:$LINENO: result: none" >&5
14821echo "${ECHO_T}none" >&6
14822fi
14823max_cmd_len=$lt_cv_sys_max_cmd_len
14824
14825
14826
14827
14828
14829
14830
14831: ${CP="cp -f"}
14832: ${MV="mv -f"}
14833: ${RM="rm -f"}
14834
14835echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
14836echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6
14837# Try some XSI features
14838xsi_shell=no
14839( _lt_dummy="a/b/c"
14840 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
14841 = c,a/b,, ) >/dev/null 2>&1 \
14842 && xsi_shell=yes
14843echo "$as_me:$LINENO: result: $xsi_shell" >&5
14844echo "${ECHO_T}$xsi_shell" >&6
14845
14846
14847echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
14848echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6
14849lt_shell_append=no
14850( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
14851 >/dev/null 2>&1 \
14852 && lt_shell_append=yes
14853echo "$as_me:$LINENO: result: $lt_shell_append" >&5
14854echo "${ECHO_T}$lt_shell_append" >&6
14855
14856
14857if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
14858 lt_unset=unset
14859else
14860 lt_unset=false
14861fi
14862
14863
14864
14865
14866
14867# test EBCDIC or ASCII
14868case `echo X|tr X '\101'` in
14869 A) # ASCII based system
14870 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
14871 lt_SP2NL='tr \040 \012'
14872 lt_NL2SP='tr \015\012 \040\040'
14873 ;;
14874 *) # EBCDIC based system
14875 lt_SP2NL='tr \100 \n'
14876 lt_NL2SP='tr \r\n \100\100'
14877 ;;
14878esac
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
14889echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
14890if test "${lt_cv_ld_reload_flag+set}" = set; then
14891 echo $ECHO_N "(cached) $ECHO_C" >&6
14892else
14893 lt_cv_ld_reload_flag='-r'
14894fi
14895echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
14896echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
14897reload_flag=$lt_cv_ld_reload_flag
14898case $reload_flag in
14899"" | " "*) ;;
14900*) reload_flag=" $reload_flag" ;;
14901esac
14902reload_cmds='$LD$reload_flag -o $output$reload_objs'
14903case $host_os in
14904 darwin*)
14905 if test "$GCC" = yes; then
14906 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
14907 else
14908 reload_cmds='$LD$reload_flag -o $output$reload_objs'
14909 fi
14910 ;;
14911esac
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
14923echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6
14924if test "${lt_cv_deplibs_check_method+set}" = set; then
14925 echo $ECHO_N "(cached) $ECHO_C" >&6
14926else
14927 lt_cv_file_magic_cmd='$MAGIC_CMD'
14928lt_cv_file_magic_test_file=
14929lt_cv_deplibs_check_method='unknown'
14930# Need to set the preceding variable on all platforms that support
14931# interlibrary dependencies.
14932# 'none' -- dependencies not supported.
14933# `unknown' -- same as none, but documents that we really don't know.
14934# 'pass_all' -- all dependencies passed with no checks.
14935# 'test_compile' -- check by making test program.
14936# 'file_magic [[regex]]' -- check by looking for files in library path
14937# which responds to the $file_magic_cmd with a given extended regex.
14938# If you have `file' or equivalent on your system and you're not sure
14939# whether `pass_all' will *always* work, you probably want this one.
14940
14941case $host_os in
14942aix[4-9]*)
14943 lt_cv_deplibs_check_method=pass_all
14944 ;;
14945
14946beos*)
14947 lt_cv_deplibs_check_method=pass_all
14948 ;;
14949
14950bsdi[45]*)
14951 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
14952 lt_cv_file_magic_cmd='/usr/bin/file -L'
14953 lt_cv_file_magic_test_file=/shlib/libc.so
14954 ;;
14955
14956cygwin*)
14957 # func_win32_libid is a shell function defined in ltmain.sh
14958 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
14959 lt_cv_file_magic_cmd='func_win32_libid'
14960 ;;
14961
14962mingw* | pw32*)
14963 # Base MSYS/MinGW do not provide the 'file' command needed by
14964 # func_win32_libid shell function, so use a weaker test based on 'objdump',
14965 # unless we find 'file', for example because we are cross-compiling.
14966 if ( file / ) >/dev/null 2>&1; then
14967 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
14968 lt_cv_file_magic_cmd='func_win32_libid'
14969 else
14970 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
14971 lt_cv_file_magic_cmd='$OBJDUMP -f'
14972 fi
14973 ;;
14974
14975darwin* | rhapsody*)
14976 lt_cv_deplibs_check_method=pass_all
14977 ;;
14978
14979freebsd* | dragonfly*)
14980 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
14981 case $host_cpu in
14982 i*86 )
14983 # Not sure whether the presence of OpenBSD here was a mistake.
14984 # Let's accept both of them until this is cleared up.
14985 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
14986 lt_cv_file_magic_cmd=/usr/bin/file
14987 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
14988 ;;
14989 esac
14990 else
14991 lt_cv_deplibs_check_method=pass_all
14992 fi
14993 ;;
14994
14995gnu*)
14996 lt_cv_deplibs_check_method=pass_all
14997 ;;
14998
14999hpux10.20* | hpux11*)
15000 lt_cv_file_magic_cmd=/usr/bin/file
15001 case $host_cpu in
15002 ia64*)
15003 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
15004 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
15005 ;;
15006 hppa*64*)
15007 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]'
15008 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
15009 ;;
15010 *)
15011 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
15012 lt_cv_file_magic_test_file=/usr/lib/libc.sl
15013 ;;
15014 esac
15015 ;;
15016
15017interix[3-9]*)
15018 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
15019 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
15020 ;;
15021
15022irix5* | irix6* | nonstopux*)
15023 case $LD in
15024 *-32|*"-32 ") libmagic=32-bit;;
15025 *-n32|*"-n32 ") libmagic=N32;;
15026 *-64|*"-64 ") libmagic=64-bit;;
15027 *) libmagic=never-match;;
15028 esac
15029 lt_cv_deplibs_check_method=pass_all
15030 ;;
15031
15032# This must be Linux ELF.
15033linux* | k*bsd*-gnu)
15034 lt_cv_deplibs_check_method=pass_all
15035 ;;
15036
15037netbsd*)
15038 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
15039 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
15040 else
15041 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
15042 fi
15043 ;;
15044
15045newos6*)
15046 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
15047 lt_cv_file_magic_cmd=/usr/bin/file
15048 lt_cv_file_magic_test_file=/usr/lib/libnls.so
15049 ;;
15050
15051*nto* | *qnx*)
15052 lt_cv_deplibs_check_method=pass_all
15053 ;;
15054
15055openbsd*)
15056 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15057 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
15058 else
15059 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
15060 fi
15061 ;;
15062
15063osf3* | osf4* | osf5*)
15064 lt_cv_deplibs_check_method=pass_all
15065 ;;
15066
15067rdos*)
15068 lt_cv_deplibs_check_method=pass_all
15069 ;;
15070
15071solaris*)
15072 lt_cv_deplibs_check_method=pass_all
15073 ;;
15074
15075sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
15076 lt_cv_deplibs_check_method=pass_all
15077 ;;
15078
15079sysv4 | sysv4.3*)
15080 case $host_vendor in
15081 motorola)
15082 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]'
15083 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
15084 ;;
15085 ncr)
15086 lt_cv_deplibs_check_method=pass_all
15087 ;;
15088 sequent)
15089 lt_cv_file_magic_cmd='/bin/file'
15090 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
15091 ;;
15092 sni)
15093 lt_cv_file_magic_cmd='/bin/file'
15094 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
15095 lt_cv_file_magic_test_file=/lib/libc.so
15096 ;;
15097 siemens)
15098 lt_cv_deplibs_check_method=pass_all
15099 ;;
15100 pc)
15101 lt_cv_deplibs_check_method=pass_all
15102 ;;
15103 esac
15104 ;;
15105
15106tpf*)
15107 lt_cv_deplibs_check_method=pass_all
15108 ;;
15109esac
15110
15111fi
15112echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
15113echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
15114file_magic_cmd=$lt_cv_file_magic_cmd
15115deplibs_check_method=$lt_cv_deplibs_check_method
15116test -z "$deplibs_check_method" && deplibs_check_method=unknown
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129if test -n "$ac_tool_prefix"; then
15130 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
15131set dummy ${ac_tool_prefix}ar; ac_word=$2
15132echo "$as_me:$LINENO: checking for $ac_word" >&5
15133echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15134if test "${ac_cv_prog_AR+set}" = set; then
15135 echo $ECHO_N "(cached) $ECHO_C" >&6
15136else
15137 if test -n "$AR"; then
15138 ac_cv_prog_AR="$AR" # Let the user override the test.
15139else
15140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15141for as_dir in $PATH
15142do
15143 IFS=$as_save_IFS
15144 test -z "$as_dir" && as_dir=.
15145 for ac_exec_ext in '' $ac_executable_extensions; do
15146 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15147 ac_cv_prog_AR="${ac_tool_prefix}ar"
15148 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15149 break 2
15150 fi
15151done
15152done
15153
15154fi
15155fi
15156AR=$ac_cv_prog_AR
15157if test -n "$AR"; then
15158 echo "$as_me:$LINENO: result: $AR" >&5
15159echo "${ECHO_T}$AR" >&6
15160else
15161 echo "$as_me:$LINENO: result: no" >&5
15162echo "${ECHO_T}no" >&6
15163fi
15164
15165fi
15166if test -z "$ac_cv_prog_AR"; then
15167 ac_ct_AR=$AR
15168 # Extract the first word of "ar", so it can be a program name with args.
15169set dummy ar; ac_word=$2
15170echo "$as_me:$LINENO: checking for $ac_word" >&5
15171echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15172if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
15173 echo $ECHO_N "(cached) $ECHO_C" >&6
15174else
15175 if test -n "$ac_ct_AR"; then
15176 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
15177else
15178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15179for as_dir in $PATH
15180do
15181 IFS=$as_save_IFS
15182 test -z "$as_dir" && as_dir=.
15183 for ac_exec_ext in '' $ac_executable_extensions; do
15184 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15185 ac_cv_prog_ac_ct_AR="ar"
15186 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15187 break 2
15188 fi
15189done
15190done
15191
15192 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
15193fi
15194fi
15195ac_ct_AR=$ac_cv_prog_ac_ct_AR
15196if test -n "$ac_ct_AR"; then
15197 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
15198echo "${ECHO_T}$ac_ct_AR" >&6
15199else
15200 echo "$as_me:$LINENO: result: no" >&5
15201echo "${ECHO_T}no" >&6
15202fi
15203
15204 AR=$ac_ct_AR
15205else
15206 AR="$ac_cv_prog_AR"
15207fi
15208
15209test -z "$AR" && AR=ar
15210test -z "$AR_FLAGS" && AR_FLAGS=cru
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222if test -n "$ac_tool_prefix"; then
15223 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
15224set dummy ${ac_tool_prefix}strip; ac_word=$2
15225echo "$as_me:$LINENO: checking for $ac_word" >&5
15226echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15227if test "${ac_cv_prog_STRIP+set}" = set; then
15228 echo $ECHO_N "(cached) $ECHO_C" >&6
15229else
15230 if test -n "$STRIP"; then
15231 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
15232else
15233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15234for as_dir in $PATH
15235do
15236 IFS=$as_save_IFS
15237 test -z "$as_dir" && as_dir=.
15238 for ac_exec_ext in '' $ac_executable_extensions; do
15239 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15240 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
15241 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15242 break 2
15243 fi
15244done
15245done
15246
15247fi
15248fi
15249STRIP=$ac_cv_prog_STRIP
15250if test -n "$STRIP"; then
15251 echo "$as_me:$LINENO: result: $STRIP" >&5
15252echo "${ECHO_T}$STRIP" >&6
15253else
15254 echo "$as_me:$LINENO: result: no" >&5
15255echo "${ECHO_T}no" >&6
15256fi
15257
15258fi
15259if test -z "$ac_cv_prog_STRIP"; then
15260 ac_ct_STRIP=$STRIP
15261 # Extract the first word of "strip", so it can be a program name with args.
15262set dummy strip; ac_word=$2
15263echo "$as_me:$LINENO: checking for $ac_word" >&5
15264echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15265if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
15266 echo $ECHO_N "(cached) $ECHO_C" >&6
15267else
15268 if test -n "$ac_ct_STRIP"; then
15269 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
15270else
15271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15272for as_dir in $PATH
15273do
15274 IFS=$as_save_IFS
15275 test -z "$as_dir" && as_dir=.
15276 for ac_exec_ext in '' $ac_executable_extensions; do
15277 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15278 ac_cv_prog_ac_ct_STRIP="strip"
15279 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15280 break 2
15281 fi
15282done
15283done
15284
15285 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
15286fi
15287fi
15288ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
15289if test -n "$ac_ct_STRIP"; then
15290 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
15291echo "${ECHO_T}$ac_ct_STRIP" >&6
15292else
15293 echo "$as_me:$LINENO: result: no" >&5
15294echo "${ECHO_T}no" >&6
15295fi
15296
15297 STRIP=$ac_ct_STRIP
15298else
15299 STRIP="$ac_cv_prog_STRIP"
15300fi
15301
15302test -z "$STRIP" && STRIP=:
15303
15304
15305
15306
15307
15308
15309if test -n "$ac_tool_prefix"; then
15310 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
15311set dummy ${ac_tool_prefix}ranlib; ac_word=$2
15312echo "$as_me:$LINENO: checking for $ac_word" >&5
15313echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15314if test "${ac_cv_prog_RANLIB+set}" = set; then
15315 echo $ECHO_N "(cached) $ECHO_C" >&6
15316else
15317 if test -n "$RANLIB"; then
15318 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
15319else
15320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15321for as_dir in $PATH
15322do
15323 IFS=$as_save_IFS
15324 test -z "$as_dir" && as_dir=.
15325 for ac_exec_ext in '' $ac_executable_extensions; do
15326 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15327 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
15328 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15329 break 2
15330 fi
15331done
15332done
15333
15334fi
15335fi
15336RANLIB=$ac_cv_prog_RANLIB
15337if test -n "$RANLIB"; then
15338 echo "$as_me:$LINENO: result: $RANLIB" >&5
15339echo "${ECHO_T}$RANLIB" >&6
15340else
15341 echo "$as_me:$LINENO: result: no" >&5
15342echo "${ECHO_T}no" >&6
15343fi
15344
15345fi
15346if test -z "$ac_cv_prog_RANLIB"; then
15347 ac_ct_RANLIB=$RANLIB
15348 # Extract the first word of "ranlib", so it can be a program name with args.
15349set dummy ranlib; ac_word=$2
15350echo "$as_me:$LINENO: checking for $ac_word" >&5
15351echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15352if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
15353 echo $ECHO_N "(cached) $ECHO_C" >&6
15354else
15355 if test -n "$ac_ct_RANLIB"; then
15356 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
15357else
15358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15359for as_dir in $PATH
15360do
15361 IFS=$as_save_IFS
15362 test -z "$as_dir" && as_dir=.
15363 for ac_exec_ext in '' $ac_executable_extensions; do
15364 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15365 ac_cv_prog_ac_ct_RANLIB="ranlib"
15366 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15367 break 2
15368 fi
15369done
15370done
15371
15372 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
15373fi
15374fi
15375ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
15376if test -n "$ac_ct_RANLIB"; then
15377 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
15378echo "${ECHO_T}$ac_ct_RANLIB" >&6
15379else
15380 echo "$as_me:$LINENO: result: no" >&5
15381echo "${ECHO_T}no" >&6
15382fi
15383
15384 RANLIB=$ac_ct_RANLIB
15385else
15386 RANLIB="$ac_cv_prog_RANLIB"
15387fi
15388
15389test -z "$RANLIB" && RANLIB=:
15390
15391
15392
15393
15394
15395
15396# Determine commands to create old-style static archives.
15397old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
15398old_postinstall_cmds='chmod 644 $oldlib'
15399old_postuninstall_cmds=
15400
15401if test -n "$RANLIB"; then
15402 case $host_os in
15403 openbsd*)
15404 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
15405 ;;
15406 *)
15407 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
15408 ;;
15409 esac
15410 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
15411fi
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446# If no C compiler was specified, use CC.
15447LTCC=${LTCC-"$CC"}
15448
15449# If no C compiler flags were specified, use CFLAGS.
15450LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
15451
15452# Allow CC to be a program name with arguments.
15453compiler=$CC
15454
15455
15456# Check for command to grab the raw symbol name followed by C symbol from nm.
15457echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
15458echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
15459if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
15460 echo $ECHO_N "(cached) $ECHO_C" >&6
15461else
15462
15463# These are sane defaults that work on at least a few old systems.
15464# [They come from Ultrix. What could be older than Ultrix?!! ;)]
15465
15466# Character class describing NM global symbol codes.
15467symcode='[BCDEGRST]'
15468
15469# Regexp to match symbols that can be accessed directly from C.
15470sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
15471
15472# Define system-specific variables.
15473case $host_os in
15474aix*)
15475 symcode='[BCDT]'
15476 ;;
15477cygwin* | mingw* | pw32*)
15478 symcode='[ABCDGISTW]'
15479 ;;
15480hpux*)
15481 if test "$host_cpu" = ia64; then
15482 symcode='[ABCDEGRST]'
15483 fi
15484 ;;
15485irix* | nonstopux*)
15486 symcode='[BCDEGRST]'
15487 ;;
15488osf*)
15489 symcode='[BCDEGQRST]'
15490 ;;
15491solaris*)
15492 symcode='[BDRT]'
15493 ;;
15494sco3.2v5*)
15495 symcode='[DT]'
15496 ;;
15497sysv4.2uw2*)
15498 symcode='[DT]'
15499 ;;
15500sysv5* | sco5v6* | unixware* | OpenUNIX*)
15501 symcode='[ABDT]'
15502 ;;
15503sysv4)
15504 symcode='[DFNSTU]'
15505 ;;
15506esac
15507
15508# If we're using GNU nm, then use its standard symbol codes.
15509case `$NM -V 2>&1` in
15510*GNU* | *'with BFD'*)
15511 symcode='[ABCDGIRSTW]' ;;
15512esac
15513
15514# Transform an extracted symbol line into a proper C declaration.
15515# Some systems (esp. on ia64) link data and code symbols differently,
15516# so use this general approach.
15517lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
15518
15519# Transform an extracted symbol line into symbol name and symbol address
15520lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
15521
15522# Handle CRLF in mingw tool chain
15523opt_cr=
15524case $build_os in
15525mingw*)
15526 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
15527 ;;
15528esac
15529
15530# Try without a prefix underscore, then with it.
15531for ac_symprfx in "" "_"; do
15532
15533 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
15534 symxfrm="\\1 $ac_symprfx\\2 \\2"
15535
15536 # Write the raw and C identifiers.
15537 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
15538 # Fake it for dumpbin and say T for any non-static function
15539 # and D for any global variable.
15540 # Also find C++ and __fastcall symbols from MSVC++,
15541 # which start with @ or ?.
15542 lt_cv_sys_global_symbol_pipe="$AWK '"\
15543" {last_section=section; section=\$ 3};"\
15544" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
15545" \$ 0!~/External *\|/{next};"\
15546" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
15547" {if(hide[section]) next};"\
15548" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
15549" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
15550" s[1]~/^[@?]/{print s[1], s[1]; next};"\
15551" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
15552" ' prfx=^$ac_symprfx"
15553 else
15554 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
15555 fi
15556
15557 # Check to see that the pipe works correctly.
15558 pipe_works=no
15559
15560 rm -f conftest*
15561 cat > conftest.$ac_ext <<_LT_EOF
15562#ifdef __cplusplus
15563extern "C" {
15564#endif
15565char nm_test_var;
15566void nm_test_func(void);
15567void nm_test_func(void){}
15568#ifdef __cplusplus
15569}
15570#endif
15571int main(){nm_test_var='a';nm_test_func();return(0);}
15572_LT_EOF
15573
15574 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15575 (eval $ac_compile) 2>&5
15576 ac_status=$?
15577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15578 (exit $ac_status); }; then
15579 # Now try to grab the symbols.
15580 nlist=conftest.nm
15581 if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
15582 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
15583 ac_status=$?
15584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15585 (exit $ac_status); } && test -s "$nlist"; then
15586 # Try sorting and uniquifying the output.
15587 if sort "$nlist" | uniq > "$nlist"T; then
15588 mv -f "$nlist"T "$nlist"
15589 else
15590 rm -f "$nlist"T
15591 fi
15592
15593 # Make sure that we snagged all the symbols we need.
15594 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
15595 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
15596 cat <<_LT_EOF > conftest.$ac_ext
15597#ifdef __cplusplus
15598extern "C" {
15599#endif
15600
15601_LT_EOF
15602 # Now generate the symbol file.
15603 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
15604
15605 cat <<_LT_EOF >> conftest.$ac_ext
15606
15607/* The mapping between symbol names and symbols. */
15608const struct {
15609 const char *name;
15610 void *address;
15611}
15612lt__PROGRAM__LTX_preloaded_symbols[] =
15613{
15614 { "@PROGRAM@", (void *) 0 },
15615_LT_EOF
15616 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
15617 cat <<\_LT_EOF >> conftest.$ac_ext
15618 {0, (void *) 0}
15619};
15620
15621/* This works around a problem in FreeBSD linker */
15622#ifdef FREEBSD_WORKAROUND
15623static const void *lt_preloaded_setup() {
15624 return lt__PROGRAM__LTX_preloaded_symbols;
15625}
15626#endif
15627
15628#ifdef __cplusplus
15629}
15630#endif
15631_LT_EOF
15632 # Now try linking the two files.
15633 mv conftest.$ac_objext conftstm.$ac_objext
15634 lt_save_LIBS="$LIBS"
15635 lt_save_CFLAGS="$CFLAGS"
15636 LIBS="conftstm.$ac_objext"
15637 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
15638 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15639 (eval $ac_link) 2>&5
15640 ac_status=$?
15641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15642 (exit $ac_status); } && test -s conftest${ac_exeext}; then
15643 pipe_works=yes
15644 fi
15645 LIBS="$lt_save_LIBS"
15646 CFLAGS="$lt_save_CFLAGS"
15647 else
15648 echo "cannot find nm_test_func in $nlist" >&5
15649 fi
15650 else
15651 echo "cannot find nm_test_var in $nlist" >&5
15652 fi
15653 else
15654 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
15655 fi
15656 else
15657 echo "$progname: failed program was:" >&5
15658 cat conftest.$ac_ext >&5
15659 fi
15660 rm -f conftest* conftst*
15661
15662 # Do not use the global_symbol_pipe unless it works.
15663 if test "$pipe_works" = yes; then
15664 break
15665 else
15666 lt_cv_sys_global_symbol_pipe=
15667 fi
15668done
15669
15670fi
15671
15672if test -z "$lt_cv_sys_global_symbol_pipe"; then
15673 lt_cv_sys_global_symbol_to_cdecl=
15674fi
15675if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
15676 echo "$as_me:$LINENO: result: failed" >&5
15677echo "${ECHO_T}failed" >&6
15678else
15679 echo "$as_me:$LINENO: result: ok" >&5
15680echo "${ECHO_T}ok" >&6
15681fi
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
15700if test "${enable_libtool_lock+set}" = set; then
15701 enableval="$enable_libtool_lock"
15702
15703fi;
15704test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
15705
15706# Some flags need to be propagated to the compiler or linker for good
15707# libtool support.
15708case $host in
15709ia64-*-hpux*)
15710 # Find out which ABI we are using.
15711 echo 'int i;' > conftest.$ac_ext
15712 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15713 (eval $ac_compile) 2>&5
15714 ac_status=$?
15715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15716 (exit $ac_status); }; then
15717 case `/usr/bin/file conftest.$ac_objext` in
15718 *ELF-32*)
15719 HPUX_IA64_MODE="32"
15720 ;;
15721 *ELF-64*)
15722 HPUX_IA64_MODE="64"
15723 ;;
15724 esac
15725 fi
15726 rm -rf conftest*
15727 ;;
15728*-*-irix6*)
15729 # Find out which ABI we are using.
f8c33439 15730 echo '#line 15730 "configure"' > conftest.$ac_ext
da0f6381
PB
15731 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15732 (eval $ac_compile) 2>&5
15733 ac_status=$?
15734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15735 (exit $ac_status); }; then
15736 if test "$lt_cv_prog_gnu_ld" = yes; then
15737 case `/usr/bin/file conftest.$ac_objext` in
15738 *32-bit*)
15739 LD="${LD-ld} -melf32bsmip"
15740 ;;
15741 *N32*)
15742 LD="${LD-ld} -melf32bmipn32"
15743 ;;
15744 *64-bit*)
15745 LD="${LD-ld} -melf64bmip"
15746 ;;
15747 esac
15748 else
15749 case `/usr/bin/file conftest.$ac_objext` in
15750 *32-bit*)
15751 LD="${LD-ld} -32"
15752 ;;
15753 *N32*)
15754 LD="${LD-ld} -n32"
15755 ;;
15756 *64-bit*)
15757 LD="${LD-ld} -64"
15758 ;;
15759 esac
15760 fi
15761 fi
15762 rm -rf conftest*
15763 ;;
15764
15765x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
15766s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
15767 # Find out which ABI we are using.
15768 echo 'int i;' > conftest.$ac_ext
15769 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15770 (eval $ac_compile) 2>&5
15771 ac_status=$?
15772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15773 (exit $ac_status); }; then
15774 case `/usr/bin/file conftest.o` in
15775 *32-bit*)
15776 case $host in
15777 x86_64-*kfreebsd*-gnu)
15778 LD="${LD-ld} -m elf_i386_fbsd"
15779 ;;
15780 x86_64-*linux*)
15781 LD="${LD-ld} -m elf_i386"
15782 ;;
15783 ppc64-*linux*|powerpc64-*linux*)
15784 LD="${LD-ld} -m elf32ppclinux"
15785 ;;
15786 s390x-*linux*)
15787 LD="${LD-ld} -m elf_s390"
15788 ;;
15789 sparc64-*linux*)
15790 LD="${LD-ld} -m elf32_sparc"
15791 ;;
15792 esac
15793 ;;
15794 *64-bit*)
15795 case $host in
15796 x86_64-*kfreebsd*-gnu)
15797 LD="${LD-ld} -m elf_x86_64_fbsd"
15798 ;;
15799 x86_64-*linux*)
15800 LD="${LD-ld} -m elf_x86_64"
15801 ;;
15802 ppc*-*linux*|powerpc*-*linux*)
15803 LD="${LD-ld} -m elf64ppc"
15804 ;;
15805 s390*-*linux*|s390*-*tpf*)
15806 LD="${LD-ld} -m elf64_s390"
15807 ;;
15808 sparc*-*linux*)
15809 LD="${LD-ld} -m elf64_sparc"
15810 ;;
15811 esac
15812 ;;
15813 esac
15814 fi
15815 rm -rf conftest*
15816 ;;
15817
15818*-*-sco3.2v5*)
15819 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
15820 SAVE_CFLAGS="$CFLAGS"
15821 CFLAGS="$CFLAGS -belf"
15822 echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
15823echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
15824if test "${lt_cv_cc_needs_belf+set}" = set; then
15825 echo $ECHO_N "(cached) $ECHO_C" >&6
15826else
15827 ac_ext=c
15828ac_cpp='$CPP $CPPFLAGS'
15829ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15830ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15831ac_compiler_gnu=$ac_cv_c_compiler_gnu
15832
15833 cat >conftest.$ac_ext <<_ACEOF
15834/* confdefs.h. */
15835_ACEOF
15836cat confdefs.h >>conftest.$ac_ext
15837cat >>conftest.$ac_ext <<_ACEOF
15838/* end confdefs.h. */
15839
15840int
15841main ()
15842{
15843
15844 ;
15845 return 0;
15846}
15847_ACEOF
15848rm -f conftest.$ac_objext conftest$ac_exeext
15849if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15850 (eval $ac_link) 2>conftest.er1
15851 ac_status=$?
15852 grep -v '^ *+' conftest.er1 >conftest.err
15853 rm -f conftest.er1
15854 cat conftest.err >&5
15855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15856 (exit $ac_status); } &&
15857 { ac_try='test -z "$ac_c_werror_flag"
15858 || test ! -s conftest.err'
15859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15860 (eval $ac_try) 2>&5
15861 ac_status=$?
15862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15863 (exit $ac_status); }; } &&
15864 { ac_try='test -s conftest$ac_exeext'
15865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15866 (eval $ac_try) 2>&5
15867 ac_status=$?
15868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15869 (exit $ac_status); }; }; then
15870 lt_cv_cc_needs_belf=yes
15871else
15872 echo "$as_me: failed program was:" >&5
15873sed 's/^/| /' conftest.$ac_ext >&5
15874
15875lt_cv_cc_needs_belf=no
15876fi
15877rm -f conftest.err conftest.$ac_objext \
15878 conftest$ac_exeext conftest.$ac_ext
15879 ac_ext=c
15880ac_cpp='$CPP $CPPFLAGS'
15881ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15882ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15883ac_compiler_gnu=$ac_cv_c_compiler_gnu
15884
15885fi
15886echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
15887echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
15888 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
15889 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
15890 CFLAGS="$SAVE_CFLAGS"
15891 fi
15892 ;;
15893sparc*-*solaris*)
15894 # Find out which ABI we are using.
15895 echo 'int i;' > conftest.$ac_ext
15896 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15897 (eval $ac_compile) 2>&5
15898 ac_status=$?
15899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15900 (exit $ac_status); }; then
15901 case `/usr/bin/file conftest.o` in
15902 *64-bit*)
15903 case $lt_cv_prog_gnu_ld in
15904 yes*) LD="${LD-ld} -m elf64_sparc" ;;
15905 *) LD="${LD-ld} -64" ;;
15906 esac
15907 ;;
15908 esac
15909 fi
15910 rm -rf conftest*
15911 ;;
15912esac
15913
15914need_locks="$enable_libtool_lock"
15915
15916
15917for ac_header in dlfcn.h
15918do
15919as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15920echo "$as_me:$LINENO: checking for $ac_header" >&5
15921echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15922if eval "test \"\${$as_ac_Header+set}\" = set"; then
15923 echo $ECHO_N "(cached) $ECHO_C" >&6
15924else
15925 cat >conftest.$ac_ext <<_ACEOF
15926/* confdefs.h. */
15927_ACEOF
15928cat confdefs.h >>conftest.$ac_ext
15929cat >>conftest.$ac_ext <<_ACEOF
15930/* end confdefs.h. */
15931#include <$ac_header>
15932_ACEOF
15933if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15934 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15935 ac_status=$?
15936 grep -v '^ *+' conftest.er1 >conftest.err
15937 rm -f conftest.er1
15938 cat conftest.err >&5
15939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15940 (exit $ac_status); } >/dev/null; then
15941 if test -s conftest.err; then
15942 ac_cpp_err=$ac_c_preproc_warn_flag
15943 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15944 else
15945 ac_cpp_err=
15946 fi
15947else
15948 ac_cpp_err=yes
15949fi
15950if test -z "$ac_cpp_err"; then
15951 eval "$as_ac_Header=yes"
15952else
15953 echo "$as_me: failed program was:" >&5
15954sed 's/^/| /' conftest.$ac_ext >&5
15955
15956 eval "$as_ac_Header=no"
15957fi
15958rm -f conftest.err conftest.$ac_ext
15959fi
15960echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15961echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15962if test `eval echo '${'$as_ac_Header'}'` = yes; then
15963 cat >>confdefs.h <<_ACEOF
15964#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15965_ACEOF
15966
15967fi
15968done
15969
15970
15971
15972# This can be used to rebuild libtool when needed
15973LIBTOOL_DEPS="$ltmain"
15974
15975# Always use our own libtool.
15976LIBTOOL='$(SHELL) $(top_builddir)/libtool'
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002test -z "$LN_S" && LN_S="ln -s"
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017if test -n "${ZSH_VERSION+set}" ; then
16018 setopt NO_GLOB_SUBST
16019fi
16020
16021echo "$as_me:$LINENO: checking for objdir" >&5
16022echo $ECHO_N "checking for objdir... $ECHO_C" >&6
16023if test "${lt_cv_objdir+set}" = set; then
16024 echo $ECHO_N "(cached) $ECHO_C" >&6
16025else
16026 rm -f .libs 2>/dev/null
16027mkdir .libs 2>/dev/null
16028if test -d .libs; then
16029 lt_cv_objdir=.libs
16030else
16031 # MS-DOS does not allow filenames that begin with a dot.
16032 lt_cv_objdir=_libs
16033fi
16034rmdir .libs 2>/dev/null
16035fi
16036echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
16037echo "${ECHO_T}$lt_cv_objdir" >&6
16038objdir=$lt_cv_objdir
16039
16040
16041
16042
16043
16044cat >>confdefs.h <<_ACEOF
16045#define LT_OBJDIR "$lt_cv_objdir/"
16046_ACEOF
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064case $host_os in
16065aix3*)
16066 # AIX sometimes has problems with the GCC collect2 program. For some
16067 # reason, if we set the COLLECT_NAMES environment variable, the problems
16068 # vanish in a puff of smoke.
16069 if test "X${COLLECT_NAMES+set}" != Xset; then
16070 COLLECT_NAMES=
16071 export COLLECT_NAMES
16072 fi
16073 ;;
16074esac
16075
16076# Sed substitution that helps us do robust quoting. It backslashifies
16077# metacharacters that are still active within double-quoted strings.
16078sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
16079
16080# Same as above, but do not quote variable references.
16081double_quote_subst='s/\(["`\\]\)/\\\1/g'
16082
16083# Sed substitution to delay expansion of an escaped shell variable in a
16084# double_quote_subst'ed string.
16085delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
16086
16087# Sed substitution to delay expansion of an escaped single quote.
16088delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
16089
16090# Sed substitution to avoid accidental globbing in evaled expressions
16091no_glob_subst='s/\*/\\\*/g'
16092
16093# Global variables:
16094ofile=libtool
16095can_build_shared=yes
16096
16097# All known linkers require a `.a' archive for static linking (except MSVC,
16098# which needs '.lib').
16099libext=a
16100
16101with_gnu_ld="$lt_cv_prog_gnu_ld"
16102
16103old_CC="$CC"
16104old_CFLAGS="$CFLAGS"
16105
16106# Set sane defaults for various variables
16107test -z "$CC" && CC=cc
16108test -z "$LTCC" && LTCC=$CC
16109test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
16110test -z "$LD" && LD=ld
16111test -z "$ac_objext" && ac_objext=o
16112
16113for cc_temp in $compiler""; do
16114 case $cc_temp in
16115 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
16116 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
16117 \-*) ;;
16118 *) break;;
16119 esac
16120done
16121cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
16122
16123
16124# Only perform the check for file, if the check method requires it
16125test -z "$MAGIC_CMD" && MAGIC_CMD=file
16126case $deplibs_check_method in
16127file_magic*)
16128 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
16129 echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
16130echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
16131if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
16132 echo $ECHO_N "(cached) $ECHO_C" >&6
16133else
16134 case $MAGIC_CMD in
16135[\\/*] | ?:[\\/]*)
16136 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
16137 ;;
16138*)
16139 lt_save_MAGIC_CMD="$MAGIC_CMD"
16140 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16141 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
16142 for ac_dir in $ac_dummy; do
16143 IFS="$lt_save_ifs"
16144 test -z "$ac_dir" && ac_dir=.
16145 if test -f $ac_dir/${ac_tool_prefix}file; then
16146 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
16147 if test -n "$file_magic_test_file"; then
16148 case $deplibs_check_method in
16149 "file_magic "*)
16150 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
16151 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16152 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
16153 $EGREP "$file_magic_regex" > /dev/null; then
16154 :
16155 else
16156 cat <<_LT_EOF 1>&2
16157
16158*** Warning: the command libtool uses to detect shared libraries,
16159*** $file_magic_cmd, produces output that libtool cannot recognize.
16160*** The result is that libtool may fail to recognize shared libraries
16161*** as such. This will affect the creation of libtool libraries that
16162*** depend on shared libraries, but programs linked with such libtool
16163*** libraries will work regardless of this problem. Nevertheless, you
16164*** may want to report the problem to your system manager and/or to
16165*** bug-libtool@gnu.org
16166
16167_LT_EOF
16168 fi ;;
16169 esac
16170 fi
16171 break
16172 fi
16173 done
16174 IFS="$lt_save_ifs"
16175 MAGIC_CMD="$lt_save_MAGIC_CMD"
16176 ;;
16177esac
16178fi
16179
16180MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16181if test -n "$MAGIC_CMD"; then
16182 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
16183echo "${ECHO_T}$MAGIC_CMD" >&6
16184else
16185 echo "$as_me:$LINENO: result: no" >&5
16186echo "${ECHO_T}no" >&6
16187fi
16188
16189
16190
16191
16192
16193if test -z "$lt_cv_path_MAGIC_CMD"; then
16194 if test -n "$ac_tool_prefix"; then
16195 echo "$as_me:$LINENO: checking for file" >&5
16196echo $ECHO_N "checking for file... $ECHO_C" >&6
16197if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
16198 echo $ECHO_N "(cached) $ECHO_C" >&6
16199else
16200 case $MAGIC_CMD in
16201[\\/*] | ?:[\\/]*)
16202 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
16203 ;;
16204*)
16205 lt_save_MAGIC_CMD="$MAGIC_CMD"
16206 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16207 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
16208 for ac_dir in $ac_dummy; do
16209 IFS="$lt_save_ifs"
16210 test -z "$ac_dir" && ac_dir=.
16211 if test -f $ac_dir/file; then
16212 lt_cv_path_MAGIC_CMD="$ac_dir/file"
16213 if test -n "$file_magic_test_file"; then
16214 case $deplibs_check_method in
16215 "file_magic "*)
16216 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
16217 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16218 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
16219 $EGREP "$file_magic_regex" > /dev/null; then
16220 :
16221 else
16222 cat <<_LT_EOF 1>&2
16223
16224*** Warning: the command libtool uses to detect shared libraries,
16225*** $file_magic_cmd, produces output that libtool cannot recognize.
16226*** The result is that libtool may fail to recognize shared libraries
16227*** as such. This will affect the creation of libtool libraries that
16228*** depend on shared libraries, but programs linked with such libtool
16229*** libraries will work regardless of this problem. Nevertheless, you
16230*** may want to report the problem to your system manager and/or to
16231*** bug-libtool@gnu.org
16232
16233_LT_EOF
16234 fi ;;
16235 esac
16236 fi
16237 break
16238 fi
16239 done
16240 IFS="$lt_save_ifs"
16241 MAGIC_CMD="$lt_save_MAGIC_CMD"
16242 ;;
16243esac
16244fi
16245
16246MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16247if test -n "$MAGIC_CMD"; then
16248 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
16249echo "${ECHO_T}$MAGIC_CMD" >&6
16250else
16251 echo "$as_me:$LINENO: result: no" >&5
16252echo "${ECHO_T}no" >&6
16253fi
16254
16255
16256 else
16257 MAGIC_CMD=:
16258 fi
16259fi
16260
16261 fi
16262 ;;
16263esac
16264
16265# Use C for the default configuration in the libtool script
16266
16267lt_save_CC="$CC"
16268ac_ext=c
16269ac_cpp='$CPP $CPPFLAGS'
16270ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16271ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16272ac_compiler_gnu=$ac_cv_c_compiler_gnu
16273
16274
16275# Source file extension for C test sources.
16276ac_ext=c
16277
16278# Object file extension for compiled C test sources.
16279objext=o
16280objext=$objext
16281
16282# Code to be used in simple compile tests
16283lt_simple_compile_test_code="int some_variable = 0;"
16284
16285# Code to be used in simple link tests
16286lt_simple_link_test_code='int main(){return(0);}'
16287
16288
16289
16290
16291
16292
16293
16294# If no C compiler was specified, use CC.
16295LTCC=${LTCC-"$CC"}
16296
16297# If no C compiler flags were specified, use CFLAGS.
16298LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
16299
16300# Allow CC to be a program name with arguments.
16301compiler=$CC
16302
16303# Save the default compiler, since it gets overwritten when the other
16304# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
16305compiler_DEFAULT=$CC
16306
16307# save warnings/boilerplate of simple test code
16308ac_outfile=conftest.$ac_objext
16309echo "$lt_simple_compile_test_code" >conftest.$ac_ext
16310eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
16311_lt_compiler_boilerplate=`cat conftest.err`
16312$RM conftest*
16313
16314ac_outfile=conftest.$ac_objext
16315echo "$lt_simple_link_test_code" >conftest.$ac_ext
16316eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
16317_lt_linker_boilerplate=`cat conftest.err`
16318$RM conftest*
16319
16320
16321## CAVEAT EMPTOR:
16322## There is no encapsulation within the following macros, do not change
16323## the running order or otherwise move them around unless you know exactly
16324## what you are doing...
16325if test -n "$compiler"; then
16326
16327lt_prog_compiler_no_builtin_flag=
16328
16329if test "$GCC" = yes; then
16330 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
16331
16332 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
16333echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
16334if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
16335 echo $ECHO_N "(cached) $ECHO_C" >&6
16336else
16337 lt_cv_prog_compiler_rtti_exceptions=no
16338 ac_outfile=conftest.$ac_objext
16339 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16340 lt_compiler_flag="-fno-rtti -fno-exceptions"
16341 # Insert the option either (1) after the last *FLAGS variable, or
16342 # (2) before a word containing "conftest.", or (3) at the end.
16343 # Note that $ac_compile itself does not contain backslashes and begins
16344 # with a dollar sign (not a hyphen), so the echo should work correctly.
16345 # The option is referenced via a variable to avoid confusing sed.
16346 lt_compile=`echo "$ac_compile" | $SED \
16347 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16348 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16349 -e 's:$: $lt_compiler_flag:'`
f8c33439 16350 (eval echo "\"\$as_me:16350: $lt_compile\"" >&5)
da0f6381
PB
16351 (eval "$lt_compile" 2>conftest.err)
16352 ac_status=$?
16353 cat conftest.err >&5
f8c33439 16354 echo "$as_me:16354: \$? = $ac_status" >&5
da0f6381
PB
16355 if (exit $ac_status) && test -s "$ac_outfile"; then
16356 # The compiler can only warn and ignore the option if not recognized
16357 # So say no if there are warnings other than the usual output.
16358 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
16359 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16360 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16361 lt_cv_prog_compiler_rtti_exceptions=yes
16362 fi
16363 fi
16364 $RM conftest*
16365
16366fi
16367echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
16368echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
16369
16370if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
16371 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
16372else
16373 :
16374fi
16375
16376fi
16377
16378
16379
16380
16381
16382
16383 lt_prog_compiler_wl=
16384lt_prog_compiler_pic=
16385lt_prog_compiler_static=
16386
16387echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
16388echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
16389
16390 if test "$GCC" = yes; then
16391 lt_prog_compiler_wl='-Wl,'
16392 lt_prog_compiler_static='-static'
16393
16394 case $host_os in
16395 aix*)
16396 # All AIX code is PIC.
16397 if test "$host_cpu" = ia64; then
16398 # AIX 5 now supports IA64 processor
16399 lt_prog_compiler_static='-Bstatic'
16400 fi
16401 ;;
16402
16403 amigaos*)
16404 if test "$host_cpu" = m68k; then
16405 # FIXME: we need at least 68020 code to build shared libraries, but
16406 # adding the `-m68020' flag to GCC prevents building anything better,
16407 # like `-m68040'.
16408 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
16409 fi
16410 ;;
16411
16412 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
16413 # PIC is the default for these OSes.
16414 ;;
16415
16416 mingw* | cygwin* | pw32* | os2*)
16417 # This hack is so that the source file can tell whether it is being
16418 # built for inclusion in a dll (and should export symbols for example).
16419 # Although the cygwin gcc ignores -fPIC, still need this for old-style
16420 # (--disable-auto-import) libraries
16421 lt_prog_compiler_pic='-DDLL_EXPORT'
16422 ;;
16423
16424 darwin* | rhapsody*)
16425 # PIC is the default on this platform
16426 # Common symbols not allowed in MH_DYLIB files
16427 lt_prog_compiler_pic='-fno-common'
16428 ;;
16429
16430 hpux*)
16431 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16432 # not for PA HP-UX.
16433 case $host_cpu in
16434 hppa*64*|ia64*)
16435 # +Z the default
16436 ;;
16437 *)
16438 lt_prog_compiler_pic='-fPIC'
16439 ;;
16440 esac
16441 ;;
16442
16443 interix[3-9]*)
16444 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
16445 # Instead, we relocate shared libraries at runtime.
16446 ;;
16447
16448 msdosdjgpp*)
16449 # Just because we use GCC doesn't mean we suddenly get shared libraries
16450 # on systems that don't support them.
16451 lt_prog_compiler_can_build_shared=no
16452 enable_shared=no
16453 ;;
16454
16455 *nto* | *qnx*)
16456 # QNX uses GNU C++, but need to define -shared option too, otherwise
16457 # it will coredump.
16458 lt_prog_compiler_pic='-fPIC -shared'
16459 ;;
16460
16461 sysv4*MP*)
16462 if test -d /usr/nec; then
16463 lt_prog_compiler_pic=-Kconform_pic
16464 fi
16465 ;;
16466
16467 *)
16468 lt_prog_compiler_pic='-fPIC'
16469 ;;
16470 esac
16471 else
16472 # PORTME Check for flag to pass linker flags through the system compiler.
16473 case $host_os in
16474 aix*)
16475 lt_prog_compiler_wl='-Wl,'
16476 if test "$host_cpu" = ia64; then
16477 # AIX 5 now supports IA64 processor
16478 lt_prog_compiler_static='-Bstatic'
16479 else
16480 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
16481 fi
16482 ;;
16483 darwin*)
16484 # PIC is the default on this platform
16485 # Common symbols not allowed in MH_DYLIB files
16486 case $cc_basename in
16487 xlc*)
16488 lt_prog_compiler_pic='-qnocommon'
16489 lt_prog_compiler_wl='-Wl,'
16490 ;;
16491 esac
16492 ;;
16493
16494 mingw* | cygwin* | pw32* | os2*)
16495 # This hack is so that the source file can tell whether it is being
16496 # built for inclusion in a dll (and should export symbols for example).
16497 lt_prog_compiler_pic='-DDLL_EXPORT'
16498 ;;
16499
16500 hpux9* | hpux10* | hpux11*)
16501 lt_prog_compiler_wl='-Wl,'
16502 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16503 # not for PA HP-UX.
16504 case $host_cpu in
16505 hppa*64*|ia64*)
16506 # +Z the default
16507 ;;
16508 *)
16509 lt_prog_compiler_pic='+Z'
16510 ;;
16511 esac
16512 # Is there a better lt_prog_compiler_static that works with the bundled CC?
16513 lt_prog_compiler_static='${wl}-a ${wl}archive'
16514 ;;
16515
16516 irix5* | irix6* | nonstopux*)
16517 lt_prog_compiler_wl='-Wl,'
16518 # PIC (with -KPIC) is the default.
16519 lt_prog_compiler_static='-non_shared'
16520 ;;
16521
16522 linux* | k*bsd*-gnu)
16523 case $cc_basename in
16524 icc* | ecc*)
16525 lt_prog_compiler_wl='-Wl,'
16526 lt_prog_compiler_pic='-KPIC'
16527 lt_prog_compiler_static='-static'
16528 ;;
16529 pgcc* | pgf77* | pgf90* | pgf95*)
16530 # Portland Group compilers (*not* the Pentium gcc compiler,
16531 # which looks to be a dead project)
16532 lt_prog_compiler_wl='-Wl,'
16533 lt_prog_compiler_pic='-fpic'
16534 lt_prog_compiler_static='-Bstatic'
16535 ;;
16536 ccc*)
16537 lt_prog_compiler_wl='-Wl,'
16538 # All Alpha code is PIC.
16539 lt_prog_compiler_static='-non_shared'
16540 ;;
16541 *)
16542 case `$CC -V 2>&1 | sed 5q` in
16543 *Sun\ C*)
16544 # Sun C 5.9
16545 lt_prog_compiler_pic='-KPIC'
16546 lt_prog_compiler_static='-Bstatic'
16547 lt_prog_compiler_wl='-Wl,'
16548 ;;
16549 *Sun\ F*)
16550 # Sun Fortran 8.3 passes all unrecognized flags to the linker
16551 lt_prog_compiler_pic='-KPIC'
16552 lt_prog_compiler_static='-Bstatic'
16553 lt_prog_compiler_wl=''
16554 ;;
16555 esac
16556 ;;
16557 esac
16558 ;;
16559
16560 newsos6)
16561 lt_prog_compiler_pic='-KPIC'
16562 lt_prog_compiler_static='-Bstatic'
16563 ;;
16564
16565 *nto* | *qnx*)
16566 # QNX uses GNU C++, but need to define -shared option too, otherwise
16567 # it will coredump.
16568 lt_prog_compiler_pic='-fPIC -shared'
16569 ;;
16570
16571 osf3* | osf4* | osf5*)
16572 lt_prog_compiler_wl='-Wl,'
16573 # All OSF/1 code is PIC.
16574 lt_prog_compiler_static='-non_shared'
16575 ;;
16576
16577 rdos*)
16578 lt_prog_compiler_static='-non_shared'
16579 ;;
16580
16581 solaris*)
16582 lt_prog_compiler_pic='-KPIC'
16583 lt_prog_compiler_static='-Bstatic'
16584 case $cc_basename in
16585 f77* | f90* | f95*)
16586 lt_prog_compiler_wl='-Qoption ld ';;
16587 *)
16588 lt_prog_compiler_wl='-Wl,';;
16589 esac
16590 ;;
16591
16592 sunos4*)
16593 lt_prog_compiler_wl='-Qoption ld '
16594 lt_prog_compiler_pic='-PIC'
16595 lt_prog_compiler_static='-Bstatic'
16596 ;;
16597
16598 sysv4 | sysv4.2uw2* | sysv4.3*)
16599 lt_prog_compiler_wl='-Wl,'
16600 lt_prog_compiler_pic='-KPIC'
16601 lt_prog_compiler_static='-Bstatic'
16602 ;;
16603
16604 sysv4*MP*)
16605 if test -d /usr/nec ;then
16606 lt_prog_compiler_pic='-Kconform_pic'
16607 lt_prog_compiler_static='-Bstatic'
16608 fi
16609 ;;
16610
16611 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
16612 lt_prog_compiler_wl='-Wl,'
16613 lt_prog_compiler_pic='-KPIC'
16614 lt_prog_compiler_static='-Bstatic'
16615 ;;
16616
16617 unicos*)
16618 lt_prog_compiler_wl='-Wl,'
16619 lt_prog_compiler_can_build_shared=no
16620 ;;
16621
16622 uts4*)
16623 lt_prog_compiler_pic='-pic'
16624 lt_prog_compiler_static='-Bstatic'
16625 ;;
16626
16627 *)
16628 lt_prog_compiler_can_build_shared=no
16629 ;;
16630 esac
16631 fi
16632
16633case $host_os in
16634 # For platforms which do not support PIC, -DPIC is meaningless:
16635 *djgpp*)
16636 lt_prog_compiler_pic=
16637 ;;
16638 *)
16639 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
16640 ;;
16641esac
16642echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
16643echo "${ECHO_T}$lt_prog_compiler_pic" >&6
16644
16645
16646
16647
16648
16649
16650#
16651# Check to make sure the PIC flag actually works.
16652#
16653if test -n "$lt_prog_compiler_pic"; then
16654 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
16655echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
16656if test "${lt_prog_compiler_pic_works+set}" = set; then
16657 echo $ECHO_N "(cached) $ECHO_C" >&6
16658else
16659 lt_prog_compiler_pic_works=no
16660 ac_outfile=conftest.$ac_objext
16661 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16662 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
16663 # Insert the option either (1) after the last *FLAGS variable, or
16664 # (2) before a word containing "conftest.", or (3) at the end.
16665 # Note that $ac_compile itself does not contain backslashes and begins
16666 # with a dollar sign (not a hyphen), so the echo should work correctly.
16667 # The option is referenced via a variable to avoid confusing sed.
16668 lt_compile=`echo "$ac_compile" | $SED \
16669 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16670 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16671 -e 's:$: $lt_compiler_flag:'`
f8c33439 16672 (eval echo "\"\$as_me:16672: $lt_compile\"" >&5)
da0f6381
PB
16673 (eval "$lt_compile" 2>conftest.err)
16674 ac_status=$?
16675 cat conftest.err >&5
f8c33439 16676 echo "$as_me:16676: \$? = $ac_status" >&5
da0f6381
PB
16677 if (exit $ac_status) && test -s "$ac_outfile"; then
16678 # The compiler can only warn and ignore the option if not recognized
16679 # So say no if there are warnings other than the usual output.
16680 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
16681 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16682 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16683 lt_prog_compiler_pic_works=yes
16684 fi
16685 fi
16686 $RM conftest*
16687
16688fi
16689echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
16690echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
16691
16692if test x"$lt_prog_compiler_pic_works" = xyes; then
16693 case $lt_prog_compiler_pic in
16694 "" | " "*) ;;
16695 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
16696 esac
16697else
16698 lt_prog_compiler_pic=
16699 lt_prog_compiler_can_build_shared=no
16700fi
16701
16702fi
16703
16704
16705
16706
16707
16708
16709#
16710# Check to make sure the static flag actually works.
16711#
16712wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
16713echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
16714echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
16715if test "${lt_prog_compiler_static_works+set}" = set; then
16716 echo $ECHO_N "(cached) $ECHO_C" >&6
16717else
16718 lt_prog_compiler_static_works=no
16719 save_LDFLAGS="$LDFLAGS"
16720 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
16721 echo "$lt_simple_link_test_code" > conftest.$ac_ext
16722 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
16723 # The linker can only warn and ignore the option if not recognized
16724 # So say no if there are warnings
16725 if test -s conftest.err; then
16726 # Append any errors to the config.log.
16727 cat conftest.err 1>&5
16728 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
16729 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16730 if diff conftest.exp conftest.er2 >/dev/null; then
16731 lt_prog_compiler_static_works=yes
16732 fi
16733 else
16734 lt_prog_compiler_static_works=yes
16735 fi
16736 fi
16737 $RM conftest*
16738 LDFLAGS="$save_LDFLAGS"
16739
16740fi
16741echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
16742echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
16743
16744if test x"$lt_prog_compiler_static_works" = xyes; then
16745 :
16746else
16747 lt_prog_compiler_static=
16748fi
16749
16750
16751
16752
16753
16754
16755
16756 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
16757echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
16758if test "${lt_cv_prog_compiler_c_o+set}" = set; then
16759 echo $ECHO_N "(cached) $ECHO_C" >&6
16760else
16761 lt_cv_prog_compiler_c_o=no
16762 $RM -r conftest 2>/dev/null
16763 mkdir conftest
16764 cd conftest
16765 mkdir out
16766 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16767
16768 lt_compiler_flag="-o out/conftest2.$ac_objext"
16769 # Insert the option either (1) after the last *FLAGS variable, or
16770 # (2) before a word containing "conftest.", or (3) at the end.
16771 # Note that $ac_compile itself does not contain backslashes and begins
16772 # with a dollar sign (not a hyphen), so the echo should work correctly.
16773 lt_compile=`echo "$ac_compile" | $SED \
16774 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16775 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16776 -e 's:$: $lt_compiler_flag:'`
f8c33439 16777 (eval echo "\"\$as_me:16777: $lt_compile\"" >&5)
da0f6381
PB
16778 (eval "$lt_compile" 2>out/conftest.err)
16779 ac_status=$?
16780 cat out/conftest.err >&5
f8c33439 16781 echo "$as_me:16781: \$? = $ac_status" >&5
da0f6381
PB
16782 if (exit $ac_status) && test -s out/conftest2.$ac_objext
16783 then
16784 # The compiler can only warn and ignore the option if not recognized
16785 # So say no if there are warnings
16786 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
16787 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
16788 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
16789 lt_cv_prog_compiler_c_o=yes
16790 fi
16791 fi
16792 chmod u+w . 2>&5
16793 $RM conftest*
16794 # SGI C++ compiler will create directory out/ii_files/ for
16795 # template instantiation
16796 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
16797 $RM out/* && rmdir out
16798 cd ..
16799 $RM -r conftest
16800 $RM conftest*
16801
16802fi
16803echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
16804echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
16805
16806
16807
16808
16809
16810
16811 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
16812echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
16813if test "${lt_cv_prog_compiler_c_o+set}" = set; then
16814 echo $ECHO_N "(cached) $ECHO_C" >&6
16815else
16816 lt_cv_prog_compiler_c_o=no
16817 $RM -r conftest 2>/dev/null
16818 mkdir conftest
16819 cd conftest
16820 mkdir out
16821 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16822
16823 lt_compiler_flag="-o out/conftest2.$ac_objext"
16824 # Insert the option either (1) after the last *FLAGS variable, or
16825 # (2) before a word containing "conftest.", or (3) at the end.
16826 # Note that $ac_compile itself does not contain backslashes and begins
16827 # with a dollar sign (not a hyphen), so the echo should work correctly.
16828 lt_compile=`echo "$ac_compile" | $SED \
16829 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16830 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16831 -e 's:$: $lt_compiler_flag:'`
f8c33439 16832 (eval echo "\"\$as_me:16832: $lt_compile\"" >&5)
da0f6381
PB
16833 (eval "$lt_compile" 2>out/conftest.err)
16834 ac_status=$?
16835 cat out/conftest.err >&5
f8c33439 16836 echo "$as_me:16836: \$? = $ac_status" >&5
da0f6381
PB
16837 if (exit $ac_status) && test -s out/conftest2.$ac_objext
16838 then
16839 # The compiler can only warn and ignore the option if not recognized
16840 # So say no if there are warnings
16841 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
16842 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
16843 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
16844 lt_cv_prog_compiler_c_o=yes
16845 fi
16846 fi
16847 chmod u+w . 2>&5
16848 $RM conftest*
16849 # SGI C++ compiler will create directory out/ii_files/ for
16850 # template instantiation
16851 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
16852 $RM out/* && rmdir out
16853 cd ..
16854 $RM -r conftest
16855 $RM conftest*
16856
16857fi
16858echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
16859echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
16860
16861
16862
16863
16864hard_links="nottested"
16865if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
16866 # do not overwrite the value of need_locks provided by the user
16867 echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
16868echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
16869 hard_links=yes
16870 $RM conftest*
16871 ln conftest.a conftest.b 2>/dev/null && hard_links=no
16872 touch conftest.a
16873 ln conftest.a conftest.b 2>&5 || hard_links=no
16874 ln conftest.a conftest.b 2>/dev/null && hard_links=no
16875 echo "$as_me:$LINENO: result: $hard_links" >&5
16876echo "${ECHO_T}$hard_links" >&6
16877 if test "$hard_links" = no; then
16878 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
16879echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
16880 need_locks=warn
16881 fi
16882else
16883 need_locks=no
16884fi
16885
16886
16887
16888
16889
16890
16891 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
16892echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
16893
16894 runpath_var=
16895 allow_undefined_flag=
16896 always_export_symbols=no
16897 archive_cmds=
16898 archive_expsym_cmds=
16899 compiler_needs_object=no
16900 enable_shared_with_static_runtimes=no
16901 export_dynamic_flag_spec=
16902 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
16903 hardcode_automatic=no
16904 hardcode_direct=no
16905 hardcode_direct_absolute=no
16906 hardcode_libdir_flag_spec=
16907 hardcode_libdir_flag_spec_ld=
16908 hardcode_libdir_separator=
16909 hardcode_minus_L=no
16910 hardcode_shlibpath_var=unsupported
16911 inherit_rpath=no
16912 link_all_deplibs=unknown
16913 module_cmds=
16914 module_expsym_cmds=
16915 old_archive_from_new_cmds=
16916 old_archive_from_expsyms_cmds=
16917 thread_safe_flag_spec=
16918 whole_archive_flag_spec=
16919 # include_expsyms should be a list of space-separated symbols to be *always*
16920 # included in the symbol list
16921 include_expsyms=
16922 # exclude_expsyms can be an extended regexp of symbols to exclude
16923 # it will be wrapped by ` (' and `)$', so one must not match beginning or
16924 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
16925 # as well as any symbol that contains `d'.
16926 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
16927 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
16928 # platforms (ab)use it in PIC code, but their linkers get confused if
16929 # the symbol is explicitly referenced. Since portable code cannot
16930 # rely on this symbol name, it's probably fine to never include it in
16931 # preloaded symbol tables.
16932 extract_expsyms_cmds=
16933
16934 case $host_os in
16935 cygwin* | mingw* | pw32*)
16936 # FIXME: the MSVC++ port hasn't been tested in a loooong time
16937 # When not using gcc, we currently assume that we are using
16938 # Microsoft Visual C++.
16939 if test "$GCC" != yes; then
16940 with_gnu_ld=no
16941 fi
16942 ;;
16943 interix*)
16944 # we just hope/assume this is gcc and not c89 (= MSVC++)
16945 with_gnu_ld=yes
16946 ;;
16947 openbsd*)
16948 with_gnu_ld=no
16949 ;;
16950 esac
16951
16952 ld_shlibs=yes
16953 if test "$with_gnu_ld" = yes; then
16954 # If archive_cmds runs LD, not CC, wlarc should be empty
16955 wlarc='${wl}'
16956
16957 # Set some defaults for GNU ld with shared library support. These
16958 # are reset later if shared libraries are not supported. Putting them
16959 # here allows them to be overridden if necessary.
16960 runpath_var=LD_RUN_PATH
16961 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
16962 export_dynamic_flag_spec='${wl}--export-dynamic'
16963 # ancient GNU ld didn't support --whole-archive et. al.
16964 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
16965 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
16966 else
16967 whole_archive_flag_spec=
16968 fi
16969 supports_anon_versioning=no
16970 case `$LD -v 2>&1` in
16971 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
16972 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
16973 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
16974 *\ 2.11.*) ;; # other 2.11 versions
16975 *) supports_anon_versioning=yes ;;
16976 esac
16977
16978 # See if GNU ld supports shared libraries.
16979 case $host_os in
16980 aix[3-9]*)
16981 # On AIX/PPC, the GNU linker is very broken
16982 if test "$host_cpu" != ia64; then
16983 ld_shlibs=no
16984 cat <<_LT_EOF 1>&2
16985
16986*** Warning: the GNU linker, at least up to release 2.9.1, is reported
16987*** to be unable to reliably create shared libraries on AIX.
16988*** Therefore, libtool is disabling shared libraries support. If you
16989*** really care for shared libraries, you may want to modify your PATH
16990*** so that a non-GNU linker is found, and then restart.
16991
16992_LT_EOF
16993 fi
16994 ;;
16995
16996 amigaos*)
16997 if test "$host_cpu" = m68k; then
16998 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)'
16999 hardcode_libdir_flag_spec='-L$libdir'
17000 hardcode_minus_L=yes
17001 fi
17002
17003 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
17004 # that the semantics of dynamic libraries on AmigaOS, at least up
17005 # to version 4, is to share data among multiple programs linked
17006 # with the same dynamic library. Since this doesn't match the
17007 # behavior of shared libraries on other platforms, we can't use
17008 # them.
17009 ld_shlibs=no
17010 ;;
17011
17012 beos*)
17013 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17014 allow_undefined_flag=unsupported
17015 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
17016 # support --undefined. This deserves some investigation. FIXME
17017 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17018 else
17019 ld_shlibs=no
17020 fi
17021 ;;
17022
17023 cygwin* | mingw* | pw32*)
17024 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
17025 # as there is no search path for DLLs.
17026 hardcode_libdir_flag_spec='-L$libdir'
17027 allow_undefined_flag=unsupported
17028 always_export_symbols=no
17029 enable_shared_with_static_runtimes=yes
17030 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
17031
17032 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
17033 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17034 # If the export-symbols file already is a .def file (1st line
17035 # is EXPORTS), use it as is; otherwise, prepend...
17036 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
17037 cp $export_symbols $output_objdir/$soname.def;
17038 else
17039 echo EXPORTS > $output_objdir/$soname.def;
17040 cat $export_symbols >> $output_objdir/$soname.def;
17041 fi~
17042 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17043 else
17044 ld_shlibs=no
17045 fi
17046 ;;
17047
17048 interix[3-9]*)
17049 hardcode_direct=no
17050 hardcode_shlibpath_var=no
17051 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
17052 export_dynamic_flag_spec='${wl}-E'
17053 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
17054 # Instead, shared libraries are loaded at an image base (0x10000000 by
17055 # default) and relocated if they conflict, which is a slow very memory
17056 # consuming and fragmenting process. To avoid this, we pick a random,
17057 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
17058 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
17059 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
17060 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'
17061 ;;
17062
17063 gnu* | linux* | tpf* | k*bsd*-gnu)
17064 tmp_diet=no
17065 if test "$host_os" = linux-dietlibc; then
17066 case $cc_basename in
17067 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
17068 esac
17069 fi
17070 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
17071 && test "$tmp_diet" = no
17072 then
17073 tmp_addflag=
17074 case $cc_basename,$host_cpu in
17075 pgcc*) # Portland Group C compiler
17076 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'
17077 tmp_addflag=' $pic_flag'
17078 ;;
17079 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
17080 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'
17081 tmp_addflag=' $pic_flag -Mnomain' ;;
17082 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
17083 tmp_addflag=' -i_dynamic' ;;
17084 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
17085 tmp_addflag=' -i_dynamic -nofor_main' ;;
17086 ifc* | ifort*) # Intel Fortran compiler
17087 tmp_addflag=' -nofor_main' ;;
17088 esac
17089 case `$CC -V 2>&1 | sed 5q` in
17090 *Sun\ C*) # Sun C 5.9
17091 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'
17092 compiler_needs_object=yes
17093 tmp_sharedflag='-G' ;;
17094 *Sun\ F*) # Sun Fortran 8.3
17095 tmp_sharedflag='-G' ;;
17096 *)
17097 tmp_sharedflag='-shared' ;;
17098 esac
17099 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17100
17101 if test "x$supports_anon_versioning" = xyes; then
17102 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
17103 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
17104 echo "local: *; };" >> $output_objdir/$libname.ver~
17105 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
17106 fi
17107 else
17108 ld_shlibs=no
17109 fi
17110 ;;
17111
17112 netbsd*)
17113 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
17114 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
17115 wlarc=
17116 else
17117 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17118 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17119 fi
17120 ;;
17121
17122 solaris*)
17123 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
17124 ld_shlibs=no
17125 cat <<_LT_EOF 1>&2
17126
17127*** Warning: The releases 2.8.* of the GNU linker cannot reliably
17128*** create shared libraries on Solaris systems. Therefore, libtool
17129*** is disabling shared libraries support. We urge you to upgrade GNU
17130*** binutils to release 2.9.1 or newer. Another option is to modify
17131*** your PATH or compiler configuration so that the native linker is
17132*** used, and then restart.
17133
17134_LT_EOF
17135 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17136 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17137 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17138 else
17139 ld_shlibs=no
17140 fi
17141 ;;
17142
17143 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
17144 case `$LD -v 2>&1` in
17145 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
17146 ld_shlibs=no
17147 cat <<_LT_EOF 1>&2
17148
17149*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
17150*** reliably create shared libraries on SCO systems. Therefore, libtool
17151*** is disabling shared libraries support. We urge you to upgrade GNU
17152*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
17153*** your PATH or compiler configuration so that the native linker is
17154*** used, and then restart.
17155
17156_LT_EOF
17157 ;;
17158 *)
17159 # For security reasons, it is highly recommended that you always
17160 # use absolute paths for naming shared libraries, and exclude the
17161 # DT_RUNPATH tag from executables and libraries. But doing so
17162 # requires that you compile everything twice, which is a pain.
17163 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17164 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17165 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17166 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17167 else
17168 ld_shlibs=no
17169 fi
17170 ;;
17171 esac
17172 ;;
17173
17174 sunos4*)
17175 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17176 wlarc=
17177 hardcode_direct=yes
17178 hardcode_shlibpath_var=no
17179 ;;
17180
17181 *)
17182 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17183 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17184 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17185 else
17186 ld_shlibs=no
17187 fi
17188 ;;
17189 esac
17190
17191 if test "$ld_shlibs" = no; then
17192 runpath_var=
17193 hardcode_libdir_flag_spec=
17194 export_dynamic_flag_spec=
17195 whole_archive_flag_spec=
17196 fi
17197 else
17198 # PORTME fill in a description of your system's linker (not GNU ld)
17199 case $host_os in
17200 aix3*)
17201 allow_undefined_flag=unsupported
17202 always_export_symbols=yes
17203 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'
17204 # Note: this linker hardcodes the directories in LIBPATH if there
17205 # are no directories specified by -L.
17206 hardcode_minus_L=yes
17207 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
17208 # Neither direct hardcoding nor static linking is supported with a
17209 # broken collect2.
17210 hardcode_direct=unsupported
17211 fi
17212 ;;
17213
17214 aix[4-9]*)
17215 if test "$host_cpu" = ia64; then
17216 # On IA64, the linker does run time linking by default, so we don't
17217 # have to do anything special.
17218 aix_use_runtimelinking=no
17219 exp_sym_flag='-Bexport'
17220 no_entry_flag=""
17221 else
17222 # If we're using GNU nm, then we don't want the "-C" option.
17223 # -C means demangle to AIX nm, but means don't demangle with GNU nm
17224 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
17225 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'
17226 else
17227 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'
17228 fi
17229 aix_use_runtimelinking=no
17230
17231 # Test if we are trying to use run time linking or normal
17232 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
17233 # need to do runtime linking.
17234 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
17235 for ld_flag in $LDFLAGS; do
17236 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
17237 aix_use_runtimelinking=yes
17238 break
17239 fi
17240 done
17241 ;;
17242 esac
17243
17244 exp_sym_flag='-bexport'
17245 no_entry_flag='-bnoentry'
17246 fi
17247
17248 # When large executables or shared objects are built, AIX ld can
17249 # have problems creating the table of contents. If linking a library
17250 # or program results in "error TOC overflow" add -mminimal-toc to
17251 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
17252 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
17253
17254 archive_cmds=''
17255 hardcode_direct=yes
17256 hardcode_direct_absolute=yes
17257 hardcode_libdir_separator=':'
17258 link_all_deplibs=yes
17259 file_list_spec='${wl}-f,'
17260
17261 if test "$GCC" = yes; then
17262 case $host_os in aix4.[012]|aix4.[012].*)
17263 # We only want to do this on AIX 4.2 and lower, the check
17264 # below for broken collect2 doesn't work under 4.3+
17265 collect2name=`${CC} -print-prog-name=collect2`
17266 if test -f "$collect2name" &&
17267 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
17268 then
17269 # We have reworked collect2
17270 :
17271 else
17272 # We have old collect2
17273 hardcode_direct=unsupported
17274 # It fails to find uninstalled libraries when the uninstalled
17275 # path is not listed in the libpath. Setting hardcode_minus_L
17276 # to unsupported forces relinking
17277 hardcode_minus_L=yes
17278 hardcode_libdir_flag_spec='-L$libdir'
17279 hardcode_libdir_separator=
17280 fi
17281 ;;
17282 esac
17283 shared_flag='-shared'
17284 if test "$aix_use_runtimelinking" = yes; then
17285 shared_flag="$shared_flag "'${wl}-G'
17286 fi
17287 else
17288 # not using gcc
17289 if test "$host_cpu" = ia64; then
17290 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
17291 # chokes on -Wl,-G. The following line is correct:
17292 shared_flag='-G'
17293 else
17294 if test "$aix_use_runtimelinking" = yes; then
17295 shared_flag='${wl}-G'
17296 else
17297 shared_flag='${wl}-bM:SRE'
17298 fi
17299 fi
17300 fi
17301
17302 # It seems that -bexpall does not export symbols beginning with
17303 # underscore (_), so it is better to generate a list of symbols to export.
17304 always_export_symbols=yes
17305 if test "$aix_use_runtimelinking" = yes; then
17306 # Warning - without using the other runtime loading flags (-brtl),
17307 # -berok will link without error, but may produce a broken library.
17308 allow_undefined_flag='-berok'
17309 # Determine the default libpath from the value encoded in an
17310 # empty executable.
17311 cat >conftest.$ac_ext <<_ACEOF
17312/* confdefs.h. */
17313_ACEOF
17314cat confdefs.h >>conftest.$ac_ext
17315cat >>conftest.$ac_ext <<_ACEOF
17316/* end confdefs.h. */
17317
17318int
17319main ()
17320{
17321
17322 ;
17323 return 0;
17324}
17325_ACEOF
17326rm -f conftest.$ac_objext conftest$ac_exeext
17327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17328 (eval $ac_link) 2>conftest.er1
17329 ac_status=$?
17330 grep -v '^ *+' conftest.er1 >conftest.err
17331 rm -f conftest.er1
17332 cat conftest.err >&5
17333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17334 (exit $ac_status); } &&
17335 { ac_try='test -z "$ac_c_werror_flag"
17336 || test ! -s conftest.err'
17337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17338 (eval $ac_try) 2>&5
17339 ac_status=$?
17340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17341 (exit $ac_status); }; } &&
17342 { ac_try='test -s conftest$ac_exeext'
17343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17344 (eval $ac_try) 2>&5
17345 ac_status=$?
17346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17347 (exit $ac_status); }; }; then
17348
17349lt_aix_libpath_sed='
17350 /Import File Strings/,/^$/ {
17351 /^0/ {
17352 s/^0 *\(.*\)$/\1/
17353 p
17354 }
17355 }'
17356aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17357# Check for a 64-bit object if we didn't find anything.
17358if test -z "$aix_libpath"; then
17359 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17360fi
17361else
17362 echo "$as_me: failed program was:" >&5
17363sed 's/^/| /' conftest.$ac_ext >&5
17364
17365fi
17366rm -f conftest.err conftest.$ac_objext \
17367 conftest$ac_exeext conftest.$ac_ext
17368if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17369
17370 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
17371 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"
17372 else
17373 if test "$host_cpu" = ia64; then
17374 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
17375 allow_undefined_flag="-z nodefs"
17376 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"
17377 else
17378 # Determine the default libpath from the value encoded in an
17379 # empty executable.
17380 cat >conftest.$ac_ext <<_ACEOF
17381/* confdefs.h. */
17382_ACEOF
17383cat confdefs.h >>conftest.$ac_ext
17384cat >>conftest.$ac_ext <<_ACEOF
17385/* end confdefs.h. */
17386
17387int
17388main ()
17389{
17390
17391 ;
17392 return 0;
17393}
17394_ACEOF
17395rm -f conftest.$ac_objext conftest$ac_exeext
17396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17397 (eval $ac_link) 2>conftest.er1
17398 ac_status=$?
17399 grep -v '^ *+' conftest.er1 >conftest.err
17400 rm -f conftest.er1
17401 cat conftest.err >&5
17402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17403 (exit $ac_status); } &&
17404 { ac_try='test -z "$ac_c_werror_flag"
17405 || test ! -s conftest.err'
17406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17407 (eval $ac_try) 2>&5
17408 ac_status=$?
17409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17410 (exit $ac_status); }; } &&
17411 { ac_try='test -s conftest$ac_exeext'
17412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17413 (eval $ac_try) 2>&5
17414 ac_status=$?
17415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17416 (exit $ac_status); }; }; then
17417
17418lt_aix_libpath_sed='
17419 /Import File Strings/,/^$/ {
17420 /^0/ {
17421 s/^0 *\(.*\)$/\1/
17422 p
17423 }
17424 }'
17425aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17426# Check for a 64-bit object if we didn't find anything.
17427if test -z "$aix_libpath"; then
17428 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17429fi
17430else
17431 echo "$as_me: failed program was:" >&5
17432sed 's/^/| /' conftest.$ac_ext >&5
17433
17434fi
17435rm -f conftest.err conftest.$ac_objext \
17436 conftest$ac_exeext conftest.$ac_ext
17437if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17438
17439 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
17440 # Warning - without using the other run time loading flags,
17441 # -berok will link without error, but may produce a broken library.
17442 no_undefined_flag=' ${wl}-bernotok'
17443 allow_undefined_flag=' ${wl}-berok'
17444 # Exported symbols can be pulled into shared objects from archives
17445 whole_archive_flag_spec='$convenience'
17446 archive_cmds_need_lc=yes
17447 # This is similar to how AIX traditionally builds its shared libraries.
17448 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'
17449 fi
17450 fi
17451 ;;
17452
17453 amigaos*)
17454 if test "$host_cpu" = m68k; then
17455 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)'
17456 hardcode_libdir_flag_spec='-L$libdir'
17457 hardcode_minus_L=yes
17458 fi
17459 # see comment about different semantics on the GNU ld section
17460 ld_shlibs=no
17461 ;;
17462
17463 bsdi[45]*)
17464 export_dynamic_flag_spec=-rdynamic
17465 ;;
17466
17467 cygwin* | mingw* | pw32*)
17468 # When not using gcc, we currently assume that we are using
17469 # Microsoft Visual C++.
17470 # hardcode_libdir_flag_spec is actually meaningless, as there is
17471 # no search path for DLLs.
17472 hardcode_libdir_flag_spec=' '
17473 allow_undefined_flag=unsupported
17474 # Tell ltmain to make .lib files, not .a files.
17475 libext=lib
17476 # Tell ltmain to make .dll files, not .so files.
17477 shrext_cmds=".dll"
17478 # FIXME: Setting linknames here is a bad hack.
17479 archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
17480 # The linker will automatically build a .lib file if we build a DLL.
17481 old_archive_from_new_cmds='true'
17482 # FIXME: Should let the user specify the lib program.
17483 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
17484 fix_srcfile_path='`cygpath -w "$srcfile"`'
17485 enable_shared_with_static_runtimes=yes
17486 ;;
17487
17488 darwin* | rhapsody*)
17489 case $host_os in
17490 rhapsody* | darwin1.[012])
17491 allow_undefined_flag='${wl}-undefined ${wl}suppress'
17492 ;;
17493 *) # Darwin 1.3 on
17494 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
17495 10.[012])
17496 allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
17497 ;;
17498 10.*)
17499 allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
17500 ;;
17501 esac
17502 ;;
17503 esac
17504 archive_cmds_need_lc=no
17505 hardcode_direct=no
17506 hardcode_automatic=yes
17507 hardcode_shlibpath_var=unsupported
17508 whole_archive_flag_spec=''
17509 link_all_deplibs=yes
17510 if test "$GCC" = yes ; then
17511 if test "${lt_cv_apple_cc_single_mod+set}" = set; then
17512 echo $ECHO_N "(cached) $ECHO_C" >&6
17513else
17514 lt_cv_apple_cc_single_mod=no
17515 if test -z "${LT_MULTI_MODULE}"; then
17516 # By default we will add the -single_module flag. You can override
17517 # by either setting the environment variable LT_MULTI_MODULE
17518 # non-empty at configure time, or by adding -multi-module to the
17519 # link flags.
17520 echo "int foo(void){return 1;}" > conftest.c
17521 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
17522 -dynamiclib ${wl}-single_module conftest.c
17523 if test -f libconftest.dylib; then
17524 lt_cv_apple_cc_single_mod=yes
17525 rm libconftest.dylib
17526 fi
17527 rm conftest.$ac_ext
17528 fi
17529fi
17530
17531 output_verbose_link_cmd=echo
17532 if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
17533 archive_cmds='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
17534 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}'
17535 else
17536 archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
17537 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}'
17538 fi
17539 module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
17540 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}'
17541 else
17542 case $cc_basename in
17543 xlc*)
17544 output_verbose_link_cmd=echo
17545 archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
17546 module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
17547 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
17548 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}'
17549 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}'
17550 ;;
17551 *)
17552 ld_shlibs=no
17553 ;;
17554 esac
17555 fi
17556 ;;
17557
17558 dgux*)
17559 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17560 hardcode_libdir_flag_spec='-L$libdir'
17561 hardcode_shlibpath_var=no
17562 ;;
17563
17564 freebsd1*)
17565 ld_shlibs=no
17566 ;;
17567
17568 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
17569 # support. Future versions do this automatically, but an explicit c++rt0.o
17570 # does not break anything, and helps significantly (at the cost of a little
17571 # extra space).
17572 freebsd2.2*)
17573 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
17574 hardcode_libdir_flag_spec='-R$libdir'
17575 hardcode_direct=yes
17576 hardcode_shlibpath_var=no
17577 ;;
17578
17579 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
17580 freebsd2*)
17581 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17582 hardcode_direct=yes
17583 hardcode_minus_L=yes
17584 hardcode_shlibpath_var=no
17585 ;;
17586
17587 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
17588 freebsd* | dragonfly*)
17589 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
17590 hardcode_libdir_flag_spec='-R$libdir'
17591 hardcode_direct=yes
17592 hardcode_shlibpath_var=no
17593 ;;
17594
17595 hpux9*)
17596 if test "$GCC" = yes; then
17597 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'
17598 else
17599 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'
17600 fi
17601 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
17602 hardcode_libdir_separator=:
17603 hardcode_direct=yes
17604
17605 # hardcode_minus_L: Not really in the search PATH,
17606 # but as the default location of the library.
17607 hardcode_minus_L=yes
17608 export_dynamic_flag_spec='${wl}-E'
17609 ;;
17610
17611 hpux10*)
17612 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
17613 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17614 else
17615 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
17616 fi
17617 if test "$with_gnu_ld" = no; then
17618 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
17619 hardcode_libdir_flag_spec_ld='+b $libdir'
17620 hardcode_libdir_separator=:
17621 hardcode_direct=yes
17622 hardcode_direct_absolute=yes
17623 export_dynamic_flag_spec='${wl}-E'
17624 # hardcode_minus_L: Not really in the search PATH,
17625 # but as the default location of the library.
17626 hardcode_minus_L=yes
17627 fi
17628 ;;
17629
17630 hpux11*)
17631 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
17632 case $host_cpu in
17633 hppa*64*)
17634 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17635 ;;
17636 ia64*)
17637 archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17638 ;;
17639 *)
17640 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17641 ;;
17642 esac
17643 else
17644 case $host_cpu in
17645 hppa*64*)
17646 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17647 ;;
17648 ia64*)
17649 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17650 ;;
17651 *)
17652 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17653 ;;
17654 esac
17655 fi
17656 if test "$with_gnu_ld" = no; then
17657 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
17658 hardcode_libdir_separator=:
17659
17660 case $host_cpu in
17661 hppa*64*|ia64*)
17662 hardcode_direct=no
17663 hardcode_shlibpath_var=no
17664 ;;
17665 *)
17666 hardcode_direct=yes
17667 hardcode_direct_absolute=yes
17668 export_dynamic_flag_spec='${wl}-E'
17669
17670 # hardcode_minus_L: Not really in the search PATH,
17671 # but as the default location of the library.
17672 hardcode_minus_L=yes
17673 ;;
17674 esac
17675 fi
17676 ;;
17677
17678 irix5* | irix6* | nonstopux*)
17679 if test "$GCC" = yes; then
17680 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'
17681 # Try to use the -exported_symbol ld option, if it does not
17682 # work, assume that -exports_file does not work either and
17683 # implicitly export all symbols.
17684 save_LDFLAGS="$LDFLAGS"
17685 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
17686 cat >conftest.$ac_ext <<_ACEOF
17687int foo(void) {}
17688_ACEOF
17689rm -f conftest.$ac_objext conftest$ac_exeext
17690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17691 (eval $ac_link) 2>conftest.er1
17692 ac_status=$?
17693 grep -v '^ *+' conftest.er1 >conftest.err
17694 rm -f conftest.er1
17695 cat conftest.err >&5
17696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17697 (exit $ac_status); } &&
17698 { ac_try='test -z "$ac_c_werror_flag"
17699 || test ! -s conftest.err'
17700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17701 (eval $ac_try) 2>&5
17702 ac_status=$?
17703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17704 (exit $ac_status); }; } &&
17705 { ac_try='test -s conftest$ac_exeext'
17706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17707 (eval $ac_try) 2>&5
17708 ac_status=$?
17709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17710 (exit $ac_status); }; }; then
17711 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'
17712
17713else
17714 echo "$as_me: failed program was:" >&5
17715sed 's/^/| /' conftest.$ac_ext >&5
17716
17717fi
17718rm -f conftest.err conftest.$ac_objext \
17719 conftest$ac_exeext conftest.$ac_ext
17720 LDFLAGS="$save_LDFLAGS"
17721 else
17722 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'
17723 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'
17724 fi
17725 archive_cmds_need_lc='no'
17726 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17727 hardcode_libdir_separator=:
17728 inherit_rpath=yes
17729 link_all_deplibs=yes
17730 ;;
17731
17732 netbsd*)
17733 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
17734 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
17735 else
17736 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
17737 fi
17738 hardcode_libdir_flag_spec='-R$libdir'
17739 hardcode_direct=yes
17740 hardcode_shlibpath_var=no
17741 ;;
17742
17743 newsos6)
17744 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17745 hardcode_direct=yes
17746 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17747 hardcode_libdir_separator=:
17748 hardcode_shlibpath_var=no
17749 ;;
17750
17751 *nto* | *qnx*)
17752 ;;
17753
17754 openbsd*)
17755 hardcode_direct=yes
17756 hardcode_shlibpath_var=no
17757 hardcode_direct_absolute=yes
17758 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
17759 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17760 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
17761 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
17762 export_dynamic_flag_spec='${wl}-E'
17763 else
17764 case $host_os in
17765 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
17766 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17767 hardcode_libdir_flag_spec='-R$libdir'
17768 ;;
17769 *)
17770 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17771 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
17772 ;;
17773 esac
17774 fi
17775 ;;
17776
17777 os2*)
17778 hardcode_libdir_flag_spec='-L$libdir'
17779 hardcode_minus_L=yes
17780 allow_undefined_flag=unsupported
17781 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'
17782 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
17783 ;;
17784
17785 osf3*)
17786 if test "$GCC" = yes; then
17787 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
17788 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'
17789 else
17790 allow_undefined_flag=' -expect_unresolved \*'
17791 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'
17792 fi
17793 archive_cmds_need_lc='no'
17794 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17795 hardcode_libdir_separator=:
17796 ;;
17797
17798 osf4* | osf5*) # as osf3* with the addition of -msym flag
17799 if test "$GCC" = yes; then
17800 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
17801 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'
17802 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17803 else
17804 allow_undefined_flag=' -expect_unresolved \*'
17805 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'
17806 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~
17807 $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'
17808
17809 # Both c and cxx compiler support -rpath directly
17810 hardcode_libdir_flag_spec='-rpath $libdir'
17811 fi
17812 archive_cmds_need_lc='no'
17813 hardcode_libdir_separator=:
17814 ;;
17815
17816 solaris*)
17817 no_undefined_flag=' -z defs'
17818 if test "$GCC" = yes; then
17819 wlarc='${wl}'
17820 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17821 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17822 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
17823 else
17824 case `$CC -V 2>&1` in
17825 *"Compilers 5.0"*)
17826 wlarc=''
17827 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
17828 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17829 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
17830 ;;
17831 *)
17832 wlarc='${wl}'
17833 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
17834 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17835 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
17836 ;;
17837 esac
17838 fi
17839 hardcode_libdir_flag_spec='-R$libdir'
17840 hardcode_shlibpath_var=no
17841 case $host_os in
17842 solaris2.[0-5] | solaris2.[0-5].*) ;;
17843 *)
17844 # The compiler driver will combine and reorder linker options,
17845 # but understands `-z linker_flag'. GCC discards it without `$wl',
17846 # but is careful enough not to reorder.
17847 # Supported since Solaris 2.6 (maybe 2.5.1?)
17848 if test "$GCC" = yes; then
17849 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
17850 else
17851 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
17852 fi
17853 ;;
17854 esac
17855 link_all_deplibs=yes
17856 ;;
17857
17858 sunos4*)
17859 if test "x$host_vendor" = xsequent; then
17860 # Use $CC to link under sequent, because it throws in some extra .o
17861 # files that make .init and .fini sections work.
17862 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
17863 else
17864 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
17865 fi
17866 hardcode_libdir_flag_spec='-L$libdir'
17867 hardcode_direct=yes
17868 hardcode_minus_L=yes
17869 hardcode_shlibpath_var=no
17870 ;;
17871
17872 sysv4)
17873 case $host_vendor in
17874 sni)
17875 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17876 hardcode_direct=yes # is this really true???
17877 ;;
17878 siemens)
17879 ## LD is ld it makes a PLAMLIB
17880 ## CC just makes a GrossModule.
17881 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
17882 reload_cmds='$CC -r -o $output$reload_objs'
17883 hardcode_direct=no
17884 ;;
17885 motorola)
17886 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17887 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
17888 ;;
17889 esac
17890 runpath_var='LD_RUN_PATH'
17891 hardcode_shlibpath_var=no
17892 ;;
17893
17894 sysv4.3*)
17895 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17896 hardcode_shlibpath_var=no
17897 export_dynamic_flag_spec='-Bexport'
17898 ;;
17899
17900 sysv4*MP*)
17901 if test -d /usr/nec; then
17902 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17903 hardcode_shlibpath_var=no
17904 runpath_var=LD_RUN_PATH
17905 hardcode_runpath_var=yes
17906 ld_shlibs=yes
17907 fi
17908 ;;
17909
17910 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
17911 no_undefined_flag='${wl}-z,text'
17912 archive_cmds_need_lc=no
17913 hardcode_shlibpath_var=no
17914 runpath_var='LD_RUN_PATH'
17915
17916 if test "$GCC" = yes; then
17917 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17918 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17919 else
17920 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17921 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17922 fi
17923 ;;
17924
17925 sysv5* | sco3.2v5* | sco5v6*)
17926 # Note: We can NOT use -z defs as we might desire, because we do not
17927 # link with -lc, and that would cause any symbols used from libc to
17928 # always be unresolved, which means just about no library would
17929 # ever link correctly. If we're not using GNU ld we use -z text
17930 # though, which does catch some bad symbols but isn't as heavy-handed
17931 # as -z defs.
17932 no_undefined_flag='${wl}-z,text'
17933 allow_undefined_flag='${wl}-z,nodefs'
17934 archive_cmds_need_lc=no
17935 hardcode_shlibpath_var=no
17936 hardcode_libdir_flag_spec='${wl}-R,$libdir'
17937 hardcode_libdir_separator=':'
17938 link_all_deplibs=yes
17939 export_dynamic_flag_spec='${wl}-Bexport'
17940 runpath_var='LD_RUN_PATH'
17941
17942 if test "$GCC" = yes; then
17943 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17944 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17945 else
17946 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17947 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17948 fi
17949 ;;
17950
17951 uts4*)
17952 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17953 hardcode_libdir_flag_spec='-L$libdir'
17954 hardcode_shlibpath_var=no
17955 ;;
17956
17957 *)
17958 ld_shlibs=no
17959 ;;
17960 esac
17961
17962 if test x$host_vendor = xsni; then
17963 case $host in
17964 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
17965 export_dynamic_flag_spec='${wl}-Blargedynsym'
17966 ;;
17967 esac
17968 fi
17969 fi
17970
17971echo "$as_me:$LINENO: result: $ld_shlibs" >&5
17972echo "${ECHO_T}$ld_shlibs" >&6
17973test "$ld_shlibs" = no && can_build_shared=no
17974
17975with_gnu_ld=$with_gnu_ld
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991#
17992# Do we need to explicitly link libc?
17993#
17994case "x$archive_cmds_need_lc" in
17995x|xyes)
17996 # Assume -lc should be added
17997 archive_cmds_need_lc=yes
17998
17999 if test "$enable_shared" = yes && test "$GCC" = yes; then
18000 case $archive_cmds in
18001 *'~'*)
18002 # FIXME: we may have to deal with multi-command sequences.
18003 ;;
18004 '$CC '*)
18005 # Test whether the compiler implicitly links with -lc since on some
18006 # systems, -lgcc has to come before -lc. If gcc already passes -lc
18007 # to ld, don't add -lc before -lgcc.
18008 echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
18009echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
18010 $RM conftest*
18011 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
18012
18013 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18014 (eval $ac_compile) 2>&5
18015 ac_status=$?
18016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18017 (exit $ac_status); } 2>conftest.err; then
18018 soname=conftest
18019 lib=conftest
18020 libobjs=conftest.$ac_objext
18021 deplibs=
18022 wl=$lt_prog_compiler_wl
18023 pic_flag=$lt_prog_compiler_pic
18024 compiler_flags=-v
18025 linker_flags=-v
18026 verstring=
18027 output_objdir=.
18028 libname=conftest
18029 lt_save_allow_undefined_flag=$allow_undefined_flag
18030 allow_undefined_flag=
18031 if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
18032 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
18033 ac_status=$?
18034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18035 (exit $ac_status); }
18036 then
18037 archive_cmds_need_lc=no
18038 else
18039 archive_cmds_need_lc=yes
18040 fi
18041 allow_undefined_flag=$lt_save_allow_undefined_flag
18042 else
18043 cat conftest.err 1>&5
18044 fi
18045 $RM conftest*
18046 echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
18047echo "${ECHO_T}$archive_cmds_need_lc" >&6
18048 ;;
18049 esac
18050 fi
18051 ;;
18052esac
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
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
18211echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
18212withGCC=$GCC
18213if test "$withGCC" = yes; then
18214 case $host_os in
18215 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
18216 *) lt_awk_arg="/^libraries:/" ;;
18217 esac
18218 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
18219 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
18220 # if the path contains ";" then we assume it to be the separator
18221 # otherwise default to the standard path separator (i.e. ":") - it is
18222 # assumed that no part of a normal pathname contains ";" but that should
18223 # okay in the real world where ";" in dirpaths is itself problematic.
18224 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
18225 else
18226 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
18227 fi
18228 # Ok, now we have the path, separated by spaces, we can step through it
18229 # and add multilib dir if necessary.
18230 lt_tmp_lt_search_path_spec=
18231 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
18232 for lt_sys_path in $lt_search_path_spec; do
18233 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
18234 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
18235 else
18236 test -d "$lt_sys_path" && \
18237 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
18238 fi
18239 done
18240 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
18241BEGIN {RS=" "; FS="/|\n";} {
18242 lt_foo="";
18243 lt_count=0;
18244 for (lt_i = NF; lt_i > 0; lt_i--) {
18245 if ($lt_i != "" && $lt_i != ".") {
18246 if ($lt_i == "..") {
18247 lt_count++;
18248 } else {
18249 if (lt_count == 0) {
18250 lt_foo="/" $lt_i lt_foo;
18251 } else {
18252 lt_count--;
18253 }
18254 }
18255 }
18256 }
18257 if (lt_foo != "") { lt_freq[lt_foo]++; }
18258 if (lt_freq[lt_foo] == 1) { print lt_foo; }
18259}'`
18260 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
18261else
18262 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
18263fi
18264library_names_spec=
18265libname_spec='lib$name'
18266soname_spec=
18267shrext_cmds=".so"
18268postinstall_cmds=
18269postuninstall_cmds=
18270finish_cmds=
18271finish_eval=
18272shlibpath_var=
18273shlibpath_overrides_runpath=unknown
18274version_type=none
18275dynamic_linker="$host_os ld.so"
18276sys_lib_dlsearch_path_spec="/lib /usr/lib"
18277need_lib_prefix=unknown
18278hardcode_into_libs=no
18279
18280# when you set need_version to no, make sure it does not cause -set_version
18281# flags to be left without arguments
18282need_version=unknown
18283
18284case $host_os in
18285aix3*)
18286 version_type=linux
18287 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
18288 shlibpath_var=LIBPATH
18289
18290 # AIX 3 has no versioning support, so we append a major version to the name.
18291 soname_spec='${libname}${release}${shared_ext}$major'
18292 ;;
18293
18294aix[4-9]*)
18295 version_type=linux
18296 need_lib_prefix=no
18297 need_version=no
18298 hardcode_into_libs=yes
18299 if test "$host_cpu" = ia64; then
18300 # AIX 5 supports IA64
18301 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
18302 shlibpath_var=LD_LIBRARY_PATH
18303 else
18304 # With GCC up to 2.95.x, collect2 would create an import file
18305 # for dependence libraries. The import file would start with
18306 # the line `#! .'. This would cause the generated library to
18307 # depend on `.', always an invalid library. This was fixed in
18308 # development snapshots of GCC prior to 3.0.
18309 case $host_os in
18310 aix4 | aix4.[01] | aix4.[01].*)
18311 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
18312 echo ' yes '
18313 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
18314 :
18315 else
18316 can_build_shared=no
18317 fi
18318 ;;
18319 esac
18320 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
18321 # soname into executable. Probably we can add versioning support to
18322 # collect2, so additional links can be useful in future.
18323 if test "$aix_use_runtimelinking" = yes; then
18324 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
18325 # instead of lib<name>.a to let people know that these are not
18326 # typical AIX shared libraries.
18327 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18328 else
18329 # We preserve .a as extension for shared libraries through AIX4.2
18330 # and later when we are not doing run time linking.
18331 library_names_spec='${libname}${release}.a $libname.a'
18332 soname_spec='${libname}${release}${shared_ext}$major'
18333 fi
18334 shlibpath_var=LIBPATH
18335 fi
18336 ;;
18337
18338amigaos*)
18339 if test "$host_cpu" = m68k; then
18340 library_names_spec='$libname.ixlibrary $libname.a'
18341 # Create ${libname}_ixlibrary.a entries in /sys/libs.
18342 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'
18343 else
18344 dynamic_linker=no
18345 fi
18346 ;;
18347
18348beos*)
18349 library_names_spec='${libname}${shared_ext}'
18350 dynamic_linker="$host_os ld.so"
18351 shlibpath_var=LIBRARY_PATH
18352 ;;
18353
18354bsdi[45]*)
18355 version_type=linux
18356 need_version=no
18357 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18358 soname_spec='${libname}${release}${shared_ext}$major'
18359 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
18360 shlibpath_var=LD_LIBRARY_PATH
18361 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
18362 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
18363 # the default ld.so.conf also contains /usr/contrib/lib and
18364 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
18365 # libtool to hard-code these into programs
18366 ;;
18367
18368cygwin* | mingw* | pw32*)
18369 version_type=windows
18370 shrext_cmds=".dll"
18371 need_version=no
18372 need_lib_prefix=no
18373
18374 case $withGCC,$host_os in
18375 yes,cygwin* | yes,mingw* | yes,pw32*)
18376 library_names_spec='$libname.dll.a'
18377 # DLL is installed to $(libdir)/../bin by postinstall_cmds
18378 postinstall_cmds='base_file=`basename \${file}`~
18379 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
18380 dldir=$destdir/`dirname \$dlpath`~
18381 test -d \$dldir || mkdir -p \$dldir~
18382 $install_prog $dir/$dlname \$dldir/$dlname~
18383 chmod a+x \$dldir/$dlname~
18384 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
18385 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
18386 fi'
18387 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
18388 dlpath=$dir/\$dldll~
18389 $RM \$dlpath'
18390 shlibpath_overrides_runpath=yes
18391
18392 case $host_os in
18393 cygwin*)
18394 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
18395 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18396 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
18397 ;;
18398 mingw*)
18399 # MinGW DLLs use traditional 'lib' prefix
18400 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18401 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
18402 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
18403 # It is most probably a Windows format PATH printed by
18404 # mingw gcc, but we are running on Cygwin. Gcc prints its search
18405 # path with ; separators, and with drive letters. We can handle the
18406 # drive letters (cygwin fileutils understands them), so leave them,
18407 # especially as we might pass files found there to a mingw objdump,
18408 # which wouldn't understand a cygwinified path. Ahh.
18409 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
18410 else
18411 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
18412 fi
18413 ;;
18414 pw32*)
18415 # pw32 DLLs use 'pw' prefix rather than 'lib'
18416 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18417 ;;
18418 esac
18419 ;;
18420
18421 *)
18422 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
18423 ;;
18424 esac
18425 dynamic_linker='Win32 ld.exe'
18426 # FIXME: first we should search . and the directory the executable is in
18427 shlibpath_var=PATH
18428 ;;
18429
18430darwin* | rhapsody*)
18431 dynamic_linker="$host_os dyld"
18432 version_type=darwin
18433 need_lib_prefix=no
18434 need_version=no
18435 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
18436 soname_spec='${libname}${release}${major}$shared_ext'
18437 shlibpath_overrides_runpath=yes
18438 shlibpath_var=DYLD_LIBRARY_PATH
18439 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
18440
18441 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
18442 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
18443 ;;
18444
18445dgux*)
18446 version_type=linux
18447 need_lib_prefix=no
18448 need_version=no
18449 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
18450 soname_spec='${libname}${release}${shared_ext}$major'
18451 shlibpath_var=LD_LIBRARY_PATH
18452 ;;
18453
18454freebsd1*)
18455 dynamic_linker=no
18456 ;;
18457
18458freebsd* | dragonfly*)
18459 # DragonFly does not have aout. When/if they implement a new
18460 # versioning mechanism, adjust this.
18461 if test -x /usr/bin/objformat; then
18462 objformat=`/usr/bin/objformat`
18463 else
18464 case $host_os in
18465 freebsd[123]*) objformat=aout ;;
18466 *) objformat=elf ;;
18467 esac
18468 fi
18469 version_type=freebsd-$objformat
18470 case $version_type in
18471 freebsd-elf*)
18472 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
18473 need_version=no
18474 need_lib_prefix=no
18475 ;;
18476 freebsd-*)
18477 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
18478 need_version=yes
18479 ;;
18480 esac
18481 shlibpath_var=LD_LIBRARY_PATH
18482 case $host_os in
18483 freebsd2*)
18484 shlibpath_overrides_runpath=yes
18485 ;;
18486 freebsd3.[01]* | freebsdelf3.[01]*)
18487 shlibpath_overrides_runpath=yes
18488 hardcode_into_libs=yes
18489 ;;
18490 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
18491 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
18492 shlibpath_overrides_runpath=no
18493 hardcode_into_libs=yes
18494 ;;
18495 *) # from 4.6 on, and DragonFly
18496 shlibpath_overrides_runpath=yes
18497 hardcode_into_libs=yes
18498 ;;
18499 esac
18500 ;;
18501
18502gnu*)
18503 version_type=linux
18504 need_lib_prefix=no
18505 need_version=no
18506 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
18507 soname_spec='${libname}${release}${shared_ext}$major'
18508 shlibpath_var=LD_LIBRARY_PATH
18509 hardcode_into_libs=yes
18510 ;;
18511
18512hpux9* | hpux10* | hpux11*)
18513 # Give a soname corresponding to the major version so that dld.sl refuses to
18514 # link against other versions.
18515 version_type=sunos
18516 need_lib_prefix=no
18517 need_version=no
18518 case $host_cpu in
18519 ia64*)
18520 shrext_cmds='.so'
18521 hardcode_into_libs=yes
18522 dynamic_linker="$host_os dld.so"
18523 shlibpath_var=LD_LIBRARY_PATH
18524 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18525 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18526 soname_spec='${libname}${release}${shared_ext}$major'
18527 if test "X$HPUX_IA64_MODE" = X32; then
18528 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
18529 else
18530 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
18531 fi
18532 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18533 ;;
18534 hppa*64*)
18535 shrext_cmds='.sl'
18536 hardcode_into_libs=yes
18537 dynamic_linker="$host_os dld.sl"
18538 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
18539 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18540 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18541 soname_spec='${libname}${release}${shared_ext}$major'
18542 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
18543 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18544 ;;
18545 *)
18546 shrext_cmds='.sl'
18547 dynamic_linker="$host_os dld.sl"
18548 shlibpath_var=SHLIB_PATH
18549 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
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 ;;
18553 esac
18554 # HP-UX runs *really* slowly unless shared libraries are mode 555.
18555 postinstall_cmds='chmod 555 $lib'
18556 ;;
18557
18558interix[3-9]*)
18559 version_type=linux
18560 need_lib_prefix=no
18561 need_version=no
18562 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
18563 soname_spec='${libname}${release}${shared_ext}$major'
18564 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
18565 shlibpath_var=LD_LIBRARY_PATH
18566 shlibpath_overrides_runpath=no
18567 hardcode_into_libs=yes
18568 ;;
18569
18570irix5* | irix6* | nonstopux*)
18571 case $host_os in
18572 nonstopux*) version_type=nonstopux ;;
18573 *)
18574 if test "$lt_cv_prog_gnu_ld" = yes; then
18575 version_type=linux
18576 else
18577 version_type=irix
18578 fi ;;
18579 esac
18580 need_lib_prefix=no
18581 need_version=no
18582 soname_spec='${libname}${release}${shared_ext}$major'
18583 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
18584 case $host_os in
18585 irix5* | nonstopux*)
18586 libsuff= shlibsuff=
18587 ;;
18588 *)
18589 case $LD in # libtool.m4 will add one of these switches to LD
18590 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
18591 libsuff= shlibsuff= libmagic=32-bit;;
18592 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
18593 libsuff=32 shlibsuff=N32 libmagic=N32;;
18594 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
18595 libsuff=64 shlibsuff=64 libmagic=64-bit;;
18596 *) libsuff= shlibsuff= libmagic=never-match;;
18597 esac
18598 ;;
18599 esac
18600 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
18601 shlibpath_overrides_runpath=no
18602 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
18603 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
18604 hardcode_into_libs=yes
18605 ;;
18606
18607# No shared lib support for Linux oldld, aout, or coff.
18608linux*oldld* | linux*aout* | linux*coff*)
18609 dynamic_linker=no
18610 ;;
18611
18612# This must be Linux ELF.
18613linux* | k*bsd*-gnu)
18614 version_type=linux
18615 need_lib_prefix=no
18616 need_version=no
18617 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18618 soname_spec='${libname}${release}${shared_ext}$major'
18619 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
18620 shlibpath_var=LD_LIBRARY_PATH
18621 shlibpath_overrides_runpath=no
18622 # Some binutils ld are patched to set DT_RUNPATH
18623 save_LDFLAGS=$LDFLAGS
18624 save_libdir=$libdir
18625 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
18626 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
18627 cat >conftest.$ac_ext <<_ACEOF
18628/* confdefs.h. */
18629_ACEOF
18630cat confdefs.h >>conftest.$ac_ext
18631cat >>conftest.$ac_ext <<_ACEOF
18632/* end confdefs.h. */
18633
18634int
18635main ()
18636{
18637
18638 ;
18639 return 0;
18640}
18641_ACEOF
18642rm -f conftest.$ac_objext conftest$ac_exeext
18643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18644 (eval $ac_link) 2>conftest.er1
18645 ac_status=$?
18646 grep -v '^ *+' conftest.er1 >conftest.err
18647 rm -f conftest.er1
18648 cat conftest.err >&5
18649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18650 (exit $ac_status); } &&
18651 { ac_try='test -z "$ac_c_werror_flag"
18652 || test ! -s conftest.err'
18653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18654 (eval $ac_try) 2>&5
18655 ac_status=$?
18656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18657 (exit $ac_status); }; } &&
18658 { ac_try='test -s conftest$ac_exeext'
18659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18660 (eval $ac_try) 2>&5
18661 ac_status=$?
18662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18663 (exit $ac_status); }; }; then
18664 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir"; then
18665 shlibpath_overrides_runpath=yes
18666fi
18667
18668else
18669 echo "$as_me: failed program was:" >&5
18670sed 's/^/| /' conftest.$ac_ext >&5
18671
18672fi
18673rm -f conftest.err conftest.$ac_objext \
18674 conftest$ac_exeext conftest.$ac_ext
18675 LDFLAGS=$save_LDFLAGS
18676 libdir=$save_libdir
18677
18678 # This implies no fast_install, which is unacceptable.
18679 # Some rework will be needed to allow for fast_install
18680 # before this can be enabled.
18681 hardcode_into_libs=yes
18682
18683 # Append ld.so.conf contents to the search path
18684 if test -f /etc/ld.so.conf; then
18685 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' ' '`
18686 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
18687 fi
18688
18689 # We used to test for /lib/ld.so.1 and disable shared libraries on
18690 # powerpc, because MkLinux only supported shared libraries with the
18691 # GNU dynamic linker. Since this was broken with cross compilers,
18692 # most powerpc-linux boxes support dynamic linking these days and
18693 # people can always --disable-shared, the test was removed, and we
18694 # assume the GNU/Linux dynamic linker is in use.
18695 dynamic_linker='GNU/Linux ld.so'
18696 ;;
18697
18698netbsd*)
18699 version_type=sunos
18700 need_lib_prefix=no
18701 need_version=no
18702 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
18703 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18704 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18705 dynamic_linker='NetBSD (a.out) ld.so'
18706 else
18707 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
18708 soname_spec='${libname}${release}${shared_ext}$major'
18709 dynamic_linker='NetBSD ld.elf_so'
18710 fi
18711 shlibpath_var=LD_LIBRARY_PATH
18712 shlibpath_overrides_runpath=yes
18713 hardcode_into_libs=yes
18714 ;;
18715
18716newsos6)
18717 version_type=linux
18718 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18719 shlibpath_var=LD_LIBRARY_PATH
18720 shlibpath_overrides_runpath=yes
18721 ;;
18722
18723*nto* | *qnx*)
18724 version_type=qnx
18725 need_lib_prefix=no
18726 need_version=no
18727 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18728 soname_spec='${libname}${release}${shared_ext}$major'
18729 shlibpath_var=LD_LIBRARY_PATH
18730 shlibpath_overrides_runpath=no
18731 hardcode_into_libs=yes
18732 dynamic_linker='ldqnx.so'
18733 ;;
18734
18735openbsd*)
18736 version_type=sunos
18737 sys_lib_dlsearch_path_spec="/usr/lib"
18738 need_lib_prefix=no
18739 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
18740 case $host_os in
18741 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
18742 *) need_version=no ;;
18743 esac
18744 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18745 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18746 shlibpath_var=LD_LIBRARY_PATH
18747 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
18748 case $host_os in
18749 openbsd2.[89] | openbsd2.[89].*)
18750 shlibpath_overrides_runpath=no
18751 ;;
18752 *)
18753 shlibpath_overrides_runpath=yes
18754 ;;
18755 esac
18756 else
18757 shlibpath_overrides_runpath=yes
18758 fi
18759 ;;
18760
18761os2*)
18762 libname_spec='$name'
18763 shrext_cmds=".dll"
18764 need_lib_prefix=no
18765 library_names_spec='$libname${shared_ext} $libname.a'
18766 dynamic_linker='OS/2 ld.exe'
18767 shlibpath_var=LIBPATH
18768 ;;
18769
18770osf3* | osf4* | osf5*)
18771 version_type=osf
18772 need_lib_prefix=no
18773 need_version=no
18774 soname_spec='${libname}${release}${shared_ext}$major'
18775 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18776 shlibpath_var=LD_LIBRARY_PATH
18777 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
18778 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
18779 ;;
18780
18781rdos*)
18782 dynamic_linker=no
18783 ;;
18784
18785solaris*)
18786 version_type=linux
18787 need_lib_prefix=no
18788 need_version=no
18789 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18790 soname_spec='${libname}${release}${shared_ext}$major'
18791 shlibpath_var=LD_LIBRARY_PATH
18792 shlibpath_overrides_runpath=yes
18793 hardcode_into_libs=yes
18794 # ldd complains unless libraries are executable
18795 postinstall_cmds='chmod +x $lib'
18796 ;;
18797
18798sunos4*)
18799 version_type=sunos
18800 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18801 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
18802 shlibpath_var=LD_LIBRARY_PATH
18803 shlibpath_overrides_runpath=yes
18804 if test "$with_gnu_ld" = yes; then
18805 need_lib_prefix=no
18806 fi
18807 need_version=yes
18808 ;;
18809
18810sysv4 | sysv4.3*)
18811 version_type=linux
18812 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18813 soname_spec='${libname}${release}${shared_ext}$major'
18814 shlibpath_var=LD_LIBRARY_PATH
18815 case $host_vendor in
18816 sni)
18817 shlibpath_overrides_runpath=no
18818 need_lib_prefix=no
18819 runpath_var=LD_RUN_PATH
18820 ;;
18821 siemens)
18822 need_lib_prefix=no
18823 ;;
18824 motorola)
18825 need_lib_prefix=no
18826 need_version=no
18827 shlibpath_overrides_runpath=no
18828 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
18829 ;;
18830 esac
18831 ;;
18832
18833sysv4*MP*)
18834 if test -d /usr/nec ;then
18835 version_type=linux
18836 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
18837 soname_spec='$libname${shared_ext}.$major'
18838 shlibpath_var=LD_LIBRARY_PATH
18839 fi
18840 ;;
18841
18842sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
18843 version_type=freebsd-elf
18844 need_lib_prefix=no
18845 need_version=no
18846 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
18847 soname_spec='${libname}${release}${shared_ext}$major'
18848 shlibpath_var=LD_LIBRARY_PATH
18849 shlibpath_overrides_runpath=yes
18850 hardcode_into_libs=yes
18851 if test "$with_gnu_ld" = yes; then
18852 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
18853 else
18854 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
18855 case $host_os in
18856 sco3.2v5*)
18857 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
18858 ;;
18859 esac
18860 fi
18861 sys_lib_dlsearch_path_spec='/usr/lib'
18862 ;;
18863
18864tpf*)
18865 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
18866 version_type=linux
18867 need_lib_prefix=no
18868 need_version=no
18869 library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18870 shlibpath_var=LD_LIBRARY_PATH
18871 shlibpath_overrides_runpath=no
18872 hardcode_into_libs=yes
18873 ;;
18874
18875uts4*)
18876 version_type=linux
18877 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18878 soname_spec='${libname}${release}${shared_ext}$major'
18879 shlibpath_var=LD_LIBRARY_PATH
18880 ;;
18881
18882*)
18883 dynamic_linker=no
18884 ;;
18885esac
18886echo "$as_me:$LINENO: result: $dynamic_linker" >&5
18887echo "${ECHO_T}$dynamic_linker" >&6
18888test "$dynamic_linker" = no && can_build_shared=no
18889
18890variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
18891if test "$GCC" = yes; then
18892 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
18893fi
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
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
18982echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
18983hardcode_action=
18984if test -n "$hardcode_libdir_flag_spec" ||
18985 test -n "$runpath_var" ||
18986 test "X$hardcode_automatic" = "Xyes" ; then
18987
18988 # We can hardcode non-existent directories.
18989 if test "$hardcode_direct" != no &&
18990 # If the only mechanism to avoid hardcoding is shlibpath_var, we
18991 # have to relink, otherwise we might link with an installed library
18992 # when we should be linking with a yet-to-be-installed one
18993 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
18994 test "$hardcode_minus_L" != no; then
18995 # Linking always hardcodes the temporary library directory.
18996 hardcode_action=relink
18997 else
18998 # We can link without hardcoding, and we can hardcode nonexisting dirs.
18999 hardcode_action=immediate
19000 fi
19001else
19002 # We cannot hardcode anything, or else we can only hardcode existing
19003 # directories.
19004 hardcode_action=unsupported
19005fi
19006echo "$as_me:$LINENO: result: $hardcode_action" >&5
19007echo "${ECHO_T}$hardcode_action" >&6
19008
19009if test "$hardcode_action" = relink ||
19010 test "$inherit_rpath" = yes; then
19011 # Fast installation is not supported
19012 enable_fast_install=no
19013elif test "$shlibpath_overrides_runpath" = yes ||
19014 test "$enable_shared" = no; then
19015 # Fast installation is not necessary
19016 enable_fast_install=needless
19017fi
19018
19019
19020
19021
19022
19023
19024 if test "x$enable_dlopen" != xyes; then
19025 enable_dlopen=unknown
19026 enable_dlopen_self=unknown
19027 enable_dlopen_self_static=unknown
19028else
19029 lt_cv_dlopen=no
19030 lt_cv_dlopen_libs=
19031
19032 case $host_os in
19033 beos*)
19034 lt_cv_dlopen="load_add_on"
19035 lt_cv_dlopen_libs=
19036 lt_cv_dlopen_self=yes
19037 ;;
19038
19039 mingw* | pw32*)
19040 lt_cv_dlopen="LoadLibrary"
19041 lt_cv_dlopen_libs=
19042 ;;
19043
19044 cygwin*)
19045 lt_cv_dlopen="dlopen"
19046 lt_cv_dlopen_libs=
19047 ;;
19048
19049 darwin*)
19050 # if libdl is installed we need to link against it
19051 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19052echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
19053if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19054 echo $ECHO_N "(cached) $ECHO_C" >&6
19055else
19056 ac_check_lib_save_LIBS=$LIBS
19057LIBS="-ldl $LIBS"
19058cat >conftest.$ac_ext <<_ACEOF
19059/* confdefs.h. */
19060_ACEOF
19061cat confdefs.h >>conftest.$ac_ext
19062cat >>conftest.$ac_ext <<_ACEOF
19063/* end confdefs.h. */
19064
19065/* Override any gcc2 internal prototype to avoid an error. */
19066#ifdef __cplusplus
19067extern "C"
19068#endif
19069/* We use char because int might match the return type of a gcc2
19070 builtin and then its argument prototype would still apply. */
19071char dlopen ();
19072int
19073main ()
19074{
19075dlopen ();
19076 ;
19077 return 0;
19078}
19079_ACEOF
19080rm -f conftest.$ac_objext conftest$ac_exeext
19081if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19082 (eval $ac_link) 2>conftest.er1
19083 ac_status=$?
19084 grep -v '^ *+' conftest.er1 >conftest.err
19085 rm -f conftest.er1
19086 cat conftest.err >&5
19087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19088 (exit $ac_status); } &&
19089 { ac_try='test -z "$ac_c_werror_flag"
19090 || test ! -s conftest.err'
19091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19092 (eval $ac_try) 2>&5
19093 ac_status=$?
19094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19095 (exit $ac_status); }; } &&
19096 { ac_try='test -s conftest$ac_exeext'
19097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19098 (eval $ac_try) 2>&5
19099 ac_status=$?
19100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19101 (exit $ac_status); }; }; then
19102 ac_cv_lib_dl_dlopen=yes
19103else
19104 echo "$as_me: failed program was:" >&5
19105sed 's/^/| /' conftest.$ac_ext >&5
19106
19107ac_cv_lib_dl_dlopen=no
19108fi
19109rm -f conftest.err conftest.$ac_objext \
19110 conftest$ac_exeext conftest.$ac_ext
19111LIBS=$ac_check_lib_save_LIBS
19112fi
19113echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19114echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
19115if test $ac_cv_lib_dl_dlopen = yes; then
19116 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
19117else
19118
19119 lt_cv_dlopen="dyld"
19120 lt_cv_dlopen_libs=
19121 lt_cv_dlopen_self=yes
19122
19123fi
19124
19125 ;;
19126
19127 *)
19128 echo "$as_me:$LINENO: checking for shl_load" >&5
19129echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
19130if test "${ac_cv_func_shl_load+set}" = set; then
19131 echo $ECHO_N "(cached) $ECHO_C" >&6
19132else
19133 cat >conftest.$ac_ext <<_ACEOF
19134/* confdefs.h. */
19135_ACEOF
19136cat confdefs.h >>conftest.$ac_ext
19137cat >>conftest.$ac_ext <<_ACEOF
19138/* end confdefs.h. */
19139/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
19140 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19141#define shl_load innocuous_shl_load
19142
19143/* System header to define __stub macros and hopefully few prototypes,
19144 which can conflict with char shl_load (); below.
19145 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19146 <limits.h> exists even on freestanding compilers. */
19147
19148#ifdef __STDC__
19149# include <limits.h>
19150#else
19151# include <assert.h>
19152#endif
19153
19154#undef shl_load
19155
19156/* Override any gcc2 internal prototype to avoid an error. */
19157#ifdef __cplusplus
19158extern "C"
19159{
19160#endif
19161/* We use char because int might match the return type of a gcc2
19162 builtin and then its argument prototype would still apply. */
19163char shl_load ();
19164/* The GNU C library defines this for functions which it implements
19165 to always fail with ENOSYS. Some functions are actually named
19166 something starting with __ and the normal name is an alias. */
19167#if defined (__stub_shl_load) || defined (__stub___shl_load)
19168choke me
19169#else
19170char (*f) () = shl_load;
19171#endif
19172#ifdef __cplusplus
19173}
19174#endif
19175
19176int
19177main ()
19178{
19179return f != shl_load;
19180 ;
19181 return 0;
19182}
19183_ACEOF
19184rm -f conftest.$ac_objext conftest$ac_exeext
19185if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19186 (eval $ac_link) 2>conftest.er1
19187 ac_status=$?
19188 grep -v '^ *+' conftest.er1 >conftest.err
19189 rm -f conftest.er1
19190 cat conftest.err >&5
19191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19192 (exit $ac_status); } &&
19193 { ac_try='test -z "$ac_c_werror_flag"
19194 || test ! -s conftest.err'
19195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19196 (eval $ac_try) 2>&5
19197 ac_status=$?
19198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19199 (exit $ac_status); }; } &&
19200 { ac_try='test -s conftest$ac_exeext'
19201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19202 (eval $ac_try) 2>&5
19203 ac_status=$?
19204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19205 (exit $ac_status); }; }; then
19206 ac_cv_func_shl_load=yes
19207else
19208 echo "$as_me: failed program was:" >&5
19209sed 's/^/| /' conftest.$ac_ext >&5
19210
19211ac_cv_func_shl_load=no
19212fi
19213rm -f conftest.err conftest.$ac_objext \
19214 conftest$ac_exeext conftest.$ac_ext
19215fi
19216echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
19217echo "${ECHO_T}$ac_cv_func_shl_load" >&6
19218if test $ac_cv_func_shl_load = yes; then
19219 lt_cv_dlopen="shl_load"
19220else
19221 echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
19222echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
19223if test "${ac_cv_lib_dld_shl_load+set}" = set; then
19224 echo $ECHO_N "(cached) $ECHO_C" >&6
19225else
19226 ac_check_lib_save_LIBS=$LIBS
19227LIBS="-ldld $LIBS"
19228cat >conftest.$ac_ext <<_ACEOF
19229/* confdefs.h. */
19230_ACEOF
19231cat confdefs.h >>conftest.$ac_ext
19232cat >>conftest.$ac_ext <<_ACEOF
19233/* end confdefs.h. */
19234
19235/* Override any gcc2 internal prototype to avoid an error. */
19236#ifdef __cplusplus
19237extern "C"
19238#endif
19239/* We use char because int might match the return type of a gcc2
19240 builtin and then its argument prototype would still apply. */
19241char shl_load ();
19242int
19243main ()
19244{
19245shl_load ();
19246 ;
19247 return 0;
19248}
19249_ACEOF
19250rm -f conftest.$ac_objext conftest$ac_exeext
19251if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19252 (eval $ac_link) 2>conftest.er1
19253 ac_status=$?
19254 grep -v '^ *+' conftest.er1 >conftest.err
19255 rm -f conftest.er1
19256 cat conftest.err >&5
19257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19258 (exit $ac_status); } &&
19259 { ac_try='test -z "$ac_c_werror_flag"
19260 || test ! -s conftest.err'
19261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19262 (eval $ac_try) 2>&5
19263 ac_status=$?
19264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19265 (exit $ac_status); }; } &&
19266 { ac_try='test -s conftest$ac_exeext'
19267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19268 (eval $ac_try) 2>&5
19269 ac_status=$?
19270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19271 (exit $ac_status); }; }; then
19272 ac_cv_lib_dld_shl_load=yes
19273else
19274 echo "$as_me: failed program was:" >&5
19275sed 's/^/| /' conftest.$ac_ext >&5
19276
19277ac_cv_lib_dld_shl_load=no
19278fi
19279rm -f conftest.err conftest.$ac_objext \
19280 conftest$ac_exeext conftest.$ac_ext
19281LIBS=$ac_check_lib_save_LIBS
19282fi
19283echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
19284echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
19285if test $ac_cv_lib_dld_shl_load = yes; then
19286 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
19287else
19288 echo "$as_me:$LINENO: checking for dlopen" >&5
19289echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
19290if test "${ac_cv_func_dlopen+set}" = set; then
19291 echo $ECHO_N "(cached) $ECHO_C" >&6
19292else
19293 cat >conftest.$ac_ext <<_ACEOF
19294/* confdefs.h. */
19295_ACEOF
19296cat confdefs.h >>conftest.$ac_ext
19297cat >>conftest.$ac_ext <<_ACEOF
19298/* end confdefs.h. */
19299/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
19300 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19301#define dlopen innocuous_dlopen
19302
19303/* System header to define __stub macros and hopefully few prototypes,
19304 which can conflict with char dlopen (); below.
19305 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19306 <limits.h> exists even on freestanding compilers. */
19307
19308#ifdef __STDC__
19309# include <limits.h>
19310#else
19311# include <assert.h>
19312#endif
19313
19314#undef dlopen
19315
19316/* Override any gcc2 internal prototype to avoid an error. */
19317#ifdef __cplusplus
19318extern "C"
19319{
19320#endif
19321/* We use char because int might match the return type of a gcc2
19322 builtin and then its argument prototype would still apply. */
19323char dlopen ();
19324/* The GNU C library defines this for functions which it implements
19325 to always fail with ENOSYS. Some functions are actually named
19326 something starting with __ and the normal name is an alias. */
19327#if defined (__stub_dlopen) || defined (__stub___dlopen)
19328choke me
19329#else
19330char (*f) () = dlopen;
19331#endif
19332#ifdef __cplusplus
19333}
19334#endif
19335
19336int
19337main ()
19338{
19339return f != dlopen;
19340 ;
19341 return 0;
19342}
19343_ACEOF
19344rm -f conftest.$ac_objext conftest$ac_exeext
19345if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19346 (eval $ac_link) 2>conftest.er1
19347 ac_status=$?
19348 grep -v '^ *+' conftest.er1 >conftest.err
19349 rm -f conftest.er1
19350 cat conftest.err >&5
19351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19352 (exit $ac_status); } &&
19353 { ac_try='test -z "$ac_c_werror_flag"
19354 || test ! -s conftest.err'
19355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19356 (eval $ac_try) 2>&5
19357 ac_status=$?
19358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19359 (exit $ac_status); }; } &&
19360 { ac_try='test -s conftest$ac_exeext'
19361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19362 (eval $ac_try) 2>&5
19363 ac_status=$?
19364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19365 (exit $ac_status); }; }; then
19366 ac_cv_func_dlopen=yes
19367else
19368 echo "$as_me: failed program was:" >&5
19369sed 's/^/| /' conftest.$ac_ext >&5
19370
19371ac_cv_func_dlopen=no
19372fi
19373rm -f conftest.err conftest.$ac_objext \
19374 conftest$ac_exeext conftest.$ac_ext
19375fi
19376echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
19377echo "${ECHO_T}$ac_cv_func_dlopen" >&6
19378if test $ac_cv_func_dlopen = yes; then
19379 lt_cv_dlopen="dlopen"
19380else
19381 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19382echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
19383if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19384 echo $ECHO_N "(cached) $ECHO_C" >&6
19385else
19386 ac_check_lib_save_LIBS=$LIBS
19387LIBS="-ldl $LIBS"
19388cat >conftest.$ac_ext <<_ACEOF
19389/* confdefs.h. */
19390_ACEOF
19391cat confdefs.h >>conftest.$ac_ext
19392cat >>conftest.$ac_ext <<_ACEOF
19393/* end confdefs.h. */
19394
19395/* Override any gcc2 internal prototype to avoid an error. */
19396#ifdef __cplusplus
19397extern "C"
19398#endif
19399/* We use char because int might match the return type of a gcc2
19400 builtin and then its argument prototype would still apply. */
19401char dlopen ();
19402int
19403main ()
19404{
19405dlopen ();
19406 ;
19407 return 0;
19408}
19409_ACEOF
19410rm -f conftest.$ac_objext conftest$ac_exeext
19411if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19412 (eval $ac_link) 2>conftest.er1
19413 ac_status=$?
19414 grep -v '^ *+' conftest.er1 >conftest.err
19415 rm -f conftest.er1
19416 cat conftest.err >&5
19417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19418 (exit $ac_status); } &&
19419 { ac_try='test -z "$ac_c_werror_flag"
19420 || test ! -s conftest.err'
19421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19422 (eval $ac_try) 2>&5
19423 ac_status=$?
19424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19425 (exit $ac_status); }; } &&
19426 { ac_try='test -s conftest$ac_exeext'
19427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19428 (eval $ac_try) 2>&5
19429 ac_status=$?
19430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19431 (exit $ac_status); }; }; then
19432 ac_cv_lib_dl_dlopen=yes
19433else
19434 echo "$as_me: failed program was:" >&5
19435sed 's/^/| /' conftest.$ac_ext >&5
19436
19437ac_cv_lib_dl_dlopen=no
19438fi
19439rm -f conftest.err conftest.$ac_objext \
19440 conftest$ac_exeext conftest.$ac_ext
19441LIBS=$ac_check_lib_save_LIBS
19442fi
19443echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19444echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
19445if test $ac_cv_lib_dl_dlopen = yes; then
19446 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
19447else
19448 echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
19449echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
19450if test "${ac_cv_lib_svld_dlopen+set}" = set; then
19451 echo $ECHO_N "(cached) $ECHO_C" >&6
19452else
19453 ac_check_lib_save_LIBS=$LIBS
19454LIBS="-lsvld $LIBS"
19455cat >conftest.$ac_ext <<_ACEOF
19456/* confdefs.h. */
19457_ACEOF
19458cat confdefs.h >>conftest.$ac_ext
19459cat >>conftest.$ac_ext <<_ACEOF
19460/* end confdefs.h. */
19461
19462/* Override any gcc2 internal prototype to avoid an error. */
19463#ifdef __cplusplus
19464extern "C"
19465#endif
19466/* We use char because int might match the return type of a gcc2
19467 builtin and then its argument prototype would still apply. */
19468char dlopen ();
19469int
19470main ()
19471{
19472dlopen ();
19473 ;
19474 return 0;
19475}
19476_ACEOF
19477rm -f conftest.$ac_objext conftest$ac_exeext
19478if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19479 (eval $ac_link) 2>conftest.er1
19480 ac_status=$?
19481 grep -v '^ *+' conftest.er1 >conftest.err
19482 rm -f conftest.er1
19483 cat conftest.err >&5
19484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19485 (exit $ac_status); } &&
19486 { ac_try='test -z "$ac_c_werror_flag"
19487 || test ! -s conftest.err'
19488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19489 (eval $ac_try) 2>&5
19490 ac_status=$?
19491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19492 (exit $ac_status); }; } &&
19493 { ac_try='test -s conftest$ac_exeext'
19494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19495 (eval $ac_try) 2>&5
19496 ac_status=$?
19497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19498 (exit $ac_status); }; }; then
19499 ac_cv_lib_svld_dlopen=yes
19500else
19501 echo "$as_me: failed program was:" >&5
19502sed 's/^/| /' conftest.$ac_ext >&5
19503
19504ac_cv_lib_svld_dlopen=no
19505fi
19506rm -f conftest.err conftest.$ac_objext \
19507 conftest$ac_exeext conftest.$ac_ext
19508LIBS=$ac_check_lib_save_LIBS
19509fi
19510echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
19511echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
19512if test $ac_cv_lib_svld_dlopen = yes; then
19513 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
19514else
19515 echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
19516echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
19517if test "${ac_cv_lib_dld_dld_link+set}" = set; then
19518 echo $ECHO_N "(cached) $ECHO_C" >&6
19519else
19520 ac_check_lib_save_LIBS=$LIBS
19521LIBS="-ldld $LIBS"
19522cat >conftest.$ac_ext <<_ACEOF
19523/* confdefs.h. */
19524_ACEOF
19525cat confdefs.h >>conftest.$ac_ext
19526cat >>conftest.$ac_ext <<_ACEOF
19527/* end confdefs.h. */
19528
19529/* Override any gcc2 internal prototype to avoid an error. */
19530#ifdef __cplusplus
19531extern "C"
19532#endif
19533/* We use char because int might match the return type of a gcc2
19534 builtin and then its argument prototype would still apply. */
19535char dld_link ();
19536int
19537main ()
19538{
19539dld_link ();
19540 ;
19541 return 0;
19542}
19543_ACEOF
19544rm -f conftest.$ac_objext conftest$ac_exeext
19545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19546 (eval $ac_link) 2>conftest.er1
19547 ac_status=$?
19548 grep -v '^ *+' conftest.er1 >conftest.err
19549 rm -f conftest.er1
19550 cat conftest.err >&5
19551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19552 (exit $ac_status); } &&
19553 { ac_try='test -z "$ac_c_werror_flag"
19554 || test ! -s conftest.err'
19555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19556 (eval $ac_try) 2>&5
19557 ac_status=$?
19558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19559 (exit $ac_status); }; } &&
19560 { ac_try='test -s conftest$ac_exeext'
19561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19562 (eval $ac_try) 2>&5
19563 ac_status=$?
19564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19565 (exit $ac_status); }; }; then
19566 ac_cv_lib_dld_dld_link=yes
19567else
19568 echo "$as_me: failed program was:" >&5
19569sed 's/^/| /' conftest.$ac_ext >&5
19570
19571ac_cv_lib_dld_dld_link=no
19572fi
19573rm -f conftest.err conftest.$ac_objext \
19574 conftest$ac_exeext conftest.$ac_ext
19575LIBS=$ac_check_lib_save_LIBS
19576fi
19577echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
19578echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
19579if test $ac_cv_lib_dld_dld_link = yes; then
19580 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
19581fi
19582
19583
19584fi
19585
19586
19587fi
19588
19589
19590fi
19591
19592
19593fi
19594
19595
19596fi
19597
19598 ;;
19599 esac
19600
19601 if test "x$lt_cv_dlopen" != xno; then
19602 enable_dlopen=yes
19603 else
19604 enable_dlopen=no
19605 fi
19606
19607 case $lt_cv_dlopen in
19608 dlopen)
19609 save_CPPFLAGS="$CPPFLAGS"
19610 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
19611
19612 save_LDFLAGS="$LDFLAGS"
19613 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
19614
19615 save_LIBS="$LIBS"
19616 LIBS="$lt_cv_dlopen_libs $LIBS"
19617
19618 echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
19619echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
19620if test "${lt_cv_dlopen_self+set}" = set; then
19621 echo $ECHO_N "(cached) $ECHO_C" >&6
19622else
19623 if test "$cross_compiling" = yes; then :
19624 lt_cv_dlopen_self=cross
19625else
19626 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
19627 lt_status=$lt_dlunknown
19628 cat > conftest.$ac_ext <<_LT_EOF
f8c33439 19629#line 19629 "configure"
da0f6381
PB
19630#include "confdefs.h"
19631
19632#if HAVE_DLFCN_H
19633#include <dlfcn.h>
19634#endif
19635
19636#include <stdio.h>
19637
19638#ifdef RTLD_GLOBAL
19639# define LT_DLGLOBAL RTLD_GLOBAL
19640#else
19641# ifdef DL_GLOBAL
19642# define LT_DLGLOBAL DL_GLOBAL
19643# else
19644# define LT_DLGLOBAL 0
19645# endif
19646#endif
19647
19648/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
19649 find out it does not work in some platform. */
19650#ifndef LT_DLLAZY_OR_NOW
19651# ifdef RTLD_LAZY
19652# define LT_DLLAZY_OR_NOW RTLD_LAZY
19653# else
19654# ifdef DL_LAZY
19655# define LT_DLLAZY_OR_NOW DL_LAZY
19656# else
19657# ifdef RTLD_NOW
19658# define LT_DLLAZY_OR_NOW RTLD_NOW
19659# else
19660# ifdef DL_NOW
19661# define LT_DLLAZY_OR_NOW DL_NOW
19662# else
19663# define LT_DLLAZY_OR_NOW 0
19664# endif
19665# endif
19666# endif
19667# endif
19668#endif
19669
19670#ifdef __cplusplus
19671extern "C" void exit (int);
19672#endif
19673
19674void fnord() { int i=42;}
19675int main ()
19676{
19677 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
19678 int status = $lt_dlunknown;
19679
19680 if (self)
19681 {
19682 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
19683 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
19684 /* dlclose (self); */
19685 }
19686 else
19687 puts (dlerror ());
19688
19689 exit (status);
19690}
19691_LT_EOF
19692 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19693 (eval $ac_link) 2>&5
19694 ac_status=$?
19695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19696 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
19697 (./conftest; exit; ) >&5 2>/dev/null
19698 lt_status=$?
19699 case x$lt_status in
19700 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
19701 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
19702 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
19703 esac
19704 else :
19705 # compilation failed
19706 lt_cv_dlopen_self=no
19707 fi
19708fi
19709rm -fr conftest*
19710
19711
19712fi
19713echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
19714echo "${ECHO_T}$lt_cv_dlopen_self" >&6
19715
19716 if test "x$lt_cv_dlopen_self" = xyes; then
19717 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
19718 echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
19719echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
19720if test "${lt_cv_dlopen_self_static+set}" = set; then
19721 echo $ECHO_N "(cached) $ECHO_C" >&6
19722else
19723 if test "$cross_compiling" = yes; then :
19724 lt_cv_dlopen_self_static=cross
19725else
19726 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
19727 lt_status=$lt_dlunknown
19728 cat > conftest.$ac_ext <<_LT_EOF
f8c33439 19729#line 19729 "configure"
da0f6381
PB
19730#include "confdefs.h"
19731
19732#if HAVE_DLFCN_H
19733#include <dlfcn.h>
19734#endif
19735
19736#include <stdio.h>
19737
19738#ifdef RTLD_GLOBAL
19739# define LT_DLGLOBAL RTLD_GLOBAL
19740#else
19741# ifdef DL_GLOBAL
19742# define LT_DLGLOBAL DL_GLOBAL
19743# else
19744# define LT_DLGLOBAL 0
19745# endif
19746#endif
19747
19748/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
19749 find out it does not work in some platform. */
19750#ifndef LT_DLLAZY_OR_NOW
19751# ifdef RTLD_LAZY
19752# define LT_DLLAZY_OR_NOW RTLD_LAZY
19753# else
19754# ifdef DL_LAZY
19755# define LT_DLLAZY_OR_NOW DL_LAZY
19756# else
19757# ifdef RTLD_NOW
19758# define LT_DLLAZY_OR_NOW RTLD_NOW
19759# else
19760# ifdef DL_NOW
19761# define LT_DLLAZY_OR_NOW DL_NOW
19762# else
19763# define LT_DLLAZY_OR_NOW 0
19764# endif
19765# endif
19766# endif
19767# endif
19768#endif
19769
19770#ifdef __cplusplus
19771extern "C" void exit (int);
19772#endif
19773
19774void fnord() { int i=42;}
19775int main ()
19776{
19777 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
19778 int status = $lt_dlunknown;
19779
19780 if (self)
19781 {
19782 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
19783 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
19784 /* dlclose (self); */
19785 }
19786 else
19787 puts (dlerror ());
19788
19789 exit (status);
19790}
19791_LT_EOF
19792 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19793 (eval $ac_link) 2>&5
19794 ac_status=$?
19795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19796 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
19797 (./conftest; exit; ) >&5 2>/dev/null
19798 lt_status=$?
19799 case x$lt_status in
19800 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
19801 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
19802 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
19803 esac
19804 else :
19805 # compilation failed
19806 lt_cv_dlopen_self_static=no
19807 fi
19808fi
19809rm -fr conftest*
19810
19811
19812fi
19813echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
19814echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
19815 fi
19816
19817 CPPFLAGS="$save_CPPFLAGS"
19818 LDFLAGS="$save_LDFLAGS"
19819 LIBS="$save_LIBS"
19820 ;;
19821 esac
19822
19823 case $lt_cv_dlopen_self in
19824 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
19825 *) enable_dlopen_self=unknown ;;
19826 esac
19827
19828 case $lt_cv_dlopen_self_static in
19829 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
19830 *) enable_dlopen_self_static=unknown ;;
19831 esac
19832fi
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850striplib=
19851old_striplib=
19852echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
19853echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
19854if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
19855 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
19856 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
19857 echo "$as_me:$LINENO: result: yes" >&5
19858echo "${ECHO_T}yes" >&6
19859else
19860# FIXME - insert some real tests, host_os isn't really good enough
19861 case $host_os in
19862 darwin*)
19863 if test -n "$STRIP" ; then
19864 striplib="$STRIP -x"
19865 old_striplib="$STRIP -S"
19866 echo "$as_me:$LINENO: result: yes" >&5
19867echo "${ECHO_T}yes" >&6
19868 else
19869 echo "$as_me:$LINENO: result: no" >&5
19870echo "${ECHO_T}no" >&6
19871 fi
19872 ;;
19873 *)
19874 echo "$as_me:$LINENO: result: no" >&5
19875echo "${ECHO_T}no" >&6
19876 ;;
19877 esac
19878fi
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891 # Report which library types will actually be built
19892 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
19893echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
19894 echo "$as_me:$LINENO: result: $can_build_shared" >&5
19895echo "${ECHO_T}$can_build_shared" >&6
19896
19897 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
19898echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
19899 test "$can_build_shared" = "no" && enable_shared=no
19900
19901 # On AIX, shared libraries and static libraries use the same namespace, and
19902 # are all built from PIC.
19903 case $host_os in
19904 aix3*)
19905 test "$enable_shared" = yes && enable_static=no
19906 if test -n "$RANLIB"; then
19907 archive_cmds="$archive_cmds~\$RANLIB \$lib"
19908 postinstall_cmds='$RANLIB $lib'
19909 fi
19910 ;;
19911
19912 aix[4-9]*)
19913 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
19914 test "$enable_shared" = yes && enable_static=no
19915 fi
19916 ;;
19917 esac
19918 echo "$as_me:$LINENO: result: $enable_shared" >&5
19919echo "${ECHO_T}$enable_shared" >&6
19920
19921 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
19922echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
19923 # Make sure either enable_shared or enable_static is yes.
19924 test "$enable_shared" = yes || enable_static=yes
19925 echo "$as_me:$LINENO: result: $enable_static" >&5
19926echo "${ECHO_T}$enable_static" >&6
19927
19928
19929
19930
19931fi
19932ac_ext=c
19933ac_cpp='$CPP $CPPFLAGS'
19934ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19935ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19936ac_compiler_gnu=$ac_cv_c_compiler_gnu
19937
19938CC="$lt_save_CC"
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955# Only expand once:
19956
19957
19958
19959
19960
19961# Identify the assembler which will work hand-in-glove with the newly
19962# built GCC, so that we can examine its features. This is the assembler
19963# which will be driven by the driver program.
19964#
19965# If build != host, and we aren't building gas in-tree, we identify a
19966# build->target assembler and hope that it will have the same features
19967# as the host->target assembler we'll be using.
19968gcc_cv_gas_major_version=
19969gcc_cv_gas_minor_version=
19970gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
19971
19972if test "${gcc_cv_as+set}" = set; then
19973 :
19974else
19975
19976if test -x "$DEFAULT_ASSEMBLER"; then
19977 gcc_cv_as="$DEFAULT_ASSEMBLER"
19978elif test -f $gcc_cv_as_gas_srcdir/configure.in \
19979 && test -f ../gas/Makefile \
19980 && test x$build = x$host; then
19981 gcc_cv_as=../gas/as-new$build_exeext
19982elif test -x as$build_exeext; then
19983 # Build using assembler in the current directory.
19984 gcc_cv_as=./as$build_exeext
19985elif test -x $AS_FOR_TARGET; then
19986 gcc_cv_as="$AS_FOR_TARGET"
19987else
19988 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
19989set dummy $AS_FOR_TARGET; ac_word=$2
19990echo "$as_me:$LINENO: checking for $ac_word" >&5
19991echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19992if test "${ac_cv_path_gcc_cv_as+set}" = set; then
19993 echo $ECHO_N "(cached) $ECHO_C" >&6
19994else
19995 case $gcc_cv_as in
19996 [\\/]* | ?:[\\/]*)
19997 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
19998 ;;
19999 *)
20000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20001for as_dir in $PATH
20002do
20003 IFS=$as_save_IFS
20004 test -z "$as_dir" && as_dir=.
20005 for ac_exec_ext in '' $ac_executable_extensions; do
20006 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20007 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
20008 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20009 break 2
20010 fi
20011done
20012done
20013
20014 ;;
20015esac
20016fi
20017gcc_cv_as=$ac_cv_path_gcc_cv_as
20018
20019if test -n "$gcc_cv_as"; then
20020 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
20021echo "${ECHO_T}$gcc_cv_as" >&6
20022else
20023 echo "$as_me:$LINENO: result: no" >&5
20024echo "${ECHO_T}no" >&6
20025fi
20026
20027fi
20028fi
20029
20030
20031ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
20032
20033case "$ORIGINAL_AS_FOR_TARGET" in
20034 ./as | ./as$build_exeext) ;;
20035 *) ac_config_files="$ac_config_files as:exec-tool.in"
20036 ;;
20037esac
20038
20039echo "$as_me:$LINENO: checking what assembler to use" >&5
20040echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
20041if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
20042 # Single tree build which includes gas. We want to prefer it
20043 # over whatever linker top-level may have detected, since
20044 # we'll use what we're building after installation anyway.
20045 echo "$as_me:$LINENO: result: newly built gas" >&5
20046echo "${ECHO_T}newly built gas" >&6
20047 in_tree_gas=yes
20048 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20049for f in $gcc_cv_as_bfd_srcdir/configure \
20050 $gcc_cv_as_gas_srcdir/configure \
20051 $gcc_cv_as_gas_srcdir/configure.in \
20052 $gcc_cv_as_gas_srcdir/Makefile.in ; do
20053 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20054 if test x$gcc_cv_gas_version != x; then
20055 break
20056 fi
20057done
20058gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
20059gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20060gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
20061case $gcc_cv_gas_patch_version in
20062 "") gcc_cv_gas_patch_version="0" ;;
20063esac
20064gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
20065 + $gcc_cv_gas_minor_version \) \* 1000 \
20066 + $gcc_cv_gas_patch_version`
20067
20068 in_tree_gas_is_elf=no
20069 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
20070 || (grep 'obj_format = multi' ../gas/Makefile \
20071 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
20072 then
20073 in_tree_gas_is_elf=yes
20074 fi
20075else
20076 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
20077echo "${ECHO_T}$gcc_cv_as" >&6
20078 in_tree_gas=no
20079fi
20080
20081# Identify the linker which will work hand-in-glove with the newly
20082# built GCC, so that we can examine its features. This is the linker
20083# which will be driven by the driver program.
20084#
20085# If build != host, and we aren't building gas in-tree, we identify a
20086# build->target linker and hope that it will have the same features
20087# as the host->target linker we'll be using.
20088gcc_cv_gld_major_version=
20089gcc_cv_gld_minor_version=
20090gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
20091gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20092
20093if test "${gcc_cv_ld+set}" = set; then
20094 :
20095else
20096
20097if test -x "$DEFAULT_LINKER"; then
20098 gcc_cv_ld="$DEFAULT_LINKER"
20099elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
20100 && test -f ../ld/Makefile \
20101 && test x$build = x$host; then
20102 gcc_cv_ld=../ld/ld-new$build_exeext
e8b05380
PB
20103elif test -x collect-ld$build_exeext; then
20104 # Build using linker in the current directory.
20105 gcc_cv_ld=./collect-ld$build_exeext
20106elif test -x $LD_FOR_TARGET; then
20107 gcc_cv_ld="$LD_FOR_TARGET"
20108else
20109 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
20110set dummy $LD_FOR_TARGET; ac_word=$2
b61ff9c8
BS
20111echo "$as_me:$LINENO: checking for $ac_word" >&5
20112echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 20113if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
d739199a
DJ
20114 echo $ECHO_N "(cached) $ECHO_C" >&6
20115else
e8b05380 20116 case $gcc_cv_ld in
d739199a 20117 [\\/]* | ?:[\\/]*)
e8b05380 20118 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
20119 ;;
20120 *)
20121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20122for as_dir in $PATH
20123do
20124 IFS=$as_save_IFS
20125 test -z "$as_dir" && as_dir=.
20126 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 20127 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 20128 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
20129 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20130 break 2
20131 fi
20132done
20133done
20134
20135 ;;
20136esac
20137fi
e8b05380 20138gcc_cv_ld=$ac_cv_path_gcc_cv_ld
b61ff9c8 20139
e8b05380 20140if test -n "$gcc_cv_ld"; then
b61ff9c8
BS
20141 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
20142echo "${ECHO_T}$gcc_cv_ld" >&6
d739199a 20143else
b61ff9c8
BS
20144 echo "$as_me:$LINENO: result: no" >&5
20145echo "${ECHO_T}no" >&6
d739199a
DJ
20146fi
20147
20148fi
e8b05380
PB
20149fi
20150
20151
20152ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
20153
be0fe523
PB
20154case "$ORIGINAL_LD_FOR_TARGET" in
20155 ./collect-ld | ./collect-ld$build_exeext) ;;
b61ff9c8 20156 *) ac_config_files="$ac_config_files collect-ld:exec-tool.in"
be0fe523
PB
20157 ;;
20158esac
e8b05380 20159
b61ff9c8
BS
20160echo "$as_me:$LINENO: checking what linker to use" >&5
20161echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
e8b05380
PB
20162if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
20163 # Single tree build which includes ld. We want to prefer it
20164 # over whatever linker top-level may have detected, since
20165 # we'll use what we're building after installation anyway.
b61ff9c8
BS
20166 echo "$as_me:$LINENO: result: newly built ld" >&5
20167echo "${ECHO_T}newly built ld" >&6
e8b05380
PB
20168 in_tree_ld=yes
20169 in_tree_ld_is_elf=no
20170 if (grep 'EMUL = .*elf' ../ld/Makefile \
20171 || grep 'EMUL = .*linux' ../ld/Makefile \
20172 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
20173 in_tree_ld_is_elf=yes
20174 fi
20175 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
20176 do
20177 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20178 if test x$gcc_cv_gld_version != x; then
20179 break
20180 fi
20181 done
20182 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
20183 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20184else
b61ff9c8
BS
20185 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
20186echo "${ECHO_T}$gcc_cv_ld" >&6
e8b05380
PB
20187 in_tree_ld=no
20188fi
20189
20190# Figure out what nm we will be using.
20191gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
20192if test "${gcc_cv_nm+set}" = set; then
20193 :
20194else
20195
20196if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20197 && test -f ../binutils/Makefile \
20198 && test x$build = x$host; then
e8b05380
PB
20199 gcc_cv_nm=../binutils/nm-new$build_exeext
20200elif test -x nm$build_exeext; then
20201 gcc_cv_nm=./nm$build_exeext
20202elif test -x $NM_FOR_TARGET; then
20203 gcc_cv_nm="$NM_FOR_TARGET"
20204else
20205 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
20206set dummy $NM_FOR_TARGET; ac_word=$2
b61ff9c8
BS
20207echo "$as_me:$LINENO: checking for $ac_word" >&5
20208echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 20209if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
d739199a
DJ
20210 echo $ECHO_N "(cached) $ECHO_C" >&6
20211else
e8b05380 20212 case $gcc_cv_nm in
d739199a 20213 [\\/]* | ?:[\\/]*)
e8b05380 20214 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
20215 ;;
20216 *)
20217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20218for as_dir in $PATH
20219do
20220 IFS=$as_save_IFS
20221 test -z "$as_dir" && as_dir=.
20222 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 20223 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 20224 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
20225 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20226 break 2
20227 fi
20228done
20229done
20230
20231 ;;
20232esac
20233fi
e8b05380 20234gcc_cv_nm=$ac_cv_path_gcc_cv_nm
b61ff9c8 20235
e8b05380 20236if test -n "$gcc_cv_nm"; then
b61ff9c8
BS
20237 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
20238echo "${ECHO_T}$gcc_cv_nm" >&6
d739199a 20239else
b61ff9c8
BS
20240 echo "$as_me:$LINENO: result: no" >&5
20241echo "${ECHO_T}no" >&6
d739199a
DJ
20242fi
20243
20244fi
e8b05380 20245fi
d739199a 20246
e8b05380 20247
b61ff9c8
BS
20248echo "$as_me:$LINENO: checking what nm to use" >&5
20249echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
e8b05380
PB
20250if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
20251 # Single tree build which includes binutils.
b61ff9c8
BS
20252 echo "$as_me:$LINENO: result: newly built nm" >&5
20253echo "${ECHO_T}newly built nm" >&6
e8b05380
PB
20254 in_tree_nm=yes
20255else
b61ff9c8
BS
20256 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
20257echo "${ECHO_T}$gcc_cv_nm" >&6
e8b05380
PB
20258 in_tree_nm=no
20259fi
20260
20261ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
20262
be0fe523
PB
20263case "$ORIGINAL_NM_FOR_TARGET" in
20264 ./nm | ./nm$build_exeext) ;;
b61ff9c8 20265 *) ac_config_files="$ac_config_files nm:exec-tool.in"
be0fe523
PB
20266 ;;
20267esac
20268
e8b05380
PB
20269
20270# Figure out what objdump we will be using.
20271if test "${gcc_cv_objdump+set}" = set; then
20272 :
20273else
20274
20275if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20276 && test -f ../binutils/Makefile \
20277 && test x$build = x$host; then
e8b05380
PB
20278 # Single tree build which includes binutils.
20279 gcc_cv_objdump=../binutils/objdump$build_exeext
20280elif test -x objdump$build_exeext; then
20281 gcc_cv_objdump=./objdump$build_exeext
20282elif test -x $OBJDUMP_FOR_TARGET; then
20283 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
20284else
20285 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
20286set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
b61ff9c8
BS
20287echo "$as_me:$LINENO: checking for $ac_word" >&5
20288echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 20289if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
9f18db39
PB
20290 echo $ECHO_N "(cached) $ECHO_C" >&6
20291else
e8b05380 20292 case $gcc_cv_objdump in
9f18db39 20293 [\\/]* | ?:[\\/]*)
e8b05380 20294 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
20295 ;;
20296 *)
20297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 20298for as_dir in $PATH
9f18db39
PB
20299do
20300 IFS=$as_save_IFS
20301 test -z "$as_dir" && as_dir=.
20302 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 20303 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 20304 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
9f18db39
PB
20305 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20306 break 2
20307 fi
20308done
20309done
779243f7 20310
9f18db39
PB
20311 ;;
20312esac
20313fi
e8b05380 20314gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
b61ff9c8 20315
e8b05380 20316if test -n "$gcc_cv_objdump"; then
b61ff9c8
BS
20317 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
20318echo "${ECHO_T}$gcc_cv_objdump" >&6
9f18db39 20319else
b61ff9c8
BS
20320 echo "$as_me:$LINENO: result: no" >&5
20321echo "${ECHO_T}no" >&6
9f18db39
PB
20322fi
20323
e8b05380
PB
20324fi
20325fi
9f18db39 20326
e8b05380 20327
b61ff9c8
BS
20328echo "$as_me:$LINENO: checking what objdump to use" >&5
20329echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
e8b05380
PB
20330if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
20331 # Single tree build which includes binutils.
b61ff9c8
BS
20332 echo "$as_me:$LINENO: result: newly built objdump" >&5
20333echo "${ECHO_T}newly built objdump" >&6
e8b05380 20334elif test x$gcc_cv_objdump = x; then
b61ff9c8
BS
20335 echo "$as_me:$LINENO: result: not found" >&5
20336echo "${ECHO_T}not found" >&6
e8b05380 20337else
b61ff9c8
BS
20338 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
20339echo "${ECHO_T}$gcc_cv_objdump" >&6
a2eafc76 20340fi
3cae5780 20341
981d4858 20342# Figure out what assembler alignment features are present.
b61ff9c8
BS
20343echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
20344echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
ba479fd2
NN
20345if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
20346 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20347else
20348 gcc_cv_as_balign_and_p2align=no
20349 if test $in_tree_gas = yes; then
20350 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
20351 then gcc_cv_as_balign_and_p2align=yes
20352fi
20353 elif test x$gcc_cv_as != x; then
6e3f3080 20354 echo '.balign 4
8ada417f 20355.p2align 2' > conftest.s
ba479fd2
NN
20356 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20358 (eval $ac_try) 2>&5
20359 ac_status=$?
20360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20361 (exit $ac_status); }; }
8ada417f
ZW
20362 then
20363 gcc_cv_as_balign_and_p2align=yes
20364 else
20365 echo "configure: failed program was" >&5
20366 cat conftest.s >&5
20367 fi
20368 rm -f conftest.o conftest.s
20369 fi
20370fi
b61ff9c8
BS
20371echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
20372echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 20373if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
20374
20375cat >>confdefs.h <<\_ACEOF
981d4858 20376#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 20377_ACEOF
981d4858 20378
ad9c4d9f
NN
20379fi
20380
b61ff9c8
BS
20381echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
20382echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
ba479fd2
NN
20383if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
20384 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20385else
20386 gcc_cv_as_max_skip_p2align=no
20387 if test $in_tree_gas = yes; then
20388 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
20389 then gcc_cv_as_max_skip_p2align=yes
20390fi
20391 elif test x$gcc_cv_as != x; then
6e3f3080 20392 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
20393 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20395 (eval $ac_try) 2>&5
20396 ac_status=$?
20397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20398 (exit $ac_status); }; }
8ada417f
ZW
20399 then
20400 gcc_cv_as_max_skip_p2align=yes
20401 else
20402 echo "configure: failed program was" >&5
20403 cat conftest.s >&5
20404 fi
20405 rm -f conftest.o conftest.s
20406 fi
ad9c4d9f 20407fi
b61ff9c8
BS
20408echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
20409echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 20410if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
20411
20412cat >>confdefs.h <<\_ACEOF
9e423e6d 20413#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 20414_ACEOF
9e423e6d 20415
9e423e6d 20416fi
ad9c4d9f 20417
b61ff9c8
BS
20418echo "$as_me:$LINENO: checking assembler for .literal16" >&5
20419echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6
5708d18d
MS
20420if test "${gcc_cv_as_literal16+set}" = set; then
20421 echo $ECHO_N "(cached) $ECHO_C" >&6
20422else
20423 gcc_cv_as_literal16=no
20424 if test $in_tree_gas = yes; then
20425 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
20426 then gcc_cv_as_literal16=yes
20427fi
20428 elif test x$gcc_cv_as != x; then
20429 echo '.literal16' > conftest.s
20430 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20432 (eval $ac_try) 2>&5
20433 ac_status=$?
20434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20435 (exit $ac_status); }; }
20436 then
20437 gcc_cv_as_literal16=yes
20438 else
20439 echo "configure: failed program was" >&5
20440 cat conftest.s >&5
20441 fi
20442 rm -f conftest.o conftest.s
20443 fi
20444fi
b61ff9c8
BS
20445echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5
20446echo "${ECHO_T}$gcc_cv_as_literal16" >&6
5708d18d
MS
20447if test $gcc_cv_as_literal16 = yes; then
20448
20449cat >>confdefs.h <<\_ACEOF
20450#define HAVE_GAS_LITERAL16 1
20451_ACEOF
20452
20453fi
20454
b61ff9c8
BS
20455echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
20456echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
ba479fd2
NN
20457if test "${gcc_cv_as_subsection_m1+set}" = set; then
20458 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20459else
20460 gcc_cv_as_subsection_m1=no
20461 if test $in_tree_gas = yes; then
20462 if test $in_tree_gas_is_elf = yes \
20463 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
20464 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 20465fi
8ada417f 20466 elif test x$gcc_cv_as != x; then
6e3f3080 20467 echo 'conftest_label1: .word 0
d1accaa3
JJ
20468.subsection -1
20469conftest_label2: .word 0
8ada417f 20470.previous' > conftest.s
ba479fd2
NN
20471 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20473 (eval $ac_try) 2>&5
20474 ac_status=$?
20475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20476 (exit $ac_status); }; }
8ada417f
ZW
20477 then
20478 if test x$gcc_cv_nm != x; then
20479 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
20480 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
20481 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
20482 then :
20483 else gcc_cv_as_subsection_m1=yes
20484 fi
20485 rm -f conftest.nm1 conftest.nm2
20486 fi
20487 else
20488 echo "configure: failed program was" >&5
20489 cat conftest.s >&5
20490 fi
20491 rm -f conftest.o conftest.s
20492 fi
981d4858 20493fi
b61ff9c8
BS
20494echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
20495echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 20496if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
20497
20498cat >>confdefs.h <<\_ACEOF
981d4858 20499#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 20500_ACEOF
981d4858 20501
d1accaa3 20502fi
ad9c4d9f 20503
b61ff9c8
BS
20504echo "$as_me:$LINENO: checking assembler for .weak" >&5
20505echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
ba479fd2
NN
20506if test "${gcc_cv_as_weak+set}" = set; then
20507 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20508else
20509 gcc_cv_as_weak=no
20510 if test $in_tree_gas = yes; then
20511 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
20512 then gcc_cv_as_weak=yes
ad9c4d9f 20513fi
8ada417f 20514 elif test x$gcc_cv_as != x; then
6e3f3080 20515 echo ' .weak foobar' > conftest.s
ba479fd2
NN
20516 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20518 (eval $ac_try) 2>&5
20519 ac_status=$?
20520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20521 (exit $ac_status); }; }
8ada417f
ZW
20522 then
20523 gcc_cv_as_weak=yes
20524 else
20525 echo "configure: failed program was" >&5
20526 cat conftest.s >&5
20527 fi
20528 rm -f conftest.o conftest.s
20529 fi
981d4858 20530fi
b61ff9c8
BS
20531echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
20532echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 20533if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
20534
20535cat >>confdefs.h <<\_ACEOF
981d4858 20536#define HAVE_GAS_WEAK 1
ba479fd2 20537_ACEOF
981d4858 20538
12822146 20539fi
ad9c4d9f 20540
b61ff9c8
BS
20541echo "$as_me:$LINENO: checking assembler for .weakref" >&5
20542echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
a0203ca7
AO
20543if test "${gcc_cv_as_weakref+set}" = set; then
20544 echo $ECHO_N "(cached) $ECHO_C" >&6
20545else
20546 gcc_cv_as_weakref=no
20547 if test $in_tree_gas = yes; then
20548 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
20549 then gcc_cv_as_weakref=yes
20550fi
20551 elif test x$gcc_cv_as != x; then
20552 echo ' .weakref foobar, barfnot' > conftest.s
20553 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20555 (eval $ac_try) 2>&5
20556 ac_status=$?
20557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20558 (exit $ac_status); }; }
20559 then
20560 gcc_cv_as_weakref=yes
20561 else
20562 echo "configure: failed program was" >&5
20563 cat conftest.s >&5
20564 fi
20565 rm -f conftest.o conftest.s
20566 fi
20567fi
b61ff9c8
BS
20568echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
20569echo "${ECHO_T}$gcc_cv_as_weakref" >&6
a0203ca7
AO
20570if test $gcc_cv_as_weakref = yes; then
20571
20572cat >>confdefs.h <<\_ACEOF
20573#define HAVE_GAS_WEAKREF 1
20574_ACEOF
20575
20576fi
20577
b61ff9c8
BS
20578echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
20579echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
e41f3691
JDA
20580if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
20581 echo $ECHO_N "(cached) $ECHO_C" >&6
20582else
20583 gcc_cv_as_nsubspa_comdat=no
20584 if test $in_tree_gas = yes; then
20585 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
20586 then gcc_cv_as_nsubspa_comdat=yes
20587fi
20588 elif test x$gcc_cv_as != x; then
20589 echo ' .SPACE $TEXT$
20590 .NSUBSPA $CODE$,COMDAT' > conftest.s
20591 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20593 (eval $ac_try) 2>&5
20594 ac_status=$?
20595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20596 (exit $ac_status); }; }
20597 then
20598 gcc_cv_as_nsubspa_comdat=yes
20599 else
20600 echo "configure: failed program was" >&5
20601 cat conftest.s >&5
20602 fi
20603 rm -f conftest.o conftest.s
20604 fi
20605fi
b61ff9c8
BS
20606echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
20607echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
e41f3691
JDA
20608if test $gcc_cv_as_nsubspa_comdat = yes; then
20609
20610cat >>confdefs.h <<\_ACEOF
20611#define HAVE_GAS_NSUBSPA_COMDAT 1
20612_ACEOF
20613
20614fi
20615
8ada417f
ZW
20616# .hidden needs to be supported in both the assembler and the linker,
20617# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
20618# This is irritatingly difficult to feature test for; we have to check the
20619# date string after the version number. If we've got an in-tree
20620# ld, we don't know its patchlevel version, so we set the baseline at 2.13
20621# to be safe.
20622# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
b61ff9c8
BS
20623echo "$as_me:$LINENO: checking assembler for .hidden" >&5
20624echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
ba479fd2
NN
20625if test "${gcc_cv_as_hidden+set}" = set; then
20626 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20627else
20628 gcc_cv_as_hidden=no
20629 if test $in_tree_gas = yes; then
20630 if test $in_tree_gas_is_elf = yes \
20631 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
20632 then gcc_cv_as_hidden=yes
20633fi
20634 elif test x$gcc_cv_as != x; then
6e3f3080 20635 echo ' .hidden foobar
8ada417f 20636foobar:' > conftest.s
ba479fd2
NN
20637 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20639 (eval $ac_try) 2>&5
20640 ac_status=$?
20641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20642 (exit $ac_status); }; }
8ada417f
ZW
20643 then
20644 gcc_cv_as_hidden=yes
20645 else
20646 echo "configure: failed program was" >&5
20647 cat conftest.s >&5
20648 fi
20649 rm -f conftest.o conftest.s
20650 fi
20651fi
b61ff9c8
BS
20652echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
20653echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 20654
ad9c4d9f 20655
b61ff9c8
BS
20656echo "$as_me:$LINENO: checking linker for .hidden support" >&5
20657echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
ba479fd2
NN
20658if test "${gcc_cv_ld_hidden+set}" = set; then
20659 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20660else
20661 if test $in_tree_ld = yes ; then
20662 gcc_cv_ld_hidden=no
20663 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 \
20664 && test $in_tree_ld_is_elf = yes; then
20665 gcc_cv_ld_hidden=yes
20666 fi
20667else
20668 gcc_cv_ld_hidden=yes
bace148a 20669 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
20670 if echo "$ld_ver" | grep GNU > /dev/null; then
20671 ld_vers=`echo $ld_ver | sed -n \
115e6e55 20672 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
8ada417f 20673 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
20674 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
20675 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
20676 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
20677 if test 0"$ld_date" -lt 20020404; then
20678 if test -n "$ld_date"; then
20679 # If there was date string, but was earlier than 2002-04-04, fail
20680 gcc_cv_ld_hidden=no
20681 elif test -z "$ld_vers"; then
20682 # If there was no date string nor ld version number, something is wrong
20683 gcc_cv_ld_hidden=no
20684 else
8ada417f
ZW
20685 test -z "$ld_vers_patch" && ld_vers_patch=0
20686 if test "$ld_vers_major" -lt 2; then
20687 gcc_cv_ld_hidden=no
20688 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
20689 gcc_cv_ld_hidden="no"
20690 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
20691 gcc_cv_ld_hidden=no
c72931a6 20692 fi
8ada417f 20693 fi
789b7de5 20694 fi
8ada417f 20695 else
28690784 20696 case "${target}" in
b0fd7d27 20697 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
20698 gcc_cv_ld_hidden=yes
20699 ;;
20700 *)
20701 gcc_cv_ld_hidden=no
20702 ;;
20703 esac
8ada417f
ZW
20704 fi
20705fi
6d07784a 20706fi
b61ff9c8
BS
20707echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
20708echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 20709libgcc_visibility=no
ad9c4d9f 20710
232b67d9 20711
8e3940b2 20712if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 20713 libgcc_visibility=yes
ba479fd2
NN
20714
20715cat >>confdefs.h <<\_ACEOF
8ada417f 20716#define HAVE_GAS_HIDDEN 1
ba479fd2 20717_ACEOF
ad9c4d9f
NN
20718
20719fi
20720
8ada417f 20721# Check if we have .[us]leb128, and support symbol arithmetic with it.
b61ff9c8
BS
20722echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
20723echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
ba479fd2
NN
20724if test "${gcc_cv_as_leb128+set}" = set; then
20725 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20726else
20727 gcc_cv_as_leb128=no
20728 if test $in_tree_gas = yes; then
20729 if test $in_tree_gas_is_elf = yes \
20730 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
20731 then gcc_cv_as_leb128=yes
20732fi
20733 elif test x$gcc_cv_as != x; then
6e3f3080 20734 echo ' .data
b7460f24
RH
20735 .uleb128 L2 - L1
20736L1:
20737 .uleb128 1280
20738 .sleb128 -1010
8ada417f 20739L2:' > conftest.s
ba479fd2
NN
20740 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20742 (eval $ac_try) 2>&5
20743 ac_status=$?
20744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20745 (exit $ac_status); }; }
8ada417f
ZW
20746 then
20747 # GAS versions before 2.11 do not support uleb128,
20748 # despite appearing to.
20749 # ??? There exists an elf-specific test that will crash
20750 # the assembler. Perhaps it's better to figure out whether
20751 # arbitrary sections are supported and try the test.
bace148a 20752 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f 20753 if echo "$as_ver" | grep GNU > /dev/null; then
ddcd0f6f 20754 as_vers=`echo $as_ver | sed -n \
115e6e55 20755 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
ddcd0f6f
BS
20756 as_major=`expr "$as_vers" : '\([0-9]*\)'`
20757 as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
20758 if test $as_major -eq 2 && test $as_minor -lt 11
20759 then :
20760 else gcc_cv_as_leb128=yes
20761 fi
20762 fi
20763 else
20764 echo "configure: failed program was" >&5
20765 cat conftest.s >&5
20766 fi
20767 rm -f conftest.o conftest.s
20768 fi
b7460f24 20769fi
b61ff9c8
BS
20770echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
20771echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 20772if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
20773
20774cat >>confdefs.h <<\_ACEOF
b7460f24 20775#define HAVE_AS_LEB128 1
ba479fd2 20776_ACEOF
b7460f24
RH
20777
20778fi
ad9c4d9f 20779
8ada417f
ZW
20780# GAS versions up to and including 2.11.0 may mis-optimize
20781# .eh_frame data.
b61ff9c8
BS
20782echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
20783echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
ba479fd2
NN
20784if test "${gcc_cv_as_eh_frame+set}" = set; then
20785 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20786else
20787 gcc_cv_as_eh_frame=no
20788 if test $in_tree_gas = yes; then
20789 if test $in_tree_gas_is_elf = yes \
20790 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
20791 then gcc_cv_as_eh_frame=yes
ad9c4d9f 20792fi
8ada417f 20793 elif test x$gcc_cv_as != x; then
6e3f3080 20794 echo ' .text
c64688ae
RH
20795.LFB1:
20796 .4byte 0
20797.L1:
20798 .4byte 0
20799.LFE1:
20800 .section .eh_frame,"aw",@progbits
20801__FRAME_BEGIN__:
20802 .4byte .LECIE1-.LSCIE1
20803.LSCIE1:
20804 .4byte 0x0
20805 .byte 0x1
20806 .ascii "z\0"
20807 .byte 0x1
20808 .byte 0x78
20809 .byte 0x1a
20810 .byte 0x0
20811 .byte 0x4
20812 .4byte 1
20813 .p2align 1
20814.LECIE1:
20815.LSFDE1:
20816 .4byte .LEFDE1-.LASFDE1
20817.LASFDE1:
20818 .4byte .LASFDE1-__FRAME_BEGIN__
20819 .4byte .LFB1
20820 .4byte .LFE1-.LFB1
20821 .byte 0x4
20822 .4byte .LFE1-.LFB1
20823 .byte 0x4
20824 .4byte .L1-.LFB1
8ada417f 20825.LEFDE1:' > conftest.s
ba479fd2
NN
20826 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20828 (eval $ac_try) 2>&5
20829 ac_status=$?
20830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20831 (exit $ac_status); }; }
8ada417f
ZW
20832 then
20833 cat > conftest.lit <<EOF
c64688ae
RH
20834 0000 10000000 00000000 017a0001 781a0004 .........z..x...
20835 0010 01000000 12000000 18000000 00000000 ................
093e61a6 20836 0020 08000000 04080000 0044 .........D
01efb963 20837EOF
ba479fd2 20838cat > conftest.big <<EOF
01efb963
AS
20839 0000 00000010 00000000 017a0001 781a0004 .........z..x...
20840 0010 00000001 00000012 00000018 00000000 ................
093e61a6 20841 0020 00000008 04000000 0844 .........D
c64688ae 20842EOF
8ada417f
ZW
20843 # If the assembler didn't choke, and we can objdump,
20844 # and we got the correct data, then succeed.
dbc02e7f
AS
20845 # The text in the here-document typically retains its unix-style line
20846 # endings, while the output of objdump will use host line endings.
20847 # Therefore, use diff -b for the comparisons.
8ada417f
ZW
20848 if test x$gcc_cv_objdump != x \
20849 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
20850 | tail -3 > conftest.got \
dbc02e7f
AS
20851 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
20852 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
8ada417f
ZW
20853 then
20854 gcc_cv_as_eh_frame=yes
ba479fd2
NN
20855 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
20856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20857 (eval $ac_try) 2>&5
20858 ac_status=$?
20859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20860 (exit $ac_status); }; }; then
8ada417f
ZW
20861 gcc_cv_as_eh_frame=buggy
20862 else
20863 # Uh oh, what do we do now?
20864 gcc_cv_as_eh_frame=no
20865 fi
20866 else
20867 echo "configure: failed program was" >&5
20868 cat conftest.s >&5
20869 fi
20870 rm -f conftest.o conftest.s
20871 fi
c64688ae 20872fi
b61ff9c8
BS
20873echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
20874echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 20875
6e3f3080 20876
63cf211a 20877if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
20878
20879cat >>confdefs.h <<\_ACEOF
8ada417f 20880#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 20881_ACEOF
ad9c4d9f
NN
20882
20883fi
20884
b61ff9c8
BS
20885echo "$as_me:$LINENO: checking assembler for section merging support" >&5
20886echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
ba479fd2
NN
20887if test "${gcc_cv_as_shf_merge+set}" = set; then
20888 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20889else
20890 gcc_cv_as_shf_merge=no
20891 if test $in_tree_gas = yes; then
20892 if test $in_tree_gas_is_elf = yes \
20893 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
20894 then gcc_cv_as_shf_merge=yes
20895fi
20896 elif test x$gcc_cv_as != x; then
6e3f3080 20897 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
20898 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
20899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20900 (eval $ac_try) 2>&5
20901 ac_status=$?
20902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20903 (exit $ac_status); }; }
8ada417f
ZW
20904 then
20905 gcc_cv_as_shf_merge=yes
20906 else
20907 echo "configure: failed program was" >&5
20908 cat conftest.s >&5
20909 fi
20910 rm -f conftest.o conftest.s
20911 fi
201556f0 20912fi
b61ff9c8
BS
20913echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
20914echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 20915
c18a5b6c 20916if test $gcc_cv_as_shf_merge = no; then
b61ff9c8
BS
20917 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
20918echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
c18a5b6c
MM
20919if test "${gcc_cv_as_shf_merge+set}" = set; then
20920 echo $ECHO_N "(cached) $ECHO_C" >&6
20921else
20922 gcc_cv_as_shf_merge=no
20923 if test $in_tree_gas = yes; then
20924 if test $in_tree_gas_is_elf = yes \
20925 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
20926 then gcc_cv_as_shf_merge=yes
20927fi
20928 elif test x$gcc_cv_as != x; then
20929 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
20930 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
20931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20932 (eval $ac_try) 2>&5
20933 ac_status=$?
20934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20935 (exit $ac_status); }; }
20936 then
20937 gcc_cv_as_shf_merge=yes
20938 else
20939 echo "configure: failed program was" >&5
20940 cat conftest.s >&5
20941 fi
20942 rm -f conftest.o conftest.s
20943 fi
20944fi
b61ff9c8
BS
20945echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
20946echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
c18a5b6c
MM
20947
20948fi
8ad9fb33 20949
ba479fd2 20950cat >>confdefs.h <<_ACEOF
8ad9fb33 20951#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 20952_ACEOF
201556f0 20953
201556f0 20954
b61ff9c8
BS
20955echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
20956echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
20957if test "${gcc_cv_as_comdat_group+set}" = set; then
20958 echo $ECHO_N "(cached) $ECHO_C" >&6
20959else
20960 gcc_cv_as_comdat_group=no
20961 if test $in_tree_gas = yes; then
20962 if test $in_tree_gas_is_elf = yes \
11176d2a 20963 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
20964 then gcc_cv_as_comdat_group=yes
20965fi
20966 elif test x$gcc_cv_as != x; then
20967 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
20968 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
20969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20970 (eval $ac_try) 2>&5
20971 ac_status=$?
20972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20973 (exit $ac_status); }; }
20974 then
20975 gcc_cv_as_comdat_group=yes
20976 else
20977 echo "configure: failed program was" >&5
20978 cat conftest.s >&5
20979 fi
20980 rm -f conftest.o conftest.s
20981 fi
20982fi
b61ff9c8
BS
20983echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
20984echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
c18a5b6c
MM
20985
20986if test $gcc_cv_as_comdat_group = yes; then
20987 gcc_cv_as_comdat_group_percent=no
20988else
b61ff9c8
BS
20989 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
20990echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
20991if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
20992 echo $ECHO_N "(cached) $ECHO_C" >&6
20993else
20994 gcc_cv_as_comdat_group_percent=no
20995 if test $in_tree_gas = yes; then
20996 if test $in_tree_gas_is_elf = yes \
11176d2a 20997 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
20998 then gcc_cv_as_comdat_group_percent=yes
20999fi
21000 elif test x$gcc_cv_as != x; then
21001 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
21002 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
21003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21004 (eval $ac_try) 2>&5
21005 ac_status=$?
21006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21007 (exit $ac_status); }; }
21008 then
21009 gcc_cv_as_comdat_group_percent=yes
21010 else
21011 echo "configure: failed program was" >&5
21012 cat conftest.s >&5
21013 fi
21014 rm -f conftest.o conftest.s
21015 fi
21016fi
b61ff9c8
BS
21017echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
21018echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
c18a5b6c
MM
21019
21020fi
11176d2a
JB
21021if test $in_tree_ld != yes && test x"$ld_vers" != x; then
21022 comdat_group=yes
21023 if test 0"$ld_date" -lt 20050308; then
21024 if test -n "$ld_date"; then
21025 # If there was date string, but was earlier than 2005-03-08, fail
21026 comdat_group=no
21027 elif test "$ld_vers_major" -lt 2; then
21028 comdat_group=no
21029 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
21030 comdat_group=no
21031 fi
21032 fi
1cf0118d
RO
21033else
21034 # assume linkers other than GNU ld don't support COMDAT group
21035 comdat_group=no
21036fi
21037if test $comdat_group = no; then
21038 gcc_cv_as_comdat_group=no
21039 gcc_cv_as_comdat_group_percent=no
11176d2a 21040fi
c18a5b6c
MM
21041
21042cat >>confdefs.h <<_ACEOF
11176d2a 21043#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
21044_ACEOF
21045
21046
8ada417f 21047# Thread-local storage - the check is heavily parametrized.
f996902d
RH
21048conftest_s=
21049tls_first_major=
21050tls_first_minor=
9739c90c 21051tls_as_opt=
f996902d 21052case "$target" in
6f9b006d
RH
21053 alpha*-*-*)
21054 conftest_s='
21055 .section ".tdata","awT",@progbits
21056foo: .long 25
21057 .text
21058 ldq $27,__tls_get_addr($29) !literal!1
21059 lda $16,foo($29) !tlsgd!1
21060 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
21061 ldq $27,__tls_get_addr($29) !literal!2
21062 lda $16,foo($29) !tlsldm!2
21063 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
21064 ldq $1,foo($29) !gotdtprel
21065 ldah $2,foo($29) !dtprelhi
21066 lda $3,foo($2) !dtprello
21067 lda $4,foo($29) !dtprel
21068 ldq $1,foo($29) !gottprel
21069 ldah $2,foo($29) !tprelhi
21070 lda $3,foo($2) !tprello
21071 lda $4,foo($29) !tprel'
21072 tls_first_major=2
21073 tls_first_minor=13
2f3321ca 21074 tls_as_opt=--fatal-warnings
6f9b006d 21075 ;;
e4dd71de
AH
21076 frv*-*-*)
21077 conftest_s='
21078 .section ".tdata","awT",@progbits
21079x: .long 25
21080 .text
21081 call #gettlsoff(x)'
21082 tls_first_major=2
21083 tls_first_minor=14
21084 ;;
51076f96
RC
21085 hppa*-*-linux*)
21086 conftest_s='
21087t1: .reg %r20
21088t2: .reg %r21
21089gp: .reg %r19
21090 .section ".tdata","awT",@progbits
21091foo: .long 25
21092 .text
21093 .align 4
21094 addil LT%foo-$tls_gdidx$,gp
21095 ldo RT%foo-$tls_gdidx$(%r1),%arg0
21096 b __tls_get_addr
21097 nop
21098 addil LT%foo-$tls_ldidx$,gp
21099 b __tls_get_addr
21100 ldo RT%foo-$tls_ldidx$(%r1),%arg0
21101 addil LR%foo-$tls_dtpoff$,%ret0
21102 ldo RR%foo-$tls_dtpoff$(%r1),%t1
21103 mfctl %cr27,%t1
21104 addil LT%foo-$tls_ieoff$,gp
21105 ldw RT%foo-$tls_ieoff$(%r1),%t2
21106 add %t1,%t2,%t3
21107 mfctl %cr27,%t1
21108 addil LR%foo-$tls_leoff$,%t1
21109 ldo RR%foo-$tls_leoff$(%r1),%t2'
21110 tls_first_major=2
21111 tls_first_minor=15
21112 tls_as_opt=--fatal-warnings
21113 ;;
d3585b76
DJ
21114 arm*-*-*)
21115 conftest_s='
21116 .section ".tdata","awT",%progbits
21117foo: .long 25
21118 .text
21119.word foo(gottpoff)
21120.word foo(tpoff)
21121.word foo(tlsgd)
21122.word foo(tlsldm)
21123.word foo(tlsldo)'
21124 tls_first_major=2
21125 tls_first_minor=17
21126 ;;
f996902d
RH
21127 i[34567]86-*-*)
21128 conftest_s='
21129 .section ".tdata","awT",@progbits
21130foo: .long 25
21131 .text
21132 movl %gs:0, %eax
21133 leal foo@TLSGD(,%ebx,1), %eax
21134 leal foo@TLSLDM(%ebx), %eax
21135 leal foo@DTPOFF(%eax), %edx
21136 movl foo@GOTTPOFF(%ebx), %eax
21137 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
21138 addl foo@GOTNTPOFF(%ebx), %eax
21139 movl foo@INDNTPOFF, %eax
f996902d
RH
21140 movl $foo@TPOFF, %eax
21141 subl $foo@TPOFF, %eax
21142 leal foo@NTPOFF(%ecx), %eax'
21143 tls_first_major=2
75d38379 21144 tls_first_minor=14
2f3321ca 21145 tls_as_opt=--fatal-warnings
75d38379
JJ
21146 ;;
21147 x86_64-*-*)
21148 conftest_s='
21149 .section ".tdata","awT",@progbits
21150foo: .long 25
21151 .text
21152 movq %fs:0, %rax
21153 leaq foo@TLSGD(%rip), %rdi
21154 leaq foo@TLSLD(%rip), %rdi
21155 leaq foo@DTPOFF(%rax), %rdx
21156 movq foo@GOTTPOFF(%rip), %rax
21157 movq $foo@TPOFF, %rax'
21158 tls_first_major=2
21159 tls_first_minor=14
2f3321ca 21160 tls_as_opt=--fatal-warnings
f996902d 21161 ;;
7b6e506e
RH
21162 ia64-*-*)
21163 conftest_s='
21164 .section ".tdata","awT",@progbits
21165foo: data8 25
21166 .text
21167 addl r16 = @ltoff(@dtpmod(foo#)), gp
21168 addl r17 = @ltoff(@dtprel(foo#)), gp
21169 addl r18 = @ltoff(@tprel(foo#)), gp
21170 addl r19 = @dtprel(foo#), gp
21171 adds r21 = @dtprel(foo#), r13
21172 movl r23 = @dtprel(foo#)
21173 addl r20 = @tprel(foo#), gp
21174 adds r22 = @tprel(foo#), r13
21175 movl r24 = @tprel(foo#)'
21176 tls_first_major=2
21177 tls_first_minor=13
2f3321ca 21178 tls_as_opt=--fatal-warnings
7b6e506e 21179 ;;
69229b81
DJ
21180 mips*-*-*)
21181 conftest_s='
21182 .section .tdata,"awT",@progbits
21183x:
21184 .word 2
21185 .text
21186 addiu $4, $28, %tlsgd(x)
21187 addiu $4, $28, %tlsldm(x)
21188 lui $4, %dtprel_hi(x)
21189 addiu $4, $4, %dtprel_lo(x)
21190 lw $4, %gottprel(x)($28)
21191 lui $4, %tprel_hi(x)
21192 addiu $4, $4, %tprel_lo(x)'
21193 tls_first_major=2
21194 tls_first_minor=16
21195 tls_as_opt='-32 --fatal-warnings'
21196 ;;
c4501e62
JJ
21197 powerpc-*-*)
21198 conftest_s='
21199 .section ".tdata","awT",@progbits
21200 .align 2
21201ld0: .space 4
21202ld1: .space 4
21203x1: .space 4
21204x2: .space 4
21205x3: .space 4
21206 .text
21207 addi 3,31,ld0@got@tlsgd
21208 bl __tls_get_addr
21209 addi 3,31,x1@got@tlsld
21210 bl __tls_get_addr
21211 addi 9,3,x1@dtprel
21212 addis 9,3,x2@dtprel@ha
21213 addi 9,9,x2@dtprel@l
21214 lwz 9,x3@got@tprel(31)
21215 add 9,9,x@tls
21216 addi 9,2,x1@tprel
21217 addis 9,2,x2@tprel@ha
21218 addi 9,9,x2@tprel@l'
21219 tls_first_major=2
21220 tls_first_minor=14
2f3321ca 21221 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
21222 ;;
21223 powerpc64-*-*)
21224 conftest_s='
21225 .section ".tdata","awT",@progbits
21226 .align 3
21227ld0: .space 8
21228ld1: .space 8
21229x1: .space 8
21230x2: .space 8
21231x3: .space 8
21232 .text
21233 addi 3,2,ld0@got@tlsgd
21234 bl .__tls_get_addr
21235 nop
21236 addi 3,2,ld1@toc
21237 bl .__tls_get_addr
21238 nop
21239 addi 3,2,x1@got@tlsld
21240 bl .__tls_get_addr
21241 nop
21242 addi 9,3,x1@dtprel
21243 bl .__tls_get_addr
21244 nop
21245 addis 9,3,x2@dtprel@ha
21246 addi 9,9,x2@dtprel@l
21247 bl .__tls_get_addr
21248 nop
21249 ld 9,x3@got@dtprel(2)
21250 add 9,9,3
21251 bl .__tls_get_addr
21252 nop'
21253 tls_first_major=2
21254 tls_first_minor=14
2f3321ca 21255 tls_as_opt="-a64 --fatal-warnings"
c4501e62 21256 ;;
fd3cd001
UW
21257 s390-*-*)
21258 conftest_s='
21259 .section ".tdata","awT",@progbits
21260foo: .long 25
21261 .text
21262 .long foo@TLSGD
21263 .long foo@TLSLDM
21264 .long foo@DTPOFF
21265 .long foo@NTPOFF
21266 .long foo@GOTNTPOFF
21267 .long foo@INDNTPOFF
21268 l %r1,foo@GOTNTPOFF(%r12)
21269 l %r1,0(%r1):tls_load:foo
21270 bas %r14,0(%r1,%r13):tls_gdcall:foo
21271 bas %r14,0(%r1,%r13):tls_ldcall:foo'
21272 tls_first_major=2
21273 tls_first_minor=14
2f3321ca 21274 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
21275 ;;
21276 s390x-*-*)
21277 conftest_s='
21278 .section ".tdata","awT",@progbits
21279foo: .long 25
21280 .text
21281 .quad foo@TLSGD
21282 .quad foo@TLSLDM
21283 .quad foo@DTPOFF
21284 .quad foo@NTPOFF
21285 .quad foo@GOTNTPOFF
21286 lg %r1,foo@GOTNTPOFF(%r12)
21287 larl %r1,foo@INDNTPOFF
21288 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
21289 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
21290 tls_first_major=2
21291 tls_first_minor=14
2f3321ca 21292 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 21293 ;;
9ff13962
KK
21294 sh-*-* | sh[34]-*-*)
21295 conftest_s='
21296 .section ".tdata","awT",@progbits
21297foo: .long 25
21298 .text
21299 .long foo@TLSGD
21300 .long foo@TLSLDM
21301 .long foo@DTPOFF
21302 .long foo@GOTTPOFF
21303 .long foo@TPOFF'
21304 tls_first_major=2
21305 tls_first_minor=13
2f3321ca 21306 tls_as_opt=--fatal-warnings
9ff13962 21307 ;;
5751a10b 21308 sparc*-*-*)
2f3321ca 21309 case "$target" in
7935dc1b
EB
21310 sparc*-sun-solaris2.[56789]*)
21311 # TLS was introduced in the Solaris 9 4/04 release but
21312 # we do not enable it by default on Solaris 9 either.
21313 if test "x$enable_tls" = xyes ; then
21314 on_solaris=yes
21315 else
21316 enable_tls=no;
21317 fi
21318 ;;
2f3321ca
EB
21319 sparc*-sun-solaris2.*)
21320 on_solaris=yes
21321 ;;
21322 *)
21323 on_solaris=no
21324 ;;
21325 esac
21326 if test x$on_solaris = xyes && test x$gas_flag = xno; then
21327 conftest_s='
21328 .section ".tdata",#alloc,#write,#tls
21329foo: .long 25
21330 .text
21331 sethi %tgd_hi22(foo), %o0
21332 add %o0, %tgd_lo10(foo), %o1
21333 add %l7, %o1, %o0, %tgd_add(foo)
21334 call __tls_get_addr, %tgd_call(foo)
21335 sethi %tldm_hi22(foo), %l1
21336 add %l1, %tldm_lo10(foo), %l2
21337 add %l7, %l2, %o0, %tldm_add(foo)
21338 call __tls_get_addr, %tldm_call(foo)
21339 sethi %tldo_hix22(foo), %l3
21340 xor %l3, %tldo_lox10(foo), %l4
21341 add %o0, %l4, %l5, %tldo_add(foo)
21342 sethi %tie_hi22(foo), %o3
21343 add %o3, %tie_lo10(foo), %o3
21344 ld [%l7 + %o3], %o2, %tie_ld(foo)
21345 add %g7, %o2, %o4, %tie_add(foo)
21346 sethi %tle_hix22(foo), %l1
21347 xor %l1, %tle_lox10(foo), %o5
21348 ld [%g7 + %o5], %o1'
21349 tls_first_major=0
21350 tls_first_minor=0
21351 else
21352 conftest_s='
5751a10b
JJ
21353 .section ".tdata","awT",@progbits
21354foo: .long 25
21355 .text
21356 sethi %tgd_hi22(foo), %o0
21357 add %o0, %tgd_lo10(foo), %o1
21358 add %l7, %o1, %o0, %tgd_add(foo)
21359 call __tls_get_addr, %tgd_call(foo)
21360 sethi %tldm_hi22(foo), %l1
21361 add %l1, %tldm_lo10(foo), %l2
21362 add %l7, %l2, %o0, %tldm_add(foo)
21363 call __tls_get_addr, %tldm_call(foo)
21364 sethi %tldo_hix22(foo), %l3
21365 xor %l3, %tldo_lox10(foo), %l4
21366 add %o0, %l4, %l5, %tldo_add(foo)
21367 sethi %tie_hi22(foo), %o3
21368 add %o3, %tie_lo10(foo), %o3
21369 ld [%l7 + %o3], %o2, %tie_ld(foo)
21370 add %g7, %o2, %o4, %tie_add(foo)
21371 sethi %tle_hix22(foo), %l1
21372 xor %l1, %tle_lox10(foo), %o5
21373 ld [%g7 + %o5], %o1'
21374 tls_first_major=2
21375 tls_first_minor=14
2f3321ca
EB
21376 tls_as_opt="-32 --fatal-warnings"
21377 fi
5751a10b 21378 ;;
f996902d 21379esac
8dea1cca
DD
21380set_have_as_tls=no
21381if test "x$enable_tls" = xno ; then
21382 : # TLS explicitly disabled.
21383elif test "x$enable_tls" = xyes ; then
21384 set_have_as_tls=yes # TLS explicitly enabled.
21385elif test -z "$tls_first_major"; then
8ada417f
ZW
21386 : # If we don't have a check, assume no support.
21387else
b61ff9c8
BS
21388 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
21389echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
ba479fd2
NN
21390if test "${gcc_cv_as_tls+set}" = set; then
21391 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
21392else
21393 gcc_cv_as_tls=no
21394 if test $in_tree_gas = yes; then
21395 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
21396 then gcc_cv_as_tls=yes
ad9c4d9f 21397fi
8ada417f 21398 elif test x$gcc_cv_as != x; then
6e3f3080 21399 echo "$conftest_s" > conftest.s
2f3321ca 21400 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
21401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21402 (eval $ac_try) 2>&5
21403 ac_status=$?
21404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21405 (exit $ac_status); }; }
8ada417f
ZW
21406 then
21407 gcc_cv_as_tls=yes
21408 else
21409 echo "configure: failed program was" >&5
21410 cat conftest.s >&5
21411 fi
21412 rm -f conftest.o conftest.s
f996902d 21413 fi
f996902d 21414fi
b61ff9c8
BS
21415echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
21416echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 21417if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
21418 set_have_as_tls=yes
21419fi
21420fi
21421if test $set_have_as_tls = yes ; then
ba479fd2
NN
21422
21423cat >>confdefs.h <<\_ACEOF
f996902d 21424#define HAVE_AS_TLS 1
ba479fd2 21425_ACEOF
f996902d 21426
8ada417f
ZW
21427fi
21428
21429# Target-specific assembler checks.
f996902d 21430
b61ff9c8
BS
21431echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
21432echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
7e9d8517
L
21433gcc_cv_ld_static_dynamic=no
21434if test $in_tree_ld = yes ; then
21435 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
21436 gcc_cv_ld_static_dynamic=yes
21437 fi
21438elif test x$gcc_cv_ld != x; then
21439 # Check if linker supports -Bstatic/-Bdynamic option
21440 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
21441 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
21442 gcc_cv_ld_static_dynamic=yes
21443 fi
21444fi
21445if test x"$gcc_cv_ld_static_dynamic" = xyes; then
21446
21447cat >>confdefs.h <<\_ACEOF
21448#define HAVE_LD_STATIC_DYNAMIC 1
21449_ACEOF
21450
21451fi
b61ff9c8
BS
21452echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
21453echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
7e9d8517 21454
d594623a 21455if test x"$demangler_in_ld" = xyes; then
b61ff9c8
BS
21456 echo "$as_me:$LINENO: checking linker --demangle support" >&5
21457echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
d594623a
L
21458 gcc_cv_ld_demangle=no
21459 if test $in_tree_ld = yes; then
21460 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 \
21461 gcc_cv_ld_demangle=yes
21462 fi
21463 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
21464 # Check if the GNU linker supports --demangle option
21465 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
21466 gcc_cv_ld_demangle=yes
21467 fi
21468 fi
21469 if test x"$gcc_cv_ld_demangle" = xyes; then
21470
21471cat >>confdefs.h <<\_ACEOF
21472#define HAVE_LD_DEMANGLE 1
21473_ACEOF
21474
21475 fi
b61ff9c8
BS
21476 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
21477echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
d594623a
L
21478fi
21479
3a37b08e
RH
21480case "$target" in
21481 # All TARGET_ABI_OSF targets.
21482 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
b61ff9c8
BS
21483 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
21484echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
21485if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
21486 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 21487else
8ada417f
ZW
21488 gcc_cv_as_alpha_explicit_relocs=no
21489 if test $in_tree_gas = yes; then
21490 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21491 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 21492fi
8ada417f 21493 elif test x$gcc_cv_as != x; then
6e3f3080 21494 echo ' .set nomacro
3a37b08e
RH
21495 .text
21496 extbl $3, $2, $3 !lituse_bytoff!1
21497 ldq $2, a($29) !literal!1
21498 ldq $4, b($29) !literal!2
21499 ldq_u $3, 0($2) !lituse_base!1
21500 ldq $27, f($29) !literal!5
21501 jsr $26, ($27), f !lituse_jsr!5
21502 ldah $29, 0($26) !gpdisp!3
21503 lda $0, c($29) !gprel
21504 ldah $1, d($29) !gprelhigh
21505 lda $1, d($1) !gprellow
8ada417f 21506 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
21507 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21509 (eval $ac_try) 2>&5
21510 ac_status=$?
21511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21512 (exit $ac_status); }; }
8ada417f
ZW
21513 then
21514 gcc_cv_as_alpha_explicit_relocs=yes
21515 else
21516 echo "configure: failed program was" >&5
21517 cat conftest.s >&5
21518 fi
21519 rm -f conftest.o conftest.s
21520 fi
cafe096b 21521fi
b61ff9c8
BS
21522echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
21523echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 21524if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
21525
21526cat >>confdefs.h <<\_ACEOF
3a37b08e 21527#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 21528_ACEOF
3a37b08e 21529
d006f5eb 21530fi
b61ff9c8
BS
21531 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
21532echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
d006f5eb
RH
21533if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
21534 echo $ECHO_N "(cached) $ECHO_C" >&6
21535else
21536 gcc_cv_as_alpha_jsrdirect_relocs=no
21537 if test $in_tree_gas = yes; then
21538 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
21539 then gcc_cv_as_alpha_jsrdirect_relocs=yes
21540fi
21541 elif test x$gcc_cv_as != x; then
21542 echo ' .set nomacro
21543 .text
21544 ldq $27, a($29) !literal!1
21545 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
21546 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21548 (eval $ac_try) 2>&5
21549 ac_status=$?
21550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21551 (exit $ac_status); }; }
21552 then
21553 gcc_cv_as_alpha_jsrdirect_relocs=yes
21554 else
21555 echo "configure: failed program was" >&5
21556 cat conftest.s >&5
21557 fi
21558 rm -f conftest.o conftest.s
21559 fi
21560fi
b61ff9c8
BS
21561echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
21562echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
d006f5eb
RH
21563if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
21564
21565cat >>confdefs.h <<\_ACEOF
21566#define HAVE_AS_JSRDIRECT_RELOCS 1
21567_ACEOF
21568
86da66b5
HPN
21569fi
21570 ;;
21571
21572 cris-*-*)
b61ff9c8
BS
21573 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
21574echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
86da66b5
HPN
21575if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
21576 echo $ECHO_N "(cached) $ECHO_C" >&6
21577else
21578 gcc_cv_as_cris_no_mul_bug=no
21579 if test $in_tree_gas = yes; then
21580 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
21581 then gcc_cv_as_cris_no_mul_bug=yes
21582fi
21583 elif test x$gcc_cv_as != x; then
21584 echo '.text' > conftest.s
21585 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
21586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21587 (eval $ac_try) 2>&5
21588 ac_status=$?
21589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21590 (exit $ac_status); }; }
21591 then
21592 gcc_cv_as_cris_no_mul_bug=yes
21593 else
21594 echo "configure: failed program was" >&5
21595 cat conftest.s >&5
21596 fi
21597 rm -f conftest.o conftest.s
21598 fi
21599fi
b61ff9c8
BS
21600echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
21601echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
86da66b5
HPN
21602if test $gcc_cv_as_cris_no_mul_bug = yes; then
21603
21604cat >>confdefs.h <<\_ACEOF
21605#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
21606_ACEOF
21607
8ada417f 21608fi
3a37b08e 21609 ;;
8ada417f 21610
1cb36a98 21611 sparc*-*-*)
b61ff9c8
BS
21612 echo "$as_me:$LINENO: checking assembler for .register" >&5
21613echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
ba479fd2
NN
21614if test "${gcc_cv_as_sparc_register_op+set}" = set; then
21615 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 21616else
8ada417f
ZW
21617 gcc_cv_as_sparc_register_op=no
21618 if test x$gcc_cv_as != x; then
6e3f3080 21619 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
21620 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21622 (eval $ac_try) 2>&5
21623 ac_status=$?
21624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21625 (exit $ac_status); }; }
8ada417f
ZW
21626 then
21627 gcc_cv_as_sparc_register_op=yes
21628 else
21629 echo "configure: failed program was" >&5
21630 cat conftest.s >&5
21631 fi
21632 rm -f conftest.o conftest.s
21633 fi
cafe096b 21634fi
b61ff9c8
BS
21635echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
21636echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 21637if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
21638
21639cat >>confdefs.h <<\_ACEOF
1cb36a98 21640#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 21641_ACEOF
1cb36a98 21642
8ada417f 21643fi
1cb36a98 21644
b61ff9c8
BS
21645 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
21646echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
ba479fd2
NN
21647if test "${gcc_cv_as_sparc_relax+set}" = set; then
21648 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 21649else
8ada417f
ZW
21650 gcc_cv_as_sparc_relax=no
21651 if test x$gcc_cv_as != x; then
6e3f3080 21652 echo '.text' > conftest.s
ba479fd2
NN
21653 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
21654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21655 (eval $ac_try) 2>&5
21656 ac_status=$?
21657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21658 (exit $ac_status); }; }
8ada417f
ZW
21659 then
21660 gcc_cv_as_sparc_relax=yes
21661 else
21662 echo "configure: failed program was" >&5
21663 cat conftest.s >&5
21664 fi
21665 rm -f conftest.o conftest.s
21666 fi
cafe096b 21667fi
b61ff9c8
BS
21668echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
21669echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 21670if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
21671
21672cat >>confdefs.h <<\_ACEOF
e95b1e6a 21673#define HAVE_AS_RELAX_OPTION 1
ba479fd2 21674_ACEOF
e95b1e6a 21675
8ada417f 21676fi
e95b1e6a 21677
b61ff9c8
BS
21678 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
21679echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
ba479fd2
NN
21680if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
21681 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 21682else
8ada417f
ZW
21683 gcc_cv_as_sparc_ua_pcrel=no
21684 if test x$gcc_cv_as != x; then
6e3f3080 21685 echo '.text
8ada417f
ZW
21686foo:
21687 nop
21688.data
21689.align 4
21690.byte 0
21691.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
21692 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
21693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21694 (eval $ac_try) 2>&5
21695 ac_status=$?
21696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21697 (exit $ac_status); }; }
8ada417f
ZW
21698 then
21699 if test x$gcc_cv_ld != x \
21700 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
21701 gcc_cv_as_sparc_ua_pcrel=yes
21702 fi
21703 rm -f conftest
21704 else
21705 echo "configure: failed program was" >&5
21706 cat conftest.s >&5
21707 fi
21708 rm -f conftest.o conftest.s
21709 fi
cafe096b 21710fi
b61ff9c8
BS
21711echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
21712echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 21713if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
21714
21715cat >>confdefs.h <<\_ACEOF
17e9e88c 21716#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 21717_ACEOF
17e9e88c 21718
17e9e88c 21719
b61ff9c8
BS
21720 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
21721echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
ba479fd2
NN
21722if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
21723 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 21724else
8ada417f
ZW
21725 gcc_cv_as_sparc_ua_pcrel_hidden=no
21726 if test x$gcc_cv_as != x; then
6e3f3080 21727 echo '.data
8ada417f
ZW
21728.align 4
21729.byte 0x31
21730.uaword %r_disp32(foo)
21731.byte 0x32, 0x33, 0x34
21732.global foo
21733.hidden foo
21734foo:
21735.skip 4' > conftest.s
ba479fd2
NN
21736 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
21737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21738 (eval $ac_try) 2>&5
21739 ac_status=$?
21740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21741 (exit $ac_status); }; }
8ada417f
ZW
21742 then
21743 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
21744 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
21745 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
21746 | grep ' 31000000 07323334' > /dev/null 2>&1; then
21747 if $gcc_cv_objdump -R conftest 2> /dev/null \
21748 | grep 'DISP32' > /dev/null 2>&1; then
21749 :
21750 else
21751 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 21752 fi
8ada417f
ZW
21753 fi
21754 rm -f conftest
21755 else
21756 echo "configure: failed program was" >&5
21757 cat conftest.s >&5
21758 fi
21759 rm -f conftest.o conftest.s
21760 fi
cafe096b 21761fi
b61ff9c8
BS
21762echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
21763echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 21764if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
21765
21766cat >>confdefs.h <<\_ACEOF
cf7b8b0d 21767#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 21768_ACEOF
cf7b8b0d 21769
8ada417f 21770fi
ba479fd2 21771
8ada417f 21772fi # unaligned pcrel relocs
cf7b8b0d 21773
b61ff9c8
BS
21774 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
21775echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
ba479fd2
NN
21776if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
21777 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 21778else
8ada417f
ZW
21779 gcc_cv_as_sparc_offsetable_lo10=no
21780 if test x$gcc_cv_as != x; then
6e3f3080 21781 echo '.text
8ada417f
ZW
21782 or %g1, %lo(ab) + 12, %g1
21783 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
21784 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
21785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21786 (eval $ac_try) 2>&5
21787 ac_status=$?
21788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21789 (exit $ac_status); }; }
8ada417f
ZW
21790 then
21791 if test x$gcc_cv_objdump != x \
ecb0ccbc 21792 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 21793 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 21794 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
21795 fi
21796 else
21797 echo "configure: failed program was" >&5
21798 cat conftest.s >&5
21799 fi
21800 rm -f conftest.o conftest.s
21801 fi
cafe096b 21802fi
b61ff9c8
BS
21803echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
21804echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 21805if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
21806
21807cat >>confdefs.h <<\_ACEOF
1cb36a98 21808#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 21809_ACEOF
1cb36a98 21810
8ada417f 21811fi
1cb36a98
RH
21812 ;;
21813
c307e6dd 21814 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
21815 case $target_os in
21816 cygwin* | pe | mingw32*)
21817 # Used for DWARF 2 in PE
b61ff9c8
BS
21818 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
21819echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
d38bc601
BF
21820if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
21821 echo $ECHO_N "(cached) $ECHO_C" >&6
21822else
21823 gcc_cv_as_ix86_pe_secrel32=no
21824 if test $in_tree_gas = yes; then
21825 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
21826 then gcc_cv_as_ix86_pe_secrel32=yes
21827fi
21828 elif test x$gcc_cv_as != x; then
21829 echo '.text
21830foo: nop
21831.data
21832 .secrel32 foo' > conftest.s
21833 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21835 (eval $ac_try) 2>&5
21836 ac_status=$?
21837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21838 (exit $ac_status); }; }
21839 then
21840 if test x$gcc_cv_ld != x \
21841 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
21842 gcc_cv_as_ix86_pe_secrel32=yes
21843 fi
21844 rm -f conftest
21845 else
21846 echo "configure: failed program was" >&5
21847 cat conftest.s >&5
21848 fi
21849 rm -f conftest.o conftest.s
21850 fi
21851fi
b61ff9c8
BS
21852echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
21853echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
d38bc601
BF
21854if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
21855
21856cat >>confdefs.h <<\_ACEOF
21857#define HAVE_GAS_PE_SECREL32_RELOC 1
21858_ACEOF
21859
21860fi
21861 ;;
21862 esac
21863
b61ff9c8
BS
21864 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
21865echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
ba479fd2
NN
21866if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
21867 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
21868else
21869 gcc_cv_as_ix86_filds_fists=no
21870 if test $in_tree_gas = yes; then
21871 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
21872 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 21873fi
8ada417f 21874 elif test x$gcc_cv_as != x; then
6e3f3080 21875 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
21876 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21878 (eval $ac_try) 2>&5
21879 ac_status=$?
21880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21881 (exit $ac_status); }; }
8ada417f
ZW
21882 then
21883 gcc_cv_as_ix86_filds_fists=yes
21884 else
21885 echo "configure: failed program was" >&5
21886 cat conftest.s >&5
981d4858 21887 fi
8ada417f
ZW
21888 rm -f conftest.o conftest.s
21889 fi
21890fi
b61ff9c8
BS
21891echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
21892echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 21893if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
21894
21895cat >>confdefs.h <<\_ACEOF
8ada417f 21896#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 21897_ACEOF
ad9c4d9f 21898
f6f5dff2
RO
21899fi
21900
b61ff9c8
BS
21901 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
21902echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
ba479fd2
NN
21903if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
21904 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
21905else
21906 gcc_cv_as_ix86_cmov_sun_syntax=no
21907 if test x$gcc_cv_as != x; then
6e3f3080 21908 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
21909 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21911 (eval $ac_try) 2>&5
21912 ac_status=$?
21913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21914 (exit $ac_status); }; }
f6f5dff2
RO
21915 then
21916 gcc_cv_as_ix86_cmov_sun_syntax=yes
21917 else
21918 echo "configure: failed program was" >&5
21919 cat conftest.s >&5
21920 fi
21921 rm -f conftest.o conftest.s
21922 fi
21923fi
b61ff9c8
BS
21924echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
21925echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 21926if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
21927
21928cat >>confdefs.h <<\_ACEOF
f6f5dff2 21929#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 21930_ACEOF
f6f5dff2 21931
b6c03bcd
RS
21932fi
21933
b61ff9c8
BS
21934 echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5
21935echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6
b6c03bcd
RS
21936if test "${gcc_cv_as_ix86_ffreep+set}" = set; then
21937 echo $ECHO_N "(cached) $ECHO_C" >&6
21938else
21939 gcc_cv_as_ix86_ffreep=no
21940 if test x$gcc_cv_as != x; then
21941 echo 'ffreep %st(1)' > conftest.s
21942 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21944 (eval $ac_try) 2>&5
21945 ac_status=$?
21946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21947 (exit $ac_status); }; }
21948 then
21949 gcc_cv_as_ix86_ffreep=yes
21950 else
21951 echo "configure: failed program was" >&5
21952 cat conftest.s >&5
21953 fi
21954 rm -f conftest.o conftest.s
21955 fi
21956fi
b61ff9c8
BS
21957echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5
21958echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6
b6c03bcd
RS
21959if test $gcc_cv_as_ix86_ffreep = yes; then
21960
21961cat >>confdefs.h <<\_ACEOF
21962#define HAVE_AS_IX86_FFREEP 1
21963_ACEOF
21964
38ca3765
UB
21965fi
21966
b61ff9c8
BS
21967 echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5
21968echo $ECHO_N "checking assembler for sahf mnemonic... $ECHO_C" >&6
38ca3765
UB
21969if test "${gcc_cv_as_ix86_sahf+set}" = set; then
21970 echo $ECHO_N "(cached) $ECHO_C" >&6
21971else
21972 gcc_cv_as_ix86_sahf=no
21973 if test x$gcc_cv_as != x; then
21974 echo 'sahf' > conftest.s
21975 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21977 (eval $ac_try) 2>&5
21978 ac_status=$?
21979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21980 (exit $ac_status); }; }
21981 then
21982 gcc_cv_as_ix86_sahf=yes
21983 else
21984 echo "configure: failed program was" >&5
21985 cat conftest.s >&5
21986 fi
21987 rm -f conftest.o conftest.s
21988 fi
21989fi
b61ff9c8
BS
21990echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_sahf" >&5
21991echo "${ECHO_T}$gcc_cv_as_ix86_sahf" >&6
38ca3765
UB
21992if test $gcc_cv_as_ix86_sahf = yes; then
21993
21994cat >>confdefs.h <<\_ACEOF
21995#define HAVE_AS_IX86_SAHF 1
21996_ACEOF
21997
68b92f78
RS
21998fi
21999
b61ff9c8
BS
22000 echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5
22001echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6
68b92f78
RS
22002if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then
22003 echo $ECHO_N "(cached) $ECHO_C" >&6
22004else
22005 gcc_cv_as_ix86_diff_sect_delta=no
22006 if test x$gcc_cv_as != x; then
22007 echo '.section .rodata
22008.L1:
22009 .long .L2-.L1
22010 .long .L3-.L1
22011 .text
22012.L3: nop
22013.L2: nop' > conftest.s
22014 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22016 (eval $ac_try) 2>&5
22017 ac_status=$?
22018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22019 (exit $ac_status); }; }
22020 then
22021 gcc_cv_as_ix86_diff_sect_delta=yes
22022 else
22023 echo "configure: failed program was" >&5
22024 cat conftest.s >&5
22025 fi
22026 rm -f conftest.o conftest.s
22027 fi
22028fi
b61ff9c8
BS
22029echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
22030echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6
68b92f78
RS
22031if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
22032
22033cat >>confdefs.h <<\_ACEOF
22034#define HAVE_AS_IX86_DIFF_SECT_DELTA 1
22035_ACEOF
22036
ad9c4d9f
NN
22037fi
22038
6f3ca281
ZW
22039 # This one is used unconditionally by i386.[ch]; it is to be defined
22040 # to 1 if the feature is present, 0 otherwise.
b61ff9c8
BS
22041 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
22042echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
ba479fd2
NN
22043if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
22044 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22045else
22046 gcc_cv_as_ix86_gotoff_in_data=no
22047 if test $in_tree_gas = yes; then
22048 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
22049 then gcc_cv_as_ix86_gotoff_in_data=yes
22050fi
22051 elif test x$gcc_cv_as != x; then
6e3f3080 22052 echo ' .text
f88c65f7
RH
22053.L0:
22054 nop
22055 .data
8ada417f 22056 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
22057 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22059 (eval $ac_try) 2>&5
22060 ac_status=$?
22061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22062 (exit $ac_status); }; }
8ada417f
ZW
22063 then
22064 gcc_cv_as_ix86_gotoff_in_data=yes
22065 else
22066 echo "configure: failed program was" >&5
22067 cat conftest.s >&5
f88c65f7 22068 fi
8ada417f
ZW
22069 rm -f conftest.o conftest.s
22070 fi
22071fi
b61ff9c8
BS
22072echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
22073echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 22074
6f3ca281 22075
ba479fd2 22076cat >>confdefs.h <<_ACEOF
6f3ca281 22077#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 22078_ACEOF
f88c65f7 22079
1cb36a98 22080 ;;
ef1ecf87
RH
22081
22082 ia64*-*-*)
b61ff9c8
BS
22083 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
22084echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
ba479fd2
NN
22085if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
22086 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 22087else
8ada417f
ZW
22088 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
22089 if test $in_tree_gas = yes; then
22090 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
22091 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 22092fi
8ada417f 22093 elif test x$gcc_cv_as != x; then
6e3f3080 22094 echo ' .text
ef1ecf87
RH
22095 addl r15 = @ltoffx(x#), gp
22096 ;;
cfa9ee99 22097 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
22098 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22100 (eval $ac_try) 2>&5
22101 ac_status=$?
22102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22103 (exit $ac_status); }; }
8ada417f 22104 then
cfa9ee99 22105 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
22106 else
22107 echo "configure: failed program was" >&5
22108 cat conftest.s >&5
2c4a9cff 22109 fi
8ada417f
ZW
22110 rm -f conftest.o conftest.s
22111 fi
22112fi
b61ff9c8
BS
22113echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
22114echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 22115if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
22116
22117cat >>confdefs.h <<\_ACEOF
cfa9ee99 22118#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 22119_ACEOF
8ada417f 22120
cfa9ee99 22121fi
8ada417f 22122
2c4a9cff 22123 ;;
8ada417f 22124
2c4a9cff 22125 powerpc*-*-*)
8ada417f 22126 case $target in
432218ba
DE
22127 *-*-aix*) conftest_s=' .machine "pwr5"
22128 .csect .text[PR]
6b37db3c 22129 mfcr 3,128';;
8af4d362 22130 *-*-darwin*)
b61ff9c8
BS
22131 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
22132echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
8af4d362
PB
22133if test "${gcc_cv_as_machine_directive+set}" = set; then
22134 echo $ECHO_N "(cached) $ECHO_C" >&6
22135else
22136 gcc_cv_as_machine_directive=no
22137 if test x$gcc_cv_as != x; then
22138 echo ' .machine ppc7400' > conftest.s
22139 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22141 (eval $ac_try) 2>&5
22142 ac_status=$?
22143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22144 (exit $ac_status); }; }
22145 then
22146 gcc_cv_as_machine_directive=yes
22147 else
22148 echo "configure: failed program was" >&5
22149 cat conftest.s >&5
22150 fi
22151 rm -f conftest.o conftest.s
22152 fi
22153fi
b61ff9c8
BS
22154echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
22155echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
8af4d362
PB
22156
22157 if test x$gcc_cv_as_machine_directive != xyes; then
22158 echo "*** This target requires an assembler supporting \".machine\"" >&2
22159 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
22160 test x$build = x$target && exit 1
22161 fi
22162 conftest_s=' .text
6b37db3c 22163 mfcr r3,128';;
4c67db14 22164 *) conftest_s=' .machine power4
d2ab3e37 22165 .text
6b37db3c 22166 mfcr 3,128';;
8ada417f 22167 esac
8ada417f 22168
b61ff9c8
BS
22169 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
22170echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
ba479fd2
NN
22171if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
22172 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 22173else
8ada417f
ZW
22174 gcc_cv_as_powerpc_mfcrf=no
22175 if test $in_tree_gas = yes; then
22176 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
22177 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 22178fi
8ada417f 22179 elif test x$gcc_cv_as != x; then
6e3f3080 22180 echo "$conftest_s" > conftest.s
ba479fd2
NN
22181 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22183 (eval $ac_try) 2>&5
22184 ac_status=$?
22185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22186 (exit $ac_status); }; }
8ada417f
ZW
22187 then
22188 gcc_cv_as_powerpc_mfcrf=yes
22189 else
22190 echo "configure: failed program was" >&5
22191 cat conftest.s >&5
22192 fi
22193 rm -f conftest.o conftest.s
22194 fi
2c4a9cff 22195fi
b61ff9c8
BS
22196echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
22197echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 22198if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
22199
22200cat >>confdefs.h <<\_ACEOF
2c4a9cff 22201#define HAVE_AS_MFCRF 1
ba479fd2 22202_ACEOF
ef1ecf87 22203
8ada417f 22204fi
432218ba
DE
22205
22206 case $target in
22207 *-*-aix*) conftest_s=' .machine "pwr5"
22208 .csect .text[PR]
22209 popcntb 3,3';;
22210 *) conftest_s=' .machine power5
22211 .text
22212 popcntb 3,3';;
22213 esac
22214
b61ff9c8
BS
22215 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
22216echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
432218ba
DE
22217if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
22218 echo $ECHO_N "(cached) $ECHO_C" >&6
22219else
22220 gcc_cv_as_powerpc_popcntb=no
22221 if test $in_tree_gas = yes; then
22222 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
22223 then gcc_cv_as_powerpc_popcntb=yes
22224fi
22225 elif test x$gcc_cv_as != x; then
22226 echo "$conftest_s" > conftest.s
22227 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22229 (eval $ac_try) 2>&5
22230 ac_status=$?
22231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22232 (exit $ac_status); }; }
22233 then
22234 gcc_cv_as_powerpc_popcntb=yes
22235 else
22236 echo "configure: failed program was" >&5
22237 cat conftest.s >&5
22238 fi
22239 rm -f conftest.o conftest.s
22240 fi
22241fi
b61ff9c8
BS
22242echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
22243echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
432218ba
DE
22244if test $gcc_cv_as_powerpc_popcntb = yes; then
22245
22246cat >>confdefs.h <<\_ACEOF
22247#define HAVE_AS_POPCNTB 1
22248_ACEOF
22249
9719f3b7
DE
22250fi
22251
22252 case $target in
22253 *-*-aix*) conftest_s=' .machine "pwr5x"
22254 .csect .text[PR]
22255 frin 1,1';;
1e04bfdc 22256 *) conftest_s=' .machine power5
9719f3b7
DE
22257 .text
22258 frin 1,1';;
22259 esac
22260
b61ff9c8
BS
22261 echo "$as_me:$LINENO: checking assembler for fp round support" >&5
22262echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
9719f3b7
DE
22263if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
22264 echo $ECHO_N "(cached) $ECHO_C" >&6
22265else
22266 gcc_cv_as_powerpc_fprnd=no
22267 if test $in_tree_gas = yes; then
22268 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
22269 then gcc_cv_as_powerpc_fprnd=yes
22270fi
22271 elif test x$gcc_cv_as != x; then
22272 echo "$conftest_s" > conftest.s
22273 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22275 (eval $ac_try) 2>&5
22276 ac_status=$?
22277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22278 (exit $ac_status); }; }
22279 then
22280 gcc_cv_as_powerpc_fprnd=yes
22281 else
22282 echo "configure: failed program was" >&5
22283 cat conftest.s >&5
22284 fi
22285 rm -f conftest.o conftest.s
22286 fi
22287fi
b61ff9c8
BS
22288echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
22289echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
9719f3b7
DE
22290if test $gcc_cv_as_powerpc_fprnd = yes; then
22291
22292cat >>confdefs.h <<\_ACEOF
22293#define HAVE_AS_FPRND 1
22294_ACEOF
22295
44cd321e
PS
22296fi
22297
22298 case $target in
22299 *-*-aix*) conftest_s=' .machine "pwr6"
22300 .csect .text[PR]
22301 mffgpr 1,3';;
22302 *) conftest_s=' .machine power6
22303 .text
22304 mffgpr 1,3';;
22305 esac
22306
b61ff9c8
BS
22307 echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5
22308echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6
44cd321e
PS
22309if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then
22310 echo $ECHO_N "(cached) $ECHO_C" >&6
22311else
22312 gcc_cv_as_powerpc_mfpgpr=no
22313 if test $in_tree_gas = yes; then
22314 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
22315 then gcc_cv_as_powerpc_mfpgpr=yes
22316fi
22317 elif test x$gcc_cv_as != x; then
22318 echo "$conftest_s" > conftest.s
22319 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22321 (eval $ac_try) 2>&5
22322 ac_status=$?
22323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22324 (exit $ac_status); }; }
22325 then
22326 gcc_cv_as_powerpc_mfpgpr=yes
22327 else
22328 echo "configure: failed program was" >&5
22329 cat conftest.s >&5
22330 fi
22331 rm -f conftest.o conftest.s
22332 fi
22333fi
b61ff9c8
BS
22334echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5
22335echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6
44cd321e
PS
22336if test $gcc_cv_as_powerpc_mfpgpr = yes; then
22337
22338cat >>confdefs.h <<\_ACEOF
22339#define HAVE_AS_MFPGPR 1
22340_ACEOF
22341
432218ba
DE
22342fi
22343
7f970b70
AM
22344 case $target in
22345 *-*-aix*) conftest_s=' .csect .text[PR]
22346LCF..0:
22347 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
22348 *-*-darwin*)
22349 conftest_s=' .text
22350LCF0:
22351 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
22352 *) conftest_s=' .text
22353.LCF0:
22354 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
22355 esac
22356
b61ff9c8
BS
22357 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
22358echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
695d8830
AS
22359if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
22360 echo $ECHO_N "(cached) $ECHO_C" >&6
22361else
22362 gcc_cv_as_powerpc_rel16=no
22363 if test $in_tree_gas = yes; then
22364 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
22365 then gcc_cv_as_powerpc_rel16=yes
22366fi
22367 elif test x$gcc_cv_as != x; then
22368 echo "$conftest_s" > conftest.s
22369 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
22370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22371 (eval $ac_try) 2>&5
22372 ac_status=$?
22373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22374 (exit $ac_status); }; }
22375 then
22376 gcc_cv_as_powerpc_rel16=yes
22377 else
22378 echo "configure: failed program was" >&5
22379 cat conftest.s >&5
22380 fi
22381 rm -f conftest.o conftest.s
22382 fi
22383fi
b61ff9c8
BS
22384echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
22385echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
695d8830
AS
22386if test $gcc_cv_as_powerpc_rel16 = yes; then
22387
22388cat >>confdefs.h <<\_ACEOF
22389#define HAVE_AS_REL16 1
22390_ACEOF
22391
22392fi
22393
b639c3c2
JJ
22394 case $target in
22395 *-*-aix*) conftest_s=' .machine "pwr6"
22396 .csect .text[PR]
22397 cmpb 3,4,5';;
22398 *) conftest_s=' .machine power6
22399 .text
22400 cmpb 3,4,5';;
22401 esac
22402
b61ff9c8
BS
22403 echo "$as_me:$LINENO: checking assembler for compare bytes support" >&5
22404echo $ECHO_N "checking assembler for compare bytes support... $ECHO_C" >&6
b639c3c2
JJ
22405if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then
22406 echo $ECHO_N "(cached) $ECHO_C" >&6
22407else
22408 gcc_cv_as_powerpc_cmpb=no
22409 if test $in_tree_gas = yes; then
22410 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
22411 then gcc_cv_as_powerpc_cmpb=yes
22412fi
22413 elif test x$gcc_cv_as != x; then
22414 echo "$conftest_s" > conftest.s
22415 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
22416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22417 (eval $ac_try) 2>&5
22418 ac_status=$?
22419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22420 (exit $ac_status); }; }
22421 then
22422 gcc_cv_as_powerpc_cmpb=yes
22423 else
22424 echo "configure: failed program was" >&5
22425 cat conftest.s >&5
22426 fi
22427 rm -f conftest.o conftest.s
22428 fi
22429fi
b61ff9c8
BS
22430echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_cmpb" >&5
22431echo "${ECHO_T}$gcc_cv_as_powerpc_cmpb" >&6
b639c3c2
JJ
22432if test $gcc_cv_as_powerpc_cmpb = yes; then
22433
22434cat >>confdefs.h <<\_ACEOF
22435#define HAVE_AS_CMPB 1
22436_ACEOF
22437
22438fi
22439
22440 case $target in
22441 *-*-aix*) conftest_s=' .machine "pwr6"
22442 .csect .text[PR]
0d74c0ee 22443 dadd 1,2,3';;
b639c3c2
JJ
22444 *) conftest_s=' .machine power6
22445 .text
0d74c0ee 22446 dadd 1,2,3';;
b639c3c2
JJ
22447 esac
22448
b61ff9c8
BS
22449 echo "$as_me:$LINENO: checking assembler for decimal float support" >&5
22450echo $ECHO_N "checking assembler for decimal float support... $ECHO_C" >&6
b639c3c2
JJ
22451if test "${gcc_cv_as_powerpc_dfp+set}" = set; then
22452 echo $ECHO_N "(cached) $ECHO_C" >&6
22453else
22454 gcc_cv_as_powerpc_dfp=no
22455 if test $in_tree_gas = yes; then
22456 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
22457 then gcc_cv_as_powerpc_dfp=yes
22458fi
22459 elif test x$gcc_cv_as != x; then
22460 echo "$conftest_s" > conftest.s
22461 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
22462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22463 (eval $ac_try) 2>&5
22464 ac_status=$?
22465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22466 (exit $ac_status); }; }
22467 then
22468 gcc_cv_as_powerpc_dfp=yes
22469 else
22470 echo "configure: failed program was" >&5
22471 cat conftest.s >&5
22472 fi
22473 rm -f conftest.o conftest.s
22474 fi
22475fi
b61ff9c8
BS
22476echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_dfp" >&5
22477echo "${ECHO_T}$gcc_cv_as_powerpc_dfp" >&6
b639c3c2
JJ
22478if test $gcc_cv_as_powerpc_dfp = yes; then
22479
22480cat >>confdefs.h <<\_ACEOF
22481#define HAVE_AS_DFP 1
22482_ACEOF
22483
e51917ae
JM
22484fi
22485
b61ff9c8
BS
22486 echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
22487echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
e51917ae
JM
22488if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then
22489 echo $ECHO_N "(cached) $ECHO_C" >&6
22490else
22491 gcc_cv_as_powerpc_gnu_attribute=no
22492 if test $in_tree_gas = yes; then
22493 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
22494 then gcc_cv_as_powerpc_gnu_attribute=yes
22495fi
22496 elif test x$gcc_cv_as != x; then
22497 echo '.gnu_attribute 4,1' > conftest.s
22498 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22500 (eval $ac_try) 2>&5
22501 ac_status=$?
22502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22503 (exit $ac_status); }; }
22504 then
22505 gcc_cv_as_powerpc_gnu_attribute=yes
22506 else
22507 echo "configure: failed program was" >&5
22508 cat conftest.s >&5
22509 fi
22510 rm -f conftest.o conftest.s
22511 fi
22512fi
b61ff9c8
BS
22513echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_gnu_attribute" >&5
22514echo "${ECHO_T}$gcc_cv_as_powerpc_gnu_attribute" >&6
e51917ae
JM
22515if test $gcc_cv_as_powerpc_gnu_attribute = yes; then
22516
22517cat >>confdefs.h <<\_ACEOF
22518#define HAVE_AS_GNU_ATTRIBUTE 1
22519_ACEOF
22520
7f970b70 22521fi
8ada417f
ZW
22522 ;;
22523
22524 mips*-*-*)
b61ff9c8
BS
22525 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
22526echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
22527if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
22528 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22529else
22530 gcc_cv_as_mips_explicit_relocs=no
22531 if test $in_tree_gas = yes; then
22532 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
22533 then gcc_cv_as_mips_explicit_relocs=yes
22534fi
22535 elif test x$gcc_cv_as != x; then
6e3f3080 22536 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
22537 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22539 (eval $ac_try) 2>&5
22540 ac_status=$?
22541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22542 (exit $ac_status); }; }
8ada417f
ZW
22543 then
22544 gcc_cv_as_mips_explicit_relocs=yes
22545 else
22546 echo "configure: failed program was" >&5
22547 cat conftest.s >&5
ef1ecf87 22548 fi
8ada417f
ZW
22549 rm -f conftest.o conftest.s
22550 fi
22551fi
b61ff9c8
BS
22552echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
22553echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
22554if test $gcc_cv_as_mips_explicit_relocs = yes; then
22555 if test x$target_cpu_default = x
22556 then target_cpu_default=MASK_EXPLICIT_RELOCS
22557 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
22558 fi
4551169f 22559fi
b61ff9c8
BS
22560 echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5
22561echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6
4551169f
RS
22562if test "${gcc_cv_as_mips_no_shared+set}" = set; then
22563 echo $ECHO_N "(cached) $ECHO_C" >&6
22564else
22565 gcc_cv_as_mips_no_shared=no
22566 if test $in_tree_gas = yes; then
22567 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
22568 then gcc_cv_as_mips_no_shared=yes
22569fi
22570 elif test x$gcc_cv_as != x; then
22571 echo 'nop' > conftest.s
22572 if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5'
22573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22574 (eval $ac_try) 2>&5
22575 ac_status=$?
22576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22577 (exit $ac_status); }; }
22578 then
22579 gcc_cv_as_mips_no_shared=yes
22580 else
22581 echo "configure: failed program was" >&5
22582 cat conftest.s >&5
22583 fi
22584 rm -f conftest.o conftest.s
22585 fi
22586fi
b61ff9c8
BS
22587echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5
22588echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6
4551169f
RS
22589if test $gcc_cv_as_mips_no_shared = yes; then
22590
22591cat >>confdefs.h <<\_ACEOF
22592#define HAVE_AS_NO_SHARED 1
22593_ACEOF
22594
dcb957d9
JM
22595fi
22596
b61ff9c8
BS
22597 echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
22598echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
dcb957d9
JM
22599if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then
22600 echo $ECHO_N "(cached) $ECHO_C" >&6
22601else
22602 gcc_cv_as_mips_gnu_attribute=no
22603 if test $in_tree_gas = yes; then
22604 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
22605 then gcc_cv_as_mips_gnu_attribute=yes
22606fi
22607 elif test x$gcc_cv_as != x; then
22608 echo '.gnu_attribute 4,1' > conftest.s
22609 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22611 (eval $ac_try) 2>&5
22612 ac_status=$?
22613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22614 (exit $ac_status); }; }
22615 then
22616 gcc_cv_as_mips_gnu_attribute=yes
22617 else
22618 echo "configure: failed program was" >&5
22619 cat conftest.s >&5
22620 fi
22621 rm -f conftest.o conftest.s
22622 fi
22623fi
b61ff9c8
BS
22624echo "$as_me:$LINENO: result: $gcc_cv_as_mips_gnu_attribute" >&5
22625echo "${ECHO_T}$gcc_cv_as_mips_gnu_attribute" >&6
dcb957d9
JM
22626if test $gcc_cv_as_mips_gnu_attribute = yes; then
22627
22628cat >>confdefs.h <<\_ACEOF
22629#define HAVE_AS_GNU_ATTRIBUTE 1
22630_ACEOF
22631
a44380d2
JM
22632fi
22633
b61ff9c8
BS
22634 echo "$as_me:$LINENO: checking assembler for .dtprelword support" >&5
22635echo $ECHO_N "checking assembler for .dtprelword support... $ECHO_C" >&6
a44380d2
JM
22636if test "${gcc_cv_as_mips_dtprelword+set}" = set; then
22637 echo $ECHO_N "(cached) $ECHO_C" >&6
22638else
22639 gcc_cv_as_mips_dtprelword=no
22640 if test $in_tree_gas = yes; then
22641 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
22642 then gcc_cv_as_mips_dtprelword=yes
22643fi
22644 elif test x$gcc_cv_as != x; then
22645 echo '.section .tdata,"awT",@progbits
22646x:
22647 .word 2
22648 .text
22649 .dtprelword x+0x8000' > conftest.s
22650 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22652 (eval $ac_try) 2>&5
22653 ac_status=$?
22654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22655 (exit $ac_status); }; }
22656 then
22657 gcc_cv_as_mips_dtprelword=yes
22658 else
22659 echo "configure: failed program was" >&5
22660 cat conftest.s >&5
22661 fi
22662 rm -f conftest.o conftest.s
22663 fi
22664fi
b61ff9c8
BS
22665echo "$as_me:$LINENO: result: $gcc_cv_as_mips_dtprelword" >&5
22666echo "${ECHO_T}$gcc_cv_as_mips_dtprelword" >&6
a44380d2
JM
22667if test $gcc_cv_as_mips_dtprelword = yes; then
22668
22669cat >>confdefs.h <<\_ACEOF
22670#define HAVE_AS_DTPRELWORD 1
22671_ACEOF
22672
8ada417f 22673fi
dbad5e72
SE
22674 ;;
22675esac
8ada417f 22676
dbad5e72
SE
22677# Mips and HP-UX need the GNU assembler.
22678# Linux on IA64 might be able to use the Intel assembler.
22679
22680case "$target" in
22681 mips*-*-* | *-*-hpux* )
82563d35
RS
22682 if test x$gas_flag = xyes \
22683 || test x"$host" != x"$build" \
22684 || test ! -x "$gcc_cv_as" \
22685 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
22686 :
22687 else
22688 echo "*** This configuration requires the GNU assembler" >&2
22689 exit 1
22690 fi
ef1ecf87 22691 ;;
1cb36a98 22692esac
dbad5e72 22693
9d147085
RH
22694# ??? Not all targets support dwarf2 debug_line, even within a version
22695# of gas. Moreover, we need to emit a valid instruction to trigger any
22696# info to the output file. So, as supported targets are added to gas 2.11,
22697# add some instruction here to (also) show we expect this might work.
22698# ??? Once 2.11 is released, probably need to add first known working
22699# version to the per-target configury.
22700case "$target" in
80486e06 22701 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
cd985f66 22702 | x86_64*-*-* | hppa*-*-* | arm*-*-* \
6b7b0ba1
KH
22703 | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* \
22704 | spu-*-* | fido*-*-*)
9d147085
RH
22705 insn="nop"
22706 ;;
57116d8d 22707 ia64*-*-* | s390*-*-*)
9d147085
RH
22708 insn="nop 0"
22709 ;;
2853bc5a
HPN
22710 mmix-*-*)
22711 insn="swym 0"
22712 ;;
8ada417f
ZW
22713esac
22714if test x"$insn" != x; then
22715 conftest_s="\
22716 .file 1 \"conftest.s\"
22717 .loc 1 3 0
22718 $insn"
b61ff9c8
BS
22719 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
22720echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
ba479fd2
NN
22721if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
22722 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22723else
22724 gcc_cv_as_dwarf2_debug_line=no
22725 if test $in_tree_gas = yes; then
22726 if test $in_tree_gas_is_elf = yes \
22727 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
22728 then gcc_cv_as_dwarf2_debug_line=yes
22729fi
22730 elif test x$gcc_cv_as != x; then
6e3f3080 22731 echo "$conftest_s" > conftest.s
ba479fd2
NN
22732 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22734 (eval $ac_try) 2>&5
22735 ac_status=$?
22736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22737 (exit $ac_status); }; }
8ada417f 22738 then
080a5bb0
EB
22739 if test x$gcc_cv_objdump != x \
22740 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
22741 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
22742 gcc_cv_as_dwarf2_debug_line=yes
22743 fi
22744 else
22745 echo "configure: failed program was" >&5
22746 cat conftest.s >&5
22747 fi
22748 rm -f conftest.o conftest.s
22749 fi
22750fi
b61ff9c8
BS
22751echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
22752echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 22753
ad9c4d9f 22754
8ada417f
ZW
22755# The .debug_line file table must be in the exact order that
22756# we specified the files, since these indices are also used
22757# by DW_AT_decl_file. Approximate this test by testing if
22758# the assembler bitches if the same index is assigned twice.
b61ff9c8
BS
22759 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
22760echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
ba479fd2
NN
22761if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
22762 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22763else
22764 gcc_cv_as_dwarf2_file_buggy=no
22765 if test x$gcc_cv_as != x; then
6e3f3080 22766 echo ' .file 1 "foo.s"
8ada417f 22767 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
22768 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22770 (eval $ac_try) 2>&5
22771 ac_status=$?
22772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22773 (exit $ac_status); }; }
8ada417f
ZW
22774 then
22775 gcc_cv_as_dwarf2_file_buggy=yes
22776 else
22777 echo "configure: failed program was" >&5
22778 cat conftest.s >&5
22779 fi
22780 rm -f conftest.o conftest.s
22781 fi
ad9c4d9f 22782fi
b61ff9c8
BS
22783echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
22784echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
22785
22786
22787 if test $gcc_cv_as_dwarf2_debug_line = yes \
22788 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
22789
22790cat >>confdefs.h <<\_ACEOF
9d147085 22791#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 22792_ACEOF
9d147085 22793
8ada417f 22794 fi
ad9c4d9f 22795
b61ff9c8
BS
22796 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
22797echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
ba479fd2
NN
22798if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
22799 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22800else
22801 gcc_cv_as_gdwarf2_flag=no
22802 if test $in_tree_gas = yes; then
22803 if test $in_tree_gas_is_elf = yes \
22804 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
22805 then gcc_cv_as_gdwarf2_flag=yes
22806fi
22807 elif test x$gcc_cv_as != x; then
6e3f3080 22808 echo "$insn" > conftest.s
ba479fd2
NN
22809 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
22810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22811 (eval $ac_try) 2>&5
22812 ac_status=$?
22813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22814 (exit $ac_status); }; }
8ada417f
ZW
22815 then
22816 gcc_cv_as_gdwarf2_flag=yes
22817 else
22818 echo "configure: failed program was" >&5
22819 cat conftest.s >&5
22820 fi
22821 rm -f conftest.o conftest.s
22822 fi
ad9c4d9f 22823fi
b61ff9c8
BS
22824echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
22825echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 22826if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
22827
22828cat >>confdefs.h <<\_ACEOF
5f0e9ea2 22829#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 22830_ACEOF
5f0e9ea2
GK
22831
22832fi
ad9c4d9f 22833
b61ff9c8
BS
22834 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
22835echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
ba479fd2
NN
22836if test "${gcc_cv_as_gstabs_flag+set}" = set; then
22837 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22838else
22839 gcc_cv_as_gstabs_flag=no
22840 if test $in_tree_gas = yes; then
22841 if test $in_tree_gas_is_elf = yes \
22842 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
22843 then gcc_cv_as_gstabs_flag=yes
22844fi
22845 elif test x$gcc_cv_as != x; then
6e3f3080 22846 echo "$insn" > conftest.s
ba479fd2
NN
22847 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
22848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22849 (eval $ac_try) 2>&5
22850 ac_status=$?
22851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22852 (exit $ac_status); }; }
8ada417f
ZW
22853 then
22854 # The native Solaris 9/Intel assembler doesn't understand --gstabs
22855 # and warns about it, but still exits successfully. So check for
22856 # this.
ba479fd2
NN
22857 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
22858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22859 (eval $ac_try) 2>&5
22860 ac_status=$?
22861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22862 (exit $ac_status); }; }
8ada417f
ZW
22863 then :
22864 else gcc_cv_as_gstabs_flag=yes
22865 fi
22866 else
22867 echo "configure: failed program was" >&5
22868 cat conftest.s >&5
22869 fi
22870 rm -f conftest.o conftest.s
22871 fi
ad9c4d9f 22872fi
b61ff9c8
BS
22873echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
22874echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 22875if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
22876
22877cat >>confdefs.h <<\_ACEOF
5f0e9ea2 22878#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 22879_ACEOF
5f0e9ea2 22880
c8aea42c
PB
22881fi
22882
b61ff9c8
BS
22883 echo "$as_me:$LINENO: checking assembler for --debug-prefix-map option" >&5
22884echo $ECHO_N "checking assembler for --debug-prefix-map option... $ECHO_C" >&6
c8aea42c
PB
22885if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then
22886 echo $ECHO_N "(cached) $ECHO_C" >&6
22887else
22888 gcc_cv_as_debug_prefix_map_flag=no
22889 if test $in_tree_gas = yes; then
303a4698 22890 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
c8aea42c
PB
22891 then gcc_cv_as_debug_prefix_map_flag=yes
22892fi
22893 elif test x$gcc_cv_as != x; then
22894 echo "$insn" > conftest.s
22895 if { ac_try='$gcc_cv_as --debug-prefix-map /a=/b -o conftest.o conftest.s >&5'
22896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22897 (eval $ac_try) 2>&5
22898 ac_status=$?
22899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22900 (exit $ac_status); }; }
22901 then
22902 gcc_cv_as_debug_prefix_map_flag=yes
22903 else
22904 echo "configure: failed program was" >&5
22905 cat conftest.s >&5
22906 fi
22907 rm -f conftest.o conftest.s
22908 fi
22909fi
b61ff9c8
BS
22910echo "$as_me:$LINENO: result: $gcc_cv_as_debug_prefix_map_flag" >&5
22911echo "${ECHO_T}$gcc_cv_as_debug_prefix_map_flag" >&6
c8aea42c
PB
22912if test $gcc_cv_as_debug_prefix_map_flag = yes; then
22913
22914cat >>confdefs.h <<\_ACEOF
22915#define HAVE_AS_DEBUG_PREFIX_MAP 1
22916_ACEOF
22917
5f0e9ea2 22918fi
8ada417f 22919fi
5f0e9ea2 22920
b61ff9c8
BS
22921echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5
22922echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6
03943c05
AO
22923if test "${gcc_cv_as_line_zero+set}" = set; then
22924 echo $ECHO_N "(cached) $ECHO_C" >&6
22925else
22926 gcc_cv_as_line_zero=no
22927 if test $in_tree_gas = yes; then
cf0eb7a1
AO
22928 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
22929 then gcc_cv_as_line_zero=yes
03943c05
AO
22930fi
22931 elif test "x$gcc_cv_as" != x; then
22932 { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
22933 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
22934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22935 (eval $ac_try) 2>&5
22936 ac_status=$?
22937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22938 (exit $ac_status); }; } &&
22939 test "x`cat conftest.out`" = x
22940 then
22941 gcc_cv_as_line_zero=yes
22942 else
22943 echo "configure: failed program was" >&5
22944 cat conftest.s >&5
22945 echo "configure: error output was" >&5
22946 cat conftest.out >&5
22947 fi
22948 rm -f conftest.o conftest.s conftest.out
22949 fi
22950fi
b61ff9c8
BS
22951echo "$as_me:$LINENO: result: $gcc_cv_as_line_zero" >&5
22952echo "${ECHO_T}$gcc_cv_as_line_zero" >&6
03943c05
AO
22953if test "x$gcc_cv_as_line_zero" = xyes; then
22954
22955cat >>confdefs.h <<\_ACEOF
22956#define HAVE_AS_LINE_ZERO 1
22957_ACEOF
22958
22959fi
22960
b61ff9c8
BS
22961echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
22962echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 22963gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 22964if test $in_tree_ld = yes ; then
5408ac6c
HPN
22965 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 \
22966 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
22967 gcc_cv_ld_ro_rw_mix=read-write
22968 fi
22969elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
22970 echo '.section myfoosect, "a"' > conftest1.s
22971 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 22972 echo '.byte 1' >> conftest2.s
90e145da 22973 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 22974 echo '.byte 0' >> conftest3.s
6cd656d0
KC
22975 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
22976 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
22977 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 22978 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 22979 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 22980 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 22981 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
22982 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
22983 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
22984 gcc_cv_ld_ro_rw_mix=read-only
22985 else
22986 gcc_cv_ld_ro_rw_mix=read-write
22987 fi
22988 fi
22989 fi
22990 rm -f conftest.* conftest[123].*
22991fi
22992if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
22993
22994cat >>confdefs.h <<\_ACEOF
96d0f4dc 22995#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 22996_ACEOF
96d0f4dc
JJ
22997
22998fi
b61ff9c8
BS
22999echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
23000echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 23001
b61ff9c8
BS
23002echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
23003echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 23004gcc_cv_ld_eh_frame_hdr=no
34a86c2b 23005if test $in_tree_ld = yes ; then
5408ac6c
HPN
23006 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 \
23007 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
23008 gcc_cv_ld_eh_frame_hdr=yes
23009 fi
23010elif test x$gcc_cv_ld != x; then
23011 # Check if linker supports --eh-frame-hdr option
23012 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
23013 gcc_cv_ld_eh_frame_hdr=yes
23014 fi
23015fi
232b67d9 23016
275b60d6 23017if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
23018
23019cat >>confdefs.h <<\_ACEOF
275b60d6 23020#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 23021_ACEOF
275b60d6
JJ
23022
23023fi
b61ff9c8
BS
23024echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
23025echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 23026
b61ff9c8
BS
23027echo "$as_me:$LINENO: checking linker position independent executable support" >&5
23028echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
23029gcc_cv_ld_pie=no
23030if test $in_tree_ld = yes ; then
5408ac6c
HPN
23031 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 \
23032 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
23033 gcc_cv_ld_pie=yes
23034 fi
23035elif test x$gcc_cv_ld != x; then
23036 # Check if linker supports -pie option
23037 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
23038 gcc_cv_ld_pie=yes
23039 fi
23040fi
23041if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
23042
23043cat >>confdefs.h <<\_ACEOF
24a4dd31 23044#define HAVE_LD_PIE 1
ba479fd2 23045_ACEOF
24a4dd31
JJ
23046
23047fi
b61ff9c8
BS
23048echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
23049echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 23050
b61ff9c8
BS
23051echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5
23052echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6
22ba88ef 23053gcc_cv_ld_eh_gc_sections=no
b639c3c2
JJ
23054if test $in_tree_ld = yes ; then
23055 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 \
23056 && test $in_tree_ld_is_elf = yes; then
23057 gcc_cv_ld_eh_gc_sections=yes
23058 fi
23059elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
23060 cat > conftest.s <<EOF
23061 .section .text
23062.globl _start
23063 .type _start, @function
23064_start:
23065 .long foo
23066 .size _start, .-_start
23067 .section .text.foo,"ax",@progbits
23068 .type foo, @function
23069foo:
23070 .long 0
23071 .size foo, .-foo
23072 .section .gcc_except_table.foo,"a",@progbits
23073.L0:
23074 .long 0
23075 .section .eh_frame,"a",@progbits
23076 .long .L0
23077EOF
23078 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
23079 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
23080 | grep "gc-sections option ignored" > /dev/null; then
23081 gcc_cv_ld_eh_gc_sections=no
23082 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
23083 gcc_cv_ld_eh_gc_sections=yes
23084 # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
23085 if test x$gcc_cv_as_comdat_group != xyes; then
23086 gcc_cv_ld_eh_gc_sections=no
23087 cat > conftest.s <<EOF
23088 .section .text
23089.globl _start
23090 .type _start, @function
23091_start:
23092 .long foo
23093 .size _start, .-_start
23094 .section .gnu.linkonce.t.foo,"ax",@progbits
23095 .type foo, @function
23096foo:
23097 .long 0
23098 .size foo, .-foo
23099 .section .gcc_except_table.foo,"a",@progbits
23100.L0:
23101 .long 0
23102 .section .eh_frame,"a",@progbits
23103 .long .L0
23104EOF
23105 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
23106 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
23107 | grep "gc-sections option ignored" > /dev/null; then
23108 gcc_cv_ld_eh_gc_sections=no
23109 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
23110 gcc_cv_ld_eh_gc_sections=yes
23111 fi
23112 fi
23113 fi
23114 fi
23115 fi
23116 rm -f conftest.s conftest.o conftest
23117fi
e9d207d9
EB
23118case "$target" in
23119 hppa*-*-linux*)
23120 # ??? This apparently exposes a binutils bug with PC-relative relocations.
23121 gcc_cv_ld_eh_gc_sections=no
23122 ;;
23123esac
22ba88ef
EB
23124if test x$gcc_cv_ld_eh_gc_sections = xyes; then
23125
23126cat >>confdefs.h <<\_ACEOF
23127#define HAVE_LD_EH_GC_SECTIONS 1
23128_ACEOF
23129
23130fi
b61ff9c8
BS
23131echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5
23132echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6
22ba88ef 23133
8bb915b6
NN
23134# --------
23135# UNSORTED
23136# --------
23137
b61ff9c8
BS
23138echo "$as_me:$LINENO: checking linker --as-needed support" >&5
23139echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
23140if test "${gcc_cv_ld_as_needed+set}" = set; then
23141 echo $ECHO_N "(cached) $ECHO_C" >&6
23142else
23143 gcc_cv_ld_as_needed=no
765f1bf9
AM
23144if test $in_tree_ld = yes ; then
23145 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 \
23146 && test $in_tree_ld_is_elf = yes; then
23147 gcc_cv_ld_as_needed=yes
23148 fi
23149elif test x$gcc_cv_ld != x; then
23150 # Check if linker supports --as-needed and --no-as-needed options
23151 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
23152 gcc_cv_ld_as_needed=yes
23153 fi
23154fi
82e923f6
RS
23155
23156fi
b61ff9c8
BS
23157echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
23158echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
23159if test x"$gcc_cv_ld_as_needed" = xyes; then
23160
23161cat >>confdefs.h <<\_ACEOF
23162#define HAVE_LD_AS_NEEDED 1
23163_ACEOF
23164
23165fi
765f1bf9 23166
d82bf747
AM
23167case "$target:$tm_file" in
23168 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
b61ff9c8
BS
23169 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
23170echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
85b776df
AM
23171if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
23172 echo $ECHO_N "(cached) $ECHO_C" >&6
23173else
23174 gcc_cv_ld_no_dot_syms=no
23175 if test $in_tree_ld = yes ; then
23176 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
23177 gcc_cv_ld_no_dot_syms=yes
23178 fi
23179 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
23180 cat > conftest1.s <<EOF
23181 .text
23182 bl .foo
23183EOF
23184 cat > conftest2.s <<EOF
23185 .section ".opd","aw"
23186 .align 3
23187 .globl foo
23188 .type foo,@function
23189foo:
23190 .quad .LEfoo,.TOC.@tocbase,0
23191 .text
23192.LEfoo:
23193 blr
23194 .size foo,.-.LEfoo
23195EOF
23196 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
23197 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
23198 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
23199 gcc_cv_ld_no_dot_syms=yes
23200 fi
23201 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
23202 fi
23203
23204fi
b61ff9c8
BS
23205echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
23206echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
85b776df
AM
23207 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
23208
23209cat >>confdefs.h <<\_ACEOF
23210#define HAVE_LD_NO_DOT_SYMS 1
23211_ACEOF
23212
23213 fi
23214 ;;
23215esac
23216
b61ff9c8
BS
23217echo "$as_me:$LINENO: checking linker --sysroot support" >&5
23218echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
380e5ca4
MM
23219if test "${gcc_cv_ld_sysroot+set}" = set; then
23220 echo $ECHO_N "(cached) $ECHO_C" >&6
23221else
23222 gcc_cv_ld_sysroot=no
23223 if test $in_tree_ld = yes ; then
23224 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 23225 gcc_cv_ld_sysroot=yes
380e5ca4
MM
23226 fi
23227 elif test x$gcc_cv_ld != x; then
23228 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
23229 gcc_cv_ld_sysroot=yes
23230 fi
23231 fi
23232fi
b61ff9c8
BS
23233echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
23234echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
380e5ca4
MM
23235if test x"$gcc_cv_ld_sysroot" = xyes; then
23236
23237cat >>confdefs.h <<\_ACEOF
23238#define HAVE_LD_SYSROOT 1
23239_ACEOF
23240
23241fi
23242
9fb28a67 23243if test x$with_sysroot = x && test x$host = x$target \
c794c06f
CD
23244 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
23245 && test "$prefix" != "NONE"; then
ba479fd2
NN
23246
23247cat >>confdefs.h <<_ACEOF
793e9558 23248#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 23249_ACEOF
793e9558
PB
23250
23251fi
23252
77008252 23253# Test for stack protector support in target C library.
b61ff9c8
BS
23254echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5
23255echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6
77008252
JJ
23256if test "${gcc_cv_libc_provides_ssp+set}" = set; then
23257 echo $ECHO_N "(cached) $ECHO_C" >&6
23258else
23259 gcc_cv_libc_provides_ssp=no
a6ccdbab
EC
23260 case "$target" in
23261 *-*-linux*)
77008252
JJ
23262 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
23263 if test "x$with_sysroot" = x; then
23264 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
23265 elif test "x$with_build_sysroot" != "x"; then
23266 glibc_header_dir="${with_build_sysroot}/usr/include"
77008252
JJ
23267 elif test "x$with_sysroot" = xyes; then
23268 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
23269 else
23270 glibc_header_dir="${with_sysroot}/usr/include"
23271 fi
23272 else
23273 glibc_header_dir=/usr/include
23274 fi
23275 # glibc 2.4 and later provides __stack_chk_fail and
23276 # either __stack_chk_guard, or TLS access to stack guard canary.
23277 if test -f $glibc_header_dir/features.h \
23278 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
23279 $glibc_header_dir/features.h > /dev/null; then
23280 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
23281 $glibc_header_dir/features.h > /dev/null; then
23282 gcc_cv_libc_provides_ssp=yes
23283 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
23284 $glibc_header_dir/features.h > /dev/null \
23285 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
23286 $glibc_header_dir/features.h > /dev/null; then
23287 gcc_cv_libc_provides_ssp=yes
fed6d628
BF
23288 elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \
23289 $glibc_header_dir/features.h > /dev/null && \
23290 test -f $glibc_header_dir/bits/uClibc_config.h && \
23291 $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \
23292 $glibc_header_dir/bits/uClibc_config.h > /dev/null; then
23293 gcc_cv_libc_provides_ssp=yes
77008252 23294 fi
fed6d628 23295 fi
a6ccdbab
EC
23296 ;;
23297 *-*-darwin*)
b61ff9c8
BS
23298 echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5
23299echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6
a6ccdbab
EC
23300if test "${ac_cv_func___stack_chk_fail+set}" = set; then
23301 echo $ECHO_N "(cached) $ECHO_C" >&6
23302else
23303 cat >conftest.$ac_ext <<_ACEOF
23304/* confdefs.h. */
23305_ACEOF
23306cat confdefs.h >>conftest.$ac_ext
23307cat >>conftest.$ac_ext <<_ACEOF
23308/* end confdefs.h. */
23309/* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail.
23310 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23311#define __stack_chk_fail innocuous___stack_chk_fail
23312
23313/* System header to define __stub macros and hopefully few prototypes,
23314 which can conflict with char __stack_chk_fail (); below.
23315 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23316 <limits.h> exists even on freestanding compilers. */
23317
23318#ifdef __STDC__
23319# include <limits.h>
23320#else
23321# include <assert.h>
23322#endif
23323
23324#undef __stack_chk_fail
23325
b61ff9c8 23326/* Override any gcc2 internal prototype to avoid an error. */
a6ccdbab
EC
23327#ifdef __cplusplus
23328extern "C"
b61ff9c8 23329{
a6ccdbab 23330#endif
b61ff9c8
BS
23331/* We use char because int might match the return type of a gcc2
23332 builtin and then its argument prototype would still apply. */
a6ccdbab
EC
23333char __stack_chk_fail ();
23334/* The GNU C library defines this for functions which it implements
23335 to always fail with ENOSYS. Some functions are actually named
23336 something starting with __ and the normal name is an alias. */
b61ff9c8 23337#if defined (__stub___stack_chk_fail) || defined (__stub_____stack_chk_fail)
a6ccdbab 23338choke me
b61ff9c8
BS
23339#else
23340char (*f) () = __stack_chk_fail;
23341#endif
23342#ifdef __cplusplus
23343}
a6ccdbab
EC
23344#endif
23345
23346int
23347main ()
23348{
b61ff9c8 23349return f != __stack_chk_fail;
a6ccdbab
EC
23350 ;
23351 return 0;
23352}
23353_ACEOF
23354rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
23355if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23356 (eval $ac_link) 2>conftest.er1
a6ccdbab
EC
23357 ac_status=$?
23358 grep -v '^ *+' conftest.er1 >conftest.err
23359 rm -f conftest.er1
23360 cat conftest.err >&5
23361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
23362 (exit $ac_status); } &&
23363 { ac_try='test -z "$ac_c_werror_flag"
23364 || test ! -s conftest.err'
23365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23366 (eval $ac_try) 2>&5
23367 ac_status=$?
23368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23369 (exit $ac_status); }; } &&
23370 { ac_try='test -s conftest$ac_exeext'
23371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23372 (eval $ac_try) 2>&5
23373 ac_status=$?
23374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23375 (exit $ac_status); }; }; then
8b1f719a
PB
23376 ac_cv_func___stack_chk_fail=yes
23377else
a6ccdbab
EC
23378 echo "$as_me: failed program was:" >&5
23379sed 's/^/| /' conftest.$ac_ext >&5
23380
b61ff9c8 23381ac_cv_func___stack_chk_fail=no
a6ccdbab 23382fi
b61ff9c8 23383rm -f conftest.err conftest.$ac_objext \
a6ccdbab
EC
23384 conftest$ac_exeext conftest.$ac_ext
23385fi
b61ff9c8
BS
23386echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5
23387echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6
a6ccdbab
EC
23388if test $ac_cv_func___stack_chk_fail = yes; then
23389 gcc_cv_libc_provides_ssp=yes
23390else
23391 echo "no __stack_chk_fail on this target"
77008252 23392fi
a6ccdbab
EC
23393
23394 ;;
77008252 23395 *) gcc_cv_libc_provides_ssp=no ;;
a6ccdbab
EC
23396 esac
23397fi
b61ff9c8
BS
23398echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
23399echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6
a6ccdbab 23400
77008252
JJ
23401if test x$gcc_cv_libc_provides_ssp = xyes; then
23402
23403cat >>confdefs.h <<\_ACEOF
23404#define TARGET_LIBC_PROVIDES_SSP 1
23405_ACEOF
23406
23407fi
23408
ed965309
JJ
23409# Check if TFmode long double should be used by default or not.
23410# Some glibc targets used DFmode long double, but with glibc 2.4
23411# and later they can use TFmode.
23412case "$target" in
f7cc5390
JM
23413 powerpc*-*-linux* | \
23414 powerpc*-*-gnu* | \
ed965309
JJ
23415 sparc*-*-linux* | \
23416 s390*-*-linux* | \
23417 alpha*-*-linux*)
23418
b61ff9c8 23419# Check whether --with-long-double-128 or --without-long-double-128 was given.
ed965309 23420if test "${with_long_double_128+set}" = set; then
b61ff9c8
BS
23421 withval="$with_long_double_128"
23422 gcc_cv_target_ldbl128="$with_long_double_128"
ed965309
JJ
23423else
23424 gcc_cv_target_ldbl128=no
23425 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
23426 if test "x$with_sysroot" = x; then
23427 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
23428 elif test "x$with_build_sysroot" != "x"; then
23429 glibc_header_dir="${with_build_sysroot}/usr/include"
ed965309
JJ
23430 elif test "x$with_sysroot" = xyes; then
23431 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
23432 else
23433 glibc_header_dir="${with_sysroot}/usr/include"
23434 fi
23435 else
23436 glibc_header_dir=/usr/include
23437 fi
65280f6c 23438 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
ed965309
JJ
23439 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
23440 && gcc_cv_target_ldbl128=yes
65280f6c 23441
b61ff9c8 23442fi;
ed965309
JJ
23443 ;;
23444esac
23445if test x$gcc_cv_target_ldbl128 = xyes; then
23446
23447cat >>confdefs.h <<\_ACEOF
23448#define TARGET_DEFAULT_LONG_DOUBLE_128 1
23449_ACEOF
23450
23451fi
23452
81bf3d9e 23453# Find out what GC implementation we want, or may, use.
ba479fd2 23454
b61ff9c8 23455# Check whether --with-gc or --without-gc was given.
81bf3d9e 23456if test "${with_gc+set}" = set; then
b61ff9c8
BS
23457 withval="$with_gc"
23458 case "$withval" in
08cee789 23459 page)
81bf3d9e 23460 GGC=ggc-$withval
08cee789
DJ
23461 ;;
23462 zone)
23463 GGC=ggc-$withval
23464
23465cat >>confdefs.h <<\_ACEOF
23466#define GGC_ZONE 1
23467_ACEOF
23468
81bf3d9e
RH
23469 ;;
23470 *)
ba479fd2
NN
23471 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
23472echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
23473 { (exit 1); exit 1; }; }
81bf3d9e
RH
23474 ;;
23475esac
23476else
005537df 23477 GGC=ggc-page
b61ff9c8 23478fi;
81bf3d9e
RH
23479
23480echo "Using $GGC for garbage collection."
23481
3c809ba4 23482# Use the system's zlib library.
b8dad04b
ZW
23483zlibdir=-L../zlib
23484zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 23485
b61ff9c8 23486# Check whether --with-system-zlib or --without-system-zlib was given.
3c809ba4 23487if test "${with_system_zlib+set}" = set; then
b61ff9c8
BS
23488 withval="$with_system_zlib"
23489 zlibdir=
3c809ba4
AG
23490zlibinc=
23491
b61ff9c8 23492fi;
b8ec3cc8 23493
703d89ab 23494
ab22c1fa 23495
1a4b763e 23496
b61ff9c8
BS
23497echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
23498echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
23499 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
dc6746e7 23500if test "${enable_maintainer_mode+set}" = set; then
b61ff9c8
BS
23501 enableval="$enable_maintainer_mode"
23502 maintainer_mode=$enableval
dc6746e7
PT
23503else
23504 maintainer_mode=no
b61ff9c8 23505fi;
a6ccdbab 23506
b61ff9c8
BS
23507echo "$as_me:$LINENO: result: $maintainer_mode" >&5
23508echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
23509
23510if test "$maintainer_mode" = "yes"; then
23511 MAINT=''
23512else
23513 MAINT='#'
23514fi
23515
8bb915b6
NN
23516# --------------
23517# Language hooks
23518# --------------
23519
861bb6c1
JL
23520# Make empty files to contain the specs and options for each language.
23521# Then add #include lines to for a compiler that has specs and/or options.
23522
cc11cc9b 23523subdirs=
d7b42618 23524lang_opt_files=
861bb6c1 23525lang_specs_files=
3103b7db 23526lang_tree_files=
861bb6c1
JL
23527# These (without "all_") are set in each config-lang.in.
23528# `language' must be a single word so is spelled singularly.
23529all_languages=
861bb6c1 23530all_compilers=
fa958513 23531all_outputs='Makefile gccbug libada-mk'
861bb6c1 23532# List of language makefile fragments.
2ed26f6b
ZW
23533all_lang_makefrags=
23534# List of language subdirectory makefiles. Deprecated.
861bb6c1 23535all_lang_makefiles=
703d89ab 23536# Additional files for gengtype
ef69da62 23537all_gtfiles="$target_gtfiles"
861bb6c1 23538
cc11cc9b
PB
23539# These are the languages that are set in --enable-languages,
23540# and are available in the GCC tree.
23541all_selected_languages=
23542
861bb6c1
JL
23543# Add the language fragments.
23544# Languages are added via two mechanisms. Some information must be
23545# recorded in makefile variables, these are defined in config-lang.in.
23546# We accumulate them and plug them into the main Makefile.
23547# The other mechanism is a set of hooks for each of the main targets
23548# like `clean', `install', etc.
23549
861bb6c1 23550language_hooks="Make-hooks"
861bb6c1 23551
cc11cc9b 23552for lang in ${srcdir}/*/config-lang.in
861bb6c1 23553do
1546bb64
PB
23554 test "$lang" = "${srcdir}/*/config-lang.in" && continue
23555
cc11cc9b
PB
23556 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
23557 if test "x$lang_alias" = x
23558 then
23559 echo "$lang doesn't set \$language." 1>&2
23560 exit 1
23561 fi
23562 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
23563 subdirs="$subdirs $subdir"
349c3166
OH
23564
23565 # $gcc_subdir is where the gcc integration files are to be found
23566 # for a language, both for internal compiler purposes (compiler
23567 # sources implementing front-end to GCC tree converters), and for
23568 # build infrastructure purposes (Make-lang.in, etc.)
23569 #
23570 # This will be <subdir> (relative to $srcdir) if a line like
23571 # gcc_subdir="<subdir>" or gcc_subdir=<subdir>
23572 # is found in <langdir>/config-lang.in, and will remain <langdir>
23573 # otherwise.
23574 #
23575 # Except for the language alias (fetched above), the regular
23576 # "config-lang.in" contents are always retrieved from $gcc_subdir,
23577 # so a <langdir>/config-lang.in setting gcc_subdir typically sets
23578 # only this and the language alias.
23579
23580 gcc_subdir=`sed -n -e 's,^gcc_subdir=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^gcc_subdir=\([^ ]*\).*$,\1,p' $lang`
23581 if [ "$gcc_subdir" = "" ]; then
23582 gcc_subdir="$subdir"
23583 fi
23584
cc11cc9b
PB
23585 case ",$enable_languages," in
23586 *,$lang_alias,*)
23587 all_selected_languages="$all_selected_languages $lang_alias"
349c3166
OH
23588 if test -f $srcdir/$gcc_subdir/lang-specs.h; then
23589 lang_specs_files="$lang_specs_files $srcdir/$gcc_subdir/lang-specs.h"
cc11cc9b
PB
23590 fi
23591 ;;
23592 esac
23593
cc11cc9b
PB
23594 language=
23595 boot_language=
23596 compilers=
cc11cc9b
PB
23597 outputs=
23598 gtfiles=
1546bb64 23599 subdir_requires=
349c3166 23600 . ${srcdir}/$gcc_subdir/config-lang.in
cc11cc9b
PB
23601 if test "x$language" = x
23602 then
349c3166 23603 echo "${srcdir}/$gcc_subdir/config-lang.in doesn't set \$language." 1>&2
cc11cc9b
PB
23604 exit 1
23605 fi
1546bb64
PB
23606
23607 ok=:
23608 case ",$enable_languages," in
23609 *,$lang_alias,*) ;;
23610 *)
23611 for i in $subdir_requires; do
b6348cb3 23612 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
23613 ok=false
23614 break
23615 done
23616 ;;
23617 esac
23618 $ok || continue
23619
349c3166
OH
23620 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in"
23621 if test -f $srcdir/$gcc_subdir/lang.opt; then
23622 lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt"
1546bb64 23623 fi
349c3166
OH
23624 if test -f $srcdir/$gcc_subdir/$subdir-tree.def; then
23625 lang_tree_files="$lang_tree_files $srcdir/$gcc_subdir/$subdir-tree.def"
1546bb64 23626 fi
349c3166
OH
23627 if test -f ${srcdir}/$gcc_subdir/Makefile.in
23628 then all_lang_makefiles="$gcc_subdir/Makefile"
cc11cc9b
PB
23629 fi
23630 all_languages="$all_languages $language"
cc11cc9b 23631 all_compilers="$all_compilers $compilers"
cc11cc9b 23632 all_outputs="$all_outputs $outputs"
703d89ab 23633 all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
861bb6c1
JL
23634done
23635
8ac9d31f
TJ
23636# Pick up gtfiles for c
23637gtfiles=
8ac9d31f 23638. ${srcdir}/c-config-lang.in
703d89ab 23639all_gtfiles="$all_gtfiles [c] $gtfiles"
8ac9d31f 23640
cbc59f01 23641check_languages=
cc11cc9b 23642for language in $all_selected_languages
cbc59f01 23643do
cc11cc9b 23644 check_languages="$check_languages check-$language"
cbc59f01
DD
23645done
23646
62b81e45 23647# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 23648# lang.${target}. Only do so for selected languages.
861bb6c1
JL
23649
23650rm -f Make-hooks
23651touch Make-hooks
bd97af06 23652target_list="all.cross start.encap rest.encap tags \
bcc3d150
BM
23653 install-common install-man install-info install-pdf dvi pdf \
23654 html uninstall info man srcextra srcman srcinfo \
8b1f719a 23655 mostlyclean clean distclean maintainer-clean"
cc11cc9b 23656
861bb6c1
JL
23657for t in $target_list
23658do
23659 x=
cc11cc9b 23660 for lang in $all_selected_languages
861bb6c1 23661 do
cc11cc9b 23662 x="$x $lang.$t"
861bb6c1
JL
23663 done
23664 echo "lang.$t: $x" >> Make-hooks
23665done
23666
8bb915b6
NN
23667# --------
23668# UNSORTED
23669# --------
23670
cc06d68c 23671# Create .gdbinit.
861bb6c1 23672
cc06d68c
GP
23673echo "dir ." > .gdbinit
23674echo "dir ${srcdir}" >> .gdbinit
23675if test x$gdb_needs_out_file_path = xyes
23676then
23677 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
23678fi
23679if test "x$subdirs" != x; then
23680 for s in $subdirs
23681 do
23682 echo "dir ${srcdir}/$s" >> .gdbinit
23683 done
861bb6c1 23684fi
cc06d68c 23685echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 23686
15c723f3 23687gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)'
d062c304
JL
23688
23689
2ce3c6c6 23690
2bbea3a6
RH
23691# Find a directory in which to install a shared libgcc.
23692
b61ff9c8 23693# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
2bbea3a6 23694if test "${enable_version_specific_runtime_libs+set}" = set; then
b61ff9c8 23695 enableval="$enable_version_specific_runtime_libs"
ba479fd2 23696
b61ff9c8 23697fi;
2bbea3a6
RH
23698
23699
b61ff9c8 23700# Check whether --with-slibdir or --without-slibdir was given.
5b15f277 23701if test "${with_slibdir+set}" = set; then
b61ff9c8
BS
23702 withval="$with_slibdir"
23703 slibdir="$with_slibdir"
5b15f277
RH
23704else
23705 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 23706 slibdir='$(libsubdir)'
5b15f277 23707elif test "$host" != "$target"; then
2bbea3a6
RH
23708 slibdir='$(build_tooldir)/lib'
23709else
5b15f277 23710 slibdir='$(libdir)'
2bbea3a6 23711fi
b61ff9c8 23712fi;
2bbea3a6
RH
23713
23714
22482f74 23715
b61ff9c8 23716# Check whether --with-datarootdir or --without-datarootdir was given.
22482f74 23717if test "${with_datarootdir+set}" = set; then
b61ff9c8
BS
23718 withval="$with_datarootdir"
23719 datarootdir="\${prefix}/$with_datarootdir"
22482f74
MS
23720else
23721 datarootdir='$(prefix)/share'
b61ff9c8 23722fi;
22482f74
MS
23723
23724
a6ccdbab 23725
b61ff9c8 23726# Check whether --with-docdir or --without-docdir was given.
22482f74 23727if test "${with_docdir+set}" = set; then
b61ff9c8
BS
23728 withval="$with_docdir"
23729 docdir="\${prefix}/$with_docdir"
22482f74
MS
23730else
23731 docdir='$(datarootdir)'
b61ff9c8 23732fi;
703d89ab 23733
ab22c1fa 23734
1a4b763e 23735
b61ff9c8 23736# Check whether --with-htmldir or --without-htmldir was given.
22482f74 23737if test "${with_htmldir+set}" = set; then
b61ff9c8
BS
23738 withval="$with_htmldir"
23739 htmldir="\${prefix}/$with_htmldir"
22482f74
MS
23740else
23741 htmldir='$(docdir)'
b61ff9c8 23742fi;
861bb6c1
JL
23743
23744
703d89ab 23745# Substitute configuration variables
861bb6c1
JL
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
23777
23778
23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
9b16d2c4 23790
e9a25f70 23791
6e26218f 23792
c8724862 23793
11642c3a
ZW
23794
23795
23796
3d9d2476 23797
e2500fed 23798
a0e527e3 23799
c776a6d0 23800
51b9ff45 23801
861bb6c1 23802
6e3f3080
NN
23803# Echo link setup.
23804if test x${build} = x${host} ; then
23805 if test x${host} = x${target} ; then
23806 echo "Links are now set up to build a native compiler for ${target}." 1>&2
23807 else
23808 echo "Links are now set up to build a cross-compiler" 1>&2
23809 echo " from ${host} to ${target}." 1>&2
23810 fi
23811else
23812 if test x${host} = x${target} ; then
23813 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
23814 echo " for ${target}." 1>&2
23815 else
23816 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
23817 echo " from ${host} to ${target}." 1>&2
23818 fi
23819fi
23820
6de9cd9a
DN
23821
23822
23823
6e3f3080
NN
23824# Configure the subdirectories
23825# AC_CONFIG_SUBDIRS($subdirs)
23826
23827# Create the Makefile
23828# and configure language subdirectories
b61ff9c8 23829 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
23830
23831
b61ff9c8 23832 ac_config_commands="$ac_config_commands default"
914c5af7 23833
ba479fd2 23834cat >confcache <<\_ACEOF
6e3f3080
NN
23835# This file is a shell script that caches the results of configure
23836# tests run on this system so they can be shared between configure
ba479fd2
NN
23837# scripts and configure runs, see configure's option --config-cache.
23838# It is not useful on other systems. If it contains results you don't
23839# want to keep, you may remove or edit it.
6e3f3080 23840#
ba479fd2
NN
23841# config.status only pays attention to the cache file if you give it
23842# the --recheck option to rerun configure.
6e3f3080 23843#
ba479fd2
NN
23844# `ac_cv_env_foo' variables (set or unset) will be overridden when
23845# loading this file, other *unset* `ac_cv_foo' will be assigned the
23846# following values.
23847
23848_ACEOF
23849
6e3f3080
NN
23850# The following way of writing the cache mishandles newlines in values,
23851# but we know of no workaround that is simple, portable, and efficient.
b61ff9c8 23852# So, don't put newlines in cache variables' values.
6e3f3080
NN
23853# Ultrix sh set writes to stderr and can't be redirected directly,
23854# and sets the high bit in the cache file unless we assign to the vars.
b61ff9c8 23855{
ba479fd2 23856 (set) 2>&1 |
b61ff9c8
BS
23857 case `(ac_space=' '; set | grep ac_space) 2>&1` in
23858 *ac_space=\ *)
ba479fd2
NN
23859 # `set' does not quote correctly, so add quotes (double-quote
23860 # substitution turns \\\\ into \\, and sed turns \\ into \).
23861 sed -n \
86da66b5
HPN
23862 "s/'/'\\\\''/g;
23863 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
b61ff9c8 23864 ;;
ba479fd2
NN
23865 *)
23866 # `set' quotes correctly as required by POSIX, so do not add quotes.
b61ff9c8
BS
23867 sed -n \
23868 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 23869 ;;
b61ff9c8
BS
23870 esac;
23871} |
ba479fd2
NN
23872 sed '
23873 t clear
b61ff9c8 23874 : clear
ba479fd2
NN
23875 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23876 t end
b61ff9c8
BS
23877 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23878 : end' >>confcache
23879if diff $cache_file confcache >/dev/null 2>&1; then :; else
23880 if test -w $cache_file; then
23881 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
ba479fd2 23882 cat confcache >$cache_file
6e3f3080 23883 else
b61ff9c8 23884 echo "not updating unwritable cache $cache_file"
6e3f3080
NN
23885 fi
23886fi
23887rm -f confcache
23888
23889test "x$prefix" = xNONE && prefix=$ac_default_prefix
23890# Let make expand exec_prefix.
23891test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23892
b61ff9c8
BS
23893# VPATH may cause trouble with some makes, so we remove $(srcdir),
23894# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23895# trailing colons and then remove the whole line if VPATH becomes empty
23896# (actually we leave an empty line to preserve line numbers).
23897if test "x$srcdir" = x.; then
23898 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23899s/:*\$(srcdir):*/:/;
23900s/:*\${srcdir}:*/:/;
23901s/:*@srcdir@:*/:/;
23902s/^\([^=]*=[ ]*\):*/\1/;
23903s/:*$//;
23904s/^[^=]*=[ ]*$//;
23905}'
23906fi
23907
63cf211a 23908DEFS=-DHAVE_CONFIG_H
6e3f3080 23909
ba479fd2
NN
23910ac_libobjs=
23911ac_ltlibobjs=
23912for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23913 # 1. Remove the extension, and $U if already installed.
b61ff9c8
BS
23914 ac_i=`echo "$ac_i" |
23915 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
23916 # 2. Add them.
23917 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
23918 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
ba479fd2
NN
23919done
23920LIBOBJS=$ac_libobjs
63cf211a 23921
ba479fd2
NN
23922LTLIBOBJS=$ac_ltlibobjs
23923
23924
23925
23926: ${CONFIG_STATUS=./config.status}
23927ac_clean_files_save=$ac_clean_files
23928ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23929{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23930echo "$as_me: creating $CONFIG_STATUS" >&6;}
23931cat >$CONFIG_STATUS <<_ACEOF
23932#! $SHELL
23933# Generated by $as_me.
6e3f3080
NN
23934# Run this file to recreate the current configuration.
23935# Compiler output produced by configure, useful for debugging
ba479fd2 23936# configure, is in config.log if it exists.
6e3f3080 23937
ba479fd2
NN
23938debug=false
23939ac_cs_recheck=false
23940ac_cs_silent=false
23941SHELL=\${CONFIG_SHELL-$SHELL}
23942_ACEOF
23943
23944cat >>$CONFIG_STATUS <<\_ACEOF
23945## --------------------- ##
23946## M4sh Initialization. ##
23947## --------------------- ##
23948
b61ff9c8 23949# Be Bourne compatible
ba479fd2
NN
23950if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23951 emulate sh
23952 NULLCMD=:
23953 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23954 # is contrary to our usage. Disable this feature.
23955 alias -g '${1+"$@"}'='"$@"'
b61ff9c8
BS
23956elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23957 set -o posix
2f41c1d6 23958fi
b61ff9c8 23959DUALCASE=1; export DUALCASE # for MKS sh
ab22c1fa 23960
1a4b763e
BS
23961# Support unset when possible.
23962if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23963 as_unset=unset
23964else
23965 as_unset=false
23966fi
23967
ab22c1fa 23968
1a4b763e 23969# Work around bugs in pre-3.0 UWIN ksh.
b61ff9c8 23970$as_unset ENV MAIL MAILPATH
1a4b763e
BS
23971PS1='$ '
23972PS2='> '
23973PS4='+ '
23974
23975# NLS nuisances.
23976for as_var in \
23977 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23978 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23979 LC_TELEPHONE LC_TIME
2f41c1d6 23980do
1a4b763e
BS
23981 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23982 eval $as_var=C; export $as_var
23983 else
b61ff9c8 23984 $as_unset $as_var
1a4b763e
BS
23985 fi
23986done
23987
23988# Required to use basename.
b61ff9c8 23989if expr a : '\(a\)' >/dev/null 2>&1; then
1a4b763e
BS
23990 as_expr=expr
23991else
23992 as_expr=false
23993fi
23994
b61ff9c8 23995if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
1a4b763e
BS
23996 as_basename=basename
23997else
23998 as_basename=false
23999fi
24000
24001
24002# Name of the executable.
b61ff9c8 24003as_me=`$as_basename "$0" ||
1a4b763e
BS
24004$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24005 X"$0" : 'X\(//\)$' \| \
b61ff9c8
BS
24006 X"$0" : 'X\(/\)$' \| \
24007 . : '\(.\)' 2>/dev/null ||
1a4b763e 24008echo X/"$0" |
b61ff9c8
BS
24009 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
24010 /^X\/\(\/\/\)$/{ s//\1/; q; }
24011 /^X\/\(\/\).*/{ s//\1/; q; }
24012 s/.*/./; q'`
1a4b763e 24013
b61ff9c8
BS
24014
24015# PATH needs CR, and LINENO needs CR and PATH.
24016# Avoid depending upon Character Ranges.
24017as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24018as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24019as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24020as_cr_digits='0123456789'
24021as_cr_alnum=$as_cr_Letters$as_cr_digits
24022
24023# The user is always right.
24024if test "${PATH_SEPARATOR+set}" != set; then
24025 echo "#! /bin/sh" >conf$$.sh
24026 echo "exit 0" >>conf$$.sh
24027 chmod +x conf$$.sh
24028 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24029 PATH_SEPARATOR=';'
24030 else
24031 PATH_SEPARATOR=:
24032 fi
24033 rm -f conf$$.sh
24034fi
1a4b763e
BS
24035
24036
b61ff9c8
BS
24037 as_lineno_1=$LINENO
24038 as_lineno_2=$LINENO
24039 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
24040 test "x$as_lineno_1" != "x$as_lineno_2" &&
24041 test "x$as_lineno_3" = "x$as_lineno_2" || {
24042 # Find who we are. Look in the path if we contain no path at all
24043 # relative or not.
24044 case $0 in
24045 *[\\/]* ) as_myself=$0 ;;
24046 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24047for as_dir in $PATH
24048do
24049 IFS=$as_save_IFS
24050 test -z "$as_dir" && as_dir=.
24051 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24052done
1a4b763e 24053
b61ff9c8
BS
24054 ;;
24055 esac
24056 # We did not find ourselves, most probably we were run as `sh COMMAND'
24057 # in which case we are not to be found in the path.
24058 if test "x$as_myself" = x; then
24059 as_myself=$0
24060 fi
24061 if test ! -f "$as_myself"; then
24062 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
24063echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
24064 { (exit 1); exit 1; }; }
24065 fi
24066 case $CONFIG_SHELL in
24067 '')
24068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24069for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
24070do
24071 IFS=$as_save_IFS
24072 test -z "$as_dir" && as_dir=.
24073 for as_base in sh bash ksh sh5; do
24074 case $as_dir in
24075 /*)
24076 if ("$as_dir/$as_base" -c '
8b1f719a
PB
24077 as_lineno_1=$LINENO
24078 as_lineno_2=$LINENO
b61ff9c8 24079 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
8b1f719a 24080 test "x$as_lineno_1" != "x$as_lineno_2" &&
b61ff9c8
BS
24081 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
24082 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
24083 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
24084 CONFIG_SHELL=$as_dir/$as_base
24085 export CONFIG_SHELL
24086 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
24087 fi;;
24088 esac
24089 done
24090done
24091;;
24092 esac
ba479fd2
NN
24093
24094 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24095 # uniformly replaced by the line number. The first 'sed' inserts a
b61ff9c8
BS
24096 # line-number line before each line; the second 'sed' does the real
24097 # work. The second script uses 'N' to pair each line-number line
24098 # with the numbered line, and appends trailing '-' during
24099 # substitution so that $LINENO is not a special case at line end.
ba479fd2 24100 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b61ff9c8
BS
24101 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
24102 sed '=' <$as_myself |
ba479fd2
NN
24103 sed '
24104 N
b61ff9c8
BS
24105 s,$,-,
24106 : loop
24107 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
ba479fd2 24108 t loop
b61ff9c8
BS
24109 s,-$,,
24110 s,^['$as_cr_digits']*\n,,
ba479fd2 24111 ' >$as_me.lineno &&
b61ff9c8
BS
24112 chmod +x $as_me.lineno ||
24113 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
24114echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
ba479fd2
NN
24115 { (exit 1); exit 1; }; }
24116
24117 # Don't try to exec as it changes $[0], causing all sort of problems
24118 # (the dirname of $[0] is not the place where we might find the
b61ff9c8
BS
24119 # original and so on. Autoconf is especially sensible to this).
24120 . ./$as_me.lineno
ba479fd2
NN
24121 # Exit status is that of the last command.
24122 exit
24123}
24124
24125
b61ff9c8
BS
24126case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
24127 *c*,-n*) ECHO_N= ECHO_C='
24128' ECHO_T=' ' ;;
24129 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
24130 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
ba479fd2
NN
24131esac
24132
b61ff9c8 24133if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
24134 as_expr=expr
24135else
24136 as_expr=false
24137fi
24138
24139rm -f conf$$ conf$$.exe conf$$.file
24140echo >conf$$.file
24141if ln -s conf$$.file conf$$ 2>/dev/null; then
b61ff9c8
BS
24142 # We could just check for DJGPP; but this test a) works b) is more generic
24143 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24144 if test -f conf$$.exe; then
24145 # Don't use ln at all; we don't have any links
ba479fd2 24146 as_ln_s='cp -p'
b61ff9c8
BS
24147 else
24148 as_ln_s='ln -s'
24149 fi
ba479fd2
NN
24150elif ln conf$$.file conf$$ 2>/dev/null; then
24151 as_ln_s=ln
24152else
24153 as_ln_s='cp -p'
24154fi
b61ff9c8 24155rm -f conf$$ conf$$.exe conf$$.file
ba479fd2
NN
24156
24157if mkdir -p . 2>/dev/null; then
24158 as_mkdir_p=:
24159else
86da66b5 24160 test -d ./-p && rmdir ./-p
ba479fd2
NN
24161 as_mkdir_p=false
24162fi
24163
b61ff9c8 24164as_executable_p="test -f"
ba479fd2
NN
24165
24166# Sed expression to map a string onto a valid CPP name.
86da66b5 24167as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
24168
24169# Sed expression to map a string onto a valid variable name.
86da66b5 24170as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
24171
24172
b61ff9c8
BS
24173# IFS
24174# We need space, tab and new line, in precisely that order.
24175as_nl='
24176'
24177IFS=" $as_nl"
24178
24179# CDPATH.
24180$as_unset CDPATH
24181
ba479fd2
NN
24182exec 6>&1
24183
b61ff9c8 24184# Open the log real soon, to keep \$[0] and so on meaningful, and to
ba479fd2 24185# report actual input values of CONFIG_FILES etc. instead of their
b61ff9c8
BS
24186# values after options handling. Logging --version etc. is OK.
24187exec 5>>config.log
24188{
24189 echo
24190 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24191## Running $as_me. ##
24192_ASBOX
24193} >&5
24194cat >&5 <<_CSEOF
24195
ba479fd2 24196This file was extended by $as_me, which was
b61ff9c8 24197generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
24198
24199 CONFIG_FILES = $CONFIG_FILES
24200 CONFIG_HEADERS = $CONFIG_HEADERS
24201 CONFIG_LINKS = $CONFIG_LINKS
24202 CONFIG_COMMANDS = $CONFIG_COMMANDS
24203 $ $0 $@
24204
b61ff9c8
BS
24205_CSEOF
24206echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
24207echo >&5
ba479fd2
NN
24208_ACEOF
24209
24210# Files that config.status was made for.
b61ff9c8
BS
24211if test -n "$ac_config_files"; then
24212 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
24213fi
2f41c1d6 24214
b61ff9c8
BS
24215if test -n "$ac_config_headers"; then
24216 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
24217fi
24218
24219if test -n "$ac_config_links"; then
24220 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
24221fi
24222
24223if test -n "$ac_config_commands"; then
24224 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
24225fi
ba479fd2
NN
24226
24227cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8 24228
ba479fd2
NN
24229ac_cs_usage="\
24230\`$as_me' instantiates files from templates according to the
24231current configuration.
24232
24233Usage: $0 [OPTIONS] [FILE]...
24234
24235 -h, --help print this help, then exit
b61ff9c8 24236 -V, --version print version number, then exit
ba479fd2
NN
24237 -q, --quiet do not print progress messages
24238 -d, --debug don't remove temporary files
24239 --recheck update $as_me by reconfiguring in the same conditions
24240 --file=FILE[:TEMPLATE]
86da66b5 24241 instantiate the configuration file FILE
ba479fd2 24242 --header=FILE[:TEMPLATE]
86da66b5 24243 instantiate the configuration header FILE
ba479fd2
NN
24244
24245Configuration files:
24246$config_files
24247
24248Configuration headers:
24249$config_headers
24250
24251Configuration commands:
24252$config_commands
24253
24254Report bugs to <bug-autoconf@gnu.org>."
1a4b763e 24255_ACEOF
b61ff9c8 24256
ba479fd2
NN
24257cat >>$CONFIG_STATUS <<_ACEOF
24258ac_cs_version="\\
24259config.status
b61ff9c8
BS
24260configured by $0, generated by GNU Autoconf 2.59,
24261 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
ba479fd2 24262
b61ff9c8 24263Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
24264This config.status script is free software; the Free Software Foundation
24265gives unlimited permission to copy, distribute and modify it."
b61ff9c8 24266srcdir=$srcdir
ba479fd2
NN
24267_ACEOF
24268
24269cat >>$CONFIG_STATUS <<\_ACEOF
24270# If no file are specified by the user, then we need to provide default
24271# value. By we need to know if files were specified by the user.
24272ac_need_defaults=:
24273while test $# != 0
24274do
24275 case $1 in
24276 --*=*)
b61ff9c8
BS
24277 ac_option=`expr "x$1" : 'x\([^=]*\)='`
24278 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
ba479fd2
NN
24279 ac_shift=:
24280 ;;
b61ff9c8 24281 -*)
ba479fd2
NN
24282 ac_option=$1
24283 ac_optarg=$2
24284 ac_shift=shift
24285 ;;
b61ff9c8
BS
24286 *) # This is not an option, so the user has probably given explicit
24287 # arguments.
24288 ac_option=$1
24289 ac_need_defaults=false;;
ba479fd2
NN
24290 esac
24291
24292 case $ac_option in
24293 # Handling of the options.
b61ff9c8
BS
24294_ACEOF
24295cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
24296 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24297 ac_cs_recheck=: ;;
b61ff9c8
BS
24298 --version | --vers* | -V )
24299 echo "$ac_cs_version"; exit 0 ;;
24300 --he | --h)
24301 # Conflict between --help and --header
24302 { { echo "$as_me:$LINENO: error: ambiguous option: $1
24303Try \`$0 --help' for more information." >&5
24304echo "$as_me: error: ambiguous option: $1
24305Try \`$0 --help' for more information." >&2;}
24306 { (exit 1); exit 1; }; };;
24307 --help | --hel | -h )
24308 echo "$ac_cs_usage"; exit 0 ;;
24309 --debug | --d* | -d )
ba479fd2
NN
24310 debug=: ;;
24311 --file | --fil | --fi | --f )
24312 $ac_shift
24313 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
24314 ac_need_defaults=false;;
24315 --header | --heade | --head | --hea )
24316 $ac_shift
24317 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
24318 ac_need_defaults=false;;
24319 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24320 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24321 ac_cs_silent=: ;;
24322
24323 # This is an error.
b61ff9c8
BS
24324 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
24325Try \`$0 --help' for more information." >&5
24326echo "$as_me: error: unrecognized option: $1
24327Try \`$0 --help' for more information." >&2;}
ba479fd2
NN
24328 { (exit 1); exit 1; }; } ;;
24329
b61ff9c8 24330 *) ac_config_targets="$ac_config_targets $1" ;;
ba479fd2
NN
24331
24332 esac
24333 shift
6e3f3080 24334done
ba479fd2
NN
24335
24336ac_configure_extra_args=
24337
24338if $ac_cs_silent; then
24339 exec 6>/dev/null
24340 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
24341fi
24342
ba479fd2
NN
24343_ACEOF
24344cat >>$CONFIG_STATUS <<_ACEOF
24345if \$ac_cs_recheck; then
b61ff9c8
BS
24346 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24347 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
ba479fd2 24348fi
861bb6c1 24349
ba479fd2
NN
24350_ACEOF
24351
24352cat >>$CONFIG_STATUS <<_ACEOF
24353#
b61ff9c8 24354# INIT-COMMANDS section.
ba479fd2 24355#
b61ff9c8 24356
ba479fd2 24357subdirs='$subdirs'
ba479fd2
NN
24358
24359_ACEOF
24360
1a4b763e 24361
b61ff9c8
BS
24362
24363cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
24364for ac_config_target in $ac_config_targets
24365do
b61ff9c8
BS
24366 case "$ac_config_target" in
24367 # Handling of arguments.
24368 "as" ) CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
24369 "collect-ld" ) CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
24370 "nm" ) CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
24371 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
24372 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24373 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
ba479fd2
NN
24374 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24375echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24376 { (exit 1); exit 1; }; };;
861bb6c1 24377 esac
ba479fd2
NN
24378done
24379
24380# If the user did not use the arguments to specify the items to instantiate,
24381# then the envvar interface is used. Set only those that are not.
24382# We use the long form for the default assignment because of an extremely
24383# bizarre bug on SunOS 4.1.3.
24384if $ac_need_defaults; then
24385 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24386 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24387 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24388fi
24389
24390# Have a temporary directory for convenience. Make it in the build tree
b61ff9c8 24391# simply because there is no reason to put it here, and in addition,
ba479fd2 24392# creating and moving files from /tmp can sometimes cause problems.
b61ff9c8 24393# Create a temporary directory, and hook for its removal unless debugging.
ba479fd2
NN
24394$debug ||
24395{
b61ff9c8 24396 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
ba479fd2
NN
24397 trap '{ (exit 1); exit 1; }' 1 2 13 15
24398}
b61ff9c8 24399
ba479fd2 24400# Create a (secure) tmp directory for tmp files.
6e3f3080 24401
ba479fd2 24402{
b61ff9c8 24403 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
ba479fd2
NN
24404 test -n "$tmp" && test -d "$tmp"
24405} ||
24406{
b61ff9c8
BS
24407 tmp=./confstat$$-$RANDOM
24408 (umask 077 && mkdir $tmp)
ba479fd2
NN
24409} ||
24410{
24411 echo "$me: cannot create a temporary directory in ." >&2
24412 { (exit 1); exit 1; }
24413}
24414
b61ff9c8
BS
24415_ACEOF
24416
24417cat >>$CONFIG_STATUS <<_ACEOF
24418
ba479fd2 24419#
b61ff9c8 24420# CONFIG_FILES section.
ba479fd2
NN
24421#
24422
24423# No need to generate the scripts if there are no CONFIG_FILES.
24424# This happens for instance when ./config.status config.h
b61ff9c8
BS
24425if test -n "\$CONFIG_FILES"; then
24426 # Protect against being on the right side of a sed subst in config.status.
24427 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24428 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24429s,@SHELL@,$SHELL,;t t
24430s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24431s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24432s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24433s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24434s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24435s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24436s,@exec_prefix@,$exec_prefix,;t t
24437s,@prefix@,$prefix,;t t
24438s,@program_transform_name@,$program_transform_name,;t t
24439s,@bindir@,$bindir,;t t
24440s,@sbindir@,$sbindir,;t t
24441s,@libexecdir@,$libexecdir,;t t
24442s,@datadir@,$datadir,;t t
24443s,@sysconfdir@,$sysconfdir,;t t
24444s,@sharedstatedir@,$sharedstatedir,;t t
24445s,@localstatedir@,$localstatedir,;t t
24446s,@libdir@,$libdir,;t t
24447s,@includedir@,$includedir,;t t
24448s,@oldincludedir@,$oldincludedir,;t t
24449s,@infodir@,$infodir,;t t
24450s,@mandir@,$mandir,;t t
24451s,@build_alias@,$build_alias,;t t
24452s,@host_alias@,$host_alias,;t t
24453s,@target_alias@,$target_alias,;t t
24454s,@DEFS@,$DEFS,;t t
24455s,@ECHO_C@,$ECHO_C,;t t
24456s,@ECHO_N@,$ECHO_N,;t t
24457s,@ECHO_T@,$ECHO_T,;t t
24458s,@LIBS@,$LIBS,;t t
24459s,@build@,$build,;t t
24460s,@build_cpu@,$build_cpu,;t t
24461s,@build_vendor@,$build_vendor,;t t
24462s,@build_os@,$build_os,;t t
24463s,@host@,$host,;t t
24464s,@host_cpu@,$host_cpu,;t t
24465s,@host_vendor@,$host_vendor,;t t
24466s,@host_os@,$host_os,;t t
24467s,@target@,$target,;t t
24468s,@target_cpu@,$target_cpu,;t t
24469s,@target_vendor@,$target_vendor,;t t
24470s,@target_os@,$target_os,;t t
24471s,@target_noncanonical@,$target_noncanonical,;t t
24472s,@build_libsubdir@,$build_libsubdir,;t t
24473s,@build_subdir@,$build_subdir,;t t
24474s,@host_subdir@,$host_subdir,;t t
24475s,@target_subdir@,$target_subdir,;t t
24476s,@GENINSRC@,$GENINSRC,;t t
24477s,@CC@,$CC,;t t
24478s,@CFLAGS@,$CFLAGS,;t t
24479s,@LDFLAGS@,$LDFLAGS,;t t
24480s,@CPPFLAGS@,$CPPFLAGS,;t t
24481s,@ac_ct_CC@,$ac_ct_CC,;t t
24482s,@EXEEXT@,$EXEEXT,;t t
24483s,@OBJEXT@,$OBJEXT,;t t
3d4e720a
ST
24484s,@GNATBIND@,$GNATBIND,;t t
24485s,@ac_ct_GNATBIND@,$ac_ct_GNATBIND,;t t
24486s,@GNATMAKE@,$GNATMAKE,;t t
24487s,@ac_ct_GNATMAKE@,$ac_ct_GNATMAKE,;t t
b61ff9c8
BS
24488s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
24489s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
24490s,@CPP@,$CPP,;t t
24491s,@EGREP@,$EGREP,;t t
24492s,@loose_warn@,$loose_warn,;t t
24493s,@cxx_compat_warn@,$cxx_compat_warn,;t t
24494s,@strict_warn@,$strict_warn,;t t
24495s,@warn_cflags@,$warn_cflags,;t t
24496s,@nocommon_flag@,$nocommon_flag,;t t
24497s,@TREEBROWSER@,$TREEBROWSER,;t t
24498s,@valgrind_path@,$valgrind_path,;t t
24499s,@valgrind_path_defines@,$valgrind_path_defines,;t t
24500s,@valgrind_command@,$valgrind_command,;t t
24501s,@coverage_flags@,$coverage_flags,;t t
24502s,@enable_multilib@,$enable_multilib,;t t
24503s,@enable_decimal_float@,$enable_decimal_float,;t t
24504s,@enable_fixed_point@,$enable_fixed_point,;t t
24505s,@enable_shared@,$enable_shared,;t t
24506s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
24507s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
24508s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
24509s,@onestep@,$onestep,;t t
24510s,@PKGVERSION@,$PKGVERSION,;t t
24511s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
24512s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
24513s,@datarootdir@,$datarootdir,;t t
24514s,@docdir@,$docdir,;t t
24515s,@htmldir@,$htmldir,;t t
24516s,@SET_MAKE@,$SET_MAKE,;t t
24517s,@AWK@,$AWK,;t t
24518s,@LN_S@,$LN_S,;t t
24519s,@LN@,$LN,;t t
24520s,@RANLIB@,$RANLIB,;t t
24521s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24522s,@ranlib_flags@,$ranlib_flags,;t t
24523s,@INSTALL@,$INSTALL,;t t
24524s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24525s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24526s,@make_compare_target@,$make_compare_target,;t t
24527s,@have_mktemp_command@,$have_mktemp_command,;t t
24528s,@MAKEINFO@,$MAKEINFO,;t t
24529s,@BUILD_INFO@,$BUILD_INFO,;t t
24530s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
24531s,@FLEX@,$FLEX,;t t
24532s,@BISON@,$BISON,;t t
24533s,@NM@,$NM,;t t
24534s,@AR@,$AR,;t t
24535s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
24536s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
24537s,@LDEXP_LIB@,$LDEXP_LIB,;t t
24538s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
24539s,@LIBICONV@,$LIBICONV,;t t
24540s,@LTLIBICONV@,$LTLIBICONV,;t t
24541s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
24542s,@manext@,$manext,;t t
24543s,@objext@,$objext,;t t
24544s,@gthread_flags@,$gthread_flags,;t t
24545s,@extra_modes_file@,$extra_modes_file,;t t
24546s,@extra_opt_files@,$extra_opt_files,;t t
24547s,@USE_NLS@,$USE_NLS,;t t
24548s,@LIBINTL@,$LIBINTL,;t t
24549s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
24550s,@INCINTL@,$INCINTL,;t t
24551s,@XGETTEXT@,$XGETTEXT,;t t
24552s,@GMSGFMT@,$GMSGFMT,;t t
24553s,@POSUB@,$POSUB,;t t
24554s,@CATALOGS@,$CATALOGS,;t t
24555s,@DATADIRNAME@,$DATADIRNAME,;t t
24556s,@INSTOBJEXT@,$INSTOBJEXT,;t t
24557s,@GENCAT@,$GENCAT,;t t
24558s,@CATOBJEXT@,$CATOBJEXT,;t t
24559s,@host_cc_for_libada@,$host_cc_for_libada,;t t
24560s,@CROSS@,$CROSS,;t t
24561s,@ALL@,$ALL,;t t
24562s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
24563s,@inhibit_libc@,$inhibit_libc,;t t
24564s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
24565s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
f8c33439 24566s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
b61ff9c8
BS
24567s,@STMP_FIXINC@,$STMP_FIXINC,;t t
24568s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
24569s,@collect2@,$collect2,;t t
da0f6381
PB
24570s,@LIBTOOL@,$LIBTOOL,;t t
24571s,@SED@,$SED,;t t
24572s,@FGREP@,$FGREP,;t t
24573s,@GREP@,$GREP,;t t
24574s,@LD@,$LD,;t t
24575s,@DUMPBIN@,$DUMPBIN,;t t
24576s,@ac_ct_DUMPBIN@,$ac_ct_DUMPBIN,;t t
24577s,@ac_ct_AR@,$ac_ct_AR,;t t
24578s,@STRIP@,$STRIP,;t t
24579s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
24580s,@lt_ECHO@,$lt_ECHO,;t t
24581s,@objdir@,$objdir,;t t
24582s,@enable_fast_install@,$enable_fast_install,;t t
b61ff9c8
BS
24583s,@gcc_cv_as@,$gcc_cv_as,;t t
24584s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
24585s,@gcc_cv_ld@,$gcc_cv_ld,;t t
24586s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
24587s,@gcc_cv_nm@,$gcc_cv_nm,;t t
24588s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
24589s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
24590s,@libgcc_visibility@,$libgcc_visibility,;t t
24591s,@GGC@,$GGC,;t t
24592s,@zlibdir@,$zlibdir,;t t
24593s,@zlibinc@,$zlibinc,;t t
24594s,@MAINT@,$MAINT,;t t
24595s,@gcc_tooldir@,$gcc_tooldir,;t t
24596s,@dollar@,$dollar,;t t
24597s,@slibdir@,$slibdir,;t t
b61ff9c8
BS
24598s,@subdirs@,$subdirs,;t t
24599s,@srcdir@,$srcdir,;t t
24600s,@all_compilers@,$all_compilers,;t t
24601s,@all_gtfiles@,$all_gtfiles,;t t
24602s,@all_lang_makefrags@,$all_lang_makefrags,;t t
24603s,@all_lang_makefiles@,$all_lang_makefiles,;t t
24604s,@all_languages@,$all_languages,;t t
24605s,@all_selected_languages@,$all_selected_languages,;t t
24606s,@build_exeext@,$build_exeext,;t t
24607s,@build_install_headers_dir@,$build_install_headers_dir,;t t
24608s,@build_xm_file_list@,$build_xm_file_list,;t t
24609s,@build_xm_include_list@,$build_xm_include_list,;t t
24610s,@build_xm_defines@,$build_xm_defines,;t t
a0e527e3 24611s,@build_file_translate@,$build_file_translate,;t t
b61ff9c8
BS
24612s,@check_languages@,$check_languages,;t t
24613s,@cpp_install_dir@,$cpp_install_dir,;t t
24614s,@xmake_file@,$xmake_file,;t t
24615s,@tmake_file@,$tmake_file,;t t
24616s,@extra_gcc_objs@,$extra_gcc_objs,;t t
24617s,@extra_headers_list@,$extra_headers_list,;t t
24618s,@extra_objs@,$extra_objs,;t t
24619s,@extra_parts@,$extra_parts,;t t
24620s,@extra_passes@,$extra_passes,;t t
24621s,@extra_programs@,$extra_programs,;t t
24622s,@float_h_file@,$float_h_file,;t t
24623s,@gcc_config_arguments@,$gcc_config_arguments,;t t
24624s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
24625s,@host_exeext@,$host_exeext,;t t
24626s,@host_xm_file_list@,$host_xm_file_list,;t t
24627s,@host_xm_include_list@,$host_xm_include_list,;t t
24628s,@host_xm_defines@,$host_xm_defines,;t t
24629s,@out_host_hook_obj@,$out_host_hook_obj,;t t
24630s,@install@,$install,;t t
24631s,@lang_opt_files@,$lang_opt_files,;t t
24632s,@lang_specs_files@,$lang_specs_files,;t t
24633s,@lang_tree_files@,$lang_tree_files,;t t
24634s,@local_prefix@,$local_prefix,;t t
24635s,@md_file@,$md_file,;t t
24636s,@objc_boehm_gc@,$objc_boehm_gc,;t t
24637s,@out_file@,$out_file,;t t
24638s,@out_object_file@,$out_object_file,;t t
24639s,@thread_file@,$thread_file,;t t
24640s,@tm_file_list@,$tm_file_list,;t t
24641s,@tm_include_list@,$tm_include_list,;t t
24642s,@tm_defines@,$tm_defines,;t t
24643s,@tm_p_file_list@,$tm_p_file_list,;t t
24644s,@tm_p_include_list@,$tm_p_include_list,;t t
24645s,@xm_file_list@,$xm_file_list,;t t
24646s,@xm_include_list@,$xm_include_list,;t t
24647s,@xm_defines@,$xm_defines,;t t
24648s,@c_target_objs@,$c_target_objs,;t t
24649s,@cxx_target_objs@,$cxx_target_objs,;t t
c776a6d0 24650s,@fortran_target_objs@,$fortran_target_objs,;t t
b61ff9c8
BS
24651s,@target_cpu_default@,$target_cpu_default,;t t
24652s,@GMPLIBS@,$GMPLIBS,;t t
24653s,@GMPINC@,$GMPINC,;t t
24654s,@LIBOBJS@,$LIBOBJS,;t t
24655s,@LTLIBOBJS@,$LTLIBOBJS,;t t
24656/@language_hooks@/r $language_hooks
24657s,@language_hooks@,,;t t
24658CEOF
24659
24660_ACEOF
24661
24662 cat >>$CONFIG_STATUS <<\_ACEOF
24663 # Split the substitutions into bite-sized pieces for seds with
24664 # small command number limits, like on Digital OSF/1 and HP-UX.
24665 ac_max_sed_lines=48
24666 ac_sed_frag=1 # Number of current file.
24667 ac_beg=1 # First line for current file.
24668 ac_end=$ac_max_sed_lines # Line after last line for current file.
24669 ac_more_lines=:
24670 ac_sed_cmds=
24671 while $ac_more_lines; do
24672 if test $ac_beg -gt 1; then
24673 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24674 else
24675 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24676 fi
24677 if test ! -s $tmp/subs.frag; then
24678 ac_more_lines=false
24679 else
24680 # The purpose of the label and of the branching condition is to
24681 # speed up the sed processing (if there are no `@' at all, there
24682 # is no need to browse any of the substitutions).
24683 # These are the two extra sed commands mentioned above.
24684 (echo ':t
24685 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24686 if test -z "$ac_sed_cmds"; then
24687 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24688 else
24689 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24690 fi
24691 ac_sed_frag=`expr $ac_sed_frag + 1`
24692 ac_beg=$ac_end
24693 ac_end=`expr $ac_end + $ac_max_sed_lines`
24694 fi
24695 done
24696 if test -z "$ac_sed_cmds"; then
24697 ac_sed_cmds=cat
1a4b763e 24698 fi
b61ff9c8 24699fi # test -n "$CONFIG_FILES"
1a4b763e 24700
1a4b763e 24701_ACEOF
ba479fd2 24702cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8
BS
24703for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24704 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24705 case $ac_file in
24706 - | *:- | *:-:* ) # input from stdin
24707 cat >$tmp/stdin
24708 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24709 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24710 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24711 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24712 * ) ac_file_in=$ac_file.in ;;
703d89ab
ZW
24713 esac
24714
b61ff9c8
BS
24715 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24716 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
ba479fd2 24717$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
24718 X"$ac_file" : 'X\(//\)[^/]' \| \
24719 X"$ac_file" : 'X\(//\)$' \| \
b61ff9c8
BS
24720 X"$ac_file" : 'X\(/\)' \| \
24721 . : '\(.\)' 2>/dev/null ||
ba479fd2 24722echo X"$ac_file" |
b61ff9c8
BS
24723 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24724 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24725 /^X\(\/\/\)$/{ s//\1/; q; }
24726 /^X\(\/\).*/{ s//\1/; q; }
24727 s/.*/./; q'`
24728 { if $as_mkdir_p; then
24729 mkdir -p "$ac_dir"
24730 else
24731 as_dir="$ac_dir"
ba479fd2 24732 as_dirs=
b61ff9c8
BS
24733 while test ! -d "$as_dir"; do
24734 as_dirs="$as_dir $as_dirs"
24735 as_dir=`(dirname "$as_dir") 2>/dev/null ||
ba479fd2 24736$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
24737 X"$as_dir" : 'X\(//\)[^/]' \| \
24738 X"$as_dir" : 'X\(//\)$' \| \
b61ff9c8
BS
24739 X"$as_dir" : 'X\(/\)' \| \
24740 . : '\(.\)' 2>/dev/null ||
ba479fd2 24741echo X"$as_dir" |
b61ff9c8
BS
24742 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24743 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24744 /^X\(\/\/\)$/{ s//\1/; q; }
24745 /^X\(\/\).*/{ s//\1/; q; }
24746 s/.*/./; q'`
ba479fd2 24747 done
b61ff9c8
BS
24748 test ! -n "$as_dirs" || mkdir $as_dirs
24749 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24750echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
ba479fd2 24751 { (exit 1); exit 1; }; }; }
b61ff9c8 24752
ba479fd2
NN
24753 ac_builddir=.
24754
b61ff9c8 24755if test "$ac_dir" != .; then
ba479fd2 24756 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b61ff9c8
BS
24757 # A "../" for each directory in $ac_dir_suffix.
24758 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24759else
24760 ac_dir_suffix= ac_top_builddir=
24761fi
ba479fd2
NN
24762
24763case $srcdir in
b61ff9c8 24764 .) # No --srcdir option. We are building in place.
ba479fd2 24765 ac_srcdir=.
b61ff9c8
BS
24766 if test -z "$ac_top_builddir"; then
24767 ac_top_srcdir=.
24768 else
24769 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24770 fi ;;
24771 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 24772 ac_srcdir=$srcdir$ac_dir_suffix;
b61ff9c8
BS
24773 ac_top_srcdir=$srcdir ;;
24774 *) # Relative path.
24775 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24776 ac_top_srcdir=$ac_top_builddir$srcdir ;;
ba479fd2 24777esac
ba479fd2 24778
b61ff9c8
BS
24779# Do not use `cd foo && pwd` to compute absolute paths, because
24780# the directories may not exist.
24781case `pwd` in
24782.) ac_abs_builddir="$ac_dir";;
24783*)
24784 case "$ac_dir" in
24785 .) ac_abs_builddir=`pwd`;;
24786 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24787 *) ac_abs_builddir=`pwd`/"$ac_dir";;
24788 esac;;
24789esac
24790case $ac_abs_builddir in
24791.) ac_abs_top_builddir=${ac_top_builddir}.;;
24792*)
24793 case ${ac_top_builddir}. in
24794 .) ac_abs_top_builddir=$ac_abs_builddir;;
24795 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24796 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24797 esac;;
24798esac
24799case $ac_abs_builddir in
24800.) ac_abs_srcdir=$ac_srcdir;;
24801*)
24802 case $ac_srcdir in
24803 .) ac_abs_srcdir=$ac_abs_builddir;;
24804 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24805 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24806 esac;;
24807esac
24808case $ac_abs_builddir in
24809.) ac_abs_top_srcdir=$ac_top_srcdir;;
24810*)
24811 case $ac_top_srcdir in
24812 .) ac_abs_top_srcdir=$ac_abs_builddir;;
24813 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24814 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24815 esac;;
24816esac
703d89ab 24817
ab22c1fa 24818
1a4b763e 24819
b61ff9c8
BS
24820 if test x"$ac_file" != x-; then
24821 { echo "$as_me:$LINENO: creating $ac_file" >&5
24822echo "$as_me: creating $ac_file" >&6;}
24823 rm -f "$ac_file"
24824 fi
24825 # Let's still pretend it is `configure' which instantiates (i.e., don't
24826 # use $as_me), people would be surprised to read:
24827 # /* config.h. Generated by config.status. */
24828 if test x"$ac_file" = x-; then
24829 configure_input=
24830 else
24831 configure_input="$ac_file. "
24832 fi
24833 configure_input=$configure_input"Generated from `echo $ac_file_in |
24834 sed 's,.*/,,'` by configure."
24835
24836 # First look for the input files in the build tree, otherwise in the
24837 # src tree.
24838 ac_file_inputs=`IFS=:
24839 for f in $ac_file_in; do
24840 case $f in
24841 -) echo $tmp/stdin ;;
24842 [\\/$]*)
24843 # Absolute (can't be DOS-style, as IFS=:)
24844 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24845echo "$as_me: error: cannot find input file: $f" >&2;}
24846 { (exit 1); exit 1; }; }
24847 echo "$f";;
24848 *) # Relative
24849 if test -f "$f"; then
24850 # Build tree
24851 echo "$f"
24852 elif test -f "$srcdir/$f"; then
24853 # Source tree
24854 echo "$srcdir/$f"
24855 else
24856 # /dev/null tree
24857 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24858echo "$as_me: error: cannot find input file: $f" >&2;}
24859 { (exit 1); exit 1; }; }
24860 fi;;
24861 esac
24862 done` || { (exit 1); exit 1; }
a6ccdbab 24863_ACEOF
ba479fd2
NN
24864cat >>$CONFIG_STATUS <<_ACEOF
24865 sed "$ac_vpsub
24866$extrasub
24867_ACEOF
24868cat >>$CONFIG_STATUS <<\_ACEOF
24869:t
24870/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b61ff9c8
BS
24871s,@configure_input@,$configure_input,;t t
24872s,@srcdir@,$ac_srcdir,;t t
24873s,@abs_srcdir@,$ac_abs_srcdir,;t t
24874s,@top_srcdir@,$ac_top_srcdir,;t t
24875s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
24876s,@builddir@,$ac_builddir,;t t
24877s,@abs_builddir@,$ac_abs_builddir,;t t
24878s,@top_builddir@,$ac_top_builddir,;t t
24879s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
24880" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24881 rm -f $tmp/stdin
24882 if test x"$ac_file" != x-; then
24883 mv $tmp/out $ac_file
24884 else
24885 cat $tmp/out
24886 rm -f $tmp/out
24887 fi
24888
24889 # Run the commands associated with the file.
be0fe523 24890 case $ac_file in
b61ff9c8
BS
24891 as ) chmod +x as ;;
24892 collect-ld ) chmod +x collect-ld ;;
24893 nm ) chmod +x nm ;;
be0fe523 24894 esac
b61ff9c8
BS
24895done
24896_ACEOF
24897cat >>$CONFIG_STATUS <<\_ACEOF
24898
24899#
24900# CONFIG_HEADER section.
24901#
24902
24903# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24904# NAME is the cpp macro being defined and VALUE is the value it is being given.
24905#
24906# ac_d sets the value in "#define NAME VALUE" lines.
24907ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
24908ac_dB='[ ].*$,\1#\2'
a3bba767 24909ac_dC=' '
b61ff9c8
BS
24910ac_dD=',;t'
24911# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24912ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
24913ac_uB='$,\1#\2define\3'
24914ac_uC=' '
24915ac_uD=',;t'
24916
24917for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24918 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24919 case $ac_file in
24920 - | *:- | *:-:* ) # input from stdin
24921 cat >$tmp/stdin
24922 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24923 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24924 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24925 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24926 * ) ac_file_in=$ac_file.in ;;
24927 esac
24928
24929 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
24930echo "$as_me: creating $ac_file" >&6;}
24931
24932 # First look for the input files in the build tree, otherwise in the
24933 # src tree.
24934 ac_file_inputs=`IFS=:
24935 for f in $ac_file_in; do
24936 case $f in
24937 -) echo $tmp/stdin ;;
24938 [\\/$]*)
24939 # Absolute (can't be DOS-style, as IFS=:)
24940 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24941echo "$as_me: error: cannot find input file: $f" >&2;}
24942 { (exit 1); exit 1; }; }
24943 # Do quote $f, to prevent DOS paths from being IFS'd.
24944 echo "$f";;
24945 *) # Relative
24946 if test -f "$f"; then
24947 # Build tree
24948 echo "$f"
24949 elif test -f "$srcdir/$f"; then
24950 # Source tree
24951 echo "$srcdir/$f"
24952 else
24953 # /dev/null tree
24954 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24955echo "$as_me: error: cannot find input file: $f" >&2;}
24956 { (exit 1); exit 1; }; }
24957 fi;;
24958 esac
24959 done` || { (exit 1); exit 1; }
24960 # Remove the trailing spaces.
24961 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
24962
24963_ACEOF
24964
24965# Transform confdefs.h into two sed scripts, `conftest.defines' and
24966# `conftest.undefs', that substitutes the proper values into
24967# config.h.in to produce config.h. The first handles `#define'
24968# templates, and the second `#undef' templates.
24969# And first: Protect against being on the right side of a sed subst in
24970# config.status. Protect against being in an unquoted here document
24971# in config.status.
24972rm -f conftest.defines conftest.undefs
24973# Using a here document instead of a string reduces the quoting nightmare.
24974# Putting comments in sed scripts is not portable.
24975#
24976# `end' is used to avoid that the second main sed command (meant for
24977# 0-ary CPP macros) applies to n-ary macro definitions.
24978# See the Autoconf documentation for `clear'.
24979cat >confdef2sed.sed <<\_ACEOF
24980s/[\\&,]/\\&/g
24981s,[\\$`],\\&,g
24982t clear
24983: clear
24984s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
24985t end
24986s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
24987: end
24988_ACEOF
24989# If some macros were called several times there might be several times
24990# the same #defines, which is useless. Nevertheless, we may not want to
24991# sort them, since we want the *last* AC-DEFINE to be honored.
24992uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
24993sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
24994rm -f confdef2sed.sed
24995
24996# This sed command replaces #undef with comments. This is necessary, for
861bb6c1
JL
24997# example, in the case of _POSIX_SOURCE, which is predefined and required
24998# on some systems where configure will not decide to define it.
b61ff9c8
BS
24999cat >>conftest.undefs <<\_ACEOF
25000s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
25001_ACEOF
25002
25003# Break up conftest.defines because some shells have a limit on the size
25004# of here documents, and old seds have small limits too (100 cmds).
25005echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
25006echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
25007echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
25008echo ' :' >>$CONFIG_STATUS
25009rm -f conftest.tail
25010while grep . conftest.defines >/dev/null
ba479fd2 25011do
b61ff9c8
BS
25012 # Write a limited-size here document to $tmp/defines.sed.
25013 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
25014 # Speed up: don't consider the non `#define' lines.
25015 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
25016 # Work around the forget-to-reset-the-flag bug.
25017 echo 't clr' >>$CONFIG_STATUS
25018 echo ': clr' >>$CONFIG_STATUS
25019 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
ba479fd2 25020 echo 'CEOF
b61ff9c8
BS
25021 sed -f $tmp/defines.sed $tmp/in >$tmp/out
25022 rm -f $tmp/in
25023 mv $tmp/out $tmp/in
25024' >>$CONFIG_STATUS
25025 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
ba479fd2
NN
25026 rm -f conftest.defines
25027 mv conftest.tail conftest.defines
25028done
b61ff9c8
BS
25029rm -f conftest.defines
25030echo ' fi # grep' >>$CONFIG_STATUS
25031echo >>$CONFIG_STATUS
25032
25033# Break up conftest.undefs because some shells have a limit on the size
25034# of here documents, and old seds have small limits too (100 cmds).
25035echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
25036rm -f conftest.tail
25037while grep . conftest.undefs >/dev/null
25038do
25039 # Write a limited-size here document to $tmp/undefs.sed.
25040 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
25041 # Speed up: don't consider the non `#undef'
25042 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
25043 # Work around the forget-to-reset-the-flag bug.
25044 echo 't clr' >>$CONFIG_STATUS
25045 echo ': clr' >>$CONFIG_STATUS
25046 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
25047 echo 'CEOF
25048 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
25049 rm -f $tmp/in
25050 mv $tmp/out $tmp/in
25051' >>$CONFIG_STATUS
25052 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
25053 rm -f conftest.undefs
25054 mv conftest.tail conftest.undefs
25055done
25056rm -f conftest.undefs
ba479fd2
NN
25057
25058cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8
BS
25059 # Let's still pretend it is `configure' which instantiates (i.e., don't
25060 # use $as_me), people would be surprised to read:
25061 # /* config.h. Generated by config.status. */
25062 if test x"$ac_file" = x-; then
25063 echo "/* Generated by configure. */" >$tmp/config.h
25064 else
25065 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
25066 fi
25067 cat $tmp/in >>$tmp/config.h
25068 rm -f $tmp/in
ba479fd2 25069 if test x"$ac_file" != x-; then
b61ff9c8 25070 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
ba479fd2
NN
25071 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25072echo "$as_me: $ac_file is unchanged" >&6;}
25073 else
b61ff9c8
BS
25074 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
25075$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25076 X"$ac_file" : 'X\(//\)[^/]' \| \
25077 X"$ac_file" : 'X\(//\)$' \| \
25078 X"$ac_file" : 'X\(/\)' \| \
25079 . : '\(.\)' 2>/dev/null ||
25080echo X"$ac_file" |
25081 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25082 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25083 /^X\(\/\/\)$/{ s//\1/; q; }
25084 /^X\(\/\).*/{ s//\1/; q; }
25085 s/.*/./; q'`
25086 { if $as_mkdir_p; then
25087 mkdir -p "$ac_dir"
25088 else
25089 as_dir="$ac_dir"
25090 as_dirs=
25091 while test ! -d "$as_dir"; do
25092 as_dirs="$as_dir $as_dirs"
25093 as_dir=`(dirname "$as_dir") 2>/dev/null ||
25094$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25095 X"$as_dir" : 'X\(//\)[^/]' \| \
25096 X"$as_dir" : 'X\(//\)$' \| \
25097 X"$as_dir" : 'X\(/\)' \| \
25098 . : '\(.\)' 2>/dev/null ||
25099echo X"$as_dir" |
25100 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25101 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25102 /^X\(\/\/\)$/{ s//\1/; q; }
25103 /^X\(\/\).*/{ s//\1/; q; }
25104 s/.*/./; q'`
25105 done
25106 test ! -n "$as_dirs" || mkdir $as_dirs
25107 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
25108echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
25109 { (exit 1); exit 1; }; }; }
25110
ba479fd2 25111 rm -f $ac_file
b61ff9c8 25112 mv $tmp/config.h $ac_file
ba479fd2
NN
25113 fi
25114 else
b61ff9c8
BS
25115 cat $tmp/config.h
25116 rm -f $tmp/config.h
ba479fd2 25117 fi
b61ff9c8
BS
25118done
25119_ACEOF
25120cat >>$CONFIG_STATUS <<\_ACEOF
2f41c1d6 25121
b61ff9c8
BS
25122#
25123# CONFIG_COMMANDS section.
25124#
25125for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
25126 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
25127 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
25128 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
25129$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25130 X"$ac_dest" : 'X\(//\)[^/]' \| \
25131 X"$ac_dest" : 'X\(//\)$' \| \
25132 X"$ac_dest" : 'X\(/\)' \| \
25133 . : '\(.\)' 2>/dev/null ||
25134echo X"$ac_dest" |
25135 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25136 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25137 /^X\(\/\/\)$/{ s//\1/; q; }
25138 /^X\(\/\).*/{ s//\1/; q; }
25139 s/.*/./; q'`
25140 { if $as_mkdir_p; then
25141 mkdir -p "$ac_dir"
25142 else
25143 as_dir="$ac_dir"
25144 as_dirs=
25145 while test ! -d "$as_dir"; do
25146 as_dirs="$as_dir $as_dirs"
25147 as_dir=`(dirname "$as_dir") 2>/dev/null ||
25148$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25149 X"$as_dir" : 'X\(//\)[^/]' \| \
25150 X"$as_dir" : 'X\(//\)$' \| \
25151 X"$as_dir" : 'X\(/\)' \| \
25152 . : '\(.\)' 2>/dev/null ||
25153echo X"$as_dir" |
25154 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25155 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25156 /^X\(\/\/\)$/{ s//\1/; q; }
25157 /^X\(\/\).*/{ s//\1/; q; }
25158 s/.*/./; q'`
25159 done
25160 test ! -n "$as_dirs" || mkdir $as_dirs
25161 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
25162echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
25163 { (exit 1); exit 1; }; }; }
2f41c1d6 25164
b61ff9c8 25165 ac_builddir=.
2f41c1d6 25166
b61ff9c8
BS
25167if test "$ac_dir" != .; then
25168 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
25169 # A "../" for each directory in $ac_dir_suffix.
25170 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
25171else
25172 ac_dir_suffix= ac_top_builddir=
25173fi
25174
25175case $srcdir in
25176 .) # No --srcdir option. We are building in place.
25177 ac_srcdir=.
25178 if test -z "$ac_top_builddir"; then
25179 ac_top_srcdir=.
25180 else
25181 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
25182 fi ;;
25183 [\\/]* | ?:[\\/]* ) # Absolute path.
25184 ac_srcdir=$srcdir$ac_dir_suffix;
25185 ac_top_srcdir=$srcdir ;;
25186 *) # Relative path.
25187 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
25188 ac_top_srcdir=$ac_top_builddir$srcdir ;;
25189esac
25190
25191# Do not use `cd foo && pwd` to compute absolute paths, because
25192# the directories may not exist.
25193case `pwd` in
25194.) ac_abs_builddir="$ac_dir";;
25195*)
25196 case "$ac_dir" in
25197 .) ac_abs_builddir=`pwd`;;
25198 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
25199 *) ac_abs_builddir=`pwd`/"$ac_dir";;
25200 esac;;
25201esac
25202case $ac_abs_builddir in
25203.) ac_abs_top_builddir=${ac_top_builddir}.;;
25204*)
25205 case ${ac_top_builddir}. in
25206 .) ac_abs_top_builddir=$ac_abs_builddir;;
25207 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
25208 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
25209 esac;;
25210esac
25211case $ac_abs_builddir in
25212.) ac_abs_srcdir=$ac_srcdir;;
25213*)
25214 case $ac_srcdir in
25215 .) ac_abs_srcdir=$ac_abs_builddir;;
25216 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
25217 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
25218 esac;;
25219esac
25220case $ac_abs_builddir in
25221.) ac_abs_top_srcdir=$ac_top_srcdir;;
25222*)
25223 case $ac_top_srcdir in
25224 .) ac_abs_top_srcdir=$ac_abs_builddir;;
25225 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
25226 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
25227 esac;;
25228esac
25229
25230
25231 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
25232echo "$as_me: executing $ac_dest commands" >&6;}
25233 case $ac_dest in
25234 default )
f1faaabd
NN
25235case ${CONFIG_HEADERS} in
25236 *auto-host.h:config.in*)
25237 echo > cstamp-h ;;
861bb6c1 25238esac
2ed26f6b 25239# Make sure all the subdirs exist.
3b620440 25240for d in $subdirs doc build
2ed26f6b 25241do
2ed26f6b 25242 test -d $d || mkdir $d
2ed26f6b 25243done
ba479fd2
NN
25244 ;;
25245 esac
b61ff9c8
BS
25246done
25247_ACEOF
cafe096b 25248
b61ff9c8 25249cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
25250
25251{ (exit 0); exit 0; }
25252_ACEOF
861bb6c1 25253chmod +x $CONFIG_STATUS
ba479fd2
NN
25254ac_clean_files=$ac_clean_files_save
25255
25256
25257# configure is writing to config.log, and then calls config.status.
25258# config.status does its own redirection, appending to config.log.
25259# Unfortunately, on DOS this fails, as config.log is still kept open
25260# by configure, so config.status won't be able to write to it; its
25261# output is simply discarded. So we exec the FD to /dev/null,
25262# effectively closing config.log, so it can be properly (re)opened and
25263# appended to by config.status. When coming back to configure, we
25264# need to make the FD available again.
25265if test "$no_create" != yes; then
25266 ac_cs_success=:
25267 ac_config_status_args=
25268 test "$silent" = yes &&
25269 ac_config_status_args="$ac_config_status_args --quiet"
25270 exec 5>/dev/null
25271 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
25272 exec 5>>config.log
25273 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25274 # would make configure fail if this is the last instruction.
25275 $ac_cs_success || { (exit 1); exit 1; }
25276fi
861bb6c1 25277