]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
vect.exp: Add new stanza for aligned-section-anchors-* tests.
[thirdparty/gcc.git] / gcc / configure
CommitLineData
005537df 1#! /bin/sh
861bb6c1 2# Guess values for system-dependent variables and create Makefiles.
b61ff9c8 3# Generated by GNU Autoconf 2.59.
861bb6c1 4#
b61ff9c8 5# Copyright (C) 2003 Free Software Foundation, Inc.
861bb6c1
JL
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
ba479fd2
NN
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
11
b61ff9c8 12# Be Bourne compatible
ba479fd2
NN
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
b61ff9c8
BS
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
ba479fd2 21fi
b61ff9c8 22DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
23
24# Support unset when possible.
86da66b5 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
b61ff9c8 33$as_unset ENV MAIL MAILPATH
ba479fd2
NN
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
43do
86da66b5 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
45 eval $as_var=C; export $as_var
46 else
b61ff9c8 47 $as_unset $as_var
ba479fd2
NN
48 fi
49done
50
51# Required to use basename.
b61ff9c8 52if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
53 as_expr=expr
54else
55 as_expr=false
56fi
57
b61ff9c8 58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
ba479fd2
NN
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
b61ff9c8 66as_me=`$as_basename "$0" ||
ba479fd2
NN
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
b61ff9c8
BS
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
ba479fd2 71echo X/"$0" |
b61ff9c8
BS
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
703d89ab 76
ab22c1fa 77
b61ff9c8
BS
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
1a4b763e 85
b61ff9c8
BS
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
96 rm -f conf$$.sh
1a4b763e
BS
97fi
98
1a4b763e 99
b61ff9c8
BS
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
1a4b763e 116
b61ff9c8
BS
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
ba479fd2 130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
dd7f7a6e 131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
ba479fd2
NN
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
b61ff9c8
BS
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
ba479fd2 137 /*)
b61ff9c8 138 if ("$as_dir/$as_base" -c '
1a4b763e
BS
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
b61ff9c8 141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
1a4b763e 142 test "x$as_lineno_1" != "x$as_lineno_2" &&
b61ff9c8
BS
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
ba479fd2
NN
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
b61ff9c8
BS
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
ba479fd2 162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b61ff9c8
BS
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
ba479fd2
NN
165 sed '
166 N
b61ff9c8
BS
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
ba479fd2 170 t loop
b61ff9c8
BS
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
ba479fd2 173 ' >$as_me.lineno &&
b61ff9c8 174 chmod +x $as_me.lineno ||
ba479fd2
NN
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
b61ff9c8
BS
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
ba479fd2
NN
182 # Exit status is that of the last command.
183 exit
184}
185
186
b61ff9c8
BS
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
ba479fd2
NN
192esac
193
b61ff9c8 194if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
b61ff9c8
BS
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
ba479fd2 207 as_ln_s='cp -p'
b61ff9c8
BS
208 else
209 as_ln_s='ln -s'
210 fi
ba479fd2
NN
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
b61ff9c8 216rm -f conf$$ conf$$.exe conf$$.file
861bb6c1 217
ba479fd2
NN
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
86da66b5 221 test -d ./-p && rmdir ./-p
ba479fd2
NN
222 as_mkdir_p=false
223fi
224
b61ff9c8 225as_executable_p="test -f"
ba479fd2
NN
226
227# Sed expression to map a string onto a valid CPP name.
86da66b5 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
229
230# Sed expression to map a string onto a valid variable name.
86da66b5 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
232
233
b61ff9c8
BS
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
241$as_unset CDPATH
ba479fd2
NN
242
243
da0f6381
PB
244
245# Check that we are running under the correct shell.
246SHELL=${CONFIG_SHELL-/bin/sh}
247
248case X$lt_ECHO in
249X*--fallback-echo)
250 # Remove one level of quotation (which was required for Make).
251 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
252 ;;
253esac
254
255ECHO=${lt_ECHO-echo}
256if test "X$1" = X--no-reexec; then
257 # Discard the --no-reexec flag, and continue.
258 shift
259elif test "X$1" = X--fallback-echo; then
260 # Avoid inline document here, it may be left over
261 :
262elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
263 # Yippee, $ECHO works!
264 :
265else
266 # Restart under the correct shell.
267 exec $SHELL "$0" --no-reexec ${1+"$@"}
268fi
269
270if test "X$1" = X--fallback-echo; then
271 # used as fallback echo
272 shift
273 cat <<_LT_EOF
274$*
275_LT_EOF
276 exit 0
277fi
278
279# The HP-UX ksh and POSIX shell print the target directory to stdout
280# if CDPATH is set.
281(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
282
283if test -z "$lt_ECHO"; then
284 if test "X${echo_test_string+set}" != Xset; then
285 # find a string as large as possible, as long as the shell can cope with it
286 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
287 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
288 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
289 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
290 then
291 break
292 fi
293 done
294 fi
295
296 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
297 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
298 test "X$echo_testing_string" = "X$echo_test_string"; then
299 :
300 else
301 # The Solaris, AIX, and Digital Unix default echo programs unquote
302 # backslashes. This makes it impossible to quote backslashes using
303 # echo "$something" | sed 's/\\/\\\\/g'
304 #
305 # So, first we look for a working echo in the user's PATH.
306
307 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
308 for dir in $PATH /usr/ucb; do
309 IFS="$lt_save_ifs"
310 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
311 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
312 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
313 test "X$echo_testing_string" = "X$echo_test_string"; then
314 ECHO="$dir/echo"
315 break
316 fi
317 done
318 IFS="$lt_save_ifs"
319
320 if test "X$ECHO" = Xecho; then
321 # We didn't find a better echo, so look for alternatives.
322 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
323 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
324 test "X$echo_testing_string" = "X$echo_test_string"; then
325 # This shell has a builtin print -r that does the trick.
326 ECHO='print -r'
327 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
328 test "X$CONFIG_SHELL" != X/bin/ksh; then
329 # If we have ksh, try running configure again with it.
330 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
331 export ORIGINAL_CONFIG_SHELL
332 CONFIG_SHELL=/bin/ksh
333 export CONFIG_SHELL
334 exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
335 else
336 # Try using printf.
337 ECHO='printf %s\n'
338 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
339 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
340 test "X$echo_testing_string" = "X$echo_test_string"; then
341 # Cool, printf works
342 :
343 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
344 test "X$echo_testing_string" = 'X\t' &&
345 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
346 test "X$echo_testing_string" = "X$echo_test_string"; then
347 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
348 export CONFIG_SHELL
349 SHELL="$CONFIG_SHELL"
350 export SHELL
351 ECHO="$CONFIG_SHELL $0 --fallback-echo"
352 elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
353 test "X$echo_testing_string" = 'X\t' &&
354 echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
355 test "X$echo_testing_string" = "X$echo_test_string"; then
356 ECHO="$CONFIG_SHELL $0 --fallback-echo"
357 else
358 # maybe with a smaller string...
359 prev=:
360
361 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
362 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
363 then
364 break
365 fi
366 prev="$cmd"
367 done
368
369 if test "$prev" != 'sed 50q "$0"'; then
370 echo_test_string=`eval $prev`
371 export echo_test_string
372 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
373 else
374 # Oops. We lost completely, so just stick with echo.
375 ECHO=echo
376 fi
377 fi
378 fi
379 fi
380 fi
381fi
382
383# Copy echo and quote the copy suitably for passing to libtool from
384# the Makefile, instead of quoting the original, which is used later.
385lt_ECHO=$ECHO
386if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
387 lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
388fi
389
390
391
392
ba479fd2
NN
393# Name of the host.
394# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
395# so uname gets run too.
396ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
397
b61ff9c8
BS
398exec 6>&1
399
ba479fd2
NN
400#
401# Initializations.
402#
861bb6c1 403ac_default_prefix=/usr/local
ba479fd2
NN
404ac_config_libobj_dir=.
405cross_compiling=no
406subdirs=
407MFLAGS=
408MAKEFLAGS=
409SHELL=${CONFIG_SHELL-/bin/sh}
410
b61ff9c8
BS
411# Maximum number of lines to put in a shell here document.
412# This variable seems obsolete. It should probably be removed, and
413# only ac_max_sed_lines should be used.
414: ${ac_max_here_lines=38}
415
ba479fd2
NN
416# Identity of this package.
417PACKAGE_NAME=
418PACKAGE_TARNAME=
419PACKAGE_VERSION=
420PACKAGE_STRING=
421PACKAGE_BUGREPORT=
422
423ac_unique_file="tree.c"
424# Factoring default headers for most tests.
425ac_includes_default="\
426#include <stdio.h>
b61ff9c8 427#if HAVE_SYS_TYPES_H
ba479fd2
NN
428# include <sys/types.h>
429#endif
b61ff9c8 430#if HAVE_SYS_STAT_H
ba479fd2
NN
431# include <sys/stat.h>
432#endif
b61ff9c8 433#if STDC_HEADERS
ba479fd2
NN
434# include <stdlib.h>
435# include <stddef.h>
436#else
b61ff9c8 437# if HAVE_STDLIB_H
ba479fd2
NN
438# include <stdlib.h>
439# endif
440#endif
b61ff9c8
BS
441#if HAVE_STRING_H
442# if !STDC_HEADERS && HAVE_MEMORY_H
ba479fd2
NN
443# include <memory.h>
444# endif
445# include <string.h>
446#endif
b61ff9c8 447#if HAVE_STRINGS_H
ba479fd2
NN
448# include <strings.h>
449#endif
b61ff9c8 450#if HAVE_INTTYPES_H
ba479fd2 451# include <inttypes.h>
b61ff9c8
BS
452#else
453# if HAVE_STDINT_H
454# include <stdint.h>
455# endif
ba479fd2 456#endif
b61ff9c8 457#if HAVE_UNISTD_H
ba479fd2
NN
458# include <unistd.h>
459#endif"
460
00020c16 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 CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn c_loose_warn strict_warn c_strict_warn warn_cflags warn_cxxflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags ENABLE_BUILD_WITH_CXX 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 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 collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 CXXCPP 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 gcc_cv_readelf libgcc_visibility GGC HOST_LIBS 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 TM_ENDIAN_CONFIG TM_MULTILIB_CONFIG TM_MULTILIB_EXCEPTIONS_CONFIG 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 use_gcc_stdint c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC pluginlibs enable_plugin 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
00020c16
ILT
919ac_env_CXX_set=${CXX+set}
920ac_env_CXX_value=$CXX
921ac_cv_env_CXX_set=${CXX+set}
922ac_cv_env_CXX_value=$CXX
923ac_env_CXXFLAGS_set=${CXXFLAGS+set}
924ac_env_CXXFLAGS_value=$CXXFLAGS
925ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
926ac_cv_env_CXXFLAGS_value=$CXXFLAGS
b61ff9c8
BS
927ac_env_CPP_set=${CPP+set}
928ac_env_CPP_value=$CPP
929ac_cv_env_CPP_set=${CPP+set}
930ac_cv_env_CPP_value=$CPP
00020c16
ILT
931ac_env_CXXCPP_set=${CXXCPP+set}
932ac_env_CXXCPP_value=$CXXCPP
933ac_cv_env_CXXCPP_set=${CXXCPP+set}
934ac_cv_env_CXXCPP_value=$CXXCPP
b61ff9c8
BS
935ac_env_GMPLIBS_set=${GMPLIBS+set}
936ac_env_GMPLIBS_value=$GMPLIBS
937ac_cv_env_GMPLIBS_set=${GMPLIBS+set}
938ac_cv_env_GMPLIBS_value=$GMPLIBS
939ac_env_GMPINC_set=${GMPINC+set}
940ac_env_GMPINC_value=$GMPINC
941ac_cv_env_GMPINC_set=${GMPINC+set}
942ac_cv_env_GMPINC_value=$GMPINC
f8bf9252
SP
943ac_env_PPLLIBS_set=${PPLLIBS+set}
944ac_env_PPLLIBS_value=$PPLLIBS
945ac_cv_env_PPLLIBS_set=${PPLLIBS+set}
946ac_cv_env_PPLLIBS_value=$PPLLIBS
947ac_env_PPLINC_set=${PPLINC+set}
948ac_env_PPLINC_value=$PPLINC
949ac_cv_env_PPLINC_set=${PPLINC+set}
950ac_cv_env_PPLINC_value=$PPLINC
951ac_env_CLOOGLIBS_set=${CLOOGLIBS+set}
952ac_env_CLOOGLIBS_value=$CLOOGLIBS
953ac_cv_env_CLOOGLIBS_set=${CLOOGLIBS+set}
954ac_cv_env_CLOOGLIBS_value=$CLOOGLIBS
955ac_env_CLOOGINC_set=${CLOOGINC+set}
956ac_env_CLOOGINC_value=$CLOOGINC
957ac_cv_env_CLOOGINC_set=${CLOOGINC+set}
958ac_cv_env_CLOOGINC_value=$CLOOGINC
63cf211a 959
ba479fd2
NN
960#
961# Report the --help message.
962#
963if test "$ac_init_help" = "long"; then
964 # Omit some internal or obsolete options to make the list less imposing.
965 # This message is too long to be a string in the A/UX 3.1 sh.
966 cat <<_ACEOF
967\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 968
ba479fd2 969Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 970
ba479fd2
NN
971To assign environment variables (e.g., CC, CFLAGS...), specify them as
972VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 973
ba479fd2 974Defaults for the options are specified in brackets.
861bb6c1 975
ba479fd2
NN
976Configuration:
977 -h, --help display this help and exit
978 --help=short display options specific to this package
979 --help=recursive display the short help of all the included packages
980 -V, --version display version information and exit
981 -q, --quiet, --silent do not print \`checking...' messages
982 --cache-file=FILE cache test results in FILE [disabled]
983 -C, --config-cache alias for \`--cache-file=config.cache'
984 -n, --no-create do not create output files
985 --srcdir=DIR find the sources in DIR [configure dir or \`..']
986
b61ff9c8
BS
987_ACEOF
988
989 cat <<_ACEOF
ba479fd2
NN
990Installation directories:
991 --prefix=PREFIX install architecture-independent files in PREFIX
86da66b5 992 [$ac_default_prefix]
ba479fd2 993 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
86da66b5 994 [PREFIX]
861bb6c1 995
ba479fd2
NN
996By default, \`make install' will install all the files in
997\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
998an installation prefix other than \`$ac_default_prefix' using \`--prefix',
999for instance \`--prefix=\$HOME'.
13c22933 1000
ba479fd2 1001For better control, use the options below.
13c22933 1002
ba479fd2
NN
1003Fine tuning of the installation directories:
1004 --bindir=DIR user executables [EPREFIX/bin]
1005 --sbindir=DIR system admin executables [EPREFIX/sbin]
1006 --libexecdir=DIR program executables [EPREFIX/libexec]
b61ff9c8 1007 --datadir=DIR read-only architecture-independent data [PREFIX/share]
ba479fd2
NN
1008 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1009 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1010 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1011 --libdir=DIR object code libraries [EPREFIX/lib]
1012 --includedir=DIR C header files [PREFIX/include]
1013 --oldincludedir=DIR C header files for non-gcc [/usr/include]
b61ff9c8
BS
1014 --infodir=DIR info documentation [PREFIX/info]
1015 --mandir=DIR man documentation [PREFIX/man]
ba479fd2 1016_ACEOF
13c22933 1017
ba479fd2 1018 cat <<\_ACEOF
13c22933 1019
ba479fd2
NN
1020Program names:
1021 --program-prefix=PREFIX prepend PREFIX to installed program names
1022 --program-suffix=SUFFIX append SUFFIX to installed program names
1023 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 1024
ba479fd2
NN
1025System types:
1026 --build=BUILD configure for building on BUILD [guessed]
1027 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1028 --target=TARGET configure for building compilers for TARGET [HOST]
1029_ACEOF
13c22933
JJ
1030fi
1031
ba479fd2 1032if test -n "$ac_init_help"; then
13c22933 1033
ba479fd2 1034 cat <<\_ACEOF
13c22933 1035
ba479fd2
NN
1036Optional Features:
1037 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1038 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
1039 --enable-generated-files-in-srcdir
1040 put copies of generated files in source dir
1041 intended for creating source tarballs for users
1042 without texinfo bison or flex.
3bbd5a19 1043 --enable-werror-always enable -Werror despite compiler version
ba479fd2
NN
1044 --enable-checking=LIST
1045 enable expensive run-time checks. With LIST,
1046 enable only specific categories of checks.
cdce5c16 1047 Categories are: yes,no,all,none,release.
726a989a 1048 Flags are: assert,df,fold,gc,gcac,gimple,misc,
7e98624c 1049 rtlflag,rtl,runtime,tree,valgrind,types.
ba479fd2 1050 --enable-coverage=LEVEL
fb38008e 1051 enable compiler's code coverage collection.
ba479fd2
NN
1052 Use to measure compiler performance and locate
1053 unused parts of the compiler. With LEVEL, specify
1054 optimization. Values are opt, noopt,
1055 default is noopt
1056 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
00020c16 1057 --enable-build-with-cxx build with C++ compiler instead of C compiler
ba479fd2
NN
1058 --enable-multilib enable library support for multiple ABIs
1059 --enable-__cxa_atexit enable __cxa_atexit for C++
79b87c74
MM
1060 --enable-decimal-float={no,yes,bid,dpd}
1061 enable decimal float extension to C. Selecting 'bid'
1062 or 'dpd' choses which decimal floating point format
1063 to use
ab22c1fa 1064 --enable-fixed-point enable fixed-point arithmetic extension to C
ba479fd2
NN
1065 --enable-threads enable thread usage for target GCC
1066 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
1067 --enable-tls enable or disable generation of tls code
1068 overriding the assembler check for tls support
ba479fd2
NN
1069 --enable-objc-gc enable the use of Boehm's garbage collector with
1070 the GNU Objective-C runtime
1071 --disable-shared don't provide a shared libgcc
1072 --enable-intermodule build the compiler in one step
f3c9f174 1073 --enable-languages=LIST specify which front-ends to build
dfb77e37 1074 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
1075 --enable-initfini-array use .init_array/.fini_array sections
1076 --enable-sjlj-exceptions
1077 arrange to use setjmp/longjmp exception handling
7f970b70 1078 --enable-secureplt enable -msecure-plt by default for PowerPC
922e3e33 1079 --enable-cld enable -mcld by default for 32bit x86
ba479fd2
NN
1080 --disable-win32-registry
1081 disable lookup of installation paths in the
1082 Registry on Windows hosts
1083 --enable-win32-registry enable registry lookup (default)
1084 --enable-win32-registry=KEY
1085 use KEY instead of GCC version as the last portion
1086 of the registry key
da0f6381
PB
1087 --enable-shared[=PKGS]
1088 build shared libraries [default=yes]
1089 --enable-static[=PKGS]
1090 build static libraries [default=yes]
1091 --enable-fast-install[=PKGS]
1092 optimize for fast installation [default=yes]
1093 --disable-libtool-lock avoid locking (might break parallel builds)
cd533689
PP
1094 --enable-linker-build-id
1095 compiler will always pass --build-id to linker
ba479fd2
NN
1096 --enable-maintainer-mode
1097 enable make rules and dependencies not useful
1098 (and sometimes confusing) to the casual installer
1099 --enable-version-specific-runtime-libs
1100 specify that runtime libraries should be
1101 installed in a compiler-specific directory
68a607d8 1102 --enable-plugin enable plugin support
093e61a6 1103
ba479fd2
NN
1104Optional Packages:
1105 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1106 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1546bb64 1107 --with-build-libsubdir=DIR Directory where to find libraries for build system
ba479fd2
NN
1108 --with-local-prefix=DIR specifies directory to put local include
1109 --with-gxx-include-dir=DIR
1110 specifies directory to put g++ header files
1111 --with-cpp-install-dir=DIR
1112 install the user visible C preprocessor in DIR
1113 (relative to PREFIX) as well as PREFIX/bin
1114 --with-gnu-ld arrange to work with GNU ld.
1115 --with-ld arrange to use the specified ld (full pathname)
d594623a 1116 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
1117 --with-gnu-as arrange to work with GNU as
1118 --with-as arrange to use the specified as (full pathname)
1119 --with-stabs arrange to use stabs instead of host debug format
1120 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
1121 --with-build-sysroot=sysroot
1122 use sysroot as the system root during the build
ba479fd2 1123 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
2f41c1d6
PB
1124 --with-pkgversion=PKG Use PKG in the version string in place of "GCC"
1125 --with-bugurl=URL Direct users to URL to report a bug
aca600aa 1126 --with-multilib-list Select multilibs (SH only)
dfb77e37
KC
1127 --with-gnu-ld assume the C compiler uses GNU ld default=no
1128 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1129 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 1130 --with-system-libunwind use installed libunwind
da0f6381
PB
1131 --with-pic try to use only PIC/non-PIC objects [default=use
1132 both]
1133 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
ed965309 1134 --with-long-double-128 Use 128-bit long double by default.
59415997 1135 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
1136 with the compiler
1137 --with-system-zlib use installed libz
22482f74
MS
1138 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
1139 --with-datarootdir=DIR Use DIR as the data root [PREFIX/share]
1140 --with-docdir=DIR Install documentation in DIR [DATAROOTDIR]
1141 --with-htmldir=DIR html documentation in in DIR [DOCDIR]
13c22933 1142
ba479fd2
NN
1143Some influential environment variables:
1144 CC C compiler command
1145 CFLAGS C compiler flags
1146 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1147 nonstandard directory <lib dir>
b61ff9c8
BS
1148 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
1149 headers in a nonstandard directory <include dir>
00020c16
ILT
1150 CXX C++ compiler command
1151 CXXFLAGS C++ compiler flags
ba479fd2 1152 CPP C preprocessor
00020c16 1153 CXXCPP C++ preprocessor
6de9cd9a
DN
1154 GMPLIBS How to link GMP
1155 GMPINC How to find GMP include files
f8bf9252
SP
1156 PPLLIBS How to link PPL
1157 PPLINC How to find PPL include files
1158 CLOOGLIBS How to link CLOOG
1159 CLOOGINC How to find CLOOG include files
13c22933 1160
ba479fd2
NN
1161Use these variables to override the choices made by `configure' or to help
1162it to find libraries and programs with nonstandard names/locations.
73458fb7 1163
ba479fd2
NN
1164_ACEOF
1165fi
6e3f3080 1166
ba479fd2
NN
1167if test "$ac_init_help" = "recursive"; then
1168 # If there are subdirs, report their specific --help.
b61ff9c8 1169 ac_popdir=`pwd`
ba479fd2 1170 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
b61ff9c8 1171 test -d $ac_dir || continue
ba479fd2
NN
1172 ac_builddir=.
1173
b61ff9c8 1174if test "$ac_dir" != .; then
ba479fd2 1175 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b61ff9c8
BS
1176 # A "../" for each directory in $ac_dir_suffix.
1177 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1178else
1179 ac_dir_suffix= ac_top_builddir=
1180fi
ba479fd2
NN
1181
1182case $srcdir in
b61ff9c8 1183 .) # No --srcdir option. We are building in place.
ba479fd2 1184 ac_srcdir=.
b61ff9c8
BS
1185 if test -z "$ac_top_builddir"; then
1186 ac_top_srcdir=.
1187 else
1188 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1189 fi ;;
1190 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 1191 ac_srcdir=$srcdir$ac_dir_suffix;
b61ff9c8
BS
1192 ac_top_srcdir=$srcdir ;;
1193 *) # Relative path.
1194 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1195 ac_top_srcdir=$ac_top_builddir$srcdir ;;
1196esac
1197
1198# Do not use `cd foo && pwd` to compute absolute paths, because
1199# the directories may not exist.
1200case `pwd` in
1201.) ac_abs_builddir="$ac_dir";;
1202*)
1203 case "$ac_dir" in
1204 .) ac_abs_builddir=`pwd`;;
1205 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1206 *) ac_abs_builddir=`pwd`/"$ac_dir";;
1207 esac;;
1208esac
1209case $ac_abs_builddir in
1210.) ac_abs_top_builddir=${ac_top_builddir}.;;
1211*)
1212 case ${ac_top_builddir}. in
1213 .) ac_abs_top_builddir=$ac_abs_builddir;;
1214 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1215 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1216 esac;;
1217esac
1218case $ac_abs_builddir in
1219.) ac_abs_srcdir=$ac_srcdir;;
1220*)
1221 case $ac_srcdir in
1222 .) ac_abs_srcdir=$ac_abs_builddir;;
1223 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1224 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1225 esac;;
1226esac
1227case $ac_abs_builddir in
1228.) ac_abs_top_srcdir=$ac_top_srcdir;;
1229*)
1230 case $ac_top_srcdir in
1231 .) ac_abs_top_srcdir=$ac_abs_builddir;;
1232 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1233 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1234 esac;;
86da66b5 1235esac
b61ff9c8
BS
1236
1237 cd $ac_dir
1238 # Check for guested configure; otherwise get Cygnus style configure.
1239 if test -f $ac_srcdir/configure.gnu; then
1240 echo
1241 $SHELL $ac_srcdir/configure.gnu --help=recursive
1242 elif test -f $ac_srcdir/configure; then
1243 echo
1244 $SHELL $ac_srcdir/configure --help=recursive
1245 elif test -f $ac_srcdir/configure.ac ||
1246 test -f $ac_srcdir/configure.in; then
1247 echo
1248 $ac_configure --help
ba479fd2
NN
1249 else
1250 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
b61ff9c8
BS
1251 fi
1252 cd $ac_popdir
ba479fd2
NN
1253 done
1254fi
1255
b61ff9c8 1256test -n "$ac_init_help" && exit 0
ba479fd2
NN
1257if $ac_init_version; then
1258 cat <<\_ACEOF
1259
b61ff9c8 1260Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1261This configure script is free software; the Free Software Foundation
1262gives unlimited permission to copy, distribute and modify it.
1263_ACEOF
b61ff9c8 1264 exit 0
ba479fd2 1265fi
b61ff9c8
BS
1266exec 5>config.log
1267cat >&5 <<_ACEOF
ba479fd2
NN
1268This file contains any messages produced by compilers while
1269running configure, to aid debugging if configure makes a mistake.
1270
1271It was created by $as_me, which was
b61ff9c8 1272generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1273
1274 $ $0 $@
1275
1276_ACEOF
1277{
1278cat <<_ASUNAME
1279## --------- ##
1280## Platform. ##
1281## --------- ##
1282
1283hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1284uname -m = `(uname -m) 2>/dev/null || echo unknown`
1285uname -r = `(uname -r) 2>/dev/null || echo unknown`
1286uname -s = `(uname -s) 2>/dev/null || echo unknown`
1287uname -v = `(uname -v) 2>/dev/null || echo unknown`
1288
1289/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1290/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1291
1292/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1293/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1294/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
b61ff9c8 1295hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
ba479fd2
NN
1296/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1297/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1298/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1299
1300_ASUNAME
1301
1302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1303for as_dir in $PATH
1304do
1305 IFS=$as_save_IFS
1306 test -z "$as_dir" && as_dir=.
1307 echo "PATH: $as_dir"
1308done
1309
1310} >&5
1311
1312cat >&5 <<_ACEOF
1313
1314
1315## ----------- ##
1316## Core tests. ##
1317## ----------- ##
1318
1319_ACEOF
1320
1321
1322# Keep a trace of the command line.
1323# Strip out --no-create and --no-recursion so they do not pile up.
1324# Strip out --silent because we don't want to record it for future runs.
1325# Also quote any args containing shell meta-characters.
1326# Make two passes to allow for proper duplicate-argument suppression.
1327ac_configure_args=
1328ac_configure_args0=
1329ac_configure_args1=
b61ff9c8 1330ac_sep=
ba479fd2
NN
1331ac_must_keep_next=false
1332for ac_pass in 1 2
1333do
1334 for ac_arg
1335 do
1336 case $ac_arg in
1337 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1338 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1339 | -silent | --silent | --silen | --sile | --sil)
1340 continue ;;
b61ff9c8 1341 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ba479fd2
NN
1342 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1343 esac
1344 case $ac_pass in
1345 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1346 2)
1347 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1348 if test $ac_must_keep_next = true; then
86da66b5 1349 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1350 else
86da66b5
HPN
1351 case $ac_arg in
1352 *=* | --config-cache | -C | -disable-* | --disable-* \
1353 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1354 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1355 | -with-* | --with-* | -without-* | --without-* | --x)
1356 case "$ac_configure_args0 " in
1357 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1358 esac
1359 ;;
1360 -* ) ac_must_keep_next=true ;;
1361 esac
ba479fd2 1362 fi
b61ff9c8
BS
1363 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1364 # Get rid of the leading space.
1365 ac_sep=" "
ba479fd2
NN
1366 ;;
1367 esac
1368 done
1369done
1370$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1371$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1372
1373# When interrupted or exit'd, cleanup temporary files, and complete
1374# config.log. We remove comments because anyway the quotes in there
1375# would cause problems or look ugly.
b61ff9c8
BS
1376# WARNING: Be sure not to use single quotes in there, as some shells,
1377# such as our DU 5.0 friend, will then `close' the trap.
ba479fd2
NN
1378trap 'exit_status=$?
1379 # Save into config.log some information that might help in debugging.
1380 {
1381 echo
1382
1383 cat <<\_ASBOX
1384## ---------------- ##
1385## Cache variables. ##
1386## ---------------- ##
1387_ASBOX
1388 echo
1389 # The following way of writing the cache mishandles newlines in values,
b61ff9c8 1390{
ba479fd2 1391 (set) 2>&1 |
b61ff9c8
BS
1392 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1393 *ac_space=\ *)
ba479fd2 1394 sed -n \
b61ff9c8
BS
1395 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1396 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1397 ;;
ba479fd2 1398 *)
b61ff9c8
BS
1399 sed -n \
1400 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 1401 ;;
b61ff9c8
BS
1402 esac;
1403}
ba479fd2
NN
1404 echo
1405
1406 cat <<\_ASBOX
1407## ----------------- ##
1408## Output variables. ##
1409## ----------------- ##
1410_ASBOX
1411 echo
1412 for ac_var in $ac_subst_vars
1413 do
b61ff9c8
BS
1414 eval ac_val=$`echo $ac_var`
1415 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1416 done | sort
1417 echo
1418
1419 if test -n "$ac_subst_files"; then
1420 cat <<\_ASBOX
b61ff9c8
BS
1421## ------------- ##
1422## Output files. ##
1423## ------------- ##
ba479fd2
NN
1424_ASBOX
1425 echo
1426 for ac_var in $ac_subst_files
1427 do
b61ff9c8
BS
1428 eval ac_val=$`echo $ac_var`
1429 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1430 done | sort
1431 echo
1432 fi
1433
1434 if test -s confdefs.h; then
1435 cat <<\_ASBOX
1436## ----------- ##
1437## confdefs.h. ##
1438## ----------- ##
1439_ASBOX
1440 echo
b61ff9c8 1441 sed "/^$/d" confdefs.h | sort
ba479fd2
NN
1442 echo
1443 fi
1444 test "$ac_signal" != 0 &&
1445 echo "$as_me: caught signal $ac_signal"
1446 echo "$as_me: exit $exit_status"
1447 } >&5
b61ff9c8
BS
1448 rm -f core *.core &&
1449 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
ba479fd2 1450 exit $exit_status
b61ff9c8 1451 ' 0
ba479fd2
NN
1452for ac_signal in 1 2 13 15; do
1453 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1454done
1455ac_signal=0
1456
1457# confdefs.h avoids OS command line length limits that DEFS can exceed.
b61ff9c8
BS
1458rm -rf conftest* confdefs.h
1459# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1460echo >confdefs.h
ba479fd2
NN
1461
1462# Predefined preprocessor variables.
1463
1464cat >>confdefs.h <<_ACEOF
1465#define PACKAGE_NAME "$PACKAGE_NAME"
1466_ACEOF
1467
1468
1469cat >>confdefs.h <<_ACEOF
1470#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1471_ACEOF
1472
1473
1474cat >>confdefs.h <<_ACEOF
1475#define PACKAGE_VERSION "$PACKAGE_VERSION"
1476_ACEOF
1477
1478
1479cat >>confdefs.h <<_ACEOF
1480#define PACKAGE_STRING "$PACKAGE_STRING"
1481_ACEOF
1482
1483
1484cat >>confdefs.h <<_ACEOF
1485#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1486_ACEOF
1487
1488
1489# Let the site file select an alternate cache file if it wants to.
1490# Prefer explicitly selected file to automatically selected ones.
b61ff9c8
BS
1491if test -z "$CONFIG_SITE"; then
1492 if test "x$prefix" != xNONE; then
1493 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1494 else
1495 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1496 fi
ba479fd2 1497fi
b61ff9c8 1498for ac_site_file in $CONFIG_SITE; do
ba479fd2
NN
1499 if test -r "$ac_site_file"; then
1500 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1501echo "$as_me: loading site script $ac_site_file" >&6;}
1502 sed 's/^/| /' "$ac_site_file" >&5
1503 . "$ac_site_file"
1504 fi
1505done
1506
1507if test -r "$cache_file"; then
1508 # Some versions of bash will fail to source /dev/null (special
1509 # files actually), so we avoid doing that.
1510 if test -f "$cache_file"; then
1511 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1512echo "$as_me: loading cache $cache_file" >&6;}
1513 case $cache_file in
b61ff9c8
BS
1514 [\\/]* | ?:[\\/]* ) . $cache_file;;
1515 *) . ./$cache_file;;
ba479fd2
NN
1516 esac
1517 fi
1518else
1519 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1520echo "$as_me: creating cache $cache_file" >&6;}
1521 >$cache_file
1522fi
1523
1524# Check that the precious variables saved in the cache have kept the same
1525# value.
1526ac_cache_corrupted=false
b61ff9c8
BS
1527for ac_var in `(set) 2>&1 |
1528 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1529 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1530 eval ac_new_set=\$ac_env_${ac_var}_set
b61ff9c8
BS
1531 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1532 eval ac_new_val="\$ac_env_${ac_var}_value"
ba479fd2
NN
1533 case $ac_old_set,$ac_new_set in
1534 set,)
1535 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1536echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1537 ac_cache_corrupted=: ;;
1538 ,set)
1539 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1540echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1541 ac_cache_corrupted=: ;;
1542 ,);;
1543 *)
1544 if test "x$ac_old_val" != "x$ac_new_val"; then
deb984e6
PB
1545 # differences in whitespace do not lead to failure.
1546 ac_old_val_w=`echo x $ac_old_val`
1547 ac_new_val_w=`echo x $ac_new_val`
1548 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1549 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1550echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
deb984e6
PB
1551 ac_cache_corrupted=:
1552 else
1553 { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1554echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1555 eval $ac_var=\$ac_old_val
1556 fi
1557 { echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1558echo "$as_me: former value: \`$ac_old_val'" >&2;}
1559 { echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1560echo "$as_me: current value: \`$ac_new_val'" >&2;}
ba479fd2
NN
1561 fi;;
1562 esac
1563 # Pass precious variables to config.status.
1564 if test "$ac_new_set" = set; then
1565 case $ac_new_val in
b61ff9c8
BS
1566 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1567 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
ba479fd2
NN
1568 *) ac_arg=$ac_var=$ac_new_val ;;
1569 esac
1570 case " $ac_configure_args " in
1571 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1572 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1573 esac
1574 fi
1575done
1576if $ac_cache_corrupted; then
18c04407
RW
1577 { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1578echo "$as_me: error: in \`$ac_pwd':" >&2;}
ba479fd2
NN
1579 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1580echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1581 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1582echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1583 { (exit 1); exit 1; }; }
1584fi
1585
b61ff9c8
BS
1586ac_ext=c
1587ac_cpp='$CPP $CPPFLAGS'
1588ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1589ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1590ac_compiler_gnu=$ac_cv_c_compiler_gnu
1591
ba479fd2
NN
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
18c04407
RW
1608
1609
1610
ba479fd2
NN
1611
1612
914c5af7 1613
b61ff9c8 1614 ac_config_headers="$ac_config_headers auto-host.h:config.in"
ba479fd2
NN
1615
1616
9f18db39
PB
1617gcc_version=`cat $srcdir/BASE-VER`
1618
ba479fd2
NN
1619# Determine the host, build, and target systems
1620ac_aux_dir=
b61ff9c8
BS
1621for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1622 if test -f $ac_dir/install-sh; then
ba479fd2
NN
1623 ac_aux_dir=$ac_dir
1624 ac_install_sh="$ac_aux_dir/install-sh -c"
1625 break
b61ff9c8 1626 elif test -f $ac_dir/install.sh; then
ba479fd2
NN
1627 ac_aux_dir=$ac_dir
1628 ac_install_sh="$ac_aux_dir/install.sh -c"
1629 break
b61ff9c8 1630 elif test -f $ac_dir/shtool; then
ba479fd2
NN
1631 ac_aux_dir=$ac_dir
1632 ac_install_sh="$ac_aux_dir/shtool install -c"
1633 break
1634 fi
1635done
1636if test -z "$ac_aux_dir"; then
b61ff9c8
BS
1637 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1638echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
ba479fd2
NN
1639 { (exit 1); exit 1; }; }
1640fi
b61ff9c8
BS
1641ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1642ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1643ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba479fd2
NN
1644
1645# Make sure we can run config.sub.
b61ff9c8
BS
1646$ac_config_sub sun4 >/dev/null 2>&1 ||
1647 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1648echo "$as_me: error: cannot run $ac_config_sub" >&2;}
ba479fd2
NN
1649 { (exit 1); exit 1; }; }
1650
b61ff9c8
BS
1651echo "$as_me:$LINENO: checking build system type" >&5
1652echo $ECHO_N "checking build system type... $ECHO_C" >&6
ba479fd2
NN
1653if test "${ac_cv_build+set}" = set; then
1654 echo $ECHO_N "(cached) $ECHO_C" >&6
1655else
b61ff9c8
BS
1656 ac_cv_build_alias=$build_alias
1657test -z "$ac_cv_build_alias" &&
1658 ac_cv_build_alias=`$ac_config_guess`
1659test -z "$ac_cv_build_alias" &&
ba479fd2
NN
1660 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1661echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1662 { (exit 1); exit 1; }; }
b61ff9c8
BS
1663ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1664 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1665echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
ba479fd2
NN
1666 { (exit 1); exit 1; }; }
1667
1668fi
b61ff9c8
BS
1669echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1670echo "${ECHO_T}$ac_cv_build" >&6
ba479fd2 1671build=$ac_cv_build
b61ff9c8
BS
1672build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1673build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1674build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1675
1676
1677echo "$as_me:$LINENO: checking host system type" >&5
1678echo $ECHO_N "checking host system type... $ECHO_C" >&6
ba479fd2
NN
1679if test "${ac_cv_host+set}" = set; then
1680 echo $ECHO_N "(cached) $ECHO_C" >&6
1681else
b61ff9c8
BS
1682 ac_cv_host_alias=$host_alias
1683test -z "$ac_cv_host_alias" &&
1684 ac_cv_host_alias=$ac_cv_build_alias
1685ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1686 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1687echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
ba479fd2
NN
1688 { (exit 1); exit 1; }; }
1689
1690fi
b61ff9c8
BS
1691echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1692echo "${ECHO_T}$ac_cv_host" >&6
ba479fd2 1693host=$ac_cv_host
b61ff9c8
BS
1694host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1695host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1696host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1697
1698
1699echo "$as_me:$LINENO: checking target system type" >&5
1700echo $ECHO_N "checking target system type... $ECHO_C" >&6
ba479fd2
NN
1701if test "${ac_cv_target+set}" = set; then
1702 echo $ECHO_N "(cached) $ECHO_C" >&6
1703else
b61ff9c8
BS
1704 ac_cv_target_alias=$target_alias
1705test "x$ac_cv_target_alias" = "x" &&
1706 ac_cv_target_alias=$ac_cv_host_alias
1707ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1708 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1709echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
ba479fd2
NN
1710 { (exit 1); exit 1; }; }
1711
1712fi
b61ff9c8
BS
1713echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1714echo "${ECHO_T}$ac_cv_target" >&6
ba479fd2 1715target=$ac_cv_target
b61ff9c8
BS
1716target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1717target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1718target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba479fd2
NN
1719
1720
1721# The aliases save the names the user supplied, while $host etc.
1722# will get canonicalized.
1723test -n "$target_alias" &&
1724 test "$program_prefix$program_suffix$program_transform_name" = \
1725 NONENONEs,x,x, &&
1726 program_prefix=${target_alias}-
1727
1728# Determine the noncanonical target name, for directory use.
18fc9bd4
RG
1729 case ${build_alias} in
1730 "") build_noncanonical=${build} ;;
1731 *) build_noncanonical=${build_alias} ;;
1732esac
1733
1734 case ${host_alias} in
1735 "") host_noncanonical=${build_noncanonical} ;;
1736 *) host_noncanonical=${host_alias} ;;
1737esac
1738
1739 case ${target_alias} in
1740 "") target_noncanonical=${host_noncanonical} ;;
1741 *) target_noncanonical=${target_alias} ;;
1742esac
1743
1744
1745
8f1529e6
L
1746
1747# Determine the target- and build-specific subdirectories
57255173
PB
1748
1749# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
1750# have matching libraries, they should use host libraries: Makefile.tpl
1751# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
1752# However, they still use the build modules, because the corresponding
1753# host modules (e.g. bison) are only built for the host when bootstrap
1754# finishes. So:
1755# - build_subdir is where we find build modules, and never changes.
1756# - build_libsubdir is where we find build libraries, and can be overridden.
1757
1758# Prefix 'build-' so this never conflicts with target_subdir.
18fc9bd4 1759build_subdir="build-${build_noncanonical}"
1546bb64 1760
b61ff9c8 1761# Check whether --with-build-libsubdir or --without-build-libsubdir was given.
1546bb64 1762if test "${with_build_libsubdir+set}" = set; then
b61ff9c8
BS
1763 withval="$with_build_libsubdir"
1764 build_libsubdir="$withval"
1546bb64
PB
1765else
1766 build_libsubdir="$build_subdir"
b61ff9c8 1767fi;
18fc9bd4
RG
1768# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1769if ( test $srcdir = . && test -d gcc ) \
1770 || test -d $srcdir/../host-${host_noncanonical}; then
1771 host_subdir="host-${host_noncanonical}"
1772else
1773 host_subdir=.
1774fi
1775# No prefix.
1776target_subdir=${target_noncanonical}
1777
73458fb7 1778
093e61a6 1779# Set program_transform_name
13c22933 1780test "$program_prefix" != NONE &&
b61ff9c8 1781 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1782# Use a double $ so make ignores it.
1783test "$program_suffix" != NONE &&
b61ff9c8 1784 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
ba479fd2
NN
1785# Double any \ or $. echo might interpret backslashes.
1786# By default was `s,x,x', remove it if useless.
1787cat <<\_ACEOF >conftest.sed
1788s/[\\$]/&&/g;s/;s,x,x,$//
1789_ACEOF
1790program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
b61ff9c8 1791rm conftest.sed
13c22933
JJ
1792
1793
34a86c2b
NN
1794# Check for bogus environment variables.
1795# Test if LIBRARY_PATH contains the notation for the current directory
1796# since this would lead to problems installing/building glibc.
1797# LIBRARY_PATH contains the current directory if one of the following
1798# is true:
1799# - one of the terminals (":" and ";") is the first or last sign
1800# - two terminals occur directly after each other
1801# - the path contains an element with a dot in it
b61ff9c8
BS
1802echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1803echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1804case ${LIBRARY_PATH} in
1805 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1806 library_path_setting="contains current directory"
1807 ;;
1808 *)
1809 library_path_setting="ok"
1810 ;;
1811esac
b61ff9c8
BS
1812echo "$as_me:$LINENO: result: $library_path_setting" >&5
1813echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1814if test "$library_path_setting" != "ok"; then
ba479fd2 1815{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1816*** LIBRARY_PATH shouldn't contain the current directory when
1817*** building gcc. Please change the environment variable
ba479fd2
NN
1818*** and run configure again." >&5
1819echo "$as_me: error:
1820*** LIBRARY_PATH shouldn't contain the current directory when
1821*** building gcc. Please change the environment variable
1822*** and run configure again." >&2;}
1823 { (exit 1); exit 1; }; }
e9a25f70
JL
1824fi
1825
34a86c2b
NN
1826# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1827# since this would lead to problems installing/building glibc.
1828# GCC_EXEC_PREFIX contains the current directory if one of the following
1829# is true:
1830# - one of the terminals (":" and ";") is the first or last sign
1831# - two terminals occur directly after each other
1832# - the path contains an element with a dot in it
b61ff9c8
BS
1833echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1834echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1835case ${GCC_EXEC_PREFIX} in
1836 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1837 gcc_exec_prefix_setting="contains current directory"
1838 ;;
1839 *)
1840 gcc_exec_prefix_setting="ok"
1841 ;;
1842esac
b61ff9c8
BS
1843echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1844echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1845if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1846{ { echo "$as_me:$LINENO: error:
1847*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1848*** building gcc. Please change the environment variable
1849*** and run configure again." >&5
1850echo "$as_me: error:
cafe096b
EC
1851*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1852*** building gcc. Please change the environment variable
ba479fd2
NN
1853*** and run configure again." >&2;}
1854 { (exit 1); exit 1; }; }
34a86c2b
NN
1855fi
1856
1857# -----------
1858# Directories
1859# -----------
1860
1861# Specify the local prefix
1862local_prefix=
ba479fd2 1863
b61ff9c8 1864# Check whether --with-local-prefix or --without-local-prefix was given.
34a86c2b 1865if test "${with_local_prefix+set}" = set; then
b61ff9c8
BS
1866 withval="$with_local_prefix"
1867 case "${withval}" in
ba479fd2
NN
1868yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1869echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1870 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1871no) ;;
1872*) local_prefix=$with_local_prefix ;;
1873esac
b61ff9c8 1874fi;
34a86c2b
NN
1875
1876# Default local prefix if it is empty
1877if test x$local_prefix = x; then
1878 local_prefix=/usr/local
1879fi
1880
1881# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1882# passed in by the toplevel make and thus we'd get different behavior
1883# depending on where we built the sources.
1884gcc_gxx_include_dir=
1885# Specify the g++ header file directory
ba479fd2 1886
b61ff9c8 1887# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
34a86c2b 1888if test "${with_gxx_include_dir+set}" = set; then
b61ff9c8
BS
1889 withval="$with_gxx_include_dir"
1890 case "${withval}" in
ba479fd2
NN
1891yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1892echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1893 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1894no) ;;
1895*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1896esac
b61ff9c8 1897fi;
34a86c2b 1898
0f57bf40 1899# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
34a86c2b
NN
1900if test x${gcc_gxx_include_dir} = x; then
1901 if test x${enable_version_specific_runtime_libs} = xyes; then
1902 gcc_gxx_include_dir='${libsubdir}/include/c++'
1903 else
0f57bf40
MM
1904 libstdcxx_incdir='include/c++/$(version)'
1905 if test x$host != x$target; then
1906 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
1907 fi
15c723f3 1908 gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
34a86c2b
NN
1909 fi
1910fi
1911
ba479fd2 1912
b61ff9c8 1913# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
34a86c2b 1914if test "${with_cpp_install_dir+set}" = set; then
b61ff9c8
BS
1915 withval="$with_cpp_install_dir"
1916 if test x$withval = xyes; then
ba479fd2
NN
1917 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1918echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1919 { (exit 1); exit 1; }; }
34a86c2b
NN
1920elif test x$withval != xno; then
1921 cpp_install_dir=$withval
1922fi
b61ff9c8 1923fi;
34a86c2b 1924
51b9ff45 1925# We would like to our source tree to be readonly. However when releases or
ba479fd2 1926# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1927# various formats of manuals need to be included along with the rest of the
ba479fd2 1928# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1929# just that.
1930
b61ff9c8
BS
1931echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1932echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1933 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45 1934if test "${enable_generated_files_in_srcdir+set}" = set; then
b61ff9c8
BS
1935 enableval="$enable_generated_files_in_srcdir"
1936 generated_files_in_srcdir=$enableval
51b9ff45 1937else
03787dfd 1938 generated_files_in_srcdir=no
b61ff9c8 1939fi;
1a4b763e 1940
b61ff9c8
BS
1941echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1942echo "${ECHO_T}$generated_files_in_srcdir" >&6
03787dfd
KC
1943
1944if test "$generated_files_in_srcdir" = "yes"; then
1945 GENINSRC=''
03787dfd
KC
1946else
1947 GENINSRC='#'
03787dfd
KC
1948fi
1949
1950
34a86c2b
NN
1951# -------------------
1952# Find default linker
1953# -------------------
1954
1955# With GNU ld
ba479fd2 1956
b61ff9c8 1957# Check whether --with-gnu-ld or --without-gnu-ld was given.
34a86c2b 1958if test "${with_gnu_ld+set}" = set; then
b61ff9c8
BS
1959 withval="$with_gnu_ld"
1960 gnu_ld_flag="$with_gnu_ld"
34a86c2b
NN
1961else
1962 gnu_ld_flag=no
b61ff9c8 1963fi;
6e3f3080 1964
63cf211a 1965# With pre-defined ld
ba479fd2 1966
b61ff9c8 1967# Check whether --with-ld or --without-ld was given.
34a86c2b 1968if test "${with_ld+set}" = set; then
b61ff9c8
BS
1969 withval="$with_ld"
1970 DEFAULT_LINKER="$with_ld"
1971fi;
34a86c2b
NN
1972if test x"${DEFAULT_LINKER+set}" = x"set"; then
1973 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1974 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1975echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1976 { (exit 1); exit 1; }; }
34a86c2b
NN
1977 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1978 gnu_ld_flag=yes
1979 fi
ba479fd2
NN
1980
1981cat >>confdefs.h <<_ACEOF
34a86c2b 1982#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1983_ACEOF
34a86c2b
NN
1984
1985fi
1986
2091ff66
NF
1987gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
1988
1989cat >>confdefs.h <<_ACEOF
1990#define HAVE_GNU_LD $gnu_ld
1991_ACEOF
1992
1993
b61ff9c8
BS
1994echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1995echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1996if test x"${DEFAULT_LINKER+set}" = x"set"; then
1997 if test x"$gnu_ld_flag" = x"no"; then
b61ff9c8
BS
1998 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1999echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 2000 else
b61ff9c8
BS
2001 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
2002echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
2003 fi
2004else
b61ff9c8
BS
2005 echo "$as_me:$LINENO: result: no" >&5
2006echo "${ECHO_T}no" >&6
34a86c2b
NN
2007fi
2008
d594623a
L
2009# With demangler in GNU ld
2010
b61ff9c8 2011# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
d594623a 2012if test "${with_demangler_in_ld+set}" = set; then
b61ff9c8
BS
2013 withval="$with_demangler_in_ld"
2014 demangler_in_ld="$with_demangler_in_ld"
d594623a
L
2015else
2016 demangler_in_ld=no
b61ff9c8 2017fi;
d594623a 2018
34a86c2b
NN
2019# ----------------------
2020# Find default assembler
2021# ----------------------
2022
2023# With GNU as
ba479fd2 2024
b61ff9c8 2025# Check whether --with-gnu-as or --without-gnu-as was given.
34a86c2b 2026if test "${with_gnu_as+set}" = set; then
b61ff9c8
BS
2027 withval="$with_gnu_as"
2028 gas_flag="$with_gnu_as"
34a86c2b
NN
2029else
2030 gas_flag=no
b61ff9c8 2031fi;
ab22c1fa 2032
1a4b763e 2033
b61ff9c8 2034# Check whether --with-as or --without-as was given.
34a86c2b 2035if test "${with_as+set}" = set; then
b61ff9c8
BS
2036 withval="$with_as"
2037 DEFAULT_ASSEMBLER="$with_as"
2038fi;
34a86c2b
NN
2039if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2040 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
2041 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
2042echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
2043 { (exit 1); exit 1; }; }
34a86c2b
NN
2044 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
2045 gas_flag=yes
2046 fi
ba479fd2
NN
2047
2048cat >>confdefs.h <<_ACEOF
34a86c2b 2049#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 2050_ACEOF
34a86c2b
NN
2051
2052fi
2053
dc60b775
CD
2054gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
2055
2056cat >>confdefs.h <<_ACEOF
2057#define HAVE_GNU_AS $gnu_as
2058_ACEOF
2059
2060
b61ff9c8
BS
2061echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
2062echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
2063if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2064 if test x"$gas_flag" = x"no"; then
b61ff9c8
BS
2065 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
2066echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 2067 else
b61ff9c8
BS
2068 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
2069echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
2070 fi
2071else
b61ff9c8
BS
2072 echo "$as_me:$LINENO: result: no" >&5
2073echo "${ECHO_T}no" >&6
34a86c2b
NN
2074fi
2075
2076# ---------------
2077# Find C compiler
2078# ---------------
2079
426ca3ca
RO
2080# If a non-executable a.out is present (e.g. created by GNU as above even if
2081# invoked with -v only), the IRIX 6 native ld just overwrites the existing
2082# file, even when creating an executable, so an execution test fails.
2083# Remove possible default executable files to avoid this.
2084#
2085# FIXME: This really belongs into AC_PROG_CC and can be removed once
2086# Autoconf includes it.
2087rm -f a.out a.exe b.out
2088
34a86c2b 2089# Find the native compiler
ba479fd2
NN
2090ac_ext=c
2091ac_cpp='$CPP $CPPFLAGS'
2092ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2093ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2094ac_compiler_gnu=$ac_cv_c_compiler_gnu
2095if test -n "$ac_tool_prefix"; then
2096 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2097set dummy ${ac_tool_prefix}gcc; ac_word=$2
b61ff9c8
BS
2098echo "$as_me:$LINENO: checking for $ac_word" >&5
2099echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2100if test "${ac_cv_prog_CC+set}" = set; then
2101 echo $ECHO_N "(cached) $ECHO_C" >&6
2102else
2103 if test -n "$CC"; then
2104 ac_cv_prog_CC="$CC" # Let the user override the test.
2105else
2106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2107for as_dir in $PATH
2108do
2109 IFS=$as_save_IFS
2110 test -z "$as_dir" && as_dir=.
2111 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2112 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2113 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2114 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2115 break 2
2116 fi
2117done
2118done
2119
2120fi
2121fi
2122CC=$ac_cv_prog_CC
2123if test -n "$CC"; then
b61ff9c8
BS
2124 echo "$as_me:$LINENO: result: $CC" >&5
2125echo "${ECHO_T}$CC" >&6
ba479fd2 2126else
b61ff9c8
BS
2127 echo "$as_me:$LINENO: result: no" >&5
2128echo "${ECHO_T}no" >&6
ba479fd2
NN
2129fi
2130
2131fi
2132if test -z "$ac_cv_prog_CC"; then
2133 ac_ct_CC=$CC
2134 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 2135set dummy gcc; ac_word=$2
b61ff9c8
BS
2136echo "$as_me:$LINENO: checking for $ac_word" >&5
2137echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2138if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2139 echo $ECHO_N "(cached) $ECHO_C" >&6
2140else
2141 if test -n "$ac_ct_CC"; then
2142 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2143else
2144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2145for as_dir in $PATH
2146do
2147 IFS=$as_save_IFS
2148 test -z "$as_dir" && as_dir=.
2149 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2150 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2151 ac_cv_prog_ac_ct_CC="gcc"
2152 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2153 break 2
2154 fi
2155done
2156done
2157
2158fi
2159fi
2160ac_ct_CC=$ac_cv_prog_ac_ct_CC
2161if test -n "$ac_ct_CC"; then
b61ff9c8
BS
2162 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2163echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 2164else
b61ff9c8
BS
2165 echo "$as_me:$LINENO: result: no" >&5
2166echo "${ECHO_T}no" >&6
ba479fd2
NN
2167fi
2168
b61ff9c8 2169 CC=$ac_ct_CC
ba479fd2
NN
2170else
2171 CC="$ac_cv_prog_CC"
2172fi
2173
2174if test -z "$CC"; then
b61ff9c8
BS
2175 if test -n "$ac_tool_prefix"; then
2176 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
ba479fd2 2177set dummy ${ac_tool_prefix}cc; ac_word=$2
b61ff9c8
BS
2178echo "$as_me:$LINENO: checking for $ac_word" >&5
2179echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2180if test "${ac_cv_prog_CC+set}" = set; then
2181 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
2182else
2183 if test -n "$CC"; then
2184 ac_cv_prog_CC="$CC" # Let the user override the test.
2185else
ba479fd2
NN
2186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2187for as_dir in $PATH
2188do
2189 IFS=$as_save_IFS
2190 test -z "$as_dir" && as_dir=.
2191 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2192 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2193 ac_cv_prog_CC="${ac_tool_prefix}cc"
2194 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2195 break 2
2196 fi
2197done
2198done
2199
cd9e5e7c
MK
2200fi
2201fi
ba479fd2 2202CC=$ac_cv_prog_CC
cd9e5e7c 2203if test -n "$CC"; then
b61ff9c8
BS
2204 echo "$as_me:$LINENO: result: $CC" >&5
2205echo "${ECHO_T}$CC" >&6
2f41c1d6 2206else
b61ff9c8
BS
2207 echo "$as_me:$LINENO: result: no" >&5
2208echo "${ECHO_T}no" >&6
2f41c1d6
PB
2209fi
2210
b61ff9c8
BS
2211fi
2212if test -z "$ac_cv_prog_CC"; then
2213 ac_ct_CC=$CC
2214 # Extract the first word of "cc", so it can be a program name with args.
2215set dummy cc; ac_word=$2
2216echo "$as_me:$LINENO: checking for $ac_word" >&5
2217echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2218if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2219 echo $ECHO_N "(cached) $ECHO_C" >&6
2220else
2221 if test -n "$ac_ct_CC"; then
2222 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2223else
2224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2225for as_dir in $PATH
2226do
2227 IFS=$as_save_IFS
2228 test -z "$as_dir" && as_dir=.
2229 for ac_exec_ext in '' $ac_executable_extensions; do
2230 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2231 ac_cv_prog_ac_ct_CC="cc"
2232 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2233 break 2
1a4b763e 2234 fi
b61ff9c8
BS
2235done
2236done
2237
2238fi
2239fi
2240ac_ct_CC=$ac_cv_prog_ac_ct_CC
2241if test -n "$ac_ct_CC"; then
2242 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2243echo "${ECHO_T}$ac_ct_CC" >&6
2244else
2245 echo "$as_me:$LINENO: result: no" >&5
2246echo "${ECHO_T}no" >&6
2247fi
2248
2249 CC=$ac_ct_CC
2250else
2251 CC="$ac_cv_prog_CC"
2252fi
2253
ba479fd2 2254fi
6e3f3080
NN
2255if test -z "$CC"; then
2256 # Extract the first word of "cc", so it can be a program name with args.
2257set dummy cc; ac_word=$2
b61ff9c8
BS
2258echo "$as_me:$LINENO: checking for $ac_word" >&5
2259echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2260if test "${ac_cv_prog_CC+set}" = set; then
2261 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2262else
2263 if test -n "$CC"; then
2264 ac_cv_prog_CC="$CC" # Let the user override the test.
2265else
2266 ac_prog_rejected=no
ba479fd2
NN
2267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2268for as_dir in $PATH
2269do
2270 IFS=$as_save_IFS
2271 test -z "$as_dir" && as_dir=.
2272 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2273 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2274 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2275 ac_prog_rejected=yes
2276 continue
2277 fi
2278 ac_cv_prog_CC="cc"
2279 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2280 break 2
2281 fi
2282done
2283done
2284
6e3f3080
NN
2285if test $ac_prog_rejected = yes; then
2286 # We found a bogon in the path, so make sure we never use it.
2287 set dummy $ac_cv_prog_CC
2288 shift
ba479fd2 2289 if test $# != 0; then
6e3f3080
NN
2290 # We chose a different compiler from the bogus one.
2291 # However, it has the same basename, so the bogon will be chosen
2292 # first if we set CC to just the basename; use the full file name.
2293 shift
ba479fd2 2294 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2295 fi
6e3f3080
NN
2296fi
2297fi
2298fi
ba479fd2 2299CC=$ac_cv_prog_CC
6e3f3080 2300if test -n "$CC"; then
b61ff9c8
BS
2301 echo "$as_me:$LINENO: result: $CC" >&5
2302echo "${ECHO_T}$CC" >&6
e9a25f70 2303else
b61ff9c8
BS
2304 echo "$as_me:$LINENO: result: no" >&5
2305echo "${ECHO_T}no" >&6
e9a25f70 2306fi
6e3f3080 2307
ba479fd2
NN
2308fi
2309if test -z "$CC"; then
2310 if test -n "$ac_tool_prefix"; then
b61ff9c8 2311 for ac_prog in cl
ba479fd2
NN
2312 do
2313 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2314set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b61ff9c8
BS
2315echo "$as_me:$LINENO: checking for $ac_word" >&5
2316echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2317if test "${ac_cv_prog_CC+set}" = set; then
2318 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2319else
6e3f3080
NN
2320 if test -n "$CC"; then
2321 ac_cv_prog_CC="$CC" # Let the user override the test.
2322else
ba479fd2
NN
2323as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2324for as_dir in $PATH
2325do
2326 IFS=$as_save_IFS
2327 test -z "$as_dir" && as_dir=.
2328 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2329 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2330 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2331 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2332 break 2
2333 fi
2334done
2335done
2336
093e61a6 2337fi
6e3f3080 2338fi
ba479fd2 2339CC=$ac_cv_prog_CC
6e3f3080 2340if test -n "$CC"; then
b61ff9c8
BS
2341 echo "$as_me:$LINENO: result: $CC" >&5
2342echo "${ECHO_T}$CC" >&6
6e3f3080 2343else
b61ff9c8
BS
2344 echo "$as_me:$LINENO: result: no" >&5
2345echo "${ECHO_T}no" >&6
093e61a6 2346fi
cafe096b 2347
ba479fd2
NN
2348 test -n "$CC" && break
2349 done
2350fi
2351if test -z "$CC"; then
2352 ac_ct_CC=$CC
b61ff9c8 2353 for ac_prog in cl
ba479fd2
NN
2354do
2355 # Extract the first word of "$ac_prog", so it can be a program name with args.
2356set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
2357echo "$as_me:$LINENO: checking for $ac_word" >&5
2358echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2359if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2360 echo $ECHO_N "(cached) $ECHO_C" >&6
2361else
2362 if test -n "$ac_ct_CC"; then
2363 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2364else
2365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2366for as_dir in $PATH
2367do
2368 IFS=$as_save_IFS
2369 test -z "$as_dir" && as_dir=.
2370 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2371 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2372 ac_cv_prog_ac_ct_CC="$ac_prog"
2373 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2374 break 2
2375 fi
2376done
2377done
6e3f3080 2378
ba479fd2
NN
2379fi
2380fi
2381ac_ct_CC=$ac_cv_prog_ac_ct_CC
2382if test -n "$ac_ct_CC"; then
b61ff9c8
BS
2383 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2384echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 2385else
b61ff9c8
BS
2386 echo "$as_me:$LINENO: result: no" >&5
2387echo "${ECHO_T}no" >&6
ba479fd2 2388fi
6e3f3080 2389
ba479fd2
NN
2390 test -n "$ac_ct_CC" && break
2391done
63cf211a 2392
b61ff9c8 2393 CC=$ac_ct_CC
ba479fd2
NN
2394fi
2395
2396fi
2397
2398
18c04407
RW
2399test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2400echo "$as_me: error: in \`$ac_pwd':" >&2;}
2401{ { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
ba479fd2
NN
2402See \`config.log' for more details." >&5
2403echo "$as_me: error: no acceptable C compiler found in \$PATH
2404See \`config.log' for more details." >&2;}
18c04407 2405 { (exit 1); exit 1; }; }; }
ba479fd2
NN
2406
2407# Provide some information about the compiler.
b61ff9c8
BS
2408echo "$as_me:$LINENO:" \
2409 "checking for C compiler version" >&5
ba479fd2 2410ac_compiler=`set X $ac_compile; echo $2`
b61ff9c8
BS
2411{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2412 (eval $ac_compiler --version </dev/null >&5) 2>&5
ba479fd2
NN
2413 ac_status=$?
2414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2415 (exit $ac_status); }
b61ff9c8
BS
2416{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2417 (eval $ac_compiler -v </dev/null >&5) 2>&5
ba479fd2
NN
2418 ac_status=$?
2419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2420 (exit $ac_status); }
b61ff9c8
BS
2421{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2422 (eval $ac_compiler -V </dev/null >&5) 2>&5
ba479fd2
NN
2423 ac_status=$?
2424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2425 (exit $ac_status); }
2426
2427cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2428/* confdefs.h. */
2429_ACEOF
2430cat confdefs.h >>conftest.$ac_ext
2431cat >>conftest.$ac_ext <<_ACEOF
2432/* end confdefs.h. */
2433
2434int
2435main ()
2436{
63cf211a 2437
ba479fd2
NN
2438 ;
2439 return 0;
2440}
2441_ACEOF
2442ac_clean_files_save=$ac_clean_files
2443ac_clean_files="$ac_clean_files a.out a.exe b.out"
2444# Try to create an executable without -o first, disregard a.out.
2445# It will help us diagnose broken compilers, and finding out an intuition
2446# of exeext.
b61ff9c8
BS
2447echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2448echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2 2449ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
b61ff9c8
BS
2450if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2451 (eval $ac_link_default) 2>&5
ba479fd2
NN
2452 ac_status=$?
2453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2454 (exit $ac_status); }; then
b61ff9c8
BS
2455 # Find the output, starting from the most likely. This scheme is
2456# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2457# resort.
2458
2459# Be careful to initialize this variable, since it used to be cached.
2460# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2461ac_cv_exeext=
2462# b.out is created by i960 compilers.
2463for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
ba479fd2
NN
2464do
2465 test -f "$ac_file" || continue
2466 case $ac_file in
b61ff9c8
BS
2467 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2468 ;;
2469 conftest.$ac_ext )
2470 # This is the source file.
86da66b5 2471 ;;
ba479fd2 2472 [ab].out )
86da66b5
HPN
2473 # We found the default executable, but exeext='' is most
2474 # certainly right.
2475 break;;
ba479fd2 2476 *.* )
b61ff9c8
BS
2477 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2478 # FIXME: I believe we export ac_cv_exeext for Libtool,
2479 # but it would be cool to find out if it's true. Does anybody
2480 # maintain Libtool? --akim.
2481 export ac_cv_exeext
86da66b5 2482 break;;
ba479fd2 2483 * )
86da66b5 2484 break;;
ba479fd2
NN
2485 esac
2486done
2487else
2488 echo "$as_me: failed program was:" >&5
2489sed 's/^/| /' conftest.$ac_ext >&5
2490
18c04407
RW
2491{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2492echo "$as_me: error: in \`$ac_pwd':" >&2;}
ba479fd2
NN
2493{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2494See \`config.log' for more details." >&5
2495echo "$as_me: error: C compiler cannot create executables
2496See \`config.log' for more details." >&2;}
18c04407 2497 { (exit 77); exit 77; }; }; }
ba479fd2
NN
2498fi
2499
2500ac_exeext=$ac_cv_exeext
b61ff9c8
BS
2501echo "$as_me:$LINENO: result: $ac_file" >&5
2502echo "${ECHO_T}$ac_file" >&6
ba479fd2 2503
b61ff9c8 2504# Check the compiler produces executables we can run. If not, either
ba479fd2 2505# the compiler is broken, or we cross compile.
b61ff9c8
BS
2506echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2507echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
ba479fd2
NN
2508# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2509# If not cross compiling, check that we can run a simple program.
2510if test "$cross_compiling" != yes; then
2511 if { ac_try='./$ac_file'
b61ff9c8
BS
2512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2513 (eval $ac_try) 2>&5
ba479fd2
NN
2514 ac_status=$?
2515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2516 (exit $ac_status); }; }; then
2517 cross_compiling=no
6e3f3080 2518 else
ba479fd2
NN
2519 if test "$cross_compiling" = maybe; then
2520 cross_compiling=yes
2521 else
18c04407
RW
2522 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2523echo "$as_me: error: in \`$ac_pwd':" >&2;}
2524{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
ba479fd2
NN
2525If you meant to cross compile, use \`--host'.
2526See \`config.log' for more details." >&5
2527echo "$as_me: error: cannot run C compiled programs.
2528If you meant to cross compile, use \`--host'.
2529See \`config.log' for more details." >&2;}
18c04407 2530 { (exit 1); exit 1; }; }; }
ba479fd2 2531 fi
6e3f3080
NN
2532 fi
2533fi
b61ff9c8
BS
2534echo "$as_me:$LINENO: result: yes" >&5
2535echo "${ECHO_T}yes" >&6
ba479fd2
NN
2536
2537rm -f a.out a.exe conftest$ac_cv_exeext b.out
2538ac_clean_files=$ac_clean_files_save
b61ff9c8 2539# Check the compiler produces executables we can run. If not, either
ba479fd2 2540# the compiler is broken, or we cross compile.
b61ff9c8
BS
2541echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2542echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2543echo "$as_me:$LINENO: result: $cross_compiling" >&5
2544echo "${ECHO_T}$cross_compiling" >&6
2545
2546echo "$as_me:$LINENO: checking for suffix of executables" >&5
2547echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2548if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2549 (eval $ac_link) 2>&5
ba479fd2
NN
2550 ac_status=$?
2551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2552 (exit $ac_status); }; then
2553 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2554# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2555# work properly (i.e., refer to `conftest.exe'), while it won't with
2556# `rm'.
2557for ac_file in conftest.exe conftest conftest.*; do
2558 test -f "$ac_file" || continue
2559 case $ac_file in
b61ff9c8 2560 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
ba479fd2 2561 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b61ff9c8 2562 export ac_cv_exeext
86da66b5 2563 break;;
ba479fd2
NN
2564 * ) break;;
2565 esac
2566done
e9a25f70 2567else
18c04407
RW
2568 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2569echo "$as_me: error: in \`$ac_pwd':" >&2;}
2570{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
ba479fd2
NN
2571See \`config.log' for more details." >&5
2572echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2573See \`config.log' for more details." >&2;}
18c04407 2574 { (exit 1); exit 1; }; }; }
ba479fd2
NN
2575fi
2576
2577rm -f conftest$ac_cv_exeext
b61ff9c8
BS
2578echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2579echo "${ECHO_T}$ac_cv_exeext" >&6
ba479fd2
NN
2580
2581rm -f conftest.$ac_ext
2582EXEEXT=$ac_cv_exeext
2583ac_exeext=$EXEEXT
b61ff9c8
BS
2584echo "$as_me:$LINENO: checking for suffix of object files" >&5
2585echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
ba479fd2
NN
2586if test "${ac_cv_objext+set}" = set; then
2587 echo $ECHO_N "(cached) $ECHO_C" >&6
2588else
2589 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2590/* confdefs.h. */
2591_ACEOF
2592cat confdefs.h >>conftest.$ac_ext
2593cat >>conftest.$ac_ext <<_ACEOF
2594/* end confdefs.h. */
2595
2596int
2597main ()
2598{
6e3f3080 2599
ba479fd2
NN
2600 ;
2601 return 0;
2602}
2603_ACEOF
2604rm -f conftest.o conftest.obj
b61ff9c8
BS
2605if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2606 (eval $ac_compile) 2>&5
ba479fd2
NN
2607 ac_status=$?
2608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2609 (exit $ac_status); }; then
b61ff9c8 2610 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
ba479fd2 2611 case $ac_file in
b61ff9c8 2612 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
ba479fd2
NN
2613 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2614 break;;
2615 esac
2616done
63cf211a 2617else
ba479fd2
NN
2618 echo "$as_me: failed program was:" >&5
2619sed 's/^/| /' conftest.$ac_ext >&5
2620
18c04407
RW
2621{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2622echo "$as_me: error: in \`$ac_pwd':" >&2;}
ba479fd2
NN
2623{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2624See \`config.log' for more details." >&5
2625echo "$as_me: error: cannot compute suffix of object files: cannot compile
2626See \`config.log' for more details." >&2;}
18c04407 2627 { (exit 1); exit 1; }; }; }
ba479fd2
NN
2628fi
2629
2630rm -f conftest.$ac_cv_objext conftest.$ac_ext
2631fi
b61ff9c8
BS
2632echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2633echo "${ECHO_T}$ac_cv_objext" >&6
ba479fd2
NN
2634OBJEXT=$ac_cv_objext
2635ac_objext=$OBJEXT
b61ff9c8
BS
2636echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2637echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
ba479fd2
NN
2638if test "${ac_cv_c_compiler_gnu+set}" = set; then
2639 echo $ECHO_N "(cached) $ECHO_C" >&6
2640else
2641 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2642/* confdefs.h. */
2643_ACEOF
2644cat confdefs.h >>conftest.$ac_ext
2645cat >>conftest.$ac_ext <<_ACEOF
2646/* end confdefs.h. */
2647
2648int
2649main ()
2650{
2651#ifndef __GNUC__
2652 choke me
2653#endif
6e3f3080 2654
ba479fd2
NN
2655 ;
2656 return 0;
2657}
2658_ACEOF
2659rm -f conftest.$ac_objext
b61ff9c8
BS
2660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2661 (eval $ac_compile) 2>conftest.er1
ba479fd2 2662 ac_status=$?
86da66b5
HPN
2663 grep -v '^ *+' conftest.er1 >conftest.err
2664 rm -f conftest.er1
2665 cat conftest.err >&5
ba479fd2 2666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2667 (exit $ac_status); } &&
2668 { ac_try='test -z "$ac_c_werror_flag"
2669 || test ! -s conftest.err'
2670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2671 (eval $ac_try) 2>&5
2672 ac_status=$?
2673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2674 (exit $ac_status); }; } &&
2675 { ac_try='test -s conftest.$ac_objext'
2676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2677 (eval $ac_try) 2>&5
2678 ac_status=$?
2679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2680 (exit $ac_status); }; }; then
ba479fd2
NN
2681 ac_compiler_gnu=yes
2682else
2683 echo "$as_me: failed program was:" >&5
2684sed 's/^/| /' conftest.$ac_ext >&5
2685
b61ff9c8 2686ac_compiler_gnu=no
ba479fd2 2687fi
b61ff9c8 2688rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2689ac_cv_c_compiler_gnu=$ac_compiler_gnu
2690
2691fi
b61ff9c8
BS
2692echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2693echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
ba479fd2
NN
2694GCC=`test $ac_compiler_gnu = yes && echo yes`
2695ac_test_CFLAGS=${CFLAGS+set}
2696ac_save_CFLAGS=$CFLAGS
b61ff9c8
BS
2697CFLAGS="-g"
2698echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2699echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
ba479fd2
NN
2700if test "${ac_cv_prog_cc_g+set}" = set; then
2701 echo $ECHO_N "(cached) $ECHO_C" >&6
2702else
b61ff9c8 2703 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2704/* confdefs.h. */
2705_ACEOF
2706cat confdefs.h >>conftest.$ac_ext
2707cat >>conftest.$ac_ext <<_ACEOF
2708/* end confdefs.h. */
2709
2710int
2711main ()
2712{
2713
2714 ;
2715 return 0;
2716}
2717_ACEOF
2718rm -f conftest.$ac_objext
b61ff9c8
BS
2719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2720 (eval $ac_compile) 2>conftest.er1
ba479fd2 2721 ac_status=$?
86da66b5
HPN
2722 grep -v '^ *+' conftest.er1 >conftest.err
2723 rm -f conftest.er1
2724 cat conftest.err >&5
ba479fd2 2725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2726 (exit $ac_status); } &&
2727 { ac_try='test -z "$ac_c_werror_flag"
2728 || test ! -s conftest.err'
2729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2730 (eval $ac_try) 2>&5
2731 ac_status=$?
2732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2733 (exit $ac_status); }; } &&
2734 { ac_try='test -s conftest.$ac_objext'
2735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2736 (eval $ac_try) 2>&5
2737 ac_status=$?
2738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2739 (exit $ac_status); }; }; then
1a4b763e
BS
2740 ac_cv_prog_cc_g=yes
2741else
2742 echo "$as_me: failed program was:" >&5
2743sed 's/^/| /' conftest.$ac_ext >&5
2744
b61ff9c8
BS
2745ac_cv_prog_cc_g=no
2746fi
2747rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2748fi
2749echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2750echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2751if test "$ac_test_CFLAGS" = set; then
2752 CFLAGS=$ac_save_CFLAGS
2753elif test $ac_cv_prog_cc_g = yes; then
2754 if test "$GCC" = yes; then
2755 CFLAGS="-g -O2"
2756 else
2757 CFLAGS="-g"
2758 fi
2759else
2760 if test "$GCC" = yes; then
2761 CFLAGS="-O2"
2762 else
2763 CFLAGS=
2764 fi
2765fi
2766echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2767echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2768if test "${ac_cv_prog_cc_stdc+set}" = set; then
2769 echo $ECHO_N "(cached) $ECHO_C" >&6
2770else
2771 ac_cv_prog_cc_stdc=no
2772ac_save_CC=$CC
2773cat >conftest.$ac_ext <<_ACEOF
1a4b763e
BS
2774/* confdefs.h. */
2775_ACEOF
2776cat confdefs.h >>conftest.$ac_ext
2777cat >>conftest.$ac_ext <<_ACEOF
2778/* end confdefs.h. */
b61ff9c8
BS
2779#include <stdarg.h>
2780#include <stdio.h>
2781#include <sys/types.h>
2782#include <sys/stat.h>
2783/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2784struct buf { int x; };
2785FILE * (*rcsopen) (struct buf *, struct stat *, int);
2786static char *e (p, i)
2787 char **p;
2788 int i;
1a4b763e 2789{
b61ff9c8 2790 return p[i];
1a4b763e 2791}
b61ff9c8
BS
2792static char *f (char * (*g) (char **, int), char **p, ...)
2793{
2794 char *s;
2795 va_list v;
2796 va_start (v,p);
2797 s = g (p, va_arg (v,int));
2798 va_end (v);
2799 return s;
2800}
2801
2802/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2803 function prototypes and stuff, but not '\xHH' hex character constants.
2804 These don't provoke an error unfortunately, instead are silently treated
2805 as 'x'. The following induces an error, until -std1 is added to get
2806 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2807 array size at least. It's necessary to write '\x00'==0 to get something
2808 that's true only with -std1. */
2809int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2810
2811int test (int i, double x);
2812struct s1 {int (*f) (int a);};
2813struct s2 {int (*f) (double a);};
2814int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2815int argc;
2816char **argv;
2817int
2818main ()
2819{
2820return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2821 ;
2822 return 0;
2823}
2824_ACEOF
2825# Don't try gcc -ansi; that turns off useful extensions and
2826# breaks some systems' header files.
2827# AIX -qlanglvl=ansi
2828# Ultrix and OSF/1 -std1
2829# HP-UX 10.20 and later -Ae
2830# HP-UX older versions -Aa -D_HPUX_SOURCE
2831# SVR4 -Xc -D__EXTENSIONS__
2832for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2833do
2834 CC="$ac_save_CC $ac_arg"
2835 rm -f conftest.$ac_objext
2836if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2837 (eval $ac_compile) 2>conftest.er1
2838 ac_status=$?
1a4b763e
BS
2839 grep -v '^ *+' conftest.er1 >conftest.err
2840 rm -f conftest.er1
2841 cat conftest.err >&5
2f41c1d6 2842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2843 (exit $ac_status); } &&
2844 { ac_try='test -z "$ac_c_werror_flag"
2845 || test ! -s conftest.err'
2846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2847 (eval $ac_try) 2>&5
2848 ac_status=$?
2849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2850 (exit $ac_status); }; } &&
2851 { ac_try='test -s conftest.$ac_objext'
2852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2853 (eval $ac_try) 2>&5
2854 ac_status=$?
2855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2856 (exit $ac_status); }; }; then
2857 ac_cv_prog_cc_stdc=$ac_arg
2858break
1a4b763e
BS
2859else
2860 echo "$as_me: failed program was:" >&5
2861sed 's/^/| /' conftest.$ac_ext >&5
2862
b61ff9c8
BS
2863fi
2864rm -f conftest.err conftest.$ac_objext
2865done
2866rm -f conftest.$ac_ext conftest.$ac_objext
2867CC=$ac_save_CC
2868
2869fi
2870
2871case "x$ac_cv_prog_cc_stdc" in
2872 x|xno)
2873 echo "$as_me:$LINENO: result: none needed" >&5
2874echo "${ECHO_T}none needed" >&6 ;;
2875 *)
2876 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2877echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2878 CC="$CC $ac_cv_prog_cc_stdc" ;;
2879esac
2880
2881# Some people use a C++ compiler to compile C. Since we use `exit',
2882# in C++ we need to declare it. In case someone uses the same compiler
2883# for both compiling C and C++ we need to have the C++ compiler decide
2884# the declaration of exit, since it's the most demanding environment.
2885cat >conftest.$ac_ext <<_ACEOF
2886#ifndef __cplusplus
2887 choke me
2888#endif
2889_ACEOF
2890rm -f conftest.$ac_objext
2891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2892 (eval $ac_compile) 2>conftest.er1
2893 ac_status=$?
2894 grep -v '^ *+' conftest.er1 >conftest.err
2895 rm -f conftest.er1
2896 cat conftest.err >&5
2897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2898 (exit $ac_status); } &&
2899 { ac_try='test -z "$ac_c_werror_flag"
2900 || test ! -s conftest.err'
2901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2902 (eval $ac_try) 2>&5
2903 ac_status=$?
2904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2905 (exit $ac_status); }; } &&
2906 { ac_try='test -s conftest.$ac_objext'
2907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2908 (eval $ac_try) 2>&5
2909 ac_status=$?
2910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2911 (exit $ac_status); }; }; then
2912 for ac_declaration in \
2913 '' \
2914 'extern "C" void std::exit (int) throw (); using std::exit;' \
2915 'extern "C" void std::exit (int); using std::exit;' \
2916 'extern "C" void exit (int) throw ();' \
2917 'extern "C" void exit (int);' \
2918 'void exit (int);'
2919do
2920 cat >conftest.$ac_ext <<_ACEOF
1a4b763e
BS
2921/* confdefs.h. */
2922_ACEOF
2923cat confdefs.h >>conftest.$ac_ext
2924cat >>conftest.$ac_ext <<_ACEOF
2925/* end confdefs.h. */
b61ff9c8
BS
2926$ac_declaration
2927#include <stdlib.h>
1a4b763e
BS
2928int
2929main ()
2930{
b61ff9c8 2931exit (42);
1a4b763e
BS
2932 ;
2933 return 0;
2934}
2935_ACEOF
2936rm -f conftest.$ac_objext
b61ff9c8
BS
2937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2938 (eval $ac_compile) 2>conftest.er1
2f41c1d6 2939 ac_status=$?
1a4b763e
BS
2940 grep -v '^ *+' conftest.er1 >conftest.err
2941 rm -f conftest.er1
2942 cat conftest.err >&5
2f41c1d6 2943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2944 (exit $ac_status); } &&
2945 { ac_try='test -z "$ac_c_werror_flag"
2946 || test ! -s conftest.err'
2947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2948 (eval $ac_try) 2>&5
2949 ac_status=$?
2950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2951 (exit $ac_status); }; } &&
2952 { ac_try='test -s conftest.$ac_objext'
2953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2954 (eval $ac_try) 2>&5
2955 ac_status=$?
2956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2957 (exit $ac_status); }; }; then
2958 :
ab22c1fa
CF
2959else
2960 echo "$as_me: failed program was:" >&5
2961sed 's/^/| /' conftest.$ac_ext >&5
2962
b61ff9c8 2963continue
2f41c1d6 2964fi
b61ff9c8
BS
2965rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2966 cat >conftest.$ac_ext <<_ACEOF
ab22c1fa
CF
2967/* confdefs.h. */
2968_ACEOF
2969cat confdefs.h >>conftest.$ac_ext
2970cat >>conftest.$ac_ext <<_ACEOF
2971/* end confdefs.h. */
b61ff9c8 2972$ac_declaration
2f41c1d6
PB
2973int
2974main ()
2975{
b61ff9c8 2976exit (42);
2f41c1d6
PB
2977 ;
2978 return 0;
2979}
2980_ACEOF
b61ff9c8
BS
2981rm -f conftest.$ac_objext
2982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2983 (eval $ac_compile) 2>conftest.er1
2f41c1d6 2984 ac_status=$?
ab22c1fa
CF
2985 grep -v '^ *+' conftest.er1 >conftest.err
2986 rm -f conftest.er1
2987 cat conftest.err >&5
a3bba767 2988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2989 (exit $ac_status); } &&
2990 { ac_try='test -z "$ac_c_werror_flag"
2991 || test ! -s conftest.err'
2992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2993 (eval $ac_try) 2>&5
2994 ac_status=$?
2995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2996 (exit $ac_status); }; } &&
2997 { ac_try='test -s conftest.$ac_objext'
2998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2999 (eval $ac_try) 2>&5
3000 ac_status=$?
3001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3002 (exit $ac_status); }; }; then
3003 break
ab22c1fa
CF
3004else
3005 echo "$as_me: failed program was:" >&5
3006sed 's/^/| /' conftest.$ac_ext >&5
3007
2f41c1d6 3008fi
b61ff9c8 3009rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2f41c1d6 3010done
b61ff9c8
BS
3011rm -f conftest*
3012if test -n "$ac_declaration"; then
3013 echo '#ifdef __cplusplus' >>confdefs.h
3014 echo $ac_declaration >>confdefs.h
3015 echo '#endif' >>confdefs.h
2f41c1d6 3016fi
2f41c1d6 3017
b61ff9c8
BS
3018else
3019 echo "$as_me: failed program was:" >&5
3020sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 3021
b61ff9c8
BS
3022fi
3023rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
3024ac_ext=c
3025ac_cpp='$CPP $CPPFLAGS'
3026ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3027ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3028ac_compiler_gnu=$ac_cv_c_compiler_gnu
3029
3030if test "x$CC" != xcc; then
b61ff9c8
BS
3031 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
3032echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
ba479fd2 3033else
b61ff9c8
BS
3034 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
3035echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
ba479fd2
NN
3036fi
3037set dummy $CC; ac_cc=`echo $2 |
3038 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
b61ff9c8 3039if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
ba479fd2
NN
3040 echo $ECHO_N "(cached) $ECHO_C" >&6
3041else
3042 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3043/* confdefs.h. */
3044_ACEOF
3045cat confdefs.h >>conftest.$ac_ext
3046cat >>conftest.$ac_ext <<_ACEOF
3047/* end confdefs.h. */
3048
3049int
3050main ()
3051{
3052
3053 ;
3054 return 0;
3055}
3056_ACEOF
3ec83fc2
RH
3057# Make sure it works both with $CC and with simple cc.
3058# We do the test twice because some compilers refuse to overwrite an
3059# existing .o file with -o, though they will create one.
b61ff9c8
BS
3060ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
3061if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3062 (eval $ac_try) 2>&5
ba479fd2
NN
3063 ac_status=$?
3064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3065 (exit $ac_status); } &&
b61ff9c8
BS
3066 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3067 (eval $ac_try) 2>&5
ba479fd2
NN
3068 ac_status=$?
3069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3070 (exit $ac_status); };
3ec83fc2
RH
3071then
3072 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
3073 if test "x$CC" != xcc; then
3074 # Test first that cc exists at all.
ba479fd2 3075 if { ac_try='cc -c conftest.$ac_ext >&5'
b61ff9c8
BS
3076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3077 (eval $ac_try) 2>&5
ba479fd2
NN
3078 ac_status=$?
3079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3080 (exit $ac_status); }; }; then
b61ff9c8
BS
3081 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
3082 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3083 (eval $ac_try) 2>&5
ba479fd2
NN
3084 ac_status=$?
3085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3086 (exit $ac_status); } &&
b61ff9c8
BS
3087 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3088 (eval $ac_try) 2>&5
ba479fd2
NN
3089 ac_status=$?
3090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3091 (exit $ac_status); };
3ec83fc2 3092 then
86da66b5
HPN
3093 # cc works too.
3094 :
3ec83fc2 3095 else
86da66b5
HPN
3096 # cc exists but doesn't like -o.
3097 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
3098 fi
3099 fi
3100 fi
3101else
3102 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3103fi
b61ff9c8 3104rm -f conftest*
3ec83fc2
RH
3105
3106fi
b61ff9c8
BS
3107if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
3108 echo "$as_me:$LINENO: result: yes" >&5
3109echo "${ECHO_T}yes" >&6
3ec83fc2 3110else
b61ff9c8
BS
3111 echo "$as_me:$LINENO: result: no" >&5
3112echo "${ECHO_T}no" >&6
ba479fd2
NN
3113
3114cat >>confdefs.h <<\_ACEOF
3ec83fc2 3115#define NO_MINUS_C_MINUS_O 1
ba479fd2 3116_ACEOF
3ec83fc2
RH
3117
3118fi
3119
3b620440
KC
3120# expand $ac_aux_dir to an absolute path
3121am_aux_dir=`cd $ac_aux_dir && pwd`
3122
3123# FIXME: we rely on the cache variable name because
3124# there is no other way.
3125set dummy $CC
3126ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
3127if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
3128 # Losing compiler, so override with the script.
3129 # FIXME: It is wrong to rewrite CC.
3130 # But if we don't then we get into trouble of one sort or another.
3131 # A longer-term fix would be to have automake use am__CC in this case,
3132 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3133 CC="$am_aux_dir/compile $CC"
3134fi
3135
00020c16
ILT
3136ac_ext=cc
3137ac_cpp='$CXXCPP $CPPFLAGS'
3138ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3139ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3140ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3d4e720a 3141if test -n "$ac_tool_prefix"; then
00020c16
ILT
3142 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3143 do
3144 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3145set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3d4e720a
ST
3146echo "$as_me:$LINENO: checking for $ac_word" >&5
3147echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
00020c16 3148if test "${ac_cv_prog_CXX+set}" = set; then
3d4e720a
ST
3149 echo $ECHO_N "(cached) $ECHO_C" >&6
3150else
00020c16
ILT
3151 if test -n "$CXX"; then
3152 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3d4e720a
ST
3153else
3154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3155for as_dir in $PATH
3156do
3157 IFS=$as_save_IFS
3158 test -z "$as_dir" && as_dir=.
3159 for ac_exec_ext in '' $ac_executable_extensions; do
3160 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
00020c16 3161 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3d4e720a
ST
3162 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3163 break 2
3164 fi
3165done
3166done
3167
3168fi
3169fi
00020c16
ILT
3170CXX=$ac_cv_prog_CXX
3171if test -n "$CXX"; then
3172 echo "$as_me:$LINENO: result: $CXX" >&5
3173echo "${ECHO_T}$CXX" >&6
3d4e720a
ST
3174else
3175 echo "$as_me:$LINENO: result: no" >&5
3176echo "${ECHO_T}no" >&6
3177fi
3178
00020c16
ILT
3179 test -n "$CXX" && break
3180 done
3d4e720a 3181fi
00020c16
ILT
3182if test -z "$CXX"; then
3183 ac_ct_CXX=$CXX
3184 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3d4e720a 3185do
00020c16
ILT
3186 # Extract the first word of "$ac_prog", so it can be a program name with args.
3187set dummy $ac_prog; ac_word=$2
3d4e720a
ST
3188echo "$as_me:$LINENO: checking for $ac_word" >&5
3189echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
00020c16 3190if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3d4e720a
ST
3191 echo $ECHO_N "(cached) $ECHO_C" >&6
3192else
00020c16
ILT
3193 if test -n "$ac_ct_CXX"; then
3194 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3d4e720a
ST
3195else
3196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3197for as_dir in $PATH
3198do
3199 IFS=$as_save_IFS
3200 test -z "$as_dir" && as_dir=.
3201 for ac_exec_ext in '' $ac_executable_extensions; do
3202 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
00020c16 3203 ac_cv_prog_ac_ct_CXX="$ac_prog"
3d4e720a
ST
3204 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3205 break 2
3206 fi
3207done
3208done
3209
3210fi
3211fi
00020c16
ILT
3212ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3213if test -n "$ac_ct_CXX"; then
3214 echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
3215echo "${ECHO_T}$ac_ct_CXX" >&6
3d4e720a
ST
3216else
3217 echo "$as_me:$LINENO: result: no" >&5
3218echo "${ECHO_T}no" >&6
3219fi
3220
00020c16 3221 test -n "$ac_ct_CXX" && break
3d4e720a 3222done
00020c16 3223test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3d4e720a 3224
00020c16 3225 CXX=$ac_ct_CXX
414d23ae
HPN
3226fi
3227
3228
00020c16
ILT
3229# Provide some information about the compiler.
3230echo "$as_me:$LINENO:" \
3231 "checking for C++ compiler version" >&5
3232ac_compiler=`set X $ac_compile; echo $2`
3233{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
3234 (eval $ac_compiler --version </dev/null >&5) 2>&5
3235 ac_status=$?
3236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3237 (exit $ac_status); }
3238{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
3239 (eval $ac_compiler -v </dev/null >&5) 2>&5
3240 ac_status=$?
3241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3242 (exit $ac_status); }
3243{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
3244 (eval $ac_compiler -V </dev/null >&5) 2>&5
3245 ac_status=$?
3246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3247 (exit $ac_status); }
414d23ae 3248
00020c16
ILT
3249echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
3250echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3251if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
ba479fd2
NN
3252 echo $ECHO_N "(cached) $ECHO_C" >&6
3253else
ba479fd2 3254 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3255/* confdefs.h. */
3256_ACEOF
3257cat confdefs.h >>conftest.$ac_ext
3258cat >>conftest.$ac_ext <<_ACEOF
3259/* end confdefs.h. */
00020c16
ILT
3260
3261int
3262main ()
3263{
3264#ifndef __GNUC__
3265 choke me
ba479fd2 3266#endif
00020c16
ILT
3267
3268 ;
3269 return 0;
3270}
ba479fd2 3271_ACEOF
00020c16
ILT
3272rm -f conftest.$ac_objext
3273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3274 (eval $ac_compile) 2>conftest.er1
ba479fd2
NN
3275 ac_status=$?
3276 grep -v '^ *+' conftest.er1 >conftest.err
3277 rm -f conftest.er1
3278 cat conftest.err >&5
3279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
3280 (exit $ac_status); } &&
3281 { ac_try='test -z "$ac_cxx_werror_flag"
3282 || test ! -s conftest.err'
3283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3284 (eval $ac_try) 2>&5
3285 ac_status=$?
3286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3287 (exit $ac_status); }; } &&
3288 { ac_try='test -s conftest.$ac_objext'
3289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3290 (eval $ac_try) 2>&5
3291 ac_status=$?
3292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3293 (exit $ac_status); }; }; then
3294 ac_compiler_gnu=yes
cafe096b 3295else
ba479fd2
NN
3296 echo "$as_me: failed program was:" >&5
3297sed 's/^/| /' conftest.$ac_ext >&5
3298
00020c16 3299ac_compiler_gnu=no
ba479fd2 3300fi
00020c16
ILT
3301rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3302ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3303
3304fi
3305echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
3306echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3307GXX=`test $ac_compiler_gnu = yes && echo yes`
3308ac_test_CXXFLAGS=${CXXFLAGS+set}
3309ac_save_CXXFLAGS=$CXXFLAGS
3310CXXFLAGS="-g"
3311echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
3312echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3313if test "${ac_cv_prog_cxx_g+set}" = set; then
3314 echo $ECHO_N "(cached) $ECHO_C" >&6
3315else
ba479fd2 3316 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3317/* confdefs.h. */
3318_ACEOF
3319cat confdefs.h >>conftest.$ac_ext
3320cat >>conftest.$ac_ext <<_ACEOF
3321/* end confdefs.h. */
00020c16
ILT
3322
3323int
3324main ()
3325{
3326
3327 ;
3328 return 0;
3329}
ba479fd2 3330_ACEOF
00020c16
ILT
3331rm -f conftest.$ac_objext
3332if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3333 (eval $ac_compile) 2>conftest.er1
ba479fd2
NN
3334 ac_status=$?
3335 grep -v '^ *+' conftest.er1 >conftest.err
3336 rm -f conftest.er1
3337 cat conftest.err >&5
3338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
3339 (exit $ac_status); } &&
3340 { ac_try='test -z "$ac_cxx_werror_flag"
3341 || test ! -s conftest.err'
3342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3343 (eval $ac_try) 2>&5
3344 ac_status=$?
3345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3346 (exit $ac_status); }; } &&
3347 { ac_try='test -s conftest.$ac_objext'
3348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3349 (eval $ac_try) 2>&5
3350 ac_status=$?
3351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3352 (exit $ac_status); }; }; then
3353 ac_cv_prog_cxx_g=yes
ba479fd2
NN
3354else
3355 echo "$as_me: failed program was:" >&5
3356sed 's/^/| /' conftest.$ac_ext >&5
3357
00020c16 3358ac_cv_prog_cxx_g=no
ba479fd2 3359fi
00020c16 3360rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 3361fi
00020c16
ILT
3362echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
3363echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3364if test "$ac_test_CXXFLAGS" = set; then
3365 CXXFLAGS=$ac_save_CXXFLAGS
3366elif test $ac_cv_prog_cxx_g = yes; then
3367 if test "$GXX" = yes; then
3368 CXXFLAGS="-g -O2"
3369 else
3370 CXXFLAGS="-g"
3371 fi
ba479fd2 3372else
00020c16
ILT
3373 if test "$GXX" = yes; then
3374 CXXFLAGS="-O2"
3375 else
3376 CXXFLAGS=
3377 fi
ba479fd2 3378fi
00020c16
ILT
3379for ac_declaration in \
3380 '' \
3381 'extern "C" void std::exit (int) throw (); using std::exit;' \
3382 'extern "C" void std::exit (int); using std::exit;' \
3383 'extern "C" void exit (int) throw ();' \
3384 'extern "C" void exit (int);' \
3385 'void exit (int);'
ba479fd2 3386do
ba479fd2 3387 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3388/* confdefs.h. */
3389_ACEOF
3390cat confdefs.h >>conftest.$ac_ext
3391cat >>conftest.$ac_ext <<_ACEOF
3392/* end confdefs.h. */
00020c16
ILT
3393$ac_declaration
3394#include <stdlib.h>
3395int
3396main ()
3397{
3398exit (42);
3399 ;
3400 return 0;
3401}
ba479fd2 3402_ACEOF
00020c16
ILT
3403rm -f conftest.$ac_objext
3404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3405 (eval $ac_compile) 2>conftest.er1
ba479fd2
NN
3406 ac_status=$?
3407 grep -v '^ *+' conftest.er1 >conftest.err
3408 rm -f conftest.er1
3409 cat conftest.err >&5
3410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
3411 (exit $ac_status); } &&
3412 { ac_try='test -z "$ac_cxx_werror_flag"
3413 || test ! -s conftest.err'
3414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3415 (eval $ac_try) 2>&5
ba479fd2 3416 ac_status=$?
ba479fd2 3417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
3418 (exit $ac_status); }; } &&
3419 { ac_try='test -s conftest.$ac_objext'
3420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3421 (eval $ac_try) 2>&5
3422 ac_status=$?
3423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3424 (exit $ac_status); }; }; then
3425 :
ba479fd2
NN
3426else
3427 echo "$as_me: failed program was:" >&5
3428sed 's/^/| /' conftest.$ac_ext >&5
3429
00020c16 3430continue
60d26958 3431fi
00020c16 3432rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 3433 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3434/* confdefs.h. */
3435_ACEOF
3436cat confdefs.h >>conftest.$ac_ext
3437cat >>conftest.$ac_ext <<_ACEOF
3438/* end confdefs.h. */
00020c16 3439$ac_declaration
60d26958
PB
3440int
3441main ()
3442{
00020c16 3443exit (42);
60d26958
PB
3444 ;
3445 return 0;
3446}
ba479fd2
NN
3447_ACEOF
3448rm -f conftest.$ac_objext
b61ff9c8
BS
3449if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3450 (eval $ac_compile) 2>conftest.er1
ba479fd2 3451 ac_status=$?
86da66b5
HPN
3452 grep -v '^ *+' conftest.er1 >conftest.err
3453 rm -f conftest.er1
3454 cat conftest.err >&5
ba479fd2 3455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8 3456 (exit $ac_status); } &&
00020c16 3457 { ac_try='test -z "$ac_cxx_werror_flag"
b61ff9c8
BS
3458 || test ! -s conftest.err'
3459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3460 (eval $ac_try) 2>&5
3461 ac_status=$?
3462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3463 (exit $ac_status); }; } &&
3464 { ac_try='test -s conftest.$ac_objext'
3465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3466 (eval $ac_try) 2>&5
3467 ac_status=$?
3468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3469 (exit $ac_status); }; }; then
00020c16 3470 break
414d23ae 3471else
ba479fd2
NN
3472 echo "$as_me: failed program was:" >&5
3473sed 's/^/| /' conftest.$ac_ext >&5
3474
414d23ae 3475fi
b61ff9c8 3476rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16 3477done
60d26958 3478rm -f conftest*
00020c16
ILT
3479if test -n "$ac_declaration"; then
3480 echo '#ifdef __cplusplus' >>confdefs.h
3481 echo $ac_declaration >>confdefs.h
3482 echo '#endif' >>confdefs.h
60d26958 3483fi
86da66b5 3484
00020c16
ILT
3485ac_ext=c
3486ac_cpp='$CPP $CPPFLAGS'
3487ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3488ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3489ac_compiler_gnu=$ac_cv_c_compiler_gnu
60d26958 3490
60d26958 3491
60d26958 3492
60d26958 3493
00020c16
ILT
3494if test -n "$ac_tool_prefix"; then
3495 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
3496set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
3497echo "$as_me:$LINENO: checking for $ac_word" >&5
3498echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3499if test "${ac_cv_prog_GNATBIND+set}" = set; then
3500 echo $ECHO_N "(cached) $ECHO_C" >&6
60d26958 3501else
00020c16
ILT
3502 if test -n "$GNATBIND"; then
3503 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
3504else
3505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3506for as_dir in $PATH
3507do
3508 IFS=$as_save_IFS
3509 test -z "$as_dir" && as_dir=.
3510 for ac_exec_ext in '' $ac_executable_extensions; do
3511 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3512 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
3513 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3514 break 2
3515 fi
3516done
3517done
414d23ae 3518
60d26958
PB
3519fi
3520fi
00020c16
ILT
3521GNATBIND=$ac_cv_prog_GNATBIND
3522if test -n "$GNATBIND"; then
3523 echo "$as_me:$LINENO: result: $GNATBIND" >&5
3524echo "${ECHO_T}$GNATBIND" >&6
3525else
3526 echo "$as_me:$LINENO: result: no" >&5
3527echo "${ECHO_T}no" >&6
60d26958 3528fi
bf3b7cd3 3529
60d26958 3530fi
00020c16
ILT
3531if test -z "$ac_cv_prog_GNATBIND"; then
3532 ac_ct_GNATBIND=$GNATBIND
3533 # Extract the first word of "gnatbind", so it can be a program name with args.
3534set dummy gnatbind; ac_word=$2
3535echo "$as_me:$LINENO: checking for $ac_word" >&5
3536echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3537if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then
1a4b763e
BS
3538 echo $ECHO_N "(cached) $ECHO_C" >&6
3539else
00020c16
ILT
3540 if test -n "$ac_ct_GNATBIND"; then
3541 ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
60d26958 3542else
00020c16
ILT
3543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3544for as_dir in $PATH
3545do
3546 IFS=$as_save_IFS
3547 test -z "$as_dir" && as_dir=.
3548 for ac_exec_ext in '' $ac_executable_extensions; do
3549 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3550 ac_cv_prog_ac_ct_GNATBIND="gnatbind"
3551 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3552 break 2
3553 fi
3554done
3555done
60d26958 3556
00020c16 3557 test -z "$ac_cv_prog_ac_ct_GNATBIND" && ac_cv_prog_ac_ct_GNATBIND="no"
b61ff9c8 3558fi
60d26958 3559fi
00020c16
ILT
3560ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
3561if test -n "$ac_ct_GNATBIND"; then
3562 echo "$as_me:$LINENO: result: $ac_ct_GNATBIND" >&5
3563echo "${ECHO_T}$ac_ct_GNATBIND" >&6
3564else
3565 echo "$as_me:$LINENO: result: no" >&5
3566echo "${ECHO_T}no" >&6
3567fi
1a4b763e 3568
00020c16
ILT
3569 GNATBIND=$ac_ct_GNATBIND
3570else
3571 GNATBIND="$ac_cv_prog_GNATBIND"
60d26958 3572fi
1a4b763e 3573
00020c16
ILT
3574if test -n "$ac_tool_prefix"; then
3575 # Extract the first word of "${ac_tool_prefix}gnatmake", so it can be a program name with args.
3576set dummy ${ac_tool_prefix}gnatmake; ac_word=$2
3577echo "$as_me:$LINENO: checking for $ac_word" >&5
3578echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3579if test "${ac_cv_prog_GNATMAKE+set}" = set; then
3580 echo $ECHO_N "(cached) $ECHO_C" >&6
3581else
3582 if test -n "$GNATMAKE"; then
3583 ac_cv_prog_GNATMAKE="$GNATMAKE" # Let the user override the test.
3584else
3585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586for as_dir in $PATH
3587do
3588 IFS=$as_save_IFS
3589 test -z "$as_dir" && as_dir=.
3590 for ac_exec_ext in '' $ac_executable_extensions; do
3591 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3592 ac_cv_prog_GNATMAKE="${ac_tool_prefix}gnatmake"
3593 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3594 break 2
3595 fi
3596done
60d26958
PB
3597done
3598
00020c16
ILT
3599fi
3600fi
3601GNATMAKE=$ac_cv_prog_GNATMAKE
3602if test -n "$GNATMAKE"; then
3603 echo "$as_me:$LINENO: result: $GNATMAKE" >&5
3604echo "${ECHO_T}$GNATMAKE" >&6
3605else
3606 echo "$as_me:$LINENO: result: no" >&5
3607echo "${ECHO_T}no" >&6
3608fi
60d26958 3609
60d26958 3610fi
00020c16
ILT
3611if test -z "$ac_cv_prog_GNATMAKE"; then
3612 ac_ct_GNATMAKE=$GNATMAKE
3613 # Extract the first word of "gnatmake", so it can be a program name with args.
3614set dummy gnatmake; ac_word=$2
3615echo "$as_me:$LINENO: checking for $ac_word" >&5
3616echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3617if test "${ac_cv_prog_ac_ct_GNATMAKE+set}" = set; then
3618 echo $ECHO_N "(cached) $ECHO_C" >&6
60d26958 3619else
00020c16
ILT
3620 if test -n "$ac_ct_GNATMAKE"; then
3621 ac_cv_prog_ac_ct_GNATMAKE="$ac_ct_GNATMAKE" # Let the user override the test.
3622else
3623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3624for as_dir in $PATH
3625do
3626 IFS=$as_save_IFS
3627 test -z "$as_dir" && as_dir=.
3628 for ac_exec_ext in '' $ac_executable_extensions; do
3629 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3630 ac_cv_prog_ac_ct_GNATMAKE="gnatmake"
3631 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3632 break 2
3633 fi
3634done
3635done
3636
3637 test -z "$ac_cv_prog_ac_ct_GNATMAKE" && ac_cv_prog_ac_ct_GNATMAKE="no"
3638fi
3639fi
3640ac_ct_GNATMAKE=$ac_cv_prog_ac_ct_GNATMAKE
3641if test -n "$ac_ct_GNATMAKE"; then
3642 echo "$as_me:$LINENO: result: $ac_ct_GNATMAKE" >&5
3643echo "${ECHO_T}$ac_ct_GNATMAKE" >&6
3644else
3645 echo "$as_me:$LINENO: result: no" >&5
3646echo "${ECHO_T}no" >&6
3647fi
3648
3649 GNATMAKE=$ac_ct_GNATMAKE
3650else
3651 GNATMAKE="$ac_cv_prog_GNATMAKE"
3652fi
3653
3654echo "$as_me:$LINENO: checking whether compiler driver understands Ada" >&5
3655echo $ECHO_N "checking whether compiler driver understands Ada... $ECHO_C" >&6
3656if test "${acx_cv_cc_gcc_supports_ada+set}" = set; then
3657 echo $ECHO_N "(cached) $ECHO_C" >&6
3658else
3659 cat >conftest.adb <<EOF
3660procedure conftest is begin null; end conftest;
3661EOF
3662acx_cv_cc_gcc_supports_ada=no
3663# There is a bug in old released versions of GCC which causes the
3664# driver to exit successfully when the appropriate language module
3665# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
3666# Therefore we must check for the error message as well as an
3667# unsuccessful exit.
3668# Other compilers, like HP Tru64 UNIX cc, exit successfully when
3669# given a .adb file, but produce no object file. So we must check
3670# if an object file was really produced to guard against this.
3671errors=`(${CC} -I"$srcdir"/ada -c conftest.adb) 2>&1 || echo failure`
3672if test x"$errors" = x && test -f conftest.$ac_objext; then
3673 acx_cv_cc_gcc_supports_ada=yes
3674fi
3675rm -f conftest.*
3676fi
3677echo "$as_me:$LINENO: result: $acx_cv_cc_gcc_supports_ada" >&5
3678echo "${ECHO_T}$acx_cv_cc_gcc_supports_ada" >&6
3679
3680if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
3681 have_gnat=yes
3682else
3683 have_gnat=no
3684fi
3685
3686
3687# autoconf is lame and doesn't give us any substitution variable for this.
3688if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
3689 NO_MINUS_C_MINUS_O=yes
3690else
3691 OUTPUT_OPTION='-o $@'
3692fi
3693
3694
3695
3696# Remove the -O2: for historical reasons, unless bootstrapping we prefer
3697# optimizations to be activated explicitly by the toplevel.
3698case "$CC" in
3699 */prev-gcc/xgcc*) ;;
3700 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
3701esac
3702
3703
3704# -------------------------
3705# Check C compiler features
3706# -------------------------
3707
3708
3709ac_ext=c
3710ac_cpp='$CPP $CPPFLAGS'
3711ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3712ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3713ac_compiler_gnu=$ac_cv_c_compiler_gnu
3714echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3715echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3716# On Suns, sometimes $CPP names a directory.
3717if test -n "$CPP" && test -d "$CPP"; then
3718 CPP=
3719fi
3720if test -z "$CPP"; then
3721 if test "${ac_cv_prog_CPP+set}" = set; then
3722 echo $ECHO_N "(cached) $ECHO_C" >&6
3723else
3724 # Double quotes because CPP needs to be expanded
3725 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3726 do
3727 ac_preproc_ok=false
3728for ac_c_preproc_warn_flag in '' yes
3729do
3730 # Use a header file that comes with gcc, so configuring glibc
3731 # with a fresh cross-compiler works.
3732 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3733 # <limits.h> exists even on freestanding compilers.
3734 # On the NeXT, cc -E runs the code through the compiler's parser,
3735 # not just through cpp. "Syntax error" is here to catch this case.
3736 cat >conftest.$ac_ext <<_ACEOF
60d26958
PB
3737/* confdefs.h. */
3738_ACEOF
3739cat confdefs.h >>conftest.$ac_ext
3740cat >>conftest.$ac_ext <<_ACEOF
3741/* end confdefs.h. */
00020c16
ILT
3742#ifdef __STDC__
3743# include <limits.h>
3744#else
3745# include <assert.h>
3746#endif
3747 Syntax error
60d26958 3748_ACEOF
00020c16
ILT
3749if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3750 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
60d26958
PB
3751 ac_status=$?
3752 grep -v '^ *+' conftest.er1 >conftest.err
3753 rm -f conftest.er1
3754 cat conftest.err >&5
3755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
3756 (exit $ac_status); } >/dev/null; then
3757 if test -s conftest.err; then
3758 ac_cpp_err=$ac_c_preproc_warn_flag
3759 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3760 else
3761 ac_cpp_err=
3762 fi
3763else
3764 ac_cpp_err=yes
3765fi
3766if test -z "$ac_cpp_err"; then
3767 :
60d26958
PB
3768else
3769 echo "$as_me: failed program was:" >&5
3770sed 's/^/| /' conftest.$ac_ext >&5
3771
00020c16
ILT
3772 # Broken: fails on valid input.
3773continue
60d26958 3774fi
00020c16 3775rm -f conftest.err conftest.$ac_ext
60d26958 3776
00020c16
ILT
3777 # OK, works on sane cases. Now check whether non-existent headers
3778 # can be detected and how.
3779 cat >conftest.$ac_ext <<_ACEOF
60d26958
PB
3780/* confdefs.h. */
3781_ACEOF
3782cat confdefs.h >>conftest.$ac_ext
3783cat >>conftest.$ac_ext <<_ACEOF
3784/* end confdefs.h. */
00020c16 3785#include <ac_nonexistent.h>
60d26958
PB
3786_ACEOF
3787if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3788 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3789 ac_status=$?
3790 grep -v '^ *+' conftest.er1 >conftest.err
3791 rm -f conftest.er1
3792 cat conftest.err >&5
3793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3794 (exit $ac_status); } >/dev/null; then
3795 if test -s conftest.err; then
3796 ac_cpp_err=$ac_c_preproc_warn_flag
3797 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3798 else
3799 ac_cpp_err=
3800 fi
3801else
3802 ac_cpp_err=yes
3803fi
3804if test -z "$ac_cpp_err"; then
00020c16
ILT
3805 # Broken: success on invalid input.
3806continue
60d26958
PB
3807else
3808 echo "$as_me: failed program was:" >&5
3809sed 's/^/| /' conftest.$ac_ext >&5
3810
00020c16
ILT
3811 # Passes both tests.
3812ac_preproc_ok=:
3813break
60d26958
PB
3814fi
3815rm -f conftest.err conftest.$ac_ext
60d26958 3816
00020c16
ILT
3817done
3818# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3819rm -f conftest.err conftest.$ac_ext
3820if $ac_preproc_ok; then
3821 break
60d26958 3822fi
00020c16
ILT
3823
3824 done
3825 ac_cv_prog_CPP=$CPP
60d26958
PB
3826
3827fi
00020c16 3828 CPP=$ac_cv_prog_CPP
60d26958 3829else
00020c16 3830 ac_cv_prog_CPP=$CPP
60d26958 3831fi
00020c16
ILT
3832echo "$as_me:$LINENO: result: $CPP" >&5
3833echo "${ECHO_T}$CPP" >&6
3834ac_preproc_ok=false
3835for ac_c_preproc_warn_flag in '' yes
3836do
3837 # Use a header file that comes with gcc, so configuring glibc
3838 # with a fresh cross-compiler works.
3839 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3840 # <limits.h> exists even on freestanding compilers.
3841 # On the NeXT, cc -E runs the code through the compiler's parser,
3842 # not just through cpp. "Syntax error" is here to catch this case.
3843 cat >conftest.$ac_ext <<_ACEOF
3844/* confdefs.h. */
bf3b7cd3
JD
3845_ACEOF
3846cat confdefs.h >>conftest.$ac_ext
3847cat >>conftest.$ac_ext <<_ACEOF
3848/* end confdefs.h. */
60d26958
PB
3849#ifdef __STDC__
3850# include <limits.h>
3851#else
3852# include <assert.h>
3853#endif
3854 Syntax error
bf3b7cd3 3855_ACEOF
60d26958
PB
3856if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3857 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3858 ac_status=$?
3859 grep -v '^ *+' conftest.er1 >conftest.err
3860 rm -f conftest.er1
3861 cat conftest.err >&5
3862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3863 (exit $ac_status); } >/dev/null; then
3864 if test -s conftest.err; then
3865 ac_cpp_err=$ac_c_preproc_warn_flag
3866 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3867 else
3868 ac_cpp_err=
3869 fi
3870else
3871 ac_cpp_err=yes
3872fi
3873if test -z "$ac_cpp_err"; then
bf3b7cd3
JD
3874 :
3875else
60d26958
PB
3876 echo "$as_me: failed program was:" >&5
3877sed 's/^/| /' conftest.$ac_ext >&5
3878
3879 # Broken: fails on valid input.
3880continue
bf3b7cd3 3881fi
60d26958
PB
3882rm -f conftest.err conftest.$ac_ext
3883
3884 # OK, works on sane cases. Now check whether non-existent headers
3885 # can be detected and how.
3886 cat >conftest.$ac_ext <<_ACEOF
3887/* confdefs.h. */
3888_ACEOF
3889cat confdefs.h >>conftest.$ac_ext
3890cat >>conftest.$ac_ext <<_ACEOF
3891/* end confdefs.h. */
3892#include <ac_nonexistent.h>
3893_ACEOF
3894if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3895 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3896 ac_status=$?
3897 grep -v '^ *+' conftest.er1 >conftest.err
3898 rm -f conftest.er1
3899 cat conftest.err >&5
3900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3901 (exit $ac_status); } >/dev/null; then
3902 if test -s conftest.err; then
3903 ac_cpp_err=$ac_c_preproc_warn_flag
3904 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3905 else
3906 ac_cpp_err=
3907 fi
3908else
3909 ac_cpp_err=yes
3910fi
3911if test -z "$ac_cpp_err"; then
3912 # Broken: success on invalid input.
3913continue
3914else
3915 echo "$as_me: failed program was:" >&5
3916sed 's/^/| /' conftest.$ac_ext >&5
bf3b7cd3 3917
60d26958
PB
3918 # Passes both tests.
3919ac_preproc_ok=:
3920break
bf3b7cd3 3921fi
60d26958 3922rm -f conftest.err conftest.$ac_ext
bf3b7cd3 3923
60d26958
PB
3924done
3925# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3926rm -f conftest.err conftest.$ac_ext
3927if $ac_preproc_ok; then
00020c16
ILT
3928 :
3929else
3930 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3931echo "$as_me: error: in \`$ac_pwd':" >&2;}
3932{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3933See \`config.log' for more details." >&5
3934echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3935See \`config.log' for more details." >&2;}
3936 { (exit 1); exit 1; }; }; }
60d26958
PB
3937fi
3938
00020c16
ILT
3939ac_ext=c
3940ac_cpp='$CPP $CPPFLAGS'
3941ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3942ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3943ac_compiler_gnu=$ac_cv_c_compiler_gnu
60d26958 3944
00020c16
ILT
3945
3946echo "$as_me:$LINENO: checking for egrep" >&5
3947echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3948if test "${ac_cv_prog_egrep+set}" = set; then
3949 echo $ECHO_N "(cached) $ECHO_C" >&6
60d26958 3950else
00020c16
ILT
3951 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3952 then ac_cv_prog_egrep='grep -E'
3953 else ac_cv_prog_egrep='egrep'
3954 fi
60d26958 3955fi
00020c16
ILT
3956echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3957echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3958 EGREP=$ac_cv_prog_egrep
3959
3960
3961echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3962echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3963if test "${ac_cv_header_stdc+set}" = set; then
3964 echo $ECHO_N "(cached) $ECHO_C" >&6
3965else
bf3b7cd3
JD
3966 cat >conftest.$ac_ext <<_ACEOF
3967/* confdefs.h. */
3968_ACEOF
3969cat confdefs.h >>conftest.$ac_ext
3970cat >>conftest.$ac_ext <<_ACEOF
3971/* end confdefs.h. */
00020c16
ILT
3972#include <stdlib.h>
3973#include <stdarg.h>
3974#include <string.h>
3975#include <float.h>
3976
3977int
3978main ()
3979{
3980
3981 ;
3982 return 0;
3983}
bf3b7cd3 3984_ACEOF
00020c16
ILT
3985rm -f conftest.$ac_objext
3986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3987 (eval $ac_compile) 2>conftest.er1
60d26958
PB
3988 ac_status=$?
3989 grep -v '^ *+' conftest.er1 >conftest.err
3990 rm -f conftest.er1
3991 cat conftest.err >&5
3992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
3993 (exit $ac_status); } &&
3994 { ac_try='test -z "$ac_c_werror_flag"
3995 || test ! -s conftest.err'
3996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3997 (eval $ac_try) 2>&5
3998 ac_status=$?
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); }; } &&
4001 { ac_try='test -s conftest.$ac_objext'
4002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4003 (eval $ac_try) 2>&5
4004 ac_status=$?
4005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4006 (exit $ac_status); }; }; then
4007 ac_cv_header_stdc=yes
60d26958
PB
4008else
4009 echo "$as_me: failed program was:" >&5
4010sed 's/^/| /' conftest.$ac_ext >&5
bf3b7cd3 4011
00020c16 4012ac_cv_header_stdc=no
bf3b7cd3 4013fi
00020c16 4014rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4015
00020c16
ILT
4016if test $ac_cv_header_stdc = yes; then
4017 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
bf3b7cd3
JD
4018 cat >conftest.$ac_ext <<_ACEOF
4019/* confdefs.h. */
4020_ACEOF
4021cat confdefs.h >>conftest.$ac_ext
4022cat >>conftest.$ac_ext <<_ACEOF
4023/* end confdefs.h. */
00020c16
ILT
4024#include <string.h>
4025
bf3b7cd3 4026_ACEOF
00020c16
ILT
4027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4028 $EGREP "memchr" >/dev/null 2>&1; then
4029 :
bf3b7cd3 4030else
00020c16 4031 ac_cv_header_stdc=no
60d26958 4032fi
00020c16 4033rm -f conftest*
bf3b7cd3 4034
1a4b763e 4035fi
bf3b7cd3 4036
00020c16
ILT
4037if test $ac_cv_header_stdc = yes; then
4038 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4039 cat >conftest.$ac_ext <<_ACEOF
4040/* confdefs.h. */
4041_ACEOF
4042cat confdefs.h >>conftest.$ac_ext
4043cat >>conftest.$ac_ext <<_ACEOF
4044/* end confdefs.h. */
4045#include <stdlib.h>
4046
4047_ACEOF
4048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4049 $EGREP "free" >/dev/null 2>&1; then
60d26958
PB
4050 :
4051else
00020c16 4052 ac_cv_header_stdc=no
bf3b7cd3 4053fi
00020c16 4054rm -f conftest*
bf3b7cd3 4055
00020c16 4056fi
bf3b7cd3 4057
00020c16
ILT
4058if test $ac_cv_header_stdc = yes; then
4059 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4060 if test "$cross_compiling" = yes; then
4061 :
bf3b7cd3
JD
4062else
4063 cat >conftest.$ac_ext <<_ACEOF
4064/* confdefs.h. */
4065_ACEOF
4066cat confdefs.h >>conftest.$ac_ext
4067cat >>conftest.$ac_ext <<_ACEOF
4068/* end confdefs.h. */
00020c16
ILT
4069#include <ctype.h>
4070#if ((' ' & 0x0FF) == 0x020)
4071# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4072# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4073#else
4074# define ISLOWER(c) \
4075 (('a' <= (c) && (c) <= 'i') \
4076 || ('j' <= (c) && (c) <= 'r') \
4077 || ('s' <= (c) && (c) <= 'z'))
4078# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
60d26958 4079#endif
bf3b7cd3 4080
00020c16
ILT
4081#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4082int
4083main ()
4084{
4085 int i;
4086 for (i = 0; i < 256; i++)
4087 if (XOR (islower (i), ISLOWER (i))
4088 || toupper (i) != TOUPPER (i))
4089 exit(2);
4090 exit (0);
4091}
bf3b7cd3 4092_ACEOF
00020c16
ILT
4093rm -f conftest$ac_exeext
4094if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4095 (eval $ac_link) 2>&5
b61ff9c8
BS
4096 ac_status=$?
4097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16 4098 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
4099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4100 (eval $ac_try) 2>&5
4101 ac_status=$?
4102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4103 (exit $ac_status); }; }; then
00020c16 4104 :
bf3b7cd3 4105else
00020c16
ILT
4106 echo "$as_me: program exited with status $ac_status" >&5
4107echo "$as_me: failed program was:" >&5
bf3b7cd3
JD
4108sed 's/^/| /' conftest.$ac_ext >&5
4109
00020c16
ILT
4110( exit $ac_status )
4111ac_cv_header_stdc=no
bf3b7cd3 4112fi
00020c16
ILT
4113rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4114fi
4115fi
4116fi
4117echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4118echo "${ECHO_T}$ac_cv_header_stdc" >&6
4119if test $ac_cv_header_stdc = yes; then
4120
4121cat >>confdefs.h <<\_ACEOF
4122#define STDC_HEADERS 1
4123_ACEOF
bf3b7cd3
JD
4124
4125fi
4126
00020c16 4127# On IRIX 5.3, sys/types and inttypes.h are conflicting.
60d26958 4128
bf3b7cd3
JD
4129
4130
00020c16
ILT
4131
4132
4133
4134
4135
4136
4137for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4138 inttypes.h stdint.h unistd.h
4139do
4140as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4141echo "$as_me:$LINENO: checking for $ac_header" >&5
4142echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4143if eval "test \"\${$as_ac_Header+set}\" = set"; then
bf3b7cd3
JD
4144 echo $ECHO_N "(cached) $ECHO_C" >&6
4145else
4146 cat >conftest.$ac_ext <<_ACEOF
4147/* confdefs.h. */
4148_ACEOF
4149cat confdefs.h >>conftest.$ac_ext
4150cat >>conftest.$ac_ext <<_ACEOF
4151/* end confdefs.h. */
4152$ac_includes_default
00020c16
ILT
4153
4154#include <$ac_header>
bf3b7cd3
JD
4155_ACEOF
4156rm -f conftest.$ac_objext
b61ff9c8
BS
4157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4158 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4159 ac_status=$?
4160 grep -v '^ *+' conftest.er1 >conftest.err
4161 rm -f conftest.er1
4162 cat conftest.err >&5
4163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4164 (exit $ac_status); } &&
4165 { ac_try='test -z "$ac_c_werror_flag"
4166 || test ! -s conftest.err'
4167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4168 (eval $ac_try) 2>&5
4169 ac_status=$?
4170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4171 (exit $ac_status); }; } &&
4172 { ac_try='test -s conftest.$ac_objext'
4173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4174 (eval $ac_try) 2>&5
4175 ac_status=$?
4176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4177 (exit $ac_status); }; }; then
00020c16 4178 eval "$as_ac_Header=yes"
bf3b7cd3
JD
4179else
4180 echo "$as_me: failed program was:" >&5
4181sed 's/^/| /' conftest.$ac_ext >&5
4182
00020c16 4183eval "$as_ac_Header=no"
bf3b7cd3 4184fi
b61ff9c8 4185rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4186fi
00020c16
ILT
4187echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4188echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4189if test `eval echo '${'$as_ac_Header'}'` = yes; then
4190 cat >>confdefs.h <<_ACEOF
4191#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4192_ACEOF
bf3b7cd3 4193
00020c16
ILT
4194fi
4195
4196done
4197
4198
4199
4200 if test "${ac_cv_header_minix_config_h+set}" = set; then
4201 echo "$as_me:$LINENO: checking for minix/config.h" >&5
4202echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
4203if test "${ac_cv_header_minix_config_h+set}" = set; then
ba479fd2 4204 echo $ECHO_N "(cached) $ECHO_C" >&6
00020c16
ILT
4205fi
4206echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4207echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
75b6f3fd 4208else
00020c16
ILT
4209 # Is the header compilable?
4210echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4211echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
bf3b7cd3
JD
4212cat >conftest.$ac_ext <<_ACEOF
4213/* confdefs.h. */
4214_ACEOF
4215cat confdefs.h >>conftest.$ac_ext
4216cat >>conftest.$ac_ext <<_ACEOF
4217/* end confdefs.h. */
4218$ac_includes_default
00020c16 4219#include <minix/config.h>
bf3b7cd3
JD
4220_ACEOF
4221rm -f conftest.$ac_objext
b61ff9c8
BS
4222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4223 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4224 ac_status=$?
4225 grep -v '^ *+' conftest.er1 >conftest.err
4226 rm -f conftest.er1
4227 cat conftest.err >&5
4228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4229 (exit $ac_status); } &&
4230 { ac_try='test -z "$ac_c_werror_flag"
4231 || test ! -s conftest.err'
4232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4233 (eval $ac_try) 2>&5
4234 ac_status=$?
4235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4236 (exit $ac_status); }; } &&
4237 { ac_try='test -s conftest.$ac_objext'
4238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4239 (eval $ac_try) 2>&5
4240 ac_status=$?
4241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4242 (exit $ac_status); }; }; then
00020c16
ILT
4243 ac_header_compiler=yes
4244else
4245 echo "$as_me: failed program was:" >&5
4246sed 's/^/| /' conftest.$ac_ext >&5
4247
4248ac_header_compiler=no
4249fi
4250rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4251echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4252echo "${ECHO_T}$ac_header_compiler" >&6
4253
4254# Is the header present?
4255echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4256echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
4257cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4258/* confdefs.h. */
4259_ACEOF
4260cat confdefs.h >>conftest.$ac_ext
4261cat >>conftest.$ac_ext <<_ACEOF
4262/* end confdefs.h. */
00020c16 4263#include <minix/config.h>
bf3b7cd3 4264_ACEOF
00020c16
ILT
4265if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4266 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
bf3b7cd3
JD
4267 ac_status=$?
4268 grep -v '^ *+' conftest.er1 >conftest.err
4269 rm -f conftest.er1
4270 cat conftest.err >&5
4271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
4272 (exit $ac_status); } >/dev/null; then
4273 if test -s conftest.err; then
4274 ac_cpp_err=$ac_c_preproc_warn_flag
4275 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4276 else
4277 ac_cpp_err=
4278 fi
4279else
4280 ac_cpp_err=yes
4281fi
4282if test -z "$ac_cpp_err"; then
4283 ac_header_preproc=yes
bf3b7cd3
JD
4284else
4285 echo "$as_me: failed program was:" >&5
4286sed 's/^/| /' conftest.$ac_ext >&5
4287
00020c16 4288 ac_header_preproc=no
bf3b7cd3 4289fi
00020c16
ILT
4290rm -f conftest.err conftest.$ac_ext
4291echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4292echo "${ECHO_T}$ac_header_preproc" >&6
4293
4294# So? What about this header?
4295case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4296 yes:no: )
4297 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4298echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4299 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4300echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4301 ac_header_preproc=yes
4302 ;;
4303 no:yes:* )
4304 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4305echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4306 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4307echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4308 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4309echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4310 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4311echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4312 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4313echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4314 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4315echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4316 (
4317 cat <<\_ASBOX
4318## ------------------------------------------ ##
4319## Report this to the AC_PACKAGE_NAME lists. ##
4320## ------------------------------------------ ##
4321_ASBOX
4322 ) |
4323 sed "s/^/$as_me: WARNING: /" >&2
4324 ;;
4325esac
4326echo "$as_me:$LINENO: checking for minix/config.h" >&5
4327echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
4328if test "${ac_cv_header_minix_config_h+set}" = set; then
4329 echo $ECHO_N "(cached) $ECHO_C" >&6
bf3b7cd3 4330else
00020c16
ILT
4331 ac_cv_header_minix_config_h=$ac_header_preproc
4332fi
4333echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4334echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
bf3b7cd3 4335
00020c16
ILT
4336fi
4337if test $ac_cv_header_minix_config_h = yes; then
4338 MINIX=yes
4339else
4340 MINIX=
4341fi
4342
4343
4344 if test "$MINIX" = yes; then
4345
4346cat >>confdefs.h <<\_ACEOF
4347#define _POSIX_SOURCE 1
4348_ACEOF
4349
4350
4351cat >>confdefs.h <<\_ACEOF
4352#define _POSIX_1_SOURCE 2
4353_ACEOF
4354
4355
4356cat >>confdefs.h <<\_ACEOF
4357#define _MINIX 1
4358_ACEOF
4359
4360 fi
4361
4362
4363
4364 echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4365echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6
4366if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4367 echo $ECHO_N "(cached) $ECHO_C" >&6
4368else
4369 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4370/* confdefs.h. */
4371_ACEOF
4372cat confdefs.h >>conftest.$ac_ext
4373cat >>conftest.$ac_ext <<_ACEOF
4374/* end confdefs.h. */
00020c16
ILT
4375
4376# define __EXTENSIONS__ 1
4377 $ac_includes_default
bf3b7cd3
JD
4378int
4379main ()
4380{
bf3b7cd3
JD
4381
4382 ;
4383 return 0;
4384}
4385_ACEOF
4386rm -f conftest.$ac_objext
b61ff9c8
BS
4387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4388 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4389 ac_status=$?
4390 grep -v '^ *+' conftest.er1 >conftest.err
4391 rm -f conftest.er1
4392 cat conftest.err >&5
4393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4394 (exit $ac_status); } &&
4395 { ac_try='test -z "$ac_c_werror_flag"
4396 || test ! -s conftest.err'
4397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4398 (eval $ac_try) 2>&5
4399 ac_status=$?
4400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4401 (exit $ac_status); }; } &&
4402 { ac_try='test -s conftest.$ac_objext'
4403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4404 (eval $ac_try) 2>&5
4405 ac_status=$?
4406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4407 (exit $ac_status); }; }; then
00020c16
ILT
4408 ac_cv_safe_to_define___extensions__=yes
4409else
4410 echo "$as_me: failed program was:" >&5
4411sed 's/^/| /' conftest.$ac_ext >&5
4412
4413ac_cv_safe_to_define___extensions__=no
4414fi
4415rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4416fi
4417echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4418echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6
4419 test $ac_cv_safe_to_define___extensions__ = yes &&
4420 cat >>confdefs.h <<\_ACEOF
4421#define __EXTENSIONS__ 1
4422_ACEOF
4423
4424 cat >>confdefs.h <<\_ACEOF
4425#define _ALL_SOURCE 1
4426_ACEOF
4427
4428 cat >>confdefs.h <<\_ACEOF
4429#define _GNU_SOURCE 1
4430_ACEOF
4431
4432 cat >>confdefs.h <<\_ACEOF
4433#define _POSIX_PTHREAD_SEMANTICS 1
4434_ACEOF
4435
4436 cat >>confdefs.h <<\_ACEOF
4437#define _TANDEM_SOURCE 1
4438_ACEOF
4439
4440
4441ac_ext=c
4442ac_cpp='$CPP $CPPFLAGS'
4443ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4444ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4445ac_compiler_gnu=$ac_cv_c_compiler_gnu
4446echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4447echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
4448# On Suns, sometimes $CPP names a directory.
4449if test -n "$CPP" && test -d "$CPP"; then
4450 CPP=
4451fi
4452if test -z "$CPP"; then
4453 if test "${ac_cv_prog_CPP+set}" = set; then
4454 echo $ECHO_N "(cached) $ECHO_C" >&6
4455else
4456 # Double quotes because CPP needs to be expanded
4457 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4458 do
4459 ac_preproc_ok=false
4460for ac_c_preproc_warn_flag in '' yes
4461do
4462 # Use a header file that comes with gcc, so configuring glibc
4463 # with a fresh cross-compiler works.
4464 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4465 # <limits.h> exists even on freestanding compilers.
4466 # On the NeXT, cc -E runs the code through the compiler's parser,
4467 # not just through cpp. "Syntax error" is here to catch this case.
4468 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4469/* confdefs.h. */
4470_ACEOF
4471cat confdefs.h >>conftest.$ac_ext
4472cat >>conftest.$ac_ext <<_ACEOF
4473/* end confdefs.h. */
00020c16
ILT
4474#ifdef __STDC__
4475# include <limits.h>
4476#else
4477# include <assert.h>
4478#endif
4479 Syntax error
bf3b7cd3 4480_ACEOF
00020c16
ILT
4481if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4482 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
bf3b7cd3
JD
4483 ac_status=$?
4484 grep -v '^ *+' conftest.er1 >conftest.err
4485 rm -f conftest.er1
4486 cat conftest.err >&5
4487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
4488 (exit $ac_status); } >/dev/null; then
4489 if test -s conftest.err; then
4490 ac_cpp_err=$ac_c_preproc_warn_flag
4491 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4492 else
4493 ac_cpp_err=
4494 fi
bf3b7cd3 4495else
00020c16 4496 ac_cpp_err=yes
bf3b7cd3 4497fi
00020c16
ILT
4498if test -z "$ac_cpp_err"; then
4499 :
bf3b7cd3
JD
4500else
4501 echo "$as_me: failed program was:" >&5
4502sed 's/^/| /' conftest.$ac_ext >&5
4503
00020c16
ILT
4504 # Broken: fails on valid input.
4505continue
bf3b7cd3 4506fi
00020c16
ILT
4507rm -f conftest.err conftest.$ac_ext
4508
4509 # OK, works on sane cases. Now check whether non-existent headers
4510 # can be detected and how.
bf3b7cd3
JD
4511 cat >conftest.$ac_ext <<_ACEOF
4512/* confdefs.h. */
4513_ACEOF
4514cat confdefs.h >>conftest.$ac_ext
4515cat >>conftest.$ac_ext <<_ACEOF
4516/* end confdefs.h. */
00020c16 4517#include <ac_nonexistent.h>
bf3b7cd3 4518_ACEOF
00020c16
ILT
4519if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4520 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
bf3b7cd3
JD
4521 ac_status=$?
4522 grep -v '^ *+' conftest.er1 >conftest.err
4523 rm -f conftest.er1
4524 cat conftest.err >&5
4525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
4526 (exit $ac_status); } >/dev/null; then
4527 if test -s conftest.err; then
4528 ac_cpp_err=$ac_c_preproc_warn_flag
4529 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4530 else
4531 ac_cpp_err=
4532 fi
4533else
4534 ac_cpp_err=yes
4535fi
4536if test -z "$ac_cpp_err"; then
4537 # Broken: success on invalid input.
4538continue
bf3b7cd3
JD
4539else
4540 echo "$as_me: failed program was:" >&5
4541sed 's/^/| /' conftest.$ac_ext >&5
4542
00020c16
ILT
4543 # Passes both tests.
4544ac_preproc_ok=:
4545break
bf3b7cd3 4546fi
00020c16
ILT
4547rm -f conftest.err conftest.$ac_ext
4548
bf3b7cd3 4549done
00020c16
ILT
4550# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4551rm -f conftest.err conftest.$ac_ext
4552if $ac_preproc_ok; then
4553 break
4554fi
4555
4556 done
4557 ac_cv_prog_CPP=$CPP
4558
4559fi
4560 CPP=$ac_cv_prog_CPP
bf3b7cd3 4561else
00020c16
ILT
4562 ac_cv_prog_CPP=$CPP
4563fi
4564echo "$as_me:$LINENO: result: $CPP" >&5
4565echo "${ECHO_T}$CPP" >&6
4566ac_preproc_ok=false
4567for ac_c_preproc_warn_flag in '' yes
4568do
4569 # Use a header file that comes with gcc, so configuring glibc
4570 # with a fresh cross-compiler works.
4571 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4572 # <limits.h> exists even on freestanding compilers.
4573 # On the NeXT, cc -E runs the code through the compiler's parser,
4574 # not just through cpp. "Syntax error" is here to catch this case.
bf3b7cd3
JD
4575 cat >conftest.$ac_ext <<_ACEOF
4576/* confdefs.h. */
4577_ACEOF
4578cat confdefs.h >>conftest.$ac_ext
4579cat >>conftest.$ac_ext <<_ACEOF
4580/* end confdefs.h. */
00020c16
ILT
4581#ifdef __STDC__
4582# include <limits.h>
4583#else
4584# include <assert.h>
4585#endif
4586 Syntax error
bf3b7cd3 4587_ACEOF
00020c16
ILT
4588if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4589 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
bf3b7cd3 4590 ac_status=$?
00020c16
ILT
4591 grep -v '^ *+' conftest.er1 >conftest.err
4592 rm -f conftest.er1
4593 cat conftest.err >&5
bf3b7cd3 4594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
4595 (exit $ac_status); } >/dev/null; then
4596 if test -s conftest.err; then
4597 ac_cpp_err=$ac_c_preproc_warn_flag
4598 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4599 else
4600 ac_cpp_err=
4601 fi
4602else
4603 ac_cpp_err=yes
4604fi
4605if test -z "$ac_cpp_err"; then
4606 :
4607else
4608 echo "$as_me: failed program was:" >&5
4609sed 's/^/| /' conftest.$ac_ext >&5
4610
4611 # Broken: fails on valid input.
4612continue
4613fi
4614rm -f conftest.err conftest.$ac_ext
4615
4616 # OK, works on sane cases. Now check whether non-existent headers
4617 # can be detected and how.
4618 cat >conftest.$ac_ext <<_ACEOF
4619/* confdefs.h. */
4620_ACEOF
4621cat confdefs.h >>conftest.$ac_ext
4622cat >>conftest.$ac_ext <<_ACEOF
4623/* end confdefs.h. */
4624#include <ac_nonexistent.h>
4625_ACEOF
4626if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4627 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
bf3b7cd3 4628 ac_status=$?
00020c16
ILT
4629 grep -v '^ *+' conftest.er1 >conftest.err
4630 rm -f conftest.er1
4631 cat conftest.err >&5
bf3b7cd3 4632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
4633 (exit $ac_status); } >/dev/null; then
4634 if test -s conftest.err; then
4635 ac_cpp_err=$ac_c_preproc_warn_flag
4636 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4637 else
4638 ac_cpp_err=
4639 fi
bf3b7cd3 4640else
00020c16
ILT
4641 ac_cpp_err=yes
4642fi
4643if test -z "$ac_cpp_err"; then
4644 # Broken: success on invalid input.
4645continue
4646else
4647 echo "$as_me: failed program was:" >&5
bf3b7cd3
JD
4648sed 's/^/| /' conftest.$ac_ext >&5
4649
00020c16
ILT
4650 # Passes both tests.
4651ac_preproc_ok=:
4652break
4653fi
4654rm -f conftest.err conftest.$ac_ext
4655
4656done
4657# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4658rm -f conftest.err conftest.$ac_ext
4659if $ac_preproc_ok; then
4660 :
4661else
4662 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18c04407 4663echo "$as_me: error: in \`$ac_pwd':" >&2;}
00020c16 4664{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
bf3b7cd3 4665See \`config.log' for more details." >&5
00020c16 4666echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
bf3b7cd3 4667See \`config.log' for more details." >&2;}
18c04407 4668 { (exit 1); exit 1; }; }; }
b61ff9c8 4669fi
bf3b7cd3 4670
00020c16
ILT
4671ac_ext=c
4672ac_cpp='$CPP $CPPFLAGS'
4673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4675ac_compiler_gnu=$ac_cv_c_compiler_gnu
bf3b7cd3 4676
00020c16
ILT
4677echo "$as_me:$LINENO: checking for inline" >&5
4678echo $ECHO_N "checking for inline... $ECHO_C" >&6
4679if test "${ac_cv_c_inline+set}" = set; then
bf3b7cd3
JD
4680 echo $ECHO_N "(cached) $ECHO_C" >&6
4681else
00020c16
ILT
4682 ac_cv_c_inline=no
4683for ac_kw in inline __inline__ __inline; do
bf3b7cd3
JD
4684 cat >conftest.$ac_ext <<_ACEOF
4685/* confdefs.h. */
4686_ACEOF
4687cat confdefs.h >>conftest.$ac_ext
4688cat >>conftest.$ac_ext <<_ACEOF
4689/* end confdefs.h. */
00020c16
ILT
4690#ifndef __cplusplus
4691typedef int foo_t;
4692static $ac_kw foo_t static_foo () {return 0; }
4693$ac_kw foo_t foo () {return 0; }
4694#endif
4695
bf3b7cd3
JD
4696_ACEOF
4697rm -f conftest.$ac_objext
b61ff9c8
BS
4698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4699 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4700 ac_status=$?
4701 grep -v '^ *+' conftest.er1 >conftest.err
4702 rm -f conftest.er1
4703 cat conftest.err >&5
4704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4705 (exit $ac_status); } &&
4706 { ac_try='test -z "$ac_c_werror_flag"
4707 || test ! -s conftest.err'
4708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4709 (eval $ac_try) 2>&5
4710 ac_status=$?
4711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4712 (exit $ac_status); }; } &&
4713 { ac_try='test -s conftest.$ac_objext'
4714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4715 (eval $ac_try) 2>&5
4716 ac_status=$?
4717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4718 (exit $ac_status); }; }; then
00020c16 4719 ac_cv_c_inline=$ac_kw; break
bf3b7cd3
JD
4720else
4721 echo "$as_me: failed program was:" >&5
4722sed 's/^/| /' conftest.$ac_ext >&5
4723
bf3b7cd3 4724fi
b61ff9c8 4725rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16
ILT
4726done
4727
bf3b7cd3 4728fi
00020c16
ILT
4729echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
4730echo "${ECHO_T}$ac_cv_c_inline" >&6
bf3b7cd3 4731
00020c16
ILT
4732
4733case $ac_cv_c_inline in
4734 inline | yes) ;;
4735 *)
4736 case $ac_cv_c_inline in
4737 no) ac_val=;;
4738 *) ac_val=$ac_cv_c_inline;;
4739 esac
4740 cat >>confdefs.h <<_ACEOF
4741#ifndef __cplusplus
4742#define inline $ac_val
4743#endif
4744_ACEOF
4745 ;;
4746esac
4747
4748
4749# sizeof(char) is 1 by definition.
4750echo "$as_me:$LINENO: checking for void *" >&5
4751echo $ECHO_N "checking for void *... $ECHO_C" >&6
4752if test "${ac_cv_type_void_p+set}" = set; then
bf3b7cd3
JD
4753 echo $ECHO_N "(cached) $ECHO_C" >&6
4754else
00020c16
ILT
4755 cat >conftest.$ac_ext <<_ACEOF
4756/* confdefs.h. */
4757_ACEOF
4758cat confdefs.h >>conftest.$ac_ext
4759cat >>conftest.$ac_ext <<_ACEOF
4760/* end confdefs.h. */
4761$ac_includes_default
4762int
4763main ()
4764{
4765if ((void * *) 0)
4766 return 0;
4767if (sizeof (void *))
4768 return 0;
4769 ;
4770 return 0;
4771}
4772_ACEOF
4773rm -f conftest.$ac_objext
4774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4775 (eval $ac_compile) 2>conftest.er1
4776 ac_status=$?
4777 grep -v '^ *+' conftest.er1 >conftest.err
4778 rm -f conftest.er1
4779 cat conftest.err >&5
4780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4781 (exit $ac_status); } &&
4782 { ac_try='test -z "$ac_c_werror_flag"
4783 || test ! -s conftest.err'
4784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4785 (eval $ac_try) 2>&5
4786 ac_status=$?
4787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4788 (exit $ac_status); }; } &&
4789 { ac_try='test -s conftest.$ac_objext'
4790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4791 (eval $ac_try) 2>&5
4792 ac_status=$?
4793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4794 (exit $ac_status); }; }; then
4795 ac_cv_type_void_p=yes
4796else
4797 echo "$as_me: failed program was:" >&5
4798sed 's/^/| /' conftest.$ac_ext >&5
4799
4800ac_cv_type_void_p=no
4801fi
4802rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4803fi
4804echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
4805echo "${ECHO_T}$ac_cv_type_void_p" >&6
4806
4807echo "$as_me:$LINENO: checking size of void *" >&5
4808echo $ECHO_N "checking size of void *... $ECHO_C" >&6
4809if test "${ac_cv_sizeof_void_p+set}" = set; then
4810 echo $ECHO_N "(cached) $ECHO_C" >&6
4811else
4812 if test "$ac_cv_type_void_p" = yes; then
b61ff9c8
BS
4813 # The cast to unsigned long works around a bug in the HP C Compiler
4814 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4815 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4816 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4817 if test "$cross_compiling" = yes; then
4818 # Depending upon the size, compute the lo and hi bounds.
4819cat >conftest.$ac_ext <<_ACEOF
4820/* confdefs.h. */
4821_ACEOF
4822cat confdefs.h >>conftest.$ac_ext
4823cat >>conftest.$ac_ext <<_ACEOF
4824/* end confdefs.h. */
4825$ac_includes_default
4826int
4827main ()
4828{
00020c16 4829static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
bf3b7cd3
JD
4830test_array [0] = 0
4831
4832 ;
4833 return 0;
4834}
4835_ACEOF
4836rm -f conftest.$ac_objext
b61ff9c8
BS
4837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4838 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4839 ac_status=$?
4840 grep -v '^ *+' conftest.er1 >conftest.err
4841 rm -f conftest.er1
4842 cat conftest.err >&5
4843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4844 (exit $ac_status); } &&
4845 { ac_try='test -z "$ac_c_werror_flag"
4846 || test ! -s conftest.err'
4847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4848 (eval $ac_try) 2>&5
4849 ac_status=$?
4850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4851 (exit $ac_status); }; } &&
4852 { ac_try='test -s conftest.$ac_objext'
4853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4854 (eval $ac_try) 2>&5
4855 ac_status=$?
4856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4857 (exit $ac_status); }; }; then
bf3b7cd3
JD
4858 ac_lo=0 ac_mid=0
4859 while :; do
4860 cat >conftest.$ac_ext <<_ACEOF
4861/* confdefs.h. */
4862_ACEOF
4863cat confdefs.h >>conftest.$ac_ext
4864cat >>conftest.$ac_ext <<_ACEOF
4865/* end confdefs.h. */
4866$ac_includes_default
4867int
4868main ()
4869{
00020c16 4870static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
4871test_array [0] = 0
4872
4873 ;
4874 return 0;
4875}
4876_ACEOF
4877rm -f conftest.$ac_objext
b61ff9c8
BS
4878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4879 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4880 ac_status=$?
4881 grep -v '^ *+' conftest.er1 >conftest.err
4882 rm -f conftest.er1
4883 cat conftest.err >&5
4884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4885 (exit $ac_status); } &&
4886 { ac_try='test -z "$ac_c_werror_flag"
4887 || test ! -s conftest.err'
4888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4889 (eval $ac_try) 2>&5
4890 ac_status=$?
4891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4892 (exit $ac_status); }; } &&
4893 { ac_try='test -s conftest.$ac_objext'
4894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4895 (eval $ac_try) 2>&5
4896 ac_status=$?
4897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4898 (exit $ac_status); }; }; then
bf3b7cd3
JD
4899 ac_hi=$ac_mid; break
4900else
4901 echo "$as_me: failed program was:" >&5
4902sed 's/^/| /' conftest.$ac_ext >&5
4903
b61ff9c8
BS
4904ac_lo=`expr $ac_mid + 1`
4905 if test $ac_lo -le $ac_mid; then
4906 ac_lo= ac_hi=
4907 break
4908 fi
4909 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4910fi
b61ff9c8 4911rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4912 done
4913else
4914 echo "$as_me: failed program was:" >&5
4915sed 's/^/| /' conftest.$ac_ext >&5
4916
b61ff9c8 4917cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4918/* confdefs.h. */
4919_ACEOF
4920cat confdefs.h >>conftest.$ac_ext
4921cat >>conftest.$ac_ext <<_ACEOF
4922/* end confdefs.h. */
4923$ac_includes_default
4924int
4925main ()
4926{
00020c16 4927static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
bf3b7cd3
JD
4928test_array [0] = 0
4929
4930 ;
4931 return 0;
4932}
4933_ACEOF
4934rm -f conftest.$ac_objext
b61ff9c8
BS
4935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4936 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4937 ac_status=$?
4938 grep -v '^ *+' conftest.er1 >conftest.err
4939 rm -f conftest.er1
4940 cat conftest.err >&5
4941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4942 (exit $ac_status); } &&
4943 { ac_try='test -z "$ac_c_werror_flag"
4944 || test ! -s conftest.err'
4945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4946 (eval $ac_try) 2>&5
4947 ac_status=$?
4948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4949 (exit $ac_status); }; } &&
4950 { ac_try='test -s conftest.$ac_objext'
4951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4952 (eval $ac_try) 2>&5
4953 ac_status=$?
4954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4955 (exit $ac_status); }; }; then
bf3b7cd3
JD
4956 ac_hi=-1 ac_mid=-1
4957 while :; do
4958 cat >conftest.$ac_ext <<_ACEOF
4959/* confdefs.h. */
4960_ACEOF
4961cat confdefs.h >>conftest.$ac_ext
4962cat >>conftest.$ac_ext <<_ACEOF
4963/* end confdefs.h. */
4964$ac_includes_default
4965int
4966main ()
4967{
00020c16 4968static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
bf3b7cd3
JD
4969test_array [0] = 0
4970
4971 ;
4972 return 0;
4973}
4974_ACEOF
4975rm -f conftest.$ac_objext
b61ff9c8
BS
4976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4977 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4978 ac_status=$?
4979 grep -v '^ *+' conftest.er1 >conftest.err
4980 rm -f conftest.er1
4981 cat conftest.err >&5
4982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4983 (exit $ac_status); } &&
4984 { ac_try='test -z "$ac_c_werror_flag"
4985 || test ! -s conftest.err'
4986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4987 (eval $ac_try) 2>&5
4988 ac_status=$?
4989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4990 (exit $ac_status); }; } &&
4991 { ac_try='test -s conftest.$ac_objext'
4992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4993 (eval $ac_try) 2>&5
4994 ac_status=$?
4995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4996 (exit $ac_status); }; }; then
bf3b7cd3
JD
4997 ac_lo=$ac_mid; break
4998else
4999 echo "$as_me: failed program was:" >&5
5000sed 's/^/| /' conftest.$ac_ext >&5
5001
b61ff9c8
BS
5002ac_hi=`expr '(' $ac_mid ')' - 1`
5003 if test $ac_mid -le $ac_hi; then
5004 ac_lo= ac_hi=
5005 break
5006 fi
5007 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5008fi
b61ff9c8 5009rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5010 done
5011else
5012 echo "$as_me: failed program was:" >&5
5013sed 's/^/| /' conftest.$ac_ext >&5
5014
b61ff9c8 5015ac_lo= ac_hi=
bf3b7cd3 5016fi
b61ff9c8 5017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5018fi
b61ff9c8 5019rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5020# Binary search between lo and hi bounds.
5021while test "x$ac_lo" != "x$ac_hi"; do
5022 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5023 cat >conftest.$ac_ext <<_ACEOF
5024/* confdefs.h. */
5025_ACEOF
5026cat confdefs.h >>conftest.$ac_ext
5027cat >>conftest.$ac_ext <<_ACEOF
5028/* end confdefs.h. */
5029$ac_includes_default
5030int
5031main ()
5032{
00020c16 5033static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
5034test_array [0] = 0
5035
5036 ;
5037 return 0;
5038}
5039_ACEOF
5040rm -f conftest.$ac_objext
b61ff9c8
BS
5041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5042 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5043 ac_status=$?
5044 grep -v '^ *+' conftest.er1 >conftest.err
5045 rm -f conftest.er1
5046 cat conftest.err >&5
5047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5048 (exit $ac_status); } &&
5049 { ac_try='test -z "$ac_c_werror_flag"
5050 || test ! -s conftest.err'
5051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5052 (eval $ac_try) 2>&5
5053 ac_status=$?
5054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5055 (exit $ac_status); }; } &&
5056 { ac_try='test -s conftest.$ac_objext'
5057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5058 (eval $ac_try) 2>&5
5059 ac_status=$?
5060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5061 (exit $ac_status); }; }; then
bf3b7cd3
JD
5062 ac_hi=$ac_mid
5063else
5064 echo "$as_me: failed program was:" >&5
5065sed 's/^/| /' conftest.$ac_ext >&5
5066
b61ff9c8 5067ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5068fi
b61ff9c8 5069rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5070done
5071case $ac_lo in
00020c16 5072?*) ac_cv_sizeof_void_p=$ac_lo;;
18c04407
RW
5073'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5074echo "$as_me: error: in \`$ac_pwd':" >&2;}
00020c16 5075{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 5076See \`config.log' for more details." >&5
00020c16 5077echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 5078See \`config.log' for more details." >&2;}
18c04407 5079 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 5080esac
b61ff9c8
BS
5081else
5082 if test "$cross_compiling" = yes; then
18c04407
RW
5083 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5084echo "$as_me: error: in \`$ac_pwd':" >&2;}
5085{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
5086See \`config.log' for more details." >&5
5087echo "$as_me: error: cannot run test program while cross compiling
5088See \`config.log' for more details." >&2;}
18c04407 5089 { (exit 1); exit 1; }; }; }
8b1f719a
PB
5090else
5091 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5092/* confdefs.h. */
5093_ACEOF
5094cat confdefs.h >>conftest.$ac_ext
5095cat >>conftest.$ac_ext <<_ACEOF
5096/* end confdefs.h. */
5097$ac_includes_default
00020c16
ILT
5098long longval () { return (long) (sizeof (void *)); }
5099unsigned long ulongval () { return (long) (sizeof (void *)); }
bf3b7cd3
JD
5100#include <stdio.h>
5101#include <stdlib.h>
5102int
5103main ()
5104{
5105
5106 FILE *f = fopen ("conftest.val", "w");
5107 if (! f)
b61ff9c8 5108 exit (1);
00020c16 5109 if (((long) (sizeof (void *))) < 0)
bf3b7cd3 5110 {
b61ff9c8 5111 long i = longval ();
00020c16 5112 if (i != ((long) (sizeof (void *))))
b61ff9c8 5113 exit (1);
bf3b7cd3
JD
5114 fprintf (f, "%ld\n", i);
5115 }
5116 else
5117 {
b61ff9c8 5118 unsigned long i = ulongval ();
00020c16 5119 if (i != ((long) (sizeof (void *))))
b61ff9c8 5120 exit (1);
bf3b7cd3
JD
5121 fprintf (f, "%lu\n", i);
5122 }
b61ff9c8 5123 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5124
5125 ;
5126 return 0;
5127}
5128_ACEOF
5129rm -f conftest$ac_exeext
b61ff9c8
BS
5130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5131 (eval $ac_link) 2>&5
bf3b7cd3
JD
5132 ac_status=$?
5133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5134 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5136 (eval $ac_try) 2>&5
bf3b7cd3
JD
5137 ac_status=$?
5138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5139 (exit $ac_status); }; }; then
00020c16 5140 ac_cv_sizeof_void_p=`cat conftest.val`
bf3b7cd3
JD
5141else
5142 echo "$as_me: program exited with status $ac_status" >&5
5143echo "$as_me: failed program was:" >&5
5144sed 's/^/| /' conftest.$ac_ext >&5
5145
5146( exit $ac_status )
18c04407
RW
5147{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5148echo "$as_me: error: in \`$ac_pwd':" >&2;}
00020c16 5149{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 5150See \`config.log' for more details." >&5
00020c16 5151echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 5152See \`config.log' for more details." >&2;}
18c04407 5153 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
5154fi
5155rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5156fi
5157fi
5158rm -f conftest.val
b61ff9c8 5159else
00020c16 5160 ac_cv_sizeof_void_p=0
bf3b7cd3 5161fi
b61ff9c8 5162fi
00020c16
ILT
5163echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5164echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
bf3b7cd3 5165cat >>confdefs.h <<_ACEOF
00020c16 5166#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
bf3b7cd3
JD
5167_ACEOF
5168
5169
00020c16
ILT
5170echo "$as_me:$LINENO: checking for short" >&5
5171echo $ECHO_N "checking for short... $ECHO_C" >&6
5172if test "${ac_cv_type_short+set}" = set; then
bf3b7cd3
JD
5173 echo $ECHO_N "(cached) $ECHO_C" >&6
5174else
5175 cat >conftest.$ac_ext <<_ACEOF
5176/* confdefs.h. */
5177_ACEOF
5178cat confdefs.h >>conftest.$ac_ext
5179cat >>conftest.$ac_ext <<_ACEOF
5180/* end confdefs.h. */
5181$ac_includes_default
5182int
5183main ()
5184{
00020c16 5185if ((short *) 0)
bf3b7cd3 5186 return 0;
00020c16 5187if (sizeof (short))
bf3b7cd3
JD
5188 return 0;
5189 ;
5190 return 0;
5191}
5192_ACEOF
5193rm -f conftest.$ac_objext
b61ff9c8
BS
5194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5195 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5196 ac_status=$?
5197 grep -v '^ *+' conftest.er1 >conftest.err
5198 rm -f conftest.er1
5199 cat conftest.err >&5
5200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5201 (exit $ac_status); } &&
5202 { ac_try='test -z "$ac_c_werror_flag"
5203 || test ! -s conftest.err'
5204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5205 (eval $ac_try) 2>&5
5206 ac_status=$?
5207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5208 (exit $ac_status); }; } &&
5209 { ac_try='test -s conftest.$ac_objext'
5210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5211 (eval $ac_try) 2>&5
5212 ac_status=$?
5213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5214 (exit $ac_status); }; }; then
00020c16 5215 ac_cv_type_short=yes
bf3b7cd3
JD
5216else
5217 echo "$as_me: failed program was:" >&5
5218sed 's/^/| /' conftest.$ac_ext >&5
5219
00020c16 5220ac_cv_type_short=no
bf3b7cd3 5221fi
b61ff9c8 5222rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5223fi
00020c16
ILT
5224echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
5225echo "${ECHO_T}$ac_cv_type_short" >&6
bf3b7cd3 5226
00020c16
ILT
5227echo "$as_me:$LINENO: checking size of short" >&5
5228echo $ECHO_N "checking size of short... $ECHO_C" >&6
5229if test "${ac_cv_sizeof_short+set}" = set; then
bf3b7cd3
JD
5230 echo $ECHO_N "(cached) $ECHO_C" >&6
5231else
00020c16 5232 if test "$ac_cv_type_short" = yes; then
b61ff9c8
BS
5233 # The cast to unsigned long works around a bug in the HP C Compiler
5234 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5235 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5236 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5237 if test "$cross_compiling" = yes; then
5238 # Depending upon the size, compute the lo and hi bounds.
5239cat >conftest.$ac_ext <<_ACEOF
5240/* confdefs.h. */
5241_ACEOF
5242cat confdefs.h >>conftest.$ac_ext
5243cat >>conftest.$ac_ext <<_ACEOF
5244/* end confdefs.h. */
5245$ac_includes_default
5246int
5247main ()
5248{
00020c16 5249static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
bf3b7cd3
JD
5250test_array [0] = 0
5251
5252 ;
5253 return 0;
5254}
5255_ACEOF
5256rm -f conftest.$ac_objext
b61ff9c8
BS
5257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5258 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5259 ac_status=$?
5260 grep -v '^ *+' conftest.er1 >conftest.err
5261 rm -f conftest.er1
5262 cat conftest.err >&5
5263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5264 (exit $ac_status); } &&
5265 { ac_try='test -z "$ac_c_werror_flag"
5266 || test ! -s conftest.err'
5267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5268 (eval $ac_try) 2>&5
5269 ac_status=$?
5270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5271 (exit $ac_status); }; } &&
5272 { ac_try='test -s conftest.$ac_objext'
5273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5274 (eval $ac_try) 2>&5
5275 ac_status=$?
5276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277 (exit $ac_status); }; }; then
bf3b7cd3
JD
5278 ac_lo=0 ac_mid=0
5279 while :; do
5280 cat >conftest.$ac_ext <<_ACEOF
5281/* confdefs.h. */
5282_ACEOF
5283cat confdefs.h >>conftest.$ac_ext
5284cat >>conftest.$ac_ext <<_ACEOF
5285/* end confdefs.h. */
5286$ac_includes_default
5287int
5288main ()
5289{
00020c16 5290static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
5291test_array [0] = 0
5292
5293 ;
5294 return 0;
5295}
5296_ACEOF
5297rm -f conftest.$ac_objext
b61ff9c8
BS
5298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5299 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5300 ac_status=$?
5301 grep -v '^ *+' conftest.er1 >conftest.err
5302 rm -f conftest.er1
5303 cat conftest.err >&5
5304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5305 (exit $ac_status); } &&
5306 { ac_try='test -z "$ac_c_werror_flag"
5307 || test ! -s conftest.err'
5308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5309 (eval $ac_try) 2>&5
5310 ac_status=$?
5311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5312 (exit $ac_status); }; } &&
5313 { ac_try='test -s conftest.$ac_objext'
5314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5315 (eval $ac_try) 2>&5
5316 ac_status=$?
5317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5318 (exit $ac_status); }; }; then
bf3b7cd3
JD
5319 ac_hi=$ac_mid; break
5320else
5321 echo "$as_me: failed program was:" >&5
5322sed 's/^/| /' conftest.$ac_ext >&5
5323
b61ff9c8
BS
5324ac_lo=`expr $ac_mid + 1`
5325 if test $ac_lo -le $ac_mid; then
5326 ac_lo= ac_hi=
5327 break
5328 fi
5329 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 5330fi
b61ff9c8 5331rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5332 done
5333else
5334 echo "$as_me: failed program was:" >&5
5335sed 's/^/| /' conftest.$ac_ext >&5
5336
b61ff9c8 5337cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5338/* confdefs.h. */
5339_ACEOF
5340cat confdefs.h >>conftest.$ac_ext
5341cat >>conftest.$ac_ext <<_ACEOF
5342/* end confdefs.h. */
5343$ac_includes_default
5344int
5345main ()
5346{
00020c16 5347static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
bf3b7cd3
JD
5348test_array [0] = 0
5349
5350 ;
5351 return 0;
5352}
5353_ACEOF
5354rm -f conftest.$ac_objext
b61ff9c8
BS
5355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5356 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5357 ac_status=$?
5358 grep -v '^ *+' conftest.er1 >conftest.err
5359 rm -f conftest.er1
5360 cat conftest.err >&5
5361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5362 (exit $ac_status); } &&
5363 { ac_try='test -z "$ac_c_werror_flag"
5364 || test ! -s conftest.err'
5365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5366 (eval $ac_try) 2>&5
5367 ac_status=$?
5368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5369 (exit $ac_status); }; } &&
5370 { ac_try='test -s conftest.$ac_objext'
5371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5372 (eval $ac_try) 2>&5
5373 ac_status=$?
5374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5375 (exit $ac_status); }; }; then
bf3b7cd3
JD
5376 ac_hi=-1 ac_mid=-1
5377 while :; do
5378 cat >conftest.$ac_ext <<_ACEOF
5379/* confdefs.h. */
5380_ACEOF
5381cat confdefs.h >>conftest.$ac_ext
5382cat >>conftest.$ac_ext <<_ACEOF
5383/* end confdefs.h. */
5384$ac_includes_default
5385int
5386main ()
5387{
00020c16 5388static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
bf3b7cd3
JD
5389test_array [0] = 0
5390
5391 ;
5392 return 0;
5393}
5394_ACEOF
5395rm -f conftest.$ac_objext
b61ff9c8
BS
5396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5397 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5398 ac_status=$?
5399 grep -v '^ *+' conftest.er1 >conftest.err
5400 rm -f conftest.er1
5401 cat conftest.err >&5
5402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5403 (exit $ac_status); } &&
5404 { ac_try='test -z "$ac_c_werror_flag"
5405 || test ! -s conftest.err'
5406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5407 (eval $ac_try) 2>&5
5408 ac_status=$?
5409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5410 (exit $ac_status); }; } &&
5411 { ac_try='test -s conftest.$ac_objext'
5412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5413 (eval $ac_try) 2>&5
5414 ac_status=$?
5415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5416 (exit $ac_status); }; }; then
bf3b7cd3
JD
5417 ac_lo=$ac_mid; break
5418else
5419 echo "$as_me: failed program was:" >&5
5420sed 's/^/| /' conftest.$ac_ext >&5
5421
b61ff9c8
BS
5422ac_hi=`expr '(' $ac_mid ')' - 1`
5423 if test $ac_mid -le $ac_hi; then
5424 ac_lo= ac_hi=
5425 break
5426 fi
5427 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5428fi
b61ff9c8 5429rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5430 done
5431else
5432 echo "$as_me: failed program was:" >&5
5433sed 's/^/| /' conftest.$ac_ext >&5
5434
b61ff9c8 5435ac_lo= ac_hi=
bf3b7cd3 5436fi
b61ff9c8 5437rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5438fi
b61ff9c8 5439rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5440# Binary search between lo and hi bounds.
5441while test "x$ac_lo" != "x$ac_hi"; do
5442 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5443 cat >conftest.$ac_ext <<_ACEOF
5444/* confdefs.h. */
5445_ACEOF
5446cat confdefs.h >>conftest.$ac_ext
5447cat >>conftest.$ac_ext <<_ACEOF
5448/* end confdefs.h. */
5449$ac_includes_default
5450int
5451main ()
5452{
00020c16 5453static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
5454test_array [0] = 0
5455
5456 ;
5457 return 0;
5458}
5459_ACEOF
5460rm -f conftest.$ac_objext
b61ff9c8
BS
5461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5462 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5463 ac_status=$?
5464 grep -v '^ *+' conftest.er1 >conftest.err
5465 rm -f conftest.er1
5466 cat conftest.err >&5
5467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5468 (exit $ac_status); } &&
5469 { ac_try='test -z "$ac_c_werror_flag"
5470 || test ! -s conftest.err'
5471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5472 (eval $ac_try) 2>&5
5473 ac_status=$?
5474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5475 (exit $ac_status); }; } &&
5476 { ac_try='test -s conftest.$ac_objext'
5477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5478 (eval $ac_try) 2>&5
5479 ac_status=$?
5480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5481 (exit $ac_status); }; }; then
bf3b7cd3
JD
5482 ac_hi=$ac_mid
5483else
5484 echo "$as_me: failed program was:" >&5
5485sed 's/^/| /' conftest.$ac_ext >&5
5486
b61ff9c8 5487ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5488fi
b61ff9c8 5489rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5490done
5491case $ac_lo in
00020c16 5492?*) ac_cv_sizeof_short=$ac_lo;;
18c04407
RW
5493'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5494echo "$as_me: error: in \`$ac_pwd':" >&2;}
00020c16 5495{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 5496See \`config.log' for more details." >&5
00020c16 5497echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 5498See \`config.log' for more details." >&2;}
18c04407 5499 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 5500esac
b61ff9c8
BS
5501else
5502 if test "$cross_compiling" = yes; then
18c04407
RW
5503 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5504echo "$as_me: error: in \`$ac_pwd':" >&2;}
5505{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
5506See \`config.log' for more details." >&5
5507echo "$as_me: error: cannot run test program while cross compiling
5508See \`config.log' for more details." >&2;}
18c04407 5509 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
5510else
5511 cat >conftest.$ac_ext <<_ACEOF
5512/* confdefs.h. */
5513_ACEOF
5514cat confdefs.h >>conftest.$ac_ext
5515cat >>conftest.$ac_ext <<_ACEOF
5516/* end confdefs.h. */
5517$ac_includes_default
00020c16
ILT
5518long longval () { return (long) (sizeof (short)); }
5519unsigned long ulongval () { return (long) (sizeof (short)); }
bf3b7cd3
JD
5520#include <stdio.h>
5521#include <stdlib.h>
5522int
5523main ()
5524{
5525
5526 FILE *f = fopen ("conftest.val", "w");
5527 if (! f)
b61ff9c8 5528 exit (1);
00020c16 5529 if (((long) (sizeof (short))) < 0)
bf3b7cd3 5530 {
b61ff9c8 5531 long i = longval ();
00020c16 5532 if (i != ((long) (sizeof (short))))
b61ff9c8 5533 exit (1);
bf3b7cd3
JD
5534 fprintf (f, "%ld\n", i);
5535 }
5536 else
5537 {
b61ff9c8 5538 unsigned long i = ulongval ();
00020c16 5539 if (i != ((long) (sizeof (short))))
b61ff9c8 5540 exit (1);
bf3b7cd3
JD
5541 fprintf (f, "%lu\n", i);
5542 }
b61ff9c8 5543 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5544
5545 ;
5546 return 0;
5547}
5548_ACEOF
5549rm -f conftest$ac_exeext
b61ff9c8
BS
5550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5551 (eval $ac_link) 2>&5
bf3b7cd3
JD
5552 ac_status=$?
5553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5554 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5556 (eval $ac_try) 2>&5
bf3b7cd3
JD
5557 ac_status=$?
5558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5559 (exit $ac_status); }; }; then
00020c16 5560 ac_cv_sizeof_short=`cat conftest.val`
bf3b7cd3
JD
5561else
5562 echo "$as_me: program exited with status $ac_status" >&5
5563echo "$as_me: failed program was:" >&5
5564sed 's/^/| /' conftest.$ac_ext >&5
5565
5566( exit $ac_status )
18c04407
RW
5567{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5568echo "$as_me: error: in \`$ac_pwd':" >&2;}
00020c16 5569{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 5570See \`config.log' for more details." >&5
00020c16 5571echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 5572See \`config.log' for more details." >&2;}
18c04407 5573 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
5574fi
5575rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5576fi
5577fi
5578rm -f conftest.val
b61ff9c8 5579else
00020c16 5580 ac_cv_sizeof_short=0
bf3b7cd3 5581fi
b61ff9c8 5582fi
00020c16
ILT
5583echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
5584echo "${ECHO_T}$ac_cv_sizeof_short" >&6
bf3b7cd3 5585cat >>confdefs.h <<_ACEOF
00020c16 5586#define SIZEOF_SHORT $ac_cv_sizeof_short
bf3b7cd3
JD
5587_ACEOF
5588
5589
00020c16
ILT
5590echo "$as_me:$LINENO: checking for int" >&5
5591echo $ECHO_N "checking for int... $ECHO_C" >&6
5592if test "${ac_cv_type_int+set}" = set; then
bf3b7cd3
JD
5593 echo $ECHO_N "(cached) $ECHO_C" >&6
5594else
5595 cat >conftest.$ac_ext <<_ACEOF
5596/* confdefs.h. */
5597_ACEOF
5598cat confdefs.h >>conftest.$ac_ext
5599cat >>conftest.$ac_ext <<_ACEOF
5600/* end confdefs.h. */
5601$ac_includes_default
5602int
5603main ()
5604{
00020c16 5605if ((int *) 0)
bf3b7cd3 5606 return 0;
00020c16 5607if (sizeof (int))
bf3b7cd3
JD
5608 return 0;
5609 ;
5610 return 0;
5611}
5612_ACEOF
5613rm -f conftest.$ac_objext
b61ff9c8
BS
5614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5615 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5616 ac_status=$?
5617 grep -v '^ *+' conftest.er1 >conftest.err
5618 rm -f conftest.er1
5619 cat conftest.err >&5
5620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5621 (exit $ac_status); } &&
5622 { ac_try='test -z "$ac_c_werror_flag"
5623 || test ! -s conftest.err'
5624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5625 (eval $ac_try) 2>&5
5626 ac_status=$?
5627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5628 (exit $ac_status); }; } &&
5629 { ac_try='test -s conftest.$ac_objext'
5630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5631 (eval $ac_try) 2>&5
5632 ac_status=$?
5633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5634 (exit $ac_status); }; }; then
00020c16 5635 ac_cv_type_int=yes
bf3b7cd3
JD
5636else
5637 echo "$as_me: failed program was:" >&5
5638sed 's/^/| /' conftest.$ac_ext >&5
5639
00020c16 5640ac_cv_type_int=no
bf3b7cd3 5641fi
b61ff9c8 5642rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5643fi
00020c16
ILT
5644echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5645echo "${ECHO_T}$ac_cv_type_int" >&6
bf3b7cd3 5646
00020c16
ILT
5647echo "$as_me:$LINENO: checking size of int" >&5
5648echo $ECHO_N "checking size of int... $ECHO_C" >&6
5649if test "${ac_cv_sizeof_int+set}" = set; then
bf3b7cd3
JD
5650 echo $ECHO_N "(cached) $ECHO_C" >&6
5651else
00020c16 5652 if test "$ac_cv_type_int" = yes; then
b61ff9c8
BS
5653 # The cast to unsigned long works around a bug in the HP C Compiler
5654 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5655 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5656 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5657 if test "$cross_compiling" = yes; then
5658 # Depending upon the size, compute the lo and hi bounds.
5659cat >conftest.$ac_ext <<_ACEOF
5660/* confdefs.h. */
5661_ACEOF
5662cat confdefs.h >>conftest.$ac_ext
5663cat >>conftest.$ac_ext <<_ACEOF
5664/* end confdefs.h. */
5665$ac_includes_default
5666int
5667main ()
5668{
00020c16 5669static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
bf3b7cd3
JD
5670test_array [0] = 0
5671
5672 ;
5673 return 0;
5674}
5675_ACEOF
5676rm -f conftest.$ac_objext
b61ff9c8
BS
5677if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5678 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5679 ac_status=$?
5680 grep -v '^ *+' conftest.er1 >conftest.err
5681 rm -f conftest.er1
5682 cat conftest.err >&5
5683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5684 (exit $ac_status); } &&
5685 { ac_try='test -z "$ac_c_werror_flag"
5686 || test ! -s conftest.err'
5687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5688 (eval $ac_try) 2>&5
5689 ac_status=$?
5690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5691 (exit $ac_status); }; } &&
5692 { ac_try='test -s conftest.$ac_objext'
5693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5694 (eval $ac_try) 2>&5
5695 ac_status=$?
5696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5697 (exit $ac_status); }; }; then
bf3b7cd3
JD
5698 ac_lo=0 ac_mid=0
5699 while :; do
5700 cat >conftest.$ac_ext <<_ACEOF
5701/* confdefs.h. */
5702_ACEOF
5703cat confdefs.h >>conftest.$ac_ext
5704cat >>conftest.$ac_ext <<_ACEOF
5705/* end confdefs.h. */
5706$ac_includes_default
5707int
5708main ()
5709{
00020c16 5710static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
5711test_array [0] = 0
5712
5713 ;
5714 return 0;
5715}
5716_ACEOF
5717rm -f conftest.$ac_objext
b61ff9c8
BS
5718if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5719 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5720 ac_status=$?
5721 grep -v '^ *+' conftest.er1 >conftest.err
5722 rm -f conftest.er1
5723 cat conftest.err >&5
5724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5725 (exit $ac_status); } &&
5726 { ac_try='test -z "$ac_c_werror_flag"
5727 || test ! -s conftest.err'
5728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5729 (eval $ac_try) 2>&5
5730 ac_status=$?
5731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); }; } &&
5733 { ac_try='test -s conftest.$ac_objext'
5734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5735 (eval $ac_try) 2>&5
5736 ac_status=$?
5737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5738 (exit $ac_status); }; }; then
bf3b7cd3
JD
5739 ac_hi=$ac_mid; break
5740else
5741 echo "$as_me: failed program was:" >&5
5742sed 's/^/| /' conftest.$ac_ext >&5
5743
b61ff9c8
BS
5744ac_lo=`expr $ac_mid + 1`
5745 if test $ac_lo -le $ac_mid; then
5746 ac_lo= ac_hi=
5747 break
5748 fi
5749 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 5750fi
b61ff9c8 5751rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5752 done
5753else
5754 echo "$as_me: failed program was:" >&5
5755sed 's/^/| /' conftest.$ac_ext >&5
5756
b61ff9c8 5757cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5758/* confdefs.h. */
5759_ACEOF
5760cat confdefs.h >>conftest.$ac_ext
5761cat >>conftest.$ac_ext <<_ACEOF
5762/* end confdefs.h. */
5763$ac_includes_default
5764int
5765main ()
5766{
00020c16 5767static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
bf3b7cd3
JD
5768test_array [0] = 0
5769
5770 ;
5771 return 0;
5772}
5773_ACEOF
5774rm -f conftest.$ac_objext
b61ff9c8
BS
5775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5776 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5777 ac_status=$?
5778 grep -v '^ *+' conftest.er1 >conftest.err
5779 rm -f conftest.er1
5780 cat conftest.err >&5
5781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5782 (exit $ac_status); } &&
5783 { ac_try='test -z "$ac_c_werror_flag"
5784 || test ! -s conftest.err'
5785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5786 (eval $ac_try) 2>&5
5787 ac_status=$?
5788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5789 (exit $ac_status); }; } &&
5790 { ac_try='test -s conftest.$ac_objext'
5791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5792 (eval $ac_try) 2>&5
5793 ac_status=$?
5794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5795 (exit $ac_status); }; }; then
bf3b7cd3
JD
5796 ac_hi=-1 ac_mid=-1
5797 while :; do
5798 cat >conftest.$ac_ext <<_ACEOF
5799/* confdefs.h. */
5800_ACEOF
5801cat confdefs.h >>conftest.$ac_ext
5802cat >>conftest.$ac_ext <<_ACEOF
5803/* end confdefs.h. */
5804$ac_includes_default
5805int
5806main ()
5807{
00020c16 5808static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
bf3b7cd3
JD
5809test_array [0] = 0
5810
5811 ;
5812 return 0;
5813}
5814_ACEOF
5815rm -f conftest.$ac_objext
b61ff9c8
BS
5816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5817 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5818 ac_status=$?
5819 grep -v '^ *+' conftest.er1 >conftest.err
5820 rm -f conftest.er1
5821 cat conftest.err >&5
5822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5823 (exit $ac_status); } &&
5824 { ac_try='test -z "$ac_c_werror_flag"
5825 || test ! -s conftest.err'
5826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5827 (eval $ac_try) 2>&5
5828 ac_status=$?
5829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5830 (exit $ac_status); }; } &&
5831 { ac_try='test -s conftest.$ac_objext'
5832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5833 (eval $ac_try) 2>&5
5834 ac_status=$?
5835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5836 (exit $ac_status); }; }; then
bf3b7cd3
JD
5837 ac_lo=$ac_mid; break
5838else
5839 echo "$as_me: failed program was:" >&5
5840sed 's/^/| /' conftest.$ac_ext >&5
5841
b61ff9c8
BS
5842ac_hi=`expr '(' $ac_mid ')' - 1`
5843 if test $ac_mid -le $ac_hi; then
5844 ac_lo= ac_hi=
5845 break
5846 fi
5847 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5848fi
b61ff9c8 5849rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5850 done
5851else
5852 echo "$as_me: failed program was:" >&5
5853sed 's/^/| /' conftest.$ac_ext >&5
5854
b61ff9c8 5855ac_lo= ac_hi=
bf3b7cd3 5856fi
b61ff9c8 5857rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5858fi
b61ff9c8 5859rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5860# Binary search between lo and hi bounds.
5861while test "x$ac_lo" != "x$ac_hi"; do
5862 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5863 cat >conftest.$ac_ext <<_ACEOF
5864/* confdefs.h. */
5865_ACEOF
5866cat confdefs.h >>conftest.$ac_ext
5867cat >>conftest.$ac_ext <<_ACEOF
5868/* end confdefs.h. */
5869$ac_includes_default
5870int
5871main ()
5872{
00020c16 5873static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
5874test_array [0] = 0
5875
5876 ;
5877 return 0;
5878}
5879_ACEOF
5880rm -f conftest.$ac_objext
b61ff9c8
BS
5881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5882 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5883 ac_status=$?
5884 grep -v '^ *+' conftest.er1 >conftest.err
5885 rm -f conftest.er1
5886 cat conftest.err >&5
5887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5888 (exit $ac_status); } &&
5889 { ac_try='test -z "$ac_c_werror_flag"
5890 || test ! -s conftest.err'
5891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5892 (eval $ac_try) 2>&5
5893 ac_status=$?
5894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5895 (exit $ac_status); }; } &&
5896 { ac_try='test -s conftest.$ac_objext'
5897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5898 (eval $ac_try) 2>&5
5899 ac_status=$?
5900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5901 (exit $ac_status); }; }; then
bf3b7cd3
JD
5902 ac_hi=$ac_mid
5903else
5904 echo "$as_me: failed program was:" >&5
5905sed 's/^/| /' conftest.$ac_ext >&5
5906
b61ff9c8 5907ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5908fi
b61ff9c8 5909rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5910done
5911case $ac_lo in
00020c16 5912?*) ac_cv_sizeof_int=$ac_lo;;
18c04407
RW
5913'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5914echo "$as_me: error: in \`$ac_pwd':" >&2;}
00020c16 5915{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 5916See \`config.log' for more details." >&5
00020c16 5917echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 5918See \`config.log' for more details." >&2;}
18c04407 5919 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 5920esac
b61ff9c8
BS
5921else
5922 if test "$cross_compiling" = yes; then
18c04407
RW
5923 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5924echo "$as_me: error: in \`$ac_pwd':" >&2;}
5925{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
5926See \`config.log' for more details." >&5
5927echo "$as_me: error: cannot run test program while cross compiling
5928See \`config.log' for more details." >&2;}
18c04407 5929 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
5930else
5931 cat >conftest.$ac_ext <<_ACEOF
5932/* confdefs.h. */
5933_ACEOF
5934cat confdefs.h >>conftest.$ac_ext
5935cat >>conftest.$ac_ext <<_ACEOF
5936/* end confdefs.h. */
5937$ac_includes_default
00020c16
ILT
5938long longval () { return (long) (sizeof (int)); }
5939unsigned long ulongval () { return (long) (sizeof (int)); }
bf3b7cd3
JD
5940#include <stdio.h>
5941#include <stdlib.h>
5942int
5943main ()
5944{
5945
5946 FILE *f = fopen ("conftest.val", "w");
5947 if (! f)
b61ff9c8 5948 exit (1);
00020c16 5949 if (((long) (sizeof (int))) < 0)
bf3b7cd3 5950 {
b61ff9c8 5951 long i = longval ();
00020c16 5952 if (i != ((long) (sizeof (int))))
b61ff9c8 5953 exit (1);
bf3b7cd3
JD
5954 fprintf (f, "%ld\n", i);
5955 }
5956 else
5957 {
b61ff9c8 5958 unsigned long i = ulongval ();
00020c16 5959 if (i != ((long) (sizeof (int))))
b61ff9c8 5960 exit (1);
bf3b7cd3
JD
5961 fprintf (f, "%lu\n", i);
5962 }
b61ff9c8 5963 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5964
5965 ;
5966 return 0;
5967}
5968_ACEOF
5969rm -f conftest$ac_exeext
b61ff9c8
BS
5970if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5971 (eval $ac_link) 2>&5
bf3b7cd3
JD
5972 ac_status=$?
5973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5974 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5976 (eval $ac_try) 2>&5
bf3b7cd3
JD
5977 ac_status=$?
5978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5979 (exit $ac_status); }; }; then
00020c16 5980 ac_cv_sizeof_int=`cat conftest.val`
bf3b7cd3
JD
5981else
5982 echo "$as_me: program exited with status $ac_status" >&5
5983echo "$as_me: failed program was:" >&5
5984sed 's/^/| /' conftest.$ac_ext >&5
5985
5986( exit $ac_status )
18c04407
RW
5987{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5988echo "$as_me: error: in \`$ac_pwd':" >&2;}
00020c16 5989{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 5990See \`config.log' for more details." >&5
00020c16 5991echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 5992See \`config.log' for more details." >&2;}
18c04407 5993 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
5994fi
5995rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5996fi
5997fi
5998rm -f conftest.val
b61ff9c8 5999else
00020c16 6000 ac_cv_sizeof_int=0
bf3b7cd3 6001fi
b61ff9c8 6002fi
00020c16
ILT
6003echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6004echo "${ECHO_T}$ac_cv_sizeof_int" >&6
bf3b7cd3 6005cat >>confdefs.h <<_ACEOF
00020c16 6006#define SIZEOF_INT $ac_cv_sizeof_int
bf3b7cd3
JD
6007_ACEOF
6008
6009
00020c16
ILT
6010echo "$as_me:$LINENO: checking for long" >&5
6011echo $ECHO_N "checking for long... $ECHO_C" >&6
6012if test "${ac_cv_type_long+set}" = set; then
bf3b7cd3
JD
6013 echo $ECHO_N "(cached) $ECHO_C" >&6
6014else
6015 cat >conftest.$ac_ext <<_ACEOF
6016/* confdefs.h. */
6017_ACEOF
6018cat confdefs.h >>conftest.$ac_ext
6019cat >>conftest.$ac_ext <<_ACEOF
6020/* end confdefs.h. */
6021$ac_includes_default
6022int
6023main ()
6024{
00020c16 6025if ((long *) 0)
bf3b7cd3 6026 return 0;
00020c16 6027if (sizeof (long))
bf3b7cd3
JD
6028 return 0;
6029 ;
6030 return 0;
6031}
6032_ACEOF
6033rm -f conftest.$ac_objext
b61ff9c8
BS
6034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6035 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6036 ac_status=$?
6037 grep -v '^ *+' conftest.er1 >conftest.err
6038 rm -f conftest.er1
6039 cat conftest.err >&5
6040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6041 (exit $ac_status); } &&
6042 { ac_try='test -z "$ac_c_werror_flag"
6043 || test ! -s conftest.err'
6044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6045 (eval $ac_try) 2>&5
6046 ac_status=$?
6047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6048 (exit $ac_status); }; } &&
6049 { ac_try='test -s conftest.$ac_objext'
6050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6051 (eval $ac_try) 2>&5
6052 ac_status=$?
6053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6054 (exit $ac_status); }; }; then
00020c16 6055 ac_cv_type_long=yes
b61ff9c8 6056else
bf3b7cd3
JD
6057 echo "$as_me: failed program was:" >&5
6058sed 's/^/| /' conftest.$ac_ext >&5
6059
00020c16 6060ac_cv_type_long=no
bf3b7cd3 6061fi
b61ff9c8 6062rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6063fi
00020c16
ILT
6064echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6065echo "${ECHO_T}$ac_cv_type_long" >&6
bf3b7cd3 6066
00020c16
ILT
6067echo "$as_me:$LINENO: checking size of long" >&5
6068echo $ECHO_N "checking size of long... $ECHO_C" >&6
6069if test "${ac_cv_sizeof_long+set}" = set; then
bf3b7cd3
JD
6070 echo $ECHO_N "(cached) $ECHO_C" >&6
6071else
00020c16 6072 if test "$ac_cv_type_long" = yes; then
b61ff9c8
BS
6073 # The cast to unsigned long works around a bug in the HP C Compiler
6074 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6075 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6076 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
6077 if test "$cross_compiling" = yes; then
6078 # Depending upon the size, compute the lo and hi bounds.
6079cat >conftest.$ac_ext <<_ACEOF
6080/* confdefs.h. */
6081_ACEOF
6082cat confdefs.h >>conftest.$ac_ext
6083cat >>conftest.$ac_ext <<_ACEOF
6084/* end confdefs.h. */
6085$ac_includes_default
6086int
6087main ()
6088{
00020c16 6089static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
bf3b7cd3
JD
6090test_array [0] = 0
6091
6092 ;
6093 return 0;
6094}
6095_ACEOF
6096rm -f conftest.$ac_objext
b61ff9c8
BS
6097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6098 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6099 ac_status=$?
6100 grep -v '^ *+' conftest.er1 >conftest.err
6101 rm -f conftest.er1
6102 cat conftest.err >&5
6103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6104 (exit $ac_status); } &&
6105 { ac_try='test -z "$ac_c_werror_flag"
6106 || test ! -s conftest.err'
6107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6108 (eval $ac_try) 2>&5
6109 ac_status=$?
6110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6111 (exit $ac_status); }; } &&
6112 { ac_try='test -s conftest.$ac_objext'
6113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6114 (eval $ac_try) 2>&5
6115 ac_status=$?
6116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6117 (exit $ac_status); }; }; then
bf3b7cd3
JD
6118 ac_lo=0 ac_mid=0
6119 while :; do
6120 cat >conftest.$ac_ext <<_ACEOF
6121/* confdefs.h. */
6122_ACEOF
6123cat confdefs.h >>conftest.$ac_ext
6124cat >>conftest.$ac_ext <<_ACEOF
6125/* end confdefs.h. */
6126$ac_includes_default
6127int
6128main ()
6129{
00020c16 6130static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
6131test_array [0] = 0
6132
6133 ;
6134 return 0;
6135}
6136_ACEOF
6137rm -f conftest.$ac_objext
b61ff9c8
BS
6138if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6139 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6140 ac_status=$?
6141 grep -v '^ *+' conftest.er1 >conftest.err
6142 rm -f conftest.er1
6143 cat conftest.err >&5
6144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6145 (exit $ac_status); } &&
6146 { ac_try='test -z "$ac_c_werror_flag"
6147 || test ! -s conftest.err'
6148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6149 (eval $ac_try) 2>&5
6150 ac_status=$?
6151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6152 (exit $ac_status); }; } &&
6153 { ac_try='test -s conftest.$ac_objext'
6154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6155 (eval $ac_try) 2>&5
6156 ac_status=$?
6157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6158 (exit $ac_status); }; }; then
8b1f719a 6159 ac_hi=$ac_mid; break
bf3b7cd3
JD
6160else
6161 echo "$as_me: failed program was:" >&5
6162sed 's/^/| /' conftest.$ac_ext >&5
6163
b61ff9c8
BS
6164ac_lo=`expr $ac_mid + 1`
6165 if test $ac_lo -le $ac_mid; then
6166 ac_lo= ac_hi=
6167 break
6168 fi
6169 ac_mid=`expr 2 '*' $ac_mid + 1`
8b1f719a 6170fi
b61ff9c8 6171rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8b1f719a
PB
6172 done
6173else
6174 echo "$as_me: failed program was:" >&5
6175sed 's/^/| /' conftest.$ac_ext >&5
6176
b61ff9c8 6177cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
6178/* confdefs.h. */
6179_ACEOF
6180cat confdefs.h >>conftest.$ac_ext
6181cat >>conftest.$ac_ext <<_ACEOF
6182/* end confdefs.h. */
6183$ac_includes_default
6184int
6185main ()
6186{
00020c16 6187static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
bf3b7cd3
JD
6188test_array [0] = 0
6189
6190 ;
6191 return 0;
6192}
6193_ACEOF
6194rm -f conftest.$ac_objext
b61ff9c8
BS
6195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6196 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6197 ac_status=$?
6198 grep -v '^ *+' conftest.er1 >conftest.err
6199 rm -f conftest.er1
6200 cat conftest.err >&5
6201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6202 (exit $ac_status); } &&
6203 { ac_try='test -z "$ac_c_werror_flag"
6204 || test ! -s conftest.err'
6205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6206 (eval $ac_try) 2>&5
6207 ac_status=$?
6208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6209 (exit $ac_status); }; } &&
6210 { ac_try='test -s conftest.$ac_objext'
6211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6212 (eval $ac_try) 2>&5
6213 ac_status=$?
6214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6215 (exit $ac_status); }; }; then
bf3b7cd3
JD
6216 ac_hi=-1 ac_mid=-1
6217 while :; do
6218 cat >conftest.$ac_ext <<_ACEOF
6219/* confdefs.h. */
6220_ACEOF
6221cat confdefs.h >>conftest.$ac_ext
6222cat >>conftest.$ac_ext <<_ACEOF
6223/* end confdefs.h. */
6224$ac_includes_default
6225int
6226main ()
6227{
00020c16 6228static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
bf3b7cd3
JD
6229test_array [0] = 0
6230
6231 ;
6232 return 0;
6233}
6234_ACEOF
6235rm -f conftest.$ac_objext
b61ff9c8
BS
6236if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6237 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6238 ac_status=$?
6239 grep -v '^ *+' conftest.er1 >conftest.err
6240 rm -f conftest.er1
6241 cat conftest.err >&5
6242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6243 (exit $ac_status); } &&
6244 { ac_try='test -z "$ac_c_werror_flag"
6245 || test ! -s conftest.err'
6246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6247 (eval $ac_try) 2>&5
6248 ac_status=$?
6249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6250 (exit $ac_status); }; } &&
6251 { ac_try='test -s conftest.$ac_objext'
6252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6253 (eval $ac_try) 2>&5
6254 ac_status=$?
6255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6256 (exit $ac_status); }; }; then
bf3b7cd3
JD
6257 ac_lo=$ac_mid; break
6258else
6259 echo "$as_me: failed program was:" >&5
6260sed 's/^/| /' conftest.$ac_ext >&5
6261
b61ff9c8
BS
6262ac_hi=`expr '(' $ac_mid ')' - 1`
6263 if test $ac_mid -le $ac_hi; then
6264 ac_lo= ac_hi=
6265 break
6266 fi
6267 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 6268fi
b61ff9c8 6269rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6270 done
6271else
6272 echo "$as_me: failed program was:" >&5
6273sed 's/^/| /' conftest.$ac_ext >&5
6274
b61ff9c8 6275ac_lo= ac_hi=
bf3b7cd3 6276fi
b61ff9c8 6277rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6278fi
b61ff9c8 6279rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6280# Binary search between lo and hi bounds.
6281while test "x$ac_lo" != "x$ac_hi"; do
6282 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6283 cat >conftest.$ac_ext <<_ACEOF
6284/* confdefs.h. */
6285_ACEOF
6286cat confdefs.h >>conftest.$ac_ext
6287cat >>conftest.$ac_ext <<_ACEOF
6288/* end confdefs.h. */
6289$ac_includes_default
6290int
6291main ()
6292{
00020c16 6293static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
6294test_array [0] = 0
6295
6296 ;
6297 return 0;
6298}
6299_ACEOF
6300rm -f conftest.$ac_objext
b61ff9c8
BS
6301if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6302 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6303 ac_status=$?
6304 grep -v '^ *+' conftest.er1 >conftest.err
6305 rm -f conftest.er1
6306 cat conftest.err >&5
6307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6308 (exit $ac_status); } &&
6309 { ac_try='test -z "$ac_c_werror_flag"
6310 || test ! -s conftest.err'
6311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6312 (eval $ac_try) 2>&5
6313 ac_status=$?
6314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6315 (exit $ac_status); }; } &&
6316 { ac_try='test -s conftest.$ac_objext'
6317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6318 (eval $ac_try) 2>&5
6319 ac_status=$?
6320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6321 (exit $ac_status); }; }; then
bf3b7cd3
JD
6322 ac_hi=$ac_mid
6323else
6324 echo "$as_me: failed program was:" >&5
6325sed 's/^/| /' conftest.$ac_ext >&5
6326
b61ff9c8 6327ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 6328fi
b61ff9c8 6329rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6330done
6331case $ac_lo in
00020c16 6332?*) ac_cv_sizeof_long=$ac_lo;;
18c04407
RW
6333'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6334echo "$as_me: error: in \`$ac_pwd':" >&2;}
00020c16 6335{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 6336See \`config.log' for more details." >&5
00020c16 6337echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 6338See \`config.log' for more details." >&2;}
18c04407 6339 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 6340esac
b61ff9c8
BS
6341else
6342 if test "$cross_compiling" = yes; then
18c04407
RW
6343 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6344echo "$as_me: error: in \`$ac_pwd':" >&2;}
6345{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
6346See \`config.log' for more details." >&5
6347echo "$as_me: error: cannot run test program while cross compiling
6348See \`config.log' for more details." >&2;}
18c04407 6349 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
6350else
6351 cat >conftest.$ac_ext <<_ACEOF
6352/* confdefs.h. */
6353_ACEOF
6354cat confdefs.h >>conftest.$ac_ext
6355cat >>conftest.$ac_ext <<_ACEOF
6356/* end confdefs.h. */
6357$ac_includes_default
00020c16
ILT
6358long longval () { return (long) (sizeof (long)); }
6359unsigned long ulongval () { return (long) (sizeof (long)); }
bf3b7cd3
JD
6360#include <stdio.h>
6361#include <stdlib.h>
6362int
6363main ()
6364{
6365
6366 FILE *f = fopen ("conftest.val", "w");
6367 if (! f)
b61ff9c8 6368 exit (1);
00020c16 6369 if (((long) (sizeof (long))) < 0)
bf3b7cd3 6370 {
b61ff9c8 6371 long i = longval ();
00020c16 6372 if (i != ((long) (sizeof (long))))
b61ff9c8 6373 exit (1);
bf3b7cd3
JD
6374 fprintf (f, "%ld\n", i);
6375 }
6376 else
6377 {
b61ff9c8 6378 unsigned long i = ulongval ();
00020c16 6379 if (i != ((long) (sizeof (long))))
b61ff9c8 6380 exit (1);
bf3b7cd3
JD
6381 fprintf (f, "%lu\n", i);
6382 }
b61ff9c8 6383 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6384
6385 ;
6386 return 0;
6387}
6388_ACEOF
6389rm -f conftest$ac_exeext
b61ff9c8
BS
6390if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6391 (eval $ac_link) 2>&5
bf3b7cd3
JD
6392 ac_status=$?
6393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6394 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
6395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6396 (eval $ac_try) 2>&5
bf3b7cd3
JD
6397 ac_status=$?
6398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6399 (exit $ac_status); }; }; then
00020c16 6400 ac_cv_sizeof_long=`cat conftest.val`
bf3b7cd3
JD
6401else
6402 echo "$as_me: program exited with status $ac_status" >&5
6403echo "$as_me: failed program was:" >&5
6404sed 's/^/| /' conftest.$ac_ext >&5
6405
6406( exit $ac_status )
18c04407
RW
6407{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6408echo "$as_me: error: in \`$ac_pwd':" >&2;}
00020c16 6409{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 6410See \`config.log' for more details." >&5
00020c16 6411echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 6412See \`config.log' for more details." >&2;}
18c04407 6413 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
6414fi
6415rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6416fi
6417fi
6418rm -f conftest.val
b61ff9c8 6419else
00020c16 6420 ac_cv_sizeof_long=0
2f41c1d6 6421fi
b61ff9c8 6422fi
00020c16
ILT
6423echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6424echo "${ECHO_T}$ac_cv_sizeof_long" >&6
bf3b7cd3 6425cat >>confdefs.h <<_ACEOF
00020c16 6426#define SIZEOF_LONG $ac_cv_sizeof_long
bf3b7cd3
JD
6427_ACEOF
6428
6429
00020c16
ILT
6430echo "$as_me:$LINENO: checking for long long" >&5
6431echo $ECHO_N "checking for long long... $ECHO_C" >&6
6432if test "${ac_cv_type_long_long+set}" = set; then
5ec1c5e6
KC
6433 echo $ECHO_N "(cached) $ECHO_C" >&6
6434else
6435 cat >conftest.$ac_ext <<_ACEOF
6436/* confdefs.h. */
6437_ACEOF
6438cat confdefs.h >>conftest.$ac_ext
6439cat >>conftest.$ac_ext <<_ACEOF
6440/* end confdefs.h. */
6441$ac_includes_default
6442int
6443main ()
6444{
00020c16 6445if ((long long *) 0)
5ec1c5e6 6446 return 0;
00020c16 6447if (sizeof (long long))
5ec1c5e6
KC
6448 return 0;
6449 ;
6450 return 0;
6451}
6452_ACEOF
6453rm -f conftest.$ac_objext
b61ff9c8
BS
6454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6455 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
6456 ac_status=$?
6457 grep -v '^ *+' conftest.er1 >conftest.err
6458 rm -f conftest.er1
6459 cat conftest.err >&5
6460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6461 (exit $ac_status); } &&
6462 { ac_try='test -z "$ac_c_werror_flag"
6463 || test ! -s conftest.err'
6464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6465 (eval $ac_try) 2>&5
6466 ac_status=$?
6467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6468 (exit $ac_status); }; } &&
6469 { ac_try='test -s conftest.$ac_objext'
6470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6471 (eval $ac_try) 2>&5
6472 ac_status=$?
6473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6474 (exit $ac_status); }; }; then
00020c16 6475 ac_cv_type_long_long=yes
5ec1c5e6
KC
6476else
6477 echo "$as_me: failed program was:" >&5
6478sed 's/^/| /' conftest.$ac_ext >&5
6479
00020c16 6480ac_cv_type_long_long=no
5ec1c5e6 6481fi
b61ff9c8 6482rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 6483fi
00020c16
ILT
6484echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
6485echo "${ECHO_T}$ac_cv_type_long_long" >&6
6486if test $ac_cv_type_long_long = yes; then
5ec1c5e6
KC
6487
6488cat >>confdefs.h <<_ACEOF
00020c16 6489#define HAVE_LONG_LONG 1
5ec1c5e6
KC
6490_ACEOF
6491
00020c16
ILT
6492echo "$as_me:$LINENO: checking for long long" >&5
6493echo $ECHO_N "checking for long long... $ECHO_C" >&6
6494if test "${ac_cv_type_long_long+set}" = set; then
bf3b7cd3
JD
6495 echo $ECHO_N "(cached) $ECHO_C" >&6
6496else
ba479fd2 6497 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6498/* confdefs.h. */
6499_ACEOF
6500cat confdefs.h >>conftest.$ac_ext
6501cat >>conftest.$ac_ext <<_ACEOF
6502/* end confdefs.h. */
bf3b7cd3 6503$ac_includes_default
ba479fd2
NN
6504int
6505main ()
6506{
00020c16 6507if ((long long *) 0)
bf3b7cd3 6508 return 0;
00020c16 6509if (sizeof (long long))
bf3b7cd3 6510 return 0;
ba479fd2
NN
6511 ;
6512 return 0;
6513}
6514_ACEOF
6515rm -f conftest.$ac_objext
b61ff9c8
BS
6516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6517 (eval $ac_compile) 2>conftest.er1
ba479fd2 6518 ac_status=$?
86da66b5
HPN
6519 grep -v '^ *+' conftest.er1 >conftest.err
6520 rm -f conftest.er1
6521 cat conftest.err >&5
ba479fd2 6522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6523 (exit $ac_status); } &&
6524 { ac_try='test -z "$ac_c_werror_flag"
6525 || test ! -s conftest.err'
6526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6527 (eval $ac_try) 2>&5
6528 ac_status=$?
6529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6530 (exit $ac_status); }; } &&
6531 { ac_try='test -s conftest.$ac_objext'
6532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6533 (eval $ac_try) 2>&5
6534 ac_status=$?
6535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6536 (exit $ac_status); }; }; then
00020c16 6537 ac_cv_type_long_long=yes
75b6f3fd 6538else
ba479fd2
NN
6539 echo "$as_me: failed program was:" >&5
6540sed 's/^/| /' conftest.$ac_ext >&5
6541
00020c16 6542ac_cv_type_long_long=no
75b6f3fd 6543fi
b61ff9c8 6544rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 6545fi
00020c16
ILT
6546echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
6547echo "${ECHO_T}$ac_cv_type_long_long" >&6
75b6f3fd 6548
00020c16
ILT
6549echo "$as_me:$LINENO: checking size of long long" >&5
6550echo $ECHO_N "checking size of long long... $ECHO_C" >&6
6551if test "${ac_cv_sizeof_long_long+set}" = set; then
ba479fd2 6552 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 6553else
00020c16 6554 if test "$ac_cv_type_long_long" = yes; then
b61ff9c8
BS
6555 # The cast to unsigned long works around a bug in the HP C Compiler
6556 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6557 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6558 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
6559 if test "$cross_compiling" = yes; then
6560 # Depending upon the size, compute the lo and hi bounds.
6561cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6562/* confdefs.h. */
6563_ACEOF
6564cat confdefs.h >>conftest.$ac_ext
6565cat >>conftest.$ac_ext <<_ACEOF
6566/* end confdefs.h. */
bf3b7cd3 6567$ac_includes_default
ba479fd2
NN
6568int
6569main ()
6570{
00020c16 6571static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
bf3b7cd3
JD
6572test_array [0] = 0
6573
ba479fd2
NN
6574 ;
6575 return 0;
6576}
6577_ACEOF
6578rm -f conftest.$ac_objext
b61ff9c8
BS
6579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6580 (eval $ac_compile) 2>conftest.er1
ba479fd2 6581 ac_status=$?
86da66b5
HPN
6582 grep -v '^ *+' conftest.er1 >conftest.err
6583 rm -f conftest.er1
6584 cat conftest.err >&5
ba479fd2 6585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6586 (exit $ac_status); } &&
6587 { ac_try='test -z "$ac_c_werror_flag"
6588 || test ! -s conftest.err'
6589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6590 (eval $ac_try) 2>&5
6591 ac_status=$?
6592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6593 (exit $ac_status); }; } &&
6594 { ac_try='test -s conftest.$ac_objext'
6595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6596 (eval $ac_try) 2>&5
6597 ac_status=$?
6598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6599 (exit $ac_status); }; }; then
bf3b7cd3
JD
6600 ac_lo=0 ac_mid=0
6601 while :; do
6602 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6603/* confdefs.h. */
6604_ACEOF
6605cat confdefs.h >>conftest.$ac_ext
6606cat >>conftest.$ac_ext <<_ACEOF
6607/* end confdefs.h. */
bf3b7cd3 6608$ac_includes_default
ba479fd2
NN
6609int
6610main ()
6611{
00020c16 6612static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
6613test_array [0] = 0
6614
ba479fd2
NN
6615 ;
6616 return 0;
6617}
6618_ACEOF
6619rm -f conftest.$ac_objext
b61ff9c8
BS
6620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6621 (eval $ac_compile) 2>conftest.er1
ba479fd2 6622 ac_status=$?
86da66b5
HPN
6623 grep -v '^ *+' conftest.er1 >conftest.err
6624 rm -f conftest.er1
6625 cat conftest.err >&5
ba479fd2 6626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6627 (exit $ac_status); } &&
6628 { ac_try='test -z "$ac_c_werror_flag"
6629 || test ! -s conftest.err'
6630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6631 (eval $ac_try) 2>&5
6632 ac_status=$?
6633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6634 (exit $ac_status); }; } &&
6635 { ac_try='test -s conftest.$ac_objext'
6636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6637 (eval $ac_try) 2>&5
6638 ac_status=$?
6639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6640 (exit $ac_status); }; }; then
bf3b7cd3 6641 ac_hi=$ac_mid; break
75e93faa 6642else
ba479fd2
NN
6643 echo "$as_me: failed program was:" >&5
6644sed 's/^/| /' conftest.$ac_ext >&5
6645
b61ff9c8
BS
6646ac_lo=`expr $ac_mid + 1`
6647 if test $ac_lo -le $ac_mid; then
6648 ac_lo= ac_hi=
6649 break
6650 fi
6651 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 6652fi
b61ff9c8 6653rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6654 done
75e93faa 6655else
bf3b7cd3
JD
6656 echo "$as_me: failed program was:" >&5
6657sed 's/^/| /' conftest.$ac_ext >&5
6658
b61ff9c8 6659cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6660/* confdefs.h. */
6661_ACEOF
6662cat confdefs.h >>conftest.$ac_ext
6663cat >>conftest.$ac_ext <<_ACEOF
6664/* end confdefs.h. */
bf3b7cd3 6665$ac_includes_default
ba479fd2
NN
6666int
6667main ()
6668{
00020c16 6669static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
bf3b7cd3
JD
6670test_array [0] = 0
6671
ba479fd2
NN
6672 ;
6673 return 0;
6674}
6675_ACEOF
6676rm -f conftest.$ac_objext
b61ff9c8
BS
6677if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6678 (eval $ac_compile) 2>conftest.er1
ba479fd2 6679 ac_status=$?
86da66b5
HPN
6680 grep -v '^ *+' conftest.er1 >conftest.err
6681 rm -f conftest.er1
6682 cat conftest.err >&5
ba479fd2 6683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6684 (exit $ac_status); } &&
6685 { ac_try='test -z "$ac_c_werror_flag"
6686 || test ! -s conftest.err'
6687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6688 (eval $ac_try) 2>&5
6689 ac_status=$?
6690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6691 (exit $ac_status); }; } &&
6692 { ac_try='test -s conftest.$ac_objext'
6693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6694 (eval $ac_try) 2>&5
6695 ac_status=$?
6696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6697 (exit $ac_status); }; }; then
bf3b7cd3
JD
6698 ac_hi=-1 ac_mid=-1
6699 while :; do
6700 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6701/* confdefs.h. */
6702_ACEOF
6703cat confdefs.h >>conftest.$ac_ext
6704cat >>conftest.$ac_ext <<_ACEOF
6705/* end confdefs.h. */
bf3b7cd3 6706$ac_includes_default
ba479fd2
NN
6707int
6708main ()
6709{
00020c16 6710static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
bf3b7cd3
JD
6711test_array [0] = 0
6712
ba479fd2
NN
6713 ;
6714 return 0;
6715}
6716_ACEOF
6717rm -f conftest.$ac_objext
b61ff9c8
BS
6718if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6719 (eval $ac_compile) 2>conftest.er1
ba479fd2 6720 ac_status=$?
86da66b5
HPN
6721 grep -v '^ *+' conftest.er1 >conftest.err
6722 rm -f conftest.er1
6723 cat conftest.err >&5
ba479fd2 6724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6725 (exit $ac_status); } &&
6726 { ac_try='test -z "$ac_c_werror_flag"
6727 || test ! -s conftest.err'
6728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6729 (eval $ac_try) 2>&5
6730 ac_status=$?
6731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6732 (exit $ac_status); }; } &&
6733 { ac_try='test -s conftest.$ac_objext'
6734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6735 (eval $ac_try) 2>&5
6736 ac_status=$?
6737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6738 (exit $ac_status); }; }; then
bf3b7cd3 6739 ac_lo=$ac_mid; break
04cabffc 6740else
ba479fd2
NN
6741 echo "$as_me: failed program was:" >&5
6742sed 's/^/| /' conftest.$ac_ext >&5
6743
b61ff9c8
BS
6744ac_hi=`expr '(' $ac_mid ')' - 1`
6745 if test $ac_mid -le $ac_hi; then
6746 ac_lo= ac_hi=
6747 break
6748 fi
6749 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 6750fi
b61ff9c8 6751rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6752 done
6753else
6754 echo "$as_me: failed program was:" >&5
6755sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 6756
b61ff9c8 6757ac_lo= ac_hi=
414d23ae 6758fi
b61ff9c8 6759rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6760fi
b61ff9c8 6761rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6762# Binary search between lo and hi bounds.
6763while test "x$ac_lo" != "x$ac_hi"; do
6764 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 6765 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6766/* confdefs.h. */
6767_ACEOF
6768cat confdefs.h >>conftest.$ac_ext
6769cat >>conftest.$ac_ext <<_ACEOF
6770/* end confdefs.h. */
bf3b7cd3 6771$ac_includes_default
ba479fd2
NN
6772int
6773main ()
6774{
00020c16 6775static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
6776test_array [0] = 0
6777
ba479fd2
NN
6778 ;
6779 return 0;
6780}
6781_ACEOF
6782rm -f conftest.$ac_objext
b61ff9c8
BS
6783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6784 (eval $ac_compile) 2>conftest.er1
ba479fd2 6785 ac_status=$?
86da66b5
HPN
6786 grep -v '^ *+' conftest.er1 >conftest.err
6787 rm -f conftest.er1
6788 cat conftest.err >&5
ba479fd2 6789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6790 (exit $ac_status); } &&
6791 { ac_try='test -z "$ac_c_werror_flag"
6792 || test ! -s conftest.err'
6793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6794 (eval $ac_try) 2>&5
6795 ac_status=$?
6796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6797 (exit $ac_status); }; } &&
6798 { ac_try='test -s conftest.$ac_objext'
6799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6800 (eval $ac_try) 2>&5
6801 ac_status=$?
6802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6803 (exit $ac_status); }; }; then
bf3b7cd3 6804 ac_hi=$ac_mid
75e93faa 6805else
ba479fd2
NN
6806 echo "$as_me: failed program was:" >&5
6807sed 's/^/| /' conftest.$ac_ext >&5
6808
b61ff9c8 6809ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 6810fi
b61ff9c8 6811rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6812done
bf3b7cd3 6813case $ac_lo in
00020c16 6814?*) ac_cv_sizeof_long_long=$ac_lo;;
18c04407
RW
6815'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6816echo "$as_me: error: in \`$ac_pwd':" >&2;}
00020c16 6817{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 6818See \`config.log' for more details." >&5
00020c16 6819echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 6820See \`config.log' for more details." >&2;}
18c04407 6821 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 6822esac
b61ff9c8
BS
6823else
6824 if test "$cross_compiling" = yes; then
18c04407
RW
6825 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6826echo "$as_me: error: in \`$ac_pwd':" >&2;}
6827{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
6828See \`config.log' for more details." >&5
6829echo "$as_me: error: cannot run test program while cross compiling
6830See \`config.log' for more details." >&2;}
18c04407 6831 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
6832else
6833 cat >conftest.$ac_ext <<_ACEOF
6834/* confdefs.h. */
6835_ACEOF
6836cat confdefs.h >>conftest.$ac_ext
6837cat >>conftest.$ac_ext <<_ACEOF
6838/* end confdefs.h. */
6839$ac_includes_default
00020c16
ILT
6840long longval () { return (long) (sizeof (long long)); }
6841unsigned long ulongval () { return (long) (sizeof (long long)); }
bf3b7cd3
JD
6842#include <stdio.h>
6843#include <stdlib.h>
6844int
6845main ()
6846{
414d23ae 6847
bf3b7cd3
JD
6848 FILE *f = fopen ("conftest.val", "w");
6849 if (! f)
b61ff9c8 6850 exit (1);
00020c16 6851 if (((long) (sizeof (long long))) < 0)
bf3b7cd3 6852 {
b61ff9c8 6853 long i = longval ();
00020c16 6854 if (i != ((long) (sizeof (long long))))
b61ff9c8 6855 exit (1);
bf3b7cd3
JD
6856 fprintf (f, "%ld\n", i);
6857 }
6858 else
6859 {
b61ff9c8 6860 unsigned long i = ulongval ();
00020c16 6861 if (i != ((long) (sizeof (long long))))
b61ff9c8 6862 exit (1);
bf3b7cd3
JD
6863 fprintf (f, "%lu\n", i);
6864 }
b61ff9c8 6865 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6866
6867 ;
6868 return 0;
6869}
6870_ACEOF
6871rm -f conftest$ac_exeext
b61ff9c8
BS
6872if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6873 (eval $ac_link) 2>&5
bf3b7cd3
JD
6874 ac_status=$?
6875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6876 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
6877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6878 (eval $ac_try) 2>&5
bf3b7cd3
JD
6879 ac_status=$?
6880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6881 (exit $ac_status); }; }; then
00020c16 6882 ac_cv_sizeof_long_long=`cat conftest.val`
bf3b7cd3
JD
6883else
6884 echo "$as_me: program exited with status $ac_status" >&5
6885echo "$as_me: failed program was:" >&5
6886sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6887
bf3b7cd3 6888( exit $ac_status )
18c04407
RW
6889{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6890echo "$as_me: error: in \`$ac_pwd':" >&2;}
00020c16 6891{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 6892See \`config.log' for more details." >&5
00020c16 6893echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 6894See \`config.log' for more details." >&2;}
18c04407 6895 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
6896fi
6897rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6898fi
6899fi
6900rm -f conftest.val
b61ff9c8 6901else
00020c16 6902 ac_cv_sizeof_long_long=0
bf3b7cd3 6903fi
b61ff9c8 6904fi
00020c16
ILT
6905echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
6906echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
ba479fd2 6907cat >>confdefs.h <<_ACEOF
00020c16 6908#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
ba479fd2 6909_ACEOF
414d23ae 6910
cafe096b 6911
414d23ae
HPN
6912fi
6913
00020c16
ILT
6914echo "$as_me:$LINENO: checking for __int64" >&5
6915echo $ECHO_N "checking for __int64... $ECHO_C" >&6
6916if test "${ac_cv_type___int64+set}" = set; then
b5472e1d
NN
6917 echo $ECHO_N "(cached) $ECHO_C" >&6
6918else
00020c16 6919 cat >conftest.$ac_ext <<_ACEOF
b5472e1d
NN
6920/* confdefs.h. */
6921_ACEOF
6922cat confdefs.h >>conftest.$ac_ext
6923cat >>conftest.$ac_ext <<_ACEOF
6924/* end confdefs.h. */
00020c16 6925$ac_includes_default
3bbd5a19
PB
6926int
6927main ()
6928{
00020c16
ILT
6929if ((__int64 *) 0)
6930 return 0;
6931if (sizeof (__int64))
6932 return 0;
3bbd5a19
PB
6933 ;
6934 return 0;
6935}
b5472e1d
NN
6936_ACEOF
6937rm -f conftest.$ac_objext
b61ff9c8
BS
6938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6939 (eval $ac_compile) 2>conftest.er1
b5472e1d
NN
6940 ac_status=$?
6941 grep -v '^ *+' conftest.er1 >conftest.err
6942 rm -f conftest.er1
6943 cat conftest.err >&5
6944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6945 (exit $ac_status); } &&
6946 { ac_try='test -z "$ac_c_werror_flag"
6947 || test ! -s conftest.err'
6948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6949 (eval $ac_try) 2>&5
6950 ac_status=$?
6951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6952 (exit $ac_status); }; } &&
6953 { ac_try='test -s conftest.$ac_objext'
6954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6955 (eval $ac_try) 2>&5
6956 ac_status=$?
6957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6958 (exit $ac_status); }; }; then
00020c16 6959 ac_cv_type___int64=yes
b5472e1d
NN
6960else
6961 echo "$as_me: failed program was:" >&5
6962sed 's/^/| /' conftest.$ac_ext >&5
6963
00020c16 6964ac_cv_type___int64=no
b5472e1d 6965fi
b61ff9c8 6966rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3bbd5a19 6967fi
00020c16
ILT
6968echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
6969echo "${ECHO_T}$ac_cv_type___int64" >&6
6970if test $ac_cv_type___int64 = yes; then
3bbd5a19 6971
00020c16
ILT
6972cat >>confdefs.h <<_ACEOF
6973#define HAVE___INT64 1
6974_ACEOF
3bbd5a19 6975
00020c16
ILT
6976echo "$as_me:$LINENO: checking for __int64" >&5
6977echo $ECHO_N "checking for __int64... $ECHO_C" >&6
6978if test "${ac_cv_type___int64+set}" = set; then
89a42ac8
ZW
6979 echo $ECHO_N "(cached) $ECHO_C" >&6
6980else
00020c16 6981 cat >conftest.$ac_ext <<_ACEOF
89a42ac8
ZW
6982/* confdefs.h. */
6983_ACEOF
6984cat confdefs.h >>conftest.$ac_ext
6985cat >>conftest.$ac_ext <<_ACEOF
6986/* end confdefs.h. */
00020c16 6987$ac_includes_default
3bbd5a19
PB
6988int
6989main ()
6990{
00020c16
ILT
6991if ((__int64 *) 0)
6992 return 0;
6993if (sizeof (__int64))
6994 return 0;
3bbd5a19
PB
6995 ;
6996 return 0;
6997}
89a42ac8
ZW
6998_ACEOF
6999rm -f conftest.$ac_objext
b61ff9c8
BS
7000if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7001 (eval $ac_compile) 2>conftest.er1
89a42ac8
ZW
7002 ac_status=$?
7003 grep -v '^ *+' conftest.er1 >conftest.err
7004 rm -f conftest.er1
7005 cat conftest.err >&5
7006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7007 (exit $ac_status); } &&
7008 { ac_try='test -z "$ac_c_werror_flag"
7009 || test ! -s conftest.err'
7010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7011 (eval $ac_try) 2>&5
7012 ac_status=$?
7013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7014 (exit $ac_status); }; } &&
7015 { ac_try='test -s conftest.$ac_objext'
7016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7017 (eval $ac_try) 2>&5
7018 ac_status=$?
7019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7020 (exit $ac_status); }; }; then
00020c16 7021 ac_cv_type___int64=yes
89a42ac8
ZW
7022else
7023 echo "$as_me: failed program was:" >&5
7024sed 's/^/| /' conftest.$ac_ext >&5
7025
00020c16 7026ac_cv_type___int64=no
89a42ac8 7027fi
b61ff9c8 7028rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34a86c2b 7029fi
00020c16
ILT
7030echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
7031echo "${ECHO_T}$ac_cv_type___int64" >&6
34a86c2b 7032
00020c16
ILT
7033echo "$as_me:$LINENO: checking size of __int64" >&5
7034echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
7035if test "${ac_cv_sizeof___int64+set}" = set; then
643d3bd2
NN
7036 echo $ECHO_N "(cached) $ECHO_C" >&6
7037else
00020c16
ILT
7038 if test "$ac_cv_type___int64" = yes; then
7039 # The cast to unsigned long works around a bug in the HP C Compiler
7040 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7041 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7042 # This bug is HP SR number 8606223364.
7043 if test "$cross_compiling" = yes; then
7044 # Depending upon the size, compute the lo and hi bounds.
3bbd5a19 7045cat >conftest.$ac_ext <<_ACEOF
643d3bd2
NN
7046/* confdefs.h. */
7047_ACEOF
7048cat confdefs.h >>conftest.$ac_ext
7049cat >>conftest.$ac_ext <<_ACEOF
7050/* end confdefs.h. */
00020c16
ILT
7051$ac_includes_default
7052int
7053main ()
7054{
7055static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
7056test_array [0] = 0
643d3bd2 7057
00020c16
ILT
7058 ;
7059 return 0;
7060}
7061_ACEOF
7062rm -f conftest.$ac_objext
7063if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7064 (eval $ac_compile) 2>conftest.er1
7065 ac_status=$?
7066 grep -v '^ *+' conftest.er1 >conftest.err
7067 rm -f conftest.er1
7068 cat conftest.err >&5
7069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7070 (exit $ac_status); } &&
7071 { ac_try='test -z "$ac_c_werror_flag"
7072 || test ! -s conftest.err'
7073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7074 (eval $ac_try) 2>&5
7075 ac_status=$?
7076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7077 (exit $ac_status); }; } &&
7078 { ac_try='test -s conftest.$ac_objext'
7079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7080 (eval $ac_try) 2>&5
7081 ac_status=$?
7082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7083 (exit $ac_status); }; }; then
7084 ac_lo=0 ac_mid=0
7085 while :; do
7086 cat >conftest.$ac_ext <<_ACEOF
7087/* confdefs.h. */
7088_ACEOF
7089cat confdefs.h >>conftest.$ac_ext
7090cat >>conftest.$ac_ext <<_ACEOF
7091/* end confdefs.h. */
7092$ac_includes_default
3bbd5a19
PB
7093int
7094main ()
7095{
00020c16
ILT
7096static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
7097test_array [0] = 0
3bbd5a19
PB
7098
7099 ;
7100 return 0;
7101}
643d3bd2
NN
7102_ACEOF
7103rm -f conftest.$ac_objext
b61ff9c8
BS
7104if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7105 (eval $ac_compile) 2>conftest.er1
643d3bd2
NN
7106 ac_status=$?
7107 grep -v '^ *+' conftest.er1 >conftest.err
7108 rm -f conftest.er1
7109 cat conftest.err >&5
7110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7111 (exit $ac_status); } &&
7112 { ac_try='test -z "$ac_c_werror_flag"
7113 || test ! -s conftest.err'
7114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7115 (eval $ac_try) 2>&5
7116 ac_status=$?
7117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7118 (exit $ac_status); }; } &&
7119 { ac_try='test -s conftest.$ac_objext'
7120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7121 (eval $ac_try) 2>&5
7122 ac_status=$?
7123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7124 (exit $ac_status); }; }; then
00020c16 7125 ac_hi=$ac_mid; break
643d3bd2
NN
7126else
7127 echo "$as_me: failed program was:" >&5
7128sed 's/^/| /' conftest.$ac_ext >&5
7129
00020c16
ILT
7130ac_lo=`expr $ac_mid + 1`
7131 if test $ac_lo -le $ac_mid; then
7132 ac_lo= ac_hi=
7133 break
7134 fi
7135 ac_mid=`expr 2 '*' $ac_mid + 1`
643d3bd2 7136fi
b61ff9c8 7137rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16 7138 done
09a9c095 7139else
00020c16
ILT
7140 echo "$as_me: failed program was:" >&5
7141sed 's/^/| /' conftest.$ac_ext >&5
373477bb 7142
00020c16
ILT
7143cat >conftest.$ac_ext <<_ACEOF
7144/* confdefs.h. */
7145_ACEOF
7146cat confdefs.h >>conftest.$ac_ext
7147cat >>conftest.$ac_ext <<_ACEOF
7148/* end confdefs.h. */
7149$ac_includes_default
7150int
7151main ()
7152{
7153static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
7154test_array [0] = 0
373477bb 7155
00020c16
ILT
7156 ;
7157 return 0;
7158}
7159_ACEOF
7160rm -f conftest.$ac_objext
7161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7162 (eval $ac_compile) 2>conftest.er1
7163 ac_status=$?
7164 grep -v '^ *+' conftest.er1 >conftest.err
7165 rm -f conftest.er1
7166 cat conftest.err >&5
7167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7168 (exit $ac_status); } &&
7169 { ac_try='test -z "$ac_c_werror_flag"
7170 || test ! -s conftest.err'
7171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7172 (eval $ac_try) 2>&5
7173 ac_status=$?
7174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7175 (exit $ac_status); }; } &&
7176 { ac_try='test -s conftest.$ac_objext'
7177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7178 (eval $ac_try) 2>&5
7179 ac_status=$?
7180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7181 (exit $ac_status); }; }; then
7182 ac_hi=-1 ac_mid=-1
7183 while :; do
7184 cat >conftest.$ac_ext <<_ACEOF
7185/* confdefs.h. */
7186_ACEOF
7187cat confdefs.h >>conftest.$ac_ext
7188cat >>conftest.$ac_ext <<_ACEOF
7189/* end confdefs.h. */
7190$ac_includes_default
7191int
7192main ()
7193{
7194static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
7195test_array [0] = 0
414d23ae 7196
00020c16
ILT
7197 ;
7198 return 0;
7199}
7200_ACEOF
7201rm -f conftest.$ac_objext
7202if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7203 (eval $ac_compile) 2>conftest.er1
7204 ac_status=$?
7205 grep -v '^ *+' conftest.er1 >conftest.err
7206 rm -f conftest.er1
7207 cat conftest.err >&5
7208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7209 (exit $ac_status); } &&
7210 { ac_try='test -z "$ac_c_werror_flag"
7211 || test ! -s conftest.err'
7212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7213 (eval $ac_try) 2>&5
7214 ac_status=$?
7215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7216 (exit $ac_status); }; } &&
7217 { ac_try='test -s conftest.$ac_objext'
7218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7219 (eval $ac_try) 2>&5
7220 ac_status=$?
7221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7222 (exit $ac_status); }; }; then
7223 ac_lo=$ac_mid; break
7224else
7225 echo "$as_me: failed program was:" >&5
7226sed 's/^/| /' conftest.$ac_ext >&5
414d23ae 7227
00020c16
ILT
7228ac_hi=`expr '(' $ac_mid ')' - 1`
7229 if test $ac_mid -le $ac_hi; then
7230 ac_lo= ac_hi=
7231 break
7232 fi
7233 ac_mid=`expr 2 '*' $ac_mid`
a1286ef5 7234fi
00020c16
ILT
7235rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7236 done
e1bbfc5c 7237else
00020c16
ILT
7238 echo "$as_me: failed program was:" >&5
7239sed 's/^/| /' conftest.$ac_ext >&5
e1bbfc5c 7240
00020c16 7241ac_lo= ac_hi=
e1bbfc5c 7242fi
00020c16 7243rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 7244fi
00020c16
ILT
7245rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7246# Binary search between lo and hi bounds.
7247while test "x$ac_lo" != "x$ac_hi"; do
7248 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7249 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7250/* confdefs.h. */
7251_ACEOF
7252cat confdefs.h >>conftest.$ac_ext
7253cat >>conftest.$ac_ext <<_ACEOF
7254/* end confdefs.h. */
7255$ac_includes_default
00020c16
ILT
7256int
7257main ()
7258{
7259static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
7260test_array [0] = 0
7261
7262 ;
7263 return 0;
7264}
ba479fd2
NN
7265_ACEOF
7266rm -f conftest.$ac_objext
b61ff9c8
BS
7267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7268 (eval $ac_compile) 2>conftest.er1
ba479fd2 7269 ac_status=$?
86da66b5
HPN
7270 grep -v '^ *+' conftest.er1 >conftest.err
7271 rm -f conftest.er1
7272 cat conftest.err >&5
ba479fd2 7273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7274 (exit $ac_status); } &&
7275 { ac_try='test -z "$ac_c_werror_flag"
7276 || test ! -s conftest.err'
7277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7278 (eval $ac_try) 2>&5
7279 ac_status=$?
7280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7281 (exit $ac_status); }; } &&
7282 { ac_try='test -s conftest.$ac_objext'
7283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7284 (eval $ac_try) 2>&5
7285 ac_status=$?
7286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7287 (exit $ac_status); }; }; then
00020c16 7288 ac_hi=$ac_mid
ba479fd2
NN
7289else
7290 echo "$as_me: failed program was:" >&5
7291sed 's/^/| /' conftest.$ac_ext >&5
7292
00020c16 7293ac_lo=`expr '(' $ac_mid ')' + 1`
ba479fd2 7294fi
b61ff9c8 7295rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
00020c16
ILT
7296done
7297case $ac_lo in
7298?*) ac_cv_sizeof___int64=$ac_lo;;
7299'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7300echo "$as_me: error: in \`$ac_pwd':" >&2;}
7301{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
7302See \`config.log' for more details." >&5
7303echo "$as_me: error: cannot compute sizeof (__int64), 77
7304See \`config.log' for more details." >&2;}
7305 { (exit 1); exit 1; }; }; } ;;
7306esac
7307else
7308 if test "$cross_compiling" = yes; then
7309 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7310echo "$as_me: error: in \`$ac_pwd':" >&2;}
7311{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7312See \`config.log' for more details." >&5
7313echo "$as_me: error: cannot run test program while cross compiling
7314See \`config.log' for more details." >&2;}
7315 { (exit 1); exit 1; }; }; }
7316else
7317 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7318/* confdefs.h. */
7319_ACEOF
7320cat confdefs.h >>conftest.$ac_ext
7321cat >>conftest.$ac_ext <<_ACEOF
7322/* end confdefs.h. */
00020c16
ILT
7323$ac_includes_default
7324long longval () { return (long) (sizeof (__int64)); }
7325unsigned long ulongval () { return (long) (sizeof (__int64)); }
7326#include <stdio.h>
7327#include <stdlib.h>
7328int
7329main ()
7330{
7331
7332 FILE *f = fopen ("conftest.val", "w");
7333 if (! f)
7334 exit (1);
7335 if (((long) (sizeof (__int64))) < 0)
7336 {
7337 long i = longval ();
7338 if (i != ((long) (sizeof (__int64))))
7339 exit (1);
7340 fprintf (f, "%ld\n", i);
7341 }
7342 else
7343 {
7344 unsigned long i = ulongval ();
7345 if (i != ((long) (sizeof (__int64))))
7346 exit (1);
7347 fprintf (f, "%lu\n", i);
7348 }
7349 exit (ferror (f) || fclose (f) != 0);
7350
7351 ;
7352 return 0;
7353}
ba479fd2 7354_ACEOF
00020c16
ILT
7355rm -f conftest$ac_exeext
7356if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7357 (eval $ac_link) 2>&5
ba479fd2 7358 ac_status=$?
ba479fd2 7359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
7360 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7362 (eval $ac_try) 2>&5
7363 ac_status=$?
7364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7365 (exit $ac_status); }; }; then
7366 ac_cv_sizeof___int64=`cat conftest.val`
b61ff9c8 7367else
00020c16
ILT
7368 echo "$as_me: program exited with status $ac_status" >&5
7369echo "$as_me: failed program was:" >&5
ba479fd2
NN
7370sed 's/^/| /' conftest.$ac_ext >&5
7371
00020c16
ILT
7372( exit $ac_status )
7373{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7374echo "$as_me: error: in \`$ac_pwd':" >&2;}
7375{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
7376See \`config.log' for more details." >&5
7377echo "$as_me: error: cannot compute sizeof (__int64), 77
7378See \`config.log' for more details." >&2;}
7379 { (exit 1); exit 1; }; }; }
ba479fd2 7380fi
00020c16 7381rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6938ec6c 7382fi
6e3f3080 7383fi
00020c16 7384rm -f conftest.val
6938ec6c 7385else
00020c16 7386 ac_cv_sizeof___int64=0
6938ec6c 7387fi
00020c16
ILT
7388fi
7389echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
7390echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
7391cat >>confdefs.h <<_ACEOF
7392#define SIZEOF___INT64 $ac_cv_sizeof___int64
7393_ACEOF
6938ec6c
NN
7394
7395
00020c16 7396fi
ba479fd2 7397
00020c16
ILT
7398
7399# ---------------------
7400# Warnings and checking
7401# ---------------------
7402
7403# Check $CC warning features (if it's GCC).
7404# We want to use -pedantic, but we don't want warnings about
7405# * 'long long'
7406# * variadic macros
7407# * overlong strings
7408# So, we only use -pedantic if we can disable those warnings.
7409
7410loose_warn=
7411save_CFLAGS="$CFLAGS"
7412for option in -W -Wall -Wwrite-strings -Wcast-qual; do
7413 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
7414
7415 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
7416echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
7417if eval "test \"\${$as_acx_Woption+set}\" = set"; then
7418 echo $ECHO_N "(cached) $ECHO_C" >&6
7419else
7420 CFLAGS="$option"
7421 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7422/* confdefs.h. */
7423_ACEOF
7424cat confdefs.h >>conftest.$ac_ext
7425cat >>conftest.$ac_ext <<_ACEOF
7426/* end confdefs.h. */
00020c16
ILT
7427
7428int
7429main ()
7430{
7431
7432 ;
7433 return 0;
7434}
ba479fd2 7435_ACEOF
00020c16
ILT
7436rm -f conftest.$ac_objext
7437if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7438 (eval $ac_compile) 2>conftest.er1
ba479fd2
NN
7439 ac_status=$?
7440 grep -v '^ *+' conftest.er1 >conftest.err
7441 rm -f conftest.er1
7442 cat conftest.err >&5
7443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
7444 (exit $ac_status); } &&
7445 { ac_try='test -z "$ac_c_werror_flag"
7446 || test ! -s conftest.err'
7447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7448 (eval $ac_try) 2>&5
7449 ac_status=$?
7450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7451 (exit $ac_status); }; } &&
7452 { ac_try='test -s conftest.$ac_objext'
7453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7454 (eval $ac_try) 2>&5
7455 ac_status=$?
7456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7457 (exit $ac_status); }; }; then
7458 eval "$as_acx_Woption=yes"
a207b594 7459else
ba479fd2
NN
7460 echo "$as_me: failed program was:" >&5
7461sed 's/^/| /' conftest.$ac_ext >&5
7462
00020c16 7463eval "$as_acx_Woption=no"
a207b594 7464fi
00020c16
ILT
7465rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7466
7467fi
7468echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
7469echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
7470 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
7471 loose_warn="$loose_warn${loose_warn:+ }$option"
7472fi
7473
7474 done
7475CFLAGS="$save_CFLAGS"
7476
7477c_loose_warn=
7478save_CFLAGS="$CFLAGS"
7479for option in -Wstrict-prototypes -Wmissing-prototypes; do
7480 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
7481
7482 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
7483echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
7484if eval "test \"\${$as_acx_Woption+set}\" = set"; then
7485 echo $ECHO_N "(cached) $ECHO_C" >&6
7486else
7487 CFLAGS="$option"
7488 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7489/* confdefs.h. */
7490_ACEOF
7491cat confdefs.h >>conftest.$ac_ext
7492cat >>conftest.$ac_ext <<_ACEOF
7493/* end confdefs.h. */
00020c16
ILT
7494
7495int
7496main ()
7497{
7498
7499 ;
7500 return 0;
7501}
ba479fd2 7502_ACEOF
00020c16
ILT
7503rm -f conftest.$ac_objext
7504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7505 (eval $ac_compile) 2>conftest.er1
ba479fd2
NN
7506 ac_status=$?
7507 grep -v '^ *+' conftest.er1 >conftest.err
7508 rm -f conftest.er1
7509 cat conftest.err >&5
7510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
00020c16
ILT
7511 (exit $ac_status); } &&
7512 { ac_try='test -z "$ac_c_werror_flag"
7513 || test ! -s conftest.err'
7514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7515 (eval $ac_try) 2>&5
7516 ac_status=$?
7517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7518 (exit $ac_status); }; } &&
7519 { ac_try='test -s conftest.$ac_objext'
7520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7521 (eval $ac_try) 2>&5
7522 ac_status=$?
7523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7524 (exit $ac_status); }; }; then
7525 eval "$as_acx_Woption=yes"
14011ca4 7526else
ba479fd2
NN
7527 echo "$as_me: failed program was:" >&5
7528sed 's/^/| /' conftest.$ac_ext >&5
7529
00020c16 7530eval "$as_acx_Woption=no"
cafe096b 7531fi
00020c16 7532rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 7533
56694dd9 7534fi
00020c16
ILT
7535echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
7536echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
7537 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
7538 c_loose_warn="$c_loose_warn${c_loose_warn:+ }$option"
56694dd9 7539fi
56694dd9 7540
00020c16
ILT
7541 done
7542CFLAGS="$save_CFLAGS"
7543
7544strict_warn=
7545save_CFLAGS="$CFLAGS"
7546for option in -Wmissing-format-attribute; do
7547 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
7548
7549 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
7550echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
7551if eval "test \"\${$as_acx_Woption+set}\" = set"; then
ba479fd2 7552 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 7553else
00020c16
ILT
7554 CFLAGS="$option"
7555 cat >conftest.$ac_ext <<_ACEOF
7556/* confdefs.h. */
7557_ACEOF
7558cat confdefs.h >>conftest.$ac_ext
7559cat >>conftest.$ac_ext <<_ACEOF
7560/* end confdefs.h. */
7561
7562int
7563main ()
7564{
7565
7566 ;
7567 return 0;
7568}
7569_ACEOF
7570rm -f conftest.$ac_objext
7571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7572 (eval $ac_compile) 2>conftest.er1
7573 ac_status=$?
7574 grep -v '^ *+' conftest.er1 >conftest.err
7575 rm -f conftest.er1
7576 cat conftest.err >&5
7577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7578 (exit $ac_status); } &&
7579 { ac_try='test -z "$ac_c_werror_flag"
7580 || test ! -s conftest.err'
7581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7582 (eval $ac_try) 2>&5
7583 ac_status=$?
7584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7585 (exit $ac_status); }; } &&
7586 { ac_try='test -s conftest.$ac_objext'
7587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7588 (eval $ac_try) 2>&5
7589 ac_status=$?
7590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7591 (exit $ac_status); }; }; then
7592 eval "$as_acx_Woption=yes"
414d23ae 7593else
00020c16
ILT
7594 echo "$as_me: failed program was:" >&5
7595sed 's/^/| /' conftest.$ac_ext >&5
7596
7597eval "$as_acx_Woption=no"
414d23ae 7598fi
00020c16 7599rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 7600
00020c16
ILT
7601fi
7602echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
7603echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
7604 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
7605 strict_warn="$strict_warn${strict_warn:+ }$option"
7606fi
ba479fd2 7607
00020c16
ILT
7608 done
7609CFLAGS="$save_CFLAGS"
75e93faa 7610
00020c16
ILT
7611c_strict_warn=
7612save_CFLAGS="$CFLAGS"
7613for option in -Wold-style-definition -Wc++-compat; do
7614 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
ba479fd2 7615
00020c16
ILT
7616 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
7617echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
7618if eval "test \"\${$as_acx_Woption+set}\" = set"; then
7619 echo $ECHO_N "(cached) $ECHO_C" >&6
7620else
7621 CFLAGS="$option"
7622 cat >conftest.$ac_ext <<_ACEOF
7623/* confdefs.h. */
ba479fd2 7624_ACEOF
00020c16
ILT
7625cat confdefs.h >>conftest.$ac_ext
7626cat >>conftest.$ac_ext <<_ACEOF
7627/* end confdefs.h. */
a207b594 7628
00020c16
ILT
7629int
7630main ()
7631{
ba479fd2 7632
00020c16
ILT
7633 ;
7634 return 0;
7635}
ba479fd2 7636_ACEOF
00020c16
ILT
7637rm -f conftest.$ac_objext
7638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7639 (eval $ac_compile) 2>conftest.er1
7640 ac_status=$?
7641 grep -v '^ *+' conftest.er1 >conftest.err
7642 rm -f conftest.er1
7643 cat conftest.err >&5
7644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7645 (exit $ac_status); } &&
7646 { ac_try='test -z "$ac_c_werror_flag"
7647 || test ! -s conftest.err'
7648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7649 (eval $ac_try) 2>&5
7650 ac_status=$?
7651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7652 (exit $ac_status); }; } &&
7653 { ac_try='test -s conftest.$ac_objext'
7654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7655 (eval $ac_try) 2>&5
7656 ac_status=$?
7657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7658 (exit $ac_status); }; }; then
7659 eval "$as_acx_Woption=yes"
7660else
7661 echo "$as_me: failed program was:" >&5
7662sed 's/^/| /' conftest.$ac_ext >&5
14011ca4 7663
00020c16 7664eval "$as_acx_Woption=no"
414d23ae 7665fi
00020c16 7666rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa 7667
00020c16
ILT
7668fi
7669echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
7670echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
7671 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
7672 c_strict_warn="$c_strict_warn${c_strict_warn:+ }$option"
7673fi
75e93faa 7674
00020c16
ILT
7675 done
7676CFLAGS="$save_CFLAGS"
75e93faa 7677
00020c16
ILT
7678if test "$GCC" = yes; then
7679 echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" >&5
7680echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings... $ECHO_C" >&6
7681if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings+set}" = set; then
7682 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 7683else
00020c16
ILT
7684 save_CFLAGS="$CFLAGS"
7685CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
7686cat >conftest.$ac_ext <<_ACEOF
7687/* confdefs.h. */
7688_ACEOF
7689cat confdefs.h >>conftest.$ac_ext
7690cat >>conftest.$ac_ext <<_ACEOF
7691/* end confdefs.h. */
2f41c1d6 7692
00020c16
ILT
7693int
7694main ()
7695{
b61ff9c8 7696
00020c16
ILT
7697 ;
7698 return 0;
7699}
7700_ACEOF
7701rm -f conftest.$ac_objext
7702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7703 (eval $ac_compile) 2>conftest.er1
7704 ac_status=$?
7705 grep -v '^ *+' conftest.er1 >conftest.err
7706 rm -f conftest.er1
7707 cat conftest.err >&5
7708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7709 (exit $ac_status); } &&
7710 { ac_try='test -z "$ac_c_werror_flag"
7711 || test ! -s conftest.err'
7712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7713 (eval $ac_try) 2>&5
7714 ac_status=$?
7715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7716 (exit $ac_status); }; } &&
7717 { ac_try='test -s conftest.$ac_objext'
7718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7719 (eval $ac_try) 2>&5
7720 ac_status=$?
7721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7722 (exit $ac_status); }; }; then
7723 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=yes
439a7e54 7724else
00020c16
ILT
7725 echo "$as_me: failed program was:" >&5
7726sed 's/^/| /' conftest.$ac_ext >&5
7727
7728acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=no
7729fi
7730rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7731CFLAGS="$save_CFLAGS"
7732fi
7733echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&5
7734echo "${ECHO_T}$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&6
7735if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings = yes; then
7736 strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
7737fi
ba479fd2 7738
439a7e54
DN
7739
7740fi
7741
34a86c2b 7742
00020c16
ILT
7743# Check whether --enable-werror-always or --disable-werror-always was given.
7744if test "${enable_werror_always+set}" = set; then
7745 enableval="$enable_werror_always"
ba479fd2 7746
34a86c2b 7747else
00020c16 7748 enable_werror_always=no
b61ff9c8 7749fi;
00020c16
ILT
7750if test $enable_werror_always = yes; then
7751 strict_warn="$strict_warn${strict_warn:+ }-Werror"
7752fi
cafe096b 7753
b61ff9c8 7754
75e93faa 7755
34a86c2b 7756
00020c16
ILT
7757# The above macros do nothing if the compiler is not GCC. However, the
7758# Makefile has more goo to add other flags, so these variables are used
7759# to enable warnings only for GCC.
7760warn_cflags=
7761warn_cxxflags=
7762if test "x$GCC" = "xyes"; then
7763 warn_cflags='$(GCC_WARN_CFLAGS)'
7764 warn_cxxflags='$(GCC_WARN_CXXFLAGS)'
7765fi
75e93faa
ZW
7766
7767
b61ff9c8 7768
00020c16
ILT
7769# Enable expensive internal checks
7770is_release=
7771if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
7772 is_release=yes
7773fi
79b87c74 7774
00020c16
ILT
7775# Check whether --enable-checking or --disable-checking was given.
7776if test "${enable_checking+set}" = set; then
7777 enableval="$enable_checking"
7778 ac_checking_flags="${enableval}"
79b87c74
MM
7779else
7780
00020c16
ILT
7781# Determine the default checks.
7782if test x$is_release = x ; then
7783 ac_checking_flags=yes
7784else
7785 ac_checking_flags=release
7786fi
b61ff9c8 7787fi;
00020c16
ILT
7788IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
7789for check in release $ac_checking_flags
7790do
7791 case $check in
7792 # these set all the flags to specific states
7793 yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
7794 ac_fold_checking= ; ac_gc_checking=1 ;
7795 ac_gc_always_collect= ; ac_gimple_checking=1 ; ac_rtl_checking= ;
7796 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7797 ac_tree_checking=1 ; ac_valgrind_checking= ;
7798 ac_types_checking=1 ;;
7799 no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
7800 ac_fold_checking= ; ac_gc_checking= ;
7801 ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
7802 ac_rtlflag_checking= ; ac_runtime_checking= ;
7803 ac_tree_checking= ; ac_valgrind_checking= ;
7804 ac_types_checking= ;;
7805 all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
7806 ac_fold_checking=1 ; ac_gc_checking=1 ;
7807 ac_gc_always_collect=1 ; ac_gimple_checking=1 ; ac_rtl_checking=1 ;
7808 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7809 ac_tree_checking=1 ; ac_valgrind_checking= ;
7810 ac_types_checking=1 ;;
7811 release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
7812 ac_fold_checking= ; ac_gc_checking= ;
7813 ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
7814 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
7815 ac_tree_checking= ; ac_valgrind_checking= ;
7816 ac_types_checking= ;;
7817 # these enable particular checks
7818 assert) ac_assert_checking=1 ;;
7819 df) ac_df_checking=1 ;;
7820 fold) ac_fold_checking=1 ;;
7821 gc) ac_gc_checking=1 ;;
7822 gcac) ac_gc_always_collect=1 ;;
7823 gimple) ac_gimple_checking=1 ;;
7824 misc) ac_checking=1 ;;
7825 rtl) ac_rtl_checking=1 ;;
7826 rtlflag) ac_rtlflag_checking=1 ;;
7827 runtime) ac_runtime_checking=1 ;;
7828 tree) ac_tree_checking=1 ;;
7829 types) ac_types_checking=1 ;;
7830 valgrind) ac_valgrind_checking=1 ;;
7831 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
7832echo "$as_me: error: unknown check category $check" >&2;}
7833 { (exit 1); exit 1; }; } ;;
7834 esac
7835done
7836IFS="$ac_save_IFS"
486aa804 7837
00020c16
ILT
7838nocommon_flag=""
7839if test x$ac_checking != x ; then
79b87c74 7840
00020c16
ILT
7841cat >>confdefs.h <<\_ACEOF
7842#define ENABLE_CHECKING 1
79b87c74
MM
7843_ACEOF
7844
00020c16
ILT
7845 nocommon_flag=-fno-common
7846fi
79b87c74 7847
00020c16 7848if test x$ac_df_checking != x ; then
486aa804 7849
00020c16
ILT
7850cat >>confdefs.h <<\_ACEOF
7851#define ENABLE_DF_CHECKING 1
7852_ACEOF
486aa804 7853
00020c16
ILT
7854fi
7855if test x$ac_assert_checking != x ; then
486aa804 7856
00020c16
ILT
7857cat >>confdefs.h <<\_ACEOF
7858#define ENABLE_ASSERT_CHECKING 1
486aa804
BE
7859_ACEOF
7860
00020c16
ILT
7861fi
7862if test x$ac_gimple_checking != x ; then
486aa804 7863
00020c16
ILT
7864cat >>confdefs.h <<\_ACEOF
7865#define ENABLE_GIMPLE_CHECKING 1
7866_ACEOF
b61ff9c8 7867
00020c16 7868fi
ab22c1fa 7869
00020c16 7870if test x$ac_runtime_checking != x ; then
ab22c1fa 7871
00020c16
ILT
7872cat >>confdefs.h <<\_ACEOF
7873#define ENABLE_RUNTIME_CHECKING 1
7874_ACEOF
ab22c1fa 7875
00020c16
ILT
7876fi
7877if test x$ac_tree_checking != x ; then
ab22c1fa 7878
00020c16
ILT
7879cat >>confdefs.h <<\_ACEOF
7880#define ENABLE_TREE_CHECKING 1
7881_ACEOF
ab22c1fa 7882
00020c16
ILT
7883 TREEBROWSER=tree-browser.o
7884fi
7885if test x$ac_types_checking != x ; then
ab22c1fa 7886
00020c16
ILT
7887cat >>confdefs.h <<\_ACEOF
7888#define ENABLE_TYPES_CHECKING 1
ab22c1fa
CF
7889_ACEOF
7890
00020c16 7891fi
ab22c1fa 7892
00020c16 7893if test x$ac_rtl_checking != x ; then
2f41c1d6 7894
00020c16
ILT
7895cat >>confdefs.h <<\_ACEOF
7896#define ENABLE_RTL_CHECKING 1
7897_ACEOF
b61ff9c8 7898
00020c16
ILT
7899fi
7900if test x$ac_rtlflag_checking != x ; then
8dea1cca 7901
00020c16
ILT
7902cat >>confdefs.h <<\_ACEOF
7903#define ENABLE_RTL_FLAG_CHECKING 1
7904_ACEOF
1a4b763e 7905
414d23ae 7906fi
00020c16 7907if test x$ac_gc_checking != x ; then
75e93faa 7908
00020c16
ILT
7909cat >>confdefs.h <<\_ACEOF
7910#define ENABLE_GC_CHECKING 1
7911_ACEOF
a6ccdbab 7912
00020c16
ILT
7913fi
7914if test x$ac_gc_always_collect != x ; then
160633c6 7915
00020c16
ILT
7916cat >>confdefs.h <<\_ACEOF
7917#define ENABLE_GC_ALWAYS_COLLECT 1
7918_ACEOF
b61ff9c8 7919
00020c16
ILT
7920fi
7921if test x$ac_fold_checking != x ; then
ba479fd2 7922
00020c16
ILT
7923cat >>confdefs.h <<\_ACEOF
7924#define ENABLE_FOLD_CHECKING 1
7925_ACEOF
4977bab6 7926
00020c16
ILT
7927fi
7928valgrind_path_defines=
7929valgrind_command=
047d636f 7930
00020c16
ILT
7931if test "${ac_cv_header_valgrind_h+set}" = set; then
7932 echo "$as_me:$LINENO: checking for valgrind.h" >&5
7933echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
7934if test "${ac_cv_header_valgrind_h+set}" = set; then
7935 echo $ECHO_N "(cached) $ECHO_C" >&6
7936fi
7937echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
7938echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
4977bab6 7939else
00020c16
ILT
7940 # Is the header compilable?
7941echo "$as_me:$LINENO: checking valgrind.h usability" >&5
7942echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
7943cat >conftest.$ac_ext <<_ACEOF
7944/* confdefs.h. */
7945_ACEOF
7946cat confdefs.h >>conftest.$ac_ext
7947cat >>conftest.$ac_ext <<_ACEOF
7948/* end confdefs.h. */
7949$ac_includes_default
7950#include <valgrind.h>
7951_ACEOF
7952rm -f conftest.$ac_objext
7953if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7954 (eval $ac_compile) 2>conftest.er1
7955 ac_status=$?
7956 grep -v '^ *+' conftest.er1 >conftest.err
7957 rm -f conftest.er1
7958 cat conftest.err >&5
7959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7960 (exit $ac_status); } &&
7961 { ac_try='test -z "$ac_c_werror_flag"
7962 || test ! -s conftest.err'
7963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7964 (eval $ac_try) 2>&5
7965 ac_status=$?
7966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7967 (exit $ac_status); }; } &&
7968 { ac_try='test -s conftest.$ac_objext'
7969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7970 (eval $ac_try) 2>&5
7971 ac_status=$?
7972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7973 (exit $ac_status); }; }; then
7974 ac_header_compiler=yes
7975else
7976 echo "$as_me: failed program was:" >&5
7977sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 7978
00020c16
ILT
7979ac_header_compiler=no
7980fi
7981rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7982echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7983echo "${ECHO_T}$ac_header_compiler" >&6
4977bab6 7984
00020c16
ILT
7985# Is the header present?
7986echo "$as_me:$LINENO: checking valgrind.h presence" >&5
7987echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
7988cat >conftest.$ac_ext <<_ACEOF
7989/* confdefs.h. */
7990_ACEOF
7991cat confdefs.h >>conftest.$ac_ext
7992cat >>conftest.$ac_ext <<_ACEOF
7993/* end confdefs.h. */
7994#include <valgrind.h>
7995_ACEOF
7996if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7997 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7998 ac_status=$?
7999 grep -v '^ *+' conftest.er1 >conftest.err
8000 rm -f conftest.er1
8001 cat conftest.err >&5
8002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8003 (exit $ac_status); } >/dev/null; then
8004 if test -s conftest.err; then
8005 ac_cpp_err=$ac_c_preproc_warn_flag
8006 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8007 else
8008 ac_cpp_err=
8009 fi
8010else
8011 ac_cpp_err=yes
8012fi
8013if test -z "$ac_cpp_err"; then
8014 ac_header_preproc=yes
8015else
8016 echo "$as_me: failed program was:" >&5
8017sed 's/^/| /' conftest.$ac_ext >&5
4977bab6 8018
00020c16
ILT
8019 ac_header_preproc=no
8020fi
8021rm -f conftest.err conftest.$ac_ext
8022echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8023echo "${ECHO_T}$ac_header_preproc" >&6
4977bab6 8024
00020c16
ILT
8025# So? What about this header?
8026case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8027 yes:no: )
8028 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
8029echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8030 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
8031echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
8032 ac_header_preproc=yes
8033 ;;
8034 no:yes:* )
8035 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
8036echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
8037 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
8038echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
8039 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
8040echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
8041 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
8042echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
8043 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
8044echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
8045 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
8046echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
8047 (
8048 cat <<\_ASBOX
8049## ------------------------------------------ ##
8050## Report this to the AC_PACKAGE_NAME lists. ##
8051## ------------------------------------------ ##
8052_ASBOX
8053 ) |
8054 sed "s/^/$as_me: WARNING: /" >&2
8055 ;;
d1bd0ded 8056esac
00020c16
ILT
8057echo "$as_me:$LINENO: checking for valgrind.h" >&5
8058echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
8059if test "${ac_cv_header_valgrind_h+set}" = set; then
8060 echo $ECHO_N "(cached) $ECHO_C" >&6
0c46c5c7 8061else
00020c16
ILT
8062 ac_cv_header_valgrind_h=$ac_header_preproc
8063fi
8064echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
8065echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
2f41c1d6 8066
00020c16
ILT
8067fi
8068if test $ac_cv_header_valgrind_h = yes; then
8069 have_valgrind_h=yes
2f41c1d6 8070else
00020c16
ILT
8071 have_valgrind_h=no
8072fi
2f41c1d6 8073
1a4b763e 8074
2f41c1d6 8075
00020c16
ILT
8076if test x$ac_valgrind_checking != x ; then
8077 # It is certainly possible that there's valgrind but no valgrind.h.
8078 # GCC relies on making annotations so we must have both.
8079 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
8080echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
8081 cat >conftest.$ac_ext <<_ACEOF
8082/* confdefs.h. */
8083_ACEOF
8084cat confdefs.h >>conftest.$ac_ext
8085cat >>conftest.$ac_ext <<_ACEOF
8086/* end confdefs.h. */
8087#include <valgrind/memcheck.h>
8088#ifndef VALGRIND_DISCARD
8089#error VALGRIND_DISCARD not defined
8090#endif
8091_ACEOF
8092if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8093 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8094 ac_status=$?
8095 grep -v '^ *+' conftest.er1 >conftest.err
8096 rm -f conftest.er1
8097 cat conftest.err >&5
8098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8099 (exit $ac_status); } >/dev/null; then
8100 if test -s conftest.err; then
8101 ac_cpp_err=$ac_c_preproc_warn_flag
8102 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8103 else
8104 ac_cpp_err=
8105 fi
f3c9f174 8106else
00020c16
ILT
8107 ac_cpp_err=yes
8108fi
8109if test -z "$ac_cpp_err"; then
8110 gcc_cv_header_valgrind_memcheck_h=yes
aca600aa 8111else
00020c16
ILT
8112 echo "$as_me: failed program was:" >&5
8113sed 's/^/| /' conftest.$ac_ext >&5
5b67ad6f 8114
00020c16
ILT
8115 gcc_cv_header_valgrind_memcheck_h=no
8116fi
8117rm -f conftest.err conftest.$ac_ext
8118 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
8119echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
8120 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
8121echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
8122 cat >conftest.$ac_ext <<_ACEOF
8123/* confdefs.h. */
ba479fd2 8124_ACEOF
00020c16
ILT
8125cat confdefs.h >>conftest.$ac_ext
8126cat >>conftest.$ac_ext <<_ACEOF
8127/* end confdefs.h. */
8128#include <memcheck.h>
8129#ifndef VALGRIND_DISCARD
8130#error VALGRIND_DISCARD not defined
8131#endif
8132_ACEOF
8133if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8134 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8135 ac_status=$?
8136 grep -v '^ *+' conftest.er1 >conftest.err
8137 rm -f conftest.er1
8138 cat conftest.err >&5
8139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8140 (exit $ac_status); } >/dev/null; then
8141 if test -s conftest.err; then
8142 ac_cpp_err=$ac_c_preproc_warn_flag
8143 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8144 else
8145 ac_cpp_err=
8146 fi
b61ff9c8 8147else
00020c16 8148 ac_cpp_err=yes
e9a25f70 8149fi
00020c16
ILT
8150if test -z "$ac_cpp_err"; then
8151 gcc_cv_header_memcheck_h=yes
e9a25f70 8152else
00020c16
ILT
8153 echo "$as_me: failed program was:" >&5
8154sed 's/^/| /' conftest.$ac_ext >&5
8155
8156 gcc_cv_header_memcheck_h=no
8157fi
8158rm -f conftest.err conftest.$ac_ext
8159 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
8160echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
8161
8162# Prepare PATH_SEPARATOR.
8163# The user is always right.
8164if test "${PATH_SEPARATOR+set}" != set; then
8165 echo "#! /bin/sh" >conf$$.sh
8166 echo "exit 0" >>conf$$.sh
8167 chmod +x conf$$.sh
8168 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8169 PATH_SEPARATOR=';'
8170 else
8171 PATH_SEPARATOR=:
8172 fi
8173 rm -f conf$$.sh
e9a25f70
JL
8174fi
8175
00020c16
ILT
8176# Find out how to test for executable files. Don't use a zero-byte file,
8177# as systems may use methods other than mode bits to determine executability.
8178cat >conf$$.file <<_ASEOF
8179#! /bin/sh
8180exit 0
8181_ASEOF
8182chmod +x conf$$.file
8183if test -x conf$$.file >/dev/null 2>&1; then
8184 ac_executable_p="test -x"
8185else
8186 ac_executable_p="test -f"
8187fi
8188rm -f conf$$.file
e9a25f70 8189
00020c16
ILT
8190# Extract the first word of "valgrind", so it can be a program name with args.
8191set dummy valgrind; ac_word=$2
b61ff9c8
BS
8192echo "$as_me:$LINENO: checking for $ac_word" >&5
8193echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
00020c16 8194if test "${ac_cv_path_valgrind_path+set}" = set; then
ba479fd2 8195 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1 8196else
00020c16
ILT
8197 case "$valgrind_path" in
8198 [\\/]* | ?:[\\/]*)
8199 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
8200 ;;
8201 *)
8202 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
8203 for ac_dir in $PATH; do
8204 IFS="$ac_save_IFS"
8205 test -z "$ac_dir" && ac_dir=.
8206 for ac_exec_ext in '' $ac_executable_extensions; do
8207 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
8208 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
8209 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
8210 break 2
8211 fi
8212 fi
8213 done
8214 done
8215 IFS="$ac_save_IFS"
8216 ;;
8217esac
861bb6c1 8218fi
00020c16
ILT
8219valgrind_path="$ac_cv_path_valgrind_path"
8220if test -n "$valgrind_path"; then
8221 echo "$as_me:$LINENO: result: $valgrind_path" >&5
8222echo "${ECHO_T}$valgrind_path" >&6
861bb6c1 8223else
b61ff9c8
BS
8224 echo "$as_me:$LINENO: result: no" >&5
8225echo "${ECHO_T}no" >&6
861bb6c1
JL
8226fi
8227
00020c16
ILT
8228 if test "x$valgrind_path" = "x" \
8229 || (test $have_valgrind_h = no \
8230 && test $gcc_cv_header_memcheck_h = no \
8231 && test $gcc_cv_header_valgrind_memcheck_h = no); then
8232 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
8233echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
8234 { (exit 1); exit 1; }; }
8235 fi
8236 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
8237 valgrind_command="$valgrind_path -q"
861bb6c1 8238
00020c16
ILT
8239cat >>confdefs.h <<\_ACEOF
8240#define ENABLE_VALGRIND_CHECKING 1
8241_ACEOF
8242
8243 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
8244
8245cat >>confdefs.h <<\_ACEOF
8246#define HAVE_VALGRIND_MEMCHECK_H 1
8247_ACEOF
2c4902b9 8248
0a4b6309 8249 fi
00020c16
ILT
8250 if test $gcc_cv_header_memcheck_h = yes; then
8251
8252cat >>confdefs.h <<\_ACEOF
8253#define HAVE_MEMCHECK_H 1
8254_ACEOF
0a4b6309 8255
0a4b6309
RL
8256 fi
8257fi
8258
18fc9bd4 8259
18fc9bd4 8260
00020c16
ILT
8261# Enable code coverage collection
8262# Check whether --enable-coverage or --disable-coverage was given.
8263if test "${enable_coverage+set}" = set; then
8264 enableval="$enable_coverage"
8265 case "${enableval}" in
8266 yes|noopt)
8267 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
8268 ;;
8269 opt)
8270 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
8271 ;;
8272 no)
8273 # a.k.a. --disable-coverage
8274 coverage_flags=""
8275 ;;
8276 *)
8277 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
8278echo "$as_me: error: unknown coverage setting $enableval" >&2;}
8279 { (exit 1); exit 1; }; }
8280 ;;
8281esac
861bb6c1 8282else
00020c16
ILT
8283 coverage_flags=""
8284fi;
8285
8286
8287# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
8288if test "${enable_gather_detailed_mem_stats+set}" = set; then
8289 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 8290
ba479fd2 8291else
00020c16
ILT
8292 enable_gather_detailed_mem_stats=no
8293fi;
8294if test x$enable_gather_detailed_mem_stats = xyes ; then
8295
8296cat >>confdefs.h <<\_ACEOF
8297#define GATHER_STATISTICS 1
8298_ACEOF
ba479fd2
NN
8299
8300fi
00020c16
ILT
8301
8302# -------------------------------
8303# Miscenalleous configure options
8304# -------------------------------
8305
8306# See if we are building gcc with C++.
8307# Check whether --enable-build-with-cxx or --disable-build-with-cxx was given.
8308if test "${enable_build_with_cxx+set}" = set; then
8309 enableval="$enable_build_with_cxx"
8310 ENABLE_BUILD_WITH_CXX=$enableval
ba479fd2 8311else
00020c16
ILT
8312 ENABLE_BUILD_WITH_CXX=no
8313fi;
ba479fd2 8314
00020c16
ILT
8315
8316# With stabs
8317
8318# Check whether --with-stabs or --without-stabs was given.
8319if test "${with_stabs+set}" = set; then
8320 withval="$with_stabs"
8321 stabs="$with_stabs"
6e3f3080 8322else
00020c16
ILT
8323 stabs=no
8324fi;
8325
8326# Determine whether or not multilibs are enabled.
8327# Check whether --enable-multilib or --disable-multilib was given.
8328if test "${enable_multilib+set}" = set; then
8329 enableval="$enable_multilib"
ba479fd2 8330
ba479fd2 8331else
00020c16
ILT
8332 enable_multilib=yes
8333fi;
861bb6c1 8334
343a6100 8335
00020c16
ILT
8336# Enable __cxa_atexit for C++.
8337# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
8338if test "${enable___cxa_atexit+set}" = set; then
8339 enableval="$enable___cxa_atexit"
8340
8341fi;
8342
8343# Enable C extension for decimal float if target supports it.
8344# Check whether --enable-decimal-float or --disable-decimal-float was given.
8345if test "${enable_decimal_float+set}" = set; then
8346 enableval="$enable_decimal_float"
8347
8348 case $enable_decimal_float in
8349 yes | no | bid | dpd) ;;
8350 *) { { echo "$as_me:$LINENO: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
8351Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&5
8352echo "$as_me: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
8353Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&2;}
8354 { (exit 1); exit 1; }; } ;;
8355 esac
343a6100 8356
0a4b6309 8357else
00020c16
ILT
8358
8359 case $target in
8360 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
8361 enable_decimal_float=yes
0a4b6309 8362 ;;
00020c16
ILT
8363 *)
8364 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
8365echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
8366 enable_decimal_float=no
8367 ;;
8368 esac
8369
8370fi;
8371
8372dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
8373
8374cat >>confdefs.h <<_ACEOF
8375#define ENABLE_DECIMAL_FLOAT $dfp
8376_ACEOF
8377
8378
8379# x86's use BID format instead of DPD
8380case x$enable_decimal_float in
8381 xyes)
8382 case $target in
8383 i?86*-*-linux* | x86_64*-*-linux*)
8384 enable_decimal_float=bid
8385 ;;
8386 *)
8387 enable_decimal_float=dpd
8388 ;;
0a4b6309 8389 esac
00020c16
ILT
8390 ;;
8391 xno)
8392 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
8393 # dependency on libdecnumber.
8394 enable_decimal_float=dpd
8395 ;;
8396esac
0a4b6309 8397
0a4b6309 8398
00020c16 8399bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
0a4b6309 8400
00020c16
ILT
8401cat >>confdefs.h <<_ACEOF
8402#define ENABLE_DECIMAL_BID_FORMAT $bid
8403_ACEOF
8404
8405
8406# Enable C extension for fixed-point arithmetic.
8407# Check whether --enable-fixed-point or --disable-fixed-point was given.
8408if test "${enable_fixed_point+set}" = set; then
8409 enableval="$enable_fixed_point"
0a4b6309 8410
861bb6c1 8411
3a000df0 8412else
3a000df0 8413
00020c16
ILT
8414 case $target in
8415 mips*-*-*)
8416 case $host in
8417 mips*-sgi-irix*)
8418 { echo "$as_me:$LINENO: WARNING: fixed-point is not supported on IRIX" >&5
8419echo "$as_me: WARNING: fixed-point is not supported on IRIX" >&2;}
8420 enable_fixed_point=no
8421 ;;
8422 *)
8423 enable_fixed_point=yes
8424 ;;
8425 esac
8426 ;;
8427 *)
8428 { echo "$as_me:$LINENO: WARNING: fixed-point is not supported for this target" >&5
8429echo "$as_me: WARNING: fixed-point is not supported for this target" >&2;}
8430 enable_fixed_point=no
8431 ;;
8432 esac
3a000df0 8433
00020c16 8434fi;
3a000df0
KC
8435
8436
00020c16 8437fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi`
ba479fd2 8438
00020c16
ILT
8439cat >>confdefs.h <<_ACEOF
8440#define ENABLE_FIXED_POINT $fixedpoint
8441_ACEOF
73458fb7
NN
8442
8443
00020c16
ILT
8444# Enable threads
8445# Pass with no value to take the default
8446# Pass with a value to specify a thread package
8447# Check whether --enable-threads or --disable-threads was given.
8448if test "${enable_threads+set}" = set; then
8449 enableval="$enable_threads"
9f18db39 8450
73458fb7 8451else
00020c16
ILT
8452 enable_threads=''
8453fi;
8454
8455# Check whether --enable-tls or --disable-tls was given.
8456if test "${enable_tls+set}" = set; then
8457 enableval="$enable_tls"
8458
8459 case $enable_tls in
8460 yes | no) ;;
8461 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
8462Valid choices are 'yes' and 'no'." >&5
8463echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
8464Valid choices are 'yes' and 'no'." >&2;}
8465 { (exit 1); exit 1; }; } ;;
8466 esac
8467
73458fb7 8468else
00020c16
ILT
8469 enable_tls=''
8470fi;
ba479fd2 8471
00020c16
ILT
8472# Check whether --enable-objc-gc or --disable-objc-gc was given.
8473if test "${enable_objc_gc+set}" = set; then
8474 enableval="$enable_objc_gc"
8475 if test x$enable_objc_gc = xno; then
8476 objc_boehm_gc=''
73458fb7 8477else
00020c16 8478 objc_boehm_gc=1
73458fb7 8479fi
00020c16
ILT
8480else
8481 objc_boehm_gc=''
8482fi;
73458fb7 8483
00020c16
ILT
8484
8485# Check whether --with-dwarf2 or --without-dwarf2 was given.
8486if test "${with_dwarf2+set}" = set; then
8487 withval="$with_dwarf2"
8488 dwarf2="$with_dwarf2"
73458fb7 8489else
00020c16
ILT
8490 dwarf2=no
8491fi;
3bbd5a19 8492
00020c16
ILT
8493# Check whether --enable-shared or --disable-shared was given.
8494if test "${enable_shared+set}" = set; then
8495 enableval="$enable_shared"
73458fb7 8496
00020c16
ILT
8497 case $enable_shared in
8498 yes | no) ;;
8499 *)
8500 enable_shared=no
8501 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
8502 for pkg in $enableval; do
8503 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
8504 enable_shared=yes
8505 fi
8506 done
8507 IFS="$ac_save_ifs"
8508 ;;
8509 esac
73458fb7 8510
73458fb7 8511else
00020c16
ILT
8512 enable_shared=yes
8513fi;
73458fb7 8514
7c27e184 8515
00020c16
ILT
8516
8517# Check whether --with-build-sysroot or --without-build-sysroot was given.
8518if test "${with_build_sysroot+set}" = set; then
8519 withval="$with_build_sysroot"
8520
8521fi;
8522
8523
8524# Check whether --with-sysroot or --without-sysroot was given.
8525if test "${with_sysroot+set}" = set; then
8526 withval="$with_sysroot"
8527
8528 case ${with_sysroot} in
8529 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
8530 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
8531 esac
8532
8533 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
8534 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
8535
8536 if test "x$prefix" = xNONE; then
8537 test_prefix=/usr/local
8538 else
8539 test_prefix=$prefix
8540 fi
8541 if test "x$exec_prefix" = xNONE; then
8542 test_exec_prefix=$test_prefix
8543 else
8544 test_exec_prefix=$exec_prefix
8545 fi
8546 case ${TARGET_SYSTEM_ROOT} in
8547 "${test_prefix}"|"${test_prefix}/"*|\
8548 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
8549 '${prefix}'|'${prefix}/'*|\
8550 '${exec_prefix}'|'${exec_prefix}/'*)
8551 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
8552 TARGET_SYSTEM_ROOT_DEFINE="$t"
8553 ;;
8554 esac
8555
8556else
8557
8558 TARGET_SYSTEM_ROOT=
8559 TARGET_SYSTEM_ROOT_DEFINE=
8560 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
8561
8562fi;
8563
8564
8565
8566
8567# Build with intermodule optimisations
8568# Check whether --enable-intermodule or --disable-intermodule was given.
8569if test "${enable_intermodule+set}" = set; then
8570 enableval="$enable_intermodule"
8571 case ${enable_intermodule} in
8572 yes) onestep="-onestep";;
8573 *) onestep="";;
8574esac
8575else
8576 onestep=""
8577fi;
8578
8579
8580
8581
8582# Check whether --with-pkgversion or --without-pkgversion was given.
8583if test "${with_pkgversion+set}" = set; then
8584 withval="$with_pkgversion"
8585 case "$withval" in
8586 yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
8587echo "$as_me: error: package version not specified" >&2;}
8588 { (exit 1); exit 1; }; } ;;
8589 no) PKGVERSION= ;;
8590 *) PKGVERSION="($withval) " ;;
8591 esac
8592else
8593 PKGVERSION="(GCC) "
8594
8595fi;
8596
8597
8598
8599
8600# Check whether --with-bugurl or --without-bugurl was given.
8601if test "${with_bugurl+set}" = set; then
8602 withval="$with_bugurl"
8603 case "$withval" in
8604 yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
8605echo "$as_me: error: bug URL not specified" >&2;}
8606 { (exit 1); exit 1; }; } ;;
8607 no) BUGURL=
8608 ;;
8609 *) BUGURL="$withval"
8610 ;;
8611 esac
8612else
8613 BUGURL="http://gcc.gnu.org/bugs.html"
8614
8615fi;
8616 case ${BUGURL} in
8617 "")
8618 REPORT_BUGS_TO=
8619 REPORT_BUGS_TEXI=
8620 ;;
8621 *)
8622 REPORT_BUGS_TO="<$BUGURL>"
8623 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8624 ;;
8625 esac;
8626
8627
8628
8629
8630# Sanity check enable_languages in case someone does not run the toplevel
8631# configure # script.
8632# Check whether --enable-languages or --disable-languages was given.
8633if test "${enable_languages+set}" = set; then
8634 enableval="$enable_languages"
8635 case ,${enable_languages}, in
8636 ,,|,yes,)
8637 # go safe -- we cannot be much sure without the toplevel
8638 # configure's
8639 # analysis of which target libs are present and usable
8640 enable_languages=c
8641 ;;
8642 *,all,*)
8643 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
8644echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
8645 { (exit 1); exit 1; }; }
8646 ;;
8647 *,c,*)
8648 ;;
8649 *)
8650 enable_languages=c,${enable_languages}
8651 ;;
8652esac
8653else
8654 enable_languages=c
8655fi;
8656
8657# Used by documentation targets
8658
8659
8660
8661
8662
8663# Check whether --with-multilib-list or --without-multilib-list was given.
8664if test "${with_multilib_list+set}" = set; then
8665 withval="$with_multilib_list"
8666 :
8667else
8668 with_multilib_list=default
8669fi;
8670
8671# -------------------------
8672# Checks for other programs
8673# -------------------------
8674
8675echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8676echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
8677set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
8678if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
8679 echo $ECHO_N "(cached) $ECHO_C" >&6
8680else
8681 cat >conftest.make <<\_ACEOF
8682all:
8683 @echo 'ac_maketemp="$(MAKE)"'
8684_ACEOF
8685# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8686eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
8687if test -n "$ac_maketemp"; then
8688 eval ac_cv_prog_make_${ac_make}_set=yes
8689else
8690 eval ac_cv_prog_make_${ac_make}_set=no
8691fi
8692rm -f conftest.make
8693fi
8694if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
b61ff9c8
BS
8695 echo "$as_me:$LINENO: result: yes" >&5
8696echo "${ECHO_T}yes" >&6
00020c16 8697 SET_MAKE=
73458fb7 8698else
b61ff9c8
BS
8699 echo "$as_me:$LINENO: result: no" >&5
8700echo "${ECHO_T}no" >&6
00020c16 8701 SET_MAKE="MAKE=${MAKE-make}"
73458fb7
NN
8702fi
8703
7c27e184 8704
00020c16
ILT
8705# Find some useful tools
8706for ac_prog in gawk mawk nawk awk
7c27e184
PB
8707do
8708 # Extract the first word of "$ac_prog", so it can be a program name with args.
8709set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
8710echo "$as_me:$LINENO: checking for $ac_word" >&5
8711echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
00020c16 8712if test "${ac_cv_prog_AWK+set}" = set; then
ba479fd2 8713 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7 8714else
00020c16
ILT
8715 if test -n "$AWK"; then
8716 ac_cv_prog_AWK="$AWK" # Let the user override the test.
73458fb7 8717else
ba479fd2
NN
8718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8719for as_dir in $PATH
8720do
8721 IFS=$as_save_IFS
8722 test -z "$as_dir" && as_dir=.
8723 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8724 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
00020c16 8725 ac_cv_prog_AWK="$ac_prog"
ba479fd2
NN
8726 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8727 break 2
8728 fi
8729done
8730done
8731
73458fb7
NN
8732fi
8733fi
00020c16
ILT
8734AWK=$ac_cv_prog_AWK
8735if test -n "$AWK"; then
8736 echo "$as_me:$LINENO: result: $AWK" >&5
8737echo "${ECHO_T}$AWK" >&6
73458fb7 8738else
b61ff9c8
BS
8739 echo "$as_me:$LINENO: result: no" >&5
8740echo "${ECHO_T}no" >&6
73458fb7
NN
8741fi
8742
00020c16 8743 test -n "$AWK" && break
7c27e184 8744done
7c27e184 8745
00020c16
ILT
8746# We need awk to create options.c and options.h.
8747# Bail out if it's missing.
8748case ${AWK} in
8749 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
8750echo "$as_me: error: can't build without awk, bailing out" >&2;}
8751 { (exit 1); exit 1; }; } ;;
8752esac
73458fb7 8753
00020c16
ILT
8754echo "$as_me:$LINENO: checking whether ln -s works" >&5
8755echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
8756if test "${gcc_cv_prog_LN_S+set}" = set; then
8757 echo $ECHO_N "(cached) $ECHO_C" >&6
8758else
8759 rm -f conftestdata_t
8760echo >conftestdata_f
8761if ln -s conftestdata_f conftestdata_t 2>/dev/null
8762then
8763 gcc_cv_prog_LN_S="ln -s"
8764else
8765 if ln conftestdata_f conftestdata_t 2>/dev/null
8766 then
8767 gcc_cv_prog_LN_S=ln
8768 else
8769 if cp -p conftestdata_f conftestdata_t 2>/dev/null
8770 then
8771 gcc_cv_prog_LN_S="cp -p"
8772 else
8773 gcc_cv_prog_LN_S=cp
8774 fi
8775 fi
8776fi
8777rm -f conftestdata_f conftestdata_t
8778
8779fi
8780LN_S="$gcc_cv_prog_LN_S"
8781if test "$gcc_cv_prog_LN_S" = "ln -s"; then
8782 echo "$as_me:$LINENO: result: yes" >&5
8783echo "${ECHO_T}yes" >&6
8784else
8785 if test "$gcc_cv_prog_LN_S" = "ln"; then
8786 echo "$as_me:$LINENO: result: no, using ln" >&5
8787echo "${ECHO_T}no, using ln" >&6
8788 else
8789 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
8790echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
8791 fi
8792fi
8793
8794echo "$as_me:$LINENO: checking whether ln works" >&5
8795echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
8796if test "${acx_cv_prog_LN+set}" = set; then
8797 echo $ECHO_N "(cached) $ECHO_C" >&6
8798else
8799 rm -f conftestdata_t
8800echo >conftestdata_f
8801if ln conftestdata_f conftestdata_t 2>/dev/null
8802then
8803 acx_cv_prog_LN=ln
8804else
8805 acx_cv_prog_LN=no
8806fi
8807rm -f conftestdata_f conftestdata_t
8808
8809fi
8810if test $acx_cv_prog_LN = no; then
8811 LN="$LN_S"
8812 echo "$as_me:$LINENO: result: no, using $LN" >&5
8813echo "${ECHO_T}no, using $LN" >&6
8814else
8815 LN="$acx_cv_prog_LN"
8816 echo "$as_me:$LINENO: result: yes" >&5
8817echo "${ECHO_T}yes" >&6
8818fi
8819
8820if test -n "$ac_tool_prefix"; then
8821 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8822set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8823echo "$as_me:$LINENO: checking for $ac_word" >&5
b61ff9c8 8824echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
00020c16 8825if test "${ac_cv_prog_RANLIB+set}" = set; then
ba479fd2 8826 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7 8827else
00020c16
ILT
8828 if test -n "$RANLIB"; then
8829 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
73458fb7 8830else
ba479fd2
NN
8831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8832for as_dir in $PATH
8833do
8834 IFS=$as_save_IFS
8835 test -z "$as_dir" && as_dir=.
8836 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8837 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
00020c16 8838 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
ba479fd2
NN
8839 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8840 break 2
8841 fi
8842done
8843done
8844
73458fb7
NN
8845fi
8846fi
00020c16
ILT
8847RANLIB=$ac_cv_prog_RANLIB
8848if test -n "$RANLIB"; then
8849 echo "$as_me:$LINENO: result: $RANLIB" >&5
8850echo "${ECHO_T}$RANLIB" >&6
73458fb7 8851else
b61ff9c8
BS
8852 echo "$as_me:$LINENO: result: no" >&5
8853echo "${ECHO_T}no" >&6
73458fb7
NN
8854fi
8855
00020c16
ILT
8856fi
8857if test -z "$ac_cv_prog_RANLIB"; then
8858 ac_ct_RANLIB=$RANLIB
8859 # Extract the first word of "ranlib", so it can be a program name with args.
8860set dummy ranlib; ac_word=$2
b61ff9c8
BS
8861echo "$as_me:$LINENO: checking for $ac_word" >&5
8862echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
00020c16 8863if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
f6a874ac
JW
8864 echo $ECHO_N "(cached) $ECHO_C" >&6
8865else
00020c16
ILT
8866 if test -n "$ac_ct_RANLIB"; then
8867 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
f6a874ac
JW
8868else
8869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8870for as_dir in $PATH
8871do
8872 IFS=$as_save_IFS
8873 test -z "$as_dir" && as_dir=.
8874 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8875 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
00020c16 8876 ac_cv_prog_ac_ct_RANLIB="ranlib"
f6a874ac
JW
8877 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8878 break 2
8879 fi
8880done
8881done
8882
00020c16 8883 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
f6a874ac
JW
8884fi
8885fi
00020c16
ILT
8886ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8887if test -n "$ac_ct_RANLIB"; then
8888 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8889echo "${ECHO_T}$ac_ct_RANLIB" >&6
f6a874ac 8890else
b61ff9c8
BS
8891 echo "$as_me:$LINENO: result: no" >&5
8892echo "${ECHO_T}no" >&6
f6a874ac
JW
8893fi
8894
00020c16
ILT
8895 RANLIB=$ac_ct_RANLIB
8896else
8897 RANLIB="$ac_cv_prog_RANLIB"
f6a874ac
JW
8898fi
8899
00020c16
ILT
8900case "${host}" in
8901*-*-darwin*)
8902 # By default, the Darwin ranlib will not treat common symbols as
8903 # definitions when building the archive table of contents. Other
8904 # ranlibs do that; pass an option to the Darwin ranlib that makes
8905 # it behave similarly.
8906 ranlib_flags="-c"
8907 ;;
8908*)
8909 ranlib_flags=""
8910esac
8911
8912
8913# Find a good install program. We prefer a C program (faster),
8914# so one script is as good as another. But avoid the broken or
8915# incompatible versions:
8916# SysV /etc/install, /usr/sbin/install
8917# SunOS /usr/etc/install
8918# IRIX /sbin/install
8919# AIX /bin/install
8920# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8921# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8922# ./install, which can be erroneously created by make from ./install.sh.
8923echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
8924echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
8925if test -z "$INSTALL"; then
8926if test "${ac_cv_path_install+set}" = set; then
8927 echo $ECHO_N "(cached) $ECHO_C" >&6
f6a874ac 8928else
00020c16
ILT
8929 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
8930 for ac_dir in $PATH; do
8931 # Account for people who put trailing slashes in PATH elements.
8932 case "$ac_dir/" in
8933 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
8934 *)
8935 # OSF1 and SCO ODT 3.0 have their own names for install.
8936 for ac_prog in ginstall scoinst install; do
8937 if test -f $ac_dir/$ac_prog; then
8938 if test $ac_prog = install &&
8939 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
8940 # AIX install. It has an incompatible calling convention.
8941 # OSF/1 installbsd also uses dspmsg, but is usable.
8942 :
8943 else
8944 ac_cv_path_install="$ac_dir/$ac_prog -c"
8945 break 2
8946 fi
8947 fi
8948 done
8949 ;;
8950 esac
8951 done
8952 IFS="$ac_save_IFS"
8953
8954fi
8955 if test "${ac_cv_path_install+set}" = set; then
8956 INSTALL="$ac_cv_path_install"
8957 else
8958 # As a last resort, use the slow shell script. We don't cache a
8959 # path for INSTALL within a source directory, because that will
8960 # break other packages using the cache if that directory is
8961 # removed, or if the path is relative.
8962 INSTALL="$ac_install_sh"
8963 fi
8964fi
8965echo "$as_me:$LINENO: result: $INSTALL" >&5
8966echo "${ECHO_T}$INSTALL" >&6
8967
8968# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8969# It thinks the first close brace ends the variable substitution.
8970test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8971
8972test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8973
8974
8975# See if cmp has --ignore-initial.
8976echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
8977echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
8978if test "${gcc_cv_prog_cmp_skip+set}" = set; then
8979 echo $ECHO_N "(cached) $ECHO_C" >&6
8980else
8981 echo abfoo >t1
8982 echo cdfoo >t2
8983 gcc_cv_prog_cmp_skip=slowcompare
8984 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
8985 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
8986 :
8987 else
8988 gcc_cv_prog_cmp_skip=gnucompare
8989 fi
8990 fi
8991 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
8992 if cmp t1 t2 2 2 > /dev/null 2>&1; then
8993 if cmp t1 t2 1 1 > /dev/null 2>&1; then
8994 :
8995 else
8996 gcc_cv_prog_cmp_skip=fastcompare
8997 fi
8998 fi
8999 fi
9000 rm t1 t2
9001
9002fi
9003echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
9004echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
9005make_compare_target=$gcc_cv_prog_cmp_skip
9006
9007
9008
9009# See if we have the mktemp command.
9010# Extract the first word of "mktemp", so it can be a program name with args.
9011set dummy mktemp; ac_word=$2
b61ff9c8
BS
9012echo "$as_me:$LINENO: checking for $ac_word" >&5
9013echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
00020c16 9014if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
f6a874ac
JW
9015 echo $ECHO_N "(cached) $ECHO_C" >&6
9016else
00020c16
ILT
9017 if test -n "$have_mktemp_command"; then
9018 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
f6a874ac
JW
9019else
9020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9021for as_dir in $PATH
9022do
9023 IFS=$as_save_IFS
9024 test -z "$as_dir" && as_dir=.
9025 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 9026 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
00020c16 9027 ac_cv_prog_have_mktemp_command="yes"
f6a874ac
JW
9028 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9029 break 2
9030 fi
9031done
9032done
9033
00020c16 9034 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
f6a874ac
JW
9035fi
9036fi
00020c16
ILT
9037have_mktemp_command=$ac_cv_prog_have_mktemp_command
9038if test -n "$have_mktemp_command"; then
9039 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
9040echo "${ECHO_T}$have_mktemp_command" >&6
f6a874ac 9041else
b61ff9c8
BS
9042 echo "$as_me:$LINENO: result: no" >&5
9043echo "${ECHO_T}no" >&6
f6a874ac
JW
9044fi
9045
f6a874ac 9046
00020c16
ILT
9047# See if makeinfo has been installed and is modern enough
9048# that we can use it.
ca9bc441 9049
00020c16
ILT
9050 # Extract the first word of "makeinfo", so it can be a program name with args.
9051set dummy makeinfo; ac_word=$2
9052echo "$as_me:$LINENO: checking for $ac_word" >&5
9053echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9054if test "${ac_cv_prog_MAKEINFO+set}" = set; then
ba479fd2 9055 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 9056else
00020c16
ILT
9057 if test -n "$MAKEINFO"; then
9058 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
956d6950 9059else
00020c16
ILT
9060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9061for as_dir in $PATH
9062do
9063 IFS=$as_save_IFS
9064 test -z "$as_dir" && as_dir=.
9065 for ac_exec_ext in '' $ac_executable_extensions; do
9066 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9067 ac_cv_prog_MAKEINFO="makeinfo"
9068 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9069 break 2
9070 fi
9071done
9072done
ba479fd2 9073
956d6950 9074fi
00020c16
ILT
9075fi
9076MAKEINFO=$ac_cv_prog_MAKEINFO
9077if test -n "$MAKEINFO"; then
9078 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
9079echo "${ECHO_T}$MAKEINFO" >&6
956d6950 9080else
00020c16
ILT
9081 echo "$as_me:$LINENO: result: no" >&5
9082echo "${ECHO_T}no" >&6
956d6950 9083fi
956d6950 9084
00020c16
ILT
9085 if test -n "$MAKEINFO"; then
9086 # Found it, now check the version.
9087 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
9088echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
9089if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
9090 echo $ECHO_N "(cached) $ECHO_C" >&6
9091else
9092 ac_prog_version=`eval $MAKEINFO --version 2>&1 |
9093 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
956d6950 9094
00020c16
ILT
9095 case $ac_prog_version in
9096 '') gcc_cv_prog_makeinfo_modern=no;;
9097 4.[7-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;;
9098 *) gcc_cv_prog_makeinfo_modern=no;;
9099 esac
ba479fd2 9100
956d6950 9101fi
00020c16
ILT
9102echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
9103echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
9104 else
9105 gcc_cv_prog_makeinfo_modern=no
9106 fi
9107 if test $gcc_cv_prog_makeinfo_modern = no; then
9108 MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo"
9109 fi
956d6950 9110
00020c16
ILT
9111if test $gcc_cv_prog_makeinfo_modern = no; then
9112 { echo "$as_me:$LINENO: WARNING:
9113*** Makeinfo is missing or too old.
9114*** Info documentation will not be built." >&5
9115echo "$as_me: WARNING:
9116*** Makeinfo is missing or too old.
9117*** Info documentation will not be built." >&2;}
9118 BUILD_INFO=
9119else
9120 BUILD_INFO=info
956d6950
JL
9121fi
9122
63cf211a 9123
00020c16
ILT
9124# Is pod2man recent enough to regenerate manpages?
9125echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
9126echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
9127if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
9128 echo "$as_me:$LINENO: result: yes" >&5
9129echo "${ECHO_T}yes" >&6
9130 GENERATED_MANPAGES=generated-manpages
956d6950 9131else
00020c16
ILT
9132 echo "$as_me:$LINENO: result: no" >&5
9133echo "${ECHO_T}no" >&6
9134 GENERATED_MANPAGES=
956d6950 9135fi
ba479fd2 9136
956d6950 9137
00020c16 9138MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
956d6950 9139
00020c16
ILT
9140# How about lex?
9141for ac_prog in flex
9142do
9143 # Extract the first word of "$ac_prog", so it can be a program name with args.
9144set dummy $ac_prog; ac_word=$2
9145echo "$as_me:$LINENO: checking for $ac_word" >&5
9146echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9147if test "${ac_cv_prog_FLEX+set}" = set; then
ba479fd2 9148 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 9149else
00020c16
ILT
9150 if test -n "$FLEX"; then
9151 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
956d6950 9152else
00020c16
ILT
9153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9154for as_dir in $PATH
9155do
9156 IFS=$as_save_IFS
9157 test -z "$as_dir" && as_dir=.
9158 for ac_exec_ext in '' $ac_executable_extensions; do
9159 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9160 ac_cv_prog_FLEX="$ac_prog"
9161 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9162 break 2
9163 fi
9164done
9165done
ba479fd2 9166
956d6950 9167fi
956d6950 9168fi
00020c16
ILT
9169FLEX=$ac_cv_prog_FLEX
9170if test -n "$FLEX"; then
9171 echo "$as_me:$LINENO: result: $FLEX" >&5
9172echo "${ECHO_T}$FLEX" >&6
9173else
9174 echo "$as_me:$LINENO: result: no" >&5
9175echo "${ECHO_T}no" >&6
9176fi
ba479fd2 9177
00020c16
ILT
9178 test -n "$FLEX" && break
9179done
9180test -n "$FLEX" || FLEX="$MISSING flex"
9181
9182
9183# Bison?
9184for ac_prog in bison
9185do
9186 # Extract the first word of "$ac_prog", so it can be a program name with args.
9187set dummy $ac_prog; ac_word=$2
9188echo "$as_me:$LINENO: checking for $ac_word" >&5
9189echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9190if test "${ac_cv_prog_BISON+set}" = set; then
9191 echo $ECHO_N "(cached) $ECHO_C" >&6
9192else
9193 if test -n "$BISON"; then
9194 ac_cv_prog_BISON="$BISON" # Let the user override the test.
9195else
9196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9197for as_dir in $PATH
9198do
9199 IFS=$as_save_IFS
9200 test -z "$as_dir" && as_dir=.
9201 for ac_exec_ext in '' $ac_executable_extensions; do
9202 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9203 ac_cv_prog_BISON="$ac_prog"
9204 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9205 break 2
9206 fi
9207done
9208done
956d6950 9209
00020c16
ILT
9210fi
9211fi
9212BISON=$ac_cv_prog_BISON
9213if test -n "$BISON"; then
9214 echo "$as_me:$LINENO: result: $BISON" >&5
9215echo "${ECHO_T}$BISON" >&6
9216else
9217 echo "$as_me:$LINENO: result: no" >&5
9218echo "${ECHO_T}no" >&6
956d6950
JL
9219fi
9220
00020c16
ILT
9221 test -n "$BISON" && break
9222done
9223test -n "$BISON" || BISON="$MISSING bison"
9224
9225
9226# Binutils are not build modules, unlike bison/flex/makeinfo. So we
9227# check for build == host before using them.
9228
9229# NM
9230if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
9231 && test -d ../binutils ; then
9232 NM='$(objdir)/../binutils/nm-new'
9233else
9234 # Extract the first word of "nm", so it can be a program name with args.
9235set dummy nm; ac_word=$2
9236echo "$as_me:$LINENO: checking for $ac_word" >&5
9237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9238if test "${ac_cv_prog_NM+set}" = set; then
9239 echo $ECHO_N "(cached) $ECHO_C" >&6
9240else
9241 if test -n "$NM"; then
9242 ac_cv_prog_NM="$NM" # Let the user override the test.
9243else
9244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9245for as_dir in $PATH
9246do
9247 IFS=$as_save_IFS
9248 test -z "$as_dir" && as_dir=.
9249 for ac_exec_ext in '' $ac_executable_extensions; do
9250 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9251 ac_cv_prog_NM="nm"
9252 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9253 break 2
9254 fi
9255done
9256done
9257
9258 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
9259fi
9260fi
9261NM=$ac_cv_prog_NM
9262if test -n "$NM"; then
9263 echo "$as_me:$LINENO: result: $NM" >&5
9264echo "${ECHO_T}$NM" >&6
9265else
9266 echo "$as_me:$LINENO: result: no" >&5
9267echo "${ECHO_T}no" >&6
9268fi
9269
9270fi
9271
9272# AR
9273if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
9274 && test -d ../binutils ; then
9275 AR='$(objdir)/../binutils/ar'
9276else
9277 # Extract the first word of "ar", so it can be a program name with args.
9278set dummy ar; ac_word=$2
9279echo "$as_me:$LINENO: checking for $ac_word" >&5
9280echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9281if test "${ac_cv_prog_AR+set}" = set; then
9282 echo $ECHO_N "(cached) $ECHO_C" >&6
9283else
9284 if test -n "$AR"; then
9285 ac_cv_prog_AR="$AR" # Let the user override the test.
9286else
9287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9288for as_dir in $PATH
9289do
9290 IFS=$as_save_IFS
9291 test -z "$as_dir" && as_dir=.
9292 for ac_exec_ext in '' $ac_executable_extensions; do
9293 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9294 ac_cv_prog_AR="ar"
9295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9296 break 2
9297 fi
9298done
9299done
9300
9301 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
9302fi
9303fi
9304AR=$ac_cv_prog_AR
9305if test -n "$AR"; then
9306 echo "$as_me:$LINENO: result: $AR" >&5
9307echo "${ECHO_T}$AR" >&6
9308else
9309 echo "$as_me:$LINENO: result: no" >&5
9310echo "${ECHO_T}no" >&6
9311fi
9312
9313fi
9314
9315
9316# --------------------
9317# Checks for C headers
9318# --------------------
9319
9320# Need to reject headers which give warnings, so that the -Werror bootstrap
9321# works later. *sigh* This needs to come before all header checks.
9322
9323ac_c_preproc_warn_flag=yes
9324
9325echo "$as_me:$LINENO: checking for ANSI C header files" >&5
9326echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9327if test "${ac_cv_header_stdc+set}" = set; then
18fc9bd4
RG
9328 echo $ECHO_N "(cached) $ECHO_C" >&6
9329else
9330 cat >conftest.$ac_ext <<_ACEOF
9331/* confdefs.h. */
9332_ACEOF
9333cat confdefs.h >>conftest.$ac_ext
9334cat >>conftest.$ac_ext <<_ACEOF
9335/* end confdefs.h. */
00020c16
ILT
9336#include <stdlib.h>
9337#include <stdarg.h>
18fc9bd4 9338#include <string.h>
00020c16
ILT
9339#include <float.h>
9340
18fc9bd4
RG
9341int
9342main ()
9343{
9344
9345 ;
9346 return 0;
9347}
9348_ACEOF
9349rm -f conftest.$ac_objext
b61ff9c8
BS
9350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9351 (eval $ac_compile) 2>conftest.er1
18fc9bd4
RG
9352 ac_status=$?
9353 grep -v '^ *+' conftest.er1 >conftest.err
9354 rm -f conftest.er1
9355 cat conftest.err >&5
9356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9357 (exit $ac_status); } &&
9358 { ac_try='test -z "$ac_c_werror_flag"
9359 || test ! -s conftest.err'
9360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9361 (eval $ac_try) 2>&5
9362 ac_status=$?
9363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9364 (exit $ac_status); }; } &&
9365 { ac_try='test -s conftest.$ac_objext'
9366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9367 (eval $ac_try) 2>&5
9368 ac_status=$?
9369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9370 (exit $ac_status); }; }; then
00020c16 9371 ac_cv_header_stdc=yes
18fc9bd4
RG
9372else
9373 echo "$as_me: failed program was:" >&5
9374sed 's/^/| /' conftest.$ac_ext >&5
9375
00020c16 9376ac_cv_header_stdc=no
18fc9bd4 9377fi
b61ff9c8 9378rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18fc9bd4 9379
00020c16
ILT
9380if test $ac_cv_header_stdc = yes; then
9381 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9382 cat >conftest.$ac_ext <<_ACEOF
9383/* confdefs.h. */
9384_ACEOF
9385cat confdefs.h >>conftest.$ac_ext
9386cat >>conftest.$ac_ext <<_ACEOF
9387/* end confdefs.h. */
9388#include <string.h>
9389
18fc9bd4 9390_ACEOF
00020c16
ILT
9391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9392 $EGREP "memchr" >/dev/null 2>&1; then
9393 :
9394else
9395 ac_cv_header_stdc=no
9396fi
9397rm -f conftest*
18fc9bd4
RG
9398
9399fi
9400
00020c16
ILT
9401if test $ac_cv_header_stdc = yes; then
9402 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 9403 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9404/* confdefs.h. */
9405_ACEOF
9406cat confdefs.h >>conftest.$ac_ext
9407cat >>conftest.$ac_ext <<_ACEOF
9408/* end confdefs.h. */
00020c16
ILT
9409#include <stdlib.h>
9410
9411_ACEOF
9412if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9413 $EGREP "free" >/dev/null 2>&1; then
9414 :
9415else
9416 ac_cv_header_stdc=no
9417fi
9418rm -f conftest*
9419
9420fi
9421
9422if test $ac_cv_header_stdc = yes; then
9423 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9424 if test "$cross_compiling" = yes; then
9425 :
9426else
9427 cat >conftest.$ac_ext <<_ACEOF
9428/* confdefs.h. */
9429_ACEOF
9430cat confdefs.h >>conftest.$ac_ext
9431cat >>conftest.$ac_ext <<_ACEOF
9432/* end confdefs.h. */
9433#include <ctype.h>
9434#if ((' ' & 0x0FF) == 0x020)
9435# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9436# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9437#else
9438# define ISLOWER(c) \
9439 (('a' <= (c) && (c) <= 'i') \
9440 || ('j' <= (c) && (c) <= 'r') \
9441 || ('s' <= (c) && (c) <= 'z'))
9442# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9443#endif
9444
9445#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9446int
9447main ()
9448{
9449 int i;
9450 for (i = 0; i < 256; i++)
9451 if (XOR (islower (i), ISLOWER (i))
9452 || toupper (i) != TOUPPER (i))
9453 exit(2);
9454 exit (0);
9455}
9456_ACEOF
9457rm -f conftest$ac_exeext
9458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9459 (eval $ac_link) 2>&5
9460 ac_status=$?
9461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9462 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9464 (eval $ac_try) 2>&5
9465 ac_status=$?
9466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9467 (exit $ac_status); }; }; then
9468 :
9469else
9470 echo "$as_me: program exited with status $ac_status" >&5
9471echo "$as_me: failed program was:" >&5
9472sed 's/^/| /' conftest.$ac_ext >&5
9473
9474( exit $ac_status )
9475ac_cv_header_stdc=no
9476fi
9477rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9478fi
9479fi
9480fi
9481echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
9482echo "${ECHO_T}$ac_cv_header_stdc" >&6
9483if test $ac_cv_header_stdc = yes; then
9484
9485cat >>confdefs.h <<\_ACEOF
9486#define STDC_HEADERS 1
9487_ACEOF
9488
9489fi
9490
9491echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
9492echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
9493if test "${ac_cv_header_time+set}" = set; then
9494 echo $ECHO_N "(cached) $ECHO_C" >&6
9495else
9496 cat >conftest.$ac_ext <<_ACEOF
9497/* confdefs.h. */
9498_ACEOF
9499cat confdefs.h >>conftest.$ac_ext
9500cat >>conftest.$ac_ext <<_ACEOF
9501/* end confdefs.h. */
9502#include <sys/types.h>
9503#include <sys/time.h>
9504#include <time.h>
9505
9506int
9507main ()
9508{
9509if ((struct tm *) 0)
9510return 0;
9511 ;
9512 return 0;
9513}
9514_ACEOF
9515rm -f conftest.$ac_objext
9516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9517 (eval $ac_compile) 2>conftest.er1
9518 ac_status=$?
9519 grep -v '^ *+' conftest.er1 >conftest.err
9520 rm -f conftest.er1
9521 cat conftest.err >&5
9522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9523 (exit $ac_status); } &&
9524 { ac_try='test -z "$ac_c_werror_flag"
9525 || test ! -s conftest.err'
9526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9527 (eval $ac_try) 2>&5
9528 ac_status=$?
9529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9530 (exit $ac_status); }; } &&
9531 { ac_try='test -s conftest.$ac_objext'
9532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9533 (eval $ac_try) 2>&5
9534 ac_status=$?
9535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9536 (exit $ac_status); }; }; then
9537 ac_cv_header_time=yes
9538else
9539 echo "$as_me: failed program was:" >&5
9540sed 's/^/| /' conftest.$ac_ext >&5
9541
9542ac_cv_header_time=no
9543fi
9544rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9545fi
9546echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
9547echo "${ECHO_T}$ac_cv_header_time" >&6
9548if test $ac_cv_header_time = yes; then
9549
9550cat >>confdefs.h <<\_ACEOF
9551#define TIME_WITH_SYS_TIME 1
9552_ACEOF
9553
9554fi
9555
9556echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
9557echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
9558if test "${gcc_cv_header_string+set}" = set; then
9559 echo $ECHO_N "(cached) $ECHO_C" >&6
9560else
9561 cat >conftest.$ac_ext <<_ACEOF
9562/* confdefs.h. */
9563_ACEOF
9564cat confdefs.h >>conftest.$ac_ext
9565cat >>conftest.$ac_ext <<_ACEOF
9566/* end confdefs.h. */
9567#include <string.h>
9568#include <strings.h>
9569int
9570main ()
9571{
9572
9573 ;
9574 return 0;
9575}
9576_ACEOF
9577rm -f conftest.$ac_objext
9578if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9579 (eval $ac_compile) 2>conftest.er1
9580 ac_status=$?
9581 grep -v '^ *+' conftest.er1 >conftest.err
9582 rm -f conftest.er1
9583 cat conftest.err >&5
9584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9585 (exit $ac_status); } &&
9586 { ac_try='test -z "$ac_c_werror_flag"
9587 || test ! -s conftest.err'
9588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9589 (eval $ac_try) 2>&5
9590 ac_status=$?
9591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9592 (exit $ac_status); }; } &&
9593 { ac_try='test -s conftest.$ac_objext'
9594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9595 (eval $ac_try) 2>&5
9596 ac_status=$?
9597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9598 (exit $ac_status); }; }; then
9599 gcc_cv_header_string=yes
9600else
9601 echo "$as_me: failed program was:" >&5
9602sed 's/^/| /' conftest.$ac_ext >&5
9603
9604gcc_cv_header_string=no
9605fi
9606rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9607fi
9608echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
9609echo "${ECHO_T}$gcc_cv_header_string" >&6
9610if test $gcc_cv_header_string = yes; then
9611
9612cat >>confdefs.h <<\_ACEOF
9613#define STRING_WITH_STRINGS 1
9614_ACEOF
9615
9616fi
9617
9618echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
9619echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
9620if test "${ac_cv_header_sys_wait_h+set}" = set; then
9621 echo $ECHO_N "(cached) $ECHO_C" >&6
9622else
9623 cat >conftest.$ac_ext <<_ACEOF
9624/* confdefs.h. */
9625_ACEOF
9626cat confdefs.h >>conftest.$ac_ext
9627cat >>conftest.$ac_ext <<_ACEOF
9628/* end confdefs.h. */
9629#include <sys/types.h>
9630#include <sys/wait.h>
9631#ifndef WEXITSTATUS
b61ff9c8 9632# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
9633#endif
9634#ifndef WIFEXITED
ba479fd2 9635# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 9636#endif
ba479fd2
NN
9637
9638int
9639main ()
9640{
9641 int s;
9642 wait (&s);
9643 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9644 ;
9645 return 0;
9646}
9647_ACEOF
9648rm -f conftest.$ac_objext
b61ff9c8
BS
9649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9650 (eval $ac_compile) 2>conftest.er1
ba479fd2 9651 ac_status=$?
86da66b5
HPN
9652 grep -v '^ *+' conftest.er1 >conftest.err
9653 rm -f conftest.er1
9654 cat conftest.err >&5
ba479fd2 9655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9656 (exit $ac_status); } &&
9657 { ac_try='test -z "$ac_c_werror_flag"
9658 || test ! -s conftest.err'
9659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9660 (eval $ac_try) 2>&5
9661 ac_status=$?
9662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9663 (exit $ac_status); }; } &&
9664 { ac_try='test -s conftest.$ac_objext'
9665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9666 (eval $ac_try) 2>&5
9667 ac_status=$?
9668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9669 (exit $ac_status); }; }; then
e9831ca0
KG
9670 ac_cv_header_sys_wait_h=yes
9671else
ba479fd2
NN
9672 echo "$as_me: failed program was:" >&5
9673sed 's/^/| /' conftest.$ac_ext >&5
9674
b61ff9c8 9675ac_cv_header_sys_wait_h=no
e9831ca0 9676fi
b61ff9c8 9677rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 9678fi
b61ff9c8
BS
9679echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
9680echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 9681if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
9682
9683cat >>confdefs.h <<\_ACEOF
e9831ca0 9684#define HAVE_SYS_WAIT_H 1
ba479fd2 9685_ACEOF
6e3f3080 9686
63cf211a 9687fi
6e3f3080 9688
ba479fd2
NN
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
dfb77e37
KC
9710
9711for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 9712 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 9713 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 9714 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 9715do
ba479fd2 9716as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b61ff9c8
BS
9717echo "$as_me:$LINENO: checking for $ac_header" >&5
9718echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9719if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 9720 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9721else
18fc9bd4 9722 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9723/* confdefs.h. */
9724_ACEOF
9725cat confdefs.h >>conftest.$ac_ext
9726cat >>conftest.$ac_ext <<_ACEOF
9727/* end confdefs.h. */
9728#include <$ac_header>
9729_ACEOF
b61ff9c8
BS
9730if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9731 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9732 ac_status=$?
9733 grep -v '^ *+' conftest.er1 >conftest.err
9734 rm -f conftest.er1
9735 cat conftest.err >&5
9736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9737 (exit $ac_status); } >/dev/null; then
9738 if test -s conftest.err; then
9739 ac_cpp_err=$ac_c_preproc_warn_flag
9740 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9741 else
9742 ac_cpp_err=
9743 fi
9744else
9745 ac_cpp_err=yes
9746fi
9747if test -z "$ac_cpp_err"; then
18fc9bd4 9748 eval "$as_ac_Header=yes"
ba479fd2
NN
9749else
9750 echo "$as_me: failed program was:" >&5
9751sed 's/^/| /' conftest.$ac_ext >&5
9752
18fc9bd4 9753 eval "$as_ac_Header=no"
ba479fd2
NN
9754fi
9755rm -f conftest.err conftest.$ac_ext
6e3f3080 9756fi
b61ff9c8
BS
9757echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9758echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
9759if test `eval echo '${'$as_ac_Header'}'` = yes; then
9760 cat >>confdefs.h <<_ACEOF
9761#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9762_ACEOF
9763
956d6950
JL
9764fi
9765done
9766
9767
f24af81b 9768# Check for thread headers.
b61ff9c8
BS
9769echo "$as_me:$LINENO: checking for thread.h" >&5
9770echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
ba479fd2
NN
9771if test "${ac_cv_header_thread_h+set}" = set; then
9772 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9773else
18fc9bd4 9774 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9775/* confdefs.h. */
9776_ACEOF
9777cat confdefs.h >>conftest.$ac_ext
9778cat >>conftest.$ac_ext <<_ACEOF
9779/* end confdefs.h. */
9780#include <thread.h>
9781_ACEOF
b61ff9c8
BS
9782if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9783 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9784 ac_status=$?
9785 grep -v '^ *+' conftest.er1 >conftest.err
9786 rm -f conftest.er1
9787 cat conftest.err >&5
9788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9789 (exit $ac_status); } >/dev/null; then
9790 if test -s conftest.err; then
9791 ac_cpp_err=$ac_c_preproc_warn_flag
9792 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9793 else
9794 ac_cpp_err=
9795 fi
9796else
9797 ac_cpp_err=yes
9798fi
9799if test -z "$ac_cpp_err"; then
18fc9bd4 9800 ac_cv_header_thread_h=yes
ba479fd2
NN
9801else
9802 echo "$as_me: failed program was:" >&5
9803sed 's/^/| /' conftest.$ac_ext >&5
9804
18fc9bd4 9805 ac_cv_header_thread_h=no
ba479fd2
NN
9806fi
9807rm -f conftest.err conftest.$ac_ext
6e3f3080 9808fi
b61ff9c8
BS
9809echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
9810echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 9811if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
9812 have_thread_h=yes
9813else
ba479fd2 9814 have_thread_h=
f24af81b
TT
9815fi
9816
b61ff9c8
BS
9817echo "$as_me:$LINENO: checking for pthread.h" >&5
9818echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
ba479fd2
NN
9819if test "${ac_cv_header_pthread_h+set}" = set; then
9820 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 9821else
18fc9bd4 9822 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9823/* confdefs.h. */
9824_ACEOF
9825cat confdefs.h >>conftest.$ac_ext
9826cat >>conftest.$ac_ext <<_ACEOF
9827/* end confdefs.h. */
9828#include <pthread.h>
9829_ACEOF
b61ff9c8
BS
9830if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9831 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9832 ac_status=$?
9833 grep -v '^ *+' conftest.er1 >conftest.err
9834 rm -f conftest.er1
9835 cat conftest.err >&5
9836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9837 (exit $ac_status); } >/dev/null; then
9838 if test -s conftest.err; then
9839 ac_cpp_err=$ac_c_preproc_warn_flag
9840 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9841 else
9842 ac_cpp_err=
9843 fi
9844else
9845 ac_cpp_err=yes
9846fi
9847if test -z "$ac_cpp_err"; then
18fc9bd4 9848 ac_cv_header_pthread_h=yes
ba479fd2 9849else
18fc9bd4
RG
9850 echo "$as_me: failed program was:" >&5
9851sed 's/^/| /' conftest.$ac_ext >&5
9852
9853 ac_cv_header_pthread_h=no
9854fi
9855rm -f conftest.err conftest.$ac_ext
6e3f3080 9856fi
b61ff9c8
BS
9857echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
9858echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 9859if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
9860 have_pthread_h=yes
9861else
ba479fd2 9862 have_pthread_h=
f24af81b
TT
9863fi
9864
9865
84c041a1 9866# These tests can't be done till we know if we have limits.h.
b61ff9c8
BS
9867echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
9868echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
ba479fd2
NN
9869if test "${gcc_cv_decl_char_bit+set}" = set; then
9870 echo $ECHO_N "(cached) $ECHO_C" >&6
9871else
9872 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9873/* confdefs.h. */
9874_ACEOF
9875cat confdefs.h >>conftest.$ac_ext
9876cat >>conftest.$ac_ext <<_ACEOF
9877/* end confdefs.h. */
75e93faa
ZW
9878#ifdef HAVE_LIMITS_H
9879#include <limits.h>
9880#endif
9881#ifdef CHAR_BIT
9882found
9883#endif
ba479fd2 9884_ACEOF
75e93faa 9885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9886 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
9887 gcc_cv_decl_char_bit=yes
9888else
75e93faa
ZW
9889 gcc_cv_decl_char_bit=no
9890fi
9891rm -f conftest*
9892
9893
9894fi
b61ff9c8
BS
9895echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
9896echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 9897if test $gcc_cv_decl_char_bit = no; then
b61ff9c8
BS
9898 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
9899echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
ba479fd2
NN
9900if test "${gcc_cv_c_nbby+set}" = set; then
9901 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
9902else
9903 i=8
9904 gcc_cv_c_nbby=
9905 while test $i -lt 65; do
ba479fd2 9906 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9907/* confdefs.h. */
9908_ACEOF
9909cat confdefs.h >>conftest.$ac_ext
9910cat >>conftest.$ac_ext <<_ACEOF
9911/* end confdefs.h. */
9912
9913int
9914main ()
9915{
4e70264f
ZW
9916switch(0) {
9917 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
9918 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
9919 ; }
ba479fd2
NN
9920 ;
9921 return 0;
9922}
9923_ACEOF
9924rm -f conftest.$ac_objext
b61ff9c8
BS
9925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9926 (eval $ac_compile) 2>conftest.er1
ba479fd2 9927 ac_status=$?
86da66b5
HPN
9928 grep -v '^ *+' conftest.er1 >conftest.err
9929 rm -f conftest.er1
9930 cat conftest.err >&5
ba479fd2 9931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9932 (exit $ac_status); } &&
9933 { ac_try='test -z "$ac_c_werror_flag"
9934 || test ! -s conftest.err'
9935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9936 (eval $ac_try) 2>&5
9937 ac_status=$?
9938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9939 (exit $ac_status); }; } &&
9940 { ac_try='test -s conftest.$ac_objext'
9941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9942 (eval $ac_try) 2>&5
9943 ac_status=$?
9944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9945 (exit $ac_status); }; }; then
4e70264f 9946 gcc_cv_c_nbby=$i; break
75e93faa 9947else
ba479fd2
NN
9948 echo "$as_me: failed program was:" >&5
9949sed 's/^/| /' conftest.$ac_ext >&5
9950
75e93faa 9951fi
b61ff9c8 9952rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
9953 i=`expr $i + 1`
9954 done
9955 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
9956
9957fi
b61ff9c8
BS
9958echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
9959echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 9960if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
9961 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
9962echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
9963 { (exit 1); exit 1; }; }
75e93faa 9964else
ba479fd2
NN
9965
9966cat >>confdefs.h <<_ACEOF
75e93faa 9967#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 9968_ACEOF
75e93faa
ZW
9969
9970fi
9971fi
b61ff9c8
BS
9972echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
9973echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
ba479fd2
NN
9974if test "${ac_cv_c_bigendian+set}" = set; then
9975 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 9976else
9791c75c 9977 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 9978cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9979/* confdefs.h. */
9980_ACEOF
9981cat confdefs.h >>conftest.$ac_ext
9982cat >>conftest.$ac_ext <<_ACEOF
9983/* end confdefs.h. */
4977bab6
ZW
9984#include <sys/types.h>
9985#include <sys/param.h>
9791c75c 9986
ba479fd2
NN
9987int
9988main ()
9989{
b61ff9c8 9990#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4977bab6 9991 bogus endian macros
84c041a1 9992#endif
9791c75c 9993
ba479fd2
NN
9994 ;
9995 return 0;
9996}
9997_ACEOF
9998rm -f conftest.$ac_objext
b61ff9c8
BS
9999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10000 (eval $ac_compile) 2>conftest.er1
ba479fd2 10001 ac_status=$?
86da66b5
HPN
10002 grep -v '^ *+' conftest.er1 >conftest.err
10003 rm -f conftest.er1
10004 cat conftest.err >&5
ba479fd2 10005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10006 (exit $ac_status); } &&
10007 { ac_try='test -z "$ac_c_werror_flag"
10008 || test ! -s conftest.err'
10009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10010 (eval $ac_try) 2>&5
10011 ac_status=$?
10012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10013 (exit $ac_status); }; } &&
10014 { ac_try='test -s conftest.$ac_objext'
10015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10016 (eval $ac_try) 2>&5
10017 ac_status=$?
10018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10019 (exit $ac_status); }; }; then
2f41c1d6 10020 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 10021cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10022/* confdefs.h. */
10023_ACEOF
10024cat confdefs.h >>conftest.$ac_ext
10025cat >>conftest.$ac_ext <<_ACEOF
10026/* end confdefs.h. */
4977bab6
ZW
10027#include <sys/types.h>
10028#include <sys/param.h>
9791c75c 10029
ba479fd2
NN
10030int
10031main ()
10032{
4977bab6
ZW
10033#if BYTE_ORDER != BIG_ENDIAN
10034 not big endian
84c041a1 10035#endif
9791c75c 10036
ba479fd2
NN
10037 ;
10038 return 0;
10039}
10040_ACEOF
10041rm -f conftest.$ac_objext
b61ff9c8
BS
10042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10043 (eval $ac_compile) 2>conftest.er1
ba479fd2 10044 ac_status=$?
86da66b5
HPN
10045 grep -v '^ *+' conftest.er1 >conftest.err
10046 rm -f conftest.er1
10047 cat conftest.err >&5
ba479fd2 10048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10049 (exit $ac_status); } &&
10050 { ac_try='test -z "$ac_c_werror_flag"
10051 || test ! -s conftest.err'
10052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10053 (eval $ac_try) 2>&5
10054 ac_status=$?
10055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10056 (exit $ac_status); }; } &&
10057 { ac_try='test -s conftest.$ac_objext'
10058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10059 (eval $ac_try) 2>&5
10060 ac_status=$?
10061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10062 (exit $ac_status); }; }; then
10063 ac_cv_c_bigendian=yes
10064else
10065 echo "$as_me: failed program was:" >&5
ba479fd2
NN
10066sed 's/^/| /' conftest.$ac_ext >&5
10067
b61ff9c8 10068ac_cv_c_bigendian=no
4977bab6 10069fi
b61ff9c8 10070rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 10071else
ba479fd2
NN
10072 echo "$as_me: failed program was:" >&5
10073sed 's/^/| /' conftest.$ac_ext >&5
10074
b61ff9c8 10075# It does not; compile a test program.
9791c75c
KC
10076if test "$cross_compiling" = yes; then
10077 # try to guess the endianness by grepping values into an object file
10078 ac_cv_c_bigendian=unknown
10079 cat >conftest.$ac_ext <<_ACEOF
10080/* confdefs.h. */
10081_ACEOF
10082cat confdefs.h >>conftest.$ac_ext
10083cat >>conftest.$ac_ext <<_ACEOF
10084/* end confdefs.h. */
b61ff9c8
BS
10085short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10086short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9791c75c 10087void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
b61ff9c8
BS
10088short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10089short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9791c75c
KC
10090void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
10091int
10092main ()
10093{
10094 _ascii (); _ebcdic ();
10095 ;
10096 return 0;
10097}
10098_ACEOF
10099rm -f conftest.$ac_objext
b61ff9c8
BS
10100if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10101 (eval $ac_compile) 2>conftest.er1
9791c75c
KC
10102 ac_status=$?
10103 grep -v '^ *+' conftest.er1 >conftest.err
10104 rm -f conftest.er1
10105 cat conftest.err >&5
10106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10107 (exit $ac_status); } &&
10108 { ac_try='test -z "$ac_c_werror_flag"
10109 || test ! -s conftest.err'
10110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10111 (eval $ac_try) 2>&5
10112 ac_status=$?
10113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10114 (exit $ac_status); }; } &&
10115 { ac_try='test -s conftest.$ac_objext'
10116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10117 (eval $ac_try) 2>&5
10118 ac_status=$?
10119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10120 (exit $ac_status); }; }; then
8b1f719a
PB
10121 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
10122 ac_cv_c_bigendian=yes
10123fi
9791c75c
KC
10124if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10125 if test "$ac_cv_c_bigendian" = unknown; then
10126 ac_cv_c_bigendian=no
10127 else
10128 # finding both strings is unlikely to happen, but who knows?
10129 ac_cv_c_bigendian=unknown
10130 fi
10131fi
10132else
10133 echo "$as_me: failed program was:" >&5
10134sed 's/^/| /' conftest.$ac_ext >&5
10135
4977bab6 10136fi
b61ff9c8 10137rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
10138else
10139 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10140/* confdefs.h. */
10141_ACEOF
10142cat confdefs.h >>conftest.$ac_ext
10143cat >>conftest.$ac_ext <<_ACEOF
10144/* end confdefs.h. */
9791c75c
KC
10145int
10146main ()
10147{
4977bab6
ZW
10148 /* Are we little or big endian? From Harbison&Steele. */
10149 union
10150 {
b61ff9c8
BS
10151 long l;
10152 char c[sizeof (long)];
4977bab6
ZW
10153 } u;
10154 u.l = 1;
b61ff9c8 10155 exit (u.c[sizeof (long) - 1] == 1);
4977bab6 10156}
ba479fd2
NN
10157_ACEOF
10158rm -f conftest$ac_exeext
b61ff9c8
BS
10159if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10160 (eval $ac_link) 2>&5
ba479fd2
NN
10161 ac_status=$?
10162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10163 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
10164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10165 (eval $ac_try) 2>&5
ba479fd2
NN
10166 ac_status=$?
10167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10168 (exit $ac_status); }; }; then
4977bab6
ZW
10169 ac_cv_c_bigendian=no
10170else
ba479fd2
NN
10171 echo "$as_me: program exited with status $ac_status" >&5
10172echo "$as_me: failed program was:" >&5
10173sed 's/^/| /' conftest.$ac_ext >&5
10174
10175( exit $ac_status )
10176ac_cv_c_bigendian=yes
4977bab6 10177fi
b61ff9c8 10178rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 10179fi
4977bab6 10180fi
b61ff9c8 10181rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 10182fi
b61ff9c8
BS
10183echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
10184echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
10185case $ac_cv_c_bigendian in
10186 yes)
ba479fd2
NN
10187
10188cat >>confdefs.h <<\_ACEOF
4977bab6 10189#define WORDS_BIGENDIAN 1
ba479fd2 10190_ACEOF
9791c75c
KC
10191 ;;
10192 no)
10193 ;;
10194 *)
10195 { { echo "$as_me:$LINENO: error: unknown endianness
10196presetting ac_cv_c_bigendian=no (or yes) will help" >&5
10197echo "$as_me: error: unknown endianness
10198presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
10199 { (exit 1); exit 1; }; } ;;
10200esac
84c041a1 10201
75e93faa 10202
73458fb7
NN
10203# --------
10204# UNSORTED
10205# --------
1e608388 10206
1e608388 10207
4e70264f
ZW
10208# These libraries may be used by collect2.
10209# We may need a special search path to get them linked.
b61ff9c8
BS
10210echo "$as_me:$LINENO: checking for collect2 libraries" >&5
10211echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
ba479fd2
NN
10212if test "${gcc_cv_collect2_libs+set}" = set; then
10213 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
10214else
10215 save_LIBS="$LIBS"
7f2749d4 10216for libs in '' -lld -lmld \
4e70264f
ZW
10217 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
10218 '-L/usr/lib/cmplrs/cc3.11 -lmld'
10219do
10220 LIBS="$libs"
ba479fd2 10221 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10222/* confdefs.h. */
10223_ACEOF
10224cat confdefs.h >>conftest.$ac_ext
10225cat >>conftest.$ac_ext <<_ACEOF
10226/* end confdefs.h. */
10227
b61ff9c8 10228/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10229#ifdef __cplusplus
10230extern "C"
10231#endif
b61ff9c8
BS
10232/* We use char because int might match the return type of a gcc2
10233 builtin and then its argument prototype would still apply. */
ba479fd2
NN
10234char ldopen ();
10235int
10236main ()
10237{
b61ff9c8 10238ldopen ();
ba479fd2
NN
10239 ;
10240 return 0;
10241}
10242_ACEOF
10243rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
10244if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10245 (eval $ac_link) 2>conftest.er1
ba479fd2 10246 ac_status=$?
86da66b5
HPN
10247 grep -v '^ *+' conftest.er1 >conftest.err
10248 rm -f conftest.er1
10249 cat conftest.err >&5
ba479fd2 10250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10251 (exit $ac_status); } &&
10252 { ac_try='test -z "$ac_c_werror_flag"
10253 || test ! -s conftest.err'
10254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10255 (eval $ac_try) 2>&5
10256 ac_status=$?
10257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10258 (exit $ac_status); }; } &&
10259 { ac_try='test -s conftest$ac_exeext'
10260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10261 (eval $ac_try) 2>&5
10262 ac_status=$?
10263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10264 (exit $ac_status); }; }; then
4e70264f
ZW
10265 gcc_cv_collect2_libs="$libs"; break
10266else
ba479fd2
NN
10267 echo "$as_me: failed program was:" >&5
10268sed 's/^/| /' conftest.$ac_ext >&5
10269
4e70264f 10270fi
b61ff9c8 10271rm -f conftest.err conftest.$ac_objext \
86da66b5 10272 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
10273done
10274LIBS="$save_LIBS"
10275test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
10276fi
b61ff9c8
BS
10277echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
10278echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
10279case $gcc_cv_collect2_libs in
10280 "none required") ;;
10281 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
10282esac
10283
10284
7f2749d4
RK
10285# When building Ada code on Alpha, we need exc_resume which is usually in
10286# -lexc. So test for it.
10287save_LIBS="$LIBS"
10288LIBS=
b61ff9c8
BS
10289echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
10290echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
ba479fd2
NN
10291if test "${ac_cv_search_exc_resume+set}" = set; then
10292 echo $ECHO_N "(cached) $ECHO_C" >&6
10293else
10294 ac_func_search_save_LIBS=$LIBS
b61ff9c8 10295ac_cv_search_exc_resume=no
ba479fd2 10296cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10297/* confdefs.h. */
10298_ACEOF
10299cat confdefs.h >>conftest.$ac_ext
10300cat >>conftest.$ac_ext <<_ACEOF
10301/* end confdefs.h. */
7f2749d4 10302
b61ff9c8 10303/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10304#ifdef __cplusplus
10305extern "C"
10306#endif
b61ff9c8
BS
10307/* We use char because int might match the return type of a gcc2
10308 builtin and then its argument prototype would still apply. */
ba479fd2
NN
10309char exc_resume ();
10310int
10311main ()
10312{
b61ff9c8 10313exc_resume ();
ba479fd2
NN
10314 ;
10315 return 0;
10316}
10317_ACEOF
b61ff9c8
BS
10318rm -f conftest.$ac_objext conftest$ac_exeext
10319if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10320 (eval $ac_link) 2>conftest.er1
ba479fd2 10321 ac_status=$?
86da66b5
HPN
10322 grep -v '^ *+' conftest.er1 >conftest.err
10323 rm -f conftest.er1
10324 cat conftest.err >&5
ba479fd2 10325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10326 (exit $ac_status); } &&
10327 { ac_try='test -z "$ac_c_werror_flag"
10328 || test ! -s conftest.err'
10329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10330 (eval $ac_try) 2>&5
10331 ac_status=$?
10332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10333 (exit $ac_status); }; } &&
10334 { ac_try='test -s conftest$ac_exeext'
10335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10336 (eval $ac_try) 2>&5
10337 ac_status=$?
10338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10339 (exit $ac_status); }; }; then
10340 ac_cv_search_exc_resume="none required"
7f2749d4 10341else
ba479fd2
NN
10342 echo "$as_me: failed program was:" >&5
10343sed 's/^/| /' conftest.$ac_ext >&5
10344
ab22c1fa 10345fi
b61ff9c8
BS
10346rm -f conftest.err conftest.$ac_objext \
10347 conftest$ac_exeext conftest.$ac_ext
10348if test "$ac_cv_search_exc_resume" = no; then
10349 for ac_lib in exc; do
10350 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10351 cat >conftest.$ac_ext <<_ACEOF
10352/* confdefs.h. */
10353_ACEOF
10354cat confdefs.h >>conftest.$ac_ext
10355cat >>conftest.$ac_ext <<_ACEOF
10356/* end confdefs.h. */
2f41c1d6 10357
b61ff9c8
BS
10358/* Override any gcc2 internal prototype to avoid an error. */
10359#ifdef __cplusplus
10360extern "C"
10361#endif
10362/* We use char because int might match the return type of a gcc2
10363 builtin and then its argument prototype would still apply. */
10364char exc_resume ();
10365int
10366main ()
10367{
10368exc_resume ();
10369 ;
10370 return 0;
10371}
10372_ACEOF
10373rm -f conftest.$ac_objext conftest$ac_exeext
10374if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10375 (eval $ac_link) 2>conftest.er1
10376 ac_status=$?
10377 grep -v '^ *+' conftest.er1 >conftest.err
10378 rm -f conftest.er1
10379 cat conftest.err >&5
10380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10381 (exit $ac_status); } &&
10382 { ac_try='test -z "$ac_c_werror_flag"
10383 || test ! -s conftest.err'
10384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10385 (eval $ac_try) 2>&5
10386 ac_status=$?
10387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10388 (exit $ac_status); }; } &&
10389 { ac_try='test -s conftest$ac_exeext'
10390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10391 (eval $ac_try) 2>&5
10392 ac_status=$?
10393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10394 (exit $ac_status); }; }; then
10395 ac_cv_search_exc_resume="-l$ac_lib"
10396break
1a4b763e 10397else
b61ff9c8
BS
10398 echo "$as_me: failed program was:" >&5
10399sed 's/^/| /' conftest.$ac_ext >&5
10400
10401fi
10402rm -f conftest.err conftest.$ac_objext \
10403 conftest$ac_exeext conftest.$ac_ext
10404 done
b8ec3cc8 10405fi
b8ec3cc8
EC
10406LIBS=$ac_func_search_save_LIBS
10407fi
b61ff9c8
BS
10408echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
10409echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
10410if test "$ac_cv_search_exc_resume" != no; then
10411 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
b8ec3cc8
EC
10412
10413fi
10414
dd7f7a6e 10415GNAT_LIBEXC="$LIBS"
b8ec3cc8
EC
10416LIBS="$save_LIBS"
10417
10418
dd7f7a6e
EC
10419# Some systems put ldexp and frexp in libm instead of libc; assume
10420# they're both in the same place. jcf-dump needs them.
10421save_LIBS="$LIBS"
10422LIBS=
b61ff9c8
BS
10423echo "$as_me:$LINENO: checking for library containing ldexp" >&5
10424echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
dd7f7a6e 10425if test "${ac_cv_search_ldexp+set}" = set; then
b8ec3cc8
EC
10426 echo $ECHO_N "(cached) $ECHO_C" >&6
10427else
dd7f7a6e 10428 ac_func_search_save_LIBS=$LIBS
b61ff9c8 10429ac_cv_search_ldexp=no
dd7f7a6e 10430cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10431/* confdefs.h. */
10432_ACEOF
10433cat confdefs.h >>conftest.$ac_ext
10434cat >>conftest.$ac_ext <<_ACEOF
10435/* end confdefs.h. */
dd7f7a6e 10436
b61ff9c8 10437/* Override any gcc2 internal prototype to avoid an error. */
dd7f7a6e
EC
10438#ifdef __cplusplus
10439extern "C"
10440#endif
b61ff9c8
BS
10441/* We use char because int might match the return type of a gcc2
10442 builtin and then its argument prototype would still apply. */
dd7f7a6e 10443char ldexp ();
ba479fd2
NN
10444int
10445main ()
10446{
b61ff9c8 10447ldexp ();
ba479fd2
NN
10448 ;
10449 return 0;
10450}
10451_ACEOF
b61ff9c8
BS
10452rm -f conftest.$ac_objext conftest$ac_exeext
10453if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10454 (eval $ac_link) 2>conftest.er1
dd7f7a6e
EC
10455 ac_status=$?
10456 grep -v '^ *+' conftest.er1 >conftest.err
10457 rm -f conftest.er1
10458 cat conftest.err >&5
10459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10460 (exit $ac_status); } &&
10461 { ac_try='test -z "$ac_c_werror_flag"
10462 || test ! -s conftest.err'
10463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10464 (eval $ac_try) 2>&5
10465 ac_status=$?
10466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10467 (exit $ac_status); }; } &&
10468 { ac_try='test -s conftest$ac_exeext'
10469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10470 (eval $ac_try) 2>&5
10471 ac_status=$?
10472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10473 (exit $ac_status); }; }; then
10474 ac_cv_search_ldexp="none required"
dd7f7a6e
EC
10475else
10476 echo "$as_me: failed program was:" >&5
10477sed 's/^/| /' conftest.$ac_ext >&5
10478
1a4b763e 10479fi
b61ff9c8
BS
10480rm -f conftest.err conftest.$ac_objext \
10481 conftest$ac_exeext conftest.$ac_ext
10482if test "$ac_cv_search_ldexp" = no; then
10483 for ac_lib in m; do
10484 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10485 cat >conftest.$ac_ext <<_ACEOF
10486/* confdefs.h. */
10487_ACEOF
10488cat confdefs.h >>conftest.$ac_ext
10489cat >>conftest.$ac_ext <<_ACEOF
10490/* end confdefs.h. */
2f41c1d6 10491
b61ff9c8
BS
10492/* Override any gcc2 internal prototype to avoid an error. */
10493#ifdef __cplusplus
10494extern "C"
10495#endif
10496/* We use char because int might match the return type of a gcc2
10497 builtin and then its argument prototype would still apply. */
10498char ldexp ();
10499int
10500main ()
10501{
10502ldexp ();
10503 ;
10504 return 0;
10505}
10506_ACEOF
10507rm -f conftest.$ac_objext conftest$ac_exeext
10508if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10509 (eval $ac_link) 2>conftest.er1
10510 ac_status=$?
10511 grep -v '^ *+' conftest.er1 >conftest.err
10512 rm -f conftest.er1
10513 cat conftest.err >&5
10514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10515 (exit $ac_status); } &&
10516 { ac_try='test -z "$ac_c_werror_flag"
10517 || test ! -s conftest.err'
10518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10519 (eval $ac_try) 2>&5
10520 ac_status=$?
10521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10522 (exit $ac_status); }; } &&
10523 { ac_try='test -s conftest$ac_exeext'
10524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10525 (eval $ac_try) 2>&5
10526 ac_status=$?
10527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10528 (exit $ac_status); }; }; then
10529 ac_cv_search_ldexp="-l$ac_lib"
10530break
1a4b763e 10531else
b61ff9c8
BS
10532 echo "$as_me: failed program was:" >&5
10533sed 's/^/| /' conftest.$ac_ext >&5
10534
10535fi
10536rm -f conftest.err conftest.$ac_objext \
10537 conftest$ac_exeext conftest.$ac_ext
10538 done
dd7f7a6e
EC
10539fi
10540LIBS=$ac_func_search_save_LIBS
10541fi
b61ff9c8
BS
10542echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
10543echo "${ECHO_T}$ac_cv_search_ldexp" >&6
10544if test "$ac_cv_search_ldexp" != no; then
10545 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
dd7f7a6e
EC
10546
10547fi
10548
10549LDEXP_LIB="$LIBS"
10550LIBS="$save_LIBS"
10551
10552
10553# Use <inttypes.h> only if it exists,
10554# doesn't clash with <sys/types.h>, and declares intmax_t.
b61ff9c8
BS
10555echo "$as_me:$LINENO: checking for inttypes.h" >&5
10556echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
dd7f7a6e
EC
10557if test "${gcc_cv_header_inttypes_h+set}" = set; then
10558 echo $ECHO_N "(cached) $ECHO_C" >&6
10559else
10560 cat >conftest.$ac_ext <<_ACEOF
10561/* confdefs.h. */
10562_ACEOF
10563cat confdefs.h >>conftest.$ac_ext
10564cat >>conftest.$ac_ext <<_ACEOF
10565/* end confdefs.h. */
10566#include <sys/types.h>
10567#include <inttypes.h>
10568int
10569main ()
10570{
10571intmax_t i = -1;
10572 ;
10573 return 0;
10574}
10575_ACEOF
10576rm -f conftest.$ac_objext
b61ff9c8
BS
10577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10578 (eval $ac_compile) 2>conftest.er1
dd7f7a6e
EC
10579 ac_status=$?
10580 grep -v '^ *+' conftest.er1 >conftest.err
10581 rm -f conftest.er1
10582 cat conftest.err >&5
10583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10584 (exit $ac_status); } &&
10585 { ac_try='test -z "$ac_c_werror_flag"
10586 || test ! -s conftest.err'
10587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10588 (eval $ac_try) 2>&5
10589 ac_status=$?
10590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10591 (exit $ac_status); }; } &&
10592 { ac_try='test -s conftest.$ac_objext'
10593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10594 (eval $ac_try) 2>&5
10595 ac_status=$?
10596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10597 (exit $ac_status); }; }; then
dd7f7a6e
EC
10598 gcc_cv_header_inttypes_h=yes
10599else
10600 echo "$as_me: failed program was:" >&5
10601sed 's/^/| /' conftest.$ac_ext >&5
10602
b61ff9c8 10603gcc_cv_header_inttypes_h=no
dd7f7a6e 10604fi
b61ff9c8 10605rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e
EC
10606fi
10607
b61ff9c8
BS
10608echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
10609echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
dd7f7a6e
EC
10610if test $gcc_cv_header_inttypes_h = yes; then
10611
10612cat >>confdefs.h <<\_ACEOF
10613#define HAVE_INTTYPES_H 1
10614_ACEOF
10615
0056a9b5 10616fi
956d6950 10617
c149cc37 10618
ba479fd2
NN
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
0d667716
KG
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
ba479fd2
NN
10647
10648
10649
ba479fd2
NN
10650
10651
10652
52a6edcc 10653for ac_func in times clock kill getrlimit setrlimit atoll atoq \
d2e506f2 10654 sysconf strsignal getrusage nl_langinfo \
0d667716
KG
10655 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
10656 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 10657do
ba479fd2 10658as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b61ff9c8
BS
10659echo "$as_me:$LINENO: checking for $ac_func" >&5
10660echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10661if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
10662 echo $ECHO_N "(cached) $ECHO_C" >&6
10663else
10664 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10665/* confdefs.h. */
10666_ACEOF
10667cat confdefs.h >>conftest.$ac_ext
10668cat >>conftest.$ac_ext <<_ACEOF
10669/* end confdefs.h. */
86da66b5
HPN
10670/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10671 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10672#define $ac_func innocuous_$ac_func
10673
956d6950 10674/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10675 which can conflict with char $ac_func (); below.
10676 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10677 <limits.h> exists even on freestanding compilers. */
86da66b5 10678
ba479fd2
NN
10679#ifdef __STDC__
10680# include <limits.h>
10681#else
10682# include <assert.h>
10683#endif
86da66b5
HPN
10684
10685#undef $ac_func
10686
b61ff9c8 10687/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10688#ifdef __cplusplus
10689extern "C"
b61ff9c8 10690{
ba479fd2 10691#endif
b61ff9c8
BS
10692/* We use char because int might match the return type of a gcc2
10693 builtin and then its argument prototype would still apply. */
ba479fd2 10694char $ac_func ();
956d6950
JL
10695/* The GNU C library defines this for functions which it implements
10696 to always fail with ENOSYS. Some functions are actually named
10697 something starting with __ and the normal name is an alias. */
b61ff9c8 10698#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
956d6950 10699choke me
b61ff9c8
BS
10700#else
10701char (*f) () = $ac_func;
10702#endif
10703#ifdef __cplusplus
10704}
956d6950
JL
10705#endif
10706
ba479fd2
NN
10707int
10708main ()
10709{
b61ff9c8 10710return f != $ac_func;
ba479fd2
NN
10711 ;
10712 return 0;
10713}
10714_ACEOF
10715rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
10716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10717 (eval $ac_link) 2>conftest.er1
ba479fd2 10718 ac_status=$?
86da66b5
HPN
10719 grep -v '^ *+' conftest.er1 >conftest.err
10720 rm -f conftest.er1
10721 cat conftest.err >&5
ba479fd2 10722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10723 (exit $ac_status); } &&
10724 { ac_try='test -z "$ac_c_werror_flag"
10725 || test ! -s conftest.err'
10726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10727 (eval $ac_try) 2>&5
10728 ac_status=$?
10729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10730 (exit $ac_status); }; } &&
10731 { ac_try='test -s conftest$ac_exeext'
10732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10733 (eval $ac_try) 2>&5
10734 ac_status=$?
10735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10736 (exit $ac_status); }; }; then
ba479fd2
NN
10737 eval "$as_ac_var=yes"
10738else
10739 echo "$as_me: failed program was:" >&5
10740sed 's/^/| /' conftest.$ac_ext >&5
10741
b61ff9c8 10742eval "$as_ac_var=no"
ba479fd2 10743fi
b61ff9c8 10744rm -f conftest.err conftest.$ac_objext \
86da66b5 10745 conftest$ac_exeext conftest.$ac_ext
ba479fd2 10746fi
b61ff9c8
BS
10747echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10748echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
10749if test `eval echo '${'$as_ac_var'}'` = yes; then
10750 cat >>confdefs.h <<_ACEOF
10751#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10752_ACEOF
956d6950 10753
956d6950
JL
10754fi
10755done
10756
6885fc87 10757
39f6c4c8 10758if test x$ac_cv_func_mbstowcs = xyes; then
b61ff9c8
BS
10759 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
10760echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
ba479fd2
NN
10761if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
10762 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
10763else
10764 if test "$cross_compiling" = yes; then
10765 gcc_cv_func_mbstowcs_works=yes
10766else
ba479fd2 10767 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10768/* confdefs.h. */
10769_ACEOF
10770cat confdefs.h >>conftest.$ac_ext
10771cat >>conftest.$ac_ext <<_ACEOF
10772/* end confdefs.h. */
39f6c4c8
KW
10773#include <stdlib.h>
10774int main()
10775{
10776 mbstowcs(0, "", 0);
10777 return 0;
10778}
ba479fd2
NN
10779_ACEOF
10780rm -f conftest$ac_exeext
b61ff9c8
BS
10781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10782 (eval $ac_link) 2>&5
ba479fd2
NN
10783 ac_status=$?
10784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10785 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
10786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10787 (eval $ac_try) 2>&5
ba479fd2
NN
10788 ac_status=$?
10789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10790 (exit $ac_status); }; }; then
39f6c4c8
KW
10791 gcc_cv_func_mbstowcs_works=yes
10792else
ba479fd2
NN
10793 echo "$as_me: program exited with status $ac_status" >&5
10794echo "$as_me: failed program was:" >&5
10795sed 's/^/| /' conftest.$ac_ext >&5
10796
10797( exit $ac_status )
10798gcc_cv_func_mbstowcs_works=no
39f6c4c8 10799fi
b61ff9c8 10800rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 10801fi
39f6c4c8 10802fi
b61ff9c8
BS
10803echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
10804echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 10805 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
10806
10807cat >>confdefs.h <<\_ACEOF
39f6c4c8 10808#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 10809_ACEOF
39f6c4c8
KW
10810
10811 fi
10812fi
10813
b61ff9c8
BS
10814echo "$as_me:$LINENO: checking for ssize_t" >&5
10815echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
ba479fd2
NN
10816if test "${ac_cv_type_ssize_t+set}" = set; then
10817 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 10818else
ba479fd2 10819 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10820/* confdefs.h. */
10821_ACEOF
10822cat confdefs.h >>conftest.$ac_ext
10823cat >>conftest.$ac_ext <<_ACEOF
10824/* end confdefs.h. */
8b4fc07a
NN
10825$ac_includes_default
10826int
10827main ()
10828{
b61ff9c8 10829if ((ssize_t *) 0)
8b4fc07a 10830 return 0;
b61ff9c8 10831if (sizeof (ssize_t))
8b4fc07a
NN
10832 return 0;
10833 ;
10834 return 0;
10835}
ba479fd2 10836_ACEOF
8b4fc07a 10837rm -f conftest.$ac_objext
b61ff9c8
BS
10838if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10839 (eval $ac_compile) 2>conftest.er1
8b4fc07a 10840 ac_status=$?
86da66b5
HPN
10841 grep -v '^ *+' conftest.er1 >conftest.err
10842 rm -f conftest.er1
10843 cat conftest.err >&5
8b4fc07a 10844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10845 (exit $ac_status); } &&
10846 { ac_try='test -z "$ac_c_werror_flag"
10847 || test ! -s conftest.err'
10848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10849 (eval $ac_try) 2>&5
10850 ac_status=$?
10851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10852 (exit $ac_status); }; } &&
10853 { ac_try='test -s conftest.$ac_objext'
10854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10855 (eval $ac_try) 2>&5
10856 ac_status=$?
10857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10858 (exit $ac_status); }; }; then
cb65112a 10859 ac_cv_type_ssize_t=yes
f12bc141 10860else
8b4fc07a
NN
10861 echo "$as_me: failed program was:" >&5
10862sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10863
b61ff9c8 10864ac_cv_type_ssize_t=no
8b4fc07a 10865fi
b61ff9c8 10866rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10867fi
b61ff9c8
BS
10868echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
10869echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
10870if test $ac_cv_type_ssize_t = yes; then
10871 :
10872else
ba479fd2 10873
8b4fc07a 10874cat >>confdefs.h <<_ACEOF
f12bc141 10875#define ssize_t int
ba479fd2 10876_ACEOF
f12bc141
ZW
10877
10878fi
10879
bba09b5a
AT
10880echo "$as_me:$LINENO: checking for caddr_t" >&5
10881echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6
10882if test "${ac_cv_type_caddr_t+set}" = set; then
10883 echo $ECHO_N "(cached) $ECHO_C" >&6
10884else
10885 cat >conftest.$ac_ext <<_ACEOF
10886/* confdefs.h. */
10887_ACEOF
10888cat confdefs.h >>conftest.$ac_ext
10889cat >>conftest.$ac_ext <<_ACEOF
10890/* end confdefs.h. */
10891$ac_includes_default
10892int
10893main ()
10894{
10895if ((caddr_t *) 0)
10896 return 0;
10897if (sizeof (caddr_t))
10898 return 0;
10899 ;
10900 return 0;
10901}
10902_ACEOF
10903rm -f conftest.$ac_objext
10904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10905 (eval $ac_compile) 2>conftest.er1
10906 ac_status=$?
10907 grep -v '^ *+' conftest.er1 >conftest.err
10908 rm -f conftest.er1
10909 cat conftest.err >&5
10910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10911 (exit $ac_status); } &&
10912 { ac_try='test -z "$ac_c_werror_flag"
10913 || test ! -s conftest.err'
10914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10915 (eval $ac_try) 2>&5
10916 ac_status=$?
10917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10918 (exit $ac_status); }; } &&
10919 { ac_try='test -s conftest.$ac_objext'
10920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10921 (eval $ac_try) 2>&5
10922 ac_status=$?
10923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10924 (exit $ac_status); }; }; then
10925 ac_cv_type_caddr_t=yes
10926else
10927 echo "$as_me: failed program was:" >&5
10928sed 's/^/| /' conftest.$ac_ext >&5
10929
10930ac_cv_type_caddr_t=no
10931fi
10932rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10933fi
10934echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
10935echo "${ECHO_T}$ac_cv_type_caddr_t" >&6
10936if test $ac_cv_type_caddr_t = yes; then
10937 :
10938else
10939
10940cat >>confdefs.h <<_ACEOF
10941#define caddr_t char *
10942_ACEOF
10943
10944fi
10945
0b9d02c6 10946
3b0727a0 10947
b61ff9c8
BS
10948echo "$as_me:$LINENO: checking for sys/mman.h" >&5
10949echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
3b0727a0
MR
10950if test "${ac_cv_header_sys_mman_h+set}" = set; then
10951 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10952else
18fc9bd4 10953 cat >conftest.$ac_ext <<_ACEOF
3b0727a0
MR
10954/* confdefs.h. */
10955_ACEOF
10956cat confdefs.h >>conftest.$ac_ext
10957cat >>conftest.$ac_ext <<_ACEOF
10958/* end confdefs.h. */
10959#include <sys/mman.h>
10960_ACEOF
b61ff9c8
BS
10961if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10962 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3b0727a0
MR
10963 ac_status=$?
10964 grep -v '^ *+' conftest.er1 >conftest.err
10965 rm -f conftest.er1
10966 cat conftest.err >&5
10967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10968 (exit $ac_status); } >/dev/null; then
10969 if test -s conftest.err; then
10970 ac_cpp_err=$ac_c_preproc_warn_flag
10971 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10972 else
10973 ac_cpp_err=
10974 fi
10975else
10976 ac_cpp_err=yes
10977fi
10978if test -z "$ac_cpp_err"; then
10979 ac_cv_header_sys_mman_h=yes
10980else
3b0727a0
MR
10981 echo "$as_me: failed program was:" >&5
10982sed 's/^/| /' conftest.$ac_ext >&5
10983
18fc9bd4 10984 ac_cv_header_sys_mman_h=no
3b0727a0
MR
10985fi
10986rm -f conftest.err conftest.$ac_ext
10987fi
b61ff9c8
BS
10988echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
10989echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
3b0727a0
MR
10990if test $ac_cv_header_sys_mman_h = yes; then
10991 gcc_header_sys_mman_h=yes
10992else
10993 gcc_header_sys_mman_h=no
10994fi
10995
b61ff9c8
BS
10996echo "$as_me:$LINENO: checking for mmap" >&5
10997echo $ECHO_N "checking for mmap... $ECHO_C" >&6
3b0727a0
MR
10998if test "${ac_cv_func_mmap+set}" = set; then
10999 echo $ECHO_N "(cached) $ECHO_C" >&6
11000else
11001 cat >conftest.$ac_ext <<_ACEOF
11002/* confdefs.h. */
11003_ACEOF
11004cat confdefs.h >>conftest.$ac_ext
11005cat >>conftest.$ac_ext <<_ACEOF
11006/* end confdefs.h. */
11007/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
11008 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11009#define mmap innocuous_mmap
11010
11011/* System header to define __stub macros and hopefully few prototypes,
11012 which can conflict with char mmap (); below.
11013 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11014 <limits.h> exists even on freestanding compilers. */
11015
11016#ifdef __STDC__
11017# include <limits.h>
11018#else
11019# include <assert.h>
11020#endif
11021
11022#undef mmap
11023
b61ff9c8 11024/* Override any gcc2 internal prototype to avoid an error. */
3b0727a0
MR
11025#ifdef __cplusplus
11026extern "C"
b61ff9c8 11027{
3b0727a0 11028#endif
b61ff9c8
BS
11029/* We use char because int might match the return type of a gcc2
11030 builtin and then its argument prototype would still apply. */
3b0727a0
MR
11031char mmap ();
11032/* The GNU C library defines this for functions which it implements
11033 to always fail with ENOSYS. Some functions are actually named
11034 something starting with __ and the normal name is an alias. */
b61ff9c8 11035#if defined (__stub_mmap) || defined (__stub___mmap)
3b0727a0 11036choke me
b61ff9c8
BS
11037#else
11038char (*f) () = mmap;
11039#endif
11040#ifdef __cplusplus
11041}
3b0727a0
MR
11042#endif
11043
11044int
11045main ()
11046{
b61ff9c8 11047return f != mmap;
3b0727a0
MR
11048 ;
11049 return 0;
11050}
11051_ACEOF
11052rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11053if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11054 (eval $ac_link) 2>conftest.er1
3b0727a0
MR
11055 ac_status=$?
11056 grep -v '^ *+' conftest.er1 >conftest.err
11057 rm -f conftest.er1
11058 cat conftest.err >&5
11059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11060 (exit $ac_status); } &&
11061 { ac_try='test -z "$ac_c_werror_flag"
11062 || test ! -s conftest.err'
11063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11064 (eval $ac_try) 2>&5
11065 ac_status=$?
11066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11067 (exit $ac_status); }; } &&
11068 { ac_try='test -s conftest$ac_exeext'
11069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11070 (eval $ac_try) 2>&5
11071 ac_status=$?
11072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11073 (exit $ac_status); }; }; then
8b1f719a
PB
11074 ac_cv_func_mmap=yes
11075else
11076 echo "$as_me: failed program was:" >&5
11077sed 's/^/| /' conftest.$ac_ext >&5
a6ccdbab 11078
b61ff9c8 11079ac_cv_func_mmap=no
8b1f719a 11080fi
b61ff9c8 11081rm -f conftest.err conftest.$ac_objext \
3b0727a0
MR
11082 conftest$ac_exeext conftest.$ac_ext
11083fi
b61ff9c8
BS
11084echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
11085echo "${ECHO_T}$ac_cv_func_mmap" >&6
3b0727a0
MR
11086if test $ac_cv_func_mmap = yes; then
11087 gcc_func_mmap=yes
11088else
11089 gcc_func_mmap=no
11090fi
11091
11092if test "$gcc_header_sys_mman_h" != yes \
11093 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
11094 gcc_cv_func_mmap_file=no
11095 gcc_cv_func_mmap_dev_zero=no
11096 gcc_cv_func_mmap_anon=no
11097else
b61ff9c8
BS
11098 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
11099echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
ba479fd2
NN
11100if test "${gcc_cv_func_mmap_file+set}" = set; then
11101 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 11102else
ba479fd2 11103 # Add a system to this blacklist if
1072ec3f
ZW
11104 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
11105 # memory area containing the same data that you'd get if you applied
11106 # read() to the same fd. The only system known to have a problem here
11107 # is VMS, where text files have record structure.
11108 case "$host_os" in
ba479fd2 11109 vms* | ultrix*)
1072ec3f
ZW
11110 gcc_cv_func_mmap_file=no ;;
11111 *)
11112 gcc_cv_func_mmap_file=yes;;
11113 esac
11114fi
b61ff9c8
BS
11115echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
11116echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
11117 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
11118echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
ba479fd2
NN
11119if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
11120 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
11121else
11122 # Add a system to this blacklist if it has mmap() but /dev/zero
11123 # does not exist, or if mmapping /dev/zero does not give anonymous
11124 # zeroed pages with both the following properties:
11125 # 1. If you map N consecutive pages in with one call, and then
11126 # unmap any subset of those pages, the pages that were not
11127 # explicitly unmapped remain accessible.
11128 # 2. If you map two adjacent blocks of memory and then unmap them
11129 # both at once, they must both go away.
11130 # Systems known to be in this category are Windows (all variants),
11131 # VMS, and Darwin.
11132 case "$host_os" in
2ce240d3 11133 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
11134 gcc_cv_func_mmap_dev_zero=no ;;
11135 *)
11136 gcc_cv_func_mmap_dev_zero=yes;;
11137 esac
11138fi
b61ff9c8
BS
11139echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
11140echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
11141
11142 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
b61ff9c8
BS
11143 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
11144echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
ba479fd2
NN
11145if test "${gcc_cv_decl_map_anon+set}" = set; then
11146 echo $ECHO_N "(cached) $ECHO_C" >&6
11147else
11148 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11149/* confdefs.h. */
11150_ACEOF
11151cat confdefs.h >>conftest.$ac_ext
11152cat >>conftest.$ac_ext <<_ACEOF
11153/* end confdefs.h. */
1072ec3f
ZW
11154#include <sys/types.h>
11155#include <sys/mman.h>
11156#include <unistd.h>
11157
11158#ifndef MAP_ANONYMOUS
11159#define MAP_ANONYMOUS MAP_ANON
11160#endif
11161
ba479fd2
NN
11162int
11163main ()
11164{
1072ec3f 11165int n = MAP_ANONYMOUS;
ba479fd2
NN
11166 ;
11167 return 0;
11168}
11169_ACEOF
11170rm -f conftest.$ac_objext
b61ff9c8
BS
11171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11172 (eval $ac_compile) 2>conftest.er1
ba479fd2 11173 ac_status=$?
86da66b5
HPN
11174 grep -v '^ *+' conftest.er1 >conftest.err
11175 rm -f conftest.er1
11176 cat conftest.err >&5
ba479fd2 11177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11178 (exit $ac_status); } &&
11179 { ac_try='test -z "$ac_c_werror_flag"
11180 || test ! -s conftest.err'
11181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11182 (eval $ac_try) 2>&5
11183 ac_status=$?
11184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11185 (exit $ac_status); }; } &&
11186 { ac_try='test -s conftest.$ac_objext'
11187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11188 (eval $ac_try) 2>&5
11189 ac_status=$?
11190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11191 (exit $ac_status); }; }; then
1072ec3f
ZW
11192 gcc_cv_decl_map_anon=yes
11193else
ba479fd2
NN
11194 echo "$as_me: failed program was:" >&5
11195sed 's/^/| /' conftest.$ac_ext >&5
11196
b61ff9c8 11197gcc_cv_decl_map_anon=no
1072ec3f 11198fi
b61ff9c8 11199rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 11200fi
b61ff9c8
BS
11201echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
11202echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
11203
11204 if test $gcc_cv_decl_map_anon = no; then
11205 gcc_cv_func_mmap_anon=no
11206 else
b61ff9c8
BS
11207 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
11208echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
ba479fd2
NN
11209if test "${gcc_cv_func_mmap_anon+set}" = set; then
11210 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
11211else
11212 # Add a system to this blacklist if it has mmap() and MAP_ANON or
11213 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
11214 # doesn't give anonymous zeroed pages with the same properties listed
11215 # above for use of /dev/zero.
11216 # Systems known to be in this category are Windows, VMS, and SCO Unix.
11217 case "$host_os" in
11218 vms* | cygwin* | pe | mingw* | sco* | udk* )
11219 gcc_cv_func_mmap_anon=no ;;
11220 *)
11221 gcc_cv_func_mmap_anon=yes;;
11222 esac
11223fi
b61ff9c8
BS
11224echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
11225echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
11226 fi
11227fi
11228
11229if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
11230
11231cat >>confdefs.h <<\_ACEOF
1072ec3f 11232#define HAVE_MMAP_FILE 1
ba479fd2 11233_ACEOF
1072ec3f
ZW
11234
11235fi
11236if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
11237
11238cat >>confdefs.h <<\_ACEOF
1072ec3f 11239#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 11240_ACEOF
1072ec3f
ZW
11241
11242fi
11243if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
11244
11245cat >>confdefs.h <<\_ACEOF
1072ec3f 11246#define HAVE_MMAP_ANON 1
ba479fd2 11247_ACEOF
1072ec3f
ZW
11248
11249fi
11250
b27d2bd5
MK
11251
11252case "${host}" in
ee262b6f 11253*-*-*vms*)
ba479fd2 11254 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
11255 # won't work, and it isn't easily adaptable. It makes more sense to
11256 # just force it.
11257 ac_cv_func_vfork_works=yes
11258 ;;
b27d2bd5 11259esac
b61ff9c8
BS
11260echo "$as_me:$LINENO: checking for pid_t" >&5
11261echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
ba479fd2
NN
11262if test "${ac_cv_type_pid_t+set}" = set; then
11263 echo $ECHO_N "(cached) $ECHO_C" >&6
11264else
11265 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11266/* confdefs.h. */
11267_ACEOF
11268cat confdefs.h >>conftest.$ac_ext
11269cat >>conftest.$ac_ext <<_ACEOF
11270/* end confdefs.h. */
11271$ac_includes_default
11272int
11273main ()
11274{
b61ff9c8 11275if ((pid_t *) 0)
ba479fd2 11276 return 0;
b61ff9c8 11277if (sizeof (pid_t))
ba479fd2
NN
11278 return 0;
11279 ;
11280 return 0;
11281}
11282_ACEOF
11283rm -f conftest.$ac_objext
b61ff9c8
BS
11284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11285 (eval $ac_compile) 2>conftest.er1
ba479fd2 11286 ac_status=$?
86da66b5
HPN
11287 grep -v '^ *+' conftest.er1 >conftest.err
11288 rm -f conftest.er1
11289 cat conftest.err >&5
ba479fd2 11290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11291 (exit $ac_status); } &&
11292 { ac_try='test -z "$ac_c_werror_flag"
11293 || test ! -s conftest.err'
11294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11295 (eval $ac_try) 2>&5
11296 ac_status=$?
11297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11298 (exit $ac_status); }; } &&
11299 { ac_try='test -s conftest.$ac_objext'
11300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11301 (eval $ac_try) 2>&5
11302 ac_status=$?
11303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11304 (exit $ac_status); }; }; then
cb65112a 11305 ac_cv_type_pid_t=yes
c375c43b 11306else
ba479fd2
NN
11307 echo "$as_me: failed program was:" >&5
11308sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 11309
b61ff9c8 11310ac_cv_type_pid_t=no
ba479fd2 11311fi
b61ff9c8 11312rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 11313fi
b61ff9c8
BS
11314echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
11315echo "${ECHO_T}$ac_cv_type_pid_t" >&6
ba479fd2
NN
11316if test $ac_cv_type_pid_t = yes; then
11317 :
11318else
11319
11320cat >>confdefs.h <<_ACEOF
c375c43b 11321#define pid_t int
ba479fd2 11322_ACEOF
c375c43b
KG
11323
11324fi
11325
ba479fd2 11326
b61ff9c8
BS
11327
11328for ac_header in unistd.h vfork.h
ba479fd2
NN
11329do
11330as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b61ff9c8
BS
11331echo "$as_me:$LINENO: checking for $ac_header" >&5
11332echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11333if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 11334 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 11335else
18fc9bd4 11336 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11337/* confdefs.h. */
11338_ACEOF
11339cat confdefs.h >>conftest.$ac_ext
11340cat >>conftest.$ac_ext <<_ACEOF
11341/* end confdefs.h. */
11342#include <$ac_header>
11343_ACEOF
b61ff9c8
BS
11344if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11345 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
11346 ac_status=$?
11347 grep -v '^ *+' conftest.er1 >conftest.err
11348 rm -f conftest.er1
11349 cat conftest.err >&5
11350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11351 (exit $ac_status); } >/dev/null; then
11352 if test -s conftest.err; then
11353 ac_cpp_err=$ac_c_preproc_warn_flag
11354 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11355 else
11356 ac_cpp_err=
11357 fi
11358else
11359 ac_cpp_err=yes
11360fi
11361if test -z "$ac_cpp_err"; then
18fc9bd4 11362 eval "$as_ac_Header=yes"
ba479fd2
NN
11363else
11364 echo "$as_me: failed program was:" >&5
11365sed 's/^/| /' conftest.$ac_ext >&5
11366
18fc9bd4 11367 eval "$as_ac_Header=no"
ba479fd2
NN
11368fi
11369rm -f conftest.err conftest.$ac_ext
c375c43b 11370fi
b61ff9c8
BS
11371echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11372echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
11373if test `eval echo '${'$as_ac_Header'}'` = yes; then
11374 cat >>confdefs.h <<_ACEOF
11375#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11376_ACEOF
6e3f3080
NN
11377
11378fi
ba479fd2
NN
11379done
11380
11381
11382
11383for ac_func in fork vfork
11384do
11385as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b61ff9c8
BS
11386echo "$as_me:$LINENO: checking for $ac_func" >&5
11387echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11388if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
11389 echo $ECHO_N "(cached) $ECHO_C" >&6
11390else
11391 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11392/* confdefs.h. */
11393_ACEOF
11394cat confdefs.h >>conftest.$ac_ext
11395cat >>conftest.$ac_ext <<_ACEOF
11396/* end confdefs.h. */
86da66b5
HPN
11397/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11398 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11399#define $ac_func innocuous_$ac_func
11400
c375c43b 11401/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
11402 which can conflict with char $ac_func (); below.
11403 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11404 <limits.h> exists even on freestanding compilers. */
86da66b5 11405
ba479fd2
NN
11406#ifdef __STDC__
11407# include <limits.h>
11408#else
11409# include <assert.h>
11410#endif
86da66b5
HPN
11411
11412#undef $ac_func
11413
b61ff9c8 11414/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
11415#ifdef __cplusplus
11416extern "C"
b61ff9c8 11417{
ba479fd2 11418#endif
b61ff9c8
BS
11419/* We use char because int might match the return type of a gcc2
11420 builtin and then its argument prototype would still apply. */
ba479fd2 11421char $ac_func ();
c375c43b
KG
11422/* The GNU C library defines this for functions which it implements
11423 to always fail with ENOSYS. Some functions are actually named
11424 something starting with __ and the normal name is an alias. */
b61ff9c8 11425#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b 11426choke me
b61ff9c8
BS
11427#else
11428char (*f) () = $ac_func;
11429#endif
11430#ifdef __cplusplus
11431}
c375c43b
KG
11432#endif
11433
ba479fd2
NN
11434int
11435main ()
11436{
b61ff9c8 11437return f != $ac_func;
ba479fd2
NN
11438 ;
11439 return 0;
11440}
11441_ACEOF
11442rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11443if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11444 (eval $ac_link) 2>conftest.er1
ba479fd2 11445 ac_status=$?
86da66b5
HPN
11446 grep -v '^ *+' conftest.er1 >conftest.err
11447 rm -f conftest.er1
11448 cat conftest.err >&5
ba479fd2 11449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11450 (exit $ac_status); } &&
11451 { ac_try='test -z "$ac_c_werror_flag"
11452 || test ! -s conftest.err'
11453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11454 (eval $ac_try) 2>&5
11455 ac_status=$?
11456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11457 (exit $ac_status); }; } &&
11458 { ac_try='test -s conftest$ac_exeext'
11459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11460 (eval $ac_try) 2>&5
11461 ac_status=$?
11462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11463 (exit $ac_status); }; }; then
ba479fd2
NN
11464 eval "$as_ac_var=yes"
11465else
11466 echo "$as_me: failed program was:" >&5
11467sed 's/^/| /' conftest.$ac_ext >&5
11468
b61ff9c8 11469eval "$as_ac_var=no"
ba479fd2 11470fi
b61ff9c8 11471rm -f conftest.err conftest.$ac_objext \
86da66b5 11472 conftest$ac_exeext conftest.$ac_ext
ba479fd2 11473fi
b61ff9c8
BS
11474echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11475echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
11476if test `eval echo '${'$as_ac_var'}'` = yes; then
11477 cat >>confdefs.h <<_ACEOF
11478#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11479_ACEOF
11480
c375c43b 11481fi
ba479fd2 11482done
c375c43b 11483
ba479fd2 11484if test "x$ac_cv_func_fork" = xyes; then
b61ff9c8
BS
11485 echo "$as_me:$LINENO: checking for working fork" >&5
11486echo $ECHO_N "checking for working fork... $ECHO_C" >&6
ba479fd2
NN
11487if test "${ac_cv_func_fork_works+set}" = set; then
11488 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 11489else
ba479fd2
NN
11490 if test "$cross_compiling" = yes; then
11491 ac_cv_func_fork_works=cross
11492else
11493 cat >conftest.$ac_ext <<_ACEOF
b61ff9c8
BS
11494/* By Ruediger Kuhlmann. */
11495 #include <sys/types.h>
11496 #if HAVE_UNISTD_H
11497 # include <unistd.h>
11498 #endif
11499 /* Some systems only have a dummy stub for fork() */
11500 int main ()
11501 {
11502 if (fork() < 0)
11503 exit (1);
11504 exit (0);
11505 }
1a4b763e
BS
11506_ACEOF
11507rm -f conftest$ac_exeext
b61ff9c8
BS
11508if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11509 (eval $ac_link) 2>&5
1a4b763e
BS
11510 ac_status=$?
11511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
11513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11514 (eval $ac_try) 2>&5
ba479fd2
NN
11515 ac_status=$?
11516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11517 (exit $ac_status); }; }; then
11518 ac_cv_func_fork_works=yes
11519else
11520 echo "$as_me: program exited with status $ac_status" >&5
11521echo "$as_me: failed program was:" >&5
11522sed 's/^/| /' conftest.$ac_ext >&5
11523
11524( exit $ac_status )
11525ac_cv_func_fork_works=no
11526fi
b61ff9c8 11527rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
11528fi
11529fi
b61ff9c8
BS
11530echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
11531echo "${ECHO_T}$ac_cv_func_fork_works" >&6
ba479fd2
NN
11532
11533else
11534 ac_cv_func_fork_works=$ac_cv_func_fork
11535fi
11536if test "x$ac_cv_func_fork_works" = xcross; then
11537 case $host in
11538 *-*-amigaos* | *-*-msdosdjgpp*)
11539 # Override, as these systems have only a dummy fork() stub
11540 ac_cv_func_fork_works=no
11541 ;;
11542 *)
11543 ac_cv_func_fork_works=yes
11544 ;;
11545 esac
11546 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11547echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 11548fi
c375c43b 11549ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2 11550if test "x$ac_cv_func_vfork" = xyes; then
b61ff9c8
BS
11551 echo "$as_me:$LINENO: checking for working vfork" >&5
11552echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
ba479fd2
NN
11553if test "${ac_cv_func_vfork_works+set}" = set; then
11554 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 11555else
ba479fd2
NN
11556 if test "$cross_compiling" = yes; then
11557 ac_cv_func_vfork_works=cross
11558else
11559 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11560/* confdefs.h. */
11561_ACEOF
11562cat confdefs.h >>conftest.$ac_ext
11563cat >>conftest.$ac_ext <<_ACEOF
11564/* end confdefs.h. */
c375c43b 11565/* Thanks to Paul Eggert for this test. */
b61ff9c8
BS
11566#include <stdio.h>
11567#include <stdlib.h>
11568#include <sys/types.h>
11569#include <sys/stat.h>
ba479fd2 11570#include <sys/wait.h>
b61ff9c8
BS
11571#if HAVE_UNISTD_H
11572# include <unistd.h>
11573#endif
11574#if HAVE_VFORK_H
ba479fd2 11575# include <vfork.h>
c375c43b
KG
11576#endif
11577/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
11578 argument registers are propagated back to the parent. The compiler
11579 is told about this with #include <vfork.h>, but some compilers
11580 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11581 static variable whose address is put into a register that is
11582 clobbered by the vfork. */
11583static void
c375c43b
KG
11584#ifdef __cplusplus
11585sparc_address_test (int arg)
ba479fd2 11586# else
c375c43b
KG
11587sparc_address_test (arg) int arg;
11588#endif
11589{
11590 static pid_t child;
11591 if (!child) {
11592 child = vfork ();
11593 if (child < 0) {
11594 perror ("vfork");
11595 _exit(2);
11596 }
11597 if (!child) {
11598 arg = getpid();
11599 write(-1, "", 0);
11600 _exit (arg);
11601 }
11602 }
11603}
ba479fd2
NN
11604
11605int
11606main ()
11607{
c375c43b
KG
11608 pid_t parent = getpid ();
11609 pid_t child;
11610
ba479fd2 11611 sparc_address_test (0);
c375c43b
KG
11612
11613 child = vfork ();
11614
11615 if (child == 0) {
ba479fd2
NN
11616 /* Here is another test for sparc vfork register problems. This
11617 test uses lots of local variables, at least as many local
11618 variables as main has allocated so far including compiler
11619 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11620 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11621 reuse the register of parent for one of the local variables,
11622 since it will think that parent can't possibly be used any more
11623 in this routine. Assigning to the local variable will thus
11624 munge parent in the parent process. */
c375c43b
KG
11625 pid_t
11626 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11627 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11628 /* Convince the compiler that p..p7 are live; otherwise, it might
11629 use the same hardware register for all 8 local variables. */
11630 if (p != p1 || p != p2 || p != p3 || p != p4
11631 || p != p5 || p != p6 || p != p7)
11632 _exit(1);
11633
ba479fd2
NN
11634 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11635 from child file descriptors. If the child closes a descriptor
11636 before it execs or exits, this munges the parent's descriptor
11637 as well. Test for this by closing stdout in the child. */
c375c43b
KG
11638 _exit(close(fileno(stdout)) != 0);
11639 } else {
11640 int status;
11641 struct stat st;
11642
11643 while (wait(&status) != child)
11644 ;
b61ff9c8 11645 exit(
c375c43b
KG
11646 /* Was there some problem with vforking? */
11647 child < 0
11648
11649 /* Did the child fail? (This shouldn't happen.) */
11650 || status
11651
11652 /* Did the vfork/compiler bug occur? */
11653 || parent != getpid()
11654
11655 /* Did the file descriptor bug occur? */
11656 || fstat(fileno(stdout), &st) != 0
11657 );
11658 }
11659}
ba479fd2
NN
11660_ACEOF
11661rm -f conftest$ac_exeext
b61ff9c8
BS
11662if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11663 (eval $ac_link) 2>&5
ba479fd2
NN
11664 ac_status=$?
11665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11666 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
11667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11668 (eval $ac_try) 2>&5
ba479fd2
NN
11669 ac_status=$?
11670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11671 (exit $ac_status); }; }; then
c375c43b
KG
11672 ac_cv_func_vfork_works=yes
11673else
ba479fd2
NN
11674 echo "$as_me: program exited with status $ac_status" >&5
11675echo "$as_me: failed program was:" >&5
11676sed 's/^/| /' conftest.$ac_ext >&5
11677
11678( exit $ac_status )
11679ac_cv_func_vfork_works=no
cafe096b 11680fi
b61ff9c8 11681rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 11682fi
ba479fd2 11683fi
b61ff9c8
BS
11684echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
11685echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 11686
ba479fd2
NN
11687fi;
11688if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 11689 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
11690 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11691echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
11692fi
11693
ba479fd2
NN
11694if test "x$ac_cv_func_vfork_works" = xyes; then
11695
11696cat >>confdefs.h <<\_ACEOF
11697#define HAVE_WORKING_VFORK 1
11698_ACEOF
11699
11700else
11701
11702cat >>confdefs.h <<\_ACEOF
c375c43b 11703#define vfork fork
ba479fd2 11704_ACEOF
c375c43b
KG
11705
11706fi
ba479fd2
NN
11707if test "x$ac_cv_func_fork_works" = xyes; then
11708
11709cat >>confdefs.h <<\_ACEOF
11710#define HAVE_WORKING_FORK 1
11711_ACEOF
11712
11713fi
11714
c375c43b 11715
81bf3d9e 11716
dfb77e37
KC
11717 if test "X$prefix" = "XNONE"; then
11718 acl_final_prefix="$ac_default_prefix"
11719 else
11720 acl_final_prefix="$prefix"
11721 fi
11722 if test "X$exec_prefix" = "XNONE"; then
11723 acl_final_exec_prefix='${prefix}'
11724 else
11725 acl_final_exec_prefix="$exec_prefix"
11726 fi
11727 acl_save_prefix="$prefix"
11728 prefix="$acl_final_prefix"
11729 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
11730 prefix="$acl_save_prefix"
f91abfce
TT
11731
11732
b61ff9c8 11733# Check whether --with-gnu-ld or --without-gnu-ld was given.
dfb77e37 11734if test "${with_gnu_ld+set}" = set; then
b61ff9c8
BS
11735 withval="$with_gnu_ld"
11736 test "$withval" = no || with_gnu_ld=yes
ba479fd2 11737else
dfb77e37 11738 with_gnu_ld=no
b61ff9c8 11739fi;
dfb77e37
KC
11740# Prepare PATH_SEPARATOR.
11741# The user is always right.
11742if test "${PATH_SEPARATOR+set}" != set; then
11743 echo "#! /bin/sh" >conf$$.sh
11744 echo "exit 0" >>conf$$.sh
11745 chmod +x conf$$.sh
11746 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11747 PATH_SEPARATOR=';'
ba479fd2 11748 else
dfb77e37 11749 PATH_SEPARATOR=:
ba479fd2 11750 fi
dfb77e37
KC
11751 rm -f conf$$.sh
11752fi
11753ac_prog=ld
11754if test "$GCC" = yes; then
11755 # Check if gcc -print-prog-name=ld gives a path.
b61ff9c8
BS
11756 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
11757echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
dfb77e37
KC
11758 case $host in
11759 *-*-mingw*)
11760 # gcc leaves a trailing carriage return which upsets mingw
11761 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11762 *)
11763 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11764 esac
11765 case $ac_prog in
11766 # Accept absolute paths.
11767 [\\/]* | [A-Za-z]:[\\/]*)
11768 re_direlt='/[^/][^/]*/\.\./'
11769 # Canonicalize the path of ld
11770 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
11771 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
11772 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
11773 done
11774 test -z "$LD" && LD="$ac_prog"
11775 ;;
11776 "")
11777 # If it fails, then pretend we aren't using GCC.
11778 ac_prog=ld
11779 ;;
11780 *)
11781 # If it is relative, then search for the first ld in PATH.
11782 with_gnu_ld=unknown
11783 ;;
11784 esac
11785elif test "$with_gnu_ld" = yes; then
b61ff9c8
BS
11786 echo "$as_me:$LINENO: checking for GNU ld" >&5
11787echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 11788else
b61ff9c8
BS
11789 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
11790echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 11791fi
dfb77e37
KC
11792if test "${acl_cv_path_LD+set}" = set; then
11793 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 11794else
dfb77e37
KC
11795 if test -z "$LD"; then
11796 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
11797 for ac_dir in $PATH; do
11798 test -z "$ac_dir" && ac_dir=.
11799 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11800 acl_cv_path_LD="$ac_dir/$ac_prog"
11801 # Check to see if the program is GNU ld. I'd rather use --version,
11802 # but apparently some GNU ld's only accept -v.
11803 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
11804 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
11805 test "$with_gnu_ld" != no && break
11806 else
11807 test "$with_gnu_ld" != yes && break
11808 fi
dfb77e37
KC
11809 fi
11810 done
11811 IFS="$ac_save_ifs"
11812else
11813 acl_cv_path_LD="$LD" # Let the user override the test with a path.
11814fi
11815fi
ba479fd2 11816
dfb77e37
KC
11817LD="$acl_cv_path_LD"
11818if test -n "$LD"; then
b61ff9c8
BS
11819 echo "$as_me:$LINENO: result: $LD" >&5
11820echo "${ECHO_T}$LD" >&6
dfb77e37 11821else
b61ff9c8
BS
11822 echo "$as_me:$LINENO: result: no" >&5
11823echo "${ECHO_T}no" >&6
ba479fd2 11824fi
dfb77e37
KC
11825test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
11826echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
11827 { (exit 1); exit 1; }; }
b61ff9c8
BS
11828echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
11829echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
dfb77e37
KC
11830if test "${acl_cv_prog_gnu_ld+set}" = set; then
11831 echo $ECHO_N "(cached) $ECHO_C" >&6
11832else
11833 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
11834if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
11835 acl_cv_prog_gnu_ld=yes
11836else
11837 acl_cv_prog_gnu_ld=no
11838fi
dfb77e37 11839fi
b61ff9c8
BS
11840echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
11841echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
dfb77e37
KC
11842with_gnu_ld=$acl_cv_prog_gnu_ld
11843
11844
11845
b61ff9c8
BS
11846 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
11847echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
dfb77e37
KC
11848if test "${acl_cv_rpath+set}" = set; then
11849 echo $ECHO_N "(cached) $ECHO_C" >&6
11850else
11851
11852 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
11853 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
11854 . ./conftest.sh
11855 rm -f ./conftest.sh
11856 acl_cv_rpath=done
ba479fd2 11857
eb158727 11858fi
b61ff9c8
BS
11859echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
11860echo "${ECHO_T}$acl_cv_rpath" >&6
dfb77e37
KC
11861 wl="$acl_cv_wl"
11862 libext="$acl_cv_libext"
11863 shlibext="$acl_cv_shlibext"
11864 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
11865 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
11866 hardcode_direct="$acl_cv_hardcode_direct"
11867 hardcode_minus_L="$acl_cv_hardcode_minus_L"
b61ff9c8 11868 # Check whether --enable-rpath or --disable-rpath was given.
dfb77e37 11869if test "${enable_rpath+set}" = set; then
b61ff9c8
BS
11870 enableval="$enable_rpath"
11871 :
dfb77e37
KC
11872else
11873 enable_rpath=yes
b61ff9c8 11874fi;
8b1f719a 11875
a6ccdbab 11876
dfb77e37
KC
11877
11878
11879
11880
11881
b639c3c2
JJ
11882 use_additional=yes
11883
11884 acl_save_prefix="$prefix"
11885 prefix="$acl_final_prefix"
11886 acl_save_exec_prefix="$exec_prefix"
11887 exec_prefix="$acl_final_exec_prefix"
11888
11889 eval additional_includedir=\"$includedir\"
11890 eval additional_libdir=\"$libdir\"
11891
11892 exec_prefix="$acl_save_exec_prefix"
11893 prefix="$acl_save_prefix"
dfb77e37
KC
11894
11895
b61ff9c8 11896# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
8b1f719a 11897if test "${with_libiconv_prefix+set}" = set; then
b61ff9c8
BS
11898 withval="$with_libiconv_prefix"
11899
8b1f719a 11900 if test "X$withval" = "Xno"; then
b639c3c2 11901 use_additional=no
8b1f719a
PB
11902 else
11903 if test "X$withval" = "X"; then
dfb77e37
KC
11904
11905 acl_save_prefix="$prefix"
11906 prefix="$acl_final_prefix"
11907 acl_save_exec_prefix="$exec_prefix"
11908 exec_prefix="$acl_final_exec_prefix"
11909
b639c3c2
JJ
11910 eval additional_includedir=\"$includedir\"
11911 eval additional_libdir=\"$libdir\"
dfb77e37
KC
11912
11913 exec_prefix="$acl_save_exec_prefix"
11914 prefix="$acl_save_prefix"
11915
8b1f719a 11916 else
b639c3c2
JJ
11917 additional_includedir="$withval/include"
11918 additional_libdir="$withval/lib"
8b1f719a
PB
11919 fi
11920 fi
11921
b61ff9c8 11922fi;
dfb77e37
KC
11923 LIBICONV=
11924 LTLIBICONV=
11925 INCICONV=
11926 rpathdirs=
11927 ltrpathdirs=
11928 names_already_handled=
11929 names_next_round='iconv '
11930 while test -n "$names_next_round"; do
11931 names_this_round="$names_next_round"
11932 names_next_round=
11933 for name in $names_this_round; do
11934 already_handled=
11935 for n in $names_already_handled; do
11936 if test "$n" = "$name"; then
11937 already_handled=yes
11938 break
11939 fi
11940 done
11941 if test -z "$already_handled"; then
11942 names_already_handled="$names_already_handled $name"
11943 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11944 eval value=\"\$HAVE_LIB$uppername\"
11945 if test -n "$value"; then
11946 if test "$value" = yes; then
11947 eval value=\"\$LIB$uppername\"
11948 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11949 eval value=\"\$LTLIB$uppername\"
11950 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11951 else
11952 :
11953 fi
11954 else
11955 found_dir=
11956 found_la=
11957 found_so=
11958 found_a=
b639c3c2
JJ
11959 if test $use_additional = yes; then
11960 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11961 found_dir="$additional_libdir"
11962 found_so="$additional_libdir/lib$name.$shlibext"
11963 if test -f "$additional_libdir/lib$name.la"; then
11964 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
11965 fi
11966 else
b639c3c2
JJ
11967 if test -f "$additional_libdir/lib$name.$libext"; then
11968 found_dir="$additional_libdir"
11969 found_a="$additional_libdir/lib$name.$libext"
11970 if test -f "$additional_libdir/lib$name.la"; then
11971 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
11972 fi
11973 fi
11974 fi
11975 fi
11976 if test "X$found_dir" = "X"; then
11977 for x in $LDFLAGS $LTLIBICONV; do
11978
11979 acl_save_prefix="$prefix"
11980 prefix="$acl_final_prefix"
11981 acl_save_exec_prefix="$exec_prefix"
11982 exec_prefix="$acl_final_exec_prefix"
11983 eval x=\"$x\"
11984 exec_prefix="$acl_save_exec_prefix"
11985 prefix="$acl_save_prefix"
11986
11987 case "$x" in
11988 -L*)
11989 dir=`echo "X$x" | sed -e 's/^X-L//'`
11990 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11991 found_dir="$dir"
11992 found_so="$dir/lib$name.$shlibext"
11993 if test -f "$dir/lib$name.la"; then
11994 found_la="$dir/lib$name.la"
11995 fi
11996 else
11997 if test -f "$dir/lib$name.$libext"; then
11998 found_dir="$dir"
11999 found_a="$dir/lib$name.$libext"
12000 if test -f "$dir/lib$name.la"; then
12001 found_la="$dir/lib$name.la"
12002 fi
12003 fi
12004 fi
12005 ;;
12006 esac
12007 if test "X$found_dir" != "X"; then
12008 break
12009 fi
12010 done
12011 fi
12012 if test "X$found_dir" != "X"; then
12013 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
12014 if test "X$found_so" != "X"; then
12015 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
12016 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12017 else
12018 haveit=
12019 for x in $ltrpathdirs; do
12020 if test "X$x" = "X$found_dir"; then
12021 haveit=yes
12022 break
12023 fi
12024 done
12025 if test -z "$haveit"; then
12026 ltrpathdirs="$ltrpathdirs $found_dir"
12027 fi
12028 if test "$hardcode_direct" = yes; then
12029 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12030 else
12031 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
12032 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12033 haveit=
12034 for x in $rpathdirs; do
12035 if test "X$x" = "X$found_dir"; then
12036 haveit=yes
12037 break
12038 fi
12039 done
12040 if test -z "$haveit"; then
12041 rpathdirs="$rpathdirs $found_dir"
12042 fi
12043 else
12044 haveit=
12045 for x in $LDFLAGS $LIBICONV; do
12046
12047 acl_save_prefix="$prefix"
12048 prefix="$acl_final_prefix"
12049 acl_save_exec_prefix="$exec_prefix"
12050 exec_prefix="$acl_final_exec_prefix"
12051 eval x=\"$x\"
12052 exec_prefix="$acl_save_exec_prefix"
12053 prefix="$acl_save_prefix"
12054
12055 if test "X$x" = "X-L$found_dir"; then
12056 haveit=yes
12057 break
12058 fi
12059 done
12060 if test -z "$haveit"; then
12061 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
12062 fi
12063 if test "$hardcode_minus_L" != no; then
12064 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12065 else
12066 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
12067 fi
12068 fi
12069 fi
12070 fi
12071 else
12072 if test "X$found_a" != "X"; then
12073 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
12074 else
12075 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
12076 fi
12077 fi
12078 additional_includedir=
12079 case "$found_dir" in
12080 */lib | */lib/)
12081 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
12082 additional_includedir="$basedir/include"
12083 ;;
12084 esac
12085 if test "X$additional_includedir" != "X"; then
12086 if test "X$additional_includedir" != "X/usr/include"; then
12087 haveit=
12088 if test "X$additional_includedir" = "X/usr/local/include"; then
12089 if test -n "$GCC"; then
12090 case $host_os in
18fc9bd4 12091 linux*) haveit=yes;;
dfb77e37
KC
12092 esac
12093 fi
12094 fi
12095 if test -z "$haveit"; then
12096 for x in $CPPFLAGS $INCICONV; do
12097
12098 acl_save_prefix="$prefix"
12099 prefix="$acl_final_prefix"
12100 acl_save_exec_prefix="$exec_prefix"
12101 exec_prefix="$acl_final_exec_prefix"
12102 eval x=\"$x\"
12103 exec_prefix="$acl_save_exec_prefix"
12104 prefix="$acl_save_prefix"
12105
12106 if test "X$x" = "X-I$additional_includedir"; then
12107 haveit=yes
12108 break
12109 fi
12110 done
12111 if test -z "$haveit"; then
12112 if test -d "$additional_includedir"; then
12113 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
12114 fi
12115 fi
12116 fi
12117 fi
12118 fi
12119 if test -n "$found_la"; then
12120 save_libdir="$libdir"
12121 case "$found_la" in
12122 */* | *\\*) . "$found_la" ;;
12123 *) . "./$found_la" ;;
12124 esac
12125 libdir="$save_libdir"
12126 for dep in $dependency_libs; do
12127 case "$dep" in
12128 -L*)
12129 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
12130 if test "X$additional_libdir" != "X/usr/lib"; then
12131 haveit=
12132 if test "X$additional_libdir" = "X/usr/local/lib"; then
12133 if test -n "$GCC"; then
12134 case $host_os in
18fc9bd4 12135 linux*) haveit=yes;;
dfb77e37
KC
12136 esac
12137 fi
12138 fi
12139 if test -z "$haveit"; then
12140 haveit=
12141 for x in $LDFLAGS $LIBICONV; do
12142
12143 acl_save_prefix="$prefix"
12144 prefix="$acl_final_prefix"
12145 acl_save_exec_prefix="$exec_prefix"
12146 exec_prefix="$acl_final_exec_prefix"
12147 eval x=\"$x\"
12148 exec_prefix="$acl_save_exec_prefix"
12149 prefix="$acl_save_prefix"
12150
12151 if test "X$x" = "X-L$additional_libdir"; then
12152 haveit=yes
12153 break
12154 fi
12155 done
12156 if test -z "$haveit"; then
12157 if test -d "$additional_libdir"; then
12158 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
12159 fi
12160 fi
12161 haveit=
12162 for x in $LDFLAGS $LTLIBICONV; do
12163
12164 acl_save_prefix="$prefix"
12165 prefix="$acl_final_prefix"
12166 acl_save_exec_prefix="$exec_prefix"
12167 exec_prefix="$acl_final_exec_prefix"
12168 eval x=\"$x\"
12169 exec_prefix="$acl_save_exec_prefix"
12170 prefix="$acl_save_prefix"
12171
12172 if test "X$x" = "X-L$additional_libdir"; then
12173 haveit=yes
12174 break
12175 fi
12176 done
12177 if test -z "$haveit"; then
12178 if test -d "$additional_libdir"; then
12179 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
12180 fi
12181 fi
12182 fi
12183 fi
12184 ;;
12185 -R*)
12186 dir=`echo "X$dep" | sed -e 's/^X-R//'`
12187 if test "$enable_rpath" != no; then
12188 haveit=
12189 for x in $rpathdirs; do
12190 if test "X$x" = "X$dir"; then
12191 haveit=yes
12192 break
12193 fi
12194 done
12195 if test -z "$haveit"; then
12196 rpathdirs="$rpathdirs $dir"
12197 fi
12198 haveit=
12199 for x in $ltrpathdirs; do
12200 if test "X$x" = "X$dir"; then
12201 haveit=yes
12202 break
12203 fi
12204 done
12205 if test -z "$haveit"; then
12206 ltrpathdirs="$ltrpathdirs $dir"
12207 fi
12208 fi
12209 ;;
12210 -l*)
12211 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
12212 ;;
12213 *.la)
12214 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
12215 ;;
12216 *)
12217 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
12218 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
12219 ;;
12220 esac
12221 done
12222 fi
12223 else
12224 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
12225 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
12226 fi
12227 fi
12228 fi
12229 done
12230 done
12231 if test "X$rpathdirs" != "X"; then
12232 if test -n "$hardcode_libdir_separator"; then
12233 alldirs=
12234 for found_dir in $rpathdirs; do
12235 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
12236 done
12237 acl_save_libdir="$libdir"
12238 libdir="$alldirs"
12239 eval flag=\"$hardcode_libdir_flag_spec\"
12240 libdir="$acl_save_libdir"
12241 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
12242 else
12243 for found_dir in $rpathdirs; do
12244 acl_save_libdir="$libdir"
12245 libdir="$found_dir"
12246 eval flag=\"$hardcode_libdir_flag_spec\"
12247 libdir="$acl_save_libdir"
12248 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
12249 done
12250 fi
12251 fi
12252 if test "X$ltrpathdirs" != "X"; then
12253 for found_dir in $ltrpathdirs; do
12254 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
12255 done
12256 fi
12257
12258
12259
12260
12261
12262
12263
12264 am_save_CPPFLAGS="$CPPFLAGS"
12265
12266 for element in $INCICONV; do
12267 haveit=
12268 for x in $CPPFLAGS; do
12269
12270 acl_save_prefix="$prefix"
12271 prefix="$acl_final_prefix"
12272 acl_save_exec_prefix="$exec_prefix"
12273 exec_prefix="$acl_final_exec_prefix"
12274 eval x=\"$x\"
12275 exec_prefix="$acl_save_exec_prefix"
12276 prefix="$acl_save_prefix"
12277
12278 if test "X$x" = "X$element"; then
12279 haveit=yes
12280 break
12281 fi
12282 done
12283 if test -z "$haveit"; then
12284 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12285 fi
12286 done
eb158727
ZW
12287
12288
b61ff9c8
BS
12289 echo "$as_me:$LINENO: checking for iconv" >&5
12290echo $ECHO_N "checking for iconv... $ECHO_C" >&6
ba479fd2
NN
12291if test "${am_cv_func_iconv+set}" = set; then
12292 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 12293else
ba479fd2 12294
f91abfce
TT
12295 am_cv_func_iconv="no, consider installing GNU libiconv"
12296 am_cv_lib_iconv=no
ba479fd2 12297 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12298/* confdefs.h. */
12299_ACEOF
12300cat confdefs.h >>conftest.$ac_ext
12301cat >>conftest.$ac_ext <<_ACEOF
12302/* end confdefs.h. */
f91abfce
TT
12303#include <stdlib.h>
12304#include <iconv.h>
ba479fd2
NN
12305int
12306main ()
12307{
f91abfce
TT
12308iconv_t cd = iconv_open("","");
12309 iconv(cd,NULL,NULL,NULL,NULL);
12310 iconv_close(cd);
ba479fd2
NN
12311 ;
12312 return 0;
12313}
12314_ACEOF
12315rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
12316if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12317 (eval $ac_link) 2>conftest.er1
ba479fd2 12318 ac_status=$?
86da66b5
HPN
12319 grep -v '^ *+' conftest.er1 >conftest.err
12320 rm -f conftest.er1
12321 cat conftest.err >&5
ba479fd2 12322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12323 (exit $ac_status); } &&
12324 { ac_try='test -z "$ac_c_werror_flag"
12325 || test ! -s conftest.err'
12326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12327 (eval $ac_try) 2>&5
12328 ac_status=$?
12329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12330 (exit $ac_status); }; } &&
12331 { ac_try='test -s conftest$ac_exeext'
12332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12333 (eval $ac_try) 2>&5
12334 ac_status=$?
12335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12336 (exit $ac_status); }; }; then
f91abfce
TT
12337 am_cv_func_iconv=yes
12338else
ba479fd2
NN
12339 echo "$as_me: failed program was:" >&5
12340sed 's/^/| /' conftest.$ac_ext >&5
12341
f91abfce 12342fi
b61ff9c8 12343rm -f conftest.err conftest.$ac_objext \
86da66b5 12344 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
12345 if test "$am_cv_func_iconv" != yes; then
12346 am_save_LIBS="$LIBS"
dfb77e37 12347 LIBS="$LIBS $LIBICONV"
ba479fd2 12348 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12349/* confdefs.h. */
12350_ACEOF
12351cat confdefs.h >>conftest.$ac_ext
12352cat >>conftest.$ac_ext <<_ACEOF
12353/* end confdefs.h. */
f91abfce
TT
12354#include <stdlib.h>
12355#include <iconv.h>
ba479fd2
NN
12356int
12357main ()
12358{
f91abfce
TT
12359iconv_t cd = iconv_open("","");
12360 iconv(cd,NULL,NULL,NULL,NULL);
12361 iconv_close(cd);
ba479fd2
NN
12362 ;
12363 return 0;
12364}
12365_ACEOF
12366rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
12367if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12368 (eval $ac_link) 2>conftest.er1
ba479fd2 12369 ac_status=$?
86da66b5
HPN
12370 grep -v '^ *+' conftest.er1 >conftest.err
12371 rm -f conftest.er1
12372 cat conftest.err >&5
ba479fd2 12373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12374 (exit $ac_status); } &&
12375 { ac_try='test -z "$ac_c_werror_flag"
12376 || test ! -s conftest.err'
12377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12378 (eval $ac_try) 2>&5
12379 ac_status=$?
12380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12381 (exit $ac_status); }; } &&
12382 { ac_try='test -s conftest$ac_exeext'
12383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12384 (eval $ac_try) 2>&5
12385 ac_status=$?
12386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12387 (exit $ac_status); }; }; then
f91abfce
TT
12388 am_cv_lib_iconv=yes
12389 am_cv_func_iconv=yes
12390else
ba479fd2
NN
12391 echo "$as_me: failed program was:" >&5
12392sed 's/^/| /' conftest.$ac_ext >&5
12393
f91abfce 12394fi
b61ff9c8 12395rm -f conftest.err conftest.$ac_objext \
86da66b5 12396 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
12397 LIBS="$am_save_LIBS"
12398 fi
6e3f3080 12399
ba479fd2 12400fi
b61ff9c8
BS
12401echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
12402echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 12403 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
12404
12405cat >>confdefs.h <<\_ACEOF
f91abfce 12406#define HAVE_ICONV 1
ba479fd2 12407_ACEOF
f91abfce 12408
dfb77e37
KC
12409 fi
12410 if test "$am_cv_lib_iconv" = yes; then
b61ff9c8
BS
12411 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
12412echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
12413 echo "$as_me:$LINENO: result: $LIBICONV" >&5
12414echo "${ECHO_T}$LIBICONV" >&6
dfb77e37
KC
12415 else
12416 CPPFLAGS="$am_save_CPPFLAGS"
12417 LIBICONV=
12418 LTLIBICONV=
12419 fi
12420
12421
12422
12423 if test "$am_cv_func_iconv" = yes; then
b61ff9c8
BS
12424 echo "$as_me:$LINENO: checking for iconv declaration" >&5
12425echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
ba479fd2
NN
12426 if test "${am_cv_proto_iconv+set}" = set; then
12427 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 12428else
ba479fd2
NN
12429
12430 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12431/* confdefs.h. */
12432_ACEOF
12433cat confdefs.h >>conftest.$ac_ext
12434cat >>conftest.$ac_ext <<_ACEOF
12435/* end confdefs.h. */
f91abfce
TT
12436
12437#include <stdlib.h>
12438#include <iconv.h>
12439extern
12440#ifdef __cplusplus
12441"C"
12442#endif
12443#if defined(__STDC__) || defined(__cplusplus)
12444size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
12445#else
12446size_t iconv();
12447#endif
12448
ba479fd2
NN
12449int
12450main ()
12451{
f91abfce 12452
ba479fd2
NN
12453 ;
12454 return 0;
12455}
12456_ACEOF
12457rm -f conftest.$ac_objext
b61ff9c8
BS
12458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12459 (eval $ac_compile) 2>conftest.er1
ba479fd2 12460 ac_status=$?
86da66b5
HPN
12461 grep -v '^ *+' conftest.er1 >conftest.err
12462 rm -f conftest.er1
12463 cat conftest.err >&5
ba479fd2 12464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12465 (exit $ac_status); } &&
12466 { ac_try='test -z "$ac_c_werror_flag"
12467 || test ! -s conftest.err'
12468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12469 (eval $ac_try) 2>&5
12470 ac_status=$?
12471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12472 (exit $ac_status); }; } &&
12473 { ac_try='test -s conftest.$ac_objext'
12474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12475 (eval $ac_try) 2>&5
12476 ac_status=$?
12477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12478 (exit $ac_status); }; }; then
f91abfce
TT
12479 am_cv_proto_iconv_arg1=""
12480else
ba479fd2
NN
12481 echo "$as_me: failed program was:" >&5
12482sed 's/^/| /' conftest.$ac_ext >&5
12483
b61ff9c8 12484am_cv_proto_iconv_arg1="const"
f91abfce 12485fi
b61ff9c8 12486rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
12487 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);"
12488fi
12489
12490 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
b61ff9c8 12491 echo "$as_me:$LINENO: result: ${ac_t:-
ba479fd2
NN
12492 }$am_cv_proto_iconv" >&5
12493echo "${ECHO_T}${ac_t:-
b61ff9c8 12494 }$am_cv_proto_iconv" >&6
ba479fd2
NN
12495
12496cat >>confdefs.h <<_ACEOF
f91abfce 12497#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 12498_ACEOF
f91abfce
TT
12499
12500 fi
f91abfce 12501
56694dd9
ZW
12502# Until we have in-tree GNU iconv:
12503LIBICONV_DEP=
12504
12505
18fc9bd4 12506
b61ff9c8
BS
12507 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
12508echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
18fc9bd4
RG
12509if test "${am_cv_val_LC_MESSAGES+set}" = set; then
12510 echo $ECHO_N "(cached) $ECHO_C" >&6
12511else
12512 cat >conftest.$ac_ext <<_ACEOF
12513/* confdefs.h. */
12514_ACEOF
12515cat confdefs.h >>conftest.$ac_ext
12516cat >>conftest.$ac_ext <<_ACEOF
12517/* end confdefs.h. */
12518#include <locale.h>
12519int
12520main ()
12521{
12522return LC_MESSAGES
12523 ;
12524 return 0;
12525}
12526_ACEOF
12527rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
12528if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12529 (eval $ac_link) 2>conftest.er1
18fc9bd4
RG
12530 ac_status=$?
12531 grep -v '^ *+' conftest.er1 >conftest.err
12532 rm -f conftest.er1
12533 cat conftest.err >&5
12534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12535 (exit $ac_status); } &&
12536 { ac_try='test -z "$ac_c_werror_flag"
12537 || test ! -s conftest.err'
12538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12539 (eval $ac_try) 2>&5
12540 ac_status=$?
12541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12542 (exit $ac_status); }; } &&
12543 { ac_try='test -s conftest$ac_exeext'
12544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12545 (eval $ac_try) 2>&5
12546 ac_status=$?
12547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12548 (exit $ac_status); }; }; then
18fc9bd4
RG
12549 am_cv_val_LC_MESSAGES=yes
12550else
12551 echo "$as_me: failed program was:" >&5
12552sed 's/^/| /' conftest.$ac_ext >&5
12553
b61ff9c8 12554am_cv_val_LC_MESSAGES=no
18fc9bd4 12555fi
b61ff9c8 12556rm -f conftest.err conftest.$ac_objext \
18fc9bd4
RG
12557 conftest$ac_exeext conftest.$ac_ext
12558fi
b61ff9c8
BS
12559echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
12560echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
18fc9bd4
RG
12561 if test $am_cv_val_LC_MESSAGES = yes; then
12562
12563cat >>confdefs.h <<\_ACEOF
12564#define HAVE_LC_MESSAGES 1
12565_ACEOF
12566
12567 fi
12568
f91abfce 12569
a03ea89b 12570
b61ff9c8
BS
12571 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
12572echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
a03ea89b
BM
12573if test "${am_cv_langinfo_codeset+set}" = set; then
12574 echo $ECHO_N "(cached) $ECHO_C" >&6
12575else
12576 cat >conftest.$ac_ext <<_ACEOF
12577/* confdefs.h. */
12578_ACEOF
12579cat confdefs.h >>conftest.$ac_ext
12580cat >>conftest.$ac_ext <<_ACEOF
12581/* end confdefs.h. */
12582#include <langinfo.h>
12583int
12584main ()
12585{
12586char* cs = nl_langinfo(CODESET);
12587 ;
12588 return 0;
12589}
12590_ACEOF
12591rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
12592if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12593 (eval $ac_link) 2>conftest.er1
a03ea89b
BM
12594 ac_status=$?
12595 grep -v '^ *+' conftest.er1 >conftest.err
12596 rm -f conftest.er1
12597 cat conftest.err >&5
12598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12599 (exit $ac_status); } &&
12600 { ac_try='test -z "$ac_c_werror_flag"
12601 || test ! -s conftest.err'
12602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12603 (eval $ac_try) 2>&5
12604 ac_status=$?
12605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12606 (exit $ac_status); }; } &&
12607 { ac_try='test -s conftest$ac_exeext'
12608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12609 (eval $ac_try) 2>&5
12610 ac_status=$?
12611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12612 (exit $ac_status); }; }; then
a03ea89b
BM
12613 am_cv_langinfo_codeset=yes
12614else
12615 echo "$as_me: failed program was:" >&5
12616sed 's/^/| /' conftest.$ac_ext >&5
12617
b61ff9c8 12618am_cv_langinfo_codeset=no
a03ea89b 12619fi
b61ff9c8 12620rm -f conftest.err conftest.$ac_objext \
a03ea89b
BM
12621 conftest$ac_exeext conftest.$ac_ext
12622
12623fi
b61ff9c8
BS
12624echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
12625echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
a03ea89b
BM
12626 if test $am_cv_langinfo_codeset = yes; then
12627
12628cat >>confdefs.h <<\_ACEOF
12629#define HAVE_LANGINFO_CODESET 1
12630_ACEOF
12631
12632 fi
12633
12634
86cf1cbd
KG
12635# We will need to find libiberty.h and ansidecl.h
12636saved_CFLAGS="$CFLAGS"
12637CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
6a257778 12659
ad6717df
PB
12660
12661
0d667716
KG
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
367e8319 12672
0d667716
KG
12673
12674
7391b66c 12675
ed5b9f96
GK
12676
12677for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
12678 strsignal strstr strverscmp \
12679 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 12680 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 12681do
ad6717df 12682 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12683echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12684echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12685if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12686 echo $ECHO_N "(cached) $ECHO_C" >&6
12687else
12688 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12689/* confdefs.h. */
12690_ACEOF
12691cat confdefs.h >>conftest.$ac_ext
12692cat >>conftest.$ac_ext <<_ACEOF
12693/* end confdefs.h. */
7afe8c41
KG
12694#undef $ac_tr_decl
12695#define $ac_tr_decl 1
ba479fd2 12696
d02af173 12697#include "ansidecl.h"
86cf1cbd 12698#include "system.h"
f31e826b 12699
ba479fd2
NN
12700int
12701main ()
12702{
86cf1cbd
KG
12703#ifndef $ac_func
12704char *(*pfn) = (char *(*)) $ac_func ;
12705#endif
ba479fd2
NN
12706 ;
12707 return 0;
12708}
12709_ACEOF
12710rm -f conftest.$ac_objext
b61ff9c8
BS
12711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12712 (eval $ac_compile) 2>conftest.er1
ba479fd2 12713 ac_status=$?
86da66b5
HPN
12714 grep -v '^ *+' conftest.er1 >conftest.err
12715 rm -f conftest.er1
12716 cat conftest.err >&5
ba479fd2 12717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12718 (exit $ac_status); } &&
12719 { ac_try='test -z "$ac_c_werror_flag"
12720 || test ! -s conftest.err'
12721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12722 (eval $ac_try) 2>&5
12723 ac_status=$?
12724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12725 (exit $ac_status); }; } &&
12726 { ac_try='test -s conftest.$ac_objext'
12727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12728 (eval $ac_try) 2>&5
12729 ac_status=$?
12730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12731 (exit $ac_status); }; }; then
f31e826b 12732 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 12733else
ba479fd2
NN
12734 echo "$as_me: failed program was:" >&5
12735sed 's/^/| /' conftest.$ac_ext >&5
12736
b61ff9c8 12737eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 12738fi
b61ff9c8 12739rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
12740fi
12741
f31e826b 12742if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12743 echo "$as_me:$LINENO: result: yes" >&5
12744echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 12745#define $ac_tr_decl 1
ba479fd2
NN
12746_ACEOF
12747
81bf3d9e 12748else
b61ff9c8
BS
12749 echo "$as_me:$LINENO: result: no" >&5
12750echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 12751#define $ac_tr_decl 0
ba479fd2
NN
12752_ACEOF
12753
81bf3d9e
RH
12754fi
12755
12756done
ba479fd2 12757
ba479fd2 12758
ba479fd2 12759
81bf3d9e 12760
81bf3d9e
RH
12761
12762for ac_func in getrlimit setrlimit getrusage
12763do
ad6717df 12764 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12765echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12766echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12767if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12768 echo $ECHO_N "(cached) $ECHO_C" >&6
12769else
12770 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12771/* confdefs.h. */
12772_ACEOF
12773cat confdefs.h >>conftest.$ac_ext
12774cat >>conftest.$ac_ext <<_ACEOF
12775/* end confdefs.h. */
7afe8c41
KG
12776#undef $ac_tr_decl
12777#define $ac_tr_decl 1
ba479fd2 12778
d02af173 12779#include "ansidecl.h"
86cf1cbd 12780#include "system.h"
81bf3d9e
RH
12781#ifdef HAVE_SYS_RESOURCE_H
12782#include <sys/resource.h>
12783#endif
12784
f31e826b 12785
ba479fd2
NN
12786int
12787main ()
12788{
86cf1cbd
KG
12789#ifndef $ac_func
12790char *(*pfn) = (char *(*)) $ac_func ;
12791#endif
ba479fd2
NN
12792 ;
12793 return 0;
12794}
12795_ACEOF
12796rm -f conftest.$ac_objext
b61ff9c8
BS
12797if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12798 (eval $ac_compile) 2>conftest.er1
ba479fd2 12799 ac_status=$?
86da66b5
HPN
12800 grep -v '^ *+' conftest.er1 >conftest.err
12801 rm -f conftest.er1
12802 cat conftest.err >&5
ba479fd2 12803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12804 (exit $ac_status); } &&
12805 { ac_try='test -z "$ac_c_werror_flag"
12806 || test ! -s conftest.err'
12807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12808 (eval $ac_try) 2>&5
12809 ac_status=$?
12810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12811 (exit $ac_status); }; } &&
12812 { ac_try='test -s conftest.$ac_objext'
12813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12814 (eval $ac_try) 2>&5
12815 ac_status=$?
12816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12817 (exit $ac_status); }; }; then
f31e826b 12818 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 12819else
ba479fd2
NN
12820 echo "$as_me: failed program was:" >&5
12821sed 's/^/| /' conftest.$ac_ext >&5
12822
b61ff9c8 12823eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 12824fi
b61ff9c8 12825rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
12826fi
12827
f31e826b 12828if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12829 echo "$as_me:$LINENO: result: yes" >&5
12830echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 12831#define $ac_tr_decl 1
ba479fd2
NN
12832_ACEOF
12833
81bf3d9e 12834else
b61ff9c8
BS
12835 echo "$as_me:$LINENO: result: no" >&5
12836echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 12837#define $ac_tr_decl 0
ba479fd2
NN
12838_ACEOF
12839
81bf3d9e
RH
12840fi
12841
12842done
86cf1cbd 12843
81bf3d9e 12844
ba479fd2 12845cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12846/* confdefs.h. */
12847_ACEOF
12848cat confdefs.h >>conftest.$ac_ext
12849cat >>conftest.$ac_ext <<_ACEOF
12850/* end confdefs.h. */
b2522d2b
HPN
12851
12852#include "ansidecl.h"
12853#include "system.h"
12854#ifdef HAVE_SYS_RESOURCE_H
12855#include <sys/resource.h>
12856#endif
12857
ba479fd2
NN
12858int
12859main ()
12860{
b2522d2b 12861rlim_t l = 0;
ba479fd2
NN
12862 ;
12863 return 0;
12864}
12865_ACEOF
12866rm -f conftest.$ac_objext
b61ff9c8
BS
12867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12868 (eval $ac_compile) 2>conftest.er1
ba479fd2 12869 ac_status=$?
86da66b5
HPN
12870 grep -v '^ *+' conftest.er1 >conftest.err
12871 rm -f conftest.er1
12872 cat conftest.err >&5
ba479fd2 12873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12874 (exit $ac_status); } &&
12875 { ac_try='test -z "$ac_c_werror_flag"
12876 || test ! -s conftest.err'
12877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12878 (eval $ac_try) 2>&5
12879 ac_status=$?
12880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12881 (exit $ac_status); }; } &&
12882 { ac_try='test -s conftest.$ac_objext'
12883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12884 (eval $ac_try) 2>&5
12885 ac_status=$?
12886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12887 (exit $ac_status); }; }; then
b2522d2b
HPN
12888 :
12889else
ba479fd2
NN
12890 echo "$as_me: failed program was:" >&5
12891sed 's/^/| /' conftest.$ac_ext >&5
12892
12893
12894cat >>confdefs.h <<\_ACEOF
b2522d2b 12895#define rlim_t long
ba479fd2 12896_ACEOF
b2522d2b
HPN
12897
12898fi
b61ff9c8 12899rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 12900
2102b2fe
RS
12901# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
12902# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
12903# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
12904# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 12905
351df804 12906for ac_func in ldgetname
c1800ec8 12907do
ad6717df 12908 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12909echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12910echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12911if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12912 echo $ECHO_N "(cached) $ECHO_C" >&6
12913else
12914 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12915/* confdefs.h. */
12916_ACEOF
12917cat confdefs.h >>conftest.$ac_ext
12918cat >>conftest.$ac_ext <<_ACEOF
12919/* end confdefs.h. */
c1800ec8
ZW
12920#undef $ac_tr_decl
12921#define $ac_tr_decl 1
ba479fd2 12922
351df804
KG
12923#include "ansidecl.h"
12924#include "system.h"
12925#ifdef HAVE_LDFCN_H
2102b2fe
RS
12926#undef FREAD
12927#undef FWRITE
351df804
KG
12928#include <ldfcn.h>
12929#endif
12930
12931
ba479fd2
NN
12932int
12933main ()
12934{
351df804
KG
12935#ifndef $ac_func
12936char *(*pfn) = (char *(*)) $ac_func ;
12937#endif
ba479fd2
NN
12938 ;
12939 return 0;
12940}
12941_ACEOF
12942rm -f conftest.$ac_objext
b61ff9c8
BS
12943if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12944 (eval $ac_compile) 2>conftest.er1
ba479fd2 12945 ac_status=$?
86da66b5
HPN
12946 grep -v '^ *+' conftest.er1 >conftest.err
12947 rm -f conftest.er1
12948 cat conftest.err >&5
ba479fd2 12949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12950 (exit $ac_status); } &&
12951 { ac_try='test -z "$ac_c_werror_flag"
12952 || test ! -s conftest.err'
12953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12954 (eval $ac_try) 2>&5
12955 ac_status=$?
12956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12957 (exit $ac_status); }; } &&
12958 { ac_try='test -s conftest.$ac_objext'
12959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12960 (eval $ac_try) 2>&5
12961 ac_status=$?
12962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12963 (exit $ac_status); }; }; then
351df804
KG
12964 eval "gcc_cv_have_decl_$ac_func=yes"
12965else
ba479fd2
NN
12966 echo "$as_me: failed program was:" >&5
12967sed 's/^/| /' conftest.$ac_ext >&5
12968
b61ff9c8 12969eval "gcc_cv_have_decl_$ac_func=no"
351df804 12970fi
b61ff9c8 12971rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
12972fi
12973
12974if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12975 echo "$as_me:$LINENO: result: yes" >&5
12976echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 12977#define $ac_tr_decl 1
ba479fd2
NN
12978_ACEOF
12979
351df804 12980else
b61ff9c8
BS
12981 echo "$as_me:$LINENO: result: no" >&5
12982echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 12983#define $ac_tr_decl 0
ba479fd2
NN
12984_ACEOF
12985
351df804
KG
12986fi
12987
12988done
ba479fd2 12989
351df804
KG
12990
12991
12992for ac_func in times
12993do
ad6717df 12994 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12995echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12996echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12997if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12998 echo $ECHO_N "(cached) $ECHO_C" >&6
12999else
13000 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
13001/* confdefs.h. */
13002_ACEOF
13003cat confdefs.h >>conftest.$ac_ext
13004cat >>conftest.$ac_ext <<_ACEOF
13005/* end confdefs.h. */
351df804
KG
13006#undef $ac_tr_decl
13007#define $ac_tr_decl 1
ba479fd2 13008
c1800ec8
ZW
13009#include "ansidecl.h"
13010#include "system.h"
13011#ifdef HAVE_SYS_TIMES_H
13012#include <sys/times.h>
13013#endif
13014
13015
ba479fd2
NN
13016int
13017main ()
13018{
c1800ec8
ZW
13019#ifndef $ac_func
13020char *(*pfn) = (char *(*)) $ac_func ;
13021#endif
ba479fd2
NN
13022 ;
13023 return 0;
13024}
13025_ACEOF
13026rm -f conftest.$ac_objext
b61ff9c8
BS
13027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13028 (eval $ac_compile) 2>conftest.er1
ba479fd2 13029 ac_status=$?
86da66b5
HPN
13030 grep -v '^ *+' conftest.er1 >conftest.err
13031 rm -f conftest.er1
13032 cat conftest.err >&5
ba479fd2 13033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13034 (exit $ac_status); } &&
13035 { ac_try='test -z "$ac_c_werror_flag"
13036 || test ! -s conftest.err'
13037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13038 (eval $ac_try) 2>&5
13039 ac_status=$?
13040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13041 (exit $ac_status); }; } &&
13042 { ac_try='test -s conftest.$ac_objext'
13043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13044 (eval $ac_try) 2>&5
13045 ac_status=$?
13046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13047 (exit $ac_status); }; }; then
2f41c1d6
PB
13048 eval "gcc_cv_have_decl_$ac_func=yes"
13049else
13050 echo "$as_me: failed program was:" >&5
13051sed 's/^/| /' conftest.$ac_ext >&5
ab22c1fa 13052
b61ff9c8 13053eval "gcc_cv_have_decl_$ac_func=no"
2f41c1d6 13054fi
b61ff9c8 13055rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
13056fi
13057
13058if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
13059 echo "$as_me:$LINENO: result: yes" >&5
13060echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 13061#define $ac_tr_decl 1
ba479fd2
NN
13062_ACEOF
13063
c1800ec8 13064else
b61ff9c8
BS
13065 echo "$as_me:$LINENO: result: no" >&5
13066echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 13067#define $ac_tr_decl 0
ba479fd2
NN
13068_ACEOF
13069
c1800ec8
ZW
13070fi
13071
13072done
c1800ec8
ZW
13073
13074
4f6d8cc8
GK
13075
13076for ac_func in sigaltstack
13077do
13078 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
13079echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
13080echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
13081if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
4f6d8cc8
GK
13082 echo $ECHO_N "(cached) $ECHO_C" >&6
13083else
13084 cat >conftest.$ac_ext <<_ACEOF
13085/* confdefs.h. */
13086_ACEOF
13087cat confdefs.h >>conftest.$ac_ext
13088cat >>conftest.$ac_ext <<_ACEOF
13089/* end confdefs.h. */
13090#undef $ac_tr_decl
13091#define $ac_tr_decl 1
13092
13093#include "ansidecl.h"
13094#include "system.h"
13095#include <signal.h>
13096
13097
13098int
13099main ()
13100{
13101#ifndef $ac_func
13102char *(*pfn) = (char *(*)) $ac_func ;
13103#endif
13104 ;
13105 return 0;
13106}
13107_ACEOF
13108rm -f conftest.$ac_objext
b61ff9c8
BS
13109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13110 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
13111 ac_status=$?
13112 grep -v '^ *+' conftest.er1 >conftest.err
13113 rm -f conftest.er1
13114 cat conftest.err >&5
13115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13116 (exit $ac_status); } &&
13117 { ac_try='test -z "$ac_c_werror_flag"
13118 || test ! -s conftest.err'
13119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13120 (eval $ac_try) 2>&5
13121 ac_status=$?
13122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13123 (exit $ac_status); }; } &&
13124 { ac_try='test -s conftest.$ac_objext'
13125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13126 (eval $ac_try) 2>&5
13127 ac_status=$?
13128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13129 (exit $ac_status); }; }; then
8b1f719a
PB
13130 eval "gcc_cv_have_decl_$ac_func=yes"
13131else
13132 echo "$as_me: failed program was:" >&5
13133sed 's/^/| /' conftest.$ac_ext >&5
4f6d8cc8 13134
b61ff9c8 13135eval "gcc_cv_have_decl_$ac_func=no"
4f6d8cc8 13136fi
b61ff9c8 13137rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8
GK
13138fi
13139
13140if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
13141 echo "$as_me:$LINENO: result: yes" >&5
13142echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
13143#define $ac_tr_decl 1
13144_ACEOF
13145
13146else
b61ff9c8
BS
13147 echo "$as_me:$LINENO: result: no" >&5
13148echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
13149#define $ac_tr_decl 0
13150_ACEOF
13151
13152fi
13153
13154done
13155
13156
c1800ec8 13157# More time-related stuff.
b61ff9c8
BS
13158echo "$as_me:$LINENO: checking for struct tms" >&5
13159echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
ba479fd2
NN
13160if test "${ac_cv_struct_tms+set}" = set; then
13161 echo $ECHO_N "(cached) $ECHO_C" >&6
13162else
13163
13164cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
13165/* confdefs.h. */
13166_ACEOF
13167cat confdefs.h >>conftest.$ac_ext
13168cat >>conftest.$ac_ext <<_ACEOF
13169/* end confdefs.h. */
c1800ec8
ZW
13170
13171#include "ansidecl.h"
13172#include "system.h"
13173#ifdef HAVE_SYS_TIMES_H
13174#include <sys/times.h>
13175#endif
13176
ba479fd2
NN
13177int
13178main ()
13179{
c1800ec8 13180struct tms tms;
ba479fd2
NN
13181 ;
13182 return 0;
13183}
13184_ACEOF
13185rm -f conftest.$ac_objext
b61ff9c8
BS
13186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13187 (eval $ac_compile) 2>conftest.er1
ba479fd2 13188 ac_status=$?
86da66b5
HPN
13189 grep -v '^ *+' conftest.er1 >conftest.err
13190 rm -f conftest.er1
13191 cat conftest.err >&5
ba479fd2 13192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13193 (exit $ac_status); } &&
13194 { ac_try='test -z "$ac_c_werror_flag"
13195 || test ! -s conftest.err'
13196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13197 (eval $ac_try) 2>&5
13198 ac_status=$?
13199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13200 (exit $ac_status); }; } &&
13201 { ac_try='test -s conftest.$ac_objext'
13202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13203 (eval $ac_try) 2>&5
13204 ac_status=$?
13205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13206 (exit $ac_status); }; }; then
c1800ec8
ZW
13207 ac_cv_struct_tms=yes
13208else
ba479fd2
NN
13209 echo "$as_me: failed program was:" >&5
13210sed 's/^/| /' conftest.$ac_ext >&5
13211
b61ff9c8 13212ac_cv_struct_tms=no
c1800ec8 13213fi
b61ff9c8 13214rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 13215fi
b61ff9c8
BS
13216echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
13217echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 13218if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
13219
13220cat >>confdefs.h <<\_ACEOF
c1800ec8 13221#define HAVE_STRUCT_TMS 1
ba479fd2 13222_ACEOF
c1800ec8
ZW
13223
13224fi
13225
13226# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
13227# revisit after autoconf 2.50.
b61ff9c8
BS
13228echo "$as_me:$LINENO: checking for clock_t" >&5
13229echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
ba479fd2
NN
13230if test "${gcc_cv_type_clock_t+set}" = set; then
13231 echo $ECHO_N "(cached) $ECHO_C" >&6
13232else
13233
13234cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
13235/* confdefs.h. */
13236_ACEOF
13237cat confdefs.h >>conftest.$ac_ext
13238cat >>conftest.$ac_ext <<_ACEOF
13239/* end confdefs.h. */
c1800ec8
ZW
13240
13241#include "ansidecl.h"
13242#include "system.h"
13243
ba479fd2
NN
13244int
13245main ()
13246{
c1800ec8 13247clock_t x;
ba479fd2
NN
13248 ;
13249 return 0;
13250}
13251_ACEOF
13252rm -f conftest.$ac_objext
b61ff9c8
BS
13253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13254 (eval $ac_compile) 2>conftest.er1
ba479fd2 13255 ac_status=$?
86da66b5
HPN
13256 grep -v '^ *+' conftest.er1 >conftest.err
13257 rm -f conftest.er1
13258 cat conftest.err >&5
ba479fd2 13259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13260 (exit $ac_status); } &&
13261 { ac_try='test -z "$ac_c_werror_flag"
13262 || test ! -s conftest.err'
13263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13264 (eval $ac_try) 2>&5
13265 ac_status=$?
13266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13267 (exit $ac_status); }; } &&
13268 { ac_try='test -s conftest.$ac_objext'
13269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13270 (eval $ac_try) 2>&5
13271 ac_status=$?
13272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13273 (exit $ac_status); }; }; then
c1800ec8
ZW
13274 gcc_cv_type_clock_t=yes
13275else
ba479fd2
NN
13276 echo "$as_me: failed program was:" >&5
13277sed 's/^/| /' conftest.$ac_ext >&5
13278
b61ff9c8 13279gcc_cv_type_clock_t=no
c1800ec8 13280fi
b61ff9c8 13281rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 13282fi
b61ff9c8
BS
13283echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
13284echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 13285if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
13286
13287cat >>confdefs.h <<\_ACEOF
c1800ec8 13288#define HAVE_CLOCK_T 1
ba479fd2 13289_ACEOF
c1800ec8
ZW
13290
13291fi
13292
eb70d86d
AS
13293# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
13294CFLAGS="$saved_CFLAGS"
13295
b61ff9c8 13296# Check whether --enable-initfini-array or --disable-initfini-array was given.
07cf4226 13297if test "${enable_initfini_array+set}" = set; then
b61ff9c8
BS
13298 enableval="$enable_initfini_array"
13299
07cf4226 13300else
ba479fd2 13301
b61ff9c8
BS
13302echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
13303echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
ba479fd2
NN
13304if test "${gcc_cv_initfini_array+set}" = set; then
13305 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 13306else
eb70d86d 13307 if test "$cross_compiling" = yes; then
918c4fe4 13308 gcc_cv_initfini_array=no
eb70d86d 13309else
ba479fd2 13310 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
13311/* confdefs.h. */
13312_ACEOF
13313cat confdefs.h >>conftest.$ac_ext
13314cat >>conftest.$ac_ext <<_ACEOF
13315/* end confdefs.h. */
eb70d86d 13316
07cf4226
DM
13317static int x = -1;
13318int main (void) { return x; }
13319int foo (void) { x = 0; }
13320int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
13321_ACEOF
13322rm -f conftest$ac_exeext
b61ff9c8
BS
13323if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13324 (eval $ac_link) 2>&5
ba479fd2
NN
13325 ac_status=$?
13326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13327 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
13328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13329 (eval $ac_try) 2>&5
ba479fd2
NN
13330 ac_status=$?
13331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13332 (exit $ac_status); }; }; then
918c4fe4 13333 gcc_cv_initfini_array=yes
eb70d86d 13334else
ba479fd2
NN
13335 echo "$as_me: program exited with status $ac_status" >&5
13336echo "$as_me: failed program was:" >&5
13337sed 's/^/| /' conftest.$ac_ext >&5
13338
13339( exit $ac_status )
13340gcc_cv_initfini_array=no
eb70d86d 13341fi
b61ff9c8 13342rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 13343fi
07cf4226 13344fi
b61ff9c8
BS
13345echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
13346echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 13347 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 13348
b61ff9c8 13349fi;
63cf211a 13350if test $enable_initfini_array = yes; then
ba479fd2
NN
13351
13352cat >>confdefs.h <<\_ACEOF
eb70d86d 13353#define HAVE_INITFINI_ARRAY 1
ba479fd2 13354_ACEOF
07cf4226 13355
eb70d86d 13356fi
81bf3d9e 13357
ba479fd2 13358# mkdir takes a single argument on some systems.
b61ff9c8
BS
13359echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
13360echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
ba479fd2
NN
13361if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
13362 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 13363else
ba479fd2 13364 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
13365/* confdefs.h. */
13366_ACEOF
13367cat confdefs.h >>conftest.$ac_ext
13368cat >>conftest.$ac_ext <<_ACEOF
13369/* end confdefs.h. */
75923b2f
MK
13370
13371#include <sys/types.h>
13372#ifdef HAVE_SYS_STAT_H
13373# include <sys/stat.h>
13374#endif
13375#ifdef HAVE_UNISTD_H
13376# include <unistd.h>
13377#endif
13378#ifdef HAVE_DIRECT_H
13379# include <direct.h>
13380#endif
ba479fd2
NN
13381int
13382main ()
13383{
75923b2f 13384mkdir ("foo", 0);
ba479fd2
NN
13385 ;
13386 return 0;
13387}
13388_ACEOF
13389rm -f conftest.$ac_objext
b61ff9c8
BS
13390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13391 (eval $ac_compile) 2>conftest.er1
ba479fd2 13392 ac_status=$?
86da66b5
HPN
13393 grep -v '^ *+' conftest.er1 >conftest.err
13394 rm -f conftest.er1
13395 cat conftest.err >&5
ba479fd2 13396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13397 (exit $ac_status); } &&
13398 { ac_try='test -z "$ac_c_werror_flag"
13399 || test ! -s conftest.err'
13400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13401 (eval $ac_try) 2>&5
13402 ac_status=$?
13403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13404 (exit $ac_status); }; } &&
13405 { ac_try='test -s conftest.$ac_objext'
13406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13407 (eval $ac_try) 2>&5
13408 ac_status=$?
13409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13410 (exit $ac_status); }; }; then
75923b2f
MK
13411 gcc_cv_mkdir_takes_one_arg=no
13412else
ba479fd2
NN
13413 echo "$as_me: failed program was:" >&5
13414sed 's/^/| /' conftest.$ac_ext >&5
13415
b61ff9c8 13416gcc_cv_mkdir_takes_one_arg=yes
75923b2f 13417fi
b61ff9c8 13418rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 13419fi
b61ff9c8
BS
13420echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
13421echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 13422if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
13423
13424cat >>confdefs.h <<\_ACEOF
75923b2f 13425#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 13426_ACEOF
75923b2f
MK
13427
13428fi
13429
13430
861bb6c1
JL
13431# File extensions
13432manext='.1'
13433objext='.o'
13434
13435
13436
4977bab6 13437# With Setjmp/Longjmp based exception handling.
b61ff9c8 13438# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
4977bab6 13439if test "${enable_sjlj_exceptions+set}" = set; then
b61ff9c8 13440 enableval="$enable_sjlj_exceptions"
399fe3e1
JDA
13441 case $target in
13442 *-*-hpux10*)
13443 if test $enableval != yes; then
13444 { echo "$as_me:$LINENO: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&5
13445echo "$as_me: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&2;}
13446 enableval=yes
13447 fi
13448 ;;
13449esac
13450force_sjlj_exceptions=yes
13451else
13452 case $target in
13453 *-*-hpux10*)
13454 force_sjlj_exceptions=yes
13455 enableval=yes
13456 ;;
13457 *)
13458 force_sjlj_exceptions=no
13459 ;;
13460esac
13461fi;
13462if test $force_sjlj_exceptions = yes; then
b61ff9c8 13463 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 13464
ba479fd2
NN
13465cat >>confdefs.h <<_ACEOF
13466#define CONFIG_SJLJ_EXCEPTIONS $sjlj
13467_ACEOF
4977bab6 13468
399fe3e1 13469fi
4977bab6 13470
443728bb
L
13471# For platforms with the unwind ABI which includes an unwind library,
13472# libunwind, we can choose to use the system libunwind.
e61c76c9
SE
13473# config.gcc also contains tests of with_system_libunwind.
13474
4977bab6 13475
b61ff9c8 13476# Check whether --with-system-libunwind or --without-system-libunwind was given.
443728bb 13477if test "${with_system_libunwind+set}" = set; then
b61ff9c8 13478 withval="$with_system_libunwind"
4977bab6 13479
b61ff9c8 13480fi;
e61c76c9
SE
13481 # If system-libunwind was not specifically set, pick a default setting.
13482 if test x$with_system_libunwind = x; then
13483 case ${target} in
13484 ia64-*-hpux*) with_system_libunwind=yes ;;
13485 *) with_system_libunwind=no ;;
13486 esac
13487 fi
13488 # Based on system-libunwind and target, do we have ipinfo?
13489 if test x$with_system_libunwind = xyes; then
13490 case ${target} in
13491 ia64-*-*) have_unwind_getipinfo=no ;;
13492 *) have_unwind_getipinfo=yes ;;
13493 esac
13494 else
a0e02041
AP
13495 # Darwin before version 9 does not have _Unwind_GetIPInfo.
13496
13497 case ${target} in
13498 *-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;;
13499 *) have_unwind_getipinfo=yes ;;
13500 esac
13501
e61c76c9 13502 fi
4977bab6 13503
e61c76c9 13504 if test x$have_unwind_getipinfo = xyes; then
e64f5acf
SE
13505
13506cat >>confdefs.h <<\_ACEOF
13507#define HAVE_GETIPINFO 1
13508_ACEOF
13509
e61c76c9
SE
13510 fi
13511
e64f5acf 13512
34a86c2b
NN
13513# --------------------------------------------------------
13514# Build, host, and target specific configuration fragments
13515# --------------------------------------------------------
13516
5b28c537
NN
13517# Collect build-machine-specific information.
13518. ${srcdir}/config.build
13519
a89ea0df
NN
13520# Collect host-machine-specific information.
13521. ${srcdir}/config.host
13522
ef69da62 13523target_gtfiles=
a89ea0df
NN
13524
13525# Collect target-machine-specific information.
8ad9fb33 13526. ${srcdir}/config.gcc
861bb6c1
JL
13527
13528extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 13529extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
13530
13531# Default the target-machine variables that were not explicitly set.
75bffa71 13532if test x"$tm_file" = x
861bb6c1
JL
13533then tm_file=$cpu_type/$cpu_type.h; fi
13534
6b2adea9 13535if test x"$extra_headers" = x
861bb6c1
JL
13536then extra_headers=; fi
13537
75bffa71 13538if test x$md_file = x
e98e406f 13539then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 13540
75bffa71 13541if test x$out_file = x
861bb6c1
JL
13542then out_file=$cpu_type/$cpu_type.c; fi
13543
75bffa71 13544if test x"$tmake_file" = x
861bb6c1
JL
13545then tmake_file=$cpu_type/t-$cpu_type
13546fi
13547
90e6a802 13548if test x"$dwarf2" = xyes
756ee602 13549then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
13550fi
13551
861bb6c1 13552# Say what files are being used for the output code and MD file.
11642c3a 13553echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
13554echo "Using \`$srcdir/config/$md_file' as machine description file."
13555
11642c3a 13556# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
13557# about them and drop them.
13558
11642c3a
ZW
13559bx=
13560for x in $build_xm_file; do
13561 if test -f $srcdir/config/$x
13562 then bx="$bx $x"
ba479fd2
NN
13563 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13564echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13565 fi
13566done
13567build_xm_file="$bx"
13568
13569hx=
13570for x in $host_xm_file; do
13571 if test -f $srcdir/config/$x
13572 then hx="$hx $x"
ba479fd2
NN
13573 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13574echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13575 fi
13576done
13577host_xm_file="$hx"
13578
13579tx=
13580for x in $xm_file; do
13581 if test -f $srcdir/config/$x
13582 then tx="$tx $x"
ba479fd2
NN
13583 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13584echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13585 fi
13586done
13587xm_file="$tx"
13588
861bb6c1
JL
13589count=a
13590for f in $tm_file; do
13591 count=${count}x
13592done
75bffa71 13593if test $count = ax; then
861bb6c1
JL
13594 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
13595else
13596 echo "Using the following target machine macro files:"
13597 for f in $tm_file; do
13598 echo " $srcdir/config/$f"
13599 done
13600fi
13601
4977bab6 13602if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
13603
13604cat >>confdefs.h <<\_ACEOF
4977bab6 13605#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 13606_ACEOF
4977bab6
ZW
13607
13608fi
13609
99fa8911
AP
13610if test x$use_long_long_for_widest_fast_int = xyes; then
13611
13612cat >>confdefs.h <<\_ACEOF
13613#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
13614_ACEOF
13615
13616fi
13617
861bb6c1
JL
13618count=a
13619for f in $host_xm_file; do
13620 count=${count}x
13621done
11642c3a
ZW
13622if test $count = a; then
13623 :
13624elif test $count = ax; then
861bb6c1
JL
13625 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
13626else
13627 echo "Using the following host machine macro files:"
13628 for f in $host_xm_file; do
13629 echo " $srcdir/config/$f"
13630 done
13631fi
476d9098 13632echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 13633
75bffa71 13634if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
13635 count=a
13636 for f in $build_xm_file; do
13637 count=${count}x
13638 done
11642c3a
ZW
13639 if test $count = a; then
13640 :
13641 elif test $count = ax; then
861bb6c1
JL
13642 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
13643 else
13644 echo "Using the following build machine macro files:"
13645 for f in $build_xm_file; do
13646 echo " $srcdir/config/$f"
13647 done
13648 fi
13649fi
13650
4f6d8cc8 13651case ${host} in
b8ec3cc8 13652 powerpc*-*-darwin*)
b61ff9c8
BS
13653 echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
13654echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6
4f6d8cc8
GK
13655if test "${gcc_cv_mcontext_underscores+set}" = set; then
13656 echo $ECHO_N "(cached) $ECHO_C" >&6
13657else
13658 cat >conftest.$ac_ext <<_ACEOF
13659
ba7da42a 13660#include <sys/cdefs.h>
de4fb767 13661#include <sys/signal.h>
4f6d8cc8
GK
13662#include <ucontext.h>
13663int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
13664
13665_ACEOF
13666rm -f conftest.$ac_objext
b61ff9c8
BS
13667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13668 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
13669 ac_status=$?
13670 grep -v '^ *+' conftest.er1 >conftest.err
13671 rm -f conftest.er1
13672 cat conftest.err >&5
13673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13674 (exit $ac_status); } &&
13675 { ac_try='test -z "$ac_c_werror_flag"
13676 || test ! -s conftest.err'
13677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13678 (eval $ac_try) 2>&5
13679 ac_status=$?
13680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13681 (exit $ac_status); }; } &&
13682 { ac_try='test -s conftest.$ac_objext'
13683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13684 (eval $ac_try) 2>&5
13685 ac_status=$?
13686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13687 (exit $ac_status); }; }; then
4f6d8cc8
GK
13688 gcc_cv_mcontext_underscores=no
13689else
13690 echo "$as_me: failed program was:" >&5
13691sed 's/^/| /' conftest.$ac_ext >&5
13692
b61ff9c8 13693gcc_cv_mcontext_underscores=yes
4f6d8cc8 13694fi
b61ff9c8 13695rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8 13696fi
b61ff9c8
BS
13697echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
13698echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6
4f6d8cc8
GK
13699 if test $gcc_cv_mcontext_underscores = yes; then
13700
13701cat >>confdefs.h <<\_ACEOF
13702#define HAS_MCONTEXT_T_UNDERSCORES
13703_ACEOF
13704
13705 fi
13706 ;;
13707esac
13708
8bb915b6
NN
13709# ---------
13710# Threading
13711# ---------
13712
c2e494a8 13713# Check if a valid thread package
615be2cf 13714case ${enable_threads} in
c2e494a8
NN
13715 "" | no)
13716 # No threads
13717 target_thread_file='single'
13718 ;;
13719 yes)
13720 # default
13721 target_thread_file='single'
13722 ;;
18167442 13723 aix | dce | gnat | irix | posix | posix95 | rtems | \
d9dced13 13724 single | solaris | vxworks | win32 | mipssde)
615be2cf 13725 target_thread_file=${enable_threads}
c2e494a8
NN
13726 ;;
13727 *)
615be2cf 13728 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
13729 exit 1
13730 ;;
13731esac
13732
13733if test x${thread_file} = x; then
13734 # No thread file set by target-specific clauses in config.gcc,
13735 # so use file chosen by default logic above
13736 thread_file=${target_thread_file}
861bb6c1
JL
13737fi
13738
8bb915b6
NN
13739# Make gthr-default.h if we have a thread file.
13740gthread_flags=
13741if test $thread_file != single; then
b15a9f63
RW
13742 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h-t
13743 if diff gthr-default.h-t gthr-default.h 2>/dev/null; then
13744 rm -f gthr-default.h-t
13745 else
13746 mv -f gthr-default.h-t gthr-default.h
13747 fi
8bb915b6
NN
13748 gthread_flags=-DHAVE_GTHR_DEFAULT
13749fi
13750
13751
13752# --------
13753# UNSORTED
13754# --------
13755
18fbf599 13756use_cxa_atexit=no
2121a768
JT
13757if test x$enable___cxa_atexit = xyes || \
13758 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599 13759 if test x$host = x$target; then
97388150
DS
13760 case $host in
13761 # mingw32 doesn't have __cxa_atexit but uses atexit registration
13762 # keyed to flag_use_cxa_atexit
13763 *-*-mingw32*)
13764 use_cxa_atexit=yes
13765 ;;
13766 *)
b61ff9c8
BS
13767 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
13768echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
354b7da5
DH
13769if test "${ac_cv_func___cxa_atexit+set}" = set; then
13770 echo $ECHO_N "(cached) $ECHO_C" >&6
13771else
13772 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
13773/* confdefs.h. */
13774_ACEOF
13775cat confdefs.h >>conftest.$ac_ext
13776cat >>conftest.$ac_ext <<_ACEOF
13777/* end confdefs.h. */
86da66b5
HPN
13778/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
13779 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13780#define __cxa_atexit innocuous___cxa_atexit
13781
354b7da5
DH
13782/* System header to define __stub macros and hopefully few prototypes,
13783 which can conflict with char __cxa_atexit (); below.
13784 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13785 <limits.h> exists even on freestanding compilers. */
86da66b5 13786
354b7da5
DH
13787#ifdef __STDC__
13788# include <limits.h>
13789#else
13790# include <assert.h>
13791#endif
86da66b5
HPN
13792
13793#undef __cxa_atexit
13794
b61ff9c8 13795/* Override any gcc2 internal prototype to avoid an error. */
354b7da5
DH
13796#ifdef __cplusplus
13797extern "C"
b61ff9c8 13798{
354b7da5 13799#endif
b61ff9c8
BS
13800/* We use char because int might match the return type of a gcc2
13801 builtin and then its argument prototype would still apply. */
354b7da5
DH
13802char __cxa_atexit ();
13803/* The GNU C library defines this for functions which it implements
13804 to always fail with ENOSYS. Some functions are actually named
13805 something starting with __ and the normal name is an alias. */
b61ff9c8 13806#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
354b7da5 13807choke me
b61ff9c8
BS
13808#else
13809char (*f) () = __cxa_atexit;
13810#endif
13811#ifdef __cplusplus
13812}
354b7da5
DH
13813#endif
13814
13815int
13816main ()
13817{
b61ff9c8 13818return f != __cxa_atexit;
354b7da5
DH
13819 ;
13820 return 0;
13821}
13822_ACEOF
13823rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
13824if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13825 (eval $ac_link) 2>conftest.er1
354b7da5 13826 ac_status=$?
86da66b5
HPN
13827 grep -v '^ *+' conftest.er1 >conftest.err
13828 rm -f conftest.er1
13829 cat conftest.err >&5
354b7da5 13830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13831 (exit $ac_status); } &&
13832 { ac_try='test -z "$ac_c_werror_flag"
13833 || test ! -s conftest.err'
13834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13835 (eval $ac_try) 2>&5
13836 ac_status=$?
13837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13838 (exit $ac_status); }; } &&
13839 { ac_try='test -s conftest$ac_exeext'
13840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13841 (eval $ac_try) 2>&5
13842 ac_status=$?
13843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13844 (exit $ac_status); }; }; then
354b7da5
DH
13845 ac_cv_func___cxa_atexit=yes
13846else
13847 echo "$as_me: failed program was:" >&5
13848sed 's/^/| /' conftest.$ac_ext >&5
13849
b61ff9c8 13850ac_cv_func___cxa_atexit=no
354b7da5 13851fi
b61ff9c8 13852rm -f conftest.err conftest.$ac_objext \
86da66b5 13853 conftest$ac_exeext conftest.$ac_ext
354b7da5 13854fi
b61ff9c8
BS
13855echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
13856echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
354b7da5 13857if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
13858 use_cxa_atexit=yes
13859else
13860 echo "__cxa_atexit can't be enabled on this target"
13861fi
13862
5f60e48f 13863 ;;
97388150 13864 esac
18fbf599
PB
13865 else
13866 # We can't check for __cxa_atexit when building a cross, so assume
13867 # it is available
13868 use_cxa_atexit=yes
13869 fi
13870 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
13871
13872cat >>confdefs.h <<\_ACEOF
c7b5e395 13873#define DEFAULT_USE_CXA_ATEXIT 2
ba479fd2 13874_ACEOF
2121a768 13875
18fbf599 13876 fi
2121a768
JT
13877fi
13878
a5381466 13879# Look for a file containing extra machine modes.
1c0ca89d
ZW
13880if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
13881 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
13882
13883
13884cat >>confdefs.h <<_ACEOF
e22340b0 13885#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 13886_ACEOF
a5381466
ZW
13887
13888fi
13889
75685792
RS
13890# Convert extra_options into a form suitable for Makefile use.
13891extra_opt_files=
13892for f in $extra_options; do
13893 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
13894done
13895
13896
b7cb92ad 13897# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 13898# the first file included by config.h.
4977bab6 13899# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 13900# as well. If host!=build, we are in error and need to do more
db81d74a 13901# work to find out the build config parameters.
75bffa71 13902if test x$host = x$build
db81d74a 13903then
eaf4e618 13904 build_auto=auto-host.h
b7cb92ad
JL
13905else
13906 # We create a subdir, then run autoconf in the subdir.
13907 # To prevent recursion we set host and build for the new
13908 # invocation of configure to the build for this invocation
ba479fd2 13909 # of configure.
b7cb92ad
JL
13910 tempdir=build.$$
13911 rm -rf $tempdir
13912 mkdir $tempdir
13913 cd $tempdir
13914 case ${srcdir} in
255b8a49 13915 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
13916 *) realsrcdir=../${srcdir};;
13917 esac
d920e825
L
13918 saved_CFLAGS="${CFLAGS}"
13919 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
f8c33439 13920 LDFLAGS="${LDFLAGS_FOR_BUILD}" \
d920e825 13921 ${realsrcdir}/configure \
33e70558 13922 --enable-languages=${enable_languages-all} \
534d0cc0 13923 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 13924 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
13925
13926 # We just finished tests for the build machine, so rename
13927 # the file auto-build.h in the gcc directory.
13928 mv auto-host.h ../auto-build.h
13929 cd ..
13930 rm -rf $tempdir
eaf4e618 13931 build_auto=auto-build.h
db81d74a
RH
13932fi
13933
06f0b04c 13934
eaf4e618 13935tm_file="${tm_file} defaults.h"
4977bab6
ZW
13936tm_p_file="${tm_p_file} tm-preds.h"
13937host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
13938build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 13939# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 13940# put this back in temporarily.
232b67d9 13941xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 13942
34a86c2b
NN
13943# --------
13944# UNSORTED
13945# --------
13946
cc1e60ea 13947# Compile in configure arguments.
8105825d 13948if test -f configargs.h ; then
cc1e60ea 13949 # Being re-configured.
022dae81 13950 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
13951 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
13952else
13953 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
13954fi
eeae7b41
DJ
13955
13956# Double all backslashes and backslash all quotes to turn
13957# gcc_config_arguments into a C string.
13958sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
13959$gcc_config_arguments
13960EOF
13961gcc_config_arguments_str=`cat conftest.out`
13962rm -f conftest.out
13963
cc1e60ea
JM
13964cat > configargs.h <<EOF
13965/* Generated automatically. */
eeae7b41 13966static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 13967static const char thread_model[] = "$thread_file";
7816bea0
DJ
13968
13969static const struct {
13970 const char *name, *value;
13971} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
13972EOF
13973
40540e68
RAE
13974gcc_BASEVER=`cat $srcdir/BASE-VER`
13975gcc_DEVPHASE=`cat $srcdir/DEV-PHASE`
13976gcc_DATESTAMP=`cat $srcdir/DATESTAMP`
0c463e16 13977if test -f $srcdir/REVISION ; then
40540e68 13978 gcc_REVISION=`cat $srcdir/REVISION`
0c463e16
RAE
13979else
13980 gcc_REVISION=""
13981fi
13982cat > plugin-version.h <<EOF
13983#include "configargs.h"
13984
13985static char basever[] = "$gcc_BASEVER";
13986static char datestamp[] = "$gcc_DATESTAMP";
13987static char devphase[] = "$gcc_DEVPHASE";
13988static char revision[] = "$gcc_REVISION";
13989
13990/* FIXME plugins: We should make the version information more precise.
13991 One way to do is to add a checksum. */
13992
13993static struct plugin_gcc_version gcc_version = {basever, datestamp,
13994 devphase, revision,
13995 configuration_arguments};
13996EOF
13997
ab87f8c8 13998# Internationalization
18fc9bd4
RG
13999# If we haven't got the data from the intl directory,
14000# assume NLS is disabled.
14001USE_NLS=no
14002LIBINTL=
14003LIBINTL_DEP=
14004INCINTL=
14005XGETTEXT=
14006GMSGFMT=
14007POSUB=
14008
14009if test -f ../intl/config.intl; then
14010 . ../intl/config.intl
14011fi
b61ff9c8
BS
14012echo "$as_me:$LINENO: checking whether NLS is requested" >&5
14013echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
18fc9bd4 14014if test x"$USE_NLS" != xyes; then
b61ff9c8
BS
14015 echo "$as_me:$LINENO: result: no" >&5
14016echo "${ECHO_T}no" >&6
18fc9bd4 14017else
b61ff9c8
BS
14018 echo "$as_me:$LINENO: result: yes" >&5
14019echo "${ECHO_T}yes" >&6
18fc9bd4
RG
14020
14021cat >>confdefs.h <<\_ACEOF
14022#define ENABLE_NLS 1
14023_ACEOF
14024
14025
b61ff9c8
BS
14026 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
14027echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
18fc9bd4
RG
14028 # Look for .po and .gmo files in the source directory.
14029 CATALOGS=
14030 XLINGUAS=
14031 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
14032 # If there aren't any .gmo files the shell will give us the
14033 # literal string "../path/to/srcdir/po/*.gmo" which has to be
14034 # weeded out.
14035 case "$cat" in *\**)
14036 continue;;
14037 esac
14038 # The quadruple backslash is collapsed to a double backslash
14039 # by the backticks, then collapsed again by the double quotes,
14040 # leaving us with one backslash in the sed expression (right
14041 # before the dot that mustn't act as a wildcard).
14042 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
14043 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
14044 # The user is allowed to set LINGUAS to a list of languages to
14045 # install catalogs for. If it's empty that means "all of them."
14046 if test "x$LINGUAS" = x; then
14047 CATALOGS="$CATALOGS $cat"
14048 XLINGUAS="$XLINGUAS $lang"
14049 else
14050 case "$LINGUAS" in *$lang*)
14051 CATALOGS="$CATALOGS $cat"
14052 XLINGUAS="$XLINGUAS $lang"
14053 ;;
14054 esac
14055 fi
14056 done
14057 LINGUAS="$XLINGUAS"
b61ff9c8
BS
14058 echo "$as_me:$LINENO: result: $LINGUAS" >&5
14059echo "${ECHO_T}$LINGUAS" >&6
18fc9bd4
RG
14060
14061
14062 DATADIRNAME=share
14063
14064 INSTOBJEXT=.mo
14065
14066 GENCAT=gencat
14067
14068 CATOBJEXT=.gmo
14069
14070fi
861bb6c1 14071
56694dd9
ZW
14072# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
14073# -liconv on the link line twice.
14074case "$LIBINTL" in *$LIBICONV*)
14075 LIBICONV= ;;
14076esac
dc6746e7 14077
b61ff9c8 14078# Check whether --enable-secureplt or --disable-secureplt was given.
7f970b70 14079if test "${enable_secureplt+set}" = set; then
b61ff9c8 14080 enableval="$enable_secureplt"
7f970b70 14081
b61ff9c8 14082fi;
7f970b70 14083
922e3e33
UB
14084# Check whether --enable-cld or --disable-cld was given.
14085if test "${enable_cld+set}" = set; then
14086 enableval="$enable_cld"
14087
14088else
14089 enable_cld=no
14090fi;
14091
56694dd9 14092# Windows32 Registry support for specifying GCC installation paths.
b61ff9c8 14093# Check whether --enable-win32-registry or --disable-win32-registry was given.
56694dd9 14094if test "${enable_win32_registry+set}" = set; then
b61ff9c8 14095 enableval="$enable_win32_registry"
dc6746e7 14096
b61ff9c8 14097fi;
ba479fd2 14098
a1286ef5
ZW
14099case $host_os in
14100 win32 | pe | cygwin* | mingw32* | uwin*)
14101 if test "x$enable_win32_registry" != xno; then
b61ff9c8
BS
14102 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
14103echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
ba479fd2
NN
14104if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
14105 echo $ECHO_N "(cached) $ECHO_C" >&6
14106else
14107 ac_func_search_save_LIBS=$LIBS
b61ff9c8 14108ac_cv_search_RegOpenKeyExA=no
ba479fd2 14109cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
14110/* confdefs.h. */
14111_ACEOF
14112cat confdefs.h >>conftest.$ac_ext
14113cat >>conftest.$ac_ext <<_ACEOF
14114/* end confdefs.h. */
861bb6c1 14115
b61ff9c8 14116/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
14117#ifdef __cplusplus
14118extern "C"
14119#endif
b61ff9c8
BS
14120/* We use char because int might match the return type of a gcc2
14121 builtin and then its argument prototype would still apply. */
ba479fd2
NN
14122char RegOpenKeyExA ();
14123int
14124main ()
14125{
b61ff9c8 14126RegOpenKeyExA ();
ba479fd2
NN
14127 ;
14128 return 0;
14129}
14130_ACEOF
b61ff9c8
BS
14131rm -f conftest.$ac_objext conftest$ac_exeext
14132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14133 (eval $ac_link) 2>conftest.er1
ba479fd2 14134 ac_status=$?
86da66b5
HPN
14135 grep -v '^ *+' conftest.er1 >conftest.err
14136 rm -f conftest.er1
14137 cat conftest.err >&5
ba479fd2 14138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
14139 (exit $ac_status); } &&
14140 { ac_try='test -z "$ac_c_werror_flag"
14141 || test ! -s conftest.err'
14142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14143 (eval $ac_try) 2>&5
14144 ac_status=$?
14145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14146 (exit $ac_status); }; } &&
14147 { ac_try='test -s conftest$ac_exeext'
14148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14149 (eval $ac_try) 2>&5
14150 ac_status=$?
14151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14152 (exit $ac_status); }; }; then
14153 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 14154else
ba479fd2
NN
14155 echo "$as_me: failed program was:" >&5
14156sed 's/^/| /' conftest.$ac_ext >&5
14157
1a4b763e 14158fi
b61ff9c8
BS
14159rm -f conftest.err conftest.$ac_objext \
14160 conftest$ac_exeext conftest.$ac_ext
14161if test "$ac_cv_search_RegOpenKeyExA" = no; then
14162 for ac_lib in advapi32; do
14163 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14164 cat >conftest.$ac_ext <<_ACEOF
14165/* confdefs.h. */
14166_ACEOF
14167cat confdefs.h >>conftest.$ac_ext
14168cat >>conftest.$ac_ext <<_ACEOF
14169/* end confdefs.h. */
2f41c1d6 14170
b61ff9c8
BS
14171/* Override any gcc2 internal prototype to avoid an error. */
14172#ifdef __cplusplus
14173extern "C"
14174#endif
14175/* We use char because int might match the return type of a gcc2
14176 builtin and then its argument prototype would still apply. */
14177char RegOpenKeyExA ();
14178int
14179main ()
14180{
14181RegOpenKeyExA ();
14182 ;
14183 return 0;
14184}
14185_ACEOF
14186rm -f conftest.$ac_objext conftest$ac_exeext
14187if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14188 (eval $ac_link) 2>conftest.er1
14189 ac_status=$?
14190 grep -v '^ *+' conftest.er1 >conftest.err
14191 rm -f conftest.er1
14192 cat conftest.err >&5
14193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14194 (exit $ac_status); } &&
14195 { ac_try='test -z "$ac_c_werror_flag"
14196 || test ! -s conftest.err'
14197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14198 (eval $ac_try) 2>&5
14199 ac_status=$?
14200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14201 (exit $ac_status); }; } &&
14202 { ac_try='test -s conftest$ac_exeext'
14203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14204 (eval $ac_try) 2>&5
14205 ac_status=$?
14206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14207 (exit $ac_status); }; }; then
14208 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
14209break
1a4b763e 14210else
b61ff9c8
BS
14211 echo "$as_me: failed program was:" >&5
14212sed 's/^/| /' conftest.$ac_ext >&5
14213
14214fi
14215rm -f conftest.err conftest.$ac_objext \
14216 conftest$ac_exeext conftest.$ac_ext
14217 done
dd7f7a6e
EC
14218fi
14219LIBS=$ac_func_search_save_LIBS
14220fi
b61ff9c8
BS
14221echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
14222echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
14223if test "$ac_cv_search_RegOpenKeyExA" != no; then
14224 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
dd7f7a6e
EC
14225
14226else
14227 enable_win32_registry=no
14228fi
14229
14230 fi
14231
14232 if test "x$enable_win32_registry" != xno; then
14233
14234cat >>confdefs.h <<\_ACEOF
14235#define ENABLE_WIN32_REGISTRY 1
14236_ACEOF
14237
14238
14239 if test "x$enable_win32_registry" != xyes \
14240 && test "x$enable_win32_registry" != x; then
14241
14242cat >>confdefs.h <<_ACEOF
14243#define WIN32_REGISTRY_KEY "$enable_win32_registry"
14244_ACEOF
14245
14246 fi
14247 fi
14248 ;;
14249esac
ab87f8c8 14250
56694dd9
ZW
14251# Get an absolute path to the GCC top-level source directory
14252holddir=`${PWDCMD-pwd}`
14253cd $srcdir
14254topdir=`${PWDCMD-pwd}`
14255cd $holddir
ab87f8c8 14256
56694dd9 14257# Conditionalize the makefile for this host machine.
2ed26f6b 14258xmake_file=
c406e779 14259for f in ${host_xmake_file}
56694dd9
ZW
14260do
14261 if test -f ${srcdir}/config/$f
14262 then
2ed26f6b 14263 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
14264 fi
14265done
093e61a6 14266
56694dd9 14267# Conditionalize the makefile for this target machine.
2ed26f6b 14268tmake_file_=
c406e779 14269for f in ${tmake_file}
56694dd9
ZW
14270do
14271 if test -f ${srcdir}/config/$f
14272 then
2ed26f6b 14273 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
14274 fi
14275done
2ed26f6b 14276tmake_file="${tmake_file_}"
71a94577 14277
ab87f8c8
JL
14278out_object_file=`basename $out_file .c`.o
14279
75685792
RS
14280tm_file_list="options.h"
14281tm_include_list="options.h"
ab87f8c8 14282for f in $tm_file; do
64ccbc99 14283 case $f in
3ca43df7
RS
14284 ./* )
14285 f=`echo $f | sed 's/^..//'`
14286 tm_file_list="${tm_file_list} $f"
14287 tm_include_list="${tm_include_list} $f"
14288 ;;
d02af173 14289 defaults.h )
e22340b0
ZW
14290 tm_file_list="${tm_file_list} \$(srcdir)/$f"
14291 tm_include_list="${tm_include_list} $f"
14292 ;;
14293 * )
14294 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
14295 tm_include_list="${tm_include_list} config/$f"
14296 ;;
64ccbc99 14297 esac
ab87f8c8
JL
14298done
14299
11642c3a 14300tm_p_file_list=
e22340b0 14301tm_p_include_list=
11642c3a 14302for f in $tm_p_file; do
4977bab6
ZW
14303 case $f in
14304 tm-preds.h )
e22340b0
ZW
14305 tm_p_file_list="${tm_p_file_list} $f"
14306 tm_p_include_list="${tm_p_include_list} $f"
14307 ;;
14308 * )
14309 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
14310 tm_p_include_list="${tm_p_include_list} config/$f"
14311 esac
14312done
14313
14314xm_file_list=
14315xm_include_list=
14316for f in $xm_file; do
14317 case $f in
14318 ansidecl.h )
14319 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
14320 xm_include_list="${xm_include_list} $f"
14321 ;;
14322 auto-host.h )
14323 xm_file_list="${xm_file_list} $f"
14324 xm_include_list="${xm_include_list} $f"
14325 ;;
14326 * )
14327 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
14328 xm_include_list="${xm_include_list} config/$f"
14329 ;;
4977bab6 14330 esac
11642c3a
ZW
14331done
14332
ab87f8c8 14333host_xm_file_list=
e22340b0 14334host_xm_include_list=
ab87f8c8 14335for f in $host_xm_file; do
64ccbc99 14336 case $f in
d02af173 14337 ansidecl.h )
e22340b0
ZW
14338 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
14339 host_xm_include_list="${host_xm_include_list} $f"
14340 ;;
e2500fed 14341 auto-host.h )
e22340b0
ZW
14342 host_xm_file_list="${host_xm_file_list} $f"
14343 host_xm_include_list="${host_xm_include_list} $f"
14344 ;;
14345 * )
14346 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
14347 host_xm_include_list="${host_xm_include_list} config/$f"
14348 ;;
64ccbc99 14349 esac
ab87f8c8
JL
14350done
14351
14352build_xm_file_list=
14353for f in $build_xm_file; do
64ccbc99 14354 case $f in
d02af173 14355 ansidecl.h )
e22340b0
ZW
14356 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
14357 build_xm_include_list="${build_xm_include_list} $f"
14358 ;;
e2500fed 14359 auto-build.h | auto-host.h )
e22340b0
ZW
14360 build_xm_file_list="${build_xm_file_list} $f"
14361 build_xm_include_list="${build_xm_include_list} $f"
14362 ;;
14363 * )
14364 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
14365 build_xm_include_list="${build_xm_include_list} config/$f"
14366 ;;
64ccbc99 14367 esac
ab87f8c8
JL
14368done
14369
2989d30c
GK
14370# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
14371# cross-compiler which does not use the native headers and libraries.
a078a589 14372# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
14373CROSS=
14374ALL=all.internal
14375SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
14376
14377if test "x$with_build_sysroot" != x; then
14da6073 14378 build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
14379else
14380 # This value is used, even on a native system, because
14381 # CROSS_SYSTEM_HEADER_DIR is just
14382 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
14383 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
14384fi
14385
ab87f8c8
JL
14386if test x$host != x$target
14387then
2989d30c 14388 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
a078a589 14389 ALL=all.cross
160633c6 14390 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 14391 case "$host","$target" in
3a7e8b87
GK
14392 # Darwin crosses can use the host system's libraries and headers,
14393 # because of the fat library support. Of course, it must be the
14394 # same version of Darwin on both sides. Allow the user to
14395 # just say --target=foo-darwin without a version number to mean
14396 # "the version on this system".
14397 *-*-darwin*,*-*-darwin*)
14398 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
14399 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
14400 if test $hostos = $targetos -o $targetos = darwin ; then
14401 CROSS=
14402 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
14403 with_headers=yes
14404 fi
14405 ;;
14406
343f59d9
AM
14407 i?86-*-*,x86_64-*-* \
14408 | powerpc*-*-*,powerpc64*-*-*)
14409 CROSS="$CROSS -DNATIVE_CROSS" ;;
14410 esac
7a615b25 14411elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 14412 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
14413fi
14414
b39d221a
EC
14415# If this is a cross-compiler that does not
14416# have its own set of headers then define
14417# inhibit_libc
14418
dc06db20
R
14419# If this is using newlib, without having the headers available now,
14420# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
14421# This prevents libgcc2 from containing any code which requires libc
14422# support.
a929bc28 14423: ${inhibit_libc=false}
dc06db20
R
14424if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
14425 test x$with_newlib = xyes ; } &&
e50084fa 14426 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 14427 inhibit_libc=true
b39d221a
EC
14428fi
14429
14430
a078a589
ZW
14431# When building gcc with a cross-compiler, we need to adjust things so
14432# that the generator programs are still built with the native compiler.
52c0e446 14433# Also, we cannot run fixincludes.
a078a589
ZW
14434
14435# These are the normal (build=host) settings:
ba479fd2
NN
14436CC_FOR_BUILD='$(CC)'
14437BUILD_CFLAGS='$(ALL_CFLAGS)'
f8c33439 14438BUILD_LDFLAGS='$(LDFLAGS)'
ba479fd2 14439STMP_FIXINC=stmp-fixinc
8ad9fb33 14440
83599948
NS
14441# And these apply if build != host, or we are generating coverage data
14442if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 14443then
b11e4747 14444 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
f8c33439 14445 BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
ab87f8c8
JL
14446fi
14447
14448# Expand extra_headers to include complete path.
14449# This substitutes for lots of t-* files.
14450extra_headers_list=
b1ef58c8
NN
14451# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
14452for file in ${extra_headers} ; do
14453 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
14454done
ab87f8c8 14455
1617e5ee
GK
14456# If use_gcc_tgmath is set, append ginclude/tgmath.h.
14457if test x"$use_gcc_tgmath" = xyes
14458then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h"
14459fi
14460
c38f02df
ILT
14461# Define collect2 in Makefile.
14462case $host_can_use_collect2 in
14463 no) collect2= ;;
14464 *) collect2='collect2$(exeext)' ;;
14465esac
14466
14467
ab87f8c8 14468# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
14469case $use_collect2 in
14470 no) use_collect2= ;;
14471 "") ;;
ba479fd2 14472 *)
34a86c2b
NN
14473 host_xm_defines="${host_xm_defines} USE_COLLECT2"
14474 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
14475 case $host_can_use_collect2 in
14476 no)
14477 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
14478echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
14479 { (exit 1); exit 1; }; }
14480 ;;
14481 esac
34a86c2b
NN
14482 ;;
14483esac
ab87f8c8 14484
8bb915b6
NN
14485# ---------------------------
14486# Assembler & linker features
14487# ---------------------------
14488
da0f6381
PB
14489# During stage 2, ld is actually gcc/collect-ld, which is a small script to
14490# discern between when to use prev-ld/ld-new and when to use ld/ld-new.
14491# However when ld-new is first executed from the build tree, libtool will
14492# relink it as .libs/lt-ld-new, so that it can give it an RPATH that refers
14493# to the build tree. While doing this we need to use the previous-stage
14494# linker, or we have an infinite loop. The presence of a shell script as
14495# ld/ld-new, and the fact that the script *uses ld itself*, is what confuses
14496# the gcc/collect-ld script. So we need to know how libtool works, or
14497# exec-tool will fail.
e8b05380 14498
da0f6381 14499
5d47bb02
PG
14500case `pwd` in
14501 *\ * | *\ *)
14502 { echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
14503echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
14504esac
da0f6381
PB
14505
14506
da0f6381 14507
5d47bb02
PG
14508macro_version='2.2.6'
14509macro_revision='1.3012'
da0f6381
PB
14510
14511
14512
14513
14514
14515
da0f6381
PB
14516
14517
14518
14519
14520
14521
14522
5d47bb02 14523ltmain="$ac_aux_dir/ltmain.sh"
da0f6381
PB
14524
14525echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
14526echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
14527if test "${lt_cv_path_SED+set}" = set; then
e8b05380
PB
14528 echo $ECHO_N "(cached) $ECHO_C" >&6
14529else
da0f6381
PB
14530 # Loop through the user's path and test for sed and gsed.
14531# Then use that list of sed's as ones to test for truncation.
14532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380
PB
14533for as_dir in $PATH
14534do
14535 IFS=$as_save_IFS
14536 test -z "$as_dir" && as_dir=.
da0f6381
PB
14537 for lt_ac_prog in sed gsed; do
14538 for ac_exec_ext in '' $ac_executable_extensions; do
14539 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
14540 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
14541 fi
14542 done
14543 done
e8b05380 14544done
da0f6381
PB
14545IFS=$as_save_IFS
14546lt_ac_max=0
14547lt_ac_count=0
14548# Add /usr/xpg4/bin/sed as it is typically found on Solaris
14549# along with /bin/sed that truncates output.
14550for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
14551 test ! -f $lt_ac_sed && continue
14552 cat /dev/null > conftest.in
14553 lt_ac_count=0
14554 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
14555 # Check for GNU sed and select it if it is found.
14556 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
14557 lt_cv_path_SED=$lt_ac_sed
14558 break
14559 fi
14560 while true; do
14561 cat conftest.in conftest.in >conftest.tmp
14562 mv conftest.tmp conftest.in
14563 cp conftest.in conftest.nl
14564 echo >>conftest.nl
14565 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
14566 cmp -s conftest.out conftest.nl || break
14567 # 10000 chars as input seems more than enough
14568 test $lt_ac_count -gt 10 && break
14569 lt_ac_count=`expr $lt_ac_count + 1`
14570 if test $lt_ac_count -gt $lt_ac_max; then
14571 lt_ac_max=$lt_ac_count
14572 lt_cv_path_SED=$lt_ac_sed
14573 fi
14574 done
e8b05380
PB
14575done
14576
e8b05380 14577fi
b61ff9c8 14578
da0f6381 14579SED=$lt_cv_path_SED
e8b05380 14580
da0f6381
PB
14581echo "$as_me:$LINENO: result: $SED" >&5
14582echo "${ECHO_T}$SED" >&6
e8b05380 14583
da0f6381
PB
14584test -z "$SED" && SED=sed
14585Xsed="$SED -e 1s/^X//"
e8b05380 14586
e8b05380
PB
14587
14588
ad9c4d9f 14589
da0f6381
PB
14590
14591
14592
14593
14594
14595
14596
14597echo "$as_me:$LINENO: checking for fgrep" >&5
14598echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
14599if test "${ac_cv_prog_fgrep+set}" = set; then
14600 echo $ECHO_N "(cached) $ECHO_C" >&6
e8b05380 14601else
da0f6381
PB
14602 if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1
14603 then ac_cv_prog_fgrep='grep -F'
14604 else ac_cv_prog_fgrep='fgrep'
14605 fi
981d4858 14606fi
da0f6381
PB
14607echo "$as_me:$LINENO: result: $ac_cv_prog_fgrep" >&5
14608echo "${ECHO_T}$ac_cv_prog_fgrep" >&6
14609 FGREP=$ac_cv_prog_fgrep
9e423e6d 14610
9f18db39 14611
da0f6381 14612test -z "$GREP" && GREP=grep
9f18db39 14613
da0f6381
PB
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632# Check whether --with-gnu-ld or --without-gnu-ld was given.
14633if test "${with_gnu_ld+set}" = set; then
14634 withval="$with_gnu_ld"
14635 test "$withval" = no || with_gnu_ld=yes
14636else
14637 with_gnu_ld=no
14638fi;
14639ac_prog=ld
14640if test "$GCC" = yes; then
14641 # Check if gcc -print-prog-name=ld gives a path.
14642 echo "$as_me:$LINENO: checking for ld used by $CC" >&5
14643echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
14644 case $host in
14645 *-*-mingw*)
14646 # gcc leaves a trailing carriage return which upsets mingw
14647 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
14648 *)
14649 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
14650 esac
14651 case $ac_prog in
14652 # Accept absolute paths.
14653 [\\/]* | ?:[\\/]*)
14654 re_direlt='/[^/][^/]*/\.\./'
14655 # Canonicalize the pathname of ld
14656 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
14657 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
14658 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
14659 done
14660 test -z "$LD" && LD="$ac_prog"
14661 ;;
14662 "")
14663 # If it fails, then pretend we aren't using GCC.
14664 ac_prog=ld
14665 ;;
14666 *)
14667 # If it is relative, then search for the first ld in PATH.
14668 with_gnu_ld=unknown
14669 ;;
14670 esac
14671elif test "$with_gnu_ld" = yes; then
14672 echo "$as_me:$LINENO: checking for GNU ld" >&5
14673echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
14674else
14675 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
14676echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
14677fi
14678if test "${lt_cv_path_LD+set}" = set; then
14679 echo $ECHO_N "(cached) $ECHO_C" >&6
14680else
14681 if test -z "$LD"; then
14682 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14683 for ac_dir in $PATH; do
14684 IFS="$lt_save_ifs"
14685 test -z "$ac_dir" && ac_dir=.
14686 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
14687 lt_cv_path_LD="$ac_dir/$ac_prog"
14688 # Check to see if the program is GNU ld. I'd rather use --version,
14689 # but apparently some variants of GNU ld only accept -v.
14690 # Break only if it was the GNU/non-GNU ld that we prefer.
14691 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
14692 *GNU* | *'with BFD'*)
14693 test "$with_gnu_ld" != no && break
14694 ;;
14695 *)
14696 test "$with_gnu_ld" != yes && break
14697 ;;
14698 esac
14699 fi
14700 done
14701 IFS="$lt_save_ifs"
14702else
14703 lt_cv_path_LD="$LD" # Let the user override the test with a path.
14704fi
14705fi
14706
14707LD="$lt_cv_path_LD"
14708if test -n "$LD"; then
14709 echo "$as_me:$LINENO: result: $LD" >&5
14710echo "${ECHO_T}$LD" >&6
14711else
14712 echo "$as_me:$LINENO: result: no" >&5
14713echo "${ECHO_T}no" >&6
14714fi
14715test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
14716echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
14717 { (exit 1); exit 1; }; }
14718echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
14719echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
14720if test "${lt_cv_prog_gnu_ld+set}" = set; then
14721 echo $ECHO_N "(cached) $ECHO_C" >&6
14722else
14723 # I'd rather use --version here, but apparently some GNU lds only accept -v.
14724case `$LD -v 2>&1 </dev/null` in
14725*GNU* | *'with BFD'*)
14726 lt_cv_prog_gnu_ld=yes
14727 ;;
14728*)
14729 lt_cv_prog_gnu_ld=no
14730 ;;
14731esac
14732fi
14733echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
14734echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
14735with_gnu_ld=$lt_cv_prog_gnu_ld
14736
14737
14738
14739
14740
14741
14742
14743
14744
da0f6381
PB
14745echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
14746echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6
14747if test "${lt_cv_path_NM+set}" = set; then
14748 echo $ECHO_N "(cached) $ECHO_C" >&6
14749else
14750 if test -n "$NM"; then
14751 # Let the user override the test.
14752 lt_cv_path_NM="$NM"
14753else
14754 lt_nm_to_check="${ac_tool_prefix}nm"
14755 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
14756 lt_nm_to_check="$lt_nm_to_check nm"
14757 fi
14758 for lt_tmp_nm in $lt_nm_to_check; do
14759 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14760 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
14761 IFS="$lt_save_ifs"
14762 test -z "$ac_dir" && ac_dir=.
14763 tmp_nm="$ac_dir/$lt_tmp_nm"
14764 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
14765 # Check to see if the nm accepts a BSD-compat flag.
14766 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
14767 # nm: unknown option "B" ignored
14768 # Tru64's nm complains that /dev/null is an invalid object file
14769 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
14770 */dev/null* | *'Invalid file or object type'*)
14771 lt_cv_path_NM="$tmp_nm -B"
14772 break
14773 ;;
14774 *)
14775 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
14776 */dev/null*)
14777 lt_cv_path_NM="$tmp_nm -p"
14778 break
14779 ;;
14780 *)
14781 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
14782 continue # so that we can try to find one that supports BSD flags
14783 ;;
14784 esac
14785 ;;
14786 esac
14787 fi
14788 done
14789 IFS="$lt_save_ifs"
14790 done
14791 : ${lt_cv_path_NM=no}
14792fi
14793fi
14794echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
14795echo "${ECHO_T}$lt_cv_path_NM" >&6
14796if test "$lt_cv_path_NM" != "no"; then
14797 NM="$lt_cv_path_NM"
14798else
14799 # Didn't find any BSD compatible name lister, look for dumpbin.
14800 if test -n "$ac_tool_prefix"; then
14801 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
14802 do
14803 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14804set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14805echo "$as_me:$LINENO: checking for $ac_word" >&5
14806echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14807if test "${ac_cv_prog_DUMPBIN+set}" = set; then
14808 echo $ECHO_N "(cached) $ECHO_C" >&6
14809else
14810 if test -n "$DUMPBIN"; then
14811 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
14812else
14813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14814for as_dir in $PATH
14815do
14816 IFS=$as_save_IFS
14817 test -z "$as_dir" && as_dir=.
14818 for ac_exec_ext in '' $ac_executable_extensions; do
14819 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14820 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
14821 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14822 break 2
14823 fi
14824done
14825done
14826
14827fi
14828fi
14829DUMPBIN=$ac_cv_prog_DUMPBIN
14830if test -n "$DUMPBIN"; then
14831 echo "$as_me:$LINENO: result: $DUMPBIN" >&5
14832echo "${ECHO_T}$DUMPBIN" >&6
14833else
14834 echo "$as_me:$LINENO: result: no" >&5
14835echo "${ECHO_T}no" >&6
14836fi
14837
14838 test -n "$DUMPBIN" && break
14839 done
14840fi
14841if test -z "$DUMPBIN"; then
14842 ac_ct_DUMPBIN=$DUMPBIN
14843 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
14844do
14845 # Extract the first word of "$ac_prog", so it can be a program name with args.
14846set dummy $ac_prog; ac_word=$2
14847echo "$as_me:$LINENO: checking for $ac_word" >&5
14848echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14849if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
14850 echo $ECHO_N "(cached) $ECHO_C" >&6
14851else
14852 if test -n "$ac_ct_DUMPBIN"; then
14853 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
14854else
14855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14856for as_dir in $PATH
14857do
14858 IFS=$as_save_IFS
14859 test -z "$as_dir" && as_dir=.
14860 for ac_exec_ext in '' $ac_executable_extensions; do
14861 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14862 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
14863 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14864 break 2
14865 fi
14866done
14867done
14868
14869fi
14870fi
14871ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
14872if test -n "$ac_ct_DUMPBIN"; then
14873 echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
14874echo "${ECHO_T}$ac_ct_DUMPBIN" >&6
14875else
14876 echo "$as_me:$LINENO: result: no" >&5
14877echo "${ECHO_T}no" >&6
14878fi
14879
14880 test -n "$ac_ct_DUMPBIN" && break
14881done
14882test -n "$ac_ct_DUMPBIN" || ac_ct_DUMPBIN=":"
14883
14884 DUMPBIN=$ac_ct_DUMPBIN
14885fi
14886
14887
14888 if test "$DUMPBIN" != ":"; then
14889 NM="$DUMPBIN"
14890 fi
14891fi
14892test -z "$NM" && NM=nm
14893
14894
14895
14896
14897
14898
14899echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
14900echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6
14901if test "${lt_cv_nm_interface+set}" = set; then
14902 echo $ECHO_N "(cached) $ECHO_C" >&6
14903else
14904 lt_cv_nm_interface="BSD nm"
14905 echo "int some_variable = 0;" > conftest.$ac_ext
00020c16 14906 (eval echo "\"\$as_me:14906: $ac_compile\"" >&5)
da0f6381
PB
14907 (eval "$ac_compile" 2>conftest.err)
14908 cat conftest.err >&5
00020c16 14909 (eval echo "\"\$as_me:14909: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
da0f6381
PB
14910 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
14911 cat conftest.err >&5
00020c16 14912 (eval echo "\"\$as_me:14912: output\"" >&5)
da0f6381
PB
14913 cat conftest.out >&5
14914 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
14915 lt_cv_nm_interface="MS dumpbin"
14916 fi
14917 rm -f conftest*
14918fi
14919echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
14920echo "${ECHO_T}$lt_cv_nm_interface" >&6
14921
14922echo "$as_me:$LINENO: checking whether ln -s works" >&5
14923echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
14924LN_S=$as_ln_s
14925if test "$LN_S" = "ln -s"; then
14926 echo "$as_me:$LINENO: result: yes" >&5
14927echo "${ECHO_T}yes" >&6
14928else
14929 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
14930echo "${ECHO_T}no, using $LN_S" >&6
14931fi
14932
14933# find the maximum length of command line arguments
14934echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
14935echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
14936if test "${lt_cv_sys_max_cmd_len+set}" = set; then
14937 echo $ECHO_N "(cached) $ECHO_C" >&6
14938else
14939 i=0
14940 teststring="ABCD"
14941
14942 case $build_os in
14943 msdosdjgpp*)
14944 # On DJGPP, this test can blow up pretty badly due to problems in libc
14945 # (any single argument exceeding 2000 bytes causes a buffer overrun
14946 # during glob expansion). Even if it were fixed, the result of this
14947 # check would be larger than it should be.
14948 lt_cv_sys_max_cmd_len=12288; # 12K is about right
14949 ;;
14950
14951 gnu*)
14952 # Under GNU Hurd, this test is not required because there is
14953 # no limit to the length of command line arguments.
14954 # Libtool will interpret -1 as no limit whatsoever
14955 lt_cv_sys_max_cmd_len=-1;
14956 ;;
14957
5d47bb02 14958 cygwin* | mingw* | cegcc*)
da0f6381
PB
14959 # On Win9x/ME, this test blows up -- it succeeds, but takes
14960 # about 5 minutes as the teststring grows exponentially.
14961 # Worse, since 9x/ME are not pre-emptively multitasking,
14962 # you end up with a "frozen" computer, even though with patience
14963 # the test eventually succeeds (with a max line length of 256k).
14964 # Instead, let's just punt: use the minimum linelength reported by
14965 # all of the supported platforms: 8192 (on NT/2K/XP).
14966 lt_cv_sys_max_cmd_len=8192;
14967 ;;
14968
14969 amigaos*)
14970 # On AmigaOS with pdksh, this test takes hours, literally.
14971 # So we just punt and use a minimum line length of 8192.
14972 lt_cv_sys_max_cmd_len=8192;
14973 ;;
14974
14975 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
14976 # This has been around since 386BSD, at least. Likely further.
14977 if test -x /sbin/sysctl; then
14978 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
14979 elif test -x /usr/sbin/sysctl; then
14980 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
14981 else
14982 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
14983 fi
14984 # And add a safety zone
14985 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
14986 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
14987 ;;
14988
14989 interix*)
14990 # We know the value 262144 and hardcode it with a safety zone (like BSD)
14991 lt_cv_sys_max_cmd_len=196608
14992 ;;
14993
14994 osf*)
14995 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
14996 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
14997 # nice to cause kernel panics so lets avoid the loop below.
14998 # First set a reasonable default.
14999 lt_cv_sys_max_cmd_len=16384
15000 #
15001 if test -x /sbin/sysconfig; then
15002 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
15003 *1*) lt_cv_sys_max_cmd_len=-1 ;;
15004 esac
15005 fi
15006 ;;
15007 sco3.2v5*)
15008 lt_cv_sys_max_cmd_len=102400
15009 ;;
15010 sysv5* | sco5v6* | sysv4.2uw2*)
15011 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
15012 if test -n "$kargmax"; then
15013 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
15014 else
15015 lt_cv_sys_max_cmd_len=32768
15016 fi
15017 ;;
15018 *)
5d47bb02
PG
15019 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
15020 if test -n "$lt_cv_sys_max_cmd_len"; then
da0f6381
PB
15021 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
15022 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
15023 else
15024 # Make teststring a little bigger before we do anything with it.
15025 # a 1K string should be a reasonable start.
15026 for i in 1 2 3 4 5 6 7 8 ; do
15027 teststring=$teststring$teststring
15028 done
15029 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
15030 # If test is not a shell built-in, we'll probably end up computing a
15031 # maximum length that is only half of the actual maximum length, but
15032 # we can't tell.
15033 while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
15034 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
15035 test $i != 17 # 1/2 MB should be enough
15036 do
15037 i=`expr $i + 1`
15038 teststring=$teststring$teststring
15039 done
15040 # Only check the string length outside the loop.
15041 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
15042 teststring=
15043 # Add a significant safety factor because C++ compilers can tack on
15044 # massive amounts of additional arguments before passing them to the
15045 # linker. It appears as though 1/2 is a usable value.
15046 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
15047 fi
15048 ;;
15049 esac
15050
15051fi
15052
15053if test -n $lt_cv_sys_max_cmd_len ; then
15054 echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
15055echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
15056else
15057 echo "$as_me:$LINENO: result: none" >&5
15058echo "${ECHO_T}none" >&6
15059fi
15060max_cmd_len=$lt_cv_sys_max_cmd_len
15061
15062
15063
15064
15065
15066
da0f6381
PB
15067: ${CP="cp -f"}
15068: ${MV="mv -f"}
15069: ${RM="rm -f"}
15070
15071echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
15072echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6
15073# Try some XSI features
15074xsi_shell=no
15075( _lt_dummy="a/b/c"
15076 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
5d47bb02
PG
15077 = c,a/b,, \
15078 && eval 'test $(( 1 + 1 )) -eq 2 \
15079 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
da0f6381
PB
15080 && xsi_shell=yes
15081echo "$as_me:$LINENO: result: $xsi_shell" >&5
15082echo "${ECHO_T}$xsi_shell" >&6
15083
15084
15085echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
15086echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6
15087lt_shell_append=no
15088( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
15089 >/dev/null 2>&1 \
15090 && lt_shell_append=yes
15091echo "$as_me:$LINENO: result: $lt_shell_append" >&5
15092echo "${ECHO_T}$lt_shell_append" >&6
15093
15094
15095if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
15096 lt_unset=unset
15097else
15098 lt_unset=false
15099fi
15100
15101
15102
15103
15104
15105# test EBCDIC or ASCII
15106case `echo X|tr X '\101'` in
15107 A) # ASCII based system
15108 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
15109 lt_SP2NL='tr \040 \012'
15110 lt_NL2SP='tr \015\012 \040\040'
15111 ;;
15112 *) # EBCDIC based system
15113 lt_SP2NL='tr \100 \n'
15114 lt_NL2SP='tr \r\n \100\100'
15115 ;;
15116esac
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
15127echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
15128if test "${lt_cv_ld_reload_flag+set}" = set; then
15129 echo $ECHO_N "(cached) $ECHO_C" >&6
15130else
15131 lt_cv_ld_reload_flag='-r'
15132fi
15133echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
15134echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
15135reload_flag=$lt_cv_ld_reload_flag
15136case $reload_flag in
15137"" | " "*) ;;
15138*) reload_flag=" $reload_flag" ;;
15139esac
15140reload_cmds='$LD$reload_flag -o $output$reload_objs'
15141case $host_os in
15142 darwin*)
15143 if test "$GCC" = yes; then
15144 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
15145 else
15146 reload_cmds='$LD$reload_flag -o $output$reload_objs'
15147 fi
15148 ;;
15149esac
15150
15151
15152
15153
15154
15155
15156
15157
15158
5d47bb02
PG
15159if test -n "$ac_tool_prefix"; then
15160 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
15161set dummy ${ac_tool_prefix}objdump; ac_word=$2
15162echo "$as_me:$LINENO: checking for $ac_word" >&5
15163echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15164if test "${ac_cv_prog_OBJDUMP+set}" = set; then
15165 echo $ECHO_N "(cached) $ECHO_C" >&6
15166else
15167 if test -n "$OBJDUMP"; then
15168 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
15169else
15170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15171for as_dir in $PATH
15172do
15173 IFS=$as_save_IFS
15174 test -z "$as_dir" && as_dir=.
15175 for ac_exec_ext in '' $ac_executable_extensions; do
15176 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15177 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
15178 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15179 break 2
15180 fi
15181done
15182done
15183
15184fi
15185fi
15186OBJDUMP=$ac_cv_prog_OBJDUMP
15187if test -n "$OBJDUMP"; then
15188 echo "$as_me:$LINENO: result: $OBJDUMP" >&5
15189echo "${ECHO_T}$OBJDUMP" >&6
15190else
15191 echo "$as_me:$LINENO: result: no" >&5
15192echo "${ECHO_T}no" >&6
15193fi
15194
15195fi
15196if test -z "$ac_cv_prog_OBJDUMP"; then
15197 ac_ct_OBJDUMP=$OBJDUMP
15198 # Extract the first word of "objdump", so it can be a program name with args.
15199set dummy objdump; ac_word=$2
15200echo "$as_me:$LINENO: checking for $ac_word" >&5
15201echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15202if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
15203 echo $ECHO_N "(cached) $ECHO_C" >&6
15204else
15205 if test -n "$ac_ct_OBJDUMP"; then
15206 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
15207else
15208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15209for as_dir in $PATH
15210do
15211 IFS=$as_save_IFS
15212 test -z "$as_dir" && as_dir=.
15213 for ac_exec_ext in '' $ac_executable_extensions; do
15214 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15215 ac_cv_prog_ac_ct_OBJDUMP="objdump"
15216 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15217 break 2
15218 fi
15219done
15220done
15221
15222 test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false"
15223fi
15224fi
15225ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
15226if test -n "$ac_ct_OBJDUMP"; then
15227 echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
15228echo "${ECHO_T}$ac_ct_OBJDUMP" >&6
15229else
15230 echo "$as_me:$LINENO: result: no" >&5
15231echo "${ECHO_T}no" >&6
15232fi
15233
15234 OBJDUMP=$ac_ct_OBJDUMP
15235else
15236 OBJDUMP="$ac_cv_prog_OBJDUMP"
15237fi
15238
15239test -z "$OBJDUMP" && OBJDUMP=objdump
15240
15241
15242
15243
15244
15245
15246
15247
da0f6381
PB
15248
15249echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
15250echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6
15251if test "${lt_cv_deplibs_check_method+set}" = set; then
15252 echo $ECHO_N "(cached) $ECHO_C" >&6
15253else
15254 lt_cv_file_magic_cmd='$MAGIC_CMD'
15255lt_cv_file_magic_test_file=
15256lt_cv_deplibs_check_method='unknown'
15257# Need to set the preceding variable on all platforms that support
15258# interlibrary dependencies.
15259# 'none' -- dependencies not supported.
15260# `unknown' -- same as none, but documents that we really don't know.
15261# 'pass_all' -- all dependencies passed with no checks.
15262# 'test_compile' -- check by making test program.
15263# 'file_magic [[regex]]' -- check by looking for files in library path
15264# which responds to the $file_magic_cmd with a given extended regex.
15265# If you have `file' or equivalent on your system and you're not sure
15266# whether `pass_all' will *always* work, you probably want this one.
15267
15268case $host_os in
15269aix[4-9]*)
15270 lt_cv_deplibs_check_method=pass_all
15271 ;;
15272
15273beos*)
15274 lt_cv_deplibs_check_method=pass_all
15275 ;;
15276
15277bsdi[45]*)
15278 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
15279 lt_cv_file_magic_cmd='/usr/bin/file -L'
15280 lt_cv_file_magic_test_file=/shlib/libc.so
15281 ;;
15282
15283cygwin*)
15284 # func_win32_libid is a shell function defined in ltmain.sh
15285 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
15286 lt_cv_file_magic_cmd='func_win32_libid'
15287 ;;
15288
15289mingw* | pw32*)
15290 # Base MSYS/MinGW do not provide the 'file' command needed by
15291 # func_win32_libid shell function, so use a weaker test based on 'objdump',
15292 # unless we find 'file', for example because we are cross-compiling.
15293 if ( file / ) >/dev/null 2>&1; then
15294 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
15295 lt_cv_file_magic_cmd='func_win32_libid'
15296 else
15297 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
15298 lt_cv_file_magic_cmd='$OBJDUMP -f'
15299 fi
15300 ;;
15301
5d47bb02
PG
15302cegcc)
15303 # use the weaker test based on 'objdump'. See mingw*.
15304 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
15305 lt_cv_file_magic_cmd='$OBJDUMP -f'
15306 ;;
15307
da0f6381
PB
15308darwin* | rhapsody*)
15309 lt_cv_deplibs_check_method=pass_all
15310 ;;
15311
15312freebsd* | dragonfly*)
15313 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
15314 case $host_cpu in
15315 i*86 )
15316 # Not sure whether the presence of OpenBSD here was a mistake.
15317 # Let's accept both of them until this is cleared up.
15318 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
15319 lt_cv_file_magic_cmd=/usr/bin/file
15320 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
15321 ;;
15322 esac
15323 else
15324 lt_cv_deplibs_check_method=pass_all
15325 fi
15326 ;;
15327
15328gnu*)
15329 lt_cv_deplibs_check_method=pass_all
15330 ;;
15331
15332hpux10.20* | hpux11*)
15333 lt_cv_file_magic_cmd=/usr/bin/file
15334 case $host_cpu in
15335 ia64*)
15336 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
15337 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
15338 ;;
15339 hppa*64*)
15340 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]'
15341 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
15342 ;;
15343 *)
15344 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
15345 lt_cv_file_magic_test_file=/usr/lib/libc.sl
15346 ;;
15347 esac
15348 ;;
15349
15350interix[3-9]*)
15351 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
15352 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
15353 ;;
15354
15355irix5* | irix6* | nonstopux*)
15356 case $LD in
15357 *-32|*"-32 ") libmagic=32-bit;;
15358 *-n32|*"-n32 ") libmagic=N32;;
15359 *-64|*"-64 ") libmagic=64-bit;;
15360 *) libmagic=never-match;;
15361 esac
15362 lt_cv_deplibs_check_method=pass_all
15363 ;;
15364
15365# This must be Linux ELF.
7a9d3fe8 15366linux* | k*bsd*-gnu | kopensolaris*-gnu)
da0f6381
PB
15367 lt_cv_deplibs_check_method=pass_all
15368 ;;
15369
15370netbsd*)
15371 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
15372 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
15373 else
15374 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
15375 fi
15376 ;;
15377
15378newos6*)
15379 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
15380 lt_cv_file_magic_cmd=/usr/bin/file
15381 lt_cv_file_magic_test_file=/usr/lib/libnls.so
15382 ;;
15383
15384*nto* | *qnx*)
15385 lt_cv_deplibs_check_method=pass_all
15386 ;;
15387
15388openbsd*)
15389 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15390 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
15391 else
15392 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
15393 fi
15394 ;;
15395
15396osf3* | osf4* | osf5*)
15397 lt_cv_deplibs_check_method=pass_all
15398 ;;
15399
15400rdos*)
15401 lt_cv_deplibs_check_method=pass_all
15402 ;;
15403
15404solaris*)
15405 lt_cv_deplibs_check_method=pass_all
15406 ;;
15407
15408sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
15409 lt_cv_deplibs_check_method=pass_all
15410 ;;
15411
15412sysv4 | sysv4.3*)
15413 case $host_vendor in
15414 motorola)
15415 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]'
15416 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
15417 ;;
15418 ncr)
15419 lt_cv_deplibs_check_method=pass_all
15420 ;;
15421 sequent)
15422 lt_cv_file_magic_cmd='/bin/file'
15423 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
15424 ;;
15425 sni)
15426 lt_cv_file_magic_cmd='/bin/file'
15427 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
15428 lt_cv_file_magic_test_file=/lib/libc.so
15429 ;;
15430 siemens)
15431 lt_cv_deplibs_check_method=pass_all
15432 ;;
15433 pc)
15434 lt_cv_deplibs_check_method=pass_all
15435 ;;
15436 esac
15437 ;;
15438
15439tpf*)
15440 lt_cv_deplibs_check_method=pass_all
15441 ;;
15442esac
15443
15444fi
15445echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
15446echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
15447file_magic_cmd=$lt_cv_file_magic_cmd
15448deplibs_check_method=$lt_cv_deplibs_check_method
15449test -z "$deplibs_check_method" && deplibs_check_method=unknown
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462if test -n "$ac_tool_prefix"; then
15463 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
15464set dummy ${ac_tool_prefix}ar; ac_word=$2
15465echo "$as_me:$LINENO: checking for $ac_word" >&5
15466echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15467if test "${ac_cv_prog_AR+set}" = set; then
15468 echo $ECHO_N "(cached) $ECHO_C" >&6
15469else
15470 if test -n "$AR"; then
15471 ac_cv_prog_AR="$AR" # Let the user override the test.
15472else
15473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15474for as_dir in $PATH
15475do
15476 IFS=$as_save_IFS
15477 test -z "$as_dir" && as_dir=.
15478 for ac_exec_ext in '' $ac_executable_extensions; do
15479 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15480 ac_cv_prog_AR="${ac_tool_prefix}ar"
15481 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15482 break 2
15483 fi
15484done
15485done
15486
15487fi
15488fi
15489AR=$ac_cv_prog_AR
15490if test -n "$AR"; then
15491 echo "$as_me:$LINENO: result: $AR" >&5
15492echo "${ECHO_T}$AR" >&6
15493else
15494 echo "$as_me:$LINENO: result: no" >&5
15495echo "${ECHO_T}no" >&6
15496fi
15497
15498fi
15499if test -z "$ac_cv_prog_AR"; then
15500 ac_ct_AR=$AR
15501 # Extract the first word of "ar", so it can be a program name with args.
15502set dummy ar; ac_word=$2
15503echo "$as_me:$LINENO: checking for $ac_word" >&5
15504echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15505if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
15506 echo $ECHO_N "(cached) $ECHO_C" >&6
15507else
15508 if test -n "$ac_ct_AR"; then
15509 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
15510else
15511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15512for as_dir in $PATH
15513do
15514 IFS=$as_save_IFS
15515 test -z "$as_dir" && as_dir=.
15516 for ac_exec_ext in '' $ac_executable_extensions; do
15517 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15518 ac_cv_prog_ac_ct_AR="ar"
15519 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15520 break 2
15521 fi
15522done
15523done
15524
15525 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
15526fi
15527fi
15528ac_ct_AR=$ac_cv_prog_ac_ct_AR
15529if test -n "$ac_ct_AR"; then
15530 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
15531echo "${ECHO_T}$ac_ct_AR" >&6
15532else
15533 echo "$as_me:$LINENO: result: no" >&5
15534echo "${ECHO_T}no" >&6
15535fi
15536
15537 AR=$ac_ct_AR
15538else
15539 AR="$ac_cv_prog_AR"
15540fi
15541
15542test -z "$AR" && AR=ar
15543test -z "$AR_FLAGS" && AR_FLAGS=cru
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555if test -n "$ac_tool_prefix"; then
15556 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
15557set dummy ${ac_tool_prefix}strip; ac_word=$2
15558echo "$as_me:$LINENO: checking for $ac_word" >&5
15559echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15560if test "${ac_cv_prog_STRIP+set}" = set; then
15561 echo $ECHO_N "(cached) $ECHO_C" >&6
15562else
15563 if test -n "$STRIP"; then
15564 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
15565else
15566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15567for as_dir in $PATH
15568do
15569 IFS=$as_save_IFS
15570 test -z "$as_dir" && as_dir=.
15571 for ac_exec_ext in '' $ac_executable_extensions; do
15572 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15573 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
15574 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15575 break 2
15576 fi
15577done
15578done
15579
15580fi
15581fi
15582STRIP=$ac_cv_prog_STRIP
15583if test -n "$STRIP"; then
15584 echo "$as_me:$LINENO: result: $STRIP" >&5
15585echo "${ECHO_T}$STRIP" >&6
15586else
15587 echo "$as_me:$LINENO: result: no" >&5
15588echo "${ECHO_T}no" >&6
15589fi
15590
15591fi
15592if test -z "$ac_cv_prog_STRIP"; then
15593 ac_ct_STRIP=$STRIP
15594 # Extract the first word of "strip", so it can be a program name with args.
15595set dummy strip; ac_word=$2
15596echo "$as_me:$LINENO: checking for $ac_word" >&5
15597echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15598if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
15599 echo $ECHO_N "(cached) $ECHO_C" >&6
15600else
15601 if test -n "$ac_ct_STRIP"; then
15602 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
15603else
15604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15605for as_dir in $PATH
15606do
15607 IFS=$as_save_IFS
15608 test -z "$as_dir" && as_dir=.
15609 for ac_exec_ext in '' $ac_executable_extensions; do
15610 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15611 ac_cv_prog_ac_ct_STRIP="strip"
15612 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15613 break 2
15614 fi
15615done
15616done
15617
15618 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
15619fi
15620fi
15621ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
15622if test -n "$ac_ct_STRIP"; then
15623 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
15624echo "${ECHO_T}$ac_ct_STRIP" >&6
15625else
15626 echo "$as_me:$LINENO: result: no" >&5
15627echo "${ECHO_T}no" >&6
15628fi
15629
15630 STRIP=$ac_ct_STRIP
15631else
15632 STRIP="$ac_cv_prog_STRIP"
15633fi
15634
15635test -z "$STRIP" && STRIP=:
15636
15637
15638
15639
15640
15641
15642if test -n "$ac_tool_prefix"; then
15643 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
15644set dummy ${ac_tool_prefix}ranlib; ac_word=$2
15645echo "$as_me:$LINENO: checking for $ac_word" >&5
15646echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15647if test "${ac_cv_prog_RANLIB+set}" = set; then
15648 echo $ECHO_N "(cached) $ECHO_C" >&6
15649else
15650 if test -n "$RANLIB"; then
15651 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
15652else
15653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15654for as_dir in $PATH
15655do
15656 IFS=$as_save_IFS
15657 test -z "$as_dir" && as_dir=.
15658 for ac_exec_ext in '' $ac_executable_extensions; do
15659 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15660 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
15661 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15662 break 2
15663 fi
15664done
15665done
15666
15667fi
15668fi
15669RANLIB=$ac_cv_prog_RANLIB
15670if test -n "$RANLIB"; then
15671 echo "$as_me:$LINENO: result: $RANLIB" >&5
15672echo "${ECHO_T}$RANLIB" >&6
15673else
15674 echo "$as_me:$LINENO: result: no" >&5
15675echo "${ECHO_T}no" >&6
15676fi
15677
15678fi
15679if test -z "$ac_cv_prog_RANLIB"; then
15680 ac_ct_RANLIB=$RANLIB
15681 # Extract the first word of "ranlib", so it can be a program name with args.
15682set dummy ranlib; ac_word=$2
15683echo "$as_me:$LINENO: checking for $ac_word" >&5
15684echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15685if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
15686 echo $ECHO_N "(cached) $ECHO_C" >&6
15687else
15688 if test -n "$ac_ct_RANLIB"; then
15689 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
15690else
15691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15692for as_dir in $PATH
15693do
15694 IFS=$as_save_IFS
15695 test -z "$as_dir" && as_dir=.
15696 for ac_exec_ext in '' $ac_executable_extensions; do
15697 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15698 ac_cv_prog_ac_ct_RANLIB="ranlib"
15699 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15700 break 2
15701 fi
15702done
15703done
15704
15705 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
15706fi
15707fi
15708ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
15709if test -n "$ac_ct_RANLIB"; then
15710 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
15711echo "${ECHO_T}$ac_ct_RANLIB" >&6
15712else
15713 echo "$as_me:$LINENO: result: no" >&5
15714echo "${ECHO_T}no" >&6
15715fi
15716
15717 RANLIB=$ac_ct_RANLIB
15718else
15719 RANLIB="$ac_cv_prog_RANLIB"
15720fi
15721
15722test -z "$RANLIB" && RANLIB=:
15723
15724
15725
15726
15727
15728
15729# Determine commands to create old-style static archives.
5d47bb02 15730old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
da0f6381
PB
15731old_postinstall_cmds='chmod 644 $oldlib'
15732old_postuninstall_cmds=
15733
15734if test -n "$RANLIB"; then
15735 case $host_os in
15736 openbsd*)
15737 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
15738 ;;
15739 *)
15740 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
15741 ;;
15742 esac
15743 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
15744fi
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779# If no C compiler was specified, use CC.
15780LTCC=${LTCC-"$CC"}
15781
15782# If no C compiler flags were specified, use CFLAGS.
15783LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
15784
15785# Allow CC to be a program name with arguments.
15786compiler=$CC
15787
15788
15789# Check for command to grab the raw symbol name followed by C symbol from nm.
15790echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
15791echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
15792if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
15793 echo $ECHO_N "(cached) $ECHO_C" >&6
15794else
15795
15796# These are sane defaults that work on at least a few old systems.
15797# [They come from Ultrix. What could be older than Ultrix?!! ;)]
15798
15799# Character class describing NM global symbol codes.
15800symcode='[BCDEGRST]'
15801
15802# Regexp to match symbols that can be accessed directly from C.
15803sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
15804
15805# Define system-specific variables.
15806case $host_os in
15807aix*)
15808 symcode='[BCDT]'
15809 ;;
5d47bb02 15810cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
15811 symcode='[ABCDGISTW]'
15812 ;;
15813hpux*)
15814 if test "$host_cpu" = ia64; then
15815 symcode='[ABCDEGRST]'
15816 fi
15817 ;;
15818irix* | nonstopux*)
15819 symcode='[BCDEGRST]'
15820 ;;
15821osf*)
15822 symcode='[BCDEGQRST]'
15823 ;;
15824solaris*)
15825 symcode='[BDRT]'
15826 ;;
15827sco3.2v5*)
15828 symcode='[DT]'
15829 ;;
15830sysv4.2uw2*)
15831 symcode='[DT]'
15832 ;;
15833sysv5* | sco5v6* | unixware* | OpenUNIX*)
15834 symcode='[ABDT]'
15835 ;;
15836sysv4)
15837 symcode='[DFNSTU]'
15838 ;;
15839esac
15840
15841# If we're using GNU nm, then use its standard symbol codes.
15842case `$NM -V 2>&1` in
15843*GNU* | *'with BFD'*)
15844 symcode='[ABCDGIRSTW]' ;;
15845esac
15846
15847# Transform an extracted symbol line into a proper C declaration.
15848# Some systems (esp. on ia64) link data and code symbols differently,
15849# so use this general approach.
15850lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
15851
15852# Transform an extracted symbol line into symbol name and symbol address
15853lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
5d47bb02 15854lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
da0f6381
PB
15855
15856# Handle CRLF in mingw tool chain
15857opt_cr=
15858case $build_os in
15859mingw*)
15860 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
15861 ;;
15862esac
15863
15864# Try without a prefix underscore, then with it.
15865for ac_symprfx in "" "_"; do
15866
15867 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
15868 symxfrm="\\1 $ac_symprfx\\2 \\2"
15869
15870 # Write the raw and C identifiers.
15871 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
15872 # Fake it for dumpbin and say T for any non-static function
15873 # and D for any global variable.
15874 # Also find C++ and __fastcall symbols from MSVC++,
15875 # which start with @ or ?.
15876 lt_cv_sys_global_symbol_pipe="$AWK '"\
15877" {last_section=section; section=\$ 3};"\
15878" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
15879" \$ 0!~/External *\|/{next};"\
15880" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
15881" {if(hide[section]) next};"\
15882" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
15883" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
15884" s[1]~/^[@?]/{print s[1], s[1]; next};"\
15885" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
15886" ' prfx=^$ac_symprfx"
15887 else
15888 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
15889 fi
15890
15891 # Check to see that the pipe works correctly.
15892 pipe_works=no
15893
15894 rm -f conftest*
15895 cat > conftest.$ac_ext <<_LT_EOF
15896#ifdef __cplusplus
15897extern "C" {
15898#endif
15899char nm_test_var;
15900void nm_test_func(void);
15901void nm_test_func(void){}
15902#ifdef __cplusplus
15903}
15904#endif
15905int main(){nm_test_var='a';nm_test_func();return(0);}
15906_LT_EOF
15907
15908 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15909 (eval $ac_compile) 2>&5
15910 ac_status=$?
15911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15912 (exit $ac_status); }; then
15913 # Now try to grab the symbols.
15914 nlist=conftest.nm
15915 if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
15916 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
15917 ac_status=$?
15918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15919 (exit $ac_status); } && test -s "$nlist"; then
15920 # Try sorting and uniquifying the output.
15921 if sort "$nlist" | uniq > "$nlist"T; then
15922 mv -f "$nlist"T "$nlist"
15923 else
15924 rm -f "$nlist"T
15925 fi
15926
15927 # Make sure that we snagged all the symbols we need.
15928 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
15929 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
15930 cat <<_LT_EOF > conftest.$ac_ext
15931#ifdef __cplusplus
15932extern "C" {
15933#endif
15934
15935_LT_EOF
15936 # Now generate the symbol file.
15937 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
15938
15939 cat <<_LT_EOF >> conftest.$ac_ext
15940
15941/* The mapping between symbol names and symbols. */
15942const struct {
15943 const char *name;
15944 void *address;
15945}
15946lt__PROGRAM__LTX_preloaded_symbols[] =
15947{
15948 { "@PROGRAM@", (void *) 0 },
15949_LT_EOF
15950 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
15951 cat <<\_LT_EOF >> conftest.$ac_ext
15952 {0, (void *) 0}
15953};
15954
15955/* This works around a problem in FreeBSD linker */
15956#ifdef FREEBSD_WORKAROUND
15957static const void *lt_preloaded_setup() {
15958 return lt__PROGRAM__LTX_preloaded_symbols;
15959}
15960#endif
15961
15962#ifdef __cplusplus
15963}
15964#endif
15965_LT_EOF
15966 # Now try linking the two files.
15967 mv conftest.$ac_objext conftstm.$ac_objext
15968 lt_save_LIBS="$LIBS"
15969 lt_save_CFLAGS="$CFLAGS"
15970 LIBS="conftstm.$ac_objext"
15971 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
15972 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15973 (eval $ac_link) 2>&5
15974 ac_status=$?
15975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15976 (exit $ac_status); } && test -s conftest${ac_exeext}; then
15977 pipe_works=yes
15978 fi
15979 LIBS="$lt_save_LIBS"
15980 CFLAGS="$lt_save_CFLAGS"
15981 else
15982 echo "cannot find nm_test_func in $nlist" >&5
15983 fi
15984 else
15985 echo "cannot find nm_test_var in $nlist" >&5
15986 fi
15987 else
15988 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
15989 fi
15990 else
15991 echo "$progname: failed program was:" >&5
15992 cat conftest.$ac_ext >&5
15993 fi
5d47bb02 15994 rm -rf conftest* conftst*
da0f6381
PB
15995
15996 # Do not use the global_symbol_pipe unless it works.
15997 if test "$pipe_works" = yes; then
15998 break
15999 else
16000 lt_cv_sys_global_symbol_pipe=
16001 fi
16002done
16003
16004fi
16005
16006if test -z "$lt_cv_sys_global_symbol_pipe"; then
16007 lt_cv_sys_global_symbol_to_cdecl=
16008fi
16009if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
16010 echo "$as_me:$LINENO: result: failed" >&5
16011echo "${ECHO_T}failed" >&6
16012else
16013 echo "$as_me:$LINENO: result: ok" >&5
16014echo "${ECHO_T}ok" >&6
16015fi
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
5d47bb02
PG
16031
16032
16033
16034
16035
da0f6381
PB
16036
16037
16038# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
16039if test "${enable_libtool_lock+set}" = set; then
16040 enableval="$enable_libtool_lock"
16041
16042fi;
16043test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
16044
16045# Some flags need to be propagated to the compiler or linker for good
16046# libtool support.
16047case $host in
16048ia64-*-hpux*)
16049 # Find out which ABI we are using.
16050 echo 'int i;' > conftest.$ac_ext
16051 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16052 (eval $ac_compile) 2>&5
16053 ac_status=$?
16054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16055 (exit $ac_status); }; then
16056 case `/usr/bin/file conftest.$ac_objext` in
16057 *ELF-32*)
16058 HPUX_IA64_MODE="32"
16059 ;;
16060 *ELF-64*)
16061 HPUX_IA64_MODE="64"
16062 ;;
16063 esac
16064 fi
16065 rm -rf conftest*
16066 ;;
16067*-*-irix6*)
16068 # Find out which ABI we are using.
00020c16 16069 echo '#line 16069 "configure"' > conftest.$ac_ext
da0f6381
PB
16070 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16071 (eval $ac_compile) 2>&5
16072 ac_status=$?
16073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16074 (exit $ac_status); }; then
16075 if test "$lt_cv_prog_gnu_ld" = yes; then
16076 case `/usr/bin/file conftest.$ac_objext` in
16077 *32-bit*)
16078 LD="${LD-ld} -melf32bsmip"
16079 ;;
16080 *N32*)
16081 LD="${LD-ld} -melf32bmipn32"
16082 ;;
16083 *64-bit*)
16084 LD="${LD-ld} -melf64bmip"
16085 ;;
16086 esac
16087 else
16088 case `/usr/bin/file conftest.$ac_objext` in
16089 *32-bit*)
16090 LD="${LD-ld} -32"
16091 ;;
16092 *N32*)
16093 LD="${LD-ld} -n32"
16094 ;;
16095 *64-bit*)
16096 LD="${LD-ld} -64"
16097 ;;
16098 esac
16099 fi
16100 fi
16101 rm -rf conftest*
16102 ;;
16103
16104x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
16105s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
16106 # Find out which ABI we are using.
16107 echo 'int i;' > conftest.$ac_ext
16108 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16109 (eval $ac_compile) 2>&5
16110 ac_status=$?
16111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16112 (exit $ac_status); }; then
16113 case `/usr/bin/file conftest.o` in
16114 *32-bit*)
16115 case $host in
16116 x86_64-*kfreebsd*-gnu)
16117 LD="${LD-ld} -m elf_i386_fbsd"
16118 ;;
16119 x86_64-*linux*)
16120 LD="${LD-ld} -m elf_i386"
16121 ;;
16122 ppc64-*linux*|powerpc64-*linux*)
16123 LD="${LD-ld} -m elf32ppclinux"
16124 ;;
16125 s390x-*linux*)
16126 LD="${LD-ld} -m elf_s390"
16127 ;;
16128 sparc64-*linux*)
16129 LD="${LD-ld} -m elf32_sparc"
16130 ;;
16131 esac
16132 ;;
16133 *64-bit*)
16134 case $host in
16135 x86_64-*kfreebsd*-gnu)
16136 LD="${LD-ld} -m elf_x86_64_fbsd"
16137 ;;
16138 x86_64-*linux*)
16139 LD="${LD-ld} -m elf_x86_64"
16140 ;;
16141 ppc*-*linux*|powerpc*-*linux*)
16142 LD="${LD-ld} -m elf64ppc"
16143 ;;
16144 s390*-*linux*|s390*-*tpf*)
16145 LD="${LD-ld} -m elf64_s390"
16146 ;;
16147 sparc*-*linux*)
16148 LD="${LD-ld} -m elf64_sparc"
16149 ;;
16150 esac
16151 ;;
16152 esac
16153 fi
16154 rm -rf conftest*
16155 ;;
16156
16157*-*-sco3.2v5*)
16158 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
16159 SAVE_CFLAGS="$CFLAGS"
16160 CFLAGS="$CFLAGS -belf"
16161 echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
16162echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
16163if test "${lt_cv_cc_needs_belf+set}" = set; then
16164 echo $ECHO_N "(cached) $ECHO_C" >&6
16165else
16166 ac_ext=c
16167ac_cpp='$CPP $CPPFLAGS'
16168ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16169ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16170ac_compiler_gnu=$ac_cv_c_compiler_gnu
16171
16172 cat >conftest.$ac_ext <<_ACEOF
16173/* confdefs.h. */
16174_ACEOF
16175cat confdefs.h >>conftest.$ac_ext
16176cat >>conftest.$ac_ext <<_ACEOF
16177/* end confdefs.h. */
16178
16179int
16180main ()
16181{
16182
16183 ;
16184 return 0;
16185}
16186_ACEOF
16187rm -f conftest.$ac_objext conftest$ac_exeext
16188if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16189 (eval $ac_link) 2>conftest.er1
16190 ac_status=$?
16191 grep -v '^ *+' conftest.er1 >conftest.err
16192 rm -f conftest.er1
16193 cat conftest.err >&5
16194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16195 (exit $ac_status); } &&
16196 { ac_try='test -z "$ac_c_werror_flag"
16197 || test ! -s conftest.err'
16198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16199 (eval $ac_try) 2>&5
16200 ac_status=$?
16201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16202 (exit $ac_status); }; } &&
16203 { ac_try='test -s conftest$ac_exeext'
16204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16205 (eval $ac_try) 2>&5
16206 ac_status=$?
16207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16208 (exit $ac_status); }; }; then
16209 lt_cv_cc_needs_belf=yes
16210else
16211 echo "$as_me: failed program was:" >&5
16212sed 's/^/| /' conftest.$ac_ext >&5
16213
16214lt_cv_cc_needs_belf=no
16215fi
16216rm -f conftest.err conftest.$ac_objext \
16217 conftest$ac_exeext conftest.$ac_ext
16218 ac_ext=c
16219ac_cpp='$CPP $CPPFLAGS'
16220ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16221ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16222ac_compiler_gnu=$ac_cv_c_compiler_gnu
16223
16224fi
16225echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
16226echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
16227 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
16228 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
16229 CFLAGS="$SAVE_CFLAGS"
16230 fi
16231 ;;
16232sparc*-*solaris*)
16233 # Find out which ABI we are using.
16234 echo 'int i;' > conftest.$ac_ext
16235 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16236 (eval $ac_compile) 2>&5
16237 ac_status=$?
16238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16239 (exit $ac_status); }; then
16240 case `/usr/bin/file conftest.o` in
16241 *64-bit*)
16242 case $lt_cv_prog_gnu_ld in
16243 yes*) LD="${LD-ld} -m elf64_sparc" ;;
5d47bb02
PG
16244 *)
16245 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
16246 LD="${LD-ld} -64"
16247 fi
16248 ;;
da0f6381
PB
16249 esac
16250 ;;
16251 esac
16252 fi
16253 rm -rf conftest*
16254 ;;
16255esac
16256
5d47bb02
PG
16257need_locks="$enable_libtool_lock"
16258
16259
16260 case $host_os in
16261 rhapsody* | darwin*)
16262 if test -n "$ac_tool_prefix"; then
16263 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
16264set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
16265echo "$as_me:$LINENO: checking for $ac_word" >&5
16266echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16267if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
16268 echo $ECHO_N "(cached) $ECHO_C" >&6
16269else
16270 if test -n "$DSYMUTIL"; then
16271 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
16272else
16273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16274for as_dir in $PATH
16275do
16276 IFS=$as_save_IFS
16277 test -z "$as_dir" && as_dir=.
16278 for ac_exec_ext in '' $ac_executable_extensions; do
16279 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16280 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
16281 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16282 break 2
16283 fi
16284done
16285done
16286
16287fi
16288fi
16289DSYMUTIL=$ac_cv_prog_DSYMUTIL
16290if test -n "$DSYMUTIL"; then
16291 echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
16292echo "${ECHO_T}$DSYMUTIL" >&6
16293else
16294 echo "$as_me:$LINENO: result: no" >&5
16295echo "${ECHO_T}no" >&6
16296fi
16297
16298fi
16299if test -z "$ac_cv_prog_DSYMUTIL"; then
16300 ac_ct_DSYMUTIL=$DSYMUTIL
16301 # Extract the first word of "dsymutil", so it can be a program name with args.
16302set dummy dsymutil; ac_word=$2
16303echo "$as_me:$LINENO: checking for $ac_word" >&5
16304echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16305if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
16306 echo $ECHO_N "(cached) $ECHO_C" >&6
16307else
16308 if test -n "$ac_ct_DSYMUTIL"; then
16309 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
16310else
16311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16312for as_dir in $PATH
16313do
16314 IFS=$as_save_IFS
16315 test -z "$as_dir" && as_dir=.
16316 for ac_exec_ext in '' $ac_executable_extensions; do
16317 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16318 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
16319 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16320 break 2
16321 fi
16322done
16323done
16324
16325 test -z "$ac_cv_prog_ac_ct_DSYMUTIL" && ac_cv_prog_ac_ct_DSYMUTIL=":"
16326fi
16327fi
16328ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
16329if test -n "$ac_ct_DSYMUTIL"; then
16330 echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
16331echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6
16332else
16333 echo "$as_me:$LINENO: result: no" >&5
16334echo "${ECHO_T}no" >&6
16335fi
16336
16337 DSYMUTIL=$ac_ct_DSYMUTIL
16338else
16339 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
16340fi
16341
16342 if test -n "$ac_tool_prefix"; then
16343 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
16344set dummy ${ac_tool_prefix}nmedit; ac_word=$2
16345echo "$as_me:$LINENO: checking for $ac_word" >&5
16346echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16347if test "${ac_cv_prog_NMEDIT+set}" = set; then
16348 echo $ECHO_N "(cached) $ECHO_C" >&6
16349else
16350 if test -n "$NMEDIT"; then
16351 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
16352else
16353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16354for as_dir in $PATH
16355do
16356 IFS=$as_save_IFS
16357 test -z "$as_dir" && as_dir=.
16358 for ac_exec_ext in '' $ac_executable_extensions; do
16359 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16360 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
16361 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16362 break 2
16363 fi
16364done
16365done
16366
16367fi
16368fi
16369NMEDIT=$ac_cv_prog_NMEDIT
16370if test -n "$NMEDIT"; then
16371 echo "$as_me:$LINENO: result: $NMEDIT" >&5
16372echo "${ECHO_T}$NMEDIT" >&6
16373else
16374 echo "$as_me:$LINENO: result: no" >&5
16375echo "${ECHO_T}no" >&6
16376fi
16377
16378fi
16379if test -z "$ac_cv_prog_NMEDIT"; then
16380 ac_ct_NMEDIT=$NMEDIT
16381 # Extract the first word of "nmedit", so it can be a program name with args.
16382set dummy nmedit; ac_word=$2
16383echo "$as_me:$LINENO: checking for $ac_word" >&5
16384echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16385if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
16386 echo $ECHO_N "(cached) $ECHO_C" >&6
16387else
16388 if test -n "$ac_ct_NMEDIT"; then
16389 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
16390else
16391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16392for as_dir in $PATH
16393do
16394 IFS=$as_save_IFS
16395 test -z "$as_dir" && as_dir=.
16396 for ac_exec_ext in '' $ac_executable_extensions; do
16397 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16398 ac_cv_prog_ac_ct_NMEDIT="nmedit"
16399 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16400 break 2
16401 fi
16402done
16403done
16404
16405 test -z "$ac_cv_prog_ac_ct_NMEDIT" && ac_cv_prog_ac_ct_NMEDIT=":"
16406fi
16407fi
16408ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
16409if test -n "$ac_ct_NMEDIT"; then
16410 echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
16411echo "${ECHO_T}$ac_ct_NMEDIT" >&6
16412else
16413 echo "$as_me:$LINENO: result: no" >&5
16414echo "${ECHO_T}no" >&6
16415fi
16416
16417 NMEDIT=$ac_ct_NMEDIT
16418else
16419 NMEDIT="$ac_cv_prog_NMEDIT"
16420fi
16421
16422 if test -n "$ac_tool_prefix"; then
16423 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
16424set dummy ${ac_tool_prefix}lipo; ac_word=$2
16425echo "$as_me:$LINENO: checking for $ac_word" >&5
16426echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16427if test "${ac_cv_prog_LIPO+set}" = set; then
16428 echo $ECHO_N "(cached) $ECHO_C" >&6
16429else
16430 if test -n "$LIPO"; then
16431 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
16432else
16433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16434for as_dir in $PATH
16435do
16436 IFS=$as_save_IFS
16437 test -z "$as_dir" && as_dir=.
16438 for ac_exec_ext in '' $ac_executable_extensions; do
16439 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16440 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
16441 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16442 break 2
16443 fi
16444done
16445done
16446
16447fi
16448fi
16449LIPO=$ac_cv_prog_LIPO
16450if test -n "$LIPO"; then
16451 echo "$as_me:$LINENO: result: $LIPO" >&5
16452echo "${ECHO_T}$LIPO" >&6
16453else
16454 echo "$as_me:$LINENO: result: no" >&5
16455echo "${ECHO_T}no" >&6
16456fi
16457
16458fi
16459if test -z "$ac_cv_prog_LIPO"; then
16460 ac_ct_LIPO=$LIPO
16461 # Extract the first word of "lipo", so it can be a program name with args.
16462set dummy lipo; ac_word=$2
16463echo "$as_me:$LINENO: checking for $ac_word" >&5
16464echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16465if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then
16466 echo $ECHO_N "(cached) $ECHO_C" >&6
16467else
16468 if test -n "$ac_ct_LIPO"; then
16469 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
16470else
16471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16472for as_dir in $PATH
16473do
16474 IFS=$as_save_IFS
16475 test -z "$as_dir" && as_dir=.
16476 for ac_exec_ext in '' $ac_executable_extensions; do
16477 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16478 ac_cv_prog_ac_ct_LIPO="lipo"
16479 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16480 break 2
16481 fi
16482done
16483done
16484
16485 test -z "$ac_cv_prog_ac_ct_LIPO" && ac_cv_prog_ac_ct_LIPO=":"
16486fi
16487fi
16488ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
16489if test -n "$ac_ct_LIPO"; then
16490 echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5
16491echo "${ECHO_T}$ac_ct_LIPO" >&6
16492else
16493 echo "$as_me:$LINENO: result: no" >&5
16494echo "${ECHO_T}no" >&6
16495fi
16496
16497 LIPO=$ac_ct_LIPO
16498else
16499 LIPO="$ac_cv_prog_LIPO"
16500fi
16501
16502 if test -n "$ac_tool_prefix"; then
16503 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
16504set dummy ${ac_tool_prefix}otool; ac_word=$2
16505echo "$as_me:$LINENO: checking for $ac_word" >&5
16506echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16507if test "${ac_cv_prog_OTOOL+set}" = set; then
16508 echo $ECHO_N "(cached) $ECHO_C" >&6
16509else
16510 if test -n "$OTOOL"; then
16511 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
16512else
16513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16514for as_dir in $PATH
16515do
16516 IFS=$as_save_IFS
16517 test -z "$as_dir" && as_dir=.
16518 for ac_exec_ext in '' $ac_executable_extensions; do
16519 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16520 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
16521 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16522 break 2
16523 fi
16524done
16525done
16526
16527fi
16528fi
16529OTOOL=$ac_cv_prog_OTOOL
16530if test -n "$OTOOL"; then
16531 echo "$as_me:$LINENO: result: $OTOOL" >&5
16532echo "${ECHO_T}$OTOOL" >&6
16533else
16534 echo "$as_me:$LINENO: result: no" >&5
16535echo "${ECHO_T}no" >&6
16536fi
16537
16538fi
16539if test -z "$ac_cv_prog_OTOOL"; then
16540 ac_ct_OTOOL=$OTOOL
16541 # Extract the first word of "otool", so it can be a program name with args.
16542set dummy otool; ac_word=$2
16543echo "$as_me:$LINENO: checking for $ac_word" >&5
16544echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16545if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then
16546 echo $ECHO_N "(cached) $ECHO_C" >&6
16547else
16548 if test -n "$ac_ct_OTOOL"; then
16549 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
16550else
16551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16552for as_dir in $PATH
16553do
16554 IFS=$as_save_IFS
16555 test -z "$as_dir" && as_dir=.
16556 for ac_exec_ext in '' $ac_executable_extensions; do
16557 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16558 ac_cv_prog_ac_ct_OTOOL="otool"
16559 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16560 break 2
16561 fi
16562done
16563done
16564
16565 test -z "$ac_cv_prog_ac_ct_OTOOL" && ac_cv_prog_ac_ct_OTOOL=":"
16566fi
16567fi
16568ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
16569if test -n "$ac_ct_OTOOL"; then
16570 echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5
16571echo "${ECHO_T}$ac_ct_OTOOL" >&6
16572else
16573 echo "$as_me:$LINENO: result: no" >&5
16574echo "${ECHO_T}no" >&6
16575fi
16576
16577 OTOOL=$ac_ct_OTOOL
16578else
16579 OTOOL="$ac_cv_prog_OTOOL"
16580fi
16581
16582 if test -n "$ac_tool_prefix"; then
16583 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
16584set dummy ${ac_tool_prefix}otool64; ac_word=$2
16585echo "$as_me:$LINENO: checking for $ac_word" >&5
16586echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16587if test "${ac_cv_prog_OTOOL64+set}" = set; then
16588 echo $ECHO_N "(cached) $ECHO_C" >&6
16589else
16590 if test -n "$OTOOL64"; then
16591 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
16592else
16593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16594for as_dir in $PATH
16595do
16596 IFS=$as_save_IFS
16597 test -z "$as_dir" && as_dir=.
16598 for ac_exec_ext in '' $ac_executable_extensions; do
16599 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16600 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
16601 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16602 break 2
16603 fi
16604done
16605done
16606
16607fi
16608fi
16609OTOOL64=$ac_cv_prog_OTOOL64
16610if test -n "$OTOOL64"; then
16611 echo "$as_me:$LINENO: result: $OTOOL64" >&5
16612echo "${ECHO_T}$OTOOL64" >&6
16613else
16614 echo "$as_me:$LINENO: result: no" >&5
16615echo "${ECHO_T}no" >&6
16616fi
16617
16618fi
16619if test -z "$ac_cv_prog_OTOOL64"; then
16620 ac_ct_OTOOL64=$OTOOL64
16621 # Extract the first word of "otool64", so it can be a program name with args.
16622set dummy otool64; ac_word=$2
16623echo "$as_me:$LINENO: checking for $ac_word" >&5
16624echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16625if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then
16626 echo $ECHO_N "(cached) $ECHO_C" >&6
16627else
16628 if test -n "$ac_ct_OTOOL64"; then
16629 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
16630else
16631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16632for as_dir in $PATH
16633do
16634 IFS=$as_save_IFS
16635 test -z "$as_dir" && as_dir=.
16636 for ac_exec_ext in '' $ac_executable_extensions; do
16637 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16638 ac_cv_prog_ac_ct_OTOOL64="otool64"
16639 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16640 break 2
16641 fi
16642done
16643done
16644
16645 test -z "$ac_cv_prog_ac_ct_OTOOL64" && ac_cv_prog_ac_ct_OTOOL64=":"
16646fi
16647fi
16648ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
16649if test -n "$ac_ct_OTOOL64"; then
16650 echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5
16651echo "${ECHO_T}$ac_ct_OTOOL64" >&6
16652else
16653 echo "$as_me:$LINENO: result: no" >&5
16654echo "${ECHO_T}no" >&6
16655fi
16656
16657 OTOOL64=$ac_ct_OTOOL64
16658else
16659 OTOOL64="$ac_cv_prog_OTOOL64"
16660fi
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688 echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
16689echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6
16690if test "${lt_cv_apple_cc_single_mod+set}" = set; then
16691 echo $ECHO_N "(cached) $ECHO_C" >&6
16692else
16693 lt_cv_apple_cc_single_mod=no
16694 if test -z "${LT_MULTI_MODULE}"; then
16695 # By default we will add the -single_module flag. You can override
16696 # by either setting the environment variable LT_MULTI_MODULE
16697 # non-empty at configure time, or by adding -multi_module to the
16698 # link flags.
16699 rm -rf libconftest.dylib*
16700 echo "int foo(void){return 1;}" > conftest.c
16701 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
16702-dynamiclib -Wl,-single_module conftest.c" >&5
16703 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
16704 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
16705 _lt_result=$?
16706 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
16707 lt_cv_apple_cc_single_mod=yes
16708 else
16709 cat conftest.err >&5
16710 fi
16711 rm -rf libconftest.dylib*
16712 rm -f conftest.*
16713 fi
16714fi
16715echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
16716echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6
16717 echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
16718echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6
16719if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
16720 echo $ECHO_N "(cached) $ECHO_C" >&6
16721else
16722 lt_cv_ld_exported_symbols_list=no
16723 save_LDFLAGS=$LDFLAGS
16724 echo "_main" > conftest.sym
16725 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
16726 cat >conftest.$ac_ext <<_ACEOF
16727/* confdefs.h. */
16728_ACEOF
16729cat confdefs.h >>conftest.$ac_ext
16730cat >>conftest.$ac_ext <<_ACEOF
16731/* end confdefs.h. */
16732
16733int
16734main ()
16735{
16736
16737 ;
16738 return 0;
16739}
16740_ACEOF
16741rm -f conftest.$ac_objext conftest$ac_exeext
16742if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16743 (eval $ac_link) 2>conftest.er1
16744 ac_status=$?
16745 grep -v '^ *+' conftest.er1 >conftest.err
16746 rm -f conftest.er1
16747 cat conftest.err >&5
16748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16749 (exit $ac_status); } &&
16750 { ac_try='test -z "$ac_c_werror_flag"
16751 || test ! -s conftest.err'
16752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16753 (eval $ac_try) 2>&5
16754 ac_status=$?
16755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16756 (exit $ac_status); }; } &&
16757 { ac_try='test -s conftest$ac_exeext'
16758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16759 (eval $ac_try) 2>&5
16760 ac_status=$?
16761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16762 (exit $ac_status); }; }; then
16763 lt_cv_ld_exported_symbols_list=yes
16764else
16765 echo "$as_me: failed program was:" >&5
16766sed 's/^/| /' conftest.$ac_ext >&5
16767
16768lt_cv_ld_exported_symbols_list=no
16769fi
16770rm -f conftest.err conftest.$ac_objext \
16771 conftest$ac_exeext conftest.$ac_ext
16772 LDFLAGS="$save_LDFLAGS"
16773
16774fi
16775echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
16776echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6
16777 case $host_os in
16778 rhapsody* | darwin1.[012])
16779 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
16780 darwin1.*)
16781 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
16782 darwin*) # darwin 5.x on
16783 # if running on 10.5 or later, the deployment target defaults
16784 # to the OS version, if on x86, and 10.4, the deployment
16785 # target defaults to 10.4. Don't you love it?
16786 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
16787 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
16788 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
16789 10.[012]*)
16790 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
16791 10.*)
16792 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
16793 esac
16794 ;;
16795 esac
16796 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
16797 _lt_dar_single_mod='$single_module'
16798 fi
16799 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
16800 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
16801 else
16802 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
16803 fi
16804 if test "$DSYMUTIL" != ":"; then
16805 _lt_dsymutil='~$DSYMUTIL $lib || :'
16806 else
16807 _lt_dsymutil=
16808 fi
16809 ;;
16810 esac
da0f6381
PB
16811
16812
16813for ac_header in dlfcn.h
16814do
16815as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16816echo "$as_me:$LINENO: checking for $ac_header" >&5
16817echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16818if eval "test \"\${$as_ac_Header+set}\" = set"; then
16819 echo $ECHO_N "(cached) $ECHO_C" >&6
16820else
16821 cat >conftest.$ac_ext <<_ACEOF
16822/* confdefs.h. */
16823_ACEOF
16824cat confdefs.h >>conftest.$ac_ext
16825cat >>conftest.$ac_ext <<_ACEOF
16826/* end confdefs.h. */
16827#include <$ac_header>
16828_ACEOF
16829if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16830 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16831 ac_status=$?
16832 grep -v '^ *+' conftest.er1 >conftest.err
16833 rm -f conftest.er1
16834 cat conftest.err >&5
16835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16836 (exit $ac_status); } >/dev/null; then
16837 if test -s conftest.err; then
16838 ac_cpp_err=$ac_c_preproc_warn_flag
16839 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16840 else
16841 ac_cpp_err=
16842 fi
16843else
16844 ac_cpp_err=yes
16845fi
16846if test -z "$ac_cpp_err"; then
16847 eval "$as_ac_Header=yes"
16848else
16849 echo "$as_me: failed program was:" >&5
16850sed 's/^/| /' conftest.$ac_ext >&5
16851
16852 eval "$as_ac_Header=no"
16853fi
16854rm -f conftest.err conftest.$ac_ext
16855fi
16856echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16857echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16858if test `eval echo '${'$as_ac_Header'}'` = yes; then
16859 cat >>confdefs.h <<_ACEOF
16860#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16861_ACEOF
16862
16863fi
16864done
16865
16866
16867
00020c16
ILT
16868ac_ext=cc
16869ac_cpp='$CXXCPP $CPPFLAGS'
16870ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16871ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16872ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16873if test -n "$ac_tool_prefix"; then
16874 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
16875 do
16876 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16877set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16878echo "$as_me:$LINENO: checking for $ac_word" >&5
16879echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16880if test "${ac_cv_prog_CXX+set}" = set; then
16881 echo $ECHO_N "(cached) $ECHO_C" >&6
16882else
16883 if test -n "$CXX"; then
16884 ac_cv_prog_CXX="$CXX" # Let the user override the test.
16885else
16886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16887for as_dir in $PATH
16888do
16889 IFS=$as_save_IFS
16890 test -z "$as_dir" && as_dir=.
16891 for ac_exec_ext in '' $ac_executable_extensions; do
16892 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16893 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
16894 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16895 break 2
16896 fi
16897done
16898done
5d47bb02 16899
00020c16
ILT
16900fi
16901fi
16902CXX=$ac_cv_prog_CXX
16903if test -n "$CXX"; then
16904 echo "$as_me:$LINENO: result: $CXX" >&5
16905echo "${ECHO_T}$CXX" >&6
16906else
16907 echo "$as_me:$LINENO: result: no" >&5
16908echo "${ECHO_T}no" >&6
16909fi
5d47bb02 16910
00020c16
ILT
16911 test -n "$CXX" && break
16912 done
16913fi
16914if test -z "$CXX"; then
16915 ac_ct_CXX=$CXX
16916 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
16917do
16918 # Extract the first word of "$ac_prog", so it can be a program name with args.
16919set dummy $ac_prog; ac_word=$2
16920echo "$as_me:$LINENO: checking for $ac_word" >&5
16921echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16922if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
16923 echo $ECHO_N "(cached) $ECHO_C" >&6
5d47bb02 16924else
00020c16
ILT
16925 if test -n "$ac_ct_CXX"; then
16926 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5d47bb02 16927else
00020c16
ILT
16928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16929for as_dir in $PATH
16930do
16931 IFS=$as_save_IFS
16932 test -z "$as_dir" && as_dir=.
16933 for ac_exec_ext in '' $ac_executable_extensions; do
16934 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16935 ac_cv_prog_ac_ct_CXX="$ac_prog"
16936 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16937 break 2
16938 fi
16939done
16940done
5d47bb02 16941
00020c16
ILT
16942fi
16943fi
16944ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
16945if test -n "$ac_ct_CXX"; then
16946 echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
16947echo "${ECHO_T}$ac_ct_CXX" >&6
5d47bb02 16948else
00020c16
ILT
16949 echo "$as_me:$LINENO: result: no" >&5
16950echo "${ECHO_T}no" >&6
16951fi
5d47bb02 16952
00020c16
ILT
16953 test -n "$ac_ct_CXX" && break
16954done
16955test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
5d47bb02 16956
00020c16
ILT
16957 CXX=$ac_ct_CXX
16958fi
5d47bb02
PG
16959
16960
00020c16
ILT
16961# Provide some information about the compiler.
16962echo "$as_me:$LINENO:" \
16963 "checking for C++ compiler version" >&5
16964ac_compiler=`set X $ac_compile; echo $2`
16965{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
16966 (eval $ac_compiler --version </dev/null >&5) 2>&5
16967 ac_status=$?
16968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16969 (exit $ac_status); }
16970{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
16971 (eval $ac_compiler -v </dev/null >&5) 2>&5
16972 ac_status=$?
16973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16974 (exit $ac_status); }
16975{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
16976 (eval $ac_compiler -V </dev/null >&5) 2>&5
16977 ac_status=$?
16978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16979 (exit $ac_status); }
5d47bb02 16980
00020c16
ILT
16981echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
16982echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
16983if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
16984 echo $ECHO_N "(cached) $ECHO_C" >&6
5d47bb02 16985else
00020c16
ILT
16986 cat >conftest.$ac_ext <<_ACEOF
16987/* confdefs.h. */
16988_ACEOF
16989cat confdefs.h >>conftest.$ac_ext
16990cat >>conftest.$ac_ext <<_ACEOF
16991/* end confdefs.h. */
da0f6381 16992
00020c16
ILT
16993int
16994main ()
16995{
16996#ifndef __GNUC__
16997 choke me
16998#endif
da0f6381 16999
00020c16
ILT
17000 ;
17001 return 0;
17002}
17003_ACEOF
17004rm -f conftest.$ac_objext
17005if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17006 (eval $ac_compile) 2>conftest.er1
17007 ac_status=$?
17008 grep -v '^ *+' conftest.er1 >conftest.err
17009 rm -f conftest.er1
17010 cat conftest.err >&5
17011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17012 (exit $ac_status); } &&
17013 { ac_try='test -z "$ac_cxx_werror_flag"
17014 || test ! -s conftest.err'
17015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17016 (eval $ac_try) 2>&5
17017 ac_status=$?
17018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17019 (exit $ac_status); }; } &&
17020 { ac_try='test -s conftest.$ac_objext'
17021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17022 (eval $ac_try) 2>&5
17023 ac_status=$?
17024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17025 (exit $ac_status); }; }; then
17026 ac_compiler_gnu=yes
17027else
17028 echo "$as_me: failed program was:" >&5
17029sed 's/^/| /' conftest.$ac_ext >&5
da0f6381 17030
00020c16 17031ac_compiler_gnu=no
da0f6381 17032fi
00020c16
ILT
17033rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17034ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
17035
17036fi
17037echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
17038echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
17039GXX=`test $ac_compiler_gnu = yes && echo yes`
17040ac_test_CXXFLAGS=${CXXFLAGS+set}
17041ac_save_CXXFLAGS=$CXXFLAGS
17042CXXFLAGS="-g"
17043echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
17044echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
17045if test "${ac_cv_prog_cxx_g+set}" = set; then
da0f6381
PB
17046 echo $ECHO_N "(cached) $ECHO_C" >&6
17047else
00020c16
ILT
17048 cat >conftest.$ac_ext <<_ACEOF
17049/* confdefs.h. */
da0f6381 17050_ACEOF
00020c16
ILT
17051cat confdefs.h >>conftest.$ac_ext
17052cat >>conftest.$ac_ext <<_ACEOF
17053/* end confdefs.h. */
da0f6381 17054
00020c16
ILT
17055int
17056main ()
17057{
da0f6381 17058
00020c16
ILT
17059 ;
17060 return 0;
17061}
17062_ACEOF
17063rm -f conftest.$ac_objext
17064if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17065 (eval $ac_compile) 2>conftest.er1
17066 ac_status=$?
17067 grep -v '^ *+' conftest.er1 >conftest.err
17068 rm -f conftest.er1
17069 cat conftest.err >&5
17070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17071 (exit $ac_status); } &&
17072 { ac_try='test -z "$ac_cxx_werror_flag"
17073 || test ! -s conftest.err'
17074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17075 (eval $ac_try) 2>&5
17076 ac_status=$?
17077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17078 (exit $ac_status); }; } &&
17079 { ac_try='test -s conftest.$ac_objext'
17080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17081 (eval $ac_try) 2>&5
17082 ac_status=$?
17083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17084 (exit $ac_status); }; }; then
17085 ac_cv_prog_cxx_g=yes
17086else
17087 echo "$as_me: failed program was:" >&5
17088sed 's/^/| /' conftest.$ac_ext >&5
da0f6381 17089
00020c16
ILT
17090ac_cv_prog_cxx_g=no
17091fi
17092rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17093fi
17094echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
17095echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
17096if test "$ac_test_CXXFLAGS" = set; then
17097 CXXFLAGS=$ac_save_CXXFLAGS
17098elif test $ac_cv_prog_cxx_g = yes; then
17099 if test "$GXX" = yes; then
17100 CXXFLAGS="-g -O2"
17101 else
17102 CXXFLAGS="-g"
17103 fi
17104else
17105 if test "$GXX" = yes; then
17106 CXXFLAGS="-O2"
17107 else
17108 CXXFLAGS=
17109 fi
17110fi
17111for ac_declaration in \
17112 '' \
17113 'extern "C" void std::exit (int) throw (); using std::exit;' \
17114 'extern "C" void std::exit (int); using std::exit;' \
17115 'extern "C" void exit (int) throw ();' \
17116 'extern "C" void exit (int);' \
17117 'void exit (int);'
17118do
17119 cat >conftest.$ac_ext <<_ACEOF
17120/* confdefs.h. */
17121_ACEOF
17122cat confdefs.h >>conftest.$ac_ext
17123cat >>conftest.$ac_ext <<_ACEOF
17124/* end confdefs.h. */
17125$ac_declaration
17126#include <stdlib.h>
17127int
17128main ()
17129{
17130exit (42);
17131 ;
17132 return 0;
17133}
17134_ACEOF
17135rm -f conftest.$ac_objext
17136if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17137 (eval $ac_compile) 2>conftest.er1
17138 ac_status=$?
17139 grep -v '^ *+' conftest.er1 >conftest.err
17140 rm -f conftest.er1
17141 cat conftest.err >&5
17142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17143 (exit $ac_status); } &&
17144 { ac_try='test -z "$ac_cxx_werror_flag"
17145 || test ! -s conftest.err'
17146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17147 (eval $ac_try) 2>&5
17148 ac_status=$?
17149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17150 (exit $ac_status); }; } &&
17151 { ac_try='test -s conftest.$ac_objext'
17152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17153 (eval $ac_try) 2>&5
17154 ac_status=$?
17155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17156 (exit $ac_status); }; }; then
17157 :
17158else
17159 echo "$as_me: failed program was:" >&5
17160sed 's/^/| /' conftest.$ac_ext >&5
da0f6381 17161
00020c16
ILT
17162continue
17163fi
17164rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17165 cat >conftest.$ac_ext <<_ACEOF
17166/* confdefs.h. */
17167_ACEOF
17168cat confdefs.h >>conftest.$ac_ext
17169cat >>conftest.$ac_ext <<_ACEOF
17170/* end confdefs.h. */
17171$ac_declaration
17172int
17173main ()
17174{
17175exit (42);
17176 ;
17177 return 0;
17178}
17179_ACEOF
17180rm -f conftest.$ac_objext
17181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17182 (eval $ac_compile) 2>conftest.er1
17183 ac_status=$?
17184 grep -v '^ *+' conftest.er1 >conftest.err
17185 rm -f conftest.er1
17186 cat conftest.err >&5
17187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17188 (exit $ac_status); } &&
17189 { ac_try='test -z "$ac_cxx_werror_flag"
17190 || test ! -s conftest.err'
17191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17192 (eval $ac_try) 2>&5
17193 ac_status=$?
17194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17195 (exit $ac_status); }; } &&
17196 { ac_try='test -s conftest.$ac_objext'
17197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17198 (eval $ac_try) 2>&5
17199 ac_status=$?
17200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17201 (exit $ac_status); }; }; then
17202 break
17203else
17204 echo "$as_me: failed program was:" >&5
17205sed 's/^/| /' conftest.$ac_ext >&5
da0f6381 17206
00020c16
ILT
17207fi
17208rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17209done
17210rm -f conftest*
17211if test -n "$ac_declaration"; then
17212 echo '#ifdef __cplusplus' >>confdefs.h
17213 echo $ac_declaration >>confdefs.h
17214 echo '#endif' >>confdefs.h
17215fi
da0f6381 17216
00020c16
ILT
17217ac_ext=c
17218ac_cpp='$CPP $CPPFLAGS'
17219ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17220ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17221ac_compiler_gnu=$ac_cv_c_compiler_gnu
da0f6381 17222
00020c16
ILT
17223if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
17224 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
17225 (test "X$CXX" != "Xg++"))) ; then
17226 ac_ext=cc
17227ac_cpp='$CXXCPP $CPPFLAGS'
17228ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17229ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17230ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17231echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
17232echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
17233if test -z "$CXXCPP"; then
17234 if test "${ac_cv_prog_CXXCPP+set}" = set; then
17235 echo $ECHO_N "(cached) $ECHO_C" >&6
17236else
17237 # Double quotes because CXXCPP needs to be expanded
17238 for CXXCPP in "$CXX -E" "/lib/cpp"
17239 do
17240 ac_preproc_ok=false
17241for ac_cxx_preproc_warn_flag in '' yes
17242do
17243 # Use a header file that comes with gcc, so configuring glibc
17244 # with a fresh cross-compiler works.
17245 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17246 # <limits.h> exists even on freestanding compilers.
17247 # On the NeXT, cc -E runs the code through the compiler's parser,
17248 # not just through cpp. "Syntax error" is here to catch this case.
17249 cat >conftest.$ac_ext <<_ACEOF
17250/* confdefs.h. */
17251_ACEOF
17252cat confdefs.h >>conftest.$ac_ext
17253cat >>conftest.$ac_ext <<_ACEOF
17254/* end confdefs.h. */
17255#ifdef __STDC__
17256# include <limits.h>
17257#else
17258# include <assert.h>
17259#endif
17260 Syntax error
17261_ACEOF
17262if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17263 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17264 ac_status=$?
17265 grep -v '^ *+' conftest.er1 >conftest.err
17266 rm -f conftest.er1
17267 cat conftest.err >&5
17268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17269 (exit $ac_status); } >/dev/null; then
17270 if test -s conftest.err; then
17271 ac_cpp_err=$ac_cxx_preproc_warn_flag
17272 ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
17273 else
17274 ac_cpp_err=
17275 fi
17276else
17277 ac_cpp_err=yes
17278fi
17279if test -z "$ac_cpp_err"; then
17280 :
17281else
17282 echo "$as_me: failed program was:" >&5
17283sed 's/^/| /' conftest.$ac_ext >&5
da0f6381 17284
00020c16
ILT
17285 # Broken: fails on valid input.
17286continue
17287fi
17288rm -f conftest.err conftest.$ac_ext
da0f6381 17289
00020c16
ILT
17290 # OK, works on sane cases. Now check whether non-existent headers
17291 # can be detected and how.
17292 cat >conftest.$ac_ext <<_ACEOF
17293/* confdefs.h. */
17294_ACEOF
17295cat confdefs.h >>conftest.$ac_ext
17296cat >>conftest.$ac_ext <<_ACEOF
17297/* end confdefs.h. */
17298#include <ac_nonexistent.h>
17299_ACEOF
17300if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17301 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17302 ac_status=$?
17303 grep -v '^ *+' conftest.er1 >conftest.err
17304 rm -f conftest.er1
17305 cat conftest.err >&5
17306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17307 (exit $ac_status); } >/dev/null; then
17308 if test -s conftest.err; then
17309 ac_cpp_err=$ac_cxx_preproc_warn_flag
17310 ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
17311 else
17312 ac_cpp_err=
17313 fi
17314else
17315 ac_cpp_err=yes
17316fi
17317if test -z "$ac_cpp_err"; then
17318 # Broken: success on invalid input.
17319continue
17320else
17321 echo "$as_me: failed program was:" >&5
17322sed 's/^/| /' conftest.$ac_ext >&5
da0f6381 17323
00020c16
ILT
17324 # Passes both tests.
17325ac_preproc_ok=:
17326break
17327fi
17328rm -f conftest.err conftest.$ac_ext
da0f6381 17329
00020c16
ILT
17330done
17331# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17332rm -f conftest.err conftest.$ac_ext
17333if $ac_preproc_ok; then
17334 break
17335fi
da0f6381 17336
00020c16
ILT
17337 done
17338 ac_cv_prog_CXXCPP=$CXXCPP
da0f6381 17339
00020c16
ILT
17340fi
17341 CXXCPP=$ac_cv_prog_CXXCPP
17342else
17343 ac_cv_prog_CXXCPP=$CXXCPP
17344fi
17345echo "$as_me:$LINENO: result: $CXXCPP" >&5
17346echo "${ECHO_T}$CXXCPP" >&6
17347ac_preproc_ok=false
17348for ac_cxx_preproc_warn_flag in '' yes
17349do
17350 # Use a header file that comes with gcc, so configuring glibc
17351 # with a fresh cross-compiler works.
17352 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17353 # <limits.h> exists even on freestanding compilers.
17354 # On the NeXT, cc -E runs the code through the compiler's parser,
17355 # not just through cpp. "Syntax error" is here to catch this case.
17356 cat >conftest.$ac_ext <<_ACEOF
17357/* confdefs.h. */
17358_ACEOF
17359cat confdefs.h >>conftest.$ac_ext
17360cat >>conftest.$ac_ext <<_ACEOF
17361/* end confdefs.h. */
17362#ifdef __STDC__
17363# include <limits.h>
17364#else
17365# include <assert.h>
17366#endif
17367 Syntax error
17368_ACEOF
17369if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17370 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17371 ac_status=$?
17372 grep -v '^ *+' conftest.er1 >conftest.err
17373 rm -f conftest.er1
17374 cat conftest.err >&5
17375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17376 (exit $ac_status); } >/dev/null; then
17377 if test -s conftest.err; then
17378 ac_cpp_err=$ac_cxx_preproc_warn_flag
17379 ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
17380 else
17381 ac_cpp_err=
da0f6381 17382 fi
00020c16
ILT
17383else
17384 ac_cpp_err=yes
17385fi
17386if test -z "$ac_cpp_err"; then
17387 :
17388else
17389 echo "$as_me: failed program was:" >&5
17390sed 's/^/| /' conftest.$ac_ext >&5
da0f6381 17391
00020c16
ILT
17392 # Broken: fails on valid input.
17393continue
17394fi
17395rm -f conftest.err conftest.$ac_ext
da0f6381 17396
00020c16
ILT
17397 # OK, works on sane cases. Now check whether non-existent headers
17398 # can be detected and how.
17399 cat >conftest.$ac_ext <<_ACEOF
17400/* confdefs.h. */
17401_ACEOF
17402cat confdefs.h >>conftest.$ac_ext
17403cat >>conftest.$ac_ext <<_ACEOF
17404/* end confdefs.h. */
17405#include <ac_nonexistent.h>
17406_ACEOF
17407if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17408 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17409 ac_status=$?
17410 grep -v '^ *+' conftest.er1 >conftest.err
17411 rm -f conftest.er1
17412 cat conftest.err >&5
17413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17414 (exit $ac_status); } >/dev/null; then
17415 if test -s conftest.err; then
17416 ac_cpp_err=$ac_cxx_preproc_warn_flag
17417 ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
17418 else
17419 ac_cpp_err=
17420 fi
17421else
17422 ac_cpp_err=yes
17423fi
17424if test -z "$ac_cpp_err"; then
17425 # Broken: success on invalid input.
17426continue
17427else
17428 echo "$as_me: failed program was:" >&5
17429sed 's/^/| /' conftest.$ac_ext >&5
da0f6381 17430
00020c16
ILT
17431 # Passes both tests.
17432ac_preproc_ok=:
17433break
17434fi
17435rm -f conftest.err conftest.$ac_ext
da0f6381 17436
00020c16
ILT
17437done
17438# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17439rm -f conftest.err conftest.$ac_ext
17440if $ac_preproc_ok; then
17441 :
17442else
17443 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
17444echo "$as_me: error: in \`$ac_pwd':" >&2;}
17445_lt_caught_CXX_error=yes; }
17446fi
da0f6381 17447
00020c16
ILT
17448ac_ext=c
17449ac_cpp='$CPP $CPPFLAGS'
17450ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17451ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17452ac_compiler_gnu=$ac_cv_c_compiler_gnu
da0f6381 17453
00020c16
ILT
17454else
17455 _lt_caught_CXX_error=yes
17456fi
da0f6381 17457
da0f6381 17458
da0f6381 17459
da0f6381 17460
da0f6381 17461
00020c16 17462# Set options
da0f6381
PB
17463
17464
da0f6381 17465
00020c16 17466 enable_dlopen=no
da0f6381 17467
da0f6381 17468
00020c16
ILT
17469 enable_win32_dll=no
17470
17471
17472 # Check whether --enable-shared or --disable-shared was given.
17473if test "${enable_shared+set}" = set; then
17474 enableval="$enable_shared"
17475 p=${PACKAGE-default}
17476 case $enableval in
17477 yes) enable_shared=yes ;;
17478 no) enable_shared=no ;;
17479 *)
17480 enable_shared=no
17481 # Look at the argument we got. We use all the common list separators.
17482 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
17483 for pkg in $enableval; do
17484 IFS="$lt_save_ifs"
17485 if test "X$pkg" = "X$p"; then
17486 enable_shared=yes
17487 fi
17488 done
17489 IFS="$lt_save_ifs"
17490 ;;
17491 esac
da0f6381 17492else
00020c16
ILT
17493 enable_shared=yes
17494fi;
da0f6381
PB
17495
17496
17497
17498
17499
da0f6381 17500
da0f6381 17501
da0f6381 17502
00020c16
ILT
17503 # Check whether --enable-static or --disable-static was given.
17504if test "${enable_static+set}" = set; then
17505 enableval="$enable_static"
17506 p=${PACKAGE-default}
17507 case $enableval in
17508 yes) enable_static=yes ;;
17509 no) enable_static=no ;;
17510 *)
17511 enable_static=no
17512 # Look at the argument we got. We use all the common list separators.
17513 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
17514 for pkg in $enableval; do
17515 IFS="$lt_save_ifs"
17516 if test "X$pkg" = "X$p"; then
17517 enable_static=yes
17518 fi
17519 done
17520 IFS="$lt_save_ifs"
17521 ;;
17522 esac
da0f6381 17523else
00020c16
ILT
17524 enable_static=yes
17525fi;
da0f6381
PB
17526
17527
da0f6381 17528
da0f6381 17529
da0f6381 17530
da0f6381
PB
17531
17532
da0f6381 17533
da0f6381 17534
00020c16
ILT
17535# Check whether --with-pic or --without-pic was given.
17536if test "${with_pic+set}" = set; then
17537 withval="$with_pic"
17538 pic_mode="$withval"
17539else
17540 pic_mode=default
17541fi;
da0f6381 17542
00020c16 17543test -z "$pic_mode" && pic_mode=default
da0f6381
PB
17544
17545
17546
17547
17548
17549
17550
00020c16
ILT
17551 # Check whether --enable-fast-install or --disable-fast-install was given.
17552if test "${enable_fast_install+set}" = set; then
17553 enableval="$enable_fast_install"
17554 p=${PACKAGE-default}
17555 case $enableval in
17556 yes) enable_fast_install=yes ;;
17557 no) enable_fast_install=no ;;
17558 *)
17559 enable_fast_install=no
17560 # Look at the argument we got. We use all the common list separators.
17561 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
17562 for pkg in $enableval; do
17563 IFS="$lt_save_ifs"
17564 if test "X$pkg" = "X$p"; then
17565 enable_fast_install=yes
17566 fi
17567 done
17568 IFS="$lt_save_ifs"
17569 ;;
17570 esac
17571else
17572 enable_fast_install=yes
17573fi;
da0f6381 17574
da0f6381 17575
da0f6381 17576
da0f6381 17577
da0f6381 17578
da0f6381
PB
17579
17580
da0f6381 17581
da0f6381 17582
da0f6381 17583
00020c16
ILT
17584# This can be used to rebuild libtool when needed
17585LIBTOOL_DEPS="$ltmain"
da0f6381 17586
00020c16
ILT
17587# Always use our own libtool.
17588LIBTOOL='$(SHELL) $(top_builddir)/libtool'
da0f6381 17589
da0f6381 17590
da0f6381
PB
17591
17592
17593
17594
17595
17596
da0f6381 17597
da0f6381 17598
da0f6381 17599
da0f6381 17600
da0f6381 17601
da0f6381 17602
da0f6381 17603
da0f6381 17604
da0f6381 17605
da0f6381 17606
da0f6381 17607
da0f6381 17608
da0f6381 17609
da0f6381 17610
da0f6381 17611
da0f6381 17612
da0f6381 17613
00020c16 17614test -z "$LN_S" && LN_S="ln -s"
da0f6381 17615
da0f6381 17616
da0f6381 17617
da0f6381 17618
da0f6381 17619
da0f6381 17620
da0f6381 17621
da0f6381 17622
da0f6381 17623
da0f6381 17624
da0f6381 17625
da0f6381 17626
da0f6381 17627
da0f6381 17628
00020c16
ILT
17629if test -n "${ZSH_VERSION+set}" ; then
17630 setopt NO_GLOB_SUBST
17631fi
da0f6381 17632
00020c16
ILT
17633echo "$as_me:$LINENO: checking for objdir" >&5
17634echo $ECHO_N "checking for objdir... $ECHO_C" >&6
17635if test "${lt_cv_objdir+set}" = set; then
17636 echo $ECHO_N "(cached) $ECHO_C" >&6
17637else
17638 rm -f .libs 2>/dev/null
17639mkdir .libs 2>/dev/null
17640if test -d .libs; then
17641 lt_cv_objdir=.libs
17642else
17643 # MS-DOS does not allow filenames that begin with a dot.
17644 lt_cv_objdir=_libs
17645fi
17646rmdir .libs 2>/dev/null
17647fi
17648echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
17649echo "${ECHO_T}$lt_cv_objdir" >&6
17650objdir=$lt_cv_objdir
da0f6381
PB
17651
17652
17653
17654
da0f6381 17655
00020c16
ILT
17656cat >>confdefs.h <<_ACEOF
17657#define LT_OBJDIR "$lt_cv_objdir/"
17658_ACEOF
da0f6381 17659
da0f6381 17660
da0f6381
PB
17661
17662
17663
17664
17665
17666
da0f6381 17667
da0f6381
PB
17668
17669
17670
17671
17672
17673
17674
da0f6381 17675
00020c16
ILT
17676case $host_os in
17677aix3*)
17678 # AIX sometimes has problems with the GCC collect2 program. For some
17679 # reason, if we set the COLLECT_NAMES environment variable, the problems
17680 # vanish in a puff of smoke.
17681 if test "X${COLLECT_NAMES+set}" != Xset; then
17682 COLLECT_NAMES=
17683 export COLLECT_NAMES
17684 fi
17685 ;;
17686esac
da0f6381 17687
00020c16
ILT
17688# Sed substitution that helps us do robust quoting. It backslashifies
17689# metacharacters that are still active within double-quoted strings.
17690sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
da0f6381 17691
00020c16
ILT
17692# Same as above, but do not quote variable references.
17693double_quote_subst='s/\(["`\\]\)/\\\1/g'
da0f6381 17694
00020c16
ILT
17695# Sed substitution to delay expansion of an escaped shell variable in a
17696# double_quote_subst'ed string.
17697delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
da0f6381 17698
00020c16
ILT
17699# Sed substitution to delay expansion of an escaped single quote.
17700delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
da0f6381 17701
00020c16
ILT
17702# Sed substitution to avoid accidental globbing in evaled expressions
17703no_glob_subst='s/\*/\\\*/g'
da0f6381 17704
00020c16
ILT
17705# Global variables:
17706ofile=libtool
17707can_build_shared=yes
da0f6381 17708
00020c16
ILT
17709# All known linkers require a `.a' archive for static linking (except MSVC,
17710# which needs '.lib').
17711libext=a
da0f6381 17712
00020c16 17713with_gnu_ld="$lt_cv_prog_gnu_ld"
da0f6381 17714
00020c16
ILT
17715old_CC="$CC"
17716old_CFLAGS="$CFLAGS"
da0f6381 17717
00020c16
ILT
17718# Set sane defaults for various variables
17719test -z "$CC" && CC=cc
17720test -z "$LTCC" && LTCC=$CC
17721test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
17722test -z "$LD" && LD=ld
17723test -z "$ac_objext" && ac_objext=o
da0f6381 17724
00020c16
ILT
17725for cc_temp in $compiler""; do
17726 case $cc_temp in
17727 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
17728 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
17729 \-*) ;;
17730 *) break;;
17731 esac
17732done
17733cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
da0f6381
PB
17734
17735
00020c16
ILT
17736# Only perform the check for file, if the check method requires it
17737test -z "$MAGIC_CMD" && MAGIC_CMD=file
17738case $deplibs_check_method in
17739file_magic*)
17740 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
17741 echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
17742echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
17743if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
17744 echo $ECHO_N "(cached) $ECHO_C" >&6
da0f6381 17745else
00020c16
ILT
17746 case $MAGIC_CMD in
17747[\\/*] | ?:[\\/]*)
17748 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
17749 ;;
17750*)
17751 lt_save_MAGIC_CMD="$MAGIC_CMD"
17752 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
17753 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
17754 for ac_dir in $ac_dummy; do
17755 IFS="$lt_save_ifs"
17756 test -z "$ac_dir" && ac_dir=.
17757 if test -f $ac_dir/${ac_tool_prefix}file; then
17758 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
17759 if test -n "$file_magic_test_file"; then
17760 case $deplibs_check_method in
17761 "file_magic "*)
17762 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
17763 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
17764 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
17765 $EGREP "$file_magic_regex" > /dev/null; then
17766 :
17767 else
17768 cat <<_LT_EOF 1>&2
da0f6381 17769
00020c16
ILT
17770*** Warning: the command libtool uses to detect shared libraries,
17771*** $file_magic_cmd, produces output that libtool cannot recognize.
17772*** The result is that libtool may fail to recognize shared libraries
17773*** as such. This will affect the creation of libtool libraries that
17774*** depend on shared libraries, but programs linked with such libtool
17775*** libraries will work regardless of this problem. Nevertheless, you
17776*** may want to report the problem to your system manager and/or to
17777*** bug-libtool@gnu.org
da0f6381 17778
00020c16
ILT
17779_LT_EOF
17780 fi ;;
17781 esac
17782 fi
17783 break
17784 fi
17785 done
17786 IFS="$lt_save_ifs"
17787 MAGIC_CMD="$lt_save_MAGIC_CMD"
17788 ;;
17789esac
17790fi
da0f6381 17791
00020c16
ILT
17792MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
17793if test -n "$MAGIC_CMD"; then
17794 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
17795echo "${ECHO_T}$MAGIC_CMD" >&6
17796else
17797 echo "$as_me:$LINENO: result: no" >&5
17798echo "${ECHO_T}no" >&6
17799fi
da0f6381
PB
17800
17801
17802
da0f6381 17803
da0f6381 17804
00020c16
ILT
17805if test -z "$lt_cv_path_MAGIC_CMD"; then
17806 if test -n "$ac_tool_prefix"; then
17807 echo "$as_me:$LINENO: checking for file" >&5
17808echo $ECHO_N "checking for file... $ECHO_C" >&6
17809if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
17810 echo $ECHO_N "(cached) $ECHO_C" >&6
17811else
17812 case $MAGIC_CMD in
17813[\\/*] | ?:[\\/]*)
17814 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
17815 ;;
17816*)
17817 lt_save_MAGIC_CMD="$MAGIC_CMD"
17818 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
17819 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
17820 for ac_dir in $ac_dummy; do
17821 IFS="$lt_save_ifs"
17822 test -z "$ac_dir" && ac_dir=.
17823 if test -f $ac_dir/file; then
17824 lt_cv_path_MAGIC_CMD="$ac_dir/file"
17825 if test -n "$file_magic_test_file"; then
17826 case $deplibs_check_method in
17827 "file_magic "*)
17828 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
17829 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
17830 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
17831 $EGREP "$file_magic_regex" > /dev/null; then
17832 :
17833 else
17834 cat <<_LT_EOF 1>&2
da0f6381 17835
00020c16
ILT
17836*** Warning: the command libtool uses to detect shared libraries,
17837*** $file_magic_cmd, produces output that libtool cannot recognize.
17838*** The result is that libtool may fail to recognize shared libraries
17839*** as such. This will affect the creation of libtool libraries that
17840*** depend on shared libraries, but programs linked with such libtool
17841*** libraries will work regardless of this problem. Nevertheless, you
17842*** may want to report the problem to your system manager and/or to
17843*** bug-libtool@gnu.org
da0f6381 17844
00020c16
ILT
17845_LT_EOF
17846 fi ;;
17847 esac
17848 fi
17849 break
da0f6381 17850 fi
00020c16
ILT
17851 done
17852 IFS="$lt_save_ifs"
17853 MAGIC_CMD="$lt_save_MAGIC_CMD"
17854 ;;
17855esac
17856fi
da0f6381 17857
00020c16
ILT
17858MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
17859if test -n "$MAGIC_CMD"; then
17860 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
17861echo "${ECHO_T}$MAGIC_CMD" >&6
17862else
17863 echo "$as_me:$LINENO: result: no" >&5
17864echo "${ECHO_T}no" >&6
17865fi
da0f6381 17866
da0f6381 17867
00020c16
ILT
17868 else
17869 MAGIC_CMD=:
17870 fi
17871fi
da0f6381 17872
00020c16
ILT
17873 fi
17874 ;;
17875esac
da0f6381 17876
00020c16 17877# Use C for the default configuration in the libtool script
da0f6381 17878
00020c16
ILT
17879lt_save_CC="$CC"
17880ac_ext=c
17881ac_cpp='$CPP $CPPFLAGS'
17882ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17883ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17884ac_compiler_gnu=$ac_cv_c_compiler_gnu
da0f6381 17885
da0f6381 17886
00020c16
ILT
17887# Source file extension for C test sources.
17888ac_ext=c
da0f6381 17889
00020c16
ILT
17890# Object file extension for compiled C test sources.
17891objext=o
17892objext=$objext
da0f6381 17893
00020c16
ILT
17894# Code to be used in simple compile tests
17895lt_simple_compile_test_code="int some_variable = 0;"
5d47bb02 17896
00020c16
ILT
17897# Code to be used in simple link tests
17898lt_simple_link_test_code='int main(){return(0);}'
da0f6381 17899
da0f6381 17900
da0f6381 17901
da0f6381 17902
00020c16
ILT
17903
17904
17905
17906# If no C compiler was specified, use CC.
17907LTCC=${LTCC-"$CC"}
17908
17909# If no C compiler flags were specified, use CFLAGS.
17910LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
17911
17912# Allow CC to be a program name with arguments.
17913compiler=$CC
17914
17915# Save the default compiler, since it gets overwritten when the other
17916# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
17917compiler_DEFAULT=$CC
17918
17919# save warnings/boilerplate of simple test code
17920ac_outfile=conftest.$ac_objext
17921echo "$lt_simple_compile_test_code" >conftest.$ac_ext
17922eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
17923_lt_compiler_boilerplate=`cat conftest.err`
17924$RM conftest*
17925
17926ac_outfile=conftest.$ac_objext
17927echo "$lt_simple_link_test_code" >conftest.$ac_ext
17928eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
17929_lt_linker_boilerplate=`cat conftest.err`
17930$RM -r conftest*
17931
17932
17933## CAVEAT EMPTOR:
17934## There is no encapsulation within the following macros, do not change
17935## the running order or otherwise move them around unless you know exactly
17936## what you are doing...
17937if test -n "$compiler"; then
17938
17939lt_prog_compiler_no_builtin_flag=
17940
17941if test "$GCC" = yes; then
17942 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
17943
17944 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
17945echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
17946if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
17947 echo $ECHO_N "(cached) $ECHO_C" >&6
17948else
17949 lt_cv_prog_compiler_rtti_exceptions=no
17950 ac_outfile=conftest.$ac_objext
17951 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
17952 lt_compiler_flag="-fno-rtti -fno-exceptions"
17953 # Insert the option either (1) after the last *FLAGS variable, or
17954 # (2) before a word containing "conftest.", or (3) at the end.
17955 # Note that $ac_compile itself does not contain backslashes and begins
17956 # with a dollar sign (not a hyphen), so the echo should work correctly.
17957 # The option is referenced via a variable to avoid confusing sed.
17958 lt_compile=`echo "$ac_compile" | $SED \
17959 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17960 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17961 -e 's:$: $lt_compiler_flag:'`
17962 (eval echo "\"\$as_me:17962: $lt_compile\"" >&5)
17963 (eval "$lt_compile" 2>conftest.err)
17964 ac_status=$?
17965 cat conftest.err >&5
17966 echo "$as_me:17966: \$? = $ac_status" >&5
17967 if (exit $ac_status) && test -s "$ac_outfile"; then
17968 # The compiler can only warn and ignore the option if not recognized
17969 # So say no if there are warnings other than the usual output.
17970 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
17971 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
17972 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
17973 lt_cv_prog_compiler_rtti_exceptions=yes
17974 fi
17975 fi
17976 $RM conftest*
17977
17978fi
17979echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
17980echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
17981
17982if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
17983 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
17984else
17985 :
17986fi
17987
17988fi
17989
17990
17991
17992
17993
17994
17995 lt_prog_compiler_wl=
17996lt_prog_compiler_pic=
17997lt_prog_compiler_static=
17998
17999echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
18000echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
18001
18002 if test "$GCC" = yes; then
18003 lt_prog_compiler_wl='-Wl,'
18004 lt_prog_compiler_static='-static'
18005
18006 case $host_os in
18007 aix*)
18008 # All AIX code is PIC.
18009 if test "$host_cpu" = ia64; then
18010 # AIX 5 now supports IA64 processor
18011 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
18012 fi
18013 ;;
18014
00020c16
ILT
18015 amigaos*)
18016 case $host_cpu in
18017 powerpc)
18018 # see comment about AmigaOS4 .so support
18019 lt_prog_compiler_pic='-fPIC'
18020 ;;
18021 m68k)
18022 # FIXME: we need at least 68020 code to build shared libraries, but
18023 # adding the `-m68020' flag to GCC prevents building anything better,
18024 # like `-m68040'.
18025 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
18026 ;;
18027 esac
18028 ;;
da0f6381 18029
00020c16
ILT
18030 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
18031 # PIC is the default for these OSes.
18032 ;;
da0f6381 18033
00020c16
ILT
18034 mingw* | cygwin* | pw32* | os2* | cegcc*)
18035 # This hack is so that the source file can tell whether it is being
18036 # built for inclusion in a dll (and should export symbols for example).
18037 # Although the cygwin gcc ignores -fPIC, still need this for old-style
18038 # (--disable-auto-import) libraries
18039 lt_prog_compiler_pic='-DDLL_EXPORT'
18040 ;;
18041
18042 darwin* | rhapsody*)
18043 # PIC is the default on this platform
18044 # Common symbols not allowed in MH_DYLIB files
18045 lt_prog_compiler_pic='-fno-common'
18046 ;;
18047
18048 hpux*)
18049 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
18050 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
18051 # sets the default TLS model and affects inlining.
18052 case $host_cpu in
18053 hppa*64*)
18054 # +Z the default
da0f6381 18055 ;;
00020c16
ILT
18056 *)
18057 lt_prog_compiler_pic='-fPIC'
da0f6381
PB
18058 ;;
18059 esac
18060 ;;
18061
00020c16
ILT
18062 interix[3-9]*)
18063 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
18064 # Instead, we relocate shared libraries at runtime.
da0f6381
PB
18065 ;;
18066
00020c16
ILT
18067 msdosdjgpp*)
18068 # Just because we use GCC doesn't mean we suddenly get shared libraries
18069 # on systems that don't support them.
18070 lt_prog_compiler_can_build_shared=no
18071 enable_shared=no
da0f6381 18072 ;;
da0f6381 18073
00020c16
ILT
18074 *nto* | *qnx*)
18075 # QNX uses GNU C++, but need to define -shared option too, otherwise
18076 # it will coredump.
18077 lt_prog_compiler_pic='-fPIC -shared'
18078 ;;
18079
18080 sysv4*MP*)
18081 if test -d /usr/nec; then
18082 lt_prog_compiler_pic=-Kconform_pic
da0f6381
PB
18083 fi
18084 ;;
18085
00020c16
ILT
18086 *)
18087 lt_prog_compiler_pic='-fPIC'
18088 ;;
18089 esac
18090 else
18091 # PORTME Check for flag to pass linker flags through the system compiler.
18092 case $host_os in
18093 aix*)
18094 lt_prog_compiler_wl='-Wl,'
da0f6381 18095 if test "$host_cpu" = ia64; then
00020c16
ILT
18096 # AIX 5 now supports IA64 processor
18097 lt_prog_compiler_static='-Bstatic'
da0f6381 18098 else
00020c16 18099 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
da0f6381 18100 fi
00020c16 18101 ;;
da0f6381 18102
00020c16
ILT
18103 mingw* | cygwin* | pw32* | os2* | cegcc*)
18104 # This hack is so that the source file can tell whether it is being
18105 # built for inclusion in a dll (and should export symbols for example).
18106 lt_prog_compiler_pic='-DDLL_EXPORT'
18107 ;;
da0f6381 18108
00020c16
ILT
18109 hpux9* | hpux10* | hpux11*)
18110 lt_prog_compiler_wl='-Wl,'
18111 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
18112 # not for PA HP-UX.
18113 case $host_cpu in
18114 hppa*64*|ia64*)
18115 # +Z the default
18116 ;;
18117 *)
18118 lt_prog_compiler_pic='+Z'
18119 ;;
18120 esac
18121 # Is there a better lt_prog_compiler_static that works with the bundled CC?
18122 lt_prog_compiler_static='${wl}-a ${wl}archive'
18123 ;;
da0f6381 18124
00020c16
ILT
18125 irix5* | irix6* | nonstopux*)
18126 lt_prog_compiler_wl='-Wl,'
18127 # PIC (with -KPIC) is the default.
18128 lt_prog_compiler_static='-non_shared'
18129 ;;
18130
18131 linux* | k*bsd*-gnu | kopensolaris*-gnu)
18132 case $cc_basename in
18133 # old Intel for x86_64 which still supported -KPIC.
18134 ecc*)
18135 lt_prog_compiler_wl='-Wl,'
18136 lt_prog_compiler_pic='-KPIC'
18137 lt_prog_compiler_static='-static'
18138 ;;
18139 # icc used to be incompatible with GCC.
18140 # ICC 10 doesn't accept -KPIC any more.
18141 icc* | ifort*)
18142 lt_prog_compiler_wl='-Wl,'
18143 lt_prog_compiler_pic='-fPIC'
18144 lt_prog_compiler_static='-static'
18145 ;;
18146 # Lahey Fortran 8.1.
18147 lf95*)
18148 lt_prog_compiler_wl='-Wl,'
18149 lt_prog_compiler_pic='--shared'
18150 lt_prog_compiler_static='--static'
18151 ;;
18152 pgcc* | pgf77* | pgf90* | pgf95*)
18153 # Portland Group compilers (*not* the Pentium gcc compiler,
18154 # which looks to be a dead project)
18155 lt_prog_compiler_wl='-Wl,'
18156 lt_prog_compiler_pic='-fpic'
18157 lt_prog_compiler_static='-Bstatic'
18158 ;;
18159 ccc*)
18160 lt_prog_compiler_wl='-Wl,'
18161 # All Alpha code is PIC.
18162 lt_prog_compiler_static='-non_shared'
18163 ;;
18164 xl*)
18165 # IBM XL C 8.0/Fortran 10.1 on PPC
18166 lt_prog_compiler_wl='-Wl,'
18167 lt_prog_compiler_pic='-qpic'
18168 lt_prog_compiler_static='-qstaticlink'
18169 ;;
18170 *)
18171 case `$CC -V 2>&1 | sed 5q` in
18172 *Sun\ C*)
18173 # Sun C 5.9
18174 lt_prog_compiler_pic='-KPIC'
18175 lt_prog_compiler_static='-Bstatic'
18176 lt_prog_compiler_wl='-Wl,'
18177 ;;
18178 *Sun\ F*)
18179 # Sun Fortran 8.3 passes all unrecognized flags to the linker
18180 lt_prog_compiler_pic='-KPIC'
18181 lt_prog_compiler_static='-Bstatic'
18182 lt_prog_compiler_wl=''
da0f6381
PB
18183 ;;
18184 esac
00020c16
ILT
18185 ;;
18186 esac
18187 ;;
da0f6381 18188
00020c16
ILT
18189 newsos6)
18190 lt_prog_compiler_pic='-KPIC'
18191 lt_prog_compiler_static='-Bstatic'
18192 ;;
da0f6381 18193
00020c16
ILT
18194 *nto* | *qnx*)
18195 # QNX uses GNU C++, but need to define -shared option too, otherwise
18196 # it will coredump.
18197 lt_prog_compiler_pic='-fPIC -shared'
18198 ;;
da0f6381 18199
00020c16
ILT
18200 osf3* | osf4* | osf5*)
18201 lt_prog_compiler_wl='-Wl,'
18202 # All OSF/1 code is PIC.
18203 lt_prog_compiler_static='-non_shared'
18204 ;;
da0f6381 18205
00020c16
ILT
18206 rdos*)
18207 lt_prog_compiler_static='-non_shared'
da0f6381
PB
18208 ;;
18209
00020c16
ILT
18210 solaris*)
18211 lt_prog_compiler_pic='-KPIC'
18212 lt_prog_compiler_static='-Bstatic'
18213 case $cc_basename in
18214 f77* | f90* | f95*)
18215 lt_prog_compiler_wl='-Qoption ld ';;
18216 *)
18217 lt_prog_compiler_wl='-Wl,';;
5d47bb02 18218 esac
da0f6381
PB
18219 ;;
18220
00020c16
ILT
18221 sunos4*)
18222 lt_prog_compiler_wl='-Qoption ld '
18223 lt_prog_compiler_pic='-PIC'
18224 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
18225 ;;
18226
00020c16
ILT
18227 sysv4 | sysv4.2uw2* | sysv4.3*)
18228 lt_prog_compiler_wl='-Wl,'
18229 lt_prog_compiler_pic='-KPIC'
18230 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
18231 ;;
18232
00020c16
ILT
18233 sysv4*MP*)
18234 if test -d /usr/nec ;then
18235 lt_prog_compiler_pic='-Kconform_pic'
18236 lt_prog_compiler_static='-Bstatic'
18237 fi
da0f6381
PB
18238 ;;
18239
00020c16
ILT
18240 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
18241 lt_prog_compiler_wl='-Wl,'
18242 lt_prog_compiler_pic='-KPIC'
18243 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
18244 ;;
18245
00020c16
ILT
18246 unicos*)
18247 lt_prog_compiler_wl='-Wl,'
18248 lt_prog_compiler_can_build_shared=no
da0f6381
PB
18249 ;;
18250
00020c16
ILT
18251 uts4*)
18252 lt_prog_compiler_pic='-pic'
18253 lt_prog_compiler_static='-Bstatic'
da0f6381
PB
18254 ;;
18255
00020c16
ILT
18256 *)
18257 lt_prog_compiler_can_build_shared=no
da0f6381 18258 ;;
00020c16
ILT
18259 esac
18260 fi
da0f6381 18261
00020c16
ILT
18262case $host_os in
18263 # For platforms which do not support PIC, -DPIC is meaningless:
18264 *djgpp*)
18265 lt_prog_compiler_pic=
18266 ;;
18267 *)
18268 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
18269 ;;
18270esac
18271echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
18272echo "${ECHO_T}$lt_prog_compiler_pic" >&6
da0f6381 18273
da0f6381 18274
da0f6381 18275
da0f6381 18276
da0f6381 18277
da0f6381 18278
00020c16
ILT
18279#
18280# Check to make sure the PIC flag actually works.
18281#
18282if test -n "$lt_prog_compiler_pic"; then
18283 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
18284echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
18285if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
18286 echo $ECHO_N "(cached) $ECHO_C" >&6
18287else
18288 lt_cv_prog_compiler_pic_works=no
18289 ac_outfile=conftest.$ac_objext
18290 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
18291 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
18292 # Insert the option either (1) after the last *FLAGS variable, or
18293 # (2) before a word containing "conftest.", or (3) at the end.
18294 # Note that $ac_compile itself does not contain backslashes and begins
18295 # with a dollar sign (not a hyphen), so the echo should work correctly.
18296 # The option is referenced via a variable to avoid confusing sed.
18297 lt_compile=`echo "$ac_compile" | $SED \
18298 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
18299 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
18300 -e 's:$: $lt_compiler_flag:'`
18301 (eval echo "\"\$as_me:18301: $lt_compile\"" >&5)
18302 (eval "$lt_compile" 2>conftest.err)
18303 ac_status=$?
18304 cat conftest.err >&5
18305 echo "$as_me:18305: \$? = $ac_status" >&5
18306 if (exit $ac_status) && test -s "$ac_outfile"; then
18307 # The compiler can only warn and ignore the option if not recognized
18308 # So say no if there are warnings other than the usual output.
18309 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
18310 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
18311 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
18312 lt_cv_prog_compiler_pic_works=yes
18313 fi
18314 fi
18315 $RM conftest*
da0f6381 18316
00020c16
ILT
18317fi
18318echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
18319echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6
da0f6381 18320
00020c16
ILT
18321if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
18322 case $lt_prog_compiler_pic in
18323 "" | " "*) ;;
18324 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
18325 esac
da0f6381 18326else
00020c16
ILT
18327 lt_prog_compiler_pic=
18328 lt_prog_compiler_can_build_shared=no
da0f6381 18329fi
da0f6381 18330
00020c16 18331fi
da0f6381 18332
da0f6381 18333
da0f6381 18334
da0f6381 18335
da0f6381 18336
da0f6381 18337
00020c16
ILT
18338#
18339# Check to make sure the static flag actually works.
18340#
18341wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
18342echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
18343echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
18344if test "${lt_cv_prog_compiler_static_works+set}" = set; then
18345 echo $ECHO_N "(cached) $ECHO_C" >&6
18346else
18347 lt_cv_prog_compiler_static_works=no
18348 save_LDFLAGS="$LDFLAGS"
18349 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
18350 echo "$lt_simple_link_test_code" > conftest.$ac_ext
18351 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
18352 # The linker can only warn and ignore the option if not recognized
18353 # So say no if there are warnings
18354 if test -s conftest.err; then
18355 # Append any errors to the config.log.
18356 cat conftest.err 1>&5
18357 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
18358 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
18359 if diff conftest.exp conftest.er2 >/dev/null; then
18360 lt_cv_prog_compiler_static_works=yes
18361 fi
18362 else
18363 lt_cv_prog_compiler_static_works=yes
18364 fi
18365 fi
18366 $RM -r conftest*
18367 LDFLAGS="$save_LDFLAGS"
da0f6381 18368
00020c16
ILT
18369fi
18370echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
18371echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6
da0f6381 18372
00020c16
ILT
18373if test x"$lt_cv_prog_compiler_static_works" = xyes; then
18374 :
18375else
18376 lt_prog_compiler_static=
18377fi
da0f6381 18378
da0f6381 18379
da0f6381 18380
da0f6381 18381
da0f6381 18382
da0f6381 18383
da0f6381 18384
00020c16
ILT
18385 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
18386echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
18387if test "${lt_cv_prog_compiler_c_o+set}" = set; then
18388 echo $ECHO_N "(cached) $ECHO_C" >&6
18389else
18390 lt_cv_prog_compiler_c_o=no
18391 $RM -r conftest 2>/dev/null
18392 mkdir conftest
18393 cd conftest
18394 mkdir out
18395 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 18396
00020c16
ILT
18397 lt_compiler_flag="-o out/conftest2.$ac_objext"
18398 # Insert the option either (1) after the last *FLAGS variable, or
18399 # (2) before a word containing "conftest.", or (3) at the end.
18400 # Note that $ac_compile itself does not contain backslashes and begins
18401 # with a dollar sign (not a hyphen), so the echo should work correctly.
18402 lt_compile=`echo "$ac_compile" | $SED \
18403 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
18404 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
18405 -e 's:$: $lt_compiler_flag:'`
18406 (eval echo "\"\$as_me:18406: $lt_compile\"" >&5)
18407 (eval "$lt_compile" 2>out/conftest.err)
18408 ac_status=$?
18409 cat out/conftest.err >&5
18410 echo "$as_me:18410: \$? = $ac_status" >&5
18411 if (exit $ac_status) && test -s out/conftest2.$ac_objext
18412 then
18413 # The compiler can only warn and ignore the option if not recognized
18414 # So say no if there are warnings
18415 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
18416 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
18417 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
18418 lt_cv_prog_compiler_c_o=yes
18419 fi
18420 fi
18421 chmod u+w . 2>&5
18422 $RM conftest*
18423 # SGI C++ compiler will create directory out/ii_files/ for
18424 # template instantiation
18425 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
18426 $RM out/* && rmdir out
18427 cd ..
18428 $RM -r conftest
18429 $RM conftest*
da0f6381 18430
00020c16
ILT
18431fi
18432echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
18433echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
da0f6381
PB
18434
18435
18436
18437
18438
18439
00020c16
ILT
18440 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
18441echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
18442if test "${lt_cv_prog_compiler_c_o+set}" = set; then
18443 echo $ECHO_N "(cached) $ECHO_C" >&6
18444else
18445 lt_cv_prog_compiler_c_o=no
18446 $RM -r conftest 2>/dev/null
18447 mkdir conftest
18448 cd conftest
18449 mkdir out
18450 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 18451
00020c16
ILT
18452 lt_compiler_flag="-o out/conftest2.$ac_objext"
18453 # Insert the option either (1) after the last *FLAGS variable, or
18454 # (2) before a word containing "conftest.", or (3) at the end.
18455 # Note that $ac_compile itself does not contain backslashes and begins
18456 # with a dollar sign (not a hyphen), so the echo should work correctly.
18457 lt_compile=`echo "$ac_compile" | $SED \
18458 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
18459 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
18460 -e 's:$: $lt_compiler_flag:'`
18461 (eval echo "\"\$as_me:18461: $lt_compile\"" >&5)
18462 (eval "$lt_compile" 2>out/conftest.err)
18463 ac_status=$?
18464 cat out/conftest.err >&5
18465 echo "$as_me:18465: \$? = $ac_status" >&5
18466 if (exit $ac_status) && test -s out/conftest2.$ac_objext
18467 then
18468 # The compiler can only warn and ignore the option if not recognized
18469 # So say no if there are warnings
18470 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
18471 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
18472 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
18473 lt_cv_prog_compiler_c_o=yes
18474 fi
18475 fi
18476 chmod u+w . 2>&5
18477 $RM conftest*
18478 # SGI C++ compiler will create directory out/ii_files/ for
18479 # template instantiation
18480 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
18481 $RM out/* && rmdir out
18482 cd ..
18483 $RM -r conftest
18484 $RM conftest*
da0f6381 18485
00020c16
ILT
18486fi
18487echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
18488echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
da0f6381
PB
18489
18490
18491
18492
00020c16
ILT
18493hard_links="nottested"
18494if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
18495 # do not overwrite the value of need_locks provided by the user
18496 echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
18497echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
18498 hard_links=yes
baafc534 18499 $RM conftest*
00020c16
ILT
18500 ln conftest.a conftest.b 2>/dev/null && hard_links=no
18501 touch conftest.a
18502 ln conftest.a conftest.b 2>&5 || hard_links=no
18503 ln conftest.a conftest.b 2>/dev/null && hard_links=no
18504 echo "$as_me:$LINENO: result: $hard_links" >&5
18505echo "${ECHO_T}$hard_links" >&6
18506 if test "$hard_links" = no; then
18507 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
18508echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
18509 need_locks=warn
da0f6381 18510 fi
00020c16
ILT
18511else
18512 need_locks=no
18513fi
da0f6381
PB
18514
18515
18516
18517
18518
18519
00020c16
ILT
18520 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
18521echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
da0f6381 18522
00020c16
ILT
18523 runpath_var=
18524 allow_undefined_flag=
18525 always_export_symbols=no
18526 archive_cmds=
18527 archive_expsym_cmds=
18528 compiler_needs_object=no
18529 enable_shared_with_static_runtimes=no
18530 export_dynamic_flag_spec=
18531 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
18532 hardcode_automatic=no
18533 hardcode_direct=no
18534 hardcode_direct_absolute=no
18535 hardcode_libdir_flag_spec=
18536 hardcode_libdir_flag_spec_ld=
18537 hardcode_libdir_separator=
18538 hardcode_minus_L=no
18539 hardcode_shlibpath_var=unsupported
18540 inherit_rpath=no
18541 link_all_deplibs=unknown
18542 module_cmds=
18543 module_expsym_cmds=
18544 old_archive_from_new_cmds=
18545 old_archive_from_expsyms_cmds=
18546 thread_safe_flag_spec=
18547 whole_archive_flag_spec=
18548 # include_expsyms should be a list of space-separated symbols to be *always*
18549 # included in the symbol list
18550 include_expsyms=
18551 # exclude_expsyms can be an extended regexp of symbols to exclude
18552 # it will be wrapped by ` (' and `)$', so one must not match beginning or
18553 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
18554 # as well as any symbol that contains `d'.
18555 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
18556 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
18557 # platforms (ab)use it in PIC code, but their linkers get confused if
18558 # the symbol is explicitly referenced. Since portable code cannot
18559 # rely on this symbol name, it's probably fine to never include it in
18560 # preloaded symbol tables.
18561 # Exclude shared library initialization/finalization symbols.
18562 extract_expsyms_cmds=
da0f6381 18563
00020c16
ILT
18564 case $host_os in
18565 cygwin* | mingw* | pw32* | cegcc*)
18566 # FIXME: the MSVC++ port hasn't been tested in a loooong time
18567 # When not using gcc, we currently assume that we are using
18568 # Microsoft Visual C++.
18569 if test "$GCC" != yes; then
18570 with_gnu_ld=no
18571 fi
18572 ;;
18573 interix*)
18574 # we just hope/assume this is gcc and not c89 (= MSVC++)
18575 with_gnu_ld=yes
18576 ;;
18577 openbsd*)
18578 with_gnu_ld=no
18579 ;;
18580 esac
da0f6381 18581
00020c16
ILT
18582 ld_shlibs=yes
18583 if test "$with_gnu_ld" = yes; then
18584 # If archive_cmds runs LD, not CC, wlarc should be empty
18585 wlarc='${wl}'
da0f6381 18586
00020c16
ILT
18587 # Set some defaults for GNU ld with shared library support. These
18588 # are reset later if shared libraries are not supported. Putting them
18589 # here allows them to be overridden if necessary.
18590 runpath_var=LD_RUN_PATH
18591 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
18592 export_dynamic_flag_spec='${wl}--export-dynamic'
18593 # ancient GNU ld didn't support --whole-archive et. al.
18594 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
18595 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
18596 else
18597 whole_archive_flag_spec=
18598 fi
18599 supports_anon_versioning=no
18600 case `$LD -v 2>&1` in
18601 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
18602 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
18603 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
18604 *\ 2.11.*) ;; # other 2.11 versions
18605 *) supports_anon_versioning=yes ;;
18606 esac
da0f6381 18607
00020c16
ILT
18608 # See if GNU ld supports shared libraries.
18609 case $host_os in
18610 aix[3-9]*)
18611 # On AIX/PPC, the GNU linker is very broken
18612 if test "$host_cpu" != ia64; then
18613 ld_shlibs=no
18614 cat <<_LT_EOF 1>&2
da0f6381 18615
00020c16
ILT
18616*** Warning: the GNU linker, at least up to release 2.9.1, is reported
18617*** to be unable to reliably create shared libraries on AIX.
18618*** Therefore, libtool is disabling shared libraries support. If you
18619*** really care for shared libraries, you may want to modify your PATH
18620*** so that a non-GNU linker is found, and then restart.
da0f6381 18621
00020c16
ILT
18622_LT_EOF
18623 fi
18624 ;;
da0f6381 18625
00020c16
ILT
18626 amigaos*)
18627 case $host_cpu in
18628 powerpc)
18629 # see comment about AmigaOS4 .so support
18630 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18631 archive_expsym_cmds=''
18632 ;;
18633 m68k)
18634 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)'
18635 hardcode_libdir_flag_spec='-L$libdir'
18636 hardcode_minus_L=yes
18637 ;;
18638 esac
18639 ;;
da0f6381 18640
00020c16
ILT
18641 beos*)
18642 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
18643 allow_undefined_flag=unsupported
18644 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
18645 # support --undefined. This deserves some investigation. FIXME
18646 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18647 else
18648 ld_shlibs=no
18649 fi
18650 ;;
da0f6381 18651
00020c16
ILT
18652 cygwin* | mingw* | pw32* | cegcc*)
18653 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
18654 # as there is no search path for DLLs.
18655 hardcode_libdir_flag_spec='-L$libdir'
18656 allow_undefined_flag=unsupported
18657 always_export_symbols=no
18658 enable_shared_with_static_runtimes=yes
18659 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
da0f6381 18660
00020c16
ILT
18661 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
18662 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
18663 # If the export-symbols file already is a .def file (1st line
18664 # is EXPORTS), use it as is; otherwise, prepend...
18665 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
18666 cp $export_symbols $output_objdir/$soname.def;
18667 else
18668 echo EXPORTS > $output_objdir/$soname.def;
18669 cat $export_symbols >> $output_objdir/$soname.def;
18670 fi~
18671 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
18672 else
18673 ld_shlibs=no
18674 fi
18675 ;;
da0f6381 18676
00020c16
ILT
18677 interix[3-9]*)
18678 hardcode_direct=no
18679 hardcode_shlibpath_var=no
18680 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
18681 export_dynamic_flag_spec='${wl}-E'
18682 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
18683 # Instead, shared libraries are loaded at an image base (0x10000000 by
18684 # default) and relocated if they conflict, which is a slow very memory
18685 # consuming and fragmenting process. To avoid this, we pick a random,
18686 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
18687 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
18688 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
18689 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'
18690 ;;
da0f6381 18691
00020c16
ILT
18692 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
18693 tmp_diet=no
18694 if test "$host_os" = linux-dietlibc; then
18695 case $cc_basename in
18696 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
18697 esac
18698 fi
18699 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
18700 && test "$tmp_diet" = no
18701 then
18702 tmp_addflag=
18703 tmp_sharedflag='-shared'
18704 case $cc_basename,$host_cpu in
18705 pgcc*) # Portland Group C compiler
18706 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'
18707 tmp_addflag=' $pic_flag'
18708 ;;
18709 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
18710 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'
18711 tmp_addflag=' $pic_flag -Mnomain' ;;
18712 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
18713 tmp_addflag=' -i_dynamic' ;;
18714 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
18715 tmp_addflag=' -i_dynamic -nofor_main' ;;
18716 ifc* | ifort*) # Intel Fortran compiler
18717 tmp_addflag=' -nofor_main' ;;
18718 lf95*) # Lahey Fortran 8.1
18719 whole_archive_flag_spec=
18720 tmp_sharedflag='--shared' ;;
18721 xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
18722 tmp_sharedflag='-qmkshrobj'
18723 tmp_addflag= ;;
18724 esac
18725 case `$CC -V 2>&1 | sed 5q` in
18726 *Sun\ C*) # Sun C 5.9
18727 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'
18728 compiler_needs_object=yes
18729 tmp_sharedflag='-G' ;;
18730 *Sun\ F*) # Sun Fortran 8.3
18731 tmp_sharedflag='-G' ;;
18732 esac
18733 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
da0f6381 18734
00020c16
ILT
18735 if test "x$supports_anon_versioning" = xyes; then
18736 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
18737 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
18738 echo "local: *; };" >> $output_objdir/$libname.ver~
18739 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
18740 fi
da0f6381 18741
00020c16
ILT
18742 case $cc_basename in
18743 xlf*)
18744 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
18745 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
18746 hardcode_libdir_flag_spec=
18747 hardcode_libdir_flag_spec_ld='-rpath $libdir'
18748 archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
18749 if test "x$supports_anon_versioning" = xyes; then
18750 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
18751 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
18752 echo "local: *; };" >> $output_objdir/$libname.ver~
18753 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
18754 fi
18755 ;;
18756 esac
18757 else
18758 ld_shlibs=no
18759 fi
18760 ;;
da0f6381 18761
00020c16
ILT
18762 netbsd*)
18763 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
18764 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
18765 wlarc=
18766 else
18767 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18768 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
18769 fi
18770 ;;
da0f6381 18771
00020c16
ILT
18772 solaris*)
18773 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
18774 ld_shlibs=no
18775 cat <<_LT_EOF 1>&2
da0f6381 18776
00020c16
ILT
18777*** Warning: The releases 2.8.* of the GNU linker cannot reliably
18778*** create shared libraries on Solaris systems. Therefore, libtool
18779*** is disabling shared libraries support. We urge you to upgrade GNU
18780*** binutils to release 2.9.1 or newer. Another option is to modify
18781*** your PATH or compiler configuration so that the native linker is
18782*** used, and then restart.
da0f6381 18783
00020c16
ILT
18784_LT_EOF
18785 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
18786 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18787 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
18788 else
18789 ld_shlibs=no
18790 fi
18791 ;;
da0f6381 18792
00020c16
ILT
18793 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
18794 case `$LD -v 2>&1` in
18795 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
18796 ld_shlibs=no
18797 cat <<_LT_EOF 1>&2
da0f6381 18798
00020c16
ILT
18799*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
18800*** reliably create shared libraries on SCO systems. Therefore, libtool
18801*** is disabling shared libraries support. We urge you to upgrade GNU
18802*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
18803*** your PATH or compiler configuration so that the native linker is
18804*** used, and then restart.
da0f6381 18805
00020c16
ILT
18806_LT_EOF
18807 ;;
18808 *)
18809 # For security reasons, it is highly recommended that you always
18810 # use absolute paths for naming shared libraries, and exclude the
18811 # DT_RUNPATH tag from executables and libraries. But doing so
18812 # requires that you compile everything twice, which is a pain.
18813 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
18814 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
18815 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18816 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
18817 else
18818 ld_shlibs=no
18819 fi
18820 ;;
18821 esac
18822 ;;
da0f6381 18823
00020c16
ILT
18824 sunos4*)
18825 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
18826 wlarc=
18827 hardcode_direct=yes
18828 hardcode_shlibpath_var=no
18829 ;;
da0f6381 18830
00020c16
ILT
18831 *)
18832 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
18833 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
18834 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
18835 else
18836 ld_shlibs=no
18837 fi
18838 ;;
18839 esac
da0f6381 18840
00020c16
ILT
18841 if test "$ld_shlibs" = no; then
18842 runpath_var=
18843 hardcode_libdir_flag_spec=
18844 export_dynamic_flag_spec=
18845 whole_archive_flag_spec=
18846 fi
18847 else
18848 # PORTME fill in a description of your system's linker (not GNU ld)
18849 case $host_os in
18850 aix3*)
18851 allow_undefined_flag=unsupported
18852 always_export_symbols=yes
18853 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'
18854 # Note: this linker hardcodes the directories in LIBPATH if there
18855 # are no directories specified by -L.
18856 hardcode_minus_L=yes
18857 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
18858 # Neither direct hardcoding nor static linking is supported with a
18859 # broken collect2.
18860 hardcode_direct=unsupported
18861 fi
18862 ;;
da0f6381 18863
00020c16
ILT
18864 aix[4-9]*)
18865 if test "$host_cpu" = ia64; then
18866 # On IA64, the linker does run time linking by default, so we don't
18867 # have to do anything special.
18868 aix_use_runtimelinking=no
18869 exp_sym_flag='-Bexport'
18870 no_entry_flag=""
18871 else
18872 # If we're using GNU nm, then we don't want the "-C" option.
18873 # -C means demangle to AIX nm, but means don't demangle with GNU nm
18874 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
18875 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'
18876 else
18877 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'
18878 fi
18879 aix_use_runtimelinking=no
da0f6381 18880
00020c16
ILT
18881 # Test if we are trying to use run time linking or normal
18882 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
18883 # need to do runtime linking.
18884 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
18885 for ld_flag in $LDFLAGS; do
18886 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
18887 aix_use_runtimelinking=yes
18888 break
18889 fi
18890 done
18891 ;;
18892 esac
da0f6381 18893
00020c16
ILT
18894 exp_sym_flag='-bexport'
18895 no_entry_flag='-bnoentry'
18896 fi
da0f6381 18897
00020c16
ILT
18898 # When large executables or shared objects are built, AIX ld can
18899 # have problems creating the table of contents. If linking a library
18900 # or program results in "error TOC overflow" add -mminimal-toc to
18901 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
18902 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
da0f6381 18903
00020c16
ILT
18904 archive_cmds=''
18905 hardcode_direct=yes
18906 hardcode_direct_absolute=yes
18907 hardcode_libdir_separator=':'
18908 link_all_deplibs=yes
18909 file_list_spec='${wl}-f,'
da0f6381 18910
00020c16
ILT
18911 if test "$GCC" = yes; then
18912 case $host_os in aix4.[012]|aix4.[012].*)
18913 # We only want to do this on AIX 4.2 and lower, the check
18914 # below for broken collect2 doesn't work under 4.3+
18915 collect2name=`${CC} -print-prog-name=collect2`
18916 if test -f "$collect2name" &&
18917 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
18918 then
18919 # We have reworked collect2
18920 :
18921 else
18922 # We have old collect2
18923 hardcode_direct=unsupported
18924 # It fails to find uninstalled libraries when the uninstalled
18925 # path is not listed in the libpath. Setting hardcode_minus_L
18926 # to unsupported forces relinking
18927 hardcode_minus_L=yes
18928 hardcode_libdir_flag_spec='-L$libdir'
18929 hardcode_libdir_separator=
18930 fi
18931 ;;
18932 esac
18933 shared_flag='-shared'
18934 if test "$aix_use_runtimelinking" = yes; then
18935 shared_flag="$shared_flag "'${wl}-G'
18936 fi
18937 else
18938 # not using gcc
18939 if test "$host_cpu" = ia64; then
18940 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
18941 # chokes on -Wl,-G. The following line is correct:
18942 shared_flag='-G'
18943 else
18944 if test "$aix_use_runtimelinking" = yes; then
18945 shared_flag='${wl}-G'
18946 else
18947 shared_flag='${wl}-bM:SRE'
18948 fi
18949 fi
18950 fi
da0f6381 18951
00020c16
ILT
18952 export_dynamic_flag_spec='${wl}-bexpall'
18953 # It seems that -bexpall does not export symbols beginning with
18954 # underscore (_), so it is better to generate a list of symbols to export.
18955 always_export_symbols=yes
18956 if test "$aix_use_runtimelinking" = yes; then
18957 # Warning - without using the other runtime loading flags (-brtl),
18958 # -berok will link without error, but may produce a broken library.
18959 allow_undefined_flag='-berok'
18960 # Determine the default libpath from the value encoded in an
18961 # empty executable.
18962 cat >conftest.$ac_ext <<_ACEOF
18963/* confdefs.h. */
18964_ACEOF
18965cat confdefs.h >>conftest.$ac_ext
18966cat >>conftest.$ac_ext <<_ACEOF
18967/* end confdefs.h. */
da0f6381 18968
00020c16
ILT
18969int
18970main ()
18971{
da0f6381 18972
00020c16
ILT
18973 ;
18974 return 0;
18975}
18976_ACEOF
18977rm -f conftest.$ac_objext conftest$ac_exeext
18978if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18979 (eval $ac_link) 2>conftest.er1
18980 ac_status=$?
18981 grep -v '^ *+' conftest.er1 >conftest.err
18982 rm -f conftest.er1
18983 cat conftest.err >&5
18984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18985 (exit $ac_status); } &&
18986 { ac_try='test -z "$ac_c_werror_flag"
18987 || test ! -s conftest.err'
18988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18989 (eval $ac_try) 2>&5
18990 ac_status=$?
18991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18992 (exit $ac_status); }; } &&
18993 { ac_try='test -s conftest$ac_exeext'
18994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18995 (eval $ac_try) 2>&5
18996 ac_status=$?
18997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18998 (exit $ac_status); }; }; then
da0f6381 18999
00020c16
ILT
19000lt_aix_libpath_sed='
19001 /Import File Strings/,/^$/ {
19002 /^0/ {
19003 s/^0 *\(.*\)$/\1/
19004 p
19005 }
19006 }'
19007aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
19008# Check for a 64-bit object if we didn't find anything.
19009if test -z "$aix_libpath"; then
19010 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
19011fi
19012else
19013 echo "$as_me: failed program was:" >&5
19014sed 's/^/| /' conftest.$ac_ext >&5
da0f6381 19015
00020c16
ILT
19016fi
19017rm -f conftest.err conftest.$ac_objext \
19018 conftest$ac_exeext conftest.$ac_ext
19019if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
da0f6381 19020
00020c16
ILT
19021 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
19022 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"
19023 else
19024 if test "$host_cpu" = ia64; then
19025 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
19026 allow_undefined_flag="-z nodefs"
19027 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"
19028 else
19029 # Determine the default libpath from the value encoded in an
19030 # empty executable.
19031 cat >conftest.$ac_ext <<_ACEOF
19032/* confdefs.h. */
19033_ACEOF
19034cat confdefs.h >>conftest.$ac_ext
19035cat >>conftest.$ac_ext <<_ACEOF
19036/* end confdefs.h. */
da0f6381 19037
00020c16
ILT
19038int
19039main ()
19040{
da0f6381 19041
00020c16
ILT
19042 ;
19043 return 0;
19044}
19045_ACEOF
19046rm -f conftest.$ac_objext conftest$ac_exeext
19047if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19048 (eval $ac_link) 2>conftest.er1
19049 ac_status=$?
19050 grep -v '^ *+' conftest.er1 >conftest.err
19051 rm -f conftest.er1
19052 cat conftest.err >&5
19053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19054 (exit $ac_status); } &&
19055 { ac_try='test -z "$ac_c_werror_flag"
19056 || test ! -s conftest.err'
19057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19058 (eval $ac_try) 2>&5
19059 ac_status=$?
19060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19061 (exit $ac_status); }; } &&
19062 { ac_try='test -s conftest$ac_exeext'
19063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19064 (eval $ac_try) 2>&5
19065 ac_status=$?
19066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19067 (exit $ac_status); }; }; then
da0f6381 19068
00020c16
ILT
19069lt_aix_libpath_sed='
19070 /Import File Strings/,/^$/ {
19071 /^0/ {
19072 s/^0 *\(.*\)$/\1/
19073 p
19074 }
19075 }'
19076aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
19077# Check for a 64-bit object if we didn't find anything.
19078if test -z "$aix_libpath"; then
19079 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
19080fi
19081else
19082 echo "$as_me: failed program was:" >&5
19083sed 's/^/| /' conftest.$ac_ext >&5
da0f6381 19084
00020c16
ILT
19085fi
19086rm -f conftest.err conftest.$ac_objext \
19087 conftest$ac_exeext conftest.$ac_ext
19088if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
da0f6381 19089
00020c16
ILT
19090 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
19091 # Warning - without using the other run time loading flags,
19092 # -berok will link without error, but may produce a broken library.
19093 no_undefined_flag=' ${wl}-bernotok'
19094 allow_undefined_flag=' ${wl}-berok'
19095 # Exported symbols can be pulled into shared objects from archives
19096 whole_archive_flag_spec='$convenience'
19097 archive_cmds_need_lc=yes
19098 # This is similar to how AIX traditionally builds its shared libraries.
19099 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'
19100 fi
19101 fi
19102 ;;
da0f6381 19103
00020c16
ILT
19104 amigaos*)
19105 case $host_cpu in
19106 powerpc)
19107 # see comment about AmigaOS4 .so support
19108 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
19109 archive_expsym_cmds=''
19110 ;;
19111 m68k)
19112 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)'
19113 hardcode_libdir_flag_spec='-L$libdir'
19114 hardcode_minus_L=yes
19115 ;;
19116 esac
19117 ;;
da0f6381 19118
00020c16
ILT
19119 bsdi[45]*)
19120 export_dynamic_flag_spec=-rdynamic
19121 ;;
da0f6381 19122
00020c16
ILT
19123 cygwin* | mingw* | pw32* | cegcc*)
19124 # When not using gcc, we currently assume that we are using
19125 # Microsoft Visual C++.
19126 # hardcode_libdir_flag_spec is actually meaningless, as there is
19127 # no search path for DLLs.
19128 hardcode_libdir_flag_spec=' '
19129 allow_undefined_flag=unsupported
19130 # Tell ltmain to make .lib files, not .a files.
19131 libext=lib
19132 # Tell ltmain to make .dll files, not .so files.
19133 shrext_cmds=".dll"
19134 # FIXME: Setting linknames here is a bad hack.
19135 archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
19136 # The linker will automatically build a .lib file if we build a DLL.
19137 old_archive_from_new_cmds='true'
19138 # FIXME: Should let the user specify the lib program.
19139 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
19140 fix_srcfile_path='`cygpath -w "$srcfile"`'
19141 enable_shared_with_static_runtimes=yes
19142 ;;
da0f6381 19143
00020c16 19144 darwin* | rhapsody*)
da0f6381
PB
19145
19146
00020c16
ILT
19147 archive_cmds_need_lc=no
19148 hardcode_direct=no
19149 hardcode_automatic=yes
19150 hardcode_shlibpath_var=unsupported
19151 whole_archive_flag_spec=''
19152 link_all_deplibs=yes
19153 allow_undefined_flag="$_lt_dar_allow_undefined"
19154 case $cc_basename in
19155 ifort*) _lt_dar_can_shared=yes ;;
19156 *) _lt_dar_can_shared=$GCC ;;
19157 esac
19158 if test "$_lt_dar_can_shared" = "yes"; then
19159 output_verbose_link_cmd=echo
19160 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
19161 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
19162 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 ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
19163 module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
da0f6381 19164
00020c16
ILT
19165 else
19166 ld_shlibs=no
19167 fi
da0f6381 19168
00020c16 19169 ;;
da0f6381 19170
00020c16
ILT
19171 dgux*)
19172 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
19173 hardcode_libdir_flag_spec='-L$libdir'
19174 hardcode_shlibpath_var=no
19175 ;;
da0f6381 19176
00020c16
ILT
19177 freebsd1*)
19178 ld_shlibs=no
19179 ;;
da0f6381 19180
00020c16
ILT
19181 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
19182 # support. Future versions do this automatically, but an explicit c++rt0.o
19183 # does not break anything, and helps significantly (at the cost of a little
19184 # extra space).
19185 freebsd2.2*)
19186 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
19187 hardcode_libdir_flag_spec='-R$libdir'
19188 hardcode_direct=yes
19189 hardcode_shlibpath_var=no
19190 ;;
da0f6381 19191
00020c16
ILT
19192 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
19193 freebsd2*)
19194 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
19195 hardcode_direct=yes
19196 hardcode_minus_L=yes
19197 hardcode_shlibpath_var=no
19198 ;;
da0f6381 19199
00020c16
ILT
19200 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
19201 freebsd* | dragonfly*)
19202 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
19203 hardcode_libdir_flag_spec='-R$libdir'
19204 hardcode_direct=yes
19205 hardcode_shlibpath_var=no
19206 ;;
da0f6381 19207
00020c16
ILT
19208 hpux9*)
19209 if test "$GCC" = yes; then
19210 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'
19211 else
19212 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'
19213 fi
19214 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
19215 hardcode_libdir_separator=:
19216 hardcode_direct=yes
da0f6381 19217
00020c16
ILT
19218 # hardcode_minus_L: Not really in the search PATH,
19219 # but as the default location of the library.
19220 hardcode_minus_L=yes
19221 export_dynamic_flag_spec='${wl}-E'
19222 ;;
da0f6381 19223
00020c16
ILT
19224 hpux10*)
19225 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
19226 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
19227 else
19228 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
19229 fi
19230 if test "$with_gnu_ld" = no; then
19231 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
19232 hardcode_libdir_flag_spec_ld='+b $libdir'
19233 hardcode_libdir_separator=:
19234 hardcode_direct=yes
19235 hardcode_direct_absolute=yes
19236 export_dynamic_flag_spec='${wl}-E'
19237 # hardcode_minus_L: Not really in the search PATH,
19238 # but as the default location of the library.
19239 hardcode_minus_L=yes
19240 fi
19241 ;;
da0f6381 19242
00020c16
ILT
19243 hpux11*)
19244 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
19245 case $host_cpu in
19246 hppa*64*)
19247 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
19248 ;;
19249 ia64*)
19250 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
19251 ;;
19252 *)
19253 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
19254 ;;
19255 esac
19256 else
19257 case $host_cpu in
19258 hppa*64*)
19259 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
19260 ;;
19261 ia64*)
19262 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
19263 ;;
19264 *)
19265 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
19266 ;;
19267 esac
19268 fi
19269 if test "$with_gnu_ld" = no; then
19270 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
19271 hardcode_libdir_separator=:
da0f6381 19272
00020c16
ILT
19273 case $host_cpu in
19274 hppa*64*|ia64*)
19275 hardcode_direct=no
19276 hardcode_shlibpath_var=no
19277 ;;
19278 *)
19279 hardcode_direct=yes
19280 hardcode_direct_absolute=yes
19281 export_dynamic_flag_spec='${wl}-E'
da0f6381 19282
00020c16
ILT
19283 # hardcode_minus_L: Not really in the search PATH,
19284 # but as the default location of the library.
19285 hardcode_minus_L=yes
19286 ;;
19287 esac
19288 fi
19289 ;;
da0f6381 19290
00020c16
ILT
19291 irix5* | irix6* | nonstopux*)
19292 if test "$GCC" = yes; then
19293 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'
19294 # Try to use the -exported_symbol ld option, if it does not
19295 # work, assume that -exports_file does not work either and
19296 # implicitly export all symbols.
19297 save_LDFLAGS="$LDFLAGS"
19298 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
19299 cat >conftest.$ac_ext <<_ACEOF
19300int foo(void) {}
19301_ACEOF
19302rm -f conftest.$ac_objext conftest$ac_exeext
19303if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19304 (eval $ac_link) 2>conftest.er1
19305 ac_status=$?
19306 grep -v '^ *+' conftest.er1 >conftest.err
19307 rm -f conftest.er1
19308 cat conftest.err >&5
19309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19310 (exit $ac_status); } &&
19311 { ac_try='test -z "$ac_c_werror_flag"
19312 || test ! -s conftest.err'
19313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19314 (eval $ac_try) 2>&5
19315 ac_status=$?
19316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19317 (exit $ac_status); }; } &&
19318 { ac_try='test -s conftest$ac_exeext'
19319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19320 (eval $ac_try) 2>&5
19321 ac_status=$?
19322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19323 (exit $ac_status); }; }; then
19324 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'
da0f6381 19325
00020c16
ILT
19326else
19327 echo "$as_me: failed program was:" >&5
19328sed 's/^/| /' conftest.$ac_ext >&5
da0f6381 19329
00020c16
ILT
19330fi
19331rm -f conftest.err conftest.$ac_objext \
19332 conftest$ac_exeext conftest.$ac_ext
19333 LDFLAGS="$save_LDFLAGS"
19334 else
19335 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'
19336 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'
19337 fi
19338 archive_cmds_need_lc='no'
19339 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
19340 hardcode_libdir_separator=:
19341 inherit_rpath=yes
19342 link_all_deplibs=yes
19343 ;;
da0f6381 19344
00020c16
ILT
19345 netbsd*)
19346 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
19347 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
19348 else
19349 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
19350 fi
19351 hardcode_libdir_flag_spec='-R$libdir'
19352 hardcode_direct=yes
19353 hardcode_shlibpath_var=no
19354 ;;
da0f6381 19355
00020c16
ILT
19356 newsos6)
19357 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
19358 hardcode_direct=yes
19359 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
19360 hardcode_libdir_separator=:
19361 hardcode_shlibpath_var=no
19362 ;;
da0f6381 19363
00020c16
ILT
19364 *nto* | *qnx*)
19365 ;;
da0f6381 19366
00020c16
ILT
19367 openbsd*)
19368 if test -f /usr/libexec/ld.so; then
19369 hardcode_direct=yes
19370 hardcode_shlibpath_var=no
19371 hardcode_direct_absolute=yes
19372 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
19373 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
19374 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
19375 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
19376 export_dynamic_flag_spec='${wl}-E'
19377 else
19378 case $host_os in
19379 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
19380 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
19381 hardcode_libdir_flag_spec='-R$libdir'
19382 ;;
19383 *)
19384 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
19385 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
19386 ;;
19387 esac
19388 fi
19389 else
19390 ld_shlibs=no
19391 fi
19392 ;;
da0f6381 19393
00020c16
ILT
19394 os2*)
19395 hardcode_libdir_flag_spec='-L$libdir'
19396 hardcode_minus_L=yes
19397 allow_undefined_flag=unsupported
19398 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'
19399 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
19400 ;;
da0f6381 19401
00020c16
ILT
19402 osf3*)
19403 if test "$GCC" = yes; then
19404 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
19405 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'
19406 else
19407 allow_undefined_flag=' -expect_unresolved \*'
19408 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'
19409 fi
19410 archive_cmds_need_lc='no'
19411 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
19412 hardcode_libdir_separator=:
19413 ;;
da0f6381 19414
00020c16
ILT
19415 osf4* | osf5*) # as osf3* with the addition of -msym flag
19416 if test "$GCC" = yes; then
19417 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
19418 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'
19419 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
19420 else
19421 allow_undefined_flag=' -expect_unresolved \*'
19422 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'
19423 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~
19424 $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'
da0f6381 19425
00020c16
ILT
19426 # Both c and cxx compiler support -rpath directly
19427 hardcode_libdir_flag_spec='-rpath $libdir'
19428 fi
19429 archive_cmds_need_lc='no'
19430 hardcode_libdir_separator=:
19431 ;;
da0f6381 19432
00020c16
ILT
19433 solaris*)
19434 no_undefined_flag=' -z defs'
19435 if test "$GCC" = yes; then
19436 wlarc='${wl}'
19437 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
19438 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
19439 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
19440 else
19441 case `$CC -V 2>&1` in
19442 *"Compilers 5.0"*)
19443 wlarc=''
19444 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
19445 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
19446 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
19447 ;;
19448 *)
19449 wlarc='${wl}'
19450 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
19451 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
19452 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
19453 ;;
19454 esac
19455 fi
19456 hardcode_libdir_flag_spec='-R$libdir'
19457 hardcode_shlibpath_var=no
19458 case $host_os in
19459 solaris2.[0-5] | solaris2.[0-5].*) ;;
19460 *)
19461 # The compiler driver will combine and reorder linker options,
19462 # but understands `-z linker_flag'. GCC discards it without `$wl',
19463 # but is careful enough not to reorder.
19464 # Supported since Solaris 2.6 (maybe 2.5.1?)
19465 if test "$GCC" = yes; then
19466 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
19467 else
19468 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
19469 fi
19470 ;;
19471 esac
19472 link_all_deplibs=yes
19473 ;;
da0f6381 19474
00020c16
ILT
19475 sunos4*)
19476 if test "x$host_vendor" = xsequent; then
19477 # Use $CC to link under sequent, because it throws in some extra .o
19478 # files that make .init and .fini sections work.
19479 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
19480 else
19481 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
19482 fi
19483 hardcode_libdir_flag_spec='-L$libdir'
19484 hardcode_direct=yes
19485 hardcode_minus_L=yes
19486 hardcode_shlibpath_var=no
19487 ;;
da0f6381 19488
00020c16
ILT
19489 sysv4)
19490 case $host_vendor in
19491 sni)
19492 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
19493 hardcode_direct=yes # is this really true???
19494 ;;
19495 siemens)
19496 ## LD is ld it makes a PLAMLIB
19497 ## CC just makes a GrossModule.
19498 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
19499 reload_cmds='$CC -r -o $output$reload_objs'
19500 hardcode_direct=no
19501 ;;
19502 motorola)
19503 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
19504 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
19505 ;;
19506 esac
19507 runpath_var='LD_RUN_PATH'
19508 hardcode_shlibpath_var=no
19509 ;;
da0f6381 19510
00020c16
ILT
19511 sysv4.3*)
19512 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
19513 hardcode_shlibpath_var=no
19514 export_dynamic_flag_spec='-Bexport'
19515 ;;
da0f6381 19516
00020c16
ILT
19517 sysv4*MP*)
19518 if test -d /usr/nec; then
19519 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
19520 hardcode_shlibpath_var=no
19521 runpath_var=LD_RUN_PATH
19522 hardcode_runpath_var=yes
19523 ld_shlibs=yes
19524 fi
19525 ;;
da0f6381 19526
00020c16
ILT
19527 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
19528 no_undefined_flag='${wl}-z,text'
19529 archive_cmds_need_lc=no
19530 hardcode_shlibpath_var=no
19531 runpath_var='LD_RUN_PATH'
da0f6381 19532
00020c16
ILT
19533 if test "$GCC" = yes; then
19534 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
19535 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
19536 else
19537 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
19538 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
19539 fi
19540 ;;
da0f6381 19541
00020c16
ILT
19542 sysv5* | sco3.2v5* | sco5v6*)
19543 # Note: We can NOT use -z defs as we might desire, because we do not
19544 # link with -lc, and that would cause any symbols used from libc to
19545 # always be unresolved, which means just about no library would
19546 # ever link correctly. If we're not using GNU ld we use -z text
19547 # though, which does catch some bad symbols but isn't as heavy-handed
19548 # as -z defs.
19549 no_undefined_flag='${wl}-z,text'
19550 allow_undefined_flag='${wl}-z,nodefs'
19551 archive_cmds_need_lc=no
19552 hardcode_shlibpath_var=no
19553 hardcode_libdir_flag_spec='${wl}-R,$libdir'
19554 hardcode_libdir_separator=':'
19555 link_all_deplibs=yes
19556 export_dynamic_flag_spec='${wl}-Bexport'
19557 runpath_var='LD_RUN_PATH'
da0f6381 19558
00020c16
ILT
19559 if test "$GCC" = yes; then
19560 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
19561 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
19562 else
19563 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
19564 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
19565 fi
19566 ;;
da0f6381 19567
00020c16
ILT
19568 uts4*)
19569 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
19570 hardcode_libdir_flag_spec='-L$libdir'
19571 hardcode_shlibpath_var=no
19572 ;;
da0f6381 19573
00020c16
ILT
19574 *)
19575 ld_shlibs=no
19576 ;;
19577 esac
da0f6381 19578
00020c16
ILT
19579 if test x$host_vendor = xsni; then
19580 case $host in
19581 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
19582 export_dynamic_flag_spec='${wl}-Blargedynsym'
19583 ;;
19584 esac
19585 fi
19586 fi
da0f6381 19587
00020c16
ILT
19588echo "$as_me:$LINENO: result: $ld_shlibs" >&5
19589echo "${ECHO_T}$ld_shlibs" >&6
19590test "$ld_shlibs" = no && can_build_shared=no
da0f6381 19591
00020c16 19592with_gnu_ld=$with_gnu_ld
da0f6381
PB
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
00020c16
ILT
19608#
19609# Do we need to explicitly link libc?
19610#
19611case "x$archive_cmds_need_lc" in
19612x|xyes)
19613 # Assume -lc should be added
19614 archive_cmds_need_lc=yes
da0f6381 19615
00020c16
ILT
19616 if test "$enable_shared" = yes && test "$GCC" = yes; then
19617 case $archive_cmds in
19618 *'~'*)
19619 # FIXME: we may have to deal with multi-command sequences.
19620 ;;
19621 '$CC '*)
19622 # Test whether the compiler implicitly links with -lc since on some
19623 # systems, -lgcc has to come before -lc. If gcc already passes -lc
19624 # to ld, don't add -lc before -lgcc.
19625 echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
19626echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
19627if test "${lt_cv_archive_cmds_need_lc+set}" = set; then
19628 echo $ECHO_N "(cached) $ECHO_C" >&6
19629else
19630 $RM conftest*
19631 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 19632
00020c16
ILT
19633 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19634 (eval $ac_compile) 2>&5
19635 ac_status=$?
19636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19637 (exit $ac_status); } 2>conftest.err; then
19638 soname=conftest
19639 lib=conftest
19640 libobjs=conftest.$ac_objext
19641 deplibs=
19642 wl=$lt_prog_compiler_wl
19643 pic_flag=$lt_prog_compiler_pic
19644 compiler_flags=-v
19645 linker_flags=-v
19646 verstring=
19647 output_objdir=.
19648 libname=conftest
19649 lt_save_allow_undefined_flag=$allow_undefined_flag
19650 allow_undefined_flag=
19651 if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
19652 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
19653 ac_status=$?
19654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19655 (exit $ac_status); }
19656 then
19657 lt_cv_archive_cmds_need_lc=no
19658 else
19659 lt_cv_archive_cmds_need_lc=yes
19660 fi
19661 allow_undefined_flag=$lt_save_allow_undefined_flag
19662 else
19663 cat conftest.err 1>&5
19664 fi
19665 $RM conftest*
da0f6381 19666
00020c16
ILT
19667fi
19668echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5
19669echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
19670 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
19671 ;;
19672 esac
19673 fi
19674 ;;
19675esac
da0f6381
PB
19676
19677
19678
19679
5d47bb02 19680
da0f6381 19681
da0f6381 19682
da0f6381 19683
da0f6381 19684
00020c16
ILT
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
19834echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
19835
19836if test "$GCC" = yes; then
19837 case $host_os in
19838 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
19839 *) lt_awk_arg="/^libraries:/" ;;
19840 esac
19841 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
19842 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
19843 # if the path contains ";" then we assume it to be the separator
19844 # otherwise default to the standard path separator (i.e. ":") - it is
19845 # assumed that no part of a normal pathname contains ";" but that should
19846 # okay in the real world where ";" in dirpaths is itself problematic.
19847 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
19848 else
19849 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
19850 fi
19851 # Ok, now we have the path, separated by spaces, we can step through it
19852 # and add multilib dir if necessary.
19853 lt_tmp_lt_search_path_spec=
19854 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
19855 for lt_sys_path in $lt_search_path_spec; do
19856 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
19857 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
19858 else
19859 test -d "$lt_sys_path" && \
19860 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
19861 fi
19862 done
19863 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
19864BEGIN {RS=" "; FS="/|\n";} {
19865 lt_foo="";
19866 lt_count=0;
19867 for (lt_i = NF; lt_i > 0; lt_i--) {
19868 if ($lt_i != "" && $lt_i != ".") {
19869 if ($lt_i == "..") {
19870 lt_count++;
19871 } else {
19872 if (lt_count == 0) {
19873 lt_foo="/" $lt_i lt_foo;
19874 } else {
19875 lt_count--;
19876 }
19877 }
19878 }
19879 }
19880 if (lt_foo != "") { lt_freq[lt_foo]++; }
19881 if (lt_freq[lt_foo] == 1) { print lt_foo; }
19882}'`
19883 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
19884else
19885 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
19886fi
19887library_names_spec=
19888libname_spec='lib$name'
19889soname_spec=
19890shrext_cmds=".so"
19891postinstall_cmds=
19892postuninstall_cmds=
19893finish_cmds=
19894finish_eval=
19895shlibpath_var=
19896shlibpath_overrides_runpath=unknown
19897version_type=none
19898dynamic_linker="$host_os ld.so"
19899sys_lib_dlsearch_path_spec="/lib /usr/lib"
19900need_lib_prefix=unknown
19901hardcode_into_libs=no
19902
19903# when you set need_version to no, make sure it does not cause -set_version
19904# flags to be left without arguments
19905need_version=unknown
19906
19907case $host_os in
19908aix3*)
19909 version_type=linux
19910 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
19911 shlibpath_var=LIBPATH
19912
19913 # AIX 3 has no versioning support, so we append a major version to the name.
19914 soname_spec='${libname}${release}${shared_ext}$major'
19915 ;;
19916
19917aix[4-9]*)
19918 version_type=linux
19919 need_lib_prefix=no
19920 need_version=no
19921 hardcode_into_libs=yes
19922 if test "$host_cpu" = ia64; then
19923 # AIX 5 supports IA64
19924 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
19925 shlibpath_var=LD_LIBRARY_PATH
19926 else
19927 # With GCC up to 2.95.x, collect2 would create an import file
19928 # for dependence libraries. The import file would start with
19929 # the line `#! .'. This would cause the generated library to
19930 # depend on `.', always an invalid library. This was fixed in
19931 # development snapshots of GCC prior to 3.0.
19932 case $host_os in
19933 aix4 | aix4.[01] | aix4.[01].*)
19934 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
19935 echo ' yes '
da0f6381
PB
19936 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
19937 :
19938 else
19939 can_build_shared=no
19940 fi
19941 ;;
19942 esac
19943 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
19944 # soname into executable. Probably we can add versioning support to
19945 # collect2, so additional links can be useful in future.
19946 if test "$aix_use_runtimelinking" = yes; then
19947 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
19948 # instead of lib<name>.a to let people know that these are not
19949 # typical AIX shared libraries.
19950 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19951 else
19952 # We preserve .a as extension for shared libraries through AIX4.2
19953 # and later when we are not doing run time linking.
19954 library_names_spec='${libname}${release}.a $libname.a'
19955 soname_spec='${libname}${release}${shared_ext}$major'
19956 fi
19957 shlibpath_var=LIBPATH
19958 fi
19959 ;;
19960
19961amigaos*)
5d47bb02
PG
19962 case $host_cpu in
19963 powerpc)
19964 # Since July 2007 AmigaOS4 officially supports .so libraries.
19965 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
19966 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19967 ;;
19968 m68k)
da0f6381
PB
19969 library_names_spec='$libname.ixlibrary $libname.a'
19970 # Create ${libname}_ixlibrary.a entries in /sys/libs.
19971 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'
5d47bb02
PG
19972 ;;
19973 esac
da0f6381
PB
19974 ;;
19975
19976beos*)
19977 library_names_spec='${libname}${shared_ext}'
19978 dynamic_linker="$host_os ld.so"
19979 shlibpath_var=LIBRARY_PATH
19980 ;;
19981
19982bsdi[45]*)
19983 version_type=linux
19984 need_version=no
19985 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19986 soname_spec='${libname}${release}${shared_ext}$major'
19987 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
19988 shlibpath_var=LD_LIBRARY_PATH
19989 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
19990 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
19991 # the default ld.so.conf also contains /usr/contrib/lib and
19992 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
19993 # libtool to hard-code these into programs
19994 ;;
19995
5d47bb02 19996cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
19997 version_type=windows
19998 shrext_cmds=".dll"
19999 need_version=no
20000 need_lib_prefix=no
20001
5d47bb02
PG
20002 case $GCC,$host_os in
20003 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
da0f6381
PB
20004 library_names_spec='$libname.dll.a'
20005 # DLL is installed to $(libdir)/../bin by postinstall_cmds
20006 postinstall_cmds='base_file=`basename \${file}`~
20007 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
20008 dldir=$destdir/`dirname \$dlpath`~
20009 test -d \$dldir || mkdir -p \$dldir~
20010 $install_prog $dir/$dlname \$dldir/$dlname~
20011 chmod a+x \$dldir/$dlname~
20012 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
20013 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
20014 fi'
20015 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
20016 dlpath=$dir/\$dldll~
20017 $RM \$dlpath'
20018 shlibpath_overrides_runpath=yes
20019
20020 case $host_os in
20021 cygwin*)
20022 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
20023 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
20024 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
20025 ;;
5d47bb02 20026 mingw* | cegcc*)
da0f6381
PB
20027 # MinGW DLLs use traditional 'lib' prefix
20028 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
20029 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
20030 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
20031 # It is most probably a Windows format PATH printed by
20032 # mingw gcc, but we are running on Cygwin. Gcc prints its search
20033 # path with ; separators, and with drive letters. We can handle the
20034 # drive letters (cygwin fileutils understands them), so leave them,
20035 # especially as we might pass files found there to a mingw objdump,
20036 # which wouldn't understand a cygwinified path. Ahh.
20037 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
20038 else
20039 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
20040 fi
20041 ;;
20042 pw32*)
20043 # pw32 DLLs use 'pw' prefix rather than 'lib'
20044 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
20045 ;;
20046 esac
20047 ;;
20048
20049 *)
20050 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
20051 ;;
20052 esac
20053 dynamic_linker='Win32 ld.exe'
20054 # FIXME: first we should search . and the directory the executable is in
20055 shlibpath_var=PATH
20056 ;;
20057
20058darwin* | rhapsody*)
20059 dynamic_linker="$host_os dyld"
20060 version_type=darwin
20061 need_lib_prefix=no
20062 need_version=no
20063 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
20064 soname_spec='${libname}${release}${major}$shared_ext'
20065 shlibpath_overrides_runpath=yes
20066 shlibpath_var=DYLD_LIBRARY_PATH
20067 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
20068
20069 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
20070 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
20071 ;;
20072
20073dgux*)
20074 version_type=linux
20075 need_lib_prefix=no
20076 need_version=no
20077 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
20078 soname_spec='${libname}${release}${shared_ext}$major'
20079 shlibpath_var=LD_LIBRARY_PATH
20080 ;;
20081
20082freebsd1*)
20083 dynamic_linker=no
20084 ;;
20085
20086freebsd* | dragonfly*)
20087 # DragonFly does not have aout. When/if they implement a new
20088 # versioning mechanism, adjust this.
20089 if test -x /usr/bin/objformat; then
20090 objformat=`/usr/bin/objformat`
20091 else
20092 case $host_os in
20093 freebsd[123]*) objformat=aout ;;
20094 *) objformat=elf ;;
20095 esac
20096 fi
20097 version_type=freebsd-$objformat
20098 case $version_type in
20099 freebsd-elf*)
20100 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
20101 need_version=no
20102 need_lib_prefix=no
20103 ;;
20104 freebsd-*)
20105 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
20106 need_version=yes
20107 ;;
20108 esac
20109 shlibpath_var=LD_LIBRARY_PATH
20110 case $host_os in
20111 freebsd2*)
20112 shlibpath_overrides_runpath=yes
20113 ;;
20114 freebsd3.[01]* | freebsdelf3.[01]*)
20115 shlibpath_overrides_runpath=yes
20116 hardcode_into_libs=yes
20117 ;;
20118 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
20119 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
20120 shlibpath_overrides_runpath=no
20121 hardcode_into_libs=yes
20122 ;;
20123 *) # from 4.6 on, and DragonFly
20124 shlibpath_overrides_runpath=yes
20125 hardcode_into_libs=yes
20126 ;;
20127 esac
20128 ;;
20129
20130gnu*)
20131 version_type=linux
20132 need_lib_prefix=no
20133 need_version=no
20134 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
20135 soname_spec='${libname}${release}${shared_ext}$major'
20136 shlibpath_var=LD_LIBRARY_PATH
20137 hardcode_into_libs=yes
20138 ;;
20139
20140hpux9* | hpux10* | hpux11*)
20141 # Give a soname corresponding to the major version so that dld.sl refuses to
20142 # link against other versions.
20143 version_type=sunos
20144 need_lib_prefix=no
20145 need_version=no
20146 case $host_cpu in
20147 ia64*)
20148 shrext_cmds='.so'
20149 hardcode_into_libs=yes
20150 dynamic_linker="$host_os dld.so"
20151 shlibpath_var=LD_LIBRARY_PATH
20152 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
20153 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20154 soname_spec='${libname}${release}${shared_ext}$major'
20155 if test "X$HPUX_IA64_MODE" = X32; then
20156 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
20157 else
20158 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
20159 fi
20160 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
20161 ;;
20162 hppa*64*)
20163 shrext_cmds='.sl'
20164 hardcode_into_libs=yes
20165 dynamic_linker="$host_os dld.sl"
20166 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
20167 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
20168 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20169 soname_spec='${libname}${release}${shared_ext}$major'
20170 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
20171 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
20172 ;;
20173 *)
20174 shrext_cmds='.sl'
20175 dynamic_linker="$host_os dld.sl"
20176 shlibpath_var=SHLIB_PATH
20177 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
20178 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20179 soname_spec='${libname}${release}${shared_ext}$major'
20180 ;;
20181 esac
20182 # HP-UX runs *really* slowly unless shared libraries are mode 555.
20183 postinstall_cmds='chmod 555 $lib'
20184 ;;
20185
20186interix[3-9]*)
20187 version_type=linux
20188 need_lib_prefix=no
20189 need_version=no
20190 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
20191 soname_spec='${libname}${release}${shared_ext}$major'
20192 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
20193 shlibpath_var=LD_LIBRARY_PATH
20194 shlibpath_overrides_runpath=no
20195 hardcode_into_libs=yes
20196 ;;
20197
20198irix5* | irix6* | nonstopux*)
20199 case $host_os in
20200 nonstopux*) version_type=nonstopux ;;
20201 *)
20202 if test "$lt_cv_prog_gnu_ld" = yes; then
20203 version_type=linux
20204 else
20205 version_type=irix
20206 fi ;;
20207 esac
20208 need_lib_prefix=no
20209 need_version=no
20210 soname_spec='${libname}${release}${shared_ext}$major'
20211 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
20212 case $host_os in
20213 irix5* | nonstopux*)
20214 libsuff= shlibsuff=
20215 ;;
20216 *)
20217 case $LD in # libtool.m4 will add one of these switches to LD
20218 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
20219 libsuff= shlibsuff= libmagic=32-bit;;
20220 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
20221 libsuff=32 shlibsuff=N32 libmagic=N32;;
20222 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
20223 libsuff=64 shlibsuff=64 libmagic=64-bit;;
20224 *) libsuff= shlibsuff= libmagic=never-match;;
20225 esac
20226 ;;
20227 esac
20228 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
20229 shlibpath_overrides_runpath=no
20230 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
20231 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
20232 hardcode_into_libs=yes
20233 ;;
20234
20235# No shared lib support for Linux oldld, aout, or coff.
20236linux*oldld* | linux*aout* | linux*coff*)
20237 dynamic_linker=no
20238 ;;
20239
20240# This must be Linux ELF.
7a9d3fe8 20241linux* | k*bsd*-gnu | kopensolaris*-gnu)
da0f6381
PB
20242 version_type=linux
20243 need_lib_prefix=no
20244 need_version=no
20245 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20246 soname_spec='${libname}${release}${shared_ext}$major'
20247 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
20248 shlibpath_var=LD_LIBRARY_PATH
20249 shlibpath_overrides_runpath=no
baafc534 20250
da0f6381 20251 # Some binutils ld are patched to set DT_RUNPATH
baafc534
RW
20252 if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then
20253 echo $ECHO_N "(cached) $ECHO_C" >&6
20254else
20255 lt_cv_shlibpath_overrides_runpath=no
20256 save_LDFLAGS=$LDFLAGS
20257 save_libdir=$libdir
20258 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
20259 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
20260 cat >conftest.$ac_ext <<_ACEOF
da0f6381
PB
20261/* confdefs.h. */
20262_ACEOF
20263cat confdefs.h >>conftest.$ac_ext
20264cat >>conftest.$ac_ext <<_ACEOF
20265/* end confdefs.h. */
20266
20267int
20268main ()
20269{
20270
20271 ;
20272 return 0;
20273}
20274_ACEOF
20275rm -f conftest.$ac_objext conftest$ac_exeext
20276if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20277 (eval $ac_link) 2>conftest.er1
20278 ac_status=$?
20279 grep -v '^ *+' conftest.er1 >conftest.err
20280 rm -f conftest.er1
20281 cat conftest.err >&5
20282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20283 (exit $ac_status); } &&
20284 { ac_try='test -z "$ac_c_werror_flag"
20285 || test ! -s conftest.err'
20286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20287 (eval $ac_try) 2>&5
20288 ac_status=$?
20289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20290 (exit $ac_status); }; } &&
20291 { ac_try='test -s conftest$ac_exeext'
20292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20293 (eval $ac_try) 2>&5
20294 ac_status=$?
20295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20296 (exit $ac_status); }; }; then
5d47bb02 20297 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
baafc534 20298 lt_cv_shlibpath_overrides_runpath=yes
da0f6381
PB
20299fi
20300
20301else
20302 echo "$as_me: failed program was:" >&5
20303sed 's/^/| /' conftest.$ac_ext >&5
20304
20305fi
20306rm -f conftest.err conftest.$ac_objext \
20307 conftest$ac_exeext conftest.$ac_ext
baafc534
RW
20308 LDFLAGS=$save_LDFLAGS
20309 libdir=$save_libdir
20310
20311fi
20312
20313 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
da0f6381
PB
20314
20315 # This implies no fast_install, which is unacceptable.
20316 # Some rework will be needed to allow for fast_install
20317 # before this can be enabled.
20318 hardcode_into_libs=yes
20319
20320 # Append ld.so.conf contents to the search path
20321 if test -f /etc/ld.so.conf; then
5d47bb02 20322 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/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
da0f6381
PB
20323 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
20324 fi
20325
20326 # We used to test for /lib/ld.so.1 and disable shared libraries on
20327 # powerpc, because MkLinux only supported shared libraries with the
20328 # GNU dynamic linker. Since this was broken with cross compilers,
20329 # most powerpc-linux boxes support dynamic linking these days and
20330 # people can always --disable-shared, the test was removed, and we
20331 # assume the GNU/Linux dynamic linker is in use.
20332 dynamic_linker='GNU/Linux ld.so'
20333 ;;
20334
20335netbsd*)
20336 version_type=sunos
20337 need_lib_prefix=no
20338 need_version=no
20339 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20340 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20341 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
20342 dynamic_linker='NetBSD (a.out) ld.so'
20343 else
20344 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
20345 soname_spec='${libname}${release}${shared_ext}$major'
20346 dynamic_linker='NetBSD ld.elf_so'
20347 fi
20348 shlibpath_var=LD_LIBRARY_PATH
20349 shlibpath_overrides_runpath=yes
20350 hardcode_into_libs=yes
20351 ;;
20352
20353newsos6)
20354 version_type=linux
20355 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20356 shlibpath_var=LD_LIBRARY_PATH
20357 shlibpath_overrides_runpath=yes
20358 ;;
20359
20360*nto* | *qnx*)
20361 version_type=qnx
20362 need_lib_prefix=no
20363 need_version=no
20364 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20365 soname_spec='${libname}${release}${shared_ext}$major'
20366 shlibpath_var=LD_LIBRARY_PATH
20367 shlibpath_overrides_runpath=no
20368 hardcode_into_libs=yes
20369 dynamic_linker='ldqnx.so'
20370 ;;
20371
20372openbsd*)
20373 version_type=sunos
20374 sys_lib_dlsearch_path_spec="/usr/lib"
20375 need_lib_prefix=no
20376 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
20377 case $host_os in
20378 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
20379 *) need_version=no ;;
20380 esac
20381 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20382 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
20383 shlibpath_var=LD_LIBRARY_PATH
20384 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
20385 case $host_os in
20386 openbsd2.[89] | openbsd2.[89].*)
20387 shlibpath_overrides_runpath=no
20388 ;;
20389 *)
20390 shlibpath_overrides_runpath=yes
20391 ;;
20392 esac
20393 else
20394 shlibpath_overrides_runpath=yes
20395 fi
20396 ;;
20397
20398os2*)
20399 libname_spec='$name'
20400 shrext_cmds=".dll"
20401 need_lib_prefix=no
20402 library_names_spec='$libname${shared_ext} $libname.a'
20403 dynamic_linker='OS/2 ld.exe'
20404 shlibpath_var=LIBPATH
20405 ;;
20406
20407osf3* | osf4* | osf5*)
20408 version_type=osf
20409 need_lib_prefix=no
20410 need_version=no
20411 soname_spec='${libname}${release}${shared_ext}$major'
20412 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20413 shlibpath_var=LD_LIBRARY_PATH
20414 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
20415 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
20416 ;;
20417
20418rdos*)
20419 dynamic_linker=no
20420 ;;
20421
20422solaris*)
20423 version_type=linux
20424 need_lib_prefix=no
20425 need_version=no
20426 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20427 soname_spec='${libname}${release}${shared_ext}$major'
20428 shlibpath_var=LD_LIBRARY_PATH
20429 shlibpath_overrides_runpath=yes
20430 hardcode_into_libs=yes
20431 # ldd complains unless libraries are executable
20432 postinstall_cmds='chmod +x $lib'
20433 ;;
20434
20435sunos4*)
20436 version_type=sunos
20437 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
20438 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
20439 shlibpath_var=LD_LIBRARY_PATH
20440 shlibpath_overrides_runpath=yes
20441 if test "$with_gnu_ld" = yes; then
20442 need_lib_prefix=no
20443 fi
20444 need_version=yes
20445 ;;
20446
20447sysv4 | sysv4.3*)
20448 version_type=linux
20449 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20450 soname_spec='${libname}${release}${shared_ext}$major'
20451 shlibpath_var=LD_LIBRARY_PATH
20452 case $host_vendor in
20453 sni)
20454 shlibpath_overrides_runpath=no
20455 need_lib_prefix=no
20456 runpath_var=LD_RUN_PATH
20457 ;;
20458 siemens)
20459 need_lib_prefix=no
20460 ;;
20461 motorola)
20462 need_lib_prefix=no
20463 need_version=no
20464 shlibpath_overrides_runpath=no
20465 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
20466 ;;
20467 esac
20468 ;;
20469
20470sysv4*MP*)
20471 if test -d /usr/nec ;then
20472 version_type=linux
20473 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
20474 soname_spec='$libname${shared_ext}.$major'
20475 shlibpath_var=LD_LIBRARY_PATH
20476 fi
20477 ;;
20478
20479sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
20480 version_type=freebsd-elf
20481 need_lib_prefix=no
20482 need_version=no
20483 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
20484 soname_spec='${libname}${release}${shared_ext}$major'
20485 shlibpath_var=LD_LIBRARY_PATH
20486 shlibpath_overrides_runpath=yes
20487 hardcode_into_libs=yes
20488 if test "$with_gnu_ld" = yes; then
20489 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
20490 else
20491 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
20492 case $host_os in
20493 sco3.2v5*)
20494 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
20495 ;;
20496 esac
20497 fi
20498 sys_lib_dlsearch_path_spec='/usr/lib'
20499 ;;
20500
20501tpf*)
20502 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
20503 version_type=linux
20504 need_lib_prefix=no
20505 need_version=no
5d47bb02 20506 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
da0f6381
PB
20507 shlibpath_var=LD_LIBRARY_PATH
20508 shlibpath_overrides_runpath=no
20509 hardcode_into_libs=yes
20510 ;;
20511
20512uts4*)
20513 version_type=linux
20514 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
20515 soname_spec='${libname}${release}${shared_ext}$major'
20516 shlibpath_var=LD_LIBRARY_PATH
20517 ;;
20518
20519*)
20520 dynamic_linker=no
20521 ;;
20522esac
20523echo "$as_me:$LINENO: result: $dynamic_linker" >&5
20524echo "${ECHO_T}$dynamic_linker" >&6
20525test "$dynamic_linker" = no && can_build_shared=no
20526
20527variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
20528if test "$GCC" = yes; then
20529 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
20530fi
20531
5d47bb02
PG
20532if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
20533 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
20534fi
20535if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
20536 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
20537fi
20538
da0f6381
PB
20539
20540
20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
20626echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
20627hardcode_action=
20628if test -n "$hardcode_libdir_flag_spec" ||
20629 test -n "$runpath_var" ||
20630 test "X$hardcode_automatic" = "Xyes" ; then
20631
20632 # We can hardcode non-existent directories.
20633 if test "$hardcode_direct" != no &&
20634 # If the only mechanism to avoid hardcoding is shlibpath_var, we
20635 # have to relink, otherwise we might link with an installed library
20636 # when we should be linking with a yet-to-be-installed one
20637 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
20638 test "$hardcode_minus_L" != no; then
20639 # Linking always hardcodes the temporary library directory.
20640 hardcode_action=relink
20641 else
20642 # We can link without hardcoding, and we can hardcode nonexisting dirs.
20643 hardcode_action=immediate
20644 fi
20645else
20646 # We cannot hardcode anything, or else we can only hardcode existing
20647 # directories.
20648 hardcode_action=unsupported
20649fi
20650echo "$as_me:$LINENO: result: $hardcode_action" >&5
20651echo "${ECHO_T}$hardcode_action" >&6
20652
20653if test "$hardcode_action" = relink ||
20654 test "$inherit_rpath" = yes; then
20655 # Fast installation is not supported
20656 enable_fast_install=no
20657elif test "$shlibpath_overrides_runpath" = yes ||
20658 test "$enable_shared" = no; then
20659 # Fast installation is not necessary
20660 enable_fast_install=needless
20661fi
20662
20663
20664
20665
20666
20667
20668 if test "x$enable_dlopen" != xyes; then
20669 enable_dlopen=unknown
20670 enable_dlopen_self=unknown
20671 enable_dlopen_self_static=unknown
20672else
20673 lt_cv_dlopen=no
20674 lt_cv_dlopen_libs=
20675
20676 case $host_os in
20677 beos*)
20678 lt_cv_dlopen="load_add_on"
20679 lt_cv_dlopen_libs=
20680 lt_cv_dlopen_self=yes
20681 ;;
20682
5d47bb02 20683 mingw* | pw32* | cegcc*)
da0f6381
PB
20684 lt_cv_dlopen="LoadLibrary"
20685 lt_cv_dlopen_libs=
20686 ;;
20687
20688 cygwin*)
20689 lt_cv_dlopen="dlopen"
20690 lt_cv_dlopen_libs=
20691 ;;
20692
20693 darwin*)
20694 # if libdl is installed we need to link against it
20695 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
20696echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
20697if test "${ac_cv_lib_dl_dlopen+set}" = set; then
20698 echo $ECHO_N "(cached) $ECHO_C" >&6
20699else
20700 ac_check_lib_save_LIBS=$LIBS
20701LIBS="-ldl $LIBS"
20702cat >conftest.$ac_ext <<_ACEOF
20703/* confdefs.h. */
20704_ACEOF
20705cat confdefs.h >>conftest.$ac_ext
20706cat >>conftest.$ac_ext <<_ACEOF
20707/* end confdefs.h. */
20708
20709/* Override any gcc2 internal prototype to avoid an error. */
20710#ifdef __cplusplus
20711extern "C"
20712#endif
20713/* We use char because int might match the return type of a gcc2
20714 builtin and then its argument prototype would still apply. */
20715char dlopen ();
20716int
20717main ()
20718{
20719dlopen ();
20720 ;
20721 return 0;
20722}
20723_ACEOF
20724rm -f conftest.$ac_objext conftest$ac_exeext
20725if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20726 (eval $ac_link) 2>conftest.er1
20727 ac_status=$?
20728 grep -v '^ *+' conftest.er1 >conftest.err
20729 rm -f conftest.er1
20730 cat conftest.err >&5
20731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20732 (exit $ac_status); } &&
20733 { ac_try='test -z "$ac_c_werror_flag"
20734 || test ! -s conftest.err'
20735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20736 (eval $ac_try) 2>&5
20737 ac_status=$?
20738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20739 (exit $ac_status); }; } &&
20740 { ac_try='test -s conftest$ac_exeext'
20741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20742 (eval $ac_try) 2>&5
20743 ac_status=$?
20744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20745 (exit $ac_status); }; }; then
20746 ac_cv_lib_dl_dlopen=yes
20747else
20748 echo "$as_me: failed program was:" >&5
20749sed 's/^/| /' conftest.$ac_ext >&5
20750
20751ac_cv_lib_dl_dlopen=no
20752fi
20753rm -f conftest.err conftest.$ac_objext \
20754 conftest$ac_exeext conftest.$ac_ext
20755LIBS=$ac_check_lib_save_LIBS
20756fi
20757echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
20758echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
20759if test $ac_cv_lib_dl_dlopen = yes; then
20760 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
20761else
20762
20763 lt_cv_dlopen="dyld"
20764 lt_cv_dlopen_libs=
20765 lt_cv_dlopen_self=yes
20766
20767fi
20768
20769 ;;
20770
20771 *)
20772 echo "$as_me:$LINENO: checking for shl_load" >&5
20773echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
20774if test "${ac_cv_func_shl_load+set}" = set; then
20775 echo $ECHO_N "(cached) $ECHO_C" >&6
20776else
20777 cat >conftest.$ac_ext <<_ACEOF
20778/* confdefs.h. */
20779_ACEOF
20780cat confdefs.h >>conftest.$ac_ext
20781cat >>conftest.$ac_ext <<_ACEOF
20782/* end confdefs.h. */
20783/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
20784 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20785#define shl_load innocuous_shl_load
20786
20787/* System header to define __stub macros and hopefully few prototypes,
20788 which can conflict with char shl_load (); below.
20789 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20790 <limits.h> exists even on freestanding compilers. */
20791
20792#ifdef __STDC__
20793# include <limits.h>
20794#else
20795# include <assert.h>
20796#endif
20797
20798#undef shl_load
20799
20800/* Override any gcc2 internal prototype to avoid an error. */
20801#ifdef __cplusplus
20802extern "C"
20803{
20804#endif
20805/* We use char because int might match the return type of a gcc2
20806 builtin and then its argument prototype would still apply. */
20807char shl_load ();
20808/* The GNU C library defines this for functions which it implements
20809 to always fail with ENOSYS. Some functions are actually named
20810 something starting with __ and the normal name is an alias. */
20811#if defined (__stub_shl_load) || defined (__stub___shl_load)
20812choke me
20813#else
20814char (*f) () = shl_load;
20815#endif
20816#ifdef __cplusplus
20817}
20818#endif
20819
20820int
20821main ()
20822{
20823return f != shl_load;
20824 ;
20825 return 0;
20826}
20827_ACEOF
20828rm -f conftest.$ac_objext conftest$ac_exeext
20829if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20830 (eval $ac_link) 2>conftest.er1
20831 ac_status=$?
20832 grep -v '^ *+' conftest.er1 >conftest.err
20833 rm -f conftest.er1
20834 cat conftest.err >&5
20835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20836 (exit $ac_status); } &&
20837 { ac_try='test -z "$ac_c_werror_flag"
20838 || test ! -s conftest.err'
20839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20840 (eval $ac_try) 2>&5
20841 ac_status=$?
20842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20843 (exit $ac_status); }; } &&
20844 { ac_try='test -s conftest$ac_exeext'
20845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20846 (eval $ac_try) 2>&5
20847 ac_status=$?
20848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20849 (exit $ac_status); }; }; then
20850 ac_cv_func_shl_load=yes
20851else
20852 echo "$as_me: failed program was:" >&5
20853sed 's/^/| /' conftest.$ac_ext >&5
20854
20855ac_cv_func_shl_load=no
20856fi
20857rm -f conftest.err conftest.$ac_objext \
20858 conftest$ac_exeext conftest.$ac_ext
20859fi
20860echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
20861echo "${ECHO_T}$ac_cv_func_shl_load" >&6
20862if test $ac_cv_func_shl_load = yes; then
20863 lt_cv_dlopen="shl_load"
20864else
20865 echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
20866echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
20867if test "${ac_cv_lib_dld_shl_load+set}" = set; then
20868 echo $ECHO_N "(cached) $ECHO_C" >&6
20869else
20870 ac_check_lib_save_LIBS=$LIBS
20871LIBS="-ldld $LIBS"
20872cat >conftest.$ac_ext <<_ACEOF
20873/* confdefs.h. */
20874_ACEOF
20875cat confdefs.h >>conftest.$ac_ext
20876cat >>conftest.$ac_ext <<_ACEOF
20877/* end confdefs.h. */
20878
20879/* Override any gcc2 internal prototype to avoid an error. */
20880#ifdef __cplusplus
20881extern "C"
20882#endif
20883/* We use char because int might match the return type of a gcc2
20884 builtin and then its argument prototype would still apply. */
20885char shl_load ();
20886int
20887main ()
20888{
20889shl_load ();
20890 ;
20891 return 0;
20892}
20893_ACEOF
20894rm -f conftest.$ac_objext conftest$ac_exeext
20895if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20896 (eval $ac_link) 2>conftest.er1
20897 ac_status=$?
20898 grep -v '^ *+' conftest.er1 >conftest.err
20899 rm -f conftest.er1
20900 cat conftest.err >&5
20901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20902 (exit $ac_status); } &&
20903 { ac_try='test -z "$ac_c_werror_flag"
20904 || test ! -s conftest.err'
20905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20906 (eval $ac_try) 2>&5
20907 ac_status=$?
20908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20909 (exit $ac_status); }; } &&
20910 { ac_try='test -s conftest$ac_exeext'
20911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20912 (eval $ac_try) 2>&5
20913 ac_status=$?
20914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20915 (exit $ac_status); }; }; then
20916 ac_cv_lib_dld_shl_load=yes
20917else
20918 echo "$as_me: failed program was:" >&5
20919sed 's/^/| /' conftest.$ac_ext >&5
20920
20921ac_cv_lib_dld_shl_load=no
20922fi
20923rm -f conftest.err conftest.$ac_objext \
20924 conftest$ac_exeext conftest.$ac_ext
20925LIBS=$ac_check_lib_save_LIBS
20926fi
20927echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
20928echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
20929if test $ac_cv_lib_dld_shl_load = yes; then
5d47bb02 20930 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
da0f6381
PB
20931else
20932 echo "$as_me:$LINENO: checking for dlopen" >&5
20933echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
20934if test "${ac_cv_func_dlopen+set}" = set; then
20935 echo $ECHO_N "(cached) $ECHO_C" >&6
20936else
20937 cat >conftest.$ac_ext <<_ACEOF
20938/* confdefs.h. */
20939_ACEOF
20940cat confdefs.h >>conftest.$ac_ext
20941cat >>conftest.$ac_ext <<_ACEOF
20942/* end confdefs.h. */
20943/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
20944 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20945#define dlopen innocuous_dlopen
20946
20947/* System header to define __stub macros and hopefully few prototypes,
20948 which can conflict with char dlopen (); below.
20949 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20950 <limits.h> exists even on freestanding compilers. */
20951
20952#ifdef __STDC__
20953# include <limits.h>
20954#else
20955# include <assert.h>
20956#endif
20957
20958#undef dlopen
20959
20960/* Override any gcc2 internal prototype to avoid an error. */
20961#ifdef __cplusplus
20962extern "C"
20963{
20964#endif
20965/* We use char because int might match the return type of a gcc2
20966 builtin and then its argument prototype would still apply. */
20967char dlopen ();
20968/* The GNU C library defines this for functions which it implements
20969 to always fail with ENOSYS. Some functions are actually named
20970 something starting with __ and the normal name is an alias. */
20971#if defined (__stub_dlopen) || defined (__stub___dlopen)
20972choke me
20973#else
20974char (*f) () = dlopen;
20975#endif
20976#ifdef __cplusplus
20977}
20978#endif
20979
20980int
20981main ()
20982{
20983return f != dlopen;
20984 ;
20985 return 0;
20986}
20987_ACEOF
20988rm -f conftest.$ac_objext conftest$ac_exeext
20989if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20990 (eval $ac_link) 2>conftest.er1
20991 ac_status=$?
20992 grep -v '^ *+' conftest.er1 >conftest.err
20993 rm -f conftest.er1
20994 cat conftest.err >&5
20995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20996 (exit $ac_status); } &&
20997 { ac_try='test -z "$ac_c_werror_flag"
20998 || test ! -s conftest.err'
20999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21000 (eval $ac_try) 2>&5
21001 ac_status=$?
21002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21003 (exit $ac_status); }; } &&
21004 { ac_try='test -s conftest$ac_exeext'
21005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21006 (eval $ac_try) 2>&5
21007 ac_status=$?
21008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21009 (exit $ac_status); }; }; then
21010 ac_cv_func_dlopen=yes
21011else
21012 echo "$as_me: failed program was:" >&5
21013sed 's/^/| /' conftest.$ac_ext >&5
21014
21015ac_cv_func_dlopen=no
21016fi
21017rm -f conftest.err conftest.$ac_objext \
21018 conftest$ac_exeext conftest.$ac_ext
21019fi
21020echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
21021echo "${ECHO_T}$ac_cv_func_dlopen" >&6
21022if test $ac_cv_func_dlopen = yes; then
21023 lt_cv_dlopen="dlopen"
21024else
21025 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
21026echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
21027if test "${ac_cv_lib_dl_dlopen+set}" = set; then
21028 echo $ECHO_N "(cached) $ECHO_C" >&6
21029else
21030 ac_check_lib_save_LIBS=$LIBS
21031LIBS="-ldl $LIBS"
21032cat >conftest.$ac_ext <<_ACEOF
21033/* confdefs.h. */
21034_ACEOF
21035cat confdefs.h >>conftest.$ac_ext
21036cat >>conftest.$ac_ext <<_ACEOF
21037/* end confdefs.h. */
21038
21039/* Override any gcc2 internal prototype to avoid an error. */
21040#ifdef __cplusplus
21041extern "C"
21042#endif
21043/* We use char because int might match the return type of a gcc2
21044 builtin and then its argument prototype would still apply. */
21045char dlopen ();
21046int
21047main ()
21048{
21049dlopen ();
21050 ;
21051 return 0;
21052}
21053_ACEOF
21054rm -f conftest.$ac_objext conftest$ac_exeext
21055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21056 (eval $ac_link) 2>conftest.er1
21057 ac_status=$?
21058 grep -v '^ *+' conftest.er1 >conftest.err
21059 rm -f conftest.er1
21060 cat conftest.err >&5
21061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21062 (exit $ac_status); } &&
21063 { ac_try='test -z "$ac_c_werror_flag"
21064 || test ! -s conftest.err'
21065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21066 (eval $ac_try) 2>&5
21067 ac_status=$?
21068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21069 (exit $ac_status); }; } &&
21070 { ac_try='test -s conftest$ac_exeext'
21071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21072 (eval $ac_try) 2>&5
21073 ac_status=$?
21074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21075 (exit $ac_status); }; }; then
21076 ac_cv_lib_dl_dlopen=yes
21077else
21078 echo "$as_me: failed program was:" >&5
21079sed 's/^/| /' conftest.$ac_ext >&5
21080
21081ac_cv_lib_dl_dlopen=no
21082fi
21083rm -f conftest.err conftest.$ac_objext \
21084 conftest$ac_exeext conftest.$ac_ext
21085LIBS=$ac_check_lib_save_LIBS
21086fi
21087echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
21088echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
21089if test $ac_cv_lib_dl_dlopen = yes; then
21090 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
21091else
21092 echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
21093echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
21094if test "${ac_cv_lib_svld_dlopen+set}" = set; then
21095 echo $ECHO_N "(cached) $ECHO_C" >&6
21096else
21097 ac_check_lib_save_LIBS=$LIBS
21098LIBS="-lsvld $LIBS"
21099cat >conftest.$ac_ext <<_ACEOF
21100/* confdefs.h. */
21101_ACEOF
21102cat confdefs.h >>conftest.$ac_ext
21103cat >>conftest.$ac_ext <<_ACEOF
21104/* end confdefs.h. */
21105
21106/* Override any gcc2 internal prototype to avoid an error. */
21107#ifdef __cplusplus
21108extern "C"
21109#endif
21110/* We use char because int might match the return type of a gcc2
21111 builtin and then its argument prototype would still apply. */
21112char dlopen ();
21113int
21114main ()
21115{
21116dlopen ();
21117 ;
21118 return 0;
21119}
21120_ACEOF
21121rm -f conftest.$ac_objext conftest$ac_exeext
21122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21123 (eval $ac_link) 2>conftest.er1
21124 ac_status=$?
21125 grep -v '^ *+' conftest.er1 >conftest.err
21126 rm -f conftest.er1
21127 cat conftest.err >&5
21128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21129 (exit $ac_status); } &&
21130 { ac_try='test -z "$ac_c_werror_flag"
21131 || test ! -s conftest.err'
21132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21133 (eval $ac_try) 2>&5
21134 ac_status=$?
21135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21136 (exit $ac_status); }; } &&
21137 { ac_try='test -s conftest$ac_exeext'
21138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21139 (eval $ac_try) 2>&5
21140 ac_status=$?
21141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21142 (exit $ac_status); }; }; then
21143 ac_cv_lib_svld_dlopen=yes
21144else
21145 echo "$as_me: failed program was:" >&5
21146sed 's/^/| /' conftest.$ac_ext >&5
21147
21148ac_cv_lib_svld_dlopen=no
21149fi
21150rm -f conftest.err conftest.$ac_objext \
21151 conftest$ac_exeext conftest.$ac_ext
21152LIBS=$ac_check_lib_save_LIBS
21153fi
21154echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
21155echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
21156if test $ac_cv_lib_svld_dlopen = yes; then
21157 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
21158else
21159 echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
21160echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
21161if test "${ac_cv_lib_dld_dld_link+set}" = set; then
21162 echo $ECHO_N "(cached) $ECHO_C" >&6
21163else
21164 ac_check_lib_save_LIBS=$LIBS
21165LIBS="-ldld $LIBS"
21166cat >conftest.$ac_ext <<_ACEOF
21167/* confdefs.h. */
21168_ACEOF
21169cat confdefs.h >>conftest.$ac_ext
21170cat >>conftest.$ac_ext <<_ACEOF
21171/* end confdefs.h. */
21172
21173/* Override any gcc2 internal prototype to avoid an error. */
21174#ifdef __cplusplus
21175extern "C"
21176#endif
21177/* We use char because int might match the return type of a gcc2
21178 builtin and then its argument prototype would still apply. */
21179char dld_link ();
21180int
21181main ()
21182{
00020c16
ILT
21183dld_link ();
21184 ;
21185 return 0;
21186}
21187_ACEOF
21188rm -f conftest.$ac_objext conftest$ac_exeext
21189if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21190 (eval $ac_link) 2>conftest.er1
21191 ac_status=$?
21192 grep -v '^ *+' conftest.er1 >conftest.err
21193 rm -f conftest.er1
21194 cat conftest.err >&5
21195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21196 (exit $ac_status); } &&
21197 { ac_try='test -z "$ac_c_werror_flag"
21198 || test ! -s conftest.err'
21199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21200 (eval $ac_try) 2>&5
21201 ac_status=$?
21202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21203 (exit $ac_status); }; } &&
21204 { ac_try='test -s conftest$ac_exeext'
21205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21206 (eval $ac_try) 2>&5
21207 ac_status=$?
21208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21209 (exit $ac_status); }; }; then
21210 ac_cv_lib_dld_dld_link=yes
21211else
21212 echo "$as_me: failed program was:" >&5
21213sed 's/^/| /' conftest.$ac_ext >&5
21214
21215ac_cv_lib_dld_dld_link=no
21216fi
21217rm -f conftest.err conftest.$ac_objext \
21218 conftest$ac_exeext conftest.$ac_ext
21219LIBS=$ac_check_lib_save_LIBS
21220fi
21221echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
21222echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
21223if test $ac_cv_lib_dld_dld_link = yes; then
21224 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
21225fi
21226
21227
21228fi
21229
21230
21231fi
21232
21233
21234fi
21235
21236
21237fi
21238
21239
21240fi
21241
21242 ;;
21243 esac
21244
21245 if test "x$lt_cv_dlopen" != xno; then
21246 enable_dlopen=yes
21247 else
21248 enable_dlopen=no
21249 fi
21250
21251 case $lt_cv_dlopen in
21252 dlopen)
21253 save_CPPFLAGS="$CPPFLAGS"
21254 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
21255
21256 save_LDFLAGS="$LDFLAGS"
21257 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
21258
21259 save_LIBS="$LIBS"
21260 LIBS="$lt_cv_dlopen_libs $LIBS"
21261
21262 echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
21263echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
21264if test "${lt_cv_dlopen_self+set}" = set; then
21265 echo $ECHO_N "(cached) $ECHO_C" >&6
21266else
21267 if test "$cross_compiling" = yes; then :
21268 lt_cv_dlopen_self=cross
21269else
21270 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
21271 lt_status=$lt_dlunknown
21272 cat > conftest.$ac_ext <<_LT_EOF
21273#line 21273 "configure"
21274#include "confdefs.h"
21275
21276#if HAVE_DLFCN_H
21277#include <dlfcn.h>
21278#endif
21279
21280#include <stdio.h>
21281
21282#ifdef RTLD_GLOBAL
21283# define LT_DLGLOBAL RTLD_GLOBAL
21284#else
21285# ifdef DL_GLOBAL
21286# define LT_DLGLOBAL DL_GLOBAL
21287# else
21288# define LT_DLGLOBAL 0
21289# endif
21290#endif
21291
21292/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
21293 find out it does not work in some platform. */
21294#ifndef LT_DLLAZY_OR_NOW
21295# ifdef RTLD_LAZY
21296# define LT_DLLAZY_OR_NOW RTLD_LAZY
21297# else
21298# ifdef DL_LAZY
21299# define LT_DLLAZY_OR_NOW DL_LAZY
21300# else
21301# ifdef RTLD_NOW
21302# define LT_DLLAZY_OR_NOW RTLD_NOW
21303# else
21304# ifdef DL_NOW
21305# define LT_DLLAZY_OR_NOW DL_NOW
21306# else
21307# define LT_DLLAZY_OR_NOW 0
21308# endif
21309# endif
21310# endif
21311# endif
21312#endif
21313
21314void fnord() { int i=42;}
21315int main ()
21316{
21317 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
21318 int status = $lt_dlunknown;
21319
21320 if (self)
21321 {
21322 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
21323 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
21324 /* dlclose (self); */
21325 }
21326 else
21327 puts (dlerror ());
21328
21329 return status;
21330}
21331_LT_EOF
21332 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21333 (eval $ac_link) 2>&5
21334 ac_status=$?
21335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21336 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
21337 (./conftest; exit; ) >&5 2>/dev/null
21338 lt_status=$?
21339 case x$lt_status in
21340 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
21341 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
21342 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
21343 esac
21344 else :
21345 # compilation failed
21346 lt_cv_dlopen_self=no
21347 fi
21348fi
21349rm -fr conftest*
21350
21351
21352fi
21353echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
21354echo "${ECHO_T}$lt_cv_dlopen_self" >&6
21355
21356 if test "x$lt_cv_dlopen_self" = xyes; then
21357 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
21358 echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
21359echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
21360if test "${lt_cv_dlopen_self_static+set}" = set; then
21361 echo $ECHO_N "(cached) $ECHO_C" >&6
21362else
21363 if test "$cross_compiling" = yes; then :
21364 lt_cv_dlopen_self_static=cross
21365else
21366 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
21367 lt_status=$lt_dlunknown
21368 cat > conftest.$ac_ext <<_LT_EOF
21369#line 21369 "configure"
21370#include "confdefs.h"
21371
21372#if HAVE_DLFCN_H
21373#include <dlfcn.h>
21374#endif
21375
21376#include <stdio.h>
21377
21378#ifdef RTLD_GLOBAL
21379# define LT_DLGLOBAL RTLD_GLOBAL
21380#else
21381# ifdef DL_GLOBAL
21382# define LT_DLGLOBAL DL_GLOBAL
21383# else
21384# define LT_DLGLOBAL 0
21385# endif
21386#endif
21387
21388/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
21389 find out it does not work in some platform. */
21390#ifndef LT_DLLAZY_OR_NOW
21391# ifdef RTLD_LAZY
21392# define LT_DLLAZY_OR_NOW RTLD_LAZY
21393# else
21394# ifdef DL_LAZY
21395# define LT_DLLAZY_OR_NOW DL_LAZY
21396# else
21397# ifdef RTLD_NOW
21398# define LT_DLLAZY_OR_NOW RTLD_NOW
21399# else
21400# ifdef DL_NOW
21401# define LT_DLLAZY_OR_NOW DL_NOW
21402# else
21403# define LT_DLLAZY_OR_NOW 0
21404# endif
21405# endif
21406# endif
21407# endif
21408#endif
21409
21410void fnord() { int i=42;}
21411int main ()
21412{
21413 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
21414 int status = $lt_dlunknown;
21415
21416 if (self)
21417 {
21418 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
21419 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
21420 /* dlclose (self); */
21421 }
21422 else
21423 puts (dlerror ());
21424
21425 return status;
21426}
21427_LT_EOF
21428 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21429 (eval $ac_link) 2>&5
21430 ac_status=$?
21431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21432 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
21433 (./conftest; exit; ) >&5 2>/dev/null
21434 lt_status=$?
21435 case x$lt_status in
21436 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
21437 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
21438 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
21439 esac
21440 else :
21441 # compilation failed
21442 lt_cv_dlopen_self_static=no
21443 fi
21444fi
21445rm -fr conftest*
21446
21447
21448fi
21449echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
21450echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
21451 fi
21452
21453 CPPFLAGS="$save_CPPFLAGS"
21454 LDFLAGS="$save_LDFLAGS"
21455 LIBS="$save_LIBS"
21456 ;;
21457 esac
21458
21459 case $lt_cv_dlopen_self in
21460 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
21461 *) enable_dlopen_self=unknown ;;
21462 esac
21463
21464 case $lt_cv_dlopen_self_static in
21465 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
21466 *) enable_dlopen_self_static=unknown ;;
21467 esac
21468fi
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486striplib=
21487old_striplib=
21488echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
21489echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
21490if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
21491 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
21492 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
21493 echo "$as_me:$LINENO: result: yes" >&5
21494echo "${ECHO_T}yes" >&6
21495else
21496# FIXME - insert some real tests, host_os isn't really good enough
21497 case $host_os in
21498 darwin*)
21499 if test -n "$STRIP" ; then
21500 striplib="$STRIP -x"
21501 old_striplib="$STRIP -S"
21502 echo "$as_me:$LINENO: result: yes" >&5
21503echo "${ECHO_T}yes" >&6
21504 else
21505 echo "$as_me:$LINENO: result: no" >&5
21506echo "${ECHO_T}no" >&6
21507 fi
21508 ;;
21509 *)
21510 echo "$as_me:$LINENO: result: no" >&5
21511echo "${ECHO_T}no" >&6
21512 ;;
21513 esac
21514fi
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527 # Report which library types will actually be built
21528 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
21529echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
21530 echo "$as_me:$LINENO: result: $can_build_shared" >&5
21531echo "${ECHO_T}$can_build_shared" >&6
21532
21533 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
21534echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
21535 test "$can_build_shared" = "no" && enable_shared=no
21536
21537 # On AIX, shared libraries and static libraries use the same namespace, and
21538 # are all built from PIC.
21539 case $host_os in
21540 aix3*)
21541 test "$enable_shared" = yes && enable_static=no
21542 if test -n "$RANLIB"; then
21543 archive_cmds="$archive_cmds~\$RANLIB \$lib"
21544 postinstall_cmds='$RANLIB $lib'
21545 fi
21546 ;;
21547
21548 aix[4-9]*)
21549 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
21550 test "$enable_shared" = yes && enable_static=no
21551 fi
21552 ;;
21553 esac
21554 echo "$as_me:$LINENO: result: $enable_shared" >&5
21555echo "${ECHO_T}$enable_shared" >&6
21556
21557 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
21558echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
21559 # Make sure either enable_shared or enable_static is yes.
21560 test "$enable_shared" = yes || enable_static=yes
21561 echo "$as_me:$LINENO: result: $enable_static" >&5
21562echo "${ECHO_T}$enable_static" >&6
21563
21564
21565
21566
21567fi
21568ac_ext=c
21569ac_cpp='$CPP $CPPFLAGS'
21570ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21571ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21572ac_compiler_gnu=$ac_cv_c_compiler_gnu
21573
21574CC="$lt_save_CC"
21575
21576
21577ac_ext=cc
21578ac_cpp='$CXXCPP $CPPFLAGS'
21579ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21580ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21581ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21582
21583archive_cmds_need_lc_CXX=no
21584allow_undefined_flag_CXX=
21585always_export_symbols_CXX=no
21586archive_expsym_cmds_CXX=
21587compiler_needs_object_CXX=no
21588export_dynamic_flag_spec_CXX=
21589hardcode_direct_CXX=no
21590hardcode_direct_absolute_CXX=no
21591hardcode_libdir_flag_spec_CXX=
21592hardcode_libdir_flag_spec_ld_CXX=
21593hardcode_libdir_separator_CXX=
21594hardcode_minus_L_CXX=no
21595hardcode_shlibpath_var_CXX=unsupported
21596hardcode_automatic_CXX=no
21597inherit_rpath_CXX=no
21598module_cmds_CXX=
21599module_expsym_cmds_CXX=
21600link_all_deplibs_CXX=unknown
21601old_archive_cmds_CXX=$old_archive_cmds
21602no_undefined_flag_CXX=
21603whole_archive_flag_spec_CXX=
21604enable_shared_with_static_runtimes_CXX=no
21605
21606# Source file extension for C++ test sources.
21607ac_ext=cpp
21608
21609# Object file extension for compiled C++ test sources.
21610objext=o
21611objext_CXX=$objext
21612
21613# No sense in running all these tests if we already determined that
21614# the CXX compiler isn't working. Some variables (like enable_shared)
21615# are currently assumed to apply to all compilers on this platform,
21616# and will be corrupted by setting them based on a non-working compiler.
21617if test "$_lt_caught_CXX_error" != yes; then
21618 # Code to be used in simple compile tests
21619 lt_simple_compile_test_code="int some_variable = 0;"
21620
21621 # Code to be used in simple link tests
21622 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
21623
21624 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
21625
21626
21627
21628
21629
21630
21631# If no C compiler was specified, use CC.
21632LTCC=${LTCC-"$CC"}
21633
21634# If no C compiler flags were specified, use CFLAGS.
21635LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
21636
21637# Allow CC to be a program name with arguments.
21638compiler=$CC
21639
21640
21641 # save warnings/boilerplate of simple test code
21642 ac_outfile=conftest.$ac_objext
21643echo "$lt_simple_compile_test_code" >conftest.$ac_ext
21644eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
21645_lt_compiler_boilerplate=`cat conftest.err`
21646$RM conftest*
21647
21648 ac_outfile=conftest.$ac_objext
21649echo "$lt_simple_link_test_code" >conftest.$ac_ext
21650eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
21651_lt_linker_boilerplate=`cat conftest.err`
21652$RM -r conftest*
21653
21654
21655 # Allow CC to be a program name with arguments.
21656 lt_save_CC=$CC
21657 lt_save_LD=$LD
21658 lt_save_GCC=$GCC
21659 GCC=$GXX
21660 lt_save_with_gnu_ld=$with_gnu_ld
21661 lt_save_path_LD=$lt_cv_path_LD
21662 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
21663 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
21664 else
21665 $as_unset lt_cv_prog_gnu_ld
21666 fi
21667 if test -n "${lt_cv_path_LDCXX+set}"; then
21668 lt_cv_path_LD=$lt_cv_path_LDCXX
21669 else
21670 $as_unset lt_cv_path_LD
21671 fi
21672 test -z "${LDCXX+set}" || LD=$LDCXX
21673 CC=${CXX-"c++"}
21674 compiler=$CC
21675 compiler_CXX=$CC
21676 for cc_temp in $compiler""; do
21677 case $cc_temp in
21678 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
21679 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
21680 \-*) ;;
21681 *) break;;
21682 esac
21683done
21684cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
21685
21686
21687 if test -n "$compiler"; then
21688 # We don't want -fno-exception when compiling C++ code, so set the
21689 # no_builtin_flag separately
21690 if test "$GXX" = yes; then
21691 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
21692 else
21693 lt_prog_compiler_no_builtin_flag_CXX=
21694 fi
21695
21696 if test "$GXX" = yes; then
21697 # Set up default GNU C++ configuration
21698
21699
21700
21701# Check whether --with-gnu-ld or --without-gnu-ld was given.
21702if test "${with_gnu_ld+set}" = set; then
21703 withval="$with_gnu_ld"
21704 test "$withval" = no || with_gnu_ld=yes
21705else
21706 with_gnu_ld=no
21707fi;
21708ac_prog=ld
21709if test "$GCC" = yes; then
21710 # Check if gcc -print-prog-name=ld gives a path.
21711 echo "$as_me:$LINENO: checking for ld used by $CC" >&5
21712echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
21713 case $host in
21714 *-*-mingw*)
21715 # gcc leaves a trailing carriage return which upsets mingw
21716 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
21717 *)
21718 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
21719 esac
21720 case $ac_prog in
21721 # Accept absolute paths.
21722 [\\/]* | ?:[\\/]*)
21723 re_direlt='/[^/][^/]*/\.\./'
21724 # Canonicalize the pathname of ld
21725 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
21726 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
21727 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
21728 done
21729 test -z "$LD" && LD="$ac_prog"
21730 ;;
21731 "")
21732 # If it fails, then pretend we aren't using GCC.
21733 ac_prog=ld
21734 ;;
21735 *)
21736 # If it is relative, then search for the first ld in PATH.
21737 with_gnu_ld=unknown
21738 ;;
21739 esac
21740elif test "$with_gnu_ld" = yes; then
21741 echo "$as_me:$LINENO: checking for GNU ld" >&5
21742echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
21743else
21744 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
21745echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
21746fi
21747if test "${lt_cv_path_LD+set}" = set; then
21748 echo $ECHO_N "(cached) $ECHO_C" >&6
21749else
21750 if test -z "$LD"; then
21751 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
21752 for ac_dir in $PATH; do
21753 IFS="$lt_save_ifs"
21754 test -z "$ac_dir" && ac_dir=.
21755 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
21756 lt_cv_path_LD="$ac_dir/$ac_prog"
21757 # Check to see if the program is GNU ld. I'd rather use --version,
21758 # but apparently some variants of GNU ld only accept -v.
21759 # Break only if it was the GNU/non-GNU ld that we prefer.
21760 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
21761 *GNU* | *'with BFD'*)
21762 test "$with_gnu_ld" != no && break
21763 ;;
21764 *)
21765 test "$with_gnu_ld" != yes && break
21766 ;;
21767 esac
21768 fi
21769 done
21770 IFS="$lt_save_ifs"
21771else
21772 lt_cv_path_LD="$LD" # Let the user override the test with a path.
21773fi
21774fi
21775
21776LD="$lt_cv_path_LD"
21777if test -n "$LD"; then
21778 echo "$as_me:$LINENO: result: $LD" >&5
21779echo "${ECHO_T}$LD" >&6
21780else
21781 echo "$as_me:$LINENO: result: no" >&5
21782echo "${ECHO_T}no" >&6
21783fi
21784test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
21785echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
21786 { (exit 1); exit 1; }; }
21787echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
21788echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
21789if test "${lt_cv_prog_gnu_ld+set}" = set; then
21790 echo $ECHO_N "(cached) $ECHO_C" >&6
21791else
21792 # I'd rather use --version here, but apparently some GNU lds only accept -v.
21793case `$LD -v 2>&1 </dev/null` in
21794*GNU* | *'with BFD'*)
21795 lt_cv_prog_gnu_ld=yes
21796 ;;
21797*)
21798 lt_cv_prog_gnu_ld=no
21799 ;;
21800esac
21801fi
21802echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
21803echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
21804with_gnu_ld=$lt_cv_prog_gnu_ld
21805
21806
21807
21808
21809
21810
21811
21812 # Check if GNU C++ uses GNU ld as the underlying linker, since the
21813 # archiving commands below assume that GNU ld is being used.
21814 if test "$with_gnu_ld" = yes; then
21815 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
21816 archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
21817
21818 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
21819 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
21820
21821 # If archive_cmds runs LD, not CC, wlarc should be empty
21822 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
21823 # investigate it a little bit more. (MM)
21824 wlarc='${wl}'
21825
21826 # ancient GNU ld didn't support --whole-archive et. al.
21827 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
21828 $GREP 'no-whole-archive' > /dev/null; then
21829 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
21830 else
21831 whole_archive_flag_spec_CXX=
21832 fi
21833 else
21834 with_gnu_ld=no
21835 wlarc=
21836
21837 # A generic and very simple default shared library creation
21838 # command for GNU C++ for the case where it uses the native
21839 # linker, instead of GNU ld. If possible, this setting should
21840 # overridden to take advantage of the native linker features on
21841 # the platform it is being used on.
21842 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
21843 fi
21844
21845 # Commands to make compiler produce verbose output that lists
21846 # what "hidden" libraries, object files and flags are used when
21847 # linking a shared library.
21848 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
21849
21850 else
21851 GXX=no
21852 with_gnu_ld=no
21853 wlarc=
21854 fi
21855
21856 # PORTME: fill in a description of your system's C++ link characteristics
21857 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
21858echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
21859 ld_shlibs_CXX=yes
21860 case $host_os in
21861 aix3*)
21862 # FIXME: insert proper C++ library support
21863 ld_shlibs_CXX=no
21864 ;;
21865 aix[4-9]*)
21866 if test "$host_cpu" = ia64; then
21867 # On IA64, the linker does run time linking by default, so we don't
21868 # have to do anything special.
21869 aix_use_runtimelinking=no
21870 exp_sym_flag='-Bexport'
21871 no_entry_flag=""
21872 else
21873 aix_use_runtimelinking=no
21874
21875 # Test if we are trying to use run time linking or normal
21876 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
21877 # need to do runtime linking.
21878 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
21879 for ld_flag in $LDFLAGS; do
21880 case $ld_flag in
21881 *-brtl*)
21882 aix_use_runtimelinking=yes
21883 break
21884 ;;
21885 esac
21886 done
21887 ;;
21888 esac
21889
21890 exp_sym_flag='-bexport'
21891 no_entry_flag='-bnoentry'
21892 fi
21893
21894 # When large executables or shared objects are built, AIX ld can
21895 # have problems creating the table of contents. If linking a library
21896 # or program results in "error TOC overflow" add -mminimal-toc to
21897 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
21898 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
21899
21900 archive_cmds_CXX=''
21901 hardcode_direct_CXX=yes
21902 hardcode_direct_absolute_CXX=yes
21903 hardcode_libdir_separator_CXX=':'
21904 link_all_deplibs_CXX=yes
21905 file_list_spec_CXX='${wl}-f,'
21906
21907 if test "$GXX" = yes; then
21908 case $host_os in aix4.[012]|aix4.[012].*)
21909 # We only want to do this on AIX 4.2 and lower, the check
21910 # below for broken collect2 doesn't work under 4.3+
21911 collect2name=`${CC} -print-prog-name=collect2`
21912 if test -f "$collect2name" &&
21913 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
21914 then
21915 # We have reworked collect2
21916 :
21917 else
21918 # We have old collect2
21919 hardcode_direct_CXX=unsupported
21920 # It fails to find uninstalled libraries when the uninstalled
21921 # path is not listed in the libpath. Setting hardcode_minus_L
21922 # to unsupported forces relinking
21923 hardcode_minus_L_CXX=yes
21924 hardcode_libdir_flag_spec_CXX='-L$libdir'
21925 hardcode_libdir_separator_CXX=
21926 fi
21927 esac
21928 shared_flag='-shared'
21929 if test "$aix_use_runtimelinking" = yes; then
21930 shared_flag="$shared_flag "'${wl}-G'
21931 fi
21932 else
21933 # not using gcc
21934 if test "$host_cpu" = ia64; then
21935 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
21936 # chokes on -Wl,-G. The following line is correct:
21937 shared_flag='-G'
21938 else
21939 if test "$aix_use_runtimelinking" = yes; then
21940 shared_flag='${wl}-G'
21941 else
21942 shared_flag='${wl}-bM:SRE'
21943 fi
21944 fi
21945 fi
21946
21947 export_dynamic_flag_spec_CXX='${wl}-bexpall'
21948 # It seems that -bexpall does not export symbols beginning with
21949 # underscore (_), so it is better to generate a list of symbols to
21950 # export.
21951 always_export_symbols_CXX=yes
21952 if test "$aix_use_runtimelinking" = yes; then
21953 # Warning - without using the other runtime loading flags (-brtl),
21954 # -berok will link without error, but may produce a broken library.
21955 allow_undefined_flag_CXX='-berok'
21956 # Determine the default libpath from the value encoded in an empty
21957 # executable.
21958 cat >conftest.$ac_ext <<_ACEOF
21959/* confdefs.h. */
21960_ACEOF
21961cat confdefs.h >>conftest.$ac_ext
21962cat >>conftest.$ac_ext <<_ACEOF
21963/* end confdefs.h. */
21964
21965int
21966main ()
21967{
21968
21969 ;
21970 return 0;
21971}
21972_ACEOF
21973rm -f conftest.$ac_objext conftest$ac_exeext
21974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21975 (eval $ac_link) 2>conftest.er1
21976 ac_status=$?
21977 grep -v '^ *+' conftest.er1 >conftest.err
21978 rm -f conftest.er1
21979 cat conftest.err >&5
21980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21981 (exit $ac_status); } &&
21982 { ac_try='test -z "$ac_cxx_werror_flag"
21983 || test ! -s conftest.err'
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 { ac_try='test -s conftest$ac_exeext'
21990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21991 (eval $ac_try) 2>&5
21992 ac_status=$?
21993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21994 (exit $ac_status); }; }; then
21995
21996lt_aix_libpath_sed='
21997 /Import File Strings/,/^$/ {
21998 /^0/ {
21999 s/^0 *\(.*\)$/\1/
22000 p
22001 }
22002 }'
22003aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
22004# Check for a 64-bit object if we didn't find anything.
22005if test -z "$aix_libpath"; then
22006 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
22007fi
22008else
22009 echo "$as_me: failed program was:" >&5
22010sed 's/^/| /' conftest.$ac_ext >&5
22011
22012fi
22013rm -f conftest.err conftest.$ac_objext \
22014 conftest$ac_exeext conftest.$ac_ext
22015if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
22016
22017 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
22018
22019 archive_expsym_cmds_CXX='$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"
22020 else
22021 if test "$host_cpu" = ia64; then
22022 hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
22023 allow_undefined_flag_CXX="-z nodefs"
22024 archive_expsym_cmds_CXX="\$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"
22025 else
22026 # Determine the default libpath from the value encoded in an
22027 # empty executable.
22028 cat >conftest.$ac_ext <<_ACEOF
22029/* confdefs.h. */
22030_ACEOF
22031cat confdefs.h >>conftest.$ac_ext
22032cat >>conftest.$ac_ext <<_ACEOF
22033/* end confdefs.h. */
22034
22035int
22036main ()
22037{
22038
22039 ;
22040 return 0;
22041}
22042_ACEOF
22043rm -f conftest.$ac_objext conftest$ac_exeext
22044if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22045 (eval $ac_link) 2>conftest.er1
22046 ac_status=$?
22047 grep -v '^ *+' conftest.er1 >conftest.err
22048 rm -f conftest.er1
22049 cat conftest.err >&5
22050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22051 (exit $ac_status); } &&
22052 { ac_try='test -z "$ac_cxx_werror_flag"
22053 || test ! -s conftest.err'
22054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22055 (eval $ac_try) 2>&5
22056 ac_status=$?
22057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22058 (exit $ac_status); }; } &&
22059 { ac_try='test -s conftest$ac_exeext'
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); }; }; then
22065
22066lt_aix_libpath_sed='
22067 /Import File Strings/,/^$/ {
22068 /^0/ {
22069 s/^0 *\(.*\)$/\1/
22070 p
22071 }
22072 }'
22073aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
22074# Check for a 64-bit object if we didn't find anything.
22075if test -z "$aix_libpath"; then
22076 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
22077fi
22078else
22079 echo "$as_me: failed program was:" >&5
22080sed 's/^/| /' conftest.$ac_ext >&5
22081
22082fi
22083rm -f conftest.err conftest.$ac_objext \
22084 conftest$ac_exeext conftest.$ac_ext
22085if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
22086
22087 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
22088 # Warning - without using the other run time loading flags,
22089 # -berok will link without error, but may produce a broken library.
22090 no_undefined_flag_CXX=' ${wl}-bernotok'
22091 allow_undefined_flag_CXX=' ${wl}-berok'
22092 # Exported symbols can be pulled into shared objects from archives
22093 whole_archive_flag_spec_CXX='$convenience'
22094 archive_cmds_need_lc_CXX=yes
22095 # This is similar to how AIX traditionally builds its shared
22096 # libraries.
22097 archive_expsym_cmds_CXX="\$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'
22098 fi
22099 fi
22100 ;;
22101
22102 beos*)
22103 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
22104 allow_undefined_flag_CXX=unsupported
22105 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
22106 # support --undefined. This deserves some investigation. FIXME
22107 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
22108 else
22109 ld_shlibs_CXX=no
22110 fi
22111 ;;
22112
22113 chorus*)
22114 case $cc_basename in
22115 *)
22116 # FIXME: insert proper C++ library support
22117 ld_shlibs_CXX=no
22118 ;;
22119 esac
22120 ;;
22121
22122 cygwin* | mingw* | pw32* | cegcc*)
22123 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
22124 # as there is no search path for DLLs.
22125 hardcode_libdir_flag_spec_CXX='-L$libdir'
22126 allow_undefined_flag_CXX=unsupported
22127 always_export_symbols_CXX=no
22128 enable_shared_with_static_runtimes_CXX=yes
22129
22130 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
22131 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
22132 # If the export-symbols file already is a .def file (1st line
22133 # is EXPORTS), use it as is; otherwise, prepend...
22134 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
22135 cp $export_symbols $output_objdir/$soname.def;
22136 else
22137 echo EXPORTS > $output_objdir/$soname.def;
22138 cat $export_symbols >> $output_objdir/$soname.def;
22139 fi~
22140 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
22141 else
22142 ld_shlibs_CXX=no
22143 fi
22144 ;;
22145 darwin* | rhapsody*)
22146
22147
22148 archive_cmds_need_lc_CXX=no
22149 hardcode_direct_CXX=no
22150 hardcode_automatic_CXX=yes
22151 hardcode_shlibpath_var_CXX=unsupported
22152 whole_archive_flag_spec_CXX=''
22153 link_all_deplibs_CXX=yes
22154 allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
22155 case $cc_basename in
22156 ifort*) _lt_dar_can_shared=yes ;;
22157 *) _lt_dar_can_shared=$GCC ;;
22158 esac
22159 if test "$_lt_dar_can_shared" = "yes"; then
22160 output_verbose_link_cmd=echo
22161 archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
22162 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
22163 archive_expsym_cmds_CXX="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 ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
22164 module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
22165 if test "$lt_cv_apple_cc_single_mod" != "yes"; then
22166 archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
22167 archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
22168 fi
22169
22170 else
22171 ld_shlibs_CXX=no
22172 fi
22173
22174 ;;
22175
22176 dgux*)
22177 case $cc_basename in
22178 ec++*)
22179 # FIXME: insert proper C++ library support
22180 ld_shlibs_CXX=no
22181 ;;
22182 ghcx*)
22183 # Green Hills C++ Compiler
22184 # FIXME: insert proper C++ library support
22185 ld_shlibs_CXX=no
22186 ;;
22187 *)
22188 # FIXME: insert proper C++ library support
22189 ld_shlibs_CXX=no
22190 ;;
22191 esac
22192 ;;
22193
22194 freebsd[12]*)
22195 # C++ shared libraries reported to be fairly broken before
22196 # switch to ELF
22197 ld_shlibs_CXX=no
22198 ;;
22199
22200 freebsd-elf*)
22201 archive_cmds_need_lc_CXX=no
22202 ;;
22203
22204 freebsd* | dragonfly*)
22205 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
22206 # conventions
22207 ld_shlibs_CXX=yes
22208 ;;
22209
22210 gnu*)
22211 ;;
22212
22213 hpux9*)
22214 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
22215 hardcode_libdir_separator_CXX=:
22216 export_dynamic_flag_spec_CXX='${wl}-E'
22217 hardcode_direct_CXX=yes
22218 hardcode_minus_L_CXX=yes # Not in the search PATH,
22219 # but as the default
22220 # location of the library.
22221
22222 case $cc_basename in
22223 CC*)
22224 # FIXME: insert proper C++ library support
22225 ld_shlibs_CXX=no
22226 ;;
22227 aCC*)
22228 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
22229 # Commands to make compiler produce verbose output that lists
22230 # what "hidden" libraries, object files and flags are used when
22231 # linking a shared library.
22232 #
22233 # There doesn't appear to be a way to prevent this compiler from
22234 # explicitly linking system object files so we need to strip them
22235 # from the output so that they don't get included in the library
22236 # dependencies.
22237 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
22238 ;;
22239 *)
22240 if test "$GXX" = yes; then
22241 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
22242 else
22243 # FIXME: insert proper C++ library support
22244 ld_shlibs_CXX=no
22245 fi
22246 ;;
22247 esac
22248 ;;
22249
22250 hpux10*|hpux11*)
22251 if test $with_gnu_ld = no; then
22252 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
22253 hardcode_libdir_separator_CXX=:
22254
22255 case $host_cpu in
22256 hppa*64*|ia64*)
22257 ;;
22258 *)
22259 export_dynamic_flag_spec_CXX='${wl}-E'
22260 ;;
22261 esac
22262 fi
22263 case $host_cpu in
22264 hppa*64*|ia64*)
22265 hardcode_direct_CXX=no
22266 hardcode_shlibpath_var_CXX=no
22267 ;;
22268 *)
22269 hardcode_direct_CXX=yes
22270 hardcode_direct_absolute_CXX=yes
22271 hardcode_minus_L_CXX=yes # Not in the search PATH,
22272 # but as the default
22273 # location of the library.
22274 ;;
22275 esac
22276
22277 case $cc_basename in
22278 CC*)
22279 # FIXME: insert proper C++ library support
22280 ld_shlibs_CXX=no
22281 ;;
22282 aCC*)
22283 case $host_cpu in
22284 hppa*64*)
22285 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
22286 ;;
22287 ia64*)
22288 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
22289 ;;
22290 *)
22291 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
22292 ;;
22293 esac
22294 # Commands to make compiler produce verbose output that lists
22295 # what "hidden" libraries, object files and flags are used when
22296 # linking a shared library.
22297 #
22298 # There doesn't appear to be a way to prevent this compiler from
22299 # explicitly linking system object files so we need to strip them
22300 # from the output so that they don't get included in the library
22301 # dependencies.
22302 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
22303 ;;
22304 *)
22305 if test "$GXX" = yes; then
22306 if test $with_gnu_ld = no; then
22307 case $host_cpu in
22308 hppa*64*)
22309 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
22310 ;;
22311 ia64*)
22312 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
22313 ;;
22314 *)
22315 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
22316 ;;
22317 esac
22318 fi
22319 else
22320 # FIXME: insert proper C++ library support
22321 ld_shlibs_CXX=no
22322 fi
22323 ;;
22324 esac
22325 ;;
22326
22327 interix[3-9]*)
22328 hardcode_direct_CXX=no
22329 hardcode_shlibpath_var_CXX=no
22330 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
22331 export_dynamic_flag_spec_CXX='${wl}-E'
22332 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
22333 # Instead, shared libraries are loaded at an image base (0x10000000 by
22334 # default) and relocated if they conflict, which is a slow very memory
22335 # consuming and fragmenting process. To avoid this, we pick a random,
22336 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
22337 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
22338 archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
22339 archive_expsym_cmds_CXX='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'
22340 ;;
22341 irix5* | irix6*)
22342 case $cc_basename in
22343 CC*)
22344 # SGI C++
22345 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
22346
22347 # Archives containing C++ object files must be created using
22348 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
22349 # necessary to make sure instantiated templates are included
22350 # in the archive.
22351 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
22352 ;;
22353 *)
22354 if test "$GXX" = yes; then
22355 if test "$with_gnu_ld" = no; then
22356 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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'
22357 else
22358 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
22359 fi
22360 fi
22361 link_all_deplibs_CXX=yes
22362 ;;
22363 esac
22364 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
22365 hardcode_libdir_separator_CXX=:
22366 inherit_rpath_CXX=yes
22367 ;;
22368
22369 linux* | k*bsd*-gnu | kopensolaris*-gnu)
22370 case $cc_basename in
22371 KCC*)
22372 # Kuck and Associates, Inc. (KAI) C++ Compiler
22373
22374 # KCC will only create a shared library if the output file
22375 # ends with ".so" (or ".sl" for HP-UX), so rename the library
22376 # to its proper name (with version) after linking.
22377 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
22378 archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
22379 # Commands to make compiler produce verbose output that lists
22380 # what "hidden" libraries, object files and flags are used when
22381 # linking a shared library.
22382 #
22383 # There doesn't appear to be a way to prevent this compiler from
22384 # explicitly linking system object files so we need to strip them
22385 # from the output so that they don't get included in the library
22386 # dependencies.
22387 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
22388
22389 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
22390 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
22391
22392 # Archives containing C++ object files must be created using
22393 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
22394 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
22395 ;;
22396 icpc* | ecpc* )
22397 # Intel C++
22398 with_gnu_ld=yes
22399 # version 8.0 and above of icpc choke on multiply defined symbols
22400 # if we add $predep_objects and $postdep_objects, however 7.1 and
22401 # earlier do not add the objects themselves.
22402 case `$CC -V 2>&1` in
22403 *"Version 7."*)
22404 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
22405 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
22406 ;;
22407 *) # Version 8.0 or newer
22408 tmp_idyn=
22409 case $host_cpu in
22410 ia64*) tmp_idyn=' -i_dynamic';;
22411 esac
22412 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
22413 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
22414 ;;
22415 esac
22416 archive_cmds_need_lc_CXX=no
22417 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
22418 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
22419 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
22420 ;;
22421 pgCC* | pgcpp*)
22422 # Portland Group C++ compiler
22423 case `$CC -V` in
22424 *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
22425 prelink_cmds_CXX='tpldir=Template.dir~
22426 rm -rf $tpldir~
22427 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
22428 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
22429 old_archive_cmds_CXX='tpldir=Template.dir~
22430 rm -rf $tpldir~
22431 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
22432 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
22433 $RANLIB $oldlib'
22434 archive_cmds_CXX='tpldir=Template.dir~
22435 rm -rf $tpldir~
22436 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
22437 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
22438 archive_expsym_cmds_CXX='tpldir=Template.dir~
22439 rm -rf $tpldir~
22440 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
22441 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
22442 ;;
22443 *) # Version 6 will use weak symbols
22444 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
22445 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
22446 ;;
22447 esac
22448
22449 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
22450 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
22451 whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
22452 ;;
22453 cxx*)
22454 # Compaq C++
22455 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
22456 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
22457
22458 runpath_var=LD_RUN_PATH
22459 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
22460 hardcode_libdir_separator_CXX=:
22461
22462 # Commands to make compiler produce verbose output that lists
22463 # what "hidden" libraries, object files and flags are used when
22464 # linking a shared library.
22465 #
22466 # There doesn't appear to be a way to prevent this compiler from
22467 # explicitly linking system object files so we need to strip them
22468 # from the output so that they don't get included in the library
22469 # dependencies.
22470 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
22471 ;;
22472 xl*)
22473 # IBM XL 8.0 on PPC, with GNU ld
22474 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
22475 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
22476 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
22477 if test "x$supports_anon_versioning" = xyes; then
22478 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
22479 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
22480 echo "local: *; };" >> $output_objdir/$libname.ver~
22481 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
22482 fi
22483 ;;
22484 *)
22485 case `$CC -V 2>&1 | sed 5q` in
22486 *Sun\ C*)
22487 # Sun C++ 5.9
22488 no_undefined_flag_CXX=' -zdefs'
22489 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
22490 archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
22491 hardcode_libdir_flag_spec_CXX='-R$libdir'
22492 whole_archive_flag_spec_CXX='${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'
22493 compiler_needs_object_CXX=yes
22494
22495 # Not sure whether something based on
22496 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
22497 # would be better.
22498 output_verbose_link_cmd='echo'
22499
22500 # Archives containing C++ object files must be created using
22501 # "CC -xar", where "CC" is the Sun C++ compiler. This is
22502 # necessary to make sure instantiated templates are included
22503 # in the archive.
22504 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
22505 ;;
22506 esac
22507 ;;
22508 esac
22509 ;;
22510
22511 lynxos*)
22512 # FIXME: insert proper C++ library support
22513 ld_shlibs_CXX=no
22514 ;;
22515
22516 m88k*)
22517 # FIXME: insert proper C++ library support
22518 ld_shlibs_CXX=no
22519 ;;
22520
22521 mvs*)
22522 case $cc_basename in
22523 cxx*)
22524 # FIXME: insert proper C++ library support
22525 ld_shlibs_CXX=no
22526 ;;
22527 *)
22528 # FIXME: insert proper C++ library support
22529 ld_shlibs_CXX=no
22530 ;;
22531 esac
22532 ;;
22533
22534 netbsd*)
22535 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
22536 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
22537 wlarc=
22538 hardcode_libdir_flag_spec_CXX='-R$libdir'
22539 hardcode_direct_CXX=yes
22540 hardcode_shlibpath_var_CXX=no
22541 fi
22542 # Workaround some broken pre-1.5 toolchains
22543 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
22544 ;;
22545
22546 *nto* | *qnx*)
22547 ld_shlibs_CXX=yes
22548 ;;
22549
22550 openbsd2*)
22551 # C++ shared libraries are fairly broken
22552 ld_shlibs_CXX=no
22553 ;;
22554
22555 openbsd*)
22556 if test -f /usr/libexec/ld.so; then
22557 hardcode_direct_CXX=yes
22558 hardcode_shlibpath_var_CXX=no
22559 hardcode_direct_absolute_CXX=yes
22560 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
22561 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
22562 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
22563 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
22564 export_dynamic_flag_spec_CXX='${wl}-E'
22565 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
22566 fi
22567 output_verbose_link_cmd=echo
22568 else
22569 ld_shlibs_CXX=no
22570 fi
22571 ;;
22572
22573 osf3* | osf4* | osf5*)
22574 case $cc_basename in
22575 KCC*)
22576 # Kuck and Associates, Inc. (KAI) C++ Compiler
22577
22578 # KCC will only create a shared library if the output file
22579 # ends with ".so" (or ".sl" for HP-UX), so rename the library
22580 # to its proper name (with version) after linking.
22581 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
22582
22583 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
22584 hardcode_libdir_separator_CXX=:
22585
22586 # Archives containing C++ object files must be created using
22587 # the KAI C++ compiler.
22588 case $host in
22589 osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
22590 *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
22591 esac
22592 ;;
22593 RCC*)
22594 # Rational C++ 2.4.1
22595 # FIXME: insert proper C++ library support
22596 ld_shlibs_CXX=no
22597 ;;
22598 cxx*)
22599 case $host in
22600 osf3*)
22601 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
22602 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
22603 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
22604 ;;
22605 *)
22606 allow_undefined_flag_CXX=' -expect_unresolved \*'
22607 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
22608 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
22609 echo "-hidden">> $lib.exp~
22610 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
22611 $RM $lib.exp'
22612 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
22613 ;;
22614 esac
22615
22616 hardcode_libdir_separator_CXX=:
22617
22618 # Commands to make compiler produce verbose output that lists
22619 # what "hidden" libraries, object files and flags are used when
22620 # linking a shared library.
22621 #
22622 # There doesn't appear to be a way to prevent this compiler from
22623 # explicitly linking system object files so we need to strip them
22624 # from the output so that they don't get included in the library
22625 # dependencies.
22626 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
22627 ;;
22628 *)
22629 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
22630 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
22631 case $host in
22632 osf3*)
22633 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'
22634 ;;
22635 *)
22636 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
22637 ;;
22638 esac
22639
22640 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
22641 hardcode_libdir_separator_CXX=:
22642
22643 # Commands to make compiler produce verbose output that lists
22644 # what "hidden" libraries, object files and flags are used when
22645 # linking a shared library.
22646 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
22647
22648 else
22649 # FIXME: insert proper C++ library support
22650 ld_shlibs_CXX=no
22651 fi
22652 ;;
22653 esac
22654 ;;
22655
22656 psos*)
22657 # FIXME: insert proper C++ library support
22658 ld_shlibs_CXX=no
22659 ;;
22660
22661 sunos4*)
22662 case $cc_basename in
22663 CC*)
22664 # Sun C++ 4.x
22665 # FIXME: insert proper C++ library support
22666 ld_shlibs_CXX=no
22667 ;;
22668 lcc*)
22669 # Lucid
22670 # FIXME: insert proper C++ library support
22671 ld_shlibs_CXX=no
22672 ;;
22673 *)
22674 # FIXME: insert proper C++ library support
22675 ld_shlibs_CXX=no
22676 ;;
22677 esac
22678 ;;
22679
22680 solaris*)
22681 case $cc_basename in
22682 CC*)
22683 # Sun C++ 4.2, 5.x and Centerline C++
22684 archive_cmds_need_lc_CXX=yes
22685 no_undefined_flag_CXX=' -zdefs'
22686 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
22687 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
22688 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
22689
22690 hardcode_libdir_flag_spec_CXX='-R$libdir'
22691 hardcode_shlibpath_var_CXX=no
22692 case $host_os in
22693 solaris2.[0-5] | solaris2.[0-5].*) ;;
22694 *)
22695 # The compiler driver will combine and reorder linker options,
22696 # but understands `-z linker_flag'.
22697 # Supported since Solaris 2.6 (maybe 2.5.1?)
22698 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
22699 ;;
22700 esac
22701 link_all_deplibs_CXX=yes
22702
22703 output_verbose_link_cmd='echo'
22704
22705 # Archives containing C++ object files must be created using
22706 # "CC -xar", where "CC" is the Sun C++ compiler. This is
22707 # necessary to make sure instantiated templates are included
22708 # in the archive.
22709 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
22710 ;;
22711 gcx*)
22712 # Green Hills C++ Compiler
22713 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
22714
22715 # The C++ compiler must be used to create the archive.
22716 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
22717 ;;
22718 *)
22719 # GNU C++ compiler with Solaris linker
22720 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
22721 no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
22722 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
22723 archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
22724 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
22725 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
22726
22727 # Commands to make compiler produce verbose output that lists
22728 # what "hidden" libraries, object files and flags are used when
22729 # linking a shared library.
22730 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
22731 else
22732 # g++ 2.7 appears to require `-G' NOT `-shared' on this
22733 # platform.
22734 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
22735 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
22736 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
22737
22738 # Commands to make compiler produce verbose output that lists
22739 # what "hidden" libraries, object files and flags are used when
22740 # linking a shared library.
22741 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
22742 fi
22743
22744 hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
22745 case $host_os in
22746 solaris2.[0-5] | solaris2.[0-5].*) ;;
22747 *)
22748 whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
22749 ;;
22750 esac
22751 fi
22752 ;;
22753 esac
22754 ;;
22755
22756 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
22757 no_undefined_flag_CXX='${wl}-z,text'
22758 archive_cmds_need_lc_CXX=no
22759 hardcode_shlibpath_var_CXX=no
22760 runpath_var='LD_RUN_PATH'
22761
22762 case $cc_basename in
22763 CC*)
22764 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22765 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22766 ;;
22767 *)
22768 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22769 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22770 ;;
22771 esac
22772 ;;
22773
22774 sysv5* | sco3.2v5* | sco5v6*)
22775 # Note: We can NOT use -z defs as we might desire, because we do not
22776 # link with -lc, and that would cause any symbols used from libc to
22777 # always be unresolved, which means just about no library would
22778 # ever link correctly. If we're not using GNU ld we use -z text
22779 # though, which does catch some bad symbols but isn't as heavy-handed
22780 # as -z defs.
22781 no_undefined_flag_CXX='${wl}-z,text'
22782 allow_undefined_flag_CXX='${wl}-z,nodefs'
22783 archive_cmds_need_lc_CXX=no
22784 hardcode_shlibpath_var_CXX=no
22785 hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
22786 hardcode_libdir_separator_CXX=':'
22787 link_all_deplibs_CXX=yes
22788 export_dynamic_flag_spec_CXX='${wl}-Bexport'
22789 runpath_var='LD_RUN_PATH'
22790
22791 case $cc_basename in
22792 CC*)
22793 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22794 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22795 ;;
22796 *)
22797 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22798 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22799 ;;
22800 esac
22801 ;;
22802
22803 tandem*)
22804 case $cc_basename in
22805 NCC*)
22806 # NonStop-UX NCC 3.20
22807 # FIXME: insert proper C++ library support
22808 ld_shlibs_CXX=no
22809 ;;
22810 *)
22811 # FIXME: insert proper C++ library support
22812 ld_shlibs_CXX=no
22813 ;;
22814 esac
22815 ;;
22816
22817 vxworks*)
22818 # FIXME: insert proper C++ library support
22819 ld_shlibs_CXX=no
22820 ;;
22821
22822 *)
22823 # FIXME: insert proper C++ library support
22824 ld_shlibs_CXX=no
22825 ;;
22826 esac
22827
22828 echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
22829echo "${ECHO_T}$ld_shlibs_CXX" >&6
22830 test "$ld_shlibs_CXX" = no && can_build_shared=no
22831
22832 GCC_CXX="$GXX"
22833 LD_CXX="$LD"
22834
22835 ## CAVEAT EMPTOR:
22836 ## There is no encapsulation within the following macros, do not change
22837 ## the running order or otherwise move them around unless you know exactly
22838 ## what you are doing...
22839 # Dependencies to place before and after the object being linked:
22840predep_objects_CXX=
22841postdep_objects_CXX=
22842predeps_CXX=
22843postdeps_CXX=
22844compiler_lib_search_path_CXX=
22845
22846cat > conftest.$ac_ext <<_LT_EOF
22847class Foo
22848{
22849public:
22850 Foo (void) { a = 0; }
22851private:
22852 int a;
22853};
22854_LT_EOF
22855
22856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22857 (eval $ac_compile) 2>&5
22858 ac_status=$?
22859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22860 (exit $ac_status); }; then
22861 # Parse the compiler output and extract the necessary
22862 # objects, libraries and library flags.
22863
22864 # Sentinel used to keep track of whether or not we are before
22865 # the conftest object file.
22866 pre_test_object_deps_done=no
22867
22868 for p in `eval "$output_verbose_link_cmd"`; do
22869 case $p in
22870
22871 -L* | -R* | -l*)
22872 # Some compilers place space between "-{L,R}" and the path.
22873 # Remove the space.
22874 if test $p = "-L" ||
22875 test $p = "-R"; then
22876 prev=$p
22877 continue
22878 else
22879 prev=
22880 fi
22881
22882 if test "$pre_test_object_deps_done" = no; then
22883 case $p in
22884 -L* | -R*)
22885 # Internal compiler library paths should come after those
22886 # provided the user. The postdeps already come after the
22887 # user supplied libs so there is no need to process them.
22888 if test -z "$compiler_lib_search_path_CXX"; then
22889 compiler_lib_search_path_CXX="${prev}${p}"
22890 else
22891 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
22892 fi
22893 ;;
22894 # The "-l" case would never come before the object being
22895 # linked, so don't bother handling this case.
22896 esac
22897 else
22898 if test -z "$postdeps_CXX"; then
22899 postdeps_CXX="${prev}${p}"
22900 else
22901 postdeps_CXX="${postdeps_CXX} ${prev}${p}"
22902 fi
22903 fi
22904 ;;
22905
22906 *.$objext)
22907 # This assumes that the test object file only shows up
22908 # once in the compiler output.
22909 if test "$p" = "conftest.$objext"; then
22910 pre_test_object_deps_done=yes
22911 continue
22912 fi
22913
22914 if test "$pre_test_object_deps_done" = no; then
22915 if test -z "$predep_objects_CXX"; then
22916 predep_objects_CXX="$p"
22917 else
22918 predep_objects_CXX="$predep_objects_CXX $p"
22919 fi
22920 else
22921 if test -z "$postdep_objects_CXX"; then
22922 postdep_objects_CXX="$p"
22923 else
22924 postdep_objects_CXX="$postdep_objects_CXX $p"
22925 fi
22926 fi
22927 ;;
22928
22929 *) ;; # Ignore the rest.
22930
22931 esac
22932 done
22933
22934 # Clean up.
22935 rm -f a.out a.exe
22936else
22937 echo "libtool.m4: error: problem compiling CXX test program"
22938fi
22939
22940$RM -f confest.$objext
22941
22942# PORTME: override above test on systems where it is broken
22943case $host_os in
22944interix[3-9]*)
22945 # Interix 3.5 installs completely hosed .la files for C++, so rather than
22946 # hack all around it, let's just trust "g++" to DTRT.
22947 predep_objects_CXX=
22948 postdep_objects_CXX=
22949 postdeps_CXX=
22950 ;;
22951
22952linux*)
22953 case `$CC -V 2>&1 | sed 5q` in
22954 *Sun\ C*)
22955 # Sun C++ 5.9
22956
22957 # The more standards-conforming stlport4 library is
22958 # incompatible with the Cstd library. Avoid specifying
22959 # it if it's in CXXFLAGS. Ignore libCrun as
22960 # -library=stlport4 depends on it.
22961 case " $CXX $CXXFLAGS " in
22962 *" -library=stlport4 "*)
22963 solaris_use_stlport4=yes
22964 ;;
22965 esac
22966
22967 if test "$solaris_use_stlport4" != yes; then
22968 postdeps_CXX='-library=Cstd -library=Crun'
22969 fi
22970 ;;
22971 esac
22972 ;;
22973
22974solaris*)
22975 case $cc_basename in
22976 CC*)
22977 # The more standards-conforming stlport4 library is
22978 # incompatible with the Cstd library. Avoid specifying
22979 # it if it's in CXXFLAGS. Ignore libCrun as
22980 # -library=stlport4 depends on it.
22981 case " $CXX $CXXFLAGS " in
22982 *" -library=stlport4 "*)
22983 solaris_use_stlport4=yes
22984 ;;
22985 esac
22986
22987 # Adding this requires a known-good setup of shared libraries for
22988 # Sun compiler versions before 5.6, else PIC objects from an old
22989 # archive will be linked into the output, leading to subtle bugs.
22990 if test "$solaris_use_stlport4" != yes; then
22991 postdeps_CXX='-library=Cstd -library=Crun'
22992 fi
22993 ;;
22994 esac
22995 ;;
22996esac
22997
22998
22999case " $postdeps_CXX " in
23000*" -lc "*) archive_cmds_need_lc_CXX=no ;;
23001esac
23002 compiler_lib_search_dirs_CXX=
23003if test -n "${compiler_lib_search_path_CXX}"; then
23004 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
23005fi
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037 lt_prog_compiler_wl_CXX=
23038lt_prog_compiler_pic_CXX=
23039lt_prog_compiler_static_CXX=
23040
23041echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
23042echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
23043
23044 # C++ specific cases for pic, static, wl, etc.
23045 if test "$GXX" = yes; then
23046 lt_prog_compiler_wl_CXX='-Wl,'
23047 lt_prog_compiler_static_CXX='-static'
23048
23049 case $host_os in
23050 aix*)
23051 # All AIX code is PIC.
23052 if test "$host_cpu" = ia64; then
23053 # AIX 5 now supports IA64 processor
23054 lt_prog_compiler_static_CXX='-Bstatic'
23055 fi
23056 ;;
23057
23058 amigaos*)
23059 case $host_cpu in
23060 powerpc)
23061 # see comment about AmigaOS4 .so support
23062 lt_prog_compiler_pic_CXX='-fPIC'
23063 ;;
23064 m68k)
23065 # FIXME: we need at least 68020 code to build shared libraries, but
23066 # adding the `-m68020' flag to GCC prevents building anything better,
23067 # like `-m68040'.
23068 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
23069 ;;
23070 esac
23071 ;;
23072
23073 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
23074 # PIC is the default for these OSes.
23075 ;;
23076 mingw* | cygwin* | os2* | pw32* | cegcc*)
23077 # This hack is so that the source file can tell whether it is being
23078 # built for inclusion in a dll (and should export symbols for example).
23079 # Although the cygwin gcc ignores -fPIC, still need this for old-style
23080 # (--disable-auto-import) libraries
23081 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
23082 ;;
23083 darwin* | rhapsody*)
23084 # PIC is the default on this platform
23085 # Common symbols not allowed in MH_DYLIB files
23086 lt_prog_compiler_pic_CXX='-fno-common'
23087 ;;
23088 *djgpp*)
23089 # DJGPP does not support shared libraries at all
23090 lt_prog_compiler_pic_CXX=
23091 ;;
23092 interix[3-9]*)
23093 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
23094 # Instead, we relocate shared libraries at runtime.
23095 ;;
23096 sysv4*MP*)
23097 if test -d /usr/nec; then
23098 lt_prog_compiler_pic_CXX=-Kconform_pic
23099 fi
23100 ;;
23101 hpux*)
23102 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
23103 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
23104 # sets the default TLS model and affects inlining.
23105 case $host_cpu in
23106 hppa*64*)
23107 ;;
23108 *)
23109 lt_prog_compiler_pic_CXX='-fPIC'
23110 ;;
23111 esac
23112 ;;
23113 *qnx* | *nto*)
23114 # QNX uses GNU C++, but need to define -shared option too, otherwise
23115 # it will coredump.
23116 lt_prog_compiler_pic_CXX='-fPIC -shared'
23117 ;;
23118 *)
23119 lt_prog_compiler_pic_CXX='-fPIC'
23120 ;;
23121 esac
23122 else
23123 case $host_os in
23124 aix[4-9]*)
23125 # All AIX code is PIC.
23126 if test "$host_cpu" = ia64; then
23127 # AIX 5 now supports IA64 processor
23128 lt_prog_compiler_static_CXX='-Bstatic'
23129 else
23130 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
23131 fi
23132 ;;
23133 chorus*)
23134 case $cc_basename in
23135 cxch68*)
23136 # Green Hills C++ Compiler
23137 # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
23138 ;;
23139 esac
23140 ;;
23141 dgux*)
23142 case $cc_basename in
23143 ec++*)
23144 lt_prog_compiler_pic_CXX='-KPIC'
23145 ;;
23146 ghcx*)
23147 # Green Hills C++ Compiler
23148 lt_prog_compiler_pic_CXX='-pic'
23149 ;;
23150 *)
23151 ;;
23152 esac
23153 ;;
23154 freebsd* | dragonfly*)
23155 # FreeBSD uses GNU C++
23156 ;;
23157 hpux9* | hpux10* | hpux11*)
23158 case $cc_basename in
23159 CC*)
23160 lt_prog_compiler_wl_CXX='-Wl,'
23161 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
23162 if test "$host_cpu" != ia64; then
23163 lt_prog_compiler_pic_CXX='+Z'
23164 fi
23165 ;;
23166 aCC*)
23167 lt_prog_compiler_wl_CXX='-Wl,'
23168 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
23169 case $host_cpu in
23170 hppa*64*|ia64*)
23171 # +Z the default
23172 ;;
23173 *)
23174 lt_prog_compiler_pic_CXX='+Z'
23175 ;;
23176 esac
23177 ;;
23178 *)
23179 ;;
23180 esac
23181 ;;
23182 interix*)
23183 # This is c89, which is MS Visual C++ (no shared libs)
23184 # Anyone wants to do a port?
23185 ;;
23186 irix5* | irix6* | nonstopux*)
23187 case $cc_basename in
23188 CC*)
23189 lt_prog_compiler_wl_CXX='-Wl,'
23190 lt_prog_compiler_static_CXX='-non_shared'
23191 # CC pic flag -KPIC is the default.
23192 ;;
23193 *)
23194 ;;
23195 esac
23196 ;;
23197 linux* | k*bsd*-gnu | kopensolaris*-gnu)
23198 case $cc_basename in
23199 KCC*)
23200 # KAI C++ Compiler
23201 lt_prog_compiler_wl_CXX='--backend -Wl,'
23202 lt_prog_compiler_pic_CXX='-fPIC'
23203 ;;
23204 ecpc* )
23205 # old Intel C++ for x86_64 which still supported -KPIC.
23206 lt_prog_compiler_wl_CXX='-Wl,'
23207 lt_prog_compiler_pic_CXX='-KPIC'
23208 lt_prog_compiler_static_CXX='-static'
23209 ;;
23210 icpc* )
23211 # Intel C++, used to be incompatible with GCC.
23212 # ICC 10 doesn't accept -KPIC any more.
23213 lt_prog_compiler_wl_CXX='-Wl,'
23214 lt_prog_compiler_pic_CXX='-fPIC'
23215 lt_prog_compiler_static_CXX='-static'
23216 ;;
23217 pgCC* | pgcpp*)
23218 # Portland Group C++ compiler
23219 lt_prog_compiler_wl_CXX='-Wl,'
23220 lt_prog_compiler_pic_CXX='-fpic'
23221 lt_prog_compiler_static_CXX='-Bstatic'
23222 ;;
23223 cxx*)
23224 # Compaq C++
23225 # Make sure the PIC flag is empty. It appears that all Alpha
23226 # Linux and Compaq Tru64 Unix objects are PIC.
23227 lt_prog_compiler_pic_CXX=
23228 lt_prog_compiler_static_CXX='-non_shared'
23229 ;;
23230 xlc* | xlC*)
23231 # IBM XL 8.0 on PPC
23232 lt_prog_compiler_wl_CXX='-Wl,'
23233 lt_prog_compiler_pic_CXX='-qpic'
23234 lt_prog_compiler_static_CXX='-qstaticlink'
23235 ;;
23236 *)
23237 case `$CC -V 2>&1 | sed 5q` in
23238 *Sun\ C*)
23239 # Sun C++ 5.9
23240 lt_prog_compiler_pic_CXX='-KPIC'
23241 lt_prog_compiler_static_CXX='-Bstatic'
23242 lt_prog_compiler_wl_CXX='-Qoption ld '
23243 ;;
23244 esac
23245 ;;
23246 esac
23247 ;;
23248 lynxos*)
23249 ;;
23250 m88k*)
23251 ;;
23252 mvs*)
23253 case $cc_basename in
23254 cxx*)
23255 lt_prog_compiler_pic_CXX='-W c,exportall'
23256 ;;
23257 *)
23258 ;;
23259 esac
23260 ;;
23261 netbsd*)
23262 ;;
23263 *qnx* | *nto*)
23264 # QNX uses GNU C++, but need to define -shared option too, otherwise
23265 # it will coredump.
23266 lt_prog_compiler_pic_CXX='-fPIC -shared'
23267 ;;
23268 osf3* | osf4* | osf5*)
23269 case $cc_basename in
23270 KCC*)
23271 lt_prog_compiler_wl_CXX='--backend -Wl,'
23272 ;;
23273 RCC*)
23274 # Rational C++ 2.4.1
23275 lt_prog_compiler_pic_CXX='-pic'
23276 ;;
23277 cxx*)
23278 # Digital/Compaq C++
23279 lt_prog_compiler_wl_CXX='-Wl,'
23280 # Make sure the PIC flag is empty. It appears that all Alpha
23281 # Linux and Compaq Tru64 Unix objects are PIC.
23282 lt_prog_compiler_pic_CXX=
23283 lt_prog_compiler_static_CXX='-non_shared'
23284 ;;
23285 *)
23286 ;;
23287 esac
23288 ;;
23289 psos*)
23290 ;;
23291 solaris*)
23292 case $cc_basename in
23293 CC*)
23294 # Sun C++ 4.2, 5.x and Centerline C++
23295 lt_prog_compiler_pic_CXX='-KPIC'
23296 lt_prog_compiler_static_CXX='-Bstatic'
23297 lt_prog_compiler_wl_CXX='-Qoption ld '
23298 ;;
23299 gcx*)
23300 # Green Hills C++ Compiler
23301 lt_prog_compiler_pic_CXX='-PIC'
23302 ;;
23303 *)
23304 ;;
23305 esac
23306 ;;
23307 sunos4*)
23308 case $cc_basename in
23309 CC*)
23310 # Sun C++ 4.x
23311 lt_prog_compiler_pic_CXX='-pic'
23312 lt_prog_compiler_static_CXX='-Bstatic'
23313 ;;
23314 lcc*)
23315 # Lucid
23316 lt_prog_compiler_pic_CXX='-pic'
23317 ;;
23318 *)
23319 ;;
23320 esac
23321 ;;
23322 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
23323 case $cc_basename in
23324 CC*)
23325 lt_prog_compiler_wl_CXX='-Wl,'
23326 lt_prog_compiler_pic_CXX='-KPIC'
23327 lt_prog_compiler_static_CXX='-Bstatic'
23328 ;;
23329 esac
23330 ;;
23331 tandem*)
23332 case $cc_basename in
23333 NCC*)
23334 # NonStop-UX NCC 3.20
23335 lt_prog_compiler_pic_CXX='-KPIC'
23336 ;;
23337 *)
23338 ;;
23339 esac
23340 ;;
23341 vxworks*)
23342 ;;
23343 *)
23344 lt_prog_compiler_can_build_shared_CXX=no
23345 ;;
23346 esac
23347 fi
23348
23349case $host_os in
23350 # For platforms which do not support PIC, -DPIC is meaningless:
23351 *djgpp*)
23352 lt_prog_compiler_pic_CXX=
23353 ;;
23354 *)
23355 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
23356 ;;
23357esac
23358echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
23359echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
23360
23361
23362
23363#
23364# Check to make sure the PIC flag actually works.
23365#
23366if test -n "$lt_prog_compiler_pic_CXX"; then
23367 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
23368echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
23369if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then
23370 echo $ECHO_N "(cached) $ECHO_C" >&6
23371else
23372 lt_cv_prog_compiler_pic_works_CXX=no
23373 ac_outfile=conftest.$ac_objext
23374 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
23375 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
23376 # Insert the option either (1) after the last *FLAGS variable, or
23377 # (2) before a word containing "conftest.", or (3) at the end.
23378 # Note that $ac_compile itself does not contain backslashes and begins
23379 # with a dollar sign (not a hyphen), so the echo should work correctly.
23380 # The option is referenced via a variable to avoid confusing sed.
23381 lt_compile=`echo "$ac_compile" | $SED \
23382 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
23383 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
23384 -e 's:$: $lt_compiler_flag:'`
23385 (eval echo "\"\$as_me:23385: $lt_compile\"" >&5)
23386 (eval "$lt_compile" 2>conftest.err)
23387 ac_status=$?
23388 cat conftest.err >&5
23389 echo "$as_me:23389: \$? = $ac_status" >&5
23390 if (exit $ac_status) && test -s "$ac_outfile"; then
23391 # The compiler can only warn and ignore the option if not recognized
23392 # So say no if there are warnings other than the usual output.
23393 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
23394 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
23395 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
23396 lt_cv_prog_compiler_pic_works_CXX=yes
23397 fi
23398 fi
23399 $RM conftest*
23400
23401fi
23402echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
23403echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6
23404
23405if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
23406 case $lt_prog_compiler_pic_CXX in
23407 "" | " "*) ;;
23408 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
23409 esac
23410else
23411 lt_prog_compiler_pic_CXX=
23412 lt_prog_compiler_can_build_shared_CXX=no
23413fi
23414
23415fi
23416
23417
23418
23419#
23420# Check to make sure the static flag actually works.
23421#
23422wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
23423echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
23424echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
23425if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then
23426 echo $ECHO_N "(cached) $ECHO_C" >&6
23427else
23428 lt_cv_prog_compiler_static_works_CXX=no
23429 save_LDFLAGS="$LDFLAGS"
23430 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
23431 echo "$lt_simple_link_test_code" > conftest.$ac_ext
23432 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
23433 # The linker can only warn and ignore the option if not recognized
23434 # So say no if there are warnings
23435 if test -s conftest.err; then
23436 # Append any errors to the config.log.
23437 cat conftest.err 1>&5
23438 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
23439 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
23440 if diff conftest.exp conftest.er2 >/dev/null; then
23441 lt_cv_prog_compiler_static_works_CXX=yes
23442 fi
23443 else
23444 lt_cv_prog_compiler_static_works_CXX=yes
23445 fi
23446 fi
23447 $RM -r conftest*
23448 LDFLAGS="$save_LDFLAGS"
23449
23450fi
23451echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5
23452echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6
23453
23454if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
23455 :
23456else
23457 lt_prog_compiler_static_CXX=
23458fi
23459
23460
23461
23462
23463 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
23464echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
23465if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
23466 echo $ECHO_N "(cached) $ECHO_C" >&6
23467else
23468 lt_cv_prog_compiler_c_o_CXX=no
23469 $RM -r conftest 2>/dev/null
23470 mkdir conftest
23471 cd conftest
23472 mkdir out
23473 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
23474
23475 lt_compiler_flag="-o out/conftest2.$ac_objext"
23476 # Insert the option either (1) after the last *FLAGS variable, or
23477 # (2) before a word containing "conftest.", or (3) at the end.
23478 # Note that $ac_compile itself does not contain backslashes and begins
23479 # with a dollar sign (not a hyphen), so the echo should work correctly.
23480 lt_compile=`echo "$ac_compile" | $SED \
23481 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
23482 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
23483 -e 's:$: $lt_compiler_flag:'`
23484 (eval echo "\"\$as_me:23484: $lt_compile\"" >&5)
23485 (eval "$lt_compile" 2>out/conftest.err)
23486 ac_status=$?
23487 cat out/conftest.err >&5
23488 echo "$as_me:23488: \$? = $ac_status" >&5
23489 if (exit $ac_status) && test -s out/conftest2.$ac_objext
23490 then
23491 # The compiler can only warn and ignore the option if not recognized
23492 # So say no if there are warnings
23493 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
23494 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
23495 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
23496 lt_cv_prog_compiler_c_o_CXX=yes
23497 fi
23498 fi
23499 chmod u+w . 2>&5
23500 $RM conftest*
23501 # SGI C++ compiler will create directory out/ii_files/ for
23502 # template instantiation
23503 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
23504 $RM out/* && rmdir out
23505 cd ..
23506 $RM -r conftest
23507 $RM conftest*
23508
23509fi
23510echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
23511echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
23512
23513
23514
23515 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
23516echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
23517if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
23518 echo $ECHO_N "(cached) $ECHO_C" >&6
23519else
23520 lt_cv_prog_compiler_c_o_CXX=no
23521 $RM -r conftest 2>/dev/null
23522 mkdir conftest
23523 cd conftest
23524 mkdir out
23525 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
23526
23527 lt_compiler_flag="-o out/conftest2.$ac_objext"
23528 # Insert the option either (1) after the last *FLAGS variable, or
23529 # (2) before a word containing "conftest.", or (3) at the end.
23530 # Note that $ac_compile itself does not contain backslashes and begins
23531 # with a dollar sign (not a hyphen), so the echo should work correctly.
23532 lt_compile=`echo "$ac_compile" | $SED \
23533 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
23534 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
23535 -e 's:$: $lt_compiler_flag:'`
23536 (eval echo "\"\$as_me:23536: $lt_compile\"" >&5)
23537 (eval "$lt_compile" 2>out/conftest.err)
23538 ac_status=$?
23539 cat out/conftest.err >&5
23540 echo "$as_me:23540: \$? = $ac_status" >&5
23541 if (exit $ac_status) && test -s out/conftest2.$ac_objext
23542 then
23543 # The compiler can only warn and ignore the option if not recognized
23544 # So say no if there are warnings
23545 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
23546 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
23547 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
23548 lt_cv_prog_compiler_c_o_CXX=yes
23549 fi
23550 fi
23551 chmod u+w . 2>&5
23552 $RM conftest*
23553 # SGI C++ compiler will create directory out/ii_files/ for
23554 # template instantiation
23555 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
23556 $RM out/* && rmdir out
23557 cd ..
23558 $RM -r conftest
23559 $RM conftest*
23560
23561fi
23562echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
23563echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
23564
23565
23566
23567
23568hard_links="nottested"
23569if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
23570 # do not overwrite the value of need_locks provided by the user
23571 echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
23572echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
23573 hard_links=yes
23574 $RM conftest*
23575 ln conftest.a conftest.b 2>/dev/null && hard_links=no
23576 touch conftest.a
23577 ln conftest.a conftest.b 2>&5 || hard_links=no
23578 ln conftest.a conftest.b 2>/dev/null && hard_links=no
23579 echo "$as_me:$LINENO: result: $hard_links" >&5
23580echo "${ECHO_T}$hard_links" >&6
23581 if test "$hard_links" = no; then
23582 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
23583echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
23584 need_locks=warn
23585 fi
23586else
23587 need_locks=no
23588fi
23589
23590
23591
23592 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
23593echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
23594
23595 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
23596 case $host_os in
23597 aix[4-9]*)
23598 # If we're using GNU nm, then we don't want the "-C" option.
23599 # -C means demangle to AIX nm, but means don't demangle with GNU nm
23600 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
23601 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
23602 else
23603 export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
23604 fi
23605 ;;
23606 pw32*)
23607 export_symbols_cmds_CXX="$ltdll_cmds"
23608 ;;
23609 cygwin* | mingw* | cegcc*)
23610 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
23611 ;;
23612 *)
23613 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
23614 ;;
23615 esac
23616 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
23617
23618echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
23619echo "${ECHO_T}$ld_shlibs_CXX" >&6
23620test "$ld_shlibs_CXX" = no && can_build_shared=no
23621
23622with_gnu_ld_CXX=$with_gnu_ld
23623
23624
23625
23626
23627
23628
23629#
23630# Do we need to explicitly link libc?
23631#
23632case "x$archive_cmds_need_lc_CXX" in
23633x|xyes)
23634 # Assume -lc should be added
23635 archive_cmds_need_lc_CXX=yes
23636
23637 if test "$enable_shared" = yes && test "$GCC" = yes; then
23638 case $archive_cmds_CXX in
23639 *'~'*)
23640 # FIXME: we may have to deal with multi-command sequences.
23641 ;;
23642 '$CC '*)
23643 # Test whether the compiler implicitly links with -lc since on some
23644 # systems, -lgcc has to come before -lc. If gcc already passes -lc
23645 # to ld, don't add -lc before -lgcc.
23646 echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
23647echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
23648if test "${lt_cv_archive_cmds_need_lc_CXX+set}" = set; then
23649 echo $ECHO_N "(cached) $ECHO_C" >&6
23650else
23651 $RM conftest*
23652 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
23653
23654 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23655 (eval $ac_compile) 2>&5
23656 ac_status=$?
23657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23658 (exit $ac_status); } 2>conftest.err; then
23659 soname=conftest
23660 lib=conftest
23661 libobjs=conftest.$ac_objext
23662 deplibs=
23663 wl=$lt_prog_compiler_wl_CXX
23664 pic_flag=$lt_prog_compiler_pic_CXX
23665 compiler_flags=-v
23666 linker_flags=-v
23667 verstring=
23668 output_objdir=.
23669 libname=conftest
23670 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
23671 allow_undefined_flag_CXX=
23672 if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
23673 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
23674 ac_status=$?
23675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23676 (exit $ac_status); }
23677 then
23678 lt_cv_archive_cmds_need_lc_CXX=no
23679 else
23680 lt_cv_archive_cmds_need_lc_CXX=yes
23681 fi
23682 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
23683 else
23684 cat conftest.err 1>&5
23685 fi
23686 $RM conftest*
23687
23688fi
23689echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
23690echo "${ECHO_T}$lt_cv_archive_cmds_need_lc_CXX" >&6
23691 archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
23692 ;;
23693 esac
23694 fi
23695 ;;
23696esac
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
23762echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
23763
23764library_names_spec=
23765libname_spec='lib$name'
23766soname_spec=
23767shrext_cmds=".so"
23768postinstall_cmds=
23769postuninstall_cmds=
23770finish_cmds=
23771finish_eval=
23772shlibpath_var=
23773shlibpath_overrides_runpath=unknown
23774version_type=none
23775dynamic_linker="$host_os ld.so"
23776sys_lib_dlsearch_path_spec="/lib /usr/lib"
23777need_lib_prefix=unknown
23778hardcode_into_libs=no
23779
23780# when you set need_version to no, make sure it does not cause -set_version
23781# flags to be left without arguments
23782need_version=unknown
23783
23784case $host_os in
23785aix3*)
23786 version_type=linux
23787 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
23788 shlibpath_var=LIBPATH
23789
23790 # AIX 3 has no versioning support, so we append a major version to the name.
23791 soname_spec='${libname}${release}${shared_ext}$major'
23792 ;;
23793
23794aix[4-9]*)
23795 version_type=linux
23796 need_lib_prefix=no
23797 need_version=no
23798 hardcode_into_libs=yes
23799 if test "$host_cpu" = ia64; then
23800 # AIX 5 supports IA64
23801 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
23802 shlibpath_var=LD_LIBRARY_PATH
23803 else
23804 # With GCC up to 2.95.x, collect2 would create an import file
23805 # for dependence libraries. The import file would start with
23806 # the line `#! .'. This would cause the generated library to
23807 # depend on `.', always an invalid library. This was fixed in
23808 # development snapshots of GCC prior to 3.0.
23809 case $host_os in
23810 aix4 | aix4.[01] | aix4.[01].*)
23811 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
23812 echo ' yes '
23813 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
23814 :
23815 else
23816 can_build_shared=no
23817 fi
23818 ;;
23819 esac
23820 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
23821 # soname into executable. Probably we can add versioning support to
23822 # collect2, so additional links can be useful in future.
23823 if test "$aix_use_runtimelinking" = yes; then
23824 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
23825 # instead of lib<name>.a to let people know that these are not
23826 # typical AIX shared libraries.
23827 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
23828 else
23829 # We preserve .a as extension for shared libraries through AIX4.2
23830 # and later when we are not doing run time linking.
23831 library_names_spec='${libname}${release}.a $libname.a'
23832 soname_spec='${libname}${release}${shared_ext}$major'
23833 fi
23834 shlibpath_var=LIBPATH
23835 fi
23836 ;;
23837
23838amigaos*)
23839 case $host_cpu in
23840 powerpc)
23841 # Since July 2007 AmigaOS4 officially supports .so libraries.
23842 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
23843 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
23844 ;;
23845 m68k)
23846 library_names_spec='$libname.ixlibrary $libname.a'
23847 # Create ${libname}_ixlibrary.a entries in /sys/libs.
23848 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'
23849 ;;
23850 esac
23851 ;;
23852
23853beos*)
23854 library_names_spec='${libname}${shared_ext}'
23855 dynamic_linker="$host_os ld.so"
23856 shlibpath_var=LIBRARY_PATH
23857 ;;
23858
23859bsdi[45]*)
23860 version_type=linux
23861 need_version=no
23862 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
23863 soname_spec='${libname}${release}${shared_ext}$major'
23864 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
23865 shlibpath_var=LD_LIBRARY_PATH
23866 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
23867 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
23868 # the default ld.so.conf also contains /usr/contrib/lib and
23869 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
23870 # libtool to hard-code these into programs
23871 ;;
23872
23873cygwin* | mingw* | pw32* | cegcc*)
23874 version_type=windows
23875 shrext_cmds=".dll"
23876 need_version=no
23877 need_lib_prefix=no
23878
23879 case $GCC,$host_os in
23880 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
23881 library_names_spec='$libname.dll.a'
23882 # DLL is installed to $(libdir)/../bin by postinstall_cmds
23883 postinstall_cmds='base_file=`basename \${file}`~
23884 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
23885 dldir=$destdir/`dirname \$dlpath`~
23886 test -d \$dldir || mkdir -p \$dldir~
23887 $install_prog $dir/$dlname \$dldir/$dlname~
23888 chmod a+x \$dldir/$dlname~
23889 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
23890 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
23891 fi'
23892 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
23893 dlpath=$dir/\$dldll~
23894 $RM \$dlpath'
23895 shlibpath_overrides_runpath=yes
23896
23897 case $host_os in
23898 cygwin*)
23899 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
23900 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
23901 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
23902 ;;
23903 mingw* | cegcc*)
23904 # MinGW DLLs use traditional 'lib' prefix
23905 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
23906 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
23907 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
23908 # It is most probably a Windows format PATH printed by
23909 # mingw gcc, but we are running on Cygwin. Gcc prints its search
23910 # path with ; separators, and with drive letters. We can handle the
23911 # drive letters (cygwin fileutils understands them), so leave them,
23912 # especially as we might pass files found there to a mingw objdump,
23913 # which wouldn't understand a cygwinified path. Ahh.
23914 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
23915 else
23916 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
23917 fi
23918 ;;
23919 pw32*)
23920 # pw32 DLLs use 'pw' prefix rather than 'lib'
23921 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
23922 ;;
23923 esac
23924 ;;
23925
23926 *)
23927 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
23928 ;;
23929 esac
23930 dynamic_linker='Win32 ld.exe'
23931 # FIXME: first we should search . and the directory the executable is in
23932 shlibpath_var=PATH
23933 ;;
23934
23935darwin* | rhapsody*)
23936 dynamic_linker="$host_os dyld"
23937 version_type=darwin
23938 need_lib_prefix=no
23939 need_version=no
23940 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
23941 soname_spec='${libname}${release}${major}$shared_ext'
23942 shlibpath_overrides_runpath=yes
23943 shlibpath_var=DYLD_LIBRARY_PATH
23944 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
23945
23946 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
23947 ;;
23948
23949dgux*)
23950 version_type=linux
23951 need_lib_prefix=no
23952 need_version=no
23953 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
23954 soname_spec='${libname}${release}${shared_ext}$major'
23955 shlibpath_var=LD_LIBRARY_PATH
23956 ;;
23957
23958freebsd1*)
23959 dynamic_linker=no
23960 ;;
23961
23962freebsd* | dragonfly*)
23963 # DragonFly does not have aout. When/if they implement a new
23964 # versioning mechanism, adjust this.
23965 if test -x /usr/bin/objformat; then
23966 objformat=`/usr/bin/objformat`
23967 else
23968 case $host_os in
23969 freebsd[123]*) objformat=aout ;;
23970 *) objformat=elf ;;
23971 esac
23972 fi
23973 version_type=freebsd-$objformat
23974 case $version_type in
23975 freebsd-elf*)
23976 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
23977 need_version=no
23978 need_lib_prefix=no
23979 ;;
23980 freebsd-*)
23981 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
23982 need_version=yes
23983 ;;
23984 esac
23985 shlibpath_var=LD_LIBRARY_PATH
23986 case $host_os in
23987 freebsd2*)
23988 shlibpath_overrides_runpath=yes
23989 ;;
23990 freebsd3.[01]* | freebsdelf3.[01]*)
23991 shlibpath_overrides_runpath=yes
23992 hardcode_into_libs=yes
23993 ;;
23994 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
23995 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
23996 shlibpath_overrides_runpath=no
23997 hardcode_into_libs=yes
23998 ;;
23999 *) # from 4.6 on, and DragonFly
24000 shlibpath_overrides_runpath=yes
24001 hardcode_into_libs=yes
24002 ;;
24003 esac
24004 ;;
24005
24006gnu*)
24007 version_type=linux
24008 need_lib_prefix=no
24009 need_version=no
24010 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
24011 soname_spec='${libname}${release}${shared_ext}$major'
24012 shlibpath_var=LD_LIBRARY_PATH
24013 hardcode_into_libs=yes
24014 ;;
24015
24016hpux9* | hpux10* | hpux11*)
24017 # Give a soname corresponding to the major version so that dld.sl refuses to
24018 # link against other versions.
24019 version_type=sunos
24020 need_lib_prefix=no
24021 need_version=no
24022 case $host_cpu in
24023 ia64*)
24024 shrext_cmds='.so'
24025 hardcode_into_libs=yes
24026 dynamic_linker="$host_os dld.so"
24027 shlibpath_var=LD_LIBRARY_PATH
24028 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
24029 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24030 soname_spec='${libname}${release}${shared_ext}$major'
24031 if test "X$HPUX_IA64_MODE" = X32; then
24032 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
24033 else
24034 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
24035 fi
24036 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
24037 ;;
24038 hppa*64*)
24039 shrext_cmds='.sl'
24040 hardcode_into_libs=yes
24041 dynamic_linker="$host_os dld.sl"
24042 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
24043 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
24044 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24045 soname_spec='${libname}${release}${shared_ext}$major'
24046 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
24047 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
24048 ;;
24049 *)
24050 shrext_cmds='.sl'
24051 dynamic_linker="$host_os dld.sl"
24052 shlibpath_var=SHLIB_PATH
24053 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
24054 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24055 soname_spec='${libname}${release}${shared_ext}$major'
24056 ;;
24057 esac
24058 # HP-UX runs *really* slowly unless shared libraries are mode 555.
24059 postinstall_cmds='chmod 555 $lib'
24060 ;;
24061
24062interix[3-9]*)
24063 version_type=linux
24064 need_lib_prefix=no
24065 need_version=no
24066 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
24067 soname_spec='${libname}${release}${shared_ext}$major'
24068 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
24069 shlibpath_var=LD_LIBRARY_PATH
24070 shlibpath_overrides_runpath=no
24071 hardcode_into_libs=yes
24072 ;;
24073
24074irix5* | irix6* | nonstopux*)
24075 case $host_os in
24076 nonstopux*) version_type=nonstopux ;;
24077 *)
24078 if test "$lt_cv_prog_gnu_ld" = yes; then
24079 version_type=linux
24080 else
24081 version_type=irix
24082 fi ;;
24083 esac
24084 need_lib_prefix=no
24085 need_version=no
24086 soname_spec='${libname}${release}${shared_ext}$major'
24087 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
24088 case $host_os in
24089 irix5* | nonstopux*)
24090 libsuff= shlibsuff=
24091 ;;
24092 *)
24093 case $LD in # libtool.m4 will add one of these switches to LD
24094 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
24095 libsuff= shlibsuff= libmagic=32-bit;;
24096 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
24097 libsuff=32 shlibsuff=N32 libmagic=N32;;
24098 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
24099 libsuff=64 shlibsuff=64 libmagic=64-bit;;
24100 *) libsuff= shlibsuff= libmagic=never-match;;
24101 esac
24102 ;;
24103 esac
24104 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
24105 shlibpath_overrides_runpath=no
24106 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
24107 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
24108 hardcode_into_libs=yes
24109 ;;
24110
24111# No shared lib support for Linux oldld, aout, or coff.
24112linux*oldld* | linux*aout* | linux*coff*)
24113 dynamic_linker=no
24114 ;;
24115
24116# This must be Linux ELF.
24117linux* | k*bsd*-gnu | kopensolaris*-gnu)
24118 version_type=linux
24119 need_lib_prefix=no
24120 need_version=no
24121 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24122 soname_spec='${libname}${release}${shared_ext}$major'
24123 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
24124 shlibpath_var=LD_LIBRARY_PATH
24125 shlibpath_overrides_runpath=no
24126
24127 # Some binutils ld are patched to set DT_RUNPATH
24128 if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then
24129 echo $ECHO_N "(cached) $ECHO_C" >&6
24130else
24131 lt_cv_shlibpath_overrides_runpath=no
24132 save_LDFLAGS=$LDFLAGS
24133 save_libdir=$libdir
24134 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
24135 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
24136 cat >conftest.$ac_ext <<_ACEOF
24137/* confdefs.h. */
24138_ACEOF
24139cat confdefs.h >>conftest.$ac_ext
24140cat >>conftest.$ac_ext <<_ACEOF
24141/* end confdefs.h. */
24142
24143int
24144main ()
24145{
24146
da0f6381
PB
24147 ;
24148 return 0;
24149}
24150_ACEOF
24151rm -f conftest.$ac_objext conftest$ac_exeext
24152if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24153 (eval $ac_link) 2>conftest.er1
24154 ac_status=$?
24155 grep -v '^ *+' conftest.er1 >conftest.err
24156 rm -f conftest.er1
24157 cat conftest.err >&5
24158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24159 (exit $ac_status); } &&
00020c16 24160 { ac_try='test -z "$ac_cxx_werror_flag"
da0f6381
PB
24161 || test ! -s conftest.err'
24162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24163 (eval $ac_try) 2>&5
24164 ac_status=$?
24165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24166 (exit $ac_status); }; } &&
24167 { ac_try='test -s conftest$ac_exeext'
24168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24169 (eval $ac_try) 2>&5
24170 ac_status=$?
24171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24172 (exit $ac_status); }; }; then
00020c16
ILT
24173 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
24174 lt_cv_shlibpath_overrides_runpath=yes
24175fi
24176
da0f6381
PB
24177else
24178 echo "$as_me: failed program was:" >&5
24179sed 's/^/| /' conftest.$ac_ext >&5
24180
da0f6381
PB
24181fi
24182rm -f conftest.err conftest.$ac_objext \
24183 conftest$ac_exeext conftest.$ac_ext
00020c16
ILT
24184 LDFLAGS=$save_LDFLAGS
24185 libdir=$save_libdir
da0f6381
PB
24186
24187fi
24188
00020c16 24189 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
da0f6381 24190
00020c16
ILT
24191 # This implies no fast_install, which is unacceptable.
24192 # Some rework will be needed to allow for fast_install
24193 # before this can be enabled.
24194 hardcode_into_libs=yes
da0f6381 24195
00020c16
ILT
24196 # Append ld.so.conf contents to the search path
24197 if test -f /etc/ld.so.conf; then
24198 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/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
24199 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
24200 fi
da0f6381 24201
00020c16
ILT
24202 # We used to test for /lib/ld.so.1 and disable shared libraries on
24203 # powerpc, because MkLinux only supported shared libraries with the
24204 # GNU dynamic linker. Since this was broken with cross compilers,
24205 # most powerpc-linux boxes support dynamic linking these days and
24206 # people can always --disable-shared, the test was removed, and we
24207 # assume the GNU/Linux dynamic linker is in use.
24208 dynamic_linker='GNU/Linux ld.so'
24209 ;;
da0f6381 24210
00020c16
ILT
24211netbsd*)
24212 version_type=sunos
24213 need_lib_prefix=no
24214 need_version=no
24215 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
24216 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
24217 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
24218 dynamic_linker='NetBSD (a.out) ld.so'
24219 else
24220 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
24221 soname_spec='${libname}${release}${shared_ext}$major'
24222 dynamic_linker='NetBSD ld.elf_so'
24223 fi
24224 shlibpath_var=LD_LIBRARY_PATH
24225 shlibpath_overrides_runpath=yes
24226 hardcode_into_libs=yes
24227 ;;
da0f6381 24228
00020c16
ILT
24229newsos6)
24230 version_type=linux
24231 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24232 shlibpath_var=LD_LIBRARY_PATH
24233 shlibpath_overrides_runpath=yes
24234 ;;
da0f6381 24235
00020c16
ILT
24236*nto* | *qnx*)
24237 version_type=qnx
24238 need_lib_prefix=no
24239 need_version=no
24240 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24241 soname_spec='${libname}${release}${shared_ext}$major'
24242 shlibpath_var=LD_LIBRARY_PATH
24243 shlibpath_overrides_runpath=no
24244 hardcode_into_libs=yes
24245 dynamic_linker='ldqnx.so'
24246 ;;
da0f6381 24247
00020c16
ILT
24248openbsd*)
24249 version_type=sunos
24250 sys_lib_dlsearch_path_spec="/usr/lib"
24251 need_lib_prefix=no
24252 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
24253 case $host_os in
24254 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
24255 *) need_version=no ;;
da0f6381 24256 esac
00020c16
ILT
24257 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
24258 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
24259 shlibpath_var=LD_LIBRARY_PATH
24260 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
24261 case $host_os in
24262 openbsd2.[89] | openbsd2.[89].*)
24263 shlibpath_overrides_runpath=no
24264 ;;
24265 *)
24266 shlibpath_overrides_runpath=yes
24267 ;;
24268 esac
da0f6381 24269 else
00020c16 24270 shlibpath_overrides_runpath=yes
da0f6381 24271 fi
00020c16 24272 ;;
da0f6381 24273
00020c16
ILT
24274os2*)
24275 libname_spec='$name'
24276 shrext_cmds=".dll"
24277 need_lib_prefix=no
24278 library_names_spec='$libname${shared_ext} $libname.a'
24279 dynamic_linker='OS/2 ld.exe'
24280 shlibpath_var=LIBPATH
24281 ;;
da0f6381 24282
00020c16
ILT
24283osf3* | osf4* | osf5*)
24284 version_type=osf
24285 need_lib_prefix=no
24286 need_version=no
24287 soname_spec='${libname}${release}${shared_ext}$major'
24288 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24289 shlibpath_var=LD_LIBRARY_PATH
24290 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
24291 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
24292 ;;
da0f6381 24293
00020c16
ILT
24294rdos*)
24295 dynamic_linker=no
24296 ;;
da0f6381 24297
00020c16
ILT
24298solaris*)
24299 version_type=linux
24300 need_lib_prefix=no
24301 need_version=no
24302 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24303 soname_spec='${libname}${release}${shared_ext}$major'
24304 shlibpath_var=LD_LIBRARY_PATH
24305 shlibpath_overrides_runpath=yes
24306 hardcode_into_libs=yes
24307 # ldd complains unless libraries are executable
24308 postinstall_cmds='chmod +x $lib'
24309 ;;
da0f6381 24310
00020c16
ILT
24311sunos4*)
24312 version_type=sunos
24313 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
24314 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
24315 shlibpath_var=LD_LIBRARY_PATH
24316 shlibpath_overrides_runpath=yes
24317 if test "$with_gnu_ld" = yes; then
24318 need_lib_prefix=no
24319 fi
24320 need_version=yes
24321 ;;
da0f6381 24322
00020c16
ILT
24323sysv4 | sysv4.3*)
24324 version_type=linux
24325 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24326 soname_spec='${libname}${release}${shared_ext}$major'
24327 shlibpath_var=LD_LIBRARY_PATH
24328 case $host_vendor in
24329 sni)
24330 shlibpath_overrides_runpath=no
24331 need_lib_prefix=no
24332 runpath_var=LD_RUN_PATH
24333 ;;
24334 siemens)
24335 need_lib_prefix=no
24336 ;;
24337 motorola)
24338 need_lib_prefix=no
24339 need_version=no
24340 shlibpath_overrides_runpath=no
24341 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
24342 ;;
24343 esac
24344 ;;
da0f6381 24345
00020c16
ILT
24346sysv4*MP*)
24347 if test -d /usr/nec ;then
24348 version_type=linux
24349 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
24350 soname_spec='$libname${shared_ext}.$major'
24351 shlibpath_var=LD_LIBRARY_PATH
24352 fi
24353 ;;
da0f6381 24354
00020c16
ILT
24355sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
24356 version_type=freebsd-elf
24357 need_lib_prefix=no
24358 need_version=no
24359 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
24360 soname_spec='${libname}${release}${shared_ext}$major'
24361 shlibpath_var=LD_LIBRARY_PATH
24362 shlibpath_overrides_runpath=yes
24363 hardcode_into_libs=yes
24364 if test "$with_gnu_ld" = yes; then
24365 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
da0f6381 24366 else
00020c16
ILT
24367 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
24368 case $host_os in
24369 sco3.2v5*)
24370 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
24371 ;;
da0f6381 24372 esac
da0f6381 24373 fi
00020c16
ILT
24374 sys_lib_dlsearch_path_spec='/usr/lib'
24375 ;;
da0f6381 24376
00020c16
ILT
24377tpf*)
24378 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
24379 version_type=linux
24380 need_lib_prefix=no
24381 need_version=no
24382 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24383 shlibpath_var=LD_LIBRARY_PATH
24384 shlibpath_overrides_runpath=no
24385 hardcode_into_libs=yes
24386 ;;
da0f6381 24387
00020c16
ILT
24388uts4*)
24389 version_type=linux
24390 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24391 soname_spec='${libname}${release}${shared_ext}$major'
24392 shlibpath_var=LD_LIBRARY_PATH
24393 ;;
da0f6381 24394
00020c16
ILT
24395*)
24396 dynamic_linker=no
24397 ;;
24398esac
24399echo "$as_me:$LINENO: result: $dynamic_linker" >&5
24400echo "${ECHO_T}$dynamic_linker" >&6
24401test "$dynamic_linker" = no && can_build_shared=no
da0f6381 24402
00020c16
ILT
24403variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
24404if test "$GCC" = yes; then
24405 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
24406fi
da0f6381 24407
00020c16
ILT
24408if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
24409 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
24410fi
24411if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
24412 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
24413fi
da0f6381 24414
da0f6381 24415
da0f6381 24416
da0f6381 24417
da0f6381 24418
da0f6381
PB
24419
24420
da0f6381 24421
da0f6381 24422
da0f6381 24423
da0f6381
PB
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439
24440
da0f6381
PB
24441
24442
24443
24444
24445
24446
24447
24448
24449
00020c16
ILT
24450 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
24451echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
24452hardcode_action_CXX=
24453if test -n "$hardcode_libdir_flag_spec_CXX" ||
24454 test -n "$runpath_var_CXX" ||
24455 test "X$hardcode_automatic_CXX" = "Xyes" ; then
da0f6381 24456
00020c16
ILT
24457 # We can hardcode non-existent directories.
24458 if test "$hardcode_direct_CXX" != no &&
24459 # If the only mechanism to avoid hardcoding is shlibpath_var, we
24460 # have to relink, otherwise we might link with an installed library
24461 # when we should be linking with a yet-to-be-installed one
24462 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
24463 test "$hardcode_minus_L_CXX" != no; then
24464 # Linking always hardcodes the temporary library directory.
24465 hardcode_action_CXX=relink
24466 else
24467 # We can link without hardcoding, and we can hardcode nonexisting dirs.
24468 hardcode_action_CXX=immediate
24469 fi
24470else
24471 # We cannot hardcode anything, or else we can only hardcode existing
24472 # directories.
24473 hardcode_action_CXX=unsupported
24474fi
24475echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
24476echo "${ECHO_T}$hardcode_action_CXX" >&6
da0f6381 24477
00020c16
ILT
24478if test "$hardcode_action_CXX" = relink ||
24479 test "$inherit_rpath_CXX" = yes; then
24480 # Fast installation is not supported
24481 enable_fast_install=no
24482elif test "$shlibpath_overrides_runpath" = yes ||
24483 test "$enable_shared" = no; then
24484 # Fast installation is not necessary
24485 enable_fast_install=needless
24486fi
da0f6381 24487
da0f6381 24488
da0f6381 24489
da0f6381 24490
da0f6381 24491
da0f6381
PB
24492
24493
00020c16 24494 fi # test -n "$compiler"
da0f6381 24495
00020c16
ILT
24496 CC=$lt_save_CC
24497 LDCXX=$LD
24498 LD=$lt_save_LD
24499 GCC=$lt_save_GCC
24500 with_gnu_ld=$lt_save_with_gnu_ld
24501 lt_cv_path_LDCXX=$lt_cv_path_LD
24502 lt_cv_path_LD=$lt_save_path_LD
24503 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
24504 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
24505fi # test "$_lt_caught_CXX_error" != yes
da0f6381 24506
da0f6381
PB
24507ac_ext=c
24508ac_cpp='$CPP $CPPFLAGS'
24509ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24510ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24511ac_compiler_gnu=$ac_cv_c_compiler_gnu
24512
da0f6381
PB
24513
24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528# Only expand once:
24529
24530
24531
24532
24533
24534# Identify the assembler which will work hand-in-glove with the newly
24535# built GCC, so that we can examine its features. This is the assembler
24536# which will be driven by the driver program.
24537#
24538# If build != host, and we aren't building gas in-tree, we identify a
24539# build->target assembler and hope that it will have the same features
24540# as the host->target assembler we'll be using.
24541gcc_cv_gas_major_version=
24542gcc_cv_gas_minor_version=
24543gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
24544
24545if test "${gcc_cv_as+set}" = set; then
24546 :
24547else
24548
24549if test -x "$DEFAULT_ASSEMBLER"; then
24550 gcc_cv_as="$DEFAULT_ASSEMBLER"
24551elif test -f $gcc_cv_as_gas_srcdir/configure.in \
24552 && test -f ../gas/Makefile \
24553 && test x$build = x$host; then
24554 gcc_cv_as=../gas/as-new$build_exeext
24555elif test -x as$build_exeext; then
24556 # Build using assembler in the current directory.
24557 gcc_cv_as=./as$build_exeext
24558elif test -x $AS_FOR_TARGET; then
24559 gcc_cv_as="$AS_FOR_TARGET"
24560else
24561 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
24562set dummy $AS_FOR_TARGET; ac_word=$2
24563echo "$as_me:$LINENO: checking for $ac_word" >&5
24564echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24565if test "${ac_cv_path_gcc_cv_as+set}" = set; then
24566 echo $ECHO_N "(cached) $ECHO_C" >&6
24567else
24568 case $gcc_cv_as in
24569 [\\/]* | ?:[\\/]*)
24570 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
24571 ;;
24572 *)
24573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24574for as_dir in $PATH
24575do
24576 IFS=$as_save_IFS
24577 test -z "$as_dir" && as_dir=.
24578 for ac_exec_ext in '' $ac_executable_extensions; do
24579 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24580 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
24581 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24582 break 2
24583 fi
24584done
24585done
24586
24587 ;;
24588esac
24589fi
24590gcc_cv_as=$ac_cv_path_gcc_cv_as
24591
24592if test -n "$gcc_cv_as"; then
24593 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
24594echo "${ECHO_T}$gcc_cv_as" >&6
24595else
24596 echo "$as_me:$LINENO: result: no" >&5
24597echo "${ECHO_T}no" >&6
24598fi
24599
24600fi
24601fi
24602
24603
24604ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
24605
24606case "$ORIGINAL_AS_FOR_TARGET" in
24607 ./as | ./as$build_exeext) ;;
24608 *) ac_config_files="$ac_config_files as:exec-tool.in"
24609 ;;
24610esac
24611
24612echo "$as_me:$LINENO: checking what assembler to use" >&5
24613echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
24614if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
24615 # Single tree build which includes gas. We want to prefer it
24616 # over whatever linker top-level may have detected, since
24617 # we'll use what we're building after installation anyway.
24618 echo "$as_me:$LINENO: result: newly built gas" >&5
24619echo "${ECHO_T}newly built gas" >&6
24620 in_tree_gas=yes
24621 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
24622for f in $gcc_cv_as_bfd_srcdir/configure \
24623 $gcc_cv_as_gas_srcdir/configure \
24624 $gcc_cv_as_gas_srcdir/configure.in \
24625 $gcc_cv_as_gas_srcdir/Makefile.in ; do
24626 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
24627 if test x$gcc_cv_gas_version != x; then
24628 break
24629 fi
24630done
24631gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
24632gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
24633gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
24634case $gcc_cv_gas_patch_version in
24635 "") gcc_cv_gas_patch_version="0" ;;
24636esac
24637gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
24638 + $gcc_cv_gas_minor_version \) \* 1000 \
24639 + $gcc_cv_gas_patch_version`
24640
24641 in_tree_gas_is_elf=no
24642 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
24643 || (grep 'obj_format = multi' ../gas/Makefile \
24644 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
24645 then
24646 in_tree_gas_is_elf=yes
24647 fi
24648else
24649 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
24650echo "${ECHO_T}$gcc_cv_as" >&6
24651 in_tree_gas=no
24652fi
24653
24654# Identify the linker which will work hand-in-glove with the newly
24655# built GCC, so that we can examine its features. This is the linker
24656# which will be driven by the driver program.
24657#
24658# If build != host, and we aren't building gas in-tree, we identify a
24659# build->target linker and hope that it will have the same features
24660# as the host->target linker we'll be using.
24661gcc_cv_gld_major_version=
24662gcc_cv_gld_minor_version=
24663gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
24664gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
24665
24666if test "${gcc_cv_ld+set}" = set; then
24667 :
24668else
24669
24670if test -x "$DEFAULT_LINKER"; then
24671 gcc_cv_ld="$DEFAULT_LINKER"
24672elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
24673 && test -f ../ld/Makefile \
24674 && test x$build = x$host; then
24675 gcc_cv_ld=../ld/ld-new$build_exeext
e8b05380
PB
24676elif test -x collect-ld$build_exeext; then
24677 # Build using linker in the current directory.
24678 gcc_cv_ld=./collect-ld$build_exeext
24679elif test -x $LD_FOR_TARGET; then
24680 gcc_cv_ld="$LD_FOR_TARGET"
24681else
24682 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
24683set dummy $LD_FOR_TARGET; ac_word=$2
b61ff9c8
BS
24684echo "$as_me:$LINENO: checking for $ac_word" >&5
24685echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 24686if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
d739199a
DJ
24687 echo $ECHO_N "(cached) $ECHO_C" >&6
24688else
e8b05380 24689 case $gcc_cv_ld in
d739199a 24690 [\\/]* | ?:[\\/]*)
e8b05380 24691 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
24692 ;;
24693 *)
24694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24695for as_dir in $PATH
24696do
24697 IFS=$as_save_IFS
24698 test -z "$as_dir" && as_dir=.
24699 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 24700 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 24701 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
24702 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24703 break 2
24704 fi
24705done
24706done
24707
24708 ;;
24709esac
24710fi
e8b05380 24711gcc_cv_ld=$ac_cv_path_gcc_cv_ld
b61ff9c8 24712
e8b05380 24713if test -n "$gcc_cv_ld"; then
b61ff9c8
BS
24714 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
24715echo "${ECHO_T}$gcc_cv_ld" >&6
d739199a 24716else
b61ff9c8
BS
24717 echo "$as_me:$LINENO: result: no" >&5
24718echo "${ECHO_T}no" >&6
d739199a
DJ
24719fi
24720
24721fi
e8b05380
PB
24722fi
24723
24724
24725ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
24726
be0fe523
PB
24727case "$ORIGINAL_LD_FOR_TARGET" in
24728 ./collect-ld | ./collect-ld$build_exeext) ;;
b61ff9c8 24729 *) ac_config_files="$ac_config_files collect-ld:exec-tool.in"
be0fe523
PB
24730 ;;
24731esac
e8b05380 24732
b61ff9c8
BS
24733echo "$as_me:$LINENO: checking what linker to use" >&5
24734echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
e8b05380
PB
24735if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
24736 # Single tree build which includes ld. We want to prefer it
24737 # over whatever linker top-level may have detected, since
24738 # we'll use what we're building after installation anyway.
b61ff9c8
BS
24739 echo "$as_me:$LINENO: result: newly built ld" >&5
24740echo "${ECHO_T}newly built ld" >&6
e8b05380
PB
24741 in_tree_ld=yes
24742 in_tree_ld_is_elf=no
24743 if (grep 'EMUL = .*elf' ../ld/Makefile \
24744 || grep 'EMUL = .*linux' ../ld/Makefile \
24745 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
24746 in_tree_ld_is_elf=yes
24747 fi
24748 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
24749 do
24750 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
24751 if test x$gcc_cv_gld_version != x; then
24752 break
24753 fi
24754 done
24755 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
24756 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
24757else
b61ff9c8
BS
24758 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
24759echo "${ECHO_T}$gcc_cv_ld" >&6
e8b05380
PB
24760 in_tree_ld=no
24761fi
24762
24763# Figure out what nm we will be using.
24764gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
24765if test "${gcc_cv_nm+set}" = set; then
24766 :
24767else
24768
24769if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
24770 && test -f ../binutils/Makefile \
24771 && test x$build = x$host; then
e8b05380
PB
24772 gcc_cv_nm=../binutils/nm-new$build_exeext
24773elif test -x nm$build_exeext; then
24774 gcc_cv_nm=./nm$build_exeext
24775elif test -x $NM_FOR_TARGET; then
24776 gcc_cv_nm="$NM_FOR_TARGET"
24777else
24778 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
24779set dummy $NM_FOR_TARGET; ac_word=$2
b61ff9c8
BS
24780echo "$as_me:$LINENO: checking for $ac_word" >&5
24781echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 24782if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
d739199a
DJ
24783 echo $ECHO_N "(cached) $ECHO_C" >&6
24784else
e8b05380 24785 case $gcc_cv_nm in
d739199a 24786 [\\/]* | ?:[\\/]*)
e8b05380 24787 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
24788 ;;
24789 *)
24790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24791for as_dir in $PATH
24792do
24793 IFS=$as_save_IFS
24794 test -z "$as_dir" && as_dir=.
24795 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 24796 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 24797 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
24798 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24799 break 2
24800 fi
24801done
24802done
24803
24804 ;;
24805esac
24806fi
e8b05380 24807gcc_cv_nm=$ac_cv_path_gcc_cv_nm
b61ff9c8 24808
e8b05380 24809if test -n "$gcc_cv_nm"; then
b61ff9c8
BS
24810 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
24811echo "${ECHO_T}$gcc_cv_nm" >&6
d739199a 24812else
b61ff9c8
BS
24813 echo "$as_me:$LINENO: result: no" >&5
24814echo "${ECHO_T}no" >&6
d739199a
DJ
24815fi
24816
24817fi
e8b05380 24818fi
d739199a 24819
e8b05380 24820
b61ff9c8
BS
24821echo "$as_me:$LINENO: checking what nm to use" >&5
24822echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
e8b05380
PB
24823if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
24824 # Single tree build which includes binutils.
b61ff9c8
BS
24825 echo "$as_me:$LINENO: result: newly built nm" >&5
24826echo "${ECHO_T}newly built nm" >&6
e8b05380
PB
24827 in_tree_nm=yes
24828else
b61ff9c8
BS
24829 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
24830echo "${ECHO_T}$gcc_cv_nm" >&6
e8b05380
PB
24831 in_tree_nm=no
24832fi
24833
24834ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
24835
be0fe523
PB
24836case "$ORIGINAL_NM_FOR_TARGET" in
24837 ./nm | ./nm$build_exeext) ;;
b61ff9c8 24838 *) ac_config_files="$ac_config_files nm:exec-tool.in"
be0fe523
PB
24839 ;;
24840esac
24841
e8b05380
PB
24842
24843# Figure out what objdump we will be using.
24844if test "${gcc_cv_objdump+set}" = set; then
24845 :
24846else
24847
24848if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
24849 && test -f ../binutils/Makefile \
24850 && test x$build = x$host; then
e8b05380
PB
24851 # Single tree build which includes binutils.
24852 gcc_cv_objdump=../binutils/objdump$build_exeext
24853elif test -x objdump$build_exeext; then
24854 gcc_cv_objdump=./objdump$build_exeext
24855elif test -x $OBJDUMP_FOR_TARGET; then
24856 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
24857else
24858 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
24859set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
b61ff9c8
BS
24860echo "$as_me:$LINENO: checking for $ac_word" >&5
24861echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 24862if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
9f18db39
PB
24863 echo $ECHO_N "(cached) $ECHO_C" >&6
24864else
e8b05380 24865 case $gcc_cv_objdump in
9f18db39 24866 [\\/]* | ?:[\\/]*)
e8b05380 24867 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
24868 ;;
24869 *)
24870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 24871for as_dir in $PATH
9f18db39
PB
24872do
24873 IFS=$as_save_IFS
24874 test -z "$as_dir" && as_dir=.
24875 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 24876 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 24877 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
9f18db39
PB
24878 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24879 break 2
24880 fi
24881done
24882done
779243f7 24883
9f18db39
PB
24884 ;;
24885esac
24886fi
e8b05380 24887gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
b61ff9c8 24888
e8b05380 24889if test -n "$gcc_cv_objdump"; then
b61ff9c8
BS
24890 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
24891echo "${ECHO_T}$gcc_cv_objdump" >&6
9f18db39 24892else
b61ff9c8
BS
24893 echo "$as_me:$LINENO: result: no" >&5
24894echo "${ECHO_T}no" >&6
9f18db39
PB
24895fi
24896
e8b05380
PB
24897fi
24898fi
9f18db39 24899
e8b05380 24900
b61ff9c8
BS
24901echo "$as_me:$LINENO: checking what objdump to use" >&5
24902echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
e8b05380
PB
24903if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
24904 # Single tree build which includes binutils.
b61ff9c8
BS
24905 echo "$as_me:$LINENO: result: newly built objdump" >&5
24906echo "${ECHO_T}newly built objdump" >&6
e8b05380 24907elif test x$gcc_cv_objdump = x; then
b61ff9c8
BS
24908 echo "$as_me:$LINENO: result: not found" >&5
24909echo "${ECHO_T}not found" >&6
e8b05380 24910else
b61ff9c8
BS
24911 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
24912echo "${ECHO_T}$gcc_cv_objdump" >&6
a2eafc76 24913fi
3cae5780 24914
6e97481b
JJ
24915# Figure out what readelf we will be using.
24916if test "${gcc_cv_readelf+set}" = set; then
24917 :
24918else
24919
24920if test -f $gcc_cv_binutils_srcdir/configure.in \
24921 && test -f ../binutils/Makefile \
24922 && test x$build = x$host; then
24923 # Single tree build which includes binutils.
24924 gcc_cv_readelf=../binutils/readelf$build_exeext
24925elif test -x readelf$build_exeext; then
24926 gcc_cv_readelf=./readelf$build_exeext
24927else
24928 # Extract the first word of "readelf", so it can be a program name with args.
24929set dummy readelf; ac_word=$2
24930echo "$as_me:$LINENO: checking for $ac_word" >&5
24931echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24932if test "${ac_cv_path_gcc_cv_readelf+set}" = set; then
24933 echo $ECHO_N "(cached) $ECHO_C" >&6
24934else
24935 case $gcc_cv_readelf in
24936 [\\/]* | ?:[\\/]*)
24937 ac_cv_path_gcc_cv_readelf="$gcc_cv_readelf" # Let the user override the test with a path.
24938 ;;
24939 *)
24940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24941for as_dir in $PATH
24942do
24943 IFS=$as_save_IFS
24944 test -z "$as_dir" && as_dir=.
24945 for ac_exec_ext in '' $ac_executable_extensions; do
24946 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24947 ac_cv_path_gcc_cv_readelf="$as_dir/$ac_word$ac_exec_ext"
24948 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24949 break 2
24950 fi
24951done
24952done
24953
24954 ;;
24955esac
24956fi
24957gcc_cv_readelf=$ac_cv_path_gcc_cv_readelf
24958
24959if test -n "$gcc_cv_readelf"; then
24960 echo "$as_me:$LINENO: result: $gcc_cv_readelf" >&5
24961echo "${ECHO_T}$gcc_cv_readelf" >&6
24962else
24963 echo "$as_me:$LINENO: result: no" >&5
24964echo "${ECHO_T}no" >&6
24965fi
24966
24967fi
24968fi
24969
24970
24971echo "$as_me:$LINENO: checking what readelf to use" >&5
24972echo $ECHO_N "checking what readelf to use... $ECHO_C" >&6
24973if test "$gcc_cv_readelf" = ../binutils/readelf$build_exeext; then
24974 # Single tree build which includes binutils.
24975 echo "$as_me:$LINENO: result: newly built readelf" >&5
24976echo "${ECHO_T}newly built readelf" >&6
24977elif test x$gcc_cv_readelf = x; then
24978 echo "$as_me:$LINENO: result: not found" >&5
24979echo "${ECHO_T}not found" >&6
24980else
24981 echo "$as_me:$LINENO: result: $gcc_cv_readelf" >&5
24982echo "${ECHO_T}$gcc_cv_readelf" >&6
24983fi
24984
981d4858 24985# Figure out what assembler alignment features are present.
b61ff9c8
BS
24986echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
24987echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
ba479fd2
NN
24988if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
24989 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
24990else
24991 gcc_cv_as_balign_and_p2align=no
24992 if test $in_tree_gas = yes; then
24993 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
24994 then gcc_cv_as_balign_and_p2align=yes
24995fi
24996 elif test x$gcc_cv_as != x; then
6e3f3080 24997 echo '.balign 4
8ada417f 24998.p2align 2' > conftest.s
ba479fd2
NN
24999 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
25000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25001 (eval $ac_try) 2>&5
25002 ac_status=$?
25003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25004 (exit $ac_status); }; }
8ada417f
ZW
25005 then
25006 gcc_cv_as_balign_and_p2align=yes
25007 else
25008 echo "configure: failed program was" >&5
25009 cat conftest.s >&5
25010 fi
25011 rm -f conftest.o conftest.s
25012 fi
25013fi
b61ff9c8
BS
25014echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
25015echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 25016if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
25017
25018cat >>confdefs.h <<\_ACEOF
981d4858 25019#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 25020_ACEOF
981d4858 25021
ad9c4d9f
NN
25022fi
25023
b61ff9c8
BS
25024echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
25025echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
ba479fd2
NN
25026if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
25027 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
25028else
25029 gcc_cv_as_max_skip_p2align=no
25030 if test $in_tree_gas = yes; then
25031 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
25032 then gcc_cv_as_max_skip_p2align=yes
25033fi
25034 elif test x$gcc_cv_as != x; then
6e3f3080 25035 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
25036 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
25037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25038 (eval $ac_try) 2>&5
25039 ac_status=$?
25040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25041 (exit $ac_status); }; }
8ada417f
ZW
25042 then
25043 gcc_cv_as_max_skip_p2align=yes
25044 else
25045 echo "configure: failed program was" >&5
25046 cat conftest.s >&5
25047 fi
25048 rm -f conftest.o conftest.s
25049 fi
ad9c4d9f 25050fi
b61ff9c8
BS
25051echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
25052echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 25053if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
25054
25055cat >>confdefs.h <<\_ACEOF
9e423e6d 25056#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 25057_ACEOF
9e423e6d 25058
9e423e6d 25059fi
ad9c4d9f 25060
b61ff9c8
BS
25061echo "$as_me:$LINENO: checking assembler for .literal16" >&5
25062echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6
5708d18d
MS
25063if test "${gcc_cv_as_literal16+set}" = set; then
25064 echo $ECHO_N "(cached) $ECHO_C" >&6
25065else
25066 gcc_cv_as_literal16=no
25067 if test $in_tree_gas = yes; then
25068 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
25069 then gcc_cv_as_literal16=yes
25070fi
25071 elif test x$gcc_cv_as != x; then
25072 echo '.literal16' > conftest.s
25073 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
25074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25075 (eval $ac_try) 2>&5
25076 ac_status=$?
25077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25078 (exit $ac_status); }; }
25079 then
25080 gcc_cv_as_literal16=yes
25081 else
25082 echo "configure: failed program was" >&5
25083 cat conftest.s >&5
25084 fi
25085 rm -f conftest.o conftest.s
25086 fi
25087fi
b61ff9c8
BS
25088echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5
25089echo "${ECHO_T}$gcc_cv_as_literal16" >&6
5708d18d
MS
25090if test $gcc_cv_as_literal16 = yes; then
25091
25092cat >>confdefs.h <<\_ACEOF
25093#define HAVE_GAS_LITERAL16 1
25094_ACEOF
25095
25096fi
25097
b61ff9c8
BS
25098echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
25099echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
ba479fd2
NN
25100if test "${gcc_cv_as_subsection_m1+set}" = set; then
25101 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
25102else
25103 gcc_cv_as_subsection_m1=no
25104 if test $in_tree_gas = yes; then
25105 if test $in_tree_gas_is_elf = yes \
25106 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
25107 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 25108fi
8ada417f 25109 elif test x$gcc_cv_as != x; then
6e3f3080 25110 echo 'conftest_label1: .word 0
d1accaa3
JJ
25111.subsection -1
25112conftest_label2: .word 0
8ada417f 25113.previous' > conftest.s
ba479fd2
NN
25114 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
25115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25116 (eval $ac_try) 2>&5
25117 ac_status=$?
25118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25119 (exit $ac_status); }; }
8ada417f
ZW
25120 then
25121 if test x$gcc_cv_nm != x; then
25122 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
25123 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
25124 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
25125 then :
25126 else gcc_cv_as_subsection_m1=yes
25127 fi
25128 rm -f conftest.nm1 conftest.nm2
25129 fi
25130 else
25131 echo "configure: failed program was" >&5
25132 cat conftest.s >&5
25133 fi
25134 rm -f conftest.o conftest.s
25135 fi
981d4858 25136fi
b61ff9c8
BS
25137echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
25138echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 25139if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
25140
25141cat >>confdefs.h <<\_ACEOF
981d4858 25142#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 25143_ACEOF
981d4858 25144
d1accaa3 25145fi
ad9c4d9f 25146
b61ff9c8
BS
25147echo "$as_me:$LINENO: checking assembler for .weak" >&5
25148echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
ba479fd2
NN
25149if test "${gcc_cv_as_weak+set}" = set; then
25150 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
25151else
25152 gcc_cv_as_weak=no
25153 if test $in_tree_gas = yes; then
25154 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
25155 then gcc_cv_as_weak=yes
ad9c4d9f 25156fi
8ada417f 25157 elif test x$gcc_cv_as != x; then
6e3f3080 25158 echo ' .weak foobar' > conftest.s
ba479fd2
NN
25159 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
25160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25161 (eval $ac_try) 2>&5
25162 ac_status=$?
25163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25164 (exit $ac_status); }; }
8ada417f
ZW
25165 then
25166 gcc_cv_as_weak=yes
25167 else
25168 echo "configure: failed program was" >&5
25169 cat conftest.s >&5
25170 fi
25171 rm -f conftest.o conftest.s
25172 fi
981d4858 25173fi
b61ff9c8
BS
25174echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
25175echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 25176if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
25177
25178cat >>confdefs.h <<\_ACEOF
981d4858 25179#define HAVE_GAS_WEAK 1
ba479fd2 25180_ACEOF
981d4858 25181
12822146 25182fi
ad9c4d9f 25183
b61ff9c8
BS
25184echo "$as_me:$LINENO: checking assembler for .weakref" >&5
25185echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
a0203ca7
AO
25186if test "${gcc_cv_as_weakref+set}" = set; then
25187 echo $ECHO_N "(cached) $ECHO_C" >&6
25188else
25189 gcc_cv_as_weakref=no
25190 if test $in_tree_gas = yes; then
25191 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
25192 then gcc_cv_as_weakref=yes
25193fi
25194 elif test x$gcc_cv_as != x; then
25195 echo ' .weakref foobar, barfnot' > conftest.s
25196 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
25197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25198 (eval $ac_try) 2>&5
25199 ac_status=$?
25200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25201 (exit $ac_status); }; }
25202 then
25203 gcc_cv_as_weakref=yes
25204 else
25205 echo "configure: failed program was" >&5
25206 cat conftest.s >&5
25207 fi
25208 rm -f conftest.o conftest.s
25209 fi
25210fi
b61ff9c8
BS
25211echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
25212echo "${ECHO_T}$gcc_cv_as_weakref" >&6
a0203ca7
AO
25213if test $gcc_cv_as_weakref = yes; then
25214
25215cat >>confdefs.h <<\_ACEOF
25216#define HAVE_GAS_WEAKREF 1
25217_ACEOF
25218
25219fi
25220
b61ff9c8
BS
25221echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
25222echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
e41f3691
JDA
25223if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
25224 echo $ECHO_N "(cached) $ECHO_C" >&6
25225else
25226 gcc_cv_as_nsubspa_comdat=no
25227 if test $in_tree_gas = yes; then
25228 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
25229 then gcc_cv_as_nsubspa_comdat=yes
25230fi
25231 elif test x$gcc_cv_as != x; then
25232 echo ' .SPACE $TEXT$
25233 .NSUBSPA $CODE$,COMDAT' > conftest.s
25234 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
25235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25236 (eval $ac_try) 2>&5
25237 ac_status=$?
25238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25239 (exit $ac_status); }; }
25240 then
25241 gcc_cv_as_nsubspa_comdat=yes
25242 else
25243 echo "configure: failed program was" >&5
25244 cat conftest.s >&5
25245 fi
25246 rm -f conftest.o conftest.s
25247 fi
25248fi
b61ff9c8
BS
25249echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
25250echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
e41f3691
JDA
25251if test $gcc_cv_as_nsubspa_comdat = yes; then
25252
25253cat >>confdefs.h <<\_ACEOF
25254#define HAVE_GAS_NSUBSPA_COMDAT 1
25255_ACEOF
25256
25257fi
25258
8ada417f
ZW
25259# .hidden needs to be supported in both the assembler and the linker,
25260# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
25261# This is irritatingly difficult to feature test for; we have to check the
25262# date string after the version number. If we've got an in-tree
25263# ld, we don't know its patchlevel version, so we set the baseline at 2.13
25264# to be safe.
25265# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
b61ff9c8
BS
25266echo "$as_me:$LINENO: checking assembler for .hidden" >&5
25267echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
ba479fd2
NN
25268if test "${gcc_cv_as_hidden+set}" = set; then
25269 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
25270else
25271 gcc_cv_as_hidden=no
25272 if test $in_tree_gas = yes; then
25273 if test $in_tree_gas_is_elf = yes \
25274 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
25275 then gcc_cv_as_hidden=yes
25276fi
25277 elif test x$gcc_cv_as != x; then
6e3f3080 25278 echo ' .hidden foobar
8ada417f 25279foobar:' > conftest.s
ba479fd2
NN
25280 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
25281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25282 (eval $ac_try) 2>&5
25283 ac_status=$?
25284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25285 (exit $ac_status); }; }
8ada417f
ZW
25286 then
25287 gcc_cv_as_hidden=yes
25288 else
25289 echo "configure: failed program was" >&5
25290 cat conftest.s >&5
25291 fi
25292 rm -f conftest.o conftest.s
25293 fi
25294fi
b61ff9c8
BS
25295echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
25296echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 25297
ad9c4d9f 25298
b61ff9c8
BS
25299echo "$as_me:$LINENO: checking linker for .hidden support" >&5
25300echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
ba479fd2
NN
25301if test "${gcc_cv_ld_hidden+set}" = set; then
25302 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
25303else
25304 if test $in_tree_ld = yes ; then
25305 gcc_cv_ld_hidden=no
25306 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 \
25307 && test $in_tree_ld_is_elf = yes; then
25308 gcc_cv_ld_hidden=yes
25309 fi
25310else
25311 gcc_cv_ld_hidden=yes
bace148a 25312 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
25313 if echo "$ld_ver" | grep GNU > /dev/null; then
25314 ld_vers=`echo $ld_ver | sed -n \
115e6e55 25315 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
8ada417f 25316 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
25317 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
25318 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
25319 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
25320 if test 0"$ld_date" -lt 20020404; then
25321 if test -n "$ld_date"; then
25322 # If there was date string, but was earlier than 2002-04-04, fail
25323 gcc_cv_ld_hidden=no
25324 elif test -z "$ld_vers"; then
25325 # If there was no date string nor ld version number, something is wrong
25326 gcc_cv_ld_hidden=no
25327 else
8ada417f
ZW
25328 test -z "$ld_vers_patch" && ld_vers_patch=0
25329 if test "$ld_vers_major" -lt 2; then
25330 gcc_cv_ld_hidden=no
25331 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
25332 gcc_cv_ld_hidden="no"
25333 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
25334 gcc_cv_ld_hidden=no
c72931a6 25335 fi
8ada417f 25336 fi
789b7de5 25337 fi
8ada417f 25338 else
28690784 25339 case "${target}" in
b0fd7d27 25340 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
25341 gcc_cv_ld_hidden=yes
25342 ;;
5e87dc23
RO
25343 *-*-solaris2.9* | *-*-solaris2.1[0-9]*)
25344 gcc_cv_ld_hidden=yes
25345 ;;
28690784
JDA
25346 *)
25347 gcc_cv_ld_hidden=no
25348 ;;
25349 esac
8ada417f
ZW
25350 fi
25351fi
6d07784a 25352fi
b61ff9c8
BS
25353echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
25354echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 25355libgcc_visibility=no
ad9c4d9f 25356
232b67d9 25357
8e3940b2 25358if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 25359 libgcc_visibility=yes
ba479fd2
NN
25360
25361cat >>confdefs.h <<\_ACEOF
8ada417f 25362#define HAVE_GAS_HIDDEN 1
ba479fd2 25363_ACEOF
ad9c4d9f
NN
25364
25365fi
25366
e73da78e
RO
25367echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
25368echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
25369gcc_cv_ld_ro_rw_mix=unknown
25370if test $in_tree_ld = yes ; then
25371 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 \
25372 && test $in_tree_ld_is_elf = yes; then
25373 gcc_cv_ld_ro_rw_mix=read-write
25374 fi
25375elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
25376 echo '.section myfoosect, "a"' > conftest1.s
25377 echo '.section myfoosect, "aw"' > conftest2.s
25378 echo '.byte 1' >> conftest2.s
25379 echo '.section myfoosect, "a"' > conftest3.s
25380 echo '.byte 0' >> conftest3.s
25381 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
25382 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
25383 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
25384 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
25385 conftest2.o conftest3.o > /dev/null 2>&1; then
25386 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
25387 | sed -e '/myfoosect/!d' -e N`
25388 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
25389 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
25390 gcc_cv_ld_ro_rw_mix=read-only
25391 else
25392 gcc_cv_ld_ro_rw_mix=read-write
25393 fi
25394 fi
25395 fi
25396 rm -f conftest.* conftest[123].*
25397fi
25398if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
25399
25400cat >>confdefs.h <<\_ACEOF
25401#define HAVE_LD_RO_RW_SECTION_MIXING 1
25402_ACEOF
25403
25404fi
25405echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
25406echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
25407
8ada417f 25408# Check if we have .[us]leb128, and support symbol arithmetic with it.
b61ff9c8
BS
25409echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
25410echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
ba479fd2
NN
25411if test "${gcc_cv_as_leb128+set}" = set; then
25412 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
25413else
25414 gcc_cv_as_leb128=no
25415 if test $in_tree_gas = yes; then
25416 if test $in_tree_gas_is_elf = yes \
25417 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
25418 then gcc_cv_as_leb128=yes
25419fi
25420 elif test x$gcc_cv_as != x; then
6e3f3080 25421 echo ' .data
b7460f24
RH
25422 .uleb128 L2 - L1
25423L1:
25424 .uleb128 1280
25425 .sleb128 -1010
8ada417f 25426L2:' > conftest.s
ba479fd2
NN
25427 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
25428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25429 (eval $ac_try) 2>&5
25430 ac_status=$?
25431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25432 (exit $ac_status); }; }
8ada417f
ZW
25433 then
25434 # GAS versions before 2.11 do not support uleb128,
25435 # despite appearing to.
25436 # ??? There exists an elf-specific test that will crash
25437 # the assembler. Perhaps it's better to figure out whether
25438 # arbitrary sections are supported and try the test.
bace148a 25439 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f 25440 if echo "$as_ver" | grep GNU > /dev/null; then
ddcd0f6f 25441 as_vers=`echo $as_ver | sed -n \
115e6e55 25442 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
ddcd0f6f
BS
25443 as_major=`expr "$as_vers" : '\([0-9]*\)'`
25444 as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
25445 if test $as_major -eq 2 && test $as_minor -lt 11
25446 then :
25447 else gcc_cv_as_leb128=yes
25448 fi
25449 fi
25450 else
25451 echo "configure: failed program was" >&5
25452 cat conftest.s >&5
25453 fi
25454 rm -f conftest.o conftest.s
25455 fi
b7460f24 25456fi
b61ff9c8
BS
25457echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
25458echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 25459if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
25460
25461cat >>confdefs.h <<\_ACEOF
b7460f24 25462#define HAVE_AS_LEB128 1
ba479fd2 25463_ACEOF
b7460f24
RH
25464
25465fi
ad9c4d9f 25466
d4ea4622
RH
25467# Check if we have assembler support for unwind directives.
25468echo "$as_me:$LINENO: checking assembler for cfi directives" >&5
25469echo $ECHO_N "checking assembler for cfi directives... $ECHO_C" >&6
25470if test "${gcc_cv_as_cfi_directive+set}" = set; then
25471 echo $ECHO_N "(cached) $ECHO_C" >&6
25472else
25473 gcc_cv_as_cfi_directive=no
6e60703f 25474 if test x$gcc_cv_as != x; then
d4ea4622
RH
25475 echo ' .text
25476 .cfi_startproc
25477 .cfi_offset 0, 0
25478 .cfi_same_value 1
25479 .cfi_def_cfa 1, 2
25480 .cfi_escape 1, 2, 3, 4, 5
25481 .cfi_endproc' > conftest.s
25482 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
25483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25484 (eval $ac_try) 2>&5
25485 ac_status=$?
25486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25487 (exit $ac_status); }; }
25488 then
e73da78e
RO
25489 case "$target" in
25490 *-*-solaris*)
25491 # If the linker used on Solaris (like Sun ld) isn't capable of merging
25492 # read-only and read-write sections, we need to make sure that the
25493 # assembler used emits read-write .eh_frame sections.
25494 if test "x$gcc_cv_ld_ro_rw_mix" != xread-write; then
25495 if test "x$gcc_cv_objdump" != x; then
25496 if $gcc_cv_objdump -h conftest.o 2>/dev/null | \
25497 sed -e /.eh_frame/!d -e N | grep READONLY > /dev/null; then
25498 gcc_cv_as_cfi_directive=no
25499 else
25500 gcc_cv_as_cfi_directive=yes
25501 fi
25502 else
25503 # no objdump, err on the side of caution
25504 gcc_cv_as_cfi_directive=no
25505 fi
25506 else
25507 gcc_cv_as_cfi_directive=yes
25508 fi
25509 ;;
25510 *-*-*)
25511 gcc_cv_as_cfi_directive=yes
25512 ;;
25513esac
d4ea4622
RH
25514 else
25515 echo "configure: failed program was" >&5
25516 cat conftest.s >&5
25517 fi
25518 rm -f conftest.o conftest.s
25519 fi
25520fi
25521echo "$as_me:$LINENO: result: $gcc_cv_as_cfi_directive" >&5
25522echo "${ECHO_T}$gcc_cv_as_cfi_directive" >&6
25523
6e97481b
JJ
25524if test $gcc_cv_as_cfi_directive = yes && test x$gcc_cv_readelf != x; then
25525echo "$as_me:$LINENO: checking assembler for working cfi advance" >&5
25526echo $ECHO_N "checking assembler for working cfi advance... $ECHO_C" >&6
25527if test "${gcc_cv_as_cfi_advance_working+set}" = set; then
25528 echo $ECHO_N "(cached) $ECHO_C" >&6
25529else
25530 gcc_cv_as_cfi_advance_working=no
25531 if test x$gcc_cv_as != x; then
25532 echo ' .text
25533 .cfi_startproc
25534 .cfi_adjust_cfa_offset 64
25535 .skip 512, 0
25536 .cfi_adjust_cfa_offset 128
25537 .cfi_endproc' > conftest.s
25538 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
25539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25540 (eval $ac_try) 2>&5
25541 ac_status=$?
25542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25543 (exit $ac_status); }; }
25544 then
25545
25546if $gcc_cv_readelf -wf conftest.o 2>/dev/null \
25547 | grep 'DW_CFA_advance_loc[12]:[ ][ ]*512[ ]' >/dev/null; then
25548 gcc_cv_as_cfi_advance_working=yes
25549fi
25550
25551 else
25552 echo "configure: failed program was" >&5
25553 cat conftest.s >&5
25554 fi
25555 rm -f conftest.o conftest.s
25556 fi
25557fi
25558echo "$as_me:$LINENO: result: $gcc_cv_as_cfi_advance_working" >&5
25559echo "${ECHO_T}$gcc_cv_as_cfi_advance_working" >&6
25560
25561else
66f91112
EB
25562 # no readelf, err on the side of caution
25563 gcc_cv_as_cfi_advance_working=no
6e97481b 25564fi
d4ea4622
RH
25565
25566cat >>confdefs.h <<_ACEOF
6e97481b
JJ
25567#define HAVE_GAS_CFI_DIRECTIVE `if test $gcc_cv_as_cfi_directive = yes \
25568 && test $gcc_cv_as_cfi_advance_working = yes; then echo 1; else echo 0; fi`
d4ea4622
RH
25569_ACEOF
25570
25571
058514b3
RH
25572echo "$as_me:$LINENO: checking assembler for cfi personality directive" >&5
25573echo $ECHO_N "checking assembler for cfi personality directive... $ECHO_C" >&6
25574if test "${gcc_cv_as_cfi_personality_directive+set}" = set; then
25575 echo $ECHO_N "(cached) $ECHO_C" >&6
25576else
25577 gcc_cv_as_cfi_personality_directive=no
6e60703f 25578 if test x$gcc_cv_as != x; then
058514b3 25579 echo ' .text
042628f9 25580 .cfi_startproc
058514b3
RH
25581 .cfi_personality 0, symbol
25582 .cfi_endproc' > conftest.s
25583 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
25584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25585 (eval $ac_try) 2>&5
25586 ac_status=$?
25587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25588 (exit $ac_status); }; }
25589 then
25590 gcc_cv_as_cfi_personality_directive=yes
25591 else
25592 echo "configure: failed program was" >&5
25593 cat conftest.s >&5
25594 fi
25595 rm -f conftest.o conftest.s
25596 fi
25597fi
25598echo "$as_me:$LINENO: result: $gcc_cv_as_cfi_personality_directive" >&5
25599echo "${ECHO_T}$gcc_cv_as_cfi_personality_directive" >&6
25600
25601
25602cat >>confdefs.h <<_ACEOF
25603#define HAVE_GAS_CFI_PERSONALITY_DIRECTIVE `if test $gcc_cv_as_cfi_personality_directive = yes;
25604 then echo 1; else echo 0; fi`
25605_ACEOF
25606
25607
8ada417f
ZW
25608# GAS versions up to and including 2.11.0 may mis-optimize
25609# .eh_frame data.
b61ff9c8
BS
25610echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
25611echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
ba479fd2
NN
25612if test "${gcc_cv_as_eh_frame+set}" = set; then
25613 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
25614else
25615 gcc_cv_as_eh_frame=no
25616 if test $in_tree_gas = yes; then
25617 if test $in_tree_gas_is_elf = yes \
25618 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
25619 then gcc_cv_as_eh_frame=yes
ad9c4d9f 25620fi
8ada417f 25621 elif test x$gcc_cv_as != x; then
6e3f3080 25622 echo ' .text
c64688ae
RH
25623.LFB1:
25624 .4byte 0
25625.L1:
25626 .4byte 0
25627.LFE1:
25628 .section .eh_frame,"aw",@progbits
25629__FRAME_BEGIN__:
25630 .4byte .LECIE1-.LSCIE1
25631.LSCIE1:
25632 .4byte 0x0
25633 .byte 0x1
25634 .ascii "z\0"
25635 .byte 0x1
25636 .byte 0x78
25637 .byte 0x1a
25638 .byte 0x0
25639 .byte 0x4
25640 .4byte 1
25641 .p2align 1
25642.LECIE1:
25643.LSFDE1:
25644 .4byte .LEFDE1-.LASFDE1
25645.LASFDE1:
25646 .4byte .LASFDE1-__FRAME_BEGIN__
25647 .4byte .LFB1
25648 .4byte .LFE1-.LFB1
25649 .byte 0x4
25650 .4byte .LFE1-.LFB1
25651 .byte 0x4
25652 .4byte .L1-.LFB1
8ada417f 25653.LEFDE1:' > conftest.s
ba479fd2
NN
25654 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
25655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25656 (eval $ac_try) 2>&5
25657 ac_status=$?
25658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25659 (exit $ac_status); }; }
8ada417f
ZW
25660 then
25661 cat > conftest.lit <<EOF
c64688ae
RH
25662 0000 10000000 00000000 017a0001 781a0004 .........z..x...
25663 0010 01000000 12000000 18000000 00000000 ................
093e61a6 25664 0020 08000000 04080000 0044 .........D
01efb963 25665EOF
ba479fd2 25666cat > conftest.big <<EOF
01efb963
AS
25667 0000 00000010 00000000 017a0001 781a0004 .........z..x...
25668 0010 00000001 00000012 00000018 00000000 ................
093e61a6 25669 0020 00000008 04000000 0844 .........D
c64688ae 25670EOF
8ada417f
ZW
25671 # If the assembler didn't choke, and we can objdump,
25672 # and we got the correct data, then succeed.
dbc02e7f
AS
25673 # The text in the here-document typically retains its unix-style line
25674 # endings, while the output of objdump will use host line endings.
25675 # Therefore, use diff -b for the comparisons.
8ada417f
ZW
25676 if test x$gcc_cv_objdump != x \
25677 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
25678 | tail -3 > conftest.got \
dbc02e7f
AS
25679 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
25680 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
8ada417f
ZW
25681 then
25682 gcc_cv_as_eh_frame=yes
ba479fd2
NN
25683 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
25684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25685 (eval $ac_try) 2>&5
25686 ac_status=$?
25687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25688 (exit $ac_status); }; }; then
8ada417f
ZW
25689 gcc_cv_as_eh_frame=buggy
25690 else
25691 # Uh oh, what do we do now?
25692 gcc_cv_as_eh_frame=no
25693 fi
25694 else
25695 echo "configure: failed program was" >&5
25696 cat conftest.s >&5
25697 fi
25698 rm -f conftest.o conftest.s
25699 fi
c64688ae 25700fi
b61ff9c8
BS
25701echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
25702echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 25703
6e3f3080 25704
63cf211a 25705if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
25706
25707cat >>confdefs.h <<\_ACEOF
8ada417f 25708#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 25709_ACEOF
ad9c4d9f
NN
25710
25711fi
25712
b61ff9c8
BS
25713echo "$as_me:$LINENO: checking assembler for section merging support" >&5
25714echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
ba479fd2
NN
25715if test "${gcc_cv_as_shf_merge+set}" = set; then
25716 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
25717else
25718 gcc_cv_as_shf_merge=no
25719 if test $in_tree_gas = yes; then
25720 if test $in_tree_gas_is_elf = yes \
25721 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
25722 then gcc_cv_as_shf_merge=yes
25723fi
25724 elif test x$gcc_cv_as != x; then
6e3f3080 25725 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
25726 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
25727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25728 (eval $ac_try) 2>&5
25729 ac_status=$?
25730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25731 (exit $ac_status); }; }
8ada417f
ZW
25732 then
25733 gcc_cv_as_shf_merge=yes
25734 else
25735 echo "configure: failed program was" >&5
25736 cat conftest.s >&5
25737 fi
25738 rm -f conftest.o conftest.s
25739 fi
201556f0 25740fi
b61ff9c8
BS
25741echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
25742echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 25743
c18a5b6c 25744if test $gcc_cv_as_shf_merge = no; then
b61ff9c8
BS
25745 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
25746echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
c18a5b6c
MM
25747if test "${gcc_cv_as_shf_merge+set}" = set; then
25748 echo $ECHO_N "(cached) $ECHO_C" >&6
25749else
25750 gcc_cv_as_shf_merge=no
25751 if test $in_tree_gas = yes; then
25752 if test $in_tree_gas_is_elf = yes \
25753 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
25754 then gcc_cv_as_shf_merge=yes
25755fi
25756 elif test x$gcc_cv_as != x; then
25757 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
25758 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
25759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25760 (eval $ac_try) 2>&5
25761 ac_status=$?
25762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25763 (exit $ac_status); }; }
25764 then
25765 gcc_cv_as_shf_merge=yes
25766 else
25767 echo "configure: failed program was" >&5
25768 cat conftest.s >&5
25769 fi
25770 rm -f conftest.o conftest.s
25771 fi
25772fi
b61ff9c8
BS
25773echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
25774echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
c18a5b6c
MM
25775
25776fi
8ad9fb33 25777
ba479fd2 25778cat >>confdefs.h <<_ACEOF
8ad9fb33 25779#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 25780_ACEOF
201556f0 25781
201556f0 25782
b61ff9c8
BS
25783echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
25784echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
25785if test "${gcc_cv_as_comdat_group+set}" = set; then
25786 echo $ECHO_N "(cached) $ECHO_C" >&6
25787else
25788 gcc_cv_as_comdat_group=no
25789 if test $in_tree_gas = yes; then
25790 if test $in_tree_gas_is_elf = yes \
11176d2a 25791 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
25792 then gcc_cv_as_comdat_group=yes
25793fi
25794 elif test x$gcc_cv_as != x; then
25795 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
25796 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
25797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25798 (eval $ac_try) 2>&5
25799 ac_status=$?
25800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25801 (exit $ac_status); }; }
25802 then
25803 gcc_cv_as_comdat_group=yes
25804 else
25805 echo "configure: failed program was" >&5
25806 cat conftest.s >&5
25807 fi
25808 rm -f conftest.o conftest.s
25809 fi
25810fi
b61ff9c8
BS
25811echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
25812echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
c18a5b6c
MM
25813
25814if test $gcc_cv_as_comdat_group = yes; then
25815 gcc_cv_as_comdat_group_percent=no
25816else
b61ff9c8
BS
25817 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
25818echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
25819if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
25820 echo $ECHO_N "(cached) $ECHO_C" >&6
25821else
25822 gcc_cv_as_comdat_group_percent=no
25823 if test $in_tree_gas = yes; then
25824 if test $in_tree_gas_is_elf = yes \
11176d2a 25825 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
25826 then gcc_cv_as_comdat_group_percent=yes
25827fi
25828 elif test x$gcc_cv_as != x; then
25829 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
25830 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
25831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25832 (eval $ac_try) 2>&5
25833 ac_status=$?
25834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25835 (exit $ac_status); }; }
25836 then
25837 gcc_cv_as_comdat_group_percent=yes
25838 else
25839 echo "configure: failed program was" >&5
25840 cat conftest.s >&5
25841 fi
25842 rm -f conftest.o conftest.s
25843 fi
25844fi
b61ff9c8
BS
25845echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
25846echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
c18a5b6c
MM
25847
25848fi
11176d2a
JB
25849if test $in_tree_ld != yes && test x"$ld_vers" != x; then
25850 comdat_group=yes
25851 if test 0"$ld_date" -lt 20050308; then
25852 if test -n "$ld_date"; then
25853 # If there was date string, but was earlier than 2005-03-08, fail
25854 comdat_group=no
25855 elif test "$ld_vers_major" -lt 2; then
25856 comdat_group=no
25857 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
25858 comdat_group=no
25859 fi
25860 fi
1cf0118d
RO
25861else
25862 # assume linkers other than GNU ld don't support COMDAT group
25863 comdat_group=no
25864fi
25865if test $comdat_group = no; then
25866 gcc_cv_as_comdat_group=no
25867 gcc_cv_as_comdat_group_percent=no
11176d2a 25868fi
c18a5b6c
MM
25869
25870cat >>confdefs.h <<_ACEOF
11176d2a 25871#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
25872_ACEOF
25873
25874
6c52e687
CC
25875echo "$as_me:$LINENO: checking assembler for line table discriminator support" >&5
25876echo $ECHO_N "checking assembler for line table discriminator support... $ECHO_C" >&6
25877if test "${gcc_cv_as_discriminator+set}" = set; then
25878 echo $ECHO_N "(cached) $ECHO_C" >&6
25879else
25880 gcc_cv_as_discriminator=no
25881 if test $in_tree_gas = yes; then
25882 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 51`
25883 then gcc_cv_as_discriminator=yes
25884fi
25885 elif test x$gcc_cv_as != x; then
25886 echo ' .text
25887 .file 1 "conf.c"
25888 .loc 1 1 0 discriminator 1' > conftest.s
25889 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
25890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25891 (eval $ac_try) 2>&5
25892 ac_status=$?
25893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25894 (exit $ac_status); }; }
25895 then
25896 gcc_cv_as_discriminator=yes
25897 else
25898 echo "configure: failed program was" >&5
25899 cat conftest.s >&5
25900 fi
25901 rm -f conftest.o conftest.s
25902 fi
25903fi
25904echo "$as_me:$LINENO: result: $gcc_cv_as_discriminator" >&5
25905echo "${ECHO_T}$gcc_cv_as_discriminator" >&6
25906if test $gcc_cv_as_discriminator = yes; then
25907
25908cat >>confdefs.h <<\_ACEOF
25909#define HAVE_GAS_DISCRIMINATOR 1
25910_ACEOF
25911
25912fi
25913
6a7a462c 25914# Thread-local storage - the check is heavily parameterized.
f996902d
RH
25915conftest_s=
25916tls_first_major=
25917tls_first_minor=
9739c90c 25918tls_as_opt=
f996902d 25919case "$target" in
6f9b006d
RH
25920 alpha*-*-*)
25921 conftest_s='
25922 .section ".tdata","awT",@progbits
25923foo: .long 25
25924 .text
25925 ldq $27,__tls_get_addr($29) !literal!1
25926 lda $16,foo($29) !tlsgd!1
25927 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
25928 ldq $27,__tls_get_addr($29) !literal!2
25929 lda $16,foo($29) !tlsldm!2
25930 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
25931 ldq $1,foo($29) !gotdtprel
25932 ldah $2,foo($29) !dtprelhi
25933 lda $3,foo($2) !dtprello
25934 lda $4,foo($29) !dtprel
25935 ldq $1,foo($29) !gottprel
25936 ldah $2,foo($29) !tprelhi
25937 lda $3,foo($2) !tprello
25938 lda $4,foo($29) !tprel'
25939 tls_first_major=2
25940 tls_first_minor=13
2f3321ca 25941 tls_as_opt=--fatal-warnings
6f9b006d 25942 ;;
ad9646c7
HPN
25943 cris-*-*|crisv32-*-*)
25944 conftest_s='
25945 .section ".tdata","awT",@progbits
25946x: .long 25
25947 .text
25948 move.d x:IE,$r10
25949 nop'
25950 tls_first_major=2
25951 tls_first_minor=20
25952 tls_as_opt=--fatal-warnings
25953 ;;
e4dd71de
AH
25954 frv*-*-*)
25955 conftest_s='
25956 .section ".tdata","awT",@progbits
25957x: .long 25
25958 .text
25959 call #gettlsoff(x)'
25960 tls_first_major=2
25961 tls_first_minor=14
25962 ;;
51076f96
RC
25963 hppa*-*-linux*)
25964 conftest_s='
25965t1: .reg %r20
25966t2: .reg %r21
25967gp: .reg %r19
25968 .section ".tdata","awT",@progbits
25969foo: .long 25
25970 .text
25971 .align 4
25972 addil LT%foo-$tls_gdidx$,gp
25973 ldo RT%foo-$tls_gdidx$(%r1),%arg0
25974 b __tls_get_addr
25975 nop
25976 addil LT%foo-$tls_ldidx$,gp
25977 b __tls_get_addr
25978 ldo RT%foo-$tls_ldidx$(%r1),%arg0
25979 addil LR%foo-$tls_dtpoff$,%ret0
25980 ldo RR%foo-$tls_dtpoff$(%r1),%t1
25981 mfctl %cr27,%t1
25982 addil LT%foo-$tls_ieoff$,gp
25983 ldw RT%foo-$tls_ieoff$(%r1),%t2
25984 add %t1,%t2,%t3
25985 mfctl %cr27,%t1
25986 addil LR%foo-$tls_leoff$,%t1
25987 ldo RR%foo-$tls_leoff$(%r1),%t2'
25988 tls_first_major=2
25989 tls_first_minor=15
25990 tls_as_opt=--fatal-warnings
25991 ;;
d3585b76
DJ
25992 arm*-*-*)
25993 conftest_s='
25994 .section ".tdata","awT",%progbits
25995foo: .long 25
25996 .text
25997.word foo(gottpoff)
25998.word foo(tpoff)
25999.word foo(tlsgd)
26000.word foo(tlsldm)
26001.word foo(tlsldo)'
26002 tls_first_major=2
26003 tls_first_minor=17
26004 ;;
f996902d
RH
26005 i[34567]86-*-*)
26006 conftest_s='
26007 .section ".tdata","awT",@progbits
26008foo: .long 25
26009 .text
26010 movl %gs:0, %eax
26011 leal foo@TLSGD(,%ebx,1), %eax
26012 leal foo@TLSLDM(%ebx), %eax
26013 leal foo@DTPOFF(%eax), %edx
26014 movl foo@GOTTPOFF(%ebx), %eax
26015 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
26016 addl foo@GOTNTPOFF(%ebx), %eax
26017 movl foo@INDNTPOFF, %eax
f996902d
RH
26018 movl $foo@TPOFF, %eax
26019 subl $foo@TPOFF, %eax
26020 leal foo@NTPOFF(%ecx), %eax'
26021 tls_first_major=2
75d38379 26022 tls_first_minor=14
2f3321ca 26023 tls_as_opt=--fatal-warnings
75d38379
JJ
26024 ;;
26025 x86_64-*-*)
26026 conftest_s='
26027 .section ".tdata","awT",@progbits
26028foo: .long 25
26029 .text
26030 movq %fs:0, %rax
26031 leaq foo@TLSGD(%rip), %rdi
26032 leaq foo@TLSLD(%rip), %rdi
26033 leaq foo@DTPOFF(%rax), %rdx
26034 movq foo@GOTTPOFF(%rip), %rax
26035 movq $foo@TPOFF, %rax'
26036 tls_first_major=2
26037 tls_first_minor=14
2f3321ca 26038 tls_as_opt=--fatal-warnings
f996902d 26039 ;;
7b6e506e
RH
26040 ia64-*-*)
26041 conftest_s='
26042 .section ".tdata","awT",@progbits
26043foo: data8 25
26044 .text
26045 addl r16 = @ltoff(@dtpmod(foo#)), gp
26046 addl r17 = @ltoff(@dtprel(foo#)), gp
26047 addl r18 = @ltoff(@tprel(foo#)), gp
26048 addl r19 = @dtprel(foo#), gp
26049 adds r21 = @dtprel(foo#), r13
26050 movl r23 = @dtprel(foo#)
26051 addl r20 = @tprel(foo#), gp
26052 adds r22 = @tprel(foo#), r13
26053 movl r24 = @tprel(foo#)'
26054 tls_first_major=2
26055 tls_first_minor=13
2f3321ca 26056 tls_as_opt=--fatal-warnings
7b6e506e 26057 ;;
69229b81
DJ
26058 mips*-*-*)
26059 conftest_s='
26060 .section .tdata,"awT",@progbits
26061x:
26062 .word 2
26063 .text
26064 addiu $4, $28, %tlsgd(x)
26065 addiu $4, $28, %tlsldm(x)
26066 lui $4, %dtprel_hi(x)
26067 addiu $4, $4, %dtprel_lo(x)
26068 lw $4, %gottprel(x)($28)
26069 lui $4, %tprel_hi(x)
26070 addiu $4, $4, %tprel_lo(x)'
26071 tls_first_major=2
26072 tls_first_minor=16
26073 tls_as_opt='-32 --fatal-warnings'
26074 ;;
75df395f
MK
26075 m68k-*-*)
26076 conftest_s='
26077 .section .tdata,"awT",@progbits
26078x:
26079 .word 2
26080 .text
26081foo:
26082 move.l x@TLSGD(%a5),%a0
26083 move.l x@TLSLDM(%a5),%a0
26084 move.l x@TLSLDO(%a5),%a0
26085 move.l x@TLSIE(%a5),%a0
26086 move.l x@TLSLE(%a5),%a0'
26087 tls_first_major=2
26088 tls_first_minor=19
26089 tls_as_opt='--fatal-warnings'
26090 ;;
c4501e62
JJ
26091 powerpc-*-*)
26092 conftest_s='
26093 .section ".tdata","awT",@progbits
26094 .align 2
26095ld0: .space 4
26096ld1: .space 4
26097x1: .space 4
26098x2: .space 4
26099x3: .space 4
26100 .text
26101 addi 3,31,ld0@got@tlsgd
26102 bl __tls_get_addr
26103 addi 3,31,x1@got@tlsld
26104 bl __tls_get_addr
26105 addi 9,3,x1@dtprel
26106 addis 9,3,x2@dtprel@ha
26107 addi 9,9,x2@dtprel@l
26108 lwz 9,x3@got@tprel(31)
26109 add 9,9,x@tls
26110 addi 9,2,x1@tprel
26111 addis 9,2,x2@tprel@ha
26112 addi 9,9,x2@tprel@l'
26113 tls_first_major=2
26114 tls_first_minor=14
2f3321ca 26115 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
26116 ;;
26117 powerpc64-*-*)
26118 conftest_s='
26119 .section ".tdata","awT",@progbits
26120 .align 3
26121ld0: .space 8
26122ld1: .space 8
26123x1: .space 8
26124x2: .space 8
26125x3: .space 8
26126 .text
26127 addi 3,2,ld0@got@tlsgd
26128 bl .__tls_get_addr
26129 nop
26130 addi 3,2,ld1@toc
26131 bl .__tls_get_addr
26132 nop
26133 addi 3,2,x1@got@tlsld
26134 bl .__tls_get_addr
26135 nop
26136 addi 9,3,x1@dtprel
26137 bl .__tls_get_addr
26138 nop
26139 addis 9,3,x2@dtprel@ha
26140 addi 9,9,x2@dtprel@l
26141 bl .__tls_get_addr
26142 nop
26143 ld 9,x3@got@dtprel(2)
26144 add 9,9,3
26145 bl .__tls_get_addr
26146 nop'
26147 tls_first_major=2
26148 tls_first_minor=14
2f3321ca 26149 tls_as_opt="-a64 --fatal-warnings"
c4501e62 26150 ;;
fd3cd001
UW
26151 s390-*-*)
26152 conftest_s='
26153 .section ".tdata","awT",@progbits
26154foo: .long 25
26155 .text
26156 .long foo@TLSGD
26157 .long foo@TLSLDM
26158 .long foo@DTPOFF
26159 .long foo@NTPOFF
26160 .long foo@GOTNTPOFF
26161 .long foo@INDNTPOFF
26162 l %r1,foo@GOTNTPOFF(%r12)
26163 l %r1,0(%r1):tls_load:foo
26164 bas %r14,0(%r1,%r13):tls_gdcall:foo
26165 bas %r14,0(%r1,%r13):tls_ldcall:foo'
26166 tls_first_major=2
26167 tls_first_minor=14
2f3321ca 26168 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
26169 ;;
26170 s390x-*-*)
26171 conftest_s='
26172 .section ".tdata","awT",@progbits
26173foo: .long 25
26174 .text
26175 .quad foo@TLSGD
26176 .quad foo@TLSLDM
26177 .quad foo@DTPOFF
26178 .quad foo@NTPOFF
26179 .quad foo@GOTNTPOFF
26180 lg %r1,foo@GOTNTPOFF(%r12)
26181 larl %r1,foo@INDNTPOFF
26182 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
26183 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
26184 tls_first_major=2
26185 tls_first_minor=14
2f3321ca 26186 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 26187 ;;
9ff13962
KK
26188 sh-*-* | sh[34]-*-*)
26189 conftest_s='
26190 .section ".tdata","awT",@progbits
26191foo: .long 25
26192 .text
26193 .long foo@TLSGD
26194 .long foo@TLSLDM
26195 .long foo@DTPOFF
26196 .long foo@GOTTPOFF
26197 .long foo@TPOFF'
26198 tls_first_major=2
26199 tls_first_minor=13
2f3321ca 26200 tls_as_opt=--fatal-warnings
9ff13962 26201 ;;
5751a10b 26202 sparc*-*-*)
2f3321ca 26203 case "$target" in
7935dc1b
EB
26204 sparc*-sun-solaris2.[56789]*)
26205 # TLS was introduced in the Solaris 9 4/04 release but
26206 # we do not enable it by default on Solaris 9 either.
26207 if test "x$enable_tls" = xyes ; then
26208 on_solaris=yes
26209 else
26210 enable_tls=no;
26211 fi
26212 ;;
2f3321ca
EB
26213 sparc*-sun-solaris2.*)
26214 on_solaris=yes
26215 ;;
26216 *)
26217 on_solaris=no
26218 ;;
26219 esac
26220 if test x$on_solaris = xyes && test x$gas_flag = xno; then
26221 conftest_s='
26222 .section ".tdata",#alloc,#write,#tls
26223foo: .long 25
26224 .text
26225 sethi %tgd_hi22(foo), %o0
26226 add %o0, %tgd_lo10(foo), %o1
26227 add %l7, %o1, %o0, %tgd_add(foo)
26228 call __tls_get_addr, %tgd_call(foo)
26229 sethi %tldm_hi22(foo), %l1
26230 add %l1, %tldm_lo10(foo), %l2
26231 add %l7, %l2, %o0, %tldm_add(foo)
26232 call __tls_get_addr, %tldm_call(foo)
26233 sethi %tldo_hix22(foo), %l3
26234 xor %l3, %tldo_lox10(foo), %l4
26235 add %o0, %l4, %l5, %tldo_add(foo)
26236 sethi %tie_hi22(foo), %o3
26237 add %o3, %tie_lo10(foo), %o3
26238 ld [%l7 + %o3], %o2, %tie_ld(foo)
26239 add %g7, %o2, %o4, %tie_add(foo)
26240 sethi %tle_hix22(foo), %l1
26241 xor %l1, %tle_lox10(foo), %o5
26242 ld [%g7 + %o5], %o1'
26243 tls_first_major=0
26244 tls_first_minor=0
26245 else
26246 conftest_s='
5751a10b
JJ
26247 .section ".tdata","awT",@progbits
26248foo: .long 25
26249 .text
26250 sethi %tgd_hi22(foo), %o0
26251 add %o0, %tgd_lo10(foo), %o1
26252 add %l7, %o1, %o0, %tgd_add(foo)
26253 call __tls_get_addr, %tgd_call(foo)
26254 sethi %tldm_hi22(foo), %l1
26255 add %l1, %tldm_lo10(foo), %l2
26256 add %l7, %l2, %o0, %tldm_add(foo)
26257 call __tls_get_addr, %tldm_call(foo)
26258 sethi %tldo_hix22(foo), %l3
26259 xor %l3, %tldo_lox10(foo), %l4
26260 add %o0, %l4, %l5, %tldo_add(foo)
26261 sethi %tie_hi22(foo), %o3
26262 add %o3, %tie_lo10(foo), %o3
26263 ld [%l7 + %o3], %o2, %tie_ld(foo)
26264 add %g7, %o2, %o4, %tie_add(foo)
26265 sethi %tle_hix22(foo), %l1
26266 xor %l1, %tle_lox10(foo), %o5
26267 ld [%g7 + %o5], %o1'
26268 tls_first_major=2
26269 tls_first_minor=14
2f3321ca
EB
26270 tls_as_opt="-32 --fatal-warnings"
26271 fi
5751a10b 26272 ;;
6a7a462c
BW
26273 xtensa*-*-*)
26274 conftest_s='
26275 .section ".tdata","awT",@progbits
26276foo: .long 25
26277 .text
26278 movi a8, foo@TLSFUNC
26279 movi a10, foo@TLSARG
26280 callx8.tls a8, foo@TLSCALL'
26281 tls_first_major=2
26282 tls_first_minor=19
26283 ;;
f996902d 26284esac
8dea1cca
DD
26285set_have_as_tls=no
26286if test "x$enable_tls" = xno ; then
26287 : # TLS explicitly disabled.
26288elif test "x$enable_tls" = xyes ; then
26289 set_have_as_tls=yes # TLS explicitly enabled.
26290elif test -z "$tls_first_major"; then
8ada417f
ZW
26291 : # If we don't have a check, assume no support.
26292else
b61ff9c8
BS
26293 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
26294echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
ba479fd2
NN
26295if test "${gcc_cv_as_tls+set}" = set; then
26296 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
26297else
26298 gcc_cv_as_tls=no
26299 if test $in_tree_gas = yes; then
26300 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
26301 then gcc_cv_as_tls=yes
ad9c4d9f 26302fi
8ada417f 26303 elif test x$gcc_cv_as != x; then
6e3f3080 26304 echo "$conftest_s" > conftest.s
2f3321ca 26305 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
26306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26307 (eval $ac_try) 2>&5
26308 ac_status=$?
26309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26310 (exit $ac_status); }; }
8ada417f
ZW
26311 then
26312 gcc_cv_as_tls=yes
26313 else
26314 echo "configure: failed program was" >&5
26315 cat conftest.s >&5
26316 fi
26317 rm -f conftest.o conftest.s
f996902d 26318 fi
f996902d 26319fi
b61ff9c8
BS
26320echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
26321echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 26322if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
26323 set_have_as_tls=yes
26324fi
26325fi
26326if test $set_have_as_tls = yes ; then
ba479fd2
NN
26327
26328cat >>confdefs.h <<\_ACEOF
f996902d 26329#define HAVE_AS_TLS 1
ba479fd2 26330_ACEOF
f996902d 26331
8ada417f
ZW
26332fi
26333
26334# Target-specific assembler checks.
f996902d 26335
b61ff9c8
BS
26336echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
26337echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
7e9d8517
L
26338gcc_cv_ld_static_dynamic=no
26339if test $in_tree_ld = yes ; then
83f0ccb8 26340 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; then
7e9d8517
L
26341 gcc_cv_ld_static_dynamic=yes
26342 fi
26343elif test x$gcc_cv_ld != x; then
26344 # Check if linker supports -Bstatic/-Bdynamic option
26345 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
26346 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
26347 gcc_cv_ld_static_dynamic=yes
26348 fi
26349fi
26350if test x"$gcc_cv_ld_static_dynamic" = xyes; then
26351
26352cat >>confdefs.h <<\_ACEOF
26353#define HAVE_LD_STATIC_DYNAMIC 1
26354_ACEOF
26355
26356fi
b61ff9c8
BS
26357echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
26358echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
7e9d8517 26359
d594623a 26360if test x"$demangler_in_ld" = xyes; then
b61ff9c8
BS
26361 echo "$as_me:$LINENO: checking linker --demangle support" >&5
26362echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
d594623a
L
26363 gcc_cv_ld_demangle=no
26364 if test $in_tree_ld = yes; then
26365 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 \
26366 gcc_cv_ld_demangle=yes
26367 fi
26368 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
26369 # Check if the GNU linker supports --demangle option
26370 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
26371 gcc_cv_ld_demangle=yes
26372 fi
26373 fi
26374 if test x"$gcc_cv_ld_demangle" = xyes; then
26375
26376cat >>confdefs.h <<\_ACEOF
26377#define HAVE_LD_DEMANGLE 1
26378_ACEOF
26379
26380 fi
b61ff9c8
BS
26381 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
26382echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
d594623a
L
26383fi
26384
3a37b08e
RH
26385case "$target" in
26386 # All TARGET_ABI_OSF targets.
26387 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
b61ff9c8
BS
26388 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
26389echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
26390if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
26391 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 26392else
8ada417f
ZW
26393 gcc_cv_as_alpha_explicit_relocs=no
26394 if test $in_tree_gas = yes; then
26395 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
26396 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 26397fi
8ada417f 26398 elif test x$gcc_cv_as != x; then
6e3f3080 26399 echo ' .set nomacro
3a37b08e
RH
26400 .text
26401 extbl $3, $2, $3 !lituse_bytoff!1
26402 ldq $2, a($29) !literal!1
26403 ldq $4, b($29) !literal!2
26404 ldq_u $3, 0($2) !lituse_base!1
26405 ldq $27, f($29) !literal!5
26406 jsr $26, ($27), f !lituse_jsr!5
26407 ldah $29, 0($26) !gpdisp!3
26408 lda $0, c($29) !gprel
26409 ldah $1, d($29) !gprelhigh
26410 lda $1, d($1) !gprellow
8ada417f 26411 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
26412 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
26413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26414 (eval $ac_try) 2>&5
26415 ac_status=$?
26416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26417 (exit $ac_status); }; }
8ada417f
ZW
26418 then
26419 gcc_cv_as_alpha_explicit_relocs=yes
26420 else
26421 echo "configure: failed program was" >&5
26422 cat conftest.s >&5
26423 fi
26424 rm -f conftest.o conftest.s
26425 fi
cafe096b 26426fi
b61ff9c8
BS
26427echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
26428echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 26429if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
26430
26431cat >>confdefs.h <<\_ACEOF
3a37b08e 26432#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 26433_ACEOF
3a37b08e 26434
d006f5eb 26435fi
b61ff9c8
BS
26436 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
26437echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
d006f5eb
RH
26438if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
26439 echo $ECHO_N "(cached) $ECHO_C" >&6
26440else
26441 gcc_cv_as_alpha_jsrdirect_relocs=no
26442 if test $in_tree_gas = yes; then
26443 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
26444 then gcc_cv_as_alpha_jsrdirect_relocs=yes
26445fi
26446 elif test x$gcc_cv_as != x; then
26447 echo ' .set nomacro
26448 .text
26449 ldq $27, a($29) !literal!1
26450 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
26451 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
26452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26453 (eval $ac_try) 2>&5
26454 ac_status=$?
26455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26456 (exit $ac_status); }; }
26457 then
26458 gcc_cv_as_alpha_jsrdirect_relocs=yes
26459 else
26460 echo "configure: failed program was" >&5
26461 cat conftest.s >&5
26462 fi
26463 rm -f conftest.o conftest.s
26464 fi
26465fi
b61ff9c8
BS
26466echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
26467echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
d006f5eb
RH
26468if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
26469
26470cat >>confdefs.h <<\_ACEOF
26471#define HAVE_AS_JSRDIRECT_RELOCS 1
26472_ACEOF
26473
86da66b5
HPN
26474fi
26475 ;;
26476
26477 cris-*-*)
b61ff9c8
BS
26478 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
26479echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
86da66b5
HPN
26480if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
26481 echo $ECHO_N "(cached) $ECHO_C" >&6
26482else
26483 gcc_cv_as_cris_no_mul_bug=no
26484 if test $in_tree_gas = yes; then
26485 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
26486 then gcc_cv_as_cris_no_mul_bug=yes
26487fi
26488 elif test x$gcc_cv_as != x; then
26489 echo '.text' > conftest.s
26490 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
26491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26492 (eval $ac_try) 2>&5
26493 ac_status=$?
26494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26495 (exit $ac_status); }; }
26496 then
26497 gcc_cv_as_cris_no_mul_bug=yes
26498 else
26499 echo "configure: failed program was" >&5
26500 cat conftest.s >&5
26501 fi
26502 rm -f conftest.o conftest.s
26503 fi
26504fi
b61ff9c8
BS
26505echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
26506echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
86da66b5
HPN
26507if test $gcc_cv_as_cris_no_mul_bug = yes; then
26508
26509cat >>confdefs.h <<\_ACEOF
26510#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
26511_ACEOF
26512
8ada417f 26513fi
3a37b08e 26514 ;;
8ada417f 26515
1cb36a98 26516 sparc*-*-*)
b61ff9c8
BS
26517 echo "$as_me:$LINENO: checking assembler for .register" >&5
26518echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
ba479fd2
NN
26519if test "${gcc_cv_as_sparc_register_op+set}" = set; then
26520 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 26521else
8ada417f
ZW
26522 gcc_cv_as_sparc_register_op=no
26523 if test x$gcc_cv_as != x; then
6e3f3080 26524 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
26525 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
26526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26527 (eval $ac_try) 2>&5
26528 ac_status=$?
26529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26530 (exit $ac_status); }; }
8ada417f
ZW
26531 then
26532 gcc_cv_as_sparc_register_op=yes
26533 else
26534 echo "configure: failed program was" >&5
26535 cat conftest.s >&5
26536 fi
26537 rm -f conftest.o conftest.s
26538 fi
cafe096b 26539fi
b61ff9c8
BS
26540echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
26541echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 26542if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
26543
26544cat >>confdefs.h <<\_ACEOF
1cb36a98 26545#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 26546_ACEOF
1cb36a98 26547
8ada417f 26548fi
1cb36a98 26549
b61ff9c8
BS
26550 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
26551echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
ba479fd2
NN
26552if test "${gcc_cv_as_sparc_relax+set}" = set; then
26553 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 26554else
8ada417f
ZW
26555 gcc_cv_as_sparc_relax=no
26556 if test x$gcc_cv_as != x; then
6e3f3080 26557 echo '.text' > conftest.s
ba479fd2
NN
26558 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
26559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26560 (eval $ac_try) 2>&5
26561 ac_status=$?
26562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26563 (exit $ac_status); }; }
8ada417f
ZW
26564 then
26565 gcc_cv_as_sparc_relax=yes
26566 else
26567 echo "configure: failed program was" >&5
26568 cat conftest.s >&5
26569 fi
26570 rm -f conftest.o conftest.s
26571 fi
cafe096b 26572fi
b61ff9c8
BS
26573echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
26574echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 26575if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
26576
26577cat >>confdefs.h <<\_ACEOF
e95b1e6a 26578#define HAVE_AS_RELAX_OPTION 1
ba479fd2 26579_ACEOF
e95b1e6a 26580
8ada417f 26581fi
e95b1e6a 26582
b61ff9c8
BS
26583 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
26584echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
ba479fd2
NN
26585if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
26586 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 26587else
8ada417f
ZW
26588 gcc_cv_as_sparc_ua_pcrel=no
26589 if test x$gcc_cv_as != x; then
6e3f3080 26590 echo '.text
8ada417f
ZW
26591foo:
26592 nop
26593.data
26594.align 4
26595.byte 0
26596.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
26597 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
26598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26599 (eval $ac_try) 2>&5
26600 ac_status=$?
26601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26602 (exit $ac_status); }; }
8ada417f
ZW
26603 then
26604 if test x$gcc_cv_ld != x \
26605 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
26606 gcc_cv_as_sparc_ua_pcrel=yes
26607 fi
26608 rm -f conftest
26609 else
26610 echo "configure: failed program was" >&5
26611 cat conftest.s >&5
26612 fi
26613 rm -f conftest.o conftest.s
26614 fi
cafe096b 26615fi
b61ff9c8
BS
26616echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
26617echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 26618if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
26619
26620cat >>confdefs.h <<\_ACEOF
17e9e88c 26621#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 26622_ACEOF
17e9e88c 26623
17e9e88c 26624
b61ff9c8
BS
26625 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
26626echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
ba479fd2
NN
26627if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
26628 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 26629else
8ada417f
ZW
26630 gcc_cv_as_sparc_ua_pcrel_hidden=no
26631 if test x$gcc_cv_as != x; then
6e3f3080 26632 echo '.data
8ada417f
ZW
26633.align 4
26634.byte 0x31
26635.uaword %r_disp32(foo)
26636.byte 0x32, 0x33, 0x34
26637.global foo
26638.hidden foo
26639foo:
26640.skip 4' > conftest.s
ba479fd2
NN
26641 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
26642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26643 (eval $ac_try) 2>&5
26644 ac_status=$?
26645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26646 (exit $ac_status); }; }
8ada417f
ZW
26647 then
26648 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
26649 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
26650 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
26651 | grep ' 31000000 07323334' > /dev/null 2>&1; then
26652 if $gcc_cv_objdump -R conftest 2> /dev/null \
26653 | grep 'DISP32' > /dev/null 2>&1; then
26654 :
26655 else
26656 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 26657 fi
8ada417f
ZW
26658 fi
26659 rm -f conftest
26660 else
26661 echo "configure: failed program was" >&5
26662 cat conftest.s >&5
26663 fi
26664 rm -f conftest.o conftest.s
26665 fi
cafe096b 26666fi
b61ff9c8
BS
26667echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
26668echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 26669if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
26670
26671cat >>confdefs.h <<\_ACEOF
cf7b8b0d 26672#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 26673_ACEOF
cf7b8b0d 26674
8ada417f 26675fi
ba479fd2 26676
8ada417f 26677fi # unaligned pcrel relocs
cf7b8b0d 26678
b61ff9c8
BS
26679 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
26680echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
ba479fd2
NN
26681if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
26682 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 26683else
8ada417f
ZW
26684 gcc_cv_as_sparc_offsetable_lo10=no
26685 if test x$gcc_cv_as != x; then
6e3f3080 26686 echo '.text
8ada417f
ZW
26687 or %g1, %lo(ab) + 12, %g1
26688 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
26689 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
26690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26691 (eval $ac_try) 2>&5
26692 ac_status=$?
26693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26694 (exit $ac_status); }; }
8ada417f
ZW
26695 then
26696 if test x$gcc_cv_objdump != x \
ecb0ccbc 26697 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 26698 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 26699 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
26700 fi
26701 else
26702 echo "configure: failed program was" >&5
26703 cat conftest.s >&5
26704 fi
26705 rm -f conftest.o conftest.s
26706 fi
cafe096b 26707fi
b61ff9c8
BS
26708echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
26709echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 26710if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
26711
26712cat >>confdefs.h <<\_ACEOF
1cb36a98 26713#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 26714_ACEOF
1cb36a98 26715
8ada417f 26716fi
1cb36a98
RH
26717 ;;
26718
c307e6dd 26719 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
26720 case $target_os in
26721 cygwin* | pe | mingw32*)
233215fe
DK
26722 # Recent binutils allows the three-operand form of ".comm" on PE. This
26723 # definition is used unconditionally to initialise the default state of
26724 # the target option variable that governs usage of the feature.
26725 echo "$as_me:$LINENO: checking assembler for .comm with alignment" >&5
26726echo $ECHO_N "checking assembler for .comm with alignment... $ECHO_C" >&6
26727if test "${gcc_cv_as_comm_has_align+set}" = set; then
26728 echo $ECHO_N "(cached) $ECHO_C" >&6
26729else
26730 gcc_cv_as_comm_has_align=no
26731 if test $in_tree_gas = yes; then
26732 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 52`
26733 then gcc_cv_as_comm_has_align=yes
26734fi
26735 elif test x$gcc_cv_as != x; then
26736 echo '.comm foo,1,32' > conftest.s
26737 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
26738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26739 (eval $ac_try) 2>&5
26740 ac_status=$?
26741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26742 (exit $ac_status); }; }
26743 then
26744 gcc_cv_as_comm_has_align=yes
26745 else
26746 echo "configure: failed program was" >&5
26747 cat conftest.s >&5
26748 fi
26749 rm -f conftest.o conftest.s
26750 fi
26751fi
26752echo "$as_me:$LINENO: result: $gcc_cv_as_comm_has_align" >&5
26753echo "${ECHO_T}$gcc_cv_as_comm_has_align" >&6
26754
26755
26756cat >>confdefs.h <<_ACEOF
26757#define HAVE_GAS_ALIGNED_COMM `if test $gcc_cv_as_comm_has_align = yes; then echo 1; else echo 0; fi`
26758_ACEOF
26759
d38bc601 26760 # Used for DWARF 2 in PE
b61ff9c8
BS
26761 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
26762echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
d38bc601
BF
26763if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
26764 echo $ECHO_N "(cached) $ECHO_C" >&6
26765else
26766 gcc_cv_as_ix86_pe_secrel32=no
26767 if test $in_tree_gas = yes; then
26768 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
26769 then gcc_cv_as_ix86_pe_secrel32=yes
26770fi
26771 elif test x$gcc_cv_as != x; then
26772 echo '.text
26773foo: nop
26774.data
26775 .secrel32 foo' > conftest.s
26776 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
26777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26778 (eval $ac_try) 2>&5
26779 ac_status=$?
26780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26781 (exit $ac_status); }; }
26782 then
26783 if test x$gcc_cv_ld != x \
26784 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
26785 gcc_cv_as_ix86_pe_secrel32=yes
26786 fi
26787 rm -f conftest
26788 else
26789 echo "configure: failed program was" >&5
26790 cat conftest.s >&5
26791 fi
26792 rm -f conftest.o conftest.s
26793 fi
26794fi
b61ff9c8
BS
26795echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
26796echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
d38bc601
BF
26797if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
26798
26799cat >>confdefs.h <<\_ACEOF
26800#define HAVE_GAS_PE_SECREL32_RELOC 1
26801_ACEOF
26802
26803fi
26804 ;;
26805 esac
26806
b61ff9c8
BS
26807 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
26808echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
a3a5e3d1 26809if test "${gcc_cv_as_ix86_filds+set}" = set; then
ba479fd2 26810 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f 26811else
a3a5e3d1
UB
26812 gcc_cv_as_ix86_filds=no
26813 if test x$gcc_cv_as != x; then
6e3f3080 26814 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
26815 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
26816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26817 (eval $ac_try) 2>&5
26818 ac_status=$?
26819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26820 (exit $ac_status); }; }
8ada417f 26821 then
a3a5e3d1
UB
26822 gcc_cv_as_ix86_filds=yes
26823 else
26824 echo "configure: failed program was" >&5
26825 cat conftest.s >&5
26826 fi
26827 rm -f conftest.o conftest.s
26828 fi
26829fi
26830echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds" >&5
26831echo "${ECHO_T}$gcc_cv_as_ix86_filds" >&6
26832if test $gcc_cv_as_ix86_filds = yes; then
26833
26834cat >>confdefs.h <<\_ACEOF
26835#define HAVE_AS_IX86_FILDS 1
26836_ACEOF
26837
26838fi
26839
26840 echo "$as_me:$LINENO: checking assembler for fildq and fistpq mnemonics" >&5
26841echo $ECHO_N "checking assembler for fildq and fistpq mnemonics... $ECHO_C" >&6
26842if test "${gcc_cv_as_ix86_fildq+set}" = set; then
26843 echo $ECHO_N "(cached) $ECHO_C" >&6
26844else
26845 gcc_cv_as_ix86_fildq=no
26846 if test x$gcc_cv_as != x; then
26847 echo 'fildq mem; fistpq mem' > conftest.s
26848 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
26849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26850 (eval $ac_try) 2>&5
26851 ac_status=$?
26852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26853 (exit $ac_status); }; }
26854 then
26855 gcc_cv_as_ix86_fildq=yes
8ada417f
ZW
26856 else
26857 echo "configure: failed program was" >&5
26858 cat conftest.s >&5
981d4858 26859 fi
8ada417f
ZW
26860 rm -f conftest.o conftest.s
26861 fi
26862fi
a3a5e3d1
UB
26863echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_fildq" >&5
26864echo "${ECHO_T}$gcc_cv_as_ix86_fildq" >&6
26865if test $gcc_cv_as_ix86_fildq = yes; then
ba479fd2
NN
26866
26867cat >>confdefs.h <<\_ACEOF
a3a5e3d1 26868#define HAVE_AS_IX86_FILDQ 1
ba479fd2 26869_ACEOF
ad9c4d9f 26870
f6f5dff2
RO
26871fi
26872
b61ff9c8
BS
26873 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
26874echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
ba479fd2
NN
26875if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
26876 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
26877else
26878 gcc_cv_as_ix86_cmov_sun_syntax=no
26879 if test x$gcc_cv_as != x; then
6e3f3080 26880 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
26881 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
26882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26883 (eval $ac_try) 2>&5
26884 ac_status=$?
26885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26886 (exit $ac_status); }; }
f6f5dff2
RO
26887 then
26888 gcc_cv_as_ix86_cmov_sun_syntax=yes
26889 else
26890 echo "configure: failed program was" >&5
26891 cat conftest.s >&5
26892 fi
26893 rm -f conftest.o conftest.s
26894 fi
26895fi
b61ff9c8
BS
26896echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
26897echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 26898if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
26899
26900cat >>confdefs.h <<\_ACEOF
f6f5dff2 26901#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 26902_ACEOF
f6f5dff2 26903
b6c03bcd
RS
26904fi
26905
b61ff9c8
BS
26906 echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5
26907echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6
b6c03bcd
RS
26908if test "${gcc_cv_as_ix86_ffreep+set}" = set; then
26909 echo $ECHO_N "(cached) $ECHO_C" >&6
26910else
26911 gcc_cv_as_ix86_ffreep=no
26912 if test x$gcc_cv_as != x; then
26913 echo 'ffreep %st(1)' > conftest.s
26914 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
26915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26916 (eval $ac_try) 2>&5
26917 ac_status=$?
26918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26919 (exit $ac_status); }; }
26920 then
26921 gcc_cv_as_ix86_ffreep=yes
26922 else
26923 echo "configure: failed program was" >&5
26924 cat conftest.s >&5
26925 fi
26926 rm -f conftest.o conftest.s
26927 fi
26928fi
b61ff9c8
BS
26929echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5
26930echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6
b6c03bcd
RS
26931if test $gcc_cv_as_ix86_ffreep = yes; then
26932
26933cat >>confdefs.h <<\_ACEOF
26934#define HAVE_AS_IX86_FFREEP 1
26935_ACEOF
26936
38ca3765
UB
26937fi
26938
b61ff9c8
BS
26939 echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5
26940echo $ECHO_N "checking assembler for sahf mnemonic... $ECHO_C" >&6
38ca3765
UB
26941if test "${gcc_cv_as_ix86_sahf+set}" = set; then
26942 echo $ECHO_N "(cached) $ECHO_C" >&6
26943else
26944 gcc_cv_as_ix86_sahf=no
26945 if test x$gcc_cv_as != x; then
26946 echo 'sahf' > conftest.s
26947 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
26948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26949 (eval $ac_try) 2>&5
26950 ac_status=$?
26951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26952 (exit $ac_status); }; }
26953 then
26954 gcc_cv_as_ix86_sahf=yes
26955 else
26956 echo "configure: failed program was" >&5
26957 cat conftest.s >&5
26958 fi
26959 rm -f conftest.o conftest.s
26960 fi
26961fi
b61ff9c8
BS
26962echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_sahf" >&5
26963echo "${ECHO_T}$gcc_cv_as_ix86_sahf" >&6
38ca3765
UB
26964if test $gcc_cv_as_ix86_sahf = yes; then
26965
26966cat >>confdefs.h <<\_ACEOF
26967#define HAVE_AS_IX86_SAHF 1
26968_ACEOF
26969
68b92f78
RS
26970fi
26971
b61ff9c8
BS
26972 echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5
26973echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6
68b92f78
RS
26974if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then
26975 echo $ECHO_N "(cached) $ECHO_C" >&6
26976else
26977 gcc_cv_as_ix86_diff_sect_delta=no
26978 if test x$gcc_cv_as != x; then
26979 echo '.section .rodata
26980.L1:
26981 .long .L2-.L1
26982 .long .L3-.L1
26983 .text
26984.L3: nop
26985.L2: nop' > conftest.s
26986 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
26987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26988 (eval $ac_try) 2>&5
26989 ac_status=$?
26990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26991 (exit $ac_status); }; }
26992 then
26993 gcc_cv_as_ix86_diff_sect_delta=yes
26994 else
26995 echo "configure: failed program was" >&5
26996 cat conftest.s >&5
26997 fi
26998 rm -f conftest.o conftest.s
26999 fi
27000fi
b61ff9c8
BS
27001echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
27002echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6
68b92f78
RS
27003if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
27004
27005cat >>confdefs.h <<\_ACEOF
27006#define HAVE_AS_IX86_DIFF_SECT_DELTA 1
27007_ACEOF
27008
ad9c4d9f
NN
27009fi
27010
6f3ca281
ZW
27011 # This one is used unconditionally by i386.[ch]; it is to be defined
27012 # to 1 if the feature is present, 0 otherwise.
b61ff9c8
BS
27013 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
27014echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
ba479fd2
NN
27015if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
27016 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
27017else
27018 gcc_cv_as_ix86_gotoff_in_data=no
27019 if test $in_tree_gas = yes; then
27020 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
27021 then gcc_cv_as_ix86_gotoff_in_data=yes
27022fi
27023 elif test x$gcc_cv_as != x; then
6e3f3080 27024 echo ' .text
f88c65f7
RH
27025.L0:
27026 nop
27027 .data
8ada417f 27028 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
27029 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
27030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27031 (eval $ac_try) 2>&5
27032 ac_status=$?
27033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27034 (exit $ac_status); }; }
8ada417f
ZW
27035 then
27036 gcc_cv_as_ix86_gotoff_in_data=yes
27037 else
27038 echo "configure: failed program was" >&5
27039 cat conftest.s >&5
f88c65f7 27040 fi
8ada417f
ZW
27041 rm -f conftest.o conftest.s
27042 fi
27043fi
b61ff9c8
BS
27044echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
27045echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 27046
6f3ca281 27047
ba479fd2 27048cat >>confdefs.h <<_ACEOF
6f3ca281 27049#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 27050_ACEOF
f88c65f7 27051
1cb36a98 27052 ;;
ef1ecf87
RH
27053
27054 ia64*-*-*)
b61ff9c8
BS
27055 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
27056echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
ba479fd2
NN
27057if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
27058 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 27059else
8ada417f
ZW
27060 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
27061 if test $in_tree_gas = yes; then
27062 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
27063 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 27064fi
8ada417f 27065 elif test x$gcc_cv_as != x; then
6e3f3080 27066 echo ' .text
ef1ecf87
RH
27067 addl r15 = @ltoffx(x#), gp
27068 ;;
cfa9ee99 27069 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
27070 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
27071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27072 (eval $ac_try) 2>&5
27073 ac_status=$?
27074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27075 (exit $ac_status); }; }
8ada417f 27076 then
cfa9ee99 27077 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
27078 else
27079 echo "configure: failed program was" >&5
27080 cat conftest.s >&5
2c4a9cff 27081 fi
8ada417f
ZW
27082 rm -f conftest.o conftest.s
27083 fi
27084fi
b61ff9c8
BS
27085echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
27086echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 27087if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
27088
27089cat >>confdefs.h <<\_ACEOF
cfa9ee99 27090#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 27091_ACEOF
8ada417f 27092
cfa9ee99 27093fi
8ada417f 27094
2c4a9cff 27095 ;;
8ada417f 27096
2c4a9cff 27097 powerpc*-*-*)
8ada417f 27098 case $target in
432218ba
DE
27099 *-*-aix*) conftest_s=' .machine "pwr5"
27100 .csect .text[PR]
6b37db3c 27101 mfcr 3,128';;
8af4d362 27102 *-*-darwin*)
b61ff9c8
BS
27103 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
27104echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
8af4d362
PB
27105if test "${gcc_cv_as_machine_directive+set}" = set; then
27106 echo $ECHO_N "(cached) $ECHO_C" >&6
27107else
27108 gcc_cv_as_machine_directive=no
27109 if test x$gcc_cv_as != x; then
27110 echo ' .machine ppc7400' > conftest.s
27111 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
27112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27113 (eval $ac_try) 2>&5
27114 ac_status=$?
27115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27116 (exit $ac_status); }; }
27117 then
27118 gcc_cv_as_machine_directive=yes
27119 else
27120 echo "configure: failed program was" >&5
27121 cat conftest.s >&5
27122 fi
27123 rm -f conftest.o conftest.s
27124 fi
27125fi
b61ff9c8
BS
27126echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
27127echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
8af4d362
PB
27128
27129 if test x$gcc_cv_as_machine_directive != xyes; then
27130 echo "*** This target requires an assembler supporting \".machine\"" >&2
27131 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
27132 test x$build = x$target && exit 1
27133 fi
27134 conftest_s=' .text
6b37db3c 27135 mfcr r3,128';;
4c67db14 27136 *) conftest_s=' .machine power4
d2ab3e37 27137 .text
6b37db3c 27138 mfcr 3,128';;
8ada417f 27139 esac
8ada417f 27140
b61ff9c8
BS
27141 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
27142echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
ba479fd2
NN
27143if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
27144 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 27145else
8ada417f
ZW
27146 gcc_cv_as_powerpc_mfcrf=no
27147 if test $in_tree_gas = yes; then
27148 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
27149 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 27150fi
8ada417f 27151 elif test x$gcc_cv_as != x; then
6e3f3080 27152 echo "$conftest_s" > conftest.s
ba479fd2
NN
27153 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
27154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27155 (eval $ac_try) 2>&5
27156 ac_status=$?
27157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27158 (exit $ac_status); }; }
8ada417f
ZW
27159 then
27160 gcc_cv_as_powerpc_mfcrf=yes
27161 else
27162 echo "configure: failed program was" >&5
27163 cat conftest.s >&5
27164 fi
27165 rm -f conftest.o conftest.s
27166 fi
2c4a9cff 27167fi
b61ff9c8
BS
27168echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
27169echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 27170if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
27171
27172cat >>confdefs.h <<\_ACEOF
2c4a9cff 27173#define HAVE_AS_MFCRF 1
ba479fd2 27174_ACEOF
ef1ecf87 27175
8ada417f 27176fi
432218ba
DE
27177
27178 case $target in
27179 *-*-aix*) conftest_s=' .machine "pwr5"
27180 .csect .text[PR]
27181 popcntb 3,3';;
27182 *) conftest_s=' .machine power5
27183 .text
27184 popcntb 3,3';;
27185 esac
27186
b61ff9c8
BS
27187 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
27188echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
432218ba
DE
27189if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
27190 echo $ECHO_N "(cached) $ECHO_C" >&6
27191else
27192 gcc_cv_as_powerpc_popcntb=no
27193 if test $in_tree_gas = yes; then
27194 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
27195 then gcc_cv_as_powerpc_popcntb=yes
27196fi
27197 elif test x$gcc_cv_as != x; then
27198 echo "$conftest_s" > conftest.s
27199 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
27200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27201 (eval $ac_try) 2>&5
27202 ac_status=$?
27203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27204 (exit $ac_status); }; }
27205 then
27206 gcc_cv_as_powerpc_popcntb=yes
27207 else
27208 echo "configure: failed program was" >&5
27209 cat conftest.s >&5
27210 fi
27211 rm -f conftest.o conftest.s
27212 fi
27213fi
b61ff9c8
BS
27214echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
27215echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
432218ba
DE
27216if test $gcc_cv_as_powerpc_popcntb = yes; then
27217
27218cat >>confdefs.h <<\_ACEOF
27219#define HAVE_AS_POPCNTB 1
27220_ACEOF
27221
9719f3b7
DE
27222fi
27223
27224 case $target in
27225 *-*-aix*) conftest_s=' .machine "pwr5x"
27226 .csect .text[PR]
27227 frin 1,1';;
1e04bfdc 27228 *) conftest_s=' .machine power5
9719f3b7
DE
27229 .text
27230 frin 1,1';;
27231 esac
27232
b61ff9c8
BS
27233 echo "$as_me:$LINENO: checking assembler for fp round support" >&5
27234echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
9719f3b7
DE
27235if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
27236 echo $ECHO_N "(cached) $ECHO_C" >&6
27237else
27238 gcc_cv_as_powerpc_fprnd=no
27239 if test $in_tree_gas = yes; then
27240 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
27241 then gcc_cv_as_powerpc_fprnd=yes
27242fi
27243 elif test x$gcc_cv_as != x; then
27244 echo "$conftest_s" > conftest.s
27245 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
27246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27247 (eval $ac_try) 2>&5
27248 ac_status=$?
27249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27250 (exit $ac_status); }; }
27251 then
27252 gcc_cv_as_powerpc_fprnd=yes
27253 else
27254 echo "configure: failed program was" >&5
27255 cat conftest.s >&5
27256 fi
27257 rm -f conftest.o conftest.s
27258 fi
27259fi
b61ff9c8
BS
27260echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
27261echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
9719f3b7
DE
27262if test $gcc_cv_as_powerpc_fprnd = yes; then
27263
27264cat >>confdefs.h <<\_ACEOF
27265#define HAVE_AS_FPRND 1
27266_ACEOF
27267
44cd321e
PS
27268fi
27269
27270 case $target in
27271 *-*-aix*) conftest_s=' .machine "pwr6"
27272 .csect .text[PR]
27273 mffgpr 1,3';;
27274 *) conftest_s=' .machine power6
27275 .text
27276 mffgpr 1,3';;
27277 esac
27278
b61ff9c8
BS
27279 echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5
27280echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6
44cd321e
PS
27281if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then
27282 echo $ECHO_N "(cached) $ECHO_C" >&6
27283else
27284 gcc_cv_as_powerpc_mfpgpr=no
27285 if test $in_tree_gas = yes; then
cacf1ca8 27286 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
44cd321e
PS
27287 then gcc_cv_as_powerpc_mfpgpr=yes
27288fi
27289 elif test x$gcc_cv_as != x; then
27290 echo "$conftest_s" > conftest.s
27291 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
27292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27293 (eval $ac_try) 2>&5
27294 ac_status=$?
27295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27296 (exit $ac_status); }; }
27297 then
27298 gcc_cv_as_powerpc_mfpgpr=yes
27299 else
27300 echo "configure: failed program was" >&5
27301 cat conftest.s >&5
27302 fi
27303 rm -f conftest.o conftest.s
27304 fi
27305fi
b61ff9c8
BS
27306echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5
27307echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6
44cd321e
PS
27308if test $gcc_cv_as_powerpc_mfpgpr = yes; then
27309
27310cat >>confdefs.h <<\_ACEOF
27311#define HAVE_AS_MFPGPR 1
27312_ACEOF
27313
432218ba
DE
27314fi
27315
7f970b70
AM
27316 case $target in
27317 *-*-aix*) conftest_s=' .csect .text[PR]
27318LCF..0:
27319 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
27320 *-*-darwin*)
27321 conftest_s=' .text
27322LCF0:
27323 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
27324 *) conftest_s=' .text
27325.LCF0:
27326 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
27327 esac
27328
b61ff9c8
BS
27329 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
27330echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
695d8830
AS
27331if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
27332 echo $ECHO_N "(cached) $ECHO_C" >&6
27333else
27334 gcc_cv_as_powerpc_rel16=no
27335 if test $in_tree_gas = yes; then
27336 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
27337 then gcc_cv_as_powerpc_rel16=yes
27338fi
27339 elif test x$gcc_cv_as != x; then
27340 echo "$conftest_s" > conftest.s
27341 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
27342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27343 (eval $ac_try) 2>&5
27344 ac_status=$?
27345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27346 (exit $ac_status); }; }
27347 then
27348 gcc_cv_as_powerpc_rel16=yes
27349 else
27350 echo "configure: failed program was" >&5
27351 cat conftest.s >&5
27352 fi
27353 rm -f conftest.o conftest.s
27354 fi
27355fi
b61ff9c8
BS
27356echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
27357echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
695d8830
AS
27358if test $gcc_cv_as_powerpc_rel16 = yes; then
27359
27360cat >>confdefs.h <<\_ACEOF
27361#define HAVE_AS_REL16 1
27362_ACEOF
27363
27364fi
27365
b639c3c2
JJ
27366 case $target in
27367 *-*-aix*) conftest_s=' .machine "pwr6"
27368 .csect .text[PR]
27369 cmpb 3,4,5';;
27370 *) conftest_s=' .machine power6
27371 .text
27372 cmpb 3,4,5';;
27373 esac
27374
b61ff9c8
BS
27375 echo "$as_me:$LINENO: checking assembler for compare bytes support" >&5
27376echo $ECHO_N "checking assembler for compare bytes support... $ECHO_C" >&6
b639c3c2
JJ
27377if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then
27378 echo $ECHO_N "(cached) $ECHO_C" >&6
27379else
27380 gcc_cv_as_powerpc_cmpb=no
27381 if test $in_tree_gas = yes; then
cacf1ca8 27382 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
b639c3c2
JJ
27383 then gcc_cv_as_powerpc_cmpb=yes
27384fi
27385 elif test x$gcc_cv_as != x; then
27386 echo "$conftest_s" > conftest.s
27387 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
27388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27389 (eval $ac_try) 2>&5
27390 ac_status=$?
27391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27392 (exit $ac_status); }; }
27393 then
27394 gcc_cv_as_powerpc_cmpb=yes
27395 else
27396 echo "configure: failed program was" >&5
27397 cat conftest.s >&5
27398 fi
27399 rm -f conftest.o conftest.s
27400 fi
27401fi
b61ff9c8
BS
27402echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_cmpb" >&5
27403echo "${ECHO_T}$gcc_cv_as_powerpc_cmpb" >&6
b639c3c2
JJ
27404if test $gcc_cv_as_powerpc_cmpb = yes; then
27405
27406cat >>confdefs.h <<\_ACEOF
27407#define HAVE_AS_CMPB 1
27408_ACEOF
27409
27410fi
27411
27412 case $target in
27413 *-*-aix*) conftest_s=' .machine "pwr6"
27414 .csect .text[PR]
0d74c0ee 27415 dadd 1,2,3';;
b639c3c2
JJ
27416 *) conftest_s=' .machine power6
27417 .text
0d74c0ee 27418 dadd 1,2,3';;
b639c3c2
JJ
27419 esac
27420
b61ff9c8
BS
27421 echo "$as_me:$LINENO: checking assembler for decimal float support" >&5
27422echo $ECHO_N "checking assembler for decimal float support... $ECHO_C" >&6
b639c3c2
JJ
27423if test "${gcc_cv_as_powerpc_dfp+set}" = set; then
27424 echo $ECHO_N "(cached) $ECHO_C" >&6
27425else
27426 gcc_cv_as_powerpc_dfp=no
27427 if test $in_tree_gas = yes; then
cacf1ca8 27428 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
b639c3c2
JJ
27429 then gcc_cv_as_powerpc_dfp=yes
27430fi
27431 elif test x$gcc_cv_as != x; then
27432 echo "$conftest_s" > conftest.s
27433 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
27434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27435 (eval $ac_try) 2>&5
27436 ac_status=$?
27437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27438 (exit $ac_status); }; }
27439 then
27440 gcc_cv_as_powerpc_dfp=yes
27441 else
27442 echo "configure: failed program was" >&5
27443 cat conftest.s >&5
27444 fi
27445 rm -f conftest.o conftest.s
27446 fi
27447fi
b61ff9c8
BS
27448echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_dfp" >&5
27449echo "${ECHO_T}$gcc_cv_as_powerpc_dfp" >&6
b639c3c2
JJ
27450if test $gcc_cv_as_powerpc_dfp = yes; then
27451
27452cat >>confdefs.h <<\_ACEOF
27453#define HAVE_AS_DFP 1
27454_ACEOF
27455
d40c9e33
PB
27456fi
27457
27458 case $target in
27459 *-*-aix*) conftest_s=' .machine "pwr7"
27460 .csect .text[PR]
27461 lxvd2x 1,2,3';;
27462 *) conftest_s=' .machine power7
27463 .text
27464 lxvd2x 1,2,3';;
27465 esac
27466
27467 echo "$as_me:$LINENO: checking assembler for vector-scalar support" >&5
27468echo $ECHO_N "checking assembler for vector-scalar support... $ECHO_C" >&6
27469if test "${gcc_cv_as_powerpc_vsx+set}" = set; then
27470 echo $ECHO_N "(cached) $ECHO_C" >&6
27471else
27472 gcc_cv_as_powerpc_vsx=no
27473 if test $in_tree_gas = yes; then
cacf1ca8 27474 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
d40c9e33
PB
27475 then gcc_cv_as_powerpc_vsx=yes
27476fi
27477 elif test x$gcc_cv_as != x; then
27478 echo "$conftest_s" > conftest.s
27479 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
27480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27481 (eval $ac_try) 2>&5
27482 ac_status=$?
27483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27484 (exit $ac_status); }; }
27485 then
27486 gcc_cv_as_powerpc_vsx=yes
27487 else
27488 echo "configure: failed program was" >&5
27489 cat conftest.s >&5
27490 fi
27491 rm -f conftest.o conftest.s
27492 fi
27493fi
27494echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_vsx" >&5
27495echo "${ECHO_T}$gcc_cv_as_powerpc_vsx" >&6
27496if test $gcc_cv_as_powerpc_vsx = yes; then
27497
27498cat >>confdefs.h <<\_ACEOF
27499#define HAVE_AS_VSX 1
27500_ACEOF
27501
cacf1ca8
MM
27502fi
27503
27504 case $target in
27505 *-*-aix*) conftest_s=' .machine "pwr7"
27506 .csect .text[PR]
27507 popcntd 3,3';;
27508 *) conftest_s=' .machine power7
27509 .text
27510 popcntd 3,3';;
27511 esac
27512
27513 echo "$as_me:$LINENO: checking assembler for popcntd support" >&5
27514echo $ECHO_N "checking assembler for popcntd support... $ECHO_C" >&6
27515if test "${gcc_cv_as_powerpc_popcntd+set}" = set; then
27516 echo $ECHO_N "(cached) $ECHO_C" >&6
27517else
27518 gcc_cv_as_powerpc_popcntd=no
27519 if test $in_tree_gas = yes; then
27520 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
27521 then gcc_cv_as_powerpc_popcntd=yes
27522fi
27523 elif test x$gcc_cv_as != x; then
27524 echo "$conftest_s" > conftest.s
27525 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
27526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27527 (eval $ac_try) 2>&5
27528 ac_status=$?
27529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27530 (exit $ac_status); }; }
27531 then
27532 gcc_cv_as_powerpc_popcntd=yes
27533 else
27534 echo "configure: failed program was" >&5
27535 cat conftest.s >&5
27536 fi
27537 rm -f conftest.o conftest.s
27538 fi
27539fi
27540echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntd" >&5
27541echo "${ECHO_T}$gcc_cv_as_powerpc_popcntd" >&6
27542if test $gcc_cv_as_powerpc_popcntd = yes; then
27543
27544cat >>confdefs.h <<\_ACEOF
27545#define HAVE_AS_POPCNTD 1
27546_ACEOF
27547
27548fi
27549
27550 case $target in
27551 *-*-aix*) conftest_s=' .csect .text[PR]
27552 lwsync';;
27553 *) conftest_s=' .text
27554 lwsync';;
27555 esac
27556
27557 echo "$as_me:$LINENO: checking assembler for lwsync support" >&5
27558echo $ECHO_N "checking assembler for lwsync support... $ECHO_C" >&6
27559if test "${gcc_cv_as_powerpc_lwsync+set}" = set; then
27560 echo $ECHO_N "(cached) $ECHO_C" >&6
27561else
27562 gcc_cv_as_powerpc_lwsync=no
27563 if test $in_tree_gas = yes; then
27564 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2`
27565 then gcc_cv_as_powerpc_lwsync=yes
27566fi
27567 elif test x$gcc_cv_as != x; then
27568 echo "$conftest_s" > conftest.s
27569 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
27570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27571 (eval $ac_try) 2>&5
27572 ac_status=$?
27573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27574 (exit $ac_status); }; }
27575 then
27576 gcc_cv_as_powerpc_lwsync=yes
27577 else
27578 echo "configure: failed program was" >&5
27579 cat conftest.s >&5
27580 fi
27581 rm -f conftest.o conftest.s
27582 fi
27583fi
27584echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_lwsync" >&5
27585echo "${ECHO_T}$gcc_cv_as_powerpc_lwsync" >&6
27586if test $gcc_cv_as_powerpc_lwsync = yes; then
27587
27588cat >>confdefs.h <<\_ACEOF
27589#define HAVE_AS_LWSYNC 1
27590_ACEOF
27591
e51917ae
JM
27592fi
27593
b61ff9c8
BS
27594 echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
27595echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
e51917ae
JM
27596if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then
27597 echo $ECHO_N "(cached) $ECHO_C" >&6
27598else
27599 gcc_cv_as_powerpc_gnu_attribute=no
27600 if test $in_tree_gas = yes; then
27601 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
27602 then gcc_cv_as_powerpc_gnu_attribute=yes
27603fi
27604 elif test x$gcc_cv_as != x; then
27605 echo '.gnu_attribute 4,1' > conftest.s
27606 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
27607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27608 (eval $ac_try) 2>&5
27609 ac_status=$?
27610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27611 (exit $ac_status); }; }
27612 then
27613 gcc_cv_as_powerpc_gnu_attribute=yes
27614 else
27615 echo "configure: failed program was" >&5
27616 cat conftest.s >&5
27617 fi
27618 rm -f conftest.o conftest.s
27619 fi
27620fi
b61ff9c8
BS
27621echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_gnu_attribute" >&5
27622echo "${ECHO_T}$gcc_cv_as_powerpc_gnu_attribute" >&6
e51917ae
JM
27623if test $gcc_cv_as_powerpc_gnu_attribute = yes; then
27624
27625cat >>confdefs.h <<\_ACEOF
27626#define HAVE_AS_GNU_ATTRIBUTE 1
27627_ACEOF
27628
9752c4ad
AM
27629fi
27630
27631 echo "$as_me:$LINENO: checking assembler for tls marker support" >&5
27632echo $ECHO_N "checking assembler for tls marker support... $ECHO_C" >&6
27633if test "${gcc_cv_as_powerpc_tls_markers+set}" = set; then
27634 echo $ECHO_N "(cached) $ECHO_C" >&6
27635else
27636 gcc_cv_as_powerpc_tls_markers=no
27637 if test $in_tree_gas = yes; then
207bf79d 27638 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 0`
9752c4ad
AM
27639 then gcc_cv_as_powerpc_tls_markers=yes
27640fi
27641 elif test x$gcc_cv_as != x; then
27642 echo ' bl __tls_get_addr(x@tlsgd)' > conftest.s
27643 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
27644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27645 (eval $ac_try) 2>&5
27646 ac_status=$?
27647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27648 (exit $ac_status); }; }
27649 then
27650 gcc_cv_as_powerpc_tls_markers=yes
27651 else
27652 echo "configure: failed program was" >&5
27653 cat conftest.s >&5
27654 fi
27655 rm -f conftest.o conftest.s
27656 fi
27657fi
27658echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_tls_markers" >&5
27659echo "${ECHO_T}$gcc_cv_as_powerpc_tls_markers" >&6
27660if test $gcc_cv_as_powerpc_tls_markers = yes; then
27661
27662cat >>confdefs.h <<\_ACEOF
27663#define HAVE_AS_TLS_MARKERS 1
27664_ACEOF
27665
7f970b70 27666fi
8ada417f
ZW
27667 ;;
27668
27669 mips*-*-*)
b61ff9c8
BS
27670 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
27671echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
27672if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
27673 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
27674else
27675 gcc_cv_as_mips_explicit_relocs=no
27676 if test $in_tree_gas = yes; then
27677 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
27678 then gcc_cv_as_mips_explicit_relocs=yes
27679fi
27680 elif test x$gcc_cv_as != x; then
6e3f3080 27681 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
27682 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
27683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27684 (eval $ac_try) 2>&5
27685 ac_status=$?
27686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27687 (exit $ac_status); }; }
8ada417f
ZW
27688 then
27689 gcc_cv_as_mips_explicit_relocs=yes
27690 else
27691 echo "configure: failed program was" >&5
27692 cat conftest.s >&5
ef1ecf87 27693 fi
8ada417f
ZW
27694 rm -f conftest.o conftest.s
27695 fi
27696fi
b61ff9c8
BS
27697echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
27698echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
27699if test $gcc_cv_as_mips_explicit_relocs = yes; then
27700 if test x$target_cpu_default = x
27701 then target_cpu_default=MASK_EXPLICIT_RELOCS
27702 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
27703 fi
4551169f 27704fi
b61ff9c8
BS
27705 echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5
27706echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6
4551169f
RS
27707if test "${gcc_cv_as_mips_no_shared+set}" = set; then
27708 echo $ECHO_N "(cached) $ECHO_C" >&6
27709else
27710 gcc_cv_as_mips_no_shared=no
27711 if test $in_tree_gas = yes; then
27712 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
27713 then gcc_cv_as_mips_no_shared=yes
27714fi
27715 elif test x$gcc_cv_as != x; then
27716 echo 'nop' > conftest.s
27717 if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5'
27718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27719 (eval $ac_try) 2>&5
27720 ac_status=$?
27721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27722 (exit $ac_status); }; }
27723 then
27724 gcc_cv_as_mips_no_shared=yes
27725 else
27726 echo "configure: failed program was" >&5
27727 cat conftest.s >&5
27728 fi
27729 rm -f conftest.o conftest.s
27730 fi
27731fi
b61ff9c8
BS
27732echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5
27733echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6
4551169f
RS
27734if test $gcc_cv_as_mips_no_shared = yes; then
27735
27736cat >>confdefs.h <<\_ACEOF
27737#define HAVE_AS_NO_SHARED 1
27738_ACEOF
27739
dcb957d9
JM
27740fi
27741
b61ff9c8
BS
27742 echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
27743echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
dcb957d9
JM
27744if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then
27745 echo $ECHO_N "(cached) $ECHO_C" >&6
27746else
27747 gcc_cv_as_mips_gnu_attribute=no
27748 if test $in_tree_gas = yes; then
27749 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
27750 then gcc_cv_as_mips_gnu_attribute=yes
27751fi
27752 elif test x$gcc_cv_as != x; then
27753 echo '.gnu_attribute 4,1' > conftest.s
27754 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
27755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27756 (eval $ac_try) 2>&5
27757 ac_status=$?
27758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27759 (exit $ac_status); }; }
27760 then
27761 gcc_cv_as_mips_gnu_attribute=yes
27762 else
27763 echo "configure: failed program was" >&5
27764 cat conftest.s >&5
27765 fi
27766 rm -f conftest.o conftest.s
27767 fi
27768fi
b61ff9c8
BS
27769echo "$as_me:$LINENO: result: $gcc_cv_as_mips_gnu_attribute" >&5
27770echo "${ECHO_T}$gcc_cv_as_mips_gnu_attribute" >&6
dcb957d9
JM
27771if test $gcc_cv_as_mips_gnu_attribute = yes; then
27772
27773cat >>confdefs.h <<\_ACEOF
27774#define HAVE_AS_GNU_ATTRIBUTE 1
27775_ACEOF
27776
a44380d2
JM
27777fi
27778
b61ff9c8
BS
27779 echo "$as_me:$LINENO: checking assembler for .dtprelword support" >&5
27780echo $ECHO_N "checking assembler for .dtprelword support... $ECHO_C" >&6
a44380d2
JM
27781if test "${gcc_cv_as_mips_dtprelword+set}" = set; then
27782 echo $ECHO_N "(cached) $ECHO_C" >&6
27783else
27784 gcc_cv_as_mips_dtprelword=no
27785 if test $in_tree_gas = yes; then
27786 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
27787 then gcc_cv_as_mips_dtprelword=yes
27788fi
27789 elif test x$gcc_cv_as != x; then
27790 echo '.section .tdata,"awT",@progbits
27791x:
27792 .word 2
27793 .text
27794 .dtprelword x+0x8000' > conftest.s
27795 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
27796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27797 (eval $ac_try) 2>&5
27798 ac_status=$?
27799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27800 (exit $ac_status); }; }
27801 then
27802 gcc_cv_as_mips_dtprelword=yes
27803 else
27804 echo "configure: failed program was" >&5
27805 cat conftest.s >&5
27806 fi
27807 rm -f conftest.o conftest.s
27808 fi
27809fi
b61ff9c8
BS
27810echo "$as_me:$LINENO: result: $gcc_cv_as_mips_dtprelword" >&5
27811echo "${ECHO_T}$gcc_cv_as_mips_dtprelword" >&6
a44380d2
JM
27812if test $gcc_cv_as_mips_dtprelword = yes; then
27813
27814cat >>confdefs.h <<\_ACEOF
27815#define HAVE_AS_DTPRELWORD 1
27816_ACEOF
27817
8ada417f 27818fi
dbad5e72
SE
27819 ;;
27820esac
8ada417f 27821
dbad5e72
SE
27822# Mips and HP-UX need the GNU assembler.
27823# Linux on IA64 might be able to use the Intel assembler.
27824
27825case "$target" in
27826 mips*-*-* | *-*-hpux* )
82563d35
RS
27827 if test x$gas_flag = xyes \
27828 || test x"$host" != x"$build" \
27829 || test ! -x "$gcc_cv_as" \
27830 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
27831 :
27832 else
27833 echo "*** This configuration requires the GNU assembler" >&2
27834 exit 1
27835 fi
ef1ecf87 27836 ;;
1cb36a98 27837esac
dbad5e72 27838
9d147085
RH
27839# ??? Not all targets support dwarf2 debug_line, even within a version
27840# of gas. Moreover, we need to emit a valid instruction to trigger any
27841# info to the output file. So, as supported targets are added to gas 2.11,
27842# add some instruction here to (also) show we expect this might work.
27843# ??? Once 2.11 is released, probably need to add first known working
27844# version to the per-target configury.
27845case "$target" in
80486e06 27846 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
cd985f66 27847 | x86_64*-*-* | hppa*-*-* | arm*-*-* \
ad9646c7 27848 | xstormy16*-*-* | cris-*-* | crisv32-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \
15a43677 27849 | spu-*-* | fido*-*-* | m32c-*-*)
9d147085
RH
27850 insn="nop"
27851 ;;
57116d8d 27852 ia64*-*-* | s390*-*-*)
9d147085
RH
27853 insn="nop 0"
27854 ;;
2853bc5a
HPN
27855 mmix-*-*)
27856 insn="swym 0"
27857 ;;
8ada417f
ZW
27858esac
27859if test x"$insn" != x; then
27860 conftest_s="\
27861 .file 1 \"conftest.s\"
27862 .loc 1 3 0
27863 $insn"
b61ff9c8
BS
27864 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
27865echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
ba479fd2
NN
27866if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
27867 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
27868else
27869 gcc_cv_as_dwarf2_debug_line=no
27870 if test $in_tree_gas = yes; then
27871 if test $in_tree_gas_is_elf = yes \
27872 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
27873 then gcc_cv_as_dwarf2_debug_line=yes
27874fi
27875 elif test x$gcc_cv_as != x; then
6e3f3080 27876 echo "$conftest_s" > conftest.s
ba479fd2
NN
27877 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
27878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27879 (eval $ac_try) 2>&5
27880 ac_status=$?
27881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27882 (exit $ac_status); }; }
8ada417f 27883 then
080a5bb0
EB
27884 if test x$gcc_cv_objdump != x \
27885 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
27886 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
27887 gcc_cv_as_dwarf2_debug_line=yes
27888 fi
27889 else
27890 echo "configure: failed program was" >&5
27891 cat conftest.s >&5
27892 fi
27893 rm -f conftest.o conftest.s
27894 fi
27895fi
b61ff9c8
BS
27896echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
27897echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 27898
ad9c4d9f 27899
8ada417f
ZW
27900# The .debug_line file table must be in the exact order that
27901# we specified the files, since these indices are also used
27902# by DW_AT_decl_file. Approximate this test by testing if
27903# the assembler bitches if the same index is assigned twice.
b61ff9c8
BS
27904 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
27905echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
ba479fd2
NN
27906if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
27907 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
27908else
27909 gcc_cv_as_dwarf2_file_buggy=no
27910 if test x$gcc_cv_as != x; then
6e3f3080 27911 echo ' .file 1 "foo.s"
8ada417f 27912 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
27913 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
27914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27915 (eval $ac_try) 2>&5
27916 ac_status=$?
27917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27918 (exit $ac_status); }; }
8ada417f
ZW
27919 then
27920 gcc_cv_as_dwarf2_file_buggy=yes
27921 else
27922 echo "configure: failed program was" >&5
27923 cat conftest.s >&5
27924 fi
27925 rm -f conftest.o conftest.s
27926 fi
ad9c4d9f 27927fi
b61ff9c8
BS
27928echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
27929echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
27930
27931
27932 if test $gcc_cv_as_dwarf2_debug_line = yes \
27933 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
27934
27935cat >>confdefs.h <<\_ACEOF
9d147085 27936#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 27937_ACEOF
9d147085 27938
8ada417f 27939 fi
ad9c4d9f 27940
b61ff9c8
BS
27941 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
27942echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
ba479fd2
NN
27943if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
27944 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
27945else
27946 gcc_cv_as_gdwarf2_flag=no
27947 if test $in_tree_gas = yes; then
27948 if test $in_tree_gas_is_elf = yes \
27949 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
27950 then gcc_cv_as_gdwarf2_flag=yes
27951fi
27952 elif test x$gcc_cv_as != x; then
6e3f3080 27953 echo "$insn" > conftest.s
ba479fd2
NN
27954 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
27955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27956 (eval $ac_try) 2>&5
27957 ac_status=$?
27958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27959 (exit $ac_status); }; }
8ada417f
ZW
27960 then
27961 gcc_cv_as_gdwarf2_flag=yes
27962 else
27963 echo "configure: failed program was" >&5
27964 cat conftest.s >&5
27965 fi
27966 rm -f conftest.o conftest.s
27967 fi
ad9c4d9f 27968fi
b61ff9c8
BS
27969echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
27970echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 27971if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
27972
27973cat >>confdefs.h <<\_ACEOF
5f0e9ea2 27974#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 27975_ACEOF
5f0e9ea2
GK
27976
27977fi
ad9c4d9f 27978
b61ff9c8
BS
27979 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
27980echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
ba479fd2
NN
27981if test "${gcc_cv_as_gstabs_flag+set}" = set; then
27982 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
27983else
27984 gcc_cv_as_gstabs_flag=no
27985 if test $in_tree_gas = yes; then
27986 if test $in_tree_gas_is_elf = yes \
27987 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
27988 then gcc_cv_as_gstabs_flag=yes
27989fi
27990 elif test x$gcc_cv_as != x; then
6e3f3080 27991 echo "$insn" > conftest.s
ba479fd2
NN
27992 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
27993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27994 (eval $ac_try) 2>&5
27995 ac_status=$?
27996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27997 (exit $ac_status); }; }
8ada417f
ZW
27998 then
27999 # The native Solaris 9/Intel assembler doesn't understand --gstabs
28000 # and warns about it, but still exits successfully. So check for
28001 # this.
ba479fd2
NN
28002 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
28003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28004 (eval $ac_try) 2>&5
28005 ac_status=$?
28006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28007 (exit $ac_status); }; }
8ada417f
ZW
28008 then :
28009 else gcc_cv_as_gstabs_flag=yes
28010 fi
28011 else
28012 echo "configure: failed program was" >&5
28013 cat conftest.s >&5
28014 fi
28015 rm -f conftest.o conftest.s
28016 fi
ad9c4d9f 28017fi
b61ff9c8
BS
28018echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
28019echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 28020if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
28021
28022cat >>confdefs.h <<\_ACEOF
5f0e9ea2 28023#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 28024_ACEOF
5f0e9ea2 28025
c8aea42c
PB
28026fi
28027
b61ff9c8
BS
28028 echo "$as_me:$LINENO: checking assembler for --debug-prefix-map option" >&5
28029echo $ECHO_N "checking assembler for --debug-prefix-map option... $ECHO_C" >&6
c8aea42c
PB
28030if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then
28031 echo $ECHO_N "(cached) $ECHO_C" >&6
28032else
28033 gcc_cv_as_debug_prefix_map_flag=no
28034 if test $in_tree_gas = yes; then
303a4698 28035 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
c8aea42c
PB
28036 then gcc_cv_as_debug_prefix_map_flag=yes
28037fi
28038 elif test x$gcc_cv_as != x; then
28039 echo "$insn" > conftest.s
28040 if { ac_try='$gcc_cv_as --debug-prefix-map /a=/b -o conftest.o conftest.s >&5'
28041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28042 (eval $ac_try) 2>&5
28043 ac_status=$?
28044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28045 (exit $ac_status); }; }
28046 then
28047 gcc_cv_as_debug_prefix_map_flag=yes
28048 else
28049 echo "configure: failed program was" >&5
28050 cat conftest.s >&5
28051 fi
28052 rm -f conftest.o conftest.s
28053 fi
28054fi
b61ff9c8
BS
28055echo "$as_me:$LINENO: result: $gcc_cv_as_debug_prefix_map_flag" >&5
28056echo "${ECHO_T}$gcc_cv_as_debug_prefix_map_flag" >&6
c8aea42c
PB
28057if test $gcc_cv_as_debug_prefix_map_flag = yes; then
28058
28059cat >>confdefs.h <<\_ACEOF
28060#define HAVE_AS_DEBUG_PREFIX_MAP 1
28061_ACEOF
28062
5f0e9ea2 28063fi
8ada417f 28064fi
5f0e9ea2 28065
28e6bb13
NC
28066echo "$as_me:$LINENO: checking assembler for .lcomm with alignment" >&5
28067echo $ECHO_N "checking assembler for .lcomm with alignment... $ECHO_C" >&6
28068if test "${gcc_cv_as_lcomm_with_alignment+set}" = set; then
28069 echo $ECHO_N "(cached) $ECHO_C" >&6
28070else
28071 gcc_cv_as_lcomm_with_alignment=no
28072 if test x$gcc_cv_as != x; then
28073 echo '.lcomm bar,4,16' > conftest.s
28074 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
28075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28076 (eval $ac_try) 2>&5
28077 ac_status=$?
28078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28079 (exit $ac_status); }; }
28080 then
28081 gcc_cv_as_lcomm_with_alignment=yes
28082 else
28083 echo "configure: failed program was" >&5
28084 cat conftest.s >&5
28085 fi
28086 rm -f conftest.o conftest.s
28087 fi
28088fi
28089echo "$as_me:$LINENO: result: $gcc_cv_as_lcomm_with_alignment" >&5
28090echo "${ECHO_T}$gcc_cv_as_lcomm_with_alignment" >&6
28091if test $gcc_cv_as_lcomm_with_alignment = yes; then
28092
28093cat >>confdefs.h <<\_ACEOF
28094#define HAVE_GAS_LCOMM_WITH_ALIGNMENT 1
28095_ACEOF
28096
28097fi
28098
b61ff9c8
BS
28099echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5
28100echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6
03943c05
AO
28101if test "${gcc_cv_as_line_zero+set}" = set; then
28102 echo $ECHO_N "(cached) $ECHO_C" >&6
28103else
28104 gcc_cv_as_line_zero=no
28105 if test $in_tree_gas = yes; then
cf0eb7a1
AO
28106 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
28107 then gcc_cv_as_line_zero=yes
03943c05
AO
28108fi
28109 elif test "x$gcc_cv_as" != x; then
28110 { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
28111 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
28112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28113 (eval $ac_try) 2>&5
28114 ac_status=$?
28115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28116 (exit $ac_status); }; } &&
28117 test "x`cat conftest.out`" = x
28118 then
28119 gcc_cv_as_line_zero=yes
28120 else
28121 echo "configure: failed program was" >&5
28122 cat conftest.s >&5
28123 echo "configure: error output was" >&5
28124 cat conftest.out >&5
28125 fi
28126 rm -f conftest.o conftest.s conftest.out
28127 fi
28128fi
b61ff9c8
BS
28129echo "$as_me:$LINENO: result: $gcc_cv_as_line_zero" >&5
28130echo "${ECHO_T}$gcc_cv_as_line_zero" >&6
03943c05
AO
28131if test "x$gcc_cv_as_line_zero" = xyes; then
28132
28133cat >>confdefs.h <<\_ACEOF
28134#define HAVE_AS_LINE_ZERO 1
28135_ACEOF
28136
28137fi
28138
b61ff9c8
BS
28139echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
28140echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 28141gcc_cv_ld_eh_frame_hdr=no
34a86c2b 28142if test $in_tree_ld = yes ; then
5408ac6c
HPN
28143 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 \
28144 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
28145 gcc_cv_ld_eh_frame_hdr=yes
28146 fi
28147elif test x$gcc_cv_ld != x; then
28148 # Check if linker supports --eh-frame-hdr option
28149 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
28150 gcc_cv_ld_eh_frame_hdr=yes
28151 fi
28152fi
232b67d9 28153
275b60d6 28154if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
28155
28156cat >>confdefs.h <<\_ACEOF
275b60d6 28157#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 28158_ACEOF
275b60d6
JJ
28159
28160fi
b61ff9c8
BS
28161echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
28162echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 28163
b61ff9c8
BS
28164echo "$as_me:$LINENO: checking linker position independent executable support" >&5
28165echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
28166gcc_cv_ld_pie=no
28167if test $in_tree_ld = yes ; then
5408ac6c
HPN
28168 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 \
28169 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
28170 gcc_cv_ld_pie=yes
28171 fi
28172elif test x$gcc_cv_ld != x; then
28173 # Check if linker supports -pie option
28174 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
28175 gcc_cv_ld_pie=yes
28176 fi
28177fi
28178if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
28179
28180cat >>confdefs.h <<\_ACEOF
24a4dd31 28181#define HAVE_LD_PIE 1
ba479fd2 28182_ACEOF
24a4dd31
JJ
28183
28184fi
b61ff9c8
BS
28185echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
28186echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 28187
b61ff9c8
BS
28188echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5
28189echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6
22ba88ef 28190gcc_cv_ld_eh_gc_sections=no
b639c3c2
JJ
28191if test $in_tree_ld = yes ; then
28192 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 \
28193 && test $in_tree_ld_is_elf = yes; then
28194 gcc_cv_ld_eh_gc_sections=yes
28195 fi
28196elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
28197 cat > conftest.s <<EOF
28198 .section .text
28199.globl _start
28200 .type _start, @function
28201_start:
28202 .long foo
28203 .size _start, .-_start
28204 .section .text.foo,"ax",@progbits
28205 .type foo, @function
28206foo:
28207 .long 0
28208 .size foo, .-foo
28209 .section .gcc_except_table.foo,"a",@progbits
28210.L0:
28211 .long 0
28212 .section .eh_frame,"a",@progbits
28213 .long .L0
28214EOF
28215 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
28216 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
28217 | grep "gc-sections option ignored" > /dev/null; then
28218 gcc_cv_ld_eh_gc_sections=no
28219 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
28220 gcc_cv_ld_eh_gc_sections=yes
28221 # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
28222 if test x$gcc_cv_as_comdat_group != xyes; then
28223 gcc_cv_ld_eh_gc_sections=no
28224 cat > conftest.s <<EOF
28225 .section .text
28226.globl _start
28227 .type _start, @function
28228_start:
28229 .long foo
28230 .size _start, .-_start
28231 .section .gnu.linkonce.t.foo,"ax",@progbits
28232 .type foo, @function
28233foo:
28234 .long 0
28235 .size foo, .-foo
28236 .section .gcc_except_table.foo,"a",@progbits
28237.L0:
28238 .long 0
28239 .section .eh_frame,"a",@progbits
28240 .long .L0
28241EOF
28242 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
28243 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
28244 | grep "gc-sections option ignored" > /dev/null; then
28245 gcc_cv_ld_eh_gc_sections=no
28246 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
28247 gcc_cv_ld_eh_gc_sections=yes
28248 fi
28249 fi
28250 fi
28251 fi
28252 fi
28253 rm -f conftest.s conftest.o conftest
28254fi
e9d207d9
EB
28255case "$target" in
28256 hppa*-*-linux*)
28257 # ??? This apparently exposes a binutils bug with PC-relative relocations.
28258 gcc_cv_ld_eh_gc_sections=no
28259 ;;
28260esac
22ba88ef
EB
28261if test x$gcc_cv_ld_eh_gc_sections = xyes; then
28262
28263cat >>confdefs.h <<\_ACEOF
28264#define HAVE_LD_EH_GC_SECTIONS 1
28265_ACEOF
28266
28267fi
b61ff9c8
BS
28268echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5
28269echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6
22ba88ef 28270
8bb915b6
NN
28271# --------
28272# UNSORTED
28273# --------
28274
b61ff9c8
BS
28275echo "$as_me:$LINENO: checking linker --as-needed support" >&5
28276echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
28277if test "${gcc_cv_ld_as_needed+set}" = set; then
28278 echo $ECHO_N "(cached) $ECHO_C" >&6
28279else
28280 gcc_cv_ld_as_needed=no
765f1bf9
AM
28281if test $in_tree_ld = yes ; then
28282 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 \
28283 && test $in_tree_ld_is_elf = yes; then
28284 gcc_cv_ld_as_needed=yes
28285 fi
28286elif test x$gcc_cv_ld != x; then
28287 # Check if linker supports --as-needed and --no-as-needed options
28288 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
28289 gcc_cv_ld_as_needed=yes
28290 fi
28291fi
82e923f6
RS
28292
28293fi
b61ff9c8
BS
28294echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
28295echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
28296if test x"$gcc_cv_ld_as_needed" = xyes; then
28297
28298cat >>confdefs.h <<\_ACEOF
28299#define HAVE_LD_AS_NEEDED 1
28300_ACEOF
28301
28302fi
765f1bf9 28303
d82bf747
AM
28304case "$target:$tm_file" in
28305 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
b61ff9c8
BS
28306 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
28307echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
85b776df
AM
28308if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
28309 echo $ECHO_N "(cached) $ECHO_C" >&6
28310else
28311 gcc_cv_ld_no_dot_syms=no
28312 if test $in_tree_ld = yes ; then
28313 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
28314 gcc_cv_ld_no_dot_syms=yes
28315 fi
28316 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
28317 cat > conftest1.s <<EOF
28318 .text
28319 bl .foo
28320EOF
28321 cat > conftest2.s <<EOF
28322 .section ".opd","aw"
28323 .align 3
28324 .globl foo
28325 .type foo,@function
28326foo:
28327 .quad .LEfoo,.TOC.@tocbase,0
28328 .text
28329.LEfoo:
28330 blr
28331 .size foo,.-.LEfoo
28332EOF
28333 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
28334 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
28335 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
28336 gcc_cv_ld_no_dot_syms=yes
28337 fi
28338 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
28339 fi
28340
28341fi
b61ff9c8
BS
28342echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
28343echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
85b776df
AM
28344 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
28345
28346cat >>confdefs.h <<\_ACEOF
28347#define HAVE_LD_NO_DOT_SYMS 1
28348_ACEOF
28349
28350 fi
28351 ;;
28352esac
28353
cd533689
PP
28354echo "$as_me:$LINENO: checking linker --build-id support" >&5
28355echo $ECHO_N "checking linker --build-id support... $ECHO_C" >&6
28356if test "${gcc_cv_ld_buildid+set}" = set; then
28357 echo $ECHO_N "(cached) $ECHO_C" >&6
28358else
28359 gcc_cv_ld_buildid=no
28360 if test $in_tree_ld = yes ; then
28361 if test "$gcc_cv_gld_major_version" -eq 2 -a \
28362 "$gcc_cv_gld_minor_version" -ge 18 -o \
28363 "$gcc_cv_gld_major_version" -gt 2 \
28364 && test $in_tree_ld_is_elf = yes; then
28365 gcc_cv_ld_buildid=yes
28366 fi
28367 elif test x$gcc_cv_ld != x; then
28368 if $gcc_cv_ld --help 2>/dev/null | grep build-id > /dev/null; then
28369 gcc_cv_ld_buildid=yes
28370 fi
28371 fi
28372fi
28373echo "$as_me:$LINENO: result: $gcc_cv_ld_buildid" >&5
28374echo "${ECHO_T}$gcc_cv_ld_buildid" >&6
28375if test x"$gcc_cv_ld_buildid" = xyes; then
28376
28377cat >>confdefs.h <<\_ACEOF
28378#define HAVE_LD_BUILDID 1
28379_ACEOF
28380
28381fi
28382
28383# Check whether --enable-linker-build-id or --disable-linker-build-id was given.
28384if test "${enable_linker_build_id+set}" = set; then
28385 enableval="$enable_linker_build_id"
28386
28387else
28388 enable_linker_build_id=no
28389fi;
28390
28391if test x"$enable_linker_build_id" = xyes; then
28392 if test x"$gcc_cv_ld_buildid" = xyes; then
28393
28394cat >>confdefs.h <<\_ACEOF
28395#define ENABLE_LD_BUILDID 1
28396_ACEOF
28397
28398 else
28399 { echo "$as_me:$LINENO: WARNING: --build-id is not supported by your linker; --enable-linker-build-id ignored" >&5
28400echo "$as_me: WARNING: --build-id is not supported by your linker; --enable-linker-build-id ignored" >&2;}
28401 fi
28402fi
28403
b61ff9c8
BS
28404echo "$as_me:$LINENO: checking linker --sysroot support" >&5
28405echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
380e5ca4
MM
28406if test "${gcc_cv_ld_sysroot+set}" = set; then
28407 echo $ECHO_N "(cached) $ECHO_C" >&6
28408else
28409 gcc_cv_ld_sysroot=no
28410 if test $in_tree_ld = yes ; then
28411 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 28412 gcc_cv_ld_sysroot=yes
380e5ca4
MM
28413 fi
28414 elif test x$gcc_cv_ld != x; then
28415 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
28416 gcc_cv_ld_sysroot=yes
28417 fi
28418 fi
28419fi
b61ff9c8
BS
28420echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
28421echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
380e5ca4
MM
28422if test x"$gcc_cv_ld_sysroot" = xyes; then
28423
28424cat >>confdefs.h <<\_ACEOF
28425#define HAVE_LD_SYSROOT 1
28426_ACEOF
28427
28428fi
28429
9fb28a67 28430if test x$with_sysroot = x && test x$host = x$target \
c794c06f
CD
28431 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
28432 && test "$prefix" != "NONE"; then
ba479fd2
NN
28433
28434cat >>confdefs.h <<_ACEOF
793e9558 28435#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 28436_ACEOF
793e9558
PB
28437
28438fi
28439
77008252 28440# Test for stack protector support in target C library.
b61ff9c8
BS
28441echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5
28442echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6
77008252
JJ
28443if test "${gcc_cv_libc_provides_ssp+set}" = set; then
28444 echo $ECHO_N "(cached) $ECHO_C" >&6
28445else
28446 gcc_cv_libc_provides_ssp=no
a6ccdbab 28447 case "$target" in
22f96a0f 28448 *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
77008252
JJ
28449 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
28450 if test "x$with_sysroot" = x; then
28451 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
28452 elif test "x$with_build_sysroot" != "x"; then
28453 glibc_header_dir="${with_build_sysroot}/usr/include"
77008252
JJ
28454 elif test "x$with_sysroot" = xyes; then
28455 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
28456 else
28457 glibc_header_dir="${with_sysroot}/usr/include"
28458 fi
28459 else
28460 glibc_header_dir=/usr/include
28461 fi
28462 # glibc 2.4 and later provides __stack_chk_fail and
28463 # either __stack_chk_guard, or TLS access to stack guard canary.
28464 if test -f $glibc_header_dir/features.h \
28465 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
28466 $glibc_header_dir/features.h > /dev/null; then
28467 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
28468 $glibc_header_dir/features.h > /dev/null; then
28469 gcc_cv_libc_provides_ssp=yes
28470 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
28471 $glibc_header_dir/features.h > /dev/null \
28472 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
28473 $glibc_header_dir/features.h > /dev/null; then
28474 gcc_cv_libc_provides_ssp=yes
fed6d628
BF
28475 elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \
28476 $glibc_header_dir/features.h > /dev/null && \
28477 test -f $glibc_header_dir/bits/uClibc_config.h && \
28478 $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \
28479 $glibc_header_dir/bits/uClibc_config.h > /dev/null; then
28480 gcc_cv_libc_provides_ssp=yes
77008252 28481 fi
fed6d628 28482 fi
a6ccdbab 28483 ;;
4cc115a2
TS
28484 *-*-gnu*)
28485 # Avoid complicated tests (see
28486 # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
28487 # simply assert that glibc does provide this, which is true for all
28488 # realistically usable GNU/Hurd configurations.
28489 gcc_cv_libc_provides_ssp=yes;;
a6ccdbab 28490 *-*-darwin*)
b61ff9c8
BS
28491 echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5
28492echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6
a6ccdbab
EC
28493if test "${ac_cv_func___stack_chk_fail+set}" = set; then
28494 echo $ECHO_N "(cached) $ECHO_C" >&6
28495else
28496 cat >conftest.$ac_ext <<_ACEOF
28497/* confdefs.h. */
28498_ACEOF
28499cat confdefs.h >>conftest.$ac_ext
28500cat >>conftest.$ac_ext <<_ACEOF
28501/* end confdefs.h. */
28502/* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail.
28503 For example, HP-UX 11i <limits.h> declares gettimeofday. */
28504#define __stack_chk_fail innocuous___stack_chk_fail
28505
28506/* System header to define __stub macros and hopefully few prototypes,
28507 which can conflict with char __stack_chk_fail (); below.
28508 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
28509 <limits.h> exists even on freestanding compilers. */
28510
28511#ifdef __STDC__
28512# include <limits.h>
28513#else
28514# include <assert.h>
28515#endif
28516
28517#undef __stack_chk_fail
28518
b61ff9c8 28519/* Override any gcc2 internal prototype to avoid an error. */
a6ccdbab
EC
28520#ifdef __cplusplus
28521extern "C"
b61ff9c8 28522{
a6ccdbab 28523#endif
b61ff9c8
BS
28524/* We use char because int might match the return type of a gcc2
28525 builtin and then its argument prototype would still apply. */
a6ccdbab
EC
28526char __stack_chk_fail ();
28527/* The GNU C library defines this for functions which it implements
28528 to always fail with ENOSYS. Some functions are actually named
28529 something starting with __ and the normal name is an alias. */
b61ff9c8 28530#if defined (__stub___stack_chk_fail) || defined (__stub_____stack_chk_fail)
a6ccdbab 28531choke me
b61ff9c8
BS
28532#else
28533char (*f) () = __stack_chk_fail;
28534#endif
28535#ifdef __cplusplus
28536}
a6ccdbab
EC
28537#endif
28538
28539int
28540main ()
28541{
b61ff9c8 28542return f != __stack_chk_fail;
a6ccdbab
EC
28543 ;
28544 return 0;
28545}
28546_ACEOF
28547rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
28548if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28549 (eval $ac_link) 2>conftest.er1
a6ccdbab
EC
28550 ac_status=$?
28551 grep -v '^ *+' conftest.er1 >conftest.err
28552 rm -f conftest.er1
28553 cat conftest.err >&5
28554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
28555 (exit $ac_status); } &&
28556 { ac_try='test -z "$ac_c_werror_flag"
28557 || test ! -s conftest.err'
28558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28559 (eval $ac_try) 2>&5
28560 ac_status=$?
28561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28562 (exit $ac_status); }; } &&
28563 { ac_try='test -s conftest$ac_exeext'
28564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28565 (eval $ac_try) 2>&5
28566 ac_status=$?
28567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28568 (exit $ac_status); }; }; then
8b1f719a
PB
28569 ac_cv_func___stack_chk_fail=yes
28570else
a6ccdbab
EC
28571 echo "$as_me: failed program was:" >&5
28572sed 's/^/| /' conftest.$ac_ext >&5
28573
b61ff9c8 28574ac_cv_func___stack_chk_fail=no
a6ccdbab 28575fi
b61ff9c8 28576rm -f conftest.err conftest.$ac_objext \
a6ccdbab
EC
28577 conftest$ac_exeext conftest.$ac_ext
28578fi
b61ff9c8
BS
28579echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5
28580echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6
a6ccdbab
EC
28581if test $ac_cv_func___stack_chk_fail = yes; then
28582 gcc_cv_libc_provides_ssp=yes
28583else
28584 echo "no __stack_chk_fail on this target"
77008252 28585fi
a6ccdbab
EC
28586
28587 ;;
77008252 28588 *) gcc_cv_libc_provides_ssp=no ;;
a6ccdbab
EC
28589 esac
28590fi
b61ff9c8
BS
28591echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
28592echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6
a6ccdbab 28593
77008252
JJ
28594if test x$gcc_cv_libc_provides_ssp = xyes; then
28595
28596cat >>confdefs.h <<\_ACEOF
28597#define TARGET_LIBC_PROVIDES_SSP 1
28598_ACEOF
28599
28600fi
28601
ed965309
JJ
28602# Check if TFmode long double should be used by default or not.
28603# Some glibc targets used DFmode long double, but with glibc 2.4
28604# and later they can use TFmode.
28605case "$target" in
f7cc5390
JM
28606 powerpc*-*-linux* | \
28607 powerpc*-*-gnu* | \
ed965309
JJ
28608 sparc*-*-linux* | \
28609 s390*-*-linux* | \
28610 alpha*-*-linux*)
28611
b61ff9c8 28612# Check whether --with-long-double-128 or --without-long-double-128 was given.
ed965309 28613if test "${with_long_double_128+set}" = set; then
b61ff9c8
BS
28614 withval="$with_long_double_128"
28615 gcc_cv_target_ldbl128="$with_long_double_128"
ed965309
JJ
28616else
28617 gcc_cv_target_ldbl128=no
28618 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
28619 if test "x$with_sysroot" = x; then
28620 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
28621 elif test "x$with_build_sysroot" != "x"; then
28622 glibc_header_dir="${with_build_sysroot}/usr/include"
ed965309
JJ
28623 elif test "x$with_sysroot" = xyes; then
28624 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
28625 else
28626 glibc_header_dir="${with_sysroot}/usr/include"
28627 fi
28628 else
28629 glibc_header_dir=/usr/include
28630 fi
65280f6c 28631 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
ed965309
JJ
28632 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
28633 && gcc_cv_target_ldbl128=yes
65280f6c 28634
b61ff9c8 28635fi;
ed965309
JJ
28636 ;;
28637esac
28638if test x$gcc_cv_target_ldbl128 = xyes; then
28639
28640cat >>confdefs.h <<\_ACEOF
28641#define TARGET_DEFAULT_LONG_DOUBLE_128 1
28642_ACEOF
28643
28644fi
28645
81bf3d9e 28646# Find out what GC implementation we want, or may, use.
ba479fd2 28647
b61ff9c8 28648# Check whether --with-gc or --without-gc was given.
81bf3d9e 28649if test "${with_gc+set}" = set; then
b61ff9c8
BS
28650 withval="$with_gc"
28651 case "$withval" in
08cee789 28652 page)
81bf3d9e 28653 GGC=ggc-$withval
08cee789
DJ
28654 ;;
28655 zone)
28656 GGC=ggc-$withval
28657
28658cat >>confdefs.h <<\_ACEOF
28659#define GGC_ZONE 1
28660_ACEOF
28661
81bf3d9e
RH
28662 ;;
28663 *)
ba479fd2
NN
28664 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
28665echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
28666 { (exit 1); exit 1; }; }
81bf3d9e
RH
28667 ;;
28668esac
28669else
005537df 28670 GGC=ggc-page
b61ff9c8 28671fi;
81bf3d9e
RH
28672
28673echo "Using $GGC for garbage collection."
28674
00020c16
ILT
28675# Libraries to use on the host. This will normally be set by the top
28676# level Makefile. Here we simply capture the value for our Makefile.
28677if test -z "${HOST_LIBS+set}"; then
28678 HOST_LIBS=
28679fi
28680
28681
3c809ba4 28682# Use the system's zlib library.
b8dad04b
ZW
28683zlibdir=-L../zlib
28684zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 28685
b61ff9c8 28686# Check whether --with-system-zlib or --without-system-zlib was given.
3c809ba4 28687if test "${with_system_zlib+set}" = set; then
b61ff9c8
BS
28688 withval="$with_system_zlib"
28689 zlibdir=
3c809ba4
AG
28690zlibinc=
28691
b61ff9c8 28692fi;
b8ec3cc8 28693
703d89ab 28694
ab22c1fa 28695
1a4b763e 28696
b61ff9c8
BS
28697echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
28698echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
28699 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
dc6746e7 28700if test "${enable_maintainer_mode+set}" = set; then
b61ff9c8
BS
28701 enableval="$enable_maintainer_mode"
28702 maintainer_mode=$enableval
dc6746e7
PT
28703else
28704 maintainer_mode=no
b61ff9c8 28705fi;
a6ccdbab 28706
b61ff9c8
BS
28707echo "$as_me:$LINENO: result: $maintainer_mode" >&5
28708echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
28709
28710if test "$maintainer_mode" = "yes"; then
28711 MAINT=''
28712else
28713 MAINT='#'
28714fi
28715
8bb915b6
NN
28716# --------------
28717# Language hooks
28718# --------------
28719
861bb6c1
JL
28720# Make empty files to contain the specs and options for each language.
28721# Then add #include lines to for a compiler that has specs and/or options.
28722
cc11cc9b 28723subdirs=
d7b42618 28724lang_opt_files=
861bb6c1 28725lang_specs_files=
3103b7db 28726lang_tree_files=
861bb6c1
JL
28727# These (without "all_") are set in each config-lang.in.
28728# `language' must be a single word so is spelled singularly.
28729all_languages=
861bb6c1 28730all_compilers=
47ad7893 28731all_outputs='Makefile gccbug'
861bb6c1 28732# List of language makefile fragments.
2ed26f6b
ZW
28733all_lang_makefrags=
28734# List of language subdirectory makefiles. Deprecated.
861bb6c1 28735all_lang_makefiles=
703d89ab 28736# Additional files for gengtype
ef69da62 28737all_gtfiles="$target_gtfiles"
861bb6c1 28738
cc11cc9b
PB
28739# These are the languages that are set in --enable-languages,
28740# and are available in the GCC tree.
28741all_selected_languages=
28742
861bb6c1
JL
28743# Add the language fragments.
28744# Languages are added via two mechanisms. Some information must be
28745# recorded in makefile variables, these are defined in config-lang.in.
28746# We accumulate them and plug them into the main Makefile.
28747# The other mechanism is a set of hooks for each of the main targets
28748# like `clean', `install', etc.
28749
861bb6c1 28750language_hooks="Make-hooks"
861bb6c1 28751
cc11cc9b 28752for lang in ${srcdir}/*/config-lang.in
861bb6c1 28753do
1546bb64
PB
28754 test "$lang" = "${srcdir}/*/config-lang.in" && continue
28755
cc11cc9b
PB
28756 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
28757 if test "x$lang_alias" = x
28758 then
28759 echo "$lang doesn't set \$language." 1>&2
28760 exit 1
28761 fi
28762 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
28763 subdirs="$subdirs $subdir"
349c3166
OH
28764
28765 # $gcc_subdir is where the gcc integration files are to be found
28766 # for a language, both for internal compiler purposes (compiler
28767 # sources implementing front-end to GCC tree converters), and for
28768 # build infrastructure purposes (Make-lang.in, etc.)
28769 #
28770 # This will be <subdir> (relative to $srcdir) if a line like
28771 # gcc_subdir="<subdir>" or gcc_subdir=<subdir>
28772 # is found in <langdir>/config-lang.in, and will remain <langdir>
28773 # otherwise.
28774 #
28775 # Except for the language alias (fetched above), the regular
28776 # "config-lang.in" contents are always retrieved from $gcc_subdir,
28777 # so a <langdir>/config-lang.in setting gcc_subdir typically sets
28778 # only this and the language alias.
28779
28780 gcc_subdir=`sed -n -e 's,^gcc_subdir=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^gcc_subdir=\([^ ]*\).*$,\1,p' $lang`
28781 if [ "$gcc_subdir" = "" ]; then
28782 gcc_subdir="$subdir"
28783 fi
28784
cc11cc9b
PB
28785 case ",$enable_languages," in
28786 *,$lang_alias,*)
28787 all_selected_languages="$all_selected_languages $lang_alias"
349c3166
OH
28788 if test -f $srcdir/$gcc_subdir/lang-specs.h; then
28789 lang_specs_files="$lang_specs_files $srcdir/$gcc_subdir/lang-specs.h"
cc11cc9b
PB
28790 fi
28791 ;;
28792 esac
28793
cc11cc9b
PB
28794 language=
28795 boot_language=
28796 compilers=
cc11cc9b
PB
28797 outputs=
28798 gtfiles=
1546bb64 28799 subdir_requires=
349c3166 28800 . ${srcdir}/$gcc_subdir/config-lang.in
cc11cc9b
PB
28801 if test "x$language" = x
28802 then
349c3166 28803 echo "${srcdir}/$gcc_subdir/config-lang.in doesn't set \$language." 1>&2
cc11cc9b
PB
28804 exit 1
28805 fi
1546bb64
PB
28806
28807 ok=:
28808 case ",$enable_languages," in
28809 *,$lang_alias,*) ;;
28810 *)
28811 for i in $subdir_requires; do
b6348cb3 28812 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
28813 ok=false
28814 break
28815 done
28816 ;;
28817 esac
28818 $ok || continue
28819
349c3166
OH
28820 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in"
28821 if test -f $srcdir/$gcc_subdir/lang.opt; then
28822 lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt"
1546bb64 28823 fi
349c3166
OH
28824 if test -f $srcdir/$gcc_subdir/$subdir-tree.def; then
28825 lang_tree_files="$lang_tree_files $srcdir/$gcc_subdir/$subdir-tree.def"
1546bb64 28826 fi
349c3166
OH
28827 if test -f ${srcdir}/$gcc_subdir/Makefile.in
28828 then all_lang_makefiles="$gcc_subdir/Makefile"
cc11cc9b
PB
28829 fi
28830 all_languages="$all_languages $language"
cc11cc9b 28831 all_compilers="$all_compilers $compilers"
cc11cc9b 28832 all_outputs="$all_outputs $outputs"
703d89ab 28833 all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
861bb6c1
JL
28834done
28835
8ac9d31f
TJ
28836# Pick up gtfiles for c
28837gtfiles=
8ac9d31f 28838. ${srcdir}/c-config-lang.in
703d89ab 28839all_gtfiles="$all_gtfiles [c] $gtfiles"
8ac9d31f 28840
cbc59f01 28841check_languages=
cc11cc9b 28842for language in $all_selected_languages
cbc59f01 28843do
cc11cc9b 28844 check_languages="$check_languages check-$language"
cbc59f01
DD
28845done
28846
62b81e45 28847# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 28848# lang.${target}. Only do so for selected languages.
861bb6c1
JL
28849
28850rm -f Make-hooks
28851touch Make-hooks
bd97af06 28852target_list="all.cross start.encap rest.encap tags \
bcc3d150
BM
28853 install-common install-man install-info install-pdf dvi pdf \
28854 html uninstall info man srcextra srcman srcinfo \
2a4c0366 28855 mostlyclean clean distclean maintainer-clean install-plugin"
cc11cc9b 28856
861bb6c1
JL
28857for t in $target_list
28858do
28859 x=
cc11cc9b 28860 for lang in $all_selected_languages
861bb6c1 28861 do
cc11cc9b 28862 x="$x $lang.$t"
861bb6c1
JL
28863 done
28864 echo "lang.$t: $x" >> Make-hooks
28865done
28866
8bb915b6
NN
28867# --------
28868# UNSORTED
28869# --------
28870
cc06d68c 28871# Create .gdbinit.
861bb6c1 28872
cc06d68c
GP
28873echo "dir ." > .gdbinit
28874echo "dir ${srcdir}" >> .gdbinit
28875if test x$gdb_needs_out_file_path = xyes
28876then
28877 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
28878fi
28879if test "x$subdirs" != x; then
28880 for s in $subdirs
28881 do
28882 echo "dir ${srcdir}/$s" >> .gdbinit
28883 done
861bb6c1 28884fi
cc06d68c 28885echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 28886
15c723f3 28887gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)'
d062c304
JL
28888
28889
2ce3c6c6 28890
2bbea3a6
RH
28891# Find a directory in which to install a shared libgcc.
28892
b61ff9c8 28893# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
2bbea3a6 28894if test "${enable_version_specific_runtime_libs+set}" = set; then
b61ff9c8 28895 enableval="$enable_version_specific_runtime_libs"
ba479fd2 28896
b61ff9c8 28897fi;
2bbea3a6
RH
28898
28899
b61ff9c8 28900# Check whether --with-slibdir or --without-slibdir was given.
5b15f277 28901if test "${with_slibdir+set}" = set; then
b61ff9c8
BS
28902 withval="$with_slibdir"
28903 slibdir="$with_slibdir"
5b15f277
RH
28904else
28905 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 28906 slibdir='$(libsubdir)'
5b15f277 28907elif test "$host" != "$target"; then
2bbea3a6
RH
28908 slibdir='$(build_tooldir)/lib'
28909else
5b15f277 28910 slibdir='$(libdir)'
2bbea3a6 28911fi
b61ff9c8 28912fi;
2bbea3a6
RH
28913
28914
22482f74 28915
b61ff9c8 28916# Check whether --with-datarootdir or --without-datarootdir was given.
22482f74 28917if test "${with_datarootdir+set}" = set; then
b61ff9c8
BS
28918 withval="$with_datarootdir"
28919 datarootdir="\${prefix}/$with_datarootdir"
22482f74
MS
28920else
28921 datarootdir='$(prefix)/share'
b61ff9c8 28922fi;
22482f74
MS
28923
28924
a6ccdbab 28925
b61ff9c8 28926# Check whether --with-docdir or --without-docdir was given.
22482f74 28927if test "${with_docdir+set}" = set; then
b61ff9c8
BS
28928 withval="$with_docdir"
28929 docdir="\${prefix}/$with_docdir"
22482f74
MS
28930else
28931 docdir='$(datarootdir)'
b61ff9c8 28932fi;
703d89ab 28933
ab22c1fa 28934
1a4b763e 28935
b61ff9c8 28936# Check whether --with-htmldir or --without-htmldir was given.
22482f74 28937if test "${with_htmldir+set}" = set; then
b61ff9c8
BS
28938 withval="$with_htmldir"
28939 htmldir="\${prefix}/$with_htmldir"
22482f74
MS
28940else
28941 htmldir='$(docdir)'
b61ff9c8 28942fi;
861bb6c1
JL
28943
28944
703d89ab 28945# Substitute configuration variables
861bb6c1
JL
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
9b16d2c4 28990
e9a25f70 28991
6e26218f 28992
c8724862 28993
11642c3a
ZW
28994
28995
28996
3d9d2476 28997
e2500fed 28998
a0e527e3 28999
aca600aa
AS
29000
29001
29002
c776a6d0 29003
207bf79d 29004
51b9ff45 29005
861bb6c1 29006
6e3f3080
NN
29007# Echo link setup.
29008if test x${build} = x${host} ; then
29009 if test x${host} = x${target} ; then
29010 echo "Links are now set up to build a native compiler for ${target}." 1>&2
29011 else
29012 echo "Links are now set up to build a cross-compiler" 1>&2
29013 echo " from ${host} to ${target}." 1>&2
29014 fi
29015else
29016 if test x${host} = x${target} ; then
29017 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
29018 echo " for ${target}." 1>&2
29019 else
29020 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
29021 echo " from ${host} to ${target}." 1>&2
29022 fi
29023fi
29024
6de9cd9a
DN
29025
29026
29027
acd26225
KG
29028case "${GMPLIBS}" in
29029 *-lmpc*)
29030cat >>confdefs.h <<\_ACEOF
29031#define HAVE_mpc 1
29032_ACEOF
29033 ;;
29034esac
29035
f8bf9252
SP
29036
29037
29038
29039
29040
29041if test "x${CLOOGLIBS}" != "x" ; then
29042
29043cat >>confdefs.h <<\_ACEOF
29044#define HAVE_cloog 1
29045_ACEOF
29046
f8bf9252
SP
29047fi
29048
68a607d8
DN
29049# Check for plugin support
29050# Check whether --enable-plugin or --disable-plugin was given.
29051if test "${enable_plugin+set}" = set; then
29052 enableval="$enable_plugin"
29053 enable_plugin=$enableval
29054else
29055 enable_plugin=yes; default_plugin=yes
29056fi;
29057
29058pluginlibs=
29059if test x"$enable_plugin" = x"yes"; then
29060 # Check that the host supports -rdynamic and -ldl
29061 have_rdynamic=no
29062 have_dl=no
29063 saved_LDFLAGS="$LDFLAGS"
29064 saved_LIBS="$LIBS"
29065 LIBS=
29066
29067 # Check -rdynamic
29068 LDFLAGS="$LDFLAGS -rdynamic"
29069 echo "$as_me:$LINENO: checking for -rdynamic" >&5
29070echo $ECHO_N "checking for -rdynamic... $ECHO_C" >&6
29071 cat >conftest.$ac_ext <<_ACEOF
29072/* confdefs.h. */
29073_ACEOF
29074cat confdefs.h >>conftest.$ac_ext
29075cat >>conftest.$ac_ext <<_ACEOF
29076/* end confdefs.h. */
29077
29078int
29079main ()
29080{
29081return 0;
29082 ;
29083 return 0;
29084}
29085_ACEOF
29086rm -f conftest.$ac_objext conftest$ac_exeext
29087if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29088 (eval $ac_link) 2>conftest.er1
29089 ac_status=$?
29090 grep -v '^ *+' conftest.er1 >conftest.err
29091 rm -f conftest.er1
29092 cat conftest.err >&5
29093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29094 (exit $ac_status); } &&
29095 { ac_try='test -z "$ac_c_werror_flag"
29096 || test ! -s conftest.err'
29097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29098 (eval $ac_try) 2>&5
29099 ac_status=$?
29100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29101 (exit $ac_status); }; } &&
29102 { ac_try='test -s conftest$ac_exeext'
29103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29104 (eval $ac_try) 2>&5
29105 ac_status=$?
29106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29107 (exit $ac_status); }; }; then
29108 echo "$as_me:$LINENO: result: yes" >&5
29109echo "${ECHO_T}yes" >&6; have_rdynamic=yes
29110else
29111 echo "$as_me: failed program was:" >&5
29112sed 's/^/| /' conftest.$ac_ext >&5
29113
29114echo "$as_me:$LINENO: result: no" >&5
29115echo "${ECHO_T}no" >&6
29116fi
29117rm -f conftest.err conftest.$ac_objext \
29118 conftest$ac_exeext conftest.$ac_ext
29119 if test x"$have_rdynamic" = x"yes" ; then
29120 pluginlibs="-rdynamic"
29121 fi
29122
29123 # Check -ldl
29124 LDFLAGS="$LDFLAGS -ldl"
29125 echo "$as_me:$LINENO: checking for -ldl" >&5
29126echo $ECHO_N "checking for -ldl... $ECHO_C" >&6
29127 cat >conftest.$ac_ext <<_ACEOF
29128/* confdefs.h. */
29129_ACEOF
29130cat confdefs.h >>conftest.$ac_ext
29131cat >>conftest.$ac_ext <<_ACEOF
29132/* end confdefs.h. */
29133#include <dlfcn.h>
29134int
29135main ()
29136{
29137volatile int f = 0; if (f) dlopen ("dummy", 0);
29138 ;
29139 return 0;
29140}
29141_ACEOF
29142rm -f conftest.$ac_objext conftest$ac_exeext
29143if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29144 (eval $ac_link) 2>conftest.er1
29145 ac_status=$?
29146 grep -v '^ *+' conftest.er1 >conftest.err
29147 rm -f conftest.er1
29148 cat conftest.err >&5
29149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29150 (exit $ac_status); } &&
29151 { ac_try='test -z "$ac_c_werror_flag"
29152 || test ! -s conftest.err'
29153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29154 (eval $ac_try) 2>&5
29155 ac_status=$?
29156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29157 (exit $ac_status); }; } &&
29158 { ac_try='test -s conftest$ac_exeext'
29159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29160 (eval $ac_try) 2>&5
29161 ac_status=$?
29162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29163 (exit $ac_status); }; }; then
29164 echo "$as_me:$LINENO: result: yes" >&5
29165echo "${ECHO_T}yes" >&6; have_dl=yes
29166else
29167 echo "$as_me: failed program was:" >&5
29168sed 's/^/| /' conftest.$ac_ext >&5
29169
29170echo "$as_me:$LINENO: result: no" >&5
29171echo "${ECHO_T}no" >&6
29172fi
29173rm -f conftest.err conftest.$ac_objext \
29174 conftest$ac_exeext conftest.$ac_ext
29175 if test x"$have_dl" = x"yes"; then
29176 pluginlibs="$pluginlibs -ldl"
29177 fi
29178
29179 # Check that we can build shared objects with -fPIC -shared
29180 LDFLAGS="$LDFLAGS -fPIC -shared"
29181 echo "$as_me:$LINENO: checking for -fPIC -shared" >&5
29182echo $ECHO_N "checking for -fPIC -shared... $ECHO_C" >&6
29183 cat >conftest.$ac_ext <<_ACEOF
29184/* confdefs.h. */
29185_ACEOF
29186cat confdefs.h >>conftest.$ac_ext
29187cat >>conftest.$ac_ext <<_ACEOF
29188/* end confdefs.h. */
29189extern int X;
29190int
29191main ()
29192{
29193return X == 0;
29194 ;
29195 return 0;
29196}
29197_ACEOF
29198rm -f conftest.$ac_objext conftest$ac_exeext
29199if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29200 (eval $ac_link) 2>conftest.er1
29201 ac_status=$?
29202 grep -v '^ *+' conftest.er1 >conftest.err
29203 rm -f conftest.er1
29204 cat conftest.err >&5
29205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29206 (exit $ac_status); } &&
29207 { ac_try='test -z "$ac_c_werror_flag"
29208 || test ! -s conftest.err'
29209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29210 (eval $ac_try) 2>&5
29211 ac_status=$?
29212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29213 (exit $ac_status); }; } &&
29214 { ac_try='test -s conftest$ac_exeext'
29215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29216 (eval $ac_try) 2>&5
29217 ac_status=$?
29218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29219 (exit $ac_status); }; }; then
29220 echo "$as_me:$LINENO: result: yes" >&5
29221echo "${ECHO_T}yes" >&6; have_pic_shared=yes
29222else
29223 echo "$as_me: failed program was:" >&5
29224sed 's/^/| /' conftest.$ac_ext >&5
29225
29226echo "$as_me:$LINENO: result: no" >&5
29227echo "${ECHO_T}no" >&6; have_pic_shared=no
29228fi
29229rm -f conftest.err conftest.$ac_objext \
29230 conftest$ac_exeext conftest.$ac_ext
29231 if test x"$have_pic_shared" != x"yes"; then
29232 pluginlibs=
29233 enable_plugin=no
29234 fi
29235
29236 # If plugin support had been requested but not available, fail.
29237 if test x"$enable_plugin" = x"no" ; then
29238 if test x"$default_plugin" != x"yes"; then
29239 { { echo "$as_me:$LINENO: error:
29240Building GCC with plugin support requires a host that supports
29241-fPIC, -shared, -ldl and -rdynamic." >&5
29242echo "$as_me: error:
29243Building GCC with plugin support requires a host that supports
29244-fPIC, -shared, -ldl and -rdynamic." >&2;}
29245 { (exit 1); exit 1; }; }
29246 fi
29247 fi
29248
29249 LDFLAGS="$saved_LDFLAGS"
29250 LIBS="$saved_LIBS"
29251fi
29252
29253
29254
29255if test x"$enable_plugin" = x"yes"; then
29256
29257cat >>confdefs.h <<\_ACEOF
29258#define ENABLE_PLUGIN 1
29259_ACEOF
29260
29261fi
29262
6e3f3080
NN
29263# Configure the subdirectories
29264# AC_CONFIG_SUBDIRS($subdirs)
29265
29266# Create the Makefile
29267# and configure language subdirectories
b61ff9c8 29268 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
29269
29270
b61ff9c8 29271 ac_config_commands="$ac_config_commands default"
914c5af7 29272
ba479fd2 29273cat >confcache <<\_ACEOF
6e3f3080
NN
29274# This file is a shell script that caches the results of configure
29275# tests run on this system so they can be shared between configure
ba479fd2
NN
29276# scripts and configure runs, see configure's option --config-cache.
29277# It is not useful on other systems. If it contains results you don't
29278# want to keep, you may remove or edit it.
6e3f3080 29279#
ba479fd2
NN
29280# config.status only pays attention to the cache file if you give it
29281# the --recheck option to rerun configure.
6e3f3080 29282#
ba479fd2
NN
29283# `ac_cv_env_foo' variables (set or unset) will be overridden when
29284# loading this file, other *unset* `ac_cv_foo' will be assigned the
29285# following values.
29286
29287_ACEOF
29288
6e3f3080
NN
29289# The following way of writing the cache mishandles newlines in values,
29290# but we know of no workaround that is simple, portable, and efficient.
b61ff9c8 29291# So, don't put newlines in cache variables' values.
6e3f3080
NN
29292# Ultrix sh set writes to stderr and can't be redirected directly,
29293# and sets the high bit in the cache file unless we assign to the vars.
b61ff9c8 29294{
ba479fd2 29295 (set) 2>&1 |
b61ff9c8
BS
29296 case `(ac_space=' '; set | grep ac_space) 2>&1` in
29297 *ac_space=\ *)
ba479fd2
NN
29298 # `set' does not quote correctly, so add quotes (double-quote
29299 # substitution turns \\\\ into \\, and sed turns \\ into \).
29300 sed -n \
86da66b5
HPN
29301 "s/'/'\\\\''/g;
29302 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
b61ff9c8 29303 ;;
ba479fd2
NN
29304 *)
29305 # `set' quotes correctly as required by POSIX, so do not add quotes.
b61ff9c8
BS
29306 sed -n \
29307 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 29308 ;;
b61ff9c8
BS
29309 esac;
29310} |
ba479fd2
NN
29311 sed '
29312 t clear
b61ff9c8 29313 : clear
ba479fd2
NN
29314 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29315 t end
b61ff9c8
BS
29316 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29317 : end' >>confcache
29318if diff $cache_file confcache >/dev/null 2>&1; then :; else
29319 if test -w $cache_file; then
29320 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
ba479fd2 29321 cat confcache >$cache_file
6e3f3080 29322 else
b61ff9c8 29323 echo "not updating unwritable cache $cache_file"
6e3f3080
NN
29324 fi
29325fi
29326rm -f confcache
29327
29328test "x$prefix" = xNONE && prefix=$ac_default_prefix
29329# Let make expand exec_prefix.
29330test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29331
b61ff9c8
BS
29332# VPATH may cause trouble with some makes, so we remove $(srcdir),
29333# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29334# trailing colons and then remove the whole line if VPATH becomes empty
29335# (actually we leave an empty line to preserve line numbers).
29336if test "x$srcdir" = x.; then
29337 ac_vpsub='/^[ ]*VPATH[ ]*=/{
29338s/:*\$(srcdir):*/:/;
29339s/:*\${srcdir}:*/:/;
29340s/:*@srcdir@:*/:/;
29341s/^\([^=]*=[ ]*\):*/\1/;
29342s/:*$//;
29343s/^[^=]*=[ ]*$//;
29344}'
29345fi
29346
63cf211a 29347DEFS=-DHAVE_CONFIG_H
6e3f3080 29348
ba479fd2
NN
29349ac_libobjs=
29350ac_ltlibobjs=
29351for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
29352 # 1. Remove the extension, and $U if already installed.
b61ff9c8
BS
29353 ac_i=`echo "$ac_i" |
29354 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
29355 # 2. Add them.
29356 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
29357 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
ba479fd2
NN
29358done
29359LIBOBJS=$ac_libobjs
63cf211a 29360
ba479fd2
NN
29361LTLIBOBJS=$ac_ltlibobjs
29362
29363
29364
29365: ${CONFIG_STATUS=./config.status}
29366ac_clean_files_save=$ac_clean_files
29367ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29368{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
29369echo "$as_me: creating $CONFIG_STATUS" >&6;}
29370cat >$CONFIG_STATUS <<_ACEOF
29371#! $SHELL
29372# Generated by $as_me.
6e3f3080
NN
29373# Run this file to recreate the current configuration.
29374# Compiler output produced by configure, useful for debugging
ba479fd2 29375# configure, is in config.log if it exists.
6e3f3080 29376
ba479fd2
NN
29377debug=false
29378ac_cs_recheck=false
29379ac_cs_silent=false
29380SHELL=\${CONFIG_SHELL-$SHELL}
29381_ACEOF
29382
29383cat >>$CONFIG_STATUS <<\_ACEOF
29384## --------------------- ##
29385## M4sh Initialization. ##
29386## --------------------- ##
29387
b61ff9c8 29388# Be Bourne compatible
ba479fd2
NN
29389if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29390 emulate sh
29391 NULLCMD=:
29392 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
29393 # is contrary to our usage. Disable this feature.
29394 alias -g '${1+"$@"}'='"$@"'
b61ff9c8
BS
29395elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29396 set -o posix
2f41c1d6 29397fi
b61ff9c8 29398DUALCASE=1; export DUALCASE # for MKS sh
ab22c1fa 29399
1a4b763e
BS
29400# Support unset when possible.
29401if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
29402 as_unset=unset
29403else
29404 as_unset=false
29405fi
29406
ab22c1fa 29407
1a4b763e 29408# Work around bugs in pre-3.0 UWIN ksh.
b61ff9c8 29409$as_unset ENV MAIL MAILPATH
1a4b763e
BS
29410PS1='$ '
29411PS2='> '
29412PS4='+ '
29413
29414# NLS nuisances.
29415for as_var in \
29416 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
29417 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
29418 LC_TELEPHONE LC_TIME
2f41c1d6 29419do
1a4b763e
BS
29420 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
29421 eval $as_var=C; export $as_var
29422 else
b61ff9c8 29423 $as_unset $as_var
1a4b763e
BS
29424 fi
29425done
29426
29427# Required to use basename.
b61ff9c8 29428if expr a : '\(a\)' >/dev/null 2>&1; then
1a4b763e
BS
29429 as_expr=expr
29430else
29431 as_expr=false
29432fi
29433
b61ff9c8 29434if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
1a4b763e
BS
29435 as_basename=basename
29436else
29437 as_basename=false
29438fi
29439
29440
29441# Name of the executable.
b61ff9c8 29442as_me=`$as_basename "$0" ||
1a4b763e
BS
29443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29444 X"$0" : 'X\(//\)$' \| \
b61ff9c8
BS
29445 X"$0" : 'X\(/\)$' \| \
29446 . : '\(.\)' 2>/dev/null ||
1a4b763e 29447echo X/"$0" |
b61ff9c8
BS
29448 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
29449 /^X\/\(\/\/\)$/{ s//\1/; q; }
29450 /^X\/\(\/\).*/{ s//\1/; q; }
29451 s/.*/./; q'`
1a4b763e 29452
b61ff9c8
BS
29453
29454# PATH needs CR, and LINENO needs CR and PATH.
29455# Avoid depending upon Character Ranges.
29456as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29457as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29458as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29459as_cr_digits='0123456789'
29460as_cr_alnum=$as_cr_Letters$as_cr_digits
29461
29462# The user is always right.
29463if test "${PATH_SEPARATOR+set}" != set; then
29464 echo "#! /bin/sh" >conf$$.sh
29465 echo "exit 0" >>conf$$.sh
29466 chmod +x conf$$.sh
29467 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
29468 PATH_SEPARATOR=';'
29469 else
29470 PATH_SEPARATOR=:
29471 fi
29472 rm -f conf$$.sh
29473fi
1a4b763e
BS
29474
29475
b61ff9c8
BS
29476 as_lineno_1=$LINENO
29477 as_lineno_2=$LINENO
29478 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
29479 test "x$as_lineno_1" != "x$as_lineno_2" &&
29480 test "x$as_lineno_3" = "x$as_lineno_2" || {
29481 # Find who we are. Look in the path if we contain no path at all
29482 # relative or not.
29483 case $0 in
29484 *[\\/]* ) as_myself=$0 ;;
29485 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29486for as_dir in $PATH
29487do
29488 IFS=$as_save_IFS
29489 test -z "$as_dir" && as_dir=.
29490 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29491done
1a4b763e 29492
b61ff9c8
BS
29493 ;;
29494 esac
29495 # We did not find ourselves, most probably we were run as `sh COMMAND'
29496 # in which case we are not to be found in the path.
29497 if test "x$as_myself" = x; then
29498 as_myself=$0
29499 fi
29500 if test ! -f "$as_myself"; then
29501 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
29502echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
29503 { (exit 1); exit 1; }; }
29504 fi
29505 case $CONFIG_SHELL in
29506 '')
29507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29508for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
29509do
29510 IFS=$as_save_IFS
29511 test -z "$as_dir" && as_dir=.
29512 for as_base in sh bash ksh sh5; do
29513 case $as_dir in
29514 /*)
29515 if ("$as_dir/$as_base" -c '
8b1f719a
PB
29516 as_lineno_1=$LINENO
29517 as_lineno_2=$LINENO
b61ff9c8 29518 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
8b1f719a 29519 test "x$as_lineno_1" != "x$as_lineno_2" &&
b61ff9c8
BS
29520 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
29521 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
29522 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
29523 CONFIG_SHELL=$as_dir/$as_base
29524 export CONFIG_SHELL
29525 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
29526 fi;;
29527 esac
29528 done
29529done
29530;;
29531 esac
ba479fd2
NN
29532
29533 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
29534 # uniformly replaced by the line number. The first 'sed' inserts a
b61ff9c8
BS
29535 # line-number line before each line; the second 'sed' does the real
29536 # work. The second script uses 'N' to pair each line-number line
29537 # with the numbered line, and appends trailing '-' during
29538 # substitution so that $LINENO is not a special case at line end.
ba479fd2 29539 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b61ff9c8
BS
29540 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
29541 sed '=' <$as_myself |
ba479fd2
NN
29542 sed '
29543 N
b61ff9c8
BS
29544 s,$,-,
29545 : loop
29546 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
ba479fd2 29547 t loop
b61ff9c8
BS
29548 s,-$,,
29549 s,^['$as_cr_digits']*\n,,
ba479fd2 29550 ' >$as_me.lineno &&
b61ff9c8
BS
29551 chmod +x $as_me.lineno ||
29552 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
29553echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
ba479fd2
NN
29554 { (exit 1); exit 1; }; }
29555
29556 # Don't try to exec as it changes $[0], causing all sort of problems
29557 # (the dirname of $[0] is not the place where we might find the
b61ff9c8
BS
29558 # original and so on. Autoconf is especially sensible to this).
29559 . ./$as_me.lineno
ba479fd2
NN
29560 # Exit status is that of the last command.
29561 exit
29562}
29563
29564
b61ff9c8
BS
29565case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
29566 *c*,-n*) ECHO_N= ECHO_C='
29567' ECHO_T=' ' ;;
29568 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
29569 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
ba479fd2
NN
29570esac
29571
b61ff9c8 29572if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
29573 as_expr=expr
29574else
29575 as_expr=false
29576fi
29577
29578rm -f conf$$ conf$$.exe conf$$.file
29579echo >conf$$.file
29580if ln -s conf$$.file conf$$ 2>/dev/null; then
b61ff9c8
BS
29581 # We could just check for DJGPP; but this test a) works b) is more generic
29582 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29583 if test -f conf$$.exe; then
29584 # Don't use ln at all; we don't have any links
ba479fd2 29585 as_ln_s='cp -p'
b61ff9c8
BS
29586 else
29587 as_ln_s='ln -s'
29588 fi
ba479fd2
NN
29589elif ln conf$$.file conf$$ 2>/dev/null; then
29590 as_ln_s=ln
29591else
29592 as_ln_s='cp -p'
29593fi
b61ff9c8 29594rm -f conf$$ conf$$.exe conf$$.file
ba479fd2
NN
29595
29596if mkdir -p . 2>/dev/null; then
29597 as_mkdir_p=:
29598else
86da66b5 29599 test -d ./-p && rmdir ./-p
ba479fd2
NN
29600 as_mkdir_p=false
29601fi
29602
b61ff9c8 29603as_executable_p="test -f"
ba479fd2
NN
29604
29605# Sed expression to map a string onto a valid CPP name.
86da66b5 29606as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
29607
29608# Sed expression to map a string onto a valid variable name.
86da66b5 29609as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
29610
29611
b61ff9c8
BS
29612# IFS
29613# We need space, tab and new line, in precisely that order.
29614as_nl='
29615'
29616IFS=" $as_nl"
29617
29618# CDPATH.
29619$as_unset CDPATH
29620
ba479fd2
NN
29621exec 6>&1
29622
b61ff9c8 29623# Open the log real soon, to keep \$[0] and so on meaningful, and to
ba479fd2 29624# report actual input values of CONFIG_FILES etc. instead of their
b61ff9c8
BS
29625# values after options handling. Logging --version etc. is OK.
29626exec 5>>config.log
29627{
29628 echo
29629 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29630## Running $as_me. ##
29631_ASBOX
29632} >&5
29633cat >&5 <<_CSEOF
29634
ba479fd2 29635This file was extended by $as_me, which was
b61ff9c8 29636generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
29637
29638 CONFIG_FILES = $CONFIG_FILES
29639 CONFIG_HEADERS = $CONFIG_HEADERS
29640 CONFIG_LINKS = $CONFIG_LINKS
29641 CONFIG_COMMANDS = $CONFIG_COMMANDS
29642 $ $0 $@
29643
b61ff9c8
BS
29644_CSEOF
29645echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
29646echo >&5
ba479fd2
NN
29647_ACEOF
29648
29649# Files that config.status was made for.
b61ff9c8
BS
29650if test -n "$ac_config_files"; then
29651 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
29652fi
2f41c1d6 29653
b61ff9c8
BS
29654if test -n "$ac_config_headers"; then
29655 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
29656fi
29657
29658if test -n "$ac_config_links"; then
29659 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
29660fi
29661
29662if test -n "$ac_config_commands"; then
29663 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
29664fi
ba479fd2
NN
29665
29666cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8 29667
ba479fd2
NN
29668ac_cs_usage="\
29669\`$as_me' instantiates files from templates according to the
29670current configuration.
29671
29672Usage: $0 [OPTIONS] [FILE]...
29673
29674 -h, --help print this help, then exit
b61ff9c8 29675 -V, --version print version number, then exit
ba479fd2
NN
29676 -q, --quiet do not print progress messages
29677 -d, --debug don't remove temporary files
29678 --recheck update $as_me by reconfiguring in the same conditions
29679 --file=FILE[:TEMPLATE]
86da66b5 29680 instantiate the configuration file FILE
ba479fd2 29681 --header=FILE[:TEMPLATE]
86da66b5 29682 instantiate the configuration header FILE
ba479fd2
NN
29683
29684Configuration files:
29685$config_files
29686
29687Configuration headers:
29688$config_headers
29689
29690Configuration commands:
29691$config_commands
29692
29693Report bugs to <bug-autoconf@gnu.org>."
1a4b763e 29694_ACEOF
b61ff9c8 29695
ba479fd2
NN
29696cat >>$CONFIG_STATUS <<_ACEOF
29697ac_cs_version="\\
29698config.status
b61ff9c8
BS
29699configured by $0, generated by GNU Autoconf 2.59,
29700 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
ba479fd2 29701
b61ff9c8 29702Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
29703This config.status script is free software; the Free Software Foundation
29704gives unlimited permission to copy, distribute and modify it."
b61ff9c8 29705srcdir=$srcdir
ba479fd2
NN
29706_ACEOF
29707
29708cat >>$CONFIG_STATUS <<\_ACEOF
29709# If no file are specified by the user, then we need to provide default
29710# value. By we need to know if files were specified by the user.
29711ac_need_defaults=:
29712while test $# != 0
29713do
29714 case $1 in
29715 --*=*)
b61ff9c8
BS
29716 ac_option=`expr "x$1" : 'x\([^=]*\)='`
29717 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
ba479fd2
NN
29718 ac_shift=:
29719 ;;
b61ff9c8 29720 -*)
ba479fd2
NN
29721 ac_option=$1
29722 ac_optarg=$2
29723 ac_shift=shift
29724 ;;
b61ff9c8
BS
29725 *) # This is not an option, so the user has probably given explicit
29726 # arguments.
29727 ac_option=$1
29728 ac_need_defaults=false;;
ba479fd2
NN
29729 esac
29730
29731 case $ac_option in
29732 # Handling of the options.
b61ff9c8
BS
29733_ACEOF
29734cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
29735 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29736 ac_cs_recheck=: ;;
b61ff9c8
BS
29737 --version | --vers* | -V )
29738 echo "$ac_cs_version"; exit 0 ;;
29739 --he | --h)
29740 # Conflict between --help and --header
29741 { { echo "$as_me:$LINENO: error: ambiguous option: $1
29742Try \`$0 --help' for more information." >&5
29743echo "$as_me: error: ambiguous option: $1
29744Try \`$0 --help' for more information." >&2;}
29745 { (exit 1); exit 1; }; };;
29746 --help | --hel | -h )
29747 echo "$ac_cs_usage"; exit 0 ;;
29748 --debug | --d* | -d )
ba479fd2
NN
29749 debug=: ;;
29750 --file | --fil | --fi | --f )
29751 $ac_shift
29752 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
29753 ac_need_defaults=false;;
29754 --header | --heade | --head | --hea )
29755 $ac_shift
29756 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
29757 ac_need_defaults=false;;
29758 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29759 | -silent | --silent | --silen | --sile | --sil | --si | --s)
29760 ac_cs_silent=: ;;
29761
29762 # This is an error.
b61ff9c8
BS
29763 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
29764Try \`$0 --help' for more information." >&5
29765echo "$as_me: error: unrecognized option: $1
29766Try \`$0 --help' for more information." >&2;}
ba479fd2
NN
29767 { (exit 1); exit 1; }; } ;;
29768
b61ff9c8 29769 *) ac_config_targets="$ac_config_targets $1" ;;
ba479fd2
NN
29770
29771 esac
29772 shift
6e3f3080 29773done
ba479fd2
NN
29774
29775ac_configure_extra_args=
29776
29777if $ac_cs_silent; then
29778 exec 6>/dev/null
29779 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
29780fi
29781
ba479fd2
NN
29782_ACEOF
29783cat >>$CONFIG_STATUS <<_ACEOF
29784if \$ac_cs_recheck; then
b61ff9c8
BS
29785 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
29786 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
ba479fd2 29787fi
861bb6c1 29788
ba479fd2
NN
29789_ACEOF
29790
29791cat >>$CONFIG_STATUS <<_ACEOF
29792#
b61ff9c8 29793# INIT-COMMANDS section.
ba479fd2 29794#
b61ff9c8 29795
ba479fd2 29796subdirs='$subdirs'
ba479fd2
NN
29797
29798_ACEOF
29799
1a4b763e 29800
b61ff9c8
BS
29801
29802cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
29803for ac_config_target in $ac_config_targets
29804do
b61ff9c8
BS
29805 case "$ac_config_target" in
29806 # Handling of arguments.
29807 "as" ) CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
29808 "collect-ld" ) CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
29809 "nm" ) CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
29810 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
29811 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29812 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
ba479fd2
NN
29813 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
29814echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29815 { (exit 1); exit 1; }; };;
861bb6c1 29816 esac
ba479fd2
NN
29817done
29818
29819# If the user did not use the arguments to specify the items to instantiate,
29820# then the envvar interface is used. Set only those that are not.
29821# We use the long form for the default assignment because of an extremely
29822# bizarre bug on SunOS 4.1.3.
29823if $ac_need_defaults; then
29824 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29825 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29826 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29827fi
29828
29829# Have a temporary directory for convenience. Make it in the build tree
b61ff9c8 29830# simply because there is no reason to put it here, and in addition,
ba479fd2 29831# creating and moving files from /tmp can sometimes cause problems.
b61ff9c8 29832# Create a temporary directory, and hook for its removal unless debugging.
ba479fd2
NN
29833$debug ||
29834{
b61ff9c8 29835 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
ba479fd2
NN
29836 trap '{ (exit 1); exit 1; }' 1 2 13 15
29837}
b61ff9c8 29838
ba479fd2 29839# Create a (secure) tmp directory for tmp files.
6e3f3080 29840
ba479fd2 29841{
b61ff9c8 29842 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
ba479fd2
NN
29843 test -n "$tmp" && test -d "$tmp"
29844} ||
29845{
b61ff9c8
BS
29846 tmp=./confstat$$-$RANDOM
29847 (umask 077 && mkdir $tmp)
ba479fd2
NN
29848} ||
29849{
29850 echo "$me: cannot create a temporary directory in ." >&2
29851 { (exit 1); exit 1; }
29852}
29853
b61ff9c8
BS
29854_ACEOF
29855
29856cat >>$CONFIG_STATUS <<_ACEOF
29857
ba479fd2 29858#
b61ff9c8 29859# CONFIG_FILES section.
ba479fd2
NN
29860#
29861
29862# No need to generate the scripts if there are no CONFIG_FILES.
29863# This happens for instance when ./config.status config.h
b61ff9c8
BS
29864if test -n "\$CONFIG_FILES"; then
29865 # Protect against being on the right side of a sed subst in config.status.
29866 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29867 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29868s,@SHELL@,$SHELL,;t t
29869s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29870s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29871s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29872s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29873s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29874s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29875s,@exec_prefix@,$exec_prefix,;t t
29876s,@prefix@,$prefix,;t t
29877s,@program_transform_name@,$program_transform_name,;t t
29878s,@bindir@,$bindir,;t t
29879s,@sbindir@,$sbindir,;t t
29880s,@libexecdir@,$libexecdir,;t t
29881s,@datadir@,$datadir,;t t
29882s,@sysconfdir@,$sysconfdir,;t t
29883s,@sharedstatedir@,$sharedstatedir,;t t
29884s,@localstatedir@,$localstatedir,;t t
29885s,@libdir@,$libdir,;t t
29886s,@includedir@,$includedir,;t t
29887s,@oldincludedir@,$oldincludedir,;t t
29888s,@infodir@,$infodir,;t t
29889s,@mandir@,$mandir,;t t
29890s,@build_alias@,$build_alias,;t t
29891s,@host_alias@,$host_alias,;t t
29892s,@target_alias@,$target_alias,;t t
29893s,@DEFS@,$DEFS,;t t
29894s,@ECHO_C@,$ECHO_C,;t t
29895s,@ECHO_N@,$ECHO_N,;t t
29896s,@ECHO_T@,$ECHO_T,;t t
29897s,@LIBS@,$LIBS,;t t
29898s,@build@,$build,;t t
29899s,@build_cpu@,$build_cpu,;t t
29900s,@build_vendor@,$build_vendor,;t t
29901s,@build_os@,$build_os,;t t
29902s,@host@,$host,;t t
29903s,@host_cpu@,$host_cpu,;t t
29904s,@host_vendor@,$host_vendor,;t t
29905s,@host_os@,$host_os,;t t
29906s,@target@,$target,;t t
29907s,@target_cpu@,$target_cpu,;t t
29908s,@target_vendor@,$target_vendor,;t t
29909s,@target_os@,$target_os,;t t
29910s,@target_noncanonical@,$target_noncanonical,;t t
29911s,@build_libsubdir@,$build_libsubdir,;t t
29912s,@build_subdir@,$build_subdir,;t t
29913s,@host_subdir@,$host_subdir,;t t
29914s,@target_subdir@,$target_subdir,;t t
29915s,@GENINSRC@,$GENINSRC,;t t
29916s,@CC@,$CC,;t t
29917s,@CFLAGS@,$CFLAGS,;t t
29918s,@LDFLAGS@,$LDFLAGS,;t t
29919s,@CPPFLAGS@,$CPPFLAGS,;t t
29920s,@ac_ct_CC@,$ac_ct_CC,;t t
29921s,@EXEEXT@,$EXEEXT,;t t
29922s,@OBJEXT@,$OBJEXT,;t t
00020c16
ILT
29923s,@CXX@,$CXX,;t t
29924s,@CXXFLAGS@,$CXXFLAGS,;t t
29925s,@ac_ct_CXX@,$ac_ct_CXX,;t t
3d4e720a
ST
29926s,@GNATBIND@,$GNATBIND,;t t
29927s,@ac_ct_GNATBIND@,$ac_ct_GNATBIND,;t t
29928s,@GNATMAKE@,$GNATMAKE,;t t
29929s,@ac_ct_GNATMAKE@,$ac_ct_GNATMAKE,;t t
b61ff9c8
BS
29930s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
29931s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
29932s,@CPP@,$CPP,;t t
29933s,@EGREP@,$EGREP,;t t
29934s,@loose_warn@,$loose_warn,;t t
00020c16 29935s,@c_loose_warn@,$c_loose_warn,;t t
b61ff9c8 29936s,@strict_warn@,$strict_warn,;t t
00020c16 29937s,@c_strict_warn@,$c_strict_warn,;t t
b61ff9c8 29938s,@warn_cflags@,$warn_cflags,;t t
00020c16 29939s,@warn_cxxflags@,$warn_cxxflags,;t t
b61ff9c8
BS
29940s,@nocommon_flag@,$nocommon_flag,;t t
29941s,@TREEBROWSER@,$TREEBROWSER,;t t
29942s,@valgrind_path@,$valgrind_path,;t t
29943s,@valgrind_path_defines@,$valgrind_path_defines,;t t
29944s,@valgrind_command@,$valgrind_command,;t t
29945s,@coverage_flags@,$coverage_flags,;t t
00020c16 29946s,@ENABLE_BUILD_WITH_CXX@,$ENABLE_BUILD_WITH_CXX,;t t
b61ff9c8
BS
29947s,@enable_multilib@,$enable_multilib,;t t
29948s,@enable_decimal_float@,$enable_decimal_float,;t t
29949s,@enable_fixed_point@,$enable_fixed_point,;t t
29950s,@enable_shared@,$enable_shared,;t t
29951s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
29952s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
29953s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
29954s,@onestep@,$onestep,;t t
29955s,@PKGVERSION@,$PKGVERSION,;t t
29956s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
29957s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
29958s,@datarootdir@,$datarootdir,;t t
29959s,@docdir@,$docdir,;t t
29960s,@htmldir@,$htmldir,;t t
29961s,@SET_MAKE@,$SET_MAKE,;t t
29962s,@AWK@,$AWK,;t t
29963s,@LN_S@,$LN_S,;t t
29964s,@LN@,$LN,;t t
29965s,@RANLIB@,$RANLIB,;t t
29966s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29967s,@ranlib_flags@,$ranlib_flags,;t t
29968s,@INSTALL@,$INSTALL,;t t
29969s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29970s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29971s,@make_compare_target@,$make_compare_target,;t t
29972s,@have_mktemp_command@,$have_mktemp_command,;t t
29973s,@MAKEINFO@,$MAKEINFO,;t t
29974s,@BUILD_INFO@,$BUILD_INFO,;t t
29975s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
29976s,@FLEX@,$FLEX,;t t
29977s,@BISON@,$BISON,;t t
29978s,@NM@,$NM,;t t
29979s,@AR@,$AR,;t t
29980s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
29981s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
29982s,@LDEXP_LIB@,$LDEXP_LIB,;t t
b61ff9c8
BS
29983s,@LIBICONV@,$LIBICONV,;t t
29984s,@LTLIBICONV@,$LTLIBICONV,;t t
29985s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
29986s,@manext@,$manext,;t t
29987s,@objext@,$objext,;t t
29988s,@gthread_flags@,$gthread_flags,;t t
29989s,@extra_modes_file@,$extra_modes_file,;t t
29990s,@extra_opt_files@,$extra_opt_files,;t t
29991s,@USE_NLS@,$USE_NLS,;t t
29992s,@LIBINTL@,$LIBINTL,;t t
29993s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
29994s,@INCINTL@,$INCINTL,;t t
29995s,@XGETTEXT@,$XGETTEXT,;t t
29996s,@GMSGFMT@,$GMSGFMT,;t t
29997s,@POSUB@,$POSUB,;t t
29998s,@CATALOGS@,$CATALOGS,;t t
29999s,@DATADIRNAME@,$DATADIRNAME,;t t
30000s,@INSTOBJEXT@,$INSTOBJEXT,;t t
30001s,@GENCAT@,$GENCAT,;t t
30002s,@CATOBJEXT@,$CATOBJEXT,;t t
b61ff9c8
BS
30003s,@CROSS@,$CROSS,;t t
30004s,@ALL@,$ALL,;t t
30005s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
30006s,@inhibit_libc@,$inhibit_libc,;t t
30007s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
30008s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
f8c33439 30009s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
b61ff9c8 30010s,@STMP_FIXINC@,$STMP_FIXINC,;t t
b61ff9c8 30011s,@collect2@,$collect2,;t t
da0f6381
PB
30012s,@LIBTOOL@,$LIBTOOL,;t t
30013s,@SED@,$SED,;t t
30014s,@FGREP@,$FGREP,;t t
30015s,@GREP@,$GREP,;t t
30016s,@LD@,$LD,;t t
30017s,@DUMPBIN@,$DUMPBIN,;t t
30018s,@ac_ct_DUMPBIN@,$ac_ct_DUMPBIN,;t t
5d47bb02
PG
30019s,@OBJDUMP@,$OBJDUMP,;t t
30020s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t
da0f6381
PB
30021s,@ac_ct_AR@,$ac_ct_AR,;t t
30022s,@STRIP@,$STRIP,;t t
30023s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
30024s,@lt_ECHO@,$lt_ECHO,;t t
5d47bb02
PG
30025s,@DSYMUTIL@,$DSYMUTIL,;t t
30026s,@ac_ct_DSYMUTIL@,$ac_ct_DSYMUTIL,;t t
30027s,@NMEDIT@,$NMEDIT,;t t
30028s,@ac_ct_NMEDIT@,$ac_ct_NMEDIT,;t t
30029s,@LIPO@,$LIPO,;t t
30030s,@ac_ct_LIPO@,$ac_ct_LIPO,;t t
30031s,@OTOOL@,$OTOOL,;t t
30032s,@ac_ct_OTOOL@,$ac_ct_OTOOL,;t t
30033s,@OTOOL64@,$OTOOL64,;t t
30034s,@ac_ct_OTOOL64@,$ac_ct_OTOOL64,;t t
00020c16 30035s,@CXXCPP@,$CXXCPP,;t t
da0f6381
PB
30036s,@objdir@,$objdir,;t t
30037s,@enable_fast_install@,$enable_fast_install,;t t
b61ff9c8
BS
30038s,@gcc_cv_as@,$gcc_cv_as,;t t
30039s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
30040s,@gcc_cv_ld@,$gcc_cv_ld,;t t
30041s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
30042s,@gcc_cv_nm@,$gcc_cv_nm,;t t
30043s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
30044s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
6e97481b 30045s,@gcc_cv_readelf@,$gcc_cv_readelf,;t t
b61ff9c8
BS
30046s,@libgcc_visibility@,$libgcc_visibility,;t t
30047s,@GGC@,$GGC,;t t
00020c16 30048s,@HOST_LIBS@,$HOST_LIBS,;t t
b61ff9c8
BS
30049s,@zlibdir@,$zlibdir,;t t
30050s,@zlibinc@,$zlibinc,;t t
30051s,@MAINT@,$MAINT,;t t
30052s,@gcc_tooldir@,$gcc_tooldir,;t t
30053s,@dollar@,$dollar,;t t
30054s,@slibdir@,$slibdir,;t t
b61ff9c8
BS
30055s,@subdirs@,$subdirs,;t t
30056s,@srcdir@,$srcdir,;t t
30057s,@all_compilers@,$all_compilers,;t t
30058s,@all_gtfiles@,$all_gtfiles,;t t
30059s,@all_lang_makefrags@,$all_lang_makefrags,;t t
30060s,@all_lang_makefiles@,$all_lang_makefiles,;t t
30061s,@all_languages@,$all_languages,;t t
30062s,@all_selected_languages@,$all_selected_languages,;t t
30063s,@build_exeext@,$build_exeext,;t t
30064s,@build_install_headers_dir@,$build_install_headers_dir,;t t
30065s,@build_xm_file_list@,$build_xm_file_list,;t t
30066s,@build_xm_include_list@,$build_xm_include_list,;t t
30067s,@build_xm_defines@,$build_xm_defines,;t t
a0e527e3 30068s,@build_file_translate@,$build_file_translate,;t t
b61ff9c8
BS
30069s,@check_languages@,$check_languages,;t t
30070s,@cpp_install_dir@,$cpp_install_dir,;t t
30071s,@xmake_file@,$xmake_file,;t t
30072s,@tmake_file@,$tmake_file,;t t
aca600aa
AS
30073s,@TM_ENDIAN_CONFIG@,$TM_ENDIAN_CONFIG,;t t
30074s,@TM_MULTILIB_CONFIG@,$TM_MULTILIB_CONFIG,;t t
30075s,@TM_MULTILIB_EXCEPTIONS_CONFIG@,$TM_MULTILIB_EXCEPTIONS_CONFIG,;t t
b61ff9c8
BS
30076s,@extra_gcc_objs@,$extra_gcc_objs,;t t
30077s,@extra_headers_list@,$extra_headers_list,;t t
30078s,@extra_objs@,$extra_objs,;t t
30079s,@extra_parts@,$extra_parts,;t t
30080s,@extra_passes@,$extra_passes,;t t
30081s,@extra_programs@,$extra_programs,;t t
30082s,@float_h_file@,$float_h_file,;t t
30083s,@gcc_config_arguments@,$gcc_config_arguments,;t t
30084s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
30085s,@host_exeext@,$host_exeext,;t t
30086s,@host_xm_file_list@,$host_xm_file_list,;t t
30087s,@host_xm_include_list@,$host_xm_include_list,;t t
30088s,@host_xm_defines@,$host_xm_defines,;t t
30089s,@out_host_hook_obj@,$out_host_hook_obj,;t t
30090s,@install@,$install,;t t
30091s,@lang_opt_files@,$lang_opt_files,;t t
30092s,@lang_specs_files@,$lang_specs_files,;t t
30093s,@lang_tree_files@,$lang_tree_files,;t t
30094s,@local_prefix@,$local_prefix,;t t
30095s,@md_file@,$md_file,;t t
30096s,@objc_boehm_gc@,$objc_boehm_gc,;t t
30097s,@out_file@,$out_file,;t t
30098s,@out_object_file@,$out_object_file,;t t
30099s,@thread_file@,$thread_file,;t t
30100s,@tm_file_list@,$tm_file_list,;t t
30101s,@tm_include_list@,$tm_include_list,;t t
30102s,@tm_defines@,$tm_defines,;t t
30103s,@tm_p_file_list@,$tm_p_file_list,;t t
30104s,@tm_p_include_list@,$tm_p_include_list,;t t
30105s,@xm_file_list@,$xm_file_list,;t t
30106s,@xm_include_list@,$xm_include_list,;t t
30107s,@xm_defines@,$xm_defines,;t t
207bf79d 30108s,@use_gcc_stdint@,$use_gcc_stdint,;t t
b61ff9c8
BS
30109s,@c_target_objs@,$c_target_objs,;t t
30110s,@cxx_target_objs@,$cxx_target_objs,;t t
c776a6d0 30111s,@fortran_target_objs@,$fortran_target_objs,;t t
b61ff9c8
BS
30112s,@target_cpu_default@,$target_cpu_default,;t t
30113s,@GMPLIBS@,$GMPLIBS,;t t
30114s,@GMPINC@,$GMPINC,;t t
f8bf9252
SP
30115s,@PPLLIBS@,$PPLLIBS,;t t
30116s,@PPLINC@,$PPLINC,;t t
30117s,@CLOOGLIBS@,$CLOOGLIBS,;t t
30118s,@CLOOGINC@,$CLOOGINC,;t t
68a607d8
DN
30119s,@pluginlibs@,$pluginlibs,;t t
30120s,@enable_plugin@,$enable_plugin,;t t
b61ff9c8
BS
30121s,@LIBOBJS@,$LIBOBJS,;t t
30122s,@LTLIBOBJS@,$LTLIBOBJS,;t t
30123/@language_hooks@/r $language_hooks
30124s,@language_hooks@,,;t t
30125CEOF
30126
30127_ACEOF
30128
30129 cat >>$CONFIG_STATUS <<\_ACEOF
30130 # Split the substitutions into bite-sized pieces for seds with
30131 # small command number limits, like on Digital OSF/1 and HP-UX.
30132 ac_max_sed_lines=48
30133 ac_sed_frag=1 # Number of current file.
30134 ac_beg=1 # First line for current file.
30135 ac_end=$ac_max_sed_lines # Line after last line for current file.
30136 ac_more_lines=:
30137 ac_sed_cmds=
30138 while $ac_more_lines; do
30139 if test $ac_beg -gt 1; then
30140 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
30141 else
30142 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
30143 fi
30144 if test ! -s $tmp/subs.frag; then
30145 ac_more_lines=false
30146 else
30147 # The purpose of the label and of the branching condition is to
30148 # speed up the sed processing (if there are no `@' at all, there
30149 # is no need to browse any of the substitutions).
30150 # These are the two extra sed commands mentioned above.
30151 (echo ':t
30152 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
30153 if test -z "$ac_sed_cmds"; then
30154 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
30155 else
30156 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
30157 fi
30158 ac_sed_frag=`expr $ac_sed_frag + 1`
30159 ac_beg=$ac_end
30160 ac_end=`expr $ac_end + $ac_max_sed_lines`
30161 fi
30162 done
30163 if test -z "$ac_sed_cmds"; then
30164 ac_sed_cmds=cat
1a4b763e 30165 fi
b61ff9c8 30166fi # test -n "$CONFIG_FILES"
1a4b763e 30167
1a4b763e 30168_ACEOF
ba479fd2 30169cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8
BS
30170for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30171 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30172 case $ac_file in
30173 - | *:- | *:-:* ) # input from stdin
30174 cat >$tmp/stdin
30175 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30176 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30177 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30178 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30179 * ) ac_file_in=$ac_file.in ;;
703d89ab
ZW
30180 esac
30181
b61ff9c8
BS
30182 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30183 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
ba479fd2 30184$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
30185 X"$ac_file" : 'X\(//\)[^/]' \| \
30186 X"$ac_file" : 'X\(//\)$' \| \
b61ff9c8
BS
30187 X"$ac_file" : 'X\(/\)' \| \
30188 . : '\(.\)' 2>/dev/null ||
ba479fd2 30189echo X"$ac_file" |
b61ff9c8
BS
30190 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30191 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30192 /^X\(\/\/\)$/{ s//\1/; q; }
30193 /^X\(\/\).*/{ s//\1/; q; }
30194 s/.*/./; q'`
30195 { if $as_mkdir_p; then
30196 mkdir -p "$ac_dir"
30197 else
30198 as_dir="$ac_dir"
ba479fd2 30199 as_dirs=
b61ff9c8
BS
30200 while test ! -d "$as_dir"; do
30201 as_dirs="$as_dir $as_dirs"
30202 as_dir=`(dirname "$as_dir") 2>/dev/null ||
ba479fd2 30203$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
30204 X"$as_dir" : 'X\(//\)[^/]' \| \
30205 X"$as_dir" : 'X\(//\)$' \| \
b61ff9c8
BS
30206 X"$as_dir" : 'X\(/\)' \| \
30207 . : '\(.\)' 2>/dev/null ||
ba479fd2 30208echo X"$as_dir" |
b61ff9c8
BS
30209 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30210 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30211 /^X\(\/\/\)$/{ s//\1/; q; }
30212 /^X\(\/\).*/{ s//\1/; q; }
30213 s/.*/./; q'`
ba479fd2 30214 done
b61ff9c8
BS
30215 test ! -n "$as_dirs" || mkdir $as_dirs
30216 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
30217echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
ba479fd2 30218 { (exit 1); exit 1; }; }; }
b61ff9c8 30219
ba479fd2
NN
30220 ac_builddir=.
30221
b61ff9c8 30222if test "$ac_dir" != .; then
ba479fd2 30223 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b61ff9c8
BS
30224 # A "../" for each directory in $ac_dir_suffix.
30225 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
30226else
30227 ac_dir_suffix= ac_top_builddir=
30228fi
ba479fd2
NN
30229
30230case $srcdir in
b61ff9c8 30231 .) # No --srcdir option. We are building in place.
ba479fd2 30232 ac_srcdir=.
b61ff9c8
BS
30233 if test -z "$ac_top_builddir"; then
30234 ac_top_srcdir=.
30235 else
30236 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
30237 fi ;;
30238 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 30239 ac_srcdir=$srcdir$ac_dir_suffix;
b61ff9c8
BS
30240 ac_top_srcdir=$srcdir ;;
30241 *) # Relative path.
30242 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
30243 ac_top_srcdir=$ac_top_builddir$srcdir ;;
ba479fd2 30244esac
ba479fd2 30245
b61ff9c8
BS
30246# Do not use `cd foo && pwd` to compute absolute paths, because
30247# the directories may not exist.
30248case `pwd` in
30249.) ac_abs_builddir="$ac_dir";;
30250*)
30251 case "$ac_dir" in
30252 .) ac_abs_builddir=`pwd`;;
30253 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
30254 *) ac_abs_builddir=`pwd`/"$ac_dir";;
30255 esac;;
30256esac
30257case $ac_abs_builddir in
30258.) ac_abs_top_builddir=${ac_top_builddir}.;;
30259*)
30260 case ${ac_top_builddir}. in
30261 .) ac_abs_top_builddir=$ac_abs_builddir;;
30262 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
30263 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
30264 esac;;
30265esac
30266case $ac_abs_builddir in
30267.) ac_abs_srcdir=$ac_srcdir;;
30268*)
30269 case $ac_srcdir in
30270 .) ac_abs_srcdir=$ac_abs_builddir;;
30271 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
30272 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
30273 esac;;
30274esac
30275case $ac_abs_builddir in
30276.) ac_abs_top_srcdir=$ac_top_srcdir;;
30277*)
30278 case $ac_top_srcdir in
30279 .) ac_abs_top_srcdir=$ac_abs_builddir;;
30280 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
30281 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
30282 esac;;
30283esac
703d89ab 30284
ab22c1fa 30285
1a4b763e 30286
b61ff9c8
BS
30287 if test x"$ac_file" != x-; then
30288 { echo "$as_me:$LINENO: creating $ac_file" >&5
30289echo "$as_me: creating $ac_file" >&6;}
30290 rm -f "$ac_file"
30291 fi
30292 # Let's still pretend it is `configure' which instantiates (i.e., don't
30293 # use $as_me), people would be surprised to read:
30294 # /* config.h. Generated by config.status. */
30295 if test x"$ac_file" = x-; then
30296 configure_input=
30297 else
30298 configure_input="$ac_file. "
30299 fi
30300 configure_input=$configure_input"Generated from `echo $ac_file_in |
30301 sed 's,.*/,,'` by configure."
30302
30303 # First look for the input files in the build tree, otherwise in the
30304 # src tree.
30305 ac_file_inputs=`IFS=:
30306 for f in $ac_file_in; do
30307 case $f in
30308 -) echo $tmp/stdin ;;
30309 [\\/$]*)
30310 # Absolute (can't be DOS-style, as IFS=:)
30311 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
30312echo "$as_me: error: cannot find input file: $f" >&2;}
30313 { (exit 1); exit 1; }; }
30314 echo "$f";;
30315 *) # Relative
30316 if test -f "$f"; then
30317 # Build tree
30318 echo "$f"
30319 elif test -f "$srcdir/$f"; then
30320 # Source tree
30321 echo "$srcdir/$f"
30322 else
30323 # /dev/null tree
30324 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
30325echo "$as_me: error: cannot find input file: $f" >&2;}
30326 { (exit 1); exit 1; }; }
30327 fi;;
30328 esac
30329 done` || { (exit 1); exit 1; }
a6ccdbab 30330_ACEOF
ba479fd2
NN
30331cat >>$CONFIG_STATUS <<_ACEOF
30332 sed "$ac_vpsub
30333$extrasub
30334_ACEOF
30335cat >>$CONFIG_STATUS <<\_ACEOF
30336:t
30337/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b61ff9c8
BS
30338s,@configure_input@,$configure_input,;t t
30339s,@srcdir@,$ac_srcdir,;t t
30340s,@abs_srcdir@,$ac_abs_srcdir,;t t
30341s,@top_srcdir@,$ac_top_srcdir,;t t
30342s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
30343s,@builddir@,$ac_builddir,;t t
30344s,@abs_builddir@,$ac_abs_builddir,;t t
30345s,@top_builddir@,$ac_top_builddir,;t t
30346s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
30347" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
30348 rm -f $tmp/stdin
30349 if test x"$ac_file" != x-; then
30350 mv $tmp/out $ac_file
30351 else
30352 cat $tmp/out
30353 rm -f $tmp/out
30354 fi
30355
30356 # Run the commands associated with the file.
be0fe523 30357 case $ac_file in
b61ff9c8
BS
30358 as ) chmod +x as ;;
30359 collect-ld ) chmod +x collect-ld ;;
30360 nm ) chmod +x nm ;;
be0fe523 30361 esac
b61ff9c8
BS
30362done
30363_ACEOF
30364cat >>$CONFIG_STATUS <<\_ACEOF
30365
30366#
30367# CONFIG_HEADER section.
30368#
30369
30370# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30371# NAME is the cpp macro being defined and VALUE is the value it is being given.
30372#
30373# ac_d sets the value in "#define NAME VALUE" lines.
30374ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
30375ac_dB='[ ].*$,\1#\2'
a3bba767 30376ac_dC=' '
b61ff9c8
BS
30377ac_dD=',;t'
30378# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30379ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
30380ac_uB='$,\1#\2define\3'
30381ac_uC=' '
30382ac_uD=',;t'
30383
30384for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30385 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30386 case $ac_file in
30387 - | *:- | *:-:* ) # input from stdin
30388 cat >$tmp/stdin
30389 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30390 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30391 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30392 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30393 * ) ac_file_in=$ac_file.in ;;
30394 esac
30395
30396 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
30397echo "$as_me: creating $ac_file" >&6;}
30398
30399 # First look for the input files in the build tree, otherwise in the
30400 # src tree.
30401 ac_file_inputs=`IFS=:
30402 for f in $ac_file_in; do
30403 case $f in
30404 -) echo $tmp/stdin ;;
30405 [\\/$]*)
30406 # Absolute (can't be DOS-style, as IFS=:)
30407 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
30408echo "$as_me: error: cannot find input file: $f" >&2;}
30409 { (exit 1); exit 1; }; }
30410 # Do quote $f, to prevent DOS paths from being IFS'd.
30411 echo "$f";;
30412 *) # Relative
30413 if test -f "$f"; then
30414 # Build tree
30415 echo "$f"
30416 elif test -f "$srcdir/$f"; then
30417 # Source tree
30418 echo "$srcdir/$f"
30419 else
30420 # /dev/null tree
30421 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
30422echo "$as_me: error: cannot find input file: $f" >&2;}
30423 { (exit 1); exit 1; }; }
30424 fi;;
30425 esac
30426 done` || { (exit 1); exit 1; }
30427 # Remove the trailing spaces.
30428 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
30429
30430_ACEOF
30431
30432# Transform confdefs.h into two sed scripts, `conftest.defines' and
30433# `conftest.undefs', that substitutes the proper values into
30434# config.h.in to produce config.h. The first handles `#define'
30435# templates, and the second `#undef' templates.
30436# And first: Protect against being on the right side of a sed subst in
30437# config.status. Protect against being in an unquoted here document
30438# in config.status.
30439rm -f conftest.defines conftest.undefs
30440# Using a here document instead of a string reduces the quoting nightmare.
30441# Putting comments in sed scripts is not portable.
30442#
30443# `end' is used to avoid that the second main sed command (meant for
30444# 0-ary CPP macros) applies to n-ary macro definitions.
30445# See the Autoconf documentation for `clear'.
30446cat >confdef2sed.sed <<\_ACEOF
30447s/[\\&,]/\\&/g
30448s,[\\$`],\\&,g
30449t clear
30450: clear
30451s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
30452t end
30453s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
30454: end
30455_ACEOF
30456# If some macros were called several times there might be several times
30457# the same #defines, which is useless. Nevertheless, we may not want to
30458# sort them, since we want the *last* AC-DEFINE to be honored.
30459uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
30460sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
30461rm -f confdef2sed.sed
30462
30463# This sed command replaces #undef with comments. This is necessary, for
861bb6c1
JL
30464# example, in the case of _POSIX_SOURCE, which is predefined and required
30465# on some systems where configure will not decide to define it.
b61ff9c8
BS
30466cat >>conftest.undefs <<\_ACEOF
30467s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
30468_ACEOF
30469
30470# Break up conftest.defines because some shells have a limit on the size
30471# of here documents, and old seds have small limits too (100 cmds).
30472echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
30473echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
30474echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
30475echo ' :' >>$CONFIG_STATUS
30476rm -f conftest.tail
30477while grep . conftest.defines >/dev/null
ba479fd2 30478do
b61ff9c8
BS
30479 # Write a limited-size here document to $tmp/defines.sed.
30480 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
30481 # Speed up: don't consider the non `#define' lines.
30482 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
30483 # Work around the forget-to-reset-the-flag bug.
30484 echo 't clr' >>$CONFIG_STATUS
30485 echo ': clr' >>$CONFIG_STATUS
30486 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
ba479fd2 30487 echo 'CEOF
b61ff9c8
BS
30488 sed -f $tmp/defines.sed $tmp/in >$tmp/out
30489 rm -f $tmp/in
30490 mv $tmp/out $tmp/in
30491' >>$CONFIG_STATUS
30492 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
ba479fd2
NN
30493 rm -f conftest.defines
30494 mv conftest.tail conftest.defines
30495done
b61ff9c8
BS
30496rm -f conftest.defines
30497echo ' fi # grep' >>$CONFIG_STATUS
30498echo >>$CONFIG_STATUS
30499
30500# Break up conftest.undefs because some shells have a limit on the size
30501# of here documents, and old seds have small limits too (100 cmds).
30502echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
30503rm -f conftest.tail
30504while grep . conftest.undefs >/dev/null
30505do
30506 # Write a limited-size here document to $tmp/undefs.sed.
30507 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
30508 # Speed up: don't consider the non `#undef'
30509 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
30510 # Work around the forget-to-reset-the-flag bug.
30511 echo 't clr' >>$CONFIG_STATUS
30512 echo ': clr' >>$CONFIG_STATUS
30513 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
30514 echo 'CEOF
30515 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
30516 rm -f $tmp/in
30517 mv $tmp/out $tmp/in
30518' >>$CONFIG_STATUS
30519 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
30520 rm -f conftest.undefs
30521 mv conftest.tail conftest.undefs
30522done
30523rm -f conftest.undefs
ba479fd2
NN
30524
30525cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8
BS
30526 # Let's still pretend it is `configure' which instantiates (i.e., don't
30527 # use $as_me), people would be surprised to read:
30528 # /* config.h. Generated by config.status. */
30529 if test x"$ac_file" = x-; then
30530 echo "/* Generated by configure. */" >$tmp/config.h
30531 else
30532 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
30533 fi
30534 cat $tmp/in >>$tmp/config.h
30535 rm -f $tmp/in
ba479fd2 30536 if test x"$ac_file" != x-; then
b61ff9c8 30537 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
ba479fd2
NN
30538 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
30539echo "$as_me: $ac_file is unchanged" >&6;}
30540 else
b61ff9c8
BS
30541 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
30542$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30543 X"$ac_file" : 'X\(//\)[^/]' \| \
30544 X"$ac_file" : 'X\(//\)$' \| \
30545 X"$ac_file" : 'X\(/\)' \| \
30546 . : '\(.\)' 2>/dev/null ||
30547echo X"$ac_file" |
30548 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30549 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30550 /^X\(\/\/\)$/{ s//\1/; q; }
30551 /^X\(\/\).*/{ s//\1/; q; }
30552 s/.*/./; q'`
30553 { if $as_mkdir_p; then
30554 mkdir -p "$ac_dir"
30555 else
30556 as_dir="$ac_dir"
30557 as_dirs=
30558 while test ! -d "$as_dir"; do
30559 as_dirs="$as_dir $as_dirs"
30560 as_dir=`(dirname "$as_dir") 2>/dev/null ||
30561$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30562 X"$as_dir" : 'X\(//\)[^/]' \| \
30563 X"$as_dir" : 'X\(//\)$' \| \
30564 X"$as_dir" : 'X\(/\)' \| \
30565 . : '\(.\)' 2>/dev/null ||
30566echo X"$as_dir" |
30567 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30568 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30569 /^X\(\/\/\)$/{ s//\1/; q; }
30570 /^X\(\/\).*/{ s//\1/; q; }
30571 s/.*/./; q'`
30572 done
30573 test ! -n "$as_dirs" || mkdir $as_dirs
30574 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
30575echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
30576 { (exit 1); exit 1; }; }; }
30577
ba479fd2 30578 rm -f $ac_file
b61ff9c8 30579 mv $tmp/config.h $ac_file
ba479fd2
NN
30580 fi
30581 else
b61ff9c8
BS
30582 cat $tmp/config.h
30583 rm -f $tmp/config.h
ba479fd2 30584 fi
b61ff9c8
BS
30585done
30586_ACEOF
30587cat >>$CONFIG_STATUS <<\_ACEOF
2f41c1d6 30588
b61ff9c8
BS
30589#
30590# CONFIG_COMMANDS section.
30591#
30592for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30593 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30594 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30595 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
30596$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30597 X"$ac_dest" : 'X\(//\)[^/]' \| \
30598 X"$ac_dest" : 'X\(//\)$' \| \
30599 X"$ac_dest" : 'X\(/\)' \| \
30600 . : '\(.\)' 2>/dev/null ||
30601echo X"$ac_dest" |
30602 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30603 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30604 /^X\(\/\/\)$/{ s//\1/; q; }
30605 /^X\(\/\).*/{ s//\1/; q; }
30606 s/.*/./; q'`
30607 { if $as_mkdir_p; then
30608 mkdir -p "$ac_dir"
30609 else
30610 as_dir="$ac_dir"
30611 as_dirs=
30612 while test ! -d "$as_dir"; do
30613 as_dirs="$as_dir $as_dirs"
30614 as_dir=`(dirname "$as_dir") 2>/dev/null ||
30615$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30616 X"$as_dir" : 'X\(//\)[^/]' \| \
30617 X"$as_dir" : 'X\(//\)$' \| \
30618 X"$as_dir" : 'X\(/\)' \| \
30619 . : '\(.\)' 2>/dev/null ||
30620echo X"$as_dir" |
30621 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30622 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30623 /^X\(\/\/\)$/{ s//\1/; q; }
30624 /^X\(\/\).*/{ s//\1/; q; }
30625 s/.*/./; q'`
30626 done
30627 test ! -n "$as_dirs" || mkdir $as_dirs
30628 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
30629echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
30630 { (exit 1); exit 1; }; }; }
2f41c1d6 30631
b61ff9c8 30632 ac_builddir=.
2f41c1d6 30633
b61ff9c8
BS
30634if test "$ac_dir" != .; then
30635 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
30636 # A "../" for each directory in $ac_dir_suffix.
30637 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
30638else
30639 ac_dir_suffix= ac_top_builddir=
30640fi
30641
30642case $srcdir in
30643 .) # No --srcdir option. We are building in place.
30644 ac_srcdir=.
30645 if test -z "$ac_top_builddir"; then
30646 ac_top_srcdir=.
30647 else
30648 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
30649 fi ;;
30650 [\\/]* | ?:[\\/]* ) # Absolute path.
30651 ac_srcdir=$srcdir$ac_dir_suffix;
30652 ac_top_srcdir=$srcdir ;;
30653 *) # Relative path.
30654 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
30655 ac_top_srcdir=$ac_top_builddir$srcdir ;;
30656esac
30657
30658# Do not use `cd foo && pwd` to compute absolute paths, because
30659# the directories may not exist.
30660case `pwd` in
30661.) ac_abs_builddir="$ac_dir";;
30662*)
30663 case "$ac_dir" in
30664 .) ac_abs_builddir=`pwd`;;
30665 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
30666 *) ac_abs_builddir=`pwd`/"$ac_dir";;
30667 esac;;
30668esac
30669case $ac_abs_builddir in
30670.) ac_abs_top_builddir=${ac_top_builddir}.;;
30671*)
30672 case ${ac_top_builddir}. in
30673 .) ac_abs_top_builddir=$ac_abs_builddir;;
30674 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
30675 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
30676 esac;;
30677esac
30678case $ac_abs_builddir in
30679.) ac_abs_srcdir=$ac_srcdir;;
30680*)
30681 case $ac_srcdir in
30682 .) ac_abs_srcdir=$ac_abs_builddir;;
30683 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
30684 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
30685 esac;;
30686esac
30687case $ac_abs_builddir in
30688.) ac_abs_top_srcdir=$ac_top_srcdir;;
30689*)
30690 case $ac_top_srcdir in
30691 .) ac_abs_top_srcdir=$ac_abs_builddir;;
30692 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
30693 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
30694 esac;;
30695esac
30696
30697
30698 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
30699echo "$as_me: executing $ac_dest commands" >&6;}
30700 case $ac_dest in
30701 default )
f1faaabd
NN
30702case ${CONFIG_HEADERS} in
30703 *auto-host.h:config.in*)
30704 echo > cstamp-h ;;
861bb6c1 30705esac
2ed26f6b 30706# Make sure all the subdirs exist.
3b620440 30707for d in $subdirs doc build
2ed26f6b 30708do
2ed26f6b 30709 test -d $d || mkdir $d
2ed26f6b 30710done
ba479fd2
NN
30711 ;;
30712 esac
b61ff9c8
BS
30713done
30714_ACEOF
cafe096b 30715
b61ff9c8 30716cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
30717
30718{ (exit 0); exit 0; }
30719_ACEOF
861bb6c1 30720chmod +x $CONFIG_STATUS
ba479fd2
NN
30721ac_clean_files=$ac_clean_files_save
30722
30723
30724# configure is writing to config.log, and then calls config.status.
30725# config.status does its own redirection, appending to config.log.
30726# Unfortunately, on DOS this fails, as config.log is still kept open
30727# by configure, so config.status won't be able to write to it; its
30728# output is simply discarded. So we exec the FD to /dev/null,
30729# effectively closing config.log, so it can be properly (re)opened and
30730# appended to by config.status. When coming back to configure, we
30731# need to make the FD available again.
30732if test "$no_create" != yes; then
30733 ac_cs_success=:
30734 ac_config_status_args=
30735 test "$silent" = yes &&
30736 ac_config_status_args="$ac_config_status_args --quiet"
30737 exec 5>/dev/null
30738 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30739 exec 5>>config.log
30740 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30741 # would make configure fail if this is the last instruction.
30742 $ac_cs_success || { (exit 1); exit 1; }
30743fi
861bb6c1 30744