]> gcc.gnu.org Git - gcc.git/blame - gcc/configure
backport: configure: Regenerate.
[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
f8bf9252 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 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 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 PPLLIBS PPLINC CLOOGLIBS CLOOGINC GRAPHITE LIBOBJS LTLIBOBJS'
ba479fd2 462ac_subst_files='language_hooks'
18c04407 463ac_pwd=`pwd`
861bb6c1
JL
464
465# Initialize some variables set by options.
ba479fd2
NN
466ac_init_help=
467ac_init_version=false
861bb6c1
JL
468# The variables have the same names as the options, with
469# dashes changed to underlines.
ba479fd2 470cache_file=/dev/null
861bb6c1 471exec_prefix=NONE
861bb6c1 472no_create=
861bb6c1
JL
473no_recursion=
474prefix=NONE
475program_prefix=NONE
476program_suffix=NONE
477program_transform_name=s,x,x,
478silent=
479site=
480srcdir=
861bb6c1
JL
481verbose=
482x_includes=NONE
483x_libraries=NONE
ba479fd2
NN
484
485# Installation directory options.
486# These are left unexpanded so users can "make install exec_prefix=/foo"
487# and all the variables that are supposed to be based on exec_prefix
488# by default will actually change.
489# Use braces instead of parens because sh, perl, etc. also accept them.
861bb6c1
JL
490bindir='${exec_prefix}/bin'
491sbindir='${exec_prefix}/sbin'
492libexecdir='${exec_prefix}/libexec'
b61ff9c8 493datadir='${prefix}/share'
861bb6c1
JL
494sysconfdir='${prefix}/etc'
495sharedstatedir='${prefix}/com'
496localstatedir='${prefix}/var'
b61ff9c8 497libdir='${exec_prefix}/lib'
861bb6c1
JL
498includedir='${prefix}/include'
499oldincludedir='/usr/include'
b61ff9c8
BS
500infodir='${prefix}/info'
501mandir='${prefix}/man'
861bb6c1 502
861bb6c1
JL
503ac_prev=
504for ac_option
505do
861bb6c1
JL
506 # If the previous option needs an argument, assign it.
507 if test -n "$ac_prev"; then
b61ff9c8 508 eval "$ac_prev=\$ac_option"
861bb6c1
JL
509 ac_prev=
510 continue
511 fi
512
b61ff9c8 513 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
861bb6c1
JL
514
515 # Accept the important Cygnus configure options, so we can diagnose typos.
516
b61ff9c8 517 case $ac_option in
861bb6c1
JL
518
519 -bindir | --bindir | --bindi | --bind | --bin | --bi)
520 ac_prev=bindir ;;
521 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 522 bindir=$ac_optarg ;;
861bb6c1
JL
523
524 -build | --build | --buil | --bui | --bu)
ba479fd2 525 ac_prev=build_alias ;;
861bb6c1 526 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 527 build_alias=$ac_optarg ;;
861bb6c1
JL
528
529 -cache-file | --cache-file | --cache-fil | --cache-fi \
530 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
531 ac_prev=cache_file ;;
532 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
533 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
534 cache_file=$ac_optarg ;;
535
536 --config-cache | -C)
537 cache_file=config.cache ;;
861bb6c1 538
b61ff9c8 539 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
861bb6c1 540 ac_prev=datadir ;;
b61ff9c8
BS
541 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
542 | --da=*)
ba479fd2 543 datadir=$ac_optarg ;;
861bb6c1
JL
544
545 -disable-* | --disable-*)
ba479fd2 546 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 547 # Reject names that are not valid shell variable names.
b61ff9c8 548 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
549 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
550 { (exit 1); exit 1; }; }
b61ff9c8
BS
551 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
552 eval "enable_$ac_feature=no" ;;
861bb6c1
JL
553
554 -enable-* | --enable-*)
ba479fd2 555 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 556 # Reject names that are not valid shell variable names.
b61ff9c8 557 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
558 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
559 { (exit 1); exit 1; }; }
b61ff9c8
BS
560 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
561 case $ac_option in
562 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
563 *) ac_optarg=yes ;;
564 esac
565 eval "enable_$ac_feature='$ac_optarg'" ;;
861bb6c1
JL
566
567 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
568 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
569 | --exec | --exe | --ex)
570 ac_prev=exec_prefix ;;
571 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
572 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
573 | --exec=* | --exe=* | --ex=*)
ba479fd2 574 exec_prefix=$ac_optarg ;;
861bb6c1
JL
575
576 -gas | --gas | --ga | --g)
577 # Obsolete; use --with-gas.
578 with_gas=yes ;;
579
ba479fd2
NN
580 -help | --help | --hel | --he | -h)
581 ac_init_help=long ;;
582 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
583 ac_init_help=recursive ;;
584 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
585 ac_init_help=short ;;
861bb6c1
JL
586
587 -host | --host | --hos | --ho)
ba479fd2 588 ac_prev=host_alias ;;
861bb6c1 589 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 590 host_alias=$ac_optarg ;;
861bb6c1
JL
591
592 -includedir | --includedir | --includedi | --included | --include \
593 | --includ | --inclu | --incl | --inc)
594 ac_prev=includedir ;;
595 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
596 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 597 includedir=$ac_optarg ;;
861bb6c1
JL
598
599 -infodir | --infodir | --infodi | --infod | --info | --inf)
600 ac_prev=infodir ;;
601 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 602 infodir=$ac_optarg ;;
861bb6c1
JL
603
604 -libdir | --libdir | --libdi | --libd)
605 ac_prev=libdir ;;
606 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 607 libdir=$ac_optarg ;;
861bb6c1
JL
608
609 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
610 | --libexe | --libex | --libe)
611 ac_prev=libexecdir ;;
612 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
613 | --libexe=* | --libex=* | --libe=*)
ba479fd2 614 libexecdir=$ac_optarg ;;
861bb6c1
JL
615
616 -localstatedir | --localstatedir | --localstatedi | --localstated \
b61ff9c8
BS
617 | --localstate | --localstat | --localsta | --localst \
618 | --locals | --local | --loca | --loc | --lo)
861bb6c1
JL
619 ac_prev=localstatedir ;;
620 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
b61ff9c8
BS
621 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
622 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
ba479fd2 623 localstatedir=$ac_optarg ;;
861bb6c1
JL
624
625 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
626 ac_prev=mandir ;;
627 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 628 mandir=$ac_optarg ;;
861bb6c1
JL
629
630 -nfp | --nfp | --nf)
631 # Obsolete; use --without-fp.
632 with_fp=no ;;
633
634 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 635 | --no-cr | --no-c | -n)
861bb6c1
JL
636 no_create=yes ;;
637
638 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
639 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
640 no_recursion=yes ;;
641
642 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
643 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
644 | --oldin | --oldi | --old | --ol | --o)
645 ac_prev=oldincludedir ;;
646 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
647 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
648 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 649 oldincludedir=$ac_optarg ;;
861bb6c1
JL
650
651 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
652 ac_prev=prefix ;;
653 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 654 prefix=$ac_optarg ;;
861bb6c1
JL
655
656 -program-prefix | --program-prefix | --program-prefi | --program-pref \
657 | --program-pre | --program-pr | --program-p)
658 ac_prev=program_prefix ;;
659 -program-prefix=* | --program-prefix=* | --program-prefi=* \
660 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 661 program_prefix=$ac_optarg ;;
861bb6c1
JL
662
663 -program-suffix | --program-suffix | --program-suffi | --program-suff \
664 | --program-suf | --program-su | --program-s)
665 ac_prev=program_suffix ;;
666 -program-suffix=* | --program-suffix=* | --program-suffi=* \
667 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 668 program_suffix=$ac_optarg ;;
861bb6c1
JL
669
670 -program-transform-name | --program-transform-name \
671 | --program-transform-nam | --program-transform-na \
672 | --program-transform-n | --program-transform- \
673 | --program-transform | --program-transfor \
674 | --program-transfo | --program-transf \
675 | --program-trans | --program-tran \
676 | --progr-tra | --program-tr | --program-t)
677 ac_prev=program_transform_name ;;
678 -program-transform-name=* | --program-transform-name=* \
679 | --program-transform-nam=* | --program-transform-na=* \
680 | --program-transform-n=* | --program-transform-=* \
681 | --program-transform=* | --program-transfor=* \
682 | --program-transfo=* | --program-transf=* \
683 | --program-trans=* | --program-tran=* \
684 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 685 program_transform_name=$ac_optarg ;;
861bb6c1
JL
686
687 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
688 | -silent | --silent | --silen | --sile | --sil)
689 silent=yes ;;
690
691 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
692 ac_prev=sbindir ;;
693 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
694 | --sbi=* | --sb=*)
ba479fd2 695 sbindir=$ac_optarg ;;
861bb6c1
JL
696
697 -sharedstatedir | --sharedstatedir | --sharedstatedi \
698 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
699 | --sharedst | --shareds | --shared | --share | --shar \
700 | --sha | --sh)
701 ac_prev=sharedstatedir ;;
702 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
703 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
704 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
705 | --sha=* | --sh=*)
ba479fd2 706 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
707
708 -site | --site | --sit)
709 ac_prev=site ;;
710 -site=* | --site=* | --sit=*)
ba479fd2 711 site=$ac_optarg ;;
861bb6c1
JL
712
713 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
714 ac_prev=srcdir ;;
715 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 716 srcdir=$ac_optarg ;;
861bb6c1
JL
717
718 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
719 | --syscon | --sysco | --sysc | --sys | --sy)
720 ac_prev=sysconfdir ;;
721 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
722 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 723 sysconfdir=$ac_optarg ;;
861bb6c1
JL
724
725 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 726 ac_prev=target_alias ;;
861bb6c1 727 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 728 target_alias=$ac_optarg ;;
861bb6c1
JL
729
730 -v | -verbose | --verbose | --verbos | --verbo | --verb)
731 verbose=yes ;;
732
ba479fd2
NN
733 -version | --version | --versio | --versi | --vers | -V)
734 ac_init_version=: ;;
861bb6c1
JL
735
736 -with-* | --with-*)
ba479fd2 737 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 738 # Reject names that are not valid shell variable names.
b61ff9c8 739 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
740 { echo "$as_me: error: invalid package name: $ac_package" >&2
741 { (exit 1); exit 1; }; }
b61ff9c8
BS
742 ac_package=`echo $ac_package| sed 's/-/_/g'`
743 case $ac_option in
744 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
745 *) ac_optarg=yes ;;
746 esac
747 eval "with_$ac_package='$ac_optarg'" ;;
861bb6c1
JL
748
749 -without-* | --without-*)
ba479fd2 750 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 751 # Reject names that are not valid shell variable names.
b61ff9c8 752 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
753 { echo "$as_me: error: invalid package name: $ac_package" >&2
754 { (exit 1); exit 1; }; }
b61ff9c8
BS
755 ac_package=`echo $ac_package | sed 's/-/_/g'`
756 eval "with_$ac_package=no" ;;
861bb6c1
JL
757
758 --x)
759 # Obsolete; use --with-x.
760 with_x=yes ;;
761
762 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
763 | --x-incl | --x-inc | --x-in | --x-i)
764 ac_prev=x_includes ;;
765 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
766 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 767 x_includes=$ac_optarg ;;
861bb6c1
JL
768
769 -x-libraries | --x-libraries | --x-librarie | --x-librari \
770 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
771 ac_prev=x_libraries ;;
772 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
773 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 774 x_libraries=$ac_optarg ;;
861bb6c1 775
ba479fd2
NN
776 -*) { echo "$as_me: error: unrecognized option: $ac_option
777Try \`$0 --help' for more information." >&2
778 { (exit 1); exit 1; }; }
861bb6c1
JL
779 ;;
780
ba479fd2
NN
781 *=*)
782 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
783 # Reject names that are not valid shell variable names.
784 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
785 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
786 { (exit 1); exit 1; }; }
b61ff9c8
BS
787 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
788 eval "$ac_envvar='$ac_optarg'"
ba479fd2
NN
789 export $ac_envvar ;;
790
861bb6c1 791 *)
ba479fd2
NN
792 # FIXME: should be removed in autoconf 3.0.
793 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
794 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
795 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
796 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
797 ;;
798
799 esac
800done
801
802if test -n "$ac_prev"; then
ba479fd2
NN
803 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
804 { echo "$as_me: error: missing argument to $ac_option" >&2
805 { (exit 1); exit 1; }; }
63cf211a 806fi
63cf211a 807
b61ff9c8
BS
808# Be sure to have absolute paths.
809for ac_var in exec_prefix prefix
861bb6c1 810do
b61ff9c8 811 eval ac_val=$`echo $ac_var`
ba479fd2 812 case $ac_val in
b61ff9c8
BS
813 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
814 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
815 { (exit 1); exit 1; }; };;
2f41c1d6
PB
816 esac
817done
818
b61ff9c8
BS
819# Be sure to have absolute paths.
820for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
821 localstatedir libdir includedir oldincludedir infodir mandir
822do
823 eval ac_val=$`echo $ac_var`
824 case $ac_val in
825 [\\/$]* | ?:[\\/]* ) ;;
826 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
827 { (exit 1); exit 1; }; };;
828 esac
829done
830
831# There might be people who depend on the old broken behavior: `$host'
832# used to hold the argument of --host etc.
833# FIXME: To remove some day.
834build=$build_alias
835host=$host_alias
ba479fd2
NN
836target=$target_alias
837
838# FIXME: To remove some day.
839if test "x$host_alias" != x; then
840 if test "x$build_alias" = x; then
841 cross_compiling=maybe
842 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
843 If a cross compiler is detected then cross compile mode will be used." >&2
844 elif test "x$build_alias" != "x$host_alias"; then
845 cross_compiling=yes
846 fi
847fi
6e3f3080 848
ba479fd2
NN
849ac_tool_prefix=
850test -n "$host_alias" && ac_tool_prefix=$host_alias-
851
852test "$silent" = yes && exec 6>/dev/null
861bb6c1 853
861bb6c1
JL
854
855# Find the source files, if location was not specified.
856if test -z "$srcdir"; then
857 ac_srcdir_defaulted=yes
b61ff9c8
BS
858 # Try the directory containing this script, then its parent.
859 ac_confdir=`(dirname "$0") 2>/dev/null ||
ba479fd2 860$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
861 X"$0" : 'X\(//\)[^/]' \| \
862 X"$0" : 'X\(//\)$' \| \
b61ff9c8
BS
863 X"$0" : 'X\(/\)' \| \
864 . : '\(.\)' 2>/dev/null ||
ba479fd2 865echo X"$0" |
b61ff9c8
BS
866 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
867 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
868 /^X\(\/\/\)$/{ s//\1/; q; }
869 /^X\(\/\).*/{ s//\1/; q; }
870 s/.*/./; q'`
861bb6c1 871 srcdir=$ac_confdir
f8c33439 872 if test ! -r $srcdir/$ac_unique_file; then
861bb6c1
JL
873 srcdir=..
874 fi
875else
876 ac_srcdir_defaulted=no
877fi
f8c33439 878if test ! -r $srcdir/$ac_unique_file; then
b61ff9c8
BS
879 if test "$ac_srcdir_defaulted" = yes; then
880 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
881 { (exit 1); exit 1; }; }
882 else
883 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
ba479fd2 884 { (exit 1); exit 1; }; }
b61ff9c8 885 fi
dd7f7a6e 886fi
f8c33439 887(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
b61ff9c8 888 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
dd7f7a6e 889 { (exit 1); exit 1; }; }
b61ff9c8
BS
890srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
891ac_env_build_alias_set=${build_alias+set}
892ac_env_build_alias_value=$build_alias
893ac_cv_env_build_alias_set=${build_alias+set}
894ac_cv_env_build_alias_value=$build_alias
895ac_env_host_alias_set=${host_alias+set}
896ac_env_host_alias_value=$host_alias
897ac_cv_env_host_alias_set=${host_alias+set}
898ac_cv_env_host_alias_value=$host_alias
899ac_env_target_alias_set=${target_alias+set}
900ac_env_target_alias_value=$target_alias
901ac_cv_env_target_alias_set=${target_alias+set}
902ac_cv_env_target_alias_value=$target_alias
903ac_env_CC_set=${CC+set}
904ac_env_CC_value=$CC
905ac_cv_env_CC_set=${CC+set}
906ac_cv_env_CC_value=$CC
907ac_env_CFLAGS_set=${CFLAGS+set}
908ac_env_CFLAGS_value=$CFLAGS
909ac_cv_env_CFLAGS_set=${CFLAGS+set}
910ac_cv_env_CFLAGS_value=$CFLAGS
911ac_env_LDFLAGS_set=${LDFLAGS+set}
912ac_env_LDFLAGS_value=$LDFLAGS
913ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
914ac_cv_env_LDFLAGS_value=$LDFLAGS
915ac_env_CPPFLAGS_set=${CPPFLAGS+set}
916ac_env_CPPFLAGS_value=$CPPFLAGS
917ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
918ac_cv_env_CPPFLAGS_value=$CPPFLAGS
919ac_env_CPP_set=${CPP+set}
920ac_env_CPP_value=$CPP
921ac_cv_env_CPP_set=${CPP+set}
922ac_cv_env_CPP_value=$CPP
923ac_env_GMPLIBS_set=${GMPLIBS+set}
924ac_env_GMPLIBS_value=$GMPLIBS
925ac_cv_env_GMPLIBS_set=${GMPLIBS+set}
926ac_cv_env_GMPLIBS_value=$GMPLIBS
927ac_env_GMPINC_set=${GMPINC+set}
928ac_env_GMPINC_value=$GMPINC
929ac_cv_env_GMPINC_set=${GMPINC+set}
930ac_cv_env_GMPINC_value=$GMPINC
f8bf9252
SP
931ac_env_PPLLIBS_set=${PPLLIBS+set}
932ac_env_PPLLIBS_value=$PPLLIBS
933ac_cv_env_PPLLIBS_set=${PPLLIBS+set}
934ac_cv_env_PPLLIBS_value=$PPLLIBS
935ac_env_PPLINC_set=${PPLINC+set}
936ac_env_PPLINC_value=$PPLINC
937ac_cv_env_PPLINC_set=${PPLINC+set}
938ac_cv_env_PPLINC_value=$PPLINC
939ac_env_CLOOGLIBS_set=${CLOOGLIBS+set}
940ac_env_CLOOGLIBS_value=$CLOOGLIBS
941ac_cv_env_CLOOGLIBS_set=${CLOOGLIBS+set}
942ac_cv_env_CLOOGLIBS_value=$CLOOGLIBS
943ac_env_CLOOGINC_set=${CLOOGINC+set}
944ac_env_CLOOGINC_value=$CLOOGINC
945ac_cv_env_CLOOGINC_set=${CLOOGINC+set}
946ac_cv_env_CLOOGINC_value=$CLOOGINC
63cf211a 947
ba479fd2
NN
948#
949# Report the --help message.
950#
951if test "$ac_init_help" = "long"; then
952 # Omit some internal or obsolete options to make the list less imposing.
953 # This message is too long to be a string in the A/UX 3.1 sh.
954 cat <<_ACEOF
955\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 956
ba479fd2 957Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 958
ba479fd2
NN
959To assign environment variables (e.g., CC, CFLAGS...), specify them as
960VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 961
ba479fd2 962Defaults for the options are specified in brackets.
861bb6c1 963
ba479fd2
NN
964Configuration:
965 -h, --help display this help and exit
966 --help=short display options specific to this package
967 --help=recursive display the short help of all the included packages
968 -V, --version display version information and exit
969 -q, --quiet, --silent do not print \`checking...' messages
970 --cache-file=FILE cache test results in FILE [disabled]
971 -C, --config-cache alias for \`--cache-file=config.cache'
972 -n, --no-create do not create output files
973 --srcdir=DIR find the sources in DIR [configure dir or \`..']
974
b61ff9c8
BS
975_ACEOF
976
977 cat <<_ACEOF
ba479fd2
NN
978Installation directories:
979 --prefix=PREFIX install architecture-independent files in PREFIX
86da66b5 980 [$ac_default_prefix]
ba479fd2 981 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
86da66b5 982 [PREFIX]
861bb6c1 983
ba479fd2
NN
984By default, \`make install' will install all the files in
985\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
986an installation prefix other than \`$ac_default_prefix' using \`--prefix',
987for instance \`--prefix=\$HOME'.
13c22933 988
ba479fd2 989For better control, use the options below.
13c22933 990
ba479fd2
NN
991Fine tuning of the installation directories:
992 --bindir=DIR user executables [EPREFIX/bin]
993 --sbindir=DIR system admin executables [EPREFIX/sbin]
994 --libexecdir=DIR program executables [EPREFIX/libexec]
b61ff9c8 995 --datadir=DIR read-only architecture-independent data [PREFIX/share]
ba479fd2
NN
996 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
997 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
998 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
999 --libdir=DIR object code libraries [EPREFIX/lib]
1000 --includedir=DIR C header files [PREFIX/include]
1001 --oldincludedir=DIR C header files for non-gcc [/usr/include]
b61ff9c8
BS
1002 --infodir=DIR info documentation [PREFIX/info]
1003 --mandir=DIR man documentation [PREFIX/man]
ba479fd2 1004_ACEOF
13c22933 1005
ba479fd2 1006 cat <<\_ACEOF
13c22933 1007
ba479fd2
NN
1008Program names:
1009 --program-prefix=PREFIX prepend PREFIX to installed program names
1010 --program-suffix=SUFFIX append SUFFIX to installed program names
1011 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 1012
ba479fd2
NN
1013System types:
1014 --build=BUILD configure for building on BUILD [guessed]
1015 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1016 --target=TARGET configure for building compilers for TARGET [HOST]
1017_ACEOF
13c22933
JJ
1018fi
1019
ba479fd2 1020if test -n "$ac_init_help"; then
13c22933 1021
ba479fd2 1022 cat <<\_ACEOF
13c22933 1023
ba479fd2
NN
1024Optional Features:
1025 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1026 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
1027 --enable-generated-files-in-srcdir
1028 put copies of generated files in source dir
1029 intended for creating source tarballs for users
1030 without texinfo bison or flex.
3bbd5a19 1031 --enable-werror-always enable -Werror despite compiler version
ba479fd2
NN
1032 --enable-checking=LIST
1033 enable expensive run-time checks. With LIST,
1034 enable only specific categories of checks.
cdce5c16 1035 Categories are: yes,no,all,none,release.
726a989a 1036 Flags are: assert,df,fold,gc,gcac,gimple,misc,
7e98624c 1037 rtlflag,rtl,runtime,tree,valgrind,types.
ba479fd2 1038 --enable-coverage=LEVEL
fb38008e 1039 enable compiler's code coverage collection.
ba479fd2
NN
1040 Use to measure compiler performance and locate
1041 unused parts of the compiler. With LEVEL, specify
1042 optimization. Values are opt, noopt,
1043 default is noopt
1044 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
1045 --enable-multilib enable library support for multiple ABIs
1046 --enable-__cxa_atexit enable __cxa_atexit for C++
79b87c74
MM
1047 --enable-decimal-float={no,yes,bid,dpd}
1048 enable decimal float extension to C. Selecting 'bid'
1049 or 'dpd' choses which decimal floating point format
1050 to use
ab22c1fa 1051 --enable-fixed-point enable fixed-point arithmetic extension to C
ba479fd2
NN
1052 --enable-threads enable thread usage for target GCC
1053 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
1054 --enable-tls enable or disable generation of tls code
1055 overriding the assembler check for tls support
ba479fd2
NN
1056 --enable-objc-gc enable the use of Boehm's garbage collector with
1057 the GNU Objective-C runtime
1058 --disable-shared don't provide a shared libgcc
1059 --enable-intermodule build the compiler in one step
f3c9f174 1060 --enable-languages=LIST specify which front-ends to build
dfb77e37 1061 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
1062 --enable-initfini-array use .init_array/.fini_array sections
1063 --enable-sjlj-exceptions
1064 arrange to use setjmp/longjmp exception handling
7f970b70 1065 --enable-secureplt enable -msecure-plt by default for PowerPC
922e3e33 1066 --enable-cld enable -mcld by default for 32bit x86
ba479fd2
NN
1067 --disable-win32-registry
1068 disable lookup of installation paths in the
1069 Registry on Windows hosts
1070 --enable-win32-registry enable registry lookup (default)
1071 --enable-win32-registry=KEY
1072 use KEY instead of GCC version as the last portion
1073 of the registry key
da0f6381
PB
1074 --enable-shared[=PKGS]
1075 build shared libraries [default=yes]
1076 --enable-static[=PKGS]
1077 build static libraries [default=yes]
1078 --enable-fast-install[=PKGS]
1079 optimize for fast installation [default=yes]
1080 --disable-libtool-lock avoid locking (might break parallel builds)
ba479fd2
NN
1081 --enable-maintainer-mode
1082 enable make rules and dependencies not useful
1083 (and sometimes confusing) to the casual installer
1084 --enable-version-specific-runtime-libs
1085 specify that runtime libraries should be
1086 installed in a compiler-specific directory
093e61a6 1087
ba479fd2
NN
1088Optional Packages:
1089 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1090 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1546bb64 1091 --with-build-libsubdir=DIR Directory where to find libraries for build system
ba479fd2
NN
1092 --with-local-prefix=DIR specifies directory to put local include
1093 --with-gxx-include-dir=DIR
1094 specifies directory to put g++ header files
1095 --with-cpp-install-dir=DIR
1096 install the user visible C preprocessor in DIR
1097 (relative to PREFIX) as well as PREFIX/bin
1098 --with-gnu-ld arrange to work with GNU ld.
1099 --with-ld arrange to use the specified ld (full pathname)
d594623a 1100 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
1101 --with-gnu-as arrange to work with GNU as
1102 --with-as arrange to use the specified as (full pathname)
1103 --with-stabs arrange to use stabs instead of host debug format
1104 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
1105 --with-build-sysroot=sysroot
1106 use sysroot as the system root during the build
ba479fd2 1107 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
2f41c1d6
PB
1108 --with-pkgversion=PKG Use PKG in the version string in place of "GCC"
1109 --with-bugurl=URL Direct users to URL to report a bug
dfb77e37
KC
1110 --with-gnu-ld assume the C compiler uses GNU ld default=no
1111 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1112 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 1113 --with-system-libunwind use installed libunwind
da0f6381
PB
1114 --with-pic try to use only PIC/non-PIC objects [default=use
1115 both]
1116 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
ed965309 1117 --with-long-double-128 Use 128-bit long double by default.
59415997 1118 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
1119 with the compiler
1120 --with-system-zlib use installed libz
22482f74
MS
1121 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
1122 --with-datarootdir=DIR Use DIR as the data root [PREFIX/share]
1123 --with-docdir=DIR Install documentation in DIR [DATAROOTDIR]
1124 --with-htmldir=DIR html documentation in in DIR [DOCDIR]
13c22933 1125
ba479fd2
NN
1126Some influential environment variables:
1127 CC C compiler command
1128 CFLAGS C compiler flags
1129 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1130 nonstandard directory <lib dir>
b61ff9c8
BS
1131 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
1132 headers in a nonstandard directory <include dir>
ba479fd2 1133 CPP C preprocessor
6de9cd9a
DN
1134 GMPLIBS How to link GMP
1135 GMPINC How to find GMP include files
f8bf9252
SP
1136 PPLLIBS How to link PPL
1137 PPLINC How to find PPL include files
1138 CLOOGLIBS How to link CLOOG
1139 CLOOGINC How to find CLOOG include files
13c22933 1140
ba479fd2
NN
1141Use these variables to override the choices made by `configure' or to help
1142it to find libraries and programs with nonstandard names/locations.
73458fb7 1143
ba479fd2
NN
1144_ACEOF
1145fi
6e3f3080 1146
ba479fd2
NN
1147if test "$ac_init_help" = "recursive"; then
1148 # If there are subdirs, report their specific --help.
b61ff9c8 1149 ac_popdir=`pwd`
ba479fd2 1150 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
b61ff9c8 1151 test -d $ac_dir || continue
ba479fd2
NN
1152 ac_builddir=.
1153
b61ff9c8 1154if test "$ac_dir" != .; then
ba479fd2 1155 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b61ff9c8
BS
1156 # A "../" for each directory in $ac_dir_suffix.
1157 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1158else
1159 ac_dir_suffix= ac_top_builddir=
1160fi
ba479fd2
NN
1161
1162case $srcdir in
b61ff9c8 1163 .) # No --srcdir option. We are building in place.
ba479fd2 1164 ac_srcdir=.
b61ff9c8
BS
1165 if test -z "$ac_top_builddir"; then
1166 ac_top_srcdir=.
1167 else
1168 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1169 fi ;;
1170 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 1171 ac_srcdir=$srcdir$ac_dir_suffix;
b61ff9c8
BS
1172 ac_top_srcdir=$srcdir ;;
1173 *) # Relative path.
1174 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1175 ac_top_srcdir=$ac_top_builddir$srcdir ;;
1176esac
1177
1178# Do not use `cd foo && pwd` to compute absolute paths, because
1179# the directories may not exist.
1180case `pwd` in
1181.) ac_abs_builddir="$ac_dir";;
1182*)
1183 case "$ac_dir" in
1184 .) ac_abs_builddir=`pwd`;;
1185 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1186 *) ac_abs_builddir=`pwd`/"$ac_dir";;
1187 esac;;
1188esac
1189case $ac_abs_builddir in
1190.) ac_abs_top_builddir=${ac_top_builddir}.;;
1191*)
1192 case ${ac_top_builddir}. in
1193 .) ac_abs_top_builddir=$ac_abs_builddir;;
1194 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1195 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1196 esac;;
1197esac
1198case $ac_abs_builddir in
1199.) ac_abs_srcdir=$ac_srcdir;;
1200*)
1201 case $ac_srcdir in
1202 .) ac_abs_srcdir=$ac_abs_builddir;;
1203 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1204 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1205 esac;;
1206esac
1207case $ac_abs_builddir in
1208.) ac_abs_top_srcdir=$ac_top_srcdir;;
1209*)
1210 case $ac_top_srcdir in
1211 .) ac_abs_top_srcdir=$ac_abs_builddir;;
1212 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1213 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1214 esac;;
86da66b5 1215esac
b61ff9c8
BS
1216
1217 cd $ac_dir
1218 # Check for guested configure; otherwise get Cygnus style configure.
1219 if test -f $ac_srcdir/configure.gnu; then
1220 echo
1221 $SHELL $ac_srcdir/configure.gnu --help=recursive
1222 elif test -f $ac_srcdir/configure; then
1223 echo
1224 $SHELL $ac_srcdir/configure --help=recursive
1225 elif test -f $ac_srcdir/configure.ac ||
1226 test -f $ac_srcdir/configure.in; then
1227 echo
1228 $ac_configure --help
ba479fd2
NN
1229 else
1230 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
b61ff9c8
BS
1231 fi
1232 cd $ac_popdir
ba479fd2
NN
1233 done
1234fi
1235
b61ff9c8 1236test -n "$ac_init_help" && exit 0
ba479fd2
NN
1237if $ac_init_version; then
1238 cat <<\_ACEOF
1239
b61ff9c8 1240Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1241This configure script is free software; the Free Software Foundation
1242gives unlimited permission to copy, distribute and modify it.
1243_ACEOF
b61ff9c8 1244 exit 0
ba479fd2 1245fi
b61ff9c8
BS
1246exec 5>config.log
1247cat >&5 <<_ACEOF
ba479fd2
NN
1248This file contains any messages produced by compilers while
1249running configure, to aid debugging if configure makes a mistake.
1250
1251It was created by $as_me, which was
b61ff9c8 1252generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1253
1254 $ $0 $@
1255
1256_ACEOF
1257{
1258cat <<_ASUNAME
1259## --------- ##
1260## Platform. ##
1261## --------- ##
1262
1263hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1264uname -m = `(uname -m) 2>/dev/null || echo unknown`
1265uname -r = `(uname -r) 2>/dev/null || echo unknown`
1266uname -s = `(uname -s) 2>/dev/null || echo unknown`
1267uname -v = `(uname -v) 2>/dev/null || echo unknown`
1268
1269/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1270/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1271
1272/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1273/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1274/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
b61ff9c8 1275hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
ba479fd2
NN
1276/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1277/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1278/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1279
1280_ASUNAME
1281
1282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1283for as_dir in $PATH
1284do
1285 IFS=$as_save_IFS
1286 test -z "$as_dir" && as_dir=.
1287 echo "PATH: $as_dir"
1288done
1289
1290} >&5
1291
1292cat >&5 <<_ACEOF
1293
1294
1295## ----------- ##
1296## Core tests. ##
1297## ----------- ##
1298
1299_ACEOF
1300
1301
1302# Keep a trace of the command line.
1303# Strip out --no-create and --no-recursion so they do not pile up.
1304# Strip out --silent because we don't want to record it for future runs.
1305# Also quote any args containing shell meta-characters.
1306# Make two passes to allow for proper duplicate-argument suppression.
1307ac_configure_args=
1308ac_configure_args0=
1309ac_configure_args1=
b61ff9c8 1310ac_sep=
ba479fd2
NN
1311ac_must_keep_next=false
1312for ac_pass in 1 2
1313do
1314 for ac_arg
1315 do
1316 case $ac_arg in
1317 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1318 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1319 | -silent | --silent | --silen | --sile | --sil)
1320 continue ;;
b61ff9c8 1321 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ba479fd2
NN
1322 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1323 esac
1324 case $ac_pass in
1325 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1326 2)
1327 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1328 if test $ac_must_keep_next = true; then
86da66b5 1329 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1330 else
86da66b5
HPN
1331 case $ac_arg in
1332 *=* | --config-cache | -C | -disable-* | --disable-* \
1333 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1334 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1335 | -with-* | --with-* | -without-* | --without-* | --x)
1336 case "$ac_configure_args0 " in
1337 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1338 esac
1339 ;;
1340 -* ) ac_must_keep_next=true ;;
1341 esac
ba479fd2 1342 fi
b61ff9c8
BS
1343 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1344 # Get rid of the leading space.
1345 ac_sep=" "
ba479fd2
NN
1346 ;;
1347 esac
1348 done
1349done
1350$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1351$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1352
1353# When interrupted or exit'd, cleanup temporary files, and complete
1354# config.log. We remove comments because anyway the quotes in there
1355# would cause problems or look ugly.
b61ff9c8
BS
1356# WARNING: Be sure not to use single quotes in there, as some shells,
1357# such as our DU 5.0 friend, will then `close' the trap.
ba479fd2
NN
1358trap 'exit_status=$?
1359 # Save into config.log some information that might help in debugging.
1360 {
1361 echo
1362
1363 cat <<\_ASBOX
1364## ---------------- ##
1365## Cache variables. ##
1366## ---------------- ##
1367_ASBOX
1368 echo
1369 # The following way of writing the cache mishandles newlines in values,
b61ff9c8 1370{
ba479fd2 1371 (set) 2>&1 |
b61ff9c8
BS
1372 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1373 *ac_space=\ *)
ba479fd2 1374 sed -n \
b61ff9c8
BS
1375 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1376 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1377 ;;
ba479fd2 1378 *)
b61ff9c8
BS
1379 sed -n \
1380 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 1381 ;;
b61ff9c8
BS
1382 esac;
1383}
ba479fd2
NN
1384 echo
1385
1386 cat <<\_ASBOX
1387## ----------------- ##
1388## Output variables. ##
1389## ----------------- ##
1390_ASBOX
1391 echo
1392 for ac_var in $ac_subst_vars
1393 do
b61ff9c8
BS
1394 eval ac_val=$`echo $ac_var`
1395 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1396 done | sort
1397 echo
1398
1399 if test -n "$ac_subst_files"; then
1400 cat <<\_ASBOX
b61ff9c8
BS
1401## ------------- ##
1402## Output files. ##
1403## ------------- ##
ba479fd2
NN
1404_ASBOX
1405 echo
1406 for ac_var in $ac_subst_files
1407 do
b61ff9c8
BS
1408 eval ac_val=$`echo $ac_var`
1409 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1410 done | sort
1411 echo
1412 fi
1413
1414 if test -s confdefs.h; then
1415 cat <<\_ASBOX
1416## ----------- ##
1417## confdefs.h. ##
1418## ----------- ##
1419_ASBOX
1420 echo
b61ff9c8 1421 sed "/^$/d" confdefs.h | sort
ba479fd2
NN
1422 echo
1423 fi
1424 test "$ac_signal" != 0 &&
1425 echo "$as_me: caught signal $ac_signal"
1426 echo "$as_me: exit $exit_status"
1427 } >&5
b61ff9c8
BS
1428 rm -f core *.core &&
1429 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
ba479fd2 1430 exit $exit_status
b61ff9c8 1431 ' 0
ba479fd2
NN
1432for ac_signal in 1 2 13 15; do
1433 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1434done
1435ac_signal=0
1436
1437# confdefs.h avoids OS command line length limits that DEFS can exceed.
b61ff9c8
BS
1438rm -rf conftest* confdefs.h
1439# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1440echo >confdefs.h
ba479fd2
NN
1441
1442# Predefined preprocessor variables.
1443
1444cat >>confdefs.h <<_ACEOF
1445#define PACKAGE_NAME "$PACKAGE_NAME"
1446_ACEOF
1447
1448
1449cat >>confdefs.h <<_ACEOF
1450#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1451_ACEOF
1452
1453
1454cat >>confdefs.h <<_ACEOF
1455#define PACKAGE_VERSION "$PACKAGE_VERSION"
1456_ACEOF
1457
1458
1459cat >>confdefs.h <<_ACEOF
1460#define PACKAGE_STRING "$PACKAGE_STRING"
1461_ACEOF
1462
1463
1464cat >>confdefs.h <<_ACEOF
1465#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1466_ACEOF
1467
1468
1469# Let the site file select an alternate cache file if it wants to.
1470# Prefer explicitly selected file to automatically selected ones.
b61ff9c8
BS
1471if test -z "$CONFIG_SITE"; then
1472 if test "x$prefix" != xNONE; then
1473 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1474 else
1475 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1476 fi
ba479fd2 1477fi
b61ff9c8 1478for ac_site_file in $CONFIG_SITE; do
ba479fd2
NN
1479 if test -r "$ac_site_file"; then
1480 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1481echo "$as_me: loading site script $ac_site_file" >&6;}
1482 sed 's/^/| /' "$ac_site_file" >&5
1483 . "$ac_site_file"
1484 fi
1485done
1486
1487if test -r "$cache_file"; then
1488 # Some versions of bash will fail to source /dev/null (special
1489 # files actually), so we avoid doing that.
1490 if test -f "$cache_file"; then
1491 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1492echo "$as_me: loading cache $cache_file" >&6;}
1493 case $cache_file in
b61ff9c8
BS
1494 [\\/]* | ?:[\\/]* ) . $cache_file;;
1495 *) . ./$cache_file;;
ba479fd2
NN
1496 esac
1497 fi
1498else
1499 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1500echo "$as_me: creating cache $cache_file" >&6;}
1501 >$cache_file
1502fi
1503
1504# Check that the precious variables saved in the cache have kept the same
1505# value.
1506ac_cache_corrupted=false
b61ff9c8
BS
1507for ac_var in `(set) 2>&1 |
1508 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1509 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1510 eval ac_new_set=\$ac_env_${ac_var}_set
b61ff9c8
BS
1511 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1512 eval ac_new_val="\$ac_env_${ac_var}_value"
ba479fd2
NN
1513 case $ac_old_set,$ac_new_set in
1514 set,)
1515 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1516echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1517 ac_cache_corrupted=: ;;
1518 ,set)
1519 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1520echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1521 ac_cache_corrupted=: ;;
1522 ,);;
1523 *)
1524 if test "x$ac_old_val" != "x$ac_new_val"; then
deb984e6
PB
1525 # differences in whitespace do not lead to failure.
1526 ac_old_val_w=`echo x $ac_old_val`
1527 ac_new_val_w=`echo x $ac_new_val`
1528 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1529 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1530echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
deb984e6
PB
1531 ac_cache_corrupted=:
1532 else
1533 { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1534echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1535 eval $ac_var=\$ac_old_val
1536 fi
1537 { echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1538echo "$as_me: former value: \`$ac_old_val'" >&2;}
1539 { echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1540echo "$as_me: current value: \`$ac_new_val'" >&2;}
ba479fd2
NN
1541 fi;;
1542 esac
1543 # Pass precious variables to config.status.
1544 if test "$ac_new_set" = set; then
1545 case $ac_new_val in
b61ff9c8
BS
1546 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1547 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
ba479fd2
NN
1548 *) ac_arg=$ac_var=$ac_new_val ;;
1549 esac
1550 case " $ac_configure_args " in
1551 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1552 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1553 esac
1554 fi
1555done
1556if $ac_cache_corrupted; then
18c04407
RW
1557 { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1558echo "$as_me: error: in \`$ac_pwd':" >&2;}
ba479fd2
NN
1559 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1560echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1561 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1562echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1563 { (exit 1); exit 1; }; }
1564fi
1565
b61ff9c8
BS
1566ac_ext=c
1567ac_cpp='$CPP $CPPFLAGS'
1568ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1569ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1570ac_compiler_gnu=$ac_cv_c_compiler_gnu
1571
ba479fd2
NN
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
18c04407
RW
1588
1589
1590
ba479fd2
NN
1591
1592
914c5af7 1593
b61ff9c8 1594 ac_config_headers="$ac_config_headers auto-host.h:config.in"
ba479fd2
NN
1595
1596
9f18db39
PB
1597gcc_version=`cat $srcdir/BASE-VER`
1598
ba479fd2
NN
1599# Determine the host, build, and target systems
1600ac_aux_dir=
b61ff9c8
BS
1601for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1602 if test -f $ac_dir/install-sh; then
ba479fd2
NN
1603 ac_aux_dir=$ac_dir
1604 ac_install_sh="$ac_aux_dir/install-sh -c"
1605 break
b61ff9c8 1606 elif test -f $ac_dir/install.sh; then
ba479fd2
NN
1607 ac_aux_dir=$ac_dir
1608 ac_install_sh="$ac_aux_dir/install.sh -c"
1609 break
b61ff9c8 1610 elif test -f $ac_dir/shtool; then
ba479fd2
NN
1611 ac_aux_dir=$ac_dir
1612 ac_install_sh="$ac_aux_dir/shtool install -c"
1613 break
1614 fi
1615done
1616if test -z "$ac_aux_dir"; then
b61ff9c8
BS
1617 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1618echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
ba479fd2
NN
1619 { (exit 1); exit 1; }; }
1620fi
b61ff9c8
BS
1621ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1622ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1623ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba479fd2
NN
1624
1625# Make sure we can run config.sub.
b61ff9c8
BS
1626$ac_config_sub sun4 >/dev/null 2>&1 ||
1627 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1628echo "$as_me: error: cannot run $ac_config_sub" >&2;}
ba479fd2
NN
1629 { (exit 1); exit 1; }; }
1630
b61ff9c8
BS
1631echo "$as_me:$LINENO: checking build system type" >&5
1632echo $ECHO_N "checking build system type... $ECHO_C" >&6
ba479fd2
NN
1633if test "${ac_cv_build+set}" = set; then
1634 echo $ECHO_N "(cached) $ECHO_C" >&6
1635else
b61ff9c8
BS
1636 ac_cv_build_alias=$build_alias
1637test -z "$ac_cv_build_alias" &&
1638 ac_cv_build_alias=`$ac_config_guess`
1639test -z "$ac_cv_build_alias" &&
ba479fd2
NN
1640 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1641echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1642 { (exit 1); exit 1; }; }
b61ff9c8
BS
1643ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1644 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1645echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
ba479fd2
NN
1646 { (exit 1); exit 1; }; }
1647
1648fi
b61ff9c8
BS
1649echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1650echo "${ECHO_T}$ac_cv_build" >&6
ba479fd2 1651build=$ac_cv_build
b61ff9c8
BS
1652build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1653build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1654build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1655
1656
1657echo "$as_me:$LINENO: checking host system type" >&5
1658echo $ECHO_N "checking host system type... $ECHO_C" >&6
ba479fd2
NN
1659if test "${ac_cv_host+set}" = set; then
1660 echo $ECHO_N "(cached) $ECHO_C" >&6
1661else
b61ff9c8
BS
1662 ac_cv_host_alias=$host_alias
1663test -z "$ac_cv_host_alias" &&
1664 ac_cv_host_alias=$ac_cv_build_alias
1665ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1666 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1667echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
ba479fd2
NN
1668 { (exit 1); exit 1; }; }
1669
1670fi
b61ff9c8
BS
1671echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1672echo "${ECHO_T}$ac_cv_host" >&6
ba479fd2 1673host=$ac_cv_host
b61ff9c8
BS
1674host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1675host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1676host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1677
1678
1679echo "$as_me:$LINENO: checking target system type" >&5
1680echo $ECHO_N "checking target system type... $ECHO_C" >&6
ba479fd2
NN
1681if test "${ac_cv_target+set}" = set; then
1682 echo $ECHO_N "(cached) $ECHO_C" >&6
1683else
b61ff9c8
BS
1684 ac_cv_target_alias=$target_alias
1685test "x$ac_cv_target_alias" = "x" &&
1686 ac_cv_target_alias=$ac_cv_host_alias
1687ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1688 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1689echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
ba479fd2
NN
1690 { (exit 1); exit 1; }; }
1691
1692fi
b61ff9c8
BS
1693echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1694echo "${ECHO_T}$ac_cv_target" >&6
ba479fd2 1695target=$ac_cv_target
b61ff9c8
BS
1696target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1697target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1698target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba479fd2
NN
1699
1700
1701# The aliases save the names the user supplied, while $host etc.
1702# will get canonicalized.
1703test -n "$target_alias" &&
1704 test "$program_prefix$program_suffix$program_transform_name" = \
1705 NONENONEs,x,x, &&
1706 program_prefix=${target_alias}-
1707
1708# Determine the noncanonical target name, for directory use.
18fc9bd4
RG
1709 case ${build_alias} in
1710 "") build_noncanonical=${build} ;;
1711 *) build_noncanonical=${build_alias} ;;
1712esac
1713
1714 case ${host_alias} in
1715 "") host_noncanonical=${build_noncanonical} ;;
1716 *) host_noncanonical=${host_alias} ;;
1717esac
1718
1719 case ${target_alias} in
1720 "") target_noncanonical=${host_noncanonical} ;;
1721 *) target_noncanonical=${target_alias} ;;
1722esac
1723
1724
1725
8f1529e6
L
1726
1727# Determine the target- and build-specific subdirectories
57255173
PB
1728
1729# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
1730# have matching libraries, they should use host libraries: Makefile.tpl
1731# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
1732# However, they still use the build modules, because the corresponding
1733# host modules (e.g. bison) are only built for the host when bootstrap
1734# finishes. So:
1735# - build_subdir is where we find build modules, and never changes.
1736# - build_libsubdir is where we find build libraries, and can be overridden.
1737
1738# Prefix 'build-' so this never conflicts with target_subdir.
18fc9bd4 1739build_subdir="build-${build_noncanonical}"
1546bb64 1740
b61ff9c8 1741# Check whether --with-build-libsubdir or --without-build-libsubdir was given.
1546bb64 1742if test "${with_build_libsubdir+set}" = set; then
b61ff9c8
BS
1743 withval="$with_build_libsubdir"
1744 build_libsubdir="$withval"
1546bb64
PB
1745else
1746 build_libsubdir="$build_subdir"
b61ff9c8 1747fi;
18fc9bd4
RG
1748# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1749if ( test $srcdir = . && test -d gcc ) \
1750 || test -d $srcdir/../host-${host_noncanonical}; then
1751 host_subdir="host-${host_noncanonical}"
1752else
1753 host_subdir=.
1754fi
1755# No prefix.
1756target_subdir=${target_noncanonical}
1757
73458fb7 1758
093e61a6 1759# Set program_transform_name
13c22933 1760test "$program_prefix" != NONE &&
b61ff9c8 1761 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1762# Use a double $ so make ignores it.
1763test "$program_suffix" != NONE &&
b61ff9c8 1764 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
ba479fd2
NN
1765# Double any \ or $. echo might interpret backslashes.
1766# By default was `s,x,x', remove it if useless.
1767cat <<\_ACEOF >conftest.sed
1768s/[\\$]/&&/g;s/;s,x,x,$//
1769_ACEOF
1770program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
b61ff9c8 1771rm conftest.sed
13c22933
JJ
1772
1773
34a86c2b
NN
1774# Check for bogus environment variables.
1775# Test if LIBRARY_PATH contains the notation for the current directory
1776# since this would lead to problems installing/building glibc.
1777# LIBRARY_PATH contains the current directory if one of the following
1778# is true:
1779# - one of the terminals (":" and ";") is the first or last sign
1780# - two terminals occur directly after each other
1781# - the path contains an element with a dot in it
b61ff9c8
BS
1782echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1783echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1784case ${LIBRARY_PATH} in
1785 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1786 library_path_setting="contains current directory"
1787 ;;
1788 *)
1789 library_path_setting="ok"
1790 ;;
1791esac
b61ff9c8
BS
1792echo "$as_me:$LINENO: result: $library_path_setting" >&5
1793echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1794if test "$library_path_setting" != "ok"; then
ba479fd2 1795{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1796*** LIBRARY_PATH shouldn't contain the current directory when
1797*** building gcc. Please change the environment variable
ba479fd2
NN
1798*** and run configure again." >&5
1799echo "$as_me: error:
1800*** LIBRARY_PATH shouldn't contain the current directory when
1801*** building gcc. Please change the environment variable
1802*** and run configure again." >&2;}
1803 { (exit 1); exit 1; }; }
e9a25f70
JL
1804fi
1805
34a86c2b
NN
1806# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1807# since this would lead to problems installing/building glibc.
1808# GCC_EXEC_PREFIX contains the current directory if one of the following
1809# is true:
1810# - one of the terminals (":" and ";") is the first or last sign
1811# - two terminals occur directly after each other
1812# - the path contains an element with a dot in it
b61ff9c8
BS
1813echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1814echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1815case ${GCC_EXEC_PREFIX} in
1816 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1817 gcc_exec_prefix_setting="contains current directory"
1818 ;;
1819 *)
1820 gcc_exec_prefix_setting="ok"
1821 ;;
1822esac
b61ff9c8
BS
1823echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1824echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1825if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1826{ { echo "$as_me:$LINENO: error:
1827*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1828*** building gcc. Please change the environment variable
1829*** and run configure again." >&5
1830echo "$as_me: error:
cafe096b
EC
1831*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1832*** building gcc. Please change the environment variable
ba479fd2
NN
1833*** and run configure again." >&2;}
1834 { (exit 1); exit 1; }; }
34a86c2b
NN
1835fi
1836
1837# -----------
1838# Directories
1839# -----------
1840
1841# Specify the local prefix
1842local_prefix=
ba479fd2 1843
b61ff9c8 1844# Check whether --with-local-prefix or --without-local-prefix was given.
34a86c2b 1845if test "${with_local_prefix+set}" = set; then
b61ff9c8
BS
1846 withval="$with_local_prefix"
1847 case "${withval}" in
ba479fd2
NN
1848yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1849echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1850 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1851no) ;;
1852*) local_prefix=$with_local_prefix ;;
1853esac
b61ff9c8 1854fi;
34a86c2b
NN
1855
1856# Default local prefix if it is empty
1857if test x$local_prefix = x; then
1858 local_prefix=/usr/local
1859fi
1860
1861# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1862# passed in by the toplevel make and thus we'd get different behavior
1863# depending on where we built the sources.
1864gcc_gxx_include_dir=
1865# Specify the g++ header file directory
ba479fd2 1866
b61ff9c8 1867# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
34a86c2b 1868if test "${with_gxx_include_dir+set}" = set; then
b61ff9c8
BS
1869 withval="$with_gxx_include_dir"
1870 case "${withval}" in
ba479fd2
NN
1871yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1872echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1873 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1874no) ;;
1875*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1876esac
b61ff9c8 1877fi;
34a86c2b 1878
0f57bf40 1879# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
34a86c2b
NN
1880if test x${gcc_gxx_include_dir} = x; then
1881 if test x${enable_version_specific_runtime_libs} = xyes; then
1882 gcc_gxx_include_dir='${libsubdir}/include/c++'
1883 else
0f57bf40
MM
1884 libstdcxx_incdir='include/c++/$(version)'
1885 if test x$host != x$target; then
1886 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
1887 fi
15c723f3 1888 gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
34a86c2b
NN
1889 fi
1890fi
1891
ba479fd2 1892
b61ff9c8 1893# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
34a86c2b 1894if test "${with_cpp_install_dir+set}" = set; then
b61ff9c8
BS
1895 withval="$with_cpp_install_dir"
1896 if test x$withval = xyes; then
ba479fd2
NN
1897 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1898echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1899 { (exit 1); exit 1; }; }
34a86c2b
NN
1900elif test x$withval != xno; then
1901 cpp_install_dir=$withval
1902fi
b61ff9c8 1903fi;
34a86c2b 1904
51b9ff45 1905# We would like to our source tree to be readonly. However when releases or
ba479fd2 1906# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1907# various formats of manuals need to be included along with the rest of the
ba479fd2 1908# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1909# just that.
1910
b61ff9c8
BS
1911echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1912echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1913 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45 1914if test "${enable_generated_files_in_srcdir+set}" = set; then
b61ff9c8
BS
1915 enableval="$enable_generated_files_in_srcdir"
1916 generated_files_in_srcdir=$enableval
51b9ff45 1917else
03787dfd 1918 generated_files_in_srcdir=no
b61ff9c8 1919fi;
1a4b763e 1920
b61ff9c8
BS
1921echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1922echo "${ECHO_T}$generated_files_in_srcdir" >&6
03787dfd
KC
1923
1924if test "$generated_files_in_srcdir" = "yes"; then
1925 GENINSRC=''
03787dfd
KC
1926else
1927 GENINSRC='#'
03787dfd
KC
1928fi
1929
1930
34a86c2b
NN
1931# -------------------
1932# Find default linker
1933# -------------------
1934
1935# With GNU ld
ba479fd2 1936
b61ff9c8 1937# Check whether --with-gnu-ld or --without-gnu-ld was given.
34a86c2b 1938if test "${with_gnu_ld+set}" = set; then
b61ff9c8
BS
1939 withval="$with_gnu_ld"
1940 gnu_ld_flag="$with_gnu_ld"
34a86c2b
NN
1941else
1942 gnu_ld_flag=no
b61ff9c8 1943fi;
6e3f3080 1944
63cf211a 1945# With pre-defined ld
ba479fd2 1946
b61ff9c8 1947# Check whether --with-ld or --without-ld was given.
34a86c2b 1948if test "${with_ld+set}" = set; then
b61ff9c8
BS
1949 withval="$with_ld"
1950 DEFAULT_LINKER="$with_ld"
1951fi;
34a86c2b
NN
1952if test x"${DEFAULT_LINKER+set}" = x"set"; then
1953 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1954 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1955echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1956 { (exit 1); exit 1; }; }
34a86c2b
NN
1957 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1958 gnu_ld_flag=yes
1959 fi
ba479fd2
NN
1960
1961cat >>confdefs.h <<_ACEOF
34a86c2b 1962#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1963_ACEOF
34a86c2b
NN
1964
1965fi
1966
2091ff66
NF
1967gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
1968
1969cat >>confdefs.h <<_ACEOF
1970#define HAVE_GNU_LD $gnu_ld
1971_ACEOF
1972
1973
b61ff9c8
BS
1974echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1975echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1976if test x"${DEFAULT_LINKER+set}" = x"set"; then
1977 if test x"$gnu_ld_flag" = x"no"; then
b61ff9c8
BS
1978 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1979echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1980 else
b61ff9c8
BS
1981 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1982echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1983 fi
1984else
b61ff9c8
BS
1985 echo "$as_me:$LINENO: result: no" >&5
1986echo "${ECHO_T}no" >&6
34a86c2b
NN
1987fi
1988
d594623a
L
1989# With demangler in GNU ld
1990
b61ff9c8 1991# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
d594623a 1992if test "${with_demangler_in_ld+set}" = set; then
b61ff9c8
BS
1993 withval="$with_demangler_in_ld"
1994 demangler_in_ld="$with_demangler_in_ld"
d594623a
L
1995else
1996 demangler_in_ld=no
b61ff9c8 1997fi;
d594623a 1998
34a86c2b
NN
1999# ----------------------
2000# Find default assembler
2001# ----------------------
2002
2003# With GNU as
ba479fd2 2004
b61ff9c8 2005# Check whether --with-gnu-as or --without-gnu-as was given.
34a86c2b 2006if test "${with_gnu_as+set}" = set; then
b61ff9c8
BS
2007 withval="$with_gnu_as"
2008 gas_flag="$with_gnu_as"
34a86c2b
NN
2009else
2010 gas_flag=no
b61ff9c8 2011fi;
ab22c1fa 2012
1a4b763e 2013
b61ff9c8 2014# Check whether --with-as or --without-as was given.
34a86c2b 2015if test "${with_as+set}" = set; then
b61ff9c8
BS
2016 withval="$with_as"
2017 DEFAULT_ASSEMBLER="$with_as"
2018fi;
34a86c2b
NN
2019if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2020 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
2021 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
2022echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
2023 { (exit 1); exit 1; }; }
34a86c2b
NN
2024 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
2025 gas_flag=yes
2026 fi
ba479fd2
NN
2027
2028cat >>confdefs.h <<_ACEOF
34a86c2b 2029#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 2030_ACEOF
34a86c2b
NN
2031
2032fi
2033
dc60b775
CD
2034gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
2035
2036cat >>confdefs.h <<_ACEOF
2037#define HAVE_GNU_AS $gnu_as
2038_ACEOF
2039
2040
b61ff9c8
BS
2041echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
2042echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
2043if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2044 if test x"$gas_flag" = x"no"; then
b61ff9c8
BS
2045 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
2046echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 2047 else
b61ff9c8
BS
2048 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
2049echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
2050 fi
2051else
b61ff9c8
BS
2052 echo "$as_me:$LINENO: result: no" >&5
2053echo "${ECHO_T}no" >&6
34a86c2b
NN
2054fi
2055
2056# ---------------
2057# Find C compiler
2058# ---------------
2059
426ca3ca
RO
2060# If a non-executable a.out is present (e.g. created by GNU as above even if
2061# invoked with -v only), the IRIX 6 native ld just overwrites the existing
2062# file, even when creating an executable, so an execution test fails.
2063# Remove possible default executable files to avoid this.
2064#
2065# FIXME: This really belongs into AC_PROG_CC and can be removed once
2066# Autoconf includes it.
2067rm -f a.out a.exe b.out
2068
34a86c2b 2069# Find the native compiler
ba479fd2
NN
2070ac_ext=c
2071ac_cpp='$CPP $CPPFLAGS'
2072ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2073ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2074ac_compiler_gnu=$ac_cv_c_compiler_gnu
2075if test -n "$ac_tool_prefix"; then
2076 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2077set dummy ${ac_tool_prefix}gcc; ac_word=$2
b61ff9c8
BS
2078echo "$as_me:$LINENO: checking for $ac_word" >&5
2079echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2080if test "${ac_cv_prog_CC+set}" = set; then
2081 echo $ECHO_N "(cached) $ECHO_C" >&6
2082else
2083 if test -n "$CC"; then
2084 ac_cv_prog_CC="$CC" # Let the user override the test.
2085else
2086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2087for as_dir in $PATH
2088do
2089 IFS=$as_save_IFS
2090 test -z "$as_dir" && as_dir=.
2091 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2092 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2093 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2094 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2095 break 2
2096 fi
2097done
2098done
2099
2100fi
2101fi
2102CC=$ac_cv_prog_CC
2103if test -n "$CC"; then
b61ff9c8
BS
2104 echo "$as_me:$LINENO: result: $CC" >&5
2105echo "${ECHO_T}$CC" >&6
ba479fd2 2106else
b61ff9c8
BS
2107 echo "$as_me:$LINENO: result: no" >&5
2108echo "${ECHO_T}no" >&6
ba479fd2
NN
2109fi
2110
2111fi
2112if test -z "$ac_cv_prog_CC"; then
2113 ac_ct_CC=$CC
2114 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 2115set dummy gcc; ac_word=$2
b61ff9c8
BS
2116echo "$as_me:$LINENO: checking for $ac_word" >&5
2117echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2118if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2119 echo $ECHO_N "(cached) $ECHO_C" >&6
2120else
2121 if test -n "$ac_ct_CC"; then
2122 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2123else
2124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2125for as_dir in $PATH
2126do
2127 IFS=$as_save_IFS
2128 test -z "$as_dir" && as_dir=.
2129 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2130 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2131 ac_cv_prog_ac_ct_CC="gcc"
2132 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2133 break 2
2134 fi
2135done
2136done
2137
2138fi
2139fi
2140ac_ct_CC=$ac_cv_prog_ac_ct_CC
2141if test -n "$ac_ct_CC"; then
b61ff9c8
BS
2142 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2143echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 2144else
b61ff9c8
BS
2145 echo "$as_me:$LINENO: result: no" >&5
2146echo "${ECHO_T}no" >&6
ba479fd2
NN
2147fi
2148
b61ff9c8 2149 CC=$ac_ct_CC
ba479fd2
NN
2150else
2151 CC="$ac_cv_prog_CC"
2152fi
2153
2154if test -z "$CC"; then
b61ff9c8
BS
2155 if test -n "$ac_tool_prefix"; then
2156 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
ba479fd2 2157set dummy ${ac_tool_prefix}cc; ac_word=$2
b61ff9c8
BS
2158echo "$as_me:$LINENO: checking for $ac_word" >&5
2159echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2160if test "${ac_cv_prog_CC+set}" = set; then
2161 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
2162else
2163 if test -n "$CC"; then
2164 ac_cv_prog_CC="$CC" # Let the user override the test.
2165else
ba479fd2
NN
2166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2167for as_dir in $PATH
2168do
2169 IFS=$as_save_IFS
2170 test -z "$as_dir" && as_dir=.
2171 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2172 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2173 ac_cv_prog_CC="${ac_tool_prefix}cc"
2174 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2175 break 2
2176 fi
2177done
2178done
2179
cd9e5e7c
MK
2180fi
2181fi
ba479fd2 2182CC=$ac_cv_prog_CC
cd9e5e7c 2183if test -n "$CC"; then
b61ff9c8
BS
2184 echo "$as_me:$LINENO: result: $CC" >&5
2185echo "${ECHO_T}$CC" >&6
2f41c1d6 2186else
b61ff9c8
BS
2187 echo "$as_me:$LINENO: result: no" >&5
2188echo "${ECHO_T}no" >&6
2f41c1d6
PB
2189fi
2190
b61ff9c8
BS
2191fi
2192if test -z "$ac_cv_prog_CC"; then
2193 ac_ct_CC=$CC
2194 # Extract the first word of "cc", so it can be a program name with args.
2195set dummy cc; ac_word=$2
2196echo "$as_me:$LINENO: checking for $ac_word" >&5
2197echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2198if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2199 echo $ECHO_N "(cached) $ECHO_C" >&6
2200else
2201 if test -n "$ac_ct_CC"; then
2202 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2203else
2204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2205for as_dir in $PATH
2206do
2207 IFS=$as_save_IFS
2208 test -z "$as_dir" && as_dir=.
2209 for ac_exec_ext in '' $ac_executable_extensions; do
2210 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2211 ac_cv_prog_ac_ct_CC="cc"
2212 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2213 break 2
1a4b763e 2214 fi
b61ff9c8
BS
2215done
2216done
2217
2218fi
2219fi
2220ac_ct_CC=$ac_cv_prog_ac_ct_CC
2221if test -n "$ac_ct_CC"; then
2222 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2223echo "${ECHO_T}$ac_ct_CC" >&6
2224else
2225 echo "$as_me:$LINENO: result: no" >&5
2226echo "${ECHO_T}no" >&6
2227fi
2228
2229 CC=$ac_ct_CC
2230else
2231 CC="$ac_cv_prog_CC"
2232fi
2233
ba479fd2 2234fi
6e3f3080
NN
2235if test -z "$CC"; then
2236 # Extract the first word of "cc", so it can be a program name with args.
2237set dummy cc; ac_word=$2
b61ff9c8
BS
2238echo "$as_me:$LINENO: checking for $ac_word" >&5
2239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2240if test "${ac_cv_prog_CC+set}" = set; then
2241 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2242else
2243 if test -n "$CC"; then
2244 ac_cv_prog_CC="$CC" # Let the user override the test.
2245else
2246 ac_prog_rejected=no
ba479fd2
NN
2247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2248for as_dir in $PATH
2249do
2250 IFS=$as_save_IFS
2251 test -z "$as_dir" && as_dir=.
2252 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2253 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2254 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2255 ac_prog_rejected=yes
2256 continue
2257 fi
2258 ac_cv_prog_CC="cc"
2259 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2260 break 2
2261 fi
2262done
2263done
2264
6e3f3080
NN
2265if test $ac_prog_rejected = yes; then
2266 # We found a bogon in the path, so make sure we never use it.
2267 set dummy $ac_cv_prog_CC
2268 shift
ba479fd2 2269 if test $# != 0; then
6e3f3080
NN
2270 # We chose a different compiler from the bogus one.
2271 # However, it has the same basename, so the bogon will be chosen
2272 # first if we set CC to just the basename; use the full file name.
2273 shift
ba479fd2 2274 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2275 fi
6e3f3080
NN
2276fi
2277fi
2278fi
ba479fd2 2279CC=$ac_cv_prog_CC
6e3f3080 2280if test -n "$CC"; then
b61ff9c8
BS
2281 echo "$as_me:$LINENO: result: $CC" >&5
2282echo "${ECHO_T}$CC" >&6
e9a25f70 2283else
b61ff9c8
BS
2284 echo "$as_me:$LINENO: result: no" >&5
2285echo "${ECHO_T}no" >&6
e9a25f70 2286fi
6e3f3080 2287
ba479fd2
NN
2288fi
2289if test -z "$CC"; then
2290 if test -n "$ac_tool_prefix"; then
b61ff9c8 2291 for ac_prog in cl
ba479fd2
NN
2292 do
2293 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2294set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b61ff9c8
BS
2295echo "$as_me:$LINENO: checking for $ac_word" >&5
2296echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2297if test "${ac_cv_prog_CC+set}" = set; then
2298 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2299else
6e3f3080
NN
2300 if test -n "$CC"; then
2301 ac_cv_prog_CC="$CC" # Let the user override the test.
2302else
ba479fd2
NN
2303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2304for as_dir in $PATH
2305do
2306 IFS=$as_save_IFS
2307 test -z "$as_dir" && as_dir=.
2308 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2309 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2310 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2311 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2312 break 2
2313 fi
2314done
2315done
2316
093e61a6 2317fi
6e3f3080 2318fi
ba479fd2 2319CC=$ac_cv_prog_CC
6e3f3080 2320if test -n "$CC"; then
b61ff9c8
BS
2321 echo "$as_me:$LINENO: result: $CC" >&5
2322echo "${ECHO_T}$CC" >&6
6e3f3080 2323else
b61ff9c8
BS
2324 echo "$as_me:$LINENO: result: no" >&5
2325echo "${ECHO_T}no" >&6
093e61a6 2326fi
cafe096b 2327
ba479fd2
NN
2328 test -n "$CC" && break
2329 done
2330fi
2331if test -z "$CC"; then
2332 ac_ct_CC=$CC
b61ff9c8 2333 for ac_prog in cl
ba479fd2
NN
2334do
2335 # Extract the first word of "$ac_prog", so it can be a program name with args.
2336set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
2337echo "$as_me:$LINENO: checking for $ac_word" >&5
2338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2339if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2340 echo $ECHO_N "(cached) $ECHO_C" >&6
2341else
2342 if test -n "$ac_ct_CC"; then
2343 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2344else
2345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2346for as_dir in $PATH
2347do
2348 IFS=$as_save_IFS
2349 test -z "$as_dir" && as_dir=.
2350 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2351 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2352 ac_cv_prog_ac_ct_CC="$ac_prog"
2353 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2354 break 2
2355 fi
2356done
2357done
6e3f3080 2358
ba479fd2
NN
2359fi
2360fi
2361ac_ct_CC=$ac_cv_prog_ac_ct_CC
2362if test -n "$ac_ct_CC"; then
b61ff9c8
BS
2363 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2364echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 2365else
b61ff9c8
BS
2366 echo "$as_me:$LINENO: result: no" >&5
2367echo "${ECHO_T}no" >&6
ba479fd2 2368fi
6e3f3080 2369
ba479fd2
NN
2370 test -n "$ac_ct_CC" && break
2371done
63cf211a 2372
b61ff9c8 2373 CC=$ac_ct_CC
ba479fd2
NN
2374fi
2375
2376fi
2377
2378
18c04407
RW
2379test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2380echo "$as_me: error: in \`$ac_pwd':" >&2;}
2381{ { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
ba479fd2
NN
2382See \`config.log' for more details." >&5
2383echo "$as_me: error: no acceptable C compiler found in \$PATH
2384See \`config.log' for more details." >&2;}
18c04407 2385 { (exit 1); exit 1; }; }; }
ba479fd2
NN
2386
2387# Provide some information about the compiler.
b61ff9c8
BS
2388echo "$as_me:$LINENO:" \
2389 "checking for C compiler version" >&5
ba479fd2 2390ac_compiler=`set X $ac_compile; echo $2`
b61ff9c8
BS
2391{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2392 (eval $ac_compiler --version </dev/null >&5) 2>&5
ba479fd2
NN
2393 ac_status=$?
2394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2395 (exit $ac_status); }
b61ff9c8
BS
2396{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2397 (eval $ac_compiler -v </dev/null >&5) 2>&5
ba479fd2
NN
2398 ac_status=$?
2399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2400 (exit $ac_status); }
b61ff9c8
BS
2401{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2402 (eval $ac_compiler -V </dev/null >&5) 2>&5
ba479fd2
NN
2403 ac_status=$?
2404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2405 (exit $ac_status); }
2406
2407cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2408/* confdefs.h. */
2409_ACEOF
2410cat confdefs.h >>conftest.$ac_ext
2411cat >>conftest.$ac_ext <<_ACEOF
2412/* end confdefs.h. */
2413
2414int
2415main ()
2416{
63cf211a 2417
ba479fd2
NN
2418 ;
2419 return 0;
2420}
2421_ACEOF
2422ac_clean_files_save=$ac_clean_files
2423ac_clean_files="$ac_clean_files a.out a.exe b.out"
2424# Try to create an executable without -o first, disregard a.out.
2425# It will help us diagnose broken compilers, and finding out an intuition
2426# of exeext.
b61ff9c8
BS
2427echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2428echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2 2429ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
b61ff9c8
BS
2430if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2431 (eval $ac_link_default) 2>&5
ba479fd2
NN
2432 ac_status=$?
2433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2434 (exit $ac_status); }; then
b61ff9c8
BS
2435 # Find the output, starting from the most likely. This scheme is
2436# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2437# resort.
2438
2439# Be careful to initialize this variable, since it used to be cached.
2440# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2441ac_cv_exeext=
2442# b.out is created by i960 compilers.
2443for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
ba479fd2
NN
2444do
2445 test -f "$ac_file" || continue
2446 case $ac_file in
b61ff9c8
BS
2447 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2448 ;;
2449 conftest.$ac_ext )
2450 # This is the source file.
86da66b5 2451 ;;
ba479fd2 2452 [ab].out )
86da66b5
HPN
2453 # We found the default executable, but exeext='' is most
2454 # certainly right.
2455 break;;
ba479fd2 2456 *.* )
b61ff9c8
BS
2457 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2458 # FIXME: I believe we export ac_cv_exeext for Libtool,
2459 # but it would be cool to find out if it's true. Does anybody
2460 # maintain Libtool? --akim.
2461 export ac_cv_exeext
86da66b5 2462 break;;
ba479fd2 2463 * )
86da66b5 2464 break;;
ba479fd2
NN
2465 esac
2466done
2467else
2468 echo "$as_me: failed program was:" >&5
2469sed 's/^/| /' conftest.$ac_ext >&5
2470
18c04407
RW
2471{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2472echo "$as_me: error: in \`$ac_pwd':" >&2;}
ba479fd2
NN
2473{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2474See \`config.log' for more details." >&5
2475echo "$as_me: error: C compiler cannot create executables
2476See \`config.log' for more details." >&2;}
18c04407 2477 { (exit 77); exit 77; }; }; }
ba479fd2
NN
2478fi
2479
2480ac_exeext=$ac_cv_exeext
b61ff9c8
BS
2481echo "$as_me:$LINENO: result: $ac_file" >&5
2482echo "${ECHO_T}$ac_file" >&6
ba479fd2 2483
b61ff9c8 2484# Check the compiler produces executables we can run. If not, either
ba479fd2 2485# the compiler is broken, or we cross compile.
b61ff9c8
BS
2486echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2487echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
ba479fd2
NN
2488# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2489# If not cross compiling, check that we can run a simple program.
2490if test "$cross_compiling" != yes; then
2491 if { ac_try='./$ac_file'
b61ff9c8
BS
2492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2493 (eval $ac_try) 2>&5
ba479fd2
NN
2494 ac_status=$?
2495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2496 (exit $ac_status); }; }; then
2497 cross_compiling=no
6e3f3080 2498 else
ba479fd2
NN
2499 if test "$cross_compiling" = maybe; then
2500 cross_compiling=yes
2501 else
18c04407
RW
2502 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2503echo "$as_me: error: in \`$ac_pwd':" >&2;}
2504{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
ba479fd2
NN
2505If you meant to cross compile, use \`--host'.
2506See \`config.log' for more details." >&5
2507echo "$as_me: error: cannot run C compiled programs.
2508If you meant to cross compile, use \`--host'.
2509See \`config.log' for more details." >&2;}
18c04407 2510 { (exit 1); exit 1; }; }; }
ba479fd2 2511 fi
6e3f3080
NN
2512 fi
2513fi
b61ff9c8
BS
2514echo "$as_me:$LINENO: result: yes" >&5
2515echo "${ECHO_T}yes" >&6
ba479fd2
NN
2516
2517rm -f a.out a.exe conftest$ac_cv_exeext b.out
2518ac_clean_files=$ac_clean_files_save
b61ff9c8 2519# Check the compiler produces executables we can run. If not, either
ba479fd2 2520# the compiler is broken, or we cross compile.
b61ff9c8
BS
2521echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2522echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2523echo "$as_me:$LINENO: result: $cross_compiling" >&5
2524echo "${ECHO_T}$cross_compiling" >&6
2525
2526echo "$as_me:$LINENO: checking for suffix of executables" >&5
2527echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2528if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2529 (eval $ac_link) 2>&5
ba479fd2
NN
2530 ac_status=$?
2531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2532 (exit $ac_status); }; then
2533 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2534# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2535# work properly (i.e., refer to `conftest.exe'), while it won't with
2536# `rm'.
2537for ac_file in conftest.exe conftest conftest.*; do
2538 test -f "$ac_file" || continue
2539 case $ac_file in
b61ff9c8 2540 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
ba479fd2 2541 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b61ff9c8 2542 export ac_cv_exeext
86da66b5 2543 break;;
ba479fd2
NN
2544 * ) break;;
2545 esac
2546done
e9a25f70 2547else
18c04407
RW
2548 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2549echo "$as_me: error: in \`$ac_pwd':" >&2;}
2550{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
ba479fd2
NN
2551See \`config.log' for more details." >&5
2552echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2553See \`config.log' for more details." >&2;}
18c04407 2554 { (exit 1); exit 1; }; }; }
ba479fd2
NN
2555fi
2556
2557rm -f conftest$ac_cv_exeext
b61ff9c8
BS
2558echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2559echo "${ECHO_T}$ac_cv_exeext" >&6
ba479fd2
NN
2560
2561rm -f conftest.$ac_ext
2562EXEEXT=$ac_cv_exeext
2563ac_exeext=$EXEEXT
b61ff9c8
BS
2564echo "$as_me:$LINENO: checking for suffix of object files" >&5
2565echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
ba479fd2
NN
2566if test "${ac_cv_objext+set}" = set; then
2567 echo $ECHO_N "(cached) $ECHO_C" >&6
2568else
2569 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2570/* confdefs.h. */
2571_ACEOF
2572cat confdefs.h >>conftest.$ac_ext
2573cat >>conftest.$ac_ext <<_ACEOF
2574/* end confdefs.h. */
2575
2576int
2577main ()
2578{
6e3f3080 2579
ba479fd2
NN
2580 ;
2581 return 0;
2582}
2583_ACEOF
2584rm -f conftest.o conftest.obj
b61ff9c8
BS
2585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2586 (eval $ac_compile) 2>&5
ba479fd2
NN
2587 ac_status=$?
2588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2589 (exit $ac_status); }; then
b61ff9c8 2590 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
ba479fd2 2591 case $ac_file in
b61ff9c8 2592 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
ba479fd2
NN
2593 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2594 break;;
2595 esac
2596done
63cf211a 2597else
ba479fd2
NN
2598 echo "$as_me: failed program was:" >&5
2599sed 's/^/| /' conftest.$ac_ext >&5
2600
18c04407
RW
2601{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2602echo "$as_me: error: in \`$ac_pwd':" >&2;}
ba479fd2
NN
2603{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2604See \`config.log' for more details." >&5
2605echo "$as_me: error: cannot compute suffix of object files: cannot compile
2606See \`config.log' for more details." >&2;}
18c04407 2607 { (exit 1); exit 1; }; }; }
ba479fd2
NN
2608fi
2609
2610rm -f conftest.$ac_cv_objext conftest.$ac_ext
2611fi
b61ff9c8
BS
2612echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2613echo "${ECHO_T}$ac_cv_objext" >&6
ba479fd2
NN
2614OBJEXT=$ac_cv_objext
2615ac_objext=$OBJEXT
b61ff9c8
BS
2616echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2617echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
ba479fd2
NN
2618if test "${ac_cv_c_compiler_gnu+set}" = set; then
2619 echo $ECHO_N "(cached) $ECHO_C" >&6
2620else
2621 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2622/* confdefs.h. */
2623_ACEOF
2624cat confdefs.h >>conftest.$ac_ext
2625cat >>conftest.$ac_ext <<_ACEOF
2626/* end confdefs.h. */
2627
2628int
2629main ()
2630{
2631#ifndef __GNUC__
2632 choke me
2633#endif
6e3f3080 2634
ba479fd2
NN
2635 ;
2636 return 0;
2637}
2638_ACEOF
2639rm -f conftest.$ac_objext
b61ff9c8
BS
2640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2641 (eval $ac_compile) 2>conftest.er1
ba479fd2 2642 ac_status=$?
86da66b5
HPN
2643 grep -v '^ *+' conftest.er1 >conftest.err
2644 rm -f conftest.er1
2645 cat conftest.err >&5
ba479fd2 2646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2647 (exit $ac_status); } &&
2648 { ac_try='test -z "$ac_c_werror_flag"
2649 || test ! -s conftest.err'
2650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2651 (eval $ac_try) 2>&5
2652 ac_status=$?
2653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2654 (exit $ac_status); }; } &&
2655 { ac_try='test -s conftest.$ac_objext'
2656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2657 (eval $ac_try) 2>&5
2658 ac_status=$?
2659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2660 (exit $ac_status); }; }; then
ba479fd2
NN
2661 ac_compiler_gnu=yes
2662else
2663 echo "$as_me: failed program was:" >&5
2664sed 's/^/| /' conftest.$ac_ext >&5
2665
b61ff9c8 2666ac_compiler_gnu=no
ba479fd2 2667fi
b61ff9c8 2668rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2669ac_cv_c_compiler_gnu=$ac_compiler_gnu
2670
2671fi
b61ff9c8
BS
2672echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2673echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
ba479fd2
NN
2674GCC=`test $ac_compiler_gnu = yes && echo yes`
2675ac_test_CFLAGS=${CFLAGS+set}
2676ac_save_CFLAGS=$CFLAGS
b61ff9c8
BS
2677CFLAGS="-g"
2678echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2679echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
ba479fd2
NN
2680if test "${ac_cv_prog_cc_g+set}" = set; then
2681 echo $ECHO_N "(cached) $ECHO_C" >&6
2682else
b61ff9c8 2683 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2684/* confdefs.h. */
2685_ACEOF
2686cat confdefs.h >>conftest.$ac_ext
2687cat >>conftest.$ac_ext <<_ACEOF
2688/* end confdefs.h. */
2689
2690int
2691main ()
2692{
2693
2694 ;
2695 return 0;
2696}
2697_ACEOF
2698rm -f conftest.$ac_objext
b61ff9c8
BS
2699if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2700 (eval $ac_compile) 2>conftest.er1
ba479fd2 2701 ac_status=$?
86da66b5
HPN
2702 grep -v '^ *+' conftest.er1 >conftest.err
2703 rm -f conftest.er1
2704 cat conftest.err >&5
ba479fd2 2705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2706 (exit $ac_status); } &&
2707 { ac_try='test -z "$ac_c_werror_flag"
2708 || test ! -s conftest.err'
2709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2710 (eval $ac_try) 2>&5
2711 ac_status=$?
2712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2713 (exit $ac_status); }; } &&
2714 { ac_try='test -s conftest.$ac_objext'
2715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2716 (eval $ac_try) 2>&5
2717 ac_status=$?
2718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2719 (exit $ac_status); }; }; then
1a4b763e
BS
2720 ac_cv_prog_cc_g=yes
2721else
2722 echo "$as_me: failed program was:" >&5
2723sed 's/^/| /' conftest.$ac_ext >&5
2724
b61ff9c8
BS
2725ac_cv_prog_cc_g=no
2726fi
2727rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2728fi
2729echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2730echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2731if test "$ac_test_CFLAGS" = set; then
2732 CFLAGS=$ac_save_CFLAGS
2733elif test $ac_cv_prog_cc_g = yes; then
2734 if test "$GCC" = yes; then
2735 CFLAGS="-g -O2"
2736 else
2737 CFLAGS="-g"
2738 fi
2739else
2740 if test "$GCC" = yes; then
2741 CFLAGS="-O2"
2742 else
2743 CFLAGS=
2744 fi
2745fi
2746echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2747echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2748if test "${ac_cv_prog_cc_stdc+set}" = set; then
2749 echo $ECHO_N "(cached) $ECHO_C" >&6
2750else
2751 ac_cv_prog_cc_stdc=no
2752ac_save_CC=$CC
2753cat >conftest.$ac_ext <<_ACEOF
1a4b763e
BS
2754/* confdefs.h. */
2755_ACEOF
2756cat confdefs.h >>conftest.$ac_ext
2757cat >>conftest.$ac_ext <<_ACEOF
2758/* end confdefs.h. */
b61ff9c8
BS
2759#include <stdarg.h>
2760#include <stdio.h>
2761#include <sys/types.h>
2762#include <sys/stat.h>
2763/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2764struct buf { int x; };
2765FILE * (*rcsopen) (struct buf *, struct stat *, int);
2766static char *e (p, i)
2767 char **p;
2768 int i;
1a4b763e 2769{
b61ff9c8 2770 return p[i];
1a4b763e 2771}
b61ff9c8
BS
2772static char *f (char * (*g) (char **, int), char **p, ...)
2773{
2774 char *s;
2775 va_list v;
2776 va_start (v,p);
2777 s = g (p, va_arg (v,int));
2778 va_end (v);
2779 return s;
2780}
2781
2782/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2783 function prototypes and stuff, but not '\xHH' hex character constants.
2784 These don't provoke an error unfortunately, instead are silently treated
2785 as 'x'. The following induces an error, until -std1 is added to get
2786 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2787 array size at least. It's necessary to write '\x00'==0 to get something
2788 that's true only with -std1. */
2789int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2790
2791int test (int i, double x);
2792struct s1 {int (*f) (int a);};
2793struct s2 {int (*f) (double a);};
2794int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2795int argc;
2796char **argv;
2797int
2798main ()
2799{
2800return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2801 ;
2802 return 0;
2803}
2804_ACEOF
2805# Don't try gcc -ansi; that turns off useful extensions and
2806# breaks some systems' header files.
2807# AIX -qlanglvl=ansi
2808# Ultrix and OSF/1 -std1
2809# HP-UX 10.20 and later -Ae
2810# HP-UX older versions -Aa -D_HPUX_SOURCE
2811# SVR4 -Xc -D__EXTENSIONS__
2812for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2813do
2814 CC="$ac_save_CC $ac_arg"
2815 rm -f conftest.$ac_objext
2816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2817 (eval $ac_compile) 2>conftest.er1
2818 ac_status=$?
1a4b763e
BS
2819 grep -v '^ *+' conftest.er1 >conftest.err
2820 rm -f conftest.er1
2821 cat conftest.err >&5
2f41c1d6 2822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2823 (exit $ac_status); } &&
2824 { ac_try='test -z "$ac_c_werror_flag"
2825 || test ! -s conftest.err'
2826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2827 (eval $ac_try) 2>&5
2828 ac_status=$?
2829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2830 (exit $ac_status); }; } &&
2831 { ac_try='test -s conftest.$ac_objext'
2832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2833 (eval $ac_try) 2>&5
2834 ac_status=$?
2835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2836 (exit $ac_status); }; }; then
2837 ac_cv_prog_cc_stdc=$ac_arg
2838break
1a4b763e
BS
2839else
2840 echo "$as_me: failed program was:" >&5
2841sed 's/^/| /' conftest.$ac_ext >&5
2842
b61ff9c8
BS
2843fi
2844rm -f conftest.err conftest.$ac_objext
2845done
2846rm -f conftest.$ac_ext conftest.$ac_objext
2847CC=$ac_save_CC
2848
2849fi
2850
2851case "x$ac_cv_prog_cc_stdc" in
2852 x|xno)
2853 echo "$as_me:$LINENO: result: none needed" >&5
2854echo "${ECHO_T}none needed" >&6 ;;
2855 *)
2856 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2857echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2858 CC="$CC $ac_cv_prog_cc_stdc" ;;
2859esac
2860
2861# Some people use a C++ compiler to compile C. Since we use `exit',
2862# in C++ we need to declare it. In case someone uses the same compiler
2863# for both compiling C and C++ we need to have the C++ compiler decide
2864# the declaration of exit, since it's the most demanding environment.
2865cat >conftest.$ac_ext <<_ACEOF
2866#ifndef __cplusplus
2867 choke me
2868#endif
2869_ACEOF
2870rm -f conftest.$ac_objext
2871if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2872 (eval $ac_compile) 2>conftest.er1
2873 ac_status=$?
2874 grep -v '^ *+' conftest.er1 >conftest.err
2875 rm -f conftest.er1
2876 cat conftest.err >&5
2877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2878 (exit $ac_status); } &&
2879 { ac_try='test -z "$ac_c_werror_flag"
2880 || test ! -s conftest.err'
2881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2882 (eval $ac_try) 2>&5
2883 ac_status=$?
2884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2885 (exit $ac_status); }; } &&
2886 { ac_try='test -s conftest.$ac_objext'
2887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2888 (eval $ac_try) 2>&5
2889 ac_status=$?
2890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2891 (exit $ac_status); }; }; then
2892 for ac_declaration in \
2893 '' \
2894 'extern "C" void std::exit (int) throw (); using std::exit;' \
2895 'extern "C" void std::exit (int); using std::exit;' \
2896 'extern "C" void exit (int) throw ();' \
2897 'extern "C" void exit (int);' \
2898 'void exit (int);'
2899do
2900 cat >conftest.$ac_ext <<_ACEOF
1a4b763e
BS
2901/* confdefs.h. */
2902_ACEOF
2903cat confdefs.h >>conftest.$ac_ext
2904cat >>conftest.$ac_ext <<_ACEOF
2905/* end confdefs.h. */
b61ff9c8
BS
2906$ac_declaration
2907#include <stdlib.h>
1a4b763e
BS
2908int
2909main ()
2910{
b61ff9c8 2911exit (42);
1a4b763e
BS
2912 ;
2913 return 0;
2914}
2915_ACEOF
2916rm -f conftest.$ac_objext
b61ff9c8
BS
2917if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2918 (eval $ac_compile) 2>conftest.er1
2f41c1d6 2919 ac_status=$?
1a4b763e
BS
2920 grep -v '^ *+' conftest.er1 >conftest.err
2921 rm -f conftest.er1
2922 cat conftest.err >&5
2f41c1d6 2923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2924 (exit $ac_status); } &&
2925 { ac_try='test -z "$ac_c_werror_flag"
2926 || test ! -s conftest.err'
2927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2928 (eval $ac_try) 2>&5
2929 ac_status=$?
2930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2931 (exit $ac_status); }; } &&
2932 { ac_try='test -s conftest.$ac_objext'
2933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2934 (eval $ac_try) 2>&5
2935 ac_status=$?
2936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2937 (exit $ac_status); }; }; then
2938 :
ab22c1fa
CF
2939else
2940 echo "$as_me: failed program was:" >&5
2941sed 's/^/| /' conftest.$ac_ext >&5
2942
b61ff9c8 2943continue
2f41c1d6 2944fi
b61ff9c8
BS
2945rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2946 cat >conftest.$ac_ext <<_ACEOF
ab22c1fa
CF
2947/* confdefs.h. */
2948_ACEOF
2949cat confdefs.h >>conftest.$ac_ext
2950cat >>conftest.$ac_ext <<_ACEOF
2951/* end confdefs.h. */
b61ff9c8 2952$ac_declaration
2f41c1d6
PB
2953int
2954main ()
2955{
b61ff9c8 2956exit (42);
2f41c1d6
PB
2957 ;
2958 return 0;
2959}
2960_ACEOF
b61ff9c8
BS
2961rm -f conftest.$ac_objext
2962if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2963 (eval $ac_compile) 2>conftest.er1
2f41c1d6 2964 ac_status=$?
ab22c1fa
CF
2965 grep -v '^ *+' conftest.er1 >conftest.err
2966 rm -f conftest.er1
2967 cat conftest.err >&5
a3bba767 2968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2969 (exit $ac_status); } &&
2970 { ac_try='test -z "$ac_c_werror_flag"
2971 || test ! -s conftest.err'
2972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2973 (eval $ac_try) 2>&5
2974 ac_status=$?
2975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2976 (exit $ac_status); }; } &&
2977 { ac_try='test -s conftest.$ac_objext'
2978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2979 (eval $ac_try) 2>&5
2980 ac_status=$?
2981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2982 (exit $ac_status); }; }; then
2983 break
ab22c1fa
CF
2984else
2985 echo "$as_me: failed program was:" >&5
2986sed 's/^/| /' conftest.$ac_ext >&5
2987
2f41c1d6 2988fi
b61ff9c8 2989rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2f41c1d6 2990done
b61ff9c8
BS
2991rm -f conftest*
2992if test -n "$ac_declaration"; then
2993 echo '#ifdef __cplusplus' >>confdefs.h
2994 echo $ac_declaration >>confdefs.h
2995 echo '#endif' >>confdefs.h
2f41c1d6 2996fi
2f41c1d6 2997
b61ff9c8
BS
2998else
2999 echo "$as_me: failed program was:" >&5
3000sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 3001
b61ff9c8
BS
3002fi
3003rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
3004ac_ext=c
3005ac_cpp='$CPP $CPPFLAGS'
3006ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3007ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3008ac_compiler_gnu=$ac_cv_c_compiler_gnu
3009
3010if test "x$CC" != xcc; then
b61ff9c8
BS
3011 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
3012echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
ba479fd2 3013else
b61ff9c8
BS
3014 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
3015echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
ba479fd2
NN
3016fi
3017set dummy $CC; ac_cc=`echo $2 |
3018 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
b61ff9c8 3019if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
ba479fd2
NN
3020 echo $ECHO_N "(cached) $ECHO_C" >&6
3021else
3022 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3023/* confdefs.h. */
3024_ACEOF
3025cat confdefs.h >>conftest.$ac_ext
3026cat >>conftest.$ac_ext <<_ACEOF
3027/* end confdefs.h. */
3028
3029int
3030main ()
3031{
3032
3033 ;
3034 return 0;
3035}
3036_ACEOF
3ec83fc2
RH
3037# Make sure it works both with $CC and with simple cc.
3038# We do the test twice because some compilers refuse to overwrite an
3039# existing .o file with -o, though they will create one.
b61ff9c8
BS
3040ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
3041if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3042 (eval $ac_try) 2>&5
ba479fd2
NN
3043 ac_status=$?
3044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3045 (exit $ac_status); } &&
b61ff9c8
BS
3046 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3047 (eval $ac_try) 2>&5
ba479fd2
NN
3048 ac_status=$?
3049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3050 (exit $ac_status); };
3ec83fc2
RH
3051then
3052 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
3053 if test "x$CC" != xcc; then
3054 # Test first that cc exists at all.
ba479fd2 3055 if { ac_try='cc -c conftest.$ac_ext >&5'
b61ff9c8
BS
3056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3057 (eval $ac_try) 2>&5
ba479fd2
NN
3058 ac_status=$?
3059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3060 (exit $ac_status); }; }; then
b61ff9c8
BS
3061 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
3062 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3063 (eval $ac_try) 2>&5
ba479fd2
NN
3064 ac_status=$?
3065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3066 (exit $ac_status); } &&
b61ff9c8
BS
3067 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3068 (eval $ac_try) 2>&5
ba479fd2
NN
3069 ac_status=$?
3070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3071 (exit $ac_status); };
3ec83fc2 3072 then
86da66b5
HPN
3073 # cc works too.
3074 :
3ec83fc2 3075 else
86da66b5
HPN
3076 # cc exists but doesn't like -o.
3077 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
3078 fi
3079 fi
3080 fi
3081else
3082 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3083fi
b61ff9c8 3084rm -f conftest*
3ec83fc2
RH
3085
3086fi
b61ff9c8
BS
3087if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
3088 echo "$as_me:$LINENO: result: yes" >&5
3089echo "${ECHO_T}yes" >&6
3ec83fc2 3090else
b61ff9c8
BS
3091 echo "$as_me:$LINENO: result: no" >&5
3092echo "${ECHO_T}no" >&6
ba479fd2
NN
3093
3094cat >>confdefs.h <<\_ACEOF
3ec83fc2 3095#define NO_MINUS_C_MINUS_O 1
ba479fd2 3096_ACEOF
3ec83fc2
RH
3097
3098fi
3099
3b620440
KC
3100# expand $ac_aux_dir to an absolute path
3101am_aux_dir=`cd $ac_aux_dir && pwd`
3102
3103# FIXME: we rely on the cache variable name because
3104# there is no other way.
3105set dummy $CC
3106ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
3107if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
3108 # Losing compiler, so override with the script.
3109 # FIXME: It is wrong to rewrite CC.
3110 # But if we don't then we get into trouble of one sort or another.
3111 # A longer-term fix would be to have automake use am__CC in this case,
3112 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3113 CC="$am_aux_dir/compile $CC"
3114fi
3115
3d4e720a
ST
3116
3117
3118
3119if test -n "$ac_tool_prefix"; then
3120 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
3121set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
3122echo "$as_me:$LINENO: checking for $ac_word" >&5
3123echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3124if test "${ac_cv_prog_GNATBIND+set}" = set; then
3125 echo $ECHO_N "(cached) $ECHO_C" >&6
3126else
3127 if test -n "$GNATBIND"; then
3128 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
3129else
3130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3131for as_dir in $PATH
3132do
3133 IFS=$as_save_IFS
3134 test -z "$as_dir" && as_dir=.
3135 for ac_exec_ext in '' $ac_executable_extensions; do
3136 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3137 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
3138 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3139 break 2
3140 fi
3141done
3142done
3143
3144fi
3145fi
3146GNATBIND=$ac_cv_prog_GNATBIND
3147if test -n "$GNATBIND"; then
3148 echo "$as_me:$LINENO: result: $GNATBIND" >&5
3149echo "${ECHO_T}$GNATBIND" >&6
3150else
3151 echo "$as_me:$LINENO: result: no" >&5
3152echo "${ECHO_T}no" >&6
3153fi
3154
3155fi
3156if test -z "$ac_cv_prog_GNATBIND"; then
3157 ac_ct_GNATBIND=$GNATBIND
3158 # Extract the first word of "gnatbind", so it can be a program name with args.
3159set dummy gnatbind; ac_word=$2
3160echo "$as_me:$LINENO: checking for $ac_word" >&5
3161echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3162if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then
3163 echo $ECHO_N "(cached) $ECHO_C" >&6
3164else
3165 if test -n "$ac_ct_GNATBIND"; then
3166 ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
3167else
3168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3169for as_dir in $PATH
3170do
3171 IFS=$as_save_IFS
3172 test -z "$as_dir" && as_dir=.
3173 for ac_exec_ext in '' $ac_executable_extensions; do
3174 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3175 ac_cv_prog_ac_ct_GNATBIND="gnatbind"
3176 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3177 break 2
3178 fi
3179done
3180done
3181
3182 test -z "$ac_cv_prog_ac_ct_GNATBIND" && ac_cv_prog_ac_ct_GNATBIND="no"
3183fi
3184fi
3185ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
3186if test -n "$ac_ct_GNATBIND"; then
3187 echo "$as_me:$LINENO: result: $ac_ct_GNATBIND" >&5
3188echo "${ECHO_T}$ac_ct_GNATBIND" >&6
3189else
3190 echo "$as_me:$LINENO: result: no" >&5
3191echo "${ECHO_T}no" >&6
3192fi
3193
3194 GNATBIND=$ac_ct_GNATBIND
3195else
3196 GNATBIND="$ac_cv_prog_GNATBIND"
3197fi
3198
3199if test -n "$ac_tool_prefix"; then
3200 # Extract the first word of "${ac_tool_prefix}gnatmake", so it can be a program name with args.
3201set dummy ${ac_tool_prefix}gnatmake; ac_word=$2
3202echo "$as_me:$LINENO: checking for $ac_word" >&5
3203echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3204if test "${ac_cv_prog_GNATMAKE+set}" = set; then
3205 echo $ECHO_N "(cached) $ECHO_C" >&6
3206else
3207 if test -n "$GNATMAKE"; then
3208 ac_cv_prog_GNATMAKE="$GNATMAKE" # Let the user override the test.
3209else
3210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3211for as_dir in $PATH
3212do
3213 IFS=$as_save_IFS
3214 test -z "$as_dir" && as_dir=.
3215 for ac_exec_ext in '' $ac_executable_extensions; do
3216 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3217 ac_cv_prog_GNATMAKE="${ac_tool_prefix}gnatmake"
3218 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3219 break 2
3220 fi
3221done
3222done
3223
3224fi
3225fi
3226GNATMAKE=$ac_cv_prog_GNATMAKE
3227if test -n "$GNATMAKE"; then
3228 echo "$as_me:$LINENO: result: $GNATMAKE" >&5
3229echo "${ECHO_T}$GNATMAKE" >&6
3230else
3231 echo "$as_me:$LINENO: result: no" >&5
3232echo "${ECHO_T}no" >&6
3233fi
3234
3235fi
3236if test -z "$ac_cv_prog_GNATMAKE"; then
3237 ac_ct_GNATMAKE=$GNATMAKE
3238 # Extract the first word of "gnatmake", so it can be a program name with args.
3239set dummy gnatmake; ac_word=$2
3240echo "$as_me:$LINENO: checking for $ac_word" >&5
3241echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3242if test "${ac_cv_prog_ac_ct_GNATMAKE+set}" = set; then
3243 echo $ECHO_N "(cached) $ECHO_C" >&6
3244else
3245 if test -n "$ac_ct_GNATMAKE"; then
3246 ac_cv_prog_ac_ct_GNATMAKE="$ac_ct_GNATMAKE" # Let the user override the test.
3247else
3248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3249for as_dir in $PATH
3250do
3251 IFS=$as_save_IFS
3252 test -z "$as_dir" && as_dir=.
3253 for ac_exec_ext in '' $ac_executable_extensions; do
3254 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3255 ac_cv_prog_ac_ct_GNATMAKE="gnatmake"
3256 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3257 break 2
3258 fi
3259done
3260done
3261
3262 test -z "$ac_cv_prog_ac_ct_GNATMAKE" && ac_cv_prog_ac_ct_GNATMAKE="no"
3263fi
3264fi
3265ac_ct_GNATMAKE=$ac_cv_prog_ac_ct_GNATMAKE
3266if test -n "$ac_ct_GNATMAKE"; then
3267 echo "$as_me:$LINENO: result: $ac_ct_GNATMAKE" >&5
3268echo "${ECHO_T}$ac_ct_GNATMAKE" >&6
3269else
3270 echo "$as_me:$LINENO: result: no" >&5
3271echo "${ECHO_T}no" >&6
3272fi
3273
3274 GNATMAKE=$ac_ct_GNATMAKE
3275else
3276 GNATMAKE="$ac_cv_prog_GNATMAKE"
3277fi
3278
3279echo "$as_me:$LINENO: checking whether compiler driver understands Ada" >&5
3280echo $ECHO_N "checking whether compiler driver understands Ada... $ECHO_C" >&6
3281if test "${acx_cv_cc_gcc_supports_ada+set}" = set; then
3282 echo $ECHO_N "(cached) $ECHO_C" >&6
3283else
3284 cat >conftest.adb <<EOF
3285procedure conftest is begin null; end conftest;
3286EOF
3287acx_cv_cc_gcc_supports_ada=no
3288# There is a bug in old released versions of GCC which causes the
3289# driver to exit successfully when the appropriate language module
3290# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
3291# Therefore we must check for the error message as well as an
3292# unsuccessful exit.
3293# Other compilers, like HP Tru64 UNIX cc, exit successfully when
3294# given a .adb file, but produce no object file. So we must check
3295# if an object file was really produced to guard against this.
3296errors=`(${CC} -I"$srcdir"/ada -c conftest.adb) 2>&1 || echo failure`
3297if test x"$errors" = x && test -f conftest.$ac_objext; then
3298 acx_cv_cc_gcc_supports_ada=yes
3299fi
3300rm -f conftest.*
3301fi
3302echo "$as_me:$LINENO: result: $acx_cv_cc_gcc_supports_ada" >&5
3303echo "${ECHO_T}$acx_cv_cc_gcc_supports_ada" >&6
3304
3305if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
3306 have_gnat=yes
3307else
3308 have_gnat=no
3309fi
3310
3311
414d23ae
HPN
3312# autoconf is lame and doesn't give us any substitution variable for this.
3313if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
3314 NO_MINUS_C_MINUS_O=yes
3315else
3316 OUTPUT_OPTION='-o $@'
3317fi
3318
3319
3320
ec6c7392
PB
3321# Remove the -O2: for historical reasons, unless bootstrapping we prefer
3322# optimizations to be activated explicitly by the toplevel.
3323case "$CC" in
3324 */prev-gcc/xgcc*) ;;
3325 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
3326esac
3327
3328
73458fb7
NN
3329# -------------------------
3330# Check C compiler features
3331# -------------------------
3332
60d26958 3333
ba479fd2
NN
3334ac_ext=c
3335ac_cpp='$CPP $CPPFLAGS'
3336ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3337ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3338ac_compiler_gnu=$ac_cv_c_compiler_gnu
b61ff9c8
BS
3339echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3340echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
3341# On Suns, sometimes $CPP names a directory.
3342if test -n "$CPP" && test -d "$CPP"; then
3343 CPP=
3344fi
3345if test -z "$CPP"; then
ba479fd2
NN
3346 if test "${ac_cv_prog_CPP+set}" = set; then
3347 echo $ECHO_N "(cached) $ECHO_C" >&6
3348else
3349 # Double quotes because CPP needs to be expanded
3350 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3351 do
3352 ac_preproc_ok=false
3353for ac_c_preproc_warn_flag in '' yes
3354do
3355 # Use a header file that comes with gcc, so configuring glibc
3356 # with a fresh cross-compiler works.
3357 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3358 # <limits.h> exists even on freestanding compilers.
84c041a1 3359 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
3360 # not just through cpp. "Syntax error" is here to catch this case.
3361 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3362/* confdefs.h. */
3363_ACEOF
3364cat confdefs.h >>conftest.$ac_ext
3365cat >>conftest.$ac_ext <<_ACEOF
3366/* end confdefs.h. */
3367#ifdef __STDC__
3368# include <limits.h>
3369#else
3370# include <assert.h>
3371#endif
86da66b5 3372 Syntax error
ba479fd2 3373_ACEOF
b61ff9c8
BS
3374if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3375 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3376 ac_status=$?
3377 grep -v '^ *+' conftest.er1 >conftest.err
3378 rm -f conftest.er1
3379 cat conftest.err >&5
3380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3381 (exit $ac_status); } >/dev/null; then
3382 if test -s conftest.err; then
3383 ac_cpp_err=$ac_c_preproc_warn_flag
3384 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3385 else
3386 ac_cpp_err=
3387 fi
3388else
3389 ac_cpp_err=yes
3390fi
3391if test -z "$ac_cpp_err"; then
093e61a6 3392 :
cafe096b 3393else
ba479fd2
NN
3394 echo "$as_me: failed program was:" >&5
3395sed 's/^/| /' conftest.$ac_ext >&5
3396
3397 # Broken: fails on valid input.
3398continue
3399fi
3400rm -f conftest.err conftest.$ac_ext
3401
b61ff9c8 3402 # OK, works on sane cases. Now check whether non-existent headers
ba479fd2
NN
3403 # can be detected and how.
3404 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3405/* confdefs.h. */
3406_ACEOF
3407cat confdefs.h >>conftest.$ac_ext
3408cat >>conftest.$ac_ext <<_ACEOF
3409/* end confdefs.h. */
3410#include <ac_nonexistent.h>
3411_ACEOF
b61ff9c8
BS
3412if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3413 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3414 ac_status=$?
3415 grep -v '^ *+' conftest.er1 >conftest.err
3416 rm -f conftest.er1
3417 cat conftest.err >&5
3418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3419 (exit $ac_status); } >/dev/null; then
3420 if test -s conftest.err; then
3421 ac_cpp_err=$ac_c_preproc_warn_flag
3422 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3423 else
3424 ac_cpp_err=
3425 fi
3426else
3427 ac_cpp_err=yes
3428fi
3429if test -z "$ac_cpp_err"; then
ba479fd2
NN
3430 # Broken: success on invalid input.
3431continue
3432else
3433 echo "$as_me: failed program was:" >&5
3434sed 's/^/| /' conftest.$ac_ext >&5
3435
3436 # Passes both tests.
3437ac_preproc_ok=:
3438break
3439fi
3440rm -f conftest.err conftest.$ac_ext
3441
3442done
3443# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3444rm -f conftest.err conftest.$ac_ext
3445if $ac_preproc_ok; then
3446 break
3447fi
3448
3449 done
3450 ac_cv_prog_CPP=$CPP
3451
3452fi
3453 CPP=$ac_cv_prog_CPP
3454else
3455 ac_cv_prog_CPP=$CPP
3456fi
b61ff9c8
BS
3457echo "$as_me:$LINENO: result: $CPP" >&5
3458echo "${ECHO_T}$CPP" >&6
ba479fd2
NN
3459ac_preproc_ok=false
3460for ac_c_preproc_warn_flag in '' yes
3461do
3462 # Use a header file that comes with gcc, so configuring glibc
3463 # with a fresh cross-compiler works.
3464 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3465 # <limits.h> exists even on freestanding compilers.
3466 # On the NeXT, cc -E runs the code through the compiler's parser,
3467 # not just through cpp. "Syntax error" is here to catch this case.
3468 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3469/* confdefs.h. */
3470_ACEOF
3471cat confdefs.h >>conftest.$ac_ext
3472cat >>conftest.$ac_ext <<_ACEOF
3473/* end confdefs.h. */
3474#ifdef __STDC__
3475# include <limits.h>
3476#else
3477# include <assert.h>
3478#endif
86da66b5 3479 Syntax error
ba479fd2 3480_ACEOF
b61ff9c8
BS
3481if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3482 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3483 ac_status=$?
3484 grep -v '^ *+' conftest.er1 >conftest.err
3485 rm -f conftest.er1
3486 cat conftest.err >&5
3487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3488 (exit $ac_status); } >/dev/null; then
3489 if test -s conftest.err; then
3490 ac_cpp_err=$ac_c_preproc_warn_flag
3491 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3492 else
3493 ac_cpp_err=
3494 fi
3495else
3496 ac_cpp_err=yes
3497fi
3498if test -z "$ac_cpp_err"; then
6e3f3080 3499 :
414d23ae 3500else
ba479fd2
NN
3501 echo "$as_me: failed program was:" >&5
3502sed 's/^/| /' conftest.$ac_ext >&5
3503
3504 # Broken: fails on valid input.
3505continue
3506fi
3507rm -f conftest.err conftest.$ac_ext
3508
b61ff9c8 3509 # OK, works on sane cases. Now check whether non-existent headers
ba479fd2
NN
3510 # can be detected and how.
3511 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3512/* confdefs.h. */
3513_ACEOF
3514cat confdefs.h >>conftest.$ac_ext
3515cat >>conftest.$ac_ext <<_ACEOF
3516/* end confdefs.h. */
3517#include <ac_nonexistent.h>
3518_ACEOF
b61ff9c8
BS
3519if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3520 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3521 ac_status=$?
3522 grep -v '^ *+' conftest.er1 >conftest.err
3523 rm -f conftest.er1
3524 cat conftest.err >&5
3525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3526 (exit $ac_status); } >/dev/null; then
3527 if test -s conftest.err; then
3528 ac_cpp_err=$ac_c_preproc_warn_flag
3529 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3530 else
3531 ac_cpp_err=
3532 fi
3533else
3534 ac_cpp_err=yes
3535fi
3536if test -z "$ac_cpp_err"; then
ba479fd2
NN
3537 # Broken: success on invalid input.
3538continue
3539else
3540 echo "$as_me: failed program was:" >&5
3541sed 's/^/| /' conftest.$ac_ext >&5
3542
3543 # Passes both tests.
3544ac_preproc_ok=:
3545break
63cf211a 3546fi
ba479fd2
NN
3547rm -f conftest.err conftest.$ac_ext
3548
3549done
3550# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3551rm -f conftest.err conftest.$ac_ext
3552if $ac_preproc_ok; then
3553 :
6e3f3080 3554else
18c04407
RW
3555 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3556echo "$as_me: error: in \`$ac_pwd':" >&2;}
3557{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
ba479fd2
NN
3558See \`config.log' for more details." >&5
3559echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3560See \`config.log' for more details." >&2;}
18c04407 3561 { (exit 1); exit 1; }; }; }
6e3f3080
NN
3562fi
3563
ba479fd2
NN
3564ac_ext=c
3565ac_cpp='$CPP $CPPFLAGS'
3566ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3567ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3568ac_compiler_gnu=$ac_cv_c_compiler_gnu
3569
b5472e1d 3570
60d26958
PB
3571echo "$as_me:$LINENO: checking for egrep" >&5
3572echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3573if test "${ac_cv_prog_egrep+set}" = set; then
3574 echo $ECHO_N "(cached) $ECHO_C" >&6
3575else
3576 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3577 then ac_cv_prog_egrep='grep -E'
3578 else ac_cv_prog_egrep='egrep'
3579 fi
3580fi
3581echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3582echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3583 EGREP=$ac_cv_prog_egrep
3584
3585
3586echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3587echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3588if test "${ac_cv_header_stdc+set}" = set; then
ba479fd2 3589 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3590else
ba479fd2 3591 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3592/* confdefs.h. */
3593_ACEOF
3594cat confdefs.h >>conftest.$ac_ext
3595cat >>conftest.$ac_ext <<_ACEOF
3596/* end confdefs.h. */
60d26958
PB
3597#include <stdlib.h>
3598#include <stdarg.h>
3599#include <string.h>
3600#include <float.h>
3601
3602int
3603main ()
3604{
414d23ae 3605
60d26958
PB
3606 ;
3607 return 0;
3608}
ba479fd2
NN
3609_ACEOF
3610rm -f conftest.$ac_objext
b61ff9c8
BS
3611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3612 (eval $ac_compile) 2>conftest.er1
ba479fd2 3613 ac_status=$?
86da66b5
HPN
3614 grep -v '^ *+' conftest.er1 >conftest.err
3615 rm -f conftest.er1
3616 cat conftest.err >&5
ba479fd2 3617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3618 (exit $ac_status); } &&
3619 { ac_try='test -z "$ac_c_werror_flag"
3620 || test ! -s conftest.err'
3621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3622 (eval $ac_try) 2>&5
3623 ac_status=$?
3624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3625 (exit $ac_status); }; } &&
3626 { ac_try='test -s conftest.$ac_objext'
3627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3628 (eval $ac_try) 2>&5
3629 ac_status=$?
3630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3631 (exit $ac_status); }; }; then
60d26958 3632 ac_cv_header_stdc=yes
414d23ae 3633else
ba479fd2
NN
3634 echo "$as_me: failed program was:" >&5
3635sed 's/^/| /' conftest.$ac_ext >&5
3636
60d26958 3637ac_cv_header_stdc=no
414d23ae 3638fi
b61ff9c8 3639rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3640
60d26958
PB
3641if test $ac_cv_header_stdc = yes; then
3642 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3643 cat >conftest.$ac_ext <<_ACEOF
3644/* confdefs.h. */
3645_ACEOF
3646cat confdefs.h >>conftest.$ac_ext
3647cat >>conftest.$ac_ext <<_ACEOF
3648/* end confdefs.h. */
3649#include <string.h>
3650
3651_ACEOF
3652if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3653 $EGREP "memchr" >/dev/null 2>&1; then
3654 :
3655else
3656 ac_cv_header_stdc=no
414d23ae 3657fi
60d26958 3658rm -f conftest*
86da66b5 3659
60d26958 3660fi
86da66b5 3661
60d26958
PB
3662if test $ac_cv_header_stdc = yes; then
3663 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3664 cat >conftest.$ac_ext <<_ACEOF
3665/* confdefs.h. */
3666_ACEOF
3667cat confdefs.h >>conftest.$ac_ext
3668cat >>conftest.$ac_ext <<_ACEOF
3669/* end confdefs.h. */
3670#include <stdlib.h>
3671
3672_ACEOF
3673if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3674 $EGREP "free" >/dev/null 2>&1; then
3675 :
3676else
3677 ac_cv_header_stdc=no
3678fi
3679rm -f conftest*
3680
3681fi
3682
3683if test $ac_cv_header_stdc = yes; then
3684 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3685 if test "$cross_compiling" = yes; then
3686 :
3687else
3688 cat >conftest.$ac_ext <<_ACEOF
3689/* confdefs.h. */
3690_ACEOF
3691cat confdefs.h >>conftest.$ac_ext
3692cat >>conftest.$ac_ext <<_ACEOF
3693/* end confdefs.h. */
3694#include <ctype.h>
3695#if ((' ' & 0x0FF) == 0x020)
3696# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3697# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3698#else
3699# define ISLOWER(c) \
3700 (('a' <= (c) && (c) <= 'i') \
3701 || ('j' <= (c) && (c) <= 'r') \
3702 || ('s' <= (c) && (c) <= 'z'))
3703# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
86da66b5 3704#endif
60d26958
PB
3705
3706#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3707int
3708main ()
3709{
3710 int i;
3711 for (i = 0; i < 256; i++)
3712 if (XOR (islower (i), ISLOWER (i))
3713 || toupper (i) != TOUPPER (i))
3714 exit(2);
3715 exit (0);
3716}
ba479fd2 3717_ACEOF
60d26958
PB
3718rm -f conftest$ac_exeext
3719if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3720 (eval $ac_link) 2>&5
3721 ac_status=$?
3722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3723 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3725 (eval $ac_try) 2>&5
3726 ac_status=$?
3727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3728 (exit $ac_status); }; }; then
3729 :
3730else
3731 echo "$as_me: program exited with status $ac_status" >&5
3732echo "$as_me: failed program was:" >&5
3733sed 's/^/| /' conftest.$ac_ext >&5
414d23ae 3734
60d26958
PB
3735( exit $ac_status )
3736ac_cv_header_stdc=no
3737fi
3738rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3739fi
3740fi
3741fi
3742echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3743echo "${ECHO_T}$ac_cv_header_stdc" >&6
3744if test $ac_cv_header_stdc = yes; then
414d23ae 3745
60d26958
PB
3746cat >>confdefs.h <<\_ACEOF
3747#define STDC_HEADERS 1
3748_ACEOF
bf3b7cd3 3749
60d26958
PB
3750fi
3751
3752# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3763 inttypes.h stdint.h unistd.h
3764do
3765as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3766echo "$as_me:$LINENO: checking for $ac_header" >&5
3767echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3768if eval "test \"\${$as_ac_Header+set}\" = set"; then
1a4b763e
BS
3769 echo $ECHO_N "(cached) $ECHO_C" >&6
3770else
60d26958
PB
3771 cat >conftest.$ac_ext <<_ACEOF
3772/* confdefs.h. */
3773_ACEOF
3774cat confdefs.h >>conftest.$ac_ext
3775cat >>conftest.$ac_ext <<_ACEOF
3776/* end confdefs.h. */
3777$ac_includes_default
3778
3779#include <$ac_header>
3780_ACEOF
3781rm -f conftest.$ac_objext
3782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3783 (eval $ac_compile) 2>conftest.er1
3784 ac_status=$?
3785 grep -v '^ *+' conftest.er1 >conftest.err
3786 rm -f conftest.er1
3787 cat conftest.err >&5
3788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3789 (exit $ac_status); } &&
3790 { ac_try='test -z "$ac_c_werror_flag"
3791 || test ! -s conftest.err'
3792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3793 (eval $ac_try) 2>&5
3794 ac_status=$?
3795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3796 (exit $ac_status); }; } &&
3797 { ac_try='test -s conftest.$ac_objext'
3798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3799 (eval $ac_try) 2>&5
3800 ac_status=$?
3801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3802 (exit $ac_status); }; }; then
3803 eval "$as_ac_Header=yes"
3804else
3805 echo "$as_me: failed program was:" >&5
3806sed 's/^/| /' conftest.$ac_ext >&5
3807
3808eval "$as_ac_Header=no"
b61ff9c8 3809fi
60d26958
PB
3810rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3811fi
3812echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3813echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3814if test `eval echo '${'$as_ac_Header'}'` = yes; then
3815 cat >>confdefs.h <<_ACEOF
3816#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3817_ACEOF
1a4b763e 3818
60d26958 3819fi
1a4b763e 3820
60d26958
PB
3821done
3822
3823
3824
3825 if test "${ac_cv_header_minix_config_h+set}" = set; then
3826 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3827echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3828if test "${ac_cv_header_minix_config_h+set}" = set; then
3829 echo $ECHO_N "(cached) $ECHO_C" >&6
3830fi
3831echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3832echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3833else
3834 # Is the header compilable?
3835echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3836echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3837cat >conftest.$ac_ext <<_ACEOF
3838/* confdefs.h. */
3839_ACEOF
3840cat confdefs.h >>conftest.$ac_ext
3841cat >>conftest.$ac_ext <<_ACEOF
3842/* end confdefs.h. */
3843$ac_includes_default
3844#include <minix/config.h>
3845_ACEOF
3846rm -f conftest.$ac_objext
3847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3848 (eval $ac_compile) 2>conftest.er1
3849 ac_status=$?
3850 grep -v '^ *+' conftest.er1 >conftest.err
3851 rm -f conftest.er1
3852 cat conftest.err >&5
3853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3854 (exit $ac_status); } &&
3855 { ac_try='test -z "$ac_c_werror_flag"
3856 || test ! -s conftest.err'
3857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3858 (eval $ac_try) 2>&5
3859 ac_status=$?
3860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3861 (exit $ac_status); }; } &&
3862 { ac_try='test -s conftest.$ac_objext'
3863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3864 (eval $ac_try) 2>&5
3865 ac_status=$?
3866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3867 (exit $ac_status); }; }; then
3868 ac_header_compiler=yes
3869else
3870 echo "$as_me: failed program was:" >&5
3871sed 's/^/| /' conftest.$ac_ext >&5
3872
3873ac_header_compiler=no
3874fi
3875rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3876echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3877echo "${ECHO_T}$ac_header_compiler" >&6
3878
3879# Is the header present?
3880echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3881echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3882cat >conftest.$ac_ext <<_ACEOF
3883/* confdefs.h. */
3884_ACEOF
3885cat confdefs.h >>conftest.$ac_ext
3886cat >>conftest.$ac_ext <<_ACEOF
3887/* end confdefs.h. */
3888#include <minix/config.h>
3889_ACEOF
3890if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3891 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3892 ac_status=$?
3893 grep -v '^ *+' conftest.er1 >conftest.err
3894 rm -f conftest.er1
3895 cat conftest.err >&5
3896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3897 (exit $ac_status); } >/dev/null; then
3898 if test -s conftest.err; then
3899 ac_cpp_err=$ac_c_preproc_warn_flag
3900 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3901 else
3902 ac_cpp_err=
3903 fi
3904else
3905 ac_cpp_err=yes
3906fi
3907if test -z "$ac_cpp_err"; then
3908 ac_header_preproc=yes
3909else
3910 echo "$as_me: failed program was:" >&5
3911sed 's/^/| /' conftest.$ac_ext >&5
3912
3913 ac_header_preproc=no
3914fi
3915rm -f conftest.err conftest.$ac_ext
3916echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3917echo "${ECHO_T}$ac_header_preproc" >&6
3918
3919# So? What about this header?
3920case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3921 yes:no: )
3922 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3923echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3924 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
3925echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
3926 ac_header_preproc=yes
3927 ;;
3928 no:yes:* )
3929 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3930echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3931 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3932echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3933 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
3934echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
3935 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
3936echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
3937 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3938echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3939 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
3940echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
3941 (
3942 cat <<\_ASBOX
3943## ------------------------------------------ ##
3944## Report this to the AC_PACKAGE_NAME lists. ##
3945## ------------------------------------------ ##
3946_ASBOX
3947 ) |
3948 sed "s/^/$as_me: WARNING: /" >&2
3949 ;;
3950esac
3951echo "$as_me:$LINENO: checking for minix/config.h" >&5
3952echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3953if test "${ac_cv_header_minix_config_h+set}" = set; then
3954 echo $ECHO_N "(cached) $ECHO_C" >&6
3955else
3956 ac_cv_header_minix_config_h=$ac_header_preproc
3957fi
3958echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3959echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3960
3961fi
3962if test $ac_cv_header_minix_config_h = yes; then
3963 MINIX=yes
3964else
3965 MINIX=
3966fi
3967
3968
3969 if test "$MINIX" = yes; then
3970
3971cat >>confdefs.h <<\_ACEOF
3972#define _POSIX_SOURCE 1
3973_ACEOF
3974
3975
3976cat >>confdefs.h <<\_ACEOF
3977#define _POSIX_1_SOURCE 2
3978_ACEOF
3979
3980
3981cat >>confdefs.h <<\_ACEOF
3982#define _MINIX 1
3983_ACEOF
3984
3985 fi
3986
3987
3988
3989 echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
3990echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6
3991if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
bf3b7cd3
JD
3992 echo $ECHO_N "(cached) $ECHO_C" >&6
3993else
3994 cat >conftest.$ac_ext <<_ACEOF
3995/* confdefs.h. */
3996_ACEOF
3997cat confdefs.h >>conftest.$ac_ext
3998cat >>conftest.$ac_ext <<_ACEOF
3999/* end confdefs.h. */
bf3b7cd3 4000
60d26958
PB
4001# define __EXTENSIONS__ 1
4002 $ac_includes_default
bf3b7cd3
JD
4003int
4004main ()
4005{
4006
4007 ;
4008 return 0;
4009}
4010_ACEOF
4011rm -f conftest.$ac_objext
b61ff9c8
BS
4012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4013 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4014 ac_status=$?
4015 grep -v '^ *+' conftest.er1 >conftest.err
4016 rm -f conftest.er1
4017 cat conftest.err >&5
4018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4019 (exit $ac_status); } &&
4020 { ac_try='test -z "$ac_c_werror_flag"
4021 || test ! -s conftest.err'
4022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4023 (eval $ac_try) 2>&5
4024 ac_status=$?
4025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4026 (exit $ac_status); }; } &&
4027 { ac_try='test -s conftest.$ac_objext'
4028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4029 (eval $ac_try) 2>&5
4030 ac_status=$?
4031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4032 (exit $ac_status); }; }; then
60d26958 4033 ac_cv_safe_to_define___extensions__=yes
bf3b7cd3
JD
4034else
4035 echo "$as_me: failed program was:" >&5
4036sed 's/^/| /' conftest.$ac_ext >&5
4037
60d26958 4038ac_cv_safe_to_define___extensions__=no
bf3b7cd3 4039fi
b61ff9c8 4040rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
60d26958
PB
4041fi
4042echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4043echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6
4044 test $ac_cv_safe_to_define___extensions__ = yes &&
4045 cat >>confdefs.h <<\_ACEOF
4046#define __EXTENSIONS__ 1
4047_ACEOF
bf3b7cd3 4048
60d26958
PB
4049 cat >>confdefs.h <<\_ACEOF
4050#define _ALL_SOURCE 1
4051_ACEOF
4052
4053 cat >>confdefs.h <<\_ACEOF
4054#define _GNU_SOURCE 1
4055_ACEOF
4056
4057 cat >>confdefs.h <<\_ACEOF
4058#define _POSIX_PTHREAD_SEMANTICS 1
4059_ACEOF
4060
4061 cat >>confdefs.h <<\_ACEOF
4062#define _TANDEM_SOURCE 1
4063_ACEOF
4064
4065
4066ac_ext=c
4067ac_cpp='$CPP $CPPFLAGS'
4068ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4069ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4070ac_compiler_gnu=$ac_cv_c_compiler_gnu
4071echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4072echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
4073# On Suns, sometimes $CPP names a directory.
4074if test -n "$CPP" && test -d "$CPP"; then
4075 CPP=
4076fi
4077if test -z "$CPP"; then
4078 if test "${ac_cv_prog_CPP+set}" = set; then
4079 echo $ECHO_N "(cached) $ECHO_C" >&6
4080else
4081 # Double quotes because CPP needs to be expanded
4082 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4083 do
4084 ac_preproc_ok=false
4085for ac_c_preproc_warn_flag in '' yes
4086do
4087 # Use a header file that comes with gcc, so configuring glibc
4088 # with a fresh cross-compiler works.
4089 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4090 # <limits.h> exists even on freestanding compilers.
4091 # On the NeXT, cc -E runs the code through the compiler's parser,
4092 # not just through cpp. "Syntax error" is here to catch this case.
bf3b7cd3
JD
4093 cat >conftest.$ac_ext <<_ACEOF
4094/* confdefs.h. */
4095_ACEOF
4096cat confdefs.h >>conftest.$ac_ext
4097cat >>conftest.$ac_ext <<_ACEOF
4098/* end confdefs.h. */
60d26958
PB
4099#ifdef __STDC__
4100# include <limits.h>
4101#else
4102# include <assert.h>
4103#endif
4104 Syntax error
bf3b7cd3 4105_ACEOF
60d26958
PB
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
bf3b7cd3
JD
4124 :
4125else
60d26958
PB
4126 echo "$as_me: failed program was:" >&5
4127sed 's/^/| /' conftest.$ac_ext >&5
4128
4129 # Broken: fails on valid input.
4130continue
bf3b7cd3 4131fi
60d26958
PB
4132rm -f conftest.err conftest.$ac_ext
4133
4134 # OK, works on sane cases. Now check whether non-existent headers
4135 # can be detected and how.
4136 cat >conftest.$ac_ext <<_ACEOF
4137/* confdefs.h. */
4138_ACEOF
4139cat confdefs.h >>conftest.$ac_ext
4140cat >>conftest.$ac_ext <<_ACEOF
4141/* end confdefs.h. */
4142#include <ac_nonexistent.h>
4143_ACEOF
4144if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4145 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4146 ac_status=$?
4147 grep -v '^ *+' conftest.er1 >conftest.err
4148 rm -f conftest.er1
4149 cat conftest.err >&5
4150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4151 (exit $ac_status); } >/dev/null; then
4152 if test -s conftest.err; then
4153 ac_cpp_err=$ac_c_preproc_warn_flag
4154 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4155 else
4156 ac_cpp_err=
4157 fi
4158else
4159 ac_cpp_err=yes
4160fi
4161if test -z "$ac_cpp_err"; then
4162 # Broken: success on invalid input.
4163continue
4164else
4165 echo "$as_me: failed program was:" >&5
4166sed 's/^/| /' conftest.$ac_ext >&5
bf3b7cd3 4167
60d26958
PB
4168 # Passes both tests.
4169ac_preproc_ok=:
4170break
bf3b7cd3 4171fi
60d26958 4172rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4173
60d26958
PB
4174done
4175# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4176rm -f conftest.err conftest.$ac_ext
4177if $ac_preproc_ok; then
4178 break
4179fi
4180
4181 done
4182 ac_cv_prog_CPP=$CPP
4183
4184fi
4185 CPP=$ac_cv_prog_CPP
4186else
4187 ac_cv_prog_CPP=$CPP
4188fi
4189echo "$as_me:$LINENO: result: $CPP" >&5
4190echo "${ECHO_T}$CPP" >&6
4191ac_preproc_ok=false
4192for ac_c_preproc_warn_flag in '' yes
4193do
4194 # Use a header file that comes with gcc, so configuring glibc
4195 # with a fresh cross-compiler works.
4196 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4197 # <limits.h> exists even on freestanding compilers.
4198 # On the NeXT, cc -E runs the code through the compiler's parser,
4199 # not just through cpp. "Syntax error" is here to catch this case.
bf3b7cd3
JD
4200 cat >conftest.$ac_ext <<_ACEOF
4201/* confdefs.h. */
4202_ACEOF
4203cat confdefs.h >>conftest.$ac_ext
4204cat >>conftest.$ac_ext <<_ACEOF
4205/* end confdefs.h. */
60d26958
PB
4206#ifdef __STDC__
4207# include <limits.h>
4208#else
4209# include <assert.h>
4210#endif
4211 Syntax error
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
4215 ac_status=$?
4216 grep -v '^ *+' conftest.er1 >conftest.err
4217 rm -f conftest.er1
4218 cat conftest.err >&5
4219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
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 4228 ac_cpp_err=yes
bf3b7cd3 4229fi
60d26958
PB
4230if test -z "$ac_cpp_err"; then
4231 :
4232else
4233 echo "$as_me: failed program was:" >&5
4234sed 's/^/| /' conftest.$ac_ext >&5
bf3b7cd3 4235
60d26958
PB
4236 # Broken: fails on valid input.
4237continue
bf3b7cd3 4238fi
60d26958 4239rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4240
60d26958
PB
4241 # OK, works on sane cases. Now check whether non-existent headers
4242 # can be detected and how.
bf3b7cd3
JD
4243 cat >conftest.$ac_ext <<_ACEOF
4244/* confdefs.h. */
4245_ACEOF
4246cat confdefs.h >>conftest.$ac_ext
4247cat >>conftest.$ac_ext <<_ACEOF
4248/* end confdefs.h. */
60d26958 4249#include <ac_nonexistent.h>
bf3b7cd3 4250_ACEOF
60d26958
PB
4251if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4252 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
bf3b7cd3 4253 ac_status=$?
60d26958
PB
4254 grep -v '^ *+' conftest.er1 >conftest.err
4255 rm -f conftest.er1
4256 cat conftest.err >&5
bf3b7cd3 4257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
60d26958
PB
4258 (exit $ac_status); } >/dev/null; then
4259 if test -s conftest.err; then
4260 ac_cpp_err=$ac_c_preproc_warn_flag
4261 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4262 else
4263 ac_cpp_err=
4264 fi
bf3b7cd3 4265else
60d26958
PB
4266 ac_cpp_err=yes
4267fi
4268if test -z "$ac_cpp_err"; then
4269 # Broken: success on invalid input.
4270continue
4271else
4272 echo "$as_me: failed program was:" >&5
bf3b7cd3
JD
4273sed 's/^/| /' conftest.$ac_ext >&5
4274
60d26958
PB
4275 # Passes both tests.
4276ac_preproc_ok=:
4277break
1a4b763e 4278fi
60d26958 4279rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4280
60d26958
PB
4281done
4282# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4283rm -f conftest.err conftest.$ac_ext
4284if $ac_preproc_ok; then
4285 :
4286else
18c04407
RW
4287 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
4288echo "$as_me: error: in \`$ac_pwd':" >&2;}
4289{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
60d26958
PB
4290See \`config.log' for more details." >&5
4291echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4292See \`config.log' for more details." >&2;}
18c04407 4293 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
4294fi
4295
60d26958
PB
4296ac_ext=c
4297ac_cpp='$CPP $CPPFLAGS'
4298ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4299ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4300ac_compiler_gnu=$ac_cv_c_compiler_gnu
bf3b7cd3 4301
60d26958
PB
4302echo "$as_me:$LINENO: checking for inline" >&5
4303echo $ECHO_N "checking for inline... $ECHO_C" >&6
4304if test "${ac_cv_c_inline+set}" = set; then
bf3b7cd3
JD
4305 echo $ECHO_N "(cached) $ECHO_C" >&6
4306else
60d26958
PB
4307 ac_cv_c_inline=no
4308for ac_kw in inline __inline__ __inline; do
bf3b7cd3
JD
4309 cat >conftest.$ac_ext <<_ACEOF
4310/* confdefs.h. */
4311_ACEOF
4312cat confdefs.h >>conftest.$ac_ext
4313cat >>conftest.$ac_ext <<_ACEOF
4314/* end confdefs.h. */
60d26958
PB
4315#ifndef __cplusplus
4316typedef int foo_t;
4317static $ac_kw foo_t static_foo () {return 0; }
4318$ac_kw foo_t foo () {return 0; }
4319#endif
bf3b7cd3 4320
bf3b7cd3
JD
4321_ACEOF
4322rm -f conftest.$ac_objext
b61ff9c8
BS
4323if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4324 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4325 ac_status=$?
4326 grep -v '^ *+' conftest.er1 >conftest.err
4327 rm -f conftest.er1
4328 cat conftest.err >&5
4329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4330 (exit $ac_status); } &&
4331 { ac_try='test -z "$ac_c_werror_flag"
4332 || test ! -s conftest.err'
4333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4334 (eval $ac_try) 2>&5
4335 ac_status=$?
4336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4337 (exit $ac_status); }; } &&
4338 { ac_try='test -s conftest.$ac_objext'
4339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4340 (eval $ac_try) 2>&5
4341 ac_status=$?
4342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4343 (exit $ac_status); }; }; then
60d26958 4344 ac_cv_c_inline=$ac_kw; break
bf3b7cd3
JD
4345else
4346 echo "$as_me: failed program was:" >&5
4347sed 's/^/| /' conftest.$ac_ext >&5
4348
bf3b7cd3 4349fi
b61ff9c8 4350rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
60d26958 4351done
bf3b7cd3
JD
4352
4353fi
60d26958
PB
4354echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
4355echo "${ECHO_T}$ac_cv_c_inline" >&6
bf3b7cd3 4356
60d26958
PB
4357
4358case $ac_cv_c_inline in
4359 inline | yes) ;;
4360 *)
4361 case $ac_cv_c_inline in
4362 no) ac_val=;;
4363 *) ac_val=$ac_cv_c_inline;;
4364 esac
4365 cat >>confdefs.h <<_ACEOF
4366#ifndef __cplusplus
4367#define inline $ac_val
4368#endif
4369_ACEOF
4370 ;;
4371esac
bf3b7cd3
JD
4372
4373
60d26958 4374# sizeof(char) is 1 by definition.
b61ff9c8
BS
4375echo "$as_me:$LINENO: checking for void *" >&5
4376echo $ECHO_N "checking for void *... $ECHO_C" >&6
bf3b7cd3
JD
4377if test "${ac_cv_type_void_p+set}" = set; then
4378 echo $ECHO_N "(cached) $ECHO_C" >&6
4379else
4380 cat >conftest.$ac_ext <<_ACEOF
4381/* confdefs.h. */
4382_ACEOF
4383cat confdefs.h >>conftest.$ac_ext
4384cat >>conftest.$ac_ext <<_ACEOF
4385/* end confdefs.h. */
4386$ac_includes_default
4387int
4388main ()
4389{
b61ff9c8 4390if ((void * *) 0)
bf3b7cd3 4391 return 0;
b61ff9c8 4392if (sizeof (void *))
bf3b7cd3
JD
4393 return 0;
4394 ;
4395 return 0;
4396}
4397_ACEOF
4398rm -f conftest.$ac_objext
b61ff9c8
BS
4399if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4400 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4401 ac_status=$?
4402 grep -v '^ *+' conftest.er1 >conftest.err
4403 rm -f conftest.er1
4404 cat conftest.err >&5
4405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4406 (exit $ac_status); } &&
4407 { ac_try='test -z "$ac_c_werror_flag"
4408 || test ! -s conftest.err'
4409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4410 (eval $ac_try) 2>&5
4411 ac_status=$?
4412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4413 (exit $ac_status); }; } &&
4414 { ac_try='test -s conftest.$ac_objext'
4415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4416 (eval $ac_try) 2>&5
4417 ac_status=$?
4418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4419 (exit $ac_status); }; }; then
bf3b7cd3
JD
4420 ac_cv_type_void_p=yes
4421else
4422 echo "$as_me: failed program was:" >&5
4423sed 's/^/| /' conftest.$ac_ext >&5
4424
b61ff9c8 4425ac_cv_type_void_p=no
bf3b7cd3 4426fi
b61ff9c8 4427rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4428fi
b61ff9c8
BS
4429echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
4430echo "${ECHO_T}$ac_cv_type_void_p" >&6
bf3b7cd3 4431
b61ff9c8
BS
4432echo "$as_me:$LINENO: checking size of void *" >&5
4433echo $ECHO_N "checking size of void *... $ECHO_C" >&6
ba479fd2
NN
4434if test "${ac_cv_sizeof_void_p+set}" = set; then
4435 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 4436else
b61ff9c8
BS
4437 if test "$ac_cv_type_void_p" = yes; then
4438 # The cast to unsigned long works around a bug in the HP C Compiler
4439 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4440 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4441 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4442 if test "$cross_compiling" = yes; then
4443 # Depending upon the size, compute the lo and hi bounds.
4444cat >conftest.$ac_ext <<_ACEOF
4445/* confdefs.h. */
4446_ACEOF
4447cat confdefs.h >>conftest.$ac_ext
4448cat >>conftest.$ac_ext <<_ACEOF
4449/* end confdefs.h. */
4450$ac_includes_default
4451int
4452main ()
4453{
b61ff9c8 4454static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
bf3b7cd3
JD
4455test_array [0] = 0
4456
4457 ;
4458 return 0;
4459}
4460_ACEOF
4461rm -f conftest.$ac_objext
b61ff9c8
BS
4462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4463 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4464 ac_status=$?
4465 grep -v '^ *+' conftest.er1 >conftest.err
4466 rm -f conftest.er1
4467 cat conftest.err >&5
4468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4469 (exit $ac_status); } &&
4470 { ac_try='test -z "$ac_c_werror_flag"
4471 || test ! -s conftest.err'
4472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4473 (eval $ac_try) 2>&5
4474 ac_status=$?
4475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4476 (exit $ac_status); }; } &&
4477 { ac_try='test -s conftest.$ac_objext'
4478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4479 (eval $ac_try) 2>&5
4480 ac_status=$?
4481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4482 (exit $ac_status); }; }; then
bf3b7cd3
JD
4483 ac_lo=0 ac_mid=0
4484 while :; do
4485 cat >conftest.$ac_ext <<_ACEOF
4486/* confdefs.h. */
4487_ACEOF
4488cat confdefs.h >>conftest.$ac_ext
4489cat >>conftest.$ac_ext <<_ACEOF
4490/* end confdefs.h. */
4491$ac_includes_default
4492int
4493main ()
4494{
b61ff9c8 4495static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
4496test_array [0] = 0
4497
4498 ;
4499 return 0;
4500}
4501_ACEOF
4502rm -f conftest.$ac_objext
b61ff9c8
BS
4503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4504 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4505 ac_status=$?
4506 grep -v '^ *+' conftest.er1 >conftest.err
4507 rm -f conftest.er1
4508 cat conftest.err >&5
4509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4510 (exit $ac_status); } &&
4511 { ac_try='test -z "$ac_c_werror_flag"
4512 || test ! -s conftest.err'
4513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4514 (eval $ac_try) 2>&5
4515 ac_status=$?
4516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4517 (exit $ac_status); }; } &&
4518 { ac_try='test -s conftest.$ac_objext'
4519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4520 (eval $ac_try) 2>&5
4521 ac_status=$?
4522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4523 (exit $ac_status); }; }; then
bf3b7cd3
JD
4524 ac_hi=$ac_mid; break
4525else
4526 echo "$as_me: failed program was:" >&5
4527sed 's/^/| /' conftest.$ac_ext >&5
4528
b61ff9c8
BS
4529ac_lo=`expr $ac_mid + 1`
4530 if test $ac_lo -le $ac_mid; then
4531 ac_lo= ac_hi=
4532 break
4533 fi
4534 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4535fi
b61ff9c8 4536rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4537 done
4538else
4539 echo "$as_me: failed program was:" >&5
4540sed 's/^/| /' conftest.$ac_ext >&5
4541
b61ff9c8 4542cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4543/* confdefs.h. */
4544_ACEOF
4545cat confdefs.h >>conftest.$ac_ext
4546cat >>conftest.$ac_ext <<_ACEOF
4547/* end confdefs.h. */
4548$ac_includes_default
4549int
4550main ()
4551{
b61ff9c8 4552static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
bf3b7cd3
JD
4553test_array [0] = 0
4554
4555 ;
4556 return 0;
4557}
4558_ACEOF
4559rm -f conftest.$ac_objext
b61ff9c8
BS
4560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4561 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4562 ac_status=$?
4563 grep -v '^ *+' conftest.er1 >conftest.err
4564 rm -f conftest.er1
4565 cat conftest.err >&5
4566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4567 (exit $ac_status); } &&
4568 { ac_try='test -z "$ac_c_werror_flag"
4569 || test ! -s conftest.err'
4570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4571 (eval $ac_try) 2>&5
4572 ac_status=$?
4573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4574 (exit $ac_status); }; } &&
4575 { ac_try='test -s conftest.$ac_objext'
4576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4577 (eval $ac_try) 2>&5
4578 ac_status=$?
4579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4580 (exit $ac_status); }; }; then
bf3b7cd3
JD
4581 ac_hi=-1 ac_mid=-1
4582 while :; do
4583 cat >conftest.$ac_ext <<_ACEOF
4584/* confdefs.h. */
4585_ACEOF
4586cat confdefs.h >>conftest.$ac_ext
4587cat >>conftest.$ac_ext <<_ACEOF
4588/* end confdefs.h. */
4589$ac_includes_default
4590int
4591main ()
4592{
b61ff9c8 4593static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
bf3b7cd3
JD
4594test_array [0] = 0
4595
4596 ;
4597 return 0;
4598}
4599_ACEOF
4600rm -f conftest.$ac_objext
b61ff9c8
BS
4601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4602 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4603 ac_status=$?
4604 grep -v '^ *+' conftest.er1 >conftest.err
4605 rm -f conftest.er1
4606 cat conftest.err >&5
4607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4608 (exit $ac_status); } &&
4609 { ac_try='test -z "$ac_c_werror_flag"
4610 || test ! -s conftest.err'
4611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4612 (eval $ac_try) 2>&5
4613 ac_status=$?
4614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4615 (exit $ac_status); }; } &&
4616 { ac_try='test -s conftest.$ac_objext'
4617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4618 (eval $ac_try) 2>&5
4619 ac_status=$?
4620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4621 (exit $ac_status); }; }; then
bf3b7cd3
JD
4622 ac_lo=$ac_mid; break
4623else
4624 echo "$as_me: failed program was:" >&5
4625sed 's/^/| /' conftest.$ac_ext >&5
4626
b61ff9c8
BS
4627ac_hi=`expr '(' $ac_mid ')' - 1`
4628 if test $ac_mid -le $ac_hi; then
4629 ac_lo= ac_hi=
4630 break
4631 fi
4632 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4633fi
b61ff9c8 4634rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4635 done
4636else
4637 echo "$as_me: failed program was:" >&5
4638sed 's/^/| /' conftest.$ac_ext >&5
4639
b61ff9c8 4640ac_lo= ac_hi=
bf3b7cd3 4641fi
b61ff9c8 4642rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4643fi
b61ff9c8 4644rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4645# Binary search between lo and hi bounds.
4646while test "x$ac_lo" != "x$ac_hi"; do
4647 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4648 cat >conftest.$ac_ext <<_ACEOF
4649/* confdefs.h. */
4650_ACEOF
4651cat confdefs.h >>conftest.$ac_ext
4652cat >>conftest.$ac_ext <<_ACEOF
4653/* end confdefs.h. */
4654$ac_includes_default
4655int
4656main ()
4657{
b61ff9c8 4658static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
4659test_array [0] = 0
4660
4661 ;
4662 return 0;
4663}
4664_ACEOF
4665rm -f conftest.$ac_objext
b61ff9c8
BS
4666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4667 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4668 ac_status=$?
4669 grep -v '^ *+' conftest.er1 >conftest.err
4670 rm -f conftest.er1
4671 cat conftest.err >&5
4672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4673 (exit $ac_status); } &&
4674 { ac_try='test -z "$ac_c_werror_flag"
4675 || test ! -s conftest.err'
4676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4677 (eval $ac_try) 2>&5
4678 ac_status=$?
4679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4680 (exit $ac_status); }; } &&
4681 { ac_try='test -s conftest.$ac_objext'
4682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4683 (eval $ac_try) 2>&5
4684 ac_status=$?
4685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4686 (exit $ac_status); }; }; then
bf3b7cd3
JD
4687 ac_hi=$ac_mid
4688else
4689 echo "$as_me: failed program was:" >&5
4690sed 's/^/| /' conftest.$ac_ext >&5
4691
b61ff9c8 4692ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 4693fi
b61ff9c8 4694rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4695done
4696case $ac_lo in
4697?*) ac_cv_sizeof_void_p=$ac_lo;;
18c04407
RW
4698'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
4699echo "$as_me: error: in \`$ac_pwd':" >&2;}
4700{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 4701See \`config.log' for more details." >&5
b61ff9c8 4702echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 4703See \`config.log' for more details." >&2;}
18c04407 4704 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 4705esac
b61ff9c8
BS
4706else
4707 if test "$cross_compiling" = yes; then
18c04407
RW
4708 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
4709echo "$as_me: error: in \`$ac_pwd':" >&2;}
4710{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
4711See \`config.log' for more details." >&5
4712echo "$as_me: error: cannot run test program while cross compiling
4713See \`config.log' for more details." >&2;}
18c04407 4714 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
4715else
4716 cat >conftest.$ac_ext <<_ACEOF
4717/* confdefs.h. */
4718_ACEOF
4719cat confdefs.h >>conftest.$ac_ext
4720cat >>conftest.$ac_ext <<_ACEOF
4721/* end confdefs.h. */
4722$ac_includes_default
b61ff9c8
BS
4723long longval () { return (long) (sizeof (void *)); }
4724unsigned long ulongval () { return (long) (sizeof (void *)); }
bf3b7cd3
JD
4725#include <stdio.h>
4726#include <stdlib.h>
4727int
4728main ()
4729{
4730
4731 FILE *f = fopen ("conftest.val", "w");
4732 if (! f)
b61ff9c8
BS
4733 exit (1);
4734 if (((long) (sizeof (void *))) < 0)
bf3b7cd3 4735 {
b61ff9c8
BS
4736 long i = longval ();
4737 if (i != ((long) (sizeof (void *))))
4738 exit (1);
bf3b7cd3
JD
4739 fprintf (f, "%ld\n", i);
4740 }
4741 else
4742 {
b61ff9c8
BS
4743 unsigned long i = ulongval ();
4744 if (i != ((long) (sizeof (void *))))
4745 exit (1);
bf3b7cd3
JD
4746 fprintf (f, "%lu\n", i);
4747 }
b61ff9c8 4748 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
4749
4750 ;
4751 return 0;
4752}
4753_ACEOF
4754rm -f conftest$ac_exeext
b61ff9c8
BS
4755if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4756 (eval $ac_link) 2>&5
bf3b7cd3
JD
4757 ac_status=$?
4758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4759 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
4760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4761 (eval $ac_try) 2>&5
bf3b7cd3
JD
4762 ac_status=$?
4763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4764 (exit $ac_status); }; }; then
4765 ac_cv_sizeof_void_p=`cat conftest.val`
4766else
4767 echo "$as_me: program exited with status $ac_status" >&5
4768echo "$as_me: failed program was:" >&5
4769sed 's/^/| /' conftest.$ac_ext >&5
4770
4771( exit $ac_status )
18c04407
RW
4772{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
4773echo "$as_me: error: in \`$ac_pwd':" >&2;}
b61ff9c8 4774{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 4775See \`config.log' for more details." >&5
b61ff9c8 4776echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 4777See \`config.log' for more details." >&2;}
18c04407 4778 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
4779fi
4780rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4781fi
4782fi
4783rm -f conftest.val
b61ff9c8
BS
4784else
4785 ac_cv_sizeof_void_p=0
bf3b7cd3 4786fi
b61ff9c8
BS
4787fi
4788echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
4789echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
bf3b7cd3
JD
4790cat >>confdefs.h <<_ACEOF
4791#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4792_ACEOF
4793
4794
b61ff9c8
BS
4795echo "$as_me:$LINENO: checking for short" >&5
4796echo $ECHO_N "checking for short... $ECHO_C" >&6
bf3b7cd3
JD
4797if test "${ac_cv_type_short+set}" = set; then
4798 echo $ECHO_N "(cached) $ECHO_C" >&6
4799else
4800 cat >conftest.$ac_ext <<_ACEOF
4801/* confdefs.h. */
4802_ACEOF
4803cat confdefs.h >>conftest.$ac_ext
4804cat >>conftest.$ac_ext <<_ACEOF
4805/* end confdefs.h. */
4806$ac_includes_default
4807int
4808main ()
4809{
b61ff9c8 4810if ((short *) 0)
bf3b7cd3 4811 return 0;
b61ff9c8 4812if (sizeof (short))
bf3b7cd3
JD
4813 return 0;
4814 ;
4815 return 0;
4816}
4817_ACEOF
4818rm -f conftest.$ac_objext
b61ff9c8
BS
4819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4820 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4821 ac_status=$?
4822 grep -v '^ *+' conftest.er1 >conftest.err
4823 rm -f conftest.er1
4824 cat conftest.err >&5
4825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4826 (exit $ac_status); } &&
4827 { ac_try='test -z "$ac_c_werror_flag"
4828 || test ! -s conftest.err'
4829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4830 (eval $ac_try) 2>&5
4831 ac_status=$?
4832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4833 (exit $ac_status); }; } &&
4834 { ac_try='test -s conftest.$ac_objext'
4835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4836 (eval $ac_try) 2>&5
4837 ac_status=$?
4838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4839 (exit $ac_status); }; }; then
bf3b7cd3
JD
4840 ac_cv_type_short=yes
4841else
4842 echo "$as_me: failed program was:" >&5
4843sed 's/^/| /' conftest.$ac_ext >&5
4844
b61ff9c8 4845ac_cv_type_short=no
bf3b7cd3 4846fi
b61ff9c8 4847rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4848fi
b61ff9c8
BS
4849echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
4850echo "${ECHO_T}$ac_cv_type_short" >&6
bf3b7cd3 4851
b61ff9c8
BS
4852echo "$as_me:$LINENO: checking size of short" >&5
4853echo $ECHO_N "checking size of short... $ECHO_C" >&6
bf3b7cd3
JD
4854if test "${ac_cv_sizeof_short+set}" = set; then
4855 echo $ECHO_N "(cached) $ECHO_C" >&6
4856else
b61ff9c8
BS
4857 if test "$ac_cv_type_short" = yes; then
4858 # The cast to unsigned long works around a bug in the HP C Compiler
4859 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4860 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4861 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4862 if test "$cross_compiling" = yes; then
4863 # Depending upon the size, compute the lo and hi bounds.
4864cat >conftest.$ac_ext <<_ACEOF
4865/* confdefs.h. */
4866_ACEOF
4867cat confdefs.h >>conftest.$ac_ext
4868cat >>conftest.$ac_ext <<_ACEOF
4869/* end confdefs.h. */
4870$ac_includes_default
4871int
4872main ()
4873{
b61ff9c8 4874static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
bf3b7cd3
JD
4875test_array [0] = 0
4876
4877 ;
4878 return 0;
4879}
4880_ACEOF
4881rm -f conftest.$ac_objext
b61ff9c8
BS
4882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4883 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4884 ac_status=$?
4885 grep -v '^ *+' conftest.er1 >conftest.err
4886 rm -f conftest.er1
4887 cat conftest.err >&5
4888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4889 (exit $ac_status); } &&
4890 { ac_try='test -z "$ac_c_werror_flag"
4891 || test ! -s conftest.err'
4892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4893 (eval $ac_try) 2>&5
4894 ac_status=$?
4895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4896 (exit $ac_status); }; } &&
4897 { ac_try='test -s conftest.$ac_objext'
4898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4899 (eval $ac_try) 2>&5
4900 ac_status=$?
4901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4902 (exit $ac_status); }; }; then
bf3b7cd3
JD
4903 ac_lo=0 ac_mid=0
4904 while :; do
4905 cat >conftest.$ac_ext <<_ACEOF
4906/* confdefs.h. */
4907_ACEOF
4908cat confdefs.h >>conftest.$ac_ext
4909cat >>conftest.$ac_ext <<_ACEOF
4910/* end confdefs.h. */
4911$ac_includes_default
4912int
4913main ()
4914{
b61ff9c8 4915static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
4916test_array [0] = 0
4917
4918 ;
4919 return 0;
4920}
4921_ACEOF
4922rm -f conftest.$ac_objext
b61ff9c8
BS
4923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4924 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4925 ac_status=$?
4926 grep -v '^ *+' conftest.er1 >conftest.err
4927 rm -f conftest.er1
4928 cat conftest.err >&5
4929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4930 (exit $ac_status); } &&
4931 { ac_try='test -z "$ac_c_werror_flag"
4932 || test ! -s conftest.err'
4933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4934 (eval $ac_try) 2>&5
4935 ac_status=$?
4936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4937 (exit $ac_status); }; } &&
4938 { ac_try='test -s conftest.$ac_objext'
4939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4940 (eval $ac_try) 2>&5
4941 ac_status=$?
4942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4943 (exit $ac_status); }; }; then
bf3b7cd3
JD
4944 ac_hi=$ac_mid; break
4945else
4946 echo "$as_me: failed program was:" >&5
4947sed 's/^/| /' conftest.$ac_ext >&5
4948
b61ff9c8
BS
4949ac_lo=`expr $ac_mid + 1`
4950 if test $ac_lo -le $ac_mid; then
4951 ac_lo= ac_hi=
4952 break
4953 fi
4954 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4955fi
b61ff9c8 4956rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4957 done
4958else
4959 echo "$as_me: failed program was:" >&5
4960sed 's/^/| /' conftest.$ac_ext >&5
4961
b61ff9c8 4962cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4963/* confdefs.h. */
4964_ACEOF
4965cat confdefs.h >>conftest.$ac_ext
4966cat >>conftest.$ac_ext <<_ACEOF
4967/* end confdefs.h. */
4968$ac_includes_default
4969int
4970main ()
4971{
b61ff9c8 4972static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
bf3b7cd3
JD
4973test_array [0] = 0
4974
4975 ;
4976 return 0;
4977}
4978_ACEOF
4979rm -f conftest.$ac_objext
b61ff9c8
BS
4980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4981 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4982 ac_status=$?
4983 grep -v '^ *+' conftest.er1 >conftest.err
4984 rm -f conftest.er1
4985 cat conftest.err >&5
4986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4987 (exit $ac_status); } &&
4988 { ac_try='test -z "$ac_c_werror_flag"
4989 || test ! -s conftest.err'
4990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4991 (eval $ac_try) 2>&5
4992 ac_status=$?
4993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4994 (exit $ac_status); }; } &&
4995 { ac_try='test -s conftest.$ac_objext'
4996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4997 (eval $ac_try) 2>&5
4998 ac_status=$?
4999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5000 (exit $ac_status); }; }; then
bf3b7cd3
JD
5001 ac_hi=-1 ac_mid=-1
5002 while :; do
5003 cat >conftest.$ac_ext <<_ACEOF
5004/* confdefs.h. */
5005_ACEOF
5006cat confdefs.h >>conftest.$ac_ext
5007cat >>conftest.$ac_ext <<_ACEOF
5008/* end confdefs.h. */
5009$ac_includes_default
5010int
5011main ()
5012{
b61ff9c8 5013static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
bf3b7cd3
JD
5014test_array [0] = 0
5015
5016 ;
5017 return 0;
5018}
5019_ACEOF
5020rm -f conftest.$ac_objext
b61ff9c8
BS
5021if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5022 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5023 ac_status=$?
5024 grep -v '^ *+' conftest.er1 >conftest.err
5025 rm -f conftest.er1
5026 cat conftest.err >&5
5027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5028 (exit $ac_status); } &&
5029 { ac_try='test -z "$ac_c_werror_flag"
5030 || test ! -s conftest.err'
5031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5032 (eval $ac_try) 2>&5
5033 ac_status=$?
5034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5035 (exit $ac_status); }; } &&
5036 { ac_try='test -s conftest.$ac_objext'
5037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5038 (eval $ac_try) 2>&5
5039 ac_status=$?
5040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5041 (exit $ac_status); }; }; then
bf3b7cd3
JD
5042 ac_lo=$ac_mid; break
5043else
5044 echo "$as_me: failed program was:" >&5
5045sed 's/^/| /' conftest.$ac_ext >&5
5046
b61ff9c8
BS
5047ac_hi=`expr '(' $ac_mid ')' - 1`
5048 if test $ac_mid -le $ac_hi; then
5049 ac_lo= ac_hi=
5050 break
5051 fi
5052 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5053fi
b61ff9c8 5054rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5055 done
5056else
5057 echo "$as_me: failed program was:" >&5
5058sed 's/^/| /' conftest.$ac_ext >&5
5059
b61ff9c8 5060ac_lo= ac_hi=
bf3b7cd3 5061fi
b61ff9c8 5062rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5063fi
b61ff9c8 5064rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5065# Binary search between lo and hi bounds.
5066while test "x$ac_lo" != "x$ac_hi"; do
5067 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5068 cat >conftest.$ac_ext <<_ACEOF
5069/* confdefs.h. */
5070_ACEOF
5071cat confdefs.h >>conftest.$ac_ext
5072cat >>conftest.$ac_ext <<_ACEOF
5073/* end confdefs.h. */
5074$ac_includes_default
5075int
5076main ()
5077{
b61ff9c8 5078static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
5079test_array [0] = 0
5080
5081 ;
5082 return 0;
5083}
5084_ACEOF
5085rm -f conftest.$ac_objext
b61ff9c8
BS
5086if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5087 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5088 ac_status=$?
5089 grep -v '^ *+' conftest.er1 >conftest.err
5090 rm -f conftest.er1
5091 cat conftest.err >&5
5092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5093 (exit $ac_status); } &&
5094 { ac_try='test -z "$ac_c_werror_flag"
5095 || test ! -s conftest.err'
5096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5097 (eval $ac_try) 2>&5
5098 ac_status=$?
5099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5100 (exit $ac_status); }; } &&
5101 { ac_try='test -s conftest.$ac_objext'
5102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5103 (eval $ac_try) 2>&5
5104 ac_status=$?
5105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5106 (exit $ac_status); }; }; then
bf3b7cd3
JD
5107 ac_hi=$ac_mid
5108else
5109 echo "$as_me: failed program was:" >&5
5110sed 's/^/| /' conftest.$ac_ext >&5
5111
b61ff9c8 5112ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5113fi
b61ff9c8 5114rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5115done
5116case $ac_lo in
5117?*) ac_cv_sizeof_short=$ac_lo;;
18c04407
RW
5118'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5119echo "$as_me: error: in \`$ac_pwd':" >&2;}
5120{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 5121See \`config.log' for more details." >&5
b61ff9c8 5122echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 5123See \`config.log' for more details." >&2;}
18c04407 5124 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 5125esac
b61ff9c8
BS
5126else
5127 if test "$cross_compiling" = yes; then
18c04407
RW
5128 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5129echo "$as_me: error: in \`$ac_pwd':" >&2;}
5130{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
5131See \`config.log' for more details." >&5
5132echo "$as_me: error: cannot run test program while cross compiling
5133See \`config.log' for more details." >&2;}
18c04407 5134 { (exit 1); exit 1; }; }; }
8b1f719a
PB
5135else
5136 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5137/* confdefs.h. */
5138_ACEOF
5139cat confdefs.h >>conftest.$ac_ext
5140cat >>conftest.$ac_ext <<_ACEOF
5141/* end confdefs.h. */
5142$ac_includes_default
b61ff9c8
BS
5143long longval () { return (long) (sizeof (short)); }
5144unsigned long ulongval () { return (long) (sizeof (short)); }
bf3b7cd3
JD
5145#include <stdio.h>
5146#include <stdlib.h>
5147int
5148main ()
5149{
5150
5151 FILE *f = fopen ("conftest.val", "w");
5152 if (! f)
b61ff9c8
BS
5153 exit (1);
5154 if (((long) (sizeof (short))) < 0)
bf3b7cd3 5155 {
b61ff9c8
BS
5156 long i = longval ();
5157 if (i != ((long) (sizeof (short))))
5158 exit (1);
bf3b7cd3
JD
5159 fprintf (f, "%ld\n", i);
5160 }
5161 else
5162 {
b61ff9c8
BS
5163 unsigned long i = ulongval ();
5164 if (i != ((long) (sizeof (short))))
5165 exit (1);
bf3b7cd3
JD
5166 fprintf (f, "%lu\n", i);
5167 }
b61ff9c8 5168 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5169
5170 ;
5171 return 0;
5172}
5173_ACEOF
5174rm -f conftest$ac_exeext
b61ff9c8
BS
5175if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5176 (eval $ac_link) 2>&5
bf3b7cd3
JD
5177 ac_status=$?
5178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5179 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5181 (eval $ac_try) 2>&5
bf3b7cd3
JD
5182 ac_status=$?
5183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5184 (exit $ac_status); }; }; then
5185 ac_cv_sizeof_short=`cat conftest.val`
5186else
5187 echo "$as_me: program exited with status $ac_status" >&5
5188echo "$as_me: failed program was:" >&5
5189sed 's/^/| /' conftest.$ac_ext >&5
5190
5191( exit $ac_status )
18c04407
RW
5192{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5193echo "$as_me: error: in \`$ac_pwd':" >&2;}
b61ff9c8 5194{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 5195See \`config.log' for more details." >&5
b61ff9c8 5196echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 5197See \`config.log' for more details." >&2;}
18c04407 5198 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
5199fi
5200rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5201fi
5202fi
5203rm -f conftest.val
b61ff9c8
BS
5204else
5205 ac_cv_sizeof_short=0
bf3b7cd3 5206fi
b61ff9c8
BS
5207fi
5208echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
5209echo "${ECHO_T}$ac_cv_sizeof_short" >&6
bf3b7cd3
JD
5210cat >>confdefs.h <<_ACEOF
5211#define SIZEOF_SHORT $ac_cv_sizeof_short
5212_ACEOF
5213
5214
b61ff9c8
BS
5215echo "$as_me:$LINENO: checking for int" >&5
5216echo $ECHO_N "checking for int... $ECHO_C" >&6
bf3b7cd3
JD
5217if test "${ac_cv_type_int+set}" = set; then
5218 echo $ECHO_N "(cached) $ECHO_C" >&6
5219else
5220 cat >conftest.$ac_ext <<_ACEOF
5221/* confdefs.h. */
5222_ACEOF
5223cat confdefs.h >>conftest.$ac_ext
5224cat >>conftest.$ac_ext <<_ACEOF
5225/* end confdefs.h. */
5226$ac_includes_default
5227int
5228main ()
5229{
b61ff9c8 5230if ((int *) 0)
bf3b7cd3 5231 return 0;
b61ff9c8 5232if (sizeof (int))
bf3b7cd3
JD
5233 return 0;
5234 ;
5235 return 0;
5236}
5237_ACEOF
5238rm -f conftest.$ac_objext
b61ff9c8
BS
5239if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5240 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5241 ac_status=$?
5242 grep -v '^ *+' conftest.er1 >conftest.err
5243 rm -f conftest.er1
5244 cat conftest.err >&5
5245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5246 (exit $ac_status); } &&
5247 { ac_try='test -z "$ac_c_werror_flag"
5248 || test ! -s conftest.err'
5249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5250 (eval $ac_try) 2>&5
5251 ac_status=$?
5252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5253 (exit $ac_status); }; } &&
5254 { ac_try='test -s conftest.$ac_objext'
5255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5256 (eval $ac_try) 2>&5
5257 ac_status=$?
5258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5259 (exit $ac_status); }; }; then
bf3b7cd3
JD
5260 ac_cv_type_int=yes
5261else
5262 echo "$as_me: failed program was:" >&5
5263sed 's/^/| /' conftest.$ac_ext >&5
5264
b61ff9c8 5265ac_cv_type_int=no
bf3b7cd3 5266fi
b61ff9c8 5267rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5268fi
b61ff9c8
BS
5269echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5270echo "${ECHO_T}$ac_cv_type_int" >&6
bf3b7cd3 5271
b61ff9c8
BS
5272echo "$as_me:$LINENO: checking size of int" >&5
5273echo $ECHO_N "checking size of int... $ECHO_C" >&6
bf3b7cd3
JD
5274if test "${ac_cv_sizeof_int+set}" = set; then
5275 echo $ECHO_N "(cached) $ECHO_C" >&6
5276else
b61ff9c8
BS
5277 if test "$ac_cv_type_int" = yes; then
5278 # The cast to unsigned long works around a bug in the HP C Compiler
5279 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5280 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5281 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5282 if test "$cross_compiling" = yes; then
5283 # Depending upon the size, compute the lo and hi bounds.
5284cat >conftest.$ac_ext <<_ACEOF
5285/* confdefs.h. */
5286_ACEOF
5287cat confdefs.h >>conftest.$ac_ext
5288cat >>conftest.$ac_ext <<_ACEOF
5289/* end confdefs.h. */
5290$ac_includes_default
5291int
5292main ()
5293{
b61ff9c8 5294static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
bf3b7cd3
JD
5295test_array [0] = 0
5296
5297 ;
5298 return 0;
5299}
5300_ACEOF
5301rm -f conftest.$ac_objext
b61ff9c8
BS
5302if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5303 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5304 ac_status=$?
5305 grep -v '^ *+' conftest.er1 >conftest.err
5306 rm -f conftest.er1
5307 cat conftest.err >&5
5308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5309 (exit $ac_status); } &&
5310 { ac_try='test -z "$ac_c_werror_flag"
5311 || test ! -s conftest.err'
5312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5313 (eval $ac_try) 2>&5
5314 ac_status=$?
5315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5316 (exit $ac_status); }; } &&
5317 { ac_try='test -s conftest.$ac_objext'
5318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5319 (eval $ac_try) 2>&5
5320 ac_status=$?
5321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5322 (exit $ac_status); }; }; then
bf3b7cd3
JD
5323 ac_lo=0 ac_mid=0
5324 while :; do
5325 cat >conftest.$ac_ext <<_ACEOF
5326/* confdefs.h. */
5327_ACEOF
5328cat confdefs.h >>conftest.$ac_ext
5329cat >>conftest.$ac_ext <<_ACEOF
5330/* end confdefs.h. */
5331$ac_includes_default
5332int
5333main ()
5334{
b61ff9c8 5335static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
5336test_array [0] = 0
5337
5338 ;
5339 return 0;
5340}
5341_ACEOF
5342rm -f conftest.$ac_objext
b61ff9c8
BS
5343if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5344 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5345 ac_status=$?
5346 grep -v '^ *+' conftest.er1 >conftest.err
5347 rm -f conftest.er1
5348 cat conftest.err >&5
5349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5350 (exit $ac_status); } &&
5351 { ac_try='test -z "$ac_c_werror_flag"
5352 || test ! -s conftest.err'
5353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5354 (eval $ac_try) 2>&5
5355 ac_status=$?
5356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5357 (exit $ac_status); }; } &&
5358 { ac_try='test -s conftest.$ac_objext'
5359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5360 (eval $ac_try) 2>&5
5361 ac_status=$?
5362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5363 (exit $ac_status); }; }; then
bf3b7cd3
JD
5364 ac_hi=$ac_mid; break
5365else
5366 echo "$as_me: failed program was:" >&5
5367sed 's/^/| /' conftest.$ac_ext >&5
5368
b61ff9c8
BS
5369ac_lo=`expr $ac_mid + 1`
5370 if test $ac_lo -le $ac_mid; then
5371 ac_lo= ac_hi=
5372 break
5373 fi
5374 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 5375fi
b61ff9c8 5376rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5377 done
5378else
5379 echo "$as_me: failed program was:" >&5
5380sed 's/^/| /' conftest.$ac_ext >&5
5381
b61ff9c8 5382cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5383/* confdefs.h. */
5384_ACEOF
5385cat confdefs.h >>conftest.$ac_ext
5386cat >>conftest.$ac_ext <<_ACEOF
5387/* end confdefs.h. */
5388$ac_includes_default
5389int
5390main ()
5391{
b61ff9c8 5392static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
bf3b7cd3
JD
5393test_array [0] = 0
5394
5395 ;
5396 return 0;
5397}
5398_ACEOF
5399rm -f conftest.$ac_objext
b61ff9c8
BS
5400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5401 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5402 ac_status=$?
5403 grep -v '^ *+' conftest.er1 >conftest.err
5404 rm -f conftest.er1
5405 cat conftest.err >&5
5406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5407 (exit $ac_status); } &&
5408 { ac_try='test -z "$ac_c_werror_flag"
5409 || test ! -s conftest.err'
5410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5411 (eval $ac_try) 2>&5
5412 ac_status=$?
5413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5414 (exit $ac_status); }; } &&
5415 { ac_try='test -s conftest.$ac_objext'
5416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5417 (eval $ac_try) 2>&5
5418 ac_status=$?
5419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5420 (exit $ac_status); }; }; then
bf3b7cd3
JD
5421 ac_hi=-1 ac_mid=-1
5422 while :; do
5423 cat >conftest.$ac_ext <<_ACEOF
5424/* confdefs.h. */
5425_ACEOF
5426cat confdefs.h >>conftest.$ac_ext
5427cat >>conftest.$ac_ext <<_ACEOF
5428/* end confdefs.h. */
5429$ac_includes_default
5430int
5431main ()
5432{
b61ff9c8 5433static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
bf3b7cd3
JD
5434test_array [0] = 0
5435
5436 ;
5437 return 0;
5438}
5439_ACEOF
5440rm -f conftest.$ac_objext
b61ff9c8
BS
5441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5442 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5443 ac_status=$?
5444 grep -v '^ *+' conftest.er1 >conftest.err
5445 rm -f conftest.er1
5446 cat conftest.err >&5
5447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5448 (exit $ac_status); } &&
5449 { ac_try='test -z "$ac_c_werror_flag"
5450 || test ! -s conftest.err'
5451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5452 (eval $ac_try) 2>&5
5453 ac_status=$?
5454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5455 (exit $ac_status); }; } &&
5456 { ac_try='test -s conftest.$ac_objext'
5457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5458 (eval $ac_try) 2>&5
5459 ac_status=$?
5460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5461 (exit $ac_status); }; }; then
bf3b7cd3
JD
5462 ac_lo=$ac_mid; break
5463else
5464 echo "$as_me: failed program was:" >&5
5465sed 's/^/| /' conftest.$ac_ext >&5
5466
b61ff9c8
BS
5467ac_hi=`expr '(' $ac_mid ')' - 1`
5468 if test $ac_mid -le $ac_hi; then
5469 ac_lo= ac_hi=
5470 break
5471 fi
5472 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5473fi
b61ff9c8 5474rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5475 done
5476else
5477 echo "$as_me: failed program was:" >&5
5478sed 's/^/| /' conftest.$ac_ext >&5
5479
b61ff9c8 5480ac_lo= ac_hi=
bf3b7cd3 5481fi
b61ff9c8 5482rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5483fi
b61ff9c8 5484rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5485# Binary search between lo and hi bounds.
5486while test "x$ac_lo" != "x$ac_hi"; do
5487 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5488 cat >conftest.$ac_ext <<_ACEOF
5489/* confdefs.h. */
5490_ACEOF
5491cat confdefs.h >>conftest.$ac_ext
5492cat >>conftest.$ac_ext <<_ACEOF
5493/* end confdefs.h. */
5494$ac_includes_default
5495int
5496main ()
5497{
b61ff9c8 5498static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
5499test_array [0] = 0
5500
5501 ;
5502 return 0;
5503}
5504_ACEOF
5505rm -f conftest.$ac_objext
b61ff9c8
BS
5506if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5507 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5508 ac_status=$?
5509 grep -v '^ *+' conftest.er1 >conftest.err
5510 rm -f conftest.er1
5511 cat conftest.err >&5
5512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5513 (exit $ac_status); } &&
5514 { ac_try='test -z "$ac_c_werror_flag"
5515 || test ! -s conftest.err'
5516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5517 (eval $ac_try) 2>&5
5518 ac_status=$?
5519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5520 (exit $ac_status); }; } &&
5521 { ac_try='test -s conftest.$ac_objext'
5522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5523 (eval $ac_try) 2>&5
5524 ac_status=$?
5525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5526 (exit $ac_status); }; }; then
bf3b7cd3
JD
5527 ac_hi=$ac_mid
5528else
5529 echo "$as_me: failed program was:" >&5
5530sed 's/^/| /' conftest.$ac_ext >&5
5531
b61ff9c8 5532ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5533fi
b61ff9c8 5534rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5535done
5536case $ac_lo in
5537?*) ac_cv_sizeof_int=$ac_lo;;
18c04407
RW
5538'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5539echo "$as_me: error: in \`$ac_pwd':" >&2;}
5540{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 5541See \`config.log' for more details." >&5
b61ff9c8 5542echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 5543See \`config.log' for more details." >&2;}
18c04407 5544 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 5545esac
b61ff9c8
BS
5546else
5547 if test "$cross_compiling" = yes; then
18c04407
RW
5548 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5549echo "$as_me: error: in \`$ac_pwd':" >&2;}
5550{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
5551See \`config.log' for more details." >&5
5552echo "$as_me: error: cannot run test program while cross compiling
5553See \`config.log' for more details." >&2;}
18c04407 5554 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
5555else
5556 cat >conftest.$ac_ext <<_ACEOF
5557/* confdefs.h. */
5558_ACEOF
5559cat confdefs.h >>conftest.$ac_ext
5560cat >>conftest.$ac_ext <<_ACEOF
5561/* end confdefs.h. */
5562$ac_includes_default
b61ff9c8
BS
5563long longval () { return (long) (sizeof (int)); }
5564unsigned long ulongval () { return (long) (sizeof (int)); }
bf3b7cd3
JD
5565#include <stdio.h>
5566#include <stdlib.h>
5567int
5568main ()
5569{
5570
5571 FILE *f = fopen ("conftest.val", "w");
5572 if (! f)
b61ff9c8
BS
5573 exit (1);
5574 if (((long) (sizeof (int))) < 0)
bf3b7cd3 5575 {
b61ff9c8
BS
5576 long i = longval ();
5577 if (i != ((long) (sizeof (int))))
5578 exit (1);
bf3b7cd3
JD
5579 fprintf (f, "%ld\n", i);
5580 }
5581 else
5582 {
b61ff9c8
BS
5583 unsigned long i = ulongval ();
5584 if (i != ((long) (sizeof (int))))
5585 exit (1);
bf3b7cd3
JD
5586 fprintf (f, "%lu\n", i);
5587 }
b61ff9c8 5588 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5589
5590 ;
5591 return 0;
5592}
5593_ACEOF
5594rm -f conftest$ac_exeext
b61ff9c8
BS
5595if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5596 (eval $ac_link) 2>&5
bf3b7cd3
JD
5597 ac_status=$?
5598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5599 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5601 (eval $ac_try) 2>&5
bf3b7cd3
JD
5602 ac_status=$?
5603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5604 (exit $ac_status); }; }; then
5605 ac_cv_sizeof_int=`cat conftest.val`
5606else
5607 echo "$as_me: program exited with status $ac_status" >&5
5608echo "$as_me: failed program was:" >&5
5609sed 's/^/| /' conftest.$ac_ext >&5
5610
5611( exit $ac_status )
18c04407
RW
5612{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5613echo "$as_me: error: in \`$ac_pwd':" >&2;}
b61ff9c8 5614{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 5615See \`config.log' for more details." >&5
b61ff9c8 5616echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 5617See \`config.log' for more details." >&2;}
18c04407 5618 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
5619fi
5620rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5621fi
5622fi
5623rm -f conftest.val
b61ff9c8
BS
5624else
5625 ac_cv_sizeof_int=0
bf3b7cd3 5626fi
b61ff9c8
BS
5627fi
5628echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5629echo "${ECHO_T}$ac_cv_sizeof_int" >&6
bf3b7cd3
JD
5630cat >>confdefs.h <<_ACEOF
5631#define SIZEOF_INT $ac_cv_sizeof_int
5632_ACEOF
5633
5634
b61ff9c8
BS
5635echo "$as_me:$LINENO: checking for long" >&5
5636echo $ECHO_N "checking for long... $ECHO_C" >&6
bf3b7cd3
JD
5637if test "${ac_cv_type_long+set}" = set; then
5638 echo $ECHO_N "(cached) $ECHO_C" >&6
5639else
5640 cat >conftest.$ac_ext <<_ACEOF
5641/* confdefs.h. */
5642_ACEOF
5643cat confdefs.h >>conftest.$ac_ext
5644cat >>conftest.$ac_ext <<_ACEOF
5645/* end confdefs.h. */
5646$ac_includes_default
5647int
5648main ()
5649{
b61ff9c8 5650if ((long *) 0)
bf3b7cd3 5651 return 0;
b61ff9c8 5652if (sizeof (long))
bf3b7cd3
JD
5653 return 0;
5654 ;
5655 return 0;
5656}
5657_ACEOF
5658rm -f conftest.$ac_objext
b61ff9c8
BS
5659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5660 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5661 ac_status=$?
5662 grep -v '^ *+' conftest.er1 >conftest.err
5663 rm -f conftest.er1
5664 cat conftest.err >&5
5665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5666 (exit $ac_status); } &&
5667 { ac_try='test -z "$ac_c_werror_flag"
5668 || test ! -s conftest.err'
5669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5670 (eval $ac_try) 2>&5
5671 ac_status=$?
5672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5673 (exit $ac_status); }; } &&
5674 { ac_try='test -s conftest.$ac_objext'
5675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5676 (eval $ac_try) 2>&5
5677 ac_status=$?
5678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5679 (exit $ac_status); }; }; then
bf3b7cd3
JD
5680 ac_cv_type_long=yes
5681else
5682 echo "$as_me: failed program was:" >&5
5683sed 's/^/| /' conftest.$ac_ext >&5
5684
b61ff9c8 5685ac_cv_type_long=no
bf3b7cd3 5686fi
b61ff9c8 5687rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5688fi
b61ff9c8
BS
5689echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5690echo "${ECHO_T}$ac_cv_type_long" >&6
bf3b7cd3 5691
b61ff9c8
BS
5692echo "$as_me:$LINENO: checking size of long" >&5
5693echo $ECHO_N "checking size of long... $ECHO_C" >&6
bf3b7cd3
JD
5694if test "${ac_cv_sizeof_long+set}" = set; then
5695 echo $ECHO_N "(cached) $ECHO_C" >&6
5696else
b61ff9c8
BS
5697 if test "$ac_cv_type_long" = yes; then
5698 # The cast to unsigned long works around a bug in the HP C Compiler
5699 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5700 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5701 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5702 if test "$cross_compiling" = yes; then
5703 # Depending upon the size, compute the lo and hi bounds.
5704cat >conftest.$ac_ext <<_ACEOF
5705/* confdefs.h. */
5706_ACEOF
5707cat confdefs.h >>conftest.$ac_ext
5708cat >>conftest.$ac_ext <<_ACEOF
5709/* end confdefs.h. */
5710$ac_includes_default
5711int
5712main ()
5713{
b61ff9c8 5714static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
bf3b7cd3
JD
5715test_array [0] = 0
5716
5717 ;
5718 return 0;
5719}
5720_ACEOF
5721rm -f conftest.$ac_objext
b61ff9c8
BS
5722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5723 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5724 ac_status=$?
5725 grep -v '^ *+' conftest.er1 >conftest.err
5726 rm -f conftest.er1
5727 cat conftest.err >&5
5728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5729 (exit $ac_status); } &&
5730 { ac_try='test -z "$ac_c_werror_flag"
5731 || test ! -s conftest.err'
5732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5733 (eval $ac_try) 2>&5
5734 ac_status=$?
5735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5736 (exit $ac_status); }; } &&
5737 { ac_try='test -s conftest.$ac_objext'
5738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5739 (eval $ac_try) 2>&5
5740 ac_status=$?
5741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5742 (exit $ac_status); }; }; then
bf3b7cd3
JD
5743 ac_lo=0 ac_mid=0
5744 while :; do
5745 cat >conftest.$ac_ext <<_ACEOF
5746/* confdefs.h. */
5747_ACEOF
5748cat confdefs.h >>conftest.$ac_ext
5749cat >>conftest.$ac_ext <<_ACEOF
5750/* end confdefs.h. */
5751$ac_includes_default
5752int
5753main ()
5754{
b61ff9c8 5755static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
5756test_array [0] = 0
5757
5758 ;
5759 return 0;
5760}
5761_ACEOF
5762rm -f conftest.$ac_objext
b61ff9c8
BS
5763if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5764 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5765 ac_status=$?
5766 grep -v '^ *+' conftest.er1 >conftest.err
5767 rm -f conftest.er1
5768 cat conftest.err >&5
5769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5770 (exit $ac_status); } &&
5771 { ac_try='test -z "$ac_c_werror_flag"
5772 || test ! -s conftest.err'
5773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5774 (eval $ac_try) 2>&5
5775 ac_status=$?
5776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5777 (exit $ac_status); }; } &&
5778 { ac_try='test -s conftest.$ac_objext'
5779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5780 (eval $ac_try) 2>&5
5781 ac_status=$?
5782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5783 (exit $ac_status); }; }; then
bf3b7cd3
JD
5784 ac_hi=$ac_mid; break
5785else
5786 echo "$as_me: failed program was:" >&5
5787sed 's/^/| /' conftest.$ac_ext >&5
5788
b61ff9c8
BS
5789ac_lo=`expr $ac_mid + 1`
5790 if test $ac_lo -le $ac_mid; then
5791 ac_lo= ac_hi=
5792 break
5793 fi
5794 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 5795fi
b61ff9c8 5796rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5797 done
5798else
5799 echo "$as_me: failed program was:" >&5
5800sed 's/^/| /' conftest.$ac_ext >&5
5801
b61ff9c8 5802cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5803/* confdefs.h. */
5804_ACEOF
5805cat confdefs.h >>conftest.$ac_ext
5806cat >>conftest.$ac_ext <<_ACEOF
5807/* end confdefs.h. */
5808$ac_includes_default
5809int
5810main ()
5811{
b61ff9c8 5812static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
bf3b7cd3
JD
5813test_array [0] = 0
5814
5815 ;
5816 return 0;
5817}
5818_ACEOF
5819rm -f conftest.$ac_objext
b61ff9c8
BS
5820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5821 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5822 ac_status=$?
5823 grep -v '^ *+' conftest.er1 >conftest.err
5824 rm -f conftest.er1
5825 cat conftest.err >&5
5826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5827 (exit $ac_status); } &&
5828 { ac_try='test -z "$ac_c_werror_flag"
5829 || test ! -s conftest.err'
5830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5831 (eval $ac_try) 2>&5
5832 ac_status=$?
5833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5834 (exit $ac_status); }; } &&
5835 { ac_try='test -s conftest.$ac_objext'
5836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5837 (eval $ac_try) 2>&5
5838 ac_status=$?
5839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5840 (exit $ac_status); }; }; then
bf3b7cd3
JD
5841 ac_hi=-1 ac_mid=-1
5842 while :; do
5843 cat >conftest.$ac_ext <<_ACEOF
5844/* confdefs.h. */
5845_ACEOF
5846cat confdefs.h >>conftest.$ac_ext
5847cat >>conftest.$ac_ext <<_ACEOF
5848/* end confdefs.h. */
5849$ac_includes_default
5850int
5851main ()
5852{
b61ff9c8 5853static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
bf3b7cd3
JD
5854test_array [0] = 0
5855
5856 ;
5857 return 0;
5858}
5859_ACEOF
5860rm -f conftest.$ac_objext
b61ff9c8
BS
5861if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5862 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5863 ac_status=$?
5864 grep -v '^ *+' conftest.er1 >conftest.err
5865 rm -f conftest.er1
5866 cat conftest.err >&5
5867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5868 (exit $ac_status); } &&
5869 { ac_try='test -z "$ac_c_werror_flag"
5870 || test ! -s conftest.err'
5871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5872 (eval $ac_try) 2>&5
5873 ac_status=$?
5874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5875 (exit $ac_status); }; } &&
5876 { ac_try='test -s conftest.$ac_objext'
5877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5878 (eval $ac_try) 2>&5
5879 ac_status=$?
5880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5881 (exit $ac_status); }; }; then
bf3b7cd3
JD
5882 ac_lo=$ac_mid; break
5883else
5884 echo "$as_me: failed program was:" >&5
5885sed 's/^/| /' conftest.$ac_ext >&5
5886
b61ff9c8
BS
5887ac_hi=`expr '(' $ac_mid ')' - 1`
5888 if test $ac_mid -le $ac_hi; then
5889 ac_lo= ac_hi=
5890 break
5891 fi
5892 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5893fi
b61ff9c8 5894rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5895 done
5896else
5897 echo "$as_me: failed program was:" >&5
5898sed 's/^/| /' conftest.$ac_ext >&5
5899
b61ff9c8 5900ac_lo= ac_hi=
bf3b7cd3 5901fi
b61ff9c8 5902rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5903fi
b61ff9c8 5904rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5905# Binary search between lo and hi bounds.
5906while test "x$ac_lo" != "x$ac_hi"; do
5907 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5908 cat >conftest.$ac_ext <<_ACEOF
5909/* confdefs.h. */
5910_ACEOF
5911cat confdefs.h >>conftest.$ac_ext
5912cat >>conftest.$ac_ext <<_ACEOF
5913/* end confdefs.h. */
5914$ac_includes_default
5915int
5916main ()
5917{
b61ff9c8 5918static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
5919test_array [0] = 0
5920
5921 ;
5922 return 0;
5923}
5924_ACEOF
5925rm -f conftest.$ac_objext
b61ff9c8
BS
5926if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5927 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5928 ac_status=$?
5929 grep -v '^ *+' conftest.er1 >conftest.err
5930 rm -f conftest.er1
5931 cat conftest.err >&5
5932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5933 (exit $ac_status); } &&
5934 { ac_try='test -z "$ac_c_werror_flag"
5935 || test ! -s conftest.err'
5936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5937 (eval $ac_try) 2>&5
5938 ac_status=$?
5939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5940 (exit $ac_status); }; } &&
5941 { ac_try='test -s conftest.$ac_objext'
5942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5943 (eval $ac_try) 2>&5
5944 ac_status=$?
5945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5946 (exit $ac_status); }; }; then
bf3b7cd3
JD
5947 ac_hi=$ac_mid
5948else
5949 echo "$as_me: failed program was:" >&5
5950sed 's/^/| /' conftest.$ac_ext >&5
5951
b61ff9c8 5952ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5953fi
b61ff9c8 5954rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5955done
5956case $ac_lo in
5957?*) ac_cv_sizeof_long=$ac_lo;;
18c04407
RW
5958'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5959echo "$as_me: error: in \`$ac_pwd':" >&2;}
5960{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 5961See \`config.log' for more details." >&5
b61ff9c8 5962echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 5963See \`config.log' for more details." >&2;}
18c04407 5964 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 5965esac
b61ff9c8
BS
5966else
5967 if test "$cross_compiling" = yes; then
18c04407
RW
5968 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5969echo "$as_me: error: in \`$ac_pwd':" >&2;}
5970{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
5971See \`config.log' for more details." >&5
5972echo "$as_me: error: cannot run test program while cross compiling
5973See \`config.log' for more details." >&2;}
18c04407 5974 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
5975else
5976 cat >conftest.$ac_ext <<_ACEOF
5977/* confdefs.h. */
5978_ACEOF
5979cat confdefs.h >>conftest.$ac_ext
5980cat >>conftest.$ac_ext <<_ACEOF
5981/* end confdefs.h. */
5982$ac_includes_default
b61ff9c8
BS
5983long longval () { return (long) (sizeof (long)); }
5984unsigned long ulongval () { return (long) (sizeof (long)); }
bf3b7cd3
JD
5985#include <stdio.h>
5986#include <stdlib.h>
5987int
5988main ()
5989{
5990
5991 FILE *f = fopen ("conftest.val", "w");
5992 if (! f)
b61ff9c8
BS
5993 exit (1);
5994 if (((long) (sizeof (long))) < 0)
bf3b7cd3 5995 {
b61ff9c8
BS
5996 long i = longval ();
5997 if (i != ((long) (sizeof (long))))
5998 exit (1);
bf3b7cd3
JD
5999 fprintf (f, "%ld\n", i);
6000 }
6001 else
6002 {
b61ff9c8
BS
6003 unsigned long i = ulongval ();
6004 if (i != ((long) (sizeof (long))))
6005 exit (1);
bf3b7cd3
JD
6006 fprintf (f, "%lu\n", i);
6007 }
b61ff9c8 6008 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6009
6010 ;
6011 return 0;
6012}
6013_ACEOF
6014rm -f conftest$ac_exeext
b61ff9c8
BS
6015if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6016 (eval $ac_link) 2>&5
bf3b7cd3
JD
6017 ac_status=$?
6018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6019 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
6020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6021 (eval $ac_try) 2>&5
bf3b7cd3
JD
6022 ac_status=$?
6023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6024 (exit $ac_status); }; }; then
6025 ac_cv_sizeof_long=`cat conftest.val`
6026else
6027 echo "$as_me: program exited with status $ac_status" >&5
6028echo "$as_me: failed program was:" >&5
6029sed 's/^/| /' conftest.$ac_ext >&5
6030
6031( exit $ac_status )
18c04407
RW
6032{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6033echo "$as_me: error: in \`$ac_pwd':" >&2;}
b61ff9c8 6034{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 6035See \`config.log' for more details." >&5
b61ff9c8 6036echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 6037See \`config.log' for more details." >&2;}
18c04407 6038 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
6039fi
6040rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6041fi
6042fi
6043rm -f conftest.val
b61ff9c8
BS
6044else
6045 ac_cv_sizeof_long=0
bf3b7cd3 6046fi
b61ff9c8
BS
6047fi
6048echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6049echo "${ECHO_T}$ac_cv_sizeof_long" >&6
bf3b7cd3
JD
6050cat >>confdefs.h <<_ACEOF
6051#define SIZEOF_LONG $ac_cv_sizeof_long
6052_ACEOF
6053
6054
b61ff9c8
BS
6055echo "$as_me:$LINENO: checking for long long" >&5
6056echo $ECHO_N "checking for long long... $ECHO_C" >&6
5ec1c5e6
KC
6057if test "${ac_cv_type_long_long+set}" = set; then
6058 echo $ECHO_N "(cached) $ECHO_C" >&6
6059else
6060 cat >conftest.$ac_ext <<_ACEOF
6061/* confdefs.h. */
6062_ACEOF
6063cat confdefs.h >>conftest.$ac_ext
6064cat >>conftest.$ac_ext <<_ACEOF
6065/* end confdefs.h. */
6066$ac_includes_default
6067int
6068main ()
6069{
b61ff9c8 6070if ((long long *) 0)
5ec1c5e6 6071 return 0;
b61ff9c8 6072if (sizeof (long long))
5ec1c5e6
KC
6073 return 0;
6074 ;
6075 return 0;
6076}
6077_ACEOF
6078rm -f conftest.$ac_objext
b61ff9c8
BS
6079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6080 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
6081 ac_status=$?
6082 grep -v '^ *+' conftest.er1 >conftest.err
6083 rm -f conftest.er1
6084 cat conftest.err >&5
6085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6086 (exit $ac_status); } &&
6087 { ac_try='test -z "$ac_c_werror_flag"
6088 || test ! -s conftest.err'
6089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6090 (eval $ac_try) 2>&5
6091 ac_status=$?
6092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093 (exit $ac_status); }; } &&
6094 { ac_try='test -s conftest.$ac_objext'
6095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6096 (eval $ac_try) 2>&5
6097 ac_status=$?
6098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6099 (exit $ac_status); }; }; then
5ec1c5e6
KC
6100 ac_cv_type_long_long=yes
6101else
6102 echo "$as_me: failed program was:" >&5
6103sed 's/^/| /' conftest.$ac_ext >&5
6104
b61ff9c8 6105ac_cv_type_long_long=no
5ec1c5e6 6106fi
b61ff9c8 6107rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 6108fi
b61ff9c8
BS
6109echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
6110echo "${ECHO_T}$ac_cv_type_long_long" >&6
5ec1c5e6
KC
6111if test $ac_cv_type_long_long = yes; then
6112
6113cat >>confdefs.h <<_ACEOF
6114#define HAVE_LONG_LONG 1
6115_ACEOF
6116
b61ff9c8
BS
6117echo "$as_me:$LINENO: checking for long long" >&5
6118echo $ECHO_N "checking for long long... $ECHO_C" >&6
bf3b7cd3
JD
6119if test "${ac_cv_type_long_long+set}" = set; then
6120 echo $ECHO_N "(cached) $ECHO_C" >&6
6121else
6122 cat >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 6132if ((long long *) 0)
bf3b7cd3 6133 return 0;
b61ff9c8 6134if (sizeof (long long))
bf3b7cd3
JD
6135 return 0;
6136 ;
6137 return 0;
6138}
6139_ACEOF
6140rm -f conftest.$ac_objext
b61ff9c8
BS
6141if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6142 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6143 ac_status=$?
6144 grep -v '^ *+' conftest.er1 >conftest.err
6145 rm -f conftest.er1
6146 cat conftest.err >&5
6147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6148 (exit $ac_status); } &&
6149 { ac_try='test -z "$ac_c_werror_flag"
6150 || test ! -s conftest.err'
6151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6152 (eval $ac_try) 2>&5
6153 ac_status=$?
6154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6155 (exit $ac_status); }; } &&
6156 { ac_try='test -s conftest.$ac_objext'
6157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6158 (eval $ac_try) 2>&5
6159 ac_status=$?
6160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6161 (exit $ac_status); }; }; then
6162 ac_cv_type_long_long=yes
6163else
bf3b7cd3
JD
6164 echo "$as_me: failed program was:" >&5
6165sed 's/^/| /' conftest.$ac_ext >&5
6166
b61ff9c8 6167ac_cv_type_long_long=no
bf3b7cd3 6168fi
b61ff9c8 6169rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6170fi
b61ff9c8
BS
6171echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
6172echo "${ECHO_T}$ac_cv_type_long_long" >&6
bf3b7cd3 6173
b61ff9c8
BS
6174echo "$as_me:$LINENO: checking size of long long" >&5
6175echo $ECHO_N "checking size of long long... $ECHO_C" >&6
bf3b7cd3
JD
6176if test "${ac_cv_sizeof_long_long+set}" = set; then
6177 echo $ECHO_N "(cached) $ECHO_C" >&6
6178else
b61ff9c8
BS
6179 if test "$ac_cv_type_long_long" = yes; then
6180 # The cast to unsigned long works around a bug in the HP C Compiler
6181 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6182 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6183 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
6184 if test "$cross_compiling" = yes; then
6185 # Depending upon the size, compute the lo and hi bounds.
6186cat >conftest.$ac_ext <<_ACEOF
6187/* confdefs.h. */
6188_ACEOF
6189cat confdefs.h >>conftest.$ac_ext
6190cat >>conftest.$ac_ext <<_ACEOF
6191/* end confdefs.h. */
6192$ac_includes_default
6193int
6194main ()
6195{
b61ff9c8 6196static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
bf3b7cd3
JD
6197test_array [0] = 0
6198
6199 ;
6200 return 0;
6201}
6202_ACEOF
6203rm -f conftest.$ac_objext
b61ff9c8
BS
6204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6205 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6206 ac_status=$?
6207 grep -v '^ *+' conftest.er1 >conftest.err
6208 rm -f conftest.er1
6209 cat conftest.err >&5
6210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6211 (exit $ac_status); } &&
6212 { ac_try='test -z "$ac_c_werror_flag"
6213 || test ! -s conftest.err'
6214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6215 (eval $ac_try) 2>&5
6216 ac_status=$?
6217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6218 (exit $ac_status); }; } &&
6219 { ac_try='test -s conftest.$ac_objext'
6220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6221 (eval $ac_try) 2>&5
6222 ac_status=$?
6223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6224 (exit $ac_status); }; }; then
bf3b7cd3
JD
6225 ac_lo=0 ac_mid=0
6226 while :; do
6227 cat >conftest.$ac_ext <<_ACEOF
6228/* confdefs.h. */
6229_ACEOF
6230cat confdefs.h >>conftest.$ac_ext
6231cat >>conftest.$ac_ext <<_ACEOF
6232/* end confdefs.h. */
6233$ac_includes_default
6234int
6235main ()
6236{
b61ff9c8 6237static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
6238test_array [0] = 0
6239
6240 ;
6241 return 0;
6242}
6243_ACEOF
6244rm -f conftest.$ac_objext
b61ff9c8
BS
6245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6246 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6247 ac_status=$?
6248 grep -v '^ *+' conftest.er1 >conftest.err
6249 rm -f conftest.er1
6250 cat conftest.err >&5
6251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6252 (exit $ac_status); } &&
6253 { ac_try='test -z "$ac_c_werror_flag"
6254 || test ! -s conftest.err'
6255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6256 (eval $ac_try) 2>&5
6257 ac_status=$?
6258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6259 (exit $ac_status); }; } &&
6260 { ac_try='test -s conftest.$ac_objext'
6261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6262 (eval $ac_try) 2>&5
6263 ac_status=$?
6264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6265 (exit $ac_status); }; }; then
8b1f719a 6266 ac_hi=$ac_mid; break
bf3b7cd3
JD
6267else
6268 echo "$as_me: failed program was:" >&5
6269sed 's/^/| /' conftest.$ac_ext >&5
6270
b61ff9c8
BS
6271ac_lo=`expr $ac_mid + 1`
6272 if test $ac_lo -le $ac_mid; then
6273 ac_lo= ac_hi=
6274 break
6275 fi
6276 ac_mid=`expr 2 '*' $ac_mid + 1`
8b1f719a 6277fi
b61ff9c8 6278rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8b1f719a
PB
6279 done
6280else
6281 echo "$as_me: failed program was:" >&5
6282sed 's/^/| /' conftest.$ac_ext >&5
6283
b61ff9c8 6284cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
6285/* confdefs.h. */
6286_ACEOF
6287cat confdefs.h >>conftest.$ac_ext
6288cat >>conftest.$ac_ext <<_ACEOF
6289/* end confdefs.h. */
6290$ac_includes_default
6291int
6292main ()
6293{
b61ff9c8 6294static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
bf3b7cd3
JD
6295test_array [0] = 0
6296
6297 ;
6298 return 0;
6299}
6300_ACEOF
6301rm -f conftest.$ac_objext
b61ff9c8
BS
6302if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6303 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6304 ac_status=$?
6305 grep -v '^ *+' conftest.er1 >conftest.err
6306 rm -f conftest.er1
6307 cat conftest.err >&5
6308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6309 (exit $ac_status); } &&
6310 { ac_try='test -z "$ac_c_werror_flag"
6311 || test ! -s conftest.err'
6312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6313 (eval $ac_try) 2>&5
6314 ac_status=$?
6315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6316 (exit $ac_status); }; } &&
6317 { ac_try='test -s conftest.$ac_objext'
6318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6319 (eval $ac_try) 2>&5
6320 ac_status=$?
6321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6322 (exit $ac_status); }; }; then
bf3b7cd3
JD
6323 ac_hi=-1 ac_mid=-1
6324 while :; do
6325 cat >conftest.$ac_ext <<_ACEOF
6326/* confdefs.h. */
6327_ACEOF
6328cat confdefs.h >>conftest.$ac_ext
6329cat >>conftest.$ac_ext <<_ACEOF
6330/* end confdefs.h. */
6331$ac_includes_default
6332int
6333main ()
6334{
b61ff9c8 6335static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
bf3b7cd3
JD
6336test_array [0] = 0
6337
6338 ;
6339 return 0;
6340}
6341_ACEOF
6342rm -f conftest.$ac_objext
b61ff9c8
BS
6343if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6344 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6345 ac_status=$?
6346 grep -v '^ *+' conftest.er1 >conftest.err
6347 rm -f conftest.er1
6348 cat conftest.err >&5
6349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6350 (exit $ac_status); } &&
6351 { ac_try='test -z "$ac_c_werror_flag"
6352 || test ! -s conftest.err'
6353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6354 (eval $ac_try) 2>&5
6355 ac_status=$?
6356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6357 (exit $ac_status); }; } &&
6358 { ac_try='test -s conftest.$ac_objext'
6359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6360 (eval $ac_try) 2>&5
6361 ac_status=$?
6362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6363 (exit $ac_status); }; }; then
bf3b7cd3
JD
6364 ac_lo=$ac_mid; break
6365else
6366 echo "$as_me: failed program was:" >&5
6367sed 's/^/| /' conftest.$ac_ext >&5
6368
b61ff9c8
BS
6369ac_hi=`expr '(' $ac_mid ')' - 1`
6370 if test $ac_mid -le $ac_hi; then
6371 ac_lo= ac_hi=
6372 break
6373 fi
6374 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 6375fi
b61ff9c8 6376rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6377 done
6378else
6379 echo "$as_me: failed program was:" >&5
6380sed 's/^/| /' conftest.$ac_ext >&5
6381
b61ff9c8 6382ac_lo= ac_hi=
bf3b7cd3 6383fi
b61ff9c8 6384rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6385fi
b61ff9c8 6386rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6387# Binary search between lo and hi bounds.
6388while test "x$ac_lo" != "x$ac_hi"; do
6389 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
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
6397int
6398main ()
6399{
b61ff9c8 6400static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
6401test_array [0] = 0
6402
6403 ;
6404 return 0;
6405}
6406_ACEOF
6407rm -f conftest.$ac_objext
b61ff9c8
BS
6408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6409 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6410 ac_status=$?
6411 grep -v '^ *+' conftest.er1 >conftest.err
6412 rm -f conftest.er1
6413 cat conftest.err >&5
6414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6415 (exit $ac_status); } &&
6416 { ac_try='test -z "$ac_c_werror_flag"
6417 || test ! -s conftest.err'
6418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6419 (eval $ac_try) 2>&5
6420 ac_status=$?
6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6422 (exit $ac_status); }; } &&
6423 { ac_try='test -s conftest.$ac_objext'
6424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6425 (eval $ac_try) 2>&5
6426 ac_status=$?
6427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6428 (exit $ac_status); }; }; then
bf3b7cd3
JD
6429 ac_hi=$ac_mid
6430else
6431 echo "$as_me: failed program was:" >&5
6432sed 's/^/| /' conftest.$ac_ext >&5
6433
b61ff9c8 6434ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 6435fi
b61ff9c8 6436rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6437done
6438case $ac_lo in
6439?*) ac_cv_sizeof_long_long=$ac_lo;;
18c04407
RW
6440'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6441echo "$as_me: error: in \`$ac_pwd':" >&2;}
6442{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 6443See \`config.log' for more details." >&5
b61ff9c8 6444echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 6445See \`config.log' for more details." >&2;}
18c04407 6446 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 6447esac
b61ff9c8
BS
6448else
6449 if test "$cross_compiling" = yes; then
18c04407
RW
6450 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6451echo "$as_me: error: in \`$ac_pwd':" >&2;}
6452{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
6453See \`config.log' for more details." >&5
6454echo "$as_me: error: cannot run test program while cross compiling
6455See \`config.log' for more details." >&2;}
18c04407 6456 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
6457else
6458 cat >conftest.$ac_ext <<_ACEOF
6459/* confdefs.h. */
6460_ACEOF
6461cat confdefs.h >>conftest.$ac_ext
6462cat >>conftest.$ac_ext <<_ACEOF
6463/* end confdefs.h. */
6464$ac_includes_default
b61ff9c8
BS
6465long longval () { return (long) (sizeof (long long)); }
6466unsigned long ulongval () { return (long) (sizeof (long long)); }
bf3b7cd3
JD
6467#include <stdio.h>
6468#include <stdlib.h>
6469int
6470main ()
6471{
6472
6473 FILE *f = fopen ("conftest.val", "w");
6474 if (! f)
b61ff9c8
BS
6475 exit (1);
6476 if (((long) (sizeof (long long))) < 0)
bf3b7cd3 6477 {
b61ff9c8
BS
6478 long i = longval ();
6479 if (i != ((long) (sizeof (long long))))
6480 exit (1);
bf3b7cd3
JD
6481 fprintf (f, "%ld\n", i);
6482 }
6483 else
6484 {
b61ff9c8
BS
6485 unsigned long i = ulongval ();
6486 if (i != ((long) (sizeof (long long))))
6487 exit (1);
bf3b7cd3
JD
6488 fprintf (f, "%lu\n", i);
6489 }
b61ff9c8 6490 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6491
6492 ;
6493 return 0;
6494}
6495_ACEOF
6496rm -f conftest$ac_exeext
b61ff9c8
BS
6497if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6498 (eval $ac_link) 2>&5
bf3b7cd3
JD
6499 ac_status=$?
6500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6501 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
6502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6503 (eval $ac_try) 2>&5
bf3b7cd3
JD
6504 ac_status=$?
6505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6506 (exit $ac_status); }; }; then
6507 ac_cv_sizeof_long_long=`cat conftest.val`
6508else
6509 echo "$as_me: program exited with status $ac_status" >&5
6510echo "$as_me: failed program was:" >&5
6511sed 's/^/| /' conftest.$ac_ext >&5
6512
6513( exit $ac_status )
18c04407
RW
6514{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6515echo "$as_me: error: in \`$ac_pwd':" >&2;}
b61ff9c8 6516{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 6517See \`config.log' for more details." >&5
b61ff9c8 6518echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 6519See \`config.log' for more details." >&2;}
18c04407 6520 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
6521fi
6522rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6523fi
6524fi
6525rm -f conftest.val
b61ff9c8
BS
6526else
6527 ac_cv_sizeof_long_long=0
2f41c1d6 6528fi
b61ff9c8
BS
6529fi
6530echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
6531echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
bf3b7cd3
JD
6532cat >>confdefs.h <<_ACEOF
6533#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
6534_ACEOF
6535
6536
6537fi
5ec1c5e6 6538
b61ff9c8
BS
6539echo "$as_me:$LINENO: checking for __int64" >&5
6540echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5ec1c5e6
KC
6541if test "${ac_cv_type___int64+set}" = set; then
6542 echo $ECHO_N "(cached) $ECHO_C" >&6
6543else
6544 cat >conftest.$ac_ext <<_ACEOF
6545/* confdefs.h. */
6546_ACEOF
6547cat confdefs.h >>conftest.$ac_ext
6548cat >>conftest.$ac_ext <<_ACEOF
6549/* end confdefs.h. */
6550$ac_includes_default
6551int
6552main ()
6553{
b61ff9c8 6554if ((__int64 *) 0)
5ec1c5e6 6555 return 0;
b61ff9c8 6556if (sizeof (__int64))
5ec1c5e6
KC
6557 return 0;
6558 ;
6559 return 0;
6560}
6561_ACEOF
6562rm -f conftest.$ac_objext
b61ff9c8
BS
6563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6564 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
6565 ac_status=$?
6566 grep -v '^ *+' conftest.er1 >conftest.err
6567 rm -f conftest.er1
6568 cat conftest.err >&5
6569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6570 (exit $ac_status); } &&
6571 { ac_try='test -z "$ac_c_werror_flag"
6572 || test ! -s conftest.err'
6573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6574 (eval $ac_try) 2>&5
6575 ac_status=$?
6576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6577 (exit $ac_status); }; } &&
6578 { ac_try='test -s conftest.$ac_objext'
6579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6580 (eval $ac_try) 2>&5
6581 ac_status=$?
6582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6583 (exit $ac_status); }; }; then
5ec1c5e6
KC
6584 ac_cv_type___int64=yes
6585else
6586 echo "$as_me: failed program was:" >&5
6587sed 's/^/| /' conftest.$ac_ext >&5
6588
b61ff9c8 6589ac_cv_type___int64=no
5ec1c5e6 6590fi
b61ff9c8 6591rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 6592fi
b61ff9c8
BS
6593echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
6594echo "${ECHO_T}$ac_cv_type___int64" >&6
5ec1c5e6
KC
6595if test $ac_cv_type___int64 = yes; then
6596
6597cat >>confdefs.h <<_ACEOF
6598#define HAVE___INT64 1
6599_ACEOF
6600
b61ff9c8
BS
6601echo "$as_me:$LINENO: checking for __int64" >&5
6602echo $ECHO_N "checking for __int64... $ECHO_C" >&6
bf3b7cd3
JD
6603if test "${ac_cv_type___int64+set}" = set; then
6604 echo $ECHO_N "(cached) $ECHO_C" >&6
6605else
ba479fd2 6606 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6607/* confdefs.h. */
6608_ACEOF
6609cat confdefs.h >>conftest.$ac_ext
6610cat >>conftest.$ac_ext <<_ACEOF
6611/* end confdefs.h. */
bf3b7cd3 6612$ac_includes_default
ba479fd2
NN
6613int
6614main ()
6615{
b61ff9c8 6616if ((__int64 *) 0)
bf3b7cd3 6617 return 0;
b61ff9c8 6618if (sizeof (__int64))
bf3b7cd3 6619 return 0;
ba479fd2
NN
6620 ;
6621 return 0;
6622}
6623_ACEOF
6624rm -f conftest.$ac_objext
b61ff9c8
BS
6625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6626 (eval $ac_compile) 2>conftest.er1
ba479fd2 6627 ac_status=$?
86da66b5
HPN
6628 grep -v '^ *+' conftest.er1 >conftest.err
6629 rm -f conftest.er1
6630 cat conftest.err >&5
ba479fd2 6631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6632 (exit $ac_status); } &&
6633 { ac_try='test -z "$ac_c_werror_flag"
6634 || test ! -s conftest.err'
6635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6636 (eval $ac_try) 2>&5
6637 ac_status=$?
6638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6639 (exit $ac_status); }; } &&
6640 { ac_try='test -s conftest.$ac_objext'
6641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6642 (eval $ac_try) 2>&5
6643 ac_status=$?
6644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6645 (exit $ac_status); }; }; then
bf3b7cd3 6646 ac_cv_type___int64=yes
75b6f3fd 6647else
ba479fd2
NN
6648 echo "$as_me: failed program was:" >&5
6649sed 's/^/| /' conftest.$ac_ext >&5
6650
b61ff9c8 6651ac_cv_type___int64=no
75b6f3fd 6652fi
b61ff9c8 6653rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 6654fi
b61ff9c8
BS
6655echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
6656echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 6657
b61ff9c8
BS
6658echo "$as_me:$LINENO: checking size of __int64" >&5
6659echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
bf3b7cd3 6660if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 6661 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 6662else
b61ff9c8
BS
6663 if test "$ac_cv_type___int64" = yes; then
6664 # The cast to unsigned long works around a bug in the HP C Compiler
6665 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6666 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6667 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
6668 if test "$cross_compiling" = yes; then
6669 # Depending upon the size, compute the lo and hi bounds.
6670cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6671/* confdefs.h. */
6672_ACEOF
6673cat confdefs.h >>conftest.$ac_ext
6674cat >>conftest.$ac_ext <<_ACEOF
6675/* end confdefs.h. */
bf3b7cd3 6676$ac_includes_default
ba479fd2
NN
6677int
6678main ()
6679{
b61ff9c8 6680static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
bf3b7cd3
JD
6681test_array [0] = 0
6682
ba479fd2
NN
6683 ;
6684 return 0;
6685}
6686_ACEOF
6687rm -f conftest.$ac_objext
b61ff9c8
BS
6688if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6689 (eval $ac_compile) 2>conftest.er1
ba479fd2 6690 ac_status=$?
86da66b5
HPN
6691 grep -v '^ *+' conftest.er1 >conftest.err
6692 rm -f conftest.er1
6693 cat conftest.err >&5
ba479fd2 6694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6695 (exit $ac_status); } &&
6696 { ac_try='test -z "$ac_c_werror_flag"
6697 || test ! -s conftest.err'
6698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6699 (eval $ac_try) 2>&5
6700 ac_status=$?
6701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6702 (exit $ac_status); }; } &&
6703 { ac_try='test -s conftest.$ac_objext'
6704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6705 (eval $ac_try) 2>&5
6706 ac_status=$?
6707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6708 (exit $ac_status); }; }; then
bf3b7cd3
JD
6709 ac_lo=0 ac_mid=0
6710 while :; do
6711 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6712/* confdefs.h. */
6713_ACEOF
6714cat confdefs.h >>conftest.$ac_ext
6715cat >>conftest.$ac_ext <<_ACEOF
6716/* end confdefs.h. */
bf3b7cd3 6717$ac_includes_default
ba479fd2
NN
6718int
6719main ()
6720{
b61ff9c8 6721static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
bf3b7cd3
JD
6722test_array [0] = 0
6723
ba479fd2
NN
6724 ;
6725 return 0;
6726}
6727_ACEOF
6728rm -f conftest.$ac_objext
b61ff9c8
BS
6729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6730 (eval $ac_compile) 2>conftest.er1
ba479fd2 6731 ac_status=$?
86da66b5
HPN
6732 grep -v '^ *+' conftest.er1 >conftest.err
6733 rm -f conftest.er1
6734 cat conftest.err >&5
ba479fd2 6735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6736 (exit $ac_status); } &&
6737 { ac_try='test -z "$ac_c_werror_flag"
6738 || test ! -s conftest.err'
6739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6740 (eval $ac_try) 2>&5
6741 ac_status=$?
6742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6743 (exit $ac_status); }; } &&
6744 { ac_try='test -s conftest.$ac_objext'
6745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6746 (eval $ac_try) 2>&5
6747 ac_status=$?
6748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6749 (exit $ac_status); }; }; then
bf3b7cd3 6750 ac_hi=$ac_mid; break
75e93faa 6751else
ba479fd2
NN
6752 echo "$as_me: failed program was:" >&5
6753sed 's/^/| /' conftest.$ac_ext >&5
6754
b61ff9c8
BS
6755ac_lo=`expr $ac_mid + 1`
6756 if test $ac_lo -le $ac_mid; then
6757 ac_lo= ac_hi=
6758 break
6759 fi
6760 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 6761fi
b61ff9c8 6762rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6763 done
75e93faa 6764else
bf3b7cd3
JD
6765 echo "$as_me: failed program was:" >&5
6766sed 's/^/| /' conftest.$ac_ext >&5
6767
b61ff9c8 6768cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6769/* confdefs.h. */
6770_ACEOF
6771cat confdefs.h >>conftest.$ac_ext
6772cat >>conftest.$ac_ext <<_ACEOF
6773/* end confdefs.h. */
bf3b7cd3 6774$ac_includes_default
ba479fd2
NN
6775int
6776main ()
6777{
b61ff9c8 6778static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
bf3b7cd3
JD
6779test_array [0] = 0
6780
ba479fd2
NN
6781 ;
6782 return 0;
6783}
6784_ACEOF
6785rm -f conftest.$ac_objext
b61ff9c8
BS
6786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6787 (eval $ac_compile) 2>conftest.er1
ba479fd2 6788 ac_status=$?
86da66b5
HPN
6789 grep -v '^ *+' conftest.er1 >conftest.err
6790 rm -f conftest.er1
6791 cat conftest.err >&5
ba479fd2 6792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6793 (exit $ac_status); } &&
6794 { ac_try='test -z "$ac_c_werror_flag"
6795 || test ! -s conftest.err'
6796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6797 (eval $ac_try) 2>&5
6798 ac_status=$?
6799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6800 (exit $ac_status); }; } &&
6801 { ac_try='test -s conftest.$ac_objext'
6802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6803 (eval $ac_try) 2>&5
6804 ac_status=$?
6805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6806 (exit $ac_status); }; }; then
bf3b7cd3
JD
6807 ac_hi=-1 ac_mid=-1
6808 while :; do
6809 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6810/* confdefs.h. */
6811_ACEOF
6812cat confdefs.h >>conftest.$ac_ext
6813cat >>conftest.$ac_ext <<_ACEOF
6814/* end confdefs.h. */
bf3b7cd3 6815$ac_includes_default
ba479fd2
NN
6816int
6817main ()
6818{
b61ff9c8 6819static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
bf3b7cd3
JD
6820test_array [0] = 0
6821
ba479fd2
NN
6822 ;
6823 return 0;
6824}
6825_ACEOF
6826rm -f conftest.$ac_objext
b61ff9c8
BS
6827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6828 (eval $ac_compile) 2>conftest.er1
ba479fd2 6829 ac_status=$?
86da66b5
HPN
6830 grep -v '^ *+' conftest.er1 >conftest.err
6831 rm -f conftest.er1
6832 cat conftest.err >&5
ba479fd2 6833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6834 (exit $ac_status); } &&
6835 { ac_try='test -z "$ac_c_werror_flag"
6836 || test ! -s conftest.err'
6837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6838 (eval $ac_try) 2>&5
6839 ac_status=$?
6840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6841 (exit $ac_status); }; } &&
6842 { ac_try='test -s conftest.$ac_objext'
6843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6844 (eval $ac_try) 2>&5
6845 ac_status=$?
6846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6847 (exit $ac_status); }; }; then
bf3b7cd3 6848 ac_lo=$ac_mid; break
04cabffc 6849else
ba479fd2
NN
6850 echo "$as_me: failed program was:" >&5
6851sed 's/^/| /' conftest.$ac_ext >&5
6852
b61ff9c8
BS
6853ac_hi=`expr '(' $ac_mid ')' - 1`
6854 if test $ac_mid -le $ac_hi; then
6855 ac_lo= ac_hi=
6856 break
6857 fi
6858 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 6859fi
b61ff9c8 6860rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6861 done
6862else
6863 echo "$as_me: failed program was:" >&5
6864sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 6865
b61ff9c8 6866ac_lo= ac_hi=
414d23ae 6867fi
b61ff9c8 6868rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6869fi
b61ff9c8 6870rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6871# Binary search between lo and hi bounds.
6872while test "x$ac_lo" != "x$ac_hi"; do
6873 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 6874 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6875/* confdefs.h. */
6876_ACEOF
6877cat confdefs.h >>conftest.$ac_ext
6878cat >>conftest.$ac_ext <<_ACEOF
6879/* end confdefs.h. */
bf3b7cd3 6880$ac_includes_default
ba479fd2
NN
6881int
6882main ()
6883{
b61ff9c8 6884static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
bf3b7cd3
JD
6885test_array [0] = 0
6886
ba479fd2
NN
6887 ;
6888 return 0;
6889}
6890_ACEOF
6891rm -f conftest.$ac_objext
b61ff9c8
BS
6892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6893 (eval $ac_compile) 2>conftest.er1
ba479fd2 6894 ac_status=$?
86da66b5
HPN
6895 grep -v '^ *+' conftest.er1 >conftest.err
6896 rm -f conftest.er1
6897 cat conftest.err >&5
ba479fd2 6898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6899 (exit $ac_status); } &&
6900 { ac_try='test -z "$ac_c_werror_flag"
6901 || test ! -s conftest.err'
6902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6903 (eval $ac_try) 2>&5
6904 ac_status=$?
6905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6906 (exit $ac_status); }; } &&
6907 { ac_try='test -s conftest.$ac_objext'
6908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6909 (eval $ac_try) 2>&5
6910 ac_status=$?
6911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6912 (exit $ac_status); }; }; then
bf3b7cd3 6913 ac_hi=$ac_mid
75e93faa 6914else
ba479fd2
NN
6915 echo "$as_me: failed program was:" >&5
6916sed 's/^/| /' conftest.$ac_ext >&5
6917
b61ff9c8 6918ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 6919fi
b61ff9c8 6920rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6921done
bf3b7cd3
JD
6922case $ac_lo in
6923?*) ac_cv_sizeof___int64=$ac_lo;;
18c04407
RW
6924'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6925echo "$as_me: error: in \`$ac_pwd':" >&2;}
6926{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6927See \`config.log' for more details." >&5
b61ff9c8 6928echo "$as_me: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6929See \`config.log' for more details." >&2;}
18c04407 6930 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 6931esac
b61ff9c8
BS
6932else
6933 if test "$cross_compiling" = yes; then
18c04407
RW
6934 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6935echo "$as_me: error: in \`$ac_pwd':" >&2;}
6936{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
6937See \`config.log' for more details." >&5
6938echo "$as_me: error: cannot run test program while cross compiling
6939See \`config.log' for more details." >&2;}
18c04407 6940 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
6941else
6942 cat >conftest.$ac_ext <<_ACEOF
6943/* confdefs.h. */
6944_ACEOF
6945cat confdefs.h >>conftest.$ac_ext
6946cat >>conftest.$ac_ext <<_ACEOF
6947/* end confdefs.h. */
6948$ac_includes_default
b61ff9c8
BS
6949long longval () { return (long) (sizeof (__int64)); }
6950unsigned long ulongval () { return (long) (sizeof (__int64)); }
bf3b7cd3
JD
6951#include <stdio.h>
6952#include <stdlib.h>
6953int
6954main ()
6955{
414d23ae 6956
bf3b7cd3
JD
6957 FILE *f = fopen ("conftest.val", "w");
6958 if (! f)
b61ff9c8
BS
6959 exit (1);
6960 if (((long) (sizeof (__int64))) < 0)
bf3b7cd3 6961 {
b61ff9c8
BS
6962 long i = longval ();
6963 if (i != ((long) (sizeof (__int64))))
6964 exit (1);
bf3b7cd3
JD
6965 fprintf (f, "%ld\n", i);
6966 }
6967 else
6968 {
b61ff9c8
BS
6969 unsigned long i = ulongval ();
6970 if (i != ((long) (sizeof (__int64))))
6971 exit (1);
bf3b7cd3
JD
6972 fprintf (f, "%lu\n", i);
6973 }
b61ff9c8 6974 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6975
6976 ;
6977 return 0;
6978}
6979_ACEOF
6980rm -f conftest$ac_exeext
b61ff9c8
BS
6981if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6982 (eval $ac_link) 2>&5
bf3b7cd3
JD
6983 ac_status=$?
6984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6985 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
6986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6987 (eval $ac_try) 2>&5
bf3b7cd3
JD
6988 ac_status=$?
6989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6990 (exit $ac_status); }; }; then
6991 ac_cv_sizeof___int64=`cat conftest.val`
6992else
6993 echo "$as_me: program exited with status $ac_status" >&5
6994echo "$as_me: failed program was:" >&5
6995sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6996
bf3b7cd3 6997( exit $ac_status )
18c04407
RW
6998{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6999echo "$as_me: error: in \`$ac_pwd':" >&2;}
b61ff9c8 7000{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
bf3b7cd3 7001See \`config.log' for more details." >&5
b61ff9c8 7002echo "$as_me: error: cannot compute sizeof (__int64), 77
bf3b7cd3 7003See \`config.log' for more details." >&2;}
18c04407 7004 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
7005fi
7006rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
7007fi
7008fi
7009rm -f conftest.val
b61ff9c8
BS
7010else
7011 ac_cv_sizeof___int64=0
bf3b7cd3 7012fi
b61ff9c8
BS
7013fi
7014echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
7015echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 7016cat >>confdefs.h <<_ACEOF
414d23ae 7017#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 7018_ACEOF
414d23ae 7019
cafe096b 7020
414d23ae
HPN
7021fi
7022
5ec1c5e6 7023
34a86c2b
NN
7024# ---------------------
7025# Warnings and checking
7026# ---------------------
7027
b5472e1d
NN
7028# Check $CC warning features (if it's GCC).
7029# We want to use -pedantic, but we don't want warnings about
7030# * 'long long'
7031# * variadic macros
89a42ac8 7032# * overlong strings
b5472e1d
NN
7033# So, we only use -pedantic if we can disable those warnings.
7034
3bbd5a19
PB
7035loose_warn=
7036save_CFLAGS="$CFLAGS"
f6e377f8 7037for option in -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual; do
3bbd5a19
PB
7038 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
7039
b61ff9c8
BS
7040 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
7041echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
7042if eval "test \"\${$as_acx_Woption+set}\" = set"; then
b5472e1d
NN
7043 echo $ECHO_N "(cached) $ECHO_C" >&6
7044else
3bbd5a19
PB
7045 CFLAGS="$option"
7046 cat >conftest.$ac_ext <<_ACEOF
b5472e1d
NN
7047/* confdefs.h. */
7048_ACEOF
7049cat confdefs.h >>conftest.$ac_ext
7050cat >>conftest.$ac_ext <<_ACEOF
7051/* end confdefs.h. */
7052
3bbd5a19
PB
7053int
7054main ()
7055{
7056
7057 ;
7058 return 0;
7059}
b5472e1d
NN
7060_ACEOF
7061rm -f conftest.$ac_objext
b61ff9c8
BS
7062if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7063 (eval $ac_compile) 2>conftest.er1
b5472e1d
NN
7064 ac_status=$?
7065 grep -v '^ *+' conftest.er1 >conftest.err
7066 rm -f conftest.er1
7067 cat conftest.err >&5
7068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7069 (exit $ac_status); } &&
7070 { ac_try='test -z "$ac_c_werror_flag"
7071 || test ! -s conftest.err'
7072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7073 (eval $ac_try) 2>&5
7074 ac_status=$?
7075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7076 (exit $ac_status); }; } &&
7077 { ac_try='test -s conftest.$ac_objext'
7078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7079 (eval $ac_try) 2>&5
7080 ac_status=$?
7081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7082 (exit $ac_status); }; }; then
3bbd5a19 7083 eval "$as_acx_Woption=yes"
b5472e1d
NN
7084else
7085 echo "$as_me: failed program was:" >&5
7086sed 's/^/| /' conftest.$ac_ext >&5
7087
b61ff9c8 7088eval "$as_acx_Woption=no"
b5472e1d 7089fi
b61ff9c8 7090rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
7091
7092fi
b61ff9c8
BS
7093echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
7094echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3bbd5a19
PB
7095 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
7096 loose_warn="$loose_warn${loose_warn:+ }$option"
7097fi
7098
7099 done
7100CFLAGS="$save_CFLAGS"
7101
3bbd5a19
PB
7102strict_warn=
7103save_CFLAGS="$CFLAGS"
f6e377f8 7104for option in -Wold-style-definition -Wc++-compat -Wmissing-format-attribute; do
3bbd5a19
PB
7105 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
7106
b61ff9c8
BS
7107 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
7108echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
7109if eval "test \"\${$as_acx_Woption+set}\" = set"; then
89a42ac8
ZW
7110 echo $ECHO_N "(cached) $ECHO_C" >&6
7111else
3bbd5a19
PB
7112 CFLAGS="$option"
7113 cat >conftest.$ac_ext <<_ACEOF
89a42ac8
ZW
7114/* confdefs.h. */
7115_ACEOF
7116cat confdefs.h >>conftest.$ac_ext
7117cat >>conftest.$ac_ext <<_ACEOF
7118/* end confdefs.h. */
7119
3bbd5a19
PB
7120int
7121main ()
7122{
7123
7124 ;
7125 return 0;
7126}
89a42ac8
ZW
7127_ACEOF
7128rm -f conftest.$ac_objext
b61ff9c8
BS
7129if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7130 (eval $ac_compile) 2>conftest.er1
89a42ac8
ZW
7131 ac_status=$?
7132 grep -v '^ *+' conftest.er1 >conftest.err
7133 rm -f conftest.er1
7134 cat conftest.err >&5
7135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7136 (exit $ac_status); } &&
7137 { ac_try='test -z "$ac_c_werror_flag"
7138 || test ! -s conftest.err'
7139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7140 (eval $ac_try) 2>&5
7141 ac_status=$?
7142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7143 (exit $ac_status); }; } &&
7144 { ac_try='test -s conftest.$ac_objext'
7145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7146 (eval $ac_try) 2>&5
7147 ac_status=$?
7148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7149 (exit $ac_status); }; }; then
3bbd5a19 7150 eval "$as_acx_Woption=yes"
89a42ac8
ZW
7151else
7152 echo "$as_me: failed program was:" >&5
7153sed 's/^/| /' conftest.$ac_ext >&5
7154
b61ff9c8 7155eval "$as_acx_Woption=no"
89a42ac8 7156fi
b61ff9c8 7157rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
89a42ac8
ZW
7158
7159fi
b61ff9c8
BS
7160echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
7161echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3bbd5a19
PB
7162 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
7163 strict_warn="$strict_warn${strict_warn:+ }$option"
34a86c2b
NN
7164fi
7165
3bbd5a19
PB
7166 done
7167CFLAGS="$save_CFLAGS"
7168
7169if test "$GCC" = yes; then
f6e377f8
AT
7170 echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" >&5
7171echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings... $ECHO_C" >&6
7172if test "${acx_cv_prog_cc_pedantic_m4_do__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings_+set}" = set; then
643d3bd2
NN
7173 echo $ECHO_N "(cached) $ECHO_C" >&6
7174else
7175 save_CFLAGS="$CFLAGS"
f6e377f8 7176CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
3bbd5a19 7177cat >conftest.$ac_ext <<_ACEOF
643d3bd2
NN
7178/* confdefs.h. */
7179_ACEOF
7180cat confdefs.h >>conftest.$ac_ext
7181cat >>conftest.$ac_ext <<_ACEOF
7182/* end confdefs.h. */
7183
3bbd5a19
PB
7184int
7185main ()
7186{
7187
7188 ;
7189 return 0;
7190}
643d3bd2
NN
7191_ACEOF
7192rm -f conftest.$ac_objext
b61ff9c8
BS
7193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7194 (eval $ac_compile) 2>conftest.er1
643d3bd2
NN
7195 ac_status=$?
7196 grep -v '^ *+' conftest.er1 >conftest.err
7197 rm -f conftest.er1
7198 cat conftest.err >&5
7199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7200 (exit $ac_status); } &&
7201 { ac_try='test -z "$ac_c_werror_flag"
7202 || test ! -s conftest.err'
7203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7204 (eval $ac_try) 2>&5
7205 ac_status=$?
7206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7207 (exit $ac_status); }; } &&
7208 { ac_try='test -s conftest.$ac_objext'
7209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7210 (eval $ac_try) 2>&5
7211 ac_status=$?
7212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7213 (exit $ac_status); }; }; then
f6e377f8 7214 acx_cv_prog_cc_pedantic_m4_do__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings_=yes
643d3bd2
NN
7215else
7216 echo "$as_me: failed program was:" >&5
7217sed 's/^/| /' conftest.$ac_ext >&5
7218
f6e377f8 7219acx_cv_prog_cc_pedantic_m4_do__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings_=no
643d3bd2 7220fi
b61ff9c8 7221rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3bbd5a19 7222CFLAGS="$save_CFLAGS"
643d3bd2 7223fi
f6e377f8
AT
7224echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic_m4_do__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings_" >&5
7225echo "${ECHO_T}$acx_cv_prog_cc_pedantic_m4_do__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings_" >&6
7226if test $acx_cv_prog_cc_pedantic_m4_do__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings_ = yes; then
7227 strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
643d3bd2
NN
7228fi
7229
ac0f3f39 7230
ac0f3f39 7231fi
ac0f3f39 7232
ac0f3f39 7233
b61ff9c8 7234# Check whether --enable-werror-always or --disable-werror-always was given.
09a9c095 7235if test "${enable_werror_always+set}" = set; then
b61ff9c8
BS
7236 enableval="$enable_werror_always"
7237
09a9c095
NN
7238else
7239 enable_werror_always=no
b61ff9c8 7240fi;
3bbd5a19
PB
7241if test $enable_werror_always = yes; then
7242 strict_warn="$strict_warn${strict_warn:+ }-Werror"
373477bb 7243fi
373477bb 7244
373477bb
GDR
7245
7246
7247
3bbd5a19
PB
7248# The above macros do nothing if the compiler is not GCC. However, the
7249# Makefile has more goo to add other flags, so this variabl is used to
7250# enables warnings only for GCC.
414d23ae
HPN
7251warn_cflags=
7252if test "x$GCC" = "xyes"; then
7253 warn_cflags='$(GCC_WARN_CFLAGS)'
7254fi
7255
7256
8b1f719a 7257# Enable expensive internal checks
a1286ef5
ZW
7258is_release=
7259if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
7260 is_release=yes
7261fi
a6ccdbab 7262
b61ff9c8 7263# Check whether --enable-checking or --disable-checking was given.
414d23ae 7264if test "${enable_checking+set}" = set; then
b61ff9c8
BS
7265 enableval="$enable_checking"
7266 ac_checking_flags="${enableval}"
e1bbfc5c
NS
7267else
7268
7269# Determine the default checks.
7270if test x$is_release = x ; then
7271 ac_checking_flags=yes
7272else
7273 ac_checking_flags=release
7274fi
b61ff9c8 7275fi;
e1bbfc5c 7276IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
04c3028a 7277for check in release $ac_checking_flags
e1bbfc5c
NS
7278do
7279 case $check in
cdce5c16 7280 # these set all the flags to specific states
0d475361 7281 yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
cdce5c16 7282 ac_fold_checking= ; ac_gc_checking=1 ;
726a989a 7283 ac_gc_always_collect= ; ac_gimple_checking=1 ; ac_rtl_checking= ;
232b67d9 7284 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7e98624c 7285 ac_tree_checking=1 ; ac_valgrind_checking= ;
1b24a790 7286 ac_types_checking=1 ;;
3089f8b5 7287 no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
cdce5c16 7288 ac_fold_checking= ; ac_gc_checking= ;
726a989a 7289 ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
232b67d9 7290 ac_rtlflag_checking= ; ac_runtime_checking= ;
7e98624c
RG
7291 ac_tree_checking= ; ac_valgrind_checking= ;
7292 ac_types_checking= ;;
3089f8b5 7293 all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
cdce5c16 7294 ac_fold_checking=1 ; ac_gc_checking=1 ;
726a989a 7295 ac_gc_always_collect=1 ; ac_gimple_checking=1 ; ac_rtl_checking=1 ;
cdce5c16 7296 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7e98624c
RG
7297 ac_tree_checking=1 ; ac_valgrind_checking= ;
7298 ac_types_checking=1 ;;
3089f8b5 7299 release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
cdce5c16 7300 ac_fold_checking= ; ac_gc_checking= ;
726a989a 7301 ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
cdce5c16 7302 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
7e98624c
RG
7303 ac_tree_checking= ; ac_valgrind_checking= ;
7304 ac_types_checking= ;;
cdce5c16 7305 # these enable particular checks
e1bbfc5c 7306 assert) ac_assert_checking=1 ;;
3089f8b5 7307 df) ac_df_checking=1 ;;
e1bbfc5c
NS
7308 fold) ac_fold_checking=1 ;;
7309 gc) ac_gc_checking=1 ;;
7310 gcac) ac_gc_always_collect=1 ;;
726a989a 7311 gimple) ac_gimple_checking=1 ;;
e1bbfc5c 7312 misc) ac_checking=1 ;;
e1bbfc5c 7313 rtl) ac_rtl_checking=1 ;;
cdce5c16 7314 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 7315 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 7316 tree) ac_tree_checking=1 ;;
7e98624c 7317 types) ac_types_checking=1 ;;
cdce5c16 7318 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 7319 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
7320echo "$as_me: error: unknown check category $check" >&2;}
7321 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
7322 esac
7323done
7324IFS="$ac_save_IFS"
06c37c96 7325
ba479fd2
NN
7326nocommon_flag=""
7327if test x$ac_checking != x ; then
7328
7329cat >>confdefs.h <<\_ACEOF
7330#define ENABLE_CHECKING 1
7331_ACEOF
7332
7333 nocommon_flag=-fno-common
7334fi
3bbd5a19 7335
3089f8b5
PB
7336if test x$ac_df_checking != x ; then
7337
7338cat >>confdefs.h <<\_ACEOF
7339#define ENABLE_DF_CHECKING 1
7340_ACEOF
7341
7342fi
06c37c96
NS
7343if test x$ac_assert_checking != x ; then
7344
7345cat >>confdefs.h <<\_ACEOF
7346#define ENABLE_ASSERT_CHECKING 1
7347_ACEOF
7348
726a989a
RB
7349fi
7350if test x$ac_gimple_checking != x ; then
7351
7352cat >>confdefs.h <<\_ACEOF
7353#define ENABLE_GIMPLE_CHECKING 1
7354_ACEOF
7355
b53ef395 7356fi
232b67d9 7357
b53ef395
NS
7358if test x$ac_runtime_checking != x ; then
7359
7360cat >>confdefs.h <<\_ACEOF
7361#define ENABLE_RUNTIME_CHECKING 1
7362_ACEOF
7363
06c37c96 7364fi
ba479fd2
NN
7365if test x$ac_tree_checking != x ; then
7366
7367cat >>confdefs.h <<\_ACEOF
7368#define ENABLE_TREE_CHECKING 1
7369_ACEOF
7370
13f05fd0 7371 TREEBROWSER=tree-browser.o
ba479fd2 7372fi
7e98624c
RG
7373if test x$ac_types_checking != x ; then
7374
7375cat >>confdefs.h <<\_ACEOF
7376#define ENABLE_TYPES_CHECKING 1
7377_ACEOF
7378
7379fi
13f05fd0 7380
ba479fd2
NN
7381if test x$ac_rtl_checking != x ; then
7382
7383cat >>confdefs.h <<\_ACEOF
7384#define ENABLE_RTL_CHECKING 1
7385_ACEOF
7386
7387fi
7388if test x$ac_rtlflag_checking != x ; then
7389
7390cat >>confdefs.h <<\_ACEOF
7391#define ENABLE_RTL_FLAG_CHECKING 1
7392_ACEOF
7393
7394fi
7395if test x$ac_gc_checking != x ; then
7396
7397cat >>confdefs.h <<\_ACEOF
7398#define ENABLE_GC_CHECKING 1
7399_ACEOF
7400
7401fi
7402if test x$ac_gc_always_collect != x ; then
7403
7404cat >>confdefs.h <<\_ACEOF
7405#define ENABLE_GC_ALWAYS_COLLECT 1
7406_ACEOF
7407
7408fi
7409if test x$ac_fold_checking != x ; then
7410
7411cat >>confdefs.h <<\_ACEOF
7412#define ENABLE_FOLD_CHECKING 1
7413_ACEOF
7414
7415fi
7416valgrind_path_defines=
7417valgrind_command=
7418
ba479fd2 7419if test "${ac_cv_header_valgrind_h+set}" = set; then
b61ff9c8
BS
7420 echo "$as_me:$LINENO: checking for valgrind.h" >&5
7421echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
ba479fd2
NN
7422if test "${ac_cv_header_valgrind_h+set}" = set; then
7423 echo $ECHO_N "(cached) $ECHO_C" >&6
7424fi
b61ff9c8
BS
7425echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
7426echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
ba479fd2
NN
7427else
7428 # Is the header compilable?
b61ff9c8
BS
7429echo "$as_me:$LINENO: checking valgrind.h usability" >&5
7430echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
ba479fd2 7431cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7432/* confdefs.h. */
7433_ACEOF
7434cat confdefs.h >>conftest.$ac_ext
7435cat >>conftest.$ac_ext <<_ACEOF
7436/* end confdefs.h. */
7437$ac_includes_default
63cf211a 7438#include <valgrind.h>
ba479fd2
NN
7439_ACEOF
7440rm -f conftest.$ac_objext
b61ff9c8
BS
7441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7442 (eval $ac_compile) 2>conftest.er1
ba479fd2 7443 ac_status=$?
86da66b5
HPN
7444 grep -v '^ *+' conftest.er1 >conftest.err
7445 rm -f conftest.er1
7446 cat conftest.err >&5
ba479fd2 7447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7448 (exit $ac_status); } &&
7449 { ac_try='test -z "$ac_c_werror_flag"
7450 || test ! -s conftest.err'
7451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7452 (eval $ac_try) 2>&5
7453 ac_status=$?
7454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7455 (exit $ac_status); }; } &&
7456 { ac_try='test -s conftest.$ac_objext'
7457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7458 (eval $ac_try) 2>&5
7459 ac_status=$?
7460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7461 (exit $ac_status); }; }; then
ba479fd2
NN
7462 ac_header_compiler=yes
7463else
7464 echo "$as_me: failed program was:" >&5
7465sed 's/^/| /' conftest.$ac_ext >&5
7466
b61ff9c8 7467ac_header_compiler=no
ba479fd2 7468fi
b61ff9c8
BS
7469rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7470echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7471echo "${ECHO_T}$ac_header_compiler" >&6
ba479fd2
NN
7472
7473# Is the header present?
b61ff9c8
BS
7474echo "$as_me:$LINENO: checking valgrind.h presence" >&5
7475echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
ba479fd2 7476cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7477/* confdefs.h. */
7478_ACEOF
7479cat confdefs.h >>conftest.$ac_ext
7480cat >>conftest.$ac_ext <<_ACEOF
7481/* end confdefs.h. */
7482#include <valgrind.h>
7483_ACEOF
b61ff9c8
BS
7484if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7485 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
7486 ac_status=$?
7487 grep -v '^ *+' conftest.er1 >conftest.err
7488 rm -f conftest.er1
7489 cat conftest.err >&5
7490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7491 (exit $ac_status); } >/dev/null; then
7492 if test -s conftest.err; then
7493 ac_cpp_err=$ac_c_preproc_warn_flag
7494 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7495 else
7496 ac_cpp_err=
7497 fi
7498else
7499 ac_cpp_err=yes
7500fi
7501if test -z "$ac_cpp_err"; then
ba479fd2
NN
7502 ac_header_preproc=yes
7503else
7504 echo "$as_me: failed program was:" >&5
7505sed 's/^/| /' conftest.$ac_ext >&5
7506
7507 ac_header_preproc=no
7508fi
7509rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
7510echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7511echo "${ECHO_T}$ac_header_preproc" >&6
ba479fd2
NN
7512
7513# So? What about this header?
86da66b5
HPN
7514case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7515 yes:no: )
ba479fd2
NN
7516 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
7517echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
7518 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
7519echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
7520 ac_header_preproc=yes
ba479fd2 7521 ;;
86da66b5 7522 no:yes:* )
ba479fd2
NN
7523 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
7524echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
7525 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
7526echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
7527 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
7528echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
7529 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
7530echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
7531 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
7532echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
7533 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
7534echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
b61ff9c8
BS
7535 (
7536 cat <<\_ASBOX
7537## ------------------------------------------ ##
7538## Report this to the AC_PACKAGE_NAME lists. ##
7539## ------------------------------------------ ##
7540_ASBOX
7541 ) |
7542 sed "s/^/$as_me: WARNING: /" >&2
ba479fd2
NN
7543 ;;
7544esac
b61ff9c8
BS
7545echo "$as_me:$LINENO: checking for valgrind.h" >&5
7546echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
ba479fd2
NN
7547if test "${ac_cv_header_valgrind_h+set}" = set; then
7548 echo $ECHO_N "(cached) $ECHO_C" >&6
7549else
7550 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 7551fi
b61ff9c8
BS
7552echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
7553echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
ba479fd2 7554
6e3f3080 7555fi
ba479fd2 7556if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
7557 have_valgrind_h=yes
7558else
ba479fd2 7559 have_valgrind_h=no
6938ec6c
NN
7560fi
7561
7562
ba479fd2 7563
cdce5c16 7564if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
7565 # It is certainly possible that there's valgrind but no valgrind.h.
7566 # GCC relies on making annotations so we must have both.
b61ff9c8
BS
7567 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
7568echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
ba479fd2 7569 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7570/* confdefs.h. */
7571_ACEOF
7572cat confdefs.h >>conftest.$ac_ext
7573cat >>conftest.$ac_ext <<_ACEOF
7574/* end confdefs.h. */
a207b594 7575#include <valgrind/memcheck.h>
14011ca4
AJ
7576#ifndef VALGRIND_DISCARD
7577#error VALGRIND_DISCARD not defined
7578#endif
ba479fd2 7579_ACEOF
b61ff9c8
BS
7580if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7581 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
7582 ac_status=$?
7583 grep -v '^ *+' conftest.er1 >conftest.err
7584 rm -f conftest.er1
7585 cat conftest.err >&5
7586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7587 (exit $ac_status); } >/dev/null; then
7588 if test -s conftest.err; then
7589 ac_cpp_err=$ac_c_preproc_warn_flag
7590 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7591 else
7592 ac_cpp_err=
7593 fi
7594else
7595 ac_cpp_err=yes
7596fi
7597if test -z "$ac_cpp_err"; then
a207b594
HPN
7598 gcc_cv_header_valgrind_memcheck_h=yes
7599else
ba479fd2
NN
7600 echo "$as_me: failed program was:" >&5
7601sed 's/^/| /' conftest.$ac_ext >&5
7602
a207b594
HPN
7603 gcc_cv_header_valgrind_memcheck_h=no
7604fi
ba479fd2 7605rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
7606 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
7607echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
7608 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
7609echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
ba479fd2 7610 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7611/* confdefs.h. */
7612_ACEOF
7613cat confdefs.h >>conftest.$ac_ext
7614cat >>conftest.$ac_ext <<_ACEOF
7615/* end confdefs.h. */
a207b594
HPN
7616#include <memcheck.h>
7617#ifndef VALGRIND_DISCARD
7618#error VALGRIND_DISCARD not defined
7619#endif
ba479fd2 7620_ACEOF
b61ff9c8
BS
7621if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7622 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
7623 ac_status=$?
7624 grep -v '^ *+' conftest.er1 >conftest.err
7625 rm -f conftest.er1
7626 cat conftest.err >&5
7627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7628 (exit $ac_status); } >/dev/null; then
7629 if test -s conftest.err; then
7630 ac_cpp_err=$ac_c_preproc_warn_flag
7631 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7632 else
7633 ac_cpp_err=
7634 fi
7635else
7636 ac_cpp_err=yes
7637fi
7638if test -z "$ac_cpp_err"; then
14011ca4
AJ
7639 gcc_cv_header_memcheck_h=yes
7640else
ba479fd2
NN
7641 echo "$as_me: failed program was:" >&5
7642sed 's/^/| /' conftest.$ac_ext >&5
7643
cafe096b
EC
7644 gcc_cv_header_memcheck_h=no
7645fi
ba479fd2 7646rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
7647 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
7648echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
ba479fd2 7649
56694dd9
ZW
7650# Prepare PATH_SEPARATOR.
7651# The user is always right.
7652if test "${PATH_SEPARATOR+set}" != set; then
7653 echo "#! /bin/sh" >conf$$.sh
7654 echo "exit 0" >>conf$$.sh
7655 chmod +x conf$$.sh
7656 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7657 PATH_SEPARATOR=';'
7658 else
7659 PATH_SEPARATOR=:
7660 fi
7661 rm -f conf$$.sh
7662fi
7663
7664# Find out how to test for executable files. Don't use a zero-byte file,
7665# as systems may use methods other than mode bits to determine executability.
7666cat >conf$$.file <<_ASEOF
7667#! /bin/sh
7668exit 0
7669_ASEOF
7670chmod +x conf$$.file
7671if test -x conf$$.file >/dev/null 2>&1; then
7672 ac_executable_p="test -x"
7673else
7674 ac_executable_p="test -f"
7675fi
7676rm -f conf$$.file
7677
7678# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 7679set dummy valgrind; ac_word=$2
b61ff9c8
BS
7680echo "$as_me:$LINENO: checking for $ac_word" >&5
7681echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7682if test "${ac_cv_path_valgrind_path+set}" = set; then
7683 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
7684else
7685 case "$valgrind_path" in
56694dd9
ZW
7686 [\\/]* | ?:[\\/]*)
7687 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
7688 ;;
414d23ae 7689 *)
56694dd9
ZW
7690 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
7691 for ac_dir in $PATH; do
7692 IFS="$ac_save_IFS"
7693 test -z "$ac_dir" && ac_dir=.
7694 for ac_exec_ext in '' $ac_executable_extensions; do
7695 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
7696 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
7697 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
7698 break 2
7699 fi
7700 fi
7701 done
7702 done
7703 IFS="$ac_save_IFS"
7704 ;;
414d23ae 7705esac
75e93faa 7706fi
414d23ae
HPN
7707valgrind_path="$ac_cv_path_valgrind_path"
7708if test -n "$valgrind_path"; then
b61ff9c8
BS
7709 echo "$as_me:$LINENO: result: $valgrind_path" >&5
7710echo "${ECHO_T}$valgrind_path" >&6
414d23ae 7711else
b61ff9c8
BS
7712 echo "$as_me:$LINENO: result: no" >&5
7713echo "${ECHO_T}no" >&6
414d23ae
HPN
7714fi
7715
a207b594
HPN
7716 if test "x$valgrind_path" = "x" \
7717 || (test $have_valgrind_h = no \
7718 && test $gcc_cv_header_memcheck_h = no \
7719 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
7720 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
7721echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
7722 { (exit 1); exit 1; }; }
414d23ae
HPN
7723 fi
7724 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
7725 valgrind_command="$valgrind_path -q"
ba479fd2
NN
7726
7727cat >>confdefs.h <<\_ACEOF
414d23ae 7728#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 7729_ACEOF
75e93faa 7730
a207b594 7731 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
7732
7733cat >>confdefs.h <<\_ACEOF
a207b594 7734#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 7735_ACEOF
a207b594
HPN
7736
7737 fi
14011ca4 7738 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
7739
7740cat >>confdefs.h <<\_ACEOF
14011ca4 7741#define HAVE_MEMCHECK_H 1
ba479fd2 7742_ACEOF
14011ca4
AJ
7743
7744 fi
414d23ae 7745fi
75e93faa 7746
75e93faa
ZW
7747
7748
414d23ae 7749# Enable code coverage collection
b61ff9c8 7750# Check whether --enable-coverage or --disable-coverage was given.
414d23ae 7751if test "${enable_coverage+set}" = set; then
b61ff9c8
BS
7752 enableval="$enable_coverage"
7753 case "${enableval}" in
6dd297da
NN
7754 yes|noopt)
7755 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
7756 ;;
7757 opt)
7758 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
7759 ;;
7760 no)
7761 # a.k.a. --disable-coverage
7762 coverage_flags=""
7763 ;;
7764 *)
7765 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
7766echo "$as_me: error: unknown coverage setting $enableval" >&2;}
7767 { (exit 1); exit 1; }; }
6dd297da 7768 ;;
414d23ae 7769esac
75e93faa 7770else
414d23ae 7771 coverage_flags=""
b61ff9c8 7772fi;
a3bba767 7773
2f41c1d6 7774
b61ff9c8 7775# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
1a4b763e 7776if test "${enable_gather_detailed_mem_stats+set}" = set; then
b61ff9c8
BS
7777 enableval="$enable_gather_detailed_mem_stats"
7778
439a7e54
DN
7779else
7780 enable_gather_detailed_mem_stats=no
b61ff9c8 7781fi;
439a7e54 7782if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
7783
7784cat >>confdefs.h <<\_ACEOF
439a7e54 7785#define GATHER_STATISTICS 1
ba479fd2 7786_ACEOF
439a7e54
DN
7787
7788fi
7789
73458fb7
NN
7790# -------------------------------
7791# Miscenalleous configure options
7792# -------------------------------
34a86c2b
NN
7793
7794# With stabs
ba479fd2 7795
b61ff9c8 7796# Check whether --with-stabs or --without-stabs was given.
34a86c2b 7797if test "${with_stabs+set}" = set; then
b61ff9c8
BS
7798 withval="$with_stabs"
7799 stabs="$with_stabs"
34a86c2b
NN
7800else
7801 stabs=no
b61ff9c8 7802fi;
cafe096b 7803
34a86c2b 7804# Determine whether or not multilibs are enabled.
b61ff9c8 7805# Check whether --enable-multilib or --disable-multilib was given.
34a86c2b 7806if test "${enable_multilib+set}" = set; then
b61ff9c8
BS
7807 enableval="$enable_multilib"
7808
34a86c2b
NN
7809else
7810 enable_multilib=yes
b61ff9c8 7811fi;
75e93faa 7812
34a86c2b 7813
414d23ae 7814# Enable __cxa_atexit for C++.
b61ff9c8 7815# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
414d23ae 7816if test "${enable___cxa_atexit+set}" = set; then
b61ff9c8 7817 enableval="$enable___cxa_atexit"
75e93faa 7818
b61ff9c8 7819fi;
75e93faa 7820
486aa804 7821# Enable C extension for decimal float if target supports it.
b61ff9c8 7822# Check whether --enable-decimal-float or --disable-decimal-float was given.
486aa804 7823if test "${enable_decimal_float+set}" = set; then
b61ff9c8
BS
7824 enableval="$enable_decimal_float"
7825
79b87c74
MM
7826 case $enable_decimal_float in
7827 yes | no | bid | dpd) ;;
7828 *) { { echo "$as_me:$LINENO: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
7829Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&5
7830echo "$as_me: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
7831Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&2;}
7832 { (exit 1); exit 1; }; } ;;
7833 esac
7834
7835else
7836
7837 case $target in
7838 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
a4a9df5f 7839 enable_decimal_float=yes
486aa804
BE
7840 ;;
7841 *)
7842 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
7843echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
7844 enable_decimal_float=no
7845 ;;
79b87c74 7846 esac
486aa804 7847
b61ff9c8 7848fi;
486aa804 7849
79b87c74
MM
7850dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
7851
7852cat >>confdefs.h <<_ACEOF
7853#define ENABLE_DECIMAL_FLOAT $dfp
7854_ACEOF
7855
7856
7857# x86's use BID format instead of DPD
7858case x$enable_decimal_float in
7859 xyes)
7860 case $target in
7861 i?86*-*-linux* | x86_64*-*-linux*)
7862 enable_decimal_float=bid
7863 ;;
7864 *)
7865 enable_decimal_float=dpd
7866 ;;
7867 esac
7868 ;;
7869 xno)
7870 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
7871 # dependency on libdecnumber.
7872 enable_decimal_float=dpd
7873 ;;
7874esac
486aa804
BE
7875
7876
79b87c74 7877bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
486aa804
BE
7878
7879cat >>confdefs.h <<_ACEOF
79b87c74 7880#define ENABLE_DECIMAL_BID_FORMAT $bid
486aa804
BE
7881_ACEOF
7882
7883
ab22c1fa 7884# Enable C extension for fixed-point arithmetic.
b61ff9c8 7885# Check whether --enable-fixed-point or --disable-fixed-point was given.
ab22c1fa 7886if test "${enable_fixed_point+set}" = set; then
b61ff9c8
BS
7887 enableval="$enable_fixed_point"
7888
ab22c1fa
CF
7889
7890else
7891
7892 case $target in
7893 mips*-*-*)
d5be1dd4 7894 case $host in
a0e527e3
RW
7895 mips*-sgi-irix*)
7896 { echo "$as_me:$LINENO: WARNING: fixed-point is not supported on IRIX" >&5
7897echo "$as_me: WARNING: fixed-point is not supported on IRIX" >&2;}
d5be1dd4
RS
7898 enable_fixed_point=no
7899 ;;
7900 *)
7901 enable_fixed_point=yes
7902 ;;
7903 esac
ab22c1fa
CF
7904 ;;
7905 *)
7906 { echo "$as_me:$LINENO: WARNING: fixed-point is not supported for this target" >&5
7907echo "$as_me: WARNING: fixed-point is not supported for this target" >&2;}
7908 enable_fixed_point=no
7909 ;;
7910 esac
7911
b61ff9c8 7912fi;
ab22c1fa
CF
7913
7914
7915fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi`
7916
7917cat >>confdefs.h <<_ACEOF
7918#define ENABLE_FIXED_POINT $fixedpoint
7919_ACEOF
7920
7921
414d23ae
HPN
7922# Enable threads
7923# Pass with no value to take the default
7924# Pass with a value to specify a thread package
b61ff9c8 7925# Check whether --enable-threads or --disable-threads was given.
414d23ae 7926if test "${enable_threads+set}" = set; then
b61ff9c8
BS
7927 enableval="$enable_threads"
7928
414d23ae
HPN
7929else
7930 enable_threads=''
b61ff9c8 7931fi;
2f41c1d6 7932
b61ff9c8 7933# Check whether --enable-tls or --disable-tls was given.
1a4b763e 7934if test "${enable_tls+set}" = set; then
b61ff9c8
BS
7935 enableval="$enable_tls"
7936
8dea1cca
DD
7937 case $enable_tls in
7938 yes | no) ;;
7939 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
7940Valid choices are 'yes' and 'no'." >&5
7941echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
7942Valid choices are 'yes' and 'no'." >&2;}
7943 { (exit 1); exit 1; }; } ;;
7944 esac
7945
7946else
7947 enable_tls=''
b61ff9c8 7948fi;
1a4b763e 7949
b61ff9c8 7950# Check whether --enable-objc-gc or --disable-objc-gc was given.
414d23ae 7951if test "${enable_objc_gc+set}" = set; then
b61ff9c8
BS
7952 enableval="$enable_objc_gc"
7953 if test x$enable_objc_gc = xno; then
414d23ae
HPN
7954 objc_boehm_gc=''
7955else
7956 objc_boehm_gc=1
7957fi
7958else
7959 objc_boehm_gc=''
b61ff9c8 7960fi;
75e93faa 7961
a6ccdbab 7962
b61ff9c8 7963# Check whether --with-dwarf2 or --without-dwarf2 was given.
414d23ae 7964if test "${with_dwarf2+set}" = set; then
b61ff9c8
BS
7965 withval="$with_dwarf2"
7966 dwarf2="$with_dwarf2"
75e93faa 7967else
414d23ae 7968 dwarf2=no
b61ff9c8 7969fi;
2f41c1d6 7970
b61ff9c8 7971# Check whether --enable-shared or --disable-shared was given.
1a4b763e 7972if test "${enable_shared+set}" = set; then
b61ff9c8
BS
7973 enableval="$enable_shared"
7974
414d23ae
HPN
7975 case $enable_shared in
7976 yes | no) ;;
7977 *)
7978 enable_shared=no
7979 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
7980 for pkg in $enableval; do
7981 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
7982 enable_shared=yes
7983 fi
7984 done
7985 IFS="$ac_save_ifs"
7986 ;;
7987 esac
7988
75e93faa 7989else
414d23ae 7990 enable_shared=yes
b61ff9c8 7991fi;
703d89ab 7992
ab22c1fa 7993
1a4b763e 7994
b61ff9c8 7995# Check whether --with-build-sysroot or --without-build-sysroot was given.
160633c6 7996if test "${with_build_sysroot+set}" = set; then
b61ff9c8 7997 withval="$with_build_sysroot"
160633c6 7998
b61ff9c8 7999fi;
160633c6
MM
8000
8001
b61ff9c8 8002# Check whether --with-sysroot or --without-sysroot was given.
4977bab6 8003if test "${with_sysroot+set}" = set; then
b61ff9c8
BS
8004 withval="$with_sysroot"
8005
4977bab6 8006 case ${with_sysroot} in
caa55b1e 8007 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
8008 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
8009 esac
ba479fd2 8010
4977bab6 8011 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14da6073 8012 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
4977bab6 8013
748670c2
RS
8014 if test "x$prefix" = xNONE; then
8015 test_prefix=/usr/local
8016 else
8017 test_prefix=$prefix
8018 fi
047d636f 8019 if test "x$exec_prefix" = xNONE; then
748670c2 8020 test_exec_prefix=$test_prefix
047d636f 8021 else
748670c2 8022 test_exec_prefix=$exec_prefix
047d636f
DJ
8023 fi
8024 case ${TARGET_SYSTEM_ROOT} in
91710e62 8025 "${test_prefix}"|"${test_prefix}/"*|\
748670c2
RS
8026 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
8027 '${prefix}'|'${prefix}/'*|\
91710e62 8028 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
8029 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
8030 TARGET_SYSTEM_ROOT_DEFINE="$t"
8031 ;;
8032 esac
8033
4977bab6 8034else
ba479fd2 8035
4977bab6 8036 TARGET_SYSTEM_ROOT=
db720d9a 8037 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
8038 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
8039
b61ff9c8 8040fi;
4977bab6
ZW
8041
8042
8043
8044
d1bd0ded 8045# Build with intermodule optimisations
b61ff9c8 8046# Check whether --enable-intermodule or --disable-intermodule was given.
d1bd0ded 8047if test "${enable_intermodule+set}" = set; then
b61ff9c8
BS
8048 enableval="$enable_intermodule"
8049 case ${enable_intermodule} in
0c46c5c7
KC
8050 yes) onestep="-onestep";;
8051 *) onestep="";;
d1bd0ded 8052esac
0c46c5c7
KC
8053else
8054 onestep=""
b61ff9c8 8055fi;
2f41c1d6
PB
8056
8057
8058
8059
b61ff9c8 8060# Check whether --with-pkgversion or --without-pkgversion was given.
2f41c1d6 8061if test "${with_pkgversion+set}" = set; then
b61ff9c8
BS
8062 withval="$with_pkgversion"
8063 case "$withval" in
2f41c1d6
PB
8064 yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
8065echo "$as_me: error: package version not specified" >&2;}
8066 { (exit 1); exit 1; }; } ;;
8067 no) PKGVERSION= ;;
8068 *) PKGVERSION="($withval) " ;;
8069 esac
8070else
8071 PKGVERSION="(GCC) "
8072
b61ff9c8 8073fi;
2f41c1d6
PB
8074
8075
8076
1a4b763e 8077
b61ff9c8 8078# Check whether --with-bugurl or --without-bugurl was given.
2f41c1d6 8079if test "${with_bugurl+set}" = set; then
b61ff9c8
BS
8080 withval="$with_bugurl"
8081 case "$withval" in
2f41c1d6
PB
8082 yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
8083echo "$as_me: error: bug URL not specified" >&2;}
8084 { (exit 1); exit 1; }; } ;;
8085 no) BUGURL=
8086 ;;
8087 *) BUGURL="$withval"
8088 ;;
8089 esac
8090else
8091 BUGURL="http://gcc.gnu.org/bugs.html"
8092
b61ff9c8 8093fi;
2f41c1d6
PB
8094 case ${BUGURL} in
8095 "")
8096 REPORT_BUGS_TO=
8097 REPORT_BUGS_TEXI=
8098 ;;
8099 *)
8100 REPORT_BUGS_TO="<$BUGURL>"
8101 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8102 ;;
8103 esac;
8104
ab22c1fa 8105
d1bd0ded
GK
8106
8107
f3c9f174
NN
8108# Sanity check enable_languages in case someone does not run the toplevel
8109# configure # script.
b61ff9c8 8110# Check whether --enable-languages or --disable-languages was given.
f3c9f174 8111if test "${enable_languages+set}" = set; then
b61ff9c8
BS
8112 enableval="$enable_languages"
8113 case ,${enable_languages}, in
f3c9f174
NN
8114 ,,|,yes,)
8115 # go safe -- we cannot be much sure without the toplevel
8116 # configure's
8117 # analysis of which target libs are present and usable
8118 enable_languages=c
8119 ;;
8120 *,all,*)
8121 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
8122echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
8123 { (exit 1); exit 1; }; }
8124 ;;
8125 *,c,*)
8126 ;;
8127 *)
8128 enable_languages=c,${enable_languages}
8129 ;;
8130esac
8131else
8132 enable_languages=c
b61ff9c8 8133fi;
f3c9f174 8134
9288b845
CD
8135# Used by documentation targets
8136
8137
8138
f3c9f174 8139
73458fb7
NN
8140# -------------------------
8141# Checks for other programs
8142# -------------------------
5b67ad6f 8143
b61ff9c8
BS
8144echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8145echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
8146set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
8147if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
ba479fd2 8148 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 8149else
ba479fd2 8150 cat >conftest.make <<\_ACEOF
e9a25f70 8151all:
b61ff9c8 8152 @echo 'ac_maketemp="$(MAKE)"'
ba479fd2 8153_ACEOF
e9a25f70 8154# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
b61ff9c8
BS
8155eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
8156if test -n "$ac_maketemp"; then
8157 eval ac_cv_prog_make_${ac_make}_set=yes
8158else
8159 eval ac_cv_prog_make_${ac_make}_set=no
8160fi
ba479fd2 8161rm -f conftest.make
e9a25f70 8162fi
b61ff9c8
BS
8163if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
8164 echo "$as_me:$LINENO: result: yes" >&5
8165echo "${ECHO_T}yes" >&6
e9a25f70
JL
8166 SET_MAKE=
8167else
b61ff9c8
BS
8168 echo "$as_me:$LINENO: result: no" >&5
8169echo "${ECHO_T}no" >&6
e9a25f70
JL
8170 SET_MAKE="MAKE=${MAKE-make}"
8171fi
8172
8173
861bb6c1 8174# Find some useful tools
ba479fd2 8175for ac_prog in gawk mawk nawk awk
861bb6c1 8176do
ba479fd2 8177 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 8178set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
8179echo "$as_me:$LINENO: checking for $ac_word" >&5
8180echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8181if test "${ac_cv_prog_AWK+set}" = set; then
8182 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
8183else
8184 if test -n "$AWK"; then
8185 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8186else
ba479fd2
NN
8187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8188for as_dir in $PATH
8189do
8190 IFS=$as_save_IFS
8191 test -z "$as_dir" && as_dir=.
8192 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8193 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8194 ac_cv_prog_AWK="$ac_prog"
8195 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8196 break 2
8197 fi
8198done
8199done
8200
861bb6c1
JL
8201fi
8202fi
ba479fd2 8203AWK=$ac_cv_prog_AWK
861bb6c1 8204if test -n "$AWK"; then
b61ff9c8
BS
8205 echo "$as_me:$LINENO: result: $AWK" >&5
8206echo "${ECHO_T}$AWK" >&6
861bb6c1 8207else
b61ff9c8
BS
8208 echo "$as_me:$LINENO: result: no" >&5
8209echo "${ECHO_T}no" >&6
861bb6c1
JL
8210fi
8211
ba479fd2 8212 test -n "$AWK" && break
861bb6c1
JL
8213done
8214
776dc15d 8215# We need awk to create options.c and options.h.
2c4902b9
NN
8216# Bail out if it's missing.
8217case ${AWK} in
ba479fd2
NN
8218 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
8219echo "$as_me: error: can't build without awk, bailing out" >&2;}
8220 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
8221esac
8222
b61ff9c8
BS
8223echo "$as_me:$LINENO: checking whether ln -s works" >&5
8224echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
ba479fd2
NN
8225if test "${gcc_cv_prog_LN_S+set}" = set; then
8226 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
8227else
8228 rm -f conftestdata_t
8229echo >conftestdata_f
8230if ln -s conftestdata_f conftestdata_t 2>/dev/null
8231then
8232 gcc_cv_prog_LN_S="ln -s"
8233else
8234 if ln conftestdata_f conftestdata_t 2>/dev/null
8235 then
8236 gcc_cv_prog_LN_S=ln
8237 else
35f06ae4
PB
8238 if cp -p conftestdata_f conftestdata_t 2>/dev/null
8239 then
06c3418c 8240 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
8241 else
8242 gcc_cv_prog_LN_S=cp
8243 fi
0a4b6309
RL
8244 fi
8245fi
8246rm -f conftestdata_f conftestdata_t
8247
8248fi
8249LN_S="$gcc_cv_prog_LN_S"
8250if test "$gcc_cv_prog_LN_S" = "ln -s"; then
b61ff9c8
BS
8251 echo "$as_me:$LINENO: result: yes" >&5
8252echo "${ECHO_T}yes" >&6
0a4b6309
RL
8253else
8254 if test "$gcc_cv_prog_LN_S" = "ln"; then
b61ff9c8
BS
8255 echo "$as_me:$LINENO: result: no, using ln" >&5
8256echo "${ECHO_T}no, using ln" >&6
0a4b6309 8257 else
b61ff9c8
BS
8258 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
8259echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
8260 fi
8261fi
8262
b61ff9c8
BS
8263echo "$as_me:$LINENO: checking whether ln works" >&5
8264echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
18fc9bd4
RG
8265if test "${acx_cv_prog_LN+set}" = set; then
8266 echo $ECHO_N "(cached) $ECHO_C" >&6
8267else
8268 rm -f conftestdata_t
8269echo >conftestdata_f
8270if ln conftestdata_f conftestdata_t 2>/dev/null
8271then
8272 acx_cv_prog_LN=ln
8273else
8274 acx_cv_prog_LN=no
8275fi
8276rm -f conftestdata_f conftestdata_t
8277
8278fi
8279if test $acx_cv_prog_LN = no; then
8280 LN="$LN_S"
b61ff9c8
BS
8281 echo "$as_me:$LINENO: result: no, using $LN" >&5
8282echo "${ECHO_T}no, using $LN" >&6
18fc9bd4
RG
8283else
8284 LN="$acx_cv_prog_LN"
b61ff9c8
BS
8285 echo "$as_me:$LINENO: result: yes" >&5
8286echo "${ECHO_T}yes" >&6
18fc9bd4
RG
8287fi
8288
ba479fd2
NN
8289if test -n "$ac_tool_prefix"; then
8290 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8291set dummy ${ac_tool_prefix}ranlib; ac_word=$2
b61ff9c8
BS
8292echo "$as_me:$LINENO: checking for $ac_word" >&5
8293echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8294if test "${ac_cv_prog_RANLIB+set}" = set; then
8295 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
8296else
8297 if test -n "$RANLIB"; then
8298 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8299else
ba479fd2
NN
8300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8301for as_dir in $PATH
8302do
8303 IFS=$as_save_IFS
8304 test -z "$as_dir" && as_dir=.
8305 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8306 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8307 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8308 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8309 break 2
8310 fi
8311done
8312done
8313
6e3f3080
NN
8314fi
8315fi
ba479fd2 8316RANLIB=$ac_cv_prog_RANLIB
6e3f3080 8317if test -n "$RANLIB"; then
b61ff9c8
BS
8318 echo "$as_me:$LINENO: result: $RANLIB" >&5
8319echo "${ECHO_T}$RANLIB" >&6
ba479fd2 8320else
b61ff9c8
BS
8321 echo "$as_me:$LINENO: result: no" >&5
8322echo "${ECHO_T}no" >&6
ba479fd2
NN
8323fi
8324
8325fi
8326if test -z "$ac_cv_prog_RANLIB"; then
8327 ac_ct_RANLIB=$RANLIB
8328 # Extract the first word of "ranlib", so it can be a program name with args.
8329set dummy ranlib; ac_word=$2
b61ff9c8
BS
8330echo "$as_me:$LINENO: checking for $ac_word" >&5
8331echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8332if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8333 echo $ECHO_N "(cached) $ECHO_C" >&6
8334else
8335 if test -n "$ac_ct_RANLIB"; then
8336 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8337else
8338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8339for as_dir in $PATH
8340do
8341 IFS=$as_save_IFS
8342 test -z "$as_dir" && as_dir=.
8343 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8344 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8345 ac_cv_prog_ac_ct_RANLIB="ranlib"
8346 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8347 break 2
8348 fi
8349done
8350done
8351
b61ff9c8 8352 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
ba479fd2
NN
8353fi
8354fi
8355ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8356if test -n "$ac_ct_RANLIB"; then
b61ff9c8
BS
8357 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8358echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 8359else
b61ff9c8
BS
8360 echo "$as_me:$LINENO: result: no" >&5
8361echo "${ECHO_T}no" >&6
ba479fd2
NN
8362fi
8363
b61ff9c8 8364 RANLIB=$ac_ct_RANLIB
ba479fd2
NN
8365else
8366 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
8367fi
8368
343a6100
MM
8369case "${host}" in
8370*-*-darwin*)
8371 # By default, the Darwin ranlib will not treat common symbols as
8372 # definitions when building the archive table of contents. Other
8373 # ranlibs do that; pass an option to the Darwin ranlib that makes
8374 # it behave similarly.
8375 ranlib_flags="-c"
8376 ;;
8377*)
8378 ranlib_flags=""
8379esac
8380
8381
0a4b6309
RL
8382# Find a good install program. We prefer a C program (faster),
8383# so one script is as good as another. But avoid the broken or
8384# incompatible versions:
8385# SysV /etc/install, /usr/sbin/install
8386# SunOS /usr/etc/install
8387# IRIX /sbin/install
8388# AIX /bin/install
8389# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8390# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8391# ./install, which can be erroneously created by make from ./install.sh.
b61ff9c8
BS
8392echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
8393echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 8394if test -z "$INSTALL"; then
ba479fd2
NN
8395if test "${ac_cv_path_install+set}" = set; then
8396 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
8397else
8398 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
8399 for ac_dir in $PATH; do
8400 # Account for people who put trailing slashes in PATH elements.
8401 case "$ac_dir/" in
8402 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
8403 *)
8404 # OSF1 and SCO ODT 3.0 have their own names for install.
8405 for ac_prog in ginstall scoinst install; do
8406 if test -f $ac_dir/$ac_prog; then
8407 if test $ac_prog = install &&
8408 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
8409 # AIX install. It has an incompatible calling convention.
8410 # OSF/1 installbsd also uses dspmsg, but is usable.
8411 :
8412 else
8413 ac_cv_path_install="$ac_dir/$ac_prog -c"
8414 break 2
8415 fi
8416 fi
8417 done
8418 ;;
8419 esac
8420 done
8421 IFS="$ac_save_IFS"
8422
8423fi
8424 if test "${ac_cv_path_install+set}" = set; then
8425 INSTALL="$ac_cv_path_install"
8426 else
8427 # As a last resort, use the slow shell script. We don't cache a
8428 # path for INSTALL within a source directory, because that will
8429 # break other packages using the cache if that directory is
8430 # removed, or if the path is relative.
8431 INSTALL="$ac_install_sh"
8432 fi
8433fi
b61ff9c8
BS
8434echo "$as_me:$LINENO: result: $INSTALL" >&5
8435echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
8436
8437# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8438# It thinks the first close brace ends the variable substitution.
8439test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8440
8441test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8442
861bb6c1 8443
3a000df0 8444# See if cmp has --ignore-initial.
b61ff9c8
BS
8445echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
8446echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
ba479fd2
NN
8447if test "${gcc_cv_prog_cmp_skip+set}" = set; then
8448 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
8449else
8450 echo abfoo >t1
8451 echo cdfoo >t2
269a7343 8452 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
8453 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
8454 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 8455 :
3a000df0
KC
8456 else
8457 gcc_cv_prog_cmp_skip=gnucompare
8458 fi
269a7343
KG
8459 fi
8460 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
8461 if cmp t1 t2 2 2 > /dev/null 2>&1; then
8462 if cmp t1 t2 1 1 > /dev/null 2>&1; then
8463 :
8464 else
8465 gcc_cv_prog_cmp_skip=fastcompare
8466 fi
8467 fi
3a000df0
KC
8468 fi
8469 rm t1 t2
8470
8471fi
b61ff9c8
BS
8472echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
8473echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
8474make_compare_target=$gcc_cv_prog_cmp_skip
8475
8476
8477
73458fb7
NN
8478# See if we have the mktemp command.
8479# Extract the first word of "mktemp", so it can be a program name with args.
8480set dummy mktemp; ac_word=$2
b61ff9c8
BS
8481echo "$as_me:$LINENO: checking for $ac_word" >&5
8482echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8483if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
8484 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8485else
8486 if test -n "$have_mktemp_command"; then
8487 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
8488else
ba479fd2
NN
8489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8490for as_dir in $PATH
8491do
8492 IFS=$as_save_IFS
8493 test -z "$as_dir" && as_dir=.
8494 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8495 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8496 ac_cv_prog_have_mktemp_command="yes"
8497 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8498 break 2
8499 fi
8500done
8501done
8502
73458fb7
NN
8503 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
8504fi
8505fi
ba479fd2 8506have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 8507if test -n "$have_mktemp_command"; then
b61ff9c8
BS
8508 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
8509echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 8510else
b61ff9c8
BS
8511 echo "$as_me:$LINENO: result: no" >&5
8512echo "${ECHO_T}no" >&6
73458fb7
NN
8513fi
8514
8515
7c27e184
PB
8516# See if makeinfo has been installed and is modern enough
8517# that we can use it.
9f18db39 8518
3bbd5a19 8519 # Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 8520set dummy makeinfo; ac_word=$2
b61ff9c8
BS
8521echo "$as_me:$LINENO: checking for $ac_word" >&5
8522echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8523if test "${ac_cv_prog_MAKEINFO+set}" = set; then
8524 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8525else
8526 if test -n "$MAKEINFO"; then
8527 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
8528else
ba479fd2
NN
8529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8530for as_dir in $PATH
8531do
8532 IFS=$as_save_IFS
8533 test -z "$as_dir" && as_dir=.
8534 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8535 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8536 ac_cv_prog_MAKEINFO="makeinfo"
8537 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8538 break 2
8539 fi
8540done
8541done
8542
73458fb7
NN
8543fi
8544fi
ba479fd2 8545MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 8546if test -n "$MAKEINFO"; then
b61ff9c8
BS
8547 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
8548echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 8549else
b61ff9c8
BS
8550 echo "$as_me:$LINENO: result: no" >&5
8551echo "${ECHO_T}no" >&6
73458fb7
NN
8552fi
8553
3bbd5a19
PB
8554 if test -n "$MAKEINFO"; then
8555 # Found it, now check the version.
b61ff9c8
BS
8556 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
8557echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
ba479fd2
NN
8558if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
8559 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7 8560else
3bbd5a19
PB
8561 ac_prog_version=`eval $MAKEINFO --version 2>&1 |
8562 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
8563
8564 case $ac_prog_version in
8565 '') gcc_cv_prog_makeinfo_modern=no;;
7326a39e 8566 4.[7-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;;
3bbd5a19
PB
8567 *) gcc_cv_prog_makeinfo_modern=no;;
8568 esac
73458fb7
NN
8569
8570fi
b61ff9c8
BS
8571echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
8572echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
3bbd5a19
PB
8573 else
8574 gcc_cv_prog_makeinfo_modern=no
8575 fi
8576 if test $gcc_cv_prog_makeinfo_modern = no; then
8577 MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo"
8578 fi
73458fb7 8579
73458fb7 8580if test $gcc_cv_prog_makeinfo_modern = no; then
ba479fd2
NN
8581 { echo "$as_me:$LINENO: WARNING:
8582*** Makeinfo is missing or too old.
8583*** Info documentation will not be built." >&5
8584echo "$as_me: WARNING:
cafe096b 8585*** Makeinfo is missing or too old.
ba479fd2 8586*** Info documentation will not be built." >&2;}
73458fb7
NN
8587 BUILD_INFO=
8588else
ba479fd2 8589 BUILD_INFO=info
73458fb7
NN
8590fi
8591
7c27e184 8592
73458fb7 8593# Is pod2man recent enough to regenerate manpages?
b61ff9c8
BS
8594echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
8595echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 8596if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
b61ff9c8
BS
8597 echo "$as_me:$LINENO: result: yes" >&5
8598echo "${ECHO_T}yes" >&6
ba479fd2 8599 GENERATED_MANPAGES=generated-manpages
73458fb7 8600else
b61ff9c8
BS
8601 echo "$as_me:$LINENO: result: no" >&5
8602echo "${ECHO_T}no" >&6
73458fb7
NN
8603 GENERATED_MANPAGES=
8604fi
8605
7c27e184 8606
3bbd5a19
PB
8607MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
8608
73458fb7 8609# How about lex?
7c27e184
PB
8610for ac_prog in flex
8611do
8612 # Extract the first word of "$ac_prog", so it can be a program name with args.
8613set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
8614echo "$as_me:$LINENO: checking for $ac_word" >&5
8615echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8616if test "${ac_cv_prog_FLEX+set}" = set; then
8617 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8618else
8619 if test -n "$FLEX"; then
8620 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
8621else
ba479fd2
NN
8622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8623for as_dir in $PATH
8624do
8625 IFS=$as_save_IFS
8626 test -z "$as_dir" && as_dir=.
8627 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8628 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 8629 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
8630 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8631 break 2
8632 fi
8633done
8634done
8635
73458fb7
NN
8636fi
8637fi
ba479fd2 8638FLEX=$ac_cv_prog_FLEX
73458fb7 8639if test -n "$FLEX"; then
b61ff9c8
BS
8640 echo "$as_me:$LINENO: result: $FLEX" >&5
8641echo "${ECHO_T}$FLEX" >&6
73458fb7 8642else
b61ff9c8
BS
8643 echo "$as_me:$LINENO: result: no" >&5
8644echo "${ECHO_T}no" >&6
73458fb7
NN
8645fi
8646
7c27e184
PB
8647 test -n "$FLEX" && break
8648done
8649test -n "$FLEX" || FLEX="$MISSING flex"
8650
73458fb7
NN
8651
8652# Bison?
7c27e184
PB
8653for ac_prog in bison
8654do
8655 # Extract the first word of "$ac_prog", so it can be a program name with args.
8656set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
8657echo "$as_me:$LINENO: checking for $ac_word" >&5
8658echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8659if test "${ac_cv_prog_BISON+set}" = set; then
8660 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8661else
8662 if test -n "$BISON"; then
8663 ac_cv_prog_BISON="$BISON" # Let the user override the test.
8664else
ba479fd2
NN
8665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8666for as_dir in $PATH
8667do
8668 IFS=$as_save_IFS
8669 test -z "$as_dir" && as_dir=.
8670 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8671 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 8672 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
8673 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8674 break 2
8675 fi
8676done
8677done
8678
73458fb7
NN
8679fi
8680fi
ba479fd2 8681BISON=$ac_cv_prog_BISON
73458fb7 8682if test -n "$BISON"; then
b61ff9c8
BS
8683 echo "$as_me:$LINENO: result: $BISON" >&5
8684echo "${ECHO_T}$BISON" >&6
73458fb7 8685else
b61ff9c8
BS
8686 echo "$as_me:$LINENO: result: no" >&5
8687echo "${ECHO_T}no" >&6
73458fb7
NN
8688fi
8689
7c27e184
PB
8690 test -n "$BISON" && break
8691done
8692test -n "$BISON" || BISON="$MISSING bison"
8693
8694
8695# Binutils are not build modules, unlike bison/flex/makeinfo. So we
8696# check for build == host before using them.
73458fb7 8697
f6a874ac 8698# NM
414adbdd
GK
8699if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
8700 && test -d ../binutils ; then
f6a874ac
JW
8701 NM='$(objdir)/../binutils/nm-new'
8702else
8703 # Extract the first word of "nm", so it can be a program name with args.
8704set dummy nm; ac_word=$2
b61ff9c8
BS
8705echo "$as_me:$LINENO: checking for $ac_word" >&5
8706echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
f6a874ac
JW
8707if test "${ac_cv_prog_NM+set}" = set; then
8708 echo $ECHO_N "(cached) $ECHO_C" >&6
8709else
8710 if test -n "$NM"; then
8711 ac_cv_prog_NM="$NM" # Let the user override the test.
8712else
8713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8714for as_dir in $PATH
8715do
8716 IFS=$as_save_IFS
8717 test -z "$as_dir" && as_dir=.
8718 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8719 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f6a874ac
JW
8720 ac_cv_prog_NM="nm"
8721 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8722 break 2
8723 fi
8724done
8725done
8726
8727 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
8728fi
8729fi
8730NM=$ac_cv_prog_NM
8731if test -n "$NM"; then
b61ff9c8
BS
8732 echo "$as_me:$LINENO: result: $NM" >&5
8733echo "${ECHO_T}$NM" >&6
f6a874ac 8734else
b61ff9c8
BS
8735 echo "$as_me:$LINENO: result: no" >&5
8736echo "${ECHO_T}no" >&6
f6a874ac
JW
8737fi
8738
8739fi
8740
8741# AR
414adbdd
GK
8742if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
8743 && test -d ../binutils ; then
f6a874ac
JW
8744 AR='$(objdir)/../binutils/ar'
8745else
8746 # Extract the first word of "ar", so it can be a program name with args.
8747set dummy ar; ac_word=$2
b61ff9c8
BS
8748echo "$as_me:$LINENO: checking for $ac_word" >&5
8749echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
f6a874ac
JW
8750if test "${ac_cv_prog_AR+set}" = set; then
8751 echo $ECHO_N "(cached) $ECHO_C" >&6
8752else
8753 if test -n "$AR"; then
8754 ac_cv_prog_AR="$AR" # Let the user override the test.
8755else
8756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8757for as_dir in $PATH
8758do
8759 IFS=$as_save_IFS
8760 test -z "$as_dir" && as_dir=.
8761 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8762 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f6a874ac
JW
8763 ac_cv_prog_AR="ar"
8764 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8765 break 2
8766 fi
8767done
8768done
8769
8770 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
8771fi
8772fi
8773AR=$ac_cv_prog_AR
8774if test -n "$AR"; then
b61ff9c8
BS
8775 echo "$as_me:$LINENO: result: $AR" >&5
8776echo "${ECHO_T}$AR" >&6
f6a874ac 8777else
b61ff9c8
BS
8778 echo "$as_me:$LINENO: result: no" >&5
8779echo "${ECHO_T}no" >&6
f6a874ac
JW
8780fi
8781
8782fi
8783
8784
73458fb7
NN
8785# --------------------
8786# Checks for C headers
8787# --------------------
8788
ca9bc441
NN
8789# Need to reject headers which give warnings, so that the -Werror bootstrap
8790# works later. *sigh* This needs to come before all header checks.
18fc9bd4 8791
ca9bc441
NN
8792ac_c_preproc_warn_flag=yes
8793
b61ff9c8
BS
8794echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8795echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
ba479fd2
NN
8796if test "${ac_cv_header_stdc+set}" = set; then
8797 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8798else
ba479fd2 8799 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8800/* confdefs.h. */
8801_ACEOF
8802cat confdefs.h >>conftest.$ac_ext
8803cat >>conftest.$ac_ext <<_ACEOF
8804/* end confdefs.h. */
956d6950
JL
8805#include <stdlib.h>
8806#include <stdarg.h>
8807#include <string.h>
8808#include <float.h>
ba479fd2
NN
8809
8810int
8811main ()
8812{
8813
8814 ;
8815 return 0;
8816}
8817_ACEOF
8818rm -f conftest.$ac_objext
b61ff9c8
BS
8819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8820 (eval $ac_compile) 2>conftest.er1
ba479fd2 8821 ac_status=$?
86da66b5
HPN
8822 grep -v '^ *+' conftest.er1 >conftest.err
8823 rm -f conftest.er1
8824 cat conftest.err >&5
ba479fd2 8825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8826 (exit $ac_status); } &&
8827 { ac_try='test -z "$ac_c_werror_flag"
8828 || test ! -s conftest.err'
8829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8830 (eval $ac_try) 2>&5
8831 ac_status=$?
8832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8833 (exit $ac_status); }; } &&
8834 { ac_try='test -s conftest.$ac_objext'
8835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8836 (eval $ac_try) 2>&5
8837 ac_status=$?
8838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8839 (exit $ac_status); }; }; then
956d6950
JL
8840 ac_cv_header_stdc=yes
8841else
ba479fd2
NN
8842 echo "$as_me: failed program was:" >&5
8843sed 's/^/| /' conftest.$ac_ext >&5
8844
b61ff9c8 8845ac_cv_header_stdc=no
956d6950 8846fi
b61ff9c8 8847rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
8848
8849if test $ac_cv_header_stdc = yes; then
8850 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 8851 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8852/* confdefs.h. */
8853_ACEOF
8854cat confdefs.h >>conftest.$ac_ext
8855cat >>conftest.$ac_ext <<_ACEOF
8856/* end confdefs.h. */
956d6950 8857#include <string.h>
ba479fd2
NN
8858
8859_ACEOF
956d6950 8860if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8861 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
8862 :
8863else
956d6950
JL
8864 ac_cv_header_stdc=no
8865fi
8866rm -f conftest*
8867
8868fi
8869
8870if test $ac_cv_header_stdc = yes; then
8871 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 8872 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8873/* confdefs.h. */
8874_ACEOF
8875cat confdefs.h >>conftest.$ac_ext
8876cat >>conftest.$ac_ext <<_ACEOF
8877/* end confdefs.h. */
956d6950 8878#include <stdlib.h>
ba479fd2
NN
8879
8880_ACEOF
956d6950 8881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8882 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
8883 :
8884else
956d6950
JL
8885 ac_cv_header_stdc=no
8886fi
8887rm -f conftest*
8888
8889fi
8890
8891if test $ac_cv_header_stdc = yes; then
8892 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 8893 if test "$cross_compiling" = yes; then
956d6950
JL
8894 :
8895else
ba479fd2 8896 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8897/* confdefs.h. */
8898_ACEOF
8899cat confdefs.h >>conftest.$ac_ext
8900cat >>conftest.$ac_ext <<_ACEOF
8901/* end confdefs.h. */
956d6950 8902#include <ctype.h>
ba479fd2
NN
8903#if ((' ' & 0x0FF) == 0x020)
8904# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8905# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8906#else
8907# define ISLOWER(c) \
86da66b5
HPN
8908 (('a' <= (c) && (c) <= 'i') \
8909 || ('j' <= (c) && (c) <= 'r') \
8910 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
8911# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8912#endif
63cf211a 8913
ba479fd2
NN
8914#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8915int
8916main ()
8917{
8918 int i;
8919 for (i = 0; i < 256; i++)
8920 if (XOR (islower (i), ISLOWER (i))
86da66b5 8921 || toupper (i) != TOUPPER (i))
b61ff9c8
BS
8922 exit(2);
8923 exit (0);
ba479fd2
NN
8924}
8925_ACEOF
8926rm -f conftest$ac_exeext
b61ff9c8
BS
8927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8928 (eval $ac_link) 2>&5
ba479fd2
NN
8929 ac_status=$?
8930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8931 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
8932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8933 (eval $ac_try) 2>&5
ba479fd2
NN
8934 ac_status=$?
8935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8936 (exit $ac_status); }; }; then
956d6950
JL
8937 :
8938else
ba479fd2
NN
8939 echo "$as_me: program exited with status $ac_status" >&5
8940echo "$as_me: failed program was:" >&5
8941sed 's/^/| /' conftest.$ac_ext >&5
8942
8943( exit $ac_status )
8944ac_cv_header_stdc=no
956d6950 8945fi
b61ff9c8 8946rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 8947fi
956d6950
JL
8948fi
8949fi
b61ff9c8
BS
8950echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8951echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 8952if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
8953
8954cat >>confdefs.h <<\_ACEOF
956d6950 8955#define STDC_HEADERS 1
ba479fd2 8956_ACEOF
956d6950
JL
8957
8958fi
8959
b61ff9c8
BS
8960echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
8961echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
ba479fd2
NN
8962if test "${ac_cv_header_time+set}" = set; then
8963 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8964else
ba479fd2 8965 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8966/* confdefs.h. */
8967_ACEOF
8968cat confdefs.h >>conftest.$ac_ext
8969cat >>conftest.$ac_ext <<_ACEOF
8970/* end confdefs.h. */
956d6950
JL
8971#include <sys/types.h>
8972#include <sys/time.h>
8973#include <time.h>
ba479fd2
NN
8974
8975int
8976main ()
8977{
8978if ((struct tm *) 0)
8979return 0;
8980 ;
8981 return 0;
8982}
8983_ACEOF
8984rm -f conftest.$ac_objext
b61ff9c8
BS
8985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8986 (eval $ac_compile) 2>conftest.er1
ba479fd2 8987 ac_status=$?
86da66b5
HPN
8988 grep -v '^ *+' conftest.er1 >conftest.err
8989 rm -f conftest.er1
8990 cat conftest.err >&5
ba479fd2 8991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8992 (exit $ac_status); } &&
8993 { ac_try='test -z "$ac_c_werror_flag"
8994 || test ! -s conftest.err'
8995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8996 (eval $ac_try) 2>&5
8997 ac_status=$?
8998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8999 (exit $ac_status); }; } &&
9000 { ac_try='test -s conftest.$ac_objext'
9001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9002 (eval $ac_try) 2>&5
9003 ac_status=$?
9004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9005 (exit $ac_status); }; }; then
956d6950
JL
9006 ac_cv_header_time=yes
9007else
ba479fd2
NN
9008 echo "$as_me: failed program was:" >&5
9009sed 's/^/| /' conftest.$ac_ext >&5
9010
b61ff9c8 9011ac_cv_header_time=no
956d6950 9012fi
b61ff9c8 9013rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 9014fi
b61ff9c8
BS
9015echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
9016echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 9017if test $ac_cv_header_time = yes; then
ba479fd2
NN
9018
9019cat >>confdefs.h <<\_ACEOF
956d6950 9020#define TIME_WITH_SYS_TIME 1
ba479fd2 9021_ACEOF
956d6950
JL
9022
9023fi
9024
b61ff9c8
BS
9025echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
9026echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
18fc9bd4
RG
9027if test "${gcc_cv_header_string+set}" = set; then
9028 echo $ECHO_N "(cached) $ECHO_C" >&6
9029else
9030 cat >conftest.$ac_ext <<_ACEOF
9031/* confdefs.h. */
9032_ACEOF
9033cat confdefs.h >>conftest.$ac_ext
9034cat >>conftest.$ac_ext <<_ACEOF
9035/* end confdefs.h. */
9036#include <string.h>
9037#include <strings.h>
9038int
9039main ()
9040{
9041
9042 ;
9043 return 0;
9044}
9045_ACEOF
9046rm -f conftest.$ac_objext
b61ff9c8
BS
9047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9048 (eval $ac_compile) 2>conftest.er1
18fc9bd4
RG
9049 ac_status=$?
9050 grep -v '^ *+' conftest.er1 >conftest.err
9051 rm -f conftest.er1
9052 cat conftest.err >&5
9053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9054 (exit $ac_status); } &&
9055 { ac_try='test -z "$ac_c_werror_flag"
9056 || test ! -s conftest.err'
9057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9058 (eval $ac_try) 2>&5
9059 ac_status=$?
9060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9061 (exit $ac_status); }; } &&
9062 { ac_try='test -s conftest.$ac_objext'
9063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9064 (eval $ac_try) 2>&5
9065 ac_status=$?
9066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9067 (exit $ac_status); }; }; then
18fc9bd4
RG
9068 gcc_cv_header_string=yes
9069else
9070 echo "$as_me: failed program was:" >&5
9071sed 's/^/| /' conftest.$ac_ext >&5
9072
b61ff9c8 9073gcc_cv_header_string=no
18fc9bd4 9074fi
b61ff9c8 9075rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18fc9bd4 9076fi
b61ff9c8
BS
9077echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
9078echo "${ECHO_T}$gcc_cv_header_string" >&6
18fc9bd4
RG
9079if test $gcc_cv_header_string = yes; then
9080
9081cat >>confdefs.h <<\_ACEOF
9082#define STRING_WITH_STRINGS 1
9083_ACEOF
9084
9085fi
9086
b61ff9c8
BS
9087echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
9088echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
ba479fd2
NN
9089if test "${ac_cv_header_sys_wait_h+set}" = set; then
9090 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 9091else
ba479fd2 9092 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9093/* confdefs.h. */
9094_ACEOF
9095cat confdefs.h >>conftest.$ac_ext
9096cat >>conftest.$ac_ext <<_ACEOF
9097/* end confdefs.h. */
e9831ca0
KG
9098#include <sys/types.h>
9099#include <sys/wait.h>
9100#ifndef WEXITSTATUS
b61ff9c8 9101# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
9102#endif
9103#ifndef WIFEXITED
ba479fd2 9104# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 9105#endif
ba479fd2
NN
9106
9107int
9108main ()
9109{
9110 int s;
9111 wait (&s);
9112 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9113 ;
9114 return 0;
9115}
9116_ACEOF
9117rm -f conftest.$ac_objext
b61ff9c8
BS
9118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9119 (eval $ac_compile) 2>conftest.er1
ba479fd2 9120 ac_status=$?
86da66b5
HPN
9121 grep -v '^ *+' conftest.er1 >conftest.err
9122 rm -f conftest.er1
9123 cat conftest.err >&5
ba479fd2 9124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9125 (exit $ac_status); } &&
9126 { ac_try='test -z "$ac_c_werror_flag"
9127 || test ! -s conftest.err'
9128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9129 (eval $ac_try) 2>&5
9130 ac_status=$?
9131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9132 (exit $ac_status); }; } &&
9133 { ac_try='test -s conftest.$ac_objext'
9134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9135 (eval $ac_try) 2>&5
9136 ac_status=$?
9137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9138 (exit $ac_status); }; }; then
e9831ca0
KG
9139 ac_cv_header_sys_wait_h=yes
9140else
ba479fd2
NN
9141 echo "$as_me: failed program was:" >&5
9142sed 's/^/| /' conftest.$ac_ext >&5
9143
b61ff9c8 9144ac_cv_header_sys_wait_h=no
e9831ca0 9145fi
b61ff9c8 9146rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 9147fi
b61ff9c8
BS
9148echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
9149echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 9150if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
9151
9152cat >>confdefs.h <<\_ACEOF
e9831ca0 9153#define HAVE_SYS_WAIT_H 1
ba479fd2 9154_ACEOF
6e3f3080 9155
63cf211a 9156fi
6e3f3080 9157
ba479fd2
NN
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
dfb77e37
KC
9179
9180for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 9181 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 9182 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 9183 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 9184do
ba479fd2 9185as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b61ff9c8
BS
9186echo "$as_me:$LINENO: checking for $ac_header" >&5
9187echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9188if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 9189 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9190else
18fc9bd4 9191 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9192/* confdefs.h. */
9193_ACEOF
9194cat confdefs.h >>conftest.$ac_ext
9195cat >>conftest.$ac_ext <<_ACEOF
9196/* end confdefs.h. */
9197#include <$ac_header>
9198_ACEOF
b61ff9c8
BS
9199if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9200 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9201 ac_status=$?
9202 grep -v '^ *+' conftest.er1 >conftest.err
9203 rm -f conftest.er1
9204 cat conftest.err >&5
9205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9206 (exit $ac_status); } >/dev/null; then
9207 if test -s conftest.err; then
9208 ac_cpp_err=$ac_c_preproc_warn_flag
9209 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9210 else
9211 ac_cpp_err=
9212 fi
9213else
9214 ac_cpp_err=yes
9215fi
9216if test -z "$ac_cpp_err"; then
18fc9bd4 9217 eval "$as_ac_Header=yes"
ba479fd2
NN
9218else
9219 echo "$as_me: failed program was:" >&5
9220sed 's/^/| /' conftest.$ac_ext >&5
9221
18fc9bd4 9222 eval "$as_ac_Header=no"
ba479fd2
NN
9223fi
9224rm -f conftest.err conftest.$ac_ext
6e3f3080 9225fi
b61ff9c8
BS
9226echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9227echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
9228if test `eval echo '${'$as_ac_Header'}'` = yes; then
9229 cat >>confdefs.h <<_ACEOF
9230#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9231_ACEOF
9232
956d6950
JL
9233fi
9234done
9235
9236
f24af81b 9237# Check for thread headers.
b61ff9c8
BS
9238echo "$as_me:$LINENO: checking for thread.h" >&5
9239echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
ba479fd2
NN
9240if test "${ac_cv_header_thread_h+set}" = set; then
9241 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9242else
18fc9bd4 9243 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9244/* confdefs.h. */
9245_ACEOF
9246cat confdefs.h >>conftest.$ac_ext
9247cat >>conftest.$ac_ext <<_ACEOF
9248/* end confdefs.h. */
9249#include <thread.h>
9250_ACEOF
b61ff9c8
BS
9251if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9252 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9253 ac_status=$?
9254 grep -v '^ *+' conftest.er1 >conftest.err
9255 rm -f conftest.er1
9256 cat conftest.err >&5
9257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9258 (exit $ac_status); } >/dev/null; then
9259 if test -s conftest.err; then
9260 ac_cpp_err=$ac_c_preproc_warn_flag
9261 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9262 else
9263 ac_cpp_err=
9264 fi
9265else
9266 ac_cpp_err=yes
9267fi
9268if test -z "$ac_cpp_err"; then
18fc9bd4 9269 ac_cv_header_thread_h=yes
ba479fd2
NN
9270else
9271 echo "$as_me: failed program was:" >&5
9272sed 's/^/| /' conftest.$ac_ext >&5
9273
18fc9bd4 9274 ac_cv_header_thread_h=no
ba479fd2
NN
9275fi
9276rm -f conftest.err conftest.$ac_ext
6e3f3080 9277fi
b61ff9c8
BS
9278echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
9279echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 9280if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
9281 have_thread_h=yes
9282else
ba479fd2 9283 have_thread_h=
f24af81b
TT
9284fi
9285
b61ff9c8
BS
9286echo "$as_me:$LINENO: checking for pthread.h" >&5
9287echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
ba479fd2
NN
9288if test "${ac_cv_header_pthread_h+set}" = set; then
9289 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 9290else
18fc9bd4 9291 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9292/* confdefs.h. */
9293_ACEOF
9294cat confdefs.h >>conftest.$ac_ext
9295cat >>conftest.$ac_ext <<_ACEOF
9296/* end confdefs.h. */
9297#include <pthread.h>
9298_ACEOF
b61ff9c8
BS
9299if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9300 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9301 ac_status=$?
9302 grep -v '^ *+' conftest.er1 >conftest.err
9303 rm -f conftest.er1
9304 cat conftest.err >&5
9305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9306 (exit $ac_status); } >/dev/null; then
9307 if test -s conftest.err; then
9308 ac_cpp_err=$ac_c_preproc_warn_flag
9309 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9310 else
9311 ac_cpp_err=
9312 fi
9313else
9314 ac_cpp_err=yes
9315fi
9316if test -z "$ac_cpp_err"; then
18fc9bd4 9317 ac_cv_header_pthread_h=yes
ba479fd2 9318else
18fc9bd4
RG
9319 echo "$as_me: failed program was:" >&5
9320sed 's/^/| /' conftest.$ac_ext >&5
9321
9322 ac_cv_header_pthread_h=no
9323fi
9324rm -f conftest.err conftest.$ac_ext
6e3f3080 9325fi
b61ff9c8
BS
9326echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
9327echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 9328if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
9329 have_pthread_h=yes
9330else
ba479fd2 9331 have_pthread_h=
f24af81b
TT
9332fi
9333
9334
84c041a1 9335# These tests can't be done till we know if we have limits.h.
b61ff9c8
BS
9336echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
9337echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
ba479fd2
NN
9338if test "${gcc_cv_decl_char_bit+set}" = set; then
9339 echo $ECHO_N "(cached) $ECHO_C" >&6
9340else
9341 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9342/* confdefs.h. */
9343_ACEOF
9344cat confdefs.h >>conftest.$ac_ext
9345cat >>conftest.$ac_ext <<_ACEOF
9346/* end confdefs.h. */
75e93faa
ZW
9347#ifdef HAVE_LIMITS_H
9348#include <limits.h>
9349#endif
9350#ifdef CHAR_BIT
9351found
9352#endif
ba479fd2 9353_ACEOF
75e93faa 9354if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9355 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
9356 gcc_cv_decl_char_bit=yes
9357else
75e93faa
ZW
9358 gcc_cv_decl_char_bit=no
9359fi
9360rm -f conftest*
9361
9362
9363fi
b61ff9c8
BS
9364echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
9365echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 9366if test $gcc_cv_decl_char_bit = no; then
b61ff9c8
BS
9367 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
9368echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
ba479fd2
NN
9369if test "${gcc_cv_c_nbby+set}" = set; then
9370 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
9371else
9372 i=8
9373 gcc_cv_c_nbby=
9374 while test $i -lt 65; do
ba479fd2 9375 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9376/* confdefs.h. */
9377_ACEOF
9378cat confdefs.h >>conftest.$ac_ext
9379cat >>conftest.$ac_ext <<_ACEOF
9380/* end confdefs.h. */
9381
9382int
9383main ()
9384{
4e70264f
ZW
9385switch(0) {
9386 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
9387 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
9388 ; }
ba479fd2
NN
9389 ;
9390 return 0;
9391}
9392_ACEOF
9393rm -f conftest.$ac_objext
b61ff9c8
BS
9394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9395 (eval $ac_compile) 2>conftest.er1
ba479fd2 9396 ac_status=$?
86da66b5
HPN
9397 grep -v '^ *+' conftest.er1 >conftest.err
9398 rm -f conftest.er1
9399 cat conftest.err >&5
ba479fd2 9400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9401 (exit $ac_status); } &&
9402 { ac_try='test -z "$ac_c_werror_flag"
9403 || test ! -s conftest.err'
9404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9405 (eval $ac_try) 2>&5
9406 ac_status=$?
9407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9408 (exit $ac_status); }; } &&
9409 { ac_try='test -s conftest.$ac_objext'
9410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9411 (eval $ac_try) 2>&5
9412 ac_status=$?
9413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9414 (exit $ac_status); }; }; then
4e70264f 9415 gcc_cv_c_nbby=$i; break
75e93faa 9416else
ba479fd2
NN
9417 echo "$as_me: failed program was:" >&5
9418sed 's/^/| /' conftest.$ac_ext >&5
9419
75e93faa 9420fi
b61ff9c8 9421rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
9422 i=`expr $i + 1`
9423 done
9424 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
9425
9426fi
b61ff9c8
BS
9427echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
9428echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 9429if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
9430 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
9431echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
9432 { (exit 1); exit 1; }; }
75e93faa 9433else
ba479fd2
NN
9434
9435cat >>confdefs.h <<_ACEOF
75e93faa 9436#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 9437_ACEOF
75e93faa
ZW
9438
9439fi
9440fi
b61ff9c8
BS
9441echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
9442echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
ba479fd2
NN
9443if test "${ac_cv_c_bigendian+set}" = set; then
9444 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 9445else
9791c75c 9446 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 9447cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9448/* confdefs.h. */
9449_ACEOF
9450cat confdefs.h >>conftest.$ac_ext
9451cat >>conftest.$ac_ext <<_ACEOF
9452/* end confdefs.h. */
4977bab6
ZW
9453#include <sys/types.h>
9454#include <sys/param.h>
9791c75c 9455
ba479fd2
NN
9456int
9457main ()
9458{
b61ff9c8 9459#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4977bab6 9460 bogus endian macros
84c041a1 9461#endif
9791c75c 9462
ba479fd2
NN
9463 ;
9464 return 0;
9465}
9466_ACEOF
9467rm -f conftest.$ac_objext
b61ff9c8
BS
9468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9469 (eval $ac_compile) 2>conftest.er1
ba479fd2 9470 ac_status=$?
86da66b5
HPN
9471 grep -v '^ *+' conftest.er1 >conftest.err
9472 rm -f conftest.er1
9473 cat conftest.err >&5
ba479fd2 9474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9475 (exit $ac_status); } &&
9476 { ac_try='test -z "$ac_c_werror_flag"
9477 || test ! -s conftest.err'
9478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9479 (eval $ac_try) 2>&5
9480 ac_status=$?
9481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9482 (exit $ac_status); }; } &&
9483 { ac_try='test -s conftest.$ac_objext'
9484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9485 (eval $ac_try) 2>&5
9486 ac_status=$?
9487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9488 (exit $ac_status); }; }; then
2f41c1d6 9489 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 9490cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9491/* confdefs.h. */
9492_ACEOF
9493cat confdefs.h >>conftest.$ac_ext
9494cat >>conftest.$ac_ext <<_ACEOF
9495/* end confdefs.h. */
4977bab6
ZW
9496#include <sys/types.h>
9497#include <sys/param.h>
9791c75c 9498
ba479fd2
NN
9499int
9500main ()
9501{
4977bab6
ZW
9502#if BYTE_ORDER != BIG_ENDIAN
9503 not big endian
84c041a1 9504#endif
9791c75c 9505
ba479fd2
NN
9506 ;
9507 return 0;
9508}
9509_ACEOF
9510rm -f conftest.$ac_objext
b61ff9c8
BS
9511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9512 (eval $ac_compile) 2>conftest.er1
ba479fd2 9513 ac_status=$?
86da66b5
HPN
9514 grep -v '^ *+' conftest.er1 >conftest.err
9515 rm -f conftest.er1
9516 cat conftest.err >&5
ba479fd2 9517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9518 (exit $ac_status); } &&
9519 { ac_try='test -z "$ac_c_werror_flag"
9520 || test ! -s conftest.err'
9521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9522 (eval $ac_try) 2>&5
9523 ac_status=$?
9524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9525 (exit $ac_status); }; } &&
9526 { ac_try='test -s conftest.$ac_objext'
9527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9528 (eval $ac_try) 2>&5
9529 ac_status=$?
9530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9531 (exit $ac_status); }; }; then
9532 ac_cv_c_bigendian=yes
9533else
9534 echo "$as_me: failed program was:" >&5
ba479fd2
NN
9535sed 's/^/| /' conftest.$ac_ext >&5
9536
b61ff9c8 9537ac_cv_c_bigendian=no
4977bab6 9538fi
b61ff9c8 9539rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 9540else
ba479fd2
NN
9541 echo "$as_me: failed program was:" >&5
9542sed 's/^/| /' conftest.$ac_ext >&5
9543
b61ff9c8 9544# It does not; compile a test program.
9791c75c
KC
9545if test "$cross_compiling" = yes; then
9546 # try to guess the endianness by grepping values into an object file
9547 ac_cv_c_bigendian=unknown
9548 cat >conftest.$ac_ext <<_ACEOF
9549/* confdefs.h. */
9550_ACEOF
9551cat confdefs.h >>conftest.$ac_ext
9552cat >>conftest.$ac_ext <<_ACEOF
9553/* end confdefs.h. */
b61ff9c8
BS
9554short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9555short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9791c75c 9556void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
b61ff9c8
BS
9557short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9558short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9791c75c
KC
9559void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
9560int
9561main ()
9562{
9563 _ascii (); _ebcdic ();
9564 ;
9565 return 0;
9566}
9567_ACEOF
9568rm -f conftest.$ac_objext
b61ff9c8
BS
9569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9570 (eval $ac_compile) 2>conftest.er1
9791c75c
KC
9571 ac_status=$?
9572 grep -v '^ *+' conftest.er1 >conftest.err
9573 rm -f conftest.er1
9574 cat conftest.err >&5
9575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9576 (exit $ac_status); } &&
9577 { ac_try='test -z "$ac_c_werror_flag"
9578 || test ! -s conftest.err'
9579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9580 (eval $ac_try) 2>&5
9581 ac_status=$?
9582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9583 (exit $ac_status); }; } &&
9584 { ac_try='test -s conftest.$ac_objext'
9585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9586 (eval $ac_try) 2>&5
9587 ac_status=$?
9588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9589 (exit $ac_status); }; }; then
8b1f719a
PB
9590 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
9591 ac_cv_c_bigendian=yes
9592fi
9791c75c
KC
9593if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9594 if test "$ac_cv_c_bigendian" = unknown; then
9595 ac_cv_c_bigendian=no
9596 else
9597 # finding both strings is unlikely to happen, but who knows?
9598 ac_cv_c_bigendian=unknown
9599 fi
9600fi
9601else
9602 echo "$as_me: failed program was:" >&5
9603sed 's/^/| /' conftest.$ac_ext >&5
9604
4977bab6 9605fi
b61ff9c8 9606rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
9607else
9608 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9609/* confdefs.h. */
9610_ACEOF
9611cat confdefs.h >>conftest.$ac_ext
9612cat >>conftest.$ac_ext <<_ACEOF
9613/* end confdefs.h. */
9791c75c
KC
9614int
9615main ()
9616{
4977bab6
ZW
9617 /* Are we little or big endian? From Harbison&Steele. */
9618 union
9619 {
b61ff9c8
BS
9620 long l;
9621 char c[sizeof (long)];
4977bab6
ZW
9622 } u;
9623 u.l = 1;
b61ff9c8 9624 exit (u.c[sizeof (long) - 1] == 1);
4977bab6 9625}
ba479fd2
NN
9626_ACEOF
9627rm -f conftest$ac_exeext
b61ff9c8
BS
9628if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9629 (eval $ac_link) 2>&5
ba479fd2
NN
9630 ac_status=$?
9631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9632 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
9633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9634 (eval $ac_try) 2>&5
ba479fd2
NN
9635 ac_status=$?
9636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9637 (exit $ac_status); }; }; then
4977bab6
ZW
9638 ac_cv_c_bigendian=no
9639else
ba479fd2
NN
9640 echo "$as_me: program exited with status $ac_status" >&5
9641echo "$as_me: failed program was:" >&5
9642sed 's/^/| /' conftest.$ac_ext >&5
9643
9644( exit $ac_status )
9645ac_cv_c_bigendian=yes
4977bab6 9646fi
b61ff9c8 9647rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 9648fi
4977bab6 9649fi
b61ff9c8 9650rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 9651fi
b61ff9c8
BS
9652echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
9653echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
9654case $ac_cv_c_bigendian in
9655 yes)
ba479fd2
NN
9656
9657cat >>confdefs.h <<\_ACEOF
4977bab6 9658#define WORDS_BIGENDIAN 1
ba479fd2 9659_ACEOF
9791c75c
KC
9660 ;;
9661 no)
9662 ;;
9663 *)
9664 { { echo "$as_me:$LINENO: error: unknown endianness
9665presetting ac_cv_c_bigendian=no (or yes) will help" >&5
9666echo "$as_me: error: unknown endianness
9667presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
9668 { (exit 1); exit 1; }; } ;;
9669esac
84c041a1 9670
75e93faa 9671
73458fb7
NN
9672# --------
9673# UNSORTED
9674# --------
1e608388 9675
1e608388 9676
4e70264f
ZW
9677# These libraries may be used by collect2.
9678# We may need a special search path to get them linked.
b61ff9c8
BS
9679echo "$as_me:$LINENO: checking for collect2 libraries" >&5
9680echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
ba479fd2
NN
9681if test "${gcc_cv_collect2_libs+set}" = set; then
9682 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
9683else
9684 save_LIBS="$LIBS"
7f2749d4 9685for libs in '' -lld -lmld \
4e70264f
ZW
9686 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
9687 '-L/usr/lib/cmplrs/cc3.11 -lmld'
9688do
9689 LIBS="$libs"
ba479fd2 9690 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9691/* confdefs.h. */
9692_ACEOF
9693cat confdefs.h >>conftest.$ac_ext
9694cat >>conftest.$ac_ext <<_ACEOF
9695/* end confdefs.h. */
9696
b61ff9c8 9697/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9698#ifdef __cplusplus
9699extern "C"
9700#endif
b61ff9c8
BS
9701/* We use char because int might match the return type of a gcc2
9702 builtin and then its argument prototype would still apply. */
ba479fd2
NN
9703char ldopen ();
9704int
9705main ()
9706{
b61ff9c8 9707ldopen ();
ba479fd2
NN
9708 ;
9709 return 0;
9710}
9711_ACEOF
9712rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
9713if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9714 (eval $ac_link) 2>conftest.er1
ba479fd2 9715 ac_status=$?
86da66b5
HPN
9716 grep -v '^ *+' conftest.er1 >conftest.err
9717 rm -f conftest.er1
9718 cat conftest.err >&5
ba479fd2 9719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9720 (exit $ac_status); } &&
9721 { ac_try='test -z "$ac_c_werror_flag"
9722 || test ! -s conftest.err'
9723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9724 (eval $ac_try) 2>&5
9725 ac_status=$?
9726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9727 (exit $ac_status); }; } &&
9728 { ac_try='test -s conftest$ac_exeext'
9729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9730 (eval $ac_try) 2>&5
9731 ac_status=$?
9732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9733 (exit $ac_status); }; }; then
4e70264f
ZW
9734 gcc_cv_collect2_libs="$libs"; break
9735else
ba479fd2
NN
9736 echo "$as_me: failed program was:" >&5
9737sed 's/^/| /' conftest.$ac_ext >&5
9738
4e70264f 9739fi
b61ff9c8 9740rm -f conftest.err conftest.$ac_objext \
86da66b5 9741 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
9742done
9743LIBS="$save_LIBS"
9744test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
9745fi
b61ff9c8
BS
9746echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
9747echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
9748case $gcc_cv_collect2_libs in
9749 "none required") ;;
9750 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
9751esac
9752
9753
7f2749d4
RK
9754# When building Ada code on Alpha, we need exc_resume which is usually in
9755# -lexc. So test for it.
9756save_LIBS="$LIBS"
9757LIBS=
b61ff9c8
BS
9758echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
9759echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
ba479fd2
NN
9760if test "${ac_cv_search_exc_resume+set}" = set; then
9761 echo $ECHO_N "(cached) $ECHO_C" >&6
9762else
9763 ac_func_search_save_LIBS=$LIBS
b61ff9c8 9764ac_cv_search_exc_resume=no
ba479fd2 9765cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9766/* confdefs.h. */
9767_ACEOF
9768cat confdefs.h >>conftest.$ac_ext
9769cat >>conftest.$ac_ext <<_ACEOF
9770/* end confdefs.h. */
7f2749d4 9771
b61ff9c8 9772/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9773#ifdef __cplusplus
9774extern "C"
9775#endif
b61ff9c8
BS
9776/* We use char because int might match the return type of a gcc2
9777 builtin and then its argument prototype would still apply. */
ba479fd2
NN
9778char exc_resume ();
9779int
9780main ()
9781{
b61ff9c8 9782exc_resume ();
ba479fd2
NN
9783 ;
9784 return 0;
9785}
9786_ACEOF
b61ff9c8
BS
9787rm -f conftest.$ac_objext conftest$ac_exeext
9788if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9789 (eval $ac_link) 2>conftest.er1
ba479fd2 9790 ac_status=$?
86da66b5
HPN
9791 grep -v '^ *+' conftest.er1 >conftest.err
9792 rm -f conftest.er1
9793 cat conftest.err >&5
ba479fd2 9794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9795 (exit $ac_status); } &&
9796 { ac_try='test -z "$ac_c_werror_flag"
9797 || test ! -s conftest.err'
9798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9799 (eval $ac_try) 2>&5
9800 ac_status=$?
9801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9802 (exit $ac_status); }; } &&
9803 { ac_try='test -s conftest$ac_exeext'
9804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9805 (eval $ac_try) 2>&5
9806 ac_status=$?
9807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9808 (exit $ac_status); }; }; then
9809 ac_cv_search_exc_resume="none required"
7f2749d4 9810else
ba479fd2
NN
9811 echo "$as_me: failed program was:" >&5
9812sed 's/^/| /' conftest.$ac_ext >&5
9813
ab22c1fa 9814fi
b61ff9c8
BS
9815rm -f conftest.err conftest.$ac_objext \
9816 conftest$ac_exeext conftest.$ac_ext
9817if test "$ac_cv_search_exc_resume" = no; then
9818 for ac_lib in exc; do
9819 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9820 cat >conftest.$ac_ext <<_ACEOF
9821/* confdefs.h. */
9822_ACEOF
9823cat confdefs.h >>conftest.$ac_ext
9824cat >>conftest.$ac_ext <<_ACEOF
9825/* end confdefs.h. */
2f41c1d6 9826
b61ff9c8
BS
9827/* Override any gcc2 internal prototype to avoid an error. */
9828#ifdef __cplusplus
9829extern "C"
9830#endif
9831/* We use char because int might match the return type of a gcc2
9832 builtin and then its argument prototype would still apply. */
9833char exc_resume ();
9834int
9835main ()
9836{
9837exc_resume ();
9838 ;
9839 return 0;
9840}
9841_ACEOF
9842rm -f conftest.$ac_objext conftest$ac_exeext
9843if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9844 (eval $ac_link) 2>conftest.er1
9845 ac_status=$?
9846 grep -v '^ *+' conftest.er1 >conftest.err
9847 rm -f conftest.er1
9848 cat conftest.err >&5
9849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9850 (exit $ac_status); } &&
9851 { ac_try='test -z "$ac_c_werror_flag"
9852 || test ! -s conftest.err'
9853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9854 (eval $ac_try) 2>&5
9855 ac_status=$?
9856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9857 (exit $ac_status); }; } &&
9858 { ac_try='test -s conftest$ac_exeext'
9859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9860 (eval $ac_try) 2>&5
9861 ac_status=$?
9862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9863 (exit $ac_status); }; }; then
9864 ac_cv_search_exc_resume="-l$ac_lib"
9865break
1a4b763e 9866else
b61ff9c8
BS
9867 echo "$as_me: failed program was:" >&5
9868sed 's/^/| /' conftest.$ac_ext >&5
9869
9870fi
9871rm -f conftest.err conftest.$ac_objext \
9872 conftest$ac_exeext conftest.$ac_ext
9873 done
b8ec3cc8 9874fi
b8ec3cc8
EC
9875LIBS=$ac_func_search_save_LIBS
9876fi
b61ff9c8
BS
9877echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
9878echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
9879if test "$ac_cv_search_exc_resume" != no; then
9880 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
b8ec3cc8
EC
9881
9882fi
9883
dd7f7a6e 9884GNAT_LIBEXC="$LIBS"
b8ec3cc8
EC
9885LIBS="$save_LIBS"
9886
9887
dd7f7a6e
EC
9888# Some systems put ldexp and frexp in libm instead of libc; assume
9889# they're both in the same place. jcf-dump needs them.
9890save_LIBS="$LIBS"
9891LIBS=
b61ff9c8
BS
9892echo "$as_me:$LINENO: checking for library containing ldexp" >&5
9893echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
dd7f7a6e 9894if test "${ac_cv_search_ldexp+set}" = set; then
b8ec3cc8
EC
9895 echo $ECHO_N "(cached) $ECHO_C" >&6
9896else
dd7f7a6e 9897 ac_func_search_save_LIBS=$LIBS
b61ff9c8 9898ac_cv_search_ldexp=no
dd7f7a6e 9899cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9900/* confdefs.h. */
9901_ACEOF
9902cat confdefs.h >>conftest.$ac_ext
9903cat >>conftest.$ac_ext <<_ACEOF
9904/* end confdefs.h. */
dd7f7a6e 9905
b61ff9c8 9906/* Override any gcc2 internal prototype to avoid an error. */
dd7f7a6e
EC
9907#ifdef __cplusplus
9908extern "C"
9909#endif
b61ff9c8
BS
9910/* We use char because int might match the return type of a gcc2
9911 builtin and then its argument prototype would still apply. */
dd7f7a6e 9912char ldexp ();
ba479fd2
NN
9913int
9914main ()
9915{
b61ff9c8 9916ldexp ();
ba479fd2
NN
9917 ;
9918 return 0;
9919}
9920_ACEOF
b61ff9c8
BS
9921rm -f conftest.$ac_objext conftest$ac_exeext
9922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9923 (eval $ac_link) 2>conftest.er1
dd7f7a6e
EC
9924 ac_status=$?
9925 grep -v '^ *+' conftest.er1 >conftest.err
9926 rm -f conftest.er1
9927 cat conftest.err >&5
9928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9929 (exit $ac_status); } &&
9930 { ac_try='test -z "$ac_c_werror_flag"
9931 || test ! -s conftest.err'
9932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9933 (eval $ac_try) 2>&5
9934 ac_status=$?
9935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9936 (exit $ac_status); }; } &&
9937 { ac_try='test -s conftest$ac_exeext'
9938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9939 (eval $ac_try) 2>&5
9940 ac_status=$?
9941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9942 (exit $ac_status); }; }; then
9943 ac_cv_search_ldexp="none required"
dd7f7a6e
EC
9944else
9945 echo "$as_me: failed program was:" >&5
9946sed 's/^/| /' conftest.$ac_ext >&5
9947
1a4b763e 9948fi
b61ff9c8
BS
9949rm -f conftest.err conftest.$ac_objext \
9950 conftest$ac_exeext conftest.$ac_ext
9951if test "$ac_cv_search_ldexp" = no; then
9952 for ac_lib in m; do
9953 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9954 cat >conftest.$ac_ext <<_ACEOF
9955/* confdefs.h. */
9956_ACEOF
9957cat confdefs.h >>conftest.$ac_ext
9958cat >>conftest.$ac_ext <<_ACEOF
9959/* end confdefs.h. */
2f41c1d6 9960
b61ff9c8
BS
9961/* Override any gcc2 internal prototype to avoid an error. */
9962#ifdef __cplusplus
9963extern "C"
9964#endif
9965/* We use char because int might match the return type of a gcc2
9966 builtin and then its argument prototype would still apply. */
9967char ldexp ();
9968int
9969main ()
9970{
9971ldexp ();
9972 ;
9973 return 0;
9974}
9975_ACEOF
9976rm -f conftest.$ac_objext conftest$ac_exeext
9977if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9978 (eval $ac_link) 2>conftest.er1
9979 ac_status=$?
9980 grep -v '^ *+' conftest.er1 >conftest.err
9981 rm -f conftest.er1
9982 cat conftest.err >&5
9983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9984 (exit $ac_status); } &&
9985 { ac_try='test -z "$ac_c_werror_flag"
9986 || test ! -s conftest.err'
9987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9988 (eval $ac_try) 2>&5
9989 ac_status=$?
9990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9991 (exit $ac_status); }; } &&
9992 { ac_try='test -s conftest$ac_exeext'
9993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9994 (eval $ac_try) 2>&5
9995 ac_status=$?
9996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9997 (exit $ac_status); }; }; then
9998 ac_cv_search_ldexp="-l$ac_lib"
9999break
1a4b763e 10000else
b61ff9c8
BS
10001 echo "$as_me: failed program was:" >&5
10002sed 's/^/| /' conftest.$ac_ext >&5
10003
10004fi
10005rm -f conftest.err conftest.$ac_objext \
10006 conftest$ac_exeext conftest.$ac_ext
10007 done
dd7f7a6e
EC
10008fi
10009LIBS=$ac_func_search_save_LIBS
10010fi
b61ff9c8
BS
10011echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
10012echo "${ECHO_T}$ac_cv_search_ldexp" >&6
10013if test "$ac_cv_search_ldexp" != no; then
10014 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
dd7f7a6e
EC
10015
10016fi
10017
10018LDEXP_LIB="$LIBS"
10019LIBS="$save_LIBS"
10020
10021
10022# Use <inttypes.h> only if it exists,
10023# doesn't clash with <sys/types.h>, and declares intmax_t.
b61ff9c8
BS
10024echo "$as_me:$LINENO: checking for inttypes.h" >&5
10025echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
dd7f7a6e
EC
10026if test "${gcc_cv_header_inttypes_h+set}" = set; then
10027 echo $ECHO_N "(cached) $ECHO_C" >&6
10028else
10029 cat >conftest.$ac_ext <<_ACEOF
10030/* confdefs.h. */
10031_ACEOF
10032cat confdefs.h >>conftest.$ac_ext
10033cat >>conftest.$ac_ext <<_ACEOF
10034/* end confdefs.h. */
10035#include <sys/types.h>
10036#include <inttypes.h>
10037int
10038main ()
10039{
10040intmax_t i = -1;
10041 ;
10042 return 0;
10043}
10044_ACEOF
10045rm -f conftest.$ac_objext
b61ff9c8
BS
10046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10047 (eval $ac_compile) 2>conftest.er1
dd7f7a6e
EC
10048 ac_status=$?
10049 grep -v '^ *+' conftest.er1 >conftest.err
10050 rm -f conftest.er1
10051 cat conftest.err >&5
10052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10053 (exit $ac_status); } &&
10054 { ac_try='test -z "$ac_c_werror_flag"
10055 || test ! -s conftest.err'
10056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10057 (eval $ac_try) 2>&5
10058 ac_status=$?
10059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10060 (exit $ac_status); }; } &&
10061 { ac_try='test -s conftest.$ac_objext'
10062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10063 (eval $ac_try) 2>&5
10064 ac_status=$?
10065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10066 (exit $ac_status); }; }; then
dd7f7a6e
EC
10067 gcc_cv_header_inttypes_h=yes
10068else
10069 echo "$as_me: failed program was:" >&5
10070sed 's/^/| /' conftest.$ac_ext >&5
10071
b61ff9c8 10072gcc_cv_header_inttypes_h=no
dd7f7a6e 10073fi
b61ff9c8 10074rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e
EC
10075fi
10076
b61ff9c8
BS
10077echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
10078echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
dd7f7a6e
EC
10079if test $gcc_cv_header_inttypes_h = yes; then
10080
10081cat >>confdefs.h <<\_ACEOF
10082#define HAVE_INTTYPES_H 1
10083_ACEOF
10084
0056a9b5 10085fi
956d6950 10086
c149cc37 10087
ba479fd2
NN
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
0d667716
KG
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
ba479fd2
NN
10116
10117
10118
ba479fd2
NN
10119
10120
10121
52a6edcc 10122for ac_func in times clock kill getrlimit setrlimit atoll atoq \
d2e506f2 10123 sysconf strsignal getrusage nl_langinfo \
0d667716
KG
10124 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
10125 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 10126do
ba479fd2 10127as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b61ff9c8
BS
10128echo "$as_me:$LINENO: checking for $ac_func" >&5
10129echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10130if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
10131 echo $ECHO_N "(cached) $ECHO_C" >&6
10132else
10133 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10134/* confdefs.h. */
10135_ACEOF
10136cat confdefs.h >>conftest.$ac_ext
10137cat >>conftest.$ac_ext <<_ACEOF
10138/* end confdefs.h. */
86da66b5
HPN
10139/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10140 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10141#define $ac_func innocuous_$ac_func
10142
956d6950 10143/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10144 which can conflict with char $ac_func (); below.
10145 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10146 <limits.h> exists even on freestanding compilers. */
86da66b5 10147
ba479fd2
NN
10148#ifdef __STDC__
10149# include <limits.h>
10150#else
10151# include <assert.h>
10152#endif
86da66b5
HPN
10153
10154#undef $ac_func
10155
b61ff9c8 10156/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10157#ifdef __cplusplus
10158extern "C"
b61ff9c8 10159{
ba479fd2 10160#endif
b61ff9c8
BS
10161/* We use char because int might match the return type of a gcc2
10162 builtin and then its argument prototype would still apply. */
ba479fd2 10163char $ac_func ();
956d6950
JL
10164/* The GNU C library defines this for functions which it implements
10165 to always fail with ENOSYS. Some functions are actually named
10166 something starting with __ and the normal name is an alias. */
b61ff9c8 10167#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
956d6950 10168choke me
b61ff9c8
BS
10169#else
10170char (*f) () = $ac_func;
10171#endif
10172#ifdef __cplusplus
10173}
956d6950
JL
10174#endif
10175
ba479fd2
NN
10176int
10177main ()
10178{
b61ff9c8 10179return f != $ac_func;
ba479fd2
NN
10180 ;
10181 return 0;
10182}
10183_ACEOF
10184rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
10185if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10186 (eval $ac_link) 2>conftest.er1
ba479fd2 10187 ac_status=$?
86da66b5
HPN
10188 grep -v '^ *+' conftest.er1 >conftest.err
10189 rm -f conftest.er1
10190 cat conftest.err >&5
ba479fd2 10191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10192 (exit $ac_status); } &&
10193 { ac_try='test -z "$ac_c_werror_flag"
10194 || test ! -s conftest.err'
10195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10196 (eval $ac_try) 2>&5
10197 ac_status=$?
10198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10199 (exit $ac_status); }; } &&
10200 { ac_try='test -s conftest$ac_exeext'
10201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10202 (eval $ac_try) 2>&5
10203 ac_status=$?
10204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10205 (exit $ac_status); }; }; then
ba479fd2
NN
10206 eval "$as_ac_var=yes"
10207else
10208 echo "$as_me: failed program was:" >&5
10209sed 's/^/| /' conftest.$ac_ext >&5
10210
b61ff9c8 10211eval "$as_ac_var=no"
ba479fd2 10212fi
b61ff9c8 10213rm -f conftest.err conftest.$ac_objext \
86da66b5 10214 conftest$ac_exeext conftest.$ac_ext
ba479fd2 10215fi
b61ff9c8
BS
10216echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10217echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
10218if test `eval echo '${'$as_ac_var'}'` = yes; then
10219 cat >>confdefs.h <<_ACEOF
10220#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10221_ACEOF
956d6950 10222
956d6950
JL
10223fi
10224done
10225
6885fc87 10226
39f6c4c8 10227if test x$ac_cv_func_mbstowcs = xyes; then
b61ff9c8
BS
10228 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
10229echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
ba479fd2
NN
10230if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
10231 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
10232else
10233 if test "$cross_compiling" = yes; then
10234 gcc_cv_func_mbstowcs_works=yes
10235else
ba479fd2 10236 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10237/* confdefs.h. */
10238_ACEOF
10239cat confdefs.h >>conftest.$ac_ext
10240cat >>conftest.$ac_ext <<_ACEOF
10241/* end confdefs.h. */
39f6c4c8
KW
10242#include <stdlib.h>
10243int main()
10244{
10245 mbstowcs(0, "", 0);
10246 return 0;
10247}
ba479fd2
NN
10248_ACEOF
10249rm -f conftest$ac_exeext
b61ff9c8
BS
10250if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10251 (eval $ac_link) 2>&5
ba479fd2
NN
10252 ac_status=$?
10253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10254 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
10255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10256 (eval $ac_try) 2>&5
ba479fd2
NN
10257 ac_status=$?
10258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10259 (exit $ac_status); }; }; then
39f6c4c8
KW
10260 gcc_cv_func_mbstowcs_works=yes
10261else
ba479fd2
NN
10262 echo "$as_me: program exited with status $ac_status" >&5
10263echo "$as_me: failed program was:" >&5
10264sed 's/^/| /' conftest.$ac_ext >&5
10265
10266( exit $ac_status )
10267gcc_cv_func_mbstowcs_works=no
39f6c4c8 10268fi
b61ff9c8 10269rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 10270fi
39f6c4c8 10271fi
b61ff9c8
BS
10272echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
10273echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 10274 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
10275
10276cat >>confdefs.h <<\_ACEOF
39f6c4c8 10277#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 10278_ACEOF
39f6c4c8
KW
10279
10280 fi
10281fi
10282
b61ff9c8
BS
10283echo "$as_me:$LINENO: checking for ssize_t" >&5
10284echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
ba479fd2
NN
10285if test "${ac_cv_type_ssize_t+set}" = set; then
10286 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 10287else
ba479fd2 10288 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10289/* confdefs.h. */
10290_ACEOF
10291cat confdefs.h >>conftest.$ac_ext
10292cat >>conftest.$ac_ext <<_ACEOF
10293/* end confdefs.h. */
8b4fc07a
NN
10294$ac_includes_default
10295int
10296main ()
10297{
b61ff9c8 10298if ((ssize_t *) 0)
8b4fc07a 10299 return 0;
b61ff9c8 10300if (sizeof (ssize_t))
8b4fc07a
NN
10301 return 0;
10302 ;
10303 return 0;
10304}
ba479fd2 10305_ACEOF
8b4fc07a 10306rm -f conftest.$ac_objext
b61ff9c8
BS
10307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10308 (eval $ac_compile) 2>conftest.er1
8b4fc07a 10309 ac_status=$?
86da66b5
HPN
10310 grep -v '^ *+' conftest.er1 >conftest.err
10311 rm -f conftest.er1
10312 cat conftest.err >&5
8b4fc07a 10313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10314 (exit $ac_status); } &&
10315 { ac_try='test -z "$ac_c_werror_flag"
10316 || test ! -s conftest.err'
10317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10318 (eval $ac_try) 2>&5
10319 ac_status=$?
10320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10321 (exit $ac_status); }; } &&
10322 { ac_try='test -s conftest.$ac_objext'
10323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10324 (eval $ac_try) 2>&5
10325 ac_status=$?
10326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10327 (exit $ac_status); }; }; then
cb65112a 10328 ac_cv_type_ssize_t=yes
f12bc141 10329else
8b4fc07a
NN
10330 echo "$as_me: failed program was:" >&5
10331sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10332
b61ff9c8 10333ac_cv_type_ssize_t=no
8b4fc07a 10334fi
b61ff9c8 10335rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10336fi
b61ff9c8
BS
10337echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
10338echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
10339if test $ac_cv_type_ssize_t = yes; then
10340 :
10341else
ba479fd2 10342
8b4fc07a 10343cat >>confdefs.h <<_ACEOF
f12bc141 10344#define ssize_t int
ba479fd2 10345_ACEOF
f12bc141
ZW
10346
10347fi
10348
bba09b5a
AT
10349echo "$as_me:$LINENO: checking for caddr_t" >&5
10350echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6
10351if test "${ac_cv_type_caddr_t+set}" = set; then
10352 echo $ECHO_N "(cached) $ECHO_C" >&6
10353else
10354 cat >conftest.$ac_ext <<_ACEOF
10355/* confdefs.h. */
10356_ACEOF
10357cat confdefs.h >>conftest.$ac_ext
10358cat >>conftest.$ac_ext <<_ACEOF
10359/* end confdefs.h. */
10360$ac_includes_default
10361int
10362main ()
10363{
10364if ((caddr_t *) 0)
10365 return 0;
10366if (sizeof (caddr_t))
10367 return 0;
10368 ;
10369 return 0;
10370}
10371_ACEOF
10372rm -f conftest.$ac_objext
10373if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10374 (eval $ac_compile) 2>conftest.er1
10375 ac_status=$?
10376 grep -v '^ *+' conftest.er1 >conftest.err
10377 rm -f conftest.er1
10378 cat conftest.err >&5
10379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10380 (exit $ac_status); } &&
10381 { ac_try='test -z "$ac_c_werror_flag"
10382 || test ! -s conftest.err'
10383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10384 (eval $ac_try) 2>&5
10385 ac_status=$?
10386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10387 (exit $ac_status); }; } &&
10388 { ac_try='test -s conftest.$ac_objext'
10389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10390 (eval $ac_try) 2>&5
10391 ac_status=$?
10392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10393 (exit $ac_status); }; }; then
10394 ac_cv_type_caddr_t=yes
10395else
10396 echo "$as_me: failed program was:" >&5
10397sed 's/^/| /' conftest.$ac_ext >&5
10398
10399ac_cv_type_caddr_t=no
10400fi
10401rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10402fi
10403echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
10404echo "${ECHO_T}$ac_cv_type_caddr_t" >&6
10405if test $ac_cv_type_caddr_t = yes; then
10406 :
10407else
10408
10409cat >>confdefs.h <<_ACEOF
10410#define caddr_t char *
10411_ACEOF
10412
10413fi
10414
0b9d02c6 10415
e256b8b6
DA
10416# Try to determine the array type of the second argument of getgroups
10417# for the target system (int or gid_t).
b61ff9c8
BS
10418echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
10419echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
ba479fd2
NN
10420if test "${ac_cv_type_uid_t+set}" = set; then
10421 echo $ECHO_N "(cached) $ECHO_C" >&6
10422else
10423 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10424/* confdefs.h. */
10425_ACEOF
10426cat confdefs.h >>conftest.$ac_ext
10427cat >>conftest.$ac_ext <<_ACEOF
10428/* end confdefs.h. */
e256b8b6 10429#include <sys/types.h>
ba479fd2
NN
10430
10431_ACEOF
e256b8b6 10432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 10433 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
10434 ac_cv_type_uid_t=yes
10435else
e256b8b6
DA
10436 ac_cv_type_uid_t=no
10437fi
10438rm -f conftest*
10439
10440fi
b61ff9c8
BS
10441echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
10442echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 10443if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
10444
10445cat >>confdefs.h <<\_ACEOF
e256b8b6 10446#define uid_t int
ba479fd2 10447_ACEOF
cafe096b 10448
ba479fd2
NN
10449
10450cat >>confdefs.h <<\_ACEOF
e256b8b6 10451#define gid_t int
ba479fd2 10452_ACEOF
e256b8b6
DA
10453
10454fi
10455
b61ff9c8
BS
10456echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
10457echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
ba479fd2
NN
10458if test "${ac_cv_type_getgroups+set}" = set; then
10459 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
10460else
10461 if test "$cross_compiling" = yes; then
10462 ac_cv_type_getgroups=cross
10463else
ba479fd2 10464 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10465/* confdefs.h. */
10466_ACEOF
10467cat confdefs.h >>conftest.$ac_ext
10468cat >>conftest.$ac_ext <<_ACEOF
10469/* end confdefs.h. */
e256b8b6 10470/* Thanks to Mike Rendell for this test. */
b61ff9c8 10471#include <sys/types.h>
e256b8b6
DA
10472#define NGID 256
10473#undef MAX
10474#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
10475
10476int
10477main ()
e256b8b6
DA
10478{
10479 gid_t gidset[NGID];
10480 int i, n;
b61ff9c8 10481 union { gid_t gval; long lval; } val;
e256b8b6
DA
10482
10483 val.lval = -1;
10484 for (i = 0; i < NGID; i++)
10485 gidset[i] = val.gval;
10486 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 10487 gidset);
e256b8b6 10488 /* Exit non-zero if getgroups seems to require an array of ints. This
b61ff9c8
BS
10489 happens when gid_t is short but getgroups modifies an array of ints. */
10490 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 10491}
ba479fd2
NN
10492_ACEOF
10493rm -f conftest$ac_exeext
b61ff9c8
BS
10494if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10495 (eval $ac_link) 2>&5
ba479fd2
NN
10496 ac_status=$?
10497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10498 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
10499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10500 (eval $ac_try) 2>&5
ba479fd2
NN
10501 ac_status=$?
10502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10503 (exit $ac_status); }; }; then
10504 ac_cv_type_getgroups=gid_t
63cf211a 10505else
ba479fd2
NN
10506 echo "$as_me: program exited with status $ac_status" >&5
10507echo "$as_me: failed program was:" >&5
10508sed 's/^/| /' conftest.$ac_ext >&5
10509
10510( exit $ac_status )
10511ac_cv_type_getgroups=int
e256b8b6 10512fi
b61ff9c8 10513rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 10514fi
e256b8b6 10515if test $ac_cv_type_getgroups = cross; then
ba479fd2 10516 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10517/* confdefs.h. */
10518_ACEOF
10519cat confdefs.h >>conftest.$ac_ext
10520cat >>conftest.$ac_ext <<_ACEOF
10521/* end confdefs.h. */
e256b8b6 10522#include <unistd.h>
ba479fd2
NN
10523
10524_ACEOF
e256b8b6 10525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 10526 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
10527 ac_cv_type_getgroups=gid_t
10528else
e256b8b6
DA
10529 ac_cv_type_getgroups=int
10530fi
10531rm -f conftest*
10532
10533fi
10534fi
b61ff9c8
BS
10535echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
10536echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 10537
ba479fd2 10538cat >>confdefs.h <<_ACEOF
e256b8b6 10539#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 10540_ACEOF
e256b8b6
DA
10541
10542
10543if test "${target}" = "${build}"; then
10544 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
10545else
10546 case "${target}" in
10547 # This condition may need some tweaking. It should include all
10548 # targets where the array type of the second argument of getgroups
10549 # is int and the type of gid_t is not equivalent to int.
10550 *-*-sunos* | *-*-ultrix*)
10551 TARGET_GETGROUPS_T=int
10552 ;;
10553 *)
10554 TARGET_GETGROUPS_T=gid_t
10555 ;;
10556 esac
10557fi
10558
10559
3b0727a0 10560
b61ff9c8
BS
10561echo "$as_me:$LINENO: checking for sys/mman.h" >&5
10562echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
3b0727a0
MR
10563if test "${ac_cv_header_sys_mman_h+set}" = set; then
10564 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10565else
18fc9bd4 10566 cat >conftest.$ac_ext <<_ACEOF
3b0727a0
MR
10567/* confdefs.h. */
10568_ACEOF
10569cat confdefs.h >>conftest.$ac_ext
10570cat >>conftest.$ac_ext <<_ACEOF
10571/* end confdefs.h. */
10572#include <sys/mman.h>
10573_ACEOF
b61ff9c8
BS
10574if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10575 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3b0727a0
MR
10576 ac_status=$?
10577 grep -v '^ *+' conftest.er1 >conftest.err
10578 rm -f conftest.er1
10579 cat conftest.err >&5
10580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10581 (exit $ac_status); } >/dev/null; then
10582 if test -s conftest.err; then
10583 ac_cpp_err=$ac_c_preproc_warn_flag
10584 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10585 else
10586 ac_cpp_err=
10587 fi
10588else
10589 ac_cpp_err=yes
10590fi
10591if test -z "$ac_cpp_err"; then
10592 ac_cv_header_sys_mman_h=yes
10593else
3b0727a0
MR
10594 echo "$as_me: failed program was:" >&5
10595sed 's/^/| /' conftest.$ac_ext >&5
10596
18fc9bd4 10597 ac_cv_header_sys_mman_h=no
3b0727a0
MR
10598fi
10599rm -f conftest.err conftest.$ac_ext
10600fi
b61ff9c8
BS
10601echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
10602echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
3b0727a0
MR
10603if test $ac_cv_header_sys_mman_h = yes; then
10604 gcc_header_sys_mman_h=yes
10605else
10606 gcc_header_sys_mman_h=no
10607fi
10608
b61ff9c8
BS
10609echo "$as_me:$LINENO: checking for mmap" >&5
10610echo $ECHO_N "checking for mmap... $ECHO_C" >&6
3b0727a0
MR
10611if test "${ac_cv_func_mmap+set}" = set; then
10612 echo $ECHO_N "(cached) $ECHO_C" >&6
10613else
10614 cat >conftest.$ac_ext <<_ACEOF
10615/* confdefs.h. */
10616_ACEOF
10617cat confdefs.h >>conftest.$ac_ext
10618cat >>conftest.$ac_ext <<_ACEOF
10619/* end confdefs.h. */
10620/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
10621 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10622#define mmap innocuous_mmap
10623
10624/* System header to define __stub macros and hopefully few prototypes,
10625 which can conflict with char mmap (); below.
10626 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10627 <limits.h> exists even on freestanding compilers. */
10628
10629#ifdef __STDC__
10630# include <limits.h>
10631#else
10632# include <assert.h>
10633#endif
10634
10635#undef mmap
10636
b61ff9c8 10637/* Override any gcc2 internal prototype to avoid an error. */
3b0727a0
MR
10638#ifdef __cplusplus
10639extern "C"
b61ff9c8 10640{
3b0727a0 10641#endif
b61ff9c8
BS
10642/* We use char because int might match the return type of a gcc2
10643 builtin and then its argument prototype would still apply. */
3b0727a0
MR
10644char mmap ();
10645/* The GNU C library defines this for functions which it implements
10646 to always fail with ENOSYS. Some functions are actually named
10647 something starting with __ and the normal name is an alias. */
b61ff9c8 10648#if defined (__stub_mmap) || defined (__stub___mmap)
3b0727a0 10649choke me
b61ff9c8
BS
10650#else
10651char (*f) () = mmap;
10652#endif
10653#ifdef __cplusplus
10654}
3b0727a0
MR
10655#endif
10656
10657int
10658main ()
10659{
b61ff9c8 10660return f != mmap;
3b0727a0
MR
10661 ;
10662 return 0;
10663}
10664_ACEOF
10665rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
10666if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10667 (eval $ac_link) 2>conftest.er1
3b0727a0
MR
10668 ac_status=$?
10669 grep -v '^ *+' conftest.er1 >conftest.err
10670 rm -f conftest.er1
10671 cat conftest.err >&5
10672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10673 (exit $ac_status); } &&
10674 { ac_try='test -z "$ac_c_werror_flag"
10675 || test ! -s conftest.err'
10676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10677 (eval $ac_try) 2>&5
10678 ac_status=$?
10679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10680 (exit $ac_status); }; } &&
10681 { ac_try='test -s conftest$ac_exeext'
10682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10683 (eval $ac_try) 2>&5
10684 ac_status=$?
10685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10686 (exit $ac_status); }; }; then
8b1f719a
PB
10687 ac_cv_func_mmap=yes
10688else
10689 echo "$as_me: failed program was:" >&5
10690sed 's/^/| /' conftest.$ac_ext >&5
a6ccdbab 10691
b61ff9c8 10692ac_cv_func_mmap=no
8b1f719a 10693fi
b61ff9c8 10694rm -f conftest.err conftest.$ac_objext \
3b0727a0
MR
10695 conftest$ac_exeext conftest.$ac_ext
10696fi
b61ff9c8
BS
10697echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
10698echo "${ECHO_T}$ac_cv_func_mmap" >&6
3b0727a0
MR
10699if test $ac_cv_func_mmap = yes; then
10700 gcc_func_mmap=yes
10701else
10702 gcc_func_mmap=no
10703fi
10704
10705if test "$gcc_header_sys_mman_h" != yes \
10706 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
10707 gcc_cv_func_mmap_file=no
10708 gcc_cv_func_mmap_dev_zero=no
10709 gcc_cv_func_mmap_anon=no
10710else
b61ff9c8
BS
10711 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
10712echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
ba479fd2
NN
10713if test "${gcc_cv_func_mmap_file+set}" = set; then
10714 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 10715else
ba479fd2 10716 # Add a system to this blacklist if
1072ec3f
ZW
10717 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
10718 # memory area containing the same data that you'd get if you applied
10719 # read() to the same fd. The only system known to have a problem here
10720 # is VMS, where text files have record structure.
10721 case "$host_os" in
ba479fd2 10722 vms* | ultrix*)
1072ec3f
ZW
10723 gcc_cv_func_mmap_file=no ;;
10724 *)
10725 gcc_cv_func_mmap_file=yes;;
10726 esac
10727fi
b61ff9c8
BS
10728echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
10729echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
10730 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
10731echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
ba479fd2
NN
10732if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
10733 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
10734else
10735 # Add a system to this blacklist if it has mmap() but /dev/zero
10736 # does not exist, or if mmapping /dev/zero does not give anonymous
10737 # zeroed pages with both the following properties:
10738 # 1. If you map N consecutive pages in with one call, and then
10739 # unmap any subset of those pages, the pages that were not
10740 # explicitly unmapped remain accessible.
10741 # 2. If you map two adjacent blocks of memory and then unmap them
10742 # both at once, they must both go away.
10743 # Systems known to be in this category are Windows (all variants),
10744 # VMS, and Darwin.
10745 case "$host_os" in
2ce240d3 10746 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
10747 gcc_cv_func_mmap_dev_zero=no ;;
10748 *)
10749 gcc_cv_func_mmap_dev_zero=yes;;
10750 esac
10751fi
b61ff9c8
BS
10752echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
10753echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
10754
10755 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
b61ff9c8
BS
10756 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
10757echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
ba479fd2
NN
10758if test "${gcc_cv_decl_map_anon+set}" = set; then
10759 echo $ECHO_N "(cached) $ECHO_C" >&6
10760else
10761 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10762/* confdefs.h. */
10763_ACEOF
10764cat confdefs.h >>conftest.$ac_ext
10765cat >>conftest.$ac_ext <<_ACEOF
10766/* end confdefs.h. */
1072ec3f
ZW
10767#include <sys/types.h>
10768#include <sys/mman.h>
10769#include <unistd.h>
10770
10771#ifndef MAP_ANONYMOUS
10772#define MAP_ANONYMOUS MAP_ANON
10773#endif
10774
ba479fd2
NN
10775int
10776main ()
10777{
1072ec3f 10778int n = MAP_ANONYMOUS;
ba479fd2
NN
10779 ;
10780 return 0;
10781}
10782_ACEOF
10783rm -f conftest.$ac_objext
b61ff9c8
BS
10784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10785 (eval $ac_compile) 2>conftest.er1
ba479fd2 10786 ac_status=$?
86da66b5
HPN
10787 grep -v '^ *+' conftest.er1 >conftest.err
10788 rm -f conftest.er1
10789 cat conftest.err >&5
ba479fd2 10790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10791 (exit $ac_status); } &&
10792 { ac_try='test -z "$ac_c_werror_flag"
10793 || test ! -s conftest.err'
10794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10795 (eval $ac_try) 2>&5
10796 ac_status=$?
10797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10798 (exit $ac_status); }; } &&
10799 { ac_try='test -s conftest.$ac_objext'
10800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10801 (eval $ac_try) 2>&5
10802 ac_status=$?
10803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10804 (exit $ac_status); }; }; then
1072ec3f
ZW
10805 gcc_cv_decl_map_anon=yes
10806else
ba479fd2
NN
10807 echo "$as_me: failed program was:" >&5
10808sed 's/^/| /' conftest.$ac_ext >&5
10809
b61ff9c8 10810gcc_cv_decl_map_anon=no
1072ec3f 10811fi
b61ff9c8 10812rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 10813fi
b61ff9c8
BS
10814echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
10815echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
10816
10817 if test $gcc_cv_decl_map_anon = no; then
10818 gcc_cv_func_mmap_anon=no
10819 else
b61ff9c8
BS
10820 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
10821echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
ba479fd2
NN
10822if test "${gcc_cv_func_mmap_anon+set}" = set; then
10823 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
10824else
10825 # Add a system to this blacklist if it has mmap() and MAP_ANON or
10826 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
10827 # doesn't give anonymous zeroed pages with the same properties listed
10828 # above for use of /dev/zero.
10829 # Systems known to be in this category are Windows, VMS, and SCO Unix.
10830 case "$host_os" in
10831 vms* | cygwin* | pe | mingw* | sco* | udk* )
10832 gcc_cv_func_mmap_anon=no ;;
10833 *)
10834 gcc_cv_func_mmap_anon=yes;;
10835 esac
10836fi
b61ff9c8
BS
10837echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
10838echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
10839 fi
10840fi
10841
10842if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
10843
10844cat >>confdefs.h <<\_ACEOF
1072ec3f 10845#define HAVE_MMAP_FILE 1
ba479fd2 10846_ACEOF
1072ec3f
ZW
10847
10848fi
10849if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
10850
10851cat >>confdefs.h <<\_ACEOF
1072ec3f 10852#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 10853_ACEOF
1072ec3f
ZW
10854
10855fi
10856if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
10857
10858cat >>confdefs.h <<\_ACEOF
1072ec3f 10859#define HAVE_MMAP_ANON 1
ba479fd2 10860_ACEOF
1072ec3f
ZW
10861
10862fi
10863
b27d2bd5
MK
10864
10865case "${host}" in
ee262b6f 10866*-*-*vms*)
ba479fd2 10867 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
10868 # won't work, and it isn't easily adaptable. It makes more sense to
10869 # just force it.
10870 ac_cv_func_vfork_works=yes
10871 ;;
b27d2bd5 10872esac
b61ff9c8
BS
10873echo "$as_me:$LINENO: checking for pid_t" >&5
10874echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
ba479fd2
NN
10875if test "${ac_cv_type_pid_t+set}" = set; then
10876 echo $ECHO_N "(cached) $ECHO_C" >&6
10877else
10878 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10879/* confdefs.h. */
10880_ACEOF
10881cat confdefs.h >>conftest.$ac_ext
10882cat >>conftest.$ac_ext <<_ACEOF
10883/* end confdefs.h. */
10884$ac_includes_default
10885int
10886main ()
10887{
b61ff9c8 10888if ((pid_t *) 0)
ba479fd2 10889 return 0;
b61ff9c8 10890if (sizeof (pid_t))
ba479fd2
NN
10891 return 0;
10892 ;
10893 return 0;
10894}
10895_ACEOF
10896rm -f conftest.$ac_objext
b61ff9c8
BS
10897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10898 (eval $ac_compile) 2>conftest.er1
ba479fd2 10899 ac_status=$?
86da66b5
HPN
10900 grep -v '^ *+' conftest.er1 >conftest.err
10901 rm -f conftest.er1
10902 cat conftest.err >&5
ba479fd2 10903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10904 (exit $ac_status); } &&
10905 { ac_try='test -z "$ac_c_werror_flag"
10906 || test ! -s conftest.err'
10907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10908 (eval $ac_try) 2>&5
10909 ac_status=$?
10910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10911 (exit $ac_status); }; } &&
10912 { ac_try='test -s conftest.$ac_objext'
10913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10914 (eval $ac_try) 2>&5
10915 ac_status=$?
10916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10917 (exit $ac_status); }; }; then
cb65112a 10918 ac_cv_type_pid_t=yes
c375c43b 10919else
ba479fd2
NN
10920 echo "$as_me: failed program was:" >&5
10921sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10922
b61ff9c8 10923ac_cv_type_pid_t=no
ba479fd2 10924fi
b61ff9c8 10925rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10926fi
b61ff9c8
BS
10927echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10928echo "${ECHO_T}$ac_cv_type_pid_t" >&6
ba479fd2
NN
10929if test $ac_cv_type_pid_t = yes; then
10930 :
10931else
10932
10933cat >>confdefs.h <<_ACEOF
c375c43b 10934#define pid_t int
ba479fd2 10935_ACEOF
c375c43b
KG
10936
10937fi
10938
ba479fd2 10939
b61ff9c8
BS
10940
10941for ac_header in unistd.h vfork.h
ba479fd2
NN
10942do
10943as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b61ff9c8
BS
10944echo "$as_me:$LINENO: checking for $ac_header" >&5
10945echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10946if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 10947 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10948else
18fc9bd4 10949 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10950/* confdefs.h. */
10951_ACEOF
10952cat confdefs.h >>conftest.$ac_ext
10953cat >>conftest.$ac_ext <<_ACEOF
10954/* end confdefs.h. */
10955#include <$ac_header>
10956_ACEOF
b61ff9c8
BS
10957if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10958 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
10959 ac_status=$?
10960 grep -v '^ *+' conftest.er1 >conftest.err
10961 rm -f conftest.er1
10962 cat conftest.err >&5
10963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10964 (exit $ac_status); } >/dev/null; then
10965 if test -s conftest.err; then
10966 ac_cpp_err=$ac_c_preproc_warn_flag
10967 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10968 else
10969 ac_cpp_err=
10970 fi
10971else
10972 ac_cpp_err=yes
10973fi
10974if test -z "$ac_cpp_err"; then
18fc9bd4 10975 eval "$as_ac_Header=yes"
ba479fd2
NN
10976else
10977 echo "$as_me: failed program was:" >&5
10978sed 's/^/| /' conftest.$ac_ext >&5
10979
18fc9bd4 10980 eval "$as_ac_Header=no"
ba479fd2
NN
10981fi
10982rm -f conftest.err conftest.$ac_ext
c375c43b 10983fi
b61ff9c8
BS
10984echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10985echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
10986if test `eval echo '${'$as_ac_Header'}'` = yes; then
10987 cat >>confdefs.h <<_ACEOF
10988#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10989_ACEOF
6e3f3080
NN
10990
10991fi
ba479fd2
NN
10992done
10993
10994
10995
10996for ac_func in fork vfork
10997do
10998as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b61ff9c8
BS
10999echo "$as_me:$LINENO: checking for $ac_func" >&5
11000echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11001if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
11002 echo $ECHO_N "(cached) $ECHO_C" >&6
11003else
11004 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11005/* confdefs.h. */
11006_ACEOF
11007cat confdefs.h >>conftest.$ac_ext
11008cat >>conftest.$ac_ext <<_ACEOF
11009/* end confdefs.h. */
86da66b5
HPN
11010/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11011 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11012#define $ac_func innocuous_$ac_func
11013
c375c43b 11014/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
11015 which can conflict with char $ac_func (); below.
11016 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11017 <limits.h> exists even on freestanding compilers. */
86da66b5 11018
ba479fd2
NN
11019#ifdef __STDC__
11020# include <limits.h>
11021#else
11022# include <assert.h>
11023#endif
86da66b5
HPN
11024
11025#undef $ac_func
11026
b61ff9c8 11027/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
11028#ifdef __cplusplus
11029extern "C"
b61ff9c8 11030{
ba479fd2 11031#endif
b61ff9c8
BS
11032/* We use char because int might match the return type of a gcc2
11033 builtin and then its argument prototype would still apply. */
ba479fd2 11034char $ac_func ();
c375c43b
KG
11035/* The GNU C library defines this for functions which it implements
11036 to always fail with ENOSYS. Some functions are actually named
11037 something starting with __ and the normal name is an alias. */
b61ff9c8 11038#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b 11039choke me
b61ff9c8
BS
11040#else
11041char (*f) () = $ac_func;
11042#endif
11043#ifdef __cplusplus
11044}
c375c43b
KG
11045#endif
11046
ba479fd2
NN
11047int
11048main ()
11049{
b61ff9c8 11050return f != $ac_func;
ba479fd2
NN
11051 ;
11052 return 0;
11053}
11054_ACEOF
11055rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11057 (eval $ac_link) 2>conftest.er1
ba479fd2 11058 ac_status=$?
86da66b5
HPN
11059 grep -v '^ *+' conftest.er1 >conftest.err
11060 rm -f conftest.er1
11061 cat conftest.err >&5
ba479fd2 11062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11063 (exit $ac_status); } &&
11064 { ac_try='test -z "$ac_c_werror_flag"
11065 || test ! -s conftest.err'
11066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11067 (eval $ac_try) 2>&5
11068 ac_status=$?
11069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11070 (exit $ac_status); }; } &&
11071 { ac_try='test -s conftest$ac_exeext'
11072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11073 (eval $ac_try) 2>&5
11074 ac_status=$?
11075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11076 (exit $ac_status); }; }; then
ba479fd2
NN
11077 eval "$as_ac_var=yes"
11078else
11079 echo "$as_me: failed program was:" >&5
11080sed 's/^/| /' conftest.$ac_ext >&5
11081
b61ff9c8 11082eval "$as_ac_var=no"
ba479fd2 11083fi
b61ff9c8 11084rm -f conftest.err conftest.$ac_objext \
86da66b5 11085 conftest$ac_exeext conftest.$ac_ext
ba479fd2 11086fi
b61ff9c8
BS
11087echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11088echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
11089if test `eval echo '${'$as_ac_var'}'` = yes; then
11090 cat >>confdefs.h <<_ACEOF
11091#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11092_ACEOF
11093
c375c43b 11094fi
ba479fd2 11095done
c375c43b 11096
ba479fd2 11097if test "x$ac_cv_func_fork" = xyes; then
b61ff9c8
BS
11098 echo "$as_me:$LINENO: checking for working fork" >&5
11099echo $ECHO_N "checking for working fork... $ECHO_C" >&6
ba479fd2
NN
11100if test "${ac_cv_func_fork_works+set}" = set; then
11101 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 11102else
ba479fd2
NN
11103 if test "$cross_compiling" = yes; then
11104 ac_cv_func_fork_works=cross
11105else
11106 cat >conftest.$ac_ext <<_ACEOF
b61ff9c8
BS
11107/* By Ruediger Kuhlmann. */
11108 #include <sys/types.h>
11109 #if HAVE_UNISTD_H
11110 # include <unistd.h>
11111 #endif
11112 /* Some systems only have a dummy stub for fork() */
11113 int main ()
11114 {
11115 if (fork() < 0)
11116 exit (1);
11117 exit (0);
11118 }
1a4b763e
BS
11119_ACEOF
11120rm -f conftest$ac_exeext
b61ff9c8
BS
11121if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11122 (eval $ac_link) 2>&5
1a4b763e
BS
11123 ac_status=$?
11124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11125 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
11126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11127 (eval $ac_try) 2>&5
ba479fd2
NN
11128 ac_status=$?
11129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11130 (exit $ac_status); }; }; then
11131 ac_cv_func_fork_works=yes
11132else
11133 echo "$as_me: program exited with status $ac_status" >&5
11134echo "$as_me: failed program was:" >&5
11135sed 's/^/| /' conftest.$ac_ext >&5
11136
11137( exit $ac_status )
11138ac_cv_func_fork_works=no
11139fi
b61ff9c8 11140rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
11141fi
11142fi
b61ff9c8
BS
11143echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
11144echo "${ECHO_T}$ac_cv_func_fork_works" >&6
ba479fd2
NN
11145
11146else
11147 ac_cv_func_fork_works=$ac_cv_func_fork
11148fi
11149if test "x$ac_cv_func_fork_works" = xcross; then
11150 case $host in
11151 *-*-amigaos* | *-*-msdosdjgpp*)
11152 # Override, as these systems have only a dummy fork() stub
11153 ac_cv_func_fork_works=no
11154 ;;
11155 *)
11156 ac_cv_func_fork_works=yes
11157 ;;
11158 esac
11159 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11160echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 11161fi
c375c43b 11162ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2 11163if test "x$ac_cv_func_vfork" = xyes; then
b61ff9c8
BS
11164 echo "$as_me:$LINENO: checking for working vfork" >&5
11165echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
ba479fd2
NN
11166if test "${ac_cv_func_vfork_works+set}" = set; then
11167 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 11168else
ba479fd2
NN
11169 if test "$cross_compiling" = yes; then
11170 ac_cv_func_vfork_works=cross
11171else
11172 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11173/* confdefs.h. */
11174_ACEOF
11175cat confdefs.h >>conftest.$ac_ext
11176cat >>conftest.$ac_ext <<_ACEOF
11177/* end confdefs.h. */
c375c43b 11178/* Thanks to Paul Eggert for this test. */
b61ff9c8
BS
11179#include <stdio.h>
11180#include <stdlib.h>
11181#include <sys/types.h>
11182#include <sys/stat.h>
ba479fd2 11183#include <sys/wait.h>
b61ff9c8
BS
11184#if HAVE_UNISTD_H
11185# include <unistd.h>
11186#endif
11187#if HAVE_VFORK_H
ba479fd2 11188# include <vfork.h>
c375c43b
KG
11189#endif
11190/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
11191 argument registers are propagated back to the parent. The compiler
11192 is told about this with #include <vfork.h>, but some compilers
11193 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11194 static variable whose address is put into a register that is
11195 clobbered by the vfork. */
11196static void
c375c43b
KG
11197#ifdef __cplusplus
11198sparc_address_test (int arg)
ba479fd2 11199# else
c375c43b
KG
11200sparc_address_test (arg) int arg;
11201#endif
11202{
11203 static pid_t child;
11204 if (!child) {
11205 child = vfork ();
11206 if (child < 0) {
11207 perror ("vfork");
11208 _exit(2);
11209 }
11210 if (!child) {
11211 arg = getpid();
11212 write(-1, "", 0);
11213 _exit (arg);
11214 }
11215 }
11216}
ba479fd2
NN
11217
11218int
11219main ()
11220{
c375c43b
KG
11221 pid_t parent = getpid ();
11222 pid_t child;
11223
ba479fd2 11224 sparc_address_test (0);
c375c43b
KG
11225
11226 child = vfork ();
11227
11228 if (child == 0) {
ba479fd2
NN
11229 /* Here is another test for sparc vfork register problems. This
11230 test uses lots of local variables, at least as many local
11231 variables as main has allocated so far including compiler
11232 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11233 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11234 reuse the register of parent for one of the local variables,
11235 since it will think that parent can't possibly be used any more
11236 in this routine. Assigning to the local variable will thus
11237 munge parent in the parent process. */
c375c43b
KG
11238 pid_t
11239 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11240 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11241 /* Convince the compiler that p..p7 are live; otherwise, it might
11242 use the same hardware register for all 8 local variables. */
11243 if (p != p1 || p != p2 || p != p3 || p != p4
11244 || p != p5 || p != p6 || p != p7)
11245 _exit(1);
11246
ba479fd2
NN
11247 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11248 from child file descriptors. If the child closes a descriptor
11249 before it execs or exits, this munges the parent's descriptor
11250 as well. Test for this by closing stdout in the child. */
c375c43b
KG
11251 _exit(close(fileno(stdout)) != 0);
11252 } else {
11253 int status;
11254 struct stat st;
11255
11256 while (wait(&status) != child)
11257 ;
b61ff9c8 11258 exit(
c375c43b
KG
11259 /* Was there some problem with vforking? */
11260 child < 0
11261
11262 /* Did the child fail? (This shouldn't happen.) */
11263 || status
11264
11265 /* Did the vfork/compiler bug occur? */
11266 || parent != getpid()
11267
11268 /* Did the file descriptor bug occur? */
11269 || fstat(fileno(stdout), &st) != 0
11270 );
11271 }
11272}
ba479fd2
NN
11273_ACEOF
11274rm -f conftest$ac_exeext
b61ff9c8
BS
11275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11276 (eval $ac_link) 2>&5
ba479fd2
NN
11277 ac_status=$?
11278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11279 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
11280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11281 (eval $ac_try) 2>&5
ba479fd2
NN
11282 ac_status=$?
11283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11284 (exit $ac_status); }; }; then
c375c43b
KG
11285 ac_cv_func_vfork_works=yes
11286else
ba479fd2
NN
11287 echo "$as_me: program exited with status $ac_status" >&5
11288echo "$as_me: failed program was:" >&5
11289sed 's/^/| /' conftest.$ac_ext >&5
11290
11291( exit $ac_status )
11292ac_cv_func_vfork_works=no
cafe096b 11293fi
b61ff9c8 11294rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 11295fi
ba479fd2 11296fi
b61ff9c8
BS
11297echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
11298echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 11299
ba479fd2
NN
11300fi;
11301if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 11302 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
11303 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11304echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
11305fi
11306
ba479fd2
NN
11307if test "x$ac_cv_func_vfork_works" = xyes; then
11308
11309cat >>confdefs.h <<\_ACEOF
11310#define HAVE_WORKING_VFORK 1
11311_ACEOF
11312
11313else
11314
11315cat >>confdefs.h <<\_ACEOF
c375c43b 11316#define vfork fork
ba479fd2 11317_ACEOF
c375c43b
KG
11318
11319fi
ba479fd2
NN
11320if test "x$ac_cv_func_fork_works" = xyes; then
11321
11322cat >>confdefs.h <<\_ACEOF
11323#define HAVE_WORKING_FORK 1
11324_ACEOF
11325
11326fi
11327
c375c43b 11328
81bf3d9e 11329
dfb77e37
KC
11330 if test "X$prefix" = "XNONE"; then
11331 acl_final_prefix="$ac_default_prefix"
11332 else
11333 acl_final_prefix="$prefix"
11334 fi
11335 if test "X$exec_prefix" = "XNONE"; then
11336 acl_final_exec_prefix='${prefix}'
11337 else
11338 acl_final_exec_prefix="$exec_prefix"
11339 fi
11340 acl_save_prefix="$prefix"
11341 prefix="$acl_final_prefix"
11342 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
11343 prefix="$acl_save_prefix"
f91abfce
TT
11344
11345
b61ff9c8 11346# Check whether --with-gnu-ld or --without-gnu-ld was given.
dfb77e37 11347if test "${with_gnu_ld+set}" = set; then
b61ff9c8
BS
11348 withval="$with_gnu_ld"
11349 test "$withval" = no || with_gnu_ld=yes
ba479fd2 11350else
dfb77e37 11351 with_gnu_ld=no
b61ff9c8 11352fi;
dfb77e37
KC
11353# Prepare PATH_SEPARATOR.
11354# The user is always right.
11355if test "${PATH_SEPARATOR+set}" != set; then
11356 echo "#! /bin/sh" >conf$$.sh
11357 echo "exit 0" >>conf$$.sh
11358 chmod +x conf$$.sh
11359 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11360 PATH_SEPARATOR=';'
ba479fd2 11361 else
dfb77e37 11362 PATH_SEPARATOR=:
ba479fd2 11363 fi
dfb77e37
KC
11364 rm -f conf$$.sh
11365fi
11366ac_prog=ld
11367if test "$GCC" = yes; then
11368 # Check if gcc -print-prog-name=ld gives a path.
b61ff9c8
BS
11369 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
11370echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
dfb77e37
KC
11371 case $host in
11372 *-*-mingw*)
11373 # gcc leaves a trailing carriage return which upsets mingw
11374 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11375 *)
11376 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11377 esac
11378 case $ac_prog in
11379 # Accept absolute paths.
11380 [\\/]* | [A-Za-z]:[\\/]*)
11381 re_direlt='/[^/][^/]*/\.\./'
11382 # Canonicalize the path of ld
11383 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
11384 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
11385 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
11386 done
11387 test -z "$LD" && LD="$ac_prog"
11388 ;;
11389 "")
11390 # If it fails, then pretend we aren't using GCC.
11391 ac_prog=ld
11392 ;;
11393 *)
11394 # If it is relative, then search for the first ld in PATH.
11395 with_gnu_ld=unknown
11396 ;;
11397 esac
11398elif test "$with_gnu_ld" = yes; then
b61ff9c8
BS
11399 echo "$as_me:$LINENO: checking for GNU ld" >&5
11400echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 11401else
b61ff9c8
BS
11402 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
11403echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 11404fi
dfb77e37
KC
11405if test "${acl_cv_path_LD+set}" = set; then
11406 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 11407else
dfb77e37
KC
11408 if test -z "$LD"; then
11409 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
11410 for ac_dir in $PATH; do
11411 test -z "$ac_dir" && ac_dir=.
11412 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11413 acl_cv_path_LD="$ac_dir/$ac_prog"
11414 # Check to see if the program is GNU ld. I'd rather use --version,
11415 # but apparently some GNU ld's only accept -v.
11416 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
11417 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
11418 test "$with_gnu_ld" != no && break
11419 else
11420 test "$with_gnu_ld" != yes && break
11421 fi
dfb77e37
KC
11422 fi
11423 done
11424 IFS="$ac_save_ifs"
11425else
11426 acl_cv_path_LD="$LD" # Let the user override the test with a path.
11427fi
11428fi
ba479fd2 11429
dfb77e37
KC
11430LD="$acl_cv_path_LD"
11431if test -n "$LD"; then
b61ff9c8
BS
11432 echo "$as_me:$LINENO: result: $LD" >&5
11433echo "${ECHO_T}$LD" >&6
dfb77e37 11434else
b61ff9c8
BS
11435 echo "$as_me:$LINENO: result: no" >&5
11436echo "${ECHO_T}no" >&6
ba479fd2 11437fi
dfb77e37
KC
11438test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
11439echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
11440 { (exit 1); exit 1; }; }
b61ff9c8
BS
11441echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
11442echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
dfb77e37
KC
11443if test "${acl_cv_prog_gnu_ld+set}" = set; then
11444 echo $ECHO_N "(cached) $ECHO_C" >&6
11445else
11446 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
11447if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
11448 acl_cv_prog_gnu_ld=yes
11449else
11450 acl_cv_prog_gnu_ld=no
11451fi
dfb77e37 11452fi
b61ff9c8
BS
11453echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
11454echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
dfb77e37
KC
11455with_gnu_ld=$acl_cv_prog_gnu_ld
11456
11457
11458
b61ff9c8
BS
11459 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
11460echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
dfb77e37
KC
11461if test "${acl_cv_rpath+set}" = set; then
11462 echo $ECHO_N "(cached) $ECHO_C" >&6
11463else
11464
11465 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
11466 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
11467 . ./conftest.sh
11468 rm -f ./conftest.sh
11469 acl_cv_rpath=done
ba479fd2 11470
eb158727 11471fi
b61ff9c8
BS
11472echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
11473echo "${ECHO_T}$acl_cv_rpath" >&6
dfb77e37
KC
11474 wl="$acl_cv_wl"
11475 libext="$acl_cv_libext"
11476 shlibext="$acl_cv_shlibext"
11477 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
11478 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
11479 hardcode_direct="$acl_cv_hardcode_direct"
11480 hardcode_minus_L="$acl_cv_hardcode_minus_L"
b61ff9c8 11481 # Check whether --enable-rpath or --disable-rpath was given.
dfb77e37 11482if test "${enable_rpath+set}" = set; then
b61ff9c8
BS
11483 enableval="$enable_rpath"
11484 :
dfb77e37
KC
11485else
11486 enable_rpath=yes
b61ff9c8 11487fi;
8b1f719a 11488
a6ccdbab 11489
dfb77e37
KC
11490
11491
11492
11493
11494
b639c3c2
JJ
11495 use_additional=yes
11496
11497 acl_save_prefix="$prefix"
11498 prefix="$acl_final_prefix"
11499 acl_save_exec_prefix="$exec_prefix"
11500 exec_prefix="$acl_final_exec_prefix"
11501
11502 eval additional_includedir=\"$includedir\"
11503 eval additional_libdir=\"$libdir\"
11504
11505 exec_prefix="$acl_save_exec_prefix"
11506 prefix="$acl_save_prefix"
dfb77e37
KC
11507
11508
b61ff9c8 11509# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
8b1f719a 11510if test "${with_libiconv_prefix+set}" = set; then
b61ff9c8
BS
11511 withval="$with_libiconv_prefix"
11512
8b1f719a 11513 if test "X$withval" = "Xno"; then
b639c3c2 11514 use_additional=no
8b1f719a
PB
11515 else
11516 if test "X$withval" = "X"; then
dfb77e37
KC
11517
11518 acl_save_prefix="$prefix"
11519 prefix="$acl_final_prefix"
11520 acl_save_exec_prefix="$exec_prefix"
11521 exec_prefix="$acl_final_exec_prefix"
11522
b639c3c2
JJ
11523 eval additional_includedir=\"$includedir\"
11524 eval additional_libdir=\"$libdir\"
dfb77e37
KC
11525
11526 exec_prefix="$acl_save_exec_prefix"
11527 prefix="$acl_save_prefix"
11528
8b1f719a 11529 else
b639c3c2
JJ
11530 additional_includedir="$withval/include"
11531 additional_libdir="$withval/lib"
8b1f719a
PB
11532 fi
11533 fi
11534
b61ff9c8 11535fi;
dfb77e37
KC
11536 LIBICONV=
11537 LTLIBICONV=
11538 INCICONV=
11539 rpathdirs=
11540 ltrpathdirs=
11541 names_already_handled=
11542 names_next_round='iconv '
11543 while test -n "$names_next_round"; do
11544 names_this_round="$names_next_round"
11545 names_next_round=
11546 for name in $names_this_round; do
11547 already_handled=
11548 for n in $names_already_handled; do
11549 if test "$n" = "$name"; then
11550 already_handled=yes
11551 break
11552 fi
11553 done
11554 if test -z "$already_handled"; then
11555 names_already_handled="$names_already_handled $name"
11556 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11557 eval value=\"\$HAVE_LIB$uppername\"
11558 if test -n "$value"; then
11559 if test "$value" = yes; then
11560 eval value=\"\$LIB$uppername\"
11561 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11562 eval value=\"\$LTLIB$uppername\"
11563 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11564 else
11565 :
11566 fi
11567 else
11568 found_dir=
11569 found_la=
11570 found_so=
11571 found_a=
b639c3c2
JJ
11572 if test $use_additional = yes; then
11573 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11574 found_dir="$additional_libdir"
11575 found_so="$additional_libdir/lib$name.$shlibext"
11576 if test -f "$additional_libdir/lib$name.la"; then
11577 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
11578 fi
11579 else
b639c3c2
JJ
11580 if test -f "$additional_libdir/lib$name.$libext"; then
11581 found_dir="$additional_libdir"
11582 found_a="$additional_libdir/lib$name.$libext"
11583 if test -f "$additional_libdir/lib$name.la"; then
11584 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
11585 fi
11586 fi
11587 fi
11588 fi
11589 if test "X$found_dir" = "X"; then
11590 for x in $LDFLAGS $LTLIBICONV; do
11591
11592 acl_save_prefix="$prefix"
11593 prefix="$acl_final_prefix"
11594 acl_save_exec_prefix="$exec_prefix"
11595 exec_prefix="$acl_final_exec_prefix"
11596 eval x=\"$x\"
11597 exec_prefix="$acl_save_exec_prefix"
11598 prefix="$acl_save_prefix"
11599
11600 case "$x" in
11601 -L*)
11602 dir=`echo "X$x" | sed -e 's/^X-L//'`
11603 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11604 found_dir="$dir"
11605 found_so="$dir/lib$name.$shlibext"
11606 if test -f "$dir/lib$name.la"; then
11607 found_la="$dir/lib$name.la"
11608 fi
11609 else
11610 if test -f "$dir/lib$name.$libext"; then
11611 found_dir="$dir"
11612 found_a="$dir/lib$name.$libext"
11613 if test -f "$dir/lib$name.la"; then
11614 found_la="$dir/lib$name.la"
11615 fi
11616 fi
11617 fi
11618 ;;
11619 esac
11620 if test "X$found_dir" != "X"; then
11621 break
11622 fi
11623 done
11624 fi
11625 if test "X$found_dir" != "X"; then
11626 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
11627 if test "X$found_so" != "X"; then
11628 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11629 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11630 else
11631 haveit=
11632 for x in $ltrpathdirs; do
11633 if test "X$x" = "X$found_dir"; then
11634 haveit=yes
11635 break
11636 fi
11637 done
11638 if test -z "$haveit"; then
11639 ltrpathdirs="$ltrpathdirs $found_dir"
11640 fi
11641 if test "$hardcode_direct" = yes; then
11642 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11643 else
11644 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11645 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11646 haveit=
11647 for x in $rpathdirs; do
11648 if test "X$x" = "X$found_dir"; then
11649 haveit=yes
11650 break
11651 fi
11652 done
11653 if test -z "$haveit"; then
11654 rpathdirs="$rpathdirs $found_dir"
11655 fi
11656 else
11657 haveit=
11658 for x in $LDFLAGS $LIBICONV; do
11659
11660 acl_save_prefix="$prefix"
11661 prefix="$acl_final_prefix"
11662 acl_save_exec_prefix="$exec_prefix"
11663 exec_prefix="$acl_final_exec_prefix"
11664 eval x=\"$x\"
11665 exec_prefix="$acl_save_exec_prefix"
11666 prefix="$acl_save_prefix"
11667
11668 if test "X$x" = "X-L$found_dir"; then
11669 haveit=yes
11670 break
11671 fi
11672 done
11673 if test -z "$haveit"; then
11674 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
11675 fi
11676 if test "$hardcode_minus_L" != no; then
11677 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11678 else
11679 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11680 fi
11681 fi
11682 fi
11683 fi
11684 else
11685 if test "X$found_a" != "X"; then
11686 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
11687 else
11688 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
11689 fi
11690 fi
11691 additional_includedir=
11692 case "$found_dir" in
11693 */lib | */lib/)
11694 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11695 additional_includedir="$basedir/include"
11696 ;;
11697 esac
11698 if test "X$additional_includedir" != "X"; then
11699 if test "X$additional_includedir" != "X/usr/include"; then
11700 haveit=
11701 if test "X$additional_includedir" = "X/usr/local/include"; then
11702 if test -n "$GCC"; then
11703 case $host_os in
18fc9bd4 11704 linux*) haveit=yes;;
dfb77e37
KC
11705 esac
11706 fi
11707 fi
11708 if test -z "$haveit"; then
11709 for x in $CPPFLAGS $INCICONV; do
11710
11711 acl_save_prefix="$prefix"
11712 prefix="$acl_final_prefix"
11713 acl_save_exec_prefix="$exec_prefix"
11714 exec_prefix="$acl_final_exec_prefix"
11715 eval x=\"$x\"
11716 exec_prefix="$acl_save_exec_prefix"
11717 prefix="$acl_save_prefix"
11718
11719 if test "X$x" = "X-I$additional_includedir"; then
11720 haveit=yes
11721 break
11722 fi
11723 done
11724 if test -z "$haveit"; then
11725 if test -d "$additional_includedir"; then
11726 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
11727 fi
11728 fi
11729 fi
11730 fi
11731 fi
11732 if test -n "$found_la"; then
11733 save_libdir="$libdir"
11734 case "$found_la" in
11735 */* | *\\*) . "$found_la" ;;
11736 *) . "./$found_la" ;;
11737 esac
11738 libdir="$save_libdir"
11739 for dep in $dependency_libs; do
11740 case "$dep" in
11741 -L*)
11742 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11743 if test "X$additional_libdir" != "X/usr/lib"; then
11744 haveit=
11745 if test "X$additional_libdir" = "X/usr/local/lib"; then
11746 if test -n "$GCC"; then
11747 case $host_os in
18fc9bd4 11748 linux*) haveit=yes;;
dfb77e37
KC
11749 esac
11750 fi
11751 fi
11752 if test -z "$haveit"; then
11753 haveit=
11754 for x in $LDFLAGS $LIBICONV; do
11755
11756 acl_save_prefix="$prefix"
11757 prefix="$acl_final_prefix"
11758 acl_save_exec_prefix="$exec_prefix"
11759 exec_prefix="$acl_final_exec_prefix"
11760 eval x=\"$x\"
11761 exec_prefix="$acl_save_exec_prefix"
11762 prefix="$acl_save_prefix"
11763
11764 if test "X$x" = "X-L$additional_libdir"; then
11765 haveit=yes
11766 break
11767 fi
11768 done
11769 if test -z "$haveit"; then
11770 if test -d "$additional_libdir"; then
11771 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
11772 fi
11773 fi
11774 haveit=
11775 for x in $LDFLAGS $LTLIBICONV; do
11776
11777 acl_save_prefix="$prefix"
11778 prefix="$acl_final_prefix"
11779 acl_save_exec_prefix="$exec_prefix"
11780 exec_prefix="$acl_final_exec_prefix"
11781 eval x=\"$x\"
11782 exec_prefix="$acl_save_exec_prefix"
11783 prefix="$acl_save_prefix"
11784
11785 if test "X$x" = "X-L$additional_libdir"; then
11786 haveit=yes
11787 break
11788 fi
11789 done
11790 if test -z "$haveit"; then
11791 if test -d "$additional_libdir"; then
11792 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
11793 fi
11794 fi
11795 fi
11796 fi
11797 ;;
11798 -R*)
11799 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11800 if test "$enable_rpath" != no; then
11801 haveit=
11802 for x in $rpathdirs; do
11803 if test "X$x" = "X$dir"; then
11804 haveit=yes
11805 break
11806 fi
11807 done
11808 if test -z "$haveit"; then
11809 rpathdirs="$rpathdirs $dir"
11810 fi
11811 haveit=
11812 for x in $ltrpathdirs; do
11813 if test "X$x" = "X$dir"; then
11814 haveit=yes
11815 break
11816 fi
11817 done
11818 if test -z "$haveit"; then
11819 ltrpathdirs="$ltrpathdirs $dir"
11820 fi
11821 fi
11822 ;;
11823 -l*)
11824 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11825 ;;
11826 *.la)
11827 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11828 ;;
11829 *)
11830 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
11831 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
11832 ;;
11833 esac
11834 done
11835 fi
11836 else
11837 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11838 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
11839 fi
11840 fi
11841 fi
11842 done
11843 done
11844 if test "X$rpathdirs" != "X"; then
11845 if test -n "$hardcode_libdir_separator"; then
11846 alldirs=
11847 for found_dir in $rpathdirs; do
11848 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11849 done
11850 acl_save_libdir="$libdir"
11851 libdir="$alldirs"
11852 eval flag=\"$hardcode_libdir_flag_spec\"
11853 libdir="$acl_save_libdir"
11854 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11855 else
11856 for found_dir in $rpathdirs; do
11857 acl_save_libdir="$libdir"
11858 libdir="$found_dir"
11859 eval flag=\"$hardcode_libdir_flag_spec\"
11860 libdir="$acl_save_libdir"
11861 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11862 done
11863 fi
11864 fi
11865 if test "X$ltrpathdirs" != "X"; then
11866 for found_dir in $ltrpathdirs; do
11867 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11868 done
11869 fi
11870
11871
11872
11873
11874
11875
11876
11877 am_save_CPPFLAGS="$CPPFLAGS"
11878
11879 for element in $INCICONV; do
11880 haveit=
11881 for x in $CPPFLAGS; do
11882
11883 acl_save_prefix="$prefix"
11884 prefix="$acl_final_prefix"
11885 acl_save_exec_prefix="$exec_prefix"
11886 exec_prefix="$acl_final_exec_prefix"
11887 eval x=\"$x\"
11888 exec_prefix="$acl_save_exec_prefix"
11889 prefix="$acl_save_prefix"
11890
11891 if test "X$x" = "X$element"; then
11892 haveit=yes
11893 break
11894 fi
11895 done
11896 if test -z "$haveit"; then
11897 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11898 fi
11899 done
eb158727
ZW
11900
11901
b61ff9c8
BS
11902 echo "$as_me:$LINENO: checking for iconv" >&5
11903echo $ECHO_N "checking for iconv... $ECHO_C" >&6
ba479fd2
NN
11904if test "${am_cv_func_iconv+set}" = set; then
11905 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11906else
ba479fd2 11907
f91abfce
TT
11908 am_cv_func_iconv="no, consider installing GNU libiconv"
11909 am_cv_lib_iconv=no
ba479fd2 11910 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11911/* confdefs.h. */
11912_ACEOF
11913cat confdefs.h >>conftest.$ac_ext
11914cat >>conftest.$ac_ext <<_ACEOF
11915/* end confdefs.h. */
f91abfce
TT
11916#include <stdlib.h>
11917#include <iconv.h>
ba479fd2
NN
11918int
11919main ()
11920{
f91abfce
TT
11921iconv_t cd = iconv_open("","");
11922 iconv(cd,NULL,NULL,NULL,NULL);
11923 iconv_close(cd);
ba479fd2
NN
11924 ;
11925 return 0;
11926}
11927_ACEOF
11928rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11929if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11930 (eval $ac_link) 2>conftest.er1
ba479fd2 11931 ac_status=$?
86da66b5
HPN
11932 grep -v '^ *+' conftest.er1 >conftest.err
11933 rm -f conftest.er1
11934 cat conftest.err >&5
ba479fd2 11935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11936 (exit $ac_status); } &&
11937 { ac_try='test -z "$ac_c_werror_flag"
11938 || test ! -s conftest.err'
11939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11940 (eval $ac_try) 2>&5
11941 ac_status=$?
11942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11943 (exit $ac_status); }; } &&
11944 { ac_try='test -s conftest$ac_exeext'
11945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11946 (eval $ac_try) 2>&5
11947 ac_status=$?
11948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11949 (exit $ac_status); }; }; then
f91abfce
TT
11950 am_cv_func_iconv=yes
11951else
ba479fd2
NN
11952 echo "$as_me: failed program was:" >&5
11953sed 's/^/| /' conftest.$ac_ext >&5
11954
f91abfce 11955fi
b61ff9c8 11956rm -f conftest.err conftest.$ac_objext \
86da66b5 11957 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11958 if test "$am_cv_func_iconv" != yes; then
11959 am_save_LIBS="$LIBS"
dfb77e37 11960 LIBS="$LIBS $LIBICONV"
ba479fd2 11961 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11962/* confdefs.h. */
11963_ACEOF
11964cat confdefs.h >>conftest.$ac_ext
11965cat >>conftest.$ac_ext <<_ACEOF
11966/* end confdefs.h. */
f91abfce
TT
11967#include <stdlib.h>
11968#include <iconv.h>
ba479fd2
NN
11969int
11970main ()
11971{
f91abfce
TT
11972iconv_t cd = iconv_open("","");
11973 iconv(cd,NULL,NULL,NULL,NULL);
11974 iconv_close(cd);
ba479fd2
NN
11975 ;
11976 return 0;
11977}
11978_ACEOF
11979rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11980if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11981 (eval $ac_link) 2>conftest.er1
ba479fd2 11982 ac_status=$?
86da66b5
HPN
11983 grep -v '^ *+' conftest.er1 >conftest.err
11984 rm -f conftest.er1
11985 cat conftest.err >&5
ba479fd2 11986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11987 (exit $ac_status); } &&
11988 { ac_try='test -z "$ac_c_werror_flag"
11989 || test ! -s conftest.err'
11990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11991 (eval $ac_try) 2>&5
11992 ac_status=$?
11993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11994 (exit $ac_status); }; } &&
11995 { ac_try='test -s conftest$ac_exeext'
11996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11997 (eval $ac_try) 2>&5
11998 ac_status=$?
11999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12000 (exit $ac_status); }; }; then
f91abfce
TT
12001 am_cv_lib_iconv=yes
12002 am_cv_func_iconv=yes
12003else
ba479fd2
NN
12004 echo "$as_me: failed program was:" >&5
12005sed 's/^/| /' conftest.$ac_ext >&5
12006
f91abfce 12007fi
b61ff9c8 12008rm -f conftest.err conftest.$ac_objext \
86da66b5 12009 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
12010 LIBS="$am_save_LIBS"
12011 fi
6e3f3080 12012
ba479fd2 12013fi
b61ff9c8
BS
12014echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
12015echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 12016 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
12017
12018cat >>confdefs.h <<\_ACEOF
f91abfce 12019#define HAVE_ICONV 1
ba479fd2 12020_ACEOF
f91abfce 12021
dfb77e37
KC
12022 fi
12023 if test "$am_cv_lib_iconv" = yes; then
b61ff9c8
BS
12024 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
12025echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
12026 echo "$as_me:$LINENO: result: $LIBICONV" >&5
12027echo "${ECHO_T}$LIBICONV" >&6
dfb77e37
KC
12028 else
12029 CPPFLAGS="$am_save_CPPFLAGS"
12030 LIBICONV=
12031 LTLIBICONV=
12032 fi
12033
12034
12035
12036 if test "$am_cv_func_iconv" = yes; then
b61ff9c8
BS
12037 echo "$as_me:$LINENO: checking for iconv declaration" >&5
12038echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
ba479fd2
NN
12039 if test "${am_cv_proto_iconv+set}" = set; then
12040 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 12041else
ba479fd2
NN
12042
12043 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12044/* confdefs.h. */
12045_ACEOF
12046cat confdefs.h >>conftest.$ac_ext
12047cat >>conftest.$ac_ext <<_ACEOF
12048/* end confdefs.h. */
f91abfce
TT
12049
12050#include <stdlib.h>
12051#include <iconv.h>
12052extern
12053#ifdef __cplusplus
12054"C"
12055#endif
12056#if defined(__STDC__) || defined(__cplusplus)
12057size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
12058#else
12059size_t iconv();
12060#endif
12061
ba479fd2
NN
12062int
12063main ()
12064{
f91abfce 12065
ba479fd2
NN
12066 ;
12067 return 0;
12068}
12069_ACEOF
12070rm -f conftest.$ac_objext
b61ff9c8
BS
12071if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12072 (eval $ac_compile) 2>conftest.er1
ba479fd2 12073 ac_status=$?
86da66b5
HPN
12074 grep -v '^ *+' conftest.er1 >conftest.err
12075 rm -f conftest.er1
12076 cat conftest.err >&5
ba479fd2 12077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12078 (exit $ac_status); } &&
12079 { ac_try='test -z "$ac_c_werror_flag"
12080 || test ! -s conftest.err'
12081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12082 (eval $ac_try) 2>&5
12083 ac_status=$?
12084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12085 (exit $ac_status); }; } &&
12086 { ac_try='test -s conftest.$ac_objext'
12087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12088 (eval $ac_try) 2>&5
12089 ac_status=$?
12090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12091 (exit $ac_status); }; }; then
f91abfce
TT
12092 am_cv_proto_iconv_arg1=""
12093else
ba479fd2
NN
12094 echo "$as_me: failed program was:" >&5
12095sed 's/^/| /' conftest.$ac_ext >&5
12096
b61ff9c8 12097am_cv_proto_iconv_arg1="const"
f91abfce 12098fi
b61ff9c8 12099rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
12100 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);"
12101fi
12102
12103 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
b61ff9c8 12104 echo "$as_me:$LINENO: result: ${ac_t:-
ba479fd2
NN
12105 }$am_cv_proto_iconv" >&5
12106echo "${ECHO_T}${ac_t:-
b61ff9c8 12107 }$am_cv_proto_iconv" >&6
ba479fd2
NN
12108
12109cat >>confdefs.h <<_ACEOF
f91abfce 12110#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 12111_ACEOF
f91abfce
TT
12112
12113 fi
f91abfce 12114
56694dd9
ZW
12115# Until we have in-tree GNU iconv:
12116LIBICONV_DEP=
12117
12118
18fc9bd4 12119
b61ff9c8
BS
12120 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
12121echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
18fc9bd4
RG
12122if test "${am_cv_val_LC_MESSAGES+set}" = set; then
12123 echo $ECHO_N "(cached) $ECHO_C" >&6
12124else
12125 cat >conftest.$ac_ext <<_ACEOF
12126/* confdefs.h. */
12127_ACEOF
12128cat confdefs.h >>conftest.$ac_ext
12129cat >>conftest.$ac_ext <<_ACEOF
12130/* end confdefs.h. */
12131#include <locale.h>
12132int
12133main ()
12134{
12135return LC_MESSAGES
12136 ;
12137 return 0;
12138}
12139_ACEOF
12140rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
12141if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12142 (eval $ac_link) 2>conftest.er1
18fc9bd4
RG
12143 ac_status=$?
12144 grep -v '^ *+' conftest.er1 >conftest.err
12145 rm -f conftest.er1
12146 cat conftest.err >&5
12147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12148 (exit $ac_status); } &&
12149 { ac_try='test -z "$ac_c_werror_flag"
12150 || test ! -s conftest.err'
12151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12152 (eval $ac_try) 2>&5
12153 ac_status=$?
12154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12155 (exit $ac_status); }; } &&
12156 { ac_try='test -s conftest$ac_exeext'
12157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12158 (eval $ac_try) 2>&5
12159 ac_status=$?
12160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12161 (exit $ac_status); }; }; then
18fc9bd4
RG
12162 am_cv_val_LC_MESSAGES=yes
12163else
12164 echo "$as_me: failed program was:" >&5
12165sed 's/^/| /' conftest.$ac_ext >&5
12166
b61ff9c8 12167am_cv_val_LC_MESSAGES=no
18fc9bd4 12168fi
b61ff9c8 12169rm -f conftest.err conftest.$ac_objext \
18fc9bd4
RG
12170 conftest$ac_exeext conftest.$ac_ext
12171fi
b61ff9c8
BS
12172echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
12173echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
18fc9bd4
RG
12174 if test $am_cv_val_LC_MESSAGES = yes; then
12175
12176cat >>confdefs.h <<\_ACEOF
12177#define HAVE_LC_MESSAGES 1
12178_ACEOF
12179
12180 fi
12181
f91abfce 12182
a03ea89b 12183
b61ff9c8
BS
12184 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
12185echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
a03ea89b
BM
12186if test "${am_cv_langinfo_codeset+set}" = set; then
12187 echo $ECHO_N "(cached) $ECHO_C" >&6
12188else
12189 cat >conftest.$ac_ext <<_ACEOF
12190/* confdefs.h. */
12191_ACEOF
12192cat confdefs.h >>conftest.$ac_ext
12193cat >>conftest.$ac_ext <<_ACEOF
12194/* end confdefs.h. */
12195#include <langinfo.h>
12196int
12197main ()
12198{
12199char* cs = nl_langinfo(CODESET);
12200 ;
12201 return 0;
12202}
12203_ACEOF
12204rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
12205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12206 (eval $ac_link) 2>conftest.er1
a03ea89b
BM
12207 ac_status=$?
12208 grep -v '^ *+' conftest.er1 >conftest.err
12209 rm -f conftest.er1
12210 cat conftest.err >&5
12211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12212 (exit $ac_status); } &&
12213 { ac_try='test -z "$ac_c_werror_flag"
12214 || test ! -s conftest.err'
12215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12216 (eval $ac_try) 2>&5
12217 ac_status=$?
12218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12219 (exit $ac_status); }; } &&
12220 { ac_try='test -s conftest$ac_exeext'
12221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12222 (eval $ac_try) 2>&5
12223 ac_status=$?
12224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12225 (exit $ac_status); }; }; then
a03ea89b
BM
12226 am_cv_langinfo_codeset=yes
12227else
12228 echo "$as_me: failed program was:" >&5
12229sed 's/^/| /' conftest.$ac_ext >&5
12230
b61ff9c8 12231am_cv_langinfo_codeset=no
a03ea89b 12232fi
b61ff9c8 12233rm -f conftest.err conftest.$ac_objext \
a03ea89b
BM
12234 conftest$ac_exeext conftest.$ac_ext
12235
12236fi
b61ff9c8
BS
12237echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
12238echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
a03ea89b
BM
12239 if test $am_cv_langinfo_codeset = yes; then
12240
12241cat >>confdefs.h <<\_ACEOF
12242#define HAVE_LANGINFO_CODESET 1
12243_ACEOF
12244
12245 fi
12246
12247
86cf1cbd
KG
12248# We will need to find libiberty.h and ansidecl.h
12249saved_CFLAGS="$CFLAGS"
12250CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
6a257778 12272
ad6717df
PB
12273
12274
0d667716
KG
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
367e8319 12285
0d667716
KG
12286
12287
7391b66c 12288
ed5b9f96
GK
12289
12290for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
12291 strsignal strstr strverscmp \
12292 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 12293 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 12294do
ad6717df 12295 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12296echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12297echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12298if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12299 echo $ECHO_N "(cached) $ECHO_C" >&6
12300else
12301 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12302/* confdefs.h. */
12303_ACEOF
12304cat confdefs.h >>conftest.$ac_ext
12305cat >>conftest.$ac_ext <<_ACEOF
12306/* end confdefs.h. */
7afe8c41
KG
12307#undef $ac_tr_decl
12308#define $ac_tr_decl 1
ba479fd2 12309
d02af173 12310#include "ansidecl.h"
86cf1cbd 12311#include "system.h"
f31e826b 12312
ba479fd2
NN
12313int
12314main ()
12315{
86cf1cbd
KG
12316#ifndef $ac_func
12317char *(*pfn) = (char *(*)) $ac_func ;
12318#endif
ba479fd2
NN
12319 ;
12320 return 0;
12321}
12322_ACEOF
12323rm -f conftest.$ac_objext
b61ff9c8
BS
12324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12325 (eval $ac_compile) 2>conftest.er1
ba479fd2 12326 ac_status=$?
86da66b5
HPN
12327 grep -v '^ *+' conftest.er1 >conftest.err
12328 rm -f conftest.er1
12329 cat conftest.err >&5
ba479fd2 12330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12331 (exit $ac_status); } &&
12332 { ac_try='test -z "$ac_c_werror_flag"
12333 || test ! -s conftest.err'
12334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12335 (eval $ac_try) 2>&5
12336 ac_status=$?
12337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12338 (exit $ac_status); }; } &&
12339 { ac_try='test -s conftest.$ac_objext'
12340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12341 (eval $ac_try) 2>&5
12342 ac_status=$?
12343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12344 (exit $ac_status); }; }; then
f31e826b 12345 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 12346else
ba479fd2
NN
12347 echo "$as_me: failed program was:" >&5
12348sed 's/^/| /' conftest.$ac_ext >&5
12349
b61ff9c8 12350eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 12351fi
b61ff9c8 12352rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
12353fi
12354
f31e826b 12355if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12356 echo "$as_me:$LINENO: result: yes" >&5
12357echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 12358#define $ac_tr_decl 1
ba479fd2
NN
12359_ACEOF
12360
81bf3d9e 12361else
b61ff9c8
BS
12362 echo "$as_me:$LINENO: result: no" >&5
12363echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 12364#define $ac_tr_decl 0
ba479fd2
NN
12365_ACEOF
12366
81bf3d9e
RH
12367fi
12368
12369done
ba479fd2 12370
ba479fd2 12371
ba479fd2 12372
81bf3d9e 12373
81bf3d9e
RH
12374
12375for ac_func in getrlimit setrlimit getrusage
12376do
ad6717df 12377 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12378echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12379echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12380if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12381 echo $ECHO_N "(cached) $ECHO_C" >&6
12382else
12383 cat >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. */
7afe8c41
KG
12389#undef $ac_tr_decl
12390#define $ac_tr_decl 1
ba479fd2 12391
d02af173 12392#include "ansidecl.h"
86cf1cbd 12393#include "system.h"
81bf3d9e
RH
12394#ifdef HAVE_SYS_RESOURCE_H
12395#include <sys/resource.h>
12396#endif
12397
f31e826b 12398
ba479fd2
NN
12399int
12400main ()
12401{
86cf1cbd
KG
12402#ifndef $ac_func
12403char *(*pfn) = (char *(*)) $ac_func ;
12404#endif
ba479fd2
NN
12405 ;
12406 return 0;
12407}
12408_ACEOF
12409rm -f conftest.$ac_objext
b61ff9c8
BS
12410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12411 (eval $ac_compile) 2>conftest.er1
ba479fd2 12412 ac_status=$?
86da66b5
HPN
12413 grep -v '^ *+' conftest.er1 >conftest.err
12414 rm -f conftest.er1
12415 cat conftest.err >&5
ba479fd2 12416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12417 (exit $ac_status); } &&
12418 { ac_try='test -z "$ac_c_werror_flag"
12419 || test ! -s conftest.err'
12420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12421 (eval $ac_try) 2>&5
12422 ac_status=$?
12423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12424 (exit $ac_status); }; } &&
12425 { ac_try='test -s conftest.$ac_objext'
12426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12427 (eval $ac_try) 2>&5
12428 ac_status=$?
12429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12430 (exit $ac_status); }; }; then
f31e826b 12431 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 12432else
ba479fd2
NN
12433 echo "$as_me: failed program was:" >&5
12434sed 's/^/| /' conftest.$ac_ext >&5
12435
b61ff9c8 12436eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 12437fi
b61ff9c8 12438rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
12439fi
12440
f31e826b 12441if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12442 echo "$as_me:$LINENO: result: yes" >&5
12443echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 12444#define $ac_tr_decl 1
ba479fd2
NN
12445_ACEOF
12446
81bf3d9e 12447else
b61ff9c8
BS
12448 echo "$as_me:$LINENO: result: no" >&5
12449echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 12450#define $ac_tr_decl 0
ba479fd2
NN
12451_ACEOF
12452
81bf3d9e
RH
12453fi
12454
12455done
86cf1cbd 12456
81bf3d9e 12457
ba479fd2 12458cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12459/* confdefs.h. */
12460_ACEOF
12461cat confdefs.h >>conftest.$ac_ext
12462cat >>conftest.$ac_ext <<_ACEOF
12463/* end confdefs.h. */
b2522d2b
HPN
12464
12465#include "ansidecl.h"
12466#include "system.h"
12467#ifdef HAVE_SYS_RESOURCE_H
12468#include <sys/resource.h>
12469#endif
12470
ba479fd2
NN
12471int
12472main ()
12473{
b2522d2b 12474rlim_t l = 0;
ba479fd2
NN
12475 ;
12476 return 0;
12477}
12478_ACEOF
12479rm -f conftest.$ac_objext
b61ff9c8
BS
12480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12481 (eval $ac_compile) 2>conftest.er1
ba479fd2 12482 ac_status=$?
86da66b5
HPN
12483 grep -v '^ *+' conftest.er1 >conftest.err
12484 rm -f conftest.er1
12485 cat conftest.err >&5
ba479fd2 12486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12487 (exit $ac_status); } &&
12488 { ac_try='test -z "$ac_c_werror_flag"
12489 || test ! -s conftest.err'
12490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12491 (eval $ac_try) 2>&5
12492 ac_status=$?
12493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12494 (exit $ac_status); }; } &&
12495 { ac_try='test -s conftest.$ac_objext'
12496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12497 (eval $ac_try) 2>&5
12498 ac_status=$?
12499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12500 (exit $ac_status); }; }; then
b2522d2b
HPN
12501 :
12502else
ba479fd2
NN
12503 echo "$as_me: failed program was:" >&5
12504sed 's/^/| /' conftest.$ac_ext >&5
12505
12506
12507cat >>confdefs.h <<\_ACEOF
b2522d2b 12508#define rlim_t long
ba479fd2 12509_ACEOF
b2522d2b
HPN
12510
12511fi
b61ff9c8 12512rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 12513
2102b2fe
RS
12514# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
12515# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
12516# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
12517# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 12518
351df804 12519for ac_func in ldgetname
c1800ec8 12520do
ad6717df 12521 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12522echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12523echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12524if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12525 echo $ECHO_N "(cached) $ECHO_C" >&6
12526else
12527 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12528/* confdefs.h. */
12529_ACEOF
12530cat confdefs.h >>conftest.$ac_ext
12531cat >>conftest.$ac_ext <<_ACEOF
12532/* end confdefs.h. */
c1800ec8
ZW
12533#undef $ac_tr_decl
12534#define $ac_tr_decl 1
ba479fd2 12535
351df804
KG
12536#include "ansidecl.h"
12537#include "system.h"
12538#ifdef HAVE_LDFCN_H
2102b2fe
RS
12539#undef FREAD
12540#undef FWRITE
351df804
KG
12541#include <ldfcn.h>
12542#endif
12543
12544
ba479fd2
NN
12545int
12546main ()
12547{
351df804
KG
12548#ifndef $ac_func
12549char *(*pfn) = (char *(*)) $ac_func ;
12550#endif
ba479fd2
NN
12551 ;
12552 return 0;
12553}
12554_ACEOF
12555rm -f conftest.$ac_objext
b61ff9c8
BS
12556if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12557 (eval $ac_compile) 2>conftest.er1
ba479fd2 12558 ac_status=$?
86da66b5
HPN
12559 grep -v '^ *+' conftest.er1 >conftest.err
12560 rm -f conftest.er1
12561 cat conftest.err >&5
ba479fd2 12562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12563 (exit $ac_status); } &&
12564 { ac_try='test -z "$ac_c_werror_flag"
12565 || test ! -s conftest.err'
12566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12567 (eval $ac_try) 2>&5
12568 ac_status=$?
12569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12570 (exit $ac_status); }; } &&
12571 { ac_try='test -s conftest.$ac_objext'
12572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12573 (eval $ac_try) 2>&5
12574 ac_status=$?
12575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12576 (exit $ac_status); }; }; then
351df804
KG
12577 eval "gcc_cv_have_decl_$ac_func=yes"
12578else
ba479fd2
NN
12579 echo "$as_me: failed program was:" >&5
12580sed 's/^/| /' conftest.$ac_ext >&5
12581
b61ff9c8 12582eval "gcc_cv_have_decl_$ac_func=no"
351df804 12583fi
b61ff9c8 12584rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
12585fi
12586
12587if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12588 echo "$as_me:$LINENO: result: yes" >&5
12589echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 12590#define $ac_tr_decl 1
ba479fd2
NN
12591_ACEOF
12592
351df804 12593else
b61ff9c8
BS
12594 echo "$as_me:$LINENO: result: no" >&5
12595echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 12596#define $ac_tr_decl 0
ba479fd2
NN
12597_ACEOF
12598
351df804
KG
12599fi
12600
12601done
ba479fd2 12602
351df804
KG
12603
12604
12605for ac_func in times
12606do
ad6717df 12607 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12608echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12609echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12610if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12611 echo $ECHO_N "(cached) $ECHO_C" >&6
12612else
12613 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12614/* confdefs.h. */
12615_ACEOF
12616cat confdefs.h >>conftest.$ac_ext
12617cat >>conftest.$ac_ext <<_ACEOF
12618/* end confdefs.h. */
351df804
KG
12619#undef $ac_tr_decl
12620#define $ac_tr_decl 1
ba479fd2 12621
c1800ec8
ZW
12622#include "ansidecl.h"
12623#include "system.h"
12624#ifdef HAVE_SYS_TIMES_H
12625#include <sys/times.h>
12626#endif
12627
12628
ba479fd2
NN
12629int
12630main ()
12631{
c1800ec8
ZW
12632#ifndef $ac_func
12633char *(*pfn) = (char *(*)) $ac_func ;
12634#endif
ba479fd2
NN
12635 ;
12636 return 0;
12637}
12638_ACEOF
12639rm -f conftest.$ac_objext
b61ff9c8
BS
12640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12641 (eval $ac_compile) 2>conftest.er1
ba479fd2 12642 ac_status=$?
86da66b5
HPN
12643 grep -v '^ *+' conftest.er1 >conftest.err
12644 rm -f conftest.er1
12645 cat conftest.err >&5
ba479fd2 12646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12647 (exit $ac_status); } &&
12648 { ac_try='test -z "$ac_c_werror_flag"
12649 || test ! -s conftest.err'
12650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12651 (eval $ac_try) 2>&5
12652 ac_status=$?
12653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12654 (exit $ac_status); }; } &&
12655 { ac_try='test -s conftest.$ac_objext'
12656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12657 (eval $ac_try) 2>&5
12658 ac_status=$?
12659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12660 (exit $ac_status); }; }; then
2f41c1d6
PB
12661 eval "gcc_cv_have_decl_$ac_func=yes"
12662else
12663 echo "$as_me: failed program was:" >&5
12664sed 's/^/| /' conftest.$ac_ext >&5
ab22c1fa 12665
b61ff9c8 12666eval "gcc_cv_have_decl_$ac_func=no"
2f41c1d6 12667fi
b61ff9c8 12668rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
12669fi
12670
12671if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12672 echo "$as_me:$LINENO: result: yes" >&5
12673echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 12674#define $ac_tr_decl 1
ba479fd2
NN
12675_ACEOF
12676
c1800ec8 12677else
b61ff9c8
BS
12678 echo "$as_me:$LINENO: result: no" >&5
12679echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 12680#define $ac_tr_decl 0
ba479fd2
NN
12681_ACEOF
12682
c1800ec8
ZW
12683fi
12684
12685done
c1800ec8
ZW
12686
12687
4f6d8cc8
GK
12688
12689for ac_func in sigaltstack
12690do
12691 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12692echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12693echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12694if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
4f6d8cc8
GK
12695 echo $ECHO_N "(cached) $ECHO_C" >&6
12696else
12697 cat >conftest.$ac_ext <<_ACEOF
12698/* confdefs.h. */
12699_ACEOF
12700cat confdefs.h >>conftest.$ac_ext
12701cat >>conftest.$ac_ext <<_ACEOF
12702/* end confdefs.h. */
12703#undef $ac_tr_decl
12704#define $ac_tr_decl 1
12705
12706#include "ansidecl.h"
12707#include "system.h"
12708#include <signal.h>
12709
12710
12711int
12712main ()
12713{
12714#ifndef $ac_func
12715char *(*pfn) = (char *(*)) $ac_func ;
12716#endif
12717 ;
12718 return 0;
12719}
12720_ACEOF
12721rm -f conftest.$ac_objext
b61ff9c8
BS
12722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12723 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
12724 ac_status=$?
12725 grep -v '^ *+' conftest.er1 >conftest.err
12726 rm -f conftest.er1
12727 cat conftest.err >&5
12728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12729 (exit $ac_status); } &&
12730 { ac_try='test -z "$ac_c_werror_flag"
12731 || test ! -s conftest.err'
12732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12733 (eval $ac_try) 2>&5
12734 ac_status=$?
12735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12736 (exit $ac_status); }; } &&
12737 { ac_try='test -s conftest.$ac_objext'
12738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12739 (eval $ac_try) 2>&5
12740 ac_status=$?
12741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12742 (exit $ac_status); }; }; then
8b1f719a
PB
12743 eval "gcc_cv_have_decl_$ac_func=yes"
12744else
12745 echo "$as_me: failed program was:" >&5
12746sed 's/^/| /' conftest.$ac_ext >&5
4f6d8cc8 12747
b61ff9c8 12748eval "gcc_cv_have_decl_$ac_func=no"
4f6d8cc8 12749fi
b61ff9c8 12750rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8
GK
12751fi
12752
12753if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12754 echo "$as_me:$LINENO: result: yes" >&5
12755echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
12756#define $ac_tr_decl 1
12757_ACEOF
12758
12759else
b61ff9c8
BS
12760 echo "$as_me:$LINENO: result: no" >&5
12761echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
12762#define $ac_tr_decl 0
12763_ACEOF
12764
12765fi
12766
12767done
12768
12769
c1800ec8 12770# More time-related stuff.
b61ff9c8
BS
12771echo "$as_me:$LINENO: checking for struct tms" >&5
12772echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
ba479fd2
NN
12773if test "${ac_cv_struct_tms+set}" = set; then
12774 echo $ECHO_N "(cached) $ECHO_C" >&6
12775else
12776
12777cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12778/* confdefs.h. */
12779_ACEOF
12780cat confdefs.h >>conftest.$ac_ext
12781cat >>conftest.$ac_ext <<_ACEOF
12782/* end confdefs.h. */
c1800ec8
ZW
12783
12784#include "ansidecl.h"
12785#include "system.h"
12786#ifdef HAVE_SYS_TIMES_H
12787#include <sys/times.h>
12788#endif
12789
ba479fd2
NN
12790int
12791main ()
12792{
c1800ec8 12793struct tms tms;
ba479fd2
NN
12794 ;
12795 return 0;
12796}
12797_ACEOF
12798rm -f conftest.$ac_objext
b61ff9c8
BS
12799if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12800 (eval $ac_compile) 2>conftest.er1
ba479fd2 12801 ac_status=$?
86da66b5
HPN
12802 grep -v '^ *+' conftest.er1 >conftest.err
12803 rm -f conftest.er1
12804 cat conftest.err >&5
ba479fd2 12805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12806 (exit $ac_status); } &&
12807 { ac_try='test -z "$ac_c_werror_flag"
12808 || test ! -s conftest.err'
12809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12810 (eval $ac_try) 2>&5
12811 ac_status=$?
12812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12813 (exit $ac_status); }; } &&
12814 { ac_try='test -s conftest.$ac_objext'
12815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12816 (eval $ac_try) 2>&5
12817 ac_status=$?
12818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12819 (exit $ac_status); }; }; then
c1800ec8
ZW
12820 ac_cv_struct_tms=yes
12821else
ba479fd2
NN
12822 echo "$as_me: failed program was:" >&5
12823sed 's/^/| /' conftest.$ac_ext >&5
12824
b61ff9c8 12825ac_cv_struct_tms=no
c1800ec8 12826fi
b61ff9c8 12827rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 12828fi
b61ff9c8
BS
12829echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
12830echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 12831if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
12832
12833cat >>confdefs.h <<\_ACEOF
c1800ec8 12834#define HAVE_STRUCT_TMS 1
ba479fd2 12835_ACEOF
c1800ec8
ZW
12836
12837fi
12838
12839# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
12840# revisit after autoconf 2.50.
b61ff9c8
BS
12841echo "$as_me:$LINENO: checking for clock_t" >&5
12842echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
ba479fd2
NN
12843if test "${gcc_cv_type_clock_t+set}" = set; then
12844 echo $ECHO_N "(cached) $ECHO_C" >&6
12845else
12846
12847cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12848/* confdefs.h. */
12849_ACEOF
12850cat confdefs.h >>conftest.$ac_ext
12851cat >>conftest.$ac_ext <<_ACEOF
12852/* end confdefs.h. */
c1800ec8
ZW
12853
12854#include "ansidecl.h"
12855#include "system.h"
12856
ba479fd2
NN
12857int
12858main ()
12859{
c1800ec8 12860clock_t x;
ba479fd2
NN
12861 ;
12862 return 0;
12863}
12864_ACEOF
12865rm -f conftest.$ac_objext
b61ff9c8
BS
12866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12867 (eval $ac_compile) 2>conftest.er1
ba479fd2 12868 ac_status=$?
86da66b5
HPN
12869 grep -v '^ *+' conftest.er1 >conftest.err
12870 rm -f conftest.er1
12871 cat conftest.err >&5
ba479fd2 12872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12873 (exit $ac_status); } &&
12874 { ac_try='test -z "$ac_c_werror_flag"
12875 || test ! -s conftest.err'
12876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12877 (eval $ac_try) 2>&5
12878 ac_status=$?
12879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12880 (exit $ac_status); }; } &&
12881 { ac_try='test -s conftest.$ac_objext'
12882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12883 (eval $ac_try) 2>&5
12884 ac_status=$?
12885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12886 (exit $ac_status); }; }; then
c1800ec8
ZW
12887 gcc_cv_type_clock_t=yes
12888else
ba479fd2
NN
12889 echo "$as_me: failed program was:" >&5
12890sed 's/^/| /' conftest.$ac_ext >&5
12891
b61ff9c8 12892gcc_cv_type_clock_t=no
c1800ec8 12893fi
b61ff9c8 12894rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 12895fi
b61ff9c8
BS
12896echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
12897echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 12898if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
12899
12900cat >>confdefs.h <<\_ACEOF
c1800ec8 12901#define HAVE_CLOCK_T 1
ba479fd2 12902_ACEOF
c1800ec8
ZW
12903
12904fi
12905
eb70d86d
AS
12906# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
12907CFLAGS="$saved_CFLAGS"
12908
b61ff9c8 12909# Check whether --enable-initfini-array or --disable-initfini-array was given.
07cf4226 12910if test "${enable_initfini_array+set}" = set; then
b61ff9c8
BS
12911 enableval="$enable_initfini_array"
12912
07cf4226 12913else
ba479fd2 12914
b61ff9c8
BS
12915echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
12916echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
ba479fd2
NN
12917if test "${gcc_cv_initfini_array+set}" = set; then
12918 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 12919else
eb70d86d 12920 if test "$cross_compiling" = yes; then
918c4fe4 12921 gcc_cv_initfini_array=no
eb70d86d 12922else
ba479fd2 12923 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12924/* confdefs.h. */
12925_ACEOF
12926cat confdefs.h >>conftest.$ac_ext
12927cat >>conftest.$ac_ext <<_ACEOF
12928/* end confdefs.h. */
eb70d86d 12929
07cf4226
DM
12930static int x = -1;
12931int main (void) { return x; }
12932int foo (void) { x = 0; }
12933int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
12934_ACEOF
12935rm -f conftest$ac_exeext
b61ff9c8
BS
12936if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12937 (eval $ac_link) 2>&5
ba479fd2
NN
12938 ac_status=$?
12939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12940 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
12941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12942 (eval $ac_try) 2>&5
ba479fd2
NN
12943 ac_status=$?
12944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12945 (exit $ac_status); }; }; then
918c4fe4 12946 gcc_cv_initfini_array=yes
eb70d86d 12947else
ba479fd2
NN
12948 echo "$as_me: program exited with status $ac_status" >&5
12949echo "$as_me: failed program was:" >&5
12950sed 's/^/| /' conftest.$ac_ext >&5
12951
12952( exit $ac_status )
12953gcc_cv_initfini_array=no
eb70d86d 12954fi
b61ff9c8 12955rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 12956fi
07cf4226 12957fi
b61ff9c8
BS
12958echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
12959echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 12960 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 12961
b61ff9c8 12962fi;
63cf211a 12963if test $enable_initfini_array = yes; then
ba479fd2
NN
12964
12965cat >>confdefs.h <<\_ACEOF
eb70d86d 12966#define HAVE_INITFINI_ARRAY 1
ba479fd2 12967_ACEOF
07cf4226 12968
eb70d86d 12969fi
81bf3d9e 12970
ba479fd2 12971# mkdir takes a single argument on some systems.
b61ff9c8
BS
12972echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
12973echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
ba479fd2
NN
12974if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
12975 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 12976else
ba479fd2 12977 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12978/* confdefs.h. */
12979_ACEOF
12980cat confdefs.h >>conftest.$ac_ext
12981cat >>conftest.$ac_ext <<_ACEOF
12982/* end confdefs.h. */
75923b2f
MK
12983
12984#include <sys/types.h>
12985#ifdef HAVE_SYS_STAT_H
12986# include <sys/stat.h>
12987#endif
12988#ifdef HAVE_UNISTD_H
12989# include <unistd.h>
12990#endif
12991#ifdef HAVE_DIRECT_H
12992# include <direct.h>
12993#endif
ba479fd2
NN
12994int
12995main ()
12996{
75923b2f 12997mkdir ("foo", 0);
ba479fd2
NN
12998 ;
12999 return 0;
13000}
13001_ACEOF
13002rm -f conftest.$ac_objext
b61ff9c8
BS
13003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13004 (eval $ac_compile) 2>conftest.er1
ba479fd2 13005 ac_status=$?
86da66b5
HPN
13006 grep -v '^ *+' conftest.er1 >conftest.err
13007 rm -f conftest.er1
13008 cat conftest.err >&5
ba479fd2 13009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13010 (exit $ac_status); } &&
13011 { ac_try='test -z "$ac_c_werror_flag"
13012 || test ! -s conftest.err'
13013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13014 (eval $ac_try) 2>&5
13015 ac_status=$?
13016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13017 (exit $ac_status); }; } &&
13018 { ac_try='test -s conftest.$ac_objext'
13019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13020 (eval $ac_try) 2>&5
13021 ac_status=$?
13022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13023 (exit $ac_status); }; }; then
75923b2f
MK
13024 gcc_cv_mkdir_takes_one_arg=no
13025else
ba479fd2
NN
13026 echo "$as_me: failed program was:" >&5
13027sed 's/^/| /' conftest.$ac_ext >&5
13028
b61ff9c8 13029gcc_cv_mkdir_takes_one_arg=yes
75923b2f 13030fi
b61ff9c8 13031rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 13032fi
b61ff9c8
BS
13033echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
13034echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 13035if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
13036
13037cat >>confdefs.h <<\_ACEOF
75923b2f 13038#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 13039_ACEOF
75923b2f
MK
13040
13041fi
13042
13043
861bb6c1
JL
13044# File extensions
13045manext='.1'
13046objext='.o'
13047
13048
13049
4977bab6 13050# With Setjmp/Longjmp based exception handling.
b61ff9c8 13051# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
4977bab6 13052if test "${enable_sjlj_exceptions+set}" = set; then
b61ff9c8 13053 enableval="$enable_sjlj_exceptions"
399fe3e1
JDA
13054 case $target in
13055 *-*-hpux10*)
13056 if test $enableval != yes; then
13057 { echo "$as_me:$LINENO: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&5
13058echo "$as_me: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&2;}
13059 enableval=yes
13060 fi
13061 ;;
13062esac
13063force_sjlj_exceptions=yes
13064else
13065 case $target in
13066 *-*-hpux10*)
13067 force_sjlj_exceptions=yes
13068 enableval=yes
13069 ;;
13070 *)
13071 force_sjlj_exceptions=no
13072 ;;
13073esac
13074fi;
13075if test $force_sjlj_exceptions = yes; then
b61ff9c8 13076 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 13077
ba479fd2
NN
13078cat >>confdefs.h <<_ACEOF
13079#define CONFIG_SJLJ_EXCEPTIONS $sjlj
13080_ACEOF
4977bab6 13081
399fe3e1 13082fi
4977bab6 13083
443728bb
L
13084# For platforms with the unwind ABI which includes an unwind library,
13085# libunwind, we can choose to use the system libunwind.
4977bab6 13086
b61ff9c8 13087# Check whether --with-system-libunwind or --without-system-libunwind was given.
443728bb 13088if test "${with_system_libunwind+set}" = set; then
b61ff9c8 13089 withval="$with_system_libunwind"
4977bab6 13090
b61ff9c8 13091fi;
4977bab6 13092
e64f5acf
SE
13093# config.gcc also contains tests of with_system_libunwind.
13094if test x$with_system_libunwind = xyes; then
13095
13096cat >>confdefs.h <<\_ACEOF
13097#define HAVE_GETIPINFO 1
13098_ACEOF
13099
13100fi
13101
34a86c2b
NN
13102# --------------------------------------------------------
13103# Build, host, and target specific configuration fragments
13104# --------------------------------------------------------
13105
5b28c537
NN
13106# Collect build-machine-specific information.
13107. ${srcdir}/config.build
13108
a89ea0df
NN
13109# Collect host-machine-specific information.
13110. ${srcdir}/config.host
13111
ef69da62 13112target_gtfiles=
a89ea0df
NN
13113
13114# Collect target-machine-specific information.
8ad9fb33 13115. ${srcdir}/config.gcc
861bb6c1
JL
13116
13117extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 13118extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
13119
13120# Default the target-machine variables that were not explicitly set.
75bffa71 13121if test x"$tm_file" = x
861bb6c1
JL
13122then tm_file=$cpu_type/$cpu_type.h; fi
13123
6b2adea9 13124if test x"$extra_headers" = x
861bb6c1
JL
13125then extra_headers=; fi
13126
75bffa71 13127if test x$md_file = x
e98e406f 13128then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 13129
75bffa71 13130if test x$out_file = x
861bb6c1
JL
13131then out_file=$cpu_type/$cpu_type.c; fi
13132
75bffa71 13133if test x"$tmake_file" = x
861bb6c1
JL
13134then tmake_file=$cpu_type/t-$cpu_type
13135fi
13136
90e6a802 13137if test x"$dwarf2" = xyes
756ee602 13138then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
13139fi
13140
861bb6c1 13141# Say what files are being used for the output code and MD file.
11642c3a 13142echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
13143echo "Using \`$srcdir/config/$md_file' as machine description file."
13144
11642c3a 13145# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
13146# about them and drop them.
13147
11642c3a
ZW
13148bx=
13149for x in $build_xm_file; do
13150 if test -f $srcdir/config/$x
13151 then bx="$bx $x"
ba479fd2
NN
13152 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13153echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13154 fi
13155done
13156build_xm_file="$bx"
13157
13158hx=
13159for x in $host_xm_file; do
13160 if test -f $srcdir/config/$x
13161 then hx="$hx $x"
ba479fd2
NN
13162 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13163echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13164 fi
13165done
13166host_xm_file="$hx"
13167
13168tx=
13169for x in $xm_file; do
13170 if test -f $srcdir/config/$x
13171 then tx="$tx $x"
ba479fd2
NN
13172 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13173echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13174 fi
13175done
13176xm_file="$tx"
13177
861bb6c1
JL
13178count=a
13179for f in $tm_file; do
13180 count=${count}x
13181done
75bffa71 13182if test $count = ax; then
861bb6c1
JL
13183 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
13184else
13185 echo "Using the following target machine macro files:"
13186 for f in $tm_file; do
13187 echo " $srcdir/config/$f"
13188 done
13189fi
13190
4977bab6 13191if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
13192
13193cat >>confdefs.h <<\_ACEOF
4977bab6 13194#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 13195_ACEOF
4977bab6
ZW
13196
13197fi
13198
99fa8911
AP
13199if test x$use_long_long_for_widest_fast_int = xyes; then
13200
13201cat >>confdefs.h <<\_ACEOF
13202#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
13203_ACEOF
13204
13205fi
13206
861bb6c1
JL
13207count=a
13208for f in $host_xm_file; do
13209 count=${count}x
13210done
11642c3a
ZW
13211if test $count = a; then
13212 :
13213elif test $count = ax; then
861bb6c1
JL
13214 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
13215else
13216 echo "Using the following host machine macro files:"
13217 for f in $host_xm_file; do
13218 echo " $srcdir/config/$f"
13219 done
13220fi
476d9098 13221echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 13222
75bffa71 13223if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
13224 count=a
13225 for f in $build_xm_file; do
13226 count=${count}x
13227 done
11642c3a
ZW
13228 if test $count = a; then
13229 :
13230 elif test $count = ax; then
861bb6c1
JL
13231 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
13232 else
13233 echo "Using the following build machine macro files:"
13234 for f in $build_xm_file; do
13235 echo " $srcdir/config/$f"
13236 done
13237 fi
13238fi
13239
4f6d8cc8 13240case ${host} in
b8ec3cc8 13241 powerpc*-*-darwin*)
b61ff9c8
BS
13242 echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
13243echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6
4f6d8cc8
GK
13244if test "${gcc_cv_mcontext_underscores+set}" = set; then
13245 echo $ECHO_N "(cached) $ECHO_C" >&6
13246else
13247 cat >conftest.$ac_ext <<_ACEOF
13248
ba7da42a 13249#include <sys/cdefs.h>
de4fb767 13250#include <sys/signal.h>
4f6d8cc8
GK
13251#include <ucontext.h>
13252int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
13253
13254_ACEOF
13255rm -f conftest.$ac_objext
b61ff9c8
BS
13256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13257 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
13258 ac_status=$?
13259 grep -v '^ *+' conftest.er1 >conftest.err
13260 rm -f conftest.er1
13261 cat conftest.err >&5
13262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13263 (exit $ac_status); } &&
13264 { ac_try='test -z "$ac_c_werror_flag"
13265 || test ! -s conftest.err'
13266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13267 (eval $ac_try) 2>&5
13268 ac_status=$?
13269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13270 (exit $ac_status); }; } &&
13271 { ac_try='test -s conftest.$ac_objext'
13272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13273 (eval $ac_try) 2>&5
13274 ac_status=$?
13275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13276 (exit $ac_status); }; }; then
4f6d8cc8
GK
13277 gcc_cv_mcontext_underscores=no
13278else
13279 echo "$as_me: failed program was:" >&5
13280sed 's/^/| /' conftest.$ac_ext >&5
13281
b61ff9c8 13282gcc_cv_mcontext_underscores=yes
4f6d8cc8 13283fi
b61ff9c8 13284rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8 13285fi
b61ff9c8
BS
13286echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
13287echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6
4f6d8cc8
GK
13288 if test $gcc_cv_mcontext_underscores = yes; then
13289
13290cat >>confdefs.h <<\_ACEOF
13291#define HAS_MCONTEXT_T_UNDERSCORES
13292_ACEOF
13293
13294 fi
13295 ;;
13296esac
13297
8bb915b6
NN
13298# ---------
13299# Threading
13300# ---------
13301
c2e494a8 13302# Check if a valid thread package
615be2cf 13303case ${enable_threads} in
c2e494a8
NN
13304 "" | no)
13305 # No threads
13306 target_thread_file='single'
13307 ;;
13308 yes)
13309 # default
13310 target_thread_file='single'
13311 ;;
18167442 13312 aix | dce | gnat | irix | posix | posix95 | rtems | \
d9dced13 13313 single | solaris | vxworks | win32 | mipssde)
615be2cf 13314 target_thread_file=${enable_threads}
c2e494a8
NN
13315 ;;
13316 *)
615be2cf 13317 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
13318 exit 1
13319 ;;
13320esac
13321
13322if test x${thread_file} = x; then
13323 # No thread file set by target-specific clauses in config.gcc,
13324 # so use file chosen by default logic above
13325 thread_file=${target_thread_file}
861bb6c1
JL
13326fi
13327
8bb915b6
NN
13328# Make gthr-default.h if we have a thread file.
13329gthread_flags=
13330if test $thread_file != single; then
b15a9f63
RW
13331 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h-t
13332 if diff gthr-default.h-t gthr-default.h 2>/dev/null; then
13333 rm -f gthr-default.h-t
13334 else
13335 mv -f gthr-default.h-t gthr-default.h
13336 fi
8bb915b6
NN
13337 gthread_flags=-DHAVE_GTHR_DEFAULT
13338fi
13339
13340
13341# --------
13342# UNSORTED
13343# --------
13344
18fbf599 13345use_cxa_atexit=no
2121a768
JT
13346if test x$enable___cxa_atexit = xyes || \
13347 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599 13348 if test x$host = x$target; then
97388150
DS
13349 case $host in
13350 # mingw32 doesn't have __cxa_atexit but uses atexit registration
13351 # keyed to flag_use_cxa_atexit
13352 *-*-mingw32*)
13353 use_cxa_atexit=yes
13354 ;;
13355 *)
b61ff9c8
BS
13356 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
13357echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
354b7da5
DH
13358if test "${ac_cv_func___cxa_atexit+set}" = set; then
13359 echo $ECHO_N "(cached) $ECHO_C" >&6
13360else
13361 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
13362/* confdefs.h. */
13363_ACEOF
13364cat confdefs.h >>conftest.$ac_ext
13365cat >>conftest.$ac_ext <<_ACEOF
13366/* end confdefs.h. */
86da66b5
HPN
13367/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
13368 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13369#define __cxa_atexit innocuous___cxa_atexit
13370
354b7da5
DH
13371/* System header to define __stub macros and hopefully few prototypes,
13372 which can conflict with char __cxa_atexit (); below.
13373 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13374 <limits.h> exists even on freestanding compilers. */
86da66b5 13375
354b7da5
DH
13376#ifdef __STDC__
13377# include <limits.h>
13378#else
13379# include <assert.h>
13380#endif
86da66b5
HPN
13381
13382#undef __cxa_atexit
13383
b61ff9c8 13384/* Override any gcc2 internal prototype to avoid an error. */
354b7da5
DH
13385#ifdef __cplusplus
13386extern "C"
b61ff9c8 13387{
354b7da5 13388#endif
b61ff9c8
BS
13389/* We use char because int might match the return type of a gcc2
13390 builtin and then its argument prototype would still apply. */
354b7da5
DH
13391char __cxa_atexit ();
13392/* The GNU C library defines this for functions which it implements
13393 to always fail with ENOSYS. Some functions are actually named
13394 something starting with __ and the normal name is an alias. */
b61ff9c8 13395#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
354b7da5 13396choke me
b61ff9c8
BS
13397#else
13398char (*f) () = __cxa_atexit;
13399#endif
13400#ifdef __cplusplus
13401}
354b7da5
DH
13402#endif
13403
13404int
13405main ()
13406{
b61ff9c8 13407return f != __cxa_atexit;
354b7da5
DH
13408 ;
13409 return 0;
13410}
13411_ACEOF
13412rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
13413if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13414 (eval $ac_link) 2>conftest.er1
354b7da5 13415 ac_status=$?
86da66b5
HPN
13416 grep -v '^ *+' conftest.er1 >conftest.err
13417 rm -f conftest.er1
13418 cat conftest.err >&5
354b7da5 13419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13420 (exit $ac_status); } &&
13421 { ac_try='test -z "$ac_c_werror_flag"
13422 || test ! -s conftest.err'
13423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13424 (eval $ac_try) 2>&5
13425 ac_status=$?
13426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13427 (exit $ac_status); }; } &&
13428 { ac_try='test -s conftest$ac_exeext'
13429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13430 (eval $ac_try) 2>&5
13431 ac_status=$?
13432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13433 (exit $ac_status); }; }; then
354b7da5
DH
13434 ac_cv_func___cxa_atexit=yes
13435else
13436 echo "$as_me: failed program was:" >&5
13437sed 's/^/| /' conftest.$ac_ext >&5
13438
b61ff9c8 13439ac_cv_func___cxa_atexit=no
354b7da5 13440fi
b61ff9c8 13441rm -f conftest.err conftest.$ac_objext \
86da66b5 13442 conftest$ac_exeext conftest.$ac_ext
354b7da5 13443fi
b61ff9c8
BS
13444echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
13445echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
354b7da5 13446if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
13447 use_cxa_atexit=yes
13448else
13449 echo "__cxa_atexit can't be enabled on this target"
13450fi
13451
5f60e48f 13452 ;;
97388150 13453 esac
18fbf599
PB
13454 else
13455 # We can't check for __cxa_atexit when building a cross, so assume
13456 # it is available
13457 use_cxa_atexit=yes
13458 fi
13459 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
13460
13461cat >>confdefs.h <<\_ACEOF
c7b5e395 13462#define DEFAULT_USE_CXA_ATEXIT 2
ba479fd2 13463_ACEOF
2121a768 13464
18fbf599 13465 fi
2121a768
JT
13466fi
13467
e64f5acf
SE
13468use_getipinfo=yes
13469if test x$with_system_libunwind = xyes; then
13470 if test x$host = x$target; then
b61ff9c8
BS
13471 echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5
13472echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6
e64f5acf
SE
13473if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
13474 echo $ECHO_N "(cached) $ECHO_C" >&6
13475else
13476 ac_func_search_save_LIBS=$LIBS
b61ff9c8 13477ac_cv_search__Unwind_GetIPInfo=no
e64f5acf
SE
13478cat >conftest.$ac_ext <<_ACEOF
13479/* confdefs.h. */
13480_ACEOF
13481cat confdefs.h >>conftest.$ac_ext
13482cat >>conftest.$ac_ext <<_ACEOF
13483/* end confdefs.h. */
13484
b61ff9c8 13485/* Override any gcc2 internal prototype to avoid an error. */
e64f5acf
SE
13486#ifdef __cplusplus
13487extern "C"
13488#endif
b61ff9c8
BS
13489/* We use char because int might match the return type of a gcc2
13490 builtin and then its argument prototype would still apply. */
e64f5acf
SE
13491char _Unwind_GetIPInfo ();
13492int
13493main ()
13494{
b61ff9c8 13495_Unwind_GetIPInfo ();
e64f5acf
SE
13496 ;
13497 return 0;
13498}
13499_ACEOF
b61ff9c8
BS
13500rm -f conftest.$ac_objext conftest$ac_exeext
13501if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13502 (eval $ac_link) 2>conftest.er1
e64f5acf
SE
13503 ac_status=$?
13504 grep -v '^ *+' conftest.er1 >conftest.err
13505 rm -f conftest.er1
13506 cat conftest.err >&5
13507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13508 (exit $ac_status); } &&
13509 { ac_try='test -z "$ac_c_werror_flag"
13510 || test ! -s conftest.err'
13511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13512 (eval $ac_try) 2>&5
13513 ac_status=$?
13514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13515 (exit $ac_status); }; } &&
13516 { ac_try='test -s conftest$ac_exeext'
13517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13518 (eval $ac_try) 2>&5
13519 ac_status=$?
13520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13521 (exit $ac_status); }; }; then
13522 ac_cv_search__Unwind_GetIPInfo="none required"
e64f5acf
SE
13523else
13524 echo "$as_me: failed program was:" >&5
13525sed 's/^/| /' conftest.$ac_ext >&5
13526
1a4b763e 13527fi
b61ff9c8
BS
13528rm -f conftest.err conftest.$ac_objext \
13529 conftest$ac_exeext conftest.$ac_ext
13530if test "$ac_cv_search__Unwind_GetIPInfo" = no; then
13531 for ac_lib in unwind; do
13532 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13533 cat >conftest.$ac_ext <<_ACEOF
13534/* confdefs.h. */
13535_ACEOF
13536cat confdefs.h >>conftest.$ac_ext
13537cat >>conftest.$ac_ext <<_ACEOF
13538/* end confdefs.h. */
2f41c1d6 13539
b61ff9c8
BS
13540/* Override any gcc2 internal prototype to avoid an error. */
13541#ifdef __cplusplus
13542extern "C"
13543#endif
13544/* We use char because int might match the return type of a gcc2
13545 builtin and then its argument prototype would still apply. */
13546char _Unwind_GetIPInfo ();
13547int
13548main ()
13549{
13550_Unwind_GetIPInfo ();
13551 ;
13552 return 0;
13553}
13554_ACEOF
13555rm -f conftest.$ac_objext conftest$ac_exeext
13556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13557 (eval $ac_link) 2>conftest.er1
13558 ac_status=$?
13559 grep -v '^ *+' conftest.er1 >conftest.err
13560 rm -f conftest.er1
13561 cat conftest.err >&5
13562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13563 (exit $ac_status); } &&
13564 { ac_try='test -z "$ac_c_werror_flag"
13565 || test ! -s conftest.err'
13566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13567 (eval $ac_try) 2>&5
13568 ac_status=$?
13569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13570 (exit $ac_status); }; } &&
13571 { ac_try='test -s conftest$ac_exeext'
13572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13573 (eval $ac_try) 2>&5
13574 ac_status=$?
13575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13576 (exit $ac_status); }; }; then
13577 ac_cv_search__Unwind_GetIPInfo="-l$ac_lib"
13578break
1a4b763e 13579else
b61ff9c8
BS
13580 echo "$as_me: failed program was:" >&5
13581sed 's/^/| /' conftest.$ac_ext >&5
13582
13583fi
13584rm -f conftest.err conftest.$ac_objext \
13585 conftest$ac_exeext conftest.$ac_ext
13586 done
a6ccdbab 13587fi
a6ccdbab
EC
13588LIBS=$ac_func_search_save_LIBS
13589fi
b61ff9c8
BS
13590echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5
13591echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6
13592if test "$ac_cv_search__Unwind_GetIPInfo" != no; then
13593 test "$ac_cv_search__Unwind_GetIPInfo" = "none required" || LIBS="$ac_cv_search__Unwind_GetIPInfo $LIBS"
a6ccdbab
EC
13594
13595else
13596 use_getipinfo=no
13597fi
13598
13599 fi
13600fi
13601
13602if test x$use_getipinfo = xyes; then
13603
13604cat >>confdefs.h <<\_ACEOF
13605#define HAVE_GETIPINFO 1
e64f5acf
SE
13606_ACEOF
13607
13608else
13609 echo "The system unwind library does not support _Unwind_GetIPInfo."
13610fi
13611
a5381466 13612# Look for a file containing extra machine modes.
1c0ca89d
ZW
13613if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
13614 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
13615
13616
13617cat >>confdefs.h <<_ACEOF
e22340b0 13618#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 13619_ACEOF
a5381466
ZW
13620
13621fi
13622
75685792
RS
13623# Convert extra_options into a form suitable for Makefile use.
13624extra_opt_files=
13625for f in $extra_options; do
13626 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
13627done
13628
13629
b7cb92ad 13630# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 13631# the first file included by config.h.
4977bab6 13632# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 13633# as well. If host!=build, we are in error and need to do more
db81d74a 13634# work to find out the build config parameters.
75bffa71 13635if test x$host = x$build
db81d74a 13636then
eaf4e618 13637 build_auto=auto-host.h
b7cb92ad
JL
13638else
13639 # We create a subdir, then run autoconf in the subdir.
13640 # To prevent recursion we set host and build for the new
13641 # invocation of configure to the build for this invocation
ba479fd2 13642 # of configure.
b7cb92ad
JL
13643 tempdir=build.$$
13644 rm -rf $tempdir
13645 mkdir $tempdir
13646 cd $tempdir
13647 case ${srcdir} in
255b8a49 13648 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
13649 *) realsrcdir=../${srcdir};;
13650 esac
d920e825
L
13651 saved_CFLAGS="${CFLAGS}"
13652 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
f8c33439 13653 LDFLAGS="${LDFLAGS_FOR_BUILD}" \
d920e825 13654 ${realsrcdir}/configure \
33e70558 13655 --enable-languages=${enable_languages-all} \
534d0cc0 13656 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 13657 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
13658
13659 # We just finished tests for the build machine, so rename
13660 # the file auto-build.h in the gcc directory.
13661 mv auto-host.h ../auto-build.h
13662 cd ..
13663 rm -rf $tempdir
eaf4e618 13664 build_auto=auto-build.h
db81d74a
RH
13665fi
13666
06f0b04c 13667
eaf4e618 13668tm_file="${tm_file} defaults.h"
4977bab6
ZW
13669tm_p_file="${tm_p_file} tm-preds.h"
13670host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
13671build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 13672# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 13673# put this back in temporarily.
232b67d9 13674xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 13675
34a86c2b
NN
13676# --------
13677# UNSORTED
13678# --------
13679
cc1e60ea 13680# Compile in configure arguments.
8105825d 13681if test -f configargs.h ; then
cc1e60ea 13682 # Being re-configured.
022dae81 13683 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
13684 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
13685else
13686 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
13687fi
eeae7b41
DJ
13688
13689# Double all backslashes and backslash all quotes to turn
13690# gcc_config_arguments into a C string.
13691sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
13692$gcc_config_arguments
13693EOF
13694gcc_config_arguments_str=`cat conftest.out`
13695rm -f conftest.out
13696
cc1e60ea
JM
13697cat > configargs.h <<EOF
13698/* Generated automatically. */
eeae7b41 13699static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 13700static const char thread_model[] = "$thread_file";
7816bea0
DJ
13701
13702static const struct {
13703 const char *name, *value;
13704} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
13705EOF
13706
ab87f8c8 13707# Internationalization
18fc9bd4
RG
13708# If we haven't got the data from the intl directory,
13709# assume NLS is disabled.
13710USE_NLS=no
13711LIBINTL=
13712LIBINTL_DEP=
13713INCINTL=
13714XGETTEXT=
13715GMSGFMT=
13716POSUB=
13717
13718if test -f ../intl/config.intl; then
13719 . ../intl/config.intl
13720fi
b61ff9c8
BS
13721echo "$as_me:$LINENO: checking whether NLS is requested" >&5
13722echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
18fc9bd4 13723if test x"$USE_NLS" != xyes; then
b61ff9c8
BS
13724 echo "$as_me:$LINENO: result: no" >&5
13725echo "${ECHO_T}no" >&6
18fc9bd4 13726else
b61ff9c8
BS
13727 echo "$as_me:$LINENO: result: yes" >&5
13728echo "${ECHO_T}yes" >&6
18fc9bd4
RG
13729
13730cat >>confdefs.h <<\_ACEOF
13731#define ENABLE_NLS 1
13732_ACEOF
13733
13734
b61ff9c8
BS
13735 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
13736echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
18fc9bd4
RG
13737 # Look for .po and .gmo files in the source directory.
13738 CATALOGS=
13739 XLINGUAS=
13740 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
13741 # If there aren't any .gmo files the shell will give us the
13742 # literal string "../path/to/srcdir/po/*.gmo" which has to be
13743 # weeded out.
13744 case "$cat" in *\**)
13745 continue;;
13746 esac
13747 # The quadruple backslash is collapsed to a double backslash
13748 # by the backticks, then collapsed again by the double quotes,
13749 # leaving us with one backslash in the sed expression (right
13750 # before the dot that mustn't act as a wildcard).
13751 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
13752 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
13753 # The user is allowed to set LINGUAS to a list of languages to
13754 # install catalogs for. If it's empty that means "all of them."
13755 if test "x$LINGUAS" = x; then
13756 CATALOGS="$CATALOGS $cat"
13757 XLINGUAS="$XLINGUAS $lang"
13758 else
13759 case "$LINGUAS" in *$lang*)
13760 CATALOGS="$CATALOGS $cat"
13761 XLINGUAS="$XLINGUAS $lang"
13762 ;;
13763 esac
13764 fi
13765 done
13766 LINGUAS="$XLINGUAS"
b61ff9c8
BS
13767 echo "$as_me:$LINENO: result: $LINGUAS" >&5
13768echo "${ECHO_T}$LINGUAS" >&6
18fc9bd4
RG
13769
13770
13771 DATADIRNAME=share
13772
13773 INSTOBJEXT=.mo
13774
13775 GENCAT=gencat
13776
13777 CATOBJEXT=.gmo
13778
13779fi
861bb6c1 13780
56694dd9
ZW
13781# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
13782# -liconv on the link line twice.
13783case "$LIBINTL" in *$LIBICONV*)
13784 LIBICONV= ;;
13785esac
dc6746e7 13786
b61ff9c8 13787# Check whether --enable-secureplt or --disable-secureplt was given.
7f970b70 13788if test "${enable_secureplt+set}" = set; then
b61ff9c8 13789 enableval="$enable_secureplt"
7f970b70 13790
b61ff9c8 13791fi;
7f970b70 13792
922e3e33
UB
13793# Check whether --enable-cld or --disable-cld was given.
13794if test "${enable_cld+set}" = set; then
13795 enableval="$enable_cld"
13796
13797else
13798 enable_cld=no
13799fi;
13800
56694dd9 13801# Windows32 Registry support for specifying GCC installation paths.
b61ff9c8 13802# Check whether --enable-win32-registry or --disable-win32-registry was given.
56694dd9 13803if test "${enable_win32_registry+set}" = set; then
b61ff9c8 13804 enableval="$enable_win32_registry"
dc6746e7 13805
b61ff9c8 13806fi;
ba479fd2 13807
a1286ef5
ZW
13808case $host_os in
13809 win32 | pe | cygwin* | mingw32* | uwin*)
13810 if test "x$enable_win32_registry" != xno; then
b61ff9c8
BS
13811 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
13812echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
ba479fd2
NN
13813if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
13814 echo $ECHO_N "(cached) $ECHO_C" >&6
13815else
13816 ac_func_search_save_LIBS=$LIBS
b61ff9c8 13817ac_cv_search_RegOpenKeyExA=no
ba479fd2 13818cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
13819/* confdefs.h. */
13820_ACEOF
13821cat confdefs.h >>conftest.$ac_ext
13822cat >>conftest.$ac_ext <<_ACEOF
13823/* end confdefs.h. */
861bb6c1 13824
b61ff9c8 13825/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
13826#ifdef __cplusplus
13827extern "C"
13828#endif
b61ff9c8
BS
13829/* We use char because int might match the return type of a gcc2
13830 builtin and then its argument prototype would still apply. */
ba479fd2
NN
13831char RegOpenKeyExA ();
13832int
13833main ()
13834{
b61ff9c8 13835RegOpenKeyExA ();
ba479fd2
NN
13836 ;
13837 return 0;
13838}
13839_ACEOF
b61ff9c8
BS
13840rm -f conftest.$ac_objext conftest$ac_exeext
13841if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13842 (eval $ac_link) 2>conftest.er1
ba479fd2 13843 ac_status=$?
86da66b5
HPN
13844 grep -v '^ *+' conftest.er1 >conftest.err
13845 rm -f conftest.er1
13846 cat conftest.err >&5
ba479fd2 13847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13848 (exit $ac_status); } &&
13849 { ac_try='test -z "$ac_c_werror_flag"
13850 || test ! -s conftest.err'
13851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13852 (eval $ac_try) 2>&5
13853 ac_status=$?
13854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13855 (exit $ac_status); }; } &&
13856 { ac_try='test -s conftest$ac_exeext'
13857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13858 (eval $ac_try) 2>&5
13859 ac_status=$?
13860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13861 (exit $ac_status); }; }; then
13862 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 13863else
ba479fd2
NN
13864 echo "$as_me: failed program was:" >&5
13865sed 's/^/| /' conftest.$ac_ext >&5
13866
1a4b763e 13867fi
b61ff9c8
BS
13868rm -f conftest.err conftest.$ac_objext \
13869 conftest$ac_exeext conftest.$ac_ext
13870if test "$ac_cv_search_RegOpenKeyExA" = no; then
13871 for ac_lib in advapi32; do
13872 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13873 cat >conftest.$ac_ext <<_ACEOF
13874/* confdefs.h. */
13875_ACEOF
13876cat confdefs.h >>conftest.$ac_ext
13877cat >>conftest.$ac_ext <<_ACEOF
13878/* end confdefs.h. */
2f41c1d6 13879
b61ff9c8
BS
13880/* Override any gcc2 internal prototype to avoid an error. */
13881#ifdef __cplusplus
13882extern "C"
13883#endif
13884/* We use char because int might match the return type of a gcc2
13885 builtin and then its argument prototype would still apply. */
13886char RegOpenKeyExA ();
13887int
13888main ()
13889{
13890RegOpenKeyExA ();
13891 ;
13892 return 0;
13893}
13894_ACEOF
13895rm -f conftest.$ac_objext conftest$ac_exeext
13896if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13897 (eval $ac_link) 2>conftest.er1
13898 ac_status=$?
13899 grep -v '^ *+' conftest.er1 >conftest.err
13900 rm -f conftest.er1
13901 cat conftest.err >&5
13902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13903 (exit $ac_status); } &&
13904 { ac_try='test -z "$ac_c_werror_flag"
13905 || test ! -s conftest.err'
13906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13907 (eval $ac_try) 2>&5
13908 ac_status=$?
13909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13910 (exit $ac_status); }; } &&
13911 { ac_try='test -s conftest$ac_exeext'
13912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13913 (eval $ac_try) 2>&5
13914 ac_status=$?
13915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13916 (exit $ac_status); }; }; then
13917 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
13918break
1a4b763e 13919else
b61ff9c8
BS
13920 echo "$as_me: failed program was:" >&5
13921sed 's/^/| /' conftest.$ac_ext >&5
13922
13923fi
13924rm -f conftest.err conftest.$ac_objext \
13925 conftest$ac_exeext conftest.$ac_ext
13926 done
dd7f7a6e
EC
13927fi
13928LIBS=$ac_func_search_save_LIBS
13929fi
b61ff9c8
BS
13930echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
13931echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
13932if test "$ac_cv_search_RegOpenKeyExA" != no; then
13933 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
dd7f7a6e
EC
13934
13935else
13936 enable_win32_registry=no
13937fi
13938
13939 fi
13940
13941 if test "x$enable_win32_registry" != xno; then
13942
13943cat >>confdefs.h <<\_ACEOF
13944#define ENABLE_WIN32_REGISTRY 1
13945_ACEOF
13946
13947
13948 if test "x$enable_win32_registry" != xyes \
13949 && test "x$enable_win32_registry" != x; then
13950
13951cat >>confdefs.h <<_ACEOF
13952#define WIN32_REGISTRY_KEY "$enable_win32_registry"
13953_ACEOF
13954
13955 fi
13956 fi
13957 ;;
13958esac
ab87f8c8 13959
56694dd9
ZW
13960# Get an absolute path to the GCC top-level source directory
13961holddir=`${PWDCMD-pwd}`
13962cd $srcdir
13963topdir=`${PWDCMD-pwd}`
13964cd $holddir
ab87f8c8 13965
56694dd9 13966# Conditionalize the makefile for this host machine.
2ed26f6b 13967xmake_file=
c406e779 13968for f in ${host_xmake_file}
56694dd9
ZW
13969do
13970 if test -f ${srcdir}/config/$f
13971 then
2ed26f6b 13972 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
13973 fi
13974done
093e61a6 13975
56694dd9 13976# Conditionalize the makefile for this target machine.
2ed26f6b 13977tmake_file_=
c406e779 13978for f in ${tmake_file}
56694dd9
ZW
13979do
13980 if test -f ${srcdir}/config/$f
13981 then
2ed26f6b 13982 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
13983 fi
13984done
2ed26f6b 13985tmake_file="${tmake_file_}"
71a94577 13986
ab87f8c8
JL
13987out_object_file=`basename $out_file .c`.o
13988
75685792
RS
13989tm_file_list="options.h"
13990tm_include_list="options.h"
ab87f8c8 13991for f in $tm_file; do
64ccbc99 13992 case $f in
3ca43df7
RS
13993 ./* )
13994 f=`echo $f | sed 's/^..//'`
13995 tm_file_list="${tm_file_list} $f"
13996 tm_include_list="${tm_include_list} $f"
13997 ;;
d02af173 13998 defaults.h )
e22340b0
ZW
13999 tm_file_list="${tm_file_list} \$(srcdir)/$f"
14000 tm_include_list="${tm_include_list} $f"
14001 ;;
14002 * )
14003 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
14004 tm_include_list="${tm_include_list} config/$f"
14005 ;;
64ccbc99 14006 esac
ab87f8c8
JL
14007done
14008
11642c3a 14009tm_p_file_list=
e22340b0 14010tm_p_include_list=
11642c3a 14011for f in $tm_p_file; do
4977bab6
ZW
14012 case $f in
14013 tm-preds.h )
e22340b0
ZW
14014 tm_p_file_list="${tm_p_file_list} $f"
14015 tm_p_include_list="${tm_p_include_list} $f"
14016 ;;
14017 * )
14018 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
14019 tm_p_include_list="${tm_p_include_list} config/$f"
14020 esac
14021done
14022
14023xm_file_list=
14024xm_include_list=
14025for f in $xm_file; do
14026 case $f in
14027 ansidecl.h )
14028 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
14029 xm_include_list="${xm_include_list} $f"
14030 ;;
14031 auto-host.h )
14032 xm_file_list="${xm_file_list} $f"
14033 xm_include_list="${xm_include_list} $f"
14034 ;;
14035 * )
14036 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
14037 xm_include_list="${xm_include_list} config/$f"
14038 ;;
4977bab6 14039 esac
11642c3a
ZW
14040done
14041
ab87f8c8 14042host_xm_file_list=
e22340b0 14043host_xm_include_list=
ab87f8c8 14044for f in $host_xm_file; do
64ccbc99 14045 case $f in
d02af173 14046 ansidecl.h )
e22340b0
ZW
14047 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
14048 host_xm_include_list="${host_xm_include_list} $f"
14049 ;;
e2500fed 14050 auto-host.h )
e22340b0
ZW
14051 host_xm_file_list="${host_xm_file_list} $f"
14052 host_xm_include_list="${host_xm_include_list} $f"
14053 ;;
14054 * )
14055 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
14056 host_xm_include_list="${host_xm_include_list} config/$f"
14057 ;;
64ccbc99 14058 esac
ab87f8c8
JL
14059done
14060
14061build_xm_file_list=
14062for f in $build_xm_file; do
64ccbc99 14063 case $f in
d02af173 14064 ansidecl.h )
e22340b0
ZW
14065 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
14066 build_xm_include_list="${build_xm_include_list} $f"
14067 ;;
e2500fed 14068 auto-build.h | auto-host.h )
e22340b0
ZW
14069 build_xm_file_list="${build_xm_file_list} $f"
14070 build_xm_include_list="${build_xm_include_list} $f"
14071 ;;
14072 * )
14073 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
14074 build_xm_include_list="${build_xm_include_list} config/$f"
14075 ;;
64ccbc99 14076 esac
ab87f8c8
JL
14077done
14078
2989d30c
GK
14079# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
14080# cross-compiler which does not use the native headers and libraries.
a078a589 14081# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
14082CROSS=
14083ALL=all.internal
14084SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
14085
14086if test "x$with_build_sysroot" != x; then
14da6073 14087 build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
14088else
14089 # This value is used, even on a native system, because
14090 # CROSS_SYSTEM_HEADER_DIR is just
14091 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
14092 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
14093fi
14094
ab87f8c8
JL
14095if test x$host != x$target
14096then
2989d30c 14097 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
a078a589 14098 ALL=all.cross
160633c6 14099 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 14100 case "$host","$target" in
3a7e8b87
GK
14101 # Darwin crosses can use the host system's libraries and headers,
14102 # because of the fat library support. Of course, it must be the
14103 # same version of Darwin on both sides. Allow the user to
14104 # just say --target=foo-darwin without a version number to mean
14105 # "the version on this system".
14106 *-*-darwin*,*-*-darwin*)
14107 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
14108 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
14109 if test $hostos = $targetos -o $targetos = darwin ; then
14110 CROSS=
14111 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
14112 with_headers=yes
14113 fi
14114 ;;
14115
343f59d9
AM
14116 i?86-*-*,x86_64-*-* \
14117 | powerpc*-*-*,powerpc64*-*-*)
14118 CROSS="$CROSS -DNATIVE_CROSS" ;;
14119 esac
7a615b25 14120elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 14121 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
14122fi
14123
b39d221a
EC
14124# If this is a cross-compiler that does not
14125# have its own set of headers then define
14126# inhibit_libc
14127
dc06db20
R
14128# If this is using newlib, without having the headers available now,
14129# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
14130# This prevents libgcc2 from containing any code which requires libc
14131# support.
a929bc28 14132: ${inhibit_libc=false}
dc06db20
R
14133if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
14134 test x$with_newlib = xyes ; } &&
e50084fa 14135 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 14136 inhibit_libc=true
b39d221a
EC
14137fi
14138
14139
a078a589
ZW
14140# When building gcc with a cross-compiler, we need to adjust things so
14141# that the generator programs are still built with the native compiler.
14142# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
14143
14144# These are the normal (build=host) settings:
ba479fd2
NN
14145CC_FOR_BUILD='$(CC)'
14146BUILD_CFLAGS='$(ALL_CFLAGS)'
f8c33439 14147BUILD_LDFLAGS='$(LDFLAGS)'
ba479fd2 14148STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
14149
14150# Possibly disable fixproto, on a per-target basis.
14151case ${use_fixproto} in
14152 no)
14153 STMP_FIXPROTO=
14154 ;;
14155 yes)
14156 STMP_FIXPROTO=stmp-fixproto
14157 ;;
14158esac
14159
a078a589 14160
83599948
NS
14161# And these apply if build != host, or we are generating coverage data
14162if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 14163then
b11e4747 14164 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
f8c33439 14165 BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
a078a589 14166
7a615b25 14167 if test "x$TARGET_SYSTEM_ROOT" = x; then
d8e5117d 14168 if test "x$STMP_FIXPROTO" != x; then
de253ca4
GK
14169 STMP_FIXPROTO=stmp-install-fixproto
14170 fi
7a615b25 14171 fi
ab87f8c8
JL
14172fi
14173
14174# Expand extra_headers to include complete path.
14175# This substitutes for lots of t-* files.
14176extra_headers_list=
b1ef58c8
NN
14177# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
14178for file in ${extra_headers} ; do
14179 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
14180done
ab87f8c8 14181
1617e5ee
GK
14182# If use_gcc_tgmath is set, append ginclude/tgmath.h.
14183if test x"$use_gcc_tgmath" = xyes
14184then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h"
14185fi
14186
c38f02df
ILT
14187# Define collect2 in Makefile.
14188case $host_can_use_collect2 in
14189 no) collect2= ;;
14190 *) collect2='collect2$(exeext)' ;;
14191esac
14192
14193
ab87f8c8 14194# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
14195case $use_collect2 in
14196 no) use_collect2= ;;
14197 "") ;;
ba479fd2 14198 *)
34a86c2b
NN
14199 host_xm_defines="${host_xm_defines} USE_COLLECT2"
14200 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
14201 case $host_can_use_collect2 in
14202 no)
14203 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
14204echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
14205 { (exit 1); exit 1; }; }
14206 ;;
14207 esac
34a86c2b
NN
14208 ;;
14209esac
ab87f8c8 14210
8bb915b6
NN
14211# ---------------------------
14212# Assembler & linker features
14213# ---------------------------
14214
da0f6381
PB
14215# During stage 2, ld is actually gcc/collect-ld, which is a small script to
14216# discern between when to use prev-ld/ld-new and when to use ld/ld-new.
14217# However when ld-new is first executed from the build tree, libtool will
14218# relink it as .libs/lt-ld-new, so that it can give it an RPATH that refers
14219# to the build tree. While doing this we need to use the previous-stage
14220# linker, or we have an infinite loop. The presence of a shell script as
14221# ld/ld-new, and the fact that the script *uses ld itself*, is what confuses
14222# the gcc/collect-ld script. So we need to know how libtool works, or
14223# exec-tool will fail.
e8b05380 14224
da0f6381
PB
14225
14226
14227
14228macro_version='2.1a'
14229macro_revision='1.2435'
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242ltmain="$ac_aux_dir/ltmain.sh"
14243
14244# Set options
14245
14246enable_dlopen=no
14247
14248
14249enable_win32_dll=no
14250
14251
14252# Check whether --enable-shared or --disable-shared was given.
14253if test "${enable_shared+set}" = set; then
14254 enableval="$enable_shared"
14255 p=${PACKAGE-default}
14256 case $enableval in
14257 yes) enable_shared=yes ;;
14258 no) enable_shared=no ;;
14259 *)
14260 enable_shared=no
14261 # Look at the argument we got. We use all the common list separators.
14262 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
14263 for pkg in $enableval; do
14264 IFS="$lt_save_ifs"
14265 if test "X$pkg" = "X$p"; then
14266 enable_shared=yes
14267 fi
14268 done
14269 IFS="$lt_save_ifs"
14270 ;;
14271 esac
e8b05380 14272else
da0f6381
PB
14273 enable_shared=yes
14274fi;
e8b05380 14275
da0f6381
PB
14276
14277
14278
14279
14280
14281
14282
14283# Check whether --enable-static or --disable-static was given.
14284if test "${enable_static+set}" = set; then
14285 enableval="$enable_static"
14286 p=${PACKAGE-default}
14287 case $enableval in
14288 yes) enable_static=yes ;;
14289 no) enable_static=no ;;
14290 *)
14291 enable_static=no
14292 # Look at the argument we got. We use all the common list separators.
14293 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
14294 for pkg in $enableval; do
14295 IFS="$lt_save_ifs"
14296 if test "X$pkg" = "X$p"; then
14297 enable_static=yes
14298 fi
14299 done
14300 IFS="$lt_save_ifs"
14301 ;;
14302 esac
e8b05380 14303else
da0f6381
PB
14304 enable_static=yes
14305fi;
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315# Check whether --with-pic or --without-pic was given.
14316if test "${with_pic+set}" = set; then
14317 withval="$with_pic"
14318 pic_mode="$withval"
14319else
14320 pic_mode=default
14321fi;
14322
14323test -z "$pic_mode" && pic_mode=default
14324
14325
14326
14327
14328
14329
14330
14331# Check whether --enable-fast-install or --disable-fast-install was given.
14332if test "${enable_fast_install+set}" = set; then
14333 enableval="$enable_fast_install"
14334 p=${PACKAGE-default}
14335 case $enableval in
14336 yes) enable_fast_install=yes ;;
14337 no) enable_fast_install=no ;;
14338 *)
14339 enable_fast_install=no
14340 # Look at the argument we got. We use all the common list separators.
14341 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
14342 for pkg in $enableval; do
14343 IFS="$lt_save_ifs"
14344 if test "X$pkg" = "X$p"; then
14345 enable_fast_install=yes
14346 fi
14347 done
14348 IFS="$lt_save_ifs"
14349 ;;
14350 esac
14351else
14352 enable_fast_install=yes
14353fi;
14354
14355
14356
14357
14358
14359
14360
14361
14362echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
14363echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
14364if test "${lt_cv_path_SED+set}" = set; then
e8b05380
PB
14365 echo $ECHO_N "(cached) $ECHO_C" >&6
14366else
da0f6381
PB
14367 # Loop through the user's path and test for sed and gsed.
14368# Then use that list of sed's as ones to test for truncation.
14369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380
PB
14370for as_dir in $PATH
14371do
14372 IFS=$as_save_IFS
14373 test -z "$as_dir" && as_dir=.
da0f6381
PB
14374 for lt_ac_prog in sed gsed; do
14375 for ac_exec_ext in '' $ac_executable_extensions; do
14376 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
14377 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
14378 fi
14379 done
14380 done
e8b05380 14381done
da0f6381
PB
14382IFS=$as_save_IFS
14383lt_ac_max=0
14384lt_ac_count=0
14385# Add /usr/xpg4/bin/sed as it is typically found on Solaris
14386# along with /bin/sed that truncates output.
14387for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
14388 test ! -f $lt_ac_sed && continue
14389 cat /dev/null > conftest.in
14390 lt_ac_count=0
14391 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
14392 # Check for GNU sed and select it if it is found.
14393 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
14394 lt_cv_path_SED=$lt_ac_sed
14395 break
14396 fi
14397 while true; do
14398 cat conftest.in conftest.in >conftest.tmp
14399 mv conftest.tmp conftest.in
14400 cp conftest.in conftest.nl
14401 echo >>conftest.nl
14402 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
14403 cmp -s conftest.out conftest.nl || break
14404 # 10000 chars as input seems more than enough
14405 test $lt_ac_count -gt 10 && break
14406 lt_ac_count=`expr $lt_ac_count + 1`
14407 if test $lt_ac_count -gt $lt_ac_max; then
14408 lt_ac_max=$lt_ac_count
14409 lt_cv_path_SED=$lt_ac_sed
14410 fi
14411 done
e8b05380
PB
14412done
14413
e8b05380 14414fi
b61ff9c8 14415
da0f6381 14416SED=$lt_cv_path_SED
e8b05380 14417
da0f6381
PB
14418echo "$as_me:$LINENO: result: $SED" >&5
14419echo "${ECHO_T}$SED" >&6
e8b05380 14420
da0f6381
PB
14421test -z "$SED" && SED=sed
14422Xsed="$SED -e 1s/^X//"
e8b05380 14423
e8b05380
PB
14424
14425
ad9c4d9f 14426
da0f6381
PB
14427
14428
14429
14430
14431
14432
14433
14434echo "$as_me:$LINENO: checking for fgrep" >&5
14435echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
14436if test "${ac_cv_prog_fgrep+set}" = set; then
14437 echo $ECHO_N "(cached) $ECHO_C" >&6
e8b05380 14438else
da0f6381
PB
14439 if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1
14440 then ac_cv_prog_fgrep='grep -F'
14441 else ac_cv_prog_fgrep='fgrep'
14442 fi
981d4858 14443fi
da0f6381
PB
14444echo "$as_me:$LINENO: result: $ac_cv_prog_fgrep" >&5
14445echo "${ECHO_T}$ac_cv_prog_fgrep" >&6
14446 FGREP=$ac_cv_prog_fgrep
9e423e6d 14447
9f18db39 14448
da0f6381 14449test -z "$GREP" && GREP=grep
9f18db39 14450
da0f6381
PB
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469# Check whether --with-gnu-ld or --without-gnu-ld was given.
14470if test "${with_gnu_ld+set}" = set; then
14471 withval="$with_gnu_ld"
14472 test "$withval" = no || with_gnu_ld=yes
14473else
14474 with_gnu_ld=no
14475fi;
14476ac_prog=ld
14477if test "$GCC" = yes; then
14478 # Check if gcc -print-prog-name=ld gives a path.
14479 echo "$as_me:$LINENO: checking for ld used by $CC" >&5
14480echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
14481 case $host in
14482 *-*-mingw*)
14483 # gcc leaves a trailing carriage return which upsets mingw
14484 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
14485 *)
14486 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
14487 esac
14488 case $ac_prog in
14489 # Accept absolute paths.
14490 [\\/]* | ?:[\\/]*)
14491 re_direlt='/[^/][^/]*/\.\./'
14492 # Canonicalize the pathname of ld
14493 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
14494 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
14495 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
14496 done
14497 test -z "$LD" && LD="$ac_prog"
14498 ;;
14499 "")
14500 # If it fails, then pretend we aren't using GCC.
14501 ac_prog=ld
14502 ;;
14503 *)
14504 # If it is relative, then search for the first ld in PATH.
14505 with_gnu_ld=unknown
14506 ;;
14507 esac
14508elif test "$with_gnu_ld" = yes; then
14509 echo "$as_me:$LINENO: checking for GNU ld" >&5
14510echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
14511else
14512 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
14513echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
14514fi
14515if test "${lt_cv_path_LD+set}" = set; then
14516 echo $ECHO_N "(cached) $ECHO_C" >&6
14517else
14518 if test -z "$LD"; then
14519 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14520 for ac_dir in $PATH; do
14521 IFS="$lt_save_ifs"
14522 test -z "$ac_dir" && ac_dir=.
14523 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
14524 lt_cv_path_LD="$ac_dir/$ac_prog"
14525 # Check to see if the program is GNU ld. I'd rather use --version,
14526 # but apparently some variants of GNU ld only accept -v.
14527 # Break only if it was the GNU/non-GNU ld that we prefer.
14528 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
14529 *GNU* | *'with BFD'*)
14530 test "$with_gnu_ld" != no && break
14531 ;;
14532 *)
14533 test "$with_gnu_ld" != yes && break
14534 ;;
14535 esac
14536 fi
14537 done
14538 IFS="$lt_save_ifs"
14539else
14540 lt_cv_path_LD="$LD" # Let the user override the test with a path.
14541fi
14542fi
14543
14544LD="$lt_cv_path_LD"
14545if test -n "$LD"; then
14546 echo "$as_me:$LINENO: result: $LD" >&5
14547echo "${ECHO_T}$LD" >&6
14548else
14549 echo "$as_me:$LINENO: result: no" >&5
14550echo "${ECHO_T}no" >&6
14551fi
14552test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
14553echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
14554 { (exit 1); exit 1; }; }
14555echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
14556echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
14557if test "${lt_cv_prog_gnu_ld+set}" = set; then
14558 echo $ECHO_N "(cached) $ECHO_C" >&6
14559else
14560 # I'd rather use --version here, but apparently some GNU lds only accept -v.
14561case `$LD -v 2>&1 </dev/null` in
14562*GNU* | *'with BFD'*)
14563 lt_cv_prog_gnu_ld=yes
14564 ;;
14565*)
14566 lt_cv_prog_gnu_ld=no
14567 ;;
14568esac
14569fi
14570echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
14571echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
14572with_gnu_ld=$lt_cv_prog_gnu_ld
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
14584echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6
14585if test "${lt_cv_path_NM+set}" = set; then
14586 echo $ECHO_N "(cached) $ECHO_C" >&6
14587else
14588 if test -n "$NM"; then
14589 # Let the user override the test.
14590 lt_cv_path_NM="$NM"
14591else
14592 lt_nm_to_check="${ac_tool_prefix}nm"
14593 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
14594 lt_nm_to_check="$lt_nm_to_check nm"
14595 fi
14596 for lt_tmp_nm in $lt_nm_to_check; do
14597 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14598 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
14599 IFS="$lt_save_ifs"
14600 test -z "$ac_dir" && ac_dir=.
14601 tmp_nm="$ac_dir/$lt_tmp_nm"
14602 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
14603 # Check to see if the nm accepts a BSD-compat flag.
14604 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
14605 # nm: unknown option "B" ignored
14606 # Tru64's nm complains that /dev/null is an invalid object file
14607 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
14608 */dev/null* | *'Invalid file or object type'*)
14609 lt_cv_path_NM="$tmp_nm -B"
14610 break
14611 ;;
14612 *)
14613 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
14614 */dev/null*)
14615 lt_cv_path_NM="$tmp_nm -p"
14616 break
14617 ;;
14618 *)
14619 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
14620 continue # so that we can try to find one that supports BSD flags
14621 ;;
14622 esac
14623 ;;
14624 esac
14625 fi
14626 done
14627 IFS="$lt_save_ifs"
14628 done
14629 : ${lt_cv_path_NM=no}
14630fi
14631fi
14632echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
14633echo "${ECHO_T}$lt_cv_path_NM" >&6
14634if test "$lt_cv_path_NM" != "no"; then
14635 NM="$lt_cv_path_NM"
14636else
14637 # Didn't find any BSD compatible name lister, look for dumpbin.
14638 if test -n "$ac_tool_prefix"; then
14639 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
14640 do
14641 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14642set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14643echo "$as_me:$LINENO: checking for $ac_word" >&5
14644echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14645if test "${ac_cv_prog_DUMPBIN+set}" = set; then
14646 echo $ECHO_N "(cached) $ECHO_C" >&6
14647else
14648 if test -n "$DUMPBIN"; then
14649 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
14650else
14651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14652for as_dir in $PATH
14653do
14654 IFS=$as_save_IFS
14655 test -z "$as_dir" && as_dir=.
14656 for ac_exec_ext in '' $ac_executable_extensions; do
14657 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14658 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
14659 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14660 break 2
14661 fi
14662done
14663done
14664
14665fi
14666fi
14667DUMPBIN=$ac_cv_prog_DUMPBIN
14668if test -n "$DUMPBIN"; then
14669 echo "$as_me:$LINENO: result: $DUMPBIN" >&5
14670echo "${ECHO_T}$DUMPBIN" >&6
14671else
14672 echo "$as_me:$LINENO: result: no" >&5
14673echo "${ECHO_T}no" >&6
14674fi
14675
14676 test -n "$DUMPBIN" && break
14677 done
14678fi
14679if test -z "$DUMPBIN"; then
14680 ac_ct_DUMPBIN=$DUMPBIN
14681 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
14682do
14683 # Extract the first word of "$ac_prog", so it can be a program name with args.
14684set dummy $ac_prog; ac_word=$2
14685echo "$as_me:$LINENO: checking for $ac_word" >&5
14686echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14687if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
14688 echo $ECHO_N "(cached) $ECHO_C" >&6
14689else
14690 if test -n "$ac_ct_DUMPBIN"; then
14691 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
14692else
14693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14694for as_dir in $PATH
14695do
14696 IFS=$as_save_IFS
14697 test -z "$as_dir" && as_dir=.
14698 for ac_exec_ext in '' $ac_executable_extensions; do
14699 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14700 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
14701 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14702 break 2
14703 fi
14704done
14705done
14706
14707fi
14708fi
14709ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
14710if test -n "$ac_ct_DUMPBIN"; then
14711 echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
14712echo "${ECHO_T}$ac_ct_DUMPBIN" >&6
14713else
14714 echo "$as_me:$LINENO: result: no" >&5
14715echo "${ECHO_T}no" >&6
14716fi
14717
14718 test -n "$ac_ct_DUMPBIN" && break
14719done
14720test -n "$ac_ct_DUMPBIN" || ac_ct_DUMPBIN=":"
14721
14722 DUMPBIN=$ac_ct_DUMPBIN
14723fi
14724
14725
14726 if test "$DUMPBIN" != ":"; then
14727 NM="$DUMPBIN"
14728 fi
14729fi
14730test -z "$NM" && NM=nm
14731
14732
14733
14734
14735
14736
14737echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
14738echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6
14739if test "${lt_cv_nm_interface+set}" = set; then
14740 echo $ECHO_N "(cached) $ECHO_C" >&6
14741else
14742 lt_cv_nm_interface="BSD nm"
14743 echo "int some_variable = 0;" > conftest.$ac_ext
f8bf9252 14744 (eval echo "\"\$as_me:14744: $ac_compile\"" >&5)
da0f6381
PB
14745 (eval "$ac_compile" 2>conftest.err)
14746 cat conftest.err >&5
f8bf9252 14747 (eval echo "\"\$as_me:14747: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
da0f6381
PB
14748 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
14749 cat conftest.err >&5
f8bf9252 14750 (eval echo "\"\$as_me:14750: output\"" >&5)
da0f6381
PB
14751 cat conftest.out >&5
14752 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
14753 lt_cv_nm_interface="MS dumpbin"
14754 fi
14755 rm -f conftest*
14756fi
14757echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
14758echo "${ECHO_T}$lt_cv_nm_interface" >&6
14759
14760echo "$as_me:$LINENO: checking whether ln -s works" >&5
14761echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
14762LN_S=$as_ln_s
14763if test "$LN_S" = "ln -s"; then
14764 echo "$as_me:$LINENO: result: yes" >&5
14765echo "${ECHO_T}yes" >&6
14766else
14767 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
14768echo "${ECHO_T}no, using $LN_S" >&6
14769fi
14770
14771# find the maximum length of command line arguments
14772echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
14773echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
14774if test "${lt_cv_sys_max_cmd_len+set}" = set; then
14775 echo $ECHO_N "(cached) $ECHO_C" >&6
14776else
14777 i=0
14778 teststring="ABCD"
14779
14780 case $build_os in
14781 msdosdjgpp*)
14782 # On DJGPP, this test can blow up pretty badly due to problems in libc
14783 # (any single argument exceeding 2000 bytes causes a buffer overrun
14784 # during glob expansion). Even if it were fixed, the result of this
14785 # check would be larger than it should be.
14786 lt_cv_sys_max_cmd_len=12288; # 12K is about right
14787 ;;
14788
14789 gnu*)
14790 # Under GNU Hurd, this test is not required because there is
14791 # no limit to the length of command line arguments.
14792 # Libtool will interpret -1 as no limit whatsoever
14793 lt_cv_sys_max_cmd_len=-1;
14794 ;;
14795
14796 cygwin* | mingw*)
14797 # On Win9x/ME, this test blows up -- it succeeds, but takes
14798 # about 5 minutes as the teststring grows exponentially.
14799 # Worse, since 9x/ME are not pre-emptively multitasking,
14800 # you end up with a "frozen" computer, even though with patience
14801 # the test eventually succeeds (with a max line length of 256k).
14802 # Instead, let's just punt: use the minimum linelength reported by
14803 # all of the supported platforms: 8192 (on NT/2K/XP).
14804 lt_cv_sys_max_cmd_len=8192;
14805 ;;
14806
14807 amigaos*)
14808 # On AmigaOS with pdksh, this test takes hours, literally.
14809 # So we just punt and use a minimum line length of 8192.
14810 lt_cv_sys_max_cmd_len=8192;
14811 ;;
14812
14813 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
14814 # This has been around since 386BSD, at least. Likely further.
14815 if test -x /sbin/sysctl; then
14816 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
14817 elif test -x /usr/sbin/sysctl; then
14818 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
14819 else
14820 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
14821 fi
14822 # And add a safety zone
14823 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
14824 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
14825 ;;
14826
14827 interix*)
14828 # We know the value 262144 and hardcode it with a safety zone (like BSD)
14829 lt_cv_sys_max_cmd_len=196608
14830 ;;
14831
14832 osf*)
14833 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
14834 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
14835 # nice to cause kernel panics so lets avoid the loop below.
14836 # First set a reasonable default.
14837 lt_cv_sys_max_cmd_len=16384
14838 #
14839 if test -x /sbin/sysconfig; then
14840 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
14841 *1*) lt_cv_sys_max_cmd_len=-1 ;;
14842 esac
14843 fi
14844 ;;
14845 sco3.2v5*)
14846 lt_cv_sys_max_cmd_len=102400
14847 ;;
14848 sysv5* | sco5v6* | sysv4.2uw2*)
14849 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
14850 if test -n "$kargmax"; then
14851 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
14852 else
14853 lt_cv_sys_max_cmd_len=32768
14854 fi
14855 ;;
14856 *)
14857 lt_cv_sys_max_cmd_len=`getconf ARG_MAX 2> /dev/null`
14858 if test -n $lt_cv_sys_max_cmd_len; then
14859 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
14860 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
14861 else
14862 # Make teststring a little bigger before we do anything with it.
14863 # a 1K string should be a reasonable start.
14864 for i in 1 2 3 4 5 6 7 8 ; do
14865 teststring=$teststring$teststring
14866 done
14867 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
14868 # If test is not a shell built-in, we'll probably end up computing a
14869 # maximum length that is only half of the actual maximum length, but
14870 # we can't tell.
14871 while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
14872 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
14873 test $i != 17 # 1/2 MB should be enough
14874 do
14875 i=`expr $i + 1`
14876 teststring=$teststring$teststring
14877 done
14878 # Only check the string length outside the loop.
14879 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
14880 teststring=
14881 # Add a significant safety factor because C++ compilers can tack on
14882 # massive amounts of additional arguments before passing them to the
14883 # linker. It appears as though 1/2 is a usable value.
14884 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
14885 fi
14886 ;;
14887 esac
14888
14889fi
14890
14891if test -n $lt_cv_sys_max_cmd_len ; then
14892 echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
14893echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
14894else
14895 echo "$as_me:$LINENO: result: none" >&5
14896echo "${ECHO_T}none" >&6
14897fi
14898max_cmd_len=$lt_cv_sys_max_cmd_len
14899
14900
14901
14902
14903
14904
14905
14906: ${CP="cp -f"}
14907: ${MV="mv -f"}
14908: ${RM="rm -f"}
14909
14910echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
14911echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6
14912# Try some XSI features
14913xsi_shell=no
14914( _lt_dummy="a/b/c"
14915 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
14916 = c,a/b,, ) >/dev/null 2>&1 \
14917 && xsi_shell=yes
14918echo "$as_me:$LINENO: result: $xsi_shell" >&5
14919echo "${ECHO_T}$xsi_shell" >&6
14920
14921
14922echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
14923echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6
14924lt_shell_append=no
14925( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
14926 >/dev/null 2>&1 \
14927 && lt_shell_append=yes
14928echo "$as_me:$LINENO: result: $lt_shell_append" >&5
14929echo "${ECHO_T}$lt_shell_append" >&6
14930
14931
14932if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
14933 lt_unset=unset
14934else
14935 lt_unset=false
14936fi
14937
14938
14939
14940
14941
14942# test EBCDIC or ASCII
14943case `echo X|tr X '\101'` in
14944 A) # ASCII based system
14945 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
14946 lt_SP2NL='tr \040 \012'
14947 lt_NL2SP='tr \015\012 \040\040'
14948 ;;
14949 *) # EBCDIC based system
14950 lt_SP2NL='tr \100 \n'
14951 lt_NL2SP='tr \r\n \100\100'
14952 ;;
14953esac
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
14964echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
14965if test "${lt_cv_ld_reload_flag+set}" = set; then
14966 echo $ECHO_N "(cached) $ECHO_C" >&6
14967else
14968 lt_cv_ld_reload_flag='-r'
14969fi
14970echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
14971echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
14972reload_flag=$lt_cv_ld_reload_flag
14973case $reload_flag in
14974"" | " "*) ;;
14975*) reload_flag=" $reload_flag" ;;
14976esac
14977reload_cmds='$LD$reload_flag -o $output$reload_objs'
14978case $host_os in
14979 darwin*)
14980 if test "$GCC" = yes; then
14981 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
14982 else
14983 reload_cmds='$LD$reload_flag -o $output$reload_objs'
14984 fi
14985 ;;
14986esac
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
14998echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6
14999if test "${lt_cv_deplibs_check_method+set}" = set; then
15000 echo $ECHO_N "(cached) $ECHO_C" >&6
15001else
15002 lt_cv_file_magic_cmd='$MAGIC_CMD'
15003lt_cv_file_magic_test_file=
15004lt_cv_deplibs_check_method='unknown'
15005# Need to set the preceding variable on all platforms that support
15006# interlibrary dependencies.
15007# 'none' -- dependencies not supported.
15008# `unknown' -- same as none, but documents that we really don't know.
15009# 'pass_all' -- all dependencies passed with no checks.
15010# 'test_compile' -- check by making test program.
15011# 'file_magic [[regex]]' -- check by looking for files in library path
15012# which responds to the $file_magic_cmd with a given extended regex.
15013# If you have `file' or equivalent on your system and you're not sure
15014# whether `pass_all' will *always* work, you probably want this one.
15015
15016case $host_os in
15017aix[4-9]*)
15018 lt_cv_deplibs_check_method=pass_all
15019 ;;
15020
15021beos*)
15022 lt_cv_deplibs_check_method=pass_all
15023 ;;
15024
15025bsdi[45]*)
15026 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
15027 lt_cv_file_magic_cmd='/usr/bin/file -L'
15028 lt_cv_file_magic_test_file=/shlib/libc.so
15029 ;;
15030
15031cygwin*)
15032 # func_win32_libid is a shell function defined in ltmain.sh
15033 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
15034 lt_cv_file_magic_cmd='func_win32_libid'
15035 ;;
15036
15037mingw* | pw32*)
15038 # Base MSYS/MinGW do not provide the 'file' command needed by
15039 # func_win32_libid shell function, so use a weaker test based on 'objdump',
15040 # unless we find 'file', for example because we are cross-compiling.
15041 if ( file / ) >/dev/null 2>&1; then
15042 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
15043 lt_cv_file_magic_cmd='func_win32_libid'
15044 else
15045 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
15046 lt_cv_file_magic_cmd='$OBJDUMP -f'
15047 fi
15048 ;;
15049
15050darwin* | rhapsody*)
15051 lt_cv_deplibs_check_method=pass_all
15052 ;;
15053
15054freebsd* | dragonfly*)
15055 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
15056 case $host_cpu in
15057 i*86 )
15058 # Not sure whether the presence of OpenBSD here was a mistake.
15059 # Let's accept both of them until this is cleared up.
15060 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
15061 lt_cv_file_magic_cmd=/usr/bin/file
15062 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
15063 ;;
15064 esac
15065 else
15066 lt_cv_deplibs_check_method=pass_all
15067 fi
15068 ;;
15069
15070gnu*)
15071 lt_cv_deplibs_check_method=pass_all
15072 ;;
15073
15074hpux10.20* | hpux11*)
15075 lt_cv_file_magic_cmd=/usr/bin/file
15076 case $host_cpu in
15077 ia64*)
15078 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
15079 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
15080 ;;
15081 hppa*64*)
15082 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]'
15083 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
15084 ;;
15085 *)
15086 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
15087 lt_cv_file_magic_test_file=/usr/lib/libc.sl
15088 ;;
15089 esac
15090 ;;
15091
15092interix[3-9]*)
15093 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
15094 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
15095 ;;
15096
15097irix5* | irix6* | nonstopux*)
15098 case $LD in
15099 *-32|*"-32 ") libmagic=32-bit;;
15100 *-n32|*"-n32 ") libmagic=N32;;
15101 *-64|*"-64 ") libmagic=64-bit;;
15102 *) libmagic=never-match;;
15103 esac
15104 lt_cv_deplibs_check_method=pass_all
15105 ;;
15106
15107# This must be Linux ELF.
15108linux* | k*bsd*-gnu)
15109 lt_cv_deplibs_check_method=pass_all
15110 ;;
15111
15112netbsd*)
15113 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
15114 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
15115 else
15116 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
15117 fi
15118 ;;
15119
15120newos6*)
15121 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
15122 lt_cv_file_magic_cmd=/usr/bin/file
15123 lt_cv_file_magic_test_file=/usr/lib/libnls.so
15124 ;;
15125
15126*nto* | *qnx*)
15127 lt_cv_deplibs_check_method=pass_all
15128 ;;
15129
15130openbsd*)
15131 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15132 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
15133 else
15134 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
15135 fi
15136 ;;
15137
15138osf3* | osf4* | osf5*)
15139 lt_cv_deplibs_check_method=pass_all
15140 ;;
15141
15142rdos*)
15143 lt_cv_deplibs_check_method=pass_all
15144 ;;
15145
15146solaris*)
15147 lt_cv_deplibs_check_method=pass_all
15148 ;;
15149
15150sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
15151 lt_cv_deplibs_check_method=pass_all
15152 ;;
15153
15154sysv4 | sysv4.3*)
15155 case $host_vendor in
15156 motorola)
15157 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]'
15158 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
15159 ;;
15160 ncr)
15161 lt_cv_deplibs_check_method=pass_all
15162 ;;
15163 sequent)
15164 lt_cv_file_magic_cmd='/bin/file'
15165 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
15166 ;;
15167 sni)
15168 lt_cv_file_magic_cmd='/bin/file'
15169 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
15170 lt_cv_file_magic_test_file=/lib/libc.so
15171 ;;
15172 siemens)
15173 lt_cv_deplibs_check_method=pass_all
15174 ;;
15175 pc)
15176 lt_cv_deplibs_check_method=pass_all
15177 ;;
15178 esac
15179 ;;
15180
15181tpf*)
15182 lt_cv_deplibs_check_method=pass_all
15183 ;;
15184esac
15185
15186fi
15187echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
15188echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
15189file_magic_cmd=$lt_cv_file_magic_cmd
15190deplibs_check_method=$lt_cv_deplibs_check_method
15191test -z "$deplibs_check_method" && deplibs_check_method=unknown
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204if test -n "$ac_tool_prefix"; then
15205 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
15206set dummy ${ac_tool_prefix}ar; ac_word=$2
15207echo "$as_me:$LINENO: checking for $ac_word" >&5
15208echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15209if test "${ac_cv_prog_AR+set}" = set; then
15210 echo $ECHO_N "(cached) $ECHO_C" >&6
15211else
15212 if test -n "$AR"; then
15213 ac_cv_prog_AR="$AR" # Let the user override the test.
15214else
15215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15216for as_dir in $PATH
15217do
15218 IFS=$as_save_IFS
15219 test -z "$as_dir" && as_dir=.
15220 for ac_exec_ext in '' $ac_executable_extensions; do
15221 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15222 ac_cv_prog_AR="${ac_tool_prefix}ar"
15223 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15224 break 2
15225 fi
15226done
15227done
15228
15229fi
15230fi
15231AR=$ac_cv_prog_AR
15232if test -n "$AR"; then
15233 echo "$as_me:$LINENO: result: $AR" >&5
15234echo "${ECHO_T}$AR" >&6
15235else
15236 echo "$as_me:$LINENO: result: no" >&5
15237echo "${ECHO_T}no" >&6
15238fi
15239
15240fi
15241if test -z "$ac_cv_prog_AR"; then
15242 ac_ct_AR=$AR
15243 # Extract the first word of "ar", so it can be a program name with args.
15244set dummy ar; ac_word=$2
15245echo "$as_me:$LINENO: checking for $ac_word" >&5
15246echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15247if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
15248 echo $ECHO_N "(cached) $ECHO_C" >&6
15249else
15250 if test -n "$ac_ct_AR"; then
15251 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
15252else
15253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15254for as_dir in $PATH
15255do
15256 IFS=$as_save_IFS
15257 test -z "$as_dir" && as_dir=.
15258 for ac_exec_ext in '' $ac_executable_extensions; do
15259 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15260 ac_cv_prog_ac_ct_AR="ar"
15261 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15262 break 2
15263 fi
15264done
15265done
15266
15267 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
15268fi
15269fi
15270ac_ct_AR=$ac_cv_prog_ac_ct_AR
15271if test -n "$ac_ct_AR"; then
15272 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
15273echo "${ECHO_T}$ac_ct_AR" >&6
15274else
15275 echo "$as_me:$LINENO: result: no" >&5
15276echo "${ECHO_T}no" >&6
15277fi
15278
15279 AR=$ac_ct_AR
15280else
15281 AR="$ac_cv_prog_AR"
15282fi
15283
15284test -z "$AR" && AR=ar
15285test -z "$AR_FLAGS" && AR_FLAGS=cru
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297if test -n "$ac_tool_prefix"; then
15298 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
15299set dummy ${ac_tool_prefix}strip; ac_word=$2
15300echo "$as_me:$LINENO: checking for $ac_word" >&5
15301echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15302if test "${ac_cv_prog_STRIP+set}" = set; then
15303 echo $ECHO_N "(cached) $ECHO_C" >&6
15304else
15305 if test -n "$STRIP"; then
15306 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
15307else
15308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15309for as_dir in $PATH
15310do
15311 IFS=$as_save_IFS
15312 test -z "$as_dir" && as_dir=.
15313 for ac_exec_ext in '' $ac_executable_extensions; do
15314 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15315 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
15316 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15317 break 2
15318 fi
15319done
15320done
15321
15322fi
15323fi
15324STRIP=$ac_cv_prog_STRIP
15325if test -n "$STRIP"; then
15326 echo "$as_me:$LINENO: result: $STRIP" >&5
15327echo "${ECHO_T}$STRIP" >&6
15328else
15329 echo "$as_me:$LINENO: result: no" >&5
15330echo "${ECHO_T}no" >&6
15331fi
15332
15333fi
15334if test -z "$ac_cv_prog_STRIP"; then
15335 ac_ct_STRIP=$STRIP
15336 # Extract the first word of "strip", so it can be a program name with args.
15337set dummy strip; ac_word=$2
15338echo "$as_me:$LINENO: checking for $ac_word" >&5
15339echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15340if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
15341 echo $ECHO_N "(cached) $ECHO_C" >&6
15342else
15343 if test -n "$ac_ct_STRIP"; then
15344 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
15345else
15346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15347for as_dir in $PATH
15348do
15349 IFS=$as_save_IFS
15350 test -z "$as_dir" && as_dir=.
15351 for ac_exec_ext in '' $ac_executable_extensions; do
15352 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15353 ac_cv_prog_ac_ct_STRIP="strip"
15354 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15355 break 2
15356 fi
15357done
15358done
15359
15360 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
15361fi
15362fi
15363ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
15364if test -n "$ac_ct_STRIP"; then
15365 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
15366echo "${ECHO_T}$ac_ct_STRIP" >&6
15367else
15368 echo "$as_me:$LINENO: result: no" >&5
15369echo "${ECHO_T}no" >&6
15370fi
15371
15372 STRIP=$ac_ct_STRIP
15373else
15374 STRIP="$ac_cv_prog_STRIP"
15375fi
15376
15377test -z "$STRIP" && STRIP=:
15378
15379
15380
15381
15382
15383
15384if test -n "$ac_tool_prefix"; then
15385 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
15386set dummy ${ac_tool_prefix}ranlib; ac_word=$2
15387echo "$as_me:$LINENO: checking for $ac_word" >&5
15388echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15389if test "${ac_cv_prog_RANLIB+set}" = set; then
15390 echo $ECHO_N "(cached) $ECHO_C" >&6
15391else
15392 if test -n "$RANLIB"; then
15393 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
15394else
15395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15396for as_dir in $PATH
15397do
15398 IFS=$as_save_IFS
15399 test -z "$as_dir" && as_dir=.
15400 for ac_exec_ext in '' $ac_executable_extensions; do
15401 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15402 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
15403 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15404 break 2
15405 fi
15406done
15407done
15408
15409fi
15410fi
15411RANLIB=$ac_cv_prog_RANLIB
15412if test -n "$RANLIB"; then
15413 echo "$as_me:$LINENO: result: $RANLIB" >&5
15414echo "${ECHO_T}$RANLIB" >&6
15415else
15416 echo "$as_me:$LINENO: result: no" >&5
15417echo "${ECHO_T}no" >&6
15418fi
15419
15420fi
15421if test -z "$ac_cv_prog_RANLIB"; then
15422 ac_ct_RANLIB=$RANLIB
15423 # Extract the first word of "ranlib", so it can be a program name with args.
15424set dummy ranlib; ac_word=$2
15425echo "$as_me:$LINENO: checking for $ac_word" >&5
15426echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15427if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
15428 echo $ECHO_N "(cached) $ECHO_C" >&6
15429else
15430 if test -n "$ac_ct_RANLIB"; then
15431 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
15432else
15433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15434for as_dir in $PATH
15435do
15436 IFS=$as_save_IFS
15437 test -z "$as_dir" && as_dir=.
15438 for ac_exec_ext in '' $ac_executable_extensions; do
15439 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15440 ac_cv_prog_ac_ct_RANLIB="ranlib"
15441 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15442 break 2
15443 fi
15444done
15445done
15446
15447 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
15448fi
15449fi
15450ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
15451if test -n "$ac_ct_RANLIB"; then
15452 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
15453echo "${ECHO_T}$ac_ct_RANLIB" >&6
15454else
15455 echo "$as_me:$LINENO: result: no" >&5
15456echo "${ECHO_T}no" >&6
15457fi
15458
15459 RANLIB=$ac_ct_RANLIB
15460else
15461 RANLIB="$ac_cv_prog_RANLIB"
15462fi
15463
15464test -z "$RANLIB" && RANLIB=:
15465
15466
15467
15468
15469
15470
15471# Determine commands to create old-style static archives.
15472old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
15473old_postinstall_cmds='chmod 644 $oldlib'
15474old_postuninstall_cmds=
15475
15476if test -n "$RANLIB"; then
15477 case $host_os in
15478 openbsd*)
15479 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
15480 ;;
15481 *)
15482 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
15483 ;;
15484 esac
15485 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
15486fi
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521# If no C compiler was specified, use CC.
15522LTCC=${LTCC-"$CC"}
15523
15524# If no C compiler flags were specified, use CFLAGS.
15525LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
15526
15527# Allow CC to be a program name with arguments.
15528compiler=$CC
15529
15530
15531# Check for command to grab the raw symbol name followed by C symbol from nm.
15532echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
15533echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
15534if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
15535 echo $ECHO_N "(cached) $ECHO_C" >&6
15536else
15537
15538# These are sane defaults that work on at least a few old systems.
15539# [They come from Ultrix. What could be older than Ultrix?!! ;)]
15540
15541# Character class describing NM global symbol codes.
15542symcode='[BCDEGRST]'
15543
15544# Regexp to match symbols that can be accessed directly from C.
15545sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
15546
15547# Define system-specific variables.
15548case $host_os in
15549aix*)
15550 symcode='[BCDT]'
15551 ;;
15552cygwin* | mingw* | pw32*)
15553 symcode='[ABCDGISTW]'
15554 ;;
15555hpux*)
15556 if test "$host_cpu" = ia64; then
15557 symcode='[ABCDEGRST]'
15558 fi
15559 ;;
15560irix* | nonstopux*)
15561 symcode='[BCDEGRST]'
15562 ;;
15563osf*)
15564 symcode='[BCDEGQRST]'
15565 ;;
15566solaris*)
15567 symcode='[BDRT]'
15568 ;;
15569sco3.2v5*)
15570 symcode='[DT]'
15571 ;;
15572sysv4.2uw2*)
15573 symcode='[DT]'
15574 ;;
15575sysv5* | sco5v6* | unixware* | OpenUNIX*)
15576 symcode='[ABDT]'
15577 ;;
15578sysv4)
15579 symcode='[DFNSTU]'
15580 ;;
15581esac
15582
15583# If we're using GNU nm, then use its standard symbol codes.
15584case `$NM -V 2>&1` in
15585*GNU* | *'with BFD'*)
15586 symcode='[ABCDGIRSTW]' ;;
15587esac
15588
15589# Transform an extracted symbol line into a proper C declaration.
15590# Some systems (esp. on ia64) link data and code symbols differently,
15591# so use this general approach.
15592lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
15593
15594# Transform an extracted symbol line into symbol name and symbol address
15595lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
15596
15597# Handle CRLF in mingw tool chain
15598opt_cr=
15599case $build_os in
15600mingw*)
15601 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
15602 ;;
15603esac
15604
15605# Try without a prefix underscore, then with it.
15606for ac_symprfx in "" "_"; do
15607
15608 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
15609 symxfrm="\\1 $ac_symprfx\\2 \\2"
15610
15611 # Write the raw and C identifiers.
15612 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
15613 # Fake it for dumpbin and say T for any non-static function
15614 # and D for any global variable.
15615 # Also find C++ and __fastcall symbols from MSVC++,
15616 # which start with @ or ?.
15617 lt_cv_sys_global_symbol_pipe="$AWK '"\
15618" {last_section=section; section=\$ 3};"\
15619" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
15620" \$ 0!~/External *\|/{next};"\
15621" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
15622" {if(hide[section]) next};"\
15623" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
15624" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
15625" s[1]~/^[@?]/{print s[1], s[1]; next};"\
15626" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
15627" ' prfx=^$ac_symprfx"
15628 else
15629 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
15630 fi
15631
15632 # Check to see that the pipe works correctly.
15633 pipe_works=no
15634
15635 rm -f conftest*
15636 cat > conftest.$ac_ext <<_LT_EOF
15637#ifdef __cplusplus
15638extern "C" {
15639#endif
15640char nm_test_var;
15641void nm_test_func(void);
15642void nm_test_func(void){}
15643#ifdef __cplusplus
15644}
15645#endif
15646int main(){nm_test_var='a';nm_test_func();return(0);}
15647_LT_EOF
15648
15649 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15650 (eval $ac_compile) 2>&5
15651 ac_status=$?
15652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15653 (exit $ac_status); }; then
15654 # Now try to grab the symbols.
15655 nlist=conftest.nm
15656 if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
15657 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
15658 ac_status=$?
15659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15660 (exit $ac_status); } && test -s "$nlist"; then
15661 # Try sorting and uniquifying the output.
15662 if sort "$nlist" | uniq > "$nlist"T; then
15663 mv -f "$nlist"T "$nlist"
15664 else
15665 rm -f "$nlist"T
15666 fi
15667
15668 # Make sure that we snagged all the symbols we need.
15669 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
15670 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
15671 cat <<_LT_EOF > conftest.$ac_ext
15672#ifdef __cplusplus
15673extern "C" {
15674#endif
15675
15676_LT_EOF
15677 # Now generate the symbol file.
15678 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
15679
15680 cat <<_LT_EOF >> conftest.$ac_ext
15681
15682/* The mapping between symbol names and symbols. */
15683const struct {
15684 const char *name;
15685 void *address;
15686}
15687lt__PROGRAM__LTX_preloaded_symbols[] =
15688{
15689 { "@PROGRAM@", (void *) 0 },
15690_LT_EOF
15691 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
15692 cat <<\_LT_EOF >> conftest.$ac_ext
15693 {0, (void *) 0}
15694};
15695
15696/* This works around a problem in FreeBSD linker */
15697#ifdef FREEBSD_WORKAROUND
15698static const void *lt_preloaded_setup() {
15699 return lt__PROGRAM__LTX_preloaded_symbols;
15700}
15701#endif
15702
15703#ifdef __cplusplus
15704}
15705#endif
15706_LT_EOF
15707 # Now try linking the two files.
15708 mv conftest.$ac_objext conftstm.$ac_objext
15709 lt_save_LIBS="$LIBS"
15710 lt_save_CFLAGS="$CFLAGS"
15711 LIBS="conftstm.$ac_objext"
15712 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
15713 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15714 (eval $ac_link) 2>&5
15715 ac_status=$?
15716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15717 (exit $ac_status); } && test -s conftest${ac_exeext}; then
15718 pipe_works=yes
15719 fi
15720 LIBS="$lt_save_LIBS"
15721 CFLAGS="$lt_save_CFLAGS"
15722 else
15723 echo "cannot find nm_test_func in $nlist" >&5
15724 fi
15725 else
15726 echo "cannot find nm_test_var in $nlist" >&5
15727 fi
15728 else
15729 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
15730 fi
15731 else
15732 echo "$progname: failed program was:" >&5
15733 cat conftest.$ac_ext >&5
15734 fi
15735 rm -f conftest* conftst*
15736
15737 # Do not use the global_symbol_pipe unless it works.
15738 if test "$pipe_works" = yes; then
15739 break
15740 else
15741 lt_cv_sys_global_symbol_pipe=
15742 fi
15743done
15744
15745fi
15746
15747if test -z "$lt_cv_sys_global_symbol_pipe"; then
15748 lt_cv_sys_global_symbol_to_cdecl=
15749fi
15750if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
15751 echo "$as_me:$LINENO: result: failed" >&5
15752echo "${ECHO_T}failed" >&6
15753else
15754 echo "$as_me:$LINENO: result: ok" >&5
15755echo "${ECHO_T}ok" >&6
15756fi
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
15775if test "${enable_libtool_lock+set}" = set; then
15776 enableval="$enable_libtool_lock"
15777
15778fi;
15779test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
15780
15781# Some flags need to be propagated to the compiler or linker for good
15782# libtool support.
15783case $host in
15784ia64-*-hpux*)
15785 # Find out which ABI we are using.
15786 echo 'int i;' > conftest.$ac_ext
15787 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15788 (eval $ac_compile) 2>&5
15789 ac_status=$?
15790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15791 (exit $ac_status); }; then
15792 case `/usr/bin/file conftest.$ac_objext` in
15793 *ELF-32*)
15794 HPUX_IA64_MODE="32"
15795 ;;
15796 *ELF-64*)
15797 HPUX_IA64_MODE="64"
15798 ;;
15799 esac
15800 fi
15801 rm -rf conftest*
15802 ;;
15803*-*-irix6*)
15804 # Find out which ABI we are using.
f8bf9252 15805 echo '#line 15805 "configure"' > conftest.$ac_ext
da0f6381
PB
15806 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15807 (eval $ac_compile) 2>&5
15808 ac_status=$?
15809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15810 (exit $ac_status); }; then
15811 if test "$lt_cv_prog_gnu_ld" = yes; then
15812 case `/usr/bin/file conftest.$ac_objext` in
15813 *32-bit*)
15814 LD="${LD-ld} -melf32bsmip"
15815 ;;
15816 *N32*)
15817 LD="${LD-ld} -melf32bmipn32"
15818 ;;
15819 *64-bit*)
15820 LD="${LD-ld} -melf64bmip"
15821 ;;
15822 esac
15823 else
15824 case `/usr/bin/file conftest.$ac_objext` in
15825 *32-bit*)
15826 LD="${LD-ld} -32"
15827 ;;
15828 *N32*)
15829 LD="${LD-ld} -n32"
15830 ;;
15831 *64-bit*)
15832 LD="${LD-ld} -64"
15833 ;;
15834 esac
15835 fi
15836 fi
15837 rm -rf conftest*
15838 ;;
15839
15840x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
15841s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
15842 # Find out which ABI we are using.
15843 echo 'int i;' > conftest.$ac_ext
15844 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15845 (eval $ac_compile) 2>&5
15846 ac_status=$?
15847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15848 (exit $ac_status); }; then
15849 case `/usr/bin/file conftest.o` in
15850 *32-bit*)
15851 case $host in
15852 x86_64-*kfreebsd*-gnu)
15853 LD="${LD-ld} -m elf_i386_fbsd"
15854 ;;
15855 x86_64-*linux*)
15856 LD="${LD-ld} -m elf_i386"
15857 ;;
15858 ppc64-*linux*|powerpc64-*linux*)
15859 LD="${LD-ld} -m elf32ppclinux"
15860 ;;
15861 s390x-*linux*)
15862 LD="${LD-ld} -m elf_s390"
15863 ;;
15864 sparc64-*linux*)
15865 LD="${LD-ld} -m elf32_sparc"
15866 ;;
15867 esac
15868 ;;
15869 *64-bit*)
15870 case $host in
15871 x86_64-*kfreebsd*-gnu)
15872 LD="${LD-ld} -m elf_x86_64_fbsd"
15873 ;;
15874 x86_64-*linux*)
15875 LD="${LD-ld} -m elf_x86_64"
15876 ;;
15877 ppc*-*linux*|powerpc*-*linux*)
15878 LD="${LD-ld} -m elf64ppc"
15879 ;;
15880 s390*-*linux*|s390*-*tpf*)
15881 LD="${LD-ld} -m elf64_s390"
15882 ;;
15883 sparc*-*linux*)
15884 LD="${LD-ld} -m elf64_sparc"
15885 ;;
15886 esac
15887 ;;
15888 esac
15889 fi
15890 rm -rf conftest*
15891 ;;
15892
15893*-*-sco3.2v5*)
15894 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
15895 SAVE_CFLAGS="$CFLAGS"
15896 CFLAGS="$CFLAGS -belf"
15897 echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
15898echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
15899if test "${lt_cv_cc_needs_belf+set}" = set; then
15900 echo $ECHO_N "(cached) $ECHO_C" >&6
15901else
15902 ac_ext=c
15903ac_cpp='$CPP $CPPFLAGS'
15904ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15905ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15906ac_compiler_gnu=$ac_cv_c_compiler_gnu
15907
15908 cat >conftest.$ac_ext <<_ACEOF
15909/* confdefs.h. */
15910_ACEOF
15911cat confdefs.h >>conftest.$ac_ext
15912cat >>conftest.$ac_ext <<_ACEOF
15913/* end confdefs.h. */
15914
15915int
15916main ()
15917{
15918
15919 ;
15920 return 0;
15921}
15922_ACEOF
15923rm -f conftest.$ac_objext conftest$ac_exeext
15924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15925 (eval $ac_link) 2>conftest.er1
15926 ac_status=$?
15927 grep -v '^ *+' conftest.er1 >conftest.err
15928 rm -f conftest.er1
15929 cat conftest.err >&5
15930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15931 (exit $ac_status); } &&
15932 { ac_try='test -z "$ac_c_werror_flag"
15933 || test ! -s conftest.err'
15934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15935 (eval $ac_try) 2>&5
15936 ac_status=$?
15937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15938 (exit $ac_status); }; } &&
15939 { ac_try='test -s conftest$ac_exeext'
15940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15941 (eval $ac_try) 2>&5
15942 ac_status=$?
15943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15944 (exit $ac_status); }; }; then
15945 lt_cv_cc_needs_belf=yes
15946else
15947 echo "$as_me: failed program was:" >&5
15948sed 's/^/| /' conftest.$ac_ext >&5
15949
15950lt_cv_cc_needs_belf=no
15951fi
15952rm -f conftest.err conftest.$ac_objext \
15953 conftest$ac_exeext conftest.$ac_ext
15954 ac_ext=c
15955ac_cpp='$CPP $CPPFLAGS'
15956ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15957ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15958ac_compiler_gnu=$ac_cv_c_compiler_gnu
15959
15960fi
15961echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
15962echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
15963 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
15964 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
15965 CFLAGS="$SAVE_CFLAGS"
15966 fi
15967 ;;
15968sparc*-*solaris*)
15969 # Find out which ABI we are using.
15970 echo 'int i;' > conftest.$ac_ext
15971 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15972 (eval $ac_compile) 2>&5
15973 ac_status=$?
15974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15975 (exit $ac_status); }; then
15976 case `/usr/bin/file conftest.o` in
15977 *64-bit*)
15978 case $lt_cv_prog_gnu_ld in
15979 yes*) LD="${LD-ld} -m elf64_sparc" ;;
15980 *) LD="${LD-ld} -64" ;;
15981 esac
15982 ;;
15983 esac
15984 fi
15985 rm -rf conftest*
15986 ;;
15987esac
15988
15989need_locks="$enable_libtool_lock"
15990
15991
15992for ac_header in dlfcn.h
15993do
15994as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15995echo "$as_me:$LINENO: checking for $ac_header" >&5
15996echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15997if eval "test \"\${$as_ac_Header+set}\" = set"; then
15998 echo $ECHO_N "(cached) $ECHO_C" >&6
15999else
16000 cat >conftest.$ac_ext <<_ACEOF
16001/* confdefs.h. */
16002_ACEOF
16003cat confdefs.h >>conftest.$ac_ext
16004cat >>conftest.$ac_ext <<_ACEOF
16005/* end confdefs.h. */
16006#include <$ac_header>
16007_ACEOF
16008if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16009 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16010 ac_status=$?
16011 grep -v '^ *+' conftest.er1 >conftest.err
16012 rm -f conftest.er1
16013 cat conftest.err >&5
16014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16015 (exit $ac_status); } >/dev/null; then
16016 if test -s conftest.err; then
16017 ac_cpp_err=$ac_c_preproc_warn_flag
16018 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16019 else
16020 ac_cpp_err=
16021 fi
16022else
16023 ac_cpp_err=yes
16024fi
16025if test -z "$ac_cpp_err"; then
16026 eval "$as_ac_Header=yes"
16027else
16028 echo "$as_me: failed program was:" >&5
16029sed 's/^/| /' conftest.$ac_ext >&5
16030
16031 eval "$as_ac_Header=no"
16032fi
16033rm -f conftest.err conftest.$ac_ext
16034fi
16035echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16036echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16037if test `eval echo '${'$as_ac_Header'}'` = yes; then
16038 cat >>confdefs.h <<_ACEOF
16039#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16040_ACEOF
16041
16042fi
16043done
16044
16045
16046
16047# This can be used to rebuild libtool when needed
16048LIBTOOL_DEPS="$ltmain"
16049
16050# Always use our own libtool.
16051LIBTOOL='$(SHELL) $(top_builddir)/libtool'
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077test -z "$LN_S" && LN_S="ln -s"
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092if test -n "${ZSH_VERSION+set}" ; then
16093 setopt NO_GLOB_SUBST
16094fi
16095
16096echo "$as_me:$LINENO: checking for objdir" >&5
16097echo $ECHO_N "checking for objdir... $ECHO_C" >&6
16098if test "${lt_cv_objdir+set}" = set; then
16099 echo $ECHO_N "(cached) $ECHO_C" >&6
16100else
16101 rm -f .libs 2>/dev/null
16102mkdir .libs 2>/dev/null
16103if test -d .libs; then
16104 lt_cv_objdir=.libs
16105else
16106 # MS-DOS does not allow filenames that begin with a dot.
16107 lt_cv_objdir=_libs
16108fi
16109rmdir .libs 2>/dev/null
16110fi
16111echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
16112echo "${ECHO_T}$lt_cv_objdir" >&6
16113objdir=$lt_cv_objdir
16114
16115
16116
16117
16118
16119cat >>confdefs.h <<_ACEOF
16120#define LT_OBJDIR "$lt_cv_objdir/"
16121_ACEOF
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139case $host_os in
16140aix3*)
16141 # AIX sometimes has problems with the GCC collect2 program. For some
16142 # reason, if we set the COLLECT_NAMES environment variable, the problems
16143 # vanish in a puff of smoke.
16144 if test "X${COLLECT_NAMES+set}" != Xset; then
16145 COLLECT_NAMES=
16146 export COLLECT_NAMES
16147 fi
16148 ;;
16149esac
16150
16151# Sed substitution that helps us do robust quoting. It backslashifies
16152# metacharacters that are still active within double-quoted strings.
16153sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
16154
16155# Same as above, but do not quote variable references.
16156double_quote_subst='s/\(["`\\]\)/\\\1/g'
16157
16158# Sed substitution to delay expansion of an escaped shell variable in a
16159# double_quote_subst'ed string.
16160delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
16161
16162# Sed substitution to delay expansion of an escaped single quote.
16163delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
16164
16165# Sed substitution to avoid accidental globbing in evaled expressions
16166no_glob_subst='s/\*/\\\*/g'
16167
16168# Global variables:
16169ofile=libtool
16170can_build_shared=yes
16171
16172# All known linkers require a `.a' archive for static linking (except MSVC,
16173# which needs '.lib').
16174libext=a
16175
16176with_gnu_ld="$lt_cv_prog_gnu_ld"
16177
16178old_CC="$CC"
16179old_CFLAGS="$CFLAGS"
16180
16181# Set sane defaults for various variables
16182test -z "$CC" && CC=cc
16183test -z "$LTCC" && LTCC=$CC
16184test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
16185test -z "$LD" && LD=ld
16186test -z "$ac_objext" && ac_objext=o
16187
16188for cc_temp in $compiler""; do
16189 case $cc_temp in
16190 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
16191 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
16192 \-*) ;;
16193 *) break;;
16194 esac
16195done
16196cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
16197
16198
16199# Only perform the check for file, if the check method requires it
16200test -z "$MAGIC_CMD" && MAGIC_CMD=file
16201case $deplibs_check_method in
16202file_magic*)
16203 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
16204 echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
16205echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
16206if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
16207 echo $ECHO_N "(cached) $ECHO_C" >&6
16208else
16209 case $MAGIC_CMD in
16210[\\/*] | ?:[\\/]*)
16211 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
16212 ;;
16213*)
16214 lt_save_MAGIC_CMD="$MAGIC_CMD"
16215 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16216 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
16217 for ac_dir in $ac_dummy; do
16218 IFS="$lt_save_ifs"
16219 test -z "$ac_dir" && ac_dir=.
16220 if test -f $ac_dir/${ac_tool_prefix}file; then
16221 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
16222 if test -n "$file_magic_test_file"; then
16223 case $deplibs_check_method in
16224 "file_magic "*)
16225 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
16226 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16227 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
16228 $EGREP "$file_magic_regex" > /dev/null; then
16229 :
16230 else
16231 cat <<_LT_EOF 1>&2
16232
16233*** Warning: the command libtool uses to detect shared libraries,
16234*** $file_magic_cmd, produces output that libtool cannot recognize.
16235*** The result is that libtool may fail to recognize shared libraries
16236*** as such. This will affect the creation of libtool libraries that
16237*** depend on shared libraries, but programs linked with such libtool
16238*** libraries will work regardless of this problem. Nevertheless, you
16239*** may want to report the problem to your system manager and/or to
16240*** bug-libtool@gnu.org
16241
16242_LT_EOF
16243 fi ;;
16244 esac
16245 fi
16246 break
16247 fi
16248 done
16249 IFS="$lt_save_ifs"
16250 MAGIC_CMD="$lt_save_MAGIC_CMD"
16251 ;;
16252esac
16253fi
16254
16255MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16256if test -n "$MAGIC_CMD"; then
16257 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
16258echo "${ECHO_T}$MAGIC_CMD" >&6
16259else
16260 echo "$as_me:$LINENO: result: no" >&5
16261echo "${ECHO_T}no" >&6
16262fi
16263
16264
16265
16266
16267
16268if test -z "$lt_cv_path_MAGIC_CMD"; then
16269 if test -n "$ac_tool_prefix"; then
16270 echo "$as_me:$LINENO: checking for file" >&5
16271echo $ECHO_N "checking for file... $ECHO_C" >&6
16272if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
16273 echo $ECHO_N "(cached) $ECHO_C" >&6
16274else
16275 case $MAGIC_CMD in
16276[\\/*] | ?:[\\/]*)
16277 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
16278 ;;
16279*)
16280 lt_save_MAGIC_CMD="$MAGIC_CMD"
16281 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16282 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
16283 for ac_dir in $ac_dummy; do
16284 IFS="$lt_save_ifs"
16285 test -z "$ac_dir" && ac_dir=.
16286 if test -f $ac_dir/file; then
16287 lt_cv_path_MAGIC_CMD="$ac_dir/file"
16288 if test -n "$file_magic_test_file"; then
16289 case $deplibs_check_method in
16290 "file_magic "*)
16291 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
16292 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16293 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
16294 $EGREP "$file_magic_regex" > /dev/null; then
16295 :
16296 else
16297 cat <<_LT_EOF 1>&2
16298
16299*** Warning: the command libtool uses to detect shared libraries,
16300*** $file_magic_cmd, produces output that libtool cannot recognize.
16301*** The result is that libtool may fail to recognize shared libraries
16302*** as such. This will affect the creation of libtool libraries that
16303*** depend on shared libraries, but programs linked with such libtool
16304*** libraries will work regardless of this problem. Nevertheless, you
16305*** may want to report the problem to your system manager and/or to
16306*** bug-libtool@gnu.org
16307
16308_LT_EOF
16309 fi ;;
16310 esac
16311 fi
16312 break
16313 fi
16314 done
16315 IFS="$lt_save_ifs"
16316 MAGIC_CMD="$lt_save_MAGIC_CMD"
16317 ;;
16318esac
16319fi
16320
16321MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16322if test -n "$MAGIC_CMD"; then
16323 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
16324echo "${ECHO_T}$MAGIC_CMD" >&6
16325else
16326 echo "$as_me:$LINENO: result: no" >&5
16327echo "${ECHO_T}no" >&6
16328fi
16329
16330
16331 else
16332 MAGIC_CMD=:
16333 fi
16334fi
16335
16336 fi
16337 ;;
16338esac
16339
16340# Use C for the default configuration in the libtool script
16341
16342lt_save_CC="$CC"
16343ac_ext=c
16344ac_cpp='$CPP $CPPFLAGS'
16345ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16346ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16347ac_compiler_gnu=$ac_cv_c_compiler_gnu
16348
16349
16350# Source file extension for C test sources.
16351ac_ext=c
16352
16353# Object file extension for compiled C test sources.
16354objext=o
16355objext=$objext
16356
16357# Code to be used in simple compile tests
16358lt_simple_compile_test_code="int some_variable = 0;"
16359
16360# Code to be used in simple link tests
16361lt_simple_link_test_code='int main(){return(0);}'
16362
16363
16364
16365
16366
16367
16368
16369# If no C compiler was specified, use CC.
16370LTCC=${LTCC-"$CC"}
16371
16372# If no C compiler flags were specified, use CFLAGS.
16373LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
16374
16375# Allow CC to be a program name with arguments.
16376compiler=$CC
16377
16378# Save the default compiler, since it gets overwritten when the other
16379# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
16380compiler_DEFAULT=$CC
16381
16382# save warnings/boilerplate of simple test code
16383ac_outfile=conftest.$ac_objext
16384echo "$lt_simple_compile_test_code" >conftest.$ac_ext
16385eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
16386_lt_compiler_boilerplate=`cat conftest.err`
16387$RM conftest*
16388
16389ac_outfile=conftest.$ac_objext
16390echo "$lt_simple_link_test_code" >conftest.$ac_ext
16391eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
16392_lt_linker_boilerplate=`cat conftest.err`
16393$RM conftest*
16394
16395
16396## CAVEAT EMPTOR:
16397## There is no encapsulation within the following macros, do not change
16398## the running order or otherwise move them around unless you know exactly
16399## what you are doing...
16400if test -n "$compiler"; then
16401
16402lt_prog_compiler_no_builtin_flag=
16403
16404if test "$GCC" = yes; then
16405 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
16406
16407 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
16408echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
16409if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
16410 echo $ECHO_N "(cached) $ECHO_C" >&6
16411else
16412 lt_cv_prog_compiler_rtti_exceptions=no
16413 ac_outfile=conftest.$ac_objext
16414 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16415 lt_compiler_flag="-fno-rtti -fno-exceptions"
16416 # Insert the option either (1) after the last *FLAGS variable, or
16417 # (2) before a word containing "conftest.", or (3) at the end.
16418 # Note that $ac_compile itself does not contain backslashes and begins
16419 # with a dollar sign (not a hyphen), so the echo should work correctly.
16420 # The option is referenced via a variable to avoid confusing sed.
16421 lt_compile=`echo "$ac_compile" | $SED \
16422 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16423 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16424 -e 's:$: $lt_compiler_flag:'`
f8bf9252 16425 (eval echo "\"\$as_me:16425: $lt_compile\"" >&5)
da0f6381
PB
16426 (eval "$lt_compile" 2>conftest.err)
16427 ac_status=$?
16428 cat conftest.err >&5
f8bf9252 16429 echo "$as_me:16429: \$? = $ac_status" >&5
da0f6381
PB
16430 if (exit $ac_status) && test -s "$ac_outfile"; then
16431 # The compiler can only warn and ignore the option if not recognized
16432 # So say no if there are warnings other than the usual output.
16433 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
16434 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16435 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16436 lt_cv_prog_compiler_rtti_exceptions=yes
16437 fi
16438 fi
16439 $RM conftest*
16440
16441fi
16442echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
16443echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
16444
16445if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
16446 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
16447else
16448 :
16449fi
16450
16451fi
16452
16453
16454
16455
16456
16457
16458 lt_prog_compiler_wl=
16459lt_prog_compiler_pic=
16460lt_prog_compiler_static=
16461
16462echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
16463echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
16464
16465 if test "$GCC" = yes; then
16466 lt_prog_compiler_wl='-Wl,'
16467 lt_prog_compiler_static='-static'
16468
16469 case $host_os in
16470 aix*)
16471 # All AIX code is PIC.
16472 if test "$host_cpu" = ia64; then
16473 # AIX 5 now supports IA64 processor
16474 lt_prog_compiler_static='-Bstatic'
16475 fi
16476 ;;
16477
16478 amigaos*)
16479 if test "$host_cpu" = m68k; then
16480 # FIXME: we need at least 68020 code to build shared libraries, but
16481 # adding the `-m68020' flag to GCC prevents building anything better,
16482 # like `-m68040'.
16483 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
16484 fi
16485 ;;
16486
16487 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
16488 # PIC is the default for these OSes.
16489 ;;
16490
16491 mingw* | cygwin* | pw32* | os2*)
16492 # This hack is so that the source file can tell whether it is being
16493 # built for inclusion in a dll (and should export symbols for example).
16494 # Although the cygwin gcc ignores -fPIC, still need this for old-style
16495 # (--disable-auto-import) libraries
16496 lt_prog_compiler_pic='-DDLL_EXPORT'
16497 ;;
16498
16499 darwin* | rhapsody*)
16500 # PIC is the default on this platform
16501 # Common symbols not allowed in MH_DYLIB files
16502 lt_prog_compiler_pic='-fno-common'
16503 ;;
16504
16505 hpux*)
16506 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16507 # not for PA HP-UX.
16508 case $host_cpu in
16509 hppa*64*|ia64*)
16510 # +Z the default
16511 ;;
16512 *)
16513 lt_prog_compiler_pic='-fPIC'
16514 ;;
16515 esac
16516 ;;
16517
16518 interix[3-9]*)
16519 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
16520 # Instead, we relocate shared libraries at runtime.
16521 ;;
16522
16523 msdosdjgpp*)
16524 # Just because we use GCC doesn't mean we suddenly get shared libraries
16525 # on systems that don't support them.
16526 lt_prog_compiler_can_build_shared=no
16527 enable_shared=no
16528 ;;
16529
16530 *nto* | *qnx*)
16531 # QNX uses GNU C++, but need to define -shared option too, otherwise
16532 # it will coredump.
16533 lt_prog_compiler_pic='-fPIC -shared'
16534 ;;
16535
16536 sysv4*MP*)
16537 if test -d /usr/nec; then
16538 lt_prog_compiler_pic=-Kconform_pic
16539 fi
16540 ;;
16541
16542 *)
16543 lt_prog_compiler_pic='-fPIC'
16544 ;;
16545 esac
16546 else
16547 # PORTME Check for flag to pass linker flags through the system compiler.
16548 case $host_os in
16549 aix*)
16550 lt_prog_compiler_wl='-Wl,'
16551 if test "$host_cpu" = ia64; then
16552 # AIX 5 now supports IA64 processor
16553 lt_prog_compiler_static='-Bstatic'
16554 else
16555 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
16556 fi
16557 ;;
16558 darwin*)
16559 # PIC is the default on this platform
16560 # Common symbols not allowed in MH_DYLIB files
16561 case $cc_basename in
16562 xlc*)
16563 lt_prog_compiler_pic='-qnocommon'
16564 lt_prog_compiler_wl='-Wl,'
16565 ;;
16566 esac
16567 ;;
16568
16569 mingw* | cygwin* | pw32* | os2*)
16570 # This hack is so that the source file can tell whether it is being
16571 # built for inclusion in a dll (and should export symbols for example).
16572 lt_prog_compiler_pic='-DDLL_EXPORT'
16573 ;;
16574
16575 hpux9* | hpux10* | hpux11*)
16576 lt_prog_compiler_wl='-Wl,'
16577 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16578 # not for PA HP-UX.
16579 case $host_cpu in
16580 hppa*64*|ia64*)
16581 # +Z the default
16582 ;;
16583 *)
16584 lt_prog_compiler_pic='+Z'
16585 ;;
16586 esac
16587 # Is there a better lt_prog_compiler_static that works with the bundled CC?
16588 lt_prog_compiler_static='${wl}-a ${wl}archive'
16589 ;;
16590
16591 irix5* | irix6* | nonstopux*)
16592 lt_prog_compiler_wl='-Wl,'
16593 # PIC (with -KPIC) is the default.
16594 lt_prog_compiler_static='-non_shared'
16595 ;;
16596
16597 linux* | k*bsd*-gnu)
16598 case $cc_basename in
16599 icc* | ecc*)
16600 lt_prog_compiler_wl='-Wl,'
16601 lt_prog_compiler_pic='-KPIC'
16602 lt_prog_compiler_static='-static'
16603 ;;
16604 pgcc* | pgf77* | pgf90* | pgf95*)
16605 # Portland Group compilers (*not* the Pentium gcc compiler,
16606 # which looks to be a dead project)
16607 lt_prog_compiler_wl='-Wl,'
16608 lt_prog_compiler_pic='-fpic'
16609 lt_prog_compiler_static='-Bstatic'
16610 ;;
16611 ccc*)
16612 lt_prog_compiler_wl='-Wl,'
16613 # All Alpha code is PIC.
16614 lt_prog_compiler_static='-non_shared'
16615 ;;
16616 *)
16617 case `$CC -V 2>&1 | sed 5q` in
16618 *Sun\ C*)
16619 # Sun C 5.9
16620 lt_prog_compiler_pic='-KPIC'
16621 lt_prog_compiler_static='-Bstatic'
16622 lt_prog_compiler_wl='-Wl,'
16623 ;;
16624 *Sun\ F*)
16625 # Sun Fortran 8.3 passes all unrecognized flags to the linker
16626 lt_prog_compiler_pic='-KPIC'
16627 lt_prog_compiler_static='-Bstatic'
16628 lt_prog_compiler_wl=''
16629 ;;
16630 esac
16631 ;;
16632 esac
16633 ;;
16634
16635 newsos6)
16636 lt_prog_compiler_pic='-KPIC'
16637 lt_prog_compiler_static='-Bstatic'
16638 ;;
16639
16640 *nto* | *qnx*)
16641 # QNX uses GNU C++, but need to define -shared option too, otherwise
16642 # it will coredump.
16643 lt_prog_compiler_pic='-fPIC -shared'
16644 ;;
16645
16646 osf3* | osf4* | osf5*)
16647 lt_prog_compiler_wl='-Wl,'
16648 # All OSF/1 code is PIC.
16649 lt_prog_compiler_static='-non_shared'
16650 ;;
16651
16652 rdos*)
16653 lt_prog_compiler_static='-non_shared'
16654 ;;
16655
16656 solaris*)
16657 lt_prog_compiler_pic='-KPIC'
16658 lt_prog_compiler_static='-Bstatic'
16659 case $cc_basename in
16660 f77* | f90* | f95*)
16661 lt_prog_compiler_wl='-Qoption ld ';;
16662 *)
16663 lt_prog_compiler_wl='-Wl,';;
16664 esac
16665 ;;
16666
16667 sunos4*)
16668 lt_prog_compiler_wl='-Qoption ld '
16669 lt_prog_compiler_pic='-PIC'
16670 lt_prog_compiler_static='-Bstatic'
16671 ;;
16672
16673 sysv4 | sysv4.2uw2* | sysv4.3*)
16674 lt_prog_compiler_wl='-Wl,'
16675 lt_prog_compiler_pic='-KPIC'
16676 lt_prog_compiler_static='-Bstatic'
16677 ;;
16678
16679 sysv4*MP*)
16680 if test -d /usr/nec ;then
16681 lt_prog_compiler_pic='-Kconform_pic'
16682 lt_prog_compiler_static='-Bstatic'
16683 fi
16684 ;;
16685
16686 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
16687 lt_prog_compiler_wl='-Wl,'
16688 lt_prog_compiler_pic='-KPIC'
16689 lt_prog_compiler_static='-Bstatic'
16690 ;;
16691
16692 unicos*)
16693 lt_prog_compiler_wl='-Wl,'
16694 lt_prog_compiler_can_build_shared=no
16695 ;;
16696
16697 uts4*)
16698 lt_prog_compiler_pic='-pic'
16699 lt_prog_compiler_static='-Bstatic'
16700 ;;
16701
16702 *)
16703 lt_prog_compiler_can_build_shared=no
16704 ;;
16705 esac
16706 fi
16707
16708case $host_os in
16709 # For platforms which do not support PIC, -DPIC is meaningless:
16710 *djgpp*)
16711 lt_prog_compiler_pic=
16712 ;;
16713 *)
16714 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
16715 ;;
16716esac
16717echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
16718echo "${ECHO_T}$lt_prog_compiler_pic" >&6
16719
16720
16721
16722
16723
16724
16725#
16726# Check to make sure the PIC flag actually works.
16727#
16728if test -n "$lt_prog_compiler_pic"; then
16729 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
16730echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
16731if test "${lt_prog_compiler_pic_works+set}" = set; then
16732 echo $ECHO_N "(cached) $ECHO_C" >&6
16733else
16734 lt_prog_compiler_pic_works=no
16735 ac_outfile=conftest.$ac_objext
16736 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16737 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
16738 # Insert the option either (1) after the last *FLAGS variable, or
16739 # (2) before a word containing "conftest.", or (3) at the end.
16740 # Note that $ac_compile itself does not contain backslashes and begins
16741 # with a dollar sign (not a hyphen), so the echo should work correctly.
16742 # The option is referenced via a variable to avoid confusing sed.
16743 lt_compile=`echo "$ac_compile" | $SED \
16744 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16745 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16746 -e 's:$: $lt_compiler_flag:'`
f8bf9252 16747 (eval echo "\"\$as_me:16747: $lt_compile\"" >&5)
da0f6381
PB
16748 (eval "$lt_compile" 2>conftest.err)
16749 ac_status=$?
16750 cat conftest.err >&5
f8bf9252 16751 echo "$as_me:16751: \$? = $ac_status" >&5
da0f6381
PB
16752 if (exit $ac_status) && test -s "$ac_outfile"; then
16753 # The compiler can only warn and ignore the option if not recognized
16754 # So say no if there are warnings other than the usual output.
16755 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
16756 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16757 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16758 lt_prog_compiler_pic_works=yes
16759 fi
16760 fi
16761 $RM conftest*
16762
16763fi
16764echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
16765echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
16766
16767if test x"$lt_prog_compiler_pic_works" = xyes; then
16768 case $lt_prog_compiler_pic in
16769 "" | " "*) ;;
16770 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
16771 esac
16772else
16773 lt_prog_compiler_pic=
16774 lt_prog_compiler_can_build_shared=no
16775fi
16776
16777fi
16778
16779
16780
16781
16782
16783
16784#
16785# Check to make sure the static flag actually works.
16786#
16787wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
16788echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
16789echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
16790if test "${lt_prog_compiler_static_works+set}" = set; then
16791 echo $ECHO_N "(cached) $ECHO_C" >&6
16792else
16793 lt_prog_compiler_static_works=no
16794 save_LDFLAGS="$LDFLAGS"
16795 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
16796 echo "$lt_simple_link_test_code" > conftest.$ac_ext
16797 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
16798 # The linker can only warn and ignore the option if not recognized
16799 # So say no if there are warnings
16800 if test -s conftest.err; then
16801 # Append any errors to the config.log.
16802 cat conftest.err 1>&5
16803 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
16804 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16805 if diff conftest.exp conftest.er2 >/dev/null; then
16806 lt_prog_compiler_static_works=yes
16807 fi
16808 else
16809 lt_prog_compiler_static_works=yes
16810 fi
16811 fi
16812 $RM conftest*
16813 LDFLAGS="$save_LDFLAGS"
16814
16815fi
16816echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
16817echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
16818
16819if test x"$lt_prog_compiler_static_works" = xyes; then
16820 :
16821else
16822 lt_prog_compiler_static=
16823fi
16824
16825
16826
16827
16828
16829
16830
16831 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
16832echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
16833if test "${lt_cv_prog_compiler_c_o+set}" = set; then
16834 echo $ECHO_N "(cached) $ECHO_C" >&6
16835else
16836 lt_cv_prog_compiler_c_o=no
16837 $RM -r conftest 2>/dev/null
16838 mkdir conftest
16839 cd conftest
16840 mkdir out
16841 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16842
16843 lt_compiler_flag="-o out/conftest2.$ac_objext"
16844 # Insert the option either (1) after the last *FLAGS variable, or
16845 # (2) before a word containing "conftest.", or (3) at the end.
16846 # Note that $ac_compile itself does not contain backslashes and begins
16847 # with a dollar sign (not a hyphen), so the echo should work correctly.
16848 lt_compile=`echo "$ac_compile" | $SED \
16849 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16850 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16851 -e 's:$: $lt_compiler_flag:'`
f8bf9252 16852 (eval echo "\"\$as_me:16852: $lt_compile\"" >&5)
da0f6381
PB
16853 (eval "$lt_compile" 2>out/conftest.err)
16854 ac_status=$?
16855 cat out/conftest.err >&5
f8bf9252 16856 echo "$as_me:16856: \$? = $ac_status" >&5
da0f6381
PB
16857 if (exit $ac_status) && test -s out/conftest2.$ac_objext
16858 then
16859 # The compiler can only warn and ignore the option if not recognized
16860 # So say no if there are warnings
16861 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
16862 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
16863 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
16864 lt_cv_prog_compiler_c_o=yes
16865 fi
16866 fi
16867 chmod u+w . 2>&5
16868 $RM conftest*
16869 # SGI C++ compiler will create directory out/ii_files/ for
16870 # template instantiation
16871 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
16872 $RM out/* && rmdir out
16873 cd ..
16874 $RM -r conftest
16875 $RM conftest*
16876
16877fi
16878echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
16879echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
16880
16881
16882
16883
16884
16885
16886 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
16887echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
16888if test "${lt_cv_prog_compiler_c_o+set}" = set; then
16889 echo $ECHO_N "(cached) $ECHO_C" >&6
16890else
16891 lt_cv_prog_compiler_c_o=no
16892 $RM -r conftest 2>/dev/null
16893 mkdir conftest
16894 cd conftest
16895 mkdir out
16896 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16897
16898 lt_compiler_flag="-o out/conftest2.$ac_objext"
16899 # Insert the option either (1) after the last *FLAGS variable, or
16900 # (2) before a word containing "conftest.", or (3) at the end.
16901 # Note that $ac_compile itself does not contain backslashes and begins
16902 # with a dollar sign (not a hyphen), so the echo should work correctly.
16903 lt_compile=`echo "$ac_compile" | $SED \
16904 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16905 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16906 -e 's:$: $lt_compiler_flag:'`
f8bf9252 16907 (eval echo "\"\$as_me:16907: $lt_compile\"" >&5)
da0f6381
PB
16908 (eval "$lt_compile" 2>out/conftest.err)
16909 ac_status=$?
16910 cat out/conftest.err >&5
f8bf9252 16911 echo "$as_me:16911: \$? = $ac_status" >&5
da0f6381
PB
16912 if (exit $ac_status) && test -s out/conftest2.$ac_objext
16913 then
16914 # The compiler can only warn and ignore the option if not recognized
16915 # So say no if there are warnings
16916 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
16917 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
16918 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
16919 lt_cv_prog_compiler_c_o=yes
16920 fi
16921 fi
16922 chmod u+w . 2>&5
16923 $RM conftest*
16924 # SGI C++ compiler will create directory out/ii_files/ for
16925 # template instantiation
16926 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
16927 $RM out/* && rmdir out
16928 cd ..
16929 $RM -r conftest
16930 $RM conftest*
16931
16932fi
16933echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
16934echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
16935
16936
16937
16938
16939hard_links="nottested"
16940if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
16941 # do not overwrite the value of need_locks provided by the user
16942 echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
16943echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
16944 hard_links=yes
16945 $RM conftest*
16946 ln conftest.a conftest.b 2>/dev/null && hard_links=no
16947 touch conftest.a
16948 ln conftest.a conftest.b 2>&5 || hard_links=no
16949 ln conftest.a conftest.b 2>/dev/null && hard_links=no
16950 echo "$as_me:$LINENO: result: $hard_links" >&5
16951echo "${ECHO_T}$hard_links" >&6
16952 if test "$hard_links" = no; then
16953 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
16954echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
16955 need_locks=warn
16956 fi
16957else
16958 need_locks=no
16959fi
16960
16961
16962
16963
16964
16965
16966 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
16967echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
16968
16969 runpath_var=
16970 allow_undefined_flag=
16971 always_export_symbols=no
16972 archive_cmds=
16973 archive_expsym_cmds=
16974 compiler_needs_object=no
16975 enable_shared_with_static_runtimes=no
16976 export_dynamic_flag_spec=
16977 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
16978 hardcode_automatic=no
16979 hardcode_direct=no
16980 hardcode_direct_absolute=no
16981 hardcode_libdir_flag_spec=
16982 hardcode_libdir_flag_spec_ld=
16983 hardcode_libdir_separator=
16984 hardcode_minus_L=no
16985 hardcode_shlibpath_var=unsupported
16986 inherit_rpath=no
16987 link_all_deplibs=unknown
16988 module_cmds=
16989 module_expsym_cmds=
16990 old_archive_from_new_cmds=
16991 old_archive_from_expsyms_cmds=
16992 thread_safe_flag_spec=
16993 whole_archive_flag_spec=
16994 # include_expsyms should be a list of space-separated symbols to be *always*
16995 # included in the symbol list
16996 include_expsyms=
16997 # exclude_expsyms can be an extended regexp of symbols to exclude
16998 # it will be wrapped by ` (' and `)$', so one must not match beginning or
16999 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
17000 # as well as any symbol that contains `d'.
17001 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
17002 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
17003 # platforms (ab)use it in PIC code, but their linkers get confused if
17004 # the symbol is explicitly referenced. Since portable code cannot
17005 # rely on this symbol name, it's probably fine to never include it in
17006 # preloaded symbol tables.
17007 extract_expsyms_cmds=
17008
17009 case $host_os in
17010 cygwin* | mingw* | pw32*)
17011 # FIXME: the MSVC++ port hasn't been tested in a loooong time
17012 # When not using gcc, we currently assume that we are using
17013 # Microsoft Visual C++.
17014 if test "$GCC" != yes; then
17015 with_gnu_ld=no
17016 fi
17017 ;;
17018 interix*)
17019 # we just hope/assume this is gcc and not c89 (= MSVC++)
17020 with_gnu_ld=yes
17021 ;;
17022 openbsd*)
17023 with_gnu_ld=no
17024 ;;
17025 esac
17026
17027 ld_shlibs=yes
17028 if test "$with_gnu_ld" = yes; then
17029 # If archive_cmds runs LD, not CC, wlarc should be empty
17030 wlarc='${wl}'
17031
17032 # Set some defaults for GNU ld with shared library support. These
17033 # are reset later if shared libraries are not supported. Putting them
17034 # here allows them to be overridden if necessary.
17035 runpath_var=LD_RUN_PATH
17036 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17037 export_dynamic_flag_spec='${wl}--export-dynamic'
17038 # ancient GNU ld didn't support --whole-archive et. al.
17039 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
17040 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
17041 else
17042 whole_archive_flag_spec=
17043 fi
17044 supports_anon_versioning=no
17045 case `$LD -v 2>&1` in
17046 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
17047 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
17048 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
17049 *\ 2.11.*) ;; # other 2.11 versions
17050 *) supports_anon_versioning=yes ;;
17051 esac
17052
17053 # See if GNU ld supports shared libraries.
17054 case $host_os in
17055 aix[3-9]*)
17056 # On AIX/PPC, the GNU linker is very broken
17057 if test "$host_cpu" != ia64; then
17058 ld_shlibs=no
17059 cat <<_LT_EOF 1>&2
17060
17061*** Warning: the GNU linker, at least up to release 2.9.1, is reported
17062*** to be unable to reliably create shared libraries on AIX.
17063*** Therefore, libtool is disabling shared libraries support. If you
17064*** really care for shared libraries, you may want to modify your PATH
17065*** so that a non-GNU linker is found, and then restart.
17066
17067_LT_EOF
17068 fi
17069 ;;
17070
17071 amigaos*)
17072 if test "$host_cpu" = m68k; then
17073 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)'
17074 hardcode_libdir_flag_spec='-L$libdir'
17075 hardcode_minus_L=yes
17076 fi
17077
17078 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
17079 # that the semantics of dynamic libraries on AmigaOS, at least up
17080 # to version 4, is to share data among multiple programs linked
17081 # with the same dynamic library. Since this doesn't match the
17082 # behavior of shared libraries on other platforms, we can't use
17083 # them.
17084 ld_shlibs=no
17085 ;;
17086
17087 beos*)
17088 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17089 allow_undefined_flag=unsupported
17090 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
17091 # support --undefined. This deserves some investigation. FIXME
17092 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17093 else
17094 ld_shlibs=no
17095 fi
17096 ;;
17097
17098 cygwin* | mingw* | pw32*)
17099 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
17100 # as there is no search path for DLLs.
17101 hardcode_libdir_flag_spec='-L$libdir'
17102 allow_undefined_flag=unsupported
17103 always_export_symbols=no
17104 enable_shared_with_static_runtimes=yes
17105 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
17106
17107 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
17108 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17109 # If the export-symbols file already is a .def file (1st line
17110 # is EXPORTS), use it as is; otherwise, prepend...
17111 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
17112 cp $export_symbols $output_objdir/$soname.def;
17113 else
17114 echo EXPORTS > $output_objdir/$soname.def;
17115 cat $export_symbols >> $output_objdir/$soname.def;
17116 fi~
17117 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17118 else
17119 ld_shlibs=no
17120 fi
17121 ;;
17122
17123 interix[3-9]*)
17124 hardcode_direct=no
17125 hardcode_shlibpath_var=no
17126 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
17127 export_dynamic_flag_spec='${wl}-E'
17128 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
17129 # Instead, shared libraries are loaded at an image base (0x10000000 by
17130 # default) and relocated if they conflict, which is a slow very memory
17131 # consuming and fragmenting process. To avoid this, we pick a random,
17132 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
17133 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
17134 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
17135 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'
17136 ;;
17137
17138 gnu* | linux* | tpf* | k*bsd*-gnu)
17139 tmp_diet=no
17140 if test "$host_os" = linux-dietlibc; then
17141 case $cc_basename in
17142 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
17143 esac
17144 fi
17145 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
17146 && test "$tmp_diet" = no
17147 then
17148 tmp_addflag=
17149 case $cc_basename,$host_cpu in
17150 pgcc*) # Portland Group C compiler
17151 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'
17152 tmp_addflag=' $pic_flag'
17153 ;;
17154 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
17155 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'
17156 tmp_addflag=' $pic_flag -Mnomain' ;;
17157 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
17158 tmp_addflag=' -i_dynamic' ;;
17159 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
17160 tmp_addflag=' -i_dynamic -nofor_main' ;;
17161 ifc* | ifort*) # Intel Fortran compiler
17162 tmp_addflag=' -nofor_main' ;;
17163 esac
17164 case `$CC -V 2>&1 | sed 5q` in
17165 *Sun\ C*) # Sun C 5.9
17166 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'
17167 compiler_needs_object=yes
17168 tmp_sharedflag='-G' ;;
17169 *Sun\ F*) # Sun Fortran 8.3
17170 tmp_sharedflag='-G' ;;
17171 *)
17172 tmp_sharedflag='-shared' ;;
17173 esac
17174 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17175
17176 if test "x$supports_anon_versioning" = xyes; then
17177 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
17178 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
17179 echo "local: *; };" >> $output_objdir/$libname.ver~
17180 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
17181 fi
17182 else
17183 ld_shlibs=no
17184 fi
17185 ;;
17186
17187 netbsd*)
17188 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
17189 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
17190 wlarc=
17191 else
17192 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17193 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17194 fi
17195 ;;
17196
17197 solaris*)
17198 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
17199 ld_shlibs=no
17200 cat <<_LT_EOF 1>&2
17201
17202*** Warning: The releases 2.8.* of the GNU linker cannot reliably
17203*** create shared libraries on Solaris systems. Therefore, libtool
17204*** is disabling shared libraries support. We urge you to upgrade GNU
17205*** binutils to release 2.9.1 or newer. Another option is to modify
17206*** your PATH or compiler configuration so that the native linker is
17207*** used, and then restart.
17208
17209_LT_EOF
17210 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17211 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17212 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17213 else
17214 ld_shlibs=no
17215 fi
17216 ;;
17217
17218 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
17219 case `$LD -v 2>&1` in
17220 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
17221 ld_shlibs=no
17222 cat <<_LT_EOF 1>&2
17223
17224*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
17225*** reliably create shared libraries on SCO systems. Therefore, libtool
17226*** is disabling shared libraries support. We urge you to upgrade GNU
17227*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
17228*** your PATH or compiler configuration so that the native linker is
17229*** used, and then restart.
17230
17231_LT_EOF
17232 ;;
17233 *)
17234 # For security reasons, it is highly recommended that you always
17235 # use absolute paths for naming shared libraries, and exclude the
17236 # DT_RUNPATH tag from executables and libraries. But doing so
17237 # requires that you compile everything twice, which is a pain.
17238 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17239 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17240 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17241 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17242 else
17243 ld_shlibs=no
17244 fi
17245 ;;
17246 esac
17247 ;;
17248
17249 sunos4*)
17250 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17251 wlarc=
17252 hardcode_direct=yes
17253 hardcode_shlibpath_var=no
17254 ;;
17255
17256 *)
17257 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17258 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17259 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17260 else
17261 ld_shlibs=no
17262 fi
17263 ;;
17264 esac
17265
17266 if test "$ld_shlibs" = no; then
17267 runpath_var=
17268 hardcode_libdir_flag_spec=
17269 export_dynamic_flag_spec=
17270 whole_archive_flag_spec=
17271 fi
17272 else
17273 # PORTME fill in a description of your system's linker (not GNU ld)
17274 case $host_os in
17275 aix3*)
17276 allow_undefined_flag=unsupported
17277 always_export_symbols=yes
17278 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'
17279 # Note: this linker hardcodes the directories in LIBPATH if there
17280 # are no directories specified by -L.
17281 hardcode_minus_L=yes
17282 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
17283 # Neither direct hardcoding nor static linking is supported with a
17284 # broken collect2.
17285 hardcode_direct=unsupported
17286 fi
17287 ;;
17288
17289 aix[4-9]*)
17290 if test "$host_cpu" = ia64; then
17291 # On IA64, the linker does run time linking by default, so we don't
17292 # have to do anything special.
17293 aix_use_runtimelinking=no
17294 exp_sym_flag='-Bexport'
17295 no_entry_flag=""
17296 else
17297 # If we're using GNU nm, then we don't want the "-C" option.
17298 # -C means demangle to AIX nm, but means don't demangle with GNU nm
17299 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
17300 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'
17301 else
17302 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'
17303 fi
17304 aix_use_runtimelinking=no
17305
17306 # Test if we are trying to use run time linking or normal
17307 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
17308 # need to do runtime linking.
17309 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
17310 for ld_flag in $LDFLAGS; do
17311 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
17312 aix_use_runtimelinking=yes
17313 break
17314 fi
17315 done
17316 ;;
17317 esac
17318
17319 exp_sym_flag='-bexport'
17320 no_entry_flag='-bnoentry'
17321 fi
17322
17323 # When large executables or shared objects are built, AIX ld can
17324 # have problems creating the table of contents. If linking a library
17325 # or program results in "error TOC overflow" add -mminimal-toc to
17326 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
17327 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
17328
17329 archive_cmds=''
17330 hardcode_direct=yes
17331 hardcode_direct_absolute=yes
17332 hardcode_libdir_separator=':'
17333 link_all_deplibs=yes
17334 file_list_spec='${wl}-f,'
17335
17336 if test "$GCC" = yes; then
17337 case $host_os in aix4.[012]|aix4.[012].*)
17338 # We only want to do this on AIX 4.2 and lower, the check
17339 # below for broken collect2 doesn't work under 4.3+
17340 collect2name=`${CC} -print-prog-name=collect2`
17341 if test -f "$collect2name" &&
17342 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
17343 then
17344 # We have reworked collect2
17345 :
17346 else
17347 # We have old collect2
17348 hardcode_direct=unsupported
17349 # It fails to find uninstalled libraries when the uninstalled
17350 # path is not listed in the libpath. Setting hardcode_minus_L
17351 # to unsupported forces relinking
17352 hardcode_minus_L=yes
17353 hardcode_libdir_flag_spec='-L$libdir'
17354 hardcode_libdir_separator=
17355 fi
17356 ;;
17357 esac
17358 shared_flag='-shared'
17359 if test "$aix_use_runtimelinking" = yes; then
17360 shared_flag="$shared_flag "'${wl}-G'
17361 fi
17362 else
17363 # not using gcc
17364 if test "$host_cpu" = ia64; then
17365 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
17366 # chokes on -Wl,-G. The following line is correct:
17367 shared_flag='-G'
17368 else
17369 if test "$aix_use_runtimelinking" = yes; then
17370 shared_flag='${wl}-G'
17371 else
17372 shared_flag='${wl}-bM:SRE'
17373 fi
17374 fi
17375 fi
17376
17377 # It seems that -bexpall does not export symbols beginning with
17378 # underscore (_), so it is better to generate a list of symbols to export.
17379 always_export_symbols=yes
17380 if test "$aix_use_runtimelinking" = yes; then
17381 # Warning - without using the other runtime loading flags (-brtl),
17382 # -berok will link without error, but may produce a broken library.
17383 allow_undefined_flag='-berok'
17384 # Determine the default libpath from the value encoded in an
17385 # empty executable.
17386 cat >conftest.$ac_ext <<_ACEOF
17387/* confdefs.h. */
17388_ACEOF
17389cat confdefs.h >>conftest.$ac_ext
17390cat >>conftest.$ac_ext <<_ACEOF
17391/* end confdefs.h. */
17392
17393int
17394main ()
17395{
17396
17397 ;
17398 return 0;
17399}
17400_ACEOF
17401rm -f conftest.$ac_objext conftest$ac_exeext
17402if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17403 (eval $ac_link) 2>conftest.er1
17404 ac_status=$?
17405 grep -v '^ *+' conftest.er1 >conftest.err
17406 rm -f conftest.er1
17407 cat conftest.err >&5
17408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17409 (exit $ac_status); } &&
17410 { ac_try='test -z "$ac_c_werror_flag"
17411 || test ! -s conftest.err'
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); }; } &&
17417 { ac_try='test -s conftest$ac_exeext'
17418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17419 (eval $ac_try) 2>&5
17420 ac_status=$?
17421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17422 (exit $ac_status); }; }; then
17423
17424lt_aix_libpath_sed='
17425 /Import File Strings/,/^$/ {
17426 /^0/ {
17427 s/^0 *\(.*\)$/\1/
17428 p
17429 }
17430 }'
17431aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17432# Check for a 64-bit object if we didn't find anything.
17433if test -z "$aix_libpath"; then
17434 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17435fi
17436else
17437 echo "$as_me: failed program was:" >&5
17438sed 's/^/| /' conftest.$ac_ext >&5
17439
17440fi
17441rm -f conftest.err conftest.$ac_objext \
17442 conftest$ac_exeext conftest.$ac_ext
17443if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17444
17445 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
17446 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"
17447 else
17448 if test "$host_cpu" = ia64; then
17449 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
17450 allow_undefined_flag="-z nodefs"
17451 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"
17452 else
17453 # Determine the default libpath from the value encoded in an
17454 # empty executable.
17455 cat >conftest.$ac_ext <<_ACEOF
17456/* confdefs.h. */
17457_ACEOF
17458cat confdefs.h >>conftest.$ac_ext
17459cat >>conftest.$ac_ext <<_ACEOF
17460/* end confdefs.h. */
17461
17462int
17463main ()
17464{
17465
17466 ;
17467 return 0;
17468}
17469_ACEOF
17470rm -f conftest.$ac_objext conftest$ac_exeext
17471if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17472 (eval $ac_link) 2>conftest.er1
17473 ac_status=$?
17474 grep -v '^ *+' conftest.er1 >conftest.err
17475 rm -f conftest.er1
17476 cat conftest.err >&5
17477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17478 (exit $ac_status); } &&
17479 { ac_try='test -z "$ac_c_werror_flag"
17480 || test ! -s conftest.err'
17481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17482 (eval $ac_try) 2>&5
17483 ac_status=$?
17484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17485 (exit $ac_status); }; } &&
17486 { ac_try='test -s conftest$ac_exeext'
17487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17488 (eval $ac_try) 2>&5
17489 ac_status=$?
17490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17491 (exit $ac_status); }; }; then
17492
17493lt_aix_libpath_sed='
17494 /Import File Strings/,/^$/ {
17495 /^0/ {
17496 s/^0 *\(.*\)$/\1/
17497 p
17498 }
17499 }'
17500aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17501# Check for a 64-bit object if we didn't find anything.
17502if test -z "$aix_libpath"; then
17503 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17504fi
17505else
17506 echo "$as_me: failed program was:" >&5
17507sed 's/^/| /' conftest.$ac_ext >&5
17508
17509fi
17510rm -f conftest.err conftest.$ac_objext \
17511 conftest$ac_exeext conftest.$ac_ext
17512if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17513
17514 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
17515 # Warning - without using the other run time loading flags,
17516 # -berok will link without error, but may produce a broken library.
17517 no_undefined_flag=' ${wl}-bernotok'
17518 allow_undefined_flag=' ${wl}-berok'
17519 # Exported symbols can be pulled into shared objects from archives
17520 whole_archive_flag_spec='$convenience'
17521 archive_cmds_need_lc=yes
17522 # This is similar to how AIX traditionally builds its shared libraries.
17523 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'
17524 fi
17525 fi
17526 ;;
17527
17528 amigaos*)
17529 if test "$host_cpu" = m68k; then
17530 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)'
17531 hardcode_libdir_flag_spec='-L$libdir'
17532 hardcode_minus_L=yes
17533 fi
17534 # see comment about different semantics on the GNU ld section
17535 ld_shlibs=no
17536 ;;
17537
17538 bsdi[45]*)
17539 export_dynamic_flag_spec=-rdynamic
17540 ;;
17541
17542 cygwin* | mingw* | pw32*)
17543 # When not using gcc, we currently assume that we are using
17544 # Microsoft Visual C++.
17545 # hardcode_libdir_flag_spec is actually meaningless, as there is
17546 # no search path for DLLs.
17547 hardcode_libdir_flag_spec=' '
17548 allow_undefined_flag=unsupported
17549 # Tell ltmain to make .lib files, not .a files.
17550 libext=lib
17551 # Tell ltmain to make .dll files, not .so files.
17552 shrext_cmds=".dll"
17553 # FIXME: Setting linknames here is a bad hack.
17554 archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
17555 # The linker will automatically build a .lib file if we build a DLL.
17556 old_archive_from_new_cmds='true'
17557 # FIXME: Should let the user specify the lib program.
17558 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
17559 fix_srcfile_path='`cygpath -w "$srcfile"`'
17560 enable_shared_with_static_runtimes=yes
17561 ;;
17562
17563 darwin* | rhapsody*)
17564 case $host_os in
17565 rhapsody* | darwin1.[012])
17566 allow_undefined_flag='${wl}-undefined ${wl}suppress'
17567 ;;
17568 *) # Darwin 1.3 on
17569 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
17570 10.[012])
17571 allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
17572 ;;
17573 10.*)
17574 allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
17575 ;;
17576 esac
17577 ;;
17578 esac
17579 archive_cmds_need_lc=no
17580 hardcode_direct=no
17581 hardcode_automatic=yes
17582 hardcode_shlibpath_var=unsupported
17583 whole_archive_flag_spec=''
17584 link_all_deplibs=yes
17585 if test "$GCC" = yes ; then
17586 if test "${lt_cv_apple_cc_single_mod+set}" = set; then
17587 echo $ECHO_N "(cached) $ECHO_C" >&6
17588else
17589 lt_cv_apple_cc_single_mod=no
17590 if test -z "${LT_MULTI_MODULE}"; then
17591 # By default we will add the -single_module flag. You can override
17592 # by either setting the environment variable LT_MULTI_MODULE
17593 # non-empty at configure time, or by adding -multi-module to the
17594 # link flags.
17595 echo "int foo(void){return 1;}" > conftest.c
17596 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
17597 -dynamiclib ${wl}-single_module conftest.c
17598 if test -f libconftest.dylib; then
17599 lt_cv_apple_cc_single_mod=yes
17600 rm libconftest.dylib
17601 fi
17602 rm conftest.$ac_ext
17603 fi
17604fi
17605
17606 output_verbose_link_cmd=echo
17607 if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
17608 archive_cmds='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
17609 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}'
17610 else
17611 archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
17612 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}'
17613 fi
17614 module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
17615 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}'
17616 else
17617 case $cc_basename in
17618 xlc*)
17619 output_verbose_link_cmd=echo
17620 archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
17621 module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
17622 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
17623 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}'
17624 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}'
17625 ;;
17626 *)
17627 ld_shlibs=no
17628 ;;
17629 esac
17630 fi
17631 ;;
17632
17633 dgux*)
17634 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17635 hardcode_libdir_flag_spec='-L$libdir'
17636 hardcode_shlibpath_var=no
17637 ;;
17638
17639 freebsd1*)
17640 ld_shlibs=no
17641 ;;
17642
17643 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
17644 # support. Future versions do this automatically, but an explicit c++rt0.o
17645 # does not break anything, and helps significantly (at the cost of a little
17646 # extra space).
17647 freebsd2.2*)
17648 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
17649 hardcode_libdir_flag_spec='-R$libdir'
17650 hardcode_direct=yes
17651 hardcode_shlibpath_var=no
17652 ;;
17653
17654 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
17655 freebsd2*)
17656 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17657 hardcode_direct=yes
17658 hardcode_minus_L=yes
17659 hardcode_shlibpath_var=no
17660 ;;
17661
17662 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
17663 freebsd* | dragonfly*)
17664 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
17665 hardcode_libdir_flag_spec='-R$libdir'
17666 hardcode_direct=yes
17667 hardcode_shlibpath_var=no
17668 ;;
17669
17670 hpux9*)
17671 if test "$GCC" = yes; then
17672 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'
17673 else
17674 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'
17675 fi
17676 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
17677 hardcode_libdir_separator=:
17678 hardcode_direct=yes
17679
17680 # hardcode_minus_L: Not really in the search PATH,
17681 # but as the default location of the library.
17682 hardcode_minus_L=yes
17683 export_dynamic_flag_spec='${wl}-E'
17684 ;;
17685
17686 hpux10*)
17687 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
17688 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17689 else
17690 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
17691 fi
17692 if test "$with_gnu_ld" = no; then
17693 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
17694 hardcode_libdir_flag_spec_ld='+b $libdir'
17695 hardcode_libdir_separator=:
17696 hardcode_direct=yes
17697 hardcode_direct_absolute=yes
17698 export_dynamic_flag_spec='${wl}-E'
17699 # hardcode_minus_L: Not really in the search PATH,
17700 # but as the default location of the library.
17701 hardcode_minus_L=yes
17702 fi
17703 ;;
17704
17705 hpux11*)
17706 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
17707 case $host_cpu in
17708 hppa*64*)
17709 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17710 ;;
17711 ia64*)
17712 archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17713 ;;
17714 *)
17715 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17716 ;;
17717 esac
17718 else
17719 case $host_cpu in
17720 hppa*64*)
17721 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17722 ;;
17723 ia64*)
17724 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17725 ;;
17726 *)
17727 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17728 ;;
17729 esac
17730 fi
17731 if test "$with_gnu_ld" = no; then
17732 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
17733 hardcode_libdir_separator=:
17734
17735 case $host_cpu in
17736 hppa*64*|ia64*)
17737 hardcode_direct=no
17738 hardcode_shlibpath_var=no
17739 ;;
17740 *)
17741 hardcode_direct=yes
17742 hardcode_direct_absolute=yes
17743 export_dynamic_flag_spec='${wl}-E'
17744
17745 # hardcode_minus_L: Not really in the search PATH,
17746 # but as the default location of the library.
17747 hardcode_minus_L=yes
17748 ;;
17749 esac
17750 fi
17751 ;;
17752
17753 irix5* | irix6* | nonstopux*)
17754 if test "$GCC" = yes; then
17755 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'
17756 # Try to use the -exported_symbol ld option, if it does not
17757 # work, assume that -exports_file does not work either and
17758 # implicitly export all symbols.
17759 save_LDFLAGS="$LDFLAGS"
17760 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
17761 cat >conftest.$ac_ext <<_ACEOF
17762int foo(void) {}
17763_ACEOF
17764rm -f conftest.$ac_objext conftest$ac_exeext
17765if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17766 (eval $ac_link) 2>conftest.er1
17767 ac_status=$?
17768 grep -v '^ *+' conftest.er1 >conftest.err
17769 rm -f conftest.er1
17770 cat conftest.err >&5
17771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17772 (exit $ac_status); } &&
17773 { ac_try='test -z "$ac_c_werror_flag"
17774 || test ! -s conftest.err'
17775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17776 (eval $ac_try) 2>&5
17777 ac_status=$?
17778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17779 (exit $ac_status); }; } &&
17780 { ac_try='test -s conftest$ac_exeext'
17781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17782 (eval $ac_try) 2>&5
17783 ac_status=$?
17784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17785 (exit $ac_status); }; }; then
17786 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'
17787
17788else
17789 echo "$as_me: failed program was:" >&5
17790sed 's/^/| /' conftest.$ac_ext >&5
17791
17792fi
17793rm -f conftest.err conftest.$ac_objext \
17794 conftest$ac_exeext conftest.$ac_ext
17795 LDFLAGS="$save_LDFLAGS"
17796 else
17797 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'
17798 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'
17799 fi
17800 archive_cmds_need_lc='no'
17801 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17802 hardcode_libdir_separator=:
17803 inherit_rpath=yes
17804 link_all_deplibs=yes
17805 ;;
17806
17807 netbsd*)
17808 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
17809 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
17810 else
17811 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
17812 fi
17813 hardcode_libdir_flag_spec='-R$libdir'
17814 hardcode_direct=yes
17815 hardcode_shlibpath_var=no
17816 ;;
17817
17818 newsos6)
17819 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17820 hardcode_direct=yes
17821 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17822 hardcode_libdir_separator=:
17823 hardcode_shlibpath_var=no
17824 ;;
17825
17826 *nto* | *qnx*)
17827 ;;
17828
17829 openbsd*)
17830 hardcode_direct=yes
17831 hardcode_shlibpath_var=no
17832 hardcode_direct_absolute=yes
17833 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
17834 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17835 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
17836 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
17837 export_dynamic_flag_spec='${wl}-E'
17838 else
17839 case $host_os in
17840 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
17841 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17842 hardcode_libdir_flag_spec='-R$libdir'
17843 ;;
17844 *)
17845 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17846 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
17847 ;;
17848 esac
17849 fi
17850 ;;
17851
17852 os2*)
17853 hardcode_libdir_flag_spec='-L$libdir'
17854 hardcode_minus_L=yes
17855 allow_undefined_flag=unsupported
17856 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'
17857 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
17858 ;;
17859
17860 osf3*)
17861 if test "$GCC" = yes; then
17862 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
17863 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'
17864 else
17865 allow_undefined_flag=' -expect_unresolved \*'
17866 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'
17867 fi
17868 archive_cmds_need_lc='no'
17869 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17870 hardcode_libdir_separator=:
17871 ;;
17872
17873 osf4* | osf5*) # as osf3* with the addition of -msym flag
17874 if test "$GCC" = yes; then
17875 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
17876 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'
17877 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17878 else
17879 allow_undefined_flag=' -expect_unresolved \*'
17880 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'
17881 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~
17882 $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'
17883
17884 # Both c and cxx compiler support -rpath directly
17885 hardcode_libdir_flag_spec='-rpath $libdir'
17886 fi
17887 archive_cmds_need_lc='no'
17888 hardcode_libdir_separator=:
17889 ;;
17890
17891 solaris*)
17892 no_undefined_flag=' -z defs'
17893 if test "$GCC" = yes; then
17894 wlarc='${wl}'
17895 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17896 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17897 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
17898 else
17899 case `$CC -V 2>&1` in
17900 *"Compilers 5.0"*)
17901 wlarc=''
17902 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
17903 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17904 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
17905 ;;
17906 *)
17907 wlarc='${wl}'
17908 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
17909 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17910 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
17911 ;;
17912 esac
17913 fi
17914 hardcode_libdir_flag_spec='-R$libdir'
17915 hardcode_shlibpath_var=no
17916 case $host_os in
17917 solaris2.[0-5] | solaris2.[0-5].*) ;;
17918 *)
17919 # The compiler driver will combine and reorder linker options,
17920 # but understands `-z linker_flag'. GCC discards it without `$wl',
17921 # but is careful enough not to reorder.
17922 # Supported since Solaris 2.6 (maybe 2.5.1?)
17923 if test "$GCC" = yes; then
17924 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
17925 else
17926 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
17927 fi
17928 ;;
17929 esac
17930 link_all_deplibs=yes
17931 ;;
17932
17933 sunos4*)
17934 if test "x$host_vendor" = xsequent; then
17935 # Use $CC to link under sequent, because it throws in some extra .o
17936 # files that make .init and .fini sections work.
17937 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
17938 else
17939 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
17940 fi
17941 hardcode_libdir_flag_spec='-L$libdir'
17942 hardcode_direct=yes
17943 hardcode_minus_L=yes
17944 hardcode_shlibpath_var=no
17945 ;;
17946
17947 sysv4)
17948 case $host_vendor in
17949 sni)
17950 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17951 hardcode_direct=yes # is this really true???
17952 ;;
17953 siemens)
17954 ## LD is ld it makes a PLAMLIB
17955 ## CC just makes a GrossModule.
17956 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
17957 reload_cmds='$CC -r -o $output$reload_objs'
17958 hardcode_direct=no
17959 ;;
17960 motorola)
17961 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17962 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
17963 ;;
17964 esac
17965 runpath_var='LD_RUN_PATH'
17966 hardcode_shlibpath_var=no
17967 ;;
17968
17969 sysv4.3*)
17970 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17971 hardcode_shlibpath_var=no
17972 export_dynamic_flag_spec='-Bexport'
17973 ;;
17974
17975 sysv4*MP*)
17976 if test -d /usr/nec; then
17977 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17978 hardcode_shlibpath_var=no
17979 runpath_var=LD_RUN_PATH
17980 hardcode_runpath_var=yes
17981 ld_shlibs=yes
17982 fi
17983 ;;
17984
17985 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
17986 no_undefined_flag='${wl}-z,text'
17987 archive_cmds_need_lc=no
17988 hardcode_shlibpath_var=no
17989 runpath_var='LD_RUN_PATH'
17990
17991 if test "$GCC" = yes; then
17992 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17993 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17994 else
17995 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17996 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17997 fi
17998 ;;
17999
18000 sysv5* | sco3.2v5* | sco5v6*)
18001 # Note: We can NOT use -z defs as we might desire, because we do not
18002 # link with -lc, and that would cause any symbols used from libc to
18003 # always be unresolved, which means just about no library would
18004 # ever link correctly. If we're not using GNU ld we use -z text
18005 # though, which does catch some bad symbols but isn't as heavy-handed
18006 # as -z defs.
18007 no_undefined_flag='${wl}-z,text'
18008 allow_undefined_flag='${wl}-z,nodefs'
18009 archive_cmds_need_lc=no
18010 hardcode_shlibpath_var=no
18011 hardcode_libdir_flag_spec='${wl}-R,$libdir'
18012 hardcode_libdir_separator=':'
18013 link_all_deplibs=yes
18014 export_dynamic_flag_spec='${wl}-Bexport'
18015 runpath_var='LD_RUN_PATH'
18016
18017 if test "$GCC" = yes; then
18018 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18019 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18020 else
18021 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18022 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18023 fi
18024 ;;
18025
18026 uts4*)
18027 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
18028 hardcode_libdir_flag_spec='-L$libdir'
18029 hardcode_shlibpath_var=no
18030 ;;
18031
18032 *)
18033 ld_shlibs=no
18034 ;;
18035 esac
18036
18037 if test x$host_vendor = xsni; then
18038 case $host in
18039 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
18040 export_dynamic_flag_spec='${wl}-Blargedynsym'
18041 ;;
18042 esac
18043 fi
18044 fi
18045
18046echo "$as_me:$LINENO: result: $ld_shlibs" >&5
18047echo "${ECHO_T}$ld_shlibs" >&6
18048test "$ld_shlibs" = no && can_build_shared=no
18049
18050with_gnu_ld=$with_gnu_ld
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066#
18067# Do we need to explicitly link libc?
18068#
18069case "x$archive_cmds_need_lc" in
18070x|xyes)
18071 # Assume -lc should be added
18072 archive_cmds_need_lc=yes
18073
18074 if test "$enable_shared" = yes && test "$GCC" = yes; then
18075 case $archive_cmds in
18076 *'~'*)
18077 # FIXME: we may have to deal with multi-command sequences.
18078 ;;
18079 '$CC '*)
18080 # Test whether the compiler implicitly links with -lc since on some
18081 # systems, -lgcc has to come before -lc. If gcc already passes -lc
18082 # to ld, don't add -lc before -lgcc.
18083 echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
18084echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
18085 $RM conftest*
18086 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
18087
18088 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18089 (eval $ac_compile) 2>&5
18090 ac_status=$?
18091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18092 (exit $ac_status); } 2>conftest.err; then
18093 soname=conftest
18094 lib=conftest
18095 libobjs=conftest.$ac_objext
18096 deplibs=
18097 wl=$lt_prog_compiler_wl
18098 pic_flag=$lt_prog_compiler_pic
18099 compiler_flags=-v
18100 linker_flags=-v
18101 verstring=
18102 output_objdir=.
18103 libname=conftest
18104 lt_save_allow_undefined_flag=$allow_undefined_flag
18105 allow_undefined_flag=
18106 if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
18107 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
18108 ac_status=$?
18109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18110 (exit $ac_status); }
18111 then
18112 archive_cmds_need_lc=no
18113 else
18114 archive_cmds_need_lc=yes
18115 fi
18116 allow_undefined_flag=$lt_save_allow_undefined_flag
18117 else
18118 cat conftest.err 1>&5
18119 fi
18120 $RM conftest*
18121 echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
18122echo "${ECHO_T}$archive_cmds_need_lc" >&6
18123 ;;
18124 esac
18125 fi
18126 ;;
18127esac
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
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
18286echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
18287withGCC=$GCC
18288if test "$withGCC" = yes; then
18289 case $host_os in
18290 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
18291 *) lt_awk_arg="/^libraries:/" ;;
18292 esac
18293 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
18294 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
18295 # if the path contains ";" then we assume it to be the separator
18296 # otherwise default to the standard path separator (i.e. ":") - it is
18297 # assumed that no part of a normal pathname contains ";" but that should
18298 # okay in the real world where ";" in dirpaths is itself problematic.
18299 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
18300 else
18301 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
18302 fi
18303 # Ok, now we have the path, separated by spaces, we can step through it
18304 # and add multilib dir if necessary.
18305 lt_tmp_lt_search_path_spec=
18306 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
18307 for lt_sys_path in $lt_search_path_spec; do
18308 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
18309 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
18310 else
18311 test -d "$lt_sys_path" && \
18312 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
18313 fi
18314 done
18315 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
18316BEGIN {RS=" "; FS="/|\n";} {
18317 lt_foo="";
18318 lt_count=0;
18319 for (lt_i = NF; lt_i > 0; lt_i--) {
18320 if ($lt_i != "" && $lt_i != ".") {
18321 if ($lt_i == "..") {
18322 lt_count++;
18323 } else {
18324 if (lt_count == 0) {
18325 lt_foo="/" $lt_i lt_foo;
18326 } else {
18327 lt_count--;
18328 }
18329 }
18330 }
18331 }
18332 if (lt_foo != "") { lt_freq[lt_foo]++; }
18333 if (lt_freq[lt_foo] == 1) { print lt_foo; }
18334}'`
18335 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
18336else
18337 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
18338fi
18339library_names_spec=
18340libname_spec='lib$name'
18341soname_spec=
18342shrext_cmds=".so"
18343postinstall_cmds=
18344postuninstall_cmds=
18345finish_cmds=
18346finish_eval=
18347shlibpath_var=
18348shlibpath_overrides_runpath=unknown
18349version_type=none
18350dynamic_linker="$host_os ld.so"
18351sys_lib_dlsearch_path_spec="/lib /usr/lib"
18352need_lib_prefix=unknown
18353hardcode_into_libs=no
18354
18355# when you set need_version to no, make sure it does not cause -set_version
18356# flags to be left without arguments
18357need_version=unknown
18358
18359case $host_os in
18360aix3*)
18361 version_type=linux
18362 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
18363 shlibpath_var=LIBPATH
18364
18365 # AIX 3 has no versioning support, so we append a major version to the name.
18366 soname_spec='${libname}${release}${shared_ext}$major'
18367 ;;
18368
18369aix[4-9]*)
18370 version_type=linux
18371 need_lib_prefix=no
18372 need_version=no
18373 hardcode_into_libs=yes
18374 if test "$host_cpu" = ia64; then
18375 # AIX 5 supports IA64
18376 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
18377 shlibpath_var=LD_LIBRARY_PATH
18378 else
18379 # With GCC up to 2.95.x, collect2 would create an import file
18380 # for dependence libraries. The import file would start with
18381 # the line `#! .'. This would cause the generated library to
18382 # depend on `.', always an invalid library. This was fixed in
18383 # development snapshots of GCC prior to 3.0.
18384 case $host_os in
18385 aix4 | aix4.[01] | aix4.[01].*)
18386 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
18387 echo ' yes '
18388 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
18389 :
18390 else
18391 can_build_shared=no
18392 fi
18393 ;;
18394 esac
18395 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
18396 # soname into executable. Probably we can add versioning support to
18397 # collect2, so additional links can be useful in future.
18398 if test "$aix_use_runtimelinking" = yes; then
18399 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
18400 # instead of lib<name>.a to let people know that these are not
18401 # typical AIX shared libraries.
18402 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18403 else
18404 # We preserve .a as extension for shared libraries through AIX4.2
18405 # and later when we are not doing run time linking.
18406 library_names_spec='${libname}${release}.a $libname.a'
18407 soname_spec='${libname}${release}${shared_ext}$major'
18408 fi
18409 shlibpath_var=LIBPATH
18410 fi
18411 ;;
18412
18413amigaos*)
18414 if test "$host_cpu" = m68k; then
18415 library_names_spec='$libname.ixlibrary $libname.a'
18416 # Create ${libname}_ixlibrary.a entries in /sys/libs.
18417 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'
18418 else
18419 dynamic_linker=no
18420 fi
18421 ;;
18422
18423beos*)
18424 library_names_spec='${libname}${shared_ext}'
18425 dynamic_linker="$host_os ld.so"
18426 shlibpath_var=LIBRARY_PATH
18427 ;;
18428
18429bsdi[45]*)
18430 version_type=linux
18431 need_version=no
18432 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18433 soname_spec='${libname}${release}${shared_ext}$major'
18434 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
18435 shlibpath_var=LD_LIBRARY_PATH
18436 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
18437 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
18438 # the default ld.so.conf also contains /usr/contrib/lib and
18439 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
18440 # libtool to hard-code these into programs
18441 ;;
18442
18443cygwin* | mingw* | pw32*)
18444 version_type=windows
18445 shrext_cmds=".dll"
18446 need_version=no
18447 need_lib_prefix=no
18448
18449 case $withGCC,$host_os in
18450 yes,cygwin* | yes,mingw* | yes,pw32*)
18451 library_names_spec='$libname.dll.a'
18452 # DLL is installed to $(libdir)/../bin by postinstall_cmds
18453 postinstall_cmds='base_file=`basename \${file}`~
18454 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
18455 dldir=$destdir/`dirname \$dlpath`~
18456 test -d \$dldir || mkdir -p \$dldir~
18457 $install_prog $dir/$dlname \$dldir/$dlname~
18458 chmod a+x \$dldir/$dlname~
18459 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
18460 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
18461 fi'
18462 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
18463 dlpath=$dir/\$dldll~
18464 $RM \$dlpath'
18465 shlibpath_overrides_runpath=yes
18466
18467 case $host_os in
18468 cygwin*)
18469 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
18470 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18471 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
18472 ;;
18473 mingw*)
18474 # MinGW DLLs use traditional 'lib' prefix
18475 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18476 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
18477 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
18478 # It is most probably a Windows format PATH printed by
18479 # mingw gcc, but we are running on Cygwin. Gcc prints its search
18480 # path with ; separators, and with drive letters. We can handle the
18481 # drive letters (cygwin fileutils understands them), so leave them,
18482 # especially as we might pass files found there to a mingw objdump,
18483 # which wouldn't understand a cygwinified path. Ahh.
18484 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
18485 else
18486 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
18487 fi
18488 ;;
18489 pw32*)
18490 # pw32 DLLs use 'pw' prefix rather than 'lib'
18491 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18492 ;;
18493 esac
18494 ;;
18495
18496 *)
18497 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
18498 ;;
18499 esac
18500 dynamic_linker='Win32 ld.exe'
18501 # FIXME: first we should search . and the directory the executable is in
18502 shlibpath_var=PATH
18503 ;;
18504
18505darwin* | rhapsody*)
18506 dynamic_linker="$host_os dyld"
18507 version_type=darwin
18508 need_lib_prefix=no
18509 need_version=no
18510 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
18511 soname_spec='${libname}${release}${major}$shared_ext'
18512 shlibpath_overrides_runpath=yes
18513 shlibpath_var=DYLD_LIBRARY_PATH
18514 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
18515
18516 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
18517 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
18518 ;;
18519
18520dgux*)
18521 version_type=linux
18522 need_lib_prefix=no
18523 need_version=no
18524 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
18525 soname_spec='${libname}${release}${shared_ext}$major'
18526 shlibpath_var=LD_LIBRARY_PATH
18527 ;;
18528
18529freebsd1*)
18530 dynamic_linker=no
18531 ;;
18532
18533freebsd* | dragonfly*)
18534 # DragonFly does not have aout. When/if they implement a new
18535 # versioning mechanism, adjust this.
18536 if test -x /usr/bin/objformat; then
18537 objformat=`/usr/bin/objformat`
18538 else
18539 case $host_os in
18540 freebsd[123]*) objformat=aout ;;
18541 *) objformat=elf ;;
18542 esac
18543 fi
18544 version_type=freebsd-$objformat
18545 case $version_type in
18546 freebsd-elf*)
18547 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
18548 need_version=no
18549 need_lib_prefix=no
18550 ;;
18551 freebsd-*)
18552 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
18553 need_version=yes
18554 ;;
18555 esac
18556 shlibpath_var=LD_LIBRARY_PATH
18557 case $host_os in
18558 freebsd2*)
18559 shlibpath_overrides_runpath=yes
18560 ;;
18561 freebsd3.[01]* | freebsdelf3.[01]*)
18562 shlibpath_overrides_runpath=yes
18563 hardcode_into_libs=yes
18564 ;;
18565 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
18566 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
18567 shlibpath_overrides_runpath=no
18568 hardcode_into_libs=yes
18569 ;;
18570 *) # from 4.6 on, and DragonFly
18571 shlibpath_overrides_runpath=yes
18572 hardcode_into_libs=yes
18573 ;;
18574 esac
18575 ;;
18576
18577gnu*)
18578 version_type=linux
18579 need_lib_prefix=no
18580 need_version=no
18581 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
18582 soname_spec='${libname}${release}${shared_ext}$major'
18583 shlibpath_var=LD_LIBRARY_PATH
18584 hardcode_into_libs=yes
18585 ;;
18586
18587hpux9* | hpux10* | hpux11*)
18588 # Give a soname corresponding to the major version so that dld.sl refuses to
18589 # link against other versions.
18590 version_type=sunos
18591 need_lib_prefix=no
18592 need_version=no
18593 case $host_cpu in
18594 ia64*)
18595 shrext_cmds='.so'
18596 hardcode_into_libs=yes
18597 dynamic_linker="$host_os dld.so"
18598 shlibpath_var=LD_LIBRARY_PATH
18599 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18600 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18601 soname_spec='${libname}${release}${shared_ext}$major'
18602 if test "X$HPUX_IA64_MODE" = X32; then
18603 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
18604 else
18605 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
18606 fi
18607 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18608 ;;
18609 hppa*64*)
18610 shrext_cmds='.sl'
18611 hardcode_into_libs=yes
18612 dynamic_linker="$host_os dld.sl"
18613 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
18614 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18615 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18616 soname_spec='${libname}${release}${shared_ext}$major'
18617 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
18618 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18619 ;;
18620 *)
18621 shrext_cmds='.sl'
18622 dynamic_linker="$host_os dld.sl"
18623 shlibpath_var=SHLIB_PATH
18624 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
18625 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18626 soname_spec='${libname}${release}${shared_ext}$major'
18627 ;;
18628 esac
18629 # HP-UX runs *really* slowly unless shared libraries are mode 555.
18630 postinstall_cmds='chmod 555 $lib'
18631 ;;
18632
18633interix[3-9]*)
18634 version_type=linux
18635 need_lib_prefix=no
18636 need_version=no
18637 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
18638 soname_spec='${libname}${release}${shared_ext}$major'
18639 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
18640 shlibpath_var=LD_LIBRARY_PATH
18641 shlibpath_overrides_runpath=no
18642 hardcode_into_libs=yes
18643 ;;
18644
18645irix5* | irix6* | nonstopux*)
18646 case $host_os in
18647 nonstopux*) version_type=nonstopux ;;
18648 *)
18649 if test "$lt_cv_prog_gnu_ld" = yes; then
18650 version_type=linux
18651 else
18652 version_type=irix
18653 fi ;;
18654 esac
18655 need_lib_prefix=no
18656 need_version=no
18657 soname_spec='${libname}${release}${shared_ext}$major'
18658 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
18659 case $host_os in
18660 irix5* | nonstopux*)
18661 libsuff= shlibsuff=
18662 ;;
18663 *)
18664 case $LD in # libtool.m4 will add one of these switches to LD
18665 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
18666 libsuff= shlibsuff= libmagic=32-bit;;
18667 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
18668 libsuff=32 shlibsuff=N32 libmagic=N32;;
18669 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
18670 libsuff=64 shlibsuff=64 libmagic=64-bit;;
18671 *) libsuff= shlibsuff= libmagic=never-match;;
18672 esac
18673 ;;
18674 esac
18675 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
18676 shlibpath_overrides_runpath=no
18677 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
18678 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
18679 hardcode_into_libs=yes
18680 ;;
18681
18682# No shared lib support for Linux oldld, aout, or coff.
18683linux*oldld* | linux*aout* | linux*coff*)
18684 dynamic_linker=no
18685 ;;
18686
18687# This must be Linux ELF.
18688linux* | k*bsd*-gnu)
18689 version_type=linux
18690 need_lib_prefix=no
18691 need_version=no
18692 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18693 soname_spec='${libname}${release}${shared_ext}$major'
18694 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
18695 shlibpath_var=LD_LIBRARY_PATH
18696 shlibpath_overrides_runpath=no
18697 # Some binutils ld are patched to set DT_RUNPATH
18698 save_LDFLAGS=$LDFLAGS
18699 save_libdir=$libdir
18700 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
18701 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
18702 cat >conftest.$ac_ext <<_ACEOF
18703/* confdefs.h. */
18704_ACEOF
18705cat confdefs.h >>conftest.$ac_ext
18706cat >>conftest.$ac_ext <<_ACEOF
18707/* end confdefs.h. */
18708
18709int
18710main ()
18711{
18712
18713 ;
18714 return 0;
18715}
18716_ACEOF
18717rm -f conftest.$ac_objext conftest$ac_exeext
18718if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18719 (eval $ac_link) 2>conftest.er1
18720 ac_status=$?
18721 grep -v '^ *+' conftest.er1 >conftest.err
18722 rm -f conftest.er1
18723 cat conftest.err >&5
18724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18725 (exit $ac_status); } &&
18726 { ac_try='test -z "$ac_c_werror_flag"
18727 || test ! -s conftest.err'
18728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18729 (eval $ac_try) 2>&5
18730 ac_status=$?
18731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18732 (exit $ac_status); }; } &&
18733 { ac_try='test -s conftest$ac_exeext'
18734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18735 (eval $ac_try) 2>&5
18736 ac_status=$?
18737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18738 (exit $ac_status); }; }; then
18739 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir"; then
18740 shlibpath_overrides_runpath=yes
18741fi
18742
18743else
18744 echo "$as_me: failed program was:" >&5
18745sed 's/^/| /' conftest.$ac_ext >&5
18746
18747fi
18748rm -f conftest.err conftest.$ac_objext \
18749 conftest$ac_exeext conftest.$ac_ext
18750 LDFLAGS=$save_LDFLAGS
18751 libdir=$save_libdir
18752
18753 # This implies no fast_install, which is unacceptable.
18754 # Some rework will be needed to allow for fast_install
18755 # before this can be enabled.
18756 hardcode_into_libs=yes
18757
18758 # Append ld.so.conf contents to the search path
18759 if test -f /etc/ld.so.conf; then
18760 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' ' '`
18761 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
18762 fi
18763
18764 # We used to test for /lib/ld.so.1 and disable shared libraries on
18765 # powerpc, because MkLinux only supported shared libraries with the
18766 # GNU dynamic linker. Since this was broken with cross compilers,
18767 # most powerpc-linux boxes support dynamic linking these days and
18768 # people can always --disable-shared, the test was removed, and we
18769 # assume the GNU/Linux dynamic linker is in use.
18770 dynamic_linker='GNU/Linux ld.so'
18771 ;;
18772
18773netbsd*)
18774 version_type=sunos
18775 need_lib_prefix=no
18776 need_version=no
18777 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
18778 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18779 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18780 dynamic_linker='NetBSD (a.out) ld.so'
18781 else
18782 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
18783 soname_spec='${libname}${release}${shared_ext}$major'
18784 dynamic_linker='NetBSD ld.elf_so'
18785 fi
18786 shlibpath_var=LD_LIBRARY_PATH
18787 shlibpath_overrides_runpath=yes
18788 hardcode_into_libs=yes
18789 ;;
18790
18791newsos6)
18792 version_type=linux
18793 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18794 shlibpath_var=LD_LIBRARY_PATH
18795 shlibpath_overrides_runpath=yes
18796 ;;
18797
18798*nto* | *qnx*)
18799 version_type=qnx
18800 need_lib_prefix=no
18801 need_version=no
18802 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18803 soname_spec='${libname}${release}${shared_ext}$major'
18804 shlibpath_var=LD_LIBRARY_PATH
18805 shlibpath_overrides_runpath=no
18806 hardcode_into_libs=yes
18807 dynamic_linker='ldqnx.so'
18808 ;;
18809
18810openbsd*)
18811 version_type=sunos
18812 sys_lib_dlsearch_path_spec="/usr/lib"
18813 need_lib_prefix=no
18814 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
18815 case $host_os in
18816 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
18817 *) need_version=no ;;
18818 esac
18819 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18820 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18821 shlibpath_var=LD_LIBRARY_PATH
18822 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
18823 case $host_os in
18824 openbsd2.[89] | openbsd2.[89].*)
18825 shlibpath_overrides_runpath=no
18826 ;;
18827 *)
18828 shlibpath_overrides_runpath=yes
18829 ;;
18830 esac
18831 else
18832 shlibpath_overrides_runpath=yes
18833 fi
18834 ;;
18835
18836os2*)
18837 libname_spec='$name'
18838 shrext_cmds=".dll"
18839 need_lib_prefix=no
18840 library_names_spec='$libname${shared_ext} $libname.a'
18841 dynamic_linker='OS/2 ld.exe'
18842 shlibpath_var=LIBPATH
18843 ;;
18844
18845osf3* | osf4* | osf5*)
18846 version_type=osf
18847 need_lib_prefix=no
18848 need_version=no
18849 soname_spec='${libname}${release}${shared_ext}$major'
18850 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18851 shlibpath_var=LD_LIBRARY_PATH
18852 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
18853 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
18854 ;;
18855
18856rdos*)
18857 dynamic_linker=no
18858 ;;
18859
18860solaris*)
18861 version_type=linux
18862 need_lib_prefix=no
18863 need_version=no
18864 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18865 soname_spec='${libname}${release}${shared_ext}$major'
18866 shlibpath_var=LD_LIBRARY_PATH
18867 shlibpath_overrides_runpath=yes
18868 hardcode_into_libs=yes
18869 # ldd complains unless libraries are executable
18870 postinstall_cmds='chmod +x $lib'
18871 ;;
18872
18873sunos4*)
18874 version_type=sunos
18875 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18876 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
18877 shlibpath_var=LD_LIBRARY_PATH
18878 shlibpath_overrides_runpath=yes
18879 if test "$with_gnu_ld" = yes; then
18880 need_lib_prefix=no
18881 fi
18882 need_version=yes
18883 ;;
18884
18885sysv4 | sysv4.3*)
18886 version_type=linux
18887 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18888 soname_spec='${libname}${release}${shared_ext}$major'
18889 shlibpath_var=LD_LIBRARY_PATH
18890 case $host_vendor in
18891 sni)
18892 shlibpath_overrides_runpath=no
18893 need_lib_prefix=no
18894 runpath_var=LD_RUN_PATH
18895 ;;
18896 siemens)
18897 need_lib_prefix=no
18898 ;;
18899 motorola)
18900 need_lib_prefix=no
18901 need_version=no
18902 shlibpath_overrides_runpath=no
18903 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
18904 ;;
18905 esac
18906 ;;
18907
18908sysv4*MP*)
18909 if test -d /usr/nec ;then
18910 version_type=linux
18911 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
18912 soname_spec='$libname${shared_ext}.$major'
18913 shlibpath_var=LD_LIBRARY_PATH
18914 fi
18915 ;;
18916
18917sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
18918 version_type=freebsd-elf
18919 need_lib_prefix=no
18920 need_version=no
18921 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
18922 soname_spec='${libname}${release}${shared_ext}$major'
18923 shlibpath_var=LD_LIBRARY_PATH
18924 shlibpath_overrides_runpath=yes
18925 hardcode_into_libs=yes
18926 if test "$with_gnu_ld" = yes; then
18927 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
18928 else
18929 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
18930 case $host_os in
18931 sco3.2v5*)
18932 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
18933 ;;
18934 esac
18935 fi
18936 sys_lib_dlsearch_path_spec='/usr/lib'
18937 ;;
18938
18939tpf*)
18940 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
18941 version_type=linux
18942 need_lib_prefix=no
18943 need_version=no
18944 library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18945 shlibpath_var=LD_LIBRARY_PATH
18946 shlibpath_overrides_runpath=no
18947 hardcode_into_libs=yes
18948 ;;
18949
18950uts4*)
18951 version_type=linux
18952 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18953 soname_spec='${libname}${release}${shared_ext}$major'
18954 shlibpath_var=LD_LIBRARY_PATH
18955 ;;
18956
18957*)
18958 dynamic_linker=no
18959 ;;
18960esac
18961echo "$as_me:$LINENO: result: $dynamic_linker" >&5
18962echo "${ECHO_T}$dynamic_linker" >&6
18963test "$dynamic_linker" = no && can_build_shared=no
18964
18965variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
18966if test "$GCC" = yes; then
18967 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
18968fi
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
19057echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
19058hardcode_action=
19059if test -n "$hardcode_libdir_flag_spec" ||
19060 test -n "$runpath_var" ||
19061 test "X$hardcode_automatic" = "Xyes" ; then
19062
19063 # We can hardcode non-existent directories.
19064 if test "$hardcode_direct" != no &&
19065 # If the only mechanism to avoid hardcoding is shlibpath_var, we
19066 # have to relink, otherwise we might link with an installed library
19067 # when we should be linking with a yet-to-be-installed one
19068 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
19069 test "$hardcode_minus_L" != no; then
19070 # Linking always hardcodes the temporary library directory.
19071 hardcode_action=relink
19072 else
19073 # We can link without hardcoding, and we can hardcode nonexisting dirs.
19074 hardcode_action=immediate
19075 fi
19076else
19077 # We cannot hardcode anything, or else we can only hardcode existing
19078 # directories.
19079 hardcode_action=unsupported
19080fi
19081echo "$as_me:$LINENO: result: $hardcode_action" >&5
19082echo "${ECHO_T}$hardcode_action" >&6
19083
19084if test "$hardcode_action" = relink ||
19085 test "$inherit_rpath" = yes; then
19086 # Fast installation is not supported
19087 enable_fast_install=no
19088elif test "$shlibpath_overrides_runpath" = yes ||
19089 test "$enable_shared" = no; then
19090 # Fast installation is not necessary
19091 enable_fast_install=needless
19092fi
19093
19094
19095
19096
19097
19098
19099 if test "x$enable_dlopen" != xyes; then
19100 enable_dlopen=unknown
19101 enable_dlopen_self=unknown
19102 enable_dlopen_self_static=unknown
19103else
19104 lt_cv_dlopen=no
19105 lt_cv_dlopen_libs=
19106
19107 case $host_os in
19108 beos*)
19109 lt_cv_dlopen="load_add_on"
19110 lt_cv_dlopen_libs=
19111 lt_cv_dlopen_self=yes
19112 ;;
19113
19114 mingw* | pw32*)
19115 lt_cv_dlopen="LoadLibrary"
19116 lt_cv_dlopen_libs=
19117 ;;
19118
19119 cygwin*)
19120 lt_cv_dlopen="dlopen"
19121 lt_cv_dlopen_libs=
19122 ;;
19123
19124 darwin*)
19125 # if libdl is installed we need to link against it
19126 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19127echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
19128if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19129 echo $ECHO_N "(cached) $ECHO_C" >&6
19130else
19131 ac_check_lib_save_LIBS=$LIBS
19132LIBS="-ldl $LIBS"
19133cat >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
19140/* Override any gcc2 internal prototype to avoid an error. */
19141#ifdef __cplusplus
19142extern "C"
19143#endif
19144/* We use char because int might match the return type of a gcc2
19145 builtin and then its argument prototype would still apply. */
19146char dlopen ();
19147int
19148main ()
19149{
19150dlopen ();
19151 ;
19152 return 0;
19153}
19154_ACEOF
19155rm -f conftest.$ac_objext conftest$ac_exeext
19156if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19157 (eval $ac_link) 2>conftest.er1
19158 ac_status=$?
19159 grep -v '^ *+' conftest.er1 >conftest.err
19160 rm -f conftest.er1
19161 cat conftest.err >&5
19162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19163 (exit $ac_status); } &&
19164 { ac_try='test -z "$ac_c_werror_flag"
19165 || test ! -s conftest.err'
19166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19167 (eval $ac_try) 2>&5
19168 ac_status=$?
19169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19170 (exit $ac_status); }; } &&
19171 { ac_try='test -s conftest$ac_exeext'
19172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19173 (eval $ac_try) 2>&5
19174 ac_status=$?
19175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19176 (exit $ac_status); }; }; then
19177 ac_cv_lib_dl_dlopen=yes
19178else
19179 echo "$as_me: failed program was:" >&5
19180sed 's/^/| /' conftest.$ac_ext >&5
19181
19182ac_cv_lib_dl_dlopen=no
19183fi
19184rm -f conftest.err conftest.$ac_objext \
19185 conftest$ac_exeext conftest.$ac_ext
19186LIBS=$ac_check_lib_save_LIBS
19187fi
19188echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19189echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
19190if test $ac_cv_lib_dl_dlopen = yes; then
19191 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
19192else
19193
19194 lt_cv_dlopen="dyld"
19195 lt_cv_dlopen_libs=
19196 lt_cv_dlopen_self=yes
19197
19198fi
19199
19200 ;;
19201
19202 *)
19203 echo "$as_me:$LINENO: checking for shl_load" >&5
19204echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
19205if test "${ac_cv_func_shl_load+set}" = set; then
19206 echo $ECHO_N "(cached) $ECHO_C" >&6
19207else
19208 cat >conftest.$ac_ext <<_ACEOF
19209/* confdefs.h. */
19210_ACEOF
19211cat confdefs.h >>conftest.$ac_ext
19212cat >>conftest.$ac_ext <<_ACEOF
19213/* end confdefs.h. */
19214/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
19215 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19216#define shl_load innocuous_shl_load
19217
19218/* System header to define __stub macros and hopefully few prototypes,
19219 which can conflict with char shl_load (); below.
19220 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19221 <limits.h> exists even on freestanding compilers. */
19222
19223#ifdef __STDC__
19224# include <limits.h>
19225#else
19226# include <assert.h>
19227#endif
19228
19229#undef shl_load
19230
19231/* Override any gcc2 internal prototype to avoid an error. */
19232#ifdef __cplusplus
19233extern "C"
19234{
19235#endif
19236/* We use char because int might match the return type of a gcc2
19237 builtin and then its argument prototype would still apply. */
19238char shl_load ();
19239/* The GNU C library defines this for functions which it implements
19240 to always fail with ENOSYS. Some functions are actually named
19241 something starting with __ and the normal name is an alias. */
19242#if defined (__stub_shl_load) || defined (__stub___shl_load)
19243choke me
19244#else
19245char (*f) () = shl_load;
19246#endif
19247#ifdef __cplusplus
19248}
19249#endif
19250
19251int
19252main ()
19253{
19254return f != shl_load;
19255 ;
19256 return 0;
19257}
19258_ACEOF
19259rm -f conftest.$ac_objext conftest$ac_exeext
19260if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19261 (eval $ac_link) 2>conftest.er1
19262 ac_status=$?
19263 grep -v '^ *+' conftest.er1 >conftest.err
19264 rm -f conftest.er1
19265 cat conftest.err >&5
19266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19267 (exit $ac_status); } &&
19268 { ac_try='test -z "$ac_c_werror_flag"
19269 || test ! -s conftest.err'
19270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19271 (eval $ac_try) 2>&5
19272 ac_status=$?
19273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19274 (exit $ac_status); }; } &&
19275 { ac_try='test -s conftest$ac_exeext'
19276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19277 (eval $ac_try) 2>&5
19278 ac_status=$?
19279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19280 (exit $ac_status); }; }; then
19281 ac_cv_func_shl_load=yes
19282else
19283 echo "$as_me: failed program was:" >&5
19284sed 's/^/| /' conftest.$ac_ext >&5
19285
19286ac_cv_func_shl_load=no
19287fi
19288rm -f conftest.err conftest.$ac_objext \
19289 conftest$ac_exeext conftest.$ac_ext
19290fi
19291echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
19292echo "${ECHO_T}$ac_cv_func_shl_load" >&6
19293if test $ac_cv_func_shl_load = yes; then
19294 lt_cv_dlopen="shl_load"
19295else
19296 echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
19297echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
19298if test "${ac_cv_lib_dld_shl_load+set}" = set; then
19299 echo $ECHO_N "(cached) $ECHO_C" >&6
19300else
19301 ac_check_lib_save_LIBS=$LIBS
19302LIBS="-ldld $LIBS"
19303cat >conftest.$ac_ext <<_ACEOF
19304/* confdefs.h. */
19305_ACEOF
19306cat confdefs.h >>conftest.$ac_ext
19307cat >>conftest.$ac_ext <<_ACEOF
19308/* end confdefs.h. */
19309
19310/* Override any gcc2 internal prototype to avoid an error. */
19311#ifdef __cplusplus
19312extern "C"
19313#endif
19314/* We use char because int might match the return type of a gcc2
19315 builtin and then its argument prototype would still apply. */
19316char shl_load ();
19317int
19318main ()
19319{
19320shl_load ();
19321 ;
19322 return 0;
19323}
19324_ACEOF
19325rm -f conftest.$ac_objext conftest$ac_exeext
19326if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19327 (eval $ac_link) 2>conftest.er1
19328 ac_status=$?
19329 grep -v '^ *+' conftest.er1 >conftest.err
19330 rm -f conftest.er1
19331 cat conftest.err >&5
19332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19333 (exit $ac_status); } &&
19334 { ac_try='test -z "$ac_c_werror_flag"
19335 || test ! -s conftest.err'
19336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19337 (eval $ac_try) 2>&5
19338 ac_status=$?
19339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19340 (exit $ac_status); }; } &&
19341 { ac_try='test -s conftest$ac_exeext'
19342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19343 (eval $ac_try) 2>&5
19344 ac_status=$?
19345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19346 (exit $ac_status); }; }; then
19347 ac_cv_lib_dld_shl_load=yes
19348else
19349 echo "$as_me: failed program was:" >&5
19350sed 's/^/| /' conftest.$ac_ext >&5
19351
19352ac_cv_lib_dld_shl_load=no
19353fi
19354rm -f conftest.err conftest.$ac_objext \
19355 conftest$ac_exeext conftest.$ac_ext
19356LIBS=$ac_check_lib_save_LIBS
19357fi
19358echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
19359echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
19360if test $ac_cv_lib_dld_shl_load = yes; then
19361 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
19362else
19363 echo "$as_me:$LINENO: checking for dlopen" >&5
19364echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
19365if test "${ac_cv_func_dlopen+set}" = set; then
19366 echo $ECHO_N "(cached) $ECHO_C" >&6
19367else
19368 cat >conftest.$ac_ext <<_ACEOF
19369/* confdefs.h. */
19370_ACEOF
19371cat confdefs.h >>conftest.$ac_ext
19372cat >>conftest.$ac_ext <<_ACEOF
19373/* end confdefs.h. */
19374/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
19375 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19376#define dlopen innocuous_dlopen
19377
19378/* System header to define __stub macros and hopefully few prototypes,
19379 which can conflict with char dlopen (); below.
19380 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19381 <limits.h> exists even on freestanding compilers. */
19382
19383#ifdef __STDC__
19384# include <limits.h>
19385#else
19386# include <assert.h>
19387#endif
19388
19389#undef dlopen
19390
19391/* Override any gcc2 internal prototype to avoid an error. */
19392#ifdef __cplusplus
19393extern "C"
19394{
19395#endif
19396/* We use char because int might match the return type of a gcc2
19397 builtin and then its argument prototype would still apply. */
19398char dlopen ();
19399/* The GNU C library defines this for functions which it implements
19400 to always fail with ENOSYS. Some functions are actually named
19401 something starting with __ and the normal name is an alias. */
19402#if defined (__stub_dlopen) || defined (__stub___dlopen)
19403choke me
19404#else
19405char (*f) () = dlopen;
19406#endif
19407#ifdef __cplusplus
19408}
19409#endif
19410
19411int
19412main ()
19413{
19414return f != dlopen;
19415 ;
19416 return 0;
19417}
19418_ACEOF
19419rm -f conftest.$ac_objext conftest$ac_exeext
19420if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19421 (eval $ac_link) 2>conftest.er1
19422 ac_status=$?
19423 grep -v '^ *+' conftest.er1 >conftest.err
19424 rm -f conftest.er1
19425 cat conftest.err >&5
19426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19427 (exit $ac_status); } &&
19428 { ac_try='test -z "$ac_c_werror_flag"
19429 || test ! -s conftest.err'
19430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19431 (eval $ac_try) 2>&5
19432 ac_status=$?
19433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19434 (exit $ac_status); }; } &&
19435 { ac_try='test -s conftest$ac_exeext'
19436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19437 (eval $ac_try) 2>&5
19438 ac_status=$?
19439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19440 (exit $ac_status); }; }; then
19441 ac_cv_func_dlopen=yes
19442else
19443 echo "$as_me: failed program was:" >&5
19444sed 's/^/| /' conftest.$ac_ext >&5
19445
19446ac_cv_func_dlopen=no
19447fi
19448rm -f conftest.err conftest.$ac_objext \
19449 conftest$ac_exeext conftest.$ac_ext
19450fi
19451echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
19452echo "${ECHO_T}$ac_cv_func_dlopen" >&6
19453if test $ac_cv_func_dlopen = yes; then
19454 lt_cv_dlopen="dlopen"
19455else
19456 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19457echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
19458if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19459 echo $ECHO_N "(cached) $ECHO_C" >&6
19460else
19461 ac_check_lib_save_LIBS=$LIBS
19462LIBS="-ldl $LIBS"
19463cat >conftest.$ac_ext <<_ACEOF
19464/* confdefs.h. */
19465_ACEOF
19466cat confdefs.h >>conftest.$ac_ext
19467cat >>conftest.$ac_ext <<_ACEOF
19468/* end confdefs.h. */
19469
19470/* Override any gcc2 internal prototype to avoid an error. */
19471#ifdef __cplusplus
19472extern "C"
19473#endif
19474/* We use char because int might match the return type of a gcc2
19475 builtin and then its argument prototype would still apply. */
19476char dlopen ();
19477int
19478main ()
19479{
19480dlopen ();
19481 ;
19482 return 0;
19483}
19484_ACEOF
19485rm -f conftest.$ac_objext conftest$ac_exeext
19486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19487 (eval $ac_link) 2>conftest.er1
19488 ac_status=$?
19489 grep -v '^ *+' conftest.er1 >conftest.err
19490 rm -f conftest.er1
19491 cat conftest.err >&5
19492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19493 (exit $ac_status); } &&
19494 { ac_try='test -z "$ac_c_werror_flag"
19495 || test ! -s conftest.err'
19496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19497 (eval $ac_try) 2>&5
19498 ac_status=$?
19499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19500 (exit $ac_status); }; } &&
19501 { ac_try='test -s conftest$ac_exeext'
19502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19503 (eval $ac_try) 2>&5
19504 ac_status=$?
19505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19506 (exit $ac_status); }; }; then
19507 ac_cv_lib_dl_dlopen=yes
19508else
19509 echo "$as_me: failed program was:" >&5
19510sed 's/^/| /' conftest.$ac_ext >&5
19511
19512ac_cv_lib_dl_dlopen=no
19513fi
19514rm -f conftest.err conftest.$ac_objext \
19515 conftest$ac_exeext conftest.$ac_ext
19516LIBS=$ac_check_lib_save_LIBS
19517fi
19518echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19519echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
19520if test $ac_cv_lib_dl_dlopen = yes; then
19521 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
19522else
19523 echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
19524echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
19525if test "${ac_cv_lib_svld_dlopen+set}" = set; then
19526 echo $ECHO_N "(cached) $ECHO_C" >&6
19527else
19528 ac_check_lib_save_LIBS=$LIBS
19529LIBS="-lsvld $LIBS"
19530cat >conftest.$ac_ext <<_ACEOF
19531/* confdefs.h. */
19532_ACEOF
19533cat confdefs.h >>conftest.$ac_ext
19534cat >>conftest.$ac_ext <<_ACEOF
19535/* end confdefs.h. */
19536
19537/* Override any gcc2 internal prototype to avoid an error. */
19538#ifdef __cplusplus
19539extern "C"
19540#endif
19541/* We use char because int might match the return type of a gcc2
19542 builtin and then its argument prototype would still apply. */
19543char dlopen ();
19544int
19545main ()
19546{
19547dlopen ();
19548 ;
19549 return 0;
19550}
19551_ACEOF
19552rm -f conftest.$ac_objext conftest$ac_exeext
19553if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19554 (eval $ac_link) 2>conftest.er1
19555 ac_status=$?
19556 grep -v '^ *+' conftest.er1 >conftest.err
19557 rm -f conftest.er1
19558 cat conftest.err >&5
19559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19560 (exit $ac_status); } &&
19561 { ac_try='test -z "$ac_c_werror_flag"
19562 || test ! -s conftest.err'
19563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19564 (eval $ac_try) 2>&5
19565 ac_status=$?
19566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19567 (exit $ac_status); }; } &&
19568 { ac_try='test -s conftest$ac_exeext'
19569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19570 (eval $ac_try) 2>&5
19571 ac_status=$?
19572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19573 (exit $ac_status); }; }; then
19574 ac_cv_lib_svld_dlopen=yes
19575else
19576 echo "$as_me: failed program was:" >&5
19577sed 's/^/| /' conftest.$ac_ext >&5
19578
19579ac_cv_lib_svld_dlopen=no
19580fi
19581rm -f conftest.err conftest.$ac_objext \
19582 conftest$ac_exeext conftest.$ac_ext
19583LIBS=$ac_check_lib_save_LIBS
19584fi
19585echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
19586echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
19587if test $ac_cv_lib_svld_dlopen = yes; then
19588 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
19589else
19590 echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
19591echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
19592if test "${ac_cv_lib_dld_dld_link+set}" = set; then
19593 echo $ECHO_N "(cached) $ECHO_C" >&6
19594else
19595 ac_check_lib_save_LIBS=$LIBS
19596LIBS="-ldld $LIBS"
19597cat >conftest.$ac_ext <<_ACEOF
19598/* confdefs.h. */
19599_ACEOF
19600cat confdefs.h >>conftest.$ac_ext
19601cat >>conftest.$ac_ext <<_ACEOF
19602/* end confdefs.h. */
19603
19604/* Override any gcc2 internal prototype to avoid an error. */
19605#ifdef __cplusplus
19606extern "C"
19607#endif
19608/* We use char because int might match the return type of a gcc2
19609 builtin and then its argument prototype would still apply. */
19610char dld_link ();
19611int
19612main ()
19613{
19614dld_link ();
19615 ;
19616 return 0;
19617}
19618_ACEOF
19619rm -f conftest.$ac_objext conftest$ac_exeext
19620if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19621 (eval $ac_link) 2>conftest.er1
19622 ac_status=$?
19623 grep -v '^ *+' conftest.er1 >conftest.err
19624 rm -f conftest.er1
19625 cat conftest.err >&5
19626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19627 (exit $ac_status); } &&
19628 { ac_try='test -z "$ac_c_werror_flag"
19629 || test ! -s conftest.err'
19630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19631 (eval $ac_try) 2>&5
19632 ac_status=$?
19633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19634 (exit $ac_status); }; } &&
19635 { ac_try='test -s conftest$ac_exeext'
19636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19637 (eval $ac_try) 2>&5
19638 ac_status=$?
19639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19640 (exit $ac_status); }; }; then
19641 ac_cv_lib_dld_dld_link=yes
19642else
19643 echo "$as_me: failed program was:" >&5
19644sed 's/^/| /' conftest.$ac_ext >&5
19645
19646ac_cv_lib_dld_dld_link=no
19647fi
19648rm -f conftest.err conftest.$ac_objext \
19649 conftest$ac_exeext conftest.$ac_ext
19650LIBS=$ac_check_lib_save_LIBS
19651fi
19652echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
19653echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
19654if test $ac_cv_lib_dld_dld_link = yes; then
19655 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
19656fi
19657
19658
19659fi
19660
19661
19662fi
19663
19664
19665fi
19666
19667
19668fi
19669
19670
19671fi
19672
19673 ;;
19674 esac
19675
19676 if test "x$lt_cv_dlopen" != xno; then
19677 enable_dlopen=yes
19678 else
19679 enable_dlopen=no
19680 fi
19681
19682 case $lt_cv_dlopen in
19683 dlopen)
19684 save_CPPFLAGS="$CPPFLAGS"
19685 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
19686
19687 save_LDFLAGS="$LDFLAGS"
19688 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
19689
19690 save_LIBS="$LIBS"
19691 LIBS="$lt_cv_dlopen_libs $LIBS"
19692
19693 echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
19694echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
19695if test "${lt_cv_dlopen_self+set}" = set; then
19696 echo $ECHO_N "(cached) $ECHO_C" >&6
19697else
19698 if test "$cross_compiling" = yes; then :
19699 lt_cv_dlopen_self=cross
19700else
19701 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
19702 lt_status=$lt_dlunknown
19703 cat > conftest.$ac_ext <<_LT_EOF
f8bf9252 19704#line 19704 "configure"
da0f6381
PB
19705#include "confdefs.h"
19706
19707#if HAVE_DLFCN_H
19708#include <dlfcn.h>
19709#endif
19710
19711#include <stdio.h>
19712
19713#ifdef RTLD_GLOBAL
19714# define LT_DLGLOBAL RTLD_GLOBAL
19715#else
19716# ifdef DL_GLOBAL
19717# define LT_DLGLOBAL DL_GLOBAL
19718# else
19719# define LT_DLGLOBAL 0
19720# endif
19721#endif
19722
19723/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
19724 find out it does not work in some platform. */
19725#ifndef LT_DLLAZY_OR_NOW
19726# ifdef RTLD_LAZY
19727# define LT_DLLAZY_OR_NOW RTLD_LAZY
19728# else
19729# ifdef DL_LAZY
19730# define LT_DLLAZY_OR_NOW DL_LAZY
19731# else
19732# ifdef RTLD_NOW
19733# define LT_DLLAZY_OR_NOW RTLD_NOW
19734# else
19735# ifdef DL_NOW
19736# define LT_DLLAZY_OR_NOW DL_NOW
19737# else
19738# define LT_DLLAZY_OR_NOW 0
19739# endif
19740# endif
19741# endif
19742# endif
19743#endif
19744
19745#ifdef __cplusplus
19746extern "C" void exit (int);
19747#endif
19748
19749void fnord() { int i=42;}
19750int main ()
19751{
19752 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
19753 int status = $lt_dlunknown;
19754
19755 if (self)
19756 {
19757 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
19758 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
19759 /* dlclose (self); */
19760 }
19761 else
19762 puts (dlerror ());
19763
19764 exit (status);
19765}
19766_LT_EOF
19767 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19768 (eval $ac_link) 2>&5
19769 ac_status=$?
19770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19771 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
19772 (./conftest; exit; ) >&5 2>/dev/null
19773 lt_status=$?
19774 case x$lt_status in
19775 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
19776 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
19777 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
19778 esac
19779 else :
19780 # compilation failed
19781 lt_cv_dlopen_self=no
19782 fi
19783fi
19784rm -fr conftest*
19785
19786
19787fi
19788echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
19789echo "${ECHO_T}$lt_cv_dlopen_self" >&6
19790
19791 if test "x$lt_cv_dlopen_self" = xyes; then
19792 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
19793 echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
19794echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
19795if test "${lt_cv_dlopen_self_static+set}" = set; then
19796 echo $ECHO_N "(cached) $ECHO_C" >&6
19797else
19798 if test "$cross_compiling" = yes; then :
19799 lt_cv_dlopen_self_static=cross
19800else
19801 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
19802 lt_status=$lt_dlunknown
19803 cat > conftest.$ac_ext <<_LT_EOF
f8bf9252 19804#line 19804 "configure"
da0f6381
PB
19805#include "confdefs.h"
19806
19807#if HAVE_DLFCN_H
19808#include <dlfcn.h>
19809#endif
19810
19811#include <stdio.h>
19812
19813#ifdef RTLD_GLOBAL
19814# define LT_DLGLOBAL RTLD_GLOBAL
19815#else
19816# ifdef DL_GLOBAL
19817# define LT_DLGLOBAL DL_GLOBAL
19818# else
19819# define LT_DLGLOBAL 0
19820# endif
19821#endif
19822
19823/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
19824 find out it does not work in some platform. */
19825#ifndef LT_DLLAZY_OR_NOW
19826# ifdef RTLD_LAZY
19827# define LT_DLLAZY_OR_NOW RTLD_LAZY
19828# else
19829# ifdef DL_LAZY
19830# define LT_DLLAZY_OR_NOW DL_LAZY
19831# else
19832# ifdef RTLD_NOW
19833# define LT_DLLAZY_OR_NOW RTLD_NOW
19834# else
19835# ifdef DL_NOW
19836# define LT_DLLAZY_OR_NOW DL_NOW
19837# else
19838# define LT_DLLAZY_OR_NOW 0
19839# endif
19840# endif
19841# endif
19842# endif
19843#endif
19844
19845#ifdef __cplusplus
19846extern "C" void exit (int);
19847#endif
19848
19849void fnord() { int i=42;}
19850int main ()
19851{
19852 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
19853 int status = $lt_dlunknown;
19854
19855 if (self)
19856 {
19857 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
19858 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
19859 /* dlclose (self); */
19860 }
19861 else
19862 puts (dlerror ());
19863
19864 exit (status);
19865}
19866_LT_EOF
19867 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19868 (eval $ac_link) 2>&5
19869 ac_status=$?
19870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19871 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
19872 (./conftest; exit; ) >&5 2>/dev/null
19873 lt_status=$?
19874 case x$lt_status in
19875 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
19876 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
19877 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
19878 esac
19879 else :
19880 # compilation failed
19881 lt_cv_dlopen_self_static=no
19882 fi
19883fi
19884rm -fr conftest*
19885
19886
19887fi
19888echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
19889echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
19890 fi
19891
19892 CPPFLAGS="$save_CPPFLAGS"
19893 LDFLAGS="$save_LDFLAGS"
19894 LIBS="$save_LIBS"
19895 ;;
19896 esac
19897
19898 case $lt_cv_dlopen_self in
19899 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
19900 *) enable_dlopen_self=unknown ;;
19901 esac
19902
19903 case $lt_cv_dlopen_self_static in
19904 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
19905 *) enable_dlopen_self_static=unknown ;;
19906 esac
19907fi
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925striplib=
19926old_striplib=
19927echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
19928echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
19929if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
19930 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
19931 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
19932 echo "$as_me:$LINENO: result: yes" >&5
19933echo "${ECHO_T}yes" >&6
19934else
19935# FIXME - insert some real tests, host_os isn't really good enough
19936 case $host_os in
19937 darwin*)
19938 if test -n "$STRIP" ; then
19939 striplib="$STRIP -x"
19940 old_striplib="$STRIP -S"
19941 echo "$as_me:$LINENO: result: yes" >&5
19942echo "${ECHO_T}yes" >&6
19943 else
19944 echo "$as_me:$LINENO: result: no" >&5
19945echo "${ECHO_T}no" >&6
19946 fi
19947 ;;
19948 *)
19949 echo "$as_me:$LINENO: result: no" >&5
19950echo "${ECHO_T}no" >&6
19951 ;;
19952 esac
19953fi
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966 # Report which library types will actually be built
19967 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
19968echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
19969 echo "$as_me:$LINENO: result: $can_build_shared" >&5
19970echo "${ECHO_T}$can_build_shared" >&6
19971
19972 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
19973echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
19974 test "$can_build_shared" = "no" && enable_shared=no
19975
19976 # On AIX, shared libraries and static libraries use the same namespace, and
19977 # are all built from PIC.
19978 case $host_os in
19979 aix3*)
19980 test "$enable_shared" = yes && enable_static=no
19981 if test -n "$RANLIB"; then
19982 archive_cmds="$archive_cmds~\$RANLIB \$lib"
19983 postinstall_cmds='$RANLIB $lib'
19984 fi
19985 ;;
19986
19987 aix[4-9]*)
19988 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
19989 test "$enable_shared" = yes && enable_static=no
19990 fi
19991 ;;
19992 esac
19993 echo "$as_me:$LINENO: result: $enable_shared" >&5
19994echo "${ECHO_T}$enable_shared" >&6
19995
19996 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
19997echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
19998 # Make sure either enable_shared or enable_static is yes.
19999 test "$enable_shared" = yes || enable_static=yes
20000 echo "$as_me:$LINENO: result: $enable_static" >&5
20001echo "${ECHO_T}$enable_static" >&6
20002
20003
20004
20005
20006fi
20007ac_ext=c
20008ac_cpp='$CPP $CPPFLAGS'
20009ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20010ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20011ac_compiler_gnu=$ac_cv_c_compiler_gnu
20012
20013CC="$lt_save_CC"
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030# Only expand once:
20031
20032
20033
20034
20035
20036# Identify the assembler which will work hand-in-glove with the newly
20037# built GCC, so that we can examine its features. This is the assembler
20038# which will be driven by the driver program.
20039#
20040# If build != host, and we aren't building gas in-tree, we identify a
20041# build->target assembler and hope that it will have the same features
20042# as the host->target assembler we'll be using.
20043gcc_cv_gas_major_version=
20044gcc_cv_gas_minor_version=
20045gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
20046
20047if test "${gcc_cv_as+set}" = set; then
20048 :
20049else
20050
20051if test -x "$DEFAULT_ASSEMBLER"; then
20052 gcc_cv_as="$DEFAULT_ASSEMBLER"
20053elif test -f $gcc_cv_as_gas_srcdir/configure.in \
20054 && test -f ../gas/Makefile \
20055 && test x$build = x$host; then
20056 gcc_cv_as=../gas/as-new$build_exeext
20057elif test -x as$build_exeext; then
20058 # Build using assembler in the current directory.
20059 gcc_cv_as=./as$build_exeext
20060elif test -x $AS_FOR_TARGET; then
20061 gcc_cv_as="$AS_FOR_TARGET"
20062else
20063 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
20064set dummy $AS_FOR_TARGET; ac_word=$2
20065echo "$as_me:$LINENO: checking for $ac_word" >&5
20066echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20067if test "${ac_cv_path_gcc_cv_as+set}" = set; then
20068 echo $ECHO_N "(cached) $ECHO_C" >&6
20069else
20070 case $gcc_cv_as in
20071 [\\/]* | ?:[\\/]*)
20072 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
20073 ;;
20074 *)
20075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20076for as_dir in $PATH
20077do
20078 IFS=$as_save_IFS
20079 test -z "$as_dir" && as_dir=.
20080 for ac_exec_ext in '' $ac_executable_extensions; do
20081 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20082 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
20083 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20084 break 2
20085 fi
20086done
20087done
20088
20089 ;;
20090esac
20091fi
20092gcc_cv_as=$ac_cv_path_gcc_cv_as
20093
20094if test -n "$gcc_cv_as"; then
20095 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
20096echo "${ECHO_T}$gcc_cv_as" >&6
20097else
20098 echo "$as_me:$LINENO: result: no" >&5
20099echo "${ECHO_T}no" >&6
20100fi
20101
20102fi
20103fi
20104
20105
20106ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
20107
20108case "$ORIGINAL_AS_FOR_TARGET" in
20109 ./as | ./as$build_exeext) ;;
20110 *) ac_config_files="$ac_config_files as:exec-tool.in"
20111 ;;
20112esac
20113
20114echo "$as_me:$LINENO: checking what assembler to use" >&5
20115echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
20116if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
20117 # Single tree build which includes gas. We want to prefer it
20118 # over whatever linker top-level may have detected, since
20119 # we'll use what we're building after installation anyway.
20120 echo "$as_me:$LINENO: result: newly built gas" >&5
20121echo "${ECHO_T}newly built gas" >&6
20122 in_tree_gas=yes
20123 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20124for f in $gcc_cv_as_bfd_srcdir/configure \
20125 $gcc_cv_as_gas_srcdir/configure \
20126 $gcc_cv_as_gas_srcdir/configure.in \
20127 $gcc_cv_as_gas_srcdir/Makefile.in ; do
20128 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20129 if test x$gcc_cv_gas_version != x; then
20130 break
20131 fi
20132done
20133gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
20134gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20135gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
20136case $gcc_cv_gas_patch_version in
20137 "") gcc_cv_gas_patch_version="0" ;;
20138esac
20139gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
20140 + $gcc_cv_gas_minor_version \) \* 1000 \
20141 + $gcc_cv_gas_patch_version`
20142
20143 in_tree_gas_is_elf=no
20144 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
20145 || (grep 'obj_format = multi' ../gas/Makefile \
20146 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
20147 then
20148 in_tree_gas_is_elf=yes
20149 fi
20150else
20151 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
20152echo "${ECHO_T}$gcc_cv_as" >&6
20153 in_tree_gas=no
20154fi
20155
20156# Identify the linker which will work hand-in-glove with the newly
20157# built GCC, so that we can examine its features. This is the linker
20158# which will be driven by the driver program.
20159#
20160# If build != host, and we aren't building gas in-tree, we identify a
20161# build->target linker and hope that it will have the same features
20162# as the host->target linker we'll be using.
20163gcc_cv_gld_major_version=
20164gcc_cv_gld_minor_version=
20165gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
20166gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20167
20168if test "${gcc_cv_ld+set}" = set; then
20169 :
20170else
20171
20172if test -x "$DEFAULT_LINKER"; then
20173 gcc_cv_ld="$DEFAULT_LINKER"
20174elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
20175 && test -f ../ld/Makefile \
20176 && test x$build = x$host; then
20177 gcc_cv_ld=../ld/ld-new$build_exeext
e8b05380
PB
20178elif test -x collect-ld$build_exeext; then
20179 # Build using linker in the current directory.
20180 gcc_cv_ld=./collect-ld$build_exeext
20181elif test -x $LD_FOR_TARGET; then
20182 gcc_cv_ld="$LD_FOR_TARGET"
20183else
20184 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
20185set dummy $LD_FOR_TARGET; ac_word=$2
b61ff9c8
BS
20186echo "$as_me:$LINENO: checking for $ac_word" >&5
20187echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 20188if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
d739199a
DJ
20189 echo $ECHO_N "(cached) $ECHO_C" >&6
20190else
e8b05380 20191 case $gcc_cv_ld in
d739199a 20192 [\\/]* | ?:[\\/]*)
e8b05380 20193 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
20194 ;;
20195 *)
20196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20197for as_dir in $PATH
20198do
20199 IFS=$as_save_IFS
20200 test -z "$as_dir" && as_dir=.
20201 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 20202 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 20203 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
20204 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20205 break 2
20206 fi
20207done
20208done
20209
20210 ;;
20211esac
20212fi
e8b05380 20213gcc_cv_ld=$ac_cv_path_gcc_cv_ld
b61ff9c8 20214
e8b05380 20215if test -n "$gcc_cv_ld"; then
b61ff9c8
BS
20216 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
20217echo "${ECHO_T}$gcc_cv_ld" >&6
d739199a 20218else
b61ff9c8
BS
20219 echo "$as_me:$LINENO: result: no" >&5
20220echo "${ECHO_T}no" >&6
d739199a
DJ
20221fi
20222
20223fi
e8b05380
PB
20224fi
20225
20226
20227ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
20228
be0fe523
PB
20229case "$ORIGINAL_LD_FOR_TARGET" in
20230 ./collect-ld | ./collect-ld$build_exeext) ;;
b61ff9c8 20231 *) ac_config_files="$ac_config_files collect-ld:exec-tool.in"
be0fe523
PB
20232 ;;
20233esac
e8b05380 20234
b61ff9c8
BS
20235echo "$as_me:$LINENO: checking what linker to use" >&5
20236echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
e8b05380
PB
20237if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
20238 # Single tree build which includes ld. We want to prefer it
20239 # over whatever linker top-level may have detected, since
20240 # we'll use what we're building after installation anyway.
b61ff9c8
BS
20241 echo "$as_me:$LINENO: result: newly built ld" >&5
20242echo "${ECHO_T}newly built ld" >&6
e8b05380
PB
20243 in_tree_ld=yes
20244 in_tree_ld_is_elf=no
20245 if (grep 'EMUL = .*elf' ../ld/Makefile \
20246 || grep 'EMUL = .*linux' ../ld/Makefile \
20247 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
20248 in_tree_ld_is_elf=yes
20249 fi
20250 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
20251 do
20252 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20253 if test x$gcc_cv_gld_version != x; then
20254 break
20255 fi
20256 done
20257 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
20258 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20259else
b61ff9c8
BS
20260 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
20261echo "${ECHO_T}$gcc_cv_ld" >&6
e8b05380
PB
20262 in_tree_ld=no
20263fi
20264
20265# Figure out what nm we will be using.
20266gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
20267if test "${gcc_cv_nm+set}" = set; then
20268 :
20269else
20270
20271if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20272 && test -f ../binutils/Makefile \
20273 && test x$build = x$host; then
e8b05380
PB
20274 gcc_cv_nm=../binutils/nm-new$build_exeext
20275elif test -x nm$build_exeext; then
20276 gcc_cv_nm=./nm$build_exeext
20277elif test -x $NM_FOR_TARGET; then
20278 gcc_cv_nm="$NM_FOR_TARGET"
20279else
20280 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
20281set dummy $NM_FOR_TARGET; ac_word=$2
b61ff9c8
BS
20282echo "$as_me:$LINENO: checking for $ac_word" >&5
20283echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 20284if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
d739199a
DJ
20285 echo $ECHO_N "(cached) $ECHO_C" >&6
20286else
e8b05380 20287 case $gcc_cv_nm in
d739199a 20288 [\\/]* | ?:[\\/]*)
e8b05380 20289 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
20290 ;;
20291 *)
20292 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20293for as_dir in $PATH
20294do
20295 IFS=$as_save_IFS
20296 test -z "$as_dir" && as_dir=.
20297 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 20298 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 20299 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
20300 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20301 break 2
20302 fi
20303done
20304done
20305
20306 ;;
20307esac
20308fi
e8b05380 20309gcc_cv_nm=$ac_cv_path_gcc_cv_nm
b61ff9c8 20310
e8b05380 20311if test -n "$gcc_cv_nm"; then
b61ff9c8
BS
20312 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
20313echo "${ECHO_T}$gcc_cv_nm" >&6
d739199a 20314else
b61ff9c8
BS
20315 echo "$as_me:$LINENO: result: no" >&5
20316echo "${ECHO_T}no" >&6
d739199a
DJ
20317fi
20318
20319fi
e8b05380 20320fi
d739199a 20321
e8b05380 20322
b61ff9c8
BS
20323echo "$as_me:$LINENO: checking what nm to use" >&5
20324echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
e8b05380
PB
20325if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
20326 # Single tree build which includes binutils.
b61ff9c8
BS
20327 echo "$as_me:$LINENO: result: newly built nm" >&5
20328echo "${ECHO_T}newly built nm" >&6
e8b05380
PB
20329 in_tree_nm=yes
20330else
b61ff9c8
BS
20331 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
20332echo "${ECHO_T}$gcc_cv_nm" >&6
e8b05380
PB
20333 in_tree_nm=no
20334fi
20335
20336ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
20337
be0fe523
PB
20338case "$ORIGINAL_NM_FOR_TARGET" in
20339 ./nm | ./nm$build_exeext) ;;
b61ff9c8 20340 *) ac_config_files="$ac_config_files nm:exec-tool.in"
be0fe523
PB
20341 ;;
20342esac
20343
e8b05380
PB
20344
20345# Figure out what objdump we will be using.
20346if test "${gcc_cv_objdump+set}" = set; then
20347 :
20348else
20349
20350if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20351 && test -f ../binutils/Makefile \
20352 && test x$build = x$host; then
e8b05380
PB
20353 # Single tree build which includes binutils.
20354 gcc_cv_objdump=../binutils/objdump$build_exeext
20355elif test -x objdump$build_exeext; then
20356 gcc_cv_objdump=./objdump$build_exeext
20357elif test -x $OBJDUMP_FOR_TARGET; then
20358 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
20359else
20360 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
20361set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
b61ff9c8
BS
20362echo "$as_me:$LINENO: checking for $ac_word" >&5
20363echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 20364if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
9f18db39
PB
20365 echo $ECHO_N "(cached) $ECHO_C" >&6
20366else
e8b05380 20367 case $gcc_cv_objdump in
9f18db39 20368 [\\/]* | ?:[\\/]*)
e8b05380 20369 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
20370 ;;
20371 *)
20372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 20373for as_dir in $PATH
9f18db39
PB
20374do
20375 IFS=$as_save_IFS
20376 test -z "$as_dir" && as_dir=.
20377 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 20378 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 20379 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
9f18db39
PB
20380 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20381 break 2
20382 fi
20383done
20384done
779243f7 20385
9f18db39
PB
20386 ;;
20387esac
20388fi
e8b05380 20389gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
b61ff9c8 20390
e8b05380 20391if test -n "$gcc_cv_objdump"; then
b61ff9c8
BS
20392 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
20393echo "${ECHO_T}$gcc_cv_objdump" >&6
9f18db39 20394else
b61ff9c8
BS
20395 echo "$as_me:$LINENO: result: no" >&5
20396echo "${ECHO_T}no" >&6
9f18db39
PB
20397fi
20398
e8b05380
PB
20399fi
20400fi
9f18db39 20401
e8b05380 20402
b61ff9c8
BS
20403echo "$as_me:$LINENO: checking what objdump to use" >&5
20404echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
e8b05380
PB
20405if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
20406 # Single tree build which includes binutils.
b61ff9c8
BS
20407 echo "$as_me:$LINENO: result: newly built objdump" >&5
20408echo "${ECHO_T}newly built objdump" >&6
e8b05380 20409elif test x$gcc_cv_objdump = x; then
b61ff9c8
BS
20410 echo "$as_me:$LINENO: result: not found" >&5
20411echo "${ECHO_T}not found" >&6
e8b05380 20412else
b61ff9c8
BS
20413 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
20414echo "${ECHO_T}$gcc_cv_objdump" >&6
a2eafc76 20415fi
3cae5780 20416
981d4858 20417# Figure out what assembler alignment features are present.
b61ff9c8
BS
20418echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
20419echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
ba479fd2
NN
20420if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
20421 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20422else
20423 gcc_cv_as_balign_and_p2align=no
20424 if test $in_tree_gas = yes; then
20425 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
20426 then gcc_cv_as_balign_and_p2align=yes
20427fi
20428 elif test x$gcc_cv_as != x; then
6e3f3080 20429 echo '.balign 4
8ada417f 20430.p2align 2' > conftest.s
ba479fd2
NN
20431 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20433 (eval $ac_try) 2>&5
20434 ac_status=$?
20435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20436 (exit $ac_status); }; }
8ada417f
ZW
20437 then
20438 gcc_cv_as_balign_and_p2align=yes
20439 else
20440 echo "configure: failed program was" >&5
20441 cat conftest.s >&5
20442 fi
20443 rm -f conftest.o conftest.s
20444 fi
20445fi
b61ff9c8
BS
20446echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
20447echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 20448if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
20449
20450cat >>confdefs.h <<\_ACEOF
981d4858 20451#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 20452_ACEOF
981d4858 20453
ad9c4d9f
NN
20454fi
20455
b61ff9c8
BS
20456echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
20457echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
ba479fd2
NN
20458if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
20459 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20460else
20461 gcc_cv_as_max_skip_p2align=no
20462 if test $in_tree_gas = yes; then
20463 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
20464 then gcc_cv_as_max_skip_p2align=yes
20465fi
20466 elif test x$gcc_cv_as != x; then
6e3f3080 20467 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
20468 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20470 (eval $ac_try) 2>&5
20471 ac_status=$?
20472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20473 (exit $ac_status); }; }
8ada417f
ZW
20474 then
20475 gcc_cv_as_max_skip_p2align=yes
20476 else
20477 echo "configure: failed program was" >&5
20478 cat conftest.s >&5
20479 fi
20480 rm -f conftest.o conftest.s
20481 fi
ad9c4d9f 20482fi
b61ff9c8
BS
20483echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
20484echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 20485if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
20486
20487cat >>confdefs.h <<\_ACEOF
9e423e6d 20488#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 20489_ACEOF
9e423e6d 20490
9e423e6d 20491fi
ad9c4d9f 20492
b61ff9c8
BS
20493echo "$as_me:$LINENO: checking assembler for .literal16" >&5
20494echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6
5708d18d
MS
20495if test "${gcc_cv_as_literal16+set}" = set; then
20496 echo $ECHO_N "(cached) $ECHO_C" >&6
20497else
20498 gcc_cv_as_literal16=no
20499 if test $in_tree_gas = yes; then
20500 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
20501 then gcc_cv_as_literal16=yes
20502fi
20503 elif test x$gcc_cv_as != x; then
20504 echo '.literal16' > conftest.s
20505 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20507 (eval $ac_try) 2>&5
20508 ac_status=$?
20509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20510 (exit $ac_status); }; }
20511 then
20512 gcc_cv_as_literal16=yes
20513 else
20514 echo "configure: failed program was" >&5
20515 cat conftest.s >&5
20516 fi
20517 rm -f conftest.o conftest.s
20518 fi
20519fi
b61ff9c8
BS
20520echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5
20521echo "${ECHO_T}$gcc_cv_as_literal16" >&6
5708d18d
MS
20522if test $gcc_cv_as_literal16 = yes; then
20523
20524cat >>confdefs.h <<\_ACEOF
20525#define HAVE_GAS_LITERAL16 1
20526_ACEOF
20527
20528fi
20529
b61ff9c8
BS
20530echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
20531echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
ba479fd2
NN
20532if test "${gcc_cv_as_subsection_m1+set}" = set; then
20533 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20534else
20535 gcc_cv_as_subsection_m1=no
20536 if test $in_tree_gas = yes; then
20537 if test $in_tree_gas_is_elf = yes \
20538 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
20539 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 20540fi
8ada417f 20541 elif test x$gcc_cv_as != x; then
6e3f3080 20542 echo 'conftest_label1: .word 0
d1accaa3
JJ
20543.subsection -1
20544conftest_label2: .word 0
8ada417f 20545.previous' > conftest.s
ba479fd2
NN
20546 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20548 (eval $ac_try) 2>&5
20549 ac_status=$?
20550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20551 (exit $ac_status); }; }
8ada417f
ZW
20552 then
20553 if test x$gcc_cv_nm != x; then
20554 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
20555 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
20556 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
20557 then :
20558 else gcc_cv_as_subsection_m1=yes
20559 fi
20560 rm -f conftest.nm1 conftest.nm2
20561 fi
20562 else
20563 echo "configure: failed program was" >&5
20564 cat conftest.s >&5
20565 fi
20566 rm -f conftest.o conftest.s
20567 fi
981d4858 20568fi
b61ff9c8
BS
20569echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
20570echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 20571if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
20572
20573cat >>confdefs.h <<\_ACEOF
981d4858 20574#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 20575_ACEOF
981d4858 20576
d1accaa3 20577fi
ad9c4d9f 20578
b61ff9c8
BS
20579echo "$as_me:$LINENO: checking assembler for .weak" >&5
20580echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
ba479fd2
NN
20581if test "${gcc_cv_as_weak+set}" = set; then
20582 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20583else
20584 gcc_cv_as_weak=no
20585 if test $in_tree_gas = yes; then
20586 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
20587 then gcc_cv_as_weak=yes
ad9c4d9f 20588fi
8ada417f 20589 elif test x$gcc_cv_as != x; then
6e3f3080 20590 echo ' .weak foobar' > conftest.s
ba479fd2
NN
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); }; }
8ada417f
ZW
20597 then
20598 gcc_cv_as_weak=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
981d4858 20605fi
b61ff9c8
BS
20606echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
20607echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 20608if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
20609
20610cat >>confdefs.h <<\_ACEOF
981d4858 20611#define HAVE_GAS_WEAK 1
ba479fd2 20612_ACEOF
981d4858 20613
12822146 20614fi
ad9c4d9f 20615
b61ff9c8
BS
20616echo "$as_me:$LINENO: checking assembler for .weakref" >&5
20617echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
a0203ca7
AO
20618if test "${gcc_cv_as_weakref+set}" = set; then
20619 echo $ECHO_N "(cached) $ECHO_C" >&6
20620else
20621 gcc_cv_as_weakref=no
20622 if test $in_tree_gas = yes; then
20623 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
20624 then gcc_cv_as_weakref=yes
20625fi
20626 elif test x$gcc_cv_as != x; then
20627 echo ' .weakref foobar, barfnot' > conftest.s
20628 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20630 (eval $ac_try) 2>&5
20631 ac_status=$?
20632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20633 (exit $ac_status); }; }
20634 then
20635 gcc_cv_as_weakref=yes
20636 else
20637 echo "configure: failed program was" >&5
20638 cat conftest.s >&5
20639 fi
20640 rm -f conftest.o conftest.s
20641 fi
20642fi
b61ff9c8
BS
20643echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
20644echo "${ECHO_T}$gcc_cv_as_weakref" >&6
a0203ca7
AO
20645if test $gcc_cv_as_weakref = yes; then
20646
20647cat >>confdefs.h <<\_ACEOF
20648#define HAVE_GAS_WEAKREF 1
20649_ACEOF
20650
20651fi
20652
b61ff9c8
BS
20653echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
20654echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
e41f3691
JDA
20655if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
20656 echo $ECHO_N "(cached) $ECHO_C" >&6
20657else
20658 gcc_cv_as_nsubspa_comdat=no
20659 if test $in_tree_gas = yes; then
20660 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
20661 then gcc_cv_as_nsubspa_comdat=yes
20662fi
20663 elif test x$gcc_cv_as != x; then
20664 echo ' .SPACE $TEXT$
20665 .NSUBSPA $CODE$,COMDAT' > conftest.s
20666 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20668 (eval $ac_try) 2>&5
20669 ac_status=$?
20670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20671 (exit $ac_status); }; }
20672 then
20673 gcc_cv_as_nsubspa_comdat=yes
20674 else
20675 echo "configure: failed program was" >&5
20676 cat conftest.s >&5
20677 fi
20678 rm -f conftest.o conftest.s
20679 fi
20680fi
b61ff9c8
BS
20681echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
20682echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
e41f3691
JDA
20683if test $gcc_cv_as_nsubspa_comdat = yes; then
20684
20685cat >>confdefs.h <<\_ACEOF
20686#define HAVE_GAS_NSUBSPA_COMDAT 1
20687_ACEOF
20688
20689fi
20690
8ada417f
ZW
20691# .hidden needs to be supported in both the assembler and the linker,
20692# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
20693# This is irritatingly difficult to feature test for; we have to check the
20694# date string after the version number. If we've got an in-tree
20695# ld, we don't know its patchlevel version, so we set the baseline at 2.13
20696# to be safe.
20697# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
b61ff9c8
BS
20698echo "$as_me:$LINENO: checking assembler for .hidden" >&5
20699echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
ba479fd2
NN
20700if test "${gcc_cv_as_hidden+set}" = set; then
20701 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20702else
20703 gcc_cv_as_hidden=no
20704 if test $in_tree_gas = yes; then
20705 if test $in_tree_gas_is_elf = yes \
20706 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
20707 then gcc_cv_as_hidden=yes
20708fi
20709 elif test x$gcc_cv_as != x; then
6e3f3080 20710 echo ' .hidden foobar
8ada417f 20711foobar:' > conftest.s
ba479fd2
NN
20712 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20714 (eval $ac_try) 2>&5
20715 ac_status=$?
20716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20717 (exit $ac_status); }; }
8ada417f
ZW
20718 then
20719 gcc_cv_as_hidden=yes
20720 else
20721 echo "configure: failed program was" >&5
20722 cat conftest.s >&5
20723 fi
20724 rm -f conftest.o conftest.s
20725 fi
20726fi
b61ff9c8
BS
20727echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
20728echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 20729
ad9c4d9f 20730
b61ff9c8
BS
20731echo "$as_me:$LINENO: checking linker for .hidden support" >&5
20732echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
ba479fd2
NN
20733if test "${gcc_cv_ld_hidden+set}" = set; then
20734 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20735else
20736 if test $in_tree_ld = yes ; then
20737 gcc_cv_ld_hidden=no
20738 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 \
20739 && test $in_tree_ld_is_elf = yes; then
20740 gcc_cv_ld_hidden=yes
20741 fi
20742else
20743 gcc_cv_ld_hidden=yes
bace148a 20744 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
20745 if echo "$ld_ver" | grep GNU > /dev/null; then
20746 ld_vers=`echo $ld_ver | sed -n \
115e6e55 20747 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
8ada417f 20748 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
20749 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
20750 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
20751 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
20752 if test 0"$ld_date" -lt 20020404; then
20753 if test -n "$ld_date"; then
20754 # If there was date string, but was earlier than 2002-04-04, fail
20755 gcc_cv_ld_hidden=no
20756 elif test -z "$ld_vers"; then
20757 # If there was no date string nor ld version number, something is wrong
20758 gcc_cv_ld_hidden=no
20759 else
8ada417f
ZW
20760 test -z "$ld_vers_patch" && ld_vers_patch=0
20761 if test "$ld_vers_major" -lt 2; then
20762 gcc_cv_ld_hidden=no
20763 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
20764 gcc_cv_ld_hidden="no"
20765 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
20766 gcc_cv_ld_hidden=no
c72931a6 20767 fi
8ada417f 20768 fi
789b7de5 20769 fi
8ada417f 20770 else
28690784 20771 case "${target}" in
b0fd7d27 20772 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
20773 gcc_cv_ld_hidden=yes
20774 ;;
20775 *)
20776 gcc_cv_ld_hidden=no
20777 ;;
20778 esac
8ada417f
ZW
20779 fi
20780fi
6d07784a 20781fi
b61ff9c8
BS
20782echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
20783echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 20784libgcc_visibility=no
ad9c4d9f 20785
232b67d9 20786
8e3940b2 20787if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 20788 libgcc_visibility=yes
ba479fd2
NN
20789
20790cat >>confdefs.h <<\_ACEOF
8ada417f 20791#define HAVE_GAS_HIDDEN 1
ba479fd2 20792_ACEOF
ad9c4d9f
NN
20793
20794fi
20795
8ada417f 20796# Check if we have .[us]leb128, and support symbol arithmetic with it.
b61ff9c8
BS
20797echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
20798echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
ba479fd2
NN
20799if test "${gcc_cv_as_leb128+set}" = set; then
20800 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20801else
20802 gcc_cv_as_leb128=no
20803 if test $in_tree_gas = yes; then
20804 if test $in_tree_gas_is_elf = yes \
20805 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
20806 then gcc_cv_as_leb128=yes
20807fi
20808 elif test x$gcc_cv_as != x; then
6e3f3080 20809 echo ' .data
b7460f24
RH
20810 .uleb128 L2 - L1
20811L1:
20812 .uleb128 1280
20813 .sleb128 -1010
8ada417f 20814L2:' > conftest.s
ba479fd2
NN
20815 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20817 (eval $ac_try) 2>&5
20818 ac_status=$?
20819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20820 (exit $ac_status); }; }
8ada417f
ZW
20821 then
20822 # GAS versions before 2.11 do not support uleb128,
20823 # despite appearing to.
20824 # ??? There exists an elf-specific test that will crash
20825 # the assembler. Perhaps it's better to figure out whether
20826 # arbitrary sections are supported and try the test.
bace148a 20827 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f 20828 if echo "$as_ver" | grep GNU > /dev/null; then
ddcd0f6f 20829 as_vers=`echo $as_ver | sed -n \
115e6e55 20830 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
ddcd0f6f
BS
20831 as_major=`expr "$as_vers" : '\([0-9]*\)'`
20832 as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
20833 if test $as_major -eq 2 && test $as_minor -lt 11
20834 then :
20835 else gcc_cv_as_leb128=yes
20836 fi
20837 fi
20838 else
20839 echo "configure: failed program was" >&5
20840 cat conftest.s >&5
20841 fi
20842 rm -f conftest.o conftest.s
20843 fi
b7460f24 20844fi
b61ff9c8
BS
20845echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
20846echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 20847if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
20848
20849cat >>confdefs.h <<\_ACEOF
b7460f24 20850#define HAVE_AS_LEB128 1
ba479fd2 20851_ACEOF
b7460f24
RH
20852
20853fi
ad9c4d9f 20854
d4ea4622
RH
20855# Check if we have assembler support for unwind directives.
20856echo "$as_me:$LINENO: checking assembler for cfi directives" >&5
20857echo $ECHO_N "checking assembler for cfi directives... $ECHO_C" >&6
20858if test "${gcc_cv_as_cfi_directive+set}" = set; then
20859 echo $ECHO_N "(cached) $ECHO_C" >&6
20860else
20861 gcc_cv_as_cfi_directive=no
6e60703f 20862 if test x$gcc_cv_as != x; then
d4ea4622
RH
20863 echo ' .text
20864 .cfi_startproc
20865 .cfi_offset 0, 0
20866 .cfi_same_value 1
20867 .cfi_def_cfa 1, 2
20868 .cfi_escape 1, 2, 3, 4, 5
20869 .cfi_endproc' > conftest.s
20870 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20872 (eval $ac_try) 2>&5
20873 ac_status=$?
20874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20875 (exit $ac_status); }; }
20876 then
20877 gcc_cv_as_cfi_directive=yes
20878 else
20879 echo "configure: failed program was" >&5
20880 cat conftest.s >&5
20881 fi
20882 rm -f conftest.o conftest.s
20883 fi
20884fi
20885echo "$as_me:$LINENO: result: $gcc_cv_as_cfi_directive" >&5
20886echo "${ECHO_T}$gcc_cv_as_cfi_directive" >&6
20887
20888
20889cat >>confdefs.h <<_ACEOF
20890#define HAVE_GAS_CFI_DIRECTIVE `if test $gcc_cv_as_cfi_directive = yes; then echo 1; else echo 0; fi`
20891_ACEOF
20892
20893
058514b3
RH
20894echo "$as_me:$LINENO: checking assembler for cfi personality directive" >&5
20895echo $ECHO_N "checking assembler for cfi personality directive... $ECHO_C" >&6
20896if test "${gcc_cv_as_cfi_personality_directive+set}" = set; then
20897 echo $ECHO_N "(cached) $ECHO_C" >&6
20898else
20899 gcc_cv_as_cfi_personality_directive=no
6e60703f 20900 if test x$gcc_cv_as != x; then
058514b3 20901 echo ' .text
042628f9 20902 .cfi_startproc
058514b3
RH
20903 .cfi_personality 0, symbol
20904 .cfi_endproc' > conftest.s
20905 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20907 (eval $ac_try) 2>&5
20908 ac_status=$?
20909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20910 (exit $ac_status); }; }
20911 then
20912 gcc_cv_as_cfi_personality_directive=yes
20913 else
20914 echo "configure: failed program was" >&5
20915 cat conftest.s >&5
20916 fi
20917 rm -f conftest.o conftest.s
20918 fi
20919fi
20920echo "$as_me:$LINENO: result: $gcc_cv_as_cfi_personality_directive" >&5
20921echo "${ECHO_T}$gcc_cv_as_cfi_personality_directive" >&6
20922
20923
20924cat >>confdefs.h <<_ACEOF
20925#define HAVE_GAS_CFI_PERSONALITY_DIRECTIVE `if test $gcc_cv_as_cfi_personality_directive = yes;
20926 then echo 1; else echo 0; fi`
20927_ACEOF
20928
20929
8ada417f
ZW
20930# GAS versions up to and including 2.11.0 may mis-optimize
20931# .eh_frame data.
b61ff9c8
BS
20932echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
20933echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
ba479fd2
NN
20934if test "${gcc_cv_as_eh_frame+set}" = set; then
20935 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20936else
20937 gcc_cv_as_eh_frame=no
20938 if test $in_tree_gas = yes; then
20939 if test $in_tree_gas_is_elf = yes \
20940 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
20941 then gcc_cv_as_eh_frame=yes
ad9c4d9f 20942fi
8ada417f 20943 elif test x$gcc_cv_as != x; then
6e3f3080 20944 echo ' .text
c64688ae
RH
20945.LFB1:
20946 .4byte 0
20947.L1:
20948 .4byte 0
20949.LFE1:
20950 .section .eh_frame,"aw",@progbits
20951__FRAME_BEGIN__:
20952 .4byte .LECIE1-.LSCIE1
20953.LSCIE1:
20954 .4byte 0x0
20955 .byte 0x1
20956 .ascii "z\0"
20957 .byte 0x1
20958 .byte 0x78
20959 .byte 0x1a
20960 .byte 0x0
20961 .byte 0x4
20962 .4byte 1
20963 .p2align 1
20964.LECIE1:
20965.LSFDE1:
20966 .4byte .LEFDE1-.LASFDE1
20967.LASFDE1:
20968 .4byte .LASFDE1-__FRAME_BEGIN__
20969 .4byte .LFB1
20970 .4byte .LFE1-.LFB1
20971 .byte 0x4
20972 .4byte .LFE1-.LFB1
20973 .byte 0x4
20974 .4byte .L1-.LFB1
8ada417f 20975.LEFDE1:' > conftest.s
ba479fd2
NN
20976 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20978 (eval $ac_try) 2>&5
20979 ac_status=$?
20980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20981 (exit $ac_status); }; }
8ada417f
ZW
20982 then
20983 cat > conftest.lit <<EOF
c64688ae
RH
20984 0000 10000000 00000000 017a0001 781a0004 .........z..x...
20985 0010 01000000 12000000 18000000 00000000 ................
093e61a6 20986 0020 08000000 04080000 0044 .........D
01efb963 20987EOF
ba479fd2 20988cat > conftest.big <<EOF
01efb963
AS
20989 0000 00000010 00000000 017a0001 781a0004 .........z..x...
20990 0010 00000001 00000012 00000018 00000000 ................
093e61a6 20991 0020 00000008 04000000 0844 .........D
c64688ae 20992EOF
8ada417f
ZW
20993 # If the assembler didn't choke, and we can objdump,
20994 # and we got the correct data, then succeed.
dbc02e7f
AS
20995 # The text in the here-document typically retains its unix-style line
20996 # endings, while the output of objdump will use host line endings.
20997 # Therefore, use diff -b for the comparisons.
8ada417f
ZW
20998 if test x$gcc_cv_objdump != x \
20999 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
21000 | tail -3 > conftest.got \
dbc02e7f
AS
21001 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
21002 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
8ada417f
ZW
21003 then
21004 gcc_cv_as_eh_frame=yes
ba479fd2
NN
21005 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
21006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21007 (eval $ac_try) 2>&5
21008 ac_status=$?
21009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21010 (exit $ac_status); }; }; then
8ada417f
ZW
21011 gcc_cv_as_eh_frame=buggy
21012 else
21013 # Uh oh, what do we do now?
21014 gcc_cv_as_eh_frame=no
21015 fi
21016 else
21017 echo "configure: failed program was" >&5
21018 cat conftest.s >&5
21019 fi
21020 rm -f conftest.o conftest.s
21021 fi
c64688ae 21022fi
b61ff9c8
BS
21023echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
21024echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 21025
6e3f3080 21026
63cf211a 21027if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
21028
21029cat >>confdefs.h <<\_ACEOF
8ada417f 21030#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 21031_ACEOF
ad9c4d9f
NN
21032
21033fi
21034
b61ff9c8
BS
21035echo "$as_me:$LINENO: checking assembler for section merging support" >&5
21036echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
ba479fd2
NN
21037if test "${gcc_cv_as_shf_merge+set}" = set; then
21038 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
21039else
21040 gcc_cv_as_shf_merge=no
21041 if test $in_tree_gas = yes; then
21042 if test $in_tree_gas_is_elf = yes \
21043 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21044 then gcc_cv_as_shf_merge=yes
21045fi
21046 elif test x$gcc_cv_as != x; then
6e3f3080 21047 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
21048 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
21049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21050 (eval $ac_try) 2>&5
21051 ac_status=$?
21052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21053 (exit $ac_status); }; }
8ada417f
ZW
21054 then
21055 gcc_cv_as_shf_merge=yes
21056 else
21057 echo "configure: failed program was" >&5
21058 cat conftest.s >&5
21059 fi
21060 rm -f conftest.o conftest.s
21061 fi
201556f0 21062fi
b61ff9c8
BS
21063echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
21064echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 21065
c18a5b6c 21066if test $gcc_cv_as_shf_merge = no; then
b61ff9c8
BS
21067 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
21068echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
c18a5b6c
MM
21069if test "${gcc_cv_as_shf_merge+set}" = set; then
21070 echo $ECHO_N "(cached) $ECHO_C" >&6
21071else
21072 gcc_cv_as_shf_merge=no
21073 if test $in_tree_gas = yes; then
21074 if test $in_tree_gas_is_elf = yes \
21075 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21076 then gcc_cv_as_shf_merge=yes
21077fi
21078 elif test x$gcc_cv_as != x; then
21079 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
21080 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
21081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21082 (eval $ac_try) 2>&5
21083 ac_status=$?
21084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21085 (exit $ac_status); }; }
21086 then
21087 gcc_cv_as_shf_merge=yes
21088 else
21089 echo "configure: failed program was" >&5
21090 cat conftest.s >&5
21091 fi
21092 rm -f conftest.o conftest.s
21093 fi
21094fi
b61ff9c8
BS
21095echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
21096echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
c18a5b6c
MM
21097
21098fi
8ad9fb33 21099
ba479fd2 21100cat >>confdefs.h <<_ACEOF
8ad9fb33 21101#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 21102_ACEOF
201556f0 21103
201556f0 21104
b61ff9c8
BS
21105echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
21106echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
21107if test "${gcc_cv_as_comdat_group+set}" = set; then
21108 echo $ECHO_N "(cached) $ECHO_C" >&6
21109else
21110 gcc_cv_as_comdat_group=no
21111 if test $in_tree_gas = yes; then
21112 if test $in_tree_gas_is_elf = yes \
11176d2a 21113 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
21114 then gcc_cv_as_comdat_group=yes
21115fi
21116 elif test x$gcc_cv_as != x; then
21117 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
21118 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
21119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21120 (eval $ac_try) 2>&5
21121 ac_status=$?
21122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21123 (exit $ac_status); }; }
21124 then
21125 gcc_cv_as_comdat_group=yes
21126 else
21127 echo "configure: failed program was" >&5
21128 cat conftest.s >&5
21129 fi
21130 rm -f conftest.o conftest.s
21131 fi
21132fi
b61ff9c8
BS
21133echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
21134echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
c18a5b6c
MM
21135
21136if test $gcc_cv_as_comdat_group = yes; then
21137 gcc_cv_as_comdat_group_percent=no
21138else
b61ff9c8
BS
21139 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
21140echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
21141if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
21142 echo $ECHO_N "(cached) $ECHO_C" >&6
21143else
21144 gcc_cv_as_comdat_group_percent=no
21145 if test $in_tree_gas = yes; then
21146 if test $in_tree_gas_is_elf = yes \
11176d2a 21147 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
21148 then gcc_cv_as_comdat_group_percent=yes
21149fi
21150 elif test x$gcc_cv_as != x; then
21151 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
21152 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
21153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21154 (eval $ac_try) 2>&5
21155 ac_status=$?
21156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21157 (exit $ac_status); }; }
21158 then
21159 gcc_cv_as_comdat_group_percent=yes
21160 else
21161 echo "configure: failed program was" >&5
21162 cat conftest.s >&5
21163 fi
21164 rm -f conftest.o conftest.s
21165 fi
21166fi
b61ff9c8
BS
21167echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
21168echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
c18a5b6c
MM
21169
21170fi
11176d2a
JB
21171if test $in_tree_ld != yes && test x"$ld_vers" != x; then
21172 comdat_group=yes
21173 if test 0"$ld_date" -lt 20050308; then
21174 if test -n "$ld_date"; then
21175 # If there was date string, but was earlier than 2005-03-08, fail
21176 comdat_group=no
21177 elif test "$ld_vers_major" -lt 2; then
21178 comdat_group=no
21179 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
21180 comdat_group=no
21181 fi
21182 fi
1cf0118d
RO
21183else
21184 # assume linkers other than GNU ld don't support COMDAT group
21185 comdat_group=no
21186fi
21187if test $comdat_group = no; then
21188 gcc_cv_as_comdat_group=no
21189 gcc_cv_as_comdat_group_percent=no
11176d2a 21190fi
c18a5b6c
MM
21191
21192cat >>confdefs.h <<_ACEOF
11176d2a 21193#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
21194_ACEOF
21195
21196
8ada417f 21197# Thread-local storage - the check is heavily parametrized.
f996902d
RH
21198conftest_s=
21199tls_first_major=
21200tls_first_minor=
9739c90c 21201tls_as_opt=
f996902d 21202case "$target" in
6f9b006d
RH
21203 alpha*-*-*)
21204 conftest_s='
21205 .section ".tdata","awT",@progbits
21206foo: .long 25
21207 .text
21208 ldq $27,__tls_get_addr($29) !literal!1
21209 lda $16,foo($29) !tlsgd!1
21210 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
21211 ldq $27,__tls_get_addr($29) !literal!2
21212 lda $16,foo($29) !tlsldm!2
21213 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
21214 ldq $1,foo($29) !gotdtprel
21215 ldah $2,foo($29) !dtprelhi
21216 lda $3,foo($2) !dtprello
21217 lda $4,foo($29) !dtprel
21218 ldq $1,foo($29) !gottprel
21219 ldah $2,foo($29) !tprelhi
21220 lda $3,foo($2) !tprello
21221 lda $4,foo($29) !tprel'
21222 tls_first_major=2
21223 tls_first_minor=13
2f3321ca 21224 tls_as_opt=--fatal-warnings
6f9b006d 21225 ;;
e4dd71de
AH
21226 frv*-*-*)
21227 conftest_s='
21228 .section ".tdata","awT",@progbits
21229x: .long 25
21230 .text
21231 call #gettlsoff(x)'
21232 tls_first_major=2
21233 tls_first_minor=14
21234 ;;
51076f96
RC
21235 hppa*-*-linux*)
21236 conftest_s='
21237t1: .reg %r20
21238t2: .reg %r21
21239gp: .reg %r19
21240 .section ".tdata","awT",@progbits
21241foo: .long 25
21242 .text
21243 .align 4
21244 addil LT%foo-$tls_gdidx$,gp
21245 ldo RT%foo-$tls_gdidx$(%r1),%arg0
21246 b __tls_get_addr
21247 nop
21248 addil LT%foo-$tls_ldidx$,gp
21249 b __tls_get_addr
21250 ldo RT%foo-$tls_ldidx$(%r1),%arg0
21251 addil LR%foo-$tls_dtpoff$,%ret0
21252 ldo RR%foo-$tls_dtpoff$(%r1),%t1
21253 mfctl %cr27,%t1
21254 addil LT%foo-$tls_ieoff$,gp
21255 ldw RT%foo-$tls_ieoff$(%r1),%t2
21256 add %t1,%t2,%t3
21257 mfctl %cr27,%t1
21258 addil LR%foo-$tls_leoff$,%t1
21259 ldo RR%foo-$tls_leoff$(%r1),%t2'
21260 tls_first_major=2
21261 tls_first_minor=15
21262 tls_as_opt=--fatal-warnings
21263 ;;
d3585b76
DJ
21264 arm*-*-*)
21265 conftest_s='
21266 .section ".tdata","awT",%progbits
21267foo: .long 25
21268 .text
21269.word foo(gottpoff)
21270.word foo(tpoff)
21271.word foo(tlsgd)
21272.word foo(tlsldm)
21273.word foo(tlsldo)'
21274 tls_first_major=2
21275 tls_first_minor=17
21276 ;;
f996902d
RH
21277 i[34567]86-*-*)
21278 conftest_s='
21279 .section ".tdata","awT",@progbits
21280foo: .long 25
21281 .text
21282 movl %gs:0, %eax
21283 leal foo@TLSGD(,%ebx,1), %eax
21284 leal foo@TLSLDM(%ebx), %eax
21285 leal foo@DTPOFF(%eax), %edx
21286 movl foo@GOTTPOFF(%ebx), %eax
21287 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
21288 addl foo@GOTNTPOFF(%ebx), %eax
21289 movl foo@INDNTPOFF, %eax
f996902d
RH
21290 movl $foo@TPOFF, %eax
21291 subl $foo@TPOFF, %eax
21292 leal foo@NTPOFF(%ecx), %eax'
21293 tls_first_major=2
75d38379 21294 tls_first_minor=14
2f3321ca 21295 tls_as_opt=--fatal-warnings
75d38379
JJ
21296 ;;
21297 x86_64-*-*)
21298 conftest_s='
21299 .section ".tdata","awT",@progbits
21300foo: .long 25
21301 .text
21302 movq %fs:0, %rax
21303 leaq foo@TLSGD(%rip), %rdi
21304 leaq foo@TLSLD(%rip), %rdi
21305 leaq foo@DTPOFF(%rax), %rdx
21306 movq foo@GOTTPOFF(%rip), %rax
21307 movq $foo@TPOFF, %rax'
21308 tls_first_major=2
21309 tls_first_minor=14
2f3321ca 21310 tls_as_opt=--fatal-warnings
f996902d 21311 ;;
7b6e506e
RH
21312 ia64-*-*)
21313 conftest_s='
21314 .section ".tdata","awT",@progbits
21315foo: data8 25
21316 .text
21317 addl r16 = @ltoff(@dtpmod(foo#)), gp
21318 addl r17 = @ltoff(@dtprel(foo#)), gp
21319 addl r18 = @ltoff(@tprel(foo#)), gp
21320 addl r19 = @dtprel(foo#), gp
21321 adds r21 = @dtprel(foo#), r13
21322 movl r23 = @dtprel(foo#)
21323 addl r20 = @tprel(foo#), gp
21324 adds r22 = @tprel(foo#), r13
21325 movl r24 = @tprel(foo#)'
21326 tls_first_major=2
21327 tls_first_minor=13
2f3321ca 21328 tls_as_opt=--fatal-warnings
7b6e506e 21329 ;;
69229b81
DJ
21330 mips*-*-*)
21331 conftest_s='
21332 .section .tdata,"awT",@progbits
21333x:
21334 .word 2
21335 .text
21336 addiu $4, $28, %tlsgd(x)
21337 addiu $4, $28, %tlsldm(x)
21338 lui $4, %dtprel_hi(x)
21339 addiu $4, $4, %dtprel_lo(x)
21340 lw $4, %gottprel(x)($28)
21341 lui $4, %tprel_hi(x)
21342 addiu $4, $4, %tprel_lo(x)'
21343 tls_first_major=2
21344 tls_first_minor=16
21345 tls_as_opt='-32 --fatal-warnings'
21346 ;;
c4501e62
JJ
21347 powerpc-*-*)
21348 conftest_s='
21349 .section ".tdata","awT",@progbits
21350 .align 2
21351ld0: .space 4
21352ld1: .space 4
21353x1: .space 4
21354x2: .space 4
21355x3: .space 4
21356 .text
21357 addi 3,31,ld0@got@tlsgd
21358 bl __tls_get_addr
21359 addi 3,31,x1@got@tlsld
21360 bl __tls_get_addr
21361 addi 9,3,x1@dtprel
21362 addis 9,3,x2@dtprel@ha
21363 addi 9,9,x2@dtprel@l
21364 lwz 9,x3@got@tprel(31)
21365 add 9,9,x@tls
21366 addi 9,2,x1@tprel
21367 addis 9,2,x2@tprel@ha
21368 addi 9,9,x2@tprel@l'
21369 tls_first_major=2
21370 tls_first_minor=14
2f3321ca 21371 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
21372 ;;
21373 powerpc64-*-*)
21374 conftest_s='
21375 .section ".tdata","awT",@progbits
21376 .align 3
21377ld0: .space 8
21378ld1: .space 8
21379x1: .space 8
21380x2: .space 8
21381x3: .space 8
21382 .text
21383 addi 3,2,ld0@got@tlsgd
21384 bl .__tls_get_addr
21385 nop
21386 addi 3,2,ld1@toc
21387 bl .__tls_get_addr
21388 nop
21389 addi 3,2,x1@got@tlsld
21390 bl .__tls_get_addr
21391 nop
21392 addi 9,3,x1@dtprel
21393 bl .__tls_get_addr
21394 nop
21395 addis 9,3,x2@dtprel@ha
21396 addi 9,9,x2@dtprel@l
21397 bl .__tls_get_addr
21398 nop
21399 ld 9,x3@got@dtprel(2)
21400 add 9,9,3
21401 bl .__tls_get_addr
21402 nop'
21403 tls_first_major=2
21404 tls_first_minor=14
2f3321ca 21405 tls_as_opt="-a64 --fatal-warnings"
c4501e62 21406 ;;
fd3cd001
UW
21407 s390-*-*)
21408 conftest_s='
21409 .section ".tdata","awT",@progbits
21410foo: .long 25
21411 .text
21412 .long foo@TLSGD
21413 .long foo@TLSLDM
21414 .long foo@DTPOFF
21415 .long foo@NTPOFF
21416 .long foo@GOTNTPOFF
21417 .long foo@INDNTPOFF
21418 l %r1,foo@GOTNTPOFF(%r12)
21419 l %r1,0(%r1):tls_load:foo
21420 bas %r14,0(%r1,%r13):tls_gdcall:foo
21421 bas %r14,0(%r1,%r13):tls_ldcall:foo'
21422 tls_first_major=2
21423 tls_first_minor=14
2f3321ca 21424 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
21425 ;;
21426 s390x-*-*)
21427 conftest_s='
21428 .section ".tdata","awT",@progbits
21429foo: .long 25
21430 .text
21431 .quad foo@TLSGD
21432 .quad foo@TLSLDM
21433 .quad foo@DTPOFF
21434 .quad foo@NTPOFF
21435 .quad foo@GOTNTPOFF
21436 lg %r1,foo@GOTNTPOFF(%r12)
21437 larl %r1,foo@INDNTPOFF
21438 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
21439 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
21440 tls_first_major=2
21441 tls_first_minor=14
2f3321ca 21442 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 21443 ;;
9ff13962
KK
21444 sh-*-* | sh[34]-*-*)
21445 conftest_s='
21446 .section ".tdata","awT",@progbits
21447foo: .long 25
21448 .text
21449 .long foo@TLSGD
21450 .long foo@TLSLDM
21451 .long foo@DTPOFF
21452 .long foo@GOTTPOFF
21453 .long foo@TPOFF'
21454 tls_first_major=2
21455 tls_first_minor=13
2f3321ca 21456 tls_as_opt=--fatal-warnings
9ff13962 21457 ;;
5751a10b 21458 sparc*-*-*)
2f3321ca 21459 case "$target" in
7935dc1b
EB
21460 sparc*-sun-solaris2.[56789]*)
21461 # TLS was introduced in the Solaris 9 4/04 release but
21462 # we do not enable it by default on Solaris 9 either.
21463 if test "x$enable_tls" = xyes ; then
21464 on_solaris=yes
21465 else
21466 enable_tls=no;
21467 fi
21468 ;;
2f3321ca
EB
21469 sparc*-sun-solaris2.*)
21470 on_solaris=yes
21471 ;;
21472 *)
21473 on_solaris=no
21474 ;;
21475 esac
21476 if test x$on_solaris = xyes && test x$gas_flag = xno; then
21477 conftest_s='
21478 .section ".tdata",#alloc,#write,#tls
21479foo: .long 25
21480 .text
21481 sethi %tgd_hi22(foo), %o0
21482 add %o0, %tgd_lo10(foo), %o1
21483 add %l7, %o1, %o0, %tgd_add(foo)
21484 call __tls_get_addr, %tgd_call(foo)
21485 sethi %tldm_hi22(foo), %l1
21486 add %l1, %tldm_lo10(foo), %l2
21487 add %l7, %l2, %o0, %tldm_add(foo)
21488 call __tls_get_addr, %tldm_call(foo)
21489 sethi %tldo_hix22(foo), %l3
21490 xor %l3, %tldo_lox10(foo), %l4
21491 add %o0, %l4, %l5, %tldo_add(foo)
21492 sethi %tie_hi22(foo), %o3
21493 add %o3, %tie_lo10(foo), %o3
21494 ld [%l7 + %o3], %o2, %tie_ld(foo)
21495 add %g7, %o2, %o4, %tie_add(foo)
21496 sethi %tle_hix22(foo), %l1
21497 xor %l1, %tle_lox10(foo), %o5
21498 ld [%g7 + %o5], %o1'
21499 tls_first_major=0
21500 tls_first_minor=0
21501 else
21502 conftest_s='
5751a10b
JJ
21503 .section ".tdata","awT",@progbits
21504foo: .long 25
21505 .text
21506 sethi %tgd_hi22(foo), %o0
21507 add %o0, %tgd_lo10(foo), %o1
21508 add %l7, %o1, %o0, %tgd_add(foo)
21509 call __tls_get_addr, %tgd_call(foo)
21510 sethi %tldm_hi22(foo), %l1
21511 add %l1, %tldm_lo10(foo), %l2
21512 add %l7, %l2, %o0, %tldm_add(foo)
21513 call __tls_get_addr, %tldm_call(foo)
21514 sethi %tldo_hix22(foo), %l3
21515 xor %l3, %tldo_lox10(foo), %l4
21516 add %o0, %l4, %l5, %tldo_add(foo)
21517 sethi %tie_hi22(foo), %o3
21518 add %o3, %tie_lo10(foo), %o3
21519 ld [%l7 + %o3], %o2, %tie_ld(foo)
21520 add %g7, %o2, %o4, %tie_add(foo)
21521 sethi %tle_hix22(foo), %l1
21522 xor %l1, %tle_lox10(foo), %o5
21523 ld [%g7 + %o5], %o1'
21524 tls_first_major=2
21525 tls_first_minor=14
2f3321ca
EB
21526 tls_as_opt="-32 --fatal-warnings"
21527 fi
5751a10b 21528 ;;
f996902d 21529esac
8dea1cca
DD
21530set_have_as_tls=no
21531if test "x$enable_tls" = xno ; then
21532 : # TLS explicitly disabled.
21533elif test "x$enable_tls" = xyes ; then
21534 set_have_as_tls=yes # TLS explicitly enabled.
21535elif test -z "$tls_first_major"; then
8ada417f
ZW
21536 : # If we don't have a check, assume no support.
21537else
b61ff9c8
BS
21538 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
21539echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
ba479fd2
NN
21540if test "${gcc_cv_as_tls+set}" = set; then
21541 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
21542else
21543 gcc_cv_as_tls=no
21544 if test $in_tree_gas = yes; then
21545 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
21546 then gcc_cv_as_tls=yes
ad9c4d9f 21547fi
8ada417f 21548 elif test x$gcc_cv_as != x; then
6e3f3080 21549 echo "$conftest_s" > conftest.s
2f3321ca 21550 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
21551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21552 (eval $ac_try) 2>&5
21553 ac_status=$?
21554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21555 (exit $ac_status); }; }
8ada417f
ZW
21556 then
21557 gcc_cv_as_tls=yes
21558 else
21559 echo "configure: failed program was" >&5
21560 cat conftest.s >&5
21561 fi
21562 rm -f conftest.o conftest.s
f996902d 21563 fi
f996902d 21564fi
b61ff9c8
BS
21565echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
21566echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 21567if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
21568 set_have_as_tls=yes
21569fi
21570fi
21571if test $set_have_as_tls = yes ; then
ba479fd2
NN
21572
21573cat >>confdefs.h <<\_ACEOF
f996902d 21574#define HAVE_AS_TLS 1
ba479fd2 21575_ACEOF
f996902d 21576
8ada417f
ZW
21577fi
21578
21579# Target-specific assembler checks.
f996902d 21580
b61ff9c8
BS
21581echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
21582echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
7e9d8517
L
21583gcc_cv_ld_static_dynamic=no
21584if test $in_tree_ld = yes ; then
21585 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
21586 gcc_cv_ld_static_dynamic=yes
21587 fi
21588elif test x$gcc_cv_ld != x; then
21589 # Check if linker supports -Bstatic/-Bdynamic option
21590 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
21591 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
21592 gcc_cv_ld_static_dynamic=yes
21593 fi
21594fi
21595if test x"$gcc_cv_ld_static_dynamic" = xyes; then
21596
21597cat >>confdefs.h <<\_ACEOF
21598#define HAVE_LD_STATIC_DYNAMIC 1
21599_ACEOF
21600
21601fi
b61ff9c8
BS
21602echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
21603echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
7e9d8517 21604
d594623a 21605if test x"$demangler_in_ld" = xyes; then
b61ff9c8
BS
21606 echo "$as_me:$LINENO: checking linker --demangle support" >&5
21607echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
d594623a
L
21608 gcc_cv_ld_demangle=no
21609 if test $in_tree_ld = yes; then
21610 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 \
21611 gcc_cv_ld_demangle=yes
21612 fi
21613 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
21614 # Check if the GNU linker supports --demangle option
21615 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
21616 gcc_cv_ld_demangle=yes
21617 fi
21618 fi
21619 if test x"$gcc_cv_ld_demangle" = xyes; then
21620
21621cat >>confdefs.h <<\_ACEOF
21622#define HAVE_LD_DEMANGLE 1
21623_ACEOF
21624
21625 fi
b61ff9c8
BS
21626 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
21627echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
d594623a
L
21628fi
21629
3a37b08e
RH
21630case "$target" in
21631 # All TARGET_ABI_OSF targets.
21632 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
b61ff9c8
BS
21633 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
21634echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
21635if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
21636 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 21637else
8ada417f
ZW
21638 gcc_cv_as_alpha_explicit_relocs=no
21639 if test $in_tree_gas = yes; then
21640 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21641 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 21642fi
8ada417f 21643 elif test x$gcc_cv_as != x; then
6e3f3080 21644 echo ' .set nomacro
3a37b08e
RH
21645 .text
21646 extbl $3, $2, $3 !lituse_bytoff!1
21647 ldq $2, a($29) !literal!1
21648 ldq $4, b($29) !literal!2
21649 ldq_u $3, 0($2) !lituse_base!1
21650 ldq $27, f($29) !literal!5
21651 jsr $26, ($27), f !lituse_jsr!5
21652 ldah $29, 0($26) !gpdisp!3
21653 lda $0, c($29) !gprel
21654 ldah $1, d($29) !gprelhigh
21655 lda $1, d($1) !gprellow
8ada417f 21656 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
21657 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21659 (eval $ac_try) 2>&5
21660 ac_status=$?
21661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21662 (exit $ac_status); }; }
8ada417f
ZW
21663 then
21664 gcc_cv_as_alpha_explicit_relocs=yes
21665 else
21666 echo "configure: failed program was" >&5
21667 cat conftest.s >&5
21668 fi
21669 rm -f conftest.o conftest.s
21670 fi
cafe096b 21671fi
b61ff9c8
BS
21672echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
21673echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 21674if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
21675
21676cat >>confdefs.h <<\_ACEOF
3a37b08e 21677#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 21678_ACEOF
3a37b08e 21679
d006f5eb 21680fi
b61ff9c8
BS
21681 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
21682echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
d006f5eb
RH
21683if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
21684 echo $ECHO_N "(cached) $ECHO_C" >&6
21685else
21686 gcc_cv_as_alpha_jsrdirect_relocs=no
21687 if test $in_tree_gas = yes; then
21688 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
21689 then gcc_cv_as_alpha_jsrdirect_relocs=yes
21690fi
21691 elif test x$gcc_cv_as != x; then
21692 echo ' .set nomacro
21693 .text
21694 ldq $27, a($29) !literal!1
21695 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
21696 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21698 (eval $ac_try) 2>&5
21699 ac_status=$?
21700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21701 (exit $ac_status); }; }
21702 then
21703 gcc_cv_as_alpha_jsrdirect_relocs=yes
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
21710fi
b61ff9c8
BS
21711echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
21712echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
d006f5eb
RH
21713if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
21714
21715cat >>confdefs.h <<\_ACEOF
21716#define HAVE_AS_JSRDIRECT_RELOCS 1
21717_ACEOF
21718
86da66b5
HPN
21719fi
21720 ;;
21721
21722 cris-*-*)
b61ff9c8
BS
21723 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
21724echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
86da66b5
HPN
21725if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
21726 echo $ECHO_N "(cached) $ECHO_C" >&6
21727else
21728 gcc_cv_as_cris_no_mul_bug=no
21729 if test $in_tree_gas = yes; then
21730 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
21731 then gcc_cv_as_cris_no_mul_bug=yes
21732fi
21733 elif test x$gcc_cv_as != x; then
21734 echo '.text' > conftest.s
21735 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
21736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21737 (eval $ac_try) 2>&5
21738 ac_status=$?
21739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21740 (exit $ac_status); }; }
21741 then
21742 gcc_cv_as_cris_no_mul_bug=yes
21743 else
21744 echo "configure: failed program was" >&5
21745 cat conftest.s >&5
21746 fi
21747 rm -f conftest.o conftest.s
21748 fi
21749fi
b61ff9c8
BS
21750echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
21751echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
86da66b5
HPN
21752if test $gcc_cv_as_cris_no_mul_bug = yes; then
21753
21754cat >>confdefs.h <<\_ACEOF
21755#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
21756_ACEOF
21757
8ada417f 21758fi
3a37b08e 21759 ;;
8ada417f 21760
1cb36a98 21761 sparc*-*-*)
b61ff9c8
BS
21762 echo "$as_me:$LINENO: checking assembler for .register" >&5
21763echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
ba479fd2
NN
21764if test "${gcc_cv_as_sparc_register_op+set}" = set; then
21765 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 21766else
8ada417f
ZW
21767 gcc_cv_as_sparc_register_op=no
21768 if test x$gcc_cv_as != x; then
6e3f3080 21769 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
21770 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21772 (eval $ac_try) 2>&5
21773 ac_status=$?
21774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21775 (exit $ac_status); }; }
8ada417f
ZW
21776 then
21777 gcc_cv_as_sparc_register_op=yes
21778 else
21779 echo "configure: failed program was" >&5
21780 cat conftest.s >&5
21781 fi
21782 rm -f conftest.o conftest.s
21783 fi
cafe096b 21784fi
b61ff9c8
BS
21785echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
21786echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 21787if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
21788
21789cat >>confdefs.h <<\_ACEOF
1cb36a98 21790#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 21791_ACEOF
1cb36a98 21792
8ada417f 21793fi
1cb36a98 21794
b61ff9c8
BS
21795 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
21796echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
ba479fd2
NN
21797if test "${gcc_cv_as_sparc_relax+set}" = set; then
21798 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 21799else
8ada417f
ZW
21800 gcc_cv_as_sparc_relax=no
21801 if test x$gcc_cv_as != x; then
6e3f3080 21802 echo '.text' > conftest.s
ba479fd2
NN
21803 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
21804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21805 (eval $ac_try) 2>&5
21806 ac_status=$?
21807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21808 (exit $ac_status); }; }
8ada417f
ZW
21809 then
21810 gcc_cv_as_sparc_relax=yes
21811 else
21812 echo "configure: failed program was" >&5
21813 cat conftest.s >&5
21814 fi
21815 rm -f conftest.o conftest.s
21816 fi
cafe096b 21817fi
b61ff9c8
BS
21818echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
21819echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 21820if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
21821
21822cat >>confdefs.h <<\_ACEOF
e95b1e6a 21823#define HAVE_AS_RELAX_OPTION 1
ba479fd2 21824_ACEOF
e95b1e6a 21825
8ada417f 21826fi
e95b1e6a 21827
b61ff9c8
BS
21828 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
21829echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
ba479fd2
NN
21830if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
21831 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 21832else
8ada417f
ZW
21833 gcc_cv_as_sparc_ua_pcrel=no
21834 if test x$gcc_cv_as != x; then
6e3f3080 21835 echo '.text
8ada417f
ZW
21836foo:
21837 nop
21838.data
21839.align 4
21840.byte 0
21841.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
21842 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
21843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21844 (eval $ac_try) 2>&5
21845 ac_status=$?
21846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21847 (exit $ac_status); }; }
8ada417f
ZW
21848 then
21849 if test x$gcc_cv_ld != x \
21850 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
21851 gcc_cv_as_sparc_ua_pcrel=yes
21852 fi
21853 rm -f conftest
21854 else
21855 echo "configure: failed program was" >&5
21856 cat conftest.s >&5
21857 fi
21858 rm -f conftest.o conftest.s
21859 fi
cafe096b 21860fi
b61ff9c8
BS
21861echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
21862echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 21863if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
21864
21865cat >>confdefs.h <<\_ACEOF
17e9e88c 21866#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 21867_ACEOF
17e9e88c 21868
17e9e88c 21869
b61ff9c8
BS
21870 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
21871echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
ba479fd2
NN
21872if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
21873 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 21874else
8ada417f
ZW
21875 gcc_cv_as_sparc_ua_pcrel_hidden=no
21876 if test x$gcc_cv_as != x; then
6e3f3080 21877 echo '.data
8ada417f
ZW
21878.align 4
21879.byte 0x31
21880.uaword %r_disp32(foo)
21881.byte 0x32, 0x33, 0x34
21882.global foo
21883.hidden foo
21884foo:
21885.skip 4' > conftest.s
ba479fd2
NN
21886 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
21887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21888 (eval $ac_try) 2>&5
21889 ac_status=$?
21890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21891 (exit $ac_status); }; }
8ada417f
ZW
21892 then
21893 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
21894 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
21895 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
21896 | grep ' 31000000 07323334' > /dev/null 2>&1; then
21897 if $gcc_cv_objdump -R conftest 2> /dev/null \
21898 | grep 'DISP32' > /dev/null 2>&1; then
21899 :
21900 else
21901 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 21902 fi
8ada417f
ZW
21903 fi
21904 rm -f conftest
21905 else
21906 echo "configure: failed program was" >&5
21907 cat conftest.s >&5
21908 fi
21909 rm -f conftest.o conftest.s
21910 fi
cafe096b 21911fi
b61ff9c8
BS
21912echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
21913echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 21914if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
21915
21916cat >>confdefs.h <<\_ACEOF
cf7b8b0d 21917#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 21918_ACEOF
cf7b8b0d 21919
8ada417f 21920fi
ba479fd2 21921
8ada417f 21922fi # unaligned pcrel relocs
cf7b8b0d 21923
b61ff9c8
BS
21924 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
21925echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
ba479fd2
NN
21926if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
21927 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 21928else
8ada417f
ZW
21929 gcc_cv_as_sparc_offsetable_lo10=no
21930 if test x$gcc_cv_as != x; then
6e3f3080 21931 echo '.text
8ada417f
ZW
21932 or %g1, %lo(ab) + 12, %g1
21933 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
21934 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
21935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21936 (eval $ac_try) 2>&5
21937 ac_status=$?
21938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21939 (exit $ac_status); }; }
8ada417f
ZW
21940 then
21941 if test x$gcc_cv_objdump != x \
ecb0ccbc 21942 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 21943 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 21944 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
21945 fi
21946 else
21947 echo "configure: failed program was" >&5
21948 cat conftest.s >&5
21949 fi
21950 rm -f conftest.o conftest.s
21951 fi
cafe096b 21952fi
b61ff9c8
BS
21953echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
21954echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 21955if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
21956
21957cat >>confdefs.h <<\_ACEOF
1cb36a98 21958#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 21959_ACEOF
1cb36a98 21960
8ada417f 21961fi
1cb36a98
RH
21962 ;;
21963
c307e6dd 21964 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
21965 case $target_os in
21966 cygwin* | pe | mingw32*)
21967 # Used for DWARF 2 in PE
b61ff9c8
BS
21968 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
21969echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
d38bc601
BF
21970if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
21971 echo $ECHO_N "(cached) $ECHO_C" >&6
21972else
21973 gcc_cv_as_ix86_pe_secrel32=no
21974 if test $in_tree_gas = yes; then
21975 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
21976 then gcc_cv_as_ix86_pe_secrel32=yes
21977fi
21978 elif test x$gcc_cv_as != x; then
21979 echo '.text
21980foo: nop
21981.data
21982 .secrel32 foo' > conftest.s
21983 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21985 (eval $ac_try) 2>&5
21986 ac_status=$?
21987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21988 (exit $ac_status); }; }
21989 then
21990 if test x$gcc_cv_ld != x \
21991 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
21992 gcc_cv_as_ix86_pe_secrel32=yes
21993 fi
21994 rm -f conftest
21995 else
21996 echo "configure: failed program was" >&5
21997 cat conftest.s >&5
21998 fi
21999 rm -f conftest.o conftest.s
22000 fi
22001fi
b61ff9c8
BS
22002echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
22003echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
d38bc601
BF
22004if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
22005
22006cat >>confdefs.h <<\_ACEOF
22007#define HAVE_GAS_PE_SECREL32_RELOC 1
22008_ACEOF
22009
22010fi
22011 ;;
22012 esac
22013
b61ff9c8
BS
22014 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
22015echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
ba479fd2
NN
22016if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
22017 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22018else
22019 gcc_cv_as_ix86_filds_fists=no
22020 if test $in_tree_gas = yes; then
22021 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
22022 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 22023fi
8ada417f 22024 elif test x$gcc_cv_as != x; then
6e3f3080 22025 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
22026 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22028 (eval $ac_try) 2>&5
22029 ac_status=$?
22030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22031 (exit $ac_status); }; }
8ada417f
ZW
22032 then
22033 gcc_cv_as_ix86_filds_fists=yes
22034 else
22035 echo "configure: failed program was" >&5
22036 cat conftest.s >&5
981d4858 22037 fi
8ada417f
ZW
22038 rm -f conftest.o conftest.s
22039 fi
22040fi
b61ff9c8
BS
22041echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
22042echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 22043if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
22044
22045cat >>confdefs.h <<\_ACEOF
8ada417f 22046#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 22047_ACEOF
ad9c4d9f 22048
f6f5dff2
RO
22049fi
22050
b61ff9c8
BS
22051 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
22052echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
ba479fd2
NN
22053if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
22054 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
22055else
22056 gcc_cv_as_ix86_cmov_sun_syntax=no
22057 if test x$gcc_cv_as != x; then
6e3f3080 22058 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
22059 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22061 (eval $ac_try) 2>&5
22062 ac_status=$?
22063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22064 (exit $ac_status); }; }
f6f5dff2
RO
22065 then
22066 gcc_cv_as_ix86_cmov_sun_syntax=yes
22067 else
22068 echo "configure: failed program was" >&5
22069 cat conftest.s >&5
22070 fi
22071 rm -f conftest.o conftest.s
22072 fi
22073fi
b61ff9c8
BS
22074echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
22075echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 22076if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
22077
22078cat >>confdefs.h <<\_ACEOF
f6f5dff2 22079#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 22080_ACEOF
f6f5dff2 22081
b6c03bcd
RS
22082fi
22083
b61ff9c8
BS
22084 echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5
22085echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6
b6c03bcd
RS
22086if test "${gcc_cv_as_ix86_ffreep+set}" = set; then
22087 echo $ECHO_N "(cached) $ECHO_C" >&6
22088else
22089 gcc_cv_as_ix86_ffreep=no
22090 if test x$gcc_cv_as != x; then
22091 echo 'ffreep %st(1)' > conftest.s
22092 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22094 (eval $ac_try) 2>&5
22095 ac_status=$?
22096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22097 (exit $ac_status); }; }
22098 then
22099 gcc_cv_as_ix86_ffreep=yes
22100 else
22101 echo "configure: failed program was" >&5
22102 cat conftest.s >&5
22103 fi
22104 rm -f conftest.o conftest.s
22105 fi
22106fi
b61ff9c8
BS
22107echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5
22108echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6
b6c03bcd
RS
22109if test $gcc_cv_as_ix86_ffreep = yes; then
22110
22111cat >>confdefs.h <<\_ACEOF
22112#define HAVE_AS_IX86_FFREEP 1
22113_ACEOF
22114
38ca3765
UB
22115fi
22116
b61ff9c8
BS
22117 echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5
22118echo $ECHO_N "checking assembler for sahf mnemonic... $ECHO_C" >&6
38ca3765
UB
22119if test "${gcc_cv_as_ix86_sahf+set}" = set; then
22120 echo $ECHO_N "(cached) $ECHO_C" >&6
22121else
22122 gcc_cv_as_ix86_sahf=no
22123 if test x$gcc_cv_as != x; then
22124 echo 'sahf' > conftest.s
22125 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22127 (eval $ac_try) 2>&5
22128 ac_status=$?
22129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22130 (exit $ac_status); }; }
22131 then
22132 gcc_cv_as_ix86_sahf=yes
22133 else
22134 echo "configure: failed program was" >&5
22135 cat conftest.s >&5
22136 fi
22137 rm -f conftest.o conftest.s
22138 fi
22139fi
b61ff9c8
BS
22140echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_sahf" >&5
22141echo "${ECHO_T}$gcc_cv_as_ix86_sahf" >&6
38ca3765
UB
22142if test $gcc_cv_as_ix86_sahf = yes; then
22143
22144cat >>confdefs.h <<\_ACEOF
22145#define HAVE_AS_IX86_SAHF 1
22146_ACEOF
22147
68b92f78
RS
22148fi
22149
b61ff9c8
BS
22150 echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5
22151echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6
68b92f78
RS
22152if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then
22153 echo $ECHO_N "(cached) $ECHO_C" >&6
22154else
22155 gcc_cv_as_ix86_diff_sect_delta=no
22156 if test x$gcc_cv_as != x; then
22157 echo '.section .rodata
22158.L1:
22159 .long .L2-.L1
22160 .long .L3-.L1
22161 .text
22162.L3: nop
22163.L2: nop' > conftest.s
22164 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22166 (eval $ac_try) 2>&5
22167 ac_status=$?
22168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22169 (exit $ac_status); }; }
22170 then
22171 gcc_cv_as_ix86_diff_sect_delta=yes
22172 else
22173 echo "configure: failed program was" >&5
22174 cat conftest.s >&5
22175 fi
22176 rm -f conftest.o conftest.s
22177 fi
22178fi
b61ff9c8
BS
22179echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
22180echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6
68b92f78
RS
22181if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
22182
22183cat >>confdefs.h <<\_ACEOF
22184#define HAVE_AS_IX86_DIFF_SECT_DELTA 1
22185_ACEOF
22186
ad9c4d9f
NN
22187fi
22188
6f3ca281
ZW
22189 # This one is used unconditionally by i386.[ch]; it is to be defined
22190 # to 1 if the feature is present, 0 otherwise.
b61ff9c8
BS
22191 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
22192echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
ba479fd2
NN
22193if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
22194 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22195else
22196 gcc_cv_as_ix86_gotoff_in_data=no
22197 if test $in_tree_gas = yes; then
22198 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
22199 then gcc_cv_as_ix86_gotoff_in_data=yes
22200fi
22201 elif test x$gcc_cv_as != x; then
6e3f3080 22202 echo ' .text
f88c65f7
RH
22203.L0:
22204 nop
22205 .data
8ada417f 22206 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
22207 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22209 (eval $ac_try) 2>&5
22210 ac_status=$?
22211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22212 (exit $ac_status); }; }
8ada417f
ZW
22213 then
22214 gcc_cv_as_ix86_gotoff_in_data=yes
22215 else
22216 echo "configure: failed program was" >&5
22217 cat conftest.s >&5
f88c65f7 22218 fi
8ada417f
ZW
22219 rm -f conftest.o conftest.s
22220 fi
22221fi
b61ff9c8
BS
22222echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
22223echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 22224
6f3ca281 22225
ba479fd2 22226cat >>confdefs.h <<_ACEOF
6f3ca281 22227#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 22228_ACEOF
f88c65f7 22229
1cb36a98 22230 ;;
ef1ecf87
RH
22231
22232 ia64*-*-*)
b61ff9c8
BS
22233 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
22234echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
ba479fd2
NN
22235if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
22236 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 22237else
8ada417f
ZW
22238 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
22239 if test $in_tree_gas = yes; then
22240 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
22241 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 22242fi
8ada417f 22243 elif test x$gcc_cv_as != x; then
6e3f3080 22244 echo ' .text
ef1ecf87
RH
22245 addl r15 = @ltoffx(x#), gp
22246 ;;
cfa9ee99 22247 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
22248 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22250 (eval $ac_try) 2>&5
22251 ac_status=$?
22252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22253 (exit $ac_status); }; }
8ada417f 22254 then
cfa9ee99 22255 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
22256 else
22257 echo "configure: failed program was" >&5
22258 cat conftest.s >&5
2c4a9cff 22259 fi
8ada417f
ZW
22260 rm -f conftest.o conftest.s
22261 fi
22262fi
b61ff9c8
BS
22263echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
22264echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 22265if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
22266
22267cat >>confdefs.h <<\_ACEOF
cfa9ee99 22268#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 22269_ACEOF
8ada417f 22270
cfa9ee99 22271fi
8ada417f 22272
2c4a9cff 22273 ;;
8ada417f 22274
2c4a9cff 22275 powerpc*-*-*)
8ada417f 22276 case $target in
432218ba
DE
22277 *-*-aix*) conftest_s=' .machine "pwr5"
22278 .csect .text[PR]
6b37db3c 22279 mfcr 3,128';;
8af4d362 22280 *-*-darwin*)
b61ff9c8
BS
22281 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
22282echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
8af4d362
PB
22283if test "${gcc_cv_as_machine_directive+set}" = set; then
22284 echo $ECHO_N "(cached) $ECHO_C" >&6
22285else
22286 gcc_cv_as_machine_directive=no
22287 if test x$gcc_cv_as != x; then
22288 echo ' .machine ppc7400' > conftest.s
22289 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22291 (eval $ac_try) 2>&5
22292 ac_status=$?
22293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22294 (exit $ac_status); }; }
22295 then
22296 gcc_cv_as_machine_directive=yes
22297 else
22298 echo "configure: failed program was" >&5
22299 cat conftest.s >&5
22300 fi
22301 rm -f conftest.o conftest.s
22302 fi
22303fi
b61ff9c8
BS
22304echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
22305echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
8af4d362
PB
22306
22307 if test x$gcc_cv_as_machine_directive != xyes; then
22308 echo "*** This target requires an assembler supporting \".machine\"" >&2
22309 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
22310 test x$build = x$target && exit 1
22311 fi
22312 conftest_s=' .text
6b37db3c 22313 mfcr r3,128';;
4c67db14 22314 *) conftest_s=' .machine power4
d2ab3e37 22315 .text
6b37db3c 22316 mfcr 3,128';;
8ada417f 22317 esac
8ada417f 22318
b61ff9c8
BS
22319 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
22320echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
ba479fd2
NN
22321if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
22322 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 22323else
8ada417f
ZW
22324 gcc_cv_as_powerpc_mfcrf=no
22325 if test $in_tree_gas = yes; then
22326 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
22327 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 22328fi
8ada417f 22329 elif test x$gcc_cv_as != x; then
6e3f3080 22330 echo "$conftest_s" > conftest.s
ba479fd2
NN
22331 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22333 (eval $ac_try) 2>&5
22334 ac_status=$?
22335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22336 (exit $ac_status); }; }
8ada417f
ZW
22337 then
22338 gcc_cv_as_powerpc_mfcrf=yes
22339 else
22340 echo "configure: failed program was" >&5
22341 cat conftest.s >&5
22342 fi
22343 rm -f conftest.o conftest.s
22344 fi
2c4a9cff 22345fi
b61ff9c8
BS
22346echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
22347echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 22348if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
22349
22350cat >>confdefs.h <<\_ACEOF
2c4a9cff 22351#define HAVE_AS_MFCRF 1
ba479fd2 22352_ACEOF
ef1ecf87 22353
8ada417f 22354fi
432218ba
DE
22355
22356 case $target in
22357 *-*-aix*) conftest_s=' .machine "pwr5"
22358 .csect .text[PR]
22359 popcntb 3,3';;
22360 *) conftest_s=' .machine power5
22361 .text
22362 popcntb 3,3';;
22363 esac
22364
b61ff9c8
BS
22365 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
22366echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
432218ba
DE
22367if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
22368 echo $ECHO_N "(cached) $ECHO_C" >&6
22369else
22370 gcc_cv_as_powerpc_popcntb=no
22371 if test $in_tree_gas = yes; then
22372 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
22373 then gcc_cv_as_powerpc_popcntb=yes
22374fi
22375 elif test x$gcc_cv_as != x; then
22376 echo "$conftest_s" > conftest.s
22377 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22379 (eval $ac_try) 2>&5
22380 ac_status=$?
22381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22382 (exit $ac_status); }; }
22383 then
22384 gcc_cv_as_powerpc_popcntb=yes
22385 else
22386 echo "configure: failed program was" >&5
22387 cat conftest.s >&5
22388 fi
22389 rm -f conftest.o conftest.s
22390 fi
22391fi
b61ff9c8
BS
22392echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
22393echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
432218ba
DE
22394if test $gcc_cv_as_powerpc_popcntb = yes; then
22395
22396cat >>confdefs.h <<\_ACEOF
22397#define HAVE_AS_POPCNTB 1
22398_ACEOF
22399
9719f3b7
DE
22400fi
22401
22402 case $target in
22403 *-*-aix*) conftest_s=' .machine "pwr5x"
22404 .csect .text[PR]
22405 frin 1,1';;
1e04bfdc 22406 *) conftest_s=' .machine power5
9719f3b7
DE
22407 .text
22408 frin 1,1';;
22409 esac
22410
b61ff9c8
BS
22411 echo "$as_me:$LINENO: checking assembler for fp round support" >&5
22412echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
9719f3b7
DE
22413if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
22414 echo $ECHO_N "(cached) $ECHO_C" >&6
22415else
22416 gcc_cv_as_powerpc_fprnd=no
22417 if test $in_tree_gas = yes; then
22418 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
22419 then gcc_cv_as_powerpc_fprnd=yes
22420fi
22421 elif test x$gcc_cv_as != x; then
22422 echo "$conftest_s" > conftest.s
22423 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22425 (eval $ac_try) 2>&5
22426 ac_status=$?
22427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22428 (exit $ac_status); }; }
22429 then
22430 gcc_cv_as_powerpc_fprnd=yes
22431 else
22432 echo "configure: failed program was" >&5
22433 cat conftest.s >&5
22434 fi
22435 rm -f conftest.o conftest.s
22436 fi
22437fi
b61ff9c8
BS
22438echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
22439echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
9719f3b7
DE
22440if test $gcc_cv_as_powerpc_fprnd = yes; then
22441
22442cat >>confdefs.h <<\_ACEOF
22443#define HAVE_AS_FPRND 1
22444_ACEOF
22445
44cd321e
PS
22446fi
22447
22448 case $target in
22449 *-*-aix*) conftest_s=' .machine "pwr6"
22450 .csect .text[PR]
22451 mffgpr 1,3';;
22452 *) conftest_s=' .machine power6
22453 .text
22454 mffgpr 1,3';;
22455 esac
22456
b61ff9c8
BS
22457 echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5
22458echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6
44cd321e
PS
22459if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then
22460 echo $ECHO_N "(cached) $ECHO_C" >&6
22461else
22462 gcc_cv_as_powerpc_mfpgpr=no
22463 if test $in_tree_gas = yes; then
22464 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
22465 then gcc_cv_as_powerpc_mfpgpr=yes
22466fi
22467 elif test x$gcc_cv_as != x; then
22468 echo "$conftest_s" > conftest.s
22469 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22471 (eval $ac_try) 2>&5
22472 ac_status=$?
22473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22474 (exit $ac_status); }; }
22475 then
22476 gcc_cv_as_powerpc_mfpgpr=yes
22477 else
22478 echo "configure: failed program was" >&5
22479 cat conftest.s >&5
22480 fi
22481 rm -f conftest.o conftest.s
22482 fi
22483fi
b61ff9c8
BS
22484echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5
22485echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6
44cd321e
PS
22486if test $gcc_cv_as_powerpc_mfpgpr = yes; then
22487
22488cat >>confdefs.h <<\_ACEOF
22489#define HAVE_AS_MFPGPR 1
22490_ACEOF
22491
432218ba
DE
22492fi
22493
7f970b70
AM
22494 case $target in
22495 *-*-aix*) conftest_s=' .csect .text[PR]
22496LCF..0:
22497 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
22498 *-*-darwin*)
22499 conftest_s=' .text
22500LCF0:
22501 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
22502 *) conftest_s=' .text
22503.LCF0:
22504 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
22505 esac
22506
b61ff9c8
BS
22507 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
22508echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
695d8830
AS
22509if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
22510 echo $ECHO_N "(cached) $ECHO_C" >&6
22511else
22512 gcc_cv_as_powerpc_rel16=no
22513 if test $in_tree_gas = yes; then
22514 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
22515 then gcc_cv_as_powerpc_rel16=yes
22516fi
22517 elif test x$gcc_cv_as != x; then
22518 echo "$conftest_s" > conftest.s
22519 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
22520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22521 (eval $ac_try) 2>&5
22522 ac_status=$?
22523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22524 (exit $ac_status); }; }
22525 then
22526 gcc_cv_as_powerpc_rel16=yes
22527 else
22528 echo "configure: failed program was" >&5
22529 cat conftest.s >&5
22530 fi
22531 rm -f conftest.o conftest.s
22532 fi
22533fi
b61ff9c8
BS
22534echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
22535echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
695d8830
AS
22536if test $gcc_cv_as_powerpc_rel16 = yes; then
22537
22538cat >>confdefs.h <<\_ACEOF
22539#define HAVE_AS_REL16 1
22540_ACEOF
22541
22542fi
22543
b639c3c2
JJ
22544 case $target in
22545 *-*-aix*) conftest_s=' .machine "pwr6"
22546 .csect .text[PR]
22547 cmpb 3,4,5';;
22548 *) conftest_s=' .machine power6
22549 .text
22550 cmpb 3,4,5';;
22551 esac
22552
b61ff9c8
BS
22553 echo "$as_me:$LINENO: checking assembler for compare bytes support" >&5
22554echo $ECHO_N "checking assembler for compare bytes support... $ECHO_C" >&6
b639c3c2
JJ
22555if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then
22556 echo $ECHO_N "(cached) $ECHO_C" >&6
22557else
22558 gcc_cv_as_powerpc_cmpb=no
22559 if test $in_tree_gas = yes; then
22560 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
22561 then gcc_cv_as_powerpc_cmpb=yes
22562fi
22563 elif test x$gcc_cv_as != x; then
22564 echo "$conftest_s" > conftest.s
22565 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
22566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22567 (eval $ac_try) 2>&5
22568 ac_status=$?
22569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22570 (exit $ac_status); }; }
22571 then
22572 gcc_cv_as_powerpc_cmpb=yes
22573 else
22574 echo "configure: failed program was" >&5
22575 cat conftest.s >&5
22576 fi
22577 rm -f conftest.o conftest.s
22578 fi
22579fi
b61ff9c8
BS
22580echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_cmpb" >&5
22581echo "${ECHO_T}$gcc_cv_as_powerpc_cmpb" >&6
b639c3c2
JJ
22582if test $gcc_cv_as_powerpc_cmpb = yes; then
22583
22584cat >>confdefs.h <<\_ACEOF
22585#define HAVE_AS_CMPB 1
22586_ACEOF
22587
22588fi
22589
22590 case $target in
22591 *-*-aix*) conftest_s=' .machine "pwr6"
22592 .csect .text[PR]
0d74c0ee 22593 dadd 1,2,3';;
b639c3c2
JJ
22594 *) conftest_s=' .machine power6
22595 .text
0d74c0ee 22596 dadd 1,2,3';;
b639c3c2
JJ
22597 esac
22598
b61ff9c8
BS
22599 echo "$as_me:$LINENO: checking assembler for decimal float support" >&5
22600echo $ECHO_N "checking assembler for decimal float support... $ECHO_C" >&6
b639c3c2
JJ
22601if test "${gcc_cv_as_powerpc_dfp+set}" = set; then
22602 echo $ECHO_N "(cached) $ECHO_C" >&6
22603else
22604 gcc_cv_as_powerpc_dfp=no
22605 if test $in_tree_gas = yes; then
22606 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
22607 then gcc_cv_as_powerpc_dfp=yes
22608fi
22609 elif test x$gcc_cv_as != x; then
22610 echo "$conftest_s" > conftest.s
22611 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
22612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22613 (eval $ac_try) 2>&5
22614 ac_status=$?
22615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22616 (exit $ac_status); }; }
22617 then
22618 gcc_cv_as_powerpc_dfp=yes
22619 else
22620 echo "configure: failed program was" >&5
22621 cat conftest.s >&5
22622 fi
22623 rm -f conftest.o conftest.s
22624 fi
22625fi
b61ff9c8
BS
22626echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_dfp" >&5
22627echo "${ECHO_T}$gcc_cv_as_powerpc_dfp" >&6
b639c3c2
JJ
22628if test $gcc_cv_as_powerpc_dfp = yes; then
22629
22630cat >>confdefs.h <<\_ACEOF
22631#define HAVE_AS_DFP 1
22632_ACEOF
22633
d40c9e33
PB
22634fi
22635
22636 case $target in
22637 *-*-aix*) conftest_s=' .machine "pwr7"
22638 .csect .text[PR]
22639 lxvd2x 1,2,3';;
22640 *) conftest_s=' .machine power7
22641 .text
22642 lxvd2x 1,2,3';;
22643 esac
22644
22645 echo "$as_me:$LINENO: checking assembler for vector-scalar support" >&5
22646echo $ECHO_N "checking assembler for vector-scalar support... $ECHO_C" >&6
22647if test "${gcc_cv_as_powerpc_vsx+set}" = set; then
22648 echo $ECHO_N "(cached) $ECHO_C" >&6
22649else
22650 gcc_cv_as_powerpc_vsx=no
22651 if test $in_tree_gas = yes; then
22652 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
22653 then gcc_cv_as_powerpc_vsx=yes
22654fi
22655 elif test x$gcc_cv_as != x; then
22656 echo "$conftest_s" > conftest.s
22657 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
22658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22659 (eval $ac_try) 2>&5
22660 ac_status=$?
22661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22662 (exit $ac_status); }; }
22663 then
22664 gcc_cv_as_powerpc_vsx=yes
22665 else
22666 echo "configure: failed program was" >&5
22667 cat conftest.s >&5
22668 fi
22669 rm -f conftest.o conftest.s
22670 fi
22671fi
22672echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_vsx" >&5
22673echo "${ECHO_T}$gcc_cv_as_powerpc_vsx" >&6
22674if test $gcc_cv_as_powerpc_vsx = yes; then
22675
22676cat >>confdefs.h <<\_ACEOF
22677#define HAVE_AS_VSX 1
22678_ACEOF
22679
e51917ae
JM
22680fi
22681
b61ff9c8
BS
22682 echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
22683echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
e51917ae
JM
22684if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then
22685 echo $ECHO_N "(cached) $ECHO_C" >&6
22686else
22687 gcc_cv_as_powerpc_gnu_attribute=no
22688 if test $in_tree_gas = yes; then
22689 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
22690 then gcc_cv_as_powerpc_gnu_attribute=yes
22691fi
22692 elif test x$gcc_cv_as != x; then
22693 echo '.gnu_attribute 4,1' > conftest.s
22694 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22696 (eval $ac_try) 2>&5
22697 ac_status=$?
22698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22699 (exit $ac_status); }; }
22700 then
22701 gcc_cv_as_powerpc_gnu_attribute=yes
22702 else
22703 echo "configure: failed program was" >&5
22704 cat conftest.s >&5
22705 fi
22706 rm -f conftest.o conftest.s
22707 fi
22708fi
b61ff9c8
BS
22709echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_gnu_attribute" >&5
22710echo "${ECHO_T}$gcc_cv_as_powerpc_gnu_attribute" >&6
e51917ae
JM
22711if test $gcc_cv_as_powerpc_gnu_attribute = yes; then
22712
22713cat >>confdefs.h <<\_ACEOF
22714#define HAVE_AS_GNU_ATTRIBUTE 1
22715_ACEOF
22716
7f970b70 22717fi
8ada417f
ZW
22718 ;;
22719
22720 mips*-*-*)
b61ff9c8
BS
22721 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
22722echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
22723if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
22724 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22725else
22726 gcc_cv_as_mips_explicit_relocs=no
22727 if test $in_tree_gas = yes; then
22728 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
22729 then gcc_cv_as_mips_explicit_relocs=yes
22730fi
22731 elif test x$gcc_cv_as != x; then
6e3f3080 22732 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
22733 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22735 (eval $ac_try) 2>&5
22736 ac_status=$?
22737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22738 (exit $ac_status); }; }
8ada417f
ZW
22739 then
22740 gcc_cv_as_mips_explicit_relocs=yes
22741 else
22742 echo "configure: failed program was" >&5
22743 cat conftest.s >&5
ef1ecf87 22744 fi
8ada417f
ZW
22745 rm -f conftest.o conftest.s
22746 fi
22747fi
b61ff9c8
BS
22748echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
22749echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
22750if test $gcc_cv_as_mips_explicit_relocs = yes; then
22751 if test x$target_cpu_default = x
22752 then target_cpu_default=MASK_EXPLICIT_RELOCS
22753 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
22754 fi
4551169f 22755fi
b61ff9c8
BS
22756 echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5
22757echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6
4551169f
RS
22758if test "${gcc_cv_as_mips_no_shared+set}" = set; then
22759 echo $ECHO_N "(cached) $ECHO_C" >&6
22760else
22761 gcc_cv_as_mips_no_shared=no
22762 if test $in_tree_gas = yes; then
22763 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
22764 then gcc_cv_as_mips_no_shared=yes
22765fi
22766 elif test x$gcc_cv_as != x; then
22767 echo 'nop' > conftest.s
22768 if { ac_try='$gcc_cv_as -mno-shared -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); }; }
22774 then
22775 gcc_cv_as_mips_no_shared=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
22782fi
b61ff9c8
BS
22783echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5
22784echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6
4551169f
RS
22785if test $gcc_cv_as_mips_no_shared = yes; then
22786
22787cat >>confdefs.h <<\_ACEOF
22788#define HAVE_AS_NO_SHARED 1
22789_ACEOF
22790
dcb957d9
JM
22791fi
22792
b61ff9c8
BS
22793 echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
22794echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
dcb957d9
JM
22795if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then
22796 echo $ECHO_N "(cached) $ECHO_C" >&6
22797else
22798 gcc_cv_as_mips_gnu_attribute=no
22799 if test $in_tree_gas = yes; then
22800 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
22801 then gcc_cv_as_mips_gnu_attribute=yes
22802fi
22803 elif test x$gcc_cv_as != x; then
22804 echo '.gnu_attribute 4,1' > conftest.s
22805 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22807 (eval $ac_try) 2>&5
22808 ac_status=$?
22809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22810 (exit $ac_status); }; }
22811 then
22812 gcc_cv_as_mips_gnu_attribute=yes
22813 else
22814 echo "configure: failed program was" >&5
22815 cat conftest.s >&5
22816 fi
22817 rm -f conftest.o conftest.s
22818 fi
22819fi
b61ff9c8
BS
22820echo "$as_me:$LINENO: result: $gcc_cv_as_mips_gnu_attribute" >&5
22821echo "${ECHO_T}$gcc_cv_as_mips_gnu_attribute" >&6
dcb957d9
JM
22822if test $gcc_cv_as_mips_gnu_attribute = yes; then
22823
22824cat >>confdefs.h <<\_ACEOF
22825#define HAVE_AS_GNU_ATTRIBUTE 1
22826_ACEOF
22827
a44380d2
JM
22828fi
22829
b61ff9c8
BS
22830 echo "$as_me:$LINENO: checking assembler for .dtprelword support" >&5
22831echo $ECHO_N "checking assembler for .dtprelword support... $ECHO_C" >&6
a44380d2
JM
22832if test "${gcc_cv_as_mips_dtprelword+set}" = set; then
22833 echo $ECHO_N "(cached) $ECHO_C" >&6
22834else
22835 gcc_cv_as_mips_dtprelword=no
22836 if test $in_tree_gas = yes; then
22837 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
22838 then gcc_cv_as_mips_dtprelword=yes
22839fi
22840 elif test x$gcc_cv_as != x; then
22841 echo '.section .tdata,"awT",@progbits
22842x:
22843 .word 2
22844 .text
22845 .dtprelword x+0x8000' > conftest.s
22846 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22848 (eval $ac_try) 2>&5
22849 ac_status=$?
22850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22851 (exit $ac_status); }; }
22852 then
22853 gcc_cv_as_mips_dtprelword=yes
22854 else
22855 echo "configure: failed program was" >&5
22856 cat conftest.s >&5
22857 fi
22858 rm -f conftest.o conftest.s
22859 fi
22860fi
b61ff9c8
BS
22861echo "$as_me:$LINENO: result: $gcc_cv_as_mips_dtprelword" >&5
22862echo "${ECHO_T}$gcc_cv_as_mips_dtprelword" >&6
a44380d2
JM
22863if test $gcc_cv_as_mips_dtprelword = yes; then
22864
22865cat >>confdefs.h <<\_ACEOF
22866#define HAVE_AS_DTPRELWORD 1
22867_ACEOF
22868
8ada417f 22869fi
dbad5e72
SE
22870 ;;
22871esac
8ada417f 22872
dbad5e72
SE
22873# Mips and HP-UX need the GNU assembler.
22874# Linux on IA64 might be able to use the Intel assembler.
22875
22876case "$target" in
22877 mips*-*-* | *-*-hpux* )
82563d35
RS
22878 if test x$gas_flag = xyes \
22879 || test x"$host" != x"$build" \
22880 || test ! -x "$gcc_cv_as" \
22881 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
22882 :
22883 else
22884 echo "*** This configuration requires the GNU assembler" >&2
22885 exit 1
22886 fi
ef1ecf87 22887 ;;
1cb36a98 22888esac
dbad5e72 22889
9d147085
RH
22890# ??? Not all targets support dwarf2 debug_line, even within a version
22891# of gas. Moreover, we need to emit a valid instruction to trigger any
22892# info to the output file. So, as supported targets are added to gas 2.11,
22893# add some instruction here to (also) show we expect this might work.
22894# ??? Once 2.11 is released, probably need to add first known working
22895# version to the per-target configury.
22896case "$target" in
80486e06 22897 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
cd985f66 22898 | x86_64*-*-* | hppa*-*-* | arm*-*-* \
6d656178 22899 | xstormy16*-*-* | cris-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \
6b7b0ba1 22900 | spu-*-* | fido*-*-*)
9d147085
RH
22901 insn="nop"
22902 ;;
57116d8d 22903 ia64*-*-* | s390*-*-*)
9d147085
RH
22904 insn="nop 0"
22905 ;;
2853bc5a
HPN
22906 mmix-*-*)
22907 insn="swym 0"
22908 ;;
8ada417f
ZW
22909esac
22910if test x"$insn" != x; then
22911 conftest_s="\
22912 .file 1 \"conftest.s\"
22913 .loc 1 3 0
22914 $insn"
b61ff9c8
BS
22915 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
22916echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
ba479fd2
NN
22917if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
22918 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22919else
22920 gcc_cv_as_dwarf2_debug_line=no
22921 if test $in_tree_gas = yes; then
22922 if test $in_tree_gas_is_elf = yes \
22923 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
22924 then gcc_cv_as_dwarf2_debug_line=yes
22925fi
22926 elif test x$gcc_cv_as != x; then
6e3f3080 22927 echo "$conftest_s" > conftest.s
ba479fd2
NN
22928 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22930 (eval $ac_try) 2>&5
22931 ac_status=$?
22932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22933 (exit $ac_status); }; }
8ada417f 22934 then
080a5bb0
EB
22935 if test x$gcc_cv_objdump != x \
22936 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
22937 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
22938 gcc_cv_as_dwarf2_debug_line=yes
22939 fi
22940 else
22941 echo "configure: failed program was" >&5
22942 cat conftest.s >&5
22943 fi
22944 rm -f conftest.o conftest.s
22945 fi
22946fi
b61ff9c8
BS
22947echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
22948echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 22949
ad9c4d9f 22950
8ada417f
ZW
22951# The .debug_line file table must be in the exact order that
22952# we specified the files, since these indices are also used
22953# by DW_AT_decl_file. Approximate this test by testing if
22954# the assembler bitches if the same index is assigned twice.
b61ff9c8
BS
22955 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
22956echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
ba479fd2
NN
22957if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
22958 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22959else
22960 gcc_cv_as_dwarf2_file_buggy=no
22961 if test x$gcc_cv_as != x; then
6e3f3080 22962 echo ' .file 1 "foo.s"
8ada417f 22963 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
22964 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22966 (eval $ac_try) 2>&5
22967 ac_status=$?
22968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22969 (exit $ac_status); }; }
8ada417f
ZW
22970 then
22971 gcc_cv_as_dwarf2_file_buggy=yes
22972 else
22973 echo "configure: failed program was" >&5
22974 cat conftest.s >&5
22975 fi
22976 rm -f conftest.o conftest.s
22977 fi
ad9c4d9f 22978fi
b61ff9c8
BS
22979echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
22980echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
22981
22982
22983 if test $gcc_cv_as_dwarf2_debug_line = yes \
22984 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
22985
22986cat >>confdefs.h <<\_ACEOF
9d147085 22987#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 22988_ACEOF
9d147085 22989
8ada417f 22990 fi
ad9c4d9f 22991
b61ff9c8
BS
22992 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
22993echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
ba479fd2
NN
22994if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
22995 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22996else
22997 gcc_cv_as_gdwarf2_flag=no
22998 if test $in_tree_gas = yes; then
22999 if test $in_tree_gas_is_elf = yes \
23000 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
23001 then gcc_cv_as_gdwarf2_flag=yes
23002fi
23003 elif test x$gcc_cv_as != x; then
6e3f3080 23004 echo "$insn" > conftest.s
ba479fd2
NN
23005 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
23006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23007 (eval $ac_try) 2>&5
23008 ac_status=$?
23009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23010 (exit $ac_status); }; }
8ada417f
ZW
23011 then
23012 gcc_cv_as_gdwarf2_flag=yes
23013 else
23014 echo "configure: failed program was" >&5
23015 cat conftest.s >&5
23016 fi
23017 rm -f conftest.o conftest.s
23018 fi
ad9c4d9f 23019fi
b61ff9c8
BS
23020echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
23021echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 23022if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
23023
23024cat >>confdefs.h <<\_ACEOF
5f0e9ea2 23025#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 23026_ACEOF
5f0e9ea2
GK
23027
23028fi
ad9c4d9f 23029
b61ff9c8
BS
23030 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
23031echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
ba479fd2
NN
23032if test "${gcc_cv_as_gstabs_flag+set}" = set; then
23033 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
23034else
23035 gcc_cv_as_gstabs_flag=no
23036 if test $in_tree_gas = yes; then
23037 if test $in_tree_gas_is_elf = yes \
23038 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
23039 then gcc_cv_as_gstabs_flag=yes
23040fi
23041 elif test x$gcc_cv_as != x; then
6e3f3080 23042 echo "$insn" > conftest.s
ba479fd2
NN
23043 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
23044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23045 (eval $ac_try) 2>&5
23046 ac_status=$?
23047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23048 (exit $ac_status); }; }
8ada417f
ZW
23049 then
23050 # The native Solaris 9/Intel assembler doesn't understand --gstabs
23051 # and warns about it, but still exits successfully. So check for
23052 # this.
ba479fd2
NN
23053 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
23054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23055 (eval $ac_try) 2>&5
23056 ac_status=$?
23057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23058 (exit $ac_status); }; }
8ada417f
ZW
23059 then :
23060 else gcc_cv_as_gstabs_flag=yes
23061 fi
23062 else
23063 echo "configure: failed program was" >&5
23064 cat conftest.s >&5
23065 fi
23066 rm -f conftest.o conftest.s
23067 fi
ad9c4d9f 23068fi
b61ff9c8
BS
23069echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
23070echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 23071if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
23072
23073cat >>confdefs.h <<\_ACEOF
5f0e9ea2 23074#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 23075_ACEOF
5f0e9ea2 23076
c8aea42c
PB
23077fi
23078
b61ff9c8
BS
23079 echo "$as_me:$LINENO: checking assembler for --debug-prefix-map option" >&5
23080echo $ECHO_N "checking assembler for --debug-prefix-map option... $ECHO_C" >&6
c8aea42c
PB
23081if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then
23082 echo $ECHO_N "(cached) $ECHO_C" >&6
23083else
23084 gcc_cv_as_debug_prefix_map_flag=no
23085 if test $in_tree_gas = yes; then
303a4698 23086 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
c8aea42c
PB
23087 then gcc_cv_as_debug_prefix_map_flag=yes
23088fi
23089 elif test x$gcc_cv_as != x; then
23090 echo "$insn" > conftest.s
23091 if { ac_try='$gcc_cv_as --debug-prefix-map /a=/b -o conftest.o conftest.s >&5'
23092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23093 (eval $ac_try) 2>&5
23094 ac_status=$?
23095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23096 (exit $ac_status); }; }
23097 then
23098 gcc_cv_as_debug_prefix_map_flag=yes
23099 else
23100 echo "configure: failed program was" >&5
23101 cat conftest.s >&5
23102 fi
23103 rm -f conftest.o conftest.s
23104 fi
23105fi
b61ff9c8
BS
23106echo "$as_me:$LINENO: result: $gcc_cv_as_debug_prefix_map_flag" >&5
23107echo "${ECHO_T}$gcc_cv_as_debug_prefix_map_flag" >&6
c8aea42c
PB
23108if test $gcc_cv_as_debug_prefix_map_flag = yes; then
23109
23110cat >>confdefs.h <<\_ACEOF
23111#define HAVE_AS_DEBUG_PREFIX_MAP 1
23112_ACEOF
23113
5f0e9ea2 23114fi
8ada417f 23115fi
5f0e9ea2 23116
b61ff9c8
BS
23117echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5
23118echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6
03943c05
AO
23119if test "${gcc_cv_as_line_zero+set}" = set; then
23120 echo $ECHO_N "(cached) $ECHO_C" >&6
23121else
23122 gcc_cv_as_line_zero=no
23123 if test $in_tree_gas = yes; then
cf0eb7a1
AO
23124 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
23125 then gcc_cv_as_line_zero=yes
03943c05
AO
23126fi
23127 elif test "x$gcc_cv_as" != x; then
23128 { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
23129 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
23130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23131 (eval $ac_try) 2>&5
23132 ac_status=$?
23133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23134 (exit $ac_status); }; } &&
23135 test "x`cat conftest.out`" = x
23136 then
23137 gcc_cv_as_line_zero=yes
23138 else
23139 echo "configure: failed program was" >&5
23140 cat conftest.s >&5
23141 echo "configure: error output was" >&5
23142 cat conftest.out >&5
23143 fi
23144 rm -f conftest.o conftest.s conftest.out
23145 fi
23146fi
b61ff9c8
BS
23147echo "$as_me:$LINENO: result: $gcc_cv_as_line_zero" >&5
23148echo "${ECHO_T}$gcc_cv_as_line_zero" >&6
03943c05
AO
23149if test "x$gcc_cv_as_line_zero" = xyes; then
23150
23151cat >>confdefs.h <<\_ACEOF
23152#define HAVE_AS_LINE_ZERO 1
23153_ACEOF
23154
23155fi
23156
b61ff9c8
BS
23157echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
23158echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 23159gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 23160if test $in_tree_ld = yes ; then
5408ac6c
HPN
23161 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 \
23162 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
23163 gcc_cv_ld_ro_rw_mix=read-write
23164 fi
23165elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
23166 echo '.section myfoosect, "a"' > conftest1.s
23167 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 23168 echo '.byte 1' >> conftest2.s
90e145da 23169 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 23170 echo '.byte 0' >> conftest3.s
6cd656d0
KC
23171 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
23172 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
23173 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 23174 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 23175 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 23176 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 23177 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
23178 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
23179 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
23180 gcc_cv_ld_ro_rw_mix=read-only
23181 else
23182 gcc_cv_ld_ro_rw_mix=read-write
23183 fi
23184 fi
23185 fi
23186 rm -f conftest.* conftest[123].*
23187fi
23188if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
23189
23190cat >>confdefs.h <<\_ACEOF
96d0f4dc 23191#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 23192_ACEOF
96d0f4dc
JJ
23193
23194fi
b61ff9c8
BS
23195echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
23196echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 23197
b61ff9c8
BS
23198echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
23199echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 23200gcc_cv_ld_eh_frame_hdr=no
34a86c2b 23201if test $in_tree_ld = yes ; then
5408ac6c
HPN
23202 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 \
23203 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
23204 gcc_cv_ld_eh_frame_hdr=yes
23205 fi
23206elif test x$gcc_cv_ld != x; then
23207 # Check if linker supports --eh-frame-hdr option
23208 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
23209 gcc_cv_ld_eh_frame_hdr=yes
23210 fi
23211fi
232b67d9 23212
275b60d6 23213if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
23214
23215cat >>confdefs.h <<\_ACEOF
275b60d6 23216#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 23217_ACEOF
275b60d6
JJ
23218
23219fi
b61ff9c8
BS
23220echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
23221echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 23222
b61ff9c8
BS
23223echo "$as_me:$LINENO: checking linker position independent executable support" >&5
23224echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
23225gcc_cv_ld_pie=no
23226if test $in_tree_ld = yes ; then
5408ac6c
HPN
23227 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 \
23228 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
23229 gcc_cv_ld_pie=yes
23230 fi
23231elif test x$gcc_cv_ld != x; then
23232 # Check if linker supports -pie option
23233 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
23234 gcc_cv_ld_pie=yes
23235 fi
23236fi
23237if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
23238
23239cat >>confdefs.h <<\_ACEOF
24a4dd31 23240#define HAVE_LD_PIE 1
ba479fd2 23241_ACEOF
24a4dd31
JJ
23242
23243fi
b61ff9c8
BS
23244echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
23245echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 23246
b61ff9c8
BS
23247echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5
23248echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6
22ba88ef 23249gcc_cv_ld_eh_gc_sections=no
b639c3c2
JJ
23250if test $in_tree_ld = yes ; then
23251 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 \
23252 && test $in_tree_ld_is_elf = yes; then
23253 gcc_cv_ld_eh_gc_sections=yes
23254 fi
23255elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
23256 cat > conftest.s <<EOF
23257 .section .text
23258.globl _start
23259 .type _start, @function
23260_start:
23261 .long foo
23262 .size _start, .-_start
23263 .section .text.foo,"ax",@progbits
23264 .type foo, @function
23265foo:
23266 .long 0
23267 .size foo, .-foo
23268 .section .gcc_except_table.foo,"a",@progbits
23269.L0:
23270 .long 0
23271 .section .eh_frame,"a",@progbits
23272 .long .L0
23273EOF
23274 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
23275 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
23276 | grep "gc-sections option ignored" > /dev/null; then
23277 gcc_cv_ld_eh_gc_sections=no
23278 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
23279 gcc_cv_ld_eh_gc_sections=yes
23280 # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
23281 if test x$gcc_cv_as_comdat_group != xyes; then
23282 gcc_cv_ld_eh_gc_sections=no
23283 cat > conftest.s <<EOF
23284 .section .text
23285.globl _start
23286 .type _start, @function
23287_start:
23288 .long foo
23289 .size _start, .-_start
23290 .section .gnu.linkonce.t.foo,"ax",@progbits
23291 .type foo, @function
23292foo:
23293 .long 0
23294 .size foo, .-foo
23295 .section .gcc_except_table.foo,"a",@progbits
23296.L0:
23297 .long 0
23298 .section .eh_frame,"a",@progbits
23299 .long .L0
23300EOF
23301 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
23302 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
23303 | grep "gc-sections option ignored" > /dev/null; then
23304 gcc_cv_ld_eh_gc_sections=no
23305 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
23306 gcc_cv_ld_eh_gc_sections=yes
23307 fi
23308 fi
23309 fi
23310 fi
23311 fi
23312 rm -f conftest.s conftest.o conftest
23313fi
e9d207d9
EB
23314case "$target" in
23315 hppa*-*-linux*)
23316 # ??? This apparently exposes a binutils bug with PC-relative relocations.
23317 gcc_cv_ld_eh_gc_sections=no
23318 ;;
23319esac
22ba88ef
EB
23320if test x$gcc_cv_ld_eh_gc_sections = xyes; then
23321
23322cat >>confdefs.h <<\_ACEOF
23323#define HAVE_LD_EH_GC_SECTIONS 1
23324_ACEOF
23325
23326fi
b61ff9c8
BS
23327echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5
23328echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6
22ba88ef 23329
8bb915b6
NN
23330# --------
23331# UNSORTED
23332# --------
23333
b61ff9c8
BS
23334echo "$as_me:$LINENO: checking linker --as-needed support" >&5
23335echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
23336if test "${gcc_cv_ld_as_needed+set}" = set; then
23337 echo $ECHO_N "(cached) $ECHO_C" >&6
23338else
23339 gcc_cv_ld_as_needed=no
765f1bf9
AM
23340if test $in_tree_ld = yes ; then
23341 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 \
23342 && test $in_tree_ld_is_elf = yes; then
23343 gcc_cv_ld_as_needed=yes
23344 fi
23345elif test x$gcc_cv_ld != x; then
23346 # Check if linker supports --as-needed and --no-as-needed options
23347 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
23348 gcc_cv_ld_as_needed=yes
23349 fi
23350fi
82e923f6
RS
23351
23352fi
b61ff9c8
BS
23353echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
23354echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
23355if test x"$gcc_cv_ld_as_needed" = xyes; then
23356
23357cat >>confdefs.h <<\_ACEOF
23358#define HAVE_LD_AS_NEEDED 1
23359_ACEOF
23360
23361fi
765f1bf9 23362
d82bf747
AM
23363case "$target:$tm_file" in
23364 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
b61ff9c8
BS
23365 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
23366echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
85b776df
AM
23367if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
23368 echo $ECHO_N "(cached) $ECHO_C" >&6
23369else
23370 gcc_cv_ld_no_dot_syms=no
23371 if test $in_tree_ld = yes ; then
23372 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
23373 gcc_cv_ld_no_dot_syms=yes
23374 fi
23375 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
23376 cat > conftest1.s <<EOF
23377 .text
23378 bl .foo
23379EOF
23380 cat > conftest2.s <<EOF
23381 .section ".opd","aw"
23382 .align 3
23383 .globl foo
23384 .type foo,@function
23385foo:
23386 .quad .LEfoo,.TOC.@tocbase,0
23387 .text
23388.LEfoo:
23389 blr
23390 .size foo,.-.LEfoo
23391EOF
23392 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
23393 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
23394 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
23395 gcc_cv_ld_no_dot_syms=yes
23396 fi
23397 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
23398 fi
23399
23400fi
b61ff9c8
BS
23401echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
23402echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
85b776df
AM
23403 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
23404
23405cat >>confdefs.h <<\_ACEOF
23406#define HAVE_LD_NO_DOT_SYMS 1
23407_ACEOF
23408
23409 fi
23410 ;;
23411esac
23412
b61ff9c8
BS
23413echo "$as_me:$LINENO: checking linker --sysroot support" >&5
23414echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
380e5ca4
MM
23415if test "${gcc_cv_ld_sysroot+set}" = set; then
23416 echo $ECHO_N "(cached) $ECHO_C" >&6
23417else
23418 gcc_cv_ld_sysroot=no
23419 if test $in_tree_ld = yes ; then
23420 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 23421 gcc_cv_ld_sysroot=yes
380e5ca4
MM
23422 fi
23423 elif test x$gcc_cv_ld != x; then
23424 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
23425 gcc_cv_ld_sysroot=yes
23426 fi
23427 fi
23428fi
b61ff9c8
BS
23429echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
23430echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
380e5ca4
MM
23431if test x"$gcc_cv_ld_sysroot" = xyes; then
23432
23433cat >>confdefs.h <<\_ACEOF
23434#define HAVE_LD_SYSROOT 1
23435_ACEOF
23436
23437fi
23438
9fb28a67 23439if test x$with_sysroot = x && test x$host = x$target \
c794c06f
CD
23440 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
23441 && test "$prefix" != "NONE"; then
ba479fd2
NN
23442
23443cat >>confdefs.h <<_ACEOF
793e9558 23444#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 23445_ACEOF
793e9558
PB
23446
23447fi
23448
77008252 23449# Test for stack protector support in target C library.
b61ff9c8
BS
23450echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5
23451echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6
77008252
JJ
23452if test "${gcc_cv_libc_provides_ssp+set}" = set; then
23453 echo $ECHO_N "(cached) $ECHO_C" >&6
23454else
23455 gcc_cv_libc_provides_ssp=no
a6ccdbab
EC
23456 case "$target" in
23457 *-*-linux*)
77008252
JJ
23458 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
23459 if test "x$with_sysroot" = x; then
23460 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
23461 elif test "x$with_build_sysroot" != "x"; then
23462 glibc_header_dir="${with_build_sysroot}/usr/include"
77008252
JJ
23463 elif test "x$with_sysroot" = xyes; then
23464 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
23465 else
23466 glibc_header_dir="${with_sysroot}/usr/include"
23467 fi
23468 else
23469 glibc_header_dir=/usr/include
23470 fi
23471 # glibc 2.4 and later provides __stack_chk_fail and
23472 # either __stack_chk_guard, or TLS access to stack guard canary.
23473 if test -f $glibc_header_dir/features.h \
23474 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
23475 $glibc_header_dir/features.h > /dev/null; then
23476 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
23477 $glibc_header_dir/features.h > /dev/null; then
23478 gcc_cv_libc_provides_ssp=yes
23479 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
23480 $glibc_header_dir/features.h > /dev/null \
23481 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
23482 $glibc_header_dir/features.h > /dev/null; then
23483 gcc_cv_libc_provides_ssp=yes
fed6d628
BF
23484 elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \
23485 $glibc_header_dir/features.h > /dev/null && \
23486 test -f $glibc_header_dir/bits/uClibc_config.h && \
23487 $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \
23488 $glibc_header_dir/bits/uClibc_config.h > /dev/null; then
23489 gcc_cv_libc_provides_ssp=yes
77008252 23490 fi
fed6d628 23491 fi
a6ccdbab
EC
23492 ;;
23493 *-*-darwin*)
b61ff9c8
BS
23494 echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5
23495echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6
a6ccdbab
EC
23496if test "${ac_cv_func___stack_chk_fail+set}" = set; then
23497 echo $ECHO_N "(cached) $ECHO_C" >&6
23498else
23499 cat >conftest.$ac_ext <<_ACEOF
23500/* confdefs.h. */
23501_ACEOF
23502cat confdefs.h >>conftest.$ac_ext
23503cat >>conftest.$ac_ext <<_ACEOF
23504/* end confdefs.h. */
23505/* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail.
23506 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23507#define __stack_chk_fail innocuous___stack_chk_fail
23508
23509/* System header to define __stub macros and hopefully few prototypes,
23510 which can conflict with char __stack_chk_fail (); below.
23511 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23512 <limits.h> exists even on freestanding compilers. */
23513
23514#ifdef __STDC__
23515# include <limits.h>
23516#else
23517# include <assert.h>
23518#endif
23519
23520#undef __stack_chk_fail
23521
b61ff9c8 23522/* Override any gcc2 internal prototype to avoid an error. */
a6ccdbab
EC
23523#ifdef __cplusplus
23524extern "C"
b61ff9c8 23525{
a6ccdbab 23526#endif
b61ff9c8
BS
23527/* We use char because int might match the return type of a gcc2
23528 builtin and then its argument prototype would still apply. */
a6ccdbab
EC
23529char __stack_chk_fail ();
23530/* The GNU C library defines this for functions which it implements
23531 to always fail with ENOSYS. Some functions are actually named
23532 something starting with __ and the normal name is an alias. */
b61ff9c8 23533#if defined (__stub___stack_chk_fail) || defined (__stub_____stack_chk_fail)
a6ccdbab 23534choke me
b61ff9c8
BS
23535#else
23536char (*f) () = __stack_chk_fail;
23537#endif
23538#ifdef __cplusplus
23539}
a6ccdbab
EC
23540#endif
23541
23542int
23543main ()
23544{
b61ff9c8 23545return f != __stack_chk_fail;
a6ccdbab
EC
23546 ;
23547 return 0;
23548}
23549_ACEOF
23550rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
23551if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23552 (eval $ac_link) 2>conftest.er1
a6ccdbab
EC
23553 ac_status=$?
23554 grep -v '^ *+' conftest.er1 >conftest.err
23555 rm -f conftest.er1
23556 cat conftest.err >&5
23557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
23558 (exit $ac_status); } &&
23559 { ac_try='test -z "$ac_c_werror_flag"
23560 || test ! -s conftest.err'
23561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23562 (eval $ac_try) 2>&5
23563 ac_status=$?
23564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23565 (exit $ac_status); }; } &&
23566 { ac_try='test -s conftest$ac_exeext'
23567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23568 (eval $ac_try) 2>&5
23569 ac_status=$?
23570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23571 (exit $ac_status); }; }; then
8b1f719a
PB
23572 ac_cv_func___stack_chk_fail=yes
23573else
a6ccdbab
EC
23574 echo "$as_me: failed program was:" >&5
23575sed 's/^/| /' conftest.$ac_ext >&5
23576
b61ff9c8 23577ac_cv_func___stack_chk_fail=no
a6ccdbab 23578fi
b61ff9c8 23579rm -f conftest.err conftest.$ac_objext \
a6ccdbab
EC
23580 conftest$ac_exeext conftest.$ac_ext
23581fi
b61ff9c8
BS
23582echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5
23583echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6
a6ccdbab
EC
23584if test $ac_cv_func___stack_chk_fail = yes; then
23585 gcc_cv_libc_provides_ssp=yes
23586else
23587 echo "no __stack_chk_fail on this target"
77008252 23588fi
a6ccdbab
EC
23589
23590 ;;
77008252 23591 *) gcc_cv_libc_provides_ssp=no ;;
a6ccdbab
EC
23592 esac
23593fi
b61ff9c8
BS
23594echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
23595echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6
a6ccdbab 23596
77008252
JJ
23597if test x$gcc_cv_libc_provides_ssp = xyes; then
23598
23599cat >>confdefs.h <<\_ACEOF
23600#define TARGET_LIBC_PROVIDES_SSP 1
23601_ACEOF
23602
23603fi
23604
ed965309
JJ
23605# Check if TFmode long double should be used by default or not.
23606# Some glibc targets used DFmode long double, but with glibc 2.4
23607# and later they can use TFmode.
23608case "$target" in
f7cc5390
JM
23609 powerpc*-*-linux* | \
23610 powerpc*-*-gnu* | \
ed965309
JJ
23611 sparc*-*-linux* | \
23612 s390*-*-linux* | \
23613 alpha*-*-linux*)
23614
b61ff9c8 23615# Check whether --with-long-double-128 or --without-long-double-128 was given.
ed965309 23616if test "${with_long_double_128+set}" = set; then
b61ff9c8
BS
23617 withval="$with_long_double_128"
23618 gcc_cv_target_ldbl128="$with_long_double_128"
ed965309
JJ
23619else
23620 gcc_cv_target_ldbl128=no
23621 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
23622 if test "x$with_sysroot" = x; then
23623 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
23624 elif test "x$with_build_sysroot" != "x"; then
23625 glibc_header_dir="${with_build_sysroot}/usr/include"
ed965309
JJ
23626 elif test "x$with_sysroot" = xyes; then
23627 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
23628 else
23629 glibc_header_dir="${with_sysroot}/usr/include"
23630 fi
23631 else
23632 glibc_header_dir=/usr/include
23633 fi
65280f6c 23634 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
ed965309
JJ
23635 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
23636 && gcc_cv_target_ldbl128=yes
65280f6c 23637
b61ff9c8 23638fi;
ed965309
JJ
23639 ;;
23640esac
23641if test x$gcc_cv_target_ldbl128 = xyes; then
23642
23643cat >>confdefs.h <<\_ACEOF
23644#define TARGET_DEFAULT_LONG_DOUBLE_128 1
23645_ACEOF
23646
23647fi
23648
81bf3d9e 23649# Find out what GC implementation we want, or may, use.
ba479fd2 23650
b61ff9c8 23651# Check whether --with-gc or --without-gc was given.
81bf3d9e 23652if test "${with_gc+set}" = set; then
b61ff9c8
BS
23653 withval="$with_gc"
23654 case "$withval" in
08cee789 23655 page)
81bf3d9e 23656 GGC=ggc-$withval
08cee789
DJ
23657 ;;
23658 zone)
23659 GGC=ggc-$withval
23660
23661cat >>confdefs.h <<\_ACEOF
23662#define GGC_ZONE 1
23663_ACEOF
23664
81bf3d9e
RH
23665 ;;
23666 *)
ba479fd2
NN
23667 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
23668echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
23669 { (exit 1); exit 1; }; }
81bf3d9e
RH
23670 ;;
23671esac
23672else
005537df 23673 GGC=ggc-page
b61ff9c8 23674fi;
81bf3d9e
RH
23675
23676echo "Using $GGC for garbage collection."
23677
3c809ba4 23678# Use the system's zlib library.
b8dad04b
ZW
23679zlibdir=-L../zlib
23680zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 23681
b61ff9c8 23682# Check whether --with-system-zlib or --without-system-zlib was given.
3c809ba4 23683if test "${with_system_zlib+set}" = set; then
b61ff9c8
BS
23684 withval="$with_system_zlib"
23685 zlibdir=
3c809ba4
AG
23686zlibinc=
23687
b61ff9c8 23688fi;
b8ec3cc8 23689
703d89ab 23690
ab22c1fa 23691
1a4b763e 23692
b61ff9c8
BS
23693echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
23694echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
23695 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
dc6746e7 23696if test "${enable_maintainer_mode+set}" = set; then
b61ff9c8
BS
23697 enableval="$enable_maintainer_mode"
23698 maintainer_mode=$enableval
dc6746e7
PT
23699else
23700 maintainer_mode=no
b61ff9c8 23701fi;
a6ccdbab 23702
b61ff9c8
BS
23703echo "$as_me:$LINENO: result: $maintainer_mode" >&5
23704echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
23705
23706if test "$maintainer_mode" = "yes"; then
23707 MAINT=''
23708else
23709 MAINT='#'
23710fi
23711
8bb915b6
NN
23712# --------------
23713# Language hooks
23714# --------------
23715
861bb6c1
JL
23716# Make empty files to contain the specs and options for each language.
23717# Then add #include lines to for a compiler that has specs and/or options.
23718
cc11cc9b 23719subdirs=
d7b42618 23720lang_opt_files=
861bb6c1 23721lang_specs_files=
3103b7db 23722lang_tree_files=
861bb6c1
JL
23723# These (without "all_") are set in each config-lang.in.
23724# `language' must be a single word so is spelled singularly.
23725all_languages=
861bb6c1 23726all_compilers=
47ad7893 23727all_outputs='Makefile gccbug'
861bb6c1 23728# List of language makefile fragments.
2ed26f6b
ZW
23729all_lang_makefrags=
23730# List of language subdirectory makefiles. Deprecated.
861bb6c1 23731all_lang_makefiles=
703d89ab 23732# Additional files for gengtype
ef69da62 23733all_gtfiles="$target_gtfiles"
861bb6c1 23734
cc11cc9b
PB
23735# These are the languages that are set in --enable-languages,
23736# and are available in the GCC tree.
23737all_selected_languages=
23738
861bb6c1
JL
23739# Add the language fragments.
23740# Languages are added via two mechanisms. Some information must be
23741# recorded in makefile variables, these are defined in config-lang.in.
23742# We accumulate them and plug them into the main Makefile.
23743# The other mechanism is a set of hooks for each of the main targets
23744# like `clean', `install', etc.
23745
861bb6c1 23746language_hooks="Make-hooks"
861bb6c1 23747
cc11cc9b 23748for lang in ${srcdir}/*/config-lang.in
861bb6c1 23749do
1546bb64
PB
23750 test "$lang" = "${srcdir}/*/config-lang.in" && continue
23751
cc11cc9b
PB
23752 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
23753 if test "x$lang_alias" = x
23754 then
23755 echo "$lang doesn't set \$language." 1>&2
23756 exit 1
23757 fi
23758 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
23759 subdirs="$subdirs $subdir"
349c3166
OH
23760
23761 # $gcc_subdir is where the gcc integration files are to be found
23762 # for a language, both for internal compiler purposes (compiler
23763 # sources implementing front-end to GCC tree converters), and for
23764 # build infrastructure purposes (Make-lang.in, etc.)
23765 #
23766 # This will be <subdir> (relative to $srcdir) if a line like
23767 # gcc_subdir="<subdir>" or gcc_subdir=<subdir>
23768 # is found in <langdir>/config-lang.in, and will remain <langdir>
23769 # otherwise.
23770 #
23771 # Except for the language alias (fetched above), the regular
23772 # "config-lang.in" contents are always retrieved from $gcc_subdir,
23773 # so a <langdir>/config-lang.in setting gcc_subdir typically sets
23774 # only this and the language alias.
23775
23776 gcc_subdir=`sed -n -e 's,^gcc_subdir=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^gcc_subdir=\([^ ]*\).*$,\1,p' $lang`
23777 if [ "$gcc_subdir" = "" ]; then
23778 gcc_subdir="$subdir"
23779 fi
23780
cc11cc9b
PB
23781 case ",$enable_languages," in
23782 *,$lang_alias,*)
23783 all_selected_languages="$all_selected_languages $lang_alias"
349c3166
OH
23784 if test -f $srcdir/$gcc_subdir/lang-specs.h; then
23785 lang_specs_files="$lang_specs_files $srcdir/$gcc_subdir/lang-specs.h"
cc11cc9b
PB
23786 fi
23787 ;;
23788 esac
23789
cc11cc9b
PB
23790 language=
23791 boot_language=
23792 compilers=
cc11cc9b
PB
23793 outputs=
23794 gtfiles=
1546bb64 23795 subdir_requires=
349c3166 23796 . ${srcdir}/$gcc_subdir/config-lang.in
cc11cc9b
PB
23797 if test "x$language" = x
23798 then
349c3166 23799 echo "${srcdir}/$gcc_subdir/config-lang.in doesn't set \$language." 1>&2
cc11cc9b
PB
23800 exit 1
23801 fi
1546bb64
PB
23802
23803 ok=:
23804 case ",$enable_languages," in
23805 *,$lang_alias,*) ;;
23806 *)
23807 for i in $subdir_requires; do
b6348cb3 23808 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
23809 ok=false
23810 break
23811 done
23812 ;;
23813 esac
23814 $ok || continue
23815
349c3166
OH
23816 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in"
23817 if test -f $srcdir/$gcc_subdir/lang.opt; then
23818 lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt"
1546bb64 23819 fi
349c3166
OH
23820 if test -f $srcdir/$gcc_subdir/$subdir-tree.def; then
23821 lang_tree_files="$lang_tree_files $srcdir/$gcc_subdir/$subdir-tree.def"
1546bb64 23822 fi
349c3166
OH
23823 if test -f ${srcdir}/$gcc_subdir/Makefile.in
23824 then all_lang_makefiles="$gcc_subdir/Makefile"
cc11cc9b
PB
23825 fi
23826 all_languages="$all_languages $language"
cc11cc9b 23827 all_compilers="$all_compilers $compilers"
cc11cc9b 23828 all_outputs="$all_outputs $outputs"
703d89ab 23829 all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
861bb6c1
JL
23830done
23831
8ac9d31f
TJ
23832# Pick up gtfiles for c
23833gtfiles=
8ac9d31f 23834. ${srcdir}/c-config-lang.in
703d89ab 23835all_gtfiles="$all_gtfiles [c] $gtfiles"
8ac9d31f 23836
cbc59f01 23837check_languages=
cc11cc9b 23838for language in $all_selected_languages
cbc59f01 23839do
cc11cc9b 23840 check_languages="$check_languages check-$language"
cbc59f01
DD
23841done
23842
62b81e45 23843# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 23844# lang.${target}. Only do so for selected languages.
861bb6c1
JL
23845
23846rm -f Make-hooks
23847touch Make-hooks
bd97af06 23848target_list="all.cross start.encap rest.encap tags \
bcc3d150
BM
23849 install-common install-man install-info install-pdf dvi pdf \
23850 html uninstall info man srcextra srcman srcinfo \
8b1f719a 23851 mostlyclean clean distclean maintainer-clean"
cc11cc9b 23852
861bb6c1
JL
23853for t in $target_list
23854do
23855 x=
cc11cc9b 23856 for lang in $all_selected_languages
861bb6c1 23857 do
cc11cc9b 23858 x="$x $lang.$t"
861bb6c1
JL
23859 done
23860 echo "lang.$t: $x" >> Make-hooks
23861done
23862
8bb915b6
NN
23863# --------
23864# UNSORTED
23865# --------
23866
cc06d68c 23867# Create .gdbinit.
861bb6c1 23868
cc06d68c
GP
23869echo "dir ." > .gdbinit
23870echo "dir ${srcdir}" >> .gdbinit
23871if test x$gdb_needs_out_file_path = xyes
23872then
23873 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
23874fi
23875if test "x$subdirs" != x; then
23876 for s in $subdirs
23877 do
23878 echo "dir ${srcdir}/$s" >> .gdbinit
23879 done
861bb6c1 23880fi
cc06d68c 23881echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 23882
15c723f3 23883gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)'
d062c304
JL
23884
23885
2ce3c6c6 23886
2bbea3a6
RH
23887# Find a directory in which to install a shared libgcc.
23888
b61ff9c8 23889# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
2bbea3a6 23890if test "${enable_version_specific_runtime_libs+set}" = set; then
b61ff9c8 23891 enableval="$enable_version_specific_runtime_libs"
ba479fd2 23892
b61ff9c8 23893fi;
2bbea3a6
RH
23894
23895
b61ff9c8 23896# Check whether --with-slibdir or --without-slibdir was given.
5b15f277 23897if test "${with_slibdir+set}" = set; then
b61ff9c8
BS
23898 withval="$with_slibdir"
23899 slibdir="$with_slibdir"
5b15f277
RH
23900else
23901 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 23902 slibdir='$(libsubdir)'
5b15f277 23903elif test "$host" != "$target"; then
2bbea3a6
RH
23904 slibdir='$(build_tooldir)/lib'
23905else
5b15f277 23906 slibdir='$(libdir)'
2bbea3a6 23907fi
b61ff9c8 23908fi;
2bbea3a6
RH
23909
23910
22482f74 23911
b61ff9c8 23912# Check whether --with-datarootdir or --without-datarootdir was given.
22482f74 23913if test "${with_datarootdir+set}" = set; then
b61ff9c8
BS
23914 withval="$with_datarootdir"
23915 datarootdir="\${prefix}/$with_datarootdir"
22482f74
MS
23916else
23917 datarootdir='$(prefix)/share'
b61ff9c8 23918fi;
22482f74
MS
23919
23920
a6ccdbab 23921
b61ff9c8 23922# Check whether --with-docdir or --without-docdir was given.
22482f74 23923if test "${with_docdir+set}" = set; then
b61ff9c8
BS
23924 withval="$with_docdir"
23925 docdir="\${prefix}/$with_docdir"
22482f74
MS
23926else
23927 docdir='$(datarootdir)'
b61ff9c8 23928fi;
703d89ab 23929
ab22c1fa 23930
1a4b763e 23931
b61ff9c8 23932# Check whether --with-htmldir or --without-htmldir was given.
22482f74 23933if test "${with_htmldir+set}" = set; then
b61ff9c8
BS
23934 withval="$with_htmldir"
23935 htmldir="\${prefix}/$with_htmldir"
22482f74
MS
23936else
23937 htmldir='$(docdir)'
b61ff9c8 23938fi;
861bb6c1
JL
23939
23940
703d89ab 23941# Substitute configuration variables
861bb6c1
JL
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985
9b16d2c4 23986
e9a25f70 23987
6e26218f 23988
c8724862 23989
11642c3a
ZW
23990
23991
23992
3d9d2476 23993
e2500fed 23994
a0e527e3 23995
c776a6d0 23996
51b9ff45 23997
861bb6c1 23998
6e3f3080
NN
23999# Echo link setup.
24000if test x${build} = x${host} ; then
24001 if test x${host} = x${target} ; then
24002 echo "Links are now set up to build a native compiler for ${target}." 1>&2
24003 else
24004 echo "Links are now set up to build a cross-compiler" 1>&2
24005 echo " from ${host} to ${target}." 1>&2
24006 fi
24007else
24008 if test x${host} = x${target} ; then
24009 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
24010 echo " for ${target}." 1>&2
24011 else
24012 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
24013 echo " from ${host} to ${target}." 1>&2
24014 fi
24015fi
24016
6de9cd9a
DN
24017
24018
24019
f8bf9252
SP
24020
24021
24022
24023
24024
24025if test "x${CLOOGLIBS}" != "x" ; then
24026
24027cat >>confdefs.h <<\_ACEOF
24028#define HAVE_cloog 1
24029_ACEOF
24030
24031 GRAPHITE=graphite.o
24032fi
24033
24034
6e3f3080
NN
24035# Configure the subdirectories
24036# AC_CONFIG_SUBDIRS($subdirs)
24037
24038# Create the Makefile
24039# and configure language subdirectories
b61ff9c8 24040 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
24041
24042
b61ff9c8 24043 ac_config_commands="$ac_config_commands default"
914c5af7 24044
ba479fd2 24045cat >confcache <<\_ACEOF
6e3f3080
NN
24046# This file is a shell script that caches the results of configure
24047# tests run on this system so they can be shared between configure
ba479fd2
NN
24048# scripts and configure runs, see configure's option --config-cache.
24049# It is not useful on other systems. If it contains results you don't
24050# want to keep, you may remove or edit it.
6e3f3080 24051#
ba479fd2
NN
24052# config.status only pays attention to the cache file if you give it
24053# the --recheck option to rerun configure.
6e3f3080 24054#
ba479fd2
NN
24055# `ac_cv_env_foo' variables (set or unset) will be overridden when
24056# loading this file, other *unset* `ac_cv_foo' will be assigned the
24057# following values.
24058
24059_ACEOF
24060
6e3f3080
NN
24061# The following way of writing the cache mishandles newlines in values,
24062# but we know of no workaround that is simple, portable, and efficient.
b61ff9c8 24063# So, don't put newlines in cache variables' values.
6e3f3080
NN
24064# Ultrix sh set writes to stderr and can't be redirected directly,
24065# and sets the high bit in the cache file unless we assign to the vars.
b61ff9c8 24066{
ba479fd2 24067 (set) 2>&1 |
b61ff9c8
BS
24068 case `(ac_space=' '; set | grep ac_space) 2>&1` in
24069 *ac_space=\ *)
ba479fd2
NN
24070 # `set' does not quote correctly, so add quotes (double-quote
24071 # substitution turns \\\\ into \\, and sed turns \\ into \).
24072 sed -n \
86da66b5
HPN
24073 "s/'/'\\\\''/g;
24074 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
b61ff9c8 24075 ;;
ba479fd2
NN
24076 *)
24077 # `set' quotes correctly as required by POSIX, so do not add quotes.
b61ff9c8
BS
24078 sed -n \
24079 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 24080 ;;
b61ff9c8
BS
24081 esac;
24082} |
ba479fd2
NN
24083 sed '
24084 t clear
b61ff9c8 24085 : clear
ba479fd2
NN
24086 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24087 t end
b61ff9c8
BS
24088 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24089 : end' >>confcache
24090if diff $cache_file confcache >/dev/null 2>&1; then :; else
24091 if test -w $cache_file; then
24092 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
ba479fd2 24093 cat confcache >$cache_file
6e3f3080 24094 else
b61ff9c8 24095 echo "not updating unwritable cache $cache_file"
6e3f3080
NN
24096 fi
24097fi
24098rm -f confcache
24099
24100test "x$prefix" = xNONE && prefix=$ac_default_prefix
24101# Let make expand exec_prefix.
24102test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24103
b61ff9c8
BS
24104# VPATH may cause trouble with some makes, so we remove $(srcdir),
24105# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24106# trailing colons and then remove the whole line if VPATH becomes empty
24107# (actually we leave an empty line to preserve line numbers).
24108if test "x$srcdir" = x.; then
24109 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24110s/:*\$(srcdir):*/:/;
24111s/:*\${srcdir}:*/:/;
24112s/:*@srcdir@:*/:/;
24113s/^\([^=]*=[ ]*\):*/\1/;
24114s/:*$//;
24115s/^[^=]*=[ ]*$//;
24116}'
24117fi
24118
63cf211a 24119DEFS=-DHAVE_CONFIG_H
6e3f3080 24120
ba479fd2
NN
24121ac_libobjs=
24122ac_ltlibobjs=
24123for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24124 # 1. Remove the extension, and $U if already installed.
b61ff9c8
BS
24125 ac_i=`echo "$ac_i" |
24126 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
24127 # 2. Add them.
24128 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
24129 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
ba479fd2
NN
24130done
24131LIBOBJS=$ac_libobjs
63cf211a 24132
ba479fd2
NN
24133LTLIBOBJS=$ac_ltlibobjs
24134
24135
24136
24137: ${CONFIG_STATUS=./config.status}
24138ac_clean_files_save=$ac_clean_files
24139ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24140{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24141echo "$as_me: creating $CONFIG_STATUS" >&6;}
24142cat >$CONFIG_STATUS <<_ACEOF
24143#! $SHELL
24144# Generated by $as_me.
6e3f3080
NN
24145# Run this file to recreate the current configuration.
24146# Compiler output produced by configure, useful for debugging
ba479fd2 24147# configure, is in config.log if it exists.
6e3f3080 24148
ba479fd2
NN
24149debug=false
24150ac_cs_recheck=false
24151ac_cs_silent=false
24152SHELL=\${CONFIG_SHELL-$SHELL}
24153_ACEOF
24154
24155cat >>$CONFIG_STATUS <<\_ACEOF
24156## --------------------- ##
24157## M4sh Initialization. ##
24158## --------------------- ##
24159
b61ff9c8 24160# Be Bourne compatible
ba479fd2
NN
24161if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24162 emulate sh
24163 NULLCMD=:
24164 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24165 # is contrary to our usage. Disable this feature.
24166 alias -g '${1+"$@"}'='"$@"'
b61ff9c8
BS
24167elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24168 set -o posix
2f41c1d6 24169fi
b61ff9c8 24170DUALCASE=1; export DUALCASE # for MKS sh
ab22c1fa 24171
1a4b763e
BS
24172# Support unset when possible.
24173if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24174 as_unset=unset
24175else
24176 as_unset=false
24177fi
24178
ab22c1fa 24179
1a4b763e 24180# Work around bugs in pre-3.0 UWIN ksh.
b61ff9c8 24181$as_unset ENV MAIL MAILPATH
1a4b763e
BS
24182PS1='$ '
24183PS2='> '
24184PS4='+ '
24185
24186# NLS nuisances.
24187for as_var in \
24188 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24189 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24190 LC_TELEPHONE LC_TIME
2f41c1d6 24191do
1a4b763e
BS
24192 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24193 eval $as_var=C; export $as_var
24194 else
b61ff9c8 24195 $as_unset $as_var
1a4b763e
BS
24196 fi
24197done
24198
24199# Required to use basename.
b61ff9c8 24200if expr a : '\(a\)' >/dev/null 2>&1; then
1a4b763e
BS
24201 as_expr=expr
24202else
24203 as_expr=false
24204fi
24205
b61ff9c8 24206if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
1a4b763e
BS
24207 as_basename=basename
24208else
24209 as_basename=false
24210fi
24211
24212
24213# Name of the executable.
b61ff9c8 24214as_me=`$as_basename "$0" ||
1a4b763e
BS
24215$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24216 X"$0" : 'X\(//\)$' \| \
b61ff9c8
BS
24217 X"$0" : 'X\(/\)$' \| \
24218 . : '\(.\)' 2>/dev/null ||
1a4b763e 24219echo X/"$0" |
b61ff9c8
BS
24220 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
24221 /^X\/\(\/\/\)$/{ s//\1/; q; }
24222 /^X\/\(\/\).*/{ s//\1/; q; }
24223 s/.*/./; q'`
1a4b763e 24224
b61ff9c8
BS
24225
24226# PATH needs CR, and LINENO needs CR and PATH.
24227# Avoid depending upon Character Ranges.
24228as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24229as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24230as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24231as_cr_digits='0123456789'
24232as_cr_alnum=$as_cr_Letters$as_cr_digits
24233
24234# The user is always right.
24235if test "${PATH_SEPARATOR+set}" != set; then
24236 echo "#! /bin/sh" >conf$$.sh
24237 echo "exit 0" >>conf$$.sh
24238 chmod +x conf$$.sh
24239 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24240 PATH_SEPARATOR=';'
24241 else
24242 PATH_SEPARATOR=:
24243 fi
24244 rm -f conf$$.sh
24245fi
1a4b763e
BS
24246
24247
b61ff9c8
BS
24248 as_lineno_1=$LINENO
24249 as_lineno_2=$LINENO
24250 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
24251 test "x$as_lineno_1" != "x$as_lineno_2" &&
24252 test "x$as_lineno_3" = "x$as_lineno_2" || {
24253 # Find who we are. Look in the path if we contain no path at all
24254 # relative or not.
24255 case $0 in
24256 *[\\/]* ) as_myself=$0 ;;
24257 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24258for as_dir in $PATH
24259do
24260 IFS=$as_save_IFS
24261 test -z "$as_dir" && as_dir=.
24262 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24263done
1a4b763e 24264
b61ff9c8
BS
24265 ;;
24266 esac
24267 # We did not find ourselves, most probably we were run as `sh COMMAND'
24268 # in which case we are not to be found in the path.
24269 if test "x$as_myself" = x; then
24270 as_myself=$0
24271 fi
24272 if test ! -f "$as_myself"; then
24273 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
24274echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
24275 { (exit 1); exit 1; }; }
24276 fi
24277 case $CONFIG_SHELL in
24278 '')
24279 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24280for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
24281do
24282 IFS=$as_save_IFS
24283 test -z "$as_dir" && as_dir=.
24284 for as_base in sh bash ksh sh5; do
24285 case $as_dir in
24286 /*)
24287 if ("$as_dir/$as_base" -c '
8b1f719a
PB
24288 as_lineno_1=$LINENO
24289 as_lineno_2=$LINENO
b61ff9c8 24290 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
8b1f719a 24291 test "x$as_lineno_1" != "x$as_lineno_2" &&
b61ff9c8
BS
24292 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
24293 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
24294 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
24295 CONFIG_SHELL=$as_dir/$as_base
24296 export CONFIG_SHELL
24297 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
24298 fi;;
24299 esac
24300 done
24301done
24302;;
24303 esac
ba479fd2
NN
24304
24305 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24306 # uniformly replaced by the line number. The first 'sed' inserts a
b61ff9c8
BS
24307 # line-number line before each line; the second 'sed' does the real
24308 # work. The second script uses 'N' to pair each line-number line
24309 # with the numbered line, and appends trailing '-' during
24310 # substitution so that $LINENO is not a special case at line end.
ba479fd2 24311 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b61ff9c8
BS
24312 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
24313 sed '=' <$as_myself |
ba479fd2
NN
24314 sed '
24315 N
b61ff9c8
BS
24316 s,$,-,
24317 : loop
24318 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
ba479fd2 24319 t loop
b61ff9c8
BS
24320 s,-$,,
24321 s,^['$as_cr_digits']*\n,,
ba479fd2 24322 ' >$as_me.lineno &&
b61ff9c8
BS
24323 chmod +x $as_me.lineno ||
24324 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
24325echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
ba479fd2
NN
24326 { (exit 1); exit 1; }; }
24327
24328 # Don't try to exec as it changes $[0], causing all sort of problems
24329 # (the dirname of $[0] is not the place where we might find the
b61ff9c8
BS
24330 # original and so on. Autoconf is especially sensible to this).
24331 . ./$as_me.lineno
ba479fd2
NN
24332 # Exit status is that of the last command.
24333 exit
24334}
24335
24336
b61ff9c8
BS
24337case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
24338 *c*,-n*) ECHO_N= ECHO_C='
24339' ECHO_T=' ' ;;
24340 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
24341 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
ba479fd2
NN
24342esac
24343
b61ff9c8 24344if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
24345 as_expr=expr
24346else
24347 as_expr=false
24348fi
24349
24350rm -f conf$$ conf$$.exe conf$$.file
24351echo >conf$$.file
24352if ln -s conf$$.file conf$$ 2>/dev/null; then
b61ff9c8
BS
24353 # We could just check for DJGPP; but this test a) works b) is more generic
24354 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24355 if test -f conf$$.exe; then
24356 # Don't use ln at all; we don't have any links
ba479fd2 24357 as_ln_s='cp -p'
b61ff9c8
BS
24358 else
24359 as_ln_s='ln -s'
24360 fi
ba479fd2
NN
24361elif ln conf$$.file conf$$ 2>/dev/null; then
24362 as_ln_s=ln
24363else
24364 as_ln_s='cp -p'
24365fi
b61ff9c8 24366rm -f conf$$ conf$$.exe conf$$.file
ba479fd2
NN
24367
24368if mkdir -p . 2>/dev/null; then
24369 as_mkdir_p=:
24370else
86da66b5 24371 test -d ./-p && rmdir ./-p
ba479fd2
NN
24372 as_mkdir_p=false
24373fi
24374
b61ff9c8 24375as_executable_p="test -f"
ba479fd2
NN
24376
24377# Sed expression to map a string onto a valid CPP name.
86da66b5 24378as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
24379
24380# Sed expression to map a string onto a valid variable name.
86da66b5 24381as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
24382
24383
b61ff9c8
BS
24384# IFS
24385# We need space, tab and new line, in precisely that order.
24386as_nl='
24387'
24388IFS=" $as_nl"
24389
24390# CDPATH.
24391$as_unset CDPATH
24392
ba479fd2
NN
24393exec 6>&1
24394
b61ff9c8 24395# Open the log real soon, to keep \$[0] and so on meaningful, and to
ba479fd2 24396# report actual input values of CONFIG_FILES etc. instead of their
b61ff9c8
BS
24397# values after options handling. Logging --version etc. is OK.
24398exec 5>>config.log
24399{
24400 echo
24401 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24402## Running $as_me. ##
24403_ASBOX
24404} >&5
24405cat >&5 <<_CSEOF
24406
ba479fd2 24407This file was extended by $as_me, which was
b61ff9c8 24408generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
24409
24410 CONFIG_FILES = $CONFIG_FILES
24411 CONFIG_HEADERS = $CONFIG_HEADERS
24412 CONFIG_LINKS = $CONFIG_LINKS
24413 CONFIG_COMMANDS = $CONFIG_COMMANDS
24414 $ $0 $@
24415
b61ff9c8
BS
24416_CSEOF
24417echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
24418echo >&5
ba479fd2
NN
24419_ACEOF
24420
24421# Files that config.status was made for.
b61ff9c8
BS
24422if test -n "$ac_config_files"; then
24423 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
24424fi
2f41c1d6 24425
b61ff9c8
BS
24426if test -n "$ac_config_headers"; then
24427 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
24428fi
24429
24430if test -n "$ac_config_links"; then
24431 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
24432fi
24433
24434if test -n "$ac_config_commands"; then
24435 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
24436fi
ba479fd2
NN
24437
24438cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8 24439
ba479fd2
NN
24440ac_cs_usage="\
24441\`$as_me' instantiates files from templates according to the
24442current configuration.
24443
24444Usage: $0 [OPTIONS] [FILE]...
24445
24446 -h, --help print this help, then exit
b61ff9c8 24447 -V, --version print version number, then exit
ba479fd2
NN
24448 -q, --quiet do not print progress messages
24449 -d, --debug don't remove temporary files
24450 --recheck update $as_me by reconfiguring in the same conditions
24451 --file=FILE[:TEMPLATE]
86da66b5 24452 instantiate the configuration file FILE
ba479fd2 24453 --header=FILE[:TEMPLATE]
86da66b5 24454 instantiate the configuration header FILE
ba479fd2
NN
24455
24456Configuration files:
24457$config_files
24458
24459Configuration headers:
24460$config_headers
24461
24462Configuration commands:
24463$config_commands
24464
24465Report bugs to <bug-autoconf@gnu.org>."
1a4b763e 24466_ACEOF
b61ff9c8 24467
ba479fd2
NN
24468cat >>$CONFIG_STATUS <<_ACEOF
24469ac_cs_version="\\
24470config.status
b61ff9c8
BS
24471configured by $0, generated by GNU Autoconf 2.59,
24472 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
ba479fd2 24473
b61ff9c8 24474Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
24475This config.status script is free software; the Free Software Foundation
24476gives unlimited permission to copy, distribute and modify it."
b61ff9c8 24477srcdir=$srcdir
ba479fd2
NN
24478_ACEOF
24479
24480cat >>$CONFIG_STATUS <<\_ACEOF
24481# If no file are specified by the user, then we need to provide default
24482# value. By we need to know if files were specified by the user.
24483ac_need_defaults=:
24484while test $# != 0
24485do
24486 case $1 in
24487 --*=*)
b61ff9c8
BS
24488 ac_option=`expr "x$1" : 'x\([^=]*\)='`
24489 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
ba479fd2
NN
24490 ac_shift=:
24491 ;;
b61ff9c8 24492 -*)
ba479fd2
NN
24493 ac_option=$1
24494 ac_optarg=$2
24495 ac_shift=shift
24496 ;;
b61ff9c8
BS
24497 *) # This is not an option, so the user has probably given explicit
24498 # arguments.
24499 ac_option=$1
24500 ac_need_defaults=false;;
ba479fd2
NN
24501 esac
24502
24503 case $ac_option in
24504 # Handling of the options.
b61ff9c8
BS
24505_ACEOF
24506cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
24507 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24508 ac_cs_recheck=: ;;
b61ff9c8
BS
24509 --version | --vers* | -V )
24510 echo "$ac_cs_version"; exit 0 ;;
24511 --he | --h)
24512 # Conflict between --help and --header
24513 { { echo "$as_me:$LINENO: error: ambiguous option: $1
24514Try \`$0 --help' for more information." >&5
24515echo "$as_me: error: ambiguous option: $1
24516Try \`$0 --help' for more information." >&2;}
24517 { (exit 1); exit 1; }; };;
24518 --help | --hel | -h )
24519 echo "$ac_cs_usage"; exit 0 ;;
24520 --debug | --d* | -d )
ba479fd2
NN
24521 debug=: ;;
24522 --file | --fil | --fi | --f )
24523 $ac_shift
24524 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
24525 ac_need_defaults=false;;
24526 --header | --heade | --head | --hea )
24527 $ac_shift
24528 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
24529 ac_need_defaults=false;;
24530 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24531 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24532 ac_cs_silent=: ;;
24533
24534 # This is an error.
b61ff9c8
BS
24535 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
24536Try \`$0 --help' for more information." >&5
24537echo "$as_me: error: unrecognized option: $1
24538Try \`$0 --help' for more information." >&2;}
ba479fd2
NN
24539 { (exit 1); exit 1; }; } ;;
24540
b61ff9c8 24541 *) ac_config_targets="$ac_config_targets $1" ;;
ba479fd2
NN
24542
24543 esac
24544 shift
6e3f3080 24545done
ba479fd2
NN
24546
24547ac_configure_extra_args=
24548
24549if $ac_cs_silent; then
24550 exec 6>/dev/null
24551 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
24552fi
24553
ba479fd2
NN
24554_ACEOF
24555cat >>$CONFIG_STATUS <<_ACEOF
24556if \$ac_cs_recheck; then
b61ff9c8
BS
24557 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24558 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
ba479fd2 24559fi
861bb6c1 24560
ba479fd2
NN
24561_ACEOF
24562
24563cat >>$CONFIG_STATUS <<_ACEOF
24564#
b61ff9c8 24565# INIT-COMMANDS section.
ba479fd2 24566#
b61ff9c8 24567
ba479fd2 24568subdirs='$subdirs'
ba479fd2
NN
24569
24570_ACEOF
24571
1a4b763e 24572
b61ff9c8
BS
24573
24574cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
24575for ac_config_target in $ac_config_targets
24576do
b61ff9c8
BS
24577 case "$ac_config_target" in
24578 # Handling of arguments.
24579 "as" ) CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
24580 "collect-ld" ) CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
24581 "nm" ) CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
24582 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
24583 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24584 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
ba479fd2
NN
24585 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24586echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24587 { (exit 1); exit 1; }; };;
861bb6c1 24588 esac
ba479fd2
NN
24589done
24590
24591# If the user did not use the arguments to specify the items to instantiate,
24592# then the envvar interface is used. Set only those that are not.
24593# We use the long form for the default assignment because of an extremely
24594# bizarre bug on SunOS 4.1.3.
24595if $ac_need_defaults; then
24596 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24597 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24598 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24599fi
24600
24601# Have a temporary directory for convenience. Make it in the build tree
b61ff9c8 24602# simply because there is no reason to put it here, and in addition,
ba479fd2 24603# creating and moving files from /tmp can sometimes cause problems.
b61ff9c8 24604# Create a temporary directory, and hook for its removal unless debugging.
ba479fd2
NN
24605$debug ||
24606{
b61ff9c8 24607 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
ba479fd2
NN
24608 trap '{ (exit 1); exit 1; }' 1 2 13 15
24609}
b61ff9c8 24610
ba479fd2 24611# Create a (secure) tmp directory for tmp files.
6e3f3080 24612
ba479fd2 24613{
b61ff9c8 24614 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
ba479fd2
NN
24615 test -n "$tmp" && test -d "$tmp"
24616} ||
24617{
b61ff9c8
BS
24618 tmp=./confstat$$-$RANDOM
24619 (umask 077 && mkdir $tmp)
ba479fd2
NN
24620} ||
24621{
24622 echo "$me: cannot create a temporary directory in ." >&2
24623 { (exit 1); exit 1; }
24624}
24625
b61ff9c8
BS
24626_ACEOF
24627
24628cat >>$CONFIG_STATUS <<_ACEOF
24629
ba479fd2 24630#
b61ff9c8 24631# CONFIG_FILES section.
ba479fd2
NN
24632#
24633
24634# No need to generate the scripts if there are no CONFIG_FILES.
24635# This happens for instance when ./config.status config.h
b61ff9c8
BS
24636if test -n "\$CONFIG_FILES"; then
24637 # Protect against being on the right side of a sed subst in config.status.
24638 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24639 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24640s,@SHELL@,$SHELL,;t t
24641s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24642s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24643s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24644s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24645s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24646s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24647s,@exec_prefix@,$exec_prefix,;t t
24648s,@prefix@,$prefix,;t t
24649s,@program_transform_name@,$program_transform_name,;t t
24650s,@bindir@,$bindir,;t t
24651s,@sbindir@,$sbindir,;t t
24652s,@libexecdir@,$libexecdir,;t t
24653s,@datadir@,$datadir,;t t
24654s,@sysconfdir@,$sysconfdir,;t t
24655s,@sharedstatedir@,$sharedstatedir,;t t
24656s,@localstatedir@,$localstatedir,;t t
24657s,@libdir@,$libdir,;t t
24658s,@includedir@,$includedir,;t t
24659s,@oldincludedir@,$oldincludedir,;t t
24660s,@infodir@,$infodir,;t t
24661s,@mandir@,$mandir,;t t
24662s,@build_alias@,$build_alias,;t t
24663s,@host_alias@,$host_alias,;t t
24664s,@target_alias@,$target_alias,;t t
24665s,@DEFS@,$DEFS,;t t
24666s,@ECHO_C@,$ECHO_C,;t t
24667s,@ECHO_N@,$ECHO_N,;t t
24668s,@ECHO_T@,$ECHO_T,;t t
24669s,@LIBS@,$LIBS,;t t
24670s,@build@,$build,;t t
24671s,@build_cpu@,$build_cpu,;t t
24672s,@build_vendor@,$build_vendor,;t t
24673s,@build_os@,$build_os,;t t
24674s,@host@,$host,;t t
24675s,@host_cpu@,$host_cpu,;t t
24676s,@host_vendor@,$host_vendor,;t t
24677s,@host_os@,$host_os,;t t
24678s,@target@,$target,;t t
24679s,@target_cpu@,$target_cpu,;t t
24680s,@target_vendor@,$target_vendor,;t t
24681s,@target_os@,$target_os,;t t
24682s,@target_noncanonical@,$target_noncanonical,;t t
24683s,@build_libsubdir@,$build_libsubdir,;t t
24684s,@build_subdir@,$build_subdir,;t t
24685s,@host_subdir@,$host_subdir,;t t
24686s,@target_subdir@,$target_subdir,;t t
24687s,@GENINSRC@,$GENINSRC,;t t
24688s,@CC@,$CC,;t t
24689s,@CFLAGS@,$CFLAGS,;t t
24690s,@LDFLAGS@,$LDFLAGS,;t t
24691s,@CPPFLAGS@,$CPPFLAGS,;t t
24692s,@ac_ct_CC@,$ac_ct_CC,;t t
24693s,@EXEEXT@,$EXEEXT,;t t
24694s,@OBJEXT@,$OBJEXT,;t t
3d4e720a
ST
24695s,@GNATBIND@,$GNATBIND,;t t
24696s,@ac_ct_GNATBIND@,$ac_ct_GNATBIND,;t t
24697s,@GNATMAKE@,$GNATMAKE,;t t
24698s,@ac_ct_GNATMAKE@,$ac_ct_GNATMAKE,;t t
b61ff9c8
BS
24699s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
24700s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
24701s,@CPP@,$CPP,;t t
24702s,@EGREP@,$EGREP,;t t
24703s,@loose_warn@,$loose_warn,;t t
b61ff9c8
BS
24704s,@strict_warn@,$strict_warn,;t t
24705s,@warn_cflags@,$warn_cflags,;t t
24706s,@nocommon_flag@,$nocommon_flag,;t t
24707s,@TREEBROWSER@,$TREEBROWSER,;t t
24708s,@valgrind_path@,$valgrind_path,;t t
24709s,@valgrind_path_defines@,$valgrind_path_defines,;t t
24710s,@valgrind_command@,$valgrind_command,;t t
24711s,@coverage_flags@,$coverage_flags,;t t
24712s,@enable_multilib@,$enable_multilib,;t t
24713s,@enable_decimal_float@,$enable_decimal_float,;t t
24714s,@enable_fixed_point@,$enable_fixed_point,;t t
24715s,@enable_shared@,$enable_shared,;t t
24716s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
24717s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
24718s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
24719s,@onestep@,$onestep,;t t
24720s,@PKGVERSION@,$PKGVERSION,;t t
24721s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
24722s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
24723s,@datarootdir@,$datarootdir,;t t
24724s,@docdir@,$docdir,;t t
24725s,@htmldir@,$htmldir,;t t
24726s,@SET_MAKE@,$SET_MAKE,;t t
24727s,@AWK@,$AWK,;t t
24728s,@LN_S@,$LN_S,;t t
24729s,@LN@,$LN,;t t
24730s,@RANLIB@,$RANLIB,;t t
24731s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24732s,@ranlib_flags@,$ranlib_flags,;t t
24733s,@INSTALL@,$INSTALL,;t t
24734s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24735s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24736s,@make_compare_target@,$make_compare_target,;t t
24737s,@have_mktemp_command@,$have_mktemp_command,;t t
24738s,@MAKEINFO@,$MAKEINFO,;t t
24739s,@BUILD_INFO@,$BUILD_INFO,;t t
24740s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
24741s,@FLEX@,$FLEX,;t t
24742s,@BISON@,$BISON,;t t
24743s,@NM@,$NM,;t t
24744s,@AR@,$AR,;t t
24745s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
24746s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
24747s,@LDEXP_LIB@,$LDEXP_LIB,;t t
24748s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
24749s,@LIBICONV@,$LIBICONV,;t t
24750s,@LTLIBICONV@,$LTLIBICONV,;t t
24751s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
24752s,@manext@,$manext,;t t
24753s,@objext@,$objext,;t t
24754s,@gthread_flags@,$gthread_flags,;t t
24755s,@extra_modes_file@,$extra_modes_file,;t t
24756s,@extra_opt_files@,$extra_opt_files,;t t
24757s,@USE_NLS@,$USE_NLS,;t t
24758s,@LIBINTL@,$LIBINTL,;t t
24759s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
24760s,@INCINTL@,$INCINTL,;t t
24761s,@XGETTEXT@,$XGETTEXT,;t t
24762s,@GMSGFMT@,$GMSGFMT,;t t
24763s,@POSUB@,$POSUB,;t t
24764s,@CATALOGS@,$CATALOGS,;t t
24765s,@DATADIRNAME@,$DATADIRNAME,;t t
24766s,@INSTOBJEXT@,$INSTOBJEXT,;t t
24767s,@GENCAT@,$GENCAT,;t t
24768s,@CATOBJEXT@,$CATOBJEXT,;t t
b61ff9c8
BS
24769s,@CROSS@,$CROSS,;t t
24770s,@ALL@,$ALL,;t t
24771s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
24772s,@inhibit_libc@,$inhibit_libc,;t t
24773s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
24774s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
f8c33439 24775s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
b61ff9c8
BS
24776s,@STMP_FIXINC@,$STMP_FIXINC,;t t
24777s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
24778s,@collect2@,$collect2,;t t
da0f6381
PB
24779s,@LIBTOOL@,$LIBTOOL,;t t
24780s,@SED@,$SED,;t t
24781s,@FGREP@,$FGREP,;t t
24782s,@GREP@,$GREP,;t t
24783s,@LD@,$LD,;t t
24784s,@DUMPBIN@,$DUMPBIN,;t t
24785s,@ac_ct_DUMPBIN@,$ac_ct_DUMPBIN,;t t
24786s,@ac_ct_AR@,$ac_ct_AR,;t t
24787s,@STRIP@,$STRIP,;t t
24788s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
24789s,@lt_ECHO@,$lt_ECHO,;t t
24790s,@objdir@,$objdir,;t t
24791s,@enable_fast_install@,$enable_fast_install,;t t
b61ff9c8
BS
24792s,@gcc_cv_as@,$gcc_cv_as,;t t
24793s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
24794s,@gcc_cv_ld@,$gcc_cv_ld,;t t
24795s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
24796s,@gcc_cv_nm@,$gcc_cv_nm,;t t
24797s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
24798s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
24799s,@libgcc_visibility@,$libgcc_visibility,;t t
24800s,@GGC@,$GGC,;t t
24801s,@zlibdir@,$zlibdir,;t t
24802s,@zlibinc@,$zlibinc,;t t
24803s,@MAINT@,$MAINT,;t t
24804s,@gcc_tooldir@,$gcc_tooldir,;t t
24805s,@dollar@,$dollar,;t t
24806s,@slibdir@,$slibdir,;t t
b61ff9c8
BS
24807s,@subdirs@,$subdirs,;t t
24808s,@srcdir@,$srcdir,;t t
24809s,@all_compilers@,$all_compilers,;t t
24810s,@all_gtfiles@,$all_gtfiles,;t t
24811s,@all_lang_makefrags@,$all_lang_makefrags,;t t
24812s,@all_lang_makefiles@,$all_lang_makefiles,;t t
24813s,@all_languages@,$all_languages,;t t
24814s,@all_selected_languages@,$all_selected_languages,;t t
24815s,@build_exeext@,$build_exeext,;t t
24816s,@build_install_headers_dir@,$build_install_headers_dir,;t t
24817s,@build_xm_file_list@,$build_xm_file_list,;t t
24818s,@build_xm_include_list@,$build_xm_include_list,;t t
24819s,@build_xm_defines@,$build_xm_defines,;t t
a0e527e3 24820s,@build_file_translate@,$build_file_translate,;t t
b61ff9c8
BS
24821s,@check_languages@,$check_languages,;t t
24822s,@cpp_install_dir@,$cpp_install_dir,;t t
24823s,@xmake_file@,$xmake_file,;t t
24824s,@tmake_file@,$tmake_file,;t t
24825s,@extra_gcc_objs@,$extra_gcc_objs,;t t
24826s,@extra_headers_list@,$extra_headers_list,;t t
24827s,@extra_objs@,$extra_objs,;t t
24828s,@extra_parts@,$extra_parts,;t t
24829s,@extra_passes@,$extra_passes,;t t
24830s,@extra_programs@,$extra_programs,;t t
24831s,@float_h_file@,$float_h_file,;t t
24832s,@gcc_config_arguments@,$gcc_config_arguments,;t t
24833s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
24834s,@host_exeext@,$host_exeext,;t t
24835s,@host_xm_file_list@,$host_xm_file_list,;t t
24836s,@host_xm_include_list@,$host_xm_include_list,;t t
24837s,@host_xm_defines@,$host_xm_defines,;t t
24838s,@out_host_hook_obj@,$out_host_hook_obj,;t t
24839s,@install@,$install,;t t
24840s,@lang_opt_files@,$lang_opt_files,;t t
24841s,@lang_specs_files@,$lang_specs_files,;t t
24842s,@lang_tree_files@,$lang_tree_files,;t t
24843s,@local_prefix@,$local_prefix,;t t
24844s,@md_file@,$md_file,;t t
24845s,@objc_boehm_gc@,$objc_boehm_gc,;t t
24846s,@out_file@,$out_file,;t t
24847s,@out_object_file@,$out_object_file,;t t
24848s,@thread_file@,$thread_file,;t t
24849s,@tm_file_list@,$tm_file_list,;t t
24850s,@tm_include_list@,$tm_include_list,;t t
24851s,@tm_defines@,$tm_defines,;t t
24852s,@tm_p_file_list@,$tm_p_file_list,;t t
24853s,@tm_p_include_list@,$tm_p_include_list,;t t
24854s,@xm_file_list@,$xm_file_list,;t t
24855s,@xm_include_list@,$xm_include_list,;t t
24856s,@xm_defines@,$xm_defines,;t t
24857s,@c_target_objs@,$c_target_objs,;t t
24858s,@cxx_target_objs@,$cxx_target_objs,;t t
c776a6d0 24859s,@fortran_target_objs@,$fortran_target_objs,;t t
b61ff9c8
BS
24860s,@target_cpu_default@,$target_cpu_default,;t t
24861s,@GMPLIBS@,$GMPLIBS,;t t
24862s,@GMPINC@,$GMPINC,;t t
f8bf9252
SP
24863s,@PPLLIBS@,$PPLLIBS,;t t
24864s,@PPLINC@,$PPLINC,;t t
24865s,@CLOOGLIBS@,$CLOOGLIBS,;t t
24866s,@CLOOGINC@,$CLOOGINC,;t t
24867s,@GRAPHITE@,$GRAPHITE,;t t
b61ff9c8
BS
24868s,@LIBOBJS@,$LIBOBJS,;t t
24869s,@LTLIBOBJS@,$LTLIBOBJS,;t t
24870/@language_hooks@/r $language_hooks
24871s,@language_hooks@,,;t t
24872CEOF
24873
24874_ACEOF
24875
24876 cat >>$CONFIG_STATUS <<\_ACEOF
24877 # Split the substitutions into bite-sized pieces for seds with
24878 # small command number limits, like on Digital OSF/1 and HP-UX.
24879 ac_max_sed_lines=48
24880 ac_sed_frag=1 # Number of current file.
24881 ac_beg=1 # First line for current file.
24882 ac_end=$ac_max_sed_lines # Line after last line for current file.
24883 ac_more_lines=:
24884 ac_sed_cmds=
24885 while $ac_more_lines; do
24886 if test $ac_beg -gt 1; then
24887 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24888 else
24889 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24890 fi
24891 if test ! -s $tmp/subs.frag; then
24892 ac_more_lines=false
24893 else
24894 # The purpose of the label and of the branching condition is to
24895 # speed up the sed processing (if there are no `@' at all, there
24896 # is no need to browse any of the substitutions).
24897 # These are the two extra sed commands mentioned above.
24898 (echo ':t
24899 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24900 if test -z "$ac_sed_cmds"; then
24901 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24902 else
24903 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24904 fi
24905 ac_sed_frag=`expr $ac_sed_frag + 1`
24906 ac_beg=$ac_end
24907 ac_end=`expr $ac_end + $ac_max_sed_lines`
24908 fi
24909 done
24910 if test -z "$ac_sed_cmds"; then
24911 ac_sed_cmds=cat
1a4b763e 24912 fi
b61ff9c8 24913fi # test -n "$CONFIG_FILES"
1a4b763e 24914
1a4b763e 24915_ACEOF
ba479fd2 24916cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8
BS
24917for ac_file in : $CONFIG_FILES; 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 ;;
703d89ab
ZW
24927 esac
24928
b61ff9c8
BS
24929 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24930 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
ba479fd2 24931$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
24932 X"$ac_file" : 'X\(//\)[^/]' \| \
24933 X"$ac_file" : 'X\(//\)$' \| \
b61ff9c8
BS
24934 X"$ac_file" : 'X\(/\)' \| \
24935 . : '\(.\)' 2>/dev/null ||
ba479fd2 24936echo X"$ac_file" |
b61ff9c8
BS
24937 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24938 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24939 /^X\(\/\/\)$/{ s//\1/; q; }
24940 /^X\(\/\).*/{ s//\1/; q; }
24941 s/.*/./; q'`
24942 { if $as_mkdir_p; then
24943 mkdir -p "$ac_dir"
24944 else
24945 as_dir="$ac_dir"
ba479fd2 24946 as_dirs=
b61ff9c8
BS
24947 while test ! -d "$as_dir"; do
24948 as_dirs="$as_dir $as_dirs"
24949 as_dir=`(dirname "$as_dir") 2>/dev/null ||
ba479fd2 24950$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
24951 X"$as_dir" : 'X\(//\)[^/]' \| \
24952 X"$as_dir" : 'X\(//\)$' \| \
b61ff9c8
BS
24953 X"$as_dir" : 'X\(/\)' \| \
24954 . : '\(.\)' 2>/dev/null ||
ba479fd2 24955echo X"$as_dir" |
b61ff9c8
BS
24956 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24957 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24958 /^X\(\/\/\)$/{ s//\1/; q; }
24959 /^X\(\/\).*/{ s//\1/; q; }
24960 s/.*/./; q'`
ba479fd2 24961 done
b61ff9c8
BS
24962 test ! -n "$as_dirs" || mkdir $as_dirs
24963 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24964echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
ba479fd2 24965 { (exit 1); exit 1; }; }; }
b61ff9c8 24966
ba479fd2
NN
24967 ac_builddir=.
24968
b61ff9c8 24969if test "$ac_dir" != .; then
ba479fd2 24970 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b61ff9c8
BS
24971 # A "../" for each directory in $ac_dir_suffix.
24972 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24973else
24974 ac_dir_suffix= ac_top_builddir=
24975fi
ba479fd2
NN
24976
24977case $srcdir in
b61ff9c8 24978 .) # No --srcdir option. We are building in place.
ba479fd2 24979 ac_srcdir=.
b61ff9c8
BS
24980 if test -z "$ac_top_builddir"; then
24981 ac_top_srcdir=.
24982 else
24983 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24984 fi ;;
24985 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 24986 ac_srcdir=$srcdir$ac_dir_suffix;
b61ff9c8
BS
24987 ac_top_srcdir=$srcdir ;;
24988 *) # Relative path.
24989 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24990 ac_top_srcdir=$ac_top_builddir$srcdir ;;
ba479fd2 24991esac
ba479fd2 24992
b61ff9c8
BS
24993# Do not use `cd foo && pwd` to compute absolute paths, because
24994# the directories may not exist.
24995case `pwd` in
24996.) ac_abs_builddir="$ac_dir";;
24997*)
24998 case "$ac_dir" in
24999 .) ac_abs_builddir=`pwd`;;
25000 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
25001 *) ac_abs_builddir=`pwd`/"$ac_dir";;
25002 esac;;
25003esac
25004case $ac_abs_builddir in
25005.) ac_abs_top_builddir=${ac_top_builddir}.;;
25006*)
25007 case ${ac_top_builddir}. in
25008 .) ac_abs_top_builddir=$ac_abs_builddir;;
25009 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
25010 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
25011 esac;;
25012esac
25013case $ac_abs_builddir in
25014.) ac_abs_srcdir=$ac_srcdir;;
25015*)
25016 case $ac_srcdir in
25017 .) ac_abs_srcdir=$ac_abs_builddir;;
25018 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
25019 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
25020 esac;;
25021esac
25022case $ac_abs_builddir in
25023.) ac_abs_top_srcdir=$ac_top_srcdir;;
25024*)
25025 case $ac_top_srcdir in
25026 .) ac_abs_top_srcdir=$ac_abs_builddir;;
25027 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
25028 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
25029 esac;;
25030esac
703d89ab 25031
ab22c1fa 25032
1a4b763e 25033
b61ff9c8
BS
25034 if test x"$ac_file" != x-; then
25035 { echo "$as_me:$LINENO: creating $ac_file" >&5
25036echo "$as_me: creating $ac_file" >&6;}
25037 rm -f "$ac_file"
25038 fi
25039 # Let's still pretend it is `configure' which instantiates (i.e., don't
25040 # use $as_me), people would be surprised to read:
25041 # /* config.h. Generated by config.status. */
25042 if test x"$ac_file" = x-; then
25043 configure_input=
25044 else
25045 configure_input="$ac_file. "
25046 fi
25047 configure_input=$configure_input"Generated from `echo $ac_file_in |
25048 sed 's,.*/,,'` by configure."
25049
25050 # First look for the input files in the build tree, otherwise in the
25051 # src tree.
25052 ac_file_inputs=`IFS=:
25053 for f in $ac_file_in; do
25054 case $f in
25055 -) echo $tmp/stdin ;;
25056 [\\/$]*)
25057 # Absolute (can't be DOS-style, as IFS=:)
25058 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
25059echo "$as_me: error: cannot find input file: $f" >&2;}
25060 { (exit 1); exit 1; }; }
25061 echo "$f";;
25062 *) # Relative
25063 if test -f "$f"; then
25064 # Build tree
25065 echo "$f"
25066 elif test -f "$srcdir/$f"; then
25067 # Source tree
25068 echo "$srcdir/$f"
25069 else
25070 # /dev/null tree
25071 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
25072echo "$as_me: error: cannot find input file: $f" >&2;}
25073 { (exit 1); exit 1; }; }
25074 fi;;
25075 esac
25076 done` || { (exit 1); exit 1; }
a6ccdbab 25077_ACEOF
ba479fd2
NN
25078cat >>$CONFIG_STATUS <<_ACEOF
25079 sed "$ac_vpsub
25080$extrasub
25081_ACEOF
25082cat >>$CONFIG_STATUS <<\_ACEOF
25083:t
25084/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b61ff9c8
BS
25085s,@configure_input@,$configure_input,;t t
25086s,@srcdir@,$ac_srcdir,;t t
25087s,@abs_srcdir@,$ac_abs_srcdir,;t t
25088s,@top_srcdir@,$ac_top_srcdir,;t t
25089s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
25090s,@builddir@,$ac_builddir,;t t
25091s,@abs_builddir@,$ac_abs_builddir,;t t
25092s,@top_builddir@,$ac_top_builddir,;t t
25093s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
25094" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25095 rm -f $tmp/stdin
25096 if test x"$ac_file" != x-; then
25097 mv $tmp/out $ac_file
25098 else
25099 cat $tmp/out
25100 rm -f $tmp/out
25101 fi
25102
25103 # Run the commands associated with the file.
be0fe523 25104 case $ac_file in
b61ff9c8
BS
25105 as ) chmod +x as ;;
25106 collect-ld ) chmod +x collect-ld ;;
25107 nm ) chmod +x nm ;;
be0fe523 25108 esac
b61ff9c8
BS
25109done
25110_ACEOF
25111cat >>$CONFIG_STATUS <<\_ACEOF
25112
25113#
25114# CONFIG_HEADER section.
25115#
25116
25117# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25118# NAME is the cpp macro being defined and VALUE is the value it is being given.
25119#
25120# ac_d sets the value in "#define NAME VALUE" lines.
25121ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
25122ac_dB='[ ].*$,\1#\2'
a3bba767 25123ac_dC=' '
b61ff9c8
BS
25124ac_dD=',;t'
25125# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25126ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
25127ac_uB='$,\1#\2define\3'
25128ac_uC=' '
25129ac_uD=',;t'
25130
25131for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25132 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25133 case $ac_file in
25134 - | *:- | *:-:* ) # input from stdin
25135 cat >$tmp/stdin
25136 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25137 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25138 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25139 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25140 * ) ac_file_in=$ac_file.in ;;
25141 esac
25142
25143 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
25144echo "$as_me: creating $ac_file" >&6;}
25145
25146 # First look for the input files in the build tree, otherwise in the
25147 # src tree.
25148 ac_file_inputs=`IFS=:
25149 for f in $ac_file_in; do
25150 case $f in
25151 -) echo $tmp/stdin ;;
25152 [\\/$]*)
25153 # Absolute (can't be DOS-style, as IFS=:)
25154 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
25155echo "$as_me: error: cannot find input file: $f" >&2;}
25156 { (exit 1); exit 1; }; }
25157 # Do quote $f, to prevent DOS paths from being IFS'd.
25158 echo "$f";;
25159 *) # Relative
25160 if test -f "$f"; then
25161 # Build tree
25162 echo "$f"
25163 elif test -f "$srcdir/$f"; then
25164 # Source tree
25165 echo "$srcdir/$f"
25166 else
25167 # /dev/null tree
25168 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
25169echo "$as_me: error: cannot find input file: $f" >&2;}
25170 { (exit 1); exit 1; }; }
25171 fi;;
25172 esac
25173 done` || { (exit 1); exit 1; }
25174 # Remove the trailing spaces.
25175 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
25176
25177_ACEOF
25178
25179# Transform confdefs.h into two sed scripts, `conftest.defines' and
25180# `conftest.undefs', that substitutes the proper values into
25181# config.h.in to produce config.h. The first handles `#define'
25182# templates, and the second `#undef' templates.
25183# And first: Protect against being on the right side of a sed subst in
25184# config.status. Protect against being in an unquoted here document
25185# in config.status.
25186rm -f conftest.defines conftest.undefs
25187# Using a here document instead of a string reduces the quoting nightmare.
25188# Putting comments in sed scripts is not portable.
25189#
25190# `end' is used to avoid that the second main sed command (meant for
25191# 0-ary CPP macros) applies to n-ary macro definitions.
25192# See the Autoconf documentation for `clear'.
25193cat >confdef2sed.sed <<\_ACEOF
25194s/[\\&,]/\\&/g
25195s,[\\$`],\\&,g
25196t clear
25197: clear
25198s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
25199t end
25200s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
25201: end
25202_ACEOF
25203# If some macros were called several times there might be several times
25204# the same #defines, which is useless. Nevertheless, we may not want to
25205# sort them, since we want the *last* AC-DEFINE to be honored.
25206uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
25207sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
25208rm -f confdef2sed.sed
25209
25210# This sed command replaces #undef with comments. This is necessary, for
861bb6c1
JL
25211# example, in the case of _POSIX_SOURCE, which is predefined and required
25212# on some systems where configure will not decide to define it.
b61ff9c8
BS
25213cat >>conftest.undefs <<\_ACEOF
25214s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
25215_ACEOF
25216
25217# Break up conftest.defines because some shells have a limit on the size
25218# of here documents, and old seds have small limits too (100 cmds).
25219echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
25220echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
25221echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
25222echo ' :' >>$CONFIG_STATUS
25223rm -f conftest.tail
25224while grep . conftest.defines >/dev/null
ba479fd2 25225do
b61ff9c8
BS
25226 # Write a limited-size here document to $tmp/defines.sed.
25227 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
25228 # Speed up: don't consider the non `#define' lines.
25229 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
25230 # Work around the forget-to-reset-the-flag bug.
25231 echo 't clr' >>$CONFIG_STATUS
25232 echo ': clr' >>$CONFIG_STATUS
25233 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
ba479fd2 25234 echo 'CEOF
b61ff9c8
BS
25235 sed -f $tmp/defines.sed $tmp/in >$tmp/out
25236 rm -f $tmp/in
25237 mv $tmp/out $tmp/in
25238' >>$CONFIG_STATUS
25239 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
ba479fd2
NN
25240 rm -f conftest.defines
25241 mv conftest.tail conftest.defines
25242done
b61ff9c8
BS
25243rm -f conftest.defines
25244echo ' fi # grep' >>$CONFIG_STATUS
25245echo >>$CONFIG_STATUS
25246
25247# Break up conftest.undefs because some shells have a limit on the size
25248# of here documents, and old seds have small limits too (100 cmds).
25249echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
25250rm -f conftest.tail
25251while grep . conftest.undefs >/dev/null
25252do
25253 # Write a limited-size here document to $tmp/undefs.sed.
25254 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
25255 # Speed up: don't consider the non `#undef'
25256 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
25257 # Work around the forget-to-reset-the-flag bug.
25258 echo 't clr' >>$CONFIG_STATUS
25259 echo ': clr' >>$CONFIG_STATUS
25260 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
25261 echo 'CEOF
25262 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
25263 rm -f $tmp/in
25264 mv $tmp/out $tmp/in
25265' >>$CONFIG_STATUS
25266 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
25267 rm -f conftest.undefs
25268 mv conftest.tail conftest.undefs
25269done
25270rm -f conftest.undefs
ba479fd2
NN
25271
25272cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8
BS
25273 # Let's still pretend it is `configure' which instantiates (i.e., don't
25274 # use $as_me), people would be surprised to read:
25275 # /* config.h. Generated by config.status. */
25276 if test x"$ac_file" = x-; then
25277 echo "/* Generated by configure. */" >$tmp/config.h
25278 else
25279 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
25280 fi
25281 cat $tmp/in >>$tmp/config.h
25282 rm -f $tmp/in
ba479fd2 25283 if test x"$ac_file" != x-; then
b61ff9c8 25284 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
ba479fd2
NN
25285 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25286echo "$as_me: $ac_file is unchanged" >&6;}
25287 else
b61ff9c8
BS
25288 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
25289$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25290 X"$ac_file" : 'X\(//\)[^/]' \| \
25291 X"$ac_file" : 'X\(//\)$' \| \
25292 X"$ac_file" : 'X\(/\)' \| \
25293 . : '\(.\)' 2>/dev/null ||
25294echo X"$ac_file" |
25295 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25296 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25297 /^X\(\/\/\)$/{ s//\1/; q; }
25298 /^X\(\/\).*/{ s//\1/; q; }
25299 s/.*/./; q'`
25300 { if $as_mkdir_p; then
25301 mkdir -p "$ac_dir"
25302 else
25303 as_dir="$ac_dir"
25304 as_dirs=
25305 while test ! -d "$as_dir"; do
25306 as_dirs="$as_dir $as_dirs"
25307 as_dir=`(dirname "$as_dir") 2>/dev/null ||
25308$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25309 X"$as_dir" : 'X\(//\)[^/]' \| \
25310 X"$as_dir" : 'X\(//\)$' \| \
25311 X"$as_dir" : 'X\(/\)' \| \
25312 . : '\(.\)' 2>/dev/null ||
25313echo X"$as_dir" |
25314 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25315 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25316 /^X\(\/\/\)$/{ s//\1/; q; }
25317 /^X\(\/\).*/{ s//\1/; q; }
25318 s/.*/./; q'`
25319 done
25320 test ! -n "$as_dirs" || mkdir $as_dirs
25321 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
25322echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
25323 { (exit 1); exit 1; }; }; }
25324
ba479fd2 25325 rm -f $ac_file
b61ff9c8 25326 mv $tmp/config.h $ac_file
ba479fd2
NN
25327 fi
25328 else
b61ff9c8
BS
25329 cat $tmp/config.h
25330 rm -f $tmp/config.h
ba479fd2 25331 fi
b61ff9c8
BS
25332done
25333_ACEOF
25334cat >>$CONFIG_STATUS <<\_ACEOF
2f41c1d6 25335
b61ff9c8
BS
25336#
25337# CONFIG_COMMANDS section.
25338#
25339for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
25340 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
25341 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
25342 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
25343$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25344 X"$ac_dest" : 'X\(//\)[^/]' \| \
25345 X"$ac_dest" : 'X\(//\)$' \| \
25346 X"$ac_dest" : 'X\(/\)' \| \
25347 . : '\(.\)' 2>/dev/null ||
25348echo X"$ac_dest" |
25349 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25350 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25351 /^X\(\/\/\)$/{ s//\1/; q; }
25352 /^X\(\/\).*/{ s//\1/; q; }
25353 s/.*/./; q'`
25354 { if $as_mkdir_p; then
25355 mkdir -p "$ac_dir"
25356 else
25357 as_dir="$ac_dir"
25358 as_dirs=
25359 while test ! -d "$as_dir"; do
25360 as_dirs="$as_dir $as_dirs"
25361 as_dir=`(dirname "$as_dir") 2>/dev/null ||
25362$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25363 X"$as_dir" : 'X\(//\)[^/]' \| \
25364 X"$as_dir" : 'X\(//\)$' \| \
25365 X"$as_dir" : 'X\(/\)' \| \
25366 . : '\(.\)' 2>/dev/null ||
25367echo X"$as_dir" |
25368 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25369 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25370 /^X\(\/\/\)$/{ s//\1/; q; }
25371 /^X\(\/\).*/{ s//\1/; q; }
25372 s/.*/./; q'`
25373 done
25374 test ! -n "$as_dirs" || mkdir $as_dirs
25375 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
25376echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
25377 { (exit 1); exit 1; }; }; }
2f41c1d6 25378
b61ff9c8 25379 ac_builddir=.
2f41c1d6 25380
b61ff9c8
BS
25381if test "$ac_dir" != .; then
25382 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
25383 # A "../" for each directory in $ac_dir_suffix.
25384 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
25385else
25386 ac_dir_suffix= ac_top_builddir=
25387fi
25388
25389case $srcdir in
25390 .) # No --srcdir option. We are building in place.
25391 ac_srcdir=.
25392 if test -z "$ac_top_builddir"; then
25393 ac_top_srcdir=.
25394 else
25395 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
25396 fi ;;
25397 [\\/]* | ?:[\\/]* ) # Absolute path.
25398 ac_srcdir=$srcdir$ac_dir_suffix;
25399 ac_top_srcdir=$srcdir ;;
25400 *) # Relative path.
25401 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
25402 ac_top_srcdir=$ac_top_builddir$srcdir ;;
25403esac
25404
25405# Do not use `cd foo && pwd` to compute absolute paths, because
25406# the directories may not exist.
25407case `pwd` in
25408.) ac_abs_builddir="$ac_dir";;
25409*)
25410 case "$ac_dir" in
25411 .) ac_abs_builddir=`pwd`;;
25412 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
25413 *) ac_abs_builddir=`pwd`/"$ac_dir";;
25414 esac;;
25415esac
25416case $ac_abs_builddir in
25417.) ac_abs_top_builddir=${ac_top_builddir}.;;
25418*)
25419 case ${ac_top_builddir}. in
25420 .) ac_abs_top_builddir=$ac_abs_builddir;;
25421 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
25422 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
25423 esac;;
25424esac
25425case $ac_abs_builddir in
25426.) ac_abs_srcdir=$ac_srcdir;;
25427*)
25428 case $ac_srcdir in
25429 .) ac_abs_srcdir=$ac_abs_builddir;;
25430 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
25431 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
25432 esac;;
25433esac
25434case $ac_abs_builddir in
25435.) ac_abs_top_srcdir=$ac_top_srcdir;;
25436*)
25437 case $ac_top_srcdir in
25438 .) ac_abs_top_srcdir=$ac_abs_builddir;;
25439 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
25440 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
25441 esac;;
25442esac
25443
25444
25445 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
25446echo "$as_me: executing $ac_dest commands" >&6;}
25447 case $ac_dest in
25448 default )
f1faaabd
NN
25449case ${CONFIG_HEADERS} in
25450 *auto-host.h:config.in*)
25451 echo > cstamp-h ;;
861bb6c1 25452esac
2ed26f6b 25453# Make sure all the subdirs exist.
3b620440 25454for d in $subdirs doc build
2ed26f6b 25455do
2ed26f6b 25456 test -d $d || mkdir $d
2ed26f6b 25457done
ba479fd2
NN
25458 ;;
25459 esac
b61ff9c8
BS
25460done
25461_ACEOF
cafe096b 25462
b61ff9c8 25463cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
25464
25465{ (exit 0); exit 0; }
25466_ACEOF
861bb6c1 25467chmod +x $CONFIG_STATUS
ba479fd2
NN
25468ac_clean_files=$ac_clean_files_save
25469
25470
25471# configure is writing to config.log, and then calls config.status.
25472# config.status does its own redirection, appending to config.log.
25473# Unfortunately, on DOS this fails, as config.log is still kept open
25474# by configure, so config.status won't be able to write to it; its
25475# output is simply discarded. So we exec the FD to /dev/null,
25476# effectively closing config.log, so it can be properly (re)opened and
25477# appended to by config.status. When coming back to configure, we
25478# need to make the FD available again.
25479if test "$no_create" != yes; then
25480 ac_cs_success=:
25481 ac_config_status_args=
25482 test "$silent" = yes &&
25483 ac_config_status_args="$ac_config_status_args --quiet"
25484 exec 5>/dev/null
25485 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
25486 exec 5>>config.log
25487 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25488 # would make configure fail if this is the last instruction.
25489 $ac_cs_success || { (exit 1); exit 1; }
25490fi
861bb6c1 25491
This page took 6.72326 seconds and 5 git commands to generate.