]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
configure.ac: Create missing directory gnu/java/security/jce/prng.
[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
aca600aa 461ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB 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 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 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
919ac_env_CPP_set=${CPP+set}
920ac_env_CPP_value=$CPP
921ac_cv_env_CPP_set=${CPP+set}
922ac_cv_env_CPP_value=$CPP
923ac_env_GMPLIBS_set=${GMPLIBS+set}
924ac_env_GMPLIBS_value=$GMPLIBS
925ac_cv_env_GMPLIBS_set=${GMPLIBS+set}
926ac_cv_env_GMPLIBS_value=$GMPLIBS
927ac_env_GMPINC_set=${GMPINC+set}
928ac_env_GMPINC_value=$GMPINC
929ac_cv_env_GMPINC_set=${GMPINC+set}
930ac_cv_env_GMPINC_value=$GMPINC
f8bf9252
SP
931ac_env_PPLLIBS_set=${PPLLIBS+set}
932ac_env_PPLLIBS_value=$PPLLIBS
933ac_cv_env_PPLLIBS_set=${PPLLIBS+set}
934ac_cv_env_PPLLIBS_value=$PPLLIBS
935ac_env_PPLINC_set=${PPLINC+set}
936ac_env_PPLINC_value=$PPLINC
937ac_cv_env_PPLINC_set=${PPLINC+set}
938ac_cv_env_PPLINC_value=$PPLINC
939ac_env_CLOOGLIBS_set=${CLOOGLIBS+set}
940ac_env_CLOOGLIBS_value=$CLOOGLIBS
941ac_cv_env_CLOOGLIBS_set=${CLOOGLIBS+set}
942ac_cv_env_CLOOGLIBS_value=$CLOOGLIBS
943ac_env_CLOOGINC_set=${CLOOGINC+set}
944ac_env_CLOOGINC_value=$CLOOGINC
945ac_cv_env_CLOOGINC_set=${CLOOGINC+set}
946ac_cv_env_CLOOGINC_value=$CLOOGINC
63cf211a 947
ba479fd2
NN
948#
949# Report the --help message.
950#
951if test "$ac_init_help" = "long"; then
952 # Omit some internal or obsolete options to make the list less imposing.
953 # This message is too long to be a string in the A/UX 3.1 sh.
954 cat <<_ACEOF
955\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 956
ba479fd2 957Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 958
ba479fd2
NN
959To assign environment variables (e.g., CC, CFLAGS...), specify them as
960VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 961
ba479fd2 962Defaults for the options are specified in brackets.
861bb6c1 963
ba479fd2
NN
964Configuration:
965 -h, --help display this help and exit
966 --help=short display options specific to this package
967 --help=recursive display the short help of all the included packages
968 -V, --version display version information and exit
969 -q, --quiet, --silent do not print \`checking...' messages
970 --cache-file=FILE cache test results in FILE [disabled]
971 -C, --config-cache alias for \`--cache-file=config.cache'
972 -n, --no-create do not create output files
973 --srcdir=DIR find the sources in DIR [configure dir or \`..']
974
b61ff9c8
BS
975_ACEOF
976
977 cat <<_ACEOF
ba479fd2
NN
978Installation directories:
979 --prefix=PREFIX install architecture-independent files in PREFIX
86da66b5 980 [$ac_default_prefix]
ba479fd2 981 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
86da66b5 982 [PREFIX]
861bb6c1 983
ba479fd2
NN
984By default, \`make install' will install all the files in
985\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
986an installation prefix other than \`$ac_default_prefix' using \`--prefix',
987for instance \`--prefix=\$HOME'.
13c22933 988
ba479fd2 989For better control, use the options below.
13c22933 990
ba479fd2
NN
991Fine tuning of the installation directories:
992 --bindir=DIR user executables [EPREFIX/bin]
993 --sbindir=DIR system admin executables [EPREFIX/sbin]
994 --libexecdir=DIR program executables [EPREFIX/libexec]
b61ff9c8 995 --datadir=DIR read-only architecture-independent data [PREFIX/share]
ba479fd2
NN
996 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
997 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
998 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
999 --libdir=DIR object code libraries [EPREFIX/lib]
1000 --includedir=DIR C header files [PREFIX/include]
1001 --oldincludedir=DIR C header files for non-gcc [/usr/include]
b61ff9c8
BS
1002 --infodir=DIR info documentation [PREFIX/info]
1003 --mandir=DIR man documentation [PREFIX/man]
ba479fd2 1004_ACEOF
13c22933 1005
ba479fd2 1006 cat <<\_ACEOF
13c22933 1007
ba479fd2
NN
1008Program names:
1009 --program-prefix=PREFIX prepend PREFIX to installed program names
1010 --program-suffix=SUFFIX append SUFFIX to installed program names
1011 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 1012
ba479fd2
NN
1013System types:
1014 --build=BUILD configure for building on BUILD [guessed]
1015 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1016 --target=TARGET configure for building compilers for TARGET [HOST]
1017_ACEOF
13c22933
JJ
1018fi
1019
ba479fd2 1020if test -n "$ac_init_help"; then
13c22933 1021
ba479fd2 1022 cat <<\_ACEOF
13c22933 1023
ba479fd2
NN
1024Optional Features:
1025 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1026 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
1027 --enable-generated-files-in-srcdir
1028 put copies of generated files in source dir
1029 intended for creating source tarballs for users
1030 without texinfo bison or flex.
3bbd5a19 1031 --enable-werror-always enable -Werror despite compiler version
ba479fd2
NN
1032 --enable-checking=LIST
1033 enable expensive run-time checks. With LIST,
1034 enable only specific categories of checks.
cdce5c16 1035 Categories are: yes,no,all,none,release.
726a989a 1036 Flags are: assert,df,fold,gc,gcac,gimple,misc,
7e98624c 1037 rtlflag,rtl,runtime,tree,valgrind,types.
ba479fd2 1038 --enable-coverage=LEVEL
fb38008e 1039 enable compiler's code coverage collection.
ba479fd2
NN
1040 Use to measure compiler performance and locate
1041 unused parts of the compiler. With LEVEL, specify
1042 optimization. Values are opt, noopt,
1043 default is noopt
1044 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
1045 --enable-multilib enable library support for multiple ABIs
1046 --enable-__cxa_atexit enable __cxa_atexit for C++
79b87c74
MM
1047 --enable-decimal-float={no,yes,bid,dpd}
1048 enable decimal float extension to C. Selecting 'bid'
1049 or 'dpd' choses which decimal floating point format
1050 to use
ab22c1fa 1051 --enable-fixed-point enable fixed-point arithmetic extension to C
ba479fd2
NN
1052 --enable-threads enable thread usage for target GCC
1053 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
1054 --enable-tls enable or disable generation of tls code
1055 overriding the assembler check for tls support
ba479fd2
NN
1056 --enable-objc-gc enable the use of Boehm's garbage collector with
1057 the GNU Objective-C runtime
1058 --disable-shared don't provide a shared libgcc
1059 --enable-intermodule build the compiler in one step
f3c9f174 1060 --enable-languages=LIST specify which front-ends to build
dfb77e37 1061 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
1062 --enable-initfini-array use .init_array/.fini_array sections
1063 --enable-sjlj-exceptions
1064 arrange to use setjmp/longjmp exception handling
7f970b70 1065 --enable-secureplt enable -msecure-plt by default for PowerPC
922e3e33 1066 --enable-cld enable -mcld by default for 32bit x86
ba479fd2
NN
1067 --disable-win32-registry
1068 disable lookup of installation paths in the
1069 Registry on Windows hosts
1070 --enable-win32-registry enable registry lookup (default)
1071 --enable-win32-registry=KEY
1072 use KEY instead of GCC version as the last portion
1073 of the registry key
da0f6381
PB
1074 --enable-shared[=PKGS]
1075 build shared libraries [default=yes]
1076 --enable-static[=PKGS]
1077 build static libraries [default=yes]
1078 --enable-fast-install[=PKGS]
1079 optimize for fast installation [default=yes]
1080 --disable-libtool-lock avoid locking (might break parallel builds)
ba479fd2
NN
1081 --enable-maintainer-mode
1082 enable make rules and dependencies not useful
1083 (and sometimes confusing) to the casual installer
1084 --enable-version-specific-runtime-libs
1085 specify that runtime libraries should be
1086 installed in a compiler-specific directory
68a607d8 1087 --enable-plugin enable plugin support
093e61a6 1088
ba479fd2
NN
1089Optional Packages:
1090 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1091 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1546bb64 1092 --with-build-libsubdir=DIR Directory where to find libraries for build system
ba479fd2
NN
1093 --with-local-prefix=DIR specifies directory to put local include
1094 --with-gxx-include-dir=DIR
1095 specifies directory to put g++ header files
1096 --with-cpp-install-dir=DIR
1097 install the user visible C preprocessor in DIR
1098 (relative to PREFIX) as well as PREFIX/bin
1099 --with-gnu-ld arrange to work with GNU ld.
1100 --with-ld arrange to use the specified ld (full pathname)
d594623a 1101 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
1102 --with-gnu-as arrange to work with GNU as
1103 --with-as arrange to use the specified as (full pathname)
1104 --with-stabs arrange to use stabs instead of host debug format
1105 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
1106 --with-build-sysroot=sysroot
1107 use sysroot as the system root during the build
ba479fd2 1108 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
2f41c1d6
PB
1109 --with-pkgversion=PKG Use PKG in the version string in place of "GCC"
1110 --with-bugurl=URL Direct users to URL to report a bug
aca600aa 1111 --with-multilib-list Select multilibs (SH only)
dfb77e37
KC
1112 --with-gnu-ld assume the C compiler uses GNU ld default=no
1113 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1114 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 1115 --with-system-libunwind use installed libunwind
da0f6381
PB
1116 --with-pic try to use only PIC/non-PIC objects [default=use
1117 both]
1118 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
ed965309 1119 --with-long-double-128 Use 128-bit long double by default.
59415997 1120 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
1121 with the compiler
1122 --with-system-zlib use installed libz
22482f74
MS
1123 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
1124 --with-datarootdir=DIR Use DIR as the data root [PREFIX/share]
1125 --with-docdir=DIR Install documentation in DIR [DATAROOTDIR]
1126 --with-htmldir=DIR html documentation in in DIR [DOCDIR]
13c22933 1127
ba479fd2
NN
1128Some influential environment variables:
1129 CC C compiler command
1130 CFLAGS C compiler flags
1131 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1132 nonstandard directory <lib dir>
b61ff9c8
BS
1133 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
1134 headers in a nonstandard directory <include dir>
ba479fd2 1135 CPP C preprocessor
6de9cd9a
DN
1136 GMPLIBS How to link GMP
1137 GMPINC How to find GMP include files
f8bf9252
SP
1138 PPLLIBS How to link PPL
1139 PPLINC How to find PPL include files
1140 CLOOGLIBS How to link CLOOG
1141 CLOOGINC How to find CLOOG include files
13c22933 1142
ba479fd2
NN
1143Use these variables to override the choices made by `configure' or to help
1144it to find libraries and programs with nonstandard names/locations.
73458fb7 1145
ba479fd2
NN
1146_ACEOF
1147fi
6e3f3080 1148
ba479fd2
NN
1149if test "$ac_init_help" = "recursive"; then
1150 # If there are subdirs, report their specific --help.
b61ff9c8 1151 ac_popdir=`pwd`
ba479fd2 1152 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
b61ff9c8 1153 test -d $ac_dir || continue
ba479fd2
NN
1154 ac_builddir=.
1155
b61ff9c8 1156if test "$ac_dir" != .; then
ba479fd2 1157 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b61ff9c8
BS
1158 # A "../" for each directory in $ac_dir_suffix.
1159 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1160else
1161 ac_dir_suffix= ac_top_builddir=
1162fi
ba479fd2
NN
1163
1164case $srcdir in
b61ff9c8 1165 .) # No --srcdir option. We are building in place.
ba479fd2 1166 ac_srcdir=.
b61ff9c8
BS
1167 if test -z "$ac_top_builddir"; then
1168 ac_top_srcdir=.
1169 else
1170 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1171 fi ;;
1172 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 1173 ac_srcdir=$srcdir$ac_dir_suffix;
b61ff9c8
BS
1174 ac_top_srcdir=$srcdir ;;
1175 *) # Relative path.
1176 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1177 ac_top_srcdir=$ac_top_builddir$srcdir ;;
1178esac
1179
1180# Do not use `cd foo && pwd` to compute absolute paths, because
1181# the directories may not exist.
1182case `pwd` in
1183.) ac_abs_builddir="$ac_dir";;
1184*)
1185 case "$ac_dir" in
1186 .) ac_abs_builddir=`pwd`;;
1187 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1188 *) ac_abs_builddir=`pwd`/"$ac_dir";;
1189 esac;;
1190esac
1191case $ac_abs_builddir in
1192.) ac_abs_top_builddir=${ac_top_builddir}.;;
1193*)
1194 case ${ac_top_builddir}. in
1195 .) ac_abs_top_builddir=$ac_abs_builddir;;
1196 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1197 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1198 esac;;
1199esac
1200case $ac_abs_builddir in
1201.) ac_abs_srcdir=$ac_srcdir;;
1202*)
1203 case $ac_srcdir in
1204 .) ac_abs_srcdir=$ac_abs_builddir;;
1205 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1206 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1207 esac;;
1208esac
1209case $ac_abs_builddir in
1210.) ac_abs_top_srcdir=$ac_top_srcdir;;
1211*)
1212 case $ac_top_srcdir in
1213 .) ac_abs_top_srcdir=$ac_abs_builddir;;
1214 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1215 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1216 esac;;
86da66b5 1217esac
b61ff9c8
BS
1218
1219 cd $ac_dir
1220 # Check for guested configure; otherwise get Cygnus style configure.
1221 if test -f $ac_srcdir/configure.gnu; then
1222 echo
1223 $SHELL $ac_srcdir/configure.gnu --help=recursive
1224 elif test -f $ac_srcdir/configure; then
1225 echo
1226 $SHELL $ac_srcdir/configure --help=recursive
1227 elif test -f $ac_srcdir/configure.ac ||
1228 test -f $ac_srcdir/configure.in; then
1229 echo
1230 $ac_configure --help
ba479fd2
NN
1231 else
1232 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
b61ff9c8
BS
1233 fi
1234 cd $ac_popdir
ba479fd2
NN
1235 done
1236fi
1237
b61ff9c8 1238test -n "$ac_init_help" && exit 0
ba479fd2
NN
1239if $ac_init_version; then
1240 cat <<\_ACEOF
1241
b61ff9c8 1242Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1243This configure script is free software; the Free Software Foundation
1244gives unlimited permission to copy, distribute and modify it.
1245_ACEOF
b61ff9c8 1246 exit 0
ba479fd2 1247fi
b61ff9c8
BS
1248exec 5>config.log
1249cat >&5 <<_ACEOF
ba479fd2
NN
1250This file contains any messages produced by compilers while
1251running configure, to aid debugging if configure makes a mistake.
1252
1253It was created by $as_me, which was
b61ff9c8 1254generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1255
1256 $ $0 $@
1257
1258_ACEOF
1259{
1260cat <<_ASUNAME
1261## --------- ##
1262## Platform. ##
1263## --------- ##
1264
1265hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1266uname -m = `(uname -m) 2>/dev/null || echo unknown`
1267uname -r = `(uname -r) 2>/dev/null || echo unknown`
1268uname -s = `(uname -s) 2>/dev/null || echo unknown`
1269uname -v = `(uname -v) 2>/dev/null || echo unknown`
1270
1271/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1272/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1273
1274/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1275/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1276/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
b61ff9c8 1277hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
ba479fd2
NN
1278/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1279/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1280/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1281
1282_ASUNAME
1283
1284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1285for as_dir in $PATH
1286do
1287 IFS=$as_save_IFS
1288 test -z "$as_dir" && as_dir=.
1289 echo "PATH: $as_dir"
1290done
1291
1292} >&5
1293
1294cat >&5 <<_ACEOF
1295
1296
1297## ----------- ##
1298## Core tests. ##
1299## ----------- ##
1300
1301_ACEOF
1302
1303
1304# Keep a trace of the command line.
1305# Strip out --no-create and --no-recursion so they do not pile up.
1306# Strip out --silent because we don't want to record it for future runs.
1307# Also quote any args containing shell meta-characters.
1308# Make two passes to allow for proper duplicate-argument suppression.
1309ac_configure_args=
1310ac_configure_args0=
1311ac_configure_args1=
b61ff9c8 1312ac_sep=
ba479fd2
NN
1313ac_must_keep_next=false
1314for ac_pass in 1 2
1315do
1316 for ac_arg
1317 do
1318 case $ac_arg in
1319 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1320 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1321 | -silent | --silent | --silen | --sile | --sil)
1322 continue ;;
b61ff9c8 1323 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ba479fd2
NN
1324 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1325 esac
1326 case $ac_pass in
1327 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1328 2)
1329 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1330 if test $ac_must_keep_next = true; then
86da66b5 1331 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1332 else
86da66b5
HPN
1333 case $ac_arg in
1334 *=* | --config-cache | -C | -disable-* | --disable-* \
1335 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1336 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1337 | -with-* | --with-* | -without-* | --without-* | --x)
1338 case "$ac_configure_args0 " in
1339 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1340 esac
1341 ;;
1342 -* ) ac_must_keep_next=true ;;
1343 esac
ba479fd2 1344 fi
b61ff9c8
BS
1345 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1346 # Get rid of the leading space.
1347 ac_sep=" "
ba479fd2
NN
1348 ;;
1349 esac
1350 done
1351done
1352$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1353$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1354
1355# When interrupted or exit'd, cleanup temporary files, and complete
1356# config.log. We remove comments because anyway the quotes in there
1357# would cause problems or look ugly.
b61ff9c8
BS
1358# WARNING: Be sure not to use single quotes in there, as some shells,
1359# such as our DU 5.0 friend, will then `close' the trap.
ba479fd2
NN
1360trap 'exit_status=$?
1361 # Save into config.log some information that might help in debugging.
1362 {
1363 echo
1364
1365 cat <<\_ASBOX
1366## ---------------- ##
1367## Cache variables. ##
1368## ---------------- ##
1369_ASBOX
1370 echo
1371 # The following way of writing the cache mishandles newlines in values,
b61ff9c8 1372{
ba479fd2 1373 (set) 2>&1 |
b61ff9c8
BS
1374 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1375 *ac_space=\ *)
ba479fd2 1376 sed -n \
b61ff9c8
BS
1377 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1378 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1379 ;;
ba479fd2 1380 *)
b61ff9c8
BS
1381 sed -n \
1382 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 1383 ;;
b61ff9c8
BS
1384 esac;
1385}
ba479fd2
NN
1386 echo
1387
1388 cat <<\_ASBOX
1389## ----------------- ##
1390## Output variables. ##
1391## ----------------- ##
1392_ASBOX
1393 echo
1394 for ac_var in $ac_subst_vars
1395 do
b61ff9c8
BS
1396 eval ac_val=$`echo $ac_var`
1397 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1398 done | sort
1399 echo
1400
1401 if test -n "$ac_subst_files"; then
1402 cat <<\_ASBOX
b61ff9c8
BS
1403## ------------- ##
1404## Output files. ##
1405## ------------- ##
ba479fd2
NN
1406_ASBOX
1407 echo
1408 for ac_var in $ac_subst_files
1409 do
b61ff9c8
BS
1410 eval ac_val=$`echo $ac_var`
1411 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1412 done | sort
1413 echo
1414 fi
1415
1416 if test -s confdefs.h; then
1417 cat <<\_ASBOX
1418## ----------- ##
1419## confdefs.h. ##
1420## ----------- ##
1421_ASBOX
1422 echo
b61ff9c8 1423 sed "/^$/d" confdefs.h | sort
ba479fd2
NN
1424 echo
1425 fi
1426 test "$ac_signal" != 0 &&
1427 echo "$as_me: caught signal $ac_signal"
1428 echo "$as_me: exit $exit_status"
1429 } >&5
b61ff9c8
BS
1430 rm -f core *.core &&
1431 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
ba479fd2 1432 exit $exit_status
b61ff9c8 1433 ' 0
ba479fd2
NN
1434for ac_signal in 1 2 13 15; do
1435 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1436done
1437ac_signal=0
1438
1439# confdefs.h avoids OS command line length limits that DEFS can exceed.
b61ff9c8
BS
1440rm -rf conftest* confdefs.h
1441# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1442echo >confdefs.h
ba479fd2
NN
1443
1444# Predefined preprocessor variables.
1445
1446cat >>confdefs.h <<_ACEOF
1447#define PACKAGE_NAME "$PACKAGE_NAME"
1448_ACEOF
1449
1450
1451cat >>confdefs.h <<_ACEOF
1452#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1453_ACEOF
1454
1455
1456cat >>confdefs.h <<_ACEOF
1457#define PACKAGE_VERSION "$PACKAGE_VERSION"
1458_ACEOF
1459
1460
1461cat >>confdefs.h <<_ACEOF
1462#define PACKAGE_STRING "$PACKAGE_STRING"
1463_ACEOF
1464
1465
1466cat >>confdefs.h <<_ACEOF
1467#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1468_ACEOF
1469
1470
1471# Let the site file select an alternate cache file if it wants to.
1472# Prefer explicitly selected file to automatically selected ones.
b61ff9c8
BS
1473if test -z "$CONFIG_SITE"; then
1474 if test "x$prefix" != xNONE; then
1475 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1476 else
1477 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1478 fi
ba479fd2 1479fi
b61ff9c8 1480for ac_site_file in $CONFIG_SITE; do
ba479fd2
NN
1481 if test -r "$ac_site_file"; then
1482 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1483echo "$as_me: loading site script $ac_site_file" >&6;}
1484 sed 's/^/| /' "$ac_site_file" >&5
1485 . "$ac_site_file"
1486 fi
1487done
1488
1489if test -r "$cache_file"; then
1490 # Some versions of bash will fail to source /dev/null (special
1491 # files actually), so we avoid doing that.
1492 if test -f "$cache_file"; then
1493 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1494echo "$as_me: loading cache $cache_file" >&6;}
1495 case $cache_file in
b61ff9c8
BS
1496 [\\/]* | ?:[\\/]* ) . $cache_file;;
1497 *) . ./$cache_file;;
ba479fd2
NN
1498 esac
1499 fi
1500else
1501 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1502echo "$as_me: creating cache $cache_file" >&6;}
1503 >$cache_file
1504fi
1505
1506# Check that the precious variables saved in the cache have kept the same
1507# value.
1508ac_cache_corrupted=false
b61ff9c8
BS
1509for ac_var in `(set) 2>&1 |
1510 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1511 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1512 eval ac_new_set=\$ac_env_${ac_var}_set
b61ff9c8
BS
1513 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1514 eval ac_new_val="\$ac_env_${ac_var}_value"
ba479fd2
NN
1515 case $ac_old_set,$ac_new_set in
1516 set,)
1517 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1518echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1519 ac_cache_corrupted=: ;;
1520 ,set)
1521 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1522echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1523 ac_cache_corrupted=: ;;
1524 ,);;
1525 *)
1526 if test "x$ac_old_val" != "x$ac_new_val"; then
deb984e6
PB
1527 # differences in whitespace do not lead to failure.
1528 ac_old_val_w=`echo x $ac_old_val`
1529 ac_new_val_w=`echo x $ac_new_val`
1530 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1531 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1532echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
deb984e6
PB
1533 ac_cache_corrupted=:
1534 else
1535 { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1536echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1537 eval $ac_var=\$ac_old_val
1538 fi
1539 { echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1540echo "$as_me: former value: \`$ac_old_val'" >&2;}
1541 { echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1542echo "$as_me: current value: \`$ac_new_val'" >&2;}
ba479fd2
NN
1543 fi;;
1544 esac
1545 # Pass precious variables to config.status.
1546 if test "$ac_new_set" = set; then
1547 case $ac_new_val in
b61ff9c8
BS
1548 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1549 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
ba479fd2
NN
1550 *) ac_arg=$ac_var=$ac_new_val ;;
1551 esac
1552 case " $ac_configure_args " in
1553 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1554 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1555 esac
1556 fi
1557done
1558if $ac_cache_corrupted; then
18c04407
RW
1559 { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1560echo "$as_me: error: in \`$ac_pwd':" >&2;}
ba479fd2
NN
1561 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1562echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1563 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1564echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1565 { (exit 1); exit 1; }; }
1566fi
1567
b61ff9c8
BS
1568ac_ext=c
1569ac_cpp='$CPP $CPPFLAGS'
1570ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1571ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1572ac_compiler_gnu=$ac_cv_c_compiler_gnu
1573
ba479fd2
NN
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
18c04407
RW
1590
1591
1592
ba479fd2
NN
1593
1594
914c5af7 1595
b61ff9c8 1596 ac_config_headers="$ac_config_headers auto-host.h:config.in"
ba479fd2
NN
1597
1598
9f18db39
PB
1599gcc_version=`cat $srcdir/BASE-VER`
1600
ba479fd2
NN
1601# Determine the host, build, and target systems
1602ac_aux_dir=
b61ff9c8
BS
1603for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1604 if test -f $ac_dir/install-sh; then
ba479fd2
NN
1605 ac_aux_dir=$ac_dir
1606 ac_install_sh="$ac_aux_dir/install-sh -c"
1607 break
b61ff9c8 1608 elif test -f $ac_dir/install.sh; then
ba479fd2
NN
1609 ac_aux_dir=$ac_dir
1610 ac_install_sh="$ac_aux_dir/install.sh -c"
1611 break
b61ff9c8 1612 elif test -f $ac_dir/shtool; then
ba479fd2
NN
1613 ac_aux_dir=$ac_dir
1614 ac_install_sh="$ac_aux_dir/shtool install -c"
1615 break
1616 fi
1617done
1618if test -z "$ac_aux_dir"; then
b61ff9c8
BS
1619 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1620echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
ba479fd2
NN
1621 { (exit 1); exit 1; }; }
1622fi
b61ff9c8
BS
1623ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1624ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1625ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba479fd2
NN
1626
1627# Make sure we can run config.sub.
b61ff9c8
BS
1628$ac_config_sub sun4 >/dev/null 2>&1 ||
1629 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1630echo "$as_me: error: cannot run $ac_config_sub" >&2;}
ba479fd2
NN
1631 { (exit 1); exit 1; }; }
1632
b61ff9c8
BS
1633echo "$as_me:$LINENO: checking build system type" >&5
1634echo $ECHO_N "checking build system type... $ECHO_C" >&6
ba479fd2
NN
1635if test "${ac_cv_build+set}" = set; then
1636 echo $ECHO_N "(cached) $ECHO_C" >&6
1637else
b61ff9c8
BS
1638 ac_cv_build_alias=$build_alias
1639test -z "$ac_cv_build_alias" &&
1640 ac_cv_build_alias=`$ac_config_guess`
1641test -z "$ac_cv_build_alias" &&
ba479fd2
NN
1642 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1643echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1644 { (exit 1); exit 1; }; }
b61ff9c8
BS
1645ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1646 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1647echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
ba479fd2
NN
1648 { (exit 1); exit 1; }; }
1649
1650fi
b61ff9c8
BS
1651echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1652echo "${ECHO_T}$ac_cv_build" >&6
ba479fd2 1653build=$ac_cv_build
b61ff9c8
BS
1654build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1655build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1656build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1657
1658
1659echo "$as_me:$LINENO: checking host system type" >&5
1660echo $ECHO_N "checking host system type... $ECHO_C" >&6
ba479fd2
NN
1661if test "${ac_cv_host+set}" = set; then
1662 echo $ECHO_N "(cached) $ECHO_C" >&6
1663else
b61ff9c8
BS
1664 ac_cv_host_alias=$host_alias
1665test -z "$ac_cv_host_alias" &&
1666 ac_cv_host_alias=$ac_cv_build_alias
1667ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1668 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1669echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
ba479fd2
NN
1670 { (exit 1); exit 1; }; }
1671
1672fi
b61ff9c8
BS
1673echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1674echo "${ECHO_T}$ac_cv_host" >&6
ba479fd2 1675host=$ac_cv_host
b61ff9c8
BS
1676host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1677host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1678host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1679
1680
1681echo "$as_me:$LINENO: checking target system type" >&5
1682echo $ECHO_N "checking target system type... $ECHO_C" >&6
ba479fd2
NN
1683if test "${ac_cv_target+set}" = set; then
1684 echo $ECHO_N "(cached) $ECHO_C" >&6
1685else
b61ff9c8
BS
1686 ac_cv_target_alias=$target_alias
1687test "x$ac_cv_target_alias" = "x" &&
1688 ac_cv_target_alias=$ac_cv_host_alias
1689ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1690 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1691echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
ba479fd2
NN
1692 { (exit 1); exit 1; }; }
1693
1694fi
b61ff9c8
BS
1695echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1696echo "${ECHO_T}$ac_cv_target" >&6
ba479fd2 1697target=$ac_cv_target
b61ff9c8
BS
1698target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1699target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1700target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba479fd2
NN
1701
1702
1703# The aliases save the names the user supplied, while $host etc.
1704# will get canonicalized.
1705test -n "$target_alias" &&
1706 test "$program_prefix$program_suffix$program_transform_name" = \
1707 NONENONEs,x,x, &&
1708 program_prefix=${target_alias}-
1709
1710# Determine the noncanonical target name, for directory use.
18fc9bd4
RG
1711 case ${build_alias} in
1712 "") build_noncanonical=${build} ;;
1713 *) build_noncanonical=${build_alias} ;;
1714esac
1715
1716 case ${host_alias} in
1717 "") host_noncanonical=${build_noncanonical} ;;
1718 *) host_noncanonical=${host_alias} ;;
1719esac
1720
1721 case ${target_alias} in
1722 "") target_noncanonical=${host_noncanonical} ;;
1723 *) target_noncanonical=${target_alias} ;;
1724esac
1725
1726
1727
8f1529e6
L
1728
1729# Determine the target- and build-specific subdirectories
57255173
PB
1730
1731# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
1732# have matching libraries, they should use host libraries: Makefile.tpl
1733# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
1734# However, they still use the build modules, because the corresponding
1735# host modules (e.g. bison) are only built for the host when bootstrap
1736# finishes. So:
1737# - build_subdir is where we find build modules, and never changes.
1738# - build_libsubdir is where we find build libraries, and can be overridden.
1739
1740# Prefix 'build-' so this never conflicts with target_subdir.
18fc9bd4 1741build_subdir="build-${build_noncanonical}"
1546bb64 1742
b61ff9c8 1743# Check whether --with-build-libsubdir or --without-build-libsubdir was given.
1546bb64 1744if test "${with_build_libsubdir+set}" = set; then
b61ff9c8
BS
1745 withval="$with_build_libsubdir"
1746 build_libsubdir="$withval"
1546bb64
PB
1747else
1748 build_libsubdir="$build_subdir"
b61ff9c8 1749fi;
18fc9bd4
RG
1750# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1751if ( test $srcdir = . && test -d gcc ) \
1752 || test -d $srcdir/../host-${host_noncanonical}; then
1753 host_subdir="host-${host_noncanonical}"
1754else
1755 host_subdir=.
1756fi
1757# No prefix.
1758target_subdir=${target_noncanonical}
1759
73458fb7 1760
093e61a6 1761# Set program_transform_name
13c22933 1762test "$program_prefix" != NONE &&
b61ff9c8 1763 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1764# Use a double $ so make ignores it.
1765test "$program_suffix" != NONE &&
b61ff9c8 1766 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
ba479fd2
NN
1767# Double any \ or $. echo might interpret backslashes.
1768# By default was `s,x,x', remove it if useless.
1769cat <<\_ACEOF >conftest.sed
1770s/[\\$]/&&/g;s/;s,x,x,$//
1771_ACEOF
1772program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
b61ff9c8 1773rm conftest.sed
13c22933
JJ
1774
1775
34a86c2b
NN
1776# Check for bogus environment variables.
1777# Test if LIBRARY_PATH contains the notation for the current directory
1778# since this would lead to problems installing/building glibc.
1779# LIBRARY_PATH contains the current directory if one of the following
1780# is true:
1781# - one of the terminals (":" and ";") is the first or last sign
1782# - two terminals occur directly after each other
1783# - the path contains an element with a dot in it
b61ff9c8
BS
1784echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1785echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1786case ${LIBRARY_PATH} in
1787 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1788 library_path_setting="contains current directory"
1789 ;;
1790 *)
1791 library_path_setting="ok"
1792 ;;
1793esac
b61ff9c8
BS
1794echo "$as_me:$LINENO: result: $library_path_setting" >&5
1795echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1796if test "$library_path_setting" != "ok"; then
ba479fd2 1797{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1798*** LIBRARY_PATH shouldn't contain the current directory when
1799*** building gcc. Please change the environment variable
ba479fd2
NN
1800*** and run configure again." >&5
1801echo "$as_me: error:
1802*** LIBRARY_PATH shouldn't contain the current directory when
1803*** building gcc. Please change the environment variable
1804*** and run configure again." >&2;}
1805 { (exit 1); exit 1; }; }
e9a25f70
JL
1806fi
1807
34a86c2b
NN
1808# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1809# since this would lead to problems installing/building glibc.
1810# GCC_EXEC_PREFIX contains the current directory if one of the following
1811# is true:
1812# - one of the terminals (":" and ";") is the first or last sign
1813# - two terminals occur directly after each other
1814# - the path contains an element with a dot in it
b61ff9c8
BS
1815echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1816echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1817case ${GCC_EXEC_PREFIX} in
1818 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1819 gcc_exec_prefix_setting="contains current directory"
1820 ;;
1821 *)
1822 gcc_exec_prefix_setting="ok"
1823 ;;
1824esac
b61ff9c8
BS
1825echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1826echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1827if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1828{ { echo "$as_me:$LINENO: error:
1829*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1830*** building gcc. Please change the environment variable
1831*** and run configure again." >&5
1832echo "$as_me: error:
cafe096b
EC
1833*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1834*** building gcc. Please change the environment variable
ba479fd2
NN
1835*** and run configure again." >&2;}
1836 { (exit 1); exit 1; }; }
34a86c2b
NN
1837fi
1838
1839# -----------
1840# Directories
1841# -----------
1842
1843# Specify the local prefix
1844local_prefix=
ba479fd2 1845
b61ff9c8 1846# Check whether --with-local-prefix or --without-local-prefix was given.
34a86c2b 1847if test "${with_local_prefix+set}" = set; then
b61ff9c8
BS
1848 withval="$with_local_prefix"
1849 case "${withval}" in
ba479fd2
NN
1850yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1851echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1852 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1853no) ;;
1854*) local_prefix=$with_local_prefix ;;
1855esac
b61ff9c8 1856fi;
34a86c2b
NN
1857
1858# Default local prefix if it is empty
1859if test x$local_prefix = x; then
1860 local_prefix=/usr/local
1861fi
1862
1863# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1864# passed in by the toplevel make and thus we'd get different behavior
1865# depending on where we built the sources.
1866gcc_gxx_include_dir=
1867# Specify the g++ header file directory
ba479fd2 1868
b61ff9c8 1869# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
34a86c2b 1870if test "${with_gxx_include_dir+set}" = set; then
b61ff9c8
BS
1871 withval="$with_gxx_include_dir"
1872 case "${withval}" in
ba479fd2
NN
1873yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1874echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1875 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1876no) ;;
1877*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1878esac
b61ff9c8 1879fi;
34a86c2b 1880
0f57bf40 1881# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
34a86c2b
NN
1882if test x${gcc_gxx_include_dir} = x; then
1883 if test x${enable_version_specific_runtime_libs} = xyes; then
1884 gcc_gxx_include_dir='${libsubdir}/include/c++'
1885 else
0f57bf40
MM
1886 libstdcxx_incdir='include/c++/$(version)'
1887 if test x$host != x$target; then
1888 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
1889 fi
15c723f3 1890 gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
34a86c2b
NN
1891 fi
1892fi
1893
ba479fd2 1894
b61ff9c8 1895# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
34a86c2b 1896if test "${with_cpp_install_dir+set}" = set; then
b61ff9c8
BS
1897 withval="$with_cpp_install_dir"
1898 if test x$withval = xyes; then
ba479fd2
NN
1899 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1900echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1901 { (exit 1); exit 1; }; }
34a86c2b
NN
1902elif test x$withval != xno; then
1903 cpp_install_dir=$withval
1904fi
b61ff9c8 1905fi;
34a86c2b 1906
51b9ff45 1907# We would like to our source tree to be readonly. However when releases or
ba479fd2 1908# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1909# various formats of manuals need to be included along with the rest of the
ba479fd2 1910# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1911# just that.
1912
b61ff9c8
BS
1913echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1914echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1915 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45 1916if test "${enable_generated_files_in_srcdir+set}" = set; then
b61ff9c8
BS
1917 enableval="$enable_generated_files_in_srcdir"
1918 generated_files_in_srcdir=$enableval
51b9ff45 1919else
03787dfd 1920 generated_files_in_srcdir=no
b61ff9c8 1921fi;
1a4b763e 1922
b61ff9c8
BS
1923echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1924echo "${ECHO_T}$generated_files_in_srcdir" >&6
03787dfd
KC
1925
1926if test "$generated_files_in_srcdir" = "yes"; then
1927 GENINSRC=''
03787dfd
KC
1928else
1929 GENINSRC='#'
03787dfd
KC
1930fi
1931
1932
34a86c2b
NN
1933# -------------------
1934# Find default linker
1935# -------------------
1936
1937# With GNU ld
ba479fd2 1938
b61ff9c8 1939# Check whether --with-gnu-ld or --without-gnu-ld was given.
34a86c2b 1940if test "${with_gnu_ld+set}" = set; then
b61ff9c8
BS
1941 withval="$with_gnu_ld"
1942 gnu_ld_flag="$with_gnu_ld"
34a86c2b
NN
1943else
1944 gnu_ld_flag=no
b61ff9c8 1945fi;
6e3f3080 1946
63cf211a 1947# With pre-defined ld
ba479fd2 1948
b61ff9c8 1949# Check whether --with-ld or --without-ld was given.
34a86c2b 1950if test "${with_ld+set}" = set; then
b61ff9c8
BS
1951 withval="$with_ld"
1952 DEFAULT_LINKER="$with_ld"
1953fi;
34a86c2b
NN
1954if test x"${DEFAULT_LINKER+set}" = x"set"; then
1955 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1956 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1957echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1958 { (exit 1); exit 1; }; }
34a86c2b
NN
1959 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1960 gnu_ld_flag=yes
1961 fi
ba479fd2
NN
1962
1963cat >>confdefs.h <<_ACEOF
34a86c2b 1964#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1965_ACEOF
34a86c2b
NN
1966
1967fi
1968
2091ff66
NF
1969gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
1970
1971cat >>confdefs.h <<_ACEOF
1972#define HAVE_GNU_LD $gnu_ld
1973_ACEOF
1974
1975
b61ff9c8
BS
1976echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1977echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1978if test x"${DEFAULT_LINKER+set}" = x"set"; then
1979 if test x"$gnu_ld_flag" = x"no"; then
b61ff9c8
BS
1980 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1981echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1982 else
b61ff9c8
BS
1983 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1984echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1985 fi
1986else
b61ff9c8
BS
1987 echo "$as_me:$LINENO: result: no" >&5
1988echo "${ECHO_T}no" >&6
34a86c2b
NN
1989fi
1990
d594623a
L
1991# With demangler in GNU ld
1992
b61ff9c8 1993# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
d594623a 1994if test "${with_demangler_in_ld+set}" = set; then
b61ff9c8
BS
1995 withval="$with_demangler_in_ld"
1996 demangler_in_ld="$with_demangler_in_ld"
d594623a
L
1997else
1998 demangler_in_ld=no
b61ff9c8 1999fi;
d594623a 2000
34a86c2b
NN
2001# ----------------------
2002# Find default assembler
2003# ----------------------
2004
2005# With GNU as
ba479fd2 2006
b61ff9c8 2007# Check whether --with-gnu-as or --without-gnu-as was given.
34a86c2b 2008if test "${with_gnu_as+set}" = set; then
b61ff9c8
BS
2009 withval="$with_gnu_as"
2010 gas_flag="$with_gnu_as"
34a86c2b
NN
2011else
2012 gas_flag=no
b61ff9c8 2013fi;
ab22c1fa 2014
1a4b763e 2015
b61ff9c8 2016# Check whether --with-as or --without-as was given.
34a86c2b 2017if test "${with_as+set}" = set; then
b61ff9c8
BS
2018 withval="$with_as"
2019 DEFAULT_ASSEMBLER="$with_as"
2020fi;
34a86c2b
NN
2021if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2022 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
2023 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
2024echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
2025 { (exit 1); exit 1; }; }
34a86c2b
NN
2026 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
2027 gas_flag=yes
2028 fi
ba479fd2
NN
2029
2030cat >>confdefs.h <<_ACEOF
34a86c2b 2031#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 2032_ACEOF
34a86c2b
NN
2033
2034fi
2035
dc60b775
CD
2036gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
2037
2038cat >>confdefs.h <<_ACEOF
2039#define HAVE_GNU_AS $gnu_as
2040_ACEOF
2041
2042
b61ff9c8
BS
2043echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
2044echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
2045if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2046 if test x"$gas_flag" = x"no"; then
b61ff9c8
BS
2047 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
2048echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 2049 else
b61ff9c8
BS
2050 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
2051echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
2052 fi
2053else
b61ff9c8
BS
2054 echo "$as_me:$LINENO: result: no" >&5
2055echo "${ECHO_T}no" >&6
34a86c2b
NN
2056fi
2057
2058# ---------------
2059# Find C compiler
2060# ---------------
2061
426ca3ca
RO
2062# If a non-executable a.out is present (e.g. created by GNU as above even if
2063# invoked with -v only), the IRIX 6 native ld just overwrites the existing
2064# file, even when creating an executable, so an execution test fails.
2065# Remove possible default executable files to avoid this.
2066#
2067# FIXME: This really belongs into AC_PROG_CC and can be removed once
2068# Autoconf includes it.
2069rm -f a.out a.exe b.out
2070
34a86c2b 2071# Find the native compiler
ba479fd2
NN
2072ac_ext=c
2073ac_cpp='$CPP $CPPFLAGS'
2074ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2075ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2076ac_compiler_gnu=$ac_cv_c_compiler_gnu
2077if test -n "$ac_tool_prefix"; then
2078 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2079set dummy ${ac_tool_prefix}gcc; ac_word=$2
b61ff9c8
BS
2080echo "$as_me:$LINENO: checking for $ac_word" >&5
2081echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2082if test "${ac_cv_prog_CC+set}" = set; then
2083 echo $ECHO_N "(cached) $ECHO_C" >&6
2084else
2085 if test -n "$CC"; then
2086 ac_cv_prog_CC="$CC" # Let the user override the test.
2087else
2088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2089for as_dir in $PATH
2090do
2091 IFS=$as_save_IFS
2092 test -z "$as_dir" && as_dir=.
2093 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2094 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2095 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2096 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2097 break 2
2098 fi
2099done
2100done
2101
2102fi
2103fi
2104CC=$ac_cv_prog_CC
2105if test -n "$CC"; then
b61ff9c8
BS
2106 echo "$as_me:$LINENO: result: $CC" >&5
2107echo "${ECHO_T}$CC" >&6
ba479fd2 2108else
b61ff9c8
BS
2109 echo "$as_me:$LINENO: result: no" >&5
2110echo "${ECHO_T}no" >&6
ba479fd2
NN
2111fi
2112
2113fi
2114if test -z "$ac_cv_prog_CC"; then
2115 ac_ct_CC=$CC
2116 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 2117set dummy gcc; ac_word=$2
b61ff9c8
BS
2118echo "$as_me:$LINENO: checking for $ac_word" >&5
2119echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2120if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2121 echo $ECHO_N "(cached) $ECHO_C" >&6
2122else
2123 if test -n "$ac_ct_CC"; then
2124 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2125else
2126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2127for as_dir in $PATH
2128do
2129 IFS=$as_save_IFS
2130 test -z "$as_dir" && as_dir=.
2131 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2132 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2133 ac_cv_prog_ac_ct_CC="gcc"
2134 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2135 break 2
2136 fi
2137done
2138done
2139
2140fi
2141fi
2142ac_ct_CC=$ac_cv_prog_ac_ct_CC
2143if test -n "$ac_ct_CC"; then
b61ff9c8
BS
2144 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2145echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 2146else
b61ff9c8
BS
2147 echo "$as_me:$LINENO: result: no" >&5
2148echo "${ECHO_T}no" >&6
ba479fd2
NN
2149fi
2150
b61ff9c8 2151 CC=$ac_ct_CC
ba479fd2
NN
2152else
2153 CC="$ac_cv_prog_CC"
2154fi
2155
2156if test -z "$CC"; then
b61ff9c8
BS
2157 if test -n "$ac_tool_prefix"; then
2158 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
ba479fd2 2159set dummy ${ac_tool_prefix}cc; ac_word=$2
b61ff9c8
BS
2160echo "$as_me:$LINENO: checking for $ac_word" >&5
2161echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2162if test "${ac_cv_prog_CC+set}" = set; then
2163 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
2164else
2165 if test -n "$CC"; then
2166 ac_cv_prog_CC="$CC" # Let the user override the test.
2167else
ba479fd2
NN
2168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2169for as_dir in $PATH
2170do
2171 IFS=$as_save_IFS
2172 test -z "$as_dir" && as_dir=.
2173 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2174 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2175 ac_cv_prog_CC="${ac_tool_prefix}cc"
2176 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2177 break 2
2178 fi
2179done
2180done
2181
cd9e5e7c
MK
2182fi
2183fi
ba479fd2 2184CC=$ac_cv_prog_CC
cd9e5e7c 2185if test -n "$CC"; then
b61ff9c8
BS
2186 echo "$as_me:$LINENO: result: $CC" >&5
2187echo "${ECHO_T}$CC" >&6
2f41c1d6 2188else
b61ff9c8
BS
2189 echo "$as_me:$LINENO: result: no" >&5
2190echo "${ECHO_T}no" >&6
2f41c1d6
PB
2191fi
2192
b61ff9c8
BS
2193fi
2194if test -z "$ac_cv_prog_CC"; then
2195 ac_ct_CC=$CC
2196 # Extract the first word of "cc", so it can be a program name with args.
2197set dummy cc; ac_word=$2
2198echo "$as_me:$LINENO: checking for $ac_word" >&5
2199echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2200if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2201 echo $ECHO_N "(cached) $ECHO_C" >&6
2202else
2203 if test -n "$ac_ct_CC"; then
2204 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2205else
2206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2207for as_dir in $PATH
2208do
2209 IFS=$as_save_IFS
2210 test -z "$as_dir" && as_dir=.
2211 for ac_exec_ext in '' $ac_executable_extensions; do
2212 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2213 ac_cv_prog_ac_ct_CC="cc"
2214 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2215 break 2
1a4b763e 2216 fi
b61ff9c8
BS
2217done
2218done
2219
2220fi
2221fi
2222ac_ct_CC=$ac_cv_prog_ac_ct_CC
2223if test -n "$ac_ct_CC"; then
2224 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2225echo "${ECHO_T}$ac_ct_CC" >&6
2226else
2227 echo "$as_me:$LINENO: result: no" >&5
2228echo "${ECHO_T}no" >&6
2229fi
2230
2231 CC=$ac_ct_CC
2232else
2233 CC="$ac_cv_prog_CC"
2234fi
2235
ba479fd2 2236fi
6e3f3080
NN
2237if test -z "$CC"; then
2238 # Extract the first word of "cc", so it can be a program name with args.
2239set dummy cc; ac_word=$2
b61ff9c8
BS
2240echo "$as_me:$LINENO: checking for $ac_word" >&5
2241echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2242if test "${ac_cv_prog_CC+set}" = set; then
2243 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2244else
2245 if test -n "$CC"; then
2246 ac_cv_prog_CC="$CC" # Let the user override the test.
2247else
2248 ac_prog_rejected=no
ba479fd2
NN
2249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2250for as_dir in $PATH
2251do
2252 IFS=$as_save_IFS
2253 test -z "$as_dir" && as_dir=.
2254 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2255 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2256 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2257 ac_prog_rejected=yes
2258 continue
2259 fi
2260 ac_cv_prog_CC="cc"
2261 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2262 break 2
2263 fi
2264done
2265done
2266
6e3f3080
NN
2267if test $ac_prog_rejected = yes; then
2268 # We found a bogon in the path, so make sure we never use it.
2269 set dummy $ac_cv_prog_CC
2270 shift
ba479fd2 2271 if test $# != 0; then
6e3f3080
NN
2272 # We chose a different compiler from the bogus one.
2273 # However, it has the same basename, so the bogon will be chosen
2274 # first if we set CC to just the basename; use the full file name.
2275 shift
ba479fd2 2276 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2277 fi
6e3f3080
NN
2278fi
2279fi
2280fi
ba479fd2 2281CC=$ac_cv_prog_CC
6e3f3080 2282if test -n "$CC"; then
b61ff9c8
BS
2283 echo "$as_me:$LINENO: result: $CC" >&5
2284echo "${ECHO_T}$CC" >&6
e9a25f70 2285else
b61ff9c8
BS
2286 echo "$as_me:$LINENO: result: no" >&5
2287echo "${ECHO_T}no" >&6
e9a25f70 2288fi
6e3f3080 2289
ba479fd2
NN
2290fi
2291if test -z "$CC"; then
2292 if test -n "$ac_tool_prefix"; then
b61ff9c8 2293 for ac_prog in cl
ba479fd2
NN
2294 do
2295 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2296set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b61ff9c8
BS
2297echo "$as_me:$LINENO: checking for $ac_word" >&5
2298echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2299if test "${ac_cv_prog_CC+set}" = set; then
2300 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2301else
6e3f3080
NN
2302 if test -n "$CC"; then
2303 ac_cv_prog_CC="$CC" # Let the user override the test.
2304else
ba479fd2
NN
2305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2306for as_dir in $PATH
2307do
2308 IFS=$as_save_IFS
2309 test -z "$as_dir" && as_dir=.
2310 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2311 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2312 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2313 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2314 break 2
2315 fi
2316done
2317done
2318
093e61a6 2319fi
6e3f3080 2320fi
ba479fd2 2321CC=$ac_cv_prog_CC
6e3f3080 2322if test -n "$CC"; then
b61ff9c8
BS
2323 echo "$as_me:$LINENO: result: $CC" >&5
2324echo "${ECHO_T}$CC" >&6
6e3f3080 2325else
b61ff9c8
BS
2326 echo "$as_me:$LINENO: result: no" >&5
2327echo "${ECHO_T}no" >&6
093e61a6 2328fi
cafe096b 2329
ba479fd2
NN
2330 test -n "$CC" && break
2331 done
2332fi
2333if test -z "$CC"; then
2334 ac_ct_CC=$CC
b61ff9c8 2335 for ac_prog in cl
ba479fd2
NN
2336do
2337 # Extract the first word of "$ac_prog", so it can be a program name with args.
2338set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
2339echo "$as_me:$LINENO: checking for $ac_word" >&5
2340echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2341if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2342 echo $ECHO_N "(cached) $ECHO_C" >&6
2343else
2344 if test -n "$ac_ct_CC"; then
2345 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2346else
2347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2348for as_dir in $PATH
2349do
2350 IFS=$as_save_IFS
2351 test -z "$as_dir" && as_dir=.
2352 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2353 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2354 ac_cv_prog_ac_ct_CC="$ac_prog"
2355 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2356 break 2
2357 fi
2358done
2359done
6e3f3080 2360
ba479fd2
NN
2361fi
2362fi
2363ac_ct_CC=$ac_cv_prog_ac_ct_CC
2364if test -n "$ac_ct_CC"; then
b61ff9c8
BS
2365 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2366echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 2367else
b61ff9c8
BS
2368 echo "$as_me:$LINENO: result: no" >&5
2369echo "${ECHO_T}no" >&6
ba479fd2 2370fi
6e3f3080 2371
ba479fd2
NN
2372 test -n "$ac_ct_CC" && break
2373done
63cf211a 2374
b61ff9c8 2375 CC=$ac_ct_CC
ba479fd2
NN
2376fi
2377
2378fi
2379
2380
18c04407
RW
2381test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2382echo "$as_me: error: in \`$ac_pwd':" >&2;}
2383{ { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
ba479fd2
NN
2384See \`config.log' for more details." >&5
2385echo "$as_me: error: no acceptable C compiler found in \$PATH
2386See \`config.log' for more details." >&2;}
18c04407 2387 { (exit 1); exit 1; }; }; }
ba479fd2
NN
2388
2389# Provide some information about the compiler.
b61ff9c8
BS
2390echo "$as_me:$LINENO:" \
2391 "checking for C compiler version" >&5
ba479fd2 2392ac_compiler=`set X $ac_compile; echo $2`
b61ff9c8
BS
2393{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2394 (eval $ac_compiler --version </dev/null >&5) 2>&5
ba479fd2
NN
2395 ac_status=$?
2396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397 (exit $ac_status); }
b61ff9c8
BS
2398{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2399 (eval $ac_compiler -v </dev/null >&5) 2>&5
ba479fd2
NN
2400 ac_status=$?
2401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2402 (exit $ac_status); }
b61ff9c8
BS
2403{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2404 (eval $ac_compiler -V </dev/null >&5) 2>&5
ba479fd2
NN
2405 ac_status=$?
2406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2407 (exit $ac_status); }
2408
2409cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2410/* confdefs.h. */
2411_ACEOF
2412cat confdefs.h >>conftest.$ac_ext
2413cat >>conftest.$ac_ext <<_ACEOF
2414/* end confdefs.h. */
2415
2416int
2417main ()
2418{
63cf211a 2419
ba479fd2
NN
2420 ;
2421 return 0;
2422}
2423_ACEOF
2424ac_clean_files_save=$ac_clean_files
2425ac_clean_files="$ac_clean_files a.out a.exe b.out"
2426# Try to create an executable without -o first, disregard a.out.
2427# It will help us diagnose broken compilers, and finding out an intuition
2428# of exeext.
b61ff9c8
BS
2429echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2430echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2 2431ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
b61ff9c8
BS
2432if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2433 (eval $ac_link_default) 2>&5
ba479fd2
NN
2434 ac_status=$?
2435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2436 (exit $ac_status); }; then
b61ff9c8
BS
2437 # Find the output, starting from the most likely. This scheme is
2438# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2439# resort.
2440
2441# Be careful to initialize this variable, since it used to be cached.
2442# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2443ac_cv_exeext=
2444# b.out is created by i960 compilers.
2445for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
ba479fd2
NN
2446do
2447 test -f "$ac_file" || continue
2448 case $ac_file in
b61ff9c8
BS
2449 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2450 ;;
2451 conftest.$ac_ext )
2452 # This is the source file.
86da66b5 2453 ;;
ba479fd2 2454 [ab].out )
86da66b5
HPN
2455 # We found the default executable, but exeext='' is most
2456 # certainly right.
2457 break;;
ba479fd2 2458 *.* )
b61ff9c8
BS
2459 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2460 # FIXME: I believe we export ac_cv_exeext for Libtool,
2461 # but it would be cool to find out if it's true. Does anybody
2462 # maintain Libtool? --akim.
2463 export ac_cv_exeext
86da66b5 2464 break;;
ba479fd2 2465 * )
86da66b5 2466 break;;
ba479fd2
NN
2467 esac
2468done
2469else
2470 echo "$as_me: failed program was:" >&5
2471sed 's/^/| /' conftest.$ac_ext >&5
2472
18c04407
RW
2473{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2474echo "$as_me: error: in \`$ac_pwd':" >&2;}
ba479fd2
NN
2475{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2476See \`config.log' for more details." >&5
2477echo "$as_me: error: C compiler cannot create executables
2478See \`config.log' for more details." >&2;}
18c04407 2479 { (exit 77); exit 77; }; }; }
ba479fd2
NN
2480fi
2481
2482ac_exeext=$ac_cv_exeext
b61ff9c8
BS
2483echo "$as_me:$LINENO: result: $ac_file" >&5
2484echo "${ECHO_T}$ac_file" >&6
ba479fd2 2485
b61ff9c8 2486# Check the compiler produces executables we can run. If not, either
ba479fd2 2487# the compiler is broken, or we cross compile.
b61ff9c8
BS
2488echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2489echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
ba479fd2
NN
2490# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2491# If not cross compiling, check that we can run a simple program.
2492if test "$cross_compiling" != yes; then
2493 if { ac_try='./$ac_file'
b61ff9c8
BS
2494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2495 (eval $ac_try) 2>&5
ba479fd2
NN
2496 ac_status=$?
2497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2498 (exit $ac_status); }; }; then
2499 cross_compiling=no
6e3f3080 2500 else
ba479fd2
NN
2501 if test "$cross_compiling" = maybe; then
2502 cross_compiling=yes
2503 else
18c04407
RW
2504 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2505echo "$as_me: error: in \`$ac_pwd':" >&2;}
2506{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
ba479fd2
NN
2507If you meant to cross compile, use \`--host'.
2508See \`config.log' for more details." >&5
2509echo "$as_me: error: cannot run C compiled programs.
2510If you meant to cross compile, use \`--host'.
2511See \`config.log' for more details." >&2;}
18c04407 2512 { (exit 1); exit 1; }; }; }
ba479fd2 2513 fi
6e3f3080
NN
2514 fi
2515fi
b61ff9c8
BS
2516echo "$as_me:$LINENO: result: yes" >&5
2517echo "${ECHO_T}yes" >&6
ba479fd2
NN
2518
2519rm -f a.out a.exe conftest$ac_cv_exeext b.out
2520ac_clean_files=$ac_clean_files_save
b61ff9c8 2521# Check the compiler produces executables we can run. If not, either
ba479fd2 2522# the compiler is broken, or we cross compile.
b61ff9c8
BS
2523echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2524echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2525echo "$as_me:$LINENO: result: $cross_compiling" >&5
2526echo "${ECHO_T}$cross_compiling" >&6
2527
2528echo "$as_me:$LINENO: checking for suffix of executables" >&5
2529echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2530if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2531 (eval $ac_link) 2>&5
ba479fd2
NN
2532 ac_status=$?
2533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2534 (exit $ac_status); }; then
2535 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2536# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2537# work properly (i.e., refer to `conftest.exe'), while it won't with
2538# `rm'.
2539for ac_file in conftest.exe conftest conftest.*; do
2540 test -f "$ac_file" || continue
2541 case $ac_file in
b61ff9c8 2542 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
ba479fd2 2543 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b61ff9c8 2544 export ac_cv_exeext
86da66b5 2545 break;;
ba479fd2
NN
2546 * ) break;;
2547 esac
2548done
e9a25f70 2549else
18c04407
RW
2550 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2551echo "$as_me: error: in \`$ac_pwd':" >&2;}
2552{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
ba479fd2
NN
2553See \`config.log' for more details." >&5
2554echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2555See \`config.log' for more details." >&2;}
18c04407 2556 { (exit 1); exit 1; }; }; }
ba479fd2
NN
2557fi
2558
2559rm -f conftest$ac_cv_exeext
b61ff9c8
BS
2560echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2561echo "${ECHO_T}$ac_cv_exeext" >&6
ba479fd2
NN
2562
2563rm -f conftest.$ac_ext
2564EXEEXT=$ac_cv_exeext
2565ac_exeext=$EXEEXT
b61ff9c8
BS
2566echo "$as_me:$LINENO: checking for suffix of object files" >&5
2567echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
ba479fd2
NN
2568if test "${ac_cv_objext+set}" = set; then
2569 echo $ECHO_N "(cached) $ECHO_C" >&6
2570else
2571 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2572/* confdefs.h. */
2573_ACEOF
2574cat confdefs.h >>conftest.$ac_ext
2575cat >>conftest.$ac_ext <<_ACEOF
2576/* end confdefs.h. */
2577
2578int
2579main ()
2580{
6e3f3080 2581
ba479fd2
NN
2582 ;
2583 return 0;
2584}
2585_ACEOF
2586rm -f conftest.o conftest.obj
b61ff9c8
BS
2587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2588 (eval $ac_compile) 2>&5
ba479fd2
NN
2589 ac_status=$?
2590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2591 (exit $ac_status); }; then
b61ff9c8 2592 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
ba479fd2 2593 case $ac_file in
b61ff9c8 2594 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
ba479fd2
NN
2595 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2596 break;;
2597 esac
2598done
63cf211a 2599else
ba479fd2
NN
2600 echo "$as_me: failed program was:" >&5
2601sed 's/^/| /' conftest.$ac_ext >&5
2602
18c04407
RW
2603{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2604echo "$as_me: error: in \`$ac_pwd':" >&2;}
ba479fd2
NN
2605{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2606See \`config.log' for more details." >&5
2607echo "$as_me: error: cannot compute suffix of object files: cannot compile
2608See \`config.log' for more details." >&2;}
18c04407 2609 { (exit 1); exit 1; }; }; }
ba479fd2
NN
2610fi
2611
2612rm -f conftest.$ac_cv_objext conftest.$ac_ext
2613fi
b61ff9c8
BS
2614echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2615echo "${ECHO_T}$ac_cv_objext" >&6
ba479fd2
NN
2616OBJEXT=$ac_cv_objext
2617ac_objext=$OBJEXT
b61ff9c8
BS
2618echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2619echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
ba479fd2
NN
2620if test "${ac_cv_c_compiler_gnu+set}" = set; then
2621 echo $ECHO_N "(cached) $ECHO_C" >&6
2622else
2623 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2624/* confdefs.h. */
2625_ACEOF
2626cat confdefs.h >>conftest.$ac_ext
2627cat >>conftest.$ac_ext <<_ACEOF
2628/* end confdefs.h. */
2629
2630int
2631main ()
2632{
2633#ifndef __GNUC__
2634 choke me
2635#endif
6e3f3080 2636
ba479fd2
NN
2637 ;
2638 return 0;
2639}
2640_ACEOF
2641rm -f conftest.$ac_objext
b61ff9c8
BS
2642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2643 (eval $ac_compile) 2>conftest.er1
ba479fd2 2644 ac_status=$?
86da66b5
HPN
2645 grep -v '^ *+' conftest.er1 >conftest.err
2646 rm -f conftest.er1
2647 cat conftest.err >&5
ba479fd2 2648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2649 (exit $ac_status); } &&
2650 { ac_try='test -z "$ac_c_werror_flag"
2651 || test ! -s conftest.err'
2652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2653 (eval $ac_try) 2>&5
2654 ac_status=$?
2655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2656 (exit $ac_status); }; } &&
2657 { ac_try='test -s conftest.$ac_objext'
2658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2659 (eval $ac_try) 2>&5
2660 ac_status=$?
2661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2662 (exit $ac_status); }; }; then
ba479fd2
NN
2663 ac_compiler_gnu=yes
2664else
2665 echo "$as_me: failed program was:" >&5
2666sed 's/^/| /' conftest.$ac_ext >&5
2667
b61ff9c8 2668ac_compiler_gnu=no
ba479fd2 2669fi
b61ff9c8 2670rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2671ac_cv_c_compiler_gnu=$ac_compiler_gnu
2672
2673fi
b61ff9c8
BS
2674echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2675echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
ba479fd2
NN
2676GCC=`test $ac_compiler_gnu = yes && echo yes`
2677ac_test_CFLAGS=${CFLAGS+set}
2678ac_save_CFLAGS=$CFLAGS
b61ff9c8
BS
2679CFLAGS="-g"
2680echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2681echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
ba479fd2
NN
2682if test "${ac_cv_prog_cc_g+set}" = set; then
2683 echo $ECHO_N "(cached) $ECHO_C" >&6
2684else
b61ff9c8 2685 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2686/* confdefs.h. */
2687_ACEOF
2688cat confdefs.h >>conftest.$ac_ext
2689cat >>conftest.$ac_ext <<_ACEOF
2690/* end confdefs.h. */
2691
2692int
2693main ()
2694{
2695
2696 ;
2697 return 0;
2698}
2699_ACEOF
2700rm -f conftest.$ac_objext
b61ff9c8
BS
2701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2702 (eval $ac_compile) 2>conftest.er1
ba479fd2 2703 ac_status=$?
86da66b5
HPN
2704 grep -v '^ *+' conftest.er1 >conftest.err
2705 rm -f conftest.er1
2706 cat conftest.err >&5
ba479fd2 2707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2708 (exit $ac_status); } &&
2709 { ac_try='test -z "$ac_c_werror_flag"
2710 || test ! -s conftest.err'
2711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2712 (eval $ac_try) 2>&5
2713 ac_status=$?
2714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2715 (exit $ac_status); }; } &&
2716 { ac_try='test -s conftest.$ac_objext'
2717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2718 (eval $ac_try) 2>&5
2719 ac_status=$?
2720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2721 (exit $ac_status); }; }; then
1a4b763e
BS
2722 ac_cv_prog_cc_g=yes
2723else
2724 echo "$as_me: failed program was:" >&5
2725sed 's/^/| /' conftest.$ac_ext >&5
2726
b61ff9c8
BS
2727ac_cv_prog_cc_g=no
2728fi
2729rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2730fi
2731echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2732echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2733if test "$ac_test_CFLAGS" = set; then
2734 CFLAGS=$ac_save_CFLAGS
2735elif test $ac_cv_prog_cc_g = yes; then
2736 if test "$GCC" = yes; then
2737 CFLAGS="-g -O2"
2738 else
2739 CFLAGS="-g"
2740 fi
2741else
2742 if test "$GCC" = yes; then
2743 CFLAGS="-O2"
2744 else
2745 CFLAGS=
2746 fi
2747fi
2748echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2749echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2750if test "${ac_cv_prog_cc_stdc+set}" = set; then
2751 echo $ECHO_N "(cached) $ECHO_C" >&6
2752else
2753 ac_cv_prog_cc_stdc=no
2754ac_save_CC=$CC
2755cat >conftest.$ac_ext <<_ACEOF
1a4b763e
BS
2756/* confdefs.h. */
2757_ACEOF
2758cat confdefs.h >>conftest.$ac_ext
2759cat >>conftest.$ac_ext <<_ACEOF
2760/* end confdefs.h. */
b61ff9c8
BS
2761#include <stdarg.h>
2762#include <stdio.h>
2763#include <sys/types.h>
2764#include <sys/stat.h>
2765/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2766struct buf { int x; };
2767FILE * (*rcsopen) (struct buf *, struct stat *, int);
2768static char *e (p, i)
2769 char **p;
2770 int i;
1a4b763e 2771{
b61ff9c8 2772 return p[i];
1a4b763e 2773}
b61ff9c8
BS
2774static char *f (char * (*g) (char **, int), char **p, ...)
2775{
2776 char *s;
2777 va_list v;
2778 va_start (v,p);
2779 s = g (p, va_arg (v,int));
2780 va_end (v);
2781 return s;
2782}
2783
2784/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2785 function prototypes and stuff, but not '\xHH' hex character constants.
2786 These don't provoke an error unfortunately, instead are silently treated
2787 as 'x'. The following induces an error, until -std1 is added to get
2788 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2789 array size at least. It's necessary to write '\x00'==0 to get something
2790 that's true only with -std1. */
2791int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2792
2793int test (int i, double x);
2794struct s1 {int (*f) (int a);};
2795struct s2 {int (*f) (double a);};
2796int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2797int argc;
2798char **argv;
2799int
2800main ()
2801{
2802return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2803 ;
2804 return 0;
2805}
2806_ACEOF
2807# Don't try gcc -ansi; that turns off useful extensions and
2808# breaks some systems' header files.
2809# AIX -qlanglvl=ansi
2810# Ultrix and OSF/1 -std1
2811# HP-UX 10.20 and later -Ae
2812# HP-UX older versions -Aa -D_HPUX_SOURCE
2813# SVR4 -Xc -D__EXTENSIONS__
2814for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2815do
2816 CC="$ac_save_CC $ac_arg"
2817 rm -f conftest.$ac_objext
2818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2819 (eval $ac_compile) 2>conftest.er1
2820 ac_status=$?
1a4b763e
BS
2821 grep -v '^ *+' conftest.er1 >conftest.err
2822 rm -f conftest.er1
2823 cat conftest.err >&5
2f41c1d6 2824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2825 (exit $ac_status); } &&
2826 { ac_try='test -z "$ac_c_werror_flag"
2827 || test ! -s conftest.err'
2828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2829 (eval $ac_try) 2>&5
2830 ac_status=$?
2831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2832 (exit $ac_status); }; } &&
2833 { ac_try='test -s conftest.$ac_objext'
2834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2835 (eval $ac_try) 2>&5
2836 ac_status=$?
2837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2838 (exit $ac_status); }; }; then
2839 ac_cv_prog_cc_stdc=$ac_arg
2840break
1a4b763e
BS
2841else
2842 echo "$as_me: failed program was:" >&5
2843sed 's/^/| /' conftest.$ac_ext >&5
2844
b61ff9c8
BS
2845fi
2846rm -f conftest.err conftest.$ac_objext
2847done
2848rm -f conftest.$ac_ext conftest.$ac_objext
2849CC=$ac_save_CC
2850
2851fi
2852
2853case "x$ac_cv_prog_cc_stdc" in
2854 x|xno)
2855 echo "$as_me:$LINENO: result: none needed" >&5
2856echo "${ECHO_T}none needed" >&6 ;;
2857 *)
2858 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2859echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2860 CC="$CC $ac_cv_prog_cc_stdc" ;;
2861esac
2862
2863# Some people use a C++ compiler to compile C. Since we use `exit',
2864# in C++ we need to declare it. In case someone uses the same compiler
2865# for both compiling C and C++ we need to have the C++ compiler decide
2866# the declaration of exit, since it's the most demanding environment.
2867cat >conftest.$ac_ext <<_ACEOF
2868#ifndef __cplusplus
2869 choke me
2870#endif
2871_ACEOF
2872rm -f conftest.$ac_objext
2873if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2874 (eval $ac_compile) 2>conftest.er1
2875 ac_status=$?
2876 grep -v '^ *+' conftest.er1 >conftest.err
2877 rm -f conftest.er1
2878 cat conftest.err >&5
2879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2880 (exit $ac_status); } &&
2881 { ac_try='test -z "$ac_c_werror_flag"
2882 || test ! -s conftest.err'
2883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2884 (eval $ac_try) 2>&5
2885 ac_status=$?
2886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2887 (exit $ac_status); }; } &&
2888 { ac_try='test -s conftest.$ac_objext'
2889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2890 (eval $ac_try) 2>&5
2891 ac_status=$?
2892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2893 (exit $ac_status); }; }; then
2894 for ac_declaration in \
2895 '' \
2896 'extern "C" void std::exit (int) throw (); using std::exit;' \
2897 'extern "C" void std::exit (int); using std::exit;' \
2898 'extern "C" void exit (int) throw ();' \
2899 'extern "C" void exit (int);' \
2900 'void exit (int);'
2901do
2902 cat >conftest.$ac_ext <<_ACEOF
1a4b763e
BS
2903/* confdefs.h. */
2904_ACEOF
2905cat confdefs.h >>conftest.$ac_ext
2906cat >>conftest.$ac_ext <<_ACEOF
2907/* end confdefs.h. */
b61ff9c8
BS
2908$ac_declaration
2909#include <stdlib.h>
1a4b763e
BS
2910int
2911main ()
2912{
b61ff9c8 2913exit (42);
1a4b763e
BS
2914 ;
2915 return 0;
2916}
2917_ACEOF
2918rm -f conftest.$ac_objext
b61ff9c8
BS
2919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2920 (eval $ac_compile) 2>conftest.er1
2f41c1d6 2921 ac_status=$?
1a4b763e
BS
2922 grep -v '^ *+' conftest.er1 >conftest.err
2923 rm -f conftest.er1
2924 cat conftest.err >&5
2f41c1d6 2925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2926 (exit $ac_status); } &&
2927 { ac_try='test -z "$ac_c_werror_flag"
2928 || test ! -s conftest.err'
2929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2930 (eval $ac_try) 2>&5
2931 ac_status=$?
2932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2933 (exit $ac_status); }; } &&
2934 { ac_try='test -s conftest.$ac_objext'
2935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2936 (eval $ac_try) 2>&5
2937 ac_status=$?
2938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2939 (exit $ac_status); }; }; then
2940 :
ab22c1fa
CF
2941else
2942 echo "$as_me: failed program was:" >&5
2943sed 's/^/| /' conftest.$ac_ext >&5
2944
b61ff9c8 2945continue
2f41c1d6 2946fi
b61ff9c8
BS
2947rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2948 cat >conftest.$ac_ext <<_ACEOF
ab22c1fa
CF
2949/* confdefs.h. */
2950_ACEOF
2951cat confdefs.h >>conftest.$ac_ext
2952cat >>conftest.$ac_ext <<_ACEOF
2953/* end confdefs.h. */
b61ff9c8 2954$ac_declaration
2f41c1d6
PB
2955int
2956main ()
2957{
b61ff9c8 2958exit (42);
2f41c1d6
PB
2959 ;
2960 return 0;
2961}
2962_ACEOF
b61ff9c8
BS
2963rm -f conftest.$ac_objext
2964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2965 (eval $ac_compile) 2>conftest.er1
2f41c1d6 2966 ac_status=$?
ab22c1fa
CF
2967 grep -v '^ *+' conftest.er1 >conftest.err
2968 rm -f conftest.er1
2969 cat conftest.err >&5
a3bba767 2970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2971 (exit $ac_status); } &&
2972 { ac_try='test -z "$ac_c_werror_flag"
2973 || test ! -s conftest.err'
2974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2975 (eval $ac_try) 2>&5
2976 ac_status=$?
2977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2978 (exit $ac_status); }; } &&
2979 { ac_try='test -s conftest.$ac_objext'
2980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2981 (eval $ac_try) 2>&5
2982 ac_status=$?
2983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2984 (exit $ac_status); }; }; then
2985 break
ab22c1fa
CF
2986else
2987 echo "$as_me: failed program was:" >&5
2988sed 's/^/| /' conftest.$ac_ext >&5
2989
2f41c1d6 2990fi
b61ff9c8 2991rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2f41c1d6 2992done
b61ff9c8
BS
2993rm -f conftest*
2994if test -n "$ac_declaration"; then
2995 echo '#ifdef __cplusplus' >>confdefs.h
2996 echo $ac_declaration >>confdefs.h
2997 echo '#endif' >>confdefs.h
2f41c1d6 2998fi
2f41c1d6 2999
b61ff9c8
BS
3000else
3001 echo "$as_me: failed program was:" >&5
3002sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 3003
b61ff9c8
BS
3004fi
3005rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
3006ac_ext=c
3007ac_cpp='$CPP $CPPFLAGS'
3008ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3009ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3010ac_compiler_gnu=$ac_cv_c_compiler_gnu
3011
3012if test "x$CC" != xcc; then
b61ff9c8
BS
3013 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
3014echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
ba479fd2 3015else
b61ff9c8
BS
3016 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
3017echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
ba479fd2
NN
3018fi
3019set dummy $CC; ac_cc=`echo $2 |
3020 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
b61ff9c8 3021if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
ba479fd2
NN
3022 echo $ECHO_N "(cached) $ECHO_C" >&6
3023else
3024 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3025/* confdefs.h. */
3026_ACEOF
3027cat confdefs.h >>conftest.$ac_ext
3028cat >>conftest.$ac_ext <<_ACEOF
3029/* end confdefs.h. */
3030
3031int
3032main ()
3033{
3034
3035 ;
3036 return 0;
3037}
3038_ACEOF
3ec83fc2
RH
3039# Make sure it works both with $CC and with simple cc.
3040# We do the test twice because some compilers refuse to overwrite an
3041# existing .o file with -o, though they will create one.
b61ff9c8
BS
3042ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
3043if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3044 (eval $ac_try) 2>&5
ba479fd2
NN
3045 ac_status=$?
3046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3047 (exit $ac_status); } &&
b61ff9c8
BS
3048 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3049 (eval $ac_try) 2>&5
ba479fd2
NN
3050 ac_status=$?
3051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3052 (exit $ac_status); };
3ec83fc2
RH
3053then
3054 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
3055 if test "x$CC" != xcc; then
3056 # Test first that cc exists at all.
ba479fd2 3057 if { ac_try='cc -c conftest.$ac_ext >&5'
b61ff9c8
BS
3058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3059 (eval $ac_try) 2>&5
ba479fd2
NN
3060 ac_status=$?
3061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3062 (exit $ac_status); }; }; then
b61ff9c8
BS
3063 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
3064 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3065 (eval $ac_try) 2>&5
ba479fd2
NN
3066 ac_status=$?
3067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3068 (exit $ac_status); } &&
b61ff9c8
BS
3069 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3070 (eval $ac_try) 2>&5
ba479fd2
NN
3071 ac_status=$?
3072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3073 (exit $ac_status); };
3ec83fc2 3074 then
86da66b5
HPN
3075 # cc works too.
3076 :
3ec83fc2 3077 else
86da66b5
HPN
3078 # cc exists but doesn't like -o.
3079 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
3080 fi
3081 fi
3082 fi
3083else
3084 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3085fi
b61ff9c8 3086rm -f conftest*
3ec83fc2
RH
3087
3088fi
b61ff9c8
BS
3089if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
3090 echo "$as_me:$LINENO: result: yes" >&5
3091echo "${ECHO_T}yes" >&6
3ec83fc2 3092else
b61ff9c8
BS
3093 echo "$as_me:$LINENO: result: no" >&5
3094echo "${ECHO_T}no" >&6
ba479fd2
NN
3095
3096cat >>confdefs.h <<\_ACEOF
3ec83fc2 3097#define NO_MINUS_C_MINUS_O 1
ba479fd2 3098_ACEOF
3ec83fc2
RH
3099
3100fi
3101
3b620440
KC
3102# expand $ac_aux_dir to an absolute path
3103am_aux_dir=`cd $ac_aux_dir && pwd`
3104
3105# FIXME: we rely on the cache variable name because
3106# there is no other way.
3107set dummy $CC
3108ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
3109if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
3110 # Losing compiler, so override with the script.
3111 # FIXME: It is wrong to rewrite CC.
3112 # But if we don't then we get into trouble of one sort or another.
3113 # A longer-term fix would be to have automake use am__CC in this case,
3114 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3115 CC="$am_aux_dir/compile $CC"
3116fi
3117
3d4e720a
ST
3118
3119
3120
3121if test -n "$ac_tool_prefix"; then
3122 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
3123set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
3124echo "$as_me:$LINENO: checking for $ac_word" >&5
3125echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3126if test "${ac_cv_prog_GNATBIND+set}" = set; then
3127 echo $ECHO_N "(cached) $ECHO_C" >&6
3128else
3129 if test -n "$GNATBIND"; then
3130 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
3131else
3132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3133for as_dir in $PATH
3134do
3135 IFS=$as_save_IFS
3136 test -z "$as_dir" && as_dir=.
3137 for ac_exec_ext in '' $ac_executable_extensions; do
3138 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3139 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
3140 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3141 break 2
3142 fi
3143done
3144done
3145
3146fi
3147fi
3148GNATBIND=$ac_cv_prog_GNATBIND
3149if test -n "$GNATBIND"; then
3150 echo "$as_me:$LINENO: result: $GNATBIND" >&5
3151echo "${ECHO_T}$GNATBIND" >&6
3152else
3153 echo "$as_me:$LINENO: result: no" >&5
3154echo "${ECHO_T}no" >&6
3155fi
3156
3157fi
3158if test -z "$ac_cv_prog_GNATBIND"; then
3159 ac_ct_GNATBIND=$GNATBIND
3160 # Extract the first word of "gnatbind", so it can be a program name with args.
3161set dummy gnatbind; ac_word=$2
3162echo "$as_me:$LINENO: checking for $ac_word" >&5
3163echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3164if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then
3165 echo $ECHO_N "(cached) $ECHO_C" >&6
3166else
3167 if test -n "$ac_ct_GNATBIND"; then
3168 ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
3169else
3170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3171for as_dir in $PATH
3172do
3173 IFS=$as_save_IFS
3174 test -z "$as_dir" && as_dir=.
3175 for ac_exec_ext in '' $ac_executable_extensions; do
3176 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3177 ac_cv_prog_ac_ct_GNATBIND="gnatbind"
3178 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3179 break 2
3180 fi
3181done
3182done
3183
3184 test -z "$ac_cv_prog_ac_ct_GNATBIND" && ac_cv_prog_ac_ct_GNATBIND="no"
3185fi
3186fi
3187ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
3188if test -n "$ac_ct_GNATBIND"; then
3189 echo "$as_me:$LINENO: result: $ac_ct_GNATBIND" >&5
3190echo "${ECHO_T}$ac_ct_GNATBIND" >&6
3191else
3192 echo "$as_me:$LINENO: result: no" >&5
3193echo "${ECHO_T}no" >&6
3194fi
3195
3196 GNATBIND=$ac_ct_GNATBIND
3197else
3198 GNATBIND="$ac_cv_prog_GNATBIND"
3199fi
3200
3201if test -n "$ac_tool_prefix"; then
3202 # Extract the first word of "${ac_tool_prefix}gnatmake", so it can be a program name with args.
3203set dummy ${ac_tool_prefix}gnatmake; ac_word=$2
3204echo "$as_me:$LINENO: checking for $ac_word" >&5
3205echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3206if test "${ac_cv_prog_GNATMAKE+set}" = set; then
3207 echo $ECHO_N "(cached) $ECHO_C" >&6
3208else
3209 if test -n "$GNATMAKE"; then
3210 ac_cv_prog_GNATMAKE="$GNATMAKE" # Let the user override the test.
3211else
3212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3213for as_dir in $PATH
3214do
3215 IFS=$as_save_IFS
3216 test -z "$as_dir" && as_dir=.
3217 for ac_exec_ext in '' $ac_executable_extensions; do
3218 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3219 ac_cv_prog_GNATMAKE="${ac_tool_prefix}gnatmake"
3220 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3221 break 2
3222 fi
3223done
3224done
3225
3226fi
3227fi
3228GNATMAKE=$ac_cv_prog_GNATMAKE
3229if test -n "$GNATMAKE"; then
3230 echo "$as_me:$LINENO: result: $GNATMAKE" >&5
3231echo "${ECHO_T}$GNATMAKE" >&6
3232else
3233 echo "$as_me:$LINENO: result: no" >&5
3234echo "${ECHO_T}no" >&6
3235fi
3236
3237fi
3238if test -z "$ac_cv_prog_GNATMAKE"; then
3239 ac_ct_GNATMAKE=$GNATMAKE
3240 # Extract the first word of "gnatmake", so it can be a program name with args.
3241set dummy gnatmake; ac_word=$2
3242echo "$as_me:$LINENO: checking for $ac_word" >&5
3243echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3244if test "${ac_cv_prog_ac_ct_GNATMAKE+set}" = set; then
3245 echo $ECHO_N "(cached) $ECHO_C" >&6
3246else
3247 if test -n "$ac_ct_GNATMAKE"; then
3248 ac_cv_prog_ac_ct_GNATMAKE="$ac_ct_GNATMAKE" # Let the user override the test.
3249else
3250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3251for as_dir in $PATH
3252do
3253 IFS=$as_save_IFS
3254 test -z "$as_dir" && as_dir=.
3255 for ac_exec_ext in '' $ac_executable_extensions; do
3256 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3257 ac_cv_prog_ac_ct_GNATMAKE="gnatmake"
3258 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3259 break 2
3260 fi
3261done
3262done
3263
3264 test -z "$ac_cv_prog_ac_ct_GNATMAKE" && ac_cv_prog_ac_ct_GNATMAKE="no"
3265fi
3266fi
3267ac_ct_GNATMAKE=$ac_cv_prog_ac_ct_GNATMAKE
3268if test -n "$ac_ct_GNATMAKE"; then
3269 echo "$as_me:$LINENO: result: $ac_ct_GNATMAKE" >&5
3270echo "${ECHO_T}$ac_ct_GNATMAKE" >&6
3271else
3272 echo "$as_me:$LINENO: result: no" >&5
3273echo "${ECHO_T}no" >&6
3274fi
3275
3276 GNATMAKE=$ac_ct_GNATMAKE
3277else
3278 GNATMAKE="$ac_cv_prog_GNATMAKE"
3279fi
3280
3281echo "$as_me:$LINENO: checking whether compiler driver understands Ada" >&5
3282echo $ECHO_N "checking whether compiler driver understands Ada... $ECHO_C" >&6
3283if test "${acx_cv_cc_gcc_supports_ada+set}" = set; then
3284 echo $ECHO_N "(cached) $ECHO_C" >&6
3285else
3286 cat >conftest.adb <<EOF
3287procedure conftest is begin null; end conftest;
3288EOF
3289acx_cv_cc_gcc_supports_ada=no
3290# There is a bug in old released versions of GCC which causes the
3291# driver to exit successfully when the appropriate language module
3292# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
3293# Therefore we must check for the error message as well as an
3294# unsuccessful exit.
3295# Other compilers, like HP Tru64 UNIX cc, exit successfully when
3296# given a .adb file, but produce no object file. So we must check
3297# if an object file was really produced to guard against this.
3298errors=`(${CC} -I"$srcdir"/ada -c conftest.adb) 2>&1 || echo failure`
3299if test x"$errors" = x && test -f conftest.$ac_objext; then
3300 acx_cv_cc_gcc_supports_ada=yes
3301fi
3302rm -f conftest.*
3303fi
3304echo "$as_me:$LINENO: result: $acx_cv_cc_gcc_supports_ada" >&5
3305echo "${ECHO_T}$acx_cv_cc_gcc_supports_ada" >&6
3306
3307if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
3308 have_gnat=yes
3309else
3310 have_gnat=no
3311fi
3312
3313
414d23ae
HPN
3314# autoconf is lame and doesn't give us any substitution variable for this.
3315if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
3316 NO_MINUS_C_MINUS_O=yes
3317else
3318 OUTPUT_OPTION='-o $@'
3319fi
3320
3321
3322
ec6c7392
PB
3323# Remove the -O2: for historical reasons, unless bootstrapping we prefer
3324# optimizations to be activated explicitly by the toplevel.
3325case "$CC" in
3326 */prev-gcc/xgcc*) ;;
3327 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
3328esac
3329
3330
73458fb7
NN
3331# -------------------------
3332# Check C compiler features
3333# -------------------------
3334
60d26958 3335
ba479fd2
NN
3336ac_ext=c
3337ac_cpp='$CPP $CPPFLAGS'
3338ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3339ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3340ac_compiler_gnu=$ac_cv_c_compiler_gnu
b61ff9c8
BS
3341echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3342echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
3343# On Suns, sometimes $CPP names a directory.
3344if test -n "$CPP" && test -d "$CPP"; then
3345 CPP=
3346fi
3347if test -z "$CPP"; then
ba479fd2
NN
3348 if test "${ac_cv_prog_CPP+set}" = set; then
3349 echo $ECHO_N "(cached) $ECHO_C" >&6
3350else
3351 # Double quotes because CPP needs to be expanded
3352 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3353 do
3354 ac_preproc_ok=false
3355for ac_c_preproc_warn_flag in '' yes
3356do
3357 # Use a header file that comes with gcc, so configuring glibc
3358 # with a fresh cross-compiler works.
3359 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3360 # <limits.h> exists even on freestanding compilers.
84c041a1 3361 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
3362 # not just through cpp. "Syntax error" is here to catch this case.
3363 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3364/* confdefs.h. */
3365_ACEOF
3366cat confdefs.h >>conftest.$ac_ext
3367cat >>conftest.$ac_ext <<_ACEOF
3368/* end confdefs.h. */
3369#ifdef __STDC__
3370# include <limits.h>
3371#else
3372# include <assert.h>
3373#endif
86da66b5 3374 Syntax error
ba479fd2 3375_ACEOF
b61ff9c8
BS
3376if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3377 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3378 ac_status=$?
3379 grep -v '^ *+' conftest.er1 >conftest.err
3380 rm -f conftest.er1
3381 cat conftest.err >&5
3382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3383 (exit $ac_status); } >/dev/null; then
3384 if test -s conftest.err; then
3385 ac_cpp_err=$ac_c_preproc_warn_flag
3386 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3387 else
3388 ac_cpp_err=
3389 fi
3390else
3391 ac_cpp_err=yes
3392fi
3393if test -z "$ac_cpp_err"; then
093e61a6 3394 :
cafe096b 3395else
ba479fd2
NN
3396 echo "$as_me: failed program was:" >&5
3397sed 's/^/| /' conftest.$ac_ext >&5
3398
3399 # Broken: fails on valid input.
3400continue
3401fi
3402rm -f conftest.err conftest.$ac_ext
3403
b61ff9c8 3404 # OK, works on sane cases. Now check whether non-existent headers
ba479fd2
NN
3405 # can be detected and how.
3406 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3407/* confdefs.h. */
3408_ACEOF
3409cat confdefs.h >>conftest.$ac_ext
3410cat >>conftest.$ac_ext <<_ACEOF
3411/* end confdefs.h. */
3412#include <ac_nonexistent.h>
3413_ACEOF
b61ff9c8
BS
3414if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3415 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3416 ac_status=$?
3417 grep -v '^ *+' conftest.er1 >conftest.err
3418 rm -f conftest.er1
3419 cat conftest.err >&5
3420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3421 (exit $ac_status); } >/dev/null; then
3422 if test -s conftest.err; then
3423 ac_cpp_err=$ac_c_preproc_warn_flag
3424 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3425 else
3426 ac_cpp_err=
3427 fi
3428else
3429 ac_cpp_err=yes
3430fi
3431if test -z "$ac_cpp_err"; then
ba479fd2
NN
3432 # Broken: success on invalid input.
3433continue
3434else
3435 echo "$as_me: failed program was:" >&5
3436sed 's/^/| /' conftest.$ac_ext >&5
3437
3438 # Passes both tests.
3439ac_preproc_ok=:
3440break
3441fi
3442rm -f conftest.err conftest.$ac_ext
3443
3444done
3445# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3446rm -f conftest.err conftest.$ac_ext
3447if $ac_preproc_ok; then
3448 break
3449fi
3450
3451 done
3452 ac_cv_prog_CPP=$CPP
3453
3454fi
3455 CPP=$ac_cv_prog_CPP
3456else
3457 ac_cv_prog_CPP=$CPP
3458fi
b61ff9c8
BS
3459echo "$as_me:$LINENO: result: $CPP" >&5
3460echo "${ECHO_T}$CPP" >&6
ba479fd2
NN
3461ac_preproc_ok=false
3462for ac_c_preproc_warn_flag in '' yes
3463do
3464 # Use a header file that comes with gcc, so configuring glibc
3465 # with a fresh cross-compiler works.
3466 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3467 # <limits.h> exists even on freestanding compilers.
3468 # On the NeXT, cc -E runs the code through the compiler's parser,
3469 # not just through cpp. "Syntax error" is here to catch this case.
3470 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3471/* confdefs.h. */
3472_ACEOF
3473cat confdefs.h >>conftest.$ac_ext
3474cat >>conftest.$ac_ext <<_ACEOF
3475/* end confdefs.h. */
3476#ifdef __STDC__
3477# include <limits.h>
3478#else
3479# include <assert.h>
3480#endif
86da66b5 3481 Syntax error
ba479fd2 3482_ACEOF
b61ff9c8
BS
3483if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3484 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3485 ac_status=$?
3486 grep -v '^ *+' conftest.er1 >conftest.err
3487 rm -f conftest.er1
3488 cat conftest.err >&5
3489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3490 (exit $ac_status); } >/dev/null; then
3491 if test -s conftest.err; then
3492 ac_cpp_err=$ac_c_preproc_warn_flag
3493 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3494 else
3495 ac_cpp_err=
3496 fi
3497else
3498 ac_cpp_err=yes
3499fi
3500if test -z "$ac_cpp_err"; then
6e3f3080 3501 :
414d23ae 3502else
ba479fd2
NN
3503 echo "$as_me: failed program was:" >&5
3504sed 's/^/| /' conftest.$ac_ext >&5
3505
3506 # Broken: fails on valid input.
3507continue
3508fi
3509rm -f conftest.err conftest.$ac_ext
3510
b61ff9c8 3511 # OK, works on sane cases. Now check whether non-existent headers
ba479fd2
NN
3512 # can be detected and how.
3513 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3514/* confdefs.h. */
3515_ACEOF
3516cat confdefs.h >>conftest.$ac_ext
3517cat >>conftest.$ac_ext <<_ACEOF
3518/* end confdefs.h. */
3519#include <ac_nonexistent.h>
3520_ACEOF
b61ff9c8
BS
3521if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3522 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3523 ac_status=$?
3524 grep -v '^ *+' conftest.er1 >conftest.err
3525 rm -f conftest.er1
3526 cat conftest.err >&5
3527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3528 (exit $ac_status); } >/dev/null; then
3529 if test -s conftest.err; then
3530 ac_cpp_err=$ac_c_preproc_warn_flag
3531 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3532 else
3533 ac_cpp_err=
3534 fi
3535else
3536 ac_cpp_err=yes
3537fi
3538if test -z "$ac_cpp_err"; then
ba479fd2
NN
3539 # Broken: success on invalid input.
3540continue
3541else
3542 echo "$as_me: failed program was:" >&5
3543sed 's/^/| /' conftest.$ac_ext >&5
3544
3545 # Passes both tests.
3546ac_preproc_ok=:
3547break
63cf211a 3548fi
ba479fd2
NN
3549rm -f conftest.err conftest.$ac_ext
3550
3551done
3552# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3553rm -f conftest.err conftest.$ac_ext
3554if $ac_preproc_ok; then
3555 :
6e3f3080 3556else
18c04407
RW
3557 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3558echo "$as_me: error: in \`$ac_pwd':" >&2;}
3559{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
ba479fd2
NN
3560See \`config.log' for more details." >&5
3561echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3562See \`config.log' for more details." >&2;}
18c04407 3563 { (exit 1); exit 1; }; }; }
6e3f3080
NN
3564fi
3565
ba479fd2
NN
3566ac_ext=c
3567ac_cpp='$CPP $CPPFLAGS'
3568ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3569ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3570ac_compiler_gnu=$ac_cv_c_compiler_gnu
3571
b5472e1d 3572
60d26958
PB
3573echo "$as_me:$LINENO: checking for egrep" >&5
3574echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3575if test "${ac_cv_prog_egrep+set}" = set; then
3576 echo $ECHO_N "(cached) $ECHO_C" >&6
3577else
3578 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3579 then ac_cv_prog_egrep='grep -E'
3580 else ac_cv_prog_egrep='egrep'
3581 fi
3582fi
3583echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3584echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3585 EGREP=$ac_cv_prog_egrep
3586
3587
3588echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3589echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3590if test "${ac_cv_header_stdc+set}" = set; then
ba479fd2 3591 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3592else
ba479fd2 3593 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3594/* confdefs.h. */
3595_ACEOF
3596cat confdefs.h >>conftest.$ac_ext
3597cat >>conftest.$ac_ext <<_ACEOF
3598/* end confdefs.h. */
60d26958
PB
3599#include <stdlib.h>
3600#include <stdarg.h>
3601#include <string.h>
3602#include <float.h>
3603
3604int
3605main ()
3606{
414d23ae 3607
60d26958
PB
3608 ;
3609 return 0;
3610}
ba479fd2
NN
3611_ACEOF
3612rm -f conftest.$ac_objext
b61ff9c8
BS
3613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3614 (eval $ac_compile) 2>conftest.er1
ba479fd2 3615 ac_status=$?
86da66b5
HPN
3616 grep -v '^ *+' conftest.er1 >conftest.err
3617 rm -f conftest.er1
3618 cat conftest.err >&5
ba479fd2 3619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3620 (exit $ac_status); } &&
3621 { ac_try='test -z "$ac_c_werror_flag"
3622 || test ! -s conftest.err'
3623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3624 (eval $ac_try) 2>&5
3625 ac_status=$?
3626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3627 (exit $ac_status); }; } &&
3628 { ac_try='test -s conftest.$ac_objext'
3629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3630 (eval $ac_try) 2>&5
3631 ac_status=$?
3632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3633 (exit $ac_status); }; }; then
60d26958 3634 ac_cv_header_stdc=yes
414d23ae 3635else
ba479fd2
NN
3636 echo "$as_me: failed program was:" >&5
3637sed 's/^/| /' conftest.$ac_ext >&5
3638
60d26958 3639ac_cv_header_stdc=no
414d23ae 3640fi
b61ff9c8 3641rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3642
60d26958
PB
3643if test $ac_cv_header_stdc = yes; then
3644 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3645 cat >conftest.$ac_ext <<_ACEOF
3646/* confdefs.h. */
3647_ACEOF
3648cat confdefs.h >>conftest.$ac_ext
3649cat >>conftest.$ac_ext <<_ACEOF
3650/* end confdefs.h. */
3651#include <string.h>
3652
3653_ACEOF
3654if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3655 $EGREP "memchr" >/dev/null 2>&1; then
3656 :
3657else
3658 ac_cv_header_stdc=no
414d23ae 3659fi
60d26958 3660rm -f conftest*
86da66b5 3661
60d26958 3662fi
86da66b5 3663
60d26958
PB
3664if test $ac_cv_header_stdc = yes; then
3665 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3666 cat >conftest.$ac_ext <<_ACEOF
3667/* confdefs.h. */
3668_ACEOF
3669cat confdefs.h >>conftest.$ac_ext
3670cat >>conftest.$ac_ext <<_ACEOF
3671/* end confdefs.h. */
3672#include <stdlib.h>
3673
3674_ACEOF
3675if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3676 $EGREP "free" >/dev/null 2>&1; then
3677 :
3678else
3679 ac_cv_header_stdc=no
3680fi
3681rm -f conftest*
3682
3683fi
3684
3685if test $ac_cv_header_stdc = yes; then
3686 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3687 if test "$cross_compiling" = yes; then
3688 :
3689else
3690 cat >conftest.$ac_ext <<_ACEOF
3691/* confdefs.h. */
3692_ACEOF
3693cat confdefs.h >>conftest.$ac_ext
3694cat >>conftest.$ac_ext <<_ACEOF
3695/* end confdefs.h. */
3696#include <ctype.h>
3697#if ((' ' & 0x0FF) == 0x020)
3698# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3699# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3700#else
3701# define ISLOWER(c) \
3702 (('a' <= (c) && (c) <= 'i') \
3703 || ('j' <= (c) && (c) <= 'r') \
3704 || ('s' <= (c) && (c) <= 'z'))
3705# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
86da66b5 3706#endif
60d26958
PB
3707
3708#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3709int
3710main ()
3711{
3712 int i;
3713 for (i = 0; i < 256; i++)
3714 if (XOR (islower (i), ISLOWER (i))
3715 || toupper (i) != TOUPPER (i))
3716 exit(2);
3717 exit (0);
3718}
ba479fd2 3719_ACEOF
60d26958
PB
3720rm -f conftest$ac_exeext
3721if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3722 (eval $ac_link) 2>&5
3723 ac_status=$?
3724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3725 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3727 (eval $ac_try) 2>&5
3728 ac_status=$?
3729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3730 (exit $ac_status); }; }; then
3731 :
3732else
3733 echo "$as_me: program exited with status $ac_status" >&5
3734echo "$as_me: failed program was:" >&5
3735sed 's/^/| /' conftest.$ac_ext >&5
414d23ae 3736
60d26958
PB
3737( exit $ac_status )
3738ac_cv_header_stdc=no
3739fi
3740rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3741fi
3742fi
3743fi
3744echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3745echo "${ECHO_T}$ac_cv_header_stdc" >&6
3746if test $ac_cv_header_stdc = yes; then
414d23ae 3747
60d26958
PB
3748cat >>confdefs.h <<\_ACEOF
3749#define STDC_HEADERS 1
3750_ACEOF
bf3b7cd3 3751
60d26958
PB
3752fi
3753
3754# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3765 inttypes.h stdint.h unistd.h
3766do
3767as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3768echo "$as_me:$LINENO: checking for $ac_header" >&5
3769echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3770if eval "test \"\${$as_ac_Header+set}\" = set"; then
1a4b763e
BS
3771 echo $ECHO_N "(cached) $ECHO_C" >&6
3772else
60d26958
PB
3773 cat >conftest.$ac_ext <<_ACEOF
3774/* confdefs.h. */
3775_ACEOF
3776cat confdefs.h >>conftest.$ac_ext
3777cat >>conftest.$ac_ext <<_ACEOF
3778/* end confdefs.h. */
3779$ac_includes_default
3780
3781#include <$ac_header>
3782_ACEOF
3783rm -f conftest.$ac_objext
3784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3785 (eval $ac_compile) 2>conftest.er1
3786 ac_status=$?
3787 grep -v '^ *+' conftest.er1 >conftest.err
3788 rm -f conftest.er1
3789 cat conftest.err >&5
3790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3791 (exit $ac_status); } &&
3792 { ac_try='test -z "$ac_c_werror_flag"
3793 || test ! -s conftest.err'
3794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3795 (eval $ac_try) 2>&5
3796 ac_status=$?
3797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3798 (exit $ac_status); }; } &&
3799 { ac_try='test -s conftest.$ac_objext'
3800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3801 (eval $ac_try) 2>&5
3802 ac_status=$?
3803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3804 (exit $ac_status); }; }; then
3805 eval "$as_ac_Header=yes"
3806else
3807 echo "$as_me: failed program was:" >&5
3808sed 's/^/| /' conftest.$ac_ext >&5
3809
3810eval "$as_ac_Header=no"
b61ff9c8 3811fi
60d26958
PB
3812rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3813fi
3814echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3815echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3816if test `eval echo '${'$as_ac_Header'}'` = yes; then
3817 cat >>confdefs.h <<_ACEOF
3818#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3819_ACEOF
1a4b763e 3820
60d26958 3821fi
1a4b763e 3822
60d26958
PB
3823done
3824
3825
3826
3827 if test "${ac_cv_header_minix_config_h+set}" = set; then
3828 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3829echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3830if test "${ac_cv_header_minix_config_h+set}" = set; then
3831 echo $ECHO_N "(cached) $ECHO_C" >&6
3832fi
3833echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3834echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3835else
3836 # Is the header compilable?
3837echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3838echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3839cat >conftest.$ac_ext <<_ACEOF
3840/* confdefs.h. */
3841_ACEOF
3842cat confdefs.h >>conftest.$ac_ext
3843cat >>conftest.$ac_ext <<_ACEOF
3844/* end confdefs.h. */
3845$ac_includes_default
3846#include <minix/config.h>
3847_ACEOF
3848rm -f conftest.$ac_objext
3849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3850 (eval $ac_compile) 2>conftest.er1
3851 ac_status=$?
3852 grep -v '^ *+' conftest.er1 >conftest.err
3853 rm -f conftest.er1
3854 cat conftest.err >&5
3855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3856 (exit $ac_status); } &&
3857 { ac_try='test -z "$ac_c_werror_flag"
3858 || test ! -s conftest.err'
3859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3860 (eval $ac_try) 2>&5
3861 ac_status=$?
3862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3863 (exit $ac_status); }; } &&
3864 { ac_try='test -s conftest.$ac_objext'
3865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3866 (eval $ac_try) 2>&5
3867 ac_status=$?
3868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3869 (exit $ac_status); }; }; then
3870 ac_header_compiler=yes
3871else
3872 echo "$as_me: failed program was:" >&5
3873sed 's/^/| /' conftest.$ac_ext >&5
3874
3875ac_header_compiler=no
3876fi
3877rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3878echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3879echo "${ECHO_T}$ac_header_compiler" >&6
3880
3881# Is the header present?
3882echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3883echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3884cat >conftest.$ac_ext <<_ACEOF
3885/* confdefs.h. */
3886_ACEOF
3887cat confdefs.h >>conftest.$ac_ext
3888cat >>conftest.$ac_ext <<_ACEOF
3889/* end confdefs.h. */
3890#include <minix/config.h>
3891_ACEOF
3892if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3893 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3894 ac_status=$?
3895 grep -v '^ *+' conftest.er1 >conftest.err
3896 rm -f conftest.er1
3897 cat conftest.err >&5
3898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3899 (exit $ac_status); } >/dev/null; then
3900 if test -s conftest.err; then
3901 ac_cpp_err=$ac_c_preproc_warn_flag
3902 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3903 else
3904 ac_cpp_err=
3905 fi
3906else
3907 ac_cpp_err=yes
3908fi
3909if test -z "$ac_cpp_err"; then
3910 ac_header_preproc=yes
3911else
3912 echo "$as_me: failed program was:" >&5
3913sed 's/^/| /' conftest.$ac_ext >&5
3914
3915 ac_header_preproc=no
3916fi
3917rm -f conftest.err conftest.$ac_ext
3918echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3919echo "${ECHO_T}$ac_header_preproc" >&6
3920
3921# So? What about this header?
3922case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3923 yes:no: )
3924 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3925echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3926 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
3927echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
3928 ac_header_preproc=yes
3929 ;;
3930 no:yes:* )
3931 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3932echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3933 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3934echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3935 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
3936echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
3937 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
3938echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
3939 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3940echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3941 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
3942echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
3943 (
3944 cat <<\_ASBOX
3945## ------------------------------------------ ##
3946## Report this to the AC_PACKAGE_NAME lists. ##
3947## ------------------------------------------ ##
3948_ASBOX
3949 ) |
3950 sed "s/^/$as_me: WARNING: /" >&2
3951 ;;
3952esac
3953echo "$as_me:$LINENO: checking for minix/config.h" >&5
3954echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3955if test "${ac_cv_header_minix_config_h+set}" = set; then
3956 echo $ECHO_N "(cached) $ECHO_C" >&6
3957else
3958 ac_cv_header_minix_config_h=$ac_header_preproc
3959fi
3960echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3961echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3962
3963fi
3964if test $ac_cv_header_minix_config_h = yes; then
3965 MINIX=yes
3966else
3967 MINIX=
3968fi
3969
3970
3971 if test "$MINIX" = yes; then
3972
3973cat >>confdefs.h <<\_ACEOF
3974#define _POSIX_SOURCE 1
3975_ACEOF
3976
3977
3978cat >>confdefs.h <<\_ACEOF
3979#define _POSIX_1_SOURCE 2
3980_ACEOF
3981
3982
3983cat >>confdefs.h <<\_ACEOF
3984#define _MINIX 1
3985_ACEOF
3986
3987 fi
3988
3989
3990
3991 echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
3992echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6
3993if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
bf3b7cd3
JD
3994 echo $ECHO_N "(cached) $ECHO_C" >&6
3995else
3996 cat >conftest.$ac_ext <<_ACEOF
3997/* confdefs.h. */
3998_ACEOF
3999cat confdefs.h >>conftest.$ac_ext
4000cat >>conftest.$ac_ext <<_ACEOF
4001/* end confdefs.h. */
bf3b7cd3 4002
60d26958
PB
4003# define __EXTENSIONS__ 1
4004 $ac_includes_default
bf3b7cd3
JD
4005int
4006main ()
4007{
4008
4009 ;
4010 return 0;
4011}
4012_ACEOF
4013rm -f conftest.$ac_objext
b61ff9c8
BS
4014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4015 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4016 ac_status=$?
4017 grep -v '^ *+' conftest.er1 >conftest.err
4018 rm -f conftest.er1
4019 cat conftest.err >&5
4020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4021 (exit $ac_status); } &&
4022 { ac_try='test -z "$ac_c_werror_flag"
4023 || test ! -s conftest.err'
4024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4025 (eval $ac_try) 2>&5
4026 ac_status=$?
4027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4028 (exit $ac_status); }; } &&
4029 { ac_try='test -s conftest.$ac_objext'
4030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4031 (eval $ac_try) 2>&5
4032 ac_status=$?
4033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4034 (exit $ac_status); }; }; then
60d26958 4035 ac_cv_safe_to_define___extensions__=yes
bf3b7cd3
JD
4036else
4037 echo "$as_me: failed program was:" >&5
4038sed 's/^/| /' conftest.$ac_ext >&5
4039
60d26958 4040ac_cv_safe_to_define___extensions__=no
bf3b7cd3 4041fi
b61ff9c8 4042rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
60d26958
PB
4043fi
4044echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4045echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6
4046 test $ac_cv_safe_to_define___extensions__ = yes &&
4047 cat >>confdefs.h <<\_ACEOF
4048#define __EXTENSIONS__ 1
4049_ACEOF
bf3b7cd3 4050
60d26958
PB
4051 cat >>confdefs.h <<\_ACEOF
4052#define _ALL_SOURCE 1
4053_ACEOF
4054
4055 cat >>confdefs.h <<\_ACEOF
4056#define _GNU_SOURCE 1
4057_ACEOF
4058
4059 cat >>confdefs.h <<\_ACEOF
4060#define _POSIX_PTHREAD_SEMANTICS 1
4061_ACEOF
4062
4063 cat >>confdefs.h <<\_ACEOF
4064#define _TANDEM_SOURCE 1
4065_ACEOF
4066
4067
4068ac_ext=c
4069ac_cpp='$CPP $CPPFLAGS'
4070ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4071ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4072ac_compiler_gnu=$ac_cv_c_compiler_gnu
4073echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4074echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
4075# On Suns, sometimes $CPP names a directory.
4076if test -n "$CPP" && test -d "$CPP"; then
4077 CPP=
4078fi
4079if test -z "$CPP"; then
4080 if test "${ac_cv_prog_CPP+set}" = set; then
4081 echo $ECHO_N "(cached) $ECHO_C" >&6
4082else
4083 # Double quotes because CPP needs to be expanded
4084 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4085 do
4086 ac_preproc_ok=false
4087for ac_c_preproc_warn_flag in '' yes
4088do
4089 # Use a header file that comes with gcc, so configuring glibc
4090 # with a fresh cross-compiler works.
4091 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4092 # <limits.h> exists even on freestanding compilers.
4093 # On the NeXT, cc -E runs the code through the compiler's parser,
4094 # not just through cpp. "Syntax error" is here to catch this case.
bf3b7cd3
JD
4095 cat >conftest.$ac_ext <<_ACEOF
4096/* confdefs.h. */
4097_ACEOF
4098cat confdefs.h >>conftest.$ac_ext
4099cat >>conftest.$ac_ext <<_ACEOF
4100/* end confdefs.h. */
60d26958
PB
4101#ifdef __STDC__
4102# include <limits.h>
4103#else
4104# include <assert.h>
4105#endif
4106 Syntax error
bf3b7cd3 4107_ACEOF
60d26958
PB
4108if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4109 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4110 ac_status=$?
4111 grep -v '^ *+' conftest.er1 >conftest.err
4112 rm -f conftest.er1
4113 cat conftest.err >&5
4114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4115 (exit $ac_status); } >/dev/null; then
4116 if test -s conftest.err; then
4117 ac_cpp_err=$ac_c_preproc_warn_flag
4118 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4119 else
4120 ac_cpp_err=
4121 fi
4122else
4123 ac_cpp_err=yes
4124fi
4125if test -z "$ac_cpp_err"; then
bf3b7cd3
JD
4126 :
4127else
60d26958
PB
4128 echo "$as_me: failed program was:" >&5
4129sed 's/^/| /' conftest.$ac_ext >&5
4130
4131 # Broken: fails on valid input.
4132continue
bf3b7cd3 4133fi
60d26958
PB
4134rm -f conftest.err conftest.$ac_ext
4135
4136 # OK, works on sane cases. Now check whether non-existent headers
4137 # can be detected and how.
4138 cat >conftest.$ac_ext <<_ACEOF
4139/* confdefs.h. */
4140_ACEOF
4141cat confdefs.h >>conftest.$ac_ext
4142cat >>conftest.$ac_ext <<_ACEOF
4143/* end confdefs.h. */
4144#include <ac_nonexistent.h>
4145_ACEOF
4146if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4147 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4148 ac_status=$?
4149 grep -v '^ *+' conftest.er1 >conftest.err
4150 rm -f conftest.er1
4151 cat conftest.err >&5
4152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4153 (exit $ac_status); } >/dev/null; then
4154 if test -s conftest.err; then
4155 ac_cpp_err=$ac_c_preproc_warn_flag
4156 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4157 else
4158 ac_cpp_err=
4159 fi
4160else
4161 ac_cpp_err=yes
4162fi
4163if test -z "$ac_cpp_err"; then
4164 # Broken: success on invalid input.
4165continue
4166else
4167 echo "$as_me: failed program was:" >&5
4168sed 's/^/| /' conftest.$ac_ext >&5
bf3b7cd3 4169
60d26958
PB
4170 # Passes both tests.
4171ac_preproc_ok=:
4172break
bf3b7cd3 4173fi
60d26958 4174rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4175
60d26958
PB
4176done
4177# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4178rm -f conftest.err conftest.$ac_ext
4179if $ac_preproc_ok; then
4180 break
4181fi
4182
4183 done
4184 ac_cv_prog_CPP=$CPP
4185
4186fi
4187 CPP=$ac_cv_prog_CPP
4188else
4189 ac_cv_prog_CPP=$CPP
4190fi
4191echo "$as_me:$LINENO: result: $CPP" >&5
4192echo "${ECHO_T}$CPP" >&6
4193ac_preproc_ok=false
4194for ac_c_preproc_warn_flag in '' yes
4195do
4196 # Use a header file that comes with gcc, so configuring glibc
4197 # with a fresh cross-compiler works.
4198 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4199 # <limits.h> exists even on freestanding compilers.
4200 # On the NeXT, cc -E runs the code through the compiler's parser,
4201 # not just through cpp. "Syntax error" is here to catch this case.
bf3b7cd3
JD
4202 cat >conftest.$ac_ext <<_ACEOF
4203/* confdefs.h. */
4204_ACEOF
4205cat confdefs.h >>conftest.$ac_ext
4206cat >>conftest.$ac_ext <<_ACEOF
4207/* end confdefs.h. */
60d26958
PB
4208#ifdef __STDC__
4209# include <limits.h>
4210#else
4211# include <assert.h>
4212#endif
4213 Syntax error
bf3b7cd3 4214_ACEOF
60d26958
PB
4215if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4216 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4217 ac_status=$?
4218 grep -v '^ *+' conftest.er1 >conftest.err
4219 rm -f conftest.er1
4220 cat conftest.err >&5
4221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4222 (exit $ac_status); } >/dev/null; then
4223 if test -s conftest.err; then
4224 ac_cpp_err=$ac_c_preproc_warn_flag
4225 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4226 else
4227 ac_cpp_err=
4228 fi
bf3b7cd3 4229else
60d26958 4230 ac_cpp_err=yes
bf3b7cd3 4231fi
60d26958
PB
4232if test -z "$ac_cpp_err"; then
4233 :
4234else
4235 echo "$as_me: failed program was:" >&5
4236sed 's/^/| /' conftest.$ac_ext >&5
bf3b7cd3 4237
60d26958
PB
4238 # Broken: fails on valid input.
4239continue
bf3b7cd3 4240fi
60d26958 4241rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4242
60d26958
PB
4243 # OK, works on sane cases. Now check whether non-existent headers
4244 # can be detected and how.
bf3b7cd3
JD
4245 cat >conftest.$ac_ext <<_ACEOF
4246/* confdefs.h. */
4247_ACEOF
4248cat confdefs.h >>conftest.$ac_ext
4249cat >>conftest.$ac_ext <<_ACEOF
4250/* end confdefs.h. */
60d26958 4251#include <ac_nonexistent.h>
bf3b7cd3 4252_ACEOF
60d26958
PB
4253if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4254 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
bf3b7cd3 4255 ac_status=$?
60d26958
PB
4256 grep -v '^ *+' conftest.er1 >conftest.err
4257 rm -f conftest.er1
4258 cat conftest.err >&5
bf3b7cd3 4259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
60d26958
PB
4260 (exit $ac_status); } >/dev/null; then
4261 if test -s conftest.err; then
4262 ac_cpp_err=$ac_c_preproc_warn_flag
4263 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4264 else
4265 ac_cpp_err=
4266 fi
bf3b7cd3 4267else
60d26958
PB
4268 ac_cpp_err=yes
4269fi
4270if test -z "$ac_cpp_err"; then
4271 # Broken: success on invalid input.
4272continue
4273else
4274 echo "$as_me: failed program was:" >&5
bf3b7cd3
JD
4275sed 's/^/| /' conftest.$ac_ext >&5
4276
60d26958
PB
4277 # Passes both tests.
4278ac_preproc_ok=:
4279break
1a4b763e 4280fi
60d26958 4281rm -f conftest.err conftest.$ac_ext
bf3b7cd3 4282
60d26958
PB
4283done
4284# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4285rm -f conftest.err conftest.$ac_ext
4286if $ac_preproc_ok; then
4287 :
4288else
18c04407
RW
4289 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
4290echo "$as_me: error: in \`$ac_pwd':" >&2;}
4291{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
60d26958
PB
4292See \`config.log' for more details." >&5
4293echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4294See \`config.log' for more details." >&2;}
18c04407 4295 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
4296fi
4297
60d26958
PB
4298ac_ext=c
4299ac_cpp='$CPP $CPPFLAGS'
4300ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4301ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4302ac_compiler_gnu=$ac_cv_c_compiler_gnu
bf3b7cd3 4303
60d26958
PB
4304echo "$as_me:$LINENO: checking for inline" >&5
4305echo $ECHO_N "checking for inline... $ECHO_C" >&6
4306if test "${ac_cv_c_inline+set}" = set; then
bf3b7cd3
JD
4307 echo $ECHO_N "(cached) $ECHO_C" >&6
4308else
60d26958
PB
4309 ac_cv_c_inline=no
4310for ac_kw in inline __inline__ __inline; do
bf3b7cd3
JD
4311 cat >conftest.$ac_ext <<_ACEOF
4312/* confdefs.h. */
4313_ACEOF
4314cat confdefs.h >>conftest.$ac_ext
4315cat >>conftest.$ac_ext <<_ACEOF
4316/* end confdefs.h. */
60d26958
PB
4317#ifndef __cplusplus
4318typedef int foo_t;
4319static $ac_kw foo_t static_foo () {return 0; }
4320$ac_kw foo_t foo () {return 0; }
4321#endif
bf3b7cd3 4322
bf3b7cd3
JD
4323_ACEOF
4324rm -f conftest.$ac_objext
b61ff9c8
BS
4325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4326 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4327 ac_status=$?
4328 grep -v '^ *+' conftest.er1 >conftest.err
4329 rm -f conftest.er1
4330 cat conftest.err >&5
4331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4332 (exit $ac_status); } &&
4333 { ac_try='test -z "$ac_c_werror_flag"
4334 || test ! -s conftest.err'
4335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4336 (eval $ac_try) 2>&5
4337 ac_status=$?
4338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4339 (exit $ac_status); }; } &&
4340 { ac_try='test -s conftest.$ac_objext'
4341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4342 (eval $ac_try) 2>&5
4343 ac_status=$?
4344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4345 (exit $ac_status); }; }; then
60d26958 4346 ac_cv_c_inline=$ac_kw; break
bf3b7cd3
JD
4347else
4348 echo "$as_me: failed program was:" >&5
4349sed 's/^/| /' conftest.$ac_ext >&5
4350
bf3b7cd3 4351fi
b61ff9c8 4352rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
60d26958 4353done
bf3b7cd3
JD
4354
4355fi
60d26958
PB
4356echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
4357echo "${ECHO_T}$ac_cv_c_inline" >&6
bf3b7cd3 4358
60d26958
PB
4359
4360case $ac_cv_c_inline in
4361 inline | yes) ;;
4362 *)
4363 case $ac_cv_c_inline in
4364 no) ac_val=;;
4365 *) ac_val=$ac_cv_c_inline;;
4366 esac
4367 cat >>confdefs.h <<_ACEOF
4368#ifndef __cplusplus
4369#define inline $ac_val
4370#endif
4371_ACEOF
4372 ;;
4373esac
bf3b7cd3
JD
4374
4375
60d26958 4376# sizeof(char) is 1 by definition.
b61ff9c8
BS
4377echo "$as_me:$LINENO: checking for void *" >&5
4378echo $ECHO_N "checking for void *... $ECHO_C" >&6
bf3b7cd3
JD
4379if test "${ac_cv_type_void_p+set}" = set; then
4380 echo $ECHO_N "(cached) $ECHO_C" >&6
4381else
4382 cat >conftest.$ac_ext <<_ACEOF
4383/* confdefs.h. */
4384_ACEOF
4385cat confdefs.h >>conftest.$ac_ext
4386cat >>conftest.$ac_ext <<_ACEOF
4387/* end confdefs.h. */
4388$ac_includes_default
4389int
4390main ()
4391{
b61ff9c8 4392if ((void * *) 0)
bf3b7cd3 4393 return 0;
b61ff9c8 4394if (sizeof (void *))
bf3b7cd3
JD
4395 return 0;
4396 ;
4397 return 0;
4398}
4399_ACEOF
4400rm -f conftest.$ac_objext
b61ff9c8
BS
4401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4402 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4403 ac_status=$?
4404 grep -v '^ *+' conftest.er1 >conftest.err
4405 rm -f conftest.er1
4406 cat conftest.err >&5
4407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4408 (exit $ac_status); } &&
4409 { ac_try='test -z "$ac_c_werror_flag"
4410 || test ! -s conftest.err'
4411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4412 (eval $ac_try) 2>&5
4413 ac_status=$?
4414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4415 (exit $ac_status); }; } &&
4416 { ac_try='test -s conftest.$ac_objext'
4417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4418 (eval $ac_try) 2>&5
4419 ac_status=$?
4420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4421 (exit $ac_status); }; }; then
bf3b7cd3
JD
4422 ac_cv_type_void_p=yes
4423else
4424 echo "$as_me: failed program was:" >&5
4425sed 's/^/| /' conftest.$ac_ext >&5
4426
b61ff9c8 4427ac_cv_type_void_p=no
bf3b7cd3 4428fi
b61ff9c8 4429rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4430fi
b61ff9c8
BS
4431echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
4432echo "${ECHO_T}$ac_cv_type_void_p" >&6
bf3b7cd3 4433
b61ff9c8
BS
4434echo "$as_me:$LINENO: checking size of void *" >&5
4435echo $ECHO_N "checking size of void *... $ECHO_C" >&6
ba479fd2
NN
4436if test "${ac_cv_sizeof_void_p+set}" = set; then
4437 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 4438else
b61ff9c8
BS
4439 if test "$ac_cv_type_void_p" = yes; then
4440 # The cast to unsigned long works around a bug in the HP C Compiler
4441 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4442 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4443 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4444 if test "$cross_compiling" = yes; then
4445 # Depending upon the size, compute the lo and hi bounds.
4446cat >conftest.$ac_ext <<_ACEOF
4447/* confdefs.h. */
4448_ACEOF
4449cat confdefs.h >>conftest.$ac_ext
4450cat >>conftest.$ac_ext <<_ACEOF
4451/* end confdefs.h. */
4452$ac_includes_default
4453int
4454main ()
4455{
b61ff9c8 4456static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
bf3b7cd3
JD
4457test_array [0] = 0
4458
4459 ;
4460 return 0;
4461}
4462_ACEOF
4463rm -f conftest.$ac_objext
b61ff9c8
BS
4464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4465 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4466 ac_status=$?
4467 grep -v '^ *+' conftest.er1 >conftest.err
4468 rm -f conftest.er1
4469 cat conftest.err >&5
4470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4471 (exit $ac_status); } &&
4472 { ac_try='test -z "$ac_c_werror_flag"
4473 || test ! -s conftest.err'
4474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4475 (eval $ac_try) 2>&5
4476 ac_status=$?
4477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4478 (exit $ac_status); }; } &&
4479 { ac_try='test -s conftest.$ac_objext'
4480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4481 (eval $ac_try) 2>&5
4482 ac_status=$?
4483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484 (exit $ac_status); }; }; then
bf3b7cd3
JD
4485 ac_lo=0 ac_mid=0
4486 while :; do
4487 cat >conftest.$ac_ext <<_ACEOF
4488/* confdefs.h. */
4489_ACEOF
4490cat confdefs.h >>conftest.$ac_ext
4491cat >>conftest.$ac_ext <<_ACEOF
4492/* end confdefs.h. */
4493$ac_includes_default
4494int
4495main ()
4496{
b61ff9c8 4497static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
4498test_array [0] = 0
4499
4500 ;
4501 return 0;
4502}
4503_ACEOF
4504rm -f conftest.$ac_objext
b61ff9c8
BS
4505if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4506 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4507 ac_status=$?
4508 grep -v '^ *+' conftest.er1 >conftest.err
4509 rm -f conftest.er1
4510 cat conftest.err >&5
4511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4512 (exit $ac_status); } &&
4513 { ac_try='test -z "$ac_c_werror_flag"
4514 || test ! -s conftest.err'
4515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4516 (eval $ac_try) 2>&5
4517 ac_status=$?
4518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4519 (exit $ac_status); }; } &&
4520 { ac_try='test -s conftest.$ac_objext'
4521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4522 (eval $ac_try) 2>&5
4523 ac_status=$?
4524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4525 (exit $ac_status); }; }; then
bf3b7cd3
JD
4526 ac_hi=$ac_mid; break
4527else
4528 echo "$as_me: failed program was:" >&5
4529sed 's/^/| /' conftest.$ac_ext >&5
4530
b61ff9c8
BS
4531ac_lo=`expr $ac_mid + 1`
4532 if test $ac_lo -le $ac_mid; then
4533 ac_lo= ac_hi=
4534 break
4535 fi
4536 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4537fi
b61ff9c8 4538rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4539 done
4540else
4541 echo "$as_me: failed program was:" >&5
4542sed 's/^/| /' conftest.$ac_ext >&5
4543
b61ff9c8 4544cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4545/* confdefs.h. */
4546_ACEOF
4547cat confdefs.h >>conftest.$ac_ext
4548cat >>conftest.$ac_ext <<_ACEOF
4549/* end confdefs.h. */
4550$ac_includes_default
4551int
4552main ()
4553{
b61ff9c8 4554static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
bf3b7cd3
JD
4555test_array [0] = 0
4556
4557 ;
4558 return 0;
4559}
4560_ACEOF
4561rm -f conftest.$ac_objext
b61ff9c8
BS
4562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4563 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4564 ac_status=$?
4565 grep -v '^ *+' conftest.er1 >conftest.err
4566 rm -f conftest.er1
4567 cat conftest.err >&5
4568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4569 (exit $ac_status); } &&
4570 { ac_try='test -z "$ac_c_werror_flag"
4571 || test ! -s conftest.err'
4572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4573 (eval $ac_try) 2>&5
4574 ac_status=$?
4575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4576 (exit $ac_status); }; } &&
4577 { ac_try='test -s conftest.$ac_objext'
4578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4579 (eval $ac_try) 2>&5
4580 ac_status=$?
4581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4582 (exit $ac_status); }; }; then
bf3b7cd3
JD
4583 ac_hi=-1 ac_mid=-1
4584 while :; do
4585 cat >conftest.$ac_ext <<_ACEOF
4586/* confdefs.h. */
4587_ACEOF
4588cat confdefs.h >>conftest.$ac_ext
4589cat >>conftest.$ac_ext <<_ACEOF
4590/* end confdefs.h. */
4591$ac_includes_default
4592int
4593main ()
4594{
b61ff9c8 4595static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
bf3b7cd3
JD
4596test_array [0] = 0
4597
4598 ;
4599 return 0;
4600}
4601_ACEOF
4602rm -f conftest.$ac_objext
b61ff9c8
BS
4603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4604 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4605 ac_status=$?
4606 grep -v '^ *+' conftest.er1 >conftest.err
4607 rm -f conftest.er1
4608 cat conftest.err >&5
4609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4610 (exit $ac_status); } &&
4611 { ac_try='test -z "$ac_c_werror_flag"
4612 || test ! -s conftest.err'
4613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4614 (eval $ac_try) 2>&5
4615 ac_status=$?
4616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4617 (exit $ac_status); }; } &&
4618 { ac_try='test -s conftest.$ac_objext'
4619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4620 (eval $ac_try) 2>&5
4621 ac_status=$?
4622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4623 (exit $ac_status); }; }; then
bf3b7cd3
JD
4624 ac_lo=$ac_mid; break
4625else
4626 echo "$as_me: failed program was:" >&5
4627sed 's/^/| /' conftest.$ac_ext >&5
4628
b61ff9c8
BS
4629ac_hi=`expr '(' $ac_mid ')' - 1`
4630 if test $ac_mid -le $ac_hi; then
4631 ac_lo= ac_hi=
4632 break
4633 fi
4634 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4635fi
b61ff9c8 4636rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4637 done
4638else
4639 echo "$as_me: failed program was:" >&5
4640sed 's/^/| /' conftest.$ac_ext >&5
4641
b61ff9c8 4642ac_lo= ac_hi=
bf3b7cd3 4643fi
b61ff9c8 4644rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4645fi
b61ff9c8 4646rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4647# Binary search between lo and hi bounds.
4648while test "x$ac_lo" != "x$ac_hi"; do
4649 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4650 cat >conftest.$ac_ext <<_ACEOF
4651/* confdefs.h. */
4652_ACEOF
4653cat confdefs.h >>conftest.$ac_ext
4654cat >>conftest.$ac_ext <<_ACEOF
4655/* end confdefs.h. */
4656$ac_includes_default
4657int
4658main ()
4659{
b61ff9c8 4660static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
4661test_array [0] = 0
4662
4663 ;
4664 return 0;
4665}
4666_ACEOF
4667rm -f conftest.$ac_objext
b61ff9c8
BS
4668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4669 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4670 ac_status=$?
4671 grep -v '^ *+' conftest.er1 >conftest.err
4672 rm -f conftest.er1
4673 cat conftest.err >&5
4674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4675 (exit $ac_status); } &&
4676 { ac_try='test -z "$ac_c_werror_flag"
4677 || test ! -s conftest.err'
4678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4679 (eval $ac_try) 2>&5
4680 ac_status=$?
4681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4682 (exit $ac_status); }; } &&
4683 { ac_try='test -s conftest.$ac_objext'
4684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4685 (eval $ac_try) 2>&5
4686 ac_status=$?
4687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4688 (exit $ac_status); }; }; then
bf3b7cd3
JD
4689 ac_hi=$ac_mid
4690else
4691 echo "$as_me: failed program was:" >&5
4692sed 's/^/| /' conftest.$ac_ext >&5
4693
b61ff9c8 4694ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 4695fi
b61ff9c8 4696rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4697done
4698case $ac_lo in
4699?*) ac_cv_sizeof_void_p=$ac_lo;;
18c04407
RW
4700'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
4701echo "$as_me: error: in \`$ac_pwd':" >&2;}
4702{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 4703See \`config.log' for more details." >&5
b61ff9c8 4704echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 4705See \`config.log' for more details." >&2;}
18c04407 4706 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 4707esac
b61ff9c8
BS
4708else
4709 if test "$cross_compiling" = yes; then
18c04407
RW
4710 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
4711echo "$as_me: error: in \`$ac_pwd':" >&2;}
4712{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
4713See \`config.log' for more details." >&5
4714echo "$as_me: error: cannot run test program while cross compiling
4715See \`config.log' for more details." >&2;}
18c04407 4716 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
4717else
4718 cat >conftest.$ac_ext <<_ACEOF
4719/* confdefs.h. */
4720_ACEOF
4721cat confdefs.h >>conftest.$ac_ext
4722cat >>conftest.$ac_ext <<_ACEOF
4723/* end confdefs.h. */
4724$ac_includes_default
b61ff9c8
BS
4725long longval () { return (long) (sizeof (void *)); }
4726unsigned long ulongval () { return (long) (sizeof (void *)); }
bf3b7cd3
JD
4727#include <stdio.h>
4728#include <stdlib.h>
4729int
4730main ()
4731{
4732
4733 FILE *f = fopen ("conftest.val", "w");
4734 if (! f)
b61ff9c8
BS
4735 exit (1);
4736 if (((long) (sizeof (void *))) < 0)
bf3b7cd3 4737 {
b61ff9c8
BS
4738 long i = longval ();
4739 if (i != ((long) (sizeof (void *))))
4740 exit (1);
bf3b7cd3
JD
4741 fprintf (f, "%ld\n", i);
4742 }
4743 else
4744 {
b61ff9c8
BS
4745 unsigned long i = ulongval ();
4746 if (i != ((long) (sizeof (void *))))
4747 exit (1);
bf3b7cd3
JD
4748 fprintf (f, "%lu\n", i);
4749 }
b61ff9c8 4750 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
4751
4752 ;
4753 return 0;
4754}
4755_ACEOF
4756rm -f conftest$ac_exeext
b61ff9c8
BS
4757if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4758 (eval $ac_link) 2>&5
bf3b7cd3
JD
4759 ac_status=$?
4760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
4762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4763 (eval $ac_try) 2>&5
bf3b7cd3
JD
4764 ac_status=$?
4765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4766 (exit $ac_status); }; }; then
4767 ac_cv_sizeof_void_p=`cat conftest.val`
4768else
4769 echo "$as_me: program exited with status $ac_status" >&5
4770echo "$as_me: failed program was:" >&5
4771sed 's/^/| /' conftest.$ac_ext >&5
4772
4773( exit $ac_status )
18c04407
RW
4774{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
4775echo "$as_me: error: in \`$ac_pwd':" >&2;}
b61ff9c8 4776{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 4777See \`config.log' for more details." >&5
b61ff9c8 4778echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 4779See \`config.log' for more details." >&2;}
18c04407 4780 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
4781fi
4782rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4783fi
4784fi
4785rm -f conftest.val
b61ff9c8
BS
4786else
4787 ac_cv_sizeof_void_p=0
bf3b7cd3 4788fi
b61ff9c8
BS
4789fi
4790echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
4791echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
bf3b7cd3
JD
4792cat >>confdefs.h <<_ACEOF
4793#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4794_ACEOF
4795
4796
b61ff9c8
BS
4797echo "$as_me:$LINENO: checking for short" >&5
4798echo $ECHO_N "checking for short... $ECHO_C" >&6
bf3b7cd3
JD
4799if test "${ac_cv_type_short+set}" = set; then
4800 echo $ECHO_N "(cached) $ECHO_C" >&6
4801else
4802 cat >conftest.$ac_ext <<_ACEOF
4803/* confdefs.h. */
4804_ACEOF
4805cat confdefs.h >>conftest.$ac_ext
4806cat >>conftest.$ac_ext <<_ACEOF
4807/* end confdefs.h. */
4808$ac_includes_default
4809int
4810main ()
4811{
b61ff9c8 4812if ((short *) 0)
bf3b7cd3 4813 return 0;
b61ff9c8 4814if (sizeof (short))
bf3b7cd3
JD
4815 return 0;
4816 ;
4817 return 0;
4818}
4819_ACEOF
4820rm -f conftest.$ac_objext
b61ff9c8
BS
4821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4822 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4823 ac_status=$?
4824 grep -v '^ *+' conftest.er1 >conftest.err
4825 rm -f conftest.er1
4826 cat conftest.err >&5
4827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4828 (exit $ac_status); } &&
4829 { ac_try='test -z "$ac_c_werror_flag"
4830 || test ! -s conftest.err'
4831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4832 (eval $ac_try) 2>&5
4833 ac_status=$?
4834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4835 (exit $ac_status); }; } &&
4836 { ac_try='test -s conftest.$ac_objext'
4837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4838 (eval $ac_try) 2>&5
4839 ac_status=$?
4840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4841 (exit $ac_status); }; }; then
bf3b7cd3
JD
4842 ac_cv_type_short=yes
4843else
4844 echo "$as_me: failed program was:" >&5
4845sed 's/^/| /' conftest.$ac_ext >&5
4846
b61ff9c8 4847ac_cv_type_short=no
bf3b7cd3 4848fi
b61ff9c8 4849rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4850fi
b61ff9c8
BS
4851echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
4852echo "${ECHO_T}$ac_cv_type_short" >&6
bf3b7cd3 4853
b61ff9c8
BS
4854echo "$as_me:$LINENO: checking size of short" >&5
4855echo $ECHO_N "checking size of short... $ECHO_C" >&6
bf3b7cd3
JD
4856if test "${ac_cv_sizeof_short+set}" = set; then
4857 echo $ECHO_N "(cached) $ECHO_C" >&6
4858else
b61ff9c8
BS
4859 if test "$ac_cv_type_short" = yes; then
4860 # The cast to unsigned long works around a bug in the HP C Compiler
4861 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4862 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4863 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4864 if test "$cross_compiling" = yes; then
4865 # Depending upon the size, compute the lo and hi bounds.
4866cat >conftest.$ac_ext <<_ACEOF
4867/* confdefs.h. */
4868_ACEOF
4869cat confdefs.h >>conftest.$ac_ext
4870cat >>conftest.$ac_ext <<_ACEOF
4871/* end confdefs.h. */
4872$ac_includes_default
4873int
4874main ()
4875{
b61ff9c8 4876static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
bf3b7cd3
JD
4877test_array [0] = 0
4878
4879 ;
4880 return 0;
4881}
4882_ACEOF
4883rm -f conftest.$ac_objext
b61ff9c8
BS
4884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4885 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4886 ac_status=$?
4887 grep -v '^ *+' conftest.er1 >conftest.err
4888 rm -f conftest.er1
4889 cat conftest.err >&5
4890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4891 (exit $ac_status); } &&
4892 { ac_try='test -z "$ac_c_werror_flag"
4893 || test ! -s conftest.err'
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); }; } &&
4899 { ac_try='test -s conftest.$ac_objext'
4900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4901 (eval $ac_try) 2>&5
4902 ac_status=$?
4903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4904 (exit $ac_status); }; }; then
bf3b7cd3
JD
4905 ac_lo=0 ac_mid=0
4906 while :; do
4907 cat >conftest.$ac_ext <<_ACEOF
4908/* confdefs.h. */
4909_ACEOF
4910cat confdefs.h >>conftest.$ac_ext
4911cat >>conftest.$ac_ext <<_ACEOF
4912/* end confdefs.h. */
4913$ac_includes_default
4914int
4915main ()
4916{
b61ff9c8 4917static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
4918test_array [0] = 0
4919
4920 ;
4921 return 0;
4922}
4923_ACEOF
4924rm -f conftest.$ac_objext
b61ff9c8
BS
4925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4926 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4927 ac_status=$?
4928 grep -v '^ *+' conftest.er1 >conftest.err
4929 rm -f conftest.er1
4930 cat conftest.err >&5
4931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4932 (exit $ac_status); } &&
4933 { ac_try='test -z "$ac_c_werror_flag"
4934 || test ! -s conftest.err'
4935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4936 (eval $ac_try) 2>&5
4937 ac_status=$?
4938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4939 (exit $ac_status); }; } &&
4940 { ac_try='test -s conftest.$ac_objext'
4941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4942 (eval $ac_try) 2>&5
4943 ac_status=$?
4944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4945 (exit $ac_status); }; }; then
bf3b7cd3
JD
4946 ac_hi=$ac_mid; break
4947else
4948 echo "$as_me: failed program was:" >&5
4949sed 's/^/| /' conftest.$ac_ext >&5
4950
b61ff9c8
BS
4951ac_lo=`expr $ac_mid + 1`
4952 if test $ac_lo -le $ac_mid; then
4953 ac_lo= ac_hi=
4954 break
4955 fi
4956 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4957fi
b61ff9c8 4958rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4959 done
4960else
4961 echo "$as_me: failed program was:" >&5
4962sed 's/^/| /' conftest.$ac_ext >&5
4963
b61ff9c8 4964cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4965/* confdefs.h. */
4966_ACEOF
4967cat confdefs.h >>conftest.$ac_ext
4968cat >>conftest.$ac_ext <<_ACEOF
4969/* end confdefs.h. */
4970$ac_includes_default
4971int
4972main ()
4973{
b61ff9c8 4974static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
bf3b7cd3
JD
4975test_array [0] = 0
4976
4977 ;
4978 return 0;
4979}
4980_ACEOF
4981rm -f conftest.$ac_objext
b61ff9c8
BS
4982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4983 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4984 ac_status=$?
4985 grep -v '^ *+' conftest.er1 >conftest.err
4986 rm -f conftest.er1
4987 cat conftest.err >&5
4988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4989 (exit $ac_status); } &&
4990 { ac_try='test -z "$ac_c_werror_flag"
4991 || test ! -s conftest.err'
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); }; } &&
4997 { ac_try='test -s conftest.$ac_objext'
4998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4999 (eval $ac_try) 2>&5
5000 ac_status=$?
5001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5002 (exit $ac_status); }; }; then
bf3b7cd3
JD
5003 ac_hi=-1 ac_mid=-1
5004 while :; do
5005 cat >conftest.$ac_ext <<_ACEOF
5006/* confdefs.h. */
5007_ACEOF
5008cat confdefs.h >>conftest.$ac_ext
5009cat >>conftest.$ac_ext <<_ACEOF
5010/* end confdefs.h. */
5011$ac_includes_default
5012int
5013main ()
5014{
b61ff9c8 5015static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
bf3b7cd3
JD
5016test_array [0] = 0
5017
5018 ;
5019 return 0;
5020}
5021_ACEOF
5022rm -f conftest.$ac_objext
b61ff9c8
BS
5023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5024 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5025 ac_status=$?
5026 grep -v '^ *+' conftest.er1 >conftest.err
5027 rm -f conftest.er1
5028 cat conftest.err >&5
5029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5030 (exit $ac_status); } &&
5031 { ac_try='test -z "$ac_c_werror_flag"
5032 || test ! -s conftest.err'
5033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5034 (eval $ac_try) 2>&5
5035 ac_status=$?
5036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5037 (exit $ac_status); }; } &&
5038 { ac_try='test -s conftest.$ac_objext'
5039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5040 (eval $ac_try) 2>&5
5041 ac_status=$?
5042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5043 (exit $ac_status); }; }; then
bf3b7cd3
JD
5044 ac_lo=$ac_mid; break
5045else
5046 echo "$as_me: failed program was:" >&5
5047sed 's/^/| /' conftest.$ac_ext >&5
5048
b61ff9c8
BS
5049ac_hi=`expr '(' $ac_mid ')' - 1`
5050 if test $ac_mid -le $ac_hi; then
5051 ac_lo= ac_hi=
5052 break
5053 fi
5054 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5055fi
b61ff9c8 5056rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5057 done
5058else
5059 echo "$as_me: failed program was:" >&5
5060sed 's/^/| /' conftest.$ac_ext >&5
5061
b61ff9c8 5062ac_lo= ac_hi=
bf3b7cd3 5063fi
b61ff9c8 5064rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5065fi
b61ff9c8 5066rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5067# Binary search between lo and hi bounds.
5068while test "x$ac_lo" != "x$ac_hi"; do
5069 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5070 cat >conftest.$ac_ext <<_ACEOF
5071/* confdefs.h. */
5072_ACEOF
5073cat confdefs.h >>conftest.$ac_ext
5074cat >>conftest.$ac_ext <<_ACEOF
5075/* end confdefs.h. */
5076$ac_includes_default
5077int
5078main ()
5079{
b61ff9c8 5080static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
5081test_array [0] = 0
5082
5083 ;
5084 return 0;
5085}
5086_ACEOF
5087rm -f conftest.$ac_objext
b61ff9c8
BS
5088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5089 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5090 ac_status=$?
5091 grep -v '^ *+' conftest.er1 >conftest.err
5092 rm -f conftest.er1
5093 cat conftest.err >&5
5094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5095 (exit $ac_status); } &&
5096 { ac_try='test -z "$ac_c_werror_flag"
5097 || test ! -s conftest.err'
5098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5099 (eval $ac_try) 2>&5
5100 ac_status=$?
5101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5102 (exit $ac_status); }; } &&
5103 { ac_try='test -s conftest.$ac_objext'
5104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5105 (eval $ac_try) 2>&5
5106 ac_status=$?
5107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5108 (exit $ac_status); }; }; then
bf3b7cd3
JD
5109 ac_hi=$ac_mid
5110else
5111 echo "$as_me: failed program was:" >&5
5112sed 's/^/| /' conftest.$ac_ext >&5
5113
b61ff9c8 5114ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5115fi
b61ff9c8 5116rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5117done
5118case $ac_lo in
5119?*) ac_cv_sizeof_short=$ac_lo;;
18c04407
RW
5120'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5121echo "$as_me: error: in \`$ac_pwd':" >&2;}
5122{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 5123See \`config.log' for more details." >&5
b61ff9c8 5124echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 5125See \`config.log' for more details." >&2;}
18c04407 5126 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 5127esac
b61ff9c8
BS
5128else
5129 if test "$cross_compiling" = yes; then
18c04407
RW
5130 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5131echo "$as_me: error: in \`$ac_pwd':" >&2;}
5132{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
5133See \`config.log' for more details." >&5
5134echo "$as_me: error: cannot run test program while cross compiling
5135See \`config.log' for more details." >&2;}
18c04407 5136 { (exit 1); exit 1; }; }; }
8b1f719a
PB
5137else
5138 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5139/* confdefs.h. */
5140_ACEOF
5141cat confdefs.h >>conftest.$ac_ext
5142cat >>conftest.$ac_ext <<_ACEOF
5143/* end confdefs.h. */
5144$ac_includes_default
b61ff9c8
BS
5145long longval () { return (long) (sizeof (short)); }
5146unsigned long ulongval () { return (long) (sizeof (short)); }
bf3b7cd3
JD
5147#include <stdio.h>
5148#include <stdlib.h>
5149int
5150main ()
5151{
5152
5153 FILE *f = fopen ("conftest.val", "w");
5154 if (! f)
b61ff9c8
BS
5155 exit (1);
5156 if (((long) (sizeof (short))) < 0)
bf3b7cd3 5157 {
b61ff9c8
BS
5158 long i = longval ();
5159 if (i != ((long) (sizeof (short))))
5160 exit (1);
bf3b7cd3
JD
5161 fprintf (f, "%ld\n", i);
5162 }
5163 else
5164 {
b61ff9c8
BS
5165 unsigned long i = ulongval ();
5166 if (i != ((long) (sizeof (short))))
5167 exit (1);
bf3b7cd3
JD
5168 fprintf (f, "%lu\n", i);
5169 }
b61ff9c8 5170 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5171
5172 ;
5173 return 0;
5174}
5175_ACEOF
5176rm -f conftest$ac_exeext
b61ff9c8
BS
5177if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5178 (eval $ac_link) 2>&5
bf3b7cd3
JD
5179 ac_status=$?
5180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5181 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5183 (eval $ac_try) 2>&5
bf3b7cd3
JD
5184 ac_status=$?
5185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5186 (exit $ac_status); }; }; then
5187 ac_cv_sizeof_short=`cat conftest.val`
5188else
5189 echo "$as_me: program exited with status $ac_status" >&5
5190echo "$as_me: failed program was:" >&5
5191sed 's/^/| /' conftest.$ac_ext >&5
5192
5193( exit $ac_status )
18c04407
RW
5194{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5195echo "$as_me: error: in \`$ac_pwd':" >&2;}
b61ff9c8 5196{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 5197See \`config.log' for more details." >&5
b61ff9c8 5198echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 5199See \`config.log' for more details." >&2;}
18c04407 5200 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
5201fi
5202rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5203fi
5204fi
5205rm -f conftest.val
b61ff9c8
BS
5206else
5207 ac_cv_sizeof_short=0
bf3b7cd3 5208fi
b61ff9c8
BS
5209fi
5210echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
5211echo "${ECHO_T}$ac_cv_sizeof_short" >&6
bf3b7cd3
JD
5212cat >>confdefs.h <<_ACEOF
5213#define SIZEOF_SHORT $ac_cv_sizeof_short
5214_ACEOF
5215
5216
b61ff9c8
BS
5217echo "$as_me:$LINENO: checking for int" >&5
5218echo $ECHO_N "checking for int... $ECHO_C" >&6
bf3b7cd3
JD
5219if test "${ac_cv_type_int+set}" = set; then
5220 echo $ECHO_N "(cached) $ECHO_C" >&6
5221else
5222 cat >conftest.$ac_ext <<_ACEOF
5223/* confdefs.h. */
5224_ACEOF
5225cat confdefs.h >>conftest.$ac_ext
5226cat >>conftest.$ac_ext <<_ACEOF
5227/* end confdefs.h. */
5228$ac_includes_default
5229int
5230main ()
5231{
b61ff9c8 5232if ((int *) 0)
bf3b7cd3 5233 return 0;
b61ff9c8 5234if (sizeof (int))
bf3b7cd3
JD
5235 return 0;
5236 ;
5237 return 0;
5238}
5239_ACEOF
5240rm -f conftest.$ac_objext
b61ff9c8
BS
5241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5242 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5243 ac_status=$?
5244 grep -v '^ *+' conftest.er1 >conftest.err
5245 rm -f conftest.er1
5246 cat conftest.err >&5
5247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5248 (exit $ac_status); } &&
5249 { ac_try='test -z "$ac_c_werror_flag"
5250 || test ! -s conftest.err'
5251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5252 (eval $ac_try) 2>&5
5253 ac_status=$?
5254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5255 (exit $ac_status); }; } &&
5256 { ac_try='test -s conftest.$ac_objext'
5257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5258 (eval $ac_try) 2>&5
5259 ac_status=$?
5260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5261 (exit $ac_status); }; }; then
bf3b7cd3
JD
5262 ac_cv_type_int=yes
5263else
5264 echo "$as_me: failed program was:" >&5
5265sed 's/^/| /' conftest.$ac_ext >&5
5266
b61ff9c8 5267ac_cv_type_int=no
bf3b7cd3 5268fi
b61ff9c8 5269rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5270fi
b61ff9c8
BS
5271echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5272echo "${ECHO_T}$ac_cv_type_int" >&6
bf3b7cd3 5273
b61ff9c8
BS
5274echo "$as_me:$LINENO: checking size of int" >&5
5275echo $ECHO_N "checking size of int... $ECHO_C" >&6
bf3b7cd3
JD
5276if test "${ac_cv_sizeof_int+set}" = set; then
5277 echo $ECHO_N "(cached) $ECHO_C" >&6
5278else
b61ff9c8
BS
5279 if test "$ac_cv_type_int" = yes; then
5280 # The cast to unsigned long works around a bug in the HP C Compiler
5281 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5282 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5283 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5284 if test "$cross_compiling" = yes; then
5285 # Depending upon the size, compute the lo and hi bounds.
5286cat >conftest.$ac_ext <<_ACEOF
5287/* confdefs.h. */
5288_ACEOF
5289cat confdefs.h >>conftest.$ac_ext
5290cat >>conftest.$ac_ext <<_ACEOF
5291/* end confdefs.h. */
5292$ac_includes_default
5293int
5294main ()
5295{
b61ff9c8 5296static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
bf3b7cd3
JD
5297test_array [0] = 0
5298
5299 ;
5300 return 0;
5301}
5302_ACEOF
5303rm -f conftest.$ac_objext
b61ff9c8
BS
5304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5305 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5306 ac_status=$?
5307 grep -v '^ *+' conftest.er1 >conftest.err
5308 rm -f conftest.er1
5309 cat conftest.err >&5
5310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5311 (exit $ac_status); } &&
5312 { ac_try='test -z "$ac_c_werror_flag"
5313 || test ! -s conftest.err'
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); }; } &&
5319 { ac_try='test -s conftest.$ac_objext'
5320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5321 (eval $ac_try) 2>&5
5322 ac_status=$?
5323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5324 (exit $ac_status); }; }; then
bf3b7cd3
JD
5325 ac_lo=0 ac_mid=0
5326 while :; do
5327 cat >conftest.$ac_ext <<_ACEOF
5328/* confdefs.h. */
5329_ACEOF
5330cat confdefs.h >>conftest.$ac_ext
5331cat >>conftest.$ac_ext <<_ACEOF
5332/* end confdefs.h. */
5333$ac_includes_default
5334int
5335main ()
5336{
b61ff9c8 5337static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
5338test_array [0] = 0
5339
5340 ;
5341 return 0;
5342}
5343_ACEOF
5344rm -f conftest.$ac_objext
b61ff9c8
BS
5345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5346 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5347 ac_status=$?
5348 grep -v '^ *+' conftest.er1 >conftest.err
5349 rm -f conftest.er1
5350 cat conftest.err >&5
5351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5352 (exit $ac_status); } &&
5353 { ac_try='test -z "$ac_c_werror_flag"
5354 || test ! -s conftest.err'
5355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5356 (eval $ac_try) 2>&5
5357 ac_status=$?
5358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5359 (exit $ac_status); }; } &&
5360 { ac_try='test -s conftest.$ac_objext'
5361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5362 (eval $ac_try) 2>&5
5363 ac_status=$?
5364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5365 (exit $ac_status); }; }; then
bf3b7cd3
JD
5366 ac_hi=$ac_mid; break
5367else
5368 echo "$as_me: failed program was:" >&5
5369sed 's/^/| /' conftest.$ac_ext >&5
5370
b61ff9c8
BS
5371ac_lo=`expr $ac_mid + 1`
5372 if test $ac_lo -le $ac_mid; then
5373 ac_lo= ac_hi=
5374 break
5375 fi
5376 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 5377fi
b61ff9c8 5378rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5379 done
5380else
5381 echo "$as_me: failed program was:" >&5
5382sed 's/^/| /' conftest.$ac_ext >&5
5383
b61ff9c8 5384cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5385/* confdefs.h. */
5386_ACEOF
5387cat confdefs.h >>conftest.$ac_ext
5388cat >>conftest.$ac_ext <<_ACEOF
5389/* end confdefs.h. */
5390$ac_includes_default
5391int
5392main ()
5393{
b61ff9c8 5394static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
bf3b7cd3
JD
5395test_array [0] = 0
5396
5397 ;
5398 return 0;
5399}
5400_ACEOF
5401rm -f conftest.$ac_objext
b61ff9c8
BS
5402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5403 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5404 ac_status=$?
5405 grep -v '^ *+' conftest.er1 >conftest.err
5406 rm -f conftest.er1
5407 cat conftest.err >&5
5408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5409 (exit $ac_status); } &&
5410 { ac_try='test -z "$ac_c_werror_flag"
5411 || test ! -s conftest.err'
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); }; } &&
5417 { ac_try='test -s conftest.$ac_objext'
5418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5419 (eval $ac_try) 2>&5
5420 ac_status=$?
5421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5422 (exit $ac_status); }; }; then
bf3b7cd3
JD
5423 ac_hi=-1 ac_mid=-1
5424 while :; do
5425 cat >conftest.$ac_ext <<_ACEOF
5426/* confdefs.h. */
5427_ACEOF
5428cat confdefs.h >>conftest.$ac_ext
5429cat >>conftest.$ac_ext <<_ACEOF
5430/* end confdefs.h. */
5431$ac_includes_default
5432int
5433main ()
5434{
b61ff9c8 5435static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
bf3b7cd3
JD
5436test_array [0] = 0
5437
5438 ;
5439 return 0;
5440}
5441_ACEOF
5442rm -f conftest.$ac_objext
b61ff9c8
BS
5443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5444 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5445 ac_status=$?
5446 grep -v '^ *+' conftest.er1 >conftest.err
5447 rm -f conftest.er1
5448 cat conftest.err >&5
5449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5450 (exit $ac_status); } &&
5451 { ac_try='test -z "$ac_c_werror_flag"
5452 || test ! -s conftest.err'
5453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5454 (eval $ac_try) 2>&5
5455 ac_status=$?
5456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5457 (exit $ac_status); }; } &&
5458 { ac_try='test -s conftest.$ac_objext'
5459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5460 (eval $ac_try) 2>&5
5461 ac_status=$?
5462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5463 (exit $ac_status); }; }; then
bf3b7cd3
JD
5464 ac_lo=$ac_mid; break
5465else
5466 echo "$as_me: failed program was:" >&5
5467sed 's/^/| /' conftest.$ac_ext >&5
5468
b61ff9c8
BS
5469ac_hi=`expr '(' $ac_mid ')' - 1`
5470 if test $ac_mid -le $ac_hi; then
5471 ac_lo= ac_hi=
5472 break
5473 fi
5474 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5475fi
b61ff9c8 5476rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5477 done
5478else
5479 echo "$as_me: failed program was:" >&5
5480sed 's/^/| /' conftest.$ac_ext >&5
5481
b61ff9c8 5482ac_lo= ac_hi=
bf3b7cd3 5483fi
b61ff9c8 5484rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5485fi
b61ff9c8 5486rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5487# Binary search between lo and hi bounds.
5488while test "x$ac_lo" != "x$ac_hi"; do
5489 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5490 cat >conftest.$ac_ext <<_ACEOF
5491/* confdefs.h. */
5492_ACEOF
5493cat confdefs.h >>conftest.$ac_ext
5494cat >>conftest.$ac_ext <<_ACEOF
5495/* end confdefs.h. */
5496$ac_includes_default
5497int
5498main ()
5499{
b61ff9c8 5500static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
5501test_array [0] = 0
5502
5503 ;
5504 return 0;
5505}
5506_ACEOF
5507rm -f conftest.$ac_objext
b61ff9c8
BS
5508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5509 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5510 ac_status=$?
5511 grep -v '^ *+' conftest.er1 >conftest.err
5512 rm -f conftest.er1
5513 cat conftest.err >&5
5514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5515 (exit $ac_status); } &&
5516 { ac_try='test -z "$ac_c_werror_flag"
5517 || test ! -s conftest.err'
5518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5519 (eval $ac_try) 2>&5
5520 ac_status=$?
5521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5522 (exit $ac_status); }; } &&
5523 { ac_try='test -s conftest.$ac_objext'
5524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5525 (eval $ac_try) 2>&5
5526 ac_status=$?
5527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5528 (exit $ac_status); }; }; then
bf3b7cd3
JD
5529 ac_hi=$ac_mid
5530else
5531 echo "$as_me: failed program was:" >&5
5532sed 's/^/| /' conftest.$ac_ext >&5
5533
b61ff9c8 5534ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5535fi
b61ff9c8 5536rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5537done
5538case $ac_lo in
5539?*) ac_cv_sizeof_int=$ac_lo;;
18c04407
RW
5540'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5541echo "$as_me: error: in \`$ac_pwd':" >&2;}
5542{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 5543See \`config.log' for more details." >&5
b61ff9c8 5544echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 5545See \`config.log' for more details." >&2;}
18c04407 5546 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 5547esac
b61ff9c8
BS
5548else
5549 if test "$cross_compiling" = yes; then
18c04407
RW
5550 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5551echo "$as_me: error: in \`$ac_pwd':" >&2;}
5552{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
5553See \`config.log' for more details." >&5
5554echo "$as_me: error: cannot run test program while cross compiling
5555See \`config.log' for more details." >&2;}
18c04407 5556 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
5557else
5558 cat >conftest.$ac_ext <<_ACEOF
5559/* confdefs.h. */
5560_ACEOF
5561cat confdefs.h >>conftest.$ac_ext
5562cat >>conftest.$ac_ext <<_ACEOF
5563/* end confdefs.h. */
5564$ac_includes_default
b61ff9c8
BS
5565long longval () { return (long) (sizeof (int)); }
5566unsigned long ulongval () { return (long) (sizeof (int)); }
bf3b7cd3
JD
5567#include <stdio.h>
5568#include <stdlib.h>
5569int
5570main ()
5571{
5572
5573 FILE *f = fopen ("conftest.val", "w");
5574 if (! f)
b61ff9c8
BS
5575 exit (1);
5576 if (((long) (sizeof (int))) < 0)
bf3b7cd3 5577 {
b61ff9c8
BS
5578 long i = longval ();
5579 if (i != ((long) (sizeof (int))))
5580 exit (1);
bf3b7cd3
JD
5581 fprintf (f, "%ld\n", i);
5582 }
5583 else
5584 {
b61ff9c8
BS
5585 unsigned long i = ulongval ();
5586 if (i != ((long) (sizeof (int))))
5587 exit (1);
bf3b7cd3
JD
5588 fprintf (f, "%lu\n", i);
5589 }
b61ff9c8 5590 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5591
5592 ;
5593 return 0;
5594}
5595_ACEOF
5596rm -f conftest$ac_exeext
b61ff9c8
BS
5597if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5598 (eval $ac_link) 2>&5
bf3b7cd3
JD
5599 ac_status=$?
5600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5601 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5603 (eval $ac_try) 2>&5
bf3b7cd3
JD
5604 ac_status=$?
5605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5606 (exit $ac_status); }; }; then
5607 ac_cv_sizeof_int=`cat conftest.val`
5608else
5609 echo "$as_me: program exited with status $ac_status" >&5
5610echo "$as_me: failed program was:" >&5
5611sed 's/^/| /' conftest.$ac_ext >&5
5612
5613( exit $ac_status )
18c04407
RW
5614{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5615echo "$as_me: error: in \`$ac_pwd':" >&2;}
b61ff9c8 5616{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 5617See \`config.log' for more details." >&5
b61ff9c8 5618echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 5619See \`config.log' for more details." >&2;}
18c04407 5620 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
5621fi
5622rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5623fi
5624fi
5625rm -f conftest.val
b61ff9c8
BS
5626else
5627 ac_cv_sizeof_int=0
bf3b7cd3 5628fi
b61ff9c8
BS
5629fi
5630echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5631echo "${ECHO_T}$ac_cv_sizeof_int" >&6
bf3b7cd3
JD
5632cat >>confdefs.h <<_ACEOF
5633#define SIZEOF_INT $ac_cv_sizeof_int
5634_ACEOF
5635
5636
b61ff9c8
BS
5637echo "$as_me:$LINENO: checking for long" >&5
5638echo $ECHO_N "checking for long... $ECHO_C" >&6
bf3b7cd3
JD
5639if test "${ac_cv_type_long+set}" = set; then
5640 echo $ECHO_N "(cached) $ECHO_C" >&6
5641else
5642 cat >conftest.$ac_ext <<_ACEOF
5643/* confdefs.h. */
5644_ACEOF
5645cat confdefs.h >>conftest.$ac_ext
5646cat >>conftest.$ac_ext <<_ACEOF
5647/* end confdefs.h. */
5648$ac_includes_default
5649int
5650main ()
5651{
b61ff9c8 5652if ((long *) 0)
bf3b7cd3 5653 return 0;
b61ff9c8 5654if (sizeof (long))
bf3b7cd3
JD
5655 return 0;
5656 ;
5657 return 0;
5658}
5659_ACEOF
5660rm -f conftest.$ac_objext
b61ff9c8
BS
5661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5662 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5663 ac_status=$?
5664 grep -v '^ *+' conftest.er1 >conftest.err
5665 rm -f conftest.er1
5666 cat conftest.err >&5
5667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5668 (exit $ac_status); } &&
5669 { ac_try='test -z "$ac_c_werror_flag"
5670 || test ! -s conftest.err'
5671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5672 (eval $ac_try) 2>&5
5673 ac_status=$?
5674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5675 (exit $ac_status); }; } &&
5676 { ac_try='test -s conftest.$ac_objext'
5677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5678 (eval $ac_try) 2>&5
5679 ac_status=$?
5680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5681 (exit $ac_status); }; }; then
bf3b7cd3
JD
5682 ac_cv_type_long=yes
5683else
5684 echo "$as_me: failed program was:" >&5
5685sed 's/^/| /' conftest.$ac_ext >&5
5686
b61ff9c8 5687ac_cv_type_long=no
bf3b7cd3 5688fi
b61ff9c8 5689rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5690fi
b61ff9c8
BS
5691echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5692echo "${ECHO_T}$ac_cv_type_long" >&6
bf3b7cd3 5693
b61ff9c8
BS
5694echo "$as_me:$LINENO: checking size of long" >&5
5695echo $ECHO_N "checking size of long... $ECHO_C" >&6
bf3b7cd3
JD
5696if test "${ac_cv_sizeof_long+set}" = set; then
5697 echo $ECHO_N "(cached) $ECHO_C" >&6
5698else
b61ff9c8
BS
5699 if test "$ac_cv_type_long" = yes; then
5700 # The cast to unsigned long works around a bug in the HP C Compiler
5701 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5702 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5703 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5704 if test "$cross_compiling" = yes; then
5705 # Depending upon the size, compute the lo and hi bounds.
5706cat >conftest.$ac_ext <<_ACEOF
5707/* confdefs.h. */
5708_ACEOF
5709cat confdefs.h >>conftest.$ac_ext
5710cat >>conftest.$ac_ext <<_ACEOF
5711/* end confdefs.h. */
5712$ac_includes_default
5713int
5714main ()
5715{
b61ff9c8 5716static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
bf3b7cd3
JD
5717test_array [0] = 0
5718
5719 ;
5720 return 0;
5721}
5722_ACEOF
5723rm -f conftest.$ac_objext
b61ff9c8
BS
5724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5725 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5726 ac_status=$?
5727 grep -v '^ *+' conftest.er1 >conftest.err
5728 rm -f conftest.er1
5729 cat conftest.err >&5
5730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5731 (exit $ac_status); } &&
5732 { ac_try='test -z "$ac_c_werror_flag"
5733 || test ! -s conftest.err'
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); }; } &&
5739 { ac_try='test -s conftest.$ac_objext'
5740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5741 (eval $ac_try) 2>&5
5742 ac_status=$?
5743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5744 (exit $ac_status); }; }; then
bf3b7cd3
JD
5745 ac_lo=0 ac_mid=0
5746 while :; do
5747 cat >conftest.$ac_ext <<_ACEOF
5748/* confdefs.h. */
5749_ACEOF
5750cat confdefs.h >>conftest.$ac_ext
5751cat >>conftest.$ac_ext <<_ACEOF
5752/* end confdefs.h. */
5753$ac_includes_default
5754int
5755main ()
5756{
b61ff9c8 5757static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
5758test_array [0] = 0
5759
5760 ;
5761 return 0;
5762}
5763_ACEOF
5764rm -f conftest.$ac_objext
b61ff9c8
BS
5765if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5766 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5767 ac_status=$?
5768 grep -v '^ *+' conftest.er1 >conftest.err
5769 rm -f conftest.er1
5770 cat conftest.err >&5
5771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5772 (exit $ac_status); } &&
5773 { ac_try='test -z "$ac_c_werror_flag"
5774 || test ! -s conftest.err'
5775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5776 (eval $ac_try) 2>&5
5777 ac_status=$?
5778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5779 (exit $ac_status); }; } &&
5780 { ac_try='test -s conftest.$ac_objext'
5781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5782 (eval $ac_try) 2>&5
5783 ac_status=$?
5784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5785 (exit $ac_status); }; }; then
bf3b7cd3
JD
5786 ac_hi=$ac_mid; break
5787else
5788 echo "$as_me: failed program was:" >&5
5789sed 's/^/| /' conftest.$ac_ext >&5
5790
b61ff9c8
BS
5791ac_lo=`expr $ac_mid + 1`
5792 if test $ac_lo -le $ac_mid; then
5793 ac_lo= ac_hi=
5794 break
5795 fi
5796 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 5797fi
b61ff9c8 5798rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5799 done
5800else
5801 echo "$as_me: failed program was:" >&5
5802sed 's/^/| /' conftest.$ac_ext >&5
5803
b61ff9c8 5804cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5805/* confdefs.h. */
5806_ACEOF
5807cat confdefs.h >>conftest.$ac_ext
5808cat >>conftest.$ac_ext <<_ACEOF
5809/* end confdefs.h. */
5810$ac_includes_default
5811int
5812main ()
5813{
b61ff9c8 5814static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
bf3b7cd3
JD
5815test_array [0] = 0
5816
5817 ;
5818 return 0;
5819}
5820_ACEOF
5821rm -f conftest.$ac_objext
b61ff9c8
BS
5822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5823 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5824 ac_status=$?
5825 grep -v '^ *+' conftest.er1 >conftest.err
5826 rm -f conftest.er1
5827 cat conftest.err >&5
5828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5829 (exit $ac_status); } &&
5830 { ac_try='test -z "$ac_c_werror_flag"
5831 || test ! -s conftest.err'
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); }; } &&
5837 { ac_try='test -s conftest.$ac_objext'
5838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5839 (eval $ac_try) 2>&5
5840 ac_status=$?
5841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5842 (exit $ac_status); }; }; then
bf3b7cd3
JD
5843 ac_hi=-1 ac_mid=-1
5844 while :; do
5845 cat >conftest.$ac_ext <<_ACEOF
5846/* confdefs.h. */
5847_ACEOF
5848cat confdefs.h >>conftest.$ac_ext
5849cat >>conftest.$ac_ext <<_ACEOF
5850/* end confdefs.h. */
5851$ac_includes_default
5852int
5853main ()
5854{
b61ff9c8 5855static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
bf3b7cd3
JD
5856test_array [0] = 0
5857
5858 ;
5859 return 0;
5860}
5861_ACEOF
5862rm -f conftest.$ac_objext
b61ff9c8
BS
5863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5864 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5865 ac_status=$?
5866 grep -v '^ *+' conftest.er1 >conftest.err
5867 rm -f conftest.er1
5868 cat conftest.err >&5
5869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5870 (exit $ac_status); } &&
5871 { ac_try='test -z "$ac_c_werror_flag"
5872 || test ! -s conftest.err'
5873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5874 (eval $ac_try) 2>&5
5875 ac_status=$?
5876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5877 (exit $ac_status); }; } &&
5878 { ac_try='test -s conftest.$ac_objext'
5879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5880 (eval $ac_try) 2>&5
5881 ac_status=$?
5882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5883 (exit $ac_status); }; }; then
bf3b7cd3
JD
5884 ac_lo=$ac_mid; break
5885else
5886 echo "$as_me: failed program was:" >&5
5887sed 's/^/| /' conftest.$ac_ext >&5
5888
b61ff9c8
BS
5889ac_hi=`expr '(' $ac_mid ')' - 1`
5890 if test $ac_mid -le $ac_hi; then
5891 ac_lo= ac_hi=
5892 break
5893 fi
5894 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5895fi
b61ff9c8 5896rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5897 done
5898else
5899 echo "$as_me: failed program was:" >&5
5900sed 's/^/| /' conftest.$ac_ext >&5
5901
b61ff9c8 5902ac_lo= ac_hi=
bf3b7cd3 5903fi
b61ff9c8 5904rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5905fi
b61ff9c8 5906rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5907# Binary search between lo and hi bounds.
5908while test "x$ac_lo" != "x$ac_hi"; do
5909 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5910 cat >conftest.$ac_ext <<_ACEOF
5911/* confdefs.h. */
5912_ACEOF
5913cat confdefs.h >>conftest.$ac_ext
5914cat >>conftest.$ac_ext <<_ACEOF
5915/* end confdefs.h. */
5916$ac_includes_default
5917int
5918main ()
5919{
b61ff9c8 5920static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
5921test_array [0] = 0
5922
5923 ;
5924 return 0;
5925}
5926_ACEOF
5927rm -f conftest.$ac_objext
b61ff9c8
BS
5928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5929 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5930 ac_status=$?
5931 grep -v '^ *+' conftest.er1 >conftest.err
5932 rm -f conftest.er1
5933 cat conftest.err >&5
5934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5935 (exit $ac_status); } &&
5936 { ac_try='test -z "$ac_c_werror_flag"
5937 || test ! -s conftest.err'
5938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5939 (eval $ac_try) 2>&5
5940 ac_status=$?
5941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5942 (exit $ac_status); }; } &&
5943 { ac_try='test -s conftest.$ac_objext'
5944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5945 (eval $ac_try) 2>&5
5946 ac_status=$?
5947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5948 (exit $ac_status); }; }; then
bf3b7cd3
JD
5949 ac_hi=$ac_mid
5950else
5951 echo "$as_me: failed program was:" >&5
5952sed 's/^/| /' conftest.$ac_ext >&5
5953
b61ff9c8 5954ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5955fi
b61ff9c8 5956rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5957done
5958case $ac_lo in
5959?*) ac_cv_sizeof_long=$ac_lo;;
18c04407
RW
5960'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5961echo "$as_me: error: in \`$ac_pwd':" >&2;}
5962{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 5963See \`config.log' for more details." >&5
b61ff9c8 5964echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 5965See \`config.log' for more details." >&2;}
18c04407 5966 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 5967esac
b61ff9c8
BS
5968else
5969 if test "$cross_compiling" = yes; then
18c04407
RW
5970 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5971echo "$as_me: error: in \`$ac_pwd':" >&2;}
5972{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
5973See \`config.log' for more details." >&5
5974echo "$as_me: error: cannot run test program while cross compiling
5975See \`config.log' for more details." >&2;}
18c04407 5976 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
5977else
5978 cat >conftest.$ac_ext <<_ACEOF
5979/* confdefs.h. */
5980_ACEOF
5981cat confdefs.h >>conftest.$ac_ext
5982cat >>conftest.$ac_ext <<_ACEOF
5983/* end confdefs.h. */
5984$ac_includes_default
b61ff9c8
BS
5985long longval () { return (long) (sizeof (long)); }
5986unsigned long ulongval () { return (long) (sizeof (long)); }
bf3b7cd3
JD
5987#include <stdio.h>
5988#include <stdlib.h>
5989int
5990main ()
5991{
5992
5993 FILE *f = fopen ("conftest.val", "w");
5994 if (! f)
b61ff9c8
BS
5995 exit (1);
5996 if (((long) (sizeof (long))) < 0)
bf3b7cd3 5997 {
b61ff9c8
BS
5998 long i = longval ();
5999 if (i != ((long) (sizeof (long))))
6000 exit (1);
bf3b7cd3
JD
6001 fprintf (f, "%ld\n", i);
6002 }
6003 else
6004 {
b61ff9c8
BS
6005 unsigned long i = ulongval ();
6006 if (i != ((long) (sizeof (long))))
6007 exit (1);
bf3b7cd3
JD
6008 fprintf (f, "%lu\n", i);
6009 }
b61ff9c8 6010 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6011
6012 ;
6013 return 0;
6014}
6015_ACEOF
6016rm -f conftest$ac_exeext
b61ff9c8
BS
6017if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6018 (eval $ac_link) 2>&5
bf3b7cd3
JD
6019 ac_status=$?
6020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6021 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
6022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6023 (eval $ac_try) 2>&5
bf3b7cd3
JD
6024 ac_status=$?
6025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6026 (exit $ac_status); }; }; then
6027 ac_cv_sizeof_long=`cat conftest.val`
6028else
6029 echo "$as_me: program exited with status $ac_status" >&5
6030echo "$as_me: failed program was:" >&5
6031sed 's/^/| /' conftest.$ac_ext >&5
6032
6033( exit $ac_status )
18c04407
RW
6034{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6035echo "$as_me: error: in \`$ac_pwd':" >&2;}
b61ff9c8 6036{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 6037See \`config.log' for more details." >&5
b61ff9c8 6038echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 6039See \`config.log' for more details." >&2;}
18c04407 6040 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
6041fi
6042rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6043fi
6044fi
6045rm -f conftest.val
b61ff9c8
BS
6046else
6047 ac_cv_sizeof_long=0
bf3b7cd3 6048fi
b61ff9c8
BS
6049fi
6050echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6051echo "${ECHO_T}$ac_cv_sizeof_long" >&6
bf3b7cd3
JD
6052cat >>confdefs.h <<_ACEOF
6053#define SIZEOF_LONG $ac_cv_sizeof_long
6054_ACEOF
6055
6056
b61ff9c8
BS
6057echo "$as_me:$LINENO: checking for long long" >&5
6058echo $ECHO_N "checking for long long... $ECHO_C" >&6
5ec1c5e6
KC
6059if test "${ac_cv_type_long_long+set}" = set; then
6060 echo $ECHO_N "(cached) $ECHO_C" >&6
6061else
6062 cat >conftest.$ac_ext <<_ACEOF
6063/* confdefs.h. */
6064_ACEOF
6065cat confdefs.h >>conftest.$ac_ext
6066cat >>conftest.$ac_ext <<_ACEOF
6067/* end confdefs.h. */
6068$ac_includes_default
6069int
6070main ()
6071{
b61ff9c8 6072if ((long long *) 0)
5ec1c5e6 6073 return 0;
b61ff9c8 6074if (sizeof (long long))
5ec1c5e6
KC
6075 return 0;
6076 ;
6077 return 0;
6078}
6079_ACEOF
6080rm -f conftest.$ac_objext
b61ff9c8
BS
6081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6082 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
6083 ac_status=$?
6084 grep -v '^ *+' conftest.er1 >conftest.err
6085 rm -f conftest.er1
6086 cat conftest.err >&5
6087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6088 (exit $ac_status); } &&
6089 { ac_try='test -z "$ac_c_werror_flag"
6090 || test ! -s conftest.err'
6091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6092 (eval $ac_try) 2>&5
6093 ac_status=$?
6094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6095 (exit $ac_status); }; } &&
6096 { ac_try='test -s conftest.$ac_objext'
6097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6098 (eval $ac_try) 2>&5
6099 ac_status=$?
6100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6101 (exit $ac_status); }; }; then
5ec1c5e6
KC
6102 ac_cv_type_long_long=yes
6103else
6104 echo "$as_me: failed program was:" >&5
6105sed 's/^/| /' conftest.$ac_ext >&5
6106
b61ff9c8 6107ac_cv_type_long_long=no
5ec1c5e6 6108fi
b61ff9c8 6109rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 6110fi
b61ff9c8
BS
6111echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
6112echo "${ECHO_T}$ac_cv_type_long_long" >&6
5ec1c5e6
KC
6113if test $ac_cv_type_long_long = yes; then
6114
6115cat >>confdefs.h <<_ACEOF
6116#define HAVE_LONG_LONG 1
6117_ACEOF
6118
b61ff9c8
BS
6119echo "$as_me:$LINENO: checking for long long" >&5
6120echo $ECHO_N "checking for long long... $ECHO_C" >&6
bf3b7cd3
JD
6121if test "${ac_cv_type_long_long+set}" = set; then
6122 echo $ECHO_N "(cached) $ECHO_C" >&6
6123else
6124 cat >conftest.$ac_ext <<_ACEOF
6125/* confdefs.h. */
6126_ACEOF
6127cat confdefs.h >>conftest.$ac_ext
6128cat >>conftest.$ac_ext <<_ACEOF
6129/* end confdefs.h. */
6130$ac_includes_default
6131int
6132main ()
6133{
b61ff9c8 6134if ((long long *) 0)
bf3b7cd3 6135 return 0;
b61ff9c8 6136if (sizeof (long long))
bf3b7cd3
JD
6137 return 0;
6138 ;
6139 return 0;
6140}
6141_ACEOF
6142rm -f conftest.$ac_objext
b61ff9c8
BS
6143if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6144 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6145 ac_status=$?
6146 grep -v '^ *+' conftest.er1 >conftest.err
6147 rm -f conftest.er1
6148 cat conftest.err >&5
6149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6150 (exit $ac_status); } &&
6151 { ac_try='test -z "$ac_c_werror_flag"
6152 || test ! -s conftest.err'
6153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6154 (eval $ac_try) 2>&5
6155 ac_status=$?
6156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6157 (exit $ac_status); }; } &&
6158 { ac_try='test -s conftest.$ac_objext'
6159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6160 (eval $ac_try) 2>&5
6161 ac_status=$?
6162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6163 (exit $ac_status); }; }; then
6164 ac_cv_type_long_long=yes
6165else
bf3b7cd3
JD
6166 echo "$as_me: failed program was:" >&5
6167sed 's/^/| /' conftest.$ac_ext >&5
6168
b61ff9c8 6169ac_cv_type_long_long=no
bf3b7cd3 6170fi
b61ff9c8 6171rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6172fi
b61ff9c8
BS
6173echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
6174echo "${ECHO_T}$ac_cv_type_long_long" >&6
bf3b7cd3 6175
b61ff9c8
BS
6176echo "$as_me:$LINENO: checking size of long long" >&5
6177echo $ECHO_N "checking size of long long... $ECHO_C" >&6
bf3b7cd3
JD
6178if test "${ac_cv_sizeof_long_long+set}" = set; then
6179 echo $ECHO_N "(cached) $ECHO_C" >&6
6180else
b61ff9c8
BS
6181 if test "$ac_cv_type_long_long" = yes; then
6182 # The cast to unsigned long works around a bug in the HP C Compiler
6183 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6184 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6185 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
6186 if test "$cross_compiling" = yes; then
6187 # Depending upon the size, compute the lo and hi bounds.
6188cat >conftest.$ac_ext <<_ACEOF
6189/* confdefs.h. */
6190_ACEOF
6191cat confdefs.h >>conftest.$ac_ext
6192cat >>conftest.$ac_ext <<_ACEOF
6193/* end confdefs.h. */
6194$ac_includes_default
6195int
6196main ()
6197{
b61ff9c8 6198static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
bf3b7cd3
JD
6199test_array [0] = 0
6200
6201 ;
6202 return 0;
6203}
6204_ACEOF
6205rm -f conftest.$ac_objext
b61ff9c8
BS
6206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6207 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6208 ac_status=$?
6209 grep -v '^ *+' conftest.er1 >conftest.err
6210 rm -f conftest.er1
6211 cat conftest.err >&5
6212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6213 (exit $ac_status); } &&
6214 { ac_try='test -z "$ac_c_werror_flag"
6215 || test ! -s conftest.err'
6216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6217 (eval $ac_try) 2>&5
6218 ac_status=$?
6219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6220 (exit $ac_status); }; } &&
6221 { ac_try='test -s conftest.$ac_objext'
6222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6223 (eval $ac_try) 2>&5
6224 ac_status=$?
6225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6226 (exit $ac_status); }; }; then
bf3b7cd3
JD
6227 ac_lo=0 ac_mid=0
6228 while :; do
6229 cat >conftest.$ac_ext <<_ACEOF
6230/* confdefs.h. */
6231_ACEOF
6232cat confdefs.h >>conftest.$ac_ext
6233cat >>conftest.$ac_ext <<_ACEOF
6234/* end confdefs.h. */
6235$ac_includes_default
6236int
6237main ()
6238{
b61ff9c8 6239static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
6240test_array [0] = 0
6241
6242 ;
6243 return 0;
6244}
6245_ACEOF
6246rm -f conftest.$ac_objext
b61ff9c8
BS
6247if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6248 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6249 ac_status=$?
6250 grep -v '^ *+' conftest.er1 >conftest.err
6251 rm -f conftest.er1
6252 cat conftest.err >&5
6253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6254 (exit $ac_status); } &&
6255 { ac_try='test -z "$ac_c_werror_flag"
6256 || test ! -s conftest.err'
6257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6258 (eval $ac_try) 2>&5
6259 ac_status=$?
6260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6261 (exit $ac_status); }; } &&
6262 { ac_try='test -s conftest.$ac_objext'
6263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6264 (eval $ac_try) 2>&5
6265 ac_status=$?
6266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6267 (exit $ac_status); }; }; then
8b1f719a 6268 ac_hi=$ac_mid; break
bf3b7cd3
JD
6269else
6270 echo "$as_me: failed program was:" >&5
6271sed 's/^/| /' conftest.$ac_ext >&5
6272
b61ff9c8
BS
6273ac_lo=`expr $ac_mid + 1`
6274 if test $ac_lo -le $ac_mid; then
6275 ac_lo= ac_hi=
6276 break
6277 fi
6278 ac_mid=`expr 2 '*' $ac_mid + 1`
8b1f719a 6279fi
b61ff9c8 6280rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8b1f719a
PB
6281 done
6282else
6283 echo "$as_me: failed program was:" >&5
6284sed 's/^/| /' conftest.$ac_ext >&5
6285
b61ff9c8 6286cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
6287/* confdefs.h. */
6288_ACEOF
6289cat confdefs.h >>conftest.$ac_ext
6290cat >>conftest.$ac_ext <<_ACEOF
6291/* end confdefs.h. */
6292$ac_includes_default
6293int
6294main ()
6295{
b61ff9c8 6296static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
bf3b7cd3
JD
6297test_array [0] = 0
6298
6299 ;
6300 return 0;
6301}
6302_ACEOF
6303rm -f conftest.$ac_objext
b61ff9c8
BS
6304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6305 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6306 ac_status=$?
6307 grep -v '^ *+' conftest.er1 >conftest.err
6308 rm -f conftest.er1
6309 cat conftest.err >&5
6310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6311 (exit $ac_status); } &&
6312 { ac_try='test -z "$ac_c_werror_flag"
6313 || test ! -s conftest.err'
6314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6315 (eval $ac_try) 2>&5
6316 ac_status=$?
6317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6318 (exit $ac_status); }; } &&
6319 { ac_try='test -s conftest.$ac_objext'
6320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6321 (eval $ac_try) 2>&5
6322 ac_status=$?
6323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6324 (exit $ac_status); }; }; then
bf3b7cd3
JD
6325 ac_hi=-1 ac_mid=-1
6326 while :; do
6327 cat >conftest.$ac_ext <<_ACEOF
6328/* confdefs.h. */
6329_ACEOF
6330cat confdefs.h >>conftest.$ac_ext
6331cat >>conftest.$ac_ext <<_ACEOF
6332/* end confdefs.h. */
6333$ac_includes_default
6334int
6335main ()
6336{
b61ff9c8 6337static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
bf3b7cd3
JD
6338test_array [0] = 0
6339
6340 ;
6341 return 0;
6342}
6343_ACEOF
6344rm -f conftest.$ac_objext
b61ff9c8
BS
6345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6346 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6347 ac_status=$?
6348 grep -v '^ *+' conftest.er1 >conftest.err
6349 rm -f conftest.er1
6350 cat conftest.err >&5
6351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6352 (exit $ac_status); } &&
6353 { ac_try='test -z "$ac_c_werror_flag"
6354 || test ! -s conftest.err'
6355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6356 (eval $ac_try) 2>&5
6357 ac_status=$?
6358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6359 (exit $ac_status); }; } &&
6360 { ac_try='test -s conftest.$ac_objext'
6361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6362 (eval $ac_try) 2>&5
6363 ac_status=$?
6364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6365 (exit $ac_status); }; }; then
bf3b7cd3
JD
6366 ac_lo=$ac_mid; break
6367else
6368 echo "$as_me: failed program was:" >&5
6369sed 's/^/| /' conftest.$ac_ext >&5
6370
b61ff9c8
BS
6371ac_hi=`expr '(' $ac_mid ')' - 1`
6372 if test $ac_mid -le $ac_hi; then
6373 ac_lo= ac_hi=
6374 break
6375 fi
6376 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 6377fi
b61ff9c8 6378rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6379 done
6380else
6381 echo "$as_me: failed program was:" >&5
6382sed 's/^/| /' conftest.$ac_ext >&5
6383
b61ff9c8 6384ac_lo= ac_hi=
bf3b7cd3 6385fi
b61ff9c8 6386rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6387fi
b61ff9c8 6388rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6389# Binary search between lo and hi bounds.
6390while test "x$ac_lo" != "x$ac_hi"; do
6391 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6392 cat >conftest.$ac_ext <<_ACEOF
6393/* confdefs.h. */
6394_ACEOF
6395cat confdefs.h >>conftest.$ac_ext
6396cat >>conftest.$ac_ext <<_ACEOF
6397/* end confdefs.h. */
6398$ac_includes_default
6399int
6400main ()
6401{
b61ff9c8 6402static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
6403test_array [0] = 0
6404
6405 ;
6406 return 0;
6407}
6408_ACEOF
6409rm -f conftest.$ac_objext
b61ff9c8
BS
6410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6411 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
6412 ac_status=$?
6413 grep -v '^ *+' conftest.er1 >conftest.err
6414 rm -f conftest.er1
6415 cat conftest.err >&5
6416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6417 (exit $ac_status); } &&
6418 { ac_try='test -z "$ac_c_werror_flag"
6419 || test ! -s conftest.err'
6420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6421 (eval $ac_try) 2>&5
6422 ac_status=$?
6423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6424 (exit $ac_status); }; } &&
6425 { ac_try='test -s conftest.$ac_objext'
6426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6427 (eval $ac_try) 2>&5
6428 ac_status=$?
6429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6430 (exit $ac_status); }; }; then
bf3b7cd3
JD
6431 ac_hi=$ac_mid
6432else
6433 echo "$as_me: failed program was:" >&5
6434sed 's/^/| /' conftest.$ac_ext >&5
6435
b61ff9c8 6436ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 6437fi
b61ff9c8 6438rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6439done
6440case $ac_lo in
6441?*) ac_cv_sizeof_long_long=$ac_lo;;
18c04407
RW
6442'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6443echo "$as_me: error: in \`$ac_pwd':" >&2;}
6444{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 6445See \`config.log' for more details." >&5
b61ff9c8 6446echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 6447See \`config.log' for more details." >&2;}
18c04407 6448 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 6449esac
b61ff9c8
BS
6450else
6451 if test "$cross_compiling" = yes; then
18c04407
RW
6452 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6453echo "$as_me: error: in \`$ac_pwd':" >&2;}
6454{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
6455See \`config.log' for more details." >&5
6456echo "$as_me: error: cannot run test program while cross compiling
6457See \`config.log' for more details." >&2;}
18c04407 6458 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
6459else
6460 cat >conftest.$ac_ext <<_ACEOF
6461/* confdefs.h. */
6462_ACEOF
6463cat confdefs.h >>conftest.$ac_ext
6464cat >>conftest.$ac_ext <<_ACEOF
6465/* end confdefs.h. */
6466$ac_includes_default
b61ff9c8
BS
6467long longval () { return (long) (sizeof (long long)); }
6468unsigned long ulongval () { return (long) (sizeof (long long)); }
bf3b7cd3
JD
6469#include <stdio.h>
6470#include <stdlib.h>
6471int
6472main ()
6473{
6474
6475 FILE *f = fopen ("conftest.val", "w");
6476 if (! f)
b61ff9c8
BS
6477 exit (1);
6478 if (((long) (sizeof (long long))) < 0)
bf3b7cd3 6479 {
b61ff9c8
BS
6480 long i = longval ();
6481 if (i != ((long) (sizeof (long long))))
6482 exit (1);
bf3b7cd3
JD
6483 fprintf (f, "%ld\n", i);
6484 }
6485 else
6486 {
b61ff9c8
BS
6487 unsigned long i = ulongval ();
6488 if (i != ((long) (sizeof (long long))))
6489 exit (1);
bf3b7cd3
JD
6490 fprintf (f, "%lu\n", i);
6491 }
b61ff9c8 6492 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6493
6494 ;
6495 return 0;
6496}
6497_ACEOF
6498rm -f conftest$ac_exeext
b61ff9c8
BS
6499if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6500 (eval $ac_link) 2>&5
bf3b7cd3
JD
6501 ac_status=$?
6502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6503 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
6504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6505 (eval $ac_try) 2>&5
bf3b7cd3
JD
6506 ac_status=$?
6507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6508 (exit $ac_status); }; }; then
6509 ac_cv_sizeof_long_long=`cat conftest.val`
6510else
6511 echo "$as_me: program exited with status $ac_status" >&5
6512echo "$as_me: failed program was:" >&5
6513sed 's/^/| /' conftest.$ac_ext >&5
6514
6515( exit $ac_status )
18c04407
RW
6516{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6517echo "$as_me: error: in \`$ac_pwd':" >&2;}
b61ff9c8 6518{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 6519See \`config.log' for more details." >&5
b61ff9c8 6520echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 6521See \`config.log' for more details." >&2;}
18c04407 6522 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
6523fi
6524rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6525fi
6526fi
6527rm -f conftest.val
b61ff9c8
BS
6528else
6529 ac_cv_sizeof_long_long=0
2f41c1d6 6530fi
b61ff9c8
BS
6531fi
6532echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
6533echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
bf3b7cd3
JD
6534cat >>confdefs.h <<_ACEOF
6535#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
6536_ACEOF
6537
6538
6539fi
5ec1c5e6 6540
b61ff9c8
BS
6541echo "$as_me:$LINENO: checking for __int64" >&5
6542echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5ec1c5e6
KC
6543if test "${ac_cv_type___int64+set}" = set; then
6544 echo $ECHO_N "(cached) $ECHO_C" >&6
6545else
6546 cat >conftest.$ac_ext <<_ACEOF
6547/* confdefs.h. */
6548_ACEOF
6549cat confdefs.h >>conftest.$ac_ext
6550cat >>conftest.$ac_ext <<_ACEOF
6551/* end confdefs.h. */
6552$ac_includes_default
6553int
6554main ()
6555{
b61ff9c8 6556if ((__int64 *) 0)
5ec1c5e6 6557 return 0;
b61ff9c8 6558if (sizeof (__int64))
5ec1c5e6
KC
6559 return 0;
6560 ;
6561 return 0;
6562}
6563_ACEOF
6564rm -f conftest.$ac_objext
b61ff9c8
BS
6565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6566 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
6567 ac_status=$?
6568 grep -v '^ *+' conftest.er1 >conftest.err
6569 rm -f conftest.er1
6570 cat conftest.err >&5
6571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6572 (exit $ac_status); } &&
6573 { ac_try='test -z "$ac_c_werror_flag"
6574 || test ! -s conftest.err'
6575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6576 (eval $ac_try) 2>&5
6577 ac_status=$?
6578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6579 (exit $ac_status); }; } &&
6580 { ac_try='test -s conftest.$ac_objext'
6581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6582 (eval $ac_try) 2>&5
6583 ac_status=$?
6584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6585 (exit $ac_status); }; }; then
5ec1c5e6
KC
6586 ac_cv_type___int64=yes
6587else
6588 echo "$as_me: failed program was:" >&5
6589sed 's/^/| /' conftest.$ac_ext >&5
6590
b61ff9c8 6591ac_cv_type___int64=no
5ec1c5e6 6592fi
b61ff9c8 6593rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 6594fi
b61ff9c8
BS
6595echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
6596echo "${ECHO_T}$ac_cv_type___int64" >&6
5ec1c5e6
KC
6597if test $ac_cv_type___int64 = yes; then
6598
6599cat >>confdefs.h <<_ACEOF
6600#define HAVE___INT64 1
6601_ACEOF
6602
b61ff9c8
BS
6603echo "$as_me:$LINENO: checking for __int64" >&5
6604echo $ECHO_N "checking for __int64... $ECHO_C" >&6
bf3b7cd3
JD
6605if test "${ac_cv_type___int64+set}" = set; then
6606 echo $ECHO_N "(cached) $ECHO_C" >&6
6607else
ba479fd2 6608 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6609/* confdefs.h. */
6610_ACEOF
6611cat confdefs.h >>conftest.$ac_ext
6612cat >>conftest.$ac_ext <<_ACEOF
6613/* end confdefs.h. */
bf3b7cd3 6614$ac_includes_default
ba479fd2
NN
6615int
6616main ()
6617{
b61ff9c8 6618if ((__int64 *) 0)
bf3b7cd3 6619 return 0;
b61ff9c8 6620if (sizeof (__int64))
bf3b7cd3 6621 return 0;
ba479fd2
NN
6622 ;
6623 return 0;
6624}
6625_ACEOF
6626rm -f conftest.$ac_objext
b61ff9c8
BS
6627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6628 (eval $ac_compile) 2>conftest.er1
ba479fd2 6629 ac_status=$?
86da66b5
HPN
6630 grep -v '^ *+' conftest.er1 >conftest.err
6631 rm -f conftest.er1
6632 cat conftest.err >&5
ba479fd2 6633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6634 (exit $ac_status); } &&
6635 { ac_try='test -z "$ac_c_werror_flag"
6636 || test ! -s conftest.err'
6637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6638 (eval $ac_try) 2>&5
6639 ac_status=$?
6640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6641 (exit $ac_status); }; } &&
6642 { ac_try='test -s conftest.$ac_objext'
6643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6644 (eval $ac_try) 2>&5
6645 ac_status=$?
6646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6647 (exit $ac_status); }; }; then
bf3b7cd3 6648 ac_cv_type___int64=yes
75b6f3fd 6649else
ba479fd2
NN
6650 echo "$as_me: failed program was:" >&5
6651sed 's/^/| /' conftest.$ac_ext >&5
6652
b61ff9c8 6653ac_cv_type___int64=no
75b6f3fd 6654fi
b61ff9c8 6655rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 6656fi
b61ff9c8
BS
6657echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
6658echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 6659
b61ff9c8
BS
6660echo "$as_me:$LINENO: checking size of __int64" >&5
6661echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
bf3b7cd3 6662if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 6663 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 6664else
b61ff9c8
BS
6665 if test "$ac_cv_type___int64" = yes; then
6666 # The cast to unsigned long works around a bug in the HP C Compiler
6667 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6668 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6669 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
6670 if test "$cross_compiling" = yes; then
6671 # Depending upon the size, compute the lo and hi bounds.
6672cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6673/* confdefs.h. */
6674_ACEOF
6675cat confdefs.h >>conftest.$ac_ext
6676cat >>conftest.$ac_ext <<_ACEOF
6677/* end confdefs.h. */
bf3b7cd3 6678$ac_includes_default
ba479fd2
NN
6679int
6680main ()
6681{
b61ff9c8 6682static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
bf3b7cd3
JD
6683test_array [0] = 0
6684
ba479fd2
NN
6685 ;
6686 return 0;
6687}
6688_ACEOF
6689rm -f conftest.$ac_objext
b61ff9c8
BS
6690if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6691 (eval $ac_compile) 2>conftest.er1
ba479fd2 6692 ac_status=$?
86da66b5
HPN
6693 grep -v '^ *+' conftest.er1 >conftest.err
6694 rm -f conftest.er1
6695 cat conftest.err >&5
ba479fd2 6696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6697 (exit $ac_status); } &&
6698 { ac_try='test -z "$ac_c_werror_flag"
6699 || test ! -s conftest.err'
6700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6701 (eval $ac_try) 2>&5
6702 ac_status=$?
6703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6704 (exit $ac_status); }; } &&
6705 { ac_try='test -s conftest.$ac_objext'
6706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6707 (eval $ac_try) 2>&5
6708 ac_status=$?
6709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6710 (exit $ac_status); }; }; then
bf3b7cd3
JD
6711 ac_lo=0 ac_mid=0
6712 while :; do
6713 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6714/* confdefs.h. */
6715_ACEOF
6716cat confdefs.h >>conftest.$ac_ext
6717cat >>conftest.$ac_ext <<_ACEOF
6718/* end confdefs.h. */
bf3b7cd3 6719$ac_includes_default
ba479fd2
NN
6720int
6721main ()
6722{
b61ff9c8 6723static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
bf3b7cd3
JD
6724test_array [0] = 0
6725
ba479fd2
NN
6726 ;
6727 return 0;
6728}
6729_ACEOF
6730rm -f conftest.$ac_objext
b61ff9c8
BS
6731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6732 (eval $ac_compile) 2>conftest.er1
ba479fd2 6733 ac_status=$?
86da66b5
HPN
6734 grep -v '^ *+' conftest.er1 >conftest.err
6735 rm -f conftest.er1
6736 cat conftest.err >&5
ba479fd2 6737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6738 (exit $ac_status); } &&
6739 { ac_try='test -z "$ac_c_werror_flag"
6740 || test ! -s conftest.err'
6741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6742 (eval $ac_try) 2>&5
6743 ac_status=$?
6744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6745 (exit $ac_status); }; } &&
6746 { ac_try='test -s conftest.$ac_objext'
6747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6748 (eval $ac_try) 2>&5
6749 ac_status=$?
6750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6751 (exit $ac_status); }; }; then
bf3b7cd3 6752 ac_hi=$ac_mid; break
75e93faa 6753else
ba479fd2
NN
6754 echo "$as_me: failed program was:" >&5
6755sed 's/^/| /' conftest.$ac_ext >&5
6756
b61ff9c8
BS
6757ac_lo=`expr $ac_mid + 1`
6758 if test $ac_lo -le $ac_mid; then
6759 ac_lo= ac_hi=
6760 break
6761 fi
6762 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 6763fi
b61ff9c8 6764rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6765 done
75e93faa 6766else
bf3b7cd3
JD
6767 echo "$as_me: failed program was:" >&5
6768sed 's/^/| /' conftest.$ac_ext >&5
6769
b61ff9c8 6770cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6771/* confdefs.h. */
6772_ACEOF
6773cat confdefs.h >>conftest.$ac_ext
6774cat >>conftest.$ac_ext <<_ACEOF
6775/* end confdefs.h. */
bf3b7cd3 6776$ac_includes_default
ba479fd2
NN
6777int
6778main ()
6779{
b61ff9c8 6780static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
bf3b7cd3
JD
6781test_array [0] = 0
6782
ba479fd2
NN
6783 ;
6784 return 0;
6785}
6786_ACEOF
6787rm -f conftest.$ac_objext
b61ff9c8
BS
6788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6789 (eval $ac_compile) 2>conftest.er1
ba479fd2 6790 ac_status=$?
86da66b5
HPN
6791 grep -v '^ *+' conftest.er1 >conftest.err
6792 rm -f conftest.er1
6793 cat conftest.err >&5
ba479fd2 6794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6795 (exit $ac_status); } &&
6796 { ac_try='test -z "$ac_c_werror_flag"
6797 || test ! -s conftest.err'
6798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6799 (eval $ac_try) 2>&5
6800 ac_status=$?
6801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6802 (exit $ac_status); }; } &&
6803 { ac_try='test -s conftest.$ac_objext'
6804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6805 (eval $ac_try) 2>&5
6806 ac_status=$?
6807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6808 (exit $ac_status); }; }; then
bf3b7cd3
JD
6809 ac_hi=-1 ac_mid=-1
6810 while :; do
6811 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6812/* confdefs.h. */
6813_ACEOF
6814cat confdefs.h >>conftest.$ac_ext
6815cat >>conftest.$ac_ext <<_ACEOF
6816/* end confdefs.h. */
bf3b7cd3 6817$ac_includes_default
ba479fd2
NN
6818int
6819main ()
6820{
b61ff9c8 6821static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
bf3b7cd3
JD
6822test_array [0] = 0
6823
ba479fd2
NN
6824 ;
6825 return 0;
6826}
6827_ACEOF
6828rm -f conftest.$ac_objext
b61ff9c8
BS
6829if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6830 (eval $ac_compile) 2>conftest.er1
ba479fd2 6831 ac_status=$?
86da66b5
HPN
6832 grep -v '^ *+' conftest.er1 >conftest.err
6833 rm -f conftest.er1
6834 cat conftest.err >&5
ba479fd2 6835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6836 (exit $ac_status); } &&
6837 { ac_try='test -z "$ac_c_werror_flag"
6838 || test ! -s conftest.err'
6839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6840 (eval $ac_try) 2>&5
6841 ac_status=$?
6842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6843 (exit $ac_status); }; } &&
6844 { ac_try='test -s conftest.$ac_objext'
6845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6846 (eval $ac_try) 2>&5
6847 ac_status=$?
6848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6849 (exit $ac_status); }; }; then
bf3b7cd3 6850 ac_lo=$ac_mid; break
04cabffc 6851else
ba479fd2
NN
6852 echo "$as_me: failed program was:" >&5
6853sed 's/^/| /' conftest.$ac_ext >&5
6854
b61ff9c8
BS
6855ac_hi=`expr '(' $ac_mid ')' - 1`
6856 if test $ac_mid -le $ac_hi; then
6857 ac_lo= ac_hi=
6858 break
6859 fi
6860 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 6861fi
b61ff9c8 6862rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6863 done
6864else
6865 echo "$as_me: failed program was:" >&5
6866sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 6867
b61ff9c8 6868ac_lo= ac_hi=
414d23ae 6869fi
b61ff9c8 6870rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6871fi
b61ff9c8 6872rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6873# Binary search between lo and hi bounds.
6874while test "x$ac_lo" != "x$ac_hi"; do
6875 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 6876 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6877/* confdefs.h. */
6878_ACEOF
6879cat confdefs.h >>conftest.$ac_ext
6880cat >>conftest.$ac_ext <<_ACEOF
6881/* end confdefs.h. */
bf3b7cd3 6882$ac_includes_default
ba479fd2
NN
6883int
6884main ()
6885{
b61ff9c8 6886static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
bf3b7cd3
JD
6887test_array [0] = 0
6888
ba479fd2
NN
6889 ;
6890 return 0;
6891}
6892_ACEOF
6893rm -f conftest.$ac_objext
b61ff9c8
BS
6894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6895 (eval $ac_compile) 2>conftest.er1
ba479fd2 6896 ac_status=$?
86da66b5
HPN
6897 grep -v '^ *+' conftest.er1 >conftest.err
6898 rm -f conftest.er1
6899 cat conftest.err >&5
ba479fd2 6900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6901 (exit $ac_status); } &&
6902 { ac_try='test -z "$ac_c_werror_flag"
6903 || test ! -s conftest.err'
6904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6905 (eval $ac_try) 2>&5
6906 ac_status=$?
6907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6908 (exit $ac_status); }; } &&
6909 { ac_try='test -s conftest.$ac_objext'
6910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6911 (eval $ac_try) 2>&5
6912 ac_status=$?
6913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6914 (exit $ac_status); }; }; then
bf3b7cd3 6915 ac_hi=$ac_mid
75e93faa 6916else
ba479fd2
NN
6917 echo "$as_me: failed program was:" >&5
6918sed 's/^/| /' conftest.$ac_ext >&5
6919
b61ff9c8 6920ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 6921fi
b61ff9c8 6922rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6923done
bf3b7cd3
JD
6924case $ac_lo in
6925?*) ac_cv_sizeof___int64=$ac_lo;;
18c04407
RW
6926'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6927echo "$as_me: error: in \`$ac_pwd':" >&2;}
6928{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6929See \`config.log' for more details." >&5
b61ff9c8 6930echo "$as_me: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6931See \`config.log' for more details." >&2;}
18c04407 6932 { (exit 1); exit 1; }; }; } ;;
bf3b7cd3 6933esac
b61ff9c8
BS
6934else
6935 if test "$cross_compiling" = yes; then
18c04407
RW
6936 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6937echo "$as_me: error: in \`$ac_pwd':" >&2;}
6938{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
b61ff9c8
BS
6939See \`config.log' for more details." >&5
6940echo "$as_me: error: cannot run test program while cross compiling
6941See \`config.log' for more details." >&2;}
18c04407 6942 { (exit 1); exit 1; }; }; }
bf3b7cd3
JD
6943else
6944 cat >conftest.$ac_ext <<_ACEOF
6945/* confdefs.h. */
6946_ACEOF
6947cat confdefs.h >>conftest.$ac_ext
6948cat >>conftest.$ac_ext <<_ACEOF
6949/* end confdefs.h. */
6950$ac_includes_default
b61ff9c8
BS
6951long longval () { return (long) (sizeof (__int64)); }
6952unsigned long ulongval () { return (long) (sizeof (__int64)); }
bf3b7cd3
JD
6953#include <stdio.h>
6954#include <stdlib.h>
6955int
6956main ()
6957{
414d23ae 6958
bf3b7cd3
JD
6959 FILE *f = fopen ("conftest.val", "w");
6960 if (! f)
b61ff9c8
BS
6961 exit (1);
6962 if (((long) (sizeof (__int64))) < 0)
bf3b7cd3 6963 {
b61ff9c8
BS
6964 long i = longval ();
6965 if (i != ((long) (sizeof (__int64))))
6966 exit (1);
bf3b7cd3
JD
6967 fprintf (f, "%ld\n", i);
6968 }
6969 else
6970 {
b61ff9c8
BS
6971 unsigned long i = ulongval ();
6972 if (i != ((long) (sizeof (__int64))))
6973 exit (1);
bf3b7cd3
JD
6974 fprintf (f, "%lu\n", i);
6975 }
b61ff9c8 6976 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6977
6978 ;
6979 return 0;
6980}
6981_ACEOF
6982rm -f conftest$ac_exeext
b61ff9c8
BS
6983if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6984 (eval $ac_link) 2>&5
bf3b7cd3
JD
6985 ac_status=$?
6986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6987 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
6988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6989 (eval $ac_try) 2>&5
bf3b7cd3
JD
6990 ac_status=$?
6991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6992 (exit $ac_status); }; }; then
6993 ac_cv_sizeof___int64=`cat conftest.val`
6994else
6995 echo "$as_me: program exited with status $ac_status" >&5
6996echo "$as_me: failed program was:" >&5
6997sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6998
bf3b7cd3 6999( exit $ac_status )
18c04407
RW
7000{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7001echo "$as_me: error: in \`$ac_pwd':" >&2;}
b61ff9c8 7002{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
bf3b7cd3 7003See \`config.log' for more details." >&5
b61ff9c8 7004echo "$as_me: error: cannot compute sizeof (__int64), 77
bf3b7cd3 7005See \`config.log' for more details." >&2;}
18c04407 7006 { (exit 1); exit 1; }; }; }
b61ff9c8
BS
7007fi
7008rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
7009fi
7010fi
7011rm -f conftest.val
b61ff9c8
BS
7012else
7013 ac_cv_sizeof___int64=0
bf3b7cd3 7014fi
b61ff9c8
BS
7015fi
7016echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
7017echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 7018cat >>confdefs.h <<_ACEOF
414d23ae 7019#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 7020_ACEOF
414d23ae 7021
cafe096b 7022
414d23ae
HPN
7023fi
7024
5ec1c5e6 7025
34a86c2b
NN
7026# ---------------------
7027# Warnings and checking
7028# ---------------------
7029
b5472e1d
NN
7030# Check $CC warning features (if it's GCC).
7031# We want to use -pedantic, but we don't want warnings about
7032# * 'long long'
7033# * variadic macros
89a42ac8 7034# * overlong strings
b5472e1d
NN
7035# So, we only use -pedantic if we can disable those warnings.
7036
3bbd5a19
PB
7037loose_warn=
7038save_CFLAGS="$CFLAGS"
f6e377f8 7039for option in -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual; do
3bbd5a19
PB
7040 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
7041
b61ff9c8
BS
7042 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
7043echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
7044if eval "test \"\${$as_acx_Woption+set}\" = set"; then
b5472e1d
NN
7045 echo $ECHO_N "(cached) $ECHO_C" >&6
7046else
3bbd5a19
PB
7047 CFLAGS="$option"
7048 cat >conftest.$ac_ext <<_ACEOF
b5472e1d
NN
7049/* confdefs.h. */
7050_ACEOF
7051cat confdefs.h >>conftest.$ac_ext
7052cat >>conftest.$ac_ext <<_ACEOF
7053/* end confdefs.h. */
7054
3bbd5a19
PB
7055int
7056main ()
7057{
7058
7059 ;
7060 return 0;
7061}
b5472e1d
NN
7062_ACEOF
7063rm -f conftest.$ac_objext
b61ff9c8
BS
7064if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7065 (eval $ac_compile) 2>conftest.er1
b5472e1d
NN
7066 ac_status=$?
7067 grep -v '^ *+' conftest.er1 >conftest.err
7068 rm -f conftest.er1
7069 cat conftest.err >&5
7070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7071 (exit $ac_status); } &&
7072 { ac_try='test -z "$ac_c_werror_flag"
7073 || test ! -s conftest.err'
7074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7075 (eval $ac_try) 2>&5
7076 ac_status=$?
7077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7078 (exit $ac_status); }; } &&
7079 { ac_try='test -s conftest.$ac_objext'
7080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7081 (eval $ac_try) 2>&5
7082 ac_status=$?
7083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7084 (exit $ac_status); }; }; then
3bbd5a19 7085 eval "$as_acx_Woption=yes"
b5472e1d
NN
7086else
7087 echo "$as_me: failed program was:" >&5
7088sed 's/^/| /' conftest.$ac_ext >&5
7089
b61ff9c8 7090eval "$as_acx_Woption=no"
b5472e1d 7091fi
b61ff9c8 7092rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
7093
7094fi
b61ff9c8
BS
7095echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
7096echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3bbd5a19
PB
7097 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
7098 loose_warn="$loose_warn${loose_warn:+ }$option"
7099fi
7100
7101 done
7102CFLAGS="$save_CFLAGS"
7103
3bbd5a19
PB
7104strict_warn=
7105save_CFLAGS="$CFLAGS"
f6e377f8 7106for option in -Wold-style-definition -Wc++-compat -Wmissing-format-attribute; do
3bbd5a19
PB
7107 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
7108
b61ff9c8
BS
7109 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
7110echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
7111if eval "test \"\${$as_acx_Woption+set}\" = set"; then
89a42ac8
ZW
7112 echo $ECHO_N "(cached) $ECHO_C" >&6
7113else
3bbd5a19
PB
7114 CFLAGS="$option"
7115 cat >conftest.$ac_ext <<_ACEOF
89a42ac8
ZW
7116/* confdefs.h. */
7117_ACEOF
7118cat confdefs.h >>conftest.$ac_ext
7119cat >>conftest.$ac_ext <<_ACEOF
7120/* end confdefs.h. */
7121
3bbd5a19
PB
7122int
7123main ()
7124{
7125
7126 ;
7127 return 0;
7128}
89a42ac8
ZW
7129_ACEOF
7130rm -f conftest.$ac_objext
b61ff9c8
BS
7131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7132 (eval $ac_compile) 2>conftest.er1
89a42ac8
ZW
7133 ac_status=$?
7134 grep -v '^ *+' conftest.er1 >conftest.err
7135 rm -f conftest.er1
7136 cat conftest.err >&5
7137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7138 (exit $ac_status); } &&
7139 { ac_try='test -z "$ac_c_werror_flag"
7140 || test ! -s conftest.err'
7141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7142 (eval $ac_try) 2>&5
7143 ac_status=$?
7144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7145 (exit $ac_status); }; } &&
7146 { ac_try='test -s conftest.$ac_objext'
7147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7148 (eval $ac_try) 2>&5
7149 ac_status=$?
7150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7151 (exit $ac_status); }; }; then
3bbd5a19 7152 eval "$as_acx_Woption=yes"
89a42ac8
ZW
7153else
7154 echo "$as_me: failed program was:" >&5
7155sed 's/^/| /' conftest.$ac_ext >&5
7156
b61ff9c8 7157eval "$as_acx_Woption=no"
89a42ac8 7158fi
b61ff9c8 7159rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
89a42ac8
ZW
7160
7161fi
b61ff9c8
BS
7162echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
7163echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3bbd5a19
PB
7164 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
7165 strict_warn="$strict_warn${strict_warn:+ }$option"
34a86c2b
NN
7166fi
7167
3bbd5a19
PB
7168 done
7169CFLAGS="$save_CFLAGS"
7170
7171if test "$GCC" = yes; then
f6e377f8
AT
7172 echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" >&5
7173echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings... $ECHO_C" >&6
75c9cbe3 7174if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings+set}" = set; then
643d3bd2
NN
7175 echo $ECHO_N "(cached) $ECHO_C" >&6
7176else
7177 save_CFLAGS="$CFLAGS"
f6e377f8 7178CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
3bbd5a19 7179cat >conftest.$ac_ext <<_ACEOF
643d3bd2
NN
7180/* confdefs.h. */
7181_ACEOF
7182cat confdefs.h >>conftest.$ac_ext
7183cat >>conftest.$ac_ext <<_ACEOF
7184/* end confdefs.h. */
7185
3bbd5a19
PB
7186int
7187main ()
7188{
7189
7190 ;
7191 return 0;
7192}
643d3bd2
NN
7193_ACEOF
7194rm -f conftest.$ac_objext
b61ff9c8
BS
7195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7196 (eval $ac_compile) 2>conftest.er1
643d3bd2
NN
7197 ac_status=$?
7198 grep -v '^ *+' conftest.er1 >conftest.err
7199 rm -f conftest.er1
7200 cat conftest.err >&5
7201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7202 (exit $ac_status); } &&
7203 { ac_try='test -z "$ac_c_werror_flag"
7204 || test ! -s conftest.err'
7205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7206 (eval $ac_try) 2>&5
7207 ac_status=$?
7208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7209 (exit $ac_status); }; } &&
7210 { ac_try='test -s conftest.$ac_objext'
7211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7212 (eval $ac_try) 2>&5
7213 ac_status=$?
7214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7215 (exit $ac_status); }; }; then
75c9cbe3 7216 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=yes
643d3bd2
NN
7217else
7218 echo "$as_me: failed program was:" >&5
7219sed 's/^/| /' conftest.$ac_ext >&5
7220
75c9cbe3 7221acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings=no
643d3bd2 7222fi
b61ff9c8 7223rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3bbd5a19 7224CFLAGS="$save_CFLAGS"
643d3bd2 7225fi
75c9cbe3
AS
7226echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&5
7227echo "${ECHO_T}$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings" >&6
7228if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros__Wno_overlength_strings = yes; then
f6e377f8 7229 strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
643d3bd2
NN
7230fi
7231
ac0f3f39 7232
ac0f3f39 7233fi
ac0f3f39 7234
ac0f3f39 7235
b61ff9c8 7236# Check whether --enable-werror-always or --disable-werror-always was given.
09a9c095 7237if test "${enable_werror_always+set}" = set; then
b61ff9c8
BS
7238 enableval="$enable_werror_always"
7239
09a9c095
NN
7240else
7241 enable_werror_always=no
b61ff9c8 7242fi;
3bbd5a19
PB
7243if test $enable_werror_always = yes; then
7244 strict_warn="$strict_warn${strict_warn:+ }-Werror"
373477bb 7245fi
373477bb 7246
373477bb
GDR
7247
7248
7249
3bbd5a19
PB
7250# The above macros do nothing if the compiler is not GCC. However, the
7251# Makefile has more goo to add other flags, so this variabl is used to
7252# enables warnings only for GCC.
414d23ae
HPN
7253warn_cflags=
7254if test "x$GCC" = "xyes"; then
7255 warn_cflags='$(GCC_WARN_CFLAGS)'
7256fi
7257
7258
8b1f719a 7259# Enable expensive internal checks
a1286ef5
ZW
7260is_release=
7261if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
7262 is_release=yes
7263fi
a6ccdbab 7264
b61ff9c8 7265# Check whether --enable-checking or --disable-checking was given.
414d23ae 7266if test "${enable_checking+set}" = set; then
b61ff9c8
BS
7267 enableval="$enable_checking"
7268 ac_checking_flags="${enableval}"
e1bbfc5c
NS
7269else
7270
7271# Determine the default checks.
7272if test x$is_release = x ; then
7273 ac_checking_flags=yes
7274else
7275 ac_checking_flags=release
7276fi
b61ff9c8 7277fi;
e1bbfc5c 7278IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
04c3028a 7279for check in release $ac_checking_flags
e1bbfc5c
NS
7280do
7281 case $check in
cdce5c16 7282 # these set all the flags to specific states
0d475361 7283 yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
cdce5c16 7284 ac_fold_checking= ; ac_gc_checking=1 ;
726a989a 7285 ac_gc_always_collect= ; ac_gimple_checking=1 ; ac_rtl_checking= ;
232b67d9 7286 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7e98624c 7287 ac_tree_checking=1 ; ac_valgrind_checking= ;
1b24a790 7288 ac_types_checking=1 ;;
3089f8b5 7289 no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
cdce5c16 7290 ac_fold_checking= ; ac_gc_checking= ;
726a989a 7291 ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
232b67d9 7292 ac_rtlflag_checking= ; ac_runtime_checking= ;
7e98624c
RG
7293 ac_tree_checking= ; ac_valgrind_checking= ;
7294 ac_types_checking= ;;
3089f8b5 7295 all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
cdce5c16 7296 ac_fold_checking=1 ; ac_gc_checking=1 ;
726a989a 7297 ac_gc_always_collect=1 ; ac_gimple_checking=1 ; ac_rtl_checking=1 ;
cdce5c16 7298 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7e98624c
RG
7299 ac_tree_checking=1 ; ac_valgrind_checking= ;
7300 ac_types_checking=1 ;;
3089f8b5 7301 release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
cdce5c16 7302 ac_fold_checking= ; ac_gc_checking= ;
726a989a 7303 ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
cdce5c16 7304 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
7e98624c
RG
7305 ac_tree_checking= ; ac_valgrind_checking= ;
7306 ac_types_checking= ;;
cdce5c16 7307 # these enable particular checks
e1bbfc5c 7308 assert) ac_assert_checking=1 ;;
3089f8b5 7309 df) ac_df_checking=1 ;;
e1bbfc5c
NS
7310 fold) ac_fold_checking=1 ;;
7311 gc) ac_gc_checking=1 ;;
7312 gcac) ac_gc_always_collect=1 ;;
726a989a 7313 gimple) ac_gimple_checking=1 ;;
e1bbfc5c 7314 misc) ac_checking=1 ;;
e1bbfc5c 7315 rtl) ac_rtl_checking=1 ;;
cdce5c16 7316 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 7317 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 7318 tree) ac_tree_checking=1 ;;
7e98624c 7319 types) ac_types_checking=1 ;;
cdce5c16 7320 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 7321 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
7322echo "$as_me: error: unknown check category $check" >&2;}
7323 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
7324 esac
7325done
7326IFS="$ac_save_IFS"
06c37c96 7327
ba479fd2
NN
7328nocommon_flag=""
7329if test x$ac_checking != x ; then
7330
7331cat >>confdefs.h <<\_ACEOF
7332#define ENABLE_CHECKING 1
7333_ACEOF
7334
7335 nocommon_flag=-fno-common
7336fi
3bbd5a19 7337
3089f8b5
PB
7338if test x$ac_df_checking != x ; then
7339
7340cat >>confdefs.h <<\_ACEOF
7341#define ENABLE_DF_CHECKING 1
7342_ACEOF
7343
7344fi
06c37c96
NS
7345if test x$ac_assert_checking != x ; then
7346
7347cat >>confdefs.h <<\_ACEOF
7348#define ENABLE_ASSERT_CHECKING 1
7349_ACEOF
7350
726a989a
RB
7351fi
7352if test x$ac_gimple_checking != x ; then
7353
7354cat >>confdefs.h <<\_ACEOF
7355#define ENABLE_GIMPLE_CHECKING 1
7356_ACEOF
7357
b53ef395 7358fi
232b67d9 7359
b53ef395
NS
7360if test x$ac_runtime_checking != x ; then
7361
7362cat >>confdefs.h <<\_ACEOF
7363#define ENABLE_RUNTIME_CHECKING 1
7364_ACEOF
7365
06c37c96 7366fi
ba479fd2
NN
7367if test x$ac_tree_checking != x ; then
7368
7369cat >>confdefs.h <<\_ACEOF
7370#define ENABLE_TREE_CHECKING 1
7371_ACEOF
7372
13f05fd0 7373 TREEBROWSER=tree-browser.o
ba479fd2 7374fi
7e98624c
RG
7375if test x$ac_types_checking != x ; then
7376
7377cat >>confdefs.h <<\_ACEOF
7378#define ENABLE_TYPES_CHECKING 1
7379_ACEOF
7380
7381fi
13f05fd0 7382
ba479fd2
NN
7383if test x$ac_rtl_checking != x ; then
7384
7385cat >>confdefs.h <<\_ACEOF
7386#define ENABLE_RTL_CHECKING 1
7387_ACEOF
7388
7389fi
7390if test x$ac_rtlflag_checking != x ; then
7391
7392cat >>confdefs.h <<\_ACEOF
7393#define ENABLE_RTL_FLAG_CHECKING 1
7394_ACEOF
7395
7396fi
7397if test x$ac_gc_checking != x ; then
7398
7399cat >>confdefs.h <<\_ACEOF
7400#define ENABLE_GC_CHECKING 1
7401_ACEOF
7402
7403fi
7404if test x$ac_gc_always_collect != x ; then
7405
7406cat >>confdefs.h <<\_ACEOF
7407#define ENABLE_GC_ALWAYS_COLLECT 1
7408_ACEOF
7409
7410fi
7411if test x$ac_fold_checking != x ; then
7412
7413cat >>confdefs.h <<\_ACEOF
7414#define ENABLE_FOLD_CHECKING 1
7415_ACEOF
7416
7417fi
7418valgrind_path_defines=
7419valgrind_command=
7420
ba479fd2 7421if test "${ac_cv_header_valgrind_h+set}" = set; then
b61ff9c8
BS
7422 echo "$as_me:$LINENO: checking for valgrind.h" >&5
7423echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
ba479fd2
NN
7424if test "${ac_cv_header_valgrind_h+set}" = set; then
7425 echo $ECHO_N "(cached) $ECHO_C" >&6
7426fi
b61ff9c8
BS
7427echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
7428echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
ba479fd2
NN
7429else
7430 # Is the header compilable?
b61ff9c8
BS
7431echo "$as_me:$LINENO: checking valgrind.h usability" >&5
7432echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
ba479fd2 7433cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7434/* confdefs.h. */
7435_ACEOF
7436cat confdefs.h >>conftest.$ac_ext
7437cat >>conftest.$ac_ext <<_ACEOF
7438/* end confdefs.h. */
7439$ac_includes_default
63cf211a 7440#include <valgrind.h>
ba479fd2
NN
7441_ACEOF
7442rm -f conftest.$ac_objext
b61ff9c8
BS
7443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7444 (eval $ac_compile) 2>conftest.er1
ba479fd2 7445 ac_status=$?
86da66b5
HPN
7446 grep -v '^ *+' conftest.er1 >conftest.err
7447 rm -f conftest.er1
7448 cat conftest.err >&5
ba479fd2 7449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7450 (exit $ac_status); } &&
7451 { ac_try='test -z "$ac_c_werror_flag"
7452 || test ! -s conftest.err'
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); }; } &&
7458 { ac_try='test -s conftest.$ac_objext'
7459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7460 (eval $ac_try) 2>&5
7461 ac_status=$?
7462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7463 (exit $ac_status); }; }; then
ba479fd2
NN
7464 ac_header_compiler=yes
7465else
7466 echo "$as_me: failed program was:" >&5
7467sed 's/^/| /' conftest.$ac_ext >&5
7468
b61ff9c8 7469ac_header_compiler=no
ba479fd2 7470fi
b61ff9c8
BS
7471rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7472echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7473echo "${ECHO_T}$ac_header_compiler" >&6
ba479fd2
NN
7474
7475# Is the header present?
b61ff9c8
BS
7476echo "$as_me:$LINENO: checking valgrind.h presence" >&5
7477echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
ba479fd2 7478cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7479/* confdefs.h. */
7480_ACEOF
7481cat confdefs.h >>conftest.$ac_ext
7482cat >>conftest.$ac_ext <<_ACEOF
7483/* end confdefs.h. */
7484#include <valgrind.h>
7485_ACEOF
b61ff9c8
BS
7486if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7487 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
7488 ac_status=$?
7489 grep -v '^ *+' conftest.er1 >conftest.err
7490 rm -f conftest.er1
7491 cat conftest.err >&5
7492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7493 (exit $ac_status); } >/dev/null; then
7494 if test -s conftest.err; then
7495 ac_cpp_err=$ac_c_preproc_warn_flag
7496 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7497 else
7498 ac_cpp_err=
7499 fi
7500else
7501 ac_cpp_err=yes
7502fi
7503if test -z "$ac_cpp_err"; then
ba479fd2
NN
7504 ac_header_preproc=yes
7505else
7506 echo "$as_me: failed program was:" >&5
7507sed 's/^/| /' conftest.$ac_ext >&5
7508
7509 ac_header_preproc=no
7510fi
7511rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
7512echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7513echo "${ECHO_T}$ac_header_preproc" >&6
ba479fd2
NN
7514
7515# So? What about this header?
86da66b5
HPN
7516case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7517 yes:no: )
ba479fd2
NN
7518 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
7519echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
7520 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
7521echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
7522 ac_header_preproc=yes
ba479fd2 7523 ;;
86da66b5 7524 no:yes:* )
ba479fd2
NN
7525 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
7526echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
7527 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
7528echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
7529 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
7530echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
7531 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
7532echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
7533 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
7534echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
7535 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
7536echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
b61ff9c8
BS
7537 (
7538 cat <<\_ASBOX
7539## ------------------------------------------ ##
7540## Report this to the AC_PACKAGE_NAME lists. ##
7541## ------------------------------------------ ##
7542_ASBOX
7543 ) |
7544 sed "s/^/$as_me: WARNING: /" >&2
ba479fd2
NN
7545 ;;
7546esac
b61ff9c8
BS
7547echo "$as_me:$LINENO: checking for valgrind.h" >&5
7548echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
ba479fd2
NN
7549if test "${ac_cv_header_valgrind_h+set}" = set; then
7550 echo $ECHO_N "(cached) $ECHO_C" >&6
7551else
7552 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 7553fi
b61ff9c8
BS
7554echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
7555echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
ba479fd2 7556
6e3f3080 7557fi
ba479fd2 7558if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
7559 have_valgrind_h=yes
7560else
ba479fd2 7561 have_valgrind_h=no
6938ec6c
NN
7562fi
7563
7564
ba479fd2 7565
cdce5c16 7566if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
7567 # It is certainly possible that there's valgrind but no valgrind.h.
7568 # GCC relies on making annotations so we must have both.
b61ff9c8
BS
7569 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
7570echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
ba479fd2 7571 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7572/* confdefs.h. */
7573_ACEOF
7574cat confdefs.h >>conftest.$ac_ext
7575cat >>conftest.$ac_ext <<_ACEOF
7576/* end confdefs.h. */
a207b594 7577#include <valgrind/memcheck.h>
14011ca4
AJ
7578#ifndef VALGRIND_DISCARD
7579#error VALGRIND_DISCARD not defined
7580#endif
ba479fd2 7581_ACEOF
b61ff9c8
BS
7582if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7583 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
7584 ac_status=$?
7585 grep -v '^ *+' conftest.er1 >conftest.err
7586 rm -f conftest.er1
7587 cat conftest.err >&5
7588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7589 (exit $ac_status); } >/dev/null; then
7590 if test -s conftest.err; then
7591 ac_cpp_err=$ac_c_preproc_warn_flag
7592 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7593 else
7594 ac_cpp_err=
7595 fi
7596else
7597 ac_cpp_err=yes
7598fi
7599if test -z "$ac_cpp_err"; then
a207b594
HPN
7600 gcc_cv_header_valgrind_memcheck_h=yes
7601else
ba479fd2
NN
7602 echo "$as_me: failed program was:" >&5
7603sed 's/^/| /' conftest.$ac_ext >&5
7604
a207b594
HPN
7605 gcc_cv_header_valgrind_memcheck_h=no
7606fi
ba479fd2 7607rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
7608 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
7609echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
7610 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
7611echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
ba479fd2 7612 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7613/* confdefs.h. */
7614_ACEOF
7615cat confdefs.h >>conftest.$ac_ext
7616cat >>conftest.$ac_ext <<_ACEOF
7617/* end confdefs.h. */
a207b594
HPN
7618#include <memcheck.h>
7619#ifndef VALGRIND_DISCARD
7620#error VALGRIND_DISCARD not defined
7621#endif
ba479fd2 7622_ACEOF
b61ff9c8
BS
7623if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7624 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
7625 ac_status=$?
7626 grep -v '^ *+' conftest.er1 >conftest.err
7627 rm -f conftest.er1
7628 cat conftest.err >&5
7629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7630 (exit $ac_status); } >/dev/null; then
7631 if test -s conftest.err; then
7632 ac_cpp_err=$ac_c_preproc_warn_flag
7633 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7634 else
7635 ac_cpp_err=
7636 fi
7637else
7638 ac_cpp_err=yes
7639fi
7640if test -z "$ac_cpp_err"; then
14011ca4
AJ
7641 gcc_cv_header_memcheck_h=yes
7642else
ba479fd2
NN
7643 echo "$as_me: failed program was:" >&5
7644sed 's/^/| /' conftest.$ac_ext >&5
7645
cafe096b
EC
7646 gcc_cv_header_memcheck_h=no
7647fi
ba479fd2 7648rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
7649 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
7650echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
ba479fd2 7651
56694dd9
ZW
7652# Prepare PATH_SEPARATOR.
7653# The user is always right.
7654if test "${PATH_SEPARATOR+set}" != set; then
7655 echo "#! /bin/sh" >conf$$.sh
7656 echo "exit 0" >>conf$$.sh
7657 chmod +x conf$$.sh
7658 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7659 PATH_SEPARATOR=';'
7660 else
7661 PATH_SEPARATOR=:
7662 fi
7663 rm -f conf$$.sh
7664fi
7665
7666# Find out how to test for executable files. Don't use a zero-byte file,
7667# as systems may use methods other than mode bits to determine executability.
7668cat >conf$$.file <<_ASEOF
7669#! /bin/sh
7670exit 0
7671_ASEOF
7672chmod +x conf$$.file
7673if test -x conf$$.file >/dev/null 2>&1; then
7674 ac_executable_p="test -x"
7675else
7676 ac_executable_p="test -f"
7677fi
7678rm -f conf$$.file
7679
7680# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 7681set dummy valgrind; ac_word=$2
b61ff9c8
BS
7682echo "$as_me:$LINENO: checking for $ac_word" >&5
7683echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7684if test "${ac_cv_path_valgrind_path+set}" = set; then
7685 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
7686else
7687 case "$valgrind_path" in
56694dd9
ZW
7688 [\\/]* | ?:[\\/]*)
7689 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
7690 ;;
414d23ae 7691 *)
56694dd9
ZW
7692 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
7693 for ac_dir in $PATH; do
7694 IFS="$ac_save_IFS"
7695 test -z "$ac_dir" && ac_dir=.
7696 for ac_exec_ext in '' $ac_executable_extensions; do
7697 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
7698 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
7699 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
7700 break 2
7701 fi
7702 fi
7703 done
7704 done
7705 IFS="$ac_save_IFS"
7706 ;;
414d23ae 7707esac
75e93faa 7708fi
414d23ae
HPN
7709valgrind_path="$ac_cv_path_valgrind_path"
7710if test -n "$valgrind_path"; then
b61ff9c8
BS
7711 echo "$as_me:$LINENO: result: $valgrind_path" >&5
7712echo "${ECHO_T}$valgrind_path" >&6
414d23ae 7713else
b61ff9c8
BS
7714 echo "$as_me:$LINENO: result: no" >&5
7715echo "${ECHO_T}no" >&6
414d23ae
HPN
7716fi
7717
a207b594
HPN
7718 if test "x$valgrind_path" = "x" \
7719 || (test $have_valgrind_h = no \
7720 && test $gcc_cv_header_memcheck_h = no \
7721 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
7722 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
7723echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
7724 { (exit 1); exit 1; }; }
414d23ae
HPN
7725 fi
7726 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
7727 valgrind_command="$valgrind_path -q"
ba479fd2
NN
7728
7729cat >>confdefs.h <<\_ACEOF
414d23ae 7730#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 7731_ACEOF
75e93faa 7732
a207b594 7733 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
7734
7735cat >>confdefs.h <<\_ACEOF
a207b594 7736#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 7737_ACEOF
a207b594
HPN
7738
7739 fi
14011ca4 7740 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
7741
7742cat >>confdefs.h <<\_ACEOF
14011ca4 7743#define HAVE_MEMCHECK_H 1
ba479fd2 7744_ACEOF
14011ca4
AJ
7745
7746 fi
414d23ae 7747fi
75e93faa 7748
75e93faa
ZW
7749
7750
414d23ae 7751# Enable code coverage collection
b61ff9c8 7752# Check whether --enable-coverage or --disable-coverage was given.
414d23ae 7753if test "${enable_coverage+set}" = set; then
b61ff9c8
BS
7754 enableval="$enable_coverage"
7755 case "${enableval}" in
6dd297da
NN
7756 yes|noopt)
7757 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
7758 ;;
7759 opt)
7760 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
7761 ;;
7762 no)
7763 # a.k.a. --disable-coverage
7764 coverage_flags=""
7765 ;;
7766 *)
7767 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
7768echo "$as_me: error: unknown coverage setting $enableval" >&2;}
7769 { (exit 1); exit 1; }; }
6dd297da 7770 ;;
414d23ae 7771esac
75e93faa 7772else
414d23ae 7773 coverage_flags=""
b61ff9c8 7774fi;
a3bba767 7775
2f41c1d6 7776
b61ff9c8 7777# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
1a4b763e 7778if test "${enable_gather_detailed_mem_stats+set}" = set; then
b61ff9c8
BS
7779 enableval="$enable_gather_detailed_mem_stats"
7780
439a7e54
DN
7781else
7782 enable_gather_detailed_mem_stats=no
b61ff9c8 7783fi;
439a7e54 7784if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
7785
7786cat >>confdefs.h <<\_ACEOF
439a7e54 7787#define GATHER_STATISTICS 1
ba479fd2 7788_ACEOF
439a7e54
DN
7789
7790fi
7791
73458fb7
NN
7792# -------------------------------
7793# Miscenalleous configure options
7794# -------------------------------
34a86c2b
NN
7795
7796# With stabs
ba479fd2 7797
b61ff9c8 7798# Check whether --with-stabs or --without-stabs was given.
34a86c2b 7799if test "${with_stabs+set}" = set; then
b61ff9c8
BS
7800 withval="$with_stabs"
7801 stabs="$with_stabs"
34a86c2b
NN
7802else
7803 stabs=no
b61ff9c8 7804fi;
cafe096b 7805
34a86c2b 7806# Determine whether or not multilibs are enabled.
b61ff9c8 7807# Check whether --enable-multilib or --disable-multilib was given.
34a86c2b 7808if test "${enable_multilib+set}" = set; then
b61ff9c8
BS
7809 enableval="$enable_multilib"
7810
34a86c2b
NN
7811else
7812 enable_multilib=yes
b61ff9c8 7813fi;
75e93faa 7814
34a86c2b 7815
414d23ae 7816# Enable __cxa_atexit for C++.
b61ff9c8 7817# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
414d23ae 7818if test "${enable___cxa_atexit+set}" = set; then
b61ff9c8 7819 enableval="$enable___cxa_atexit"
75e93faa 7820
b61ff9c8 7821fi;
75e93faa 7822
486aa804 7823# Enable C extension for decimal float if target supports it.
b61ff9c8 7824# Check whether --enable-decimal-float or --disable-decimal-float was given.
486aa804 7825if test "${enable_decimal_float+set}" = set; then
b61ff9c8
BS
7826 enableval="$enable_decimal_float"
7827
79b87c74
MM
7828 case $enable_decimal_float in
7829 yes | no | bid | dpd) ;;
7830 *) { { echo "$as_me:$LINENO: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
7831Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&5
7832echo "$as_me: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
7833Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&2;}
7834 { (exit 1); exit 1; }; } ;;
7835 esac
7836
7837else
7838
7839 case $target in
7840 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
a4a9df5f 7841 enable_decimal_float=yes
486aa804
BE
7842 ;;
7843 *)
7844 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
7845echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
7846 enable_decimal_float=no
7847 ;;
79b87c74 7848 esac
486aa804 7849
b61ff9c8 7850fi;
486aa804 7851
79b87c74
MM
7852dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
7853
7854cat >>confdefs.h <<_ACEOF
7855#define ENABLE_DECIMAL_FLOAT $dfp
7856_ACEOF
7857
7858
7859# x86's use BID format instead of DPD
7860case x$enable_decimal_float in
7861 xyes)
7862 case $target in
7863 i?86*-*-linux* | x86_64*-*-linux*)
7864 enable_decimal_float=bid
7865 ;;
7866 *)
7867 enable_decimal_float=dpd
7868 ;;
7869 esac
7870 ;;
7871 xno)
7872 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
7873 # dependency on libdecnumber.
7874 enable_decimal_float=dpd
7875 ;;
7876esac
486aa804
BE
7877
7878
79b87c74 7879bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
486aa804
BE
7880
7881cat >>confdefs.h <<_ACEOF
79b87c74 7882#define ENABLE_DECIMAL_BID_FORMAT $bid
486aa804
BE
7883_ACEOF
7884
7885
ab22c1fa 7886# Enable C extension for fixed-point arithmetic.
b61ff9c8 7887# Check whether --enable-fixed-point or --disable-fixed-point was given.
ab22c1fa 7888if test "${enable_fixed_point+set}" = set; then
b61ff9c8
BS
7889 enableval="$enable_fixed_point"
7890
ab22c1fa
CF
7891
7892else
7893
7894 case $target in
7895 mips*-*-*)
d5be1dd4 7896 case $host in
a0e527e3
RW
7897 mips*-sgi-irix*)
7898 { echo "$as_me:$LINENO: WARNING: fixed-point is not supported on IRIX" >&5
7899echo "$as_me: WARNING: fixed-point is not supported on IRIX" >&2;}
d5be1dd4
RS
7900 enable_fixed_point=no
7901 ;;
7902 *)
7903 enable_fixed_point=yes
7904 ;;
7905 esac
ab22c1fa
CF
7906 ;;
7907 *)
7908 { echo "$as_me:$LINENO: WARNING: fixed-point is not supported for this target" >&5
7909echo "$as_me: WARNING: fixed-point is not supported for this target" >&2;}
7910 enable_fixed_point=no
7911 ;;
7912 esac
7913
b61ff9c8 7914fi;
ab22c1fa
CF
7915
7916
7917fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi`
7918
7919cat >>confdefs.h <<_ACEOF
7920#define ENABLE_FIXED_POINT $fixedpoint
7921_ACEOF
7922
7923
414d23ae
HPN
7924# Enable threads
7925# Pass with no value to take the default
7926# Pass with a value to specify a thread package
b61ff9c8 7927# Check whether --enable-threads or --disable-threads was given.
414d23ae 7928if test "${enable_threads+set}" = set; then
b61ff9c8
BS
7929 enableval="$enable_threads"
7930
414d23ae
HPN
7931else
7932 enable_threads=''
b61ff9c8 7933fi;
2f41c1d6 7934
b61ff9c8 7935# Check whether --enable-tls or --disable-tls was given.
1a4b763e 7936if test "${enable_tls+set}" = set; then
b61ff9c8
BS
7937 enableval="$enable_tls"
7938
8dea1cca
DD
7939 case $enable_tls in
7940 yes | no) ;;
7941 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
7942Valid choices are 'yes' and 'no'." >&5
7943echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
7944Valid choices are 'yes' and 'no'." >&2;}
7945 { (exit 1); exit 1; }; } ;;
7946 esac
7947
7948else
7949 enable_tls=''
b61ff9c8 7950fi;
1a4b763e 7951
b61ff9c8 7952# Check whether --enable-objc-gc or --disable-objc-gc was given.
414d23ae 7953if test "${enable_objc_gc+set}" = set; then
b61ff9c8
BS
7954 enableval="$enable_objc_gc"
7955 if test x$enable_objc_gc = xno; then
414d23ae
HPN
7956 objc_boehm_gc=''
7957else
7958 objc_boehm_gc=1
7959fi
7960else
7961 objc_boehm_gc=''
b61ff9c8 7962fi;
75e93faa 7963
a6ccdbab 7964
b61ff9c8 7965# Check whether --with-dwarf2 or --without-dwarf2 was given.
414d23ae 7966if test "${with_dwarf2+set}" = set; then
b61ff9c8
BS
7967 withval="$with_dwarf2"
7968 dwarf2="$with_dwarf2"
75e93faa 7969else
414d23ae 7970 dwarf2=no
b61ff9c8 7971fi;
2f41c1d6 7972
b61ff9c8 7973# Check whether --enable-shared or --disable-shared was given.
1a4b763e 7974if test "${enable_shared+set}" = set; then
b61ff9c8
BS
7975 enableval="$enable_shared"
7976
414d23ae
HPN
7977 case $enable_shared in
7978 yes | no) ;;
7979 *)
7980 enable_shared=no
7981 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
7982 for pkg in $enableval; do
7983 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
7984 enable_shared=yes
7985 fi
7986 done
7987 IFS="$ac_save_ifs"
7988 ;;
7989 esac
7990
75e93faa 7991else
414d23ae 7992 enable_shared=yes
b61ff9c8 7993fi;
703d89ab 7994
ab22c1fa 7995
1a4b763e 7996
b61ff9c8 7997# Check whether --with-build-sysroot or --without-build-sysroot was given.
160633c6 7998if test "${with_build_sysroot+set}" = set; then
b61ff9c8 7999 withval="$with_build_sysroot"
160633c6 8000
b61ff9c8 8001fi;
160633c6
MM
8002
8003
b61ff9c8 8004# Check whether --with-sysroot or --without-sysroot was given.
4977bab6 8005if test "${with_sysroot+set}" = set; then
b61ff9c8
BS
8006 withval="$with_sysroot"
8007
4977bab6 8008 case ${with_sysroot} in
caa55b1e 8009 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
8010 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
8011 esac
ba479fd2 8012
4977bab6 8013 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14da6073 8014 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
4977bab6 8015
748670c2
RS
8016 if test "x$prefix" = xNONE; then
8017 test_prefix=/usr/local
8018 else
8019 test_prefix=$prefix
8020 fi
047d636f 8021 if test "x$exec_prefix" = xNONE; then
748670c2 8022 test_exec_prefix=$test_prefix
047d636f 8023 else
748670c2 8024 test_exec_prefix=$exec_prefix
047d636f
DJ
8025 fi
8026 case ${TARGET_SYSTEM_ROOT} in
91710e62 8027 "${test_prefix}"|"${test_prefix}/"*|\
748670c2
RS
8028 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
8029 '${prefix}'|'${prefix}/'*|\
91710e62 8030 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
8031 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
8032 TARGET_SYSTEM_ROOT_DEFINE="$t"
8033 ;;
8034 esac
8035
4977bab6 8036else
ba479fd2 8037
4977bab6 8038 TARGET_SYSTEM_ROOT=
db720d9a 8039 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
8040 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
8041
b61ff9c8 8042fi;
4977bab6
ZW
8043
8044
8045
8046
d1bd0ded 8047# Build with intermodule optimisations
b61ff9c8 8048# Check whether --enable-intermodule or --disable-intermodule was given.
d1bd0ded 8049if test "${enable_intermodule+set}" = set; then
b61ff9c8
BS
8050 enableval="$enable_intermodule"
8051 case ${enable_intermodule} in
0c46c5c7
KC
8052 yes) onestep="-onestep";;
8053 *) onestep="";;
d1bd0ded 8054esac
0c46c5c7
KC
8055else
8056 onestep=""
b61ff9c8 8057fi;
2f41c1d6
PB
8058
8059
8060
8061
b61ff9c8 8062# Check whether --with-pkgversion or --without-pkgversion was given.
2f41c1d6 8063if test "${with_pkgversion+set}" = set; then
b61ff9c8
BS
8064 withval="$with_pkgversion"
8065 case "$withval" in
2f41c1d6
PB
8066 yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
8067echo "$as_me: error: package version not specified" >&2;}
8068 { (exit 1); exit 1; }; } ;;
8069 no) PKGVERSION= ;;
8070 *) PKGVERSION="($withval) " ;;
8071 esac
8072else
8073 PKGVERSION="(GCC) "
8074
b61ff9c8 8075fi;
2f41c1d6
PB
8076
8077
8078
1a4b763e 8079
b61ff9c8 8080# Check whether --with-bugurl or --without-bugurl was given.
2f41c1d6 8081if test "${with_bugurl+set}" = set; then
b61ff9c8
BS
8082 withval="$with_bugurl"
8083 case "$withval" in
2f41c1d6
PB
8084 yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
8085echo "$as_me: error: bug URL not specified" >&2;}
8086 { (exit 1); exit 1; }; } ;;
8087 no) BUGURL=
8088 ;;
8089 *) BUGURL="$withval"
8090 ;;
8091 esac
8092else
8093 BUGURL="http://gcc.gnu.org/bugs.html"
8094
b61ff9c8 8095fi;
2f41c1d6
PB
8096 case ${BUGURL} in
8097 "")
8098 REPORT_BUGS_TO=
8099 REPORT_BUGS_TEXI=
8100 ;;
8101 *)
8102 REPORT_BUGS_TO="<$BUGURL>"
8103 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8104 ;;
8105 esac;
8106
ab22c1fa 8107
d1bd0ded
GK
8108
8109
f3c9f174
NN
8110# Sanity check enable_languages in case someone does not run the toplevel
8111# configure # script.
b61ff9c8 8112# Check whether --enable-languages or --disable-languages was given.
f3c9f174 8113if test "${enable_languages+set}" = set; then
b61ff9c8
BS
8114 enableval="$enable_languages"
8115 case ,${enable_languages}, in
f3c9f174
NN
8116 ,,|,yes,)
8117 # go safe -- we cannot be much sure without the toplevel
8118 # configure's
8119 # analysis of which target libs are present and usable
8120 enable_languages=c
8121 ;;
8122 *,all,*)
8123 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
8124echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
8125 { (exit 1); exit 1; }; }
8126 ;;
8127 *,c,*)
8128 ;;
8129 *)
8130 enable_languages=c,${enable_languages}
8131 ;;
8132esac
8133else
8134 enable_languages=c
b61ff9c8 8135fi;
f3c9f174 8136
9288b845
CD
8137# Used by documentation targets
8138
8139
8140
f3c9f174 8141
aca600aa
AS
8142
8143# Check whether --with-multilib-list or --without-multilib-list was given.
8144if test "${with_multilib_list+set}" = set; then
8145 withval="$with_multilib_list"
8146 :
8147else
8148 with_multilib_list=default
8149fi;
8150
73458fb7
NN
8151# -------------------------
8152# Checks for other programs
8153# -------------------------
5b67ad6f 8154
b61ff9c8
BS
8155echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8156echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
8157set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
8158if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
ba479fd2 8159 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 8160else
ba479fd2 8161 cat >conftest.make <<\_ACEOF
e9a25f70 8162all:
b61ff9c8 8163 @echo 'ac_maketemp="$(MAKE)"'
ba479fd2 8164_ACEOF
e9a25f70 8165# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
b61ff9c8
BS
8166eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
8167if test -n "$ac_maketemp"; then
8168 eval ac_cv_prog_make_${ac_make}_set=yes
8169else
8170 eval ac_cv_prog_make_${ac_make}_set=no
8171fi
ba479fd2 8172rm -f conftest.make
e9a25f70 8173fi
b61ff9c8
BS
8174if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
8175 echo "$as_me:$LINENO: result: yes" >&5
8176echo "${ECHO_T}yes" >&6
e9a25f70
JL
8177 SET_MAKE=
8178else
b61ff9c8
BS
8179 echo "$as_me:$LINENO: result: no" >&5
8180echo "${ECHO_T}no" >&6
e9a25f70
JL
8181 SET_MAKE="MAKE=${MAKE-make}"
8182fi
8183
8184
861bb6c1 8185# Find some useful tools
ba479fd2 8186for ac_prog in gawk mawk nawk awk
861bb6c1 8187do
ba479fd2 8188 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 8189set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
8190echo "$as_me:$LINENO: checking for $ac_word" >&5
8191echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8192if test "${ac_cv_prog_AWK+set}" = set; then
8193 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
8194else
8195 if test -n "$AWK"; then
8196 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8197else
ba479fd2
NN
8198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8199for as_dir in $PATH
8200do
8201 IFS=$as_save_IFS
8202 test -z "$as_dir" && as_dir=.
8203 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8204 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8205 ac_cv_prog_AWK="$ac_prog"
8206 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8207 break 2
8208 fi
8209done
8210done
8211
861bb6c1
JL
8212fi
8213fi
ba479fd2 8214AWK=$ac_cv_prog_AWK
861bb6c1 8215if test -n "$AWK"; then
b61ff9c8
BS
8216 echo "$as_me:$LINENO: result: $AWK" >&5
8217echo "${ECHO_T}$AWK" >&6
861bb6c1 8218else
b61ff9c8
BS
8219 echo "$as_me:$LINENO: result: no" >&5
8220echo "${ECHO_T}no" >&6
861bb6c1
JL
8221fi
8222
ba479fd2 8223 test -n "$AWK" && break
861bb6c1
JL
8224done
8225
776dc15d 8226# We need awk to create options.c and options.h.
2c4902b9
NN
8227# Bail out if it's missing.
8228case ${AWK} in
ba479fd2
NN
8229 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
8230echo "$as_me: error: can't build without awk, bailing out" >&2;}
8231 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
8232esac
8233
b61ff9c8
BS
8234echo "$as_me:$LINENO: checking whether ln -s works" >&5
8235echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
ba479fd2
NN
8236if test "${gcc_cv_prog_LN_S+set}" = set; then
8237 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
8238else
8239 rm -f conftestdata_t
8240echo >conftestdata_f
8241if ln -s conftestdata_f conftestdata_t 2>/dev/null
8242then
8243 gcc_cv_prog_LN_S="ln -s"
8244else
8245 if ln conftestdata_f conftestdata_t 2>/dev/null
8246 then
8247 gcc_cv_prog_LN_S=ln
8248 else
35f06ae4
PB
8249 if cp -p conftestdata_f conftestdata_t 2>/dev/null
8250 then
06c3418c 8251 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
8252 else
8253 gcc_cv_prog_LN_S=cp
8254 fi
0a4b6309
RL
8255 fi
8256fi
8257rm -f conftestdata_f conftestdata_t
8258
8259fi
8260LN_S="$gcc_cv_prog_LN_S"
8261if test "$gcc_cv_prog_LN_S" = "ln -s"; then
b61ff9c8
BS
8262 echo "$as_me:$LINENO: result: yes" >&5
8263echo "${ECHO_T}yes" >&6
0a4b6309
RL
8264else
8265 if test "$gcc_cv_prog_LN_S" = "ln"; then
b61ff9c8
BS
8266 echo "$as_me:$LINENO: result: no, using ln" >&5
8267echo "${ECHO_T}no, using ln" >&6
0a4b6309 8268 else
b61ff9c8
BS
8269 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
8270echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
8271 fi
8272fi
8273
b61ff9c8
BS
8274echo "$as_me:$LINENO: checking whether ln works" >&5
8275echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
18fc9bd4
RG
8276if test "${acx_cv_prog_LN+set}" = set; then
8277 echo $ECHO_N "(cached) $ECHO_C" >&6
8278else
8279 rm -f conftestdata_t
8280echo >conftestdata_f
8281if ln conftestdata_f conftestdata_t 2>/dev/null
8282then
8283 acx_cv_prog_LN=ln
8284else
8285 acx_cv_prog_LN=no
8286fi
8287rm -f conftestdata_f conftestdata_t
8288
8289fi
8290if test $acx_cv_prog_LN = no; then
8291 LN="$LN_S"
b61ff9c8
BS
8292 echo "$as_me:$LINENO: result: no, using $LN" >&5
8293echo "${ECHO_T}no, using $LN" >&6
18fc9bd4
RG
8294else
8295 LN="$acx_cv_prog_LN"
b61ff9c8
BS
8296 echo "$as_me:$LINENO: result: yes" >&5
8297echo "${ECHO_T}yes" >&6
18fc9bd4
RG
8298fi
8299
ba479fd2
NN
8300if test -n "$ac_tool_prefix"; then
8301 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8302set dummy ${ac_tool_prefix}ranlib; ac_word=$2
b61ff9c8
BS
8303echo "$as_me:$LINENO: checking for $ac_word" >&5
8304echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8305if test "${ac_cv_prog_RANLIB+set}" = set; then
8306 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
8307else
8308 if test -n "$RANLIB"; then
8309 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8310else
ba479fd2
NN
8311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8312for as_dir in $PATH
8313do
8314 IFS=$as_save_IFS
8315 test -z "$as_dir" && as_dir=.
8316 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8317 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8318 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8319 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8320 break 2
8321 fi
8322done
8323done
8324
6e3f3080
NN
8325fi
8326fi
ba479fd2 8327RANLIB=$ac_cv_prog_RANLIB
6e3f3080 8328if test -n "$RANLIB"; then
b61ff9c8
BS
8329 echo "$as_me:$LINENO: result: $RANLIB" >&5
8330echo "${ECHO_T}$RANLIB" >&6
ba479fd2 8331else
b61ff9c8
BS
8332 echo "$as_me:$LINENO: result: no" >&5
8333echo "${ECHO_T}no" >&6
ba479fd2
NN
8334fi
8335
8336fi
8337if test -z "$ac_cv_prog_RANLIB"; then
8338 ac_ct_RANLIB=$RANLIB
8339 # Extract the first word of "ranlib", so it can be a program name with args.
8340set dummy ranlib; ac_word=$2
b61ff9c8
BS
8341echo "$as_me:$LINENO: checking for $ac_word" >&5
8342echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8343if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8344 echo $ECHO_N "(cached) $ECHO_C" >&6
8345else
8346 if test -n "$ac_ct_RANLIB"; then
8347 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8348else
8349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8350for as_dir in $PATH
8351do
8352 IFS=$as_save_IFS
8353 test -z "$as_dir" && as_dir=.
8354 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8355 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8356 ac_cv_prog_ac_ct_RANLIB="ranlib"
8357 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8358 break 2
8359 fi
8360done
8361done
8362
b61ff9c8 8363 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
ba479fd2
NN
8364fi
8365fi
8366ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8367if test -n "$ac_ct_RANLIB"; then
b61ff9c8
BS
8368 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8369echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 8370else
b61ff9c8
BS
8371 echo "$as_me:$LINENO: result: no" >&5
8372echo "${ECHO_T}no" >&6
ba479fd2
NN
8373fi
8374
b61ff9c8 8375 RANLIB=$ac_ct_RANLIB
ba479fd2
NN
8376else
8377 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
8378fi
8379
343a6100
MM
8380case "${host}" in
8381*-*-darwin*)
8382 # By default, the Darwin ranlib will not treat common symbols as
8383 # definitions when building the archive table of contents. Other
8384 # ranlibs do that; pass an option to the Darwin ranlib that makes
8385 # it behave similarly.
8386 ranlib_flags="-c"
8387 ;;
8388*)
8389 ranlib_flags=""
8390esac
8391
8392
0a4b6309
RL
8393# Find a good install program. We prefer a C program (faster),
8394# so one script is as good as another. But avoid the broken or
8395# incompatible versions:
8396# SysV /etc/install, /usr/sbin/install
8397# SunOS /usr/etc/install
8398# IRIX /sbin/install
8399# AIX /bin/install
8400# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8401# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8402# ./install, which can be erroneously created by make from ./install.sh.
b61ff9c8
BS
8403echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
8404echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 8405if test -z "$INSTALL"; then
ba479fd2
NN
8406if test "${ac_cv_path_install+set}" = set; then
8407 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
8408else
8409 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
8410 for ac_dir in $PATH; do
8411 # Account for people who put trailing slashes in PATH elements.
8412 case "$ac_dir/" in
8413 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
8414 *)
8415 # OSF1 and SCO ODT 3.0 have their own names for install.
8416 for ac_prog in ginstall scoinst install; do
8417 if test -f $ac_dir/$ac_prog; then
8418 if test $ac_prog = install &&
8419 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
8420 # AIX install. It has an incompatible calling convention.
8421 # OSF/1 installbsd also uses dspmsg, but is usable.
8422 :
8423 else
8424 ac_cv_path_install="$ac_dir/$ac_prog -c"
8425 break 2
8426 fi
8427 fi
8428 done
8429 ;;
8430 esac
8431 done
8432 IFS="$ac_save_IFS"
8433
8434fi
8435 if test "${ac_cv_path_install+set}" = set; then
8436 INSTALL="$ac_cv_path_install"
8437 else
8438 # As a last resort, use the slow shell script. We don't cache a
8439 # path for INSTALL within a source directory, because that will
8440 # break other packages using the cache if that directory is
8441 # removed, or if the path is relative.
8442 INSTALL="$ac_install_sh"
8443 fi
8444fi
b61ff9c8
BS
8445echo "$as_me:$LINENO: result: $INSTALL" >&5
8446echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
8447
8448# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8449# It thinks the first close brace ends the variable substitution.
8450test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8451
8452test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8453
861bb6c1 8454
3a000df0 8455# See if cmp has --ignore-initial.
b61ff9c8
BS
8456echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
8457echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
ba479fd2
NN
8458if test "${gcc_cv_prog_cmp_skip+set}" = set; then
8459 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
8460else
8461 echo abfoo >t1
8462 echo cdfoo >t2
269a7343 8463 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
8464 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
8465 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 8466 :
3a000df0
KC
8467 else
8468 gcc_cv_prog_cmp_skip=gnucompare
8469 fi
269a7343
KG
8470 fi
8471 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
8472 if cmp t1 t2 2 2 > /dev/null 2>&1; then
8473 if cmp t1 t2 1 1 > /dev/null 2>&1; then
8474 :
8475 else
8476 gcc_cv_prog_cmp_skip=fastcompare
8477 fi
8478 fi
3a000df0
KC
8479 fi
8480 rm t1 t2
8481
8482fi
b61ff9c8
BS
8483echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
8484echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
8485make_compare_target=$gcc_cv_prog_cmp_skip
8486
8487
8488
73458fb7
NN
8489# See if we have the mktemp command.
8490# Extract the first word of "mktemp", so it can be a program name with args.
8491set dummy mktemp; ac_word=$2
b61ff9c8
BS
8492echo "$as_me:$LINENO: checking for $ac_word" >&5
8493echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8494if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
8495 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8496else
8497 if test -n "$have_mktemp_command"; then
8498 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
8499else
ba479fd2
NN
8500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8501for as_dir in $PATH
8502do
8503 IFS=$as_save_IFS
8504 test -z "$as_dir" && as_dir=.
8505 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8506 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8507 ac_cv_prog_have_mktemp_command="yes"
8508 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8509 break 2
8510 fi
8511done
8512done
8513
73458fb7
NN
8514 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
8515fi
8516fi
ba479fd2 8517have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 8518if test -n "$have_mktemp_command"; then
b61ff9c8
BS
8519 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
8520echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 8521else
b61ff9c8
BS
8522 echo "$as_me:$LINENO: result: no" >&5
8523echo "${ECHO_T}no" >&6
73458fb7
NN
8524fi
8525
8526
7c27e184
PB
8527# See if makeinfo has been installed and is modern enough
8528# that we can use it.
9f18db39 8529
3bbd5a19 8530 # Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 8531set dummy makeinfo; ac_word=$2
b61ff9c8
BS
8532echo "$as_me:$LINENO: checking for $ac_word" >&5
8533echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8534if test "${ac_cv_prog_MAKEINFO+set}" = set; then
8535 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8536else
8537 if test -n "$MAKEINFO"; then
8538 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
8539else
ba479fd2
NN
8540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8541for as_dir in $PATH
8542do
8543 IFS=$as_save_IFS
8544 test -z "$as_dir" && as_dir=.
8545 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8546 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
8547 ac_cv_prog_MAKEINFO="makeinfo"
8548 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8549 break 2
8550 fi
8551done
8552done
8553
73458fb7
NN
8554fi
8555fi
ba479fd2 8556MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 8557if test -n "$MAKEINFO"; then
b61ff9c8
BS
8558 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
8559echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 8560else
b61ff9c8
BS
8561 echo "$as_me:$LINENO: result: no" >&5
8562echo "${ECHO_T}no" >&6
73458fb7
NN
8563fi
8564
3bbd5a19
PB
8565 if test -n "$MAKEINFO"; then
8566 # Found it, now check the version.
b61ff9c8
BS
8567 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
8568echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
ba479fd2
NN
8569if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
8570 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7 8571else
3bbd5a19
PB
8572 ac_prog_version=`eval $MAKEINFO --version 2>&1 |
8573 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
8574
8575 case $ac_prog_version in
8576 '') gcc_cv_prog_makeinfo_modern=no;;
7326a39e 8577 4.[7-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;;
3bbd5a19
PB
8578 *) gcc_cv_prog_makeinfo_modern=no;;
8579 esac
73458fb7
NN
8580
8581fi
b61ff9c8
BS
8582echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
8583echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
3bbd5a19
PB
8584 else
8585 gcc_cv_prog_makeinfo_modern=no
8586 fi
8587 if test $gcc_cv_prog_makeinfo_modern = no; then
8588 MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo"
8589 fi
73458fb7 8590
73458fb7 8591if test $gcc_cv_prog_makeinfo_modern = no; then
ba479fd2
NN
8592 { echo "$as_me:$LINENO: WARNING:
8593*** Makeinfo is missing or too old.
8594*** Info documentation will not be built." >&5
8595echo "$as_me: WARNING:
cafe096b 8596*** Makeinfo is missing or too old.
ba479fd2 8597*** Info documentation will not be built." >&2;}
73458fb7
NN
8598 BUILD_INFO=
8599else
ba479fd2 8600 BUILD_INFO=info
73458fb7
NN
8601fi
8602
7c27e184 8603
73458fb7 8604# Is pod2man recent enough to regenerate manpages?
b61ff9c8
BS
8605echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
8606echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 8607if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
b61ff9c8
BS
8608 echo "$as_me:$LINENO: result: yes" >&5
8609echo "${ECHO_T}yes" >&6
ba479fd2 8610 GENERATED_MANPAGES=generated-manpages
73458fb7 8611else
b61ff9c8
BS
8612 echo "$as_me:$LINENO: result: no" >&5
8613echo "${ECHO_T}no" >&6
73458fb7
NN
8614 GENERATED_MANPAGES=
8615fi
8616
7c27e184 8617
3bbd5a19
PB
8618MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
8619
73458fb7 8620# How about lex?
7c27e184
PB
8621for ac_prog in flex
8622do
8623 # Extract the first word of "$ac_prog", so it can be a program name with args.
8624set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
8625echo "$as_me:$LINENO: checking for $ac_word" >&5
8626echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8627if test "${ac_cv_prog_FLEX+set}" = set; then
8628 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8629else
8630 if test -n "$FLEX"; then
8631 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
8632else
ba479fd2
NN
8633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8634for as_dir in $PATH
8635do
8636 IFS=$as_save_IFS
8637 test -z "$as_dir" && as_dir=.
8638 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8639 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 8640 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
8641 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8642 break 2
8643 fi
8644done
8645done
8646
73458fb7
NN
8647fi
8648fi
ba479fd2 8649FLEX=$ac_cv_prog_FLEX
73458fb7 8650if test -n "$FLEX"; then
b61ff9c8
BS
8651 echo "$as_me:$LINENO: result: $FLEX" >&5
8652echo "${ECHO_T}$FLEX" >&6
73458fb7 8653else
b61ff9c8
BS
8654 echo "$as_me:$LINENO: result: no" >&5
8655echo "${ECHO_T}no" >&6
73458fb7
NN
8656fi
8657
7c27e184
PB
8658 test -n "$FLEX" && break
8659done
8660test -n "$FLEX" || FLEX="$MISSING flex"
8661
73458fb7
NN
8662
8663# Bison?
7c27e184
PB
8664for ac_prog in bison
8665do
8666 # Extract the first word of "$ac_prog", so it can be a program name with args.
8667set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
8668echo "$as_me:$LINENO: checking for $ac_word" >&5
8669echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
8670if test "${ac_cv_prog_BISON+set}" = set; then
8671 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8672else
8673 if test -n "$BISON"; then
8674 ac_cv_prog_BISON="$BISON" # Let the user override the test.
8675else
ba479fd2
NN
8676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8677for as_dir in $PATH
8678do
8679 IFS=$as_save_IFS
8680 test -z "$as_dir" && as_dir=.
8681 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8682 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 8683 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
8684 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8685 break 2
8686 fi
8687done
8688done
8689
73458fb7
NN
8690fi
8691fi
ba479fd2 8692BISON=$ac_cv_prog_BISON
73458fb7 8693if test -n "$BISON"; then
b61ff9c8
BS
8694 echo "$as_me:$LINENO: result: $BISON" >&5
8695echo "${ECHO_T}$BISON" >&6
73458fb7 8696else
b61ff9c8
BS
8697 echo "$as_me:$LINENO: result: no" >&5
8698echo "${ECHO_T}no" >&6
73458fb7
NN
8699fi
8700
7c27e184
PB
8701 test -n "$BISON" && break
8702done
8703test -n "$BISON" || BISON="$MISSING bison"
8704
8705
8706# Binutils are not build modules, unlike bison/flex/makeinfo. So we
8707# check for build == host before using them.
73458fb7 8708
f6a874ac 8709# NM
414adbdd
GK
8710if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
8711 && test -d ../binutils ; then
f6a874ac
JW
8712 NM='$(objdir)/../binutils/nm-new'
8713else
8714 # Extract the first word of "nm", so it can be a program name with args.
8715set dummy nm; ac_word=$2
b61ff9c8
BS
8716echo "$as_me:$LINENO: checking for $ac_word" >&5
8717echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
f6a874ac
JW
8718if test "${ac_cv_prog_NM+set}" = set; then
8719 echo $ECHO_N "(cached) $ECHO_C" >&6
8720else
8721 if test -n "$NM"; then
8722 ac_cv_prog_NM="$NM" # Let the user override the test.
8723else
8724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8725for as_dir in $PATH
8726do
8727 IFS=$as_save_IFS
8728 test -z "$as_dir" && as_dir=.
8729 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8730 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f6a874ac
JW
8731 ac_cv_prog_NM="nm"
8732 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8733 break 2
8734 fi
8735done
8736done
8737
8738 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
8739fi
8740fi
8741NM=$ac_cv_prog_NM
8742if test -n "$NM"; then
b61ff9c8
BS
8743 echo "$as_me:$LINENO: result: $NM" >&5
8744echo "${ECHO_T}$NM" >&6
f6a874ac 8745else
b61ff9c8
BS
8746 echo "$as_me:$LINENO: result: no" >&5
8747echo "${ECHO_T}no" >&6
f6a874ac
JW
8748fi
8749
8750fi
8751
8752# AR
414adbdd
GK
8753if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
8754 && test -d ../binutils ; then
f6a874ac
JW
8755 AR='$(objdir)/../binutils/ar'
8756else
8757 # Extract the first word of "ar", so it can be a program name with args.
8758set dummy ar; ac_word=$2
b61ff9c8
BS
8759echo "$as_me:$LINENO: checking for $ac_word" >&5
8760echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
f6a874ac
JW
8761if test "${ac_cv_prog_AR+set}" = set; then
8762 echo $ECHO_N "(cached) $ECHO_C" >&6
8763else
8764 if test -n "$AR"; then
8765 ac_cv_prog_AR="$AR" # Let the user override the test.
8766else
8767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8768for as_dir in $PATH
8769do
8770 IFS=$as_save_IFS
8771 test -z "$as_dir" && as_dir=.
8772 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 8773 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f6a874ac
JW
8774 ac_cv_prog_AR="ar"
8775 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8776 break 2
8777 fi
8778done
8779done
8780
8781 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
8782fi
8783fi
8784AR=$ac_cv_prog_AR
8785if test -n "$AR"; then
b61ff9c8
BS
8786 echo "$as_me:$LINENO: result: $AR" >&5
8787echo "${ECHO_T}$AR" >&6
f6a874ac 8788else
b61ff9c8
BS
8789 echo "$as_me:$LINENO: result: no" >&5
8790echo "${ECHO_T}no" >&6
f6a874ac
JW
8791fi
8792
8793fi
8794
8795
73458fb7
NN
8796# --------------------
8797# Checks for C headers
8798# --------------------
8799
ca9bc441
NN
8800# Need to reject headers which give warnings, so that the -Werror bootstrap
8801# works later. *sigh* This needs to come before all header checks.
18fc9bd4 8802
ca9bc441
NN
8803ac_c_preproc_warn_flag=yes
8804
b61ff9c8
BS
8805echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8806echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
ba479fd2
NN
8807if test "${ac_cv_header_stdc+set}" = set; then
8808 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8809else
ba479fd2 8810 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8811/* confdefs.h. */
8812_ACEOF
8813cat confdefs.h >>conftest.$ac_ext
8814cat >>conftest.$ac_ext <<_ACEOF
8815/* end confdefs.h. */
956d6950
JL
8816#include <stdlib.h>
8817#include <stdarg.h>
8818#include <string.h>
8819#include <float.h>
ba479fd2
NN
8820
8821int
8822main ()
8823{
8824
8825 ;
8826 return 0;
8827}
8828_ACEOF
8829rm -f conftest.$ac_objext
b61ff9c8
BS
8830if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8831 (eval $ac_compile) 2>conftest.er1
ba479fd2 8832 ac_status=$?
86da66b5
HPN
8833 grep -v '^ *+' conftest.er1 >conftest.err
8834 rm -f conftest.er1
8835 cat conftest.err >&5
ba479fd2 8836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8837 (exit $ac_status); } &&
8838 { ac_try='test -z "$ac_c_werror_flag"
8839 || test ! -s conftest.err'
8840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8841 (eval $ac_try) 2>&5
8842 ac_status=$?
8843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8844 (exit $ac_status); }; } &&
8845 { ac_try='test -s conftest.$ac_objext'
8846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8847 (eval $ac_try) 2>&5
8848 ac_status=$?
8849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8850 (exit $ac_status); }; }; then
956d6950
JL
8851 ac_cv_header_stdc=yes
8852else
ba479fd2
NN
8853 echo "$as_me: failed program was:" >&5
8854sed 's/^/| /' conftest.$ac_ext >&5
8855
b61ff9c8 8856ac_cv_header_stdc=no
956d6950 8857fi
b61ff9c8 8858rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
8859
8860if test $ac_cv_header_stdc = yes; then
8861 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 8862 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8863/* confdefs.h. */
8864_ACEOF
8865cat confdefs.h >>conftest.$ac_ext
8866cat >>conftest.$ac_ext <<_ACEOF
8867/* end confdefs.h. */
956d6950 8868#include <string.h>
ba479fd2
NN
8869
8870_ACEOF
956d6950 8871if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8872 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
8873 :
8874else
956d6950
JL
8875 ac_cv_header_stdc=no
8876fi
8877rm -f conftest*
8878
8879fi
8880
8881if test $ac_cv_header_stdc = yes; then
8882 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 8883 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8884/* confdefs.h. */
8885_ACEOF
8886cat confdefs.h >>conftest.$ac_ext
8887cat >>conftest.$ac_ext <<_ACEOF
8888/* end confdefs.h. */
956d6950 8889#include <stdlib.h>
ba479fd2
NN
8890
8891_ACEOF
956d6950 8892if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8893 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
8894 :
8895else
956d6950
JL
8896 ac_cv_header_stdc=no
8897fi
8898rm -f conftest*
8899
8900fi
8901
8902if test $ac_cv_header_stdc = yes; then
8903 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 8904 if test "$cross_compiling" = yes; then
956d6950
JL
8905 :
8906else
ba479fd2 8907 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8908/* confdefs.h. */
8909_ACEOF
8910cat confdefs.h >>conftest.$ac_ext
8911cat >>conftest.$ac_ext <<_ACEOF
8912/* end confdefs.h. */
956d6950 8913#include <ctype.h>
ba479fd2
NN
8914#if ((' ' & 0x0FF) == 0x020)
8915# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8916# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8917#else
8918# define ISLOWER(c) \
86da66b5
HPN
8919 (('a' <= (c) && (c) <= 'i') \
8920 || ('j' <= (c) && (c) <= 'r') \
8921 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
8922# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8923#endif
63cf211a 8924
ba479fd2
NN
8925#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8926int
8927main ()
8928{
8929 int i;
8930 for (i = 0; i < 256; i++)
8931 if (XOR (islower (i), ISLOWER (i))
86da66b5 8932 || toupper (i) != TOUPPER (i))
b61ff9c8
BS
8933 exit(2);
8934 exit (0);
ba479fd2
NN
8935}
8936_ACEOF
8937rm -f conftest$ac_exeext
b61ff9c8
BS
8938if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8939 (eval $ac_link) 2>&5
ba479fd2
NN
8940 ac_status=$?
8941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8942 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
8943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8944 (eval $ac_try) 2>&5
ba479fd2
NN
8945 ac_status=$?
8946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8947 (exit $ac_status); }; }; then
956d6950
JL
8948 :
8949else
ba479fd2
NN
8950 echo "$as_me: program exited with status $ac_status" >&5
8951echo "$as_me: failed program was:" >&5
8952sed 's/^/| /' conftest.$ac_ext >&5
8953
8954( exit $ac_status )
8955ac_cv_header_stdc=no
956d6950 8956fi
b61ff9c8 8957rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 8958fi
956d6950
JL
8959fi
8960fi
b61ff9c8
BS
8961echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8962echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 8963if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
8964
8965cat >>confdefs.h <<\_ACEOF
956d6950 8966#define STDC_HEADERS 1
ba479fd2 8967_ACEOF
956d6950
JL
8968
8969fi
8970
b61ff9c8
BS
8971echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
8972echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
ba479fd2
NN
8973if test "${ac_cv_header_time+set}" = set; then
8974 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8975else
ba479fd2 8976 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8977/* confdefs.h. */
8978_ACEOF
8979cat confdefs.h >>conftest.$ac_ext
8980cat >>conftest.$ac_ext <<_ACEOF
8981/* end confdefs.h. */
956d6950
JL
8982#include <sys/types.h>
8983#include <sys/time.h>
8984#include <time.h>
ba479fd2
NN
8985
8986int
8987main ()
8988{
8989if ((struct tm *) 0)
8990return 0;
8991 ;
8992 return 0;
8993}
8994_ACEOF
8995rm -f conftest.$ac_objext
b61ff9c8
BS
8996if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8997 (eval $ac_compile) 2>conftest.er1
ba479fd2 8998 ac_status=$?
86da66b5
HPN
8999 grep -v '^ *+' conftest.er1 >conftest.err
9000 rm -f conftest.er1
9001 cat conftest.err >&5
ba479fd2 9002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9003 (exit $ac_status); } &&
9004 { ac_try='test -z "$ac_c_werror_flag"
9005 || test ! -s conftest.err'
9006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9007 (eval $ac_try) 2>&5
9008 ac_status=$?
9009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9010 (exit $ac_status); }; } &&
9011 { ac_try='test -s conftest.$ac_objext'
9012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9013 (eval $ac_try) 2>&5
9014 ac_status=$?
9015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9016 (exit $ac_status); }; }; then
956d6950
JL
9017 ac_cv_header_time=yes
9018else
ba479fd2
NN
9019 echo "$as_me: failed program was:" >&5
9020sed 's/^/| /' conftest.$ac_ext >&5
9021
b61ff9c8 9022ac_cv_header_time=no
956d6950 9023fi
b61ff9c8 9024rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 9025fi
b61ff9c8
BS
9026echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
9027echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 9028if test $ac_cv_header_time = yes; then
ba479fd2
NN
9029
9030cat >>confdefs.h <<\_ACEOF
956d6950 9031#define TIME_WITH_SYS_TIME 1
ba479fd2 9032_ACEOF
956d6950
JL
9033
9034fi
9035
b61ff9c8
BS
9036echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
9037echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
18fc9bd4
RG
9038if test "${gcc_cv_header_string+set}" = set; then
9039 echo $ECHO_N "(cached) $ECHO_C" >&6
9040else
9041 cat >conftest.$ac_ext <<_ACEOF
9042/* confdefs.h. */
9043_ACEOF
9044cat confdefs.h >>conftest.$ac_ext
9045cat >>conftest.$ac_ext <<_ACEOF
9046/* end confdefs.h. */
9047#include <string.h>
9048#include <strings.h>
9049int
9050main ()
9051{
9052
9053 ;
9054 return 0;
9055}
9056_ACEOF
9057rm -f conftest.$ac_objext
b61ff9c8
BS
9058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9059 (eval $ac_compile) 2>conftest.er1
18fc9bd4
RG
9060 ac_status=$?
9061 grep -v '^ *+' conftest.er1 >conftest.err
9062 rm -f conftest.er1
9063 cat conftest.err >&5
9064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9065 (exit $ac_status); } &&
9066 { ac_try='test -z "$ac_c_werror_flag"
9067 || test ! -s conftest.err'
9068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9069 (eval $ac_try) 2>&5
9070 ac_status=$?
9071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9072 (exit $ac_status); }; } &&
9073 { ac_try='test -s conftest.$ac_objext'
9074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9075 (eval $ac_try) 2>&5
9076 ac_status=$?
9077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9078 (exit $ac_status); }; }; then
18fc9bd4
RG
9079 gcc_cv_header_string=yes
9080else
9081 echo "$as_me: failed program was:" >&5
9082sed 's/^/| /' conftest.$ac_ext >&5
9083
b61ff9c8 9084gcc_cv_header_string=no
18fc9bd4 9085fi
b61ff9c8 9086rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18fc9bd4 9087fi
b61ff9c8
BS
9088echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
9089echo "${ECHO_T}$gcc_cv_header_string" >&6
18fc9bd4
RG
9090if test $gcc_cv_header_string = yes; then
9091
9092cat >>confdefs.h <<\_ACEOF
9093#define STRING_WITH_STRINGS 1
9094_ACEOF
9095
9096fi
9097
b61ff9c8
BS
9098echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
9099echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
ba479fd2
NN
9100if test "${ac_cv_header_sys_wait_h+set}" = set; then
9101 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 9102else
ba479fd2 9103 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9104/* confdefs.h. */
9105_ACEOF
9106cat confdefs.h >>conftest.$ac_ext
9107cat >>conftest.$ac_ext <<_ACEOF
9108/* end confdefs.h. */
e9831ca0
KG
9109#include <sys/types.h>
9110#include <sys/wait.h>
9111#ifndef WEXITSTATUS
b61ff9c8 9112# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
9113#endif
9114#ifndef WIFEXITED
ba479fd2 9115# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 9116#endif
ba479fd2
NN
9117
9118int
9119main ()
9120{
9121 int s;
9122 wait (&s);
9123 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9124 ;
9125 return 0;
9126}
9127_ACEOF
9128rm -f conftest.$ac_objext
b61ff9c8
BS
9129if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9130 (eval $ac_compile) 2>conftest.er1
ba479fd2 9131 ac_status=$?
86da66b5
HPN
9132 grep -v '^ *+' conftest.er1 >conftest.err
9133 rm -f conftest.er1
9134 cat conftest.err >&5
ba479fd2 9135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9136 (exit $ac_status); } &&
9137 { ac_try='test -z "$ac_c_werror_flag"
9138 || test ! -s conftest.err'
9139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9140 (eval $ac_try) 2>&5
9141 ac_status=$?
9142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9143 (exit $ac_status); }; } &&
9144 { ac_try='test -s conftest.$ac_objext'
9145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9146 (eval $ac_try) 2>&5
9147 ac_status=$?
9148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9149 (exit $ac_status); }; }; then
e9831ca0
KG
9150 ac_cv_header_sys_wait_h=yes
9151else
ba479fd2
NN
9152 echo "$as_me: failed program was:" >&5
9153sed 's/^/| /' conftest.$ac_ext >&5
9154
b61ff9c8 9155ac_cv_header_sys_wait_h=no
e9831ca0 9156fi
b61ff9c8 9157rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 9158fi
b61ff9c8
BS
9159echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
9160echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 9161if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
9162
9163cat >>confdefs.h <<\_ACEOF
e9831ca0 9164#define HAVE_SYS_WAIT_H 1
ba479fd2 9165_ACEOF
6e3f3080 9166
63cf211a 9167fi
6e3f3080 9168
ba479fd2
NN
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
dfb77e37
KC
9190
9191for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 9192 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 9193 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 9194 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 9195do
ba479fd2 9196as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b61ff9c8
BS
9197echo "$as_me:$LINENO: checking for $ac_header" >&5
9198echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9199if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 9200 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9201else
18fc9bd4 9202 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9203/* confdefs.h. */
9204_ACEOF
9205cat confdefs.h >>conftest.$ac_ext
9206cat >>conftest.$ac_ext <<_ACEOF
9207/* end confdefs.h. */
9208#include <$ac_header>
9209_ACEOF
b61ff9c8
BS
9210if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9211 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9212 ac_status=$?
9213 grep -v '^ *+' conftest.er1 >conftest.err
9214 rm -f conftest.er1
9215 cat conftest.err >&5
9216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9217 (exit $ac_status); } >/dev/null; then
9218 if test -s conftest.err; then
9219 ac_cpp_err=$ac_c_preproc_warn_flag
9220 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9221 else
9222 ac_cpp_err=
9223 fi
9224else
9225 ac_cpp_err=yes
9226fi
9227if test -z "$ac_cpp_err"; then
18fc9bd4 9228 eval "$as_ac_Header=yes"
ba479fd2
NN
9229else
9230 echo "$as_me: failed program was:" >&5
9231sed 's/^/| /' conftest.$ac_ext >&5
9232
18fc9bd4 9233 eval "$as_ac_Header=no"
ba479fd2
NN
9234fi
9235rm -f conftest.err conftest.$ac_ext
6e3f3080 9236fi
b61ff9c8
BS
9237echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9238echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
9239if test `eval echo '${'$as_ac_Header'}'` = yes; then
9240 cat >>confdefs.h <<_ACEOF
9241#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9242_ACEOF
9243
956d6950
JL
9244fi
9245done
9246
9247
f24af81b 9248# Check for thread headers.
b61ff9c8
BS
9249echo "$as_me:$LINENO: checking for thread.h" >&5
9250echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
ba479fd2
NN
9251if test "${ac_cv_header_thread_h+set}" = set; then
9252 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9253else
18fc9bd4 9254 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9255/* confdefs.h. */
9256_ACEOF
9257cat confdefs.h >>conftest.$ac_ext
9258cat >>conftest.$ac_ext <<_ACEOF
9259/* end confdefs.h. */
9260#include <thread.h>
9261_ACEOF
b61ff9c8
BS
9262if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9263 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9264 ac_status=$?
9265 grep -v '^ *+' conftest.er1 >conftest.err
9266 rm -f conftest.er1
9267 cat conftest.err >&5
9268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9269 (exit $ac_status); } >/dev/null; then
9270 if test -s conftest.err; then
9271 ac_cpp_err=$ac_c_preproc_warn_flag
9272 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9273 else
9274 ac_cpp_err=
9275 fi
9276else
9277 ac_cpp_err=yes
9278fi
9279if test -z "$ac_cpp_err"; then
18fc9bd4 9280 ac_cv_header_thread_h=yes
ba479fd2
NN
9281else
9282 echo "$as_me: failed program was:" >&5
9283sed 's/^/| /' conftest.$ac_ext >&5
9284
18fc9bd4 9285 ac_cv_header_thread_h=no
ba479fd2
NN
9286fi
9287rm -f conftest.err conftest.$ac_ext
6e3f3080 9288fi
b61ff9c8
BS
9289echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
9290echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 9291if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
9292 have_thread_h=yes
9293else
ba479fd2 9294 have_thread_h=
f24af81b
TT
9295fi
9296
b61ff9c8
BS
9297echo "$as_me:$LINENO: checking for pthread.h" >&5
9298echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
ba479fd2
NN
9299if test "${ac_cv_header_pthread_h+set}" = set; then
9300 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 9301else
18fc9bd4 9302 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9303/* confdefs.h. */
9304_ACEOF
9305cat confdefs.h >>conftest.$ac_ext
9306cat >>conftest.$ac_ext <<_ACEOF
9307/* end confdefs.h. */
9308#include <pthread.h>
9309_ACEOF
b61ff9c8
BS
9310if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9311 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
9312 ac_status=$?
9313 grep -v '^ *+' conftest.er1 >conftest.err
9314 rm -f conftest.er1
9315 cat conftest.err >&5
9316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9317 (exit $ac_status); } >/dev/null; then
9318 if test -s conftest.err; then
9319 ac_cpp_err=$ac_c_preproc_warn_flag
9320 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9321 else
9322 ac_cpp_err=
9323 fi
9324else
9325 ac_cpp_err=yes
9326fi
9327if test -z "$ac_cpp_err"; then
18fc9bd4 9328 ac_cv_header_pthread_h=yes
ba479fd2 9329else
18fc9bd4
RG
9330 echo "$as_me: failed program was:" >&5
9331sed 's/^/| /' conftest.$ac_ext >&5
9332
9333 ac_cv_header_pthread_h=no
9334fi
9335rm -f conftest.err conftest.$ac_ext
6e3f3080 9336fi
b61ff9c8
BS
9337echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
9338echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 9339if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
9340 have_pthread_h=yes
9341else
ba479fd2 9342 have_pthread_h=
f24af81b
TT
9343fi
9344
9345
84c041a1 9346# These tests can't be done till we know if we have limits.h.
b61ff9c8
BS
9347echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
9348echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
ba479fd2
NN
9349if test "${gcc_cv_decl_char_bit+set}" = set; then
9350 echo $ECHO_N "(cached) $ECHO_C" >&6
9351else
9352 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9353/* confdefs.h. */
9354_ACEOF
9355cat confdefs.h >>conftest.$ac_ext
9356cat >>conftest.$ac_ext <<_ACEOF
9357/* end confdefs.h. */
75e93faa
ZW
9358#ifdef HAVE_LIMITS_H
9359#include <limits.h>
9360#endif
9361#ifdef CHAR_BIT
9362found
9363#endif
ba479fd2 9364_ACEOF
75e93faa 9365if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9366 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
9367 gcc_cv_decl_char_bit=yes
9368else
75e93faa
ZW
9369 gcc_cv_decl_char_bit=no
9370fi
9371rm -f conftest*
9372
9373
9374fi
b61ff9c8
BS
9375echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
9376echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 9377if test $gcc_cv_decl_char_bit = no; then
b61ff9c8
BS
9378 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
9379echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
ba479fd2
NN
9380if test "${gcc_cv_c_nbby+set}" = set; then
9381 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
9382else
9383 i=8
9384 gcc_cv_c_nbby=
9385 while test $i -lt 65; do
ba479fd2 9386 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9387/* confdefs.h. */
9388_ACEOF
9389cat confdefs.h >>conftest.$ac_ext
9390cat >>conftest.$ac_ext <<_ACEOF
9391/* end confdefs.h. */
9392
9393int
9394main ()
9395{
4e70264f
ZW
9396switch(0) {
9397 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
9398 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
9399 ; }
ba479fd2
NN
9400 ;
9401 return 0;
9402}
9403_ACEOF
9404rm -f conftest.$ac_objext
b61ff9c8
BS
9405if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9406 (eval $ac_compile) 2>conftest.er1
ba479fd2 9407 ac_status=$?
86da66b5
HPN
9408 grep -v '^ *+' conftest.er1 >conftest.err
9409 rm -f conftest.er1
9410 cat conftest.err >&5
ba479fd2 9411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9412 (exit $ac_status); } &&
9413 { ac_try='test -z "$ac_c_werror_flag"
9414 || test ! -s conftest.err'
9415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9416 (eval $ac_try) 2>&5
9417 ac_status=$?
9418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9419 (exit $ac_status); }; } &&
9420 { ac_try='test -s conftest.$ac_objext'
9421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9422 (eval $ac_try) 2>&5
9423 ac_status=$?
9424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9425 (exit $ac_status); }; }; then
4e70264f 9426 gcc_cv_c_nbby=$i; break
75e93faa 9427else
ba479fd2
NN
9428 echo "$as_me: failed program was:" >&5
9429sed 's/^/| /' conftest.$ac_ext >&5
9430
75e93faa 9431fi
b61ff9c8 9432rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
9433 i=`expr $i + 1`
9434 done
9435 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
9436
9437fi
b61ff9c8
BS
9438echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
9439echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 9440if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
9441 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
9442echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
9443 { (exit 1); exit 1; }; }
75e93faa 9444else
ba479fd2
NN
9445
9446cat >>confdefs.h <<_ACEOF
75e93faa 9447#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 9448_ACEOF
75e93faa
ZW
9449
9450fi
9451fi
b61ff9c8
BS
9452echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
9453echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
ba479fd2
NN
9454if test "${ac_cv_c_bigendian+set}" = set; then
9455 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 9456else
9791c75c 9457 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 9458cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9459/* confdefs.h. */
9460_ACEOF
9461cat confdefs.h >>conftest.$ac_ext
9462cat >>conftest.$ac_ext <<_ACEOF
9463/* end confdefs.h. */
4977bab6
ZW
9464#include <sys/types.h>
9465#include <sys/param.h>
9791c75c 9466
ba479fd2
NN
9467int
9468main ()
9469{
b61ff9c8 9470#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4977bab6 9471 bogus endian macros
84c041a1 9472#endif
9791c75c 9473
ba479fd2
NN
9474 ;
9475 return 0;
9476}
9477_ACEOF
9478rm -f conftest.$ac_objext
b61ff9c8
BS
9479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9480 (eval $ac_compile) 2>conftest.er1
ba479fd2 9481 ac_status=$?
86da66b5
HPN
9482 grep -v '^ *+' conftest.er1 >conftest.err
9483 rm -f conftest.er1
9484 cat conftest.err >&5
ba479fd2 9485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9486 (exit $ac_status); } &&
9487 { ac_try='test -z "$ac_c_werror_flag"
9488 || test ! -s conftest.err'
9489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9490 (eval $ac_try) 2>&5
9491 ac_status=$?
9492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9493 (exit $ac_status); }; } &&
9494 { ac_try='test -s conftest.$ac_objext'
9495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9496 (eval $ac_try) 2>&5
9497 ac_status=$?
9498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9499 (exit $ac_status); }; }; then
2f41c1d6 9500 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 9501cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9502/* confdefs.h. */
9503_ACEOF
9504cat confdefs.h >>conftest.$ac_ext
9505cat >>conftest.$ac_ext <<_ACEOF
9506/* end confdefs.h. */
4977bab6
ZW
9507#include <sys/types.h>
9508#include <sys/param.h>
9791c75c 9509
ba479fd2
NN
9510int
9511main ()
9512{
4977bab6
ZW
9513#if BYTE_ORDER != BIG_ENDIAN
9514 not big endian
84c041a1 9515#endif
9791c75c 9516
ba479fd2
NN
9517 ;
9518 return 0;
9519}
9520_ACEOF
9521rm -f conftest.$ac_objext
b61ff9c8
BS
9522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9523 (eval $ac_compile) 2>conftest.er1
ba479fd2 9524 ac_status=$?
86da66b5
HPN
9525 grep -v '^ *+' conftest.er1 >conftest.err
9526 rm -f conftest.er1
9527 cat conftest.err >&5
ba479fd2 9528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9529 (exit $ac_status); } &&
9530 { ac_try='test -z "$ac_c_werror_flag"
9531 || test ! -s conftest.err'
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); }; } &&
9537 { ac_try='test -s conftest.$ac_objext'
9538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9539 (eval $ac_try) 2>&5
9540 ac_status=$?
9541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9542 (exit $ac_status); }; }; then
9543 ac_cv_c_bigendian=yes
9544else
9545 echo "$as_me: failed program was:" >&5
ba479fd2
NN
9546sed 's/^/| /' conftest.$ac_ext >&5
9547
b61ff9c8 9548ac_cv_c_bigendian=no
4977bab6 9549fi
b61ff9c8 9550rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 9551else
ba479fd2
NN
9552 echo "$as_me: failed program was:" >&5
9553sed 's/^/| /' conftest.$ac_ext >&5
9554
b61ff9c8 9555# It does not; compile a test program.
9791c75c
KC
9556if test "$cross_compiling" = yes; then
9557 # try to guess the endianness by grepping values into an object file
9558 ac_cv_c_bigendian=unknown
9559 cat >conftest.$ac_ext <<_ACEOF
9560/* confdefs.h. */
9561_ACEOF
9562cat confdefs.h >>conftest.$ac_ext
9563cat >>conftest.$ac_ext <<_ACEOF
9564/* end confdefs.h. */
b61ff9c8
BS
9565short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9566short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9791c75c 9567void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
b61ff9c8
BS
9568short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9569short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9791c75c
KC
9570void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
9571int
9572main ()
9573{
9574 _ascii (); _ebcdic ();
9575 ;
9576 return 0;
9577}
9578_ACEOF
9579rm -f conftest.$ac_objext
b61ff9c8
BS
9580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9581 (eval $ac_compile) 2>conftest.er1
9791c75c
KC
9582 ac_status=$?
9583 grep -v '^ *+' conftest.er1 >conftest.err
9584 rm -f conftest.er1
9585 cat conftest.err >&5
9586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9587 (exit $ac_status); } &&
9588 { ac_try='test -z "$ac_c_werror_flag"
9589 || test ! -s conftest.err'
9590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9591 (eval $ac_try) 2>&5
9592 ac_status=$?
9593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9594 (exit $ac_status); }; } &&
9595 { ac_try='test -s conftest.$ac_objext'
9596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9597 (eval $ac_try) 2>&5
9598 ac_status=$?
9599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9600 (exit $ac_status); }; }; then
8b1f719a
PB
9601 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
9602 ac_cv_c_bigendian=yes
9603fi
9791c75c
KC
9604if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9605 if test "$ac_cv_c_bigendian" = unknown; then
9606 ac_cv_c_bigendian=no
9607 else
9608 # finding both strings is unlikely to happen, but who knows?
9609 ac_cv_c_bigendian=unknown
9610 fi
9611fi
9612else
9613 echo "$as_me: failed program was:" >&5
9614sed 's/^/| /' conftest.$ac_ext >&5
9615
4977bab6 9616fi
b61ff9c8 9617rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
9618else
9619 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9620/* confdefs.h. */
9621_ACEOF
9622cat confdefs.h >>conftest.$ac_ext
9623cat >>conftest.$ac_ext <<_ACEOF
9624/* end confdefs.h. */
9791c75c
KC
9625int
9626main ()
9627{
4977bab6
ZW
9628 /* Are we little or big endian? From Harbison&Steele. */
9629 union
9630 {
b61ff9c8
BS
9631 long l;
9632 char c[sizeof (long)];
4977bab6
ZW
9633 } u;
9634 u.l = 1;
b61ff9c8 9635 exit (u.c[sizeof (long) - 1] == 1);
4977bab6 9636}
ba479fd2
NN
9637_ACEOF
9638rm -f conftest$ac_exeext
b61ff9c8
BS
9639if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9640 (eval $ac_link) 2>&5
ba479fd2
NN
9641 ac_status=$?
9642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9643 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
9644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9645 (eval $ac_try) 2>&5
ba479fd2
NN
9646 ac_status=$?
9647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9648 (exit $ac_status); }; }; then
4977bab6
ZW
9649 ac_cv_c_bigendian=no
9650else
ba479fd2
NN
9651 echo "$as_me: program exited with status $ac_status" >&5
9652echo "$as_me: failed program was:" >&5
9653sed 's/^/| /' conftest.$ac_ext >&5
9654
9655( exit $ac_status )
9656ac_cv_c_bigendian=yes
4977bab6 9657fi
b61ff9c8 9658rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 9659fi
4977bab6 9660fi
b61ff9c8 9661rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 9662fi
b61ff9c8
BS
9663echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
9664echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
9665case $ac_cv_c_bigendian in
9666 yes)
ba479fd2
NN
9667
9668cat >>confdefs.h <<\_ACEOF
4977bab6 9669#define WORDS_BIGENDIAN 1
ba479fd2 9670_ACEOF
9791c75c
KC
9671 ;;
9672 no)
9673 ;;
9674 *)
9675 { { echo "$as_me:$LINENO: error: unknown endianness
9676presetting ac_cv_c_bigendian=no (or yes) will help" >&5
9677echo "$as_me: error: unknown endianness
9678presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
9679 { (exit 1); exit 1; }; } ;;
9680esac
84c041a1 9681
75e93faa 9682
73458fb7
NN
9683# --------
9684# UNSORTED
9685# --------
1e608388 9686
1e608388 9687
4e70264f
ZW
9688# These libraries may be used by collect2.
9689# We may need a special search path to get them linked.
b61ff9c8
BS
9690echo "$as_me:$LINENO: checking for collect2 libraries" >&5
9691echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
ba479fd2
NN
9692if test "${gcc_cv_collect2_libs+set}" = set; then
9693 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
9694else
9695 save_LIBS="$LIBS"
7f2749d4 9696for libs in '' -lld -lmld \
4e70264f
ZW
9697 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
9698 '-L/usr/lib/cmplrs/cc3.11 -lmld'
9699do
9700 LIBS="$libs"
ba479fd2 9701 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9702/* confdefs.h. */
9703_ACEOF
9704cat confdefs.h >>conftest.$ac_ext
9705cat >>conftest.$ac_ext <<_ACEOF
9706/* end confdefs.h. */
9707
b61ff9c8 9708/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9709#ifdef __cplusplus
9710extern "C"
9711#endif
b61ff9c8
BS
9712/* We use char because int might match the return type of a gcc2
9713 builtin and then its argument prototype would still apply. */
ba479fd2
NN
9714char ldopen ();
9715int
9716main ()
9717{
b61ff9c8 9718ldopen ();
ba479fd2
NN
9719 ;
9720 return 0;
9721}
9722_ACEOF
9723rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
9724if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9725 (eval $ac_link) 2>conftest.er1
ba479fd2 9726 ac_status=$?
86da66b5
HPN
9727 grep -v '^ *+' conftest.er1 >conftest.err
9728 rm -f conftest.er1
9729 cat conftest.err >&5
ba479fd2 9730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9731 (exit $ac_status); } &&
9732 { ac_try='test -z "$ac_c_werror_flag"
9733 || test ! -s conftest.err'
9734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9735 (eval $ac_try) 2>&5
9736 ac_status=$?
9737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9738 (exit $ac_status); }; } &&
9739 { ac_try='test -s conftest$ac_exeext'
9740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9741 (eval $ac_try) 2>&5
9742 ac_status=$?
9743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9744 (exit $ac_status); }; }; then
4e70264f
ZW
9745 gcc_cv_collect2_libs="$libs"; break
9746else
ba479fd2
NN
9747 echo "$as_me: failed program was:" >&5
9748sed 's/^/| /' conftest.$ac_ext >&5
9749
4e70264f 9750fi
b61ff9c8 9751rm -f conftest.err conftest.$ac_objext \
86da66b5 9752 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
9753done
9754LIBS="$save_LIBS"
9755test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
9756fi
b61ff9c8
BS
9757echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
9758echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
9759case $gcc_cv_collect2_libs in
9760 "none required") ;;
9761 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
9762esac
9763
9764
7f2749d4
RK
9765# When building Ada code on Alpha, we need exc_resume which is usually in
9766# -lexc. So test for it.
9767save_LIBS="$LIBS"
9768LIBS=
b61ff9c8
BS
9769echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
9770echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
ba479fd2
NN
9771if test "${ac_cv_search_exc_resume+set}" = set; then
9772 echo $ECHO_N "(cached) $ECHO_C" >&6
9773else
9774 ac_func_search_save_LIBS=$LIBS
b61ff9c8 9775ac_cv_search_exc_resume=no
ba479fd2 9776cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9777/* confdefs.h. */
9778_ACEOF
9779cat confdefs.h >>conftest.$ac_ext
9780cat >>conftest.$ac_ext <<_ACEOF
9781/* end confdefs.h. */
7f2749d4 9782
b61ff9c8 9783/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9784#ifdef __cplusplus
9785extern "C"
9786#endif
b61ff9c8
BS
9787/* We use char because int might match the return type of a gcc2
9788 builtin and then its argument prototype would still apply. */
ba479fd2
NN
9789char exc_resume ();
9790int
9791main ()
9792{
b61ff9c8 9793exc_resume ();
ba479fd2
NN
9794 ;
9795 return 0;
9796}
9797_ACEOF
b61ff9c8
BS
9798rm -f conftest.$ac_objext conftest$ac_exeext
9799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9800 (eval $ac_link) 2>conftest.er1
ba479fd2 9801 ac_status=$?
86da66b5
HPN
9802 grep -v '^ *+' conftest.er1 >conftest.err
9803 rm -f conftest.er1
9804 cat conftest.err >&5
ba479fd2 9805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9806 (exit $ac_status); } &&
9807 { ac_try='test -z "$ac_c_werror_flag"
9808 || test ! -s conftest.err'
9809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9810 (eval $ac_try) 2>&5
9811 ac_status=$?
9812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9813 (exit $ac_status); }; } &&
9814 { ac_try='test -s conftest$ac_exeext'
9815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9816 (eval $ac_try) 2>&5
9817 ac_status=$?
9818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9819 (exit $ac_status); }; }; then
9820 ac_cv_search_exc_resume="none required"
7f2749d4 9821else
ba479fd2
NN
9822 echo "$as_me: failed program was:" >&5
9823sed 's/^/| /' conftest.$ac_ext >&5
9824
ab22c1fa 9825fi
b61ff9c8
BS
9826rm -f conftest.err conftest.$ac_objext \
9827 conftest$ac_exeext conftest.$ac_ext
9828if test "$ac_cv_search_exc_resume" = no; then
9829 for ac_lib in exc; do
9830 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9831 cat >conftest.$ac_ext <<_ACEOF
9832/* confdefs.h. */
9833_ACEOF
9834cat confdefs.h >>conftest.$ac_ext
9835cat >>conftest.$ac_ext <<_ACEOF
9836/* end confdefs.h. */
2f41c1d6 9837
b61ff9c8
BS
9838/* Override any gcc2 internal prototype to avoid an error. */
9839#ifdef __cplusplus
9840extern "C"
9841#endif
9842/* We use char because int might match the return type of a gcc2
9843 builtin and then its argument prototype would still apply. */
9844char exc_resume ();
9845int
9846main ()
9847{
9848exc_resume ();
9849 ;
9850 return 0;
9851}
9852_ACEOF
9853rm -f conftest.$ac_objext conftest$ac_exeext
9854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9855 (eval $ac_link) 2>conftest.er1
9856 ac_status=$?
9857 grep -v '^ *+' conftest.er1 >conftest.err
9858 rm -f conftest.er1
9859 cat conftest.err >&5
9860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9861 (exit $ac_status); } &&
9862 { ac_try='test -z "$ac_c_werror_flag"
9863 || test ! -s conftest.err'
9864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9865 (eval $ac_try) 2>&5
9866 ac_status=$?
9867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9868 (exit $ac_status); }; } &&
9869 { ac_try='test -s conftest$ac_exeext'
9870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9871 (eval $ac_try) 2>&5
9872 ac_status=$?
9873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9874 (exit $ac_status); }; }; then
9875 ac_cv_search_exc_resume="-l$ac_lib"
9876break
1a4b763e 9877else
b61ff9c8
BS
9878 echo "$as_me: failed program was:" >&5
9879sed 's/^/| /' conftest.$ac_ext >&5
9880
9881fi
9882rm -f conftest.err conftest.$ac_objext \
9883 conftest$ac_exeext conftest.$ac_ext
9884 done
b8ec3cc8 9885fi
b8ec3cc8
EC
9886LIBS=$ac_func_search_save_LIBS
9887fi
b61ff9c8
BS
9888echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
9889echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
9890if test "$ac_cv_search_exc_resume" != no; then
9891 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
b8ec3cc8
EC
9892
9893fi
9894
dd7f7a6e 9895GNAT_LIBEXC="$LIBS"
b8ec3cc8
EC
9896LIBS="$save_LIBS"
9897
9898
dd7f7a6e
EC
9899# Some systems put ldexp and frexp in libm instead of libc; assume
9900# they're both in the same place. jcf-dump needs them.
9901save_LIBS="$LIBS"
9902LIBS=
b61ff9c8
BS
9903echo "$as_me:$LINENO: checking for library containing ldexp" >&5
9904echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
dd7f7a6e 9905if test "${ac_cv_search_ldexp+set}" = set; then
b8ec3cc8
EC
9906 echo $ECHO_N "(cached) $ECHO_C" >&6
9907else
dd7f7a6e 9908 ac_func_search_save_LIBS=$LIBS
b61ff9c8 9909ac_cv_search_ldexp=no
dd7f7a6e 9910cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9911/* confdefs.h. */
9912_ACEOF
9913cat confdefs.h >>conftest.$ac_ext
9914cat >>conftest.$ac_ext <<_ACEOF
9915/* end confdefs.h. */
dd7f7a6e 9916
b61ff9c8 9917/* Override any gcc2 internal prototype to avoid an error. */
dd7f7a6e
EC
9918#ifdef __cplusplus
9919extern "C"
9920#endif
b61ff9c8
BS
9921/* We use char because int might match the return type of a gcc2
9922 builtin and then its argument prototype would still apply. */
dd7f7a6e 9923char ldexp ();
ba479fd2
NN
9924int
9925main ()
9926{
b61ff9c8 9927ldexp ();
ba479fd2
NN
9928 ;
9929 return 0;
9930}
9931_ACEOF
b61ff9c8
BS
9932rm -f conftest.$ac_objext conftest$ac_exeext
9933if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9934 (eval $ac_link) 2>conftest.er1
dd7f7a6e
EC
9935 ac_status=$?
9936 grep -v '^ *+' conftest.er1 >conftest.err
9937 rm -f conftest.er1
9938 cat conftest.err >&5
9939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9940 (exit $ac_status); } &&
9941 { ac_try='test -z "$ac_c_werror_flag"
9942 || test ! -s conftest.err'
9943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9944 (eval $ac_try) 2>&5
9945 ac_status=$?
9946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9947 (exit $ac_status); }; } &&
9948 { ac_try='test -s conftest$ac_exeext'
9949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9950 (eval $ac_try) 2>&5
9951 ac_status=$?
9952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9953 (exit $ac_status); }; }; then
9954 ac_cv_search_ldexp="none required"
dd7f7a6e
EC
9955else
9956 echo "$as_me: failed program was:" >&5
9957sed 's/^/| /' conftest.$ac_ext >&5
9958
1a4b763e 9959fi
b61ff9c8
BS
9960rm -f conftest.err conftest.$ac_objext \
9961 conftest$ac_exeext conftest.$ac_ext
9962if test "$ac_cv_search_ldexp" = no; then
9963 for ac_lib in m; do
9964 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9965 cat >conftest.$ac_ext <<_ACEOF
9966/* confdefs.h. */
9967_ACEOF
9968cat confdefs.h >>conftest.$ac_ext
9969cat >>conftest.$ac_ext <<_ACEOF
9970/* end confdefs.h. */
2f41c1d6 9971
b61ff9c8
BS
9972/* Override any gcc2 internal prototype to avoid an error. */
9973#ifdef __cplusplus
9974extern "C"
9975#endif
9976/* We use char because int might match the return type of a gcc2
9977 builtin and then its argument prototype would still apply. */
9978char ldexp ();
9979int
9980main ()
9981{
9982ldexp ();
9983 ;
9984 return 0;
9985}
9986_ACEOF
9987rm -f conftest.$ac_objext conftest$ac_exeext
9988if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9989 (eval $ac_link) 2>conftest.er1
9990 ac_status=$?
9991 grep -v '^ *+' conftest.er1 >conftest.err
9992 rm -f conftest.er1
9993 cat conftest.err >&5
9994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9995 (exit $ac_status); } &&
9996 { ac_try='test -z "$ac_c_werror_flag"
9997 || test ! -s conftest.err'
9998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9999 (eval $ac_try) 2>&5
10000 ac_status=$?
10001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10002 (exit $ac_status); }; } &&
10003 { ac_try='test -s conftest$ac_exeext'
10004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10005 (eval $ac_try) 2>&5
10006 ac_status=$?
10007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10008 (exit $ac_status); }; }; then
10009 ac_cv_search_ldexp="-l$ac_lib"
10010break
1a4b763e 10011else
b61ff9c8
BS
10012 echo "$as_me: failed program was:" >&5
10013sed 's/^/| /' conftest.$ac_ext >&5
10014
10015fi
10016rm -f conftest.err conftest.$ac_objext \
10017 conftest$ac_exeext conftest.$ac_ext
10018 done
dd7f7a6e
EC
10019fi
10020LIBS=$ac_func_search_save_LIBS
10021fi
b61ff9c8
BS
10022echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
10023echo "${ECHO_T}$ac_cv_search_ldexp" >&6
10024if test "$ac_cv_search_ldexp" != no; then
10025 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
dd7f7a6e
EC
10026
10027fi
10028
10029LDEXP_LIB="$LIBS"
10030LIBS="$save_LIBS"
10031
10032
10033# Use <inttypes.h> only if it exists,
10034# doesn't clash with <sys/types.h>, and declares intmax_t.
b61ff9c8
BS
10035echo "$as_me:$LINENO: checking for inttypes.h" >&5
10036echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
dd7f7a6e
EC
10037if test "${gcc_cv_header_inttypes_h+set}" = set; then
10038 echo $ECHO_N "(cached) $ECHO_C" >&6
10039else
10040 cat >conftest.$ac_ext <<_ACEOF
10041/* confdefs.h. */
10042_ACEOF
10043cat confdefs.h >>conftest.$ac_ext
10044cat >>conftest.$ac_ext <<_ACEOF
10045/* end confdefs.h. */
10046#include <sys/types.h>
10047#include <inttypes.h>
10048int
10049main ()
10050{
10051intmax_t i = -1;
10052 ;
10053 return 0;
10054}
10055_ACEOF
10056rm -f conftest.$ac_objext
b61ff9c8
BS
10057if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10058 (eval $ac_compile) 2>conftest.er1
dd7f7a6e
EC
10059 ac_status=$?
10060 grep -v '^ *+' conftest.er1 >conftest.err
10061 rm -f conftest.er1
10062 cat conftest.err >&5
10063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10064 (exit $ac_status); } &&
10065 { ac_try='test -z "$ac_c_werror_flag"
10066 || test ! -s conftest.err'
10067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10068 (eval $ac_try) 2>&5
10069 ac_status=$?
10070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10071 (exit $ac_status); }; } &&
10072 { ac_try='test -s conftest.$ac_objext'
10073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10074 (eval $ac_try) 2>&5
10075 ac_status=$?
10076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10077 (exit $ac_status); }; }; then
dd7f7a6e
EC
10078 gcc_cv_header_inttypes_h=yes
10079else
10080 echo "$as_me: failed program was:" >&5
10081sed 's/^/| /' conftest.$ac_ext >&5
10082
b61ff9c8 10083gcc_cv_header_inttypes_h=no
dd7f7a6e 10084fi
b61ff9c8 10085rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e
EC
10086fi
10087
b61ff9c8
BS
10088echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
10089echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
dd7f7a6e
EC
10090if test $gcc_cv_header_inttypes_h = yes; then
10091
10092cat >>confdefs.h <<\_ACEOF
10093#define HAVE_INTTYPES_H 1
10094_ACEOF
10095
0056a9b5 10096fi
956d6950 10097
c149cc37 10098
ba479fd2
NN
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
0d667716
KG
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
ba479fd2
NN
10127
10128
10129
ba479fd2
NN
10130
10131
10132
52a6edcc 10133for ac_func in times clock kill getrlimit setrlimit atoll atoq \
d2e506f2 10134 sysconf strsignal getrusage nl_langinfo \
0d667716
KG
10135 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
10136 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 10137do
ba479fd2 10138as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b61ff9c8
BS
10139echo "$as_me:$LINENO: checking for $ac_func" >&5
10140echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10141if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
10142 echo $ECHO_N "(cached) $ECHO_C" >&6
10143else
10144 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10145/* confdefs.h. */
10146_ACEOF
10147cat confdefs.h >>conftest.$ac_ext
10148cat >>conftest.$ac_ext <<_ACEOF
10149/* end confdefs.h. */
86da66b5
HPN
10150/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10151 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10152#define $ac_func innocuous_$ac_func
10153
956d6950 10154/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10155 which can conflict with char $ac_func (); below.
10156 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10157 <limits.h> exists even on freestanding compilers. */
86da66b5 10158
ba479fd2
NN
10159#ifdef __STDC__
10160# include <limits.h>
10161#else
10162# include <assert.h>
10163#endif
86da66b5
HPN
10164
10165#undef $ac_func
10166
b61ff9c8 10167/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10168#ifdef __cplusplus
10169extern "C"
b61ff9c8 10170{
ba479fd2 10171#endif
b61ff9c8
BS
10172/* We use char because int might match the return type of a gcc2
10173 builtin and then its argument prototype would still apply. */
ba479fd2 10174char $ac_func ();
956d6950
JL
10175/* The GNU C library defines this for functions which it implements
10176 to always fail with ENOSYS. Some functions are actually named
10177 something starting with __ and the normal name is an alias. */
b61ff9c8 10178#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
956d6950 10179choke me
b61ff9c8
BS
10180#else
10181char (*f) () = $ac_func;
10182#endif
10183#ifdef __cplusplus
10184}
956d6950
JL
10185#endif
10186
ba479fd2
NN
10187int
10188main ()
10189{
b61ff9c8 10190return f != $ac_func;
ba479fd2
NN
10191 ;
10192 return 0;
10193}
10194_ACEOF
10195rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
10196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10197 (eval $ac_link) 2>conftest.er1
ba479fd2 10198 ac_status=$?
86da66b5
HPN
10199 grep -v '^ *+' conftest.er1 >conftest.err
10200 rm -f conftest.er1
10201 cat conftest.err >&5
ba479fd2 10202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10203 (exit $ac_status); } &&
10204 { ac_try='test -z "$ac_c_werror_flag"
10205 || test ! -s conftest.err'
10206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10207 (eval $ac_try) 2>&5
10208 ac_status=$?
10209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10210 (exit $ac_status); }; } &&
10211 { ac_try='test -s conftest$ac_exeext'
10212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10213 (eval $ac_try) 2>&5
10214 ac_status=$?
10215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10216 (exit $ac_status); }; }; then
ba479fd2
NN
10217 eval "$as_ac_var=yes"
10218else
10219 echo "$as_me: failed program was:" >&5
10220sed 's/^/| /' conftest.$ac_ext >&5
10221
b61ff9c8 10222eval "$as_ac_var=no"
ba479fd2 10223fi
b61ff9c8 10224rm -f conftest.err conftest.$ac_objext \
86da66b5 10225 conftest$ac_exeext conftest.$ac_ext
ba479fd2 10226fi
b61ff9c8
BS
10227echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10228echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
10229if test `eval echo '${'$as_ac_var'}'` = yes; then
10230 cat >>confdefs.h <<_ACEOF
10231#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10232_ACEOF
956d6950 10233
956d6950
JL
10234fi
10235done
10236
6885fc87 10237
39f6c4c8 10238if test x$ac_cv_func_mbstowcs = xyes; then
b61ff9c8
BS
10239 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
10240echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
ba479fd2
NN
10241if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
10242 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
10243else
10244 if test "$cross_compiling" = yes; then
10245 gcc_cv_func_mbstowcs_works=yes
10246else
ba479fd2 10247 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10248/* confdefs.h. */
10249_ACEOF
10250cat confdefs.h >>conftest.$ac_ext
10251cat >>conftest.$ac_ext <<_ACEOF
10252/* end confdefs.h. */
39f6c4c8
KW
10253#include <stdlib.h>
10254int main()
10255{
10256 mbstowcs(0, "", 0);
10257 return 0;
10258}
ba479fd2
NN
10259_ACEOF
10260rm -f conftest$ac_exeext
b61ff9c8
BS
10261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10262 (eval $ac_link) 2>&5
ba479fd2
NN
10263 ac_status=$?
10264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10265 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
10266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10267 (eval $ac_try) 2>&5
ba479fd2
NN
10268 ac_status=$?
10269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10270 (exit $ac_status); }; }; then
39f6c4c8
KW
10271 gcc_cv_func_mbstowcs_works=yes
10272else
ba479fd2
NN
10273 echo "$as_me: program exited with status $ac_status" >&5
10274echo "$as_me: failed program was:" >&5
10275sed 's/^/| /' conftest.$ac_ext >&5
10276
10277( exit $ac_status )
10278gcc_cv_func_mbstowcs_works=no
39f6c4c8 10279fi
b61ff9c8 10280rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 10281fi
39f6c4c8 10282fi
b61ff9c8
BS
10283echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
10284echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 10285 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
10286
10287cat >>confdefs.h <<\_ACEOF
39f6c4c8 10288#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 10289_ACEOF
39f6c4c8
KW
10290
10291 fi
10292fi
10293
b61ff9c8
BS
10294echo "$as_me:$LINENO: checking for ssize_t" >&5
10295echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
ba479fd2
NN
10296if test "${ac_cv_type_ssize_t+set}" = set; then
10297 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 10298else
ba479fd2 10299 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10300/* confdefs.h. */
10301_ACEOF
10302cat confdefs.h >>conftest.$ac_ext
10303cat >>conftest.$ac_ext <<_ACEOF
10304/* end confdefs.h. */
8b4fc07a
NN
10305$ac_includes_default
10306int
10307main ()
10308{
b61ff9c8 10309if ((ssize_t *) 0)
8b4fc07a 10310 return 0;
b61ff9c8 10311if (sizeof (ssize_t))
8b4fc07a
NN
10312 return 0;
10313 ;
10314 return 0;
10315}
ba479fd2 10316_ACEOF
8b4fc07a 10317rm -f conftest.$ac_objext
b61ff9c8
BS
10318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10319 (eval $ac_compile) 2>conftest.er1
8b4fc07a 10320 ac_status=$?
86da66b5
HPN
10321 grep -v '^ *+' conftest.er1 >conftest.err
10322 rm -f conftest.er1
10323 cat conftest.err >&5
8b4fc07a 10324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10325 (exit $ac_status); } &&
10326 { ac_try='test -z "$ac_c_werror_flag"
10327 || test ! -s conftest.err'
10328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10329 (eval $ac_try) 2>&5
10330 ac_status=$?
10331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10332 (exit $ac_status); }; } &&
10333 { ac_try='test -s conftest.$ac_objext'
10334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10335 (eval $ac_try) 2>&5
10336 ac_status=$?
10337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10338 (exit $ac_status); }; }; then
cb65112a 10339 ac_cv_type_ssize_t=yes
f12bc141 10340else
8b4fc07a
NN
10341 echo "$as_me: failed program was:" >&5
10342sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10343
b61ff9c8 10344ac_cv_type_ssize_t=no
8b4fc07a 10345fi
b61ff9c8 10346rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10347fi
b61ff9c8
BS
10348echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
10349echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
10350if test $ac_cv_type_ssize_t = yes; then
10351 :
10352else
ba479fd2 10353
8b4fc07a 10354cat >>confdefs.h <<_ACEOF
f12bc141 10355#define ssize_t int
ba479fd2 10356_ACEOF
f12bc141
ZW
10357
10358fi
10359
bba09b5a
AT
10360echo "$as_me:$LINENO: checking for caddr_t" >&5
10361echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6
10362if test "${ac_cv_type_caddr_t+set}" = set; then
10363 echo $ECHO_N "(cached) $ECHO_C" >&6
10364else
10365 cat >conftest.$ac_ext <<_ACEOF
10366/* confdefs.h. */
10367_ACEOF
10368cat confdefs.h >>conftest.$ac_ext
10369cat >>conftest.$ac_ext <<_ACEOF
10370/* end confdefs.h. */
10371$ac_includes_default
10372int
10373main ()
10374{
10375if ((caddr_t *) 0)
10376 return 0;
10377if (sizeof (caddr_t))
10378 return 0;
10379 ;
10380 return 0;
10381}
10382_ACEOF
10383rm -f conftest.$ac_objext
10384if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10385 (eval $ac_compile) 2>conftest.er1
10386 ac_status=$?
10387 grep -v '^ *+' conftest.er1 >conftest.err
10388 rm -f conftest.er1
10389 cat conftest.err >&5
10390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10391 (exit $ac_status); } &&
10392 { ac_try='test -z "$ac_c_werror_flag"
10393 || test ! -s conftest.err'
10394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10395 (eval $ac_try) 2>&5
10396 ac_status=$?
10397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10398 (exit $ac_status); }; } &&
10399 { ac_try='test -s conftest.$ac_objext'
10400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10401 (eval $ac_try) 2>&5
10402 ac_status=$?
10403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10404 (exit $ac_status); }; }; then
10405 ac_cv_type_caddr_t=yes
10406else
10407 echo "$as_me: failed program was:" >&5
10408sed 's/^/| /' conftest.$ac_ext >&5
10409
10410ac_cv_type_caddr_t=no
10411fi
10412rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10413fi
10414echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
10415echo "${ECHO_T}$ac_cv_type_caddr_t" >&6
10416if test $ac_cv_type_caddr_t = yes; then
10417 :
10418else
10419
10420cat >>confdefs.h <<_ACEOF
10421#define caddr_t char *
10422_ACEOF
10423
10424fi
10425
0b9d02c6 10426
3b0727a0 10427
b61ff9c8
BS
10428echo "$as_me:$LINENO: checking for sys/mman.h" >&5
10429echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
3b0727a0
MR
10430if test "${ac_cv_header_sys_mman_h+set}" = set; then
10431 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10432else
18fc9bd4 10433 cat >conftest.$ac_ext <<_ACEOF
3b0727a0
MR
10434/* confdefs.h. */
10435_ACEOF
10436cat confdefs.h >>conftest.$ac_ext
10437cat >>conftest.$ac_ext <<_ACEOF
10438/* end confdefs.h. */
10439#include <sys/mman.h>
10440_ACEOF
b61ff9c8
BS
10441if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10442 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3b0727a0
MR
10443 ac_status=$?
10444 grep -v '^ *+' conftest.er1 >conftest.err
10445 rm -f conftest.er1
10446 cat conftest.err >&5
10447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10448 (exit $ac_status); } >/dev/null; then
10449 if test -s conftest.err; then
10450 ac_cpp_err=$ac_c_preproc_warn_flag
10451 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10452 else
10453 ac_cpp_err=
10454 fi
10455else
10456 ac_cpp_err=yes
10457fi
10458if test -z "$ac_cpp_err"; then
10459 ac_cv_header_sys_mman_h=yes
10460else
3b0727a0
MR
10461 echo "$as_me: failed program was:" >&5
10462sed 's/^/| /' conftest.$ac_ext >&5
10463
18fc9bd4 10464 ac_cv_header_sys_mman_h=no
3b0727a0
MR
10465fi
10466rm -f conftest.err conftest.$ac_ext
10467fi
b61ff9c8
BS
10468echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
10469echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
3b0727a0
MR
10470if test $ac_cv_header_sys_mman_h = yes; then
10471 gcc_header_sys_mman_h=yes
10472else
10473 gcc_header_sys_mman_h=no
10474fi
10475
b61ff9c8
BS
10476echo "$as_me:$LINENO: checking for mmap" >&5
10477echo $ECHO_N "checking for mmap... $ECHO_C" >&6
3b0727a0
MR
10478if test "${ac_cv_func_mmap+set}" = set; then
10479 echo $ECHO_N "(cached) $ECHO_C" >&6
10480else
10481 cat >conftest.$ac_ext <<_ACEOF
10482/* confdefs.h. */
10483_ACEOF
10484cat confdefs.h >>conftest.$ac_ext
10485cat >>conftest.$ac_ext <<_ACEOF
10486/* end confdefs.h. */
10487/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
10488 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10489#define mmap innocuous_mmap
10490
10491/* System header to define __stub macros and hopefully few prototypes,
10492 which can conflict with char mmap (); below.
10493 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10494 <limits.h> exists even on freestanding compilers. */
10495
10496#ifdef __STDC__
10497# include <limits.h>
10498#else
10499# include <assert.h>
10500#endif
10501
10502#undef mmap
10503
b61ff9c8 10504/* Override any gcc2 internal prototype to avoid an error. */
3b0727a0
MR
10505#ifdef __cplusplus
10506extern "C"
b61ff9c8 10507{
3b0727a0 10508#endif
b61ff9c8
BS
10509/* We use char because int might match the return type of a gcc2
10510 builtin and then its argument prototype would still apply. */
3b0727a0
MR
10511char mmap ();
10512/* The GNU C library defines this for functions which it implements
10513 to always fail with ENOSYS. Some functions are actually named
10514 something starting with __ and the normal name is an alias. */
b61ff9c8 10515#if defined (__stub_mmap) || defined (__stub___mmap)
3b0727a0 10516choke me
b61ff9c8
BS
10517#else
10518char (*f) () = mmap;
10519#endif
10520#ifdef __cplusplus
10521}
3b0727a0
MR
10522#endif
10523
10524int
10525main ()
10526{
b61ff9c8 10527return f != mmap;
3b0727a0
MR
10528 ;
10529 return 0;
10530}
10531_ACEOF
10532rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
10533if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10534 (eval $ac_link) 2>conftest.er1
3b0727a0
MR
10535 ac_status=$?
10536 grep -v '^ *+' conftest.er1 >conftest.err
10537 rm -f conftest.er1
10538 cat conftest.err >&5
10539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10540 (exit $ac_status); } &&
10541 { ac_try='test -z "$ac_c_werror_flag"
10542 || test ! -s conftest.err'
10543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10544 (eval $ac_try) 2>&5
10545 ac_status=$?
10546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10547 (exit $ac_status); }; } &&
10548 { ac_try='test -s conftest$ac_exeext'
10549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10550 (eval $ac_try) 2>&5
10551 ac_status=$?
10552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10553 (exit $ac_status); }; }; then
8b1f719a
PB
10554 ac_cv_func_mmap=yes
10555else
10556 echo "$as_me: failed program was:" >&5
10557sed 's/^/| /' conftest.$ac_ext >&5
a6ccdbab 10558
b61ff9c8 10559ac_cv_func_mmap=no
8b1f719a 10560fi
b61ff9c8 10561rm -f conftest.err conftest.$ac_objext \
3b0727a0
MR
10562 conftest$ac_exeext conftest.$ac_ext
10563fi
b61ff9c8
BS
10564echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
10565echo "${ECHO_T}$ac_cv_func_mmap" >&6
3b0727a0
MR
10566if test $ac_cv_func_mmap = yes; then
10567 gcc_func_mmap=yes
10568else
10569 gcc_func_mmap=no
10570fi
10571
10572if test "$gcc_header_sys_mman_h" != yes \
10573 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
10574 gcc_cv_func_mmap_file=no
10575 gcc_cv_func_mmap_dev_zero=no
10576 gcc_cv_func_mmap_anon=no
10577else
b61ff9c8
BS
10578 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
10579echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
ba479fd2
NN
10580if test "${gcc_cv_func_mmap_file+set}" = set; then
10581 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 10582else
ba479fd2 10583 # Add a system to this blacklist if
1072ec3f
ZW
10584 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
10585 # memory area containing the same data that you'd get if you applied
10586 # read() to the same fd. The only system known to have a problem here
10587 # is VMS, where text files have record structure.
10588 case "$host_os" in
ba479fd2 10589 vms* | ultrix*)
1072ec3f
ZW
10590 gcc_cv_func_mmap_file=no ;;
10591 *)
10592 gcc_cv_func_mmap_file=yes;;
10593 esac
10594fi
b61ff9c8
BS
10595echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
10596echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
10597 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
10598echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
ba479fd2
NN
10599if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
10600 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
10601else
10602 # Add a system to this blacklist if it has mmap() but /dev/zero
10603 # does not exist, or if mmapping /dev/zero does not give anonymous
10604 # zeroed pages with both the following properties:
10605 # 1. If you map N consecutive pages in with one call, and then
10606 # unmap any subset of those pages, the pages that were not
10607 # explicitly unmapped remain accessible.
10608 # 2. If you map two adjacent blocks of memory and then unmap them
10609 # both at once, they must both go away.
10610 # Systems known to be in this category are Windows (all variants),
10611 # VMS, and Darwin.
10612 case "$host_os" in
2ce240d3 10613 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
10614 gcc_cv_func_mmap_dev_zero=no ;;
10615 *)
10616 gcc_cv_func_mmap_dev_zero=yes;;
10617 esac
10618fi
b61ff9c8
BS
10619echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
10620echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
10621
10622 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
b61ff9c8
BS
10623 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
10624echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
ba479fd2
NN
10625if test "${gcc_cv_decl_map_anon+set}" = set; then
10626 echo $ECHO_N "(cached) $ECHO_C" >&6
10627else
10628 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10629/* confdefs.h. */
10630_ACEOF
10631cat confdefs.h >>conftest.$ac_ext
10632cat >>conftest.$ac_ext <<_ACEOF
10633/* end confdefs.h. */
1072ec3f
ZW
10634#include <sys/types.h>
10635#include <sys/mman.h>
10636#include <unistd.h>
10637
10638#ifndef MAP_ANONYMOUS
10639#define MAP_ANONYMOUS MAP_ANON
10640#endif
10641
ba479fd2
NN
10642int
10643main ()
10644{
1072ec3f 10645int n = MAP_ANONYMOUS;
ba479fd2
NN
10646 ;
10647 return 0;
10648}
10649_ACEOF
10650rm -f conftest.$ac_objext
b61ff9c8
BS
10651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10652 (eval $ac_compile) 2>conftest.er1
ba479fd2 10653 ac_status=$?
86da66b5
HPN
10654 grep -v '^ *+' conftest.er1 >conftest.err
10655 rm -f conftest.er1
10656 cat conftest.err >&5
ba479fd2 10657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10658 (exit $ac_status); } &&
10659 { ac_try='test -z "$ac_c_werror_flag"
10660 || test ! -s conftest.err'
10661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10662 (eval $ac_try) 2>&5
10663 ac_status=$?
10664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10665 (exit $ac_status); }; } &&
10666 { ac_try='test -s conftest.$ac_objext'
10667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10668 (eval $ac_try) 2>&5
10669 ac_status=$?
10670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10671 (exit $ac_status); }; }; then
1072ec3f
ZW
10672 gcc_cv_decl_map_anon=yes
10673else
ba479fd2
NN
10674 echo "$as_me: failed program was:" >&5
10675sed 's/^/| /' conftest.$ac_ext >&5
10676
b61ff9c8 10677gcc_cv_decl_map_anon=no
1072ec3f 10678fi
b61ff9c8 10679rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 10680fi
b61ff9c8
BS
10681echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
10682echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
10683
10684 if test $gcc_cv_decl_map_anon = no; then
10685 gcc_cv_func_mmap_anon=no
10686 else
b61ff9c8
BS
10687 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
10688echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
ba479fd2
NN
10689if test "${gcc_cv_func_mmap_anon+set}" = set; then
10690 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
10691else
10692 # Add a system to this blacklist if it has mmap() and MAP_ANON or
10693 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
10694 # doesn't give anonymous zeroed pages with the same properties listed
10695 # above for use of /dev/zero.
10696 # Systems known to be in this category are Windows, VMS, and SCO Unix.
10697 case "$host_os" in
10698 vms* | cygwin* | pe | mingw* | sco* | udk* )
10699 gcc_cv_func_mmap_anon=no ;;
10700 *)
10701 gcc_cv_func_mmap_anon=yes;;
10702 esac
10703fi
b61ff9c8
BS
10704echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
10705echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
10706 fi
10707fi
10708
10709if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
10710
10711cat >>confdefs.h <<\_ACEOF
1072ec3f 10712#define HAVE_MMAP_FILE 1
ba479fd2 10713_ACEOF
1072ec3f
ZW
10714
10715fi
10716if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
10717
10718cat >>confdefs.h <<\_ACEOF
1072ec3f 10719#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 10720_ACEOF
1072ec3f
ZW
10721
10722fi
10723if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
10724
10725cat >>confdefs.h <<\_ACEOF
1072ec3f 10726#define HAVE_MMAP_ANON 1
ba479fd2 10727_ACEOF
1072ec3f
ZW
10728
10729fi
10730
b27d2bd5
MK
10731
10732case "${host}" in
ee262b6f 10733*-*-*vms*)
ba479fd2 10734 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
10735 # won't work, and it isn't easily adaptable. It makes more sense to
10736 # just force it.
10737 ac_cv_func_vfork_works=yes
10738 ;;
b27d2bd5 10739esac
b61ff9c8
BS
10740echo "$as_me:$LINENO: checking for pid_t" >&5
10741echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
ba479fd2
NN
10742if test "${ac_cv_type_pid_t+set}" = set; then
10743 echo $ECHO_N "(cached) $ECHO_C" >&6
10744else
10745 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10746/* confdefs.h. */
10747_ACEOF
10748cat confdefs.h >>conftest.$ac_ext
10749cat >>conftest.$ac_ext <<_ACEOF
10750/* end confdefs.h. */
10751$ac_includes_default
10752int
10753main ()
10754{
b61ff9c8 10755if ((pid_t *) 0)
ba479fd2 10756 return 0;
b61ff9c8 10757if (sizeof (pid_t))
ba479fd2
NN
10758 return 0;
10759 ;
10760 return 0;
10761}
10762_ACEOF
10763rm -f conftest.$ac_objext
b61ff9c8
BS
10764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10765 (eval $ac_compile) 2>conftest.er1
ba479fd2 10766 ac_status=$?
86da66b5
HPN
10767 grep -v '^ *+' conftest.er1 >conftest.err
10768 rm -f conftest.er1
10769 cat conftest.err >&5
ba479fd2 10770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10771 (exit $ac_status); } &&
10772 { ac_try='test -z "$ac_c_werror_flag"
10773 || test ! -s conftest.err'
10774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10775 (eval $ac_try) 2>&5
10776 ac_status=$?
10777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10778 (exit $ac_status); }; } &&
10779 { ac_try='test -s conftest.$ac_objext'
10780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10781 (eval $ac_try) 2>&5
10782 ac_status=$?
10783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10784 (exit $ac_status); }; }; then
cb65112a 10785 ac_cv_type_pid_t=yes
c375c43b 10786else
ba479fd2
NN
10787 echo "$as_me: failed program was:" >&5
10788sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10789
b61ff9c8 10790ac_cv_type_pid_t=no
ba479fd2 10791fi
b61ff9c8 10792rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10793fi
b61ff9c8
BS
10794echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10795echo "${ECHO_T}$ac_cv_type_pid_t" >&6
ba479fd2
NN
10796if test $ac_cv_type_pid_t = yes; then
10797 :
10798else
10799
10800cat >>confdefs.h <<_ACEOF
c375c43b 10801#define pid_t int
ba479fd2 10802_ACEOF
c375c43b
KG
10803
10804fi
10805
ba479fd2 10806
b61ff9c8
BS
10807
10808for ac_header in unistd.h vfork.h
ba479fd2
NN
10809do
10810as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b61ff9c8
BS
10811echo "$as_me:$LINENO: checking for $ac_header" >&5
10812echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10813if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 10814 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10815else
18fc9bd4 10816 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10817/* confdefs.h. */
10818_ACEOF
10819cat confdefs.h >>conftest.$ac_ext
10820cat >>conftest.$ac_ext <<_ACEOF
10821/* end confdefs.h. */
10822#include <$ac_header>
10823_ACEOF
b61ff9c8
BS
10824if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10825 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
10826 ac_status=$?
10827 grep -v '^ *+' conftest.er1 >conftest.err
10828 rm -f conftest.er1
10829 cat conftest.err >&5
10830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10831 (exit $ac_status); } >/dev/null; then
10832 if test -s conftest.err; then
10833 ac_cpp_err=$ac_c_preproc_warn_flag
10834 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10835 else
10836 ac_cpp_err=
10837 fi
10838else
10839 ac_cpp_err=yes
10840fi
10841if test -z "$ac_cpp_err"; then
18fc9bd4 10842 eval "$as_ac_Header=yes"
ba479fd2
NN
10843else
10844 echo "$as_me: failed program was:" >&5
10845sed 's/^/| /' conftest.$ac_ext >&5
10846
18fc9bd4 10847 eval "$as_ac_Header=no"
ba479fd2
NN
10848fi
10849rm -f conftest.err conftest.$ac_ext
c375c43b 10850fi
b61ff9c8
BS
10851echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10852echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
10853if test `eval echo '${'$as_ac_Header'}'` = yes; then
10854 cat >>confdefs.h <<_ACEOF
10855#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10856_ACEOF
6e3f3080
NN
10857
10858fi
ba479fd2
NN
10859done
10860
10861
10862
10863for ac_func in fork vfork
10864do
10865as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b61ff9c8
BS
10866echo "$as_me:$LINENO: checking for $ac_func" >&5
10867echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10868if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
10869 echo $ECHO_N "(cached) $ECHO_C" >&6
10870else
10871 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10872/* confdefs.h. */
10873_ACEOF
10874cat confdefs.h >>conftest.$ac_ext
10875cat >>conftest.$ac_ext <<_ACEOF
10876/* end confdefs.h. */
86da66b5
HPN
10877/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10878 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10879#define $ac_func innocuous_$ac_func
10880
c375c43b 10881/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10882 which can conflict with char $ac_func (); below.
10883 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10884 <limits.h> exists even on freestanding compilers. */
86da66b5 10885
ba479fd2
NN
10886#ifdef __STDC__
10887# include <limits.h>
10888#else
10889# include <assert.h>
10890#endif
86da66b5
HPN
10891
10892#undef $ac_func
10893
b61ff9c8 10894/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10895#ifdef __cplusplus
10896extern "C"
b61ff9c8 10897{
ba479fd2 10898#endif
b61ff9c8
BS
10899/* We use char because int might match the return type of a gcc2
10900 builtin and then its argument prototype would still apply. */
ba479fd2 10901char $ac_func ();
c375c43b
KG
10902/* The GNU C library defines this for functions which it implements
10903 to always fail with ENOSYS. Some functions are actually named
10904 something starting with __ and the normal name is an alias. */
b61ff9c8 10905#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b 10906choke me
b61ff9c8
BS
10907#else
10908char (*f) () = $ac_func;
10909#endif
10910#ifdef __cplusplus
10911}
c375c43b
KG
10912#endif
10913
ba479fd2
NN
10914int
10915main ()
10916{
b61ff9c8 10917return f != $ac_func;
ba479fd2
NN
10918 ;
10919 return 0;
10920}
10921_ACEOF
10922rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
10923if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10924 (eval $ac_link) 2>conftest.er1
ba479fd2 10925 ac_status=$?
86da66b5
HPN
10926 grep -v '^ *+' conftest.er1 >conftest.err
10927 rm -f conftest.er1
10928 cat conftest.err >&5
ba479fd2 10929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10930 (exit $ac_status); } &&
10931 { ac_try='test -z "$ac_c_werror_flag"
10932 || test ! -s conftest.err'
10933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10934 (eval $ac_try) 2>&5
10935 ac_status=$?
10936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10937 (exit $ac_status); }; } &&
10938 { ac_try='test -s conftest$ac_exeext'
10939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10940 (eval $ac_try) 2>&5
10941 ac_status=$?
10942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10943 (exit $ac_status); }; }; then
ba479fd2
NN
10944 eval "$as_ac_var=yes"
10945else
10946 echo "$as_me: failed program was:" >&5
10947sed 's/^/| /' conftest.$ac_ext >&5
10948
b61ff9c8 10949eval "$as_ac_var=no"
ba479fd2 10950fi
b61ff9c8 10951rm -f conftest.err conftest.$ac_objext \
86da66b5 10952 conftest$ac_exeext conftest.$ac_ext
ba479fd2 10953fi
b61ff9c8
BS
10954echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10955echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
10956if test `eval echo '${'$as_ac_var'}'` = yes; then
10957 cat >>confdefs.h <<_ACEOF
10958#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10959_ACEOF
10960
c375c43b 10961fi
ba479fd2 10962done
c375c43b 10963
ba479fd2 10964if test "x$ac_cv_func_fork" = xyes; then
b61ff9c8
BS
10965 echo "$as_me:$LINENO: checking for working fork" >&5
10966echo $ECHO_N "checking for working fork... $ECHO_C" >&6
ba479fd2
NN
10967if test "${ac_cv_func_fork_works+set}" = set; then
10968 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10969else
ba479fd2
NN
10970 if test "$cross_compiling" = yes; then
10971 ac_cv_func_fork_works=cross
10972else
10973 cat >conftest.$ac_ext <<_ACEOF
b61ff9c8
BS
10974/* By Ruediger Kuhlmann. */
10975 #include <sys/types.h>
10976 #if HAVE_UNISTD_H
10977 # include <unistd.h>
10978 #endif
10979 /* Some systems only have a dummy stub for fork() */
10980 int main ()
10981 {
10982 if (fork() < 0)
10983 exit (1);
10984 exit (0);
10985 }
1a4b763e
BS
10986_ACEOF
10987rm -f conftest$ac_exeext
b61ff9c8
BS
10988if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10989 (eval $ac_link) 2>&5
1a4b763e
BS
10990 ac_status=$?
10991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10992 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
10993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10994 (eval $ac_try) 2>&5
ba479fd2
NN
10995 ac_status=$?
10996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10997 (exit $ac_status); }; }; then
10998 ac_cv_func_fork_works=yes
10999else
11000 echo "$as_me: program exited with status $ac_status" >&5
11001echo "$as_me: failed program was:" >&5
11002sed 's/^/| /' conftest.$ac_ext >&5
11003
11004( exit $ac_status )
11005ac_cv_func_fork_works=no
11006fi
b61ff9c8 11007rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
11008fi
11009fi
b61ff9c8
BS
11010echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
11011echo "${ECHO_T}$ac_cv_func_fork_works" >&6
ba479fd2
NN
11012
11013else
11014 ac_cv_func_fork_works=$ac_cv_func_fork
11015fi
11016if test "x$ac_cv_func_fork_works" = xcross; then
11017 case $host in
11018 *-*-amigaos* | *-*-msdosdjgpp*)
11019 # Override, as these systems have only a dummy fork() stub
11020 ac_cv_func_fork_works=no
11021 ;;
11022 *)
11023 ac_cv_func_fork_works=yes
11024 ;;
11025 esac
11026 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11027echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 11028fi
c375c43b 11029ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2 11030if test "x$ac_cv_func_vfork" = xyes; then
b61ff9c8
BS
11031 echo "$as_me:$LINENO: checking for working vfork" >&5
11032echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
ba479fd2
NN
11033if test "${ac_cv_func_vfork_works+set}" = set; then
11034 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 11035else
ba479fd2
NN
11036 if test "$cross_compiling" = yes; then
11037 ac_cv_func_vfork_works=cross
11038else
11039 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11040/* confdefs.h. */
11041_ACEOF
11042cat confdefs.h >>conftest.$ac_ext
11043cat >>conftest.$ac_ext <<_ACEOF
11044/* end confdefs.h. */
c375c43b 11045/* Thanks to Paul Eggert for this test. */
b61ff9c8
BS
11046#include <stdio.h>
11047#include <stdlib.h>
11048#include <sys/types.h>
11049#include <sys/stat.h>
ba479fd2 11050#include <sys/wait.h>
b61ff9c8
BS
11051#if HAVE_UNISTD_H
11052# include <unistd.h>
11053#endif
11054#if HAVE_VFORK_H
ba479fd2 11055# include <vfork.h>
c375c43b
KG
11056#endif
11057/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
11058 argument registers are propagated back to the parent. The compiler
11059 is told about this with #include <vfork.h>, but some compilers
11060 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11061 static variable whose address is put into a register that is
11062 clobbered by the vfork. */
11063static void
c375c43b
KG
11064#ifdef __cplusplus
11065sparc_address_test (int arg)
ba479fd2 11066# else
c375c43b
KG
11067sparc_address_test (arg) int arg;
11068#endif
11069{
11070 static pid_t child;
11071 if (!child) {
11072 child = vfork ();
11073 if (child < 0) {
11074 perror ("vfork");
11075 _exit(2);
11076 }
11077 if (!child) {
11078 arg = getpid();
11079 write(-1, "", 0);
11080 _exit (arg);
11081 }
11082 }
11083}
ba479fd2
NN
11084
11085int
11086main ()
11087{
c375c43b
KG
11088 pid_t parent = getpid ();
11089 pid_t child;
11090
ba479fd2 11091 sparc_address_test (0);
c375c43b
KG
11092
11093 child = vfork ();
11094
11095 if (child == 0) {
ba479fd2
NN
11096 /* Here is another test for sparc vfork register problems. This
11097 test uses lots of local variables, at least as many local
11098 variables as main has allocated so far including compiler
11099 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11100 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11101 reuse the register of parent for one of the local variables,
11102 since it will think that parent can't possibly be used any more
11103 in this routine. Assigning to the local variable will thus
11104 munge parent in the parent process. */
c375c43b
KG
11105 pid_t
11106 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11107 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11108 /* Convince the compiler that p..p7 are live; otherwise, it might
11109 use the same hardware register for all 8 local variables. */
11110 if (p != p1 || p != p2 || p != p3 || p != p4
11111 || p != p5 || p != p6 || p != p7)
11112 _exit(1);
11113
ba479fd2
NN
11114 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11115 from child file descriptors. If the child closes a descriptor
11116 before it execs or exits, this munges the parent's descriptor
11117 as well. Test for this by closing stdout in the child. */
c375c43b
KG
11118 _exit(close(fileno(stdout)) != 0);
11119 } else {
11120 int status;
11121 struct stat st;
11122
11123 while (wait(&status) != child)
11124 ;
b61ff9c8 11125 exit(
c375c43b
KG
11126 /* Was there some problem with vforking? */
11127 child < 0
11128
11129 /* Did the child fail? (This shouldn't happen.) */
11130 || status
11131
11132 /* Did the vfork/compiler bug occur? */
11133 || parent != getpid()
11134
11135 /* Did the file descriptor bug occur? */
11136 || fstat(fileno(stdout), &st) != 0
11137 );
11138 }
11139}
ba479fd2
NN
11140_ACEOF
11141rm -f conftest$ac_exeext
b61ff9c8
BS
11142if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11143 (eval $ac_link) 2>&5
ba479fd2
NN
11144 ac_status=$?
11145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11146 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
11147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11148 (eval $ac_try) 2>&5
ba479fd2
NN
11149 ac_status=$?
11150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11151 (exit $ac_status); }; }; then
c375c43b
KG
11152 ac_cv_func_vfork_works=yes
11153else
ba479fd2
NN
11154 echo "$as_me: program exited with status $ac_status" >&5
11155echo "$as_me: failed program was:" >&5
11156sed 's/^/| /' conftest.$ac_ext >&5
11157
11158( exit $ac_status )
11159ac_cv_func_vfork_works=no
cafe096b 11160fi
b61ff9c8 11161rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 11162fi
ba479fd2 11163fi
b61ff9c8
BS
11164echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
11165echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 11166
ba479fd2
NN
11167fi;
11168if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 11169 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
11170 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11171echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
11172fi
11173
ba479fd2
NN
11174if test "x$ac_cv_func_vfork_works" = xyes; then
11175
11176cat >>confdefs.h <<\_ACEOF
11177#define HAVE_WORKING_VFORK 1
11178_ACEOF
11179
11180else
11181
11182cat >>confdefs.h <<\_ACEOF
c375c43b 11183#define vfork fork
ba479fd2 11184_ACEOF
c375c43b
KG
11185
11186fi
ba479fd2
NN
11187if test "x$ac_cv_func_fork_works" = xyes; then
11188
11189cat >>confdefs.h <<\_ACEOF
11190#define HAVE_WORKING_FORK 1
11191_ACEOF
11192
11193fi
11194
c375c43b 11195
81bf3d9e 11196
dfb77e37
KC
11197 if test "X$prefix" = "XNONE"; then
11198 acl_final_prefix="$ac_default_prefix"
11199 else
11200 acl_final_prefix="$prefix"
11201 fi
11202 if test "X$exec_prefix" = "XNONE"; then
11203 acl_final_exec_prefix='${prefix}'
11204 else
11205 acl_final_exec_prefix="$exec_prefix"
11206 fi
11207 acl_save_prefix="$prefix"
11208 prefix="$acl_final_prefix"
11209 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
11210 prefix="$acl_save_prefix"
f91abfce
TT
11211
11212
b61ff9c8 11213# Check whether --with-gnu-ld or --without-gnu-ld was given.
dfb77e37 11214if test "${with_gnu_ld+set}" = set; then
b61ff9c8
BS
11215 withval="$with_gnu_ld"
11216 test "$withval" = no || with_gnu_ld=yes
ba479fd2 11217else
dfb77e37 11218 with_gnu_ld=no
b61ff9c8 11219fi;
dfb77e37
KC
11220# Prepare PATH_SEPARATOR.
11221# The user is always right.
11222if test "${PATH_SEPARATOR+set}" != set; then
11223 echo "#! /bin/sh" >conf$$.sh
11224 echo "exit 0" >>conf$$.sh
11225 chmod +x conf$$.sh
11226 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11227 PATH_SEPARATOR=';'
ba479fd2 11228 else
dfb77e37 11229 PATH_SEPARATOR=:
ba479fd2 11230 fi
dfb77e37
KC
11231 rm -f conf$$.sh
11232fi
11233ac_prog=ld
11234if test "$GCC" = yes; then
11235 # Check if gcc -print-prog-name=ld gives a path.
b61ff9c8
BS
11236 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
11237echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
dfb77e37
KC
11238 case $host in
11239 *-*-mingw*)
11240 # gcc leaves a trailing carriage return which upsets mingw
11241 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11242 *)
11243 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11244 esac
11245 case $ac_prog in
11246 # Accept absolute paths.
11247 [\\/]* | [A-Za-z]:[\\/]*)
11248 re_direlt='/[^/][^/]*/\.\./'
11249 # Canonicalize the path of ld
11250 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
11251 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
11252 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
11253 done
11254 test -z "$LD" && LD="$ac_prog"
11255 ;;
11256 "")
11257 # If it fails, then pretend we aren't using GCC.
11258 ac_prog=ld
11259 ;;
11260 *)
11261 # If it is relative, then search for the first ld in PATH.
11262 with_gnu_ld=unknown
11263 ;;
11264 esac
11265elif test "$with_gnu_ld" = yes; then
b61ff9c8
BS
11266 echo "$as_me:$LINENO: checking for GNU ld" >&5
11267echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 11268else
b61ff9c8
BS
11269 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
11270echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 11271fi
dfb77e37
KC
11272if test "${acl_cv_path_LD+set}" = set; then
11273 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 11274else
dfb77e37
KC
11275 if test -z "$LD"; then
11276 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
11277 for ac_dir in $PATH; do
11278 test -z "$ac_dir" && ac_dir=.
11279 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11280 acl_cv_path_LD="$ac_dir/$ac_prog"
11281 # Check to see if the program is GNU ld. I'd rather use --version,
11282 # but apparently some GNU ld's only accept -v.
11283 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
11284 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
11285 test "$with_gnu_ld" != no && break
11286 else
11287 test "$with_gnu_ld" != yes && break
11288 fi
dfb77e37
KC
11289 fi
11290 done
11291 IFS="$ac_save_ifs"
11292else
11293 acl_cv_path_LD="$LD" # Let the user override the test with a path.
11294fi
11295fi
ba479fd2 11296
dfb77e37
KC
11297LD="$acl_cv_path_LD"
11298if test -n "$LD"; then
b61ff9c8
BS
11299 echo "$as_me:$LINENO: result: $LD" >&5
11300echo "${ECHO_T}$LD" >&6
dfb77e37 11301else
b61ff9c8
BS
11302 echo "$as_me:$LINENO: result: no" >&5
11303echo "${ECHO_T}no" >&6
ba479fd2 11304fi
dfb77e37
KC
11305test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
11306echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
11307 { (exit 1); exit 1; }; }
b61ff9c8
BS
11308echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
11309echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
dfb77e37
KC
11310if test "${acl_cv_prog_gnu_ld+set}" = set; then
11311 echo $ECHO_N "(cached) $ECHO_C" >&6
11312else
11313 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
11314if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
11315 acl_cv_prog_gnu_ld=yes
11316else
11317 acl_cv_prog_gnu_ld=no
11318fi
dfb77e37 11319fi
b61ff9c8
BS
11320echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
11321echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
dfb77e37
KC
11322with_gnu_ld=$acl_cv_prog_gnu_ld
11323
11324
11325
b61ff9c8
BS
11326 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
11327echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
dfb77e37
KC
11328if test "${acl_cv_rpath+set}" = set; then
11329 echo $ECHO_N "(cached) $ECHO_C" >&6
11330else
11331
11332 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
11333 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
11334 . ./conftest.sh
11335 rm -f ./conftest.sh
11336 acl_cv_rpath=done
ba479fd2 11337
eb158727 11338fi
b61ff9c8
BS
11339echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
11340echo "${ECHO_T}$acl_cv_rpath" >&6
dfb77e37
KC
11341 wl="$acl_cv_wl"
11342 libext="$acl_cv_libext"
11343 shlibext="$acl_cv_shlibext"
11344 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
11345 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
11346 hardcode_direct="$acl_cv_hardcode_direct"
11347 hardcode_minus_L="$acl_cv_hardcode_minus_L"
b61ff9c8 11348 # Check whether --enable-rpath or --disable-rpath was given.
dfb77e37 11349if test "${enable_rpath+set}" = set; then
b61ff9c8
BS
11350 enableval="$enable_rpath"
11351 :
dfb77e37
KC
11352else
11353 enable_rpath=yes
b61ff9c8 11354fi;
8b1f719a 11355
a6ccdbab 11356
dfb77e37
KC
11357
11358
11359
11360
11361
b639c3c2
JJ
11362 use_additional=yes
11363
11364 acl_save_prefix="$prefix"
11365 prefix="$acl_final_prefix"
11366 acl_save_exec_prefix="$exec_prefix"
11367 exec_prefix="$acl_final_exec_prefix"
11368
11369 eval additional_includedir=\"$includedir\"
11370 eval additional_libdir=\"$libdir\"
11371
11372 exec_prefix="$acl_save_exec_prefix"
11373 prefix="$acl_save_prefix"
dfb77e37
KC
11374
11375
b61ff9c8 11376# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
8b1f719a 11377if test "${with_libiconv_prefix+set}" = set; then
b61ff9c8
BS
11378 withval="$with_libiconv_prefix"
11379
8b1f719a 11380 if test "X$withval" = "Xno"; then
b639c3c2 11381 use_additional=no
8b1f719a
PB
11382 else
11383 if test "X$withval" = "X"; then
dfb77e37
KC
11384
11385 acl_save_prefix="$prefix"
11386 prefix="$acl_final_prefix"
11387 acl_save_exec_prefix="$exec_prefix"
11388 exec_prefix="$acl_final_exec_prefix"
11389
b639c3c2
JJ
11390 eval additional_includedir=\"$includedir\"
11391 eval additional_libdir=\"$libdir\"
dfb77e37
KC
11392
11393 exec_prefix="$acl_save_exec_prefix"
11394 prefix="$acl_save_prefix"
11395
8b1f719a 11396 else
b639c3c2
JJ
11397 additional_includedir="$withval/include"
11398 additional_libdir="$withval/lib"
8b1f719a
PB
11399 fi
11400 fi
11401
b61ff9c8 11402fi;
dfb77e37
KC
11403 LIBICONV=
11404 LTLIBICONV=
11405 INCICONV=
11406 rpathdirs=
11407 ltrpathdirs=
11408 names_already_handled=
11409 names_next_round='iconv '
11410 while test -n "$names_next_round"; do
11411 names_this_round="$names_next_round"
11412 names_next_round=
11413 for name in $names_this_round; do
11414 already_handled=
11415 for n in $names_already_handled; do
11416 if test "$n" = "$name"; then
11417 already_handled=yes
11418 break
11419 fi
11420 done
11421 if test -z "$already_handled"; then
11422 names_already_handled="$names_already_handled $name"
11423 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11424 eval value=\"\$HAVE_LIB$uppername\"
11425 if test -n "$value"; then
11426 if test "$value" = yes; then
11427 eval value=\"\$LIB$uppername\"
11428 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11429 eval value=\"\$LTLIB$uppername\"
11430 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11431 else
11432 :
11433 fi
11434 else
11435 found_dir=
11436 found_la=
11437 found_so=
11438 found_a=
b639c3c2
JJ
11439 if test $use_additional = yes; then
11440 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11441 found_dir="$additional_libdir"
11442 found_so="$additional_libdir/lib$name.$shlibext"
11443 if test -f "$additional_libdir/lib$name.la"; then
11444 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
11445 fi
11446 else
b639c3c2
JJ
11447 if test -f "$additional_libdir/lib$name.$libext"; then
11448 found_dir="$additional_libdir"
11449 found_a="$additional_libdir/lib$name.$libext"
11450 if test -f "$additional_libdir/lib$name.la"; then
11451 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
11452 fi
11453 fi
11454 fi
11455 fi
11456 if test "X$found_dir" = "X"; then
11457 for x in $LDFLAGS $LTLIBICONV; do
11458
11459 acl_save_prefix="$prefix"
11460 prefix="$acl_final_prefix"
11461 acl_save_exec_prefix="$exec_prefix"
11462 exec_prefix="$acl_final_exec_prefix"
11463 eval x=\"$x\"
11464 exec_prefix="$acl_save_exec_prefix"
11465 prefix="$acl_save_prefix"
11466
11467 case "$x" in
11468 -L*)
11469 dir=`echo "X$x" | sed -e 's/^X-L//'`
11470 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11471 found_dir="$dir"
11472 found_so="$dir/lib$name.$shlibext"
11473 if test -f "$dir/lib$name.la"; then
11474 found_la="$dir/lib$name.la"
11475 fi
11476 else
11477 if test -f "$dir/lib$name.$libext"; then
11478 found_dir="$dir"
11479 found_a="$dir/lib$name.$libext"
11480 if test -f "$dir/lib$name.la"; then
11481 found_la="$dir/lib$name.la"
11482 fi
11483 fi
11484 fi
11485 ;;
11486 esac
11487 if test "X$found_dir" != "X"; then
11488 break
11489 fi
11490 done
11491 fi
11492 if test "X$found_dir" != "X"; then
11493 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
11494 if test "X$found_so" != "X"; then
11495 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11496 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11497 else
11498 haveit=
11499 for x in $ltrpathdirs; do
11500 if test "X$x" = "X$found_dir"; then
11501 haveit=yes
11502 break
11503 fi
11504 done
11505 if test -z "$haveit"; then
11506 ltrpathdirs="$ltrpathdirs $found_dir"
11507 fi
11508 if test "$hardcode_direct" = yes; then
11509 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11510 else
11511 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11512 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11513 haveit=
11514 for x in $rpathdirs; do
11515 if test "X$x" = "X$found_dir"; then
11516 haveit=yes
11517 break
11518 fi
11519 done
11520 if test -z "$haveit"; then
11521 rpathdirs="$rpathdirs $found_dir"
11522 fi
11523 else
11524 haveit=
11525 for x in $LDFLAGS $LIBICONV; do
11526
11527 acl_save_prefix="$prefix"
11528 prefix="$acl_final_prefix"
11529 acl_save_exec_prefix="$exec_prefix"
11530 exec_prefix="$acl_final_exec_prefix"
11531 eval x=\"$x\"
11532 exec_prefix="$acl_save_exec_prefix"
11533 prefix="$acl_save_prefix"
11534
11535 if test "X$x" = "X-L$found_dir"; then
11536 haveit=yes
11537 break
11538 fi
11539 done
11540 if test -z "$haveit"; then
11541 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
11542 fi
11543 if test "$hardcode_minus_L" != no; then
11544 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11545 else
11546 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11547 fi
11548 fi
11549 fi
11550 fi
11551 else
11552 if test "X$found_a" != "X"; then
11553 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
11554 else
11555 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
11556 fi
11557 fi
11558 additional_includedir=
11559 case "$found_dir" in
11560 */lib | */lib/)
11561 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11562 additional_includedir="$basedir/include"
11563 ;;
11564 esac
11565 if test "X$additional_includedir" != "X"; then
11566 if test "X$additional_includedir" != "X/usr/include"; then
11567 haveit=
11568 if test "X$additional_includedir" = "X/usr/local/include"; then
11569 if test -n "$GCC"; then
11570 case $host_os in
18fc9bd4 11571 linux*) haveit=yes;;
dfb77e37
KC
11572 esac
11573 fi
11574 fi
11575 if test -z "$haveit"; then
11576 for x in $CPPFLAGS $INCICONV; do
11577
11578 acl_save_prefix="$prefix"
11579 prefix="$acl_final_prefix"
11580 acl_save_exec_prefix="$exec_prefix"
11581 exec_prefix="$acl_final_exec_prefix"
11582 eval x=\"$x\"
11583 exec_prefix="$acl_save_exec_prefix"
11584 prefix="$acl_save_prefix"
11585
11586 if test "X$x" = "X-I$additional_includedir"; then
11587 haveit=yes
11588 break
11589 fi
11590 done
11591 if test -z "$haveit"; then
11592 if test -d "$additional_includedir"; then
11593 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
11594 fi
11595 fi
11596 fi
11597 fi
11598 fi
11599 if test -n "$found_la"; then
11600 save_libdir="$libdir"
11601 case "$found_la" in
11602 */* | *\\*) . "$found_la" ;;
11603 *) . "./$found_la" ;;
11604 esac
11605 libdir="$save_libdir"
11606 for dep in $dependency_libs; do
11607 case "$dep" in
11608 -L*)
11609 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11610 if test "X$additional_libdir" != "X/usr/lib"; then
11611 haveit=
11612 if test "X$additional_libdir" = "X/usr/local/lib"; then
11613 if test -n "$GCC"; then
11614 case $host_os in
18fc9bd4 11615 linux*) haveit=yes;;
dfb77e37
KC
11616 esac
11617 fi
11618 fi
11619 if test -z "$haveit"; then
11620 haveit=
11621 for x in $LDFLAGS $LIBICONV; do
11622
11623 acl_save_prefix="$prefix"
11624 prefix="$acl_final_prefix"
11625 acl_save_exec_prefix="$exec_prefix"
11626 exec_prefix="$acl_final_exec_prefix"
11627 eval x=\"$x\"
11628 exec_prefix="$acl_save_exec_prefix"
11629 prefix="$acl_save_prefix"
11630
11631 if test "X$x" = "X-L$additional_libdir"; then
11632 haveit=yes
11633 break
11634 fi
11635 done
11636 if test -z "$haveit"; then
11637 if test -d "$additional_libdir"; then
11638 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
11639 fi
11640 fi
11641 haveit=
11642 for x in $LDFLAGS $LTLIBICONV; do
11643
11644 acl_save_prefix="$prefix"
11645 prefix="$acl_final_prefix"
11646 acl_save_exec_prefix="$exec_prefix"
11647 exec_prefix="$acl_final_exec_prefix"
11648 eval x=\"$x\"
11649 exec_prefix="$acl_save_exec_prefix"
11650 prefix="$acl_save_prefix"
11651
11652 if test "X$x" = "X-L$additional_libdir"; then
11653 haveit=yes
11654 break
11655 fi
11656 done
11657 if test -z "$haveit"; then
11658 if test -d "$additional_libdir"; then
11659 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
11660 fi
11661 fi
11662 fi
11663 fi
11664 ;;
11665 -R*)
11666 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11667 if test "$enable_rpath" != no; then
11668 haveit=
11669 for x in $rpathdirs; do
11670 if test "X$x" = "X$dir"; then
11671 haveit=yes
11672 break
11673 fi
11674 done
11675 if test -z "$haveit"; then
11676 rpathdirs="$rpathdirs $dir"
11677 fi
11678 haveit=
11679 for x in $ltrpathdirs; do
11680 if test "X$x" = "X$dir"; then
11681 haveit=yes
11682 break
11683 fi
11684 done
11685 if test -z "$haveit"; then
11686 ltrpathdirs="$ltrpathdirs $dir"
11687 fi
11688 fi
11689 ;;
11690 -l*)
11691 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11692 ;;
11693 *.la)
11694 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11695 ;;
11696 *)
11697 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
11698 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
11699 ;;
11700 esac
11701 done
11702 fi
11703 else
11704 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11705 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
11706 fi
11707 fi
11708 fi
11709 done
11710 done
11711 if test "X$rpathdirs" != "X"; then
11712 if test -n "$hardcode_libdir_separator"; then
11713 alldirs=
11714 for found_dir in $rpathdirs; do
11715 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11716 done
11717 acl_save_libdir="$libdir"
11718 libdir="$alldirs"
11719 eval flag=\"$hardcode_libdir_flag_spec\"
11720 libdir="$acl_save_libdir"
11721 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11722 else
11723 for found_dir in $rpathdirs; do
11724 acl_save_libdir="$libdir"
11725 libdir="$found_dir"
11726 eval flag=\"$hardcode_libdir_flag_spec\"
11727 libdir="$acl_save_libdir"
11728 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11729 done
11730 fi
11731 fi
11732 if test "X$ltrpathdirs" != "X"; then
11733 for found_dir in $ltrpathdirs; do
11734 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11735 done
11736 fi
11737
11738
11739
11740
11741
11742
11743
11744 am_save_CPPFLAGS="$CPPFLAGS"
11745
11746 for element in $INCICONV; do
11747 haveit=
11748 for x in $CPPFLAGS; do
11749
11750 acl_save_prefix="$prefix"
11751 prefix="$acl_final_prefix"
11752 acl_save_exec_prefix="$exec_prefix"
11753 exec_prefix="$acl_final_exec_prefix"
11754 eval x=\"$x\"
11755 exec_prefix="$acl_save_exec_prefix"
11756 prefix="$acl_save_prefix"
11757
11758 if test "X$x" = "X$element"; then
11759 haveit=yes
11760 break
11761 fi
11762 done
11763 if test -z "$haveit"; then
11764 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11765 fi
11766 done
eb158727
ZW
11767
11768
b61ff9c8
BS
11769 echo "$as_me:$LINENO: checking for iconv" >&5
11770echo $ECHO_N "checking for iconv... $ECHO_C" >&6
ba479fd2
NN
11771if test "${am_cv_func_iconv+set}" = set; then
11772 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11773else
ba479fd2 11774
f91abfce
TT
11775 am_cv_func_iconv="no, consider installing GNU libiconv"
11776 am_cv_lib_iconv=no
ba479fd2 11777 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11778/* confdefs.h. */
11779_ACEOF
11780cat confdefs.h >>conftest.$ac_ext
11781cat >>conftest.$ac_ext <<_ACEOF
11782/* end confdefs.h. */
f91abfce
TT
11783#include <stdlib.h>
11784#include <iconv.h>
ba479fd2
NN
11785int
11786main ()
11787{
f91abfce
TT
11788iconv_t cd = iconv_open("","");
11789 iconv(cd,NULL,NULL,NULL,NULL);
11790 iconv_close(cd);
ba479fd2
NN
11791 ;
11792 return 0;
11793}
11794_ACEOF
11795rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11796if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11797 (eval $ac_link) 2>conftest.er1
ba479fd2 11798 ac_status=$?
86da66b5
HPN
11799 grep -v '^ *+' conftest.er1 >conftest.err
11800 rm -f conftest.er1
11801 cat conftest.err >&5
ba479fd2 11802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11803 (exit $ac_status); } &&
11804 { ac_try='test -z "$ac_c_werror_flag"
11805 || test ! -s conftest.err'
11806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11807 (eval $ac_try) 2>&5
11808 ac_status=$?
11809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11810 (exit $ac_status); }; } &&
11811 { ac_try='test -s conftest$ac_exeext'
11812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11813 (eval $ac_try) 2>&5
11814 ac_status=$?
11815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11816 (exit $ac_status); }; }; then
f91abfce
TT
11817 am_cv_func_iconv=yes
11818else
ba479fd2
NN
11819 echo "$as_me: failed program was:" >&5
11820sed 's/^/| /' conftest.$ac_ext >&5
11821
f91abfce 11822fi
b61ff9c8 11823rm -f conftest.err conftest.$ac_objext \
86da66b5 11824 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11825 if test "$am_cv_func_iconv" != yes; then
11826 am_save_LIBS="$LIBS"
dfb77e37 11827 LIBS="$LIBS $LIBICONV"
ba479fd2 11828 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11829/* confdefs.h. */
11830_ACEOF
11831cat confdefs.h >>conftest.$ac_ext
11832cat >>conftest.$ac_ext <<_ACEOF
11833/* end confdefs.h. */
f91abfce
TT
11834#include <stdlib.h>
11835#include <iconv.h>
ba479fd2
NN
11836int
11837main ()
11838{
f91abfce
TT
11839iconv_t cd = iconv_open("","");
11840 iconv(cd,NULL,NULL,NULL,NULL);
11841 iconv_close(cd);
ba479fd2
NN
11842 ;
11843 return 0;
11844}
11845_ACEOF
11846rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11847if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11848 (eval $ac_link) 2>conftest.er1
ba479fd2 11849 ac_status=$?
86da66b5
HPN
11850 grep -v '^ *+' conftest.er1 >conftest.err
11851 rm -f conftest.er1
11852 cat conftest.err >&5
ba479fd2 11853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11854 (exit $ac_status); } &&
11855 { ac_try='test -z "$ac_c_werror_flag"
11856 || test ! -s conftest.err'
11857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11858 (eval $ac_try) 2>&5
11859 ac_status=$?
11860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11861 (exit $ac_status); }; } &&
11862 { ac_try='test -s conftest$ac_exeext'
11863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11864 (eval $ac_try) 2>&5
11865 ac_status=$?
11866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11867 (exit $ac_status); }; }; then
f91abfce
TT
11868 am_cv_lib_iconv=yes
11869 am_cv_func_iconv=yes
11870else
ba479fd2
NN
11871 echo "$as_me: failed program was:" >&5
11872sed 's/^/| /' conftest.$ac_ext >&5
11873
f91abfce 11874fi
b61ff9c8 11875rm -f conftest.err conftest.$ac_objext \
86da66b5 11876 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11877 LIBS="$am_save_LIBS"
11878 fi
6e3f3080 11879
ba479fd2 11880fi
b61ff9c8
BS
11881echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
11882echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 11883 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11884
11885cat >>confdefs.h <<\_ACEOF
f91abfce 11886#define HAVE_ICONV 1
ba479fd2 11887_ACEOF
f91abfce 11888
dfb77e37
KC
11889 fi
11890 if test "$am_cv_lib_iconv" = yes; then
b61ff9c8
BS
11891 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
11892echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
11893 echo "$as_me:$LINENO: result: $LIBICONV" >&5
11894echo "${ECHO_T}$LIBICONV" >&6
dfb77e37
KC
11895 else
11896 CPPFLAGS="$am_save_CPPFLAGS"
11897 LIBICONV=
11898 LTLIBICONV=
11899 fi
11900
11901
11902
11903 if test "$am_cv_func_iconv" = yes; then
b61ff9c8
BS
11904 echo "$as_me:$LINENO: checking for iconv declaration" >&5
11905echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
ba479fd2
NN
11906 if test "${am_cv_proto_iconv+set}" = set; then
11907 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11908else
ba479fd2
NN
11909
11910 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11911/* confdefs.h. */
11912_ACEOF
11913cat confdefs.h >>conftest.$ac_ext
11914cat >>conftest.$ac_ext <<_ACEOF
11915/* end confdefs.h. */
f91abfce
TT
11916
11917#include <stdlib.h>
11918#include <iconv.h>
11919extern
11920#ifdef __cplusplus
11921"C"
11922#endif
11923#if defined(__STDC__) || defined(__cplusplus)
11924size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11925#else
11926size_t iconv();
11927#endif
11928
ba479fd2
NN
11929int
11930main ()
11931{
f91abfce 11932
ba479fd2
NN
11933 ;
11934 return 0;
11935}
11936_ACEOF
11937rm -f conftest.$ac_objext
b61ff9c8
BS
11938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11939 (eval $ac_compile) 2>conftest.er1
ba479fd2 11940 ac_status=$?
86da66b5
HPN
11941 grep -v '^ *+' conftest.er1 >conftest.err
11942 rm -f conftest.er1
11943 cat conftest.err >&5
ba479fd2 11944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11945 (exit $ac_status); } &&
11946 { ac_try='test -z "$ac_c_werror_flag"
11947 || test ! -s conftest.err'
11948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11949 (eval $ac_try) 2>&5
11950 ac_status=$?
11951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11952 (exit $ac_status); }; } &&
11953 { ac_try='test -s conftest.$ac_objext'
11954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11955 (eval $ac_try) 2>&5
11956 ac_status=$?
11957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11958 (exit $ac_status); }; }; then
f91abfce
TT
11959 am_cv_proto_iconv_arg1=""
11960else
ba479fd2
NN
11961 echo "$as_me: failed program was:" >&5
11962sed 's/^/| /' conftest.$ac_ext >&5
11963
b61ff9c8 11964am_cv_proto_iconv_arg1="const"
f91abfce 11965fi
b61ff9c8 11966rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
11967 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);"
11968fi
11969
11970 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
b61ff9c8 11971 echo "$as_me:$LINENO: result: ${ac_t:-
ba479fd2
NN
11972 }$am_cv_proto_iconv" >&5
11973echo "${ECHO_T}${ac_t:-
b61ff9c8 11974 }$am_cv_proto_iconv" >&6
ba479fd2
NN
11975
11976cat >>confdefs.h <<_ACEOF
f91abfce 11977#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 11978_ACEOF
f91abfce
TT
11979
11980 fi
f91abfce 11981
56694dd9
ZW
11982# Until we have in-tree GNU iconv:
11983LIBICONV_DEP=
11984
11985
18fc9bd4 11986
b61ff9c8
BS
11987 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11988echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
18fc9bd4
RG
11989if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11990 echo $ECHO_N "(cached) $ECHO_C" >&6
11991else
11992 cat >conftest.$ac_ext <<_ACEOF
11993/* confdefs.h. */
11994_ACEOF
11995cat confdefs.h >>conftest.$ac_ext
11996cat >>conftest.$ac_ext <<_ACEOF
11997/* end confdefs.h. */
11998#include <locale.h>
11999int
12000main ()
12001{
12002return LC_MESSAGES
12003 ;
12004 return 0;
12005}
12006_ACEOF
12007rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
12008if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12009 (eval $ac_link) 2>conftest.er1
18fc9bd4
RG
12010 ac_status=$?
12011 grep -v '^ *+' conftest.er1 >conftest.err
12012 rm -f conftest.er1
12013 cat conftest.err >&5
12014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12015 (exit $ac_status); } &&
12016 { ac_try='test -z "$ac_c_werror_flag"
12017 || test ! -s conftest.err'
12018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12019 (eval $ac_try) 2>&5
12020 ac_status=$?
12021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12022 (exit $ac_status); }; } &&
12023 { ac_try='test -s conftest$ac_exeext'
12024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12025 (eval $ac_try) 2>&5
12026 ac_status=$?
12027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12028 (exit $ac_status); }; }; then
18fc9bd4
RG
12029 am_cv_val_LC_MESSAGES=yes
12030else
12031 echo "$as_me: failed program was:" >&5
12032sed 's/^/| /' conftest.$ac_ext >&5
12033
b61ff9c8 12034am_cv_val_LC_MESSAGES=no
18fc9bd4 12035fi
b61ff9c8 12036rm -f conftest.err conftest.$ac_objext \
18fc9bd4
RG
12037 conftest$ac_exeext conftest.$ac_ext
12038fi
b61ff9c8
BS
12039echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
12040echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
18fc9bd4
RG
12041 if test $am_cv_val_LC_MESSAGES = yes; then
12042
12043cat >>confdefs.h <<\_ACEOF
12044#define HAVE_LC_MESSAGES 1
12045_ACEOF
12046
12047 fi
12048
f91abfce 12049
a03ea89b 12050
b61ff9c8
BS
12051 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
12052echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
a03ea89b
BM
12053if test "${am_cv_langinfo_codeset+set}" = set; then
12054 echo $ECHO_N "(cached) $ECHO_C" >&6
12055else
12056 cat >conftest.$ac_ext <<_ACEOF
12057/* confdefs.h. */
12058_ACEOF
12059cat confdefs.h >>conftest.$ac_ext
12060cat >>conftest.$ac_ext <<_ACEOF
12061/* end confdefs.h. */
12062#include <langinfo.h>
12063int
12064main ()
12065{
12066char* cs = nl_langinfo(CODESET);
12067 ;
12068 return 0;
12069}
12070_ACEOF
12071rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
12072if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12073 (eval $ac_link) 2>conftest.er1
a03ea89b
BM
12074 ac_status=$?
12075 grep -v '^ *+' conftest.er1 >conftest.err
12076 rm -f conftest.er1
12077 cat conftest.err >&5
12078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12079 (exit $ac_status); } &&
12080 { ac_try='test -z "$ac_c_werror_flag"
12081 || test ! -s conftest.err'
12082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12083 (eval $ac_try) 2>&5
12084 ac_status=$?
12085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12086 (exit $ac_status); }; } &&
12087 { ac_try='test -s conftest$ac_exeext'
12088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12089 (eval $ac_try) 2>&5
12090 ac_status=$?
12091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12092 (exit $ac_status); }; }; then
a03ea89b
BM
12093 am_cv_langinfo_codeset=yes
12094else
12095 echo "$as_me: failed program was:" >&5
12096sed 's/^/| /' conftest.$ac_ext >&5
12097
b61ff9c8 12098am_cv_langinfo_codeset=no
a03ea89b 12099fi
b61ff9c8 12100rm -f conftest.err conftest.$ac_objext \
a03ea89b
BM
12101 conftest$ac_exeext conftest.$ac_ext
12102
12103fi
b61ff9c8
BS
12104echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
12105echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
a03ea89b
BM
12106 if test $am_cv_langinfo_codeset = yes; then
12107
12108cat >>confdefs.h <<\_ACEOF
12109#define HAVE_LANGINFO_CODESET 1
12110_ACEOF
12111
12112 fi
12113
12114
86cf1cbd
KG
12115# We will need to find libiberty.h and ansidecl.h
12116saved_CFLAGS="$CFLAGS"
12117CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
6a257778 12139
ad6717df
PB
12140
12141
0d667716
KG
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
367e8319 12152
0d667716
KG
12153
12154
7391b66c 12155
ed5b9f96
GK
12156
12157for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
12158 strsignal strstr strverscmp \
12159 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 12160 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 12161do
ad6717df 12162 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12163echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12164echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12165if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12166 echo $ECHO_N "(cached) $ECHO_C" >&6
12167else
12168 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12169/* confdefs.h. */
12170_ACEOF
12171cat confdefs.h >>conftest.$ac_ext
12172cat >>conftest.$ac_ext <<_ACEOF
12173/* end confdefs.h. */
7afe8c41
KG
12174#undef $ac_tr_decl
12175#define $ac_tr_decl 1
ba479fd2 12176
d02af173 12177#include "ansidecl.h"
86cf1cbd 12178#include "system.h"
f31e826b 12179
ba479fd2
NN
12180int
12181main ()
12182{
86cf1cbd
KG
12183#ifndef $ac_func
12184char *(*pfn) = (char *(*)) $ac_func ;
12185#endif
ba479fd2
NN
12186 ;
12187 return 0;
12188}
12189_ACEOF
12190rm -f conftest.$ac_objext
b61ff9c8
BS
12191if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12192 (eval $ac_compile) 2>conftest.er1
ba479fd2 12193 ac_status=$?
86da66b5
HPN
12194 grep -v '^ *+' conftest.er1 >conftest.err
12195 rm -f conftest.er1
12196 cat conftest.err >&5
ba479fd2 12197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12198 (exit $ac_status); } &&
12199 { ac_try='test -z "$ac_c_werror_flag"
12200 || test ! -s conftest.err'
12201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12202 (eval $ac_try) 2>&5
12203 ac_status=$?
12204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12205 (exit $ac_status); }; } &&
12206 { ac_try='test -s conftest.$ac_objext'
12207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12208 (eval $ac_try) 2>&5
12209 ac_status=$?
12210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12211 (exit $ac_status); }; }; then
f31e826b 12212 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 12213else
ba479fd2
NN
12214 echo "$as_me: failed program was:" >&5
12215sed 's/^/| /' conftest.$ac_ext >&5
12216
b61ff9c8 12217eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 12218fi
b61ff9c8 12219rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
12220fi
12221
f31e826b 12222if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12223 echo "$as_me:$LINENO: result: yes" >&5
12224echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 12225#define $ac_tr_decl 1
ba479fd2
NN
12226_ACEOF
12227
81bf3d9e 12228else
b61ff9c8
BS
12229 echo "$as_me:$LINENO: result: no" >&5
12230echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 12231#define $ac_tr_decl 0
ba479fd2
NN
12232_ACEOF
12233
81bf3d9e
RH
12234fi
12235
12236done
ba479fd2 12237
ba479fd2 12238
ba479fd2 12239
81bf3d9e 12240
81bf3d9e
RH
12241
12242for ac_func in getrlimit setrlimit getrusage
12243do
ad6717df 12244 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12245echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12246echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12247if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12248 echo $ECHO_N "(cached) $ECHO_C" >&6
12249else
12250 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12251/* confdefs.h. */
12252_ACEOF
12253cat confdefs.h >>conftest.$ac_ext
12254cat >>conftest.$ac_ext <<_ACEOF
12255/* end confdefs.h. */
7afe8c41
KG
12256#undef $ac_tr_decl
12257#define $ac_tr_decl 1
ba479fd2 12258
d02af173 12259#include "ansidecl.h"
86cf1cbd 12260#include "system.h"
81bf3d9e
RH
12261#ifdef HAVE_SYS_RESOURCE_H
12262#include <sys/resource.h>
12263#endif
12264
f31e826b 12265
ba479fd2
NN
12266int
12267main ()
12268{
86cf1cbd
KG
12269#ifndef $ac_func
12270char *(*pfn) = (char *(*)) $ac_func ;
12271#endif
ba479fd2
NN
12272 ;
12273 return 0;
12274}
12275_ACEOF
12276rm -f conftest.$ac_objext
b61ff9c8
BS
12277if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12278 (eval $ac_compile) 2>conftest.er1
ba479fd2 12279 ac_status=$?
86da66b5
HPN
12280 grep -v '^ *+' conftest.er1 >conftest.err
12281 rm -f conftest.er1
12282 cat conftest.err >&5
ba479fd2 12283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12284 (exit $ac_status); } &&
12285 { ac_try='test -z "$ac_c_werror_flag"
12286 || test ! -s conftest.err'
12287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12288 (eval $ac_try) 2>&5
12289 ac_status=$?
12290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12291 (exit $ac_status); }; } &&
12292 { ac_try='test -s conftest.$ac_objext'
12293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12294 (eval $ac_try) 2>&5
12295 ac_status=$?
12296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12297 (exit $ac_status); }; }; then
f31e826b 12298 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 12299else
ba479fd2
NN
12300 echo "$as_me: failed program was:" >&5
12301sed 's/^/| /' conftest.$ac_ext >&5
12302
b61ff9c8 12303eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 12304fi
b61ff9c8 12305rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
12306fi
12307
f31e826b 12308if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12309 echo "$as_me:$LINENO: result: yes" >&5
12310echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 12311#define $ac_tr_decl 1
ba479fd2
NN
12312_ACEOF
12313
81bf3d9e 12314else
b61ff9c8
BS
12315 echo "$as_me:$LINENO: result: no" >&5
12316echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 12317#define $ac_tr_decl 0
ba479fd2
NN
12318_ACEOF
12319
81bf3d9e
RH
12320fi
12321
12322done
86cf1cbd 12323
81bf3d9e 12324
ba479fd2 12325cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12326/* confdefs.h. */
12327_ACEOF
12328cat confdefs.h >>conftest.$ac_ext
12329cat >>conftest.$ac_ext <<_ACEOF
12330/* end confdefs.h. */
b2522d2b
HPN
12331
12332#include "ansidecl.h"
12333#include "system.h"
12334#ifdef HAVE_SYS_RESOURCE_H
12335#include <sys/resource.h>
12336#endif
12337
ba479fd2
NN
12338int
12339main ()
12340{
b2522d2b 12341rlim_t l = 0;
ba479fd2
NN
12342 ;
12343 return 0;
12344}
12345_ACEOF
12346rm -f conftest.$ac_objext
b61ff9c8
BS
12347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12348 (eval $ac_compile) 2>conftest.er1
ba479fd2 12349 ac_status=$?
86da66b5
HPN
12350 grep -v '^ *+' conftest.er1 >conftest.err
12351 rm -f conftest.er1
12352 cat conftest.err >&5
ba479fd2 12353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12354 (exit $ac_status); } &&
12355 { ac_try='test -z "$ac_c_werror_flag"
12356 || test ! -s conftest.err'
12357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12358 (eval $ac_try) 2>&5
12359 ac_status=$?
12360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12361 (exit $ac_status); }; } &&
12362 { ac_try='test -s conftest.$ac_objext'
12363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12364 (eval $ac_try) 2>&5
12365 ac_status=$?
12366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12367 (exit $ac_status); }; }; then
b2522d2b
HPN
12368 :
12369else
ba479fd2
NN
12370 echo "$as_me: failed program was:" >&5
12371sed 's/^/| /' conftest.$ac_ext >&5
12372
12373
12374cat >>confdefs.h <<\_ACEOF
b2522d2b 12375#define rlim_t long
ba479fd2 12376_ACEOF
b2522d2b
HPN
12377
12378fi
b61ff9c8 12379rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 12380
2102b2fe
RS
12381# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
12382# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
12383# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
12384# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 12385
351df804 12386for ac_func in ldgetname
c1800ec8 12387do
ad6717df 12388 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12389echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12390echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12391if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12392 echo $ECHO_N "(cached) $ECHO_C" >&6
12393else
12394 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12395/* confdefs.h. */
12396_ACEOF
12397cat confdefs.h >>conftest.$ac_ext
12398cat >>conftest.$ac_ext <<_ACEOF
12399/* end confdefs.h. */
c1800ec8
ZW
12400#undef $ac_tr_decl
12401#define $ac_tr_decl 1
ba479fd2 12402
351df804
KG
12403#include "ansidecl.h"
12404#include "system.h"
12405#ifdef HAVE_LDFCN_H
2102b2fe
RS
12406#undef FREAD
12407#undef FWRITE
351df804
KG
12408#include <ldfcn.h>
12409#endif
12410
12411
ba479fd2
NN
12412int
12413main ()
12414{
351df804
KG
12415#ifndef $ac_func
12416char *(*pfn) = (char *(*)) $ac_func ;
12417#endif
ba479fd2
NN
12418 ;
12419 return 0;
12420}
12421_ACEOF
12422rm -f conftest.$ac_objext
b61ff9c8
BS
12423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12424 (eval $ac_compile) 2>conftest.er1
ba479fd2 12425 ac_status=$?
86da66b5
HPN
12426 grep -v '^ *+' conftest.er1 >conftest.err
12427 rm -f conftest.er1
12428 cat conftest.err >&5
ba479fd2 12429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12430 (exit $ac_status); } &&
12431 { ac_try='test -z "$ac_c_werror_flag"
12432 || test ! -s conftest.err'
12433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12434 (eval $ac_try) 2>&5
12435 ac_status=$?
12436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12437 (exit $ac_status); }; } &&
12438 { ac_try='test -s conftest.$ac_objext'
12439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12440 (eval $ac_try) 2>&5
12441 ac_status=$?
12442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12443 (exit $ac_status); }; }; then
351df804
KG
12444 eval "gcc_cv_have_decl_$ac_func=yes"
12445else
ba479fd2
NN
12446 echo "$as_me: failed program was:" >&5
12447sed 's/^/| /' conftest.$ac_ext >&5
12448
b61ff9c8 12449eval "gcc_cv_have_decl_$ac_func=no"
351df804 12450fi
b61ff9c8 12451rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
12452fi
12453
12454if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12455 echo "$as_me:$LINENO: result: yes" >&5
12456echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 12457#define $ac_tr_decl 1
ba479fd2
NN
12458_ACEOF
12459
351df804 12460else
b61ff9c8
BS
12461 echo "$as_me:$LINENO: result: no" >&5
12462echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 12463#define $ac_tr_decl 0
ba479fd2
NN
12464_ACEOF
12465
351df804
KG
12466fi
12467
12468done
ba479fd2 12469
351df804
KG
12470
12471
12472for ac_func in times
12473do
ad6717df 12474 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12475echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12476echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12477if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
12478 echo $ECHO_N "(cached) $ECHO_C" >&6
12479else
12480 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12481/* confdefs.h. */
12482_ACEOF
12483cat confdefs.h >>conftest.$ac_ext
12484cat >>conftest.$ac_ext <<_ACEOF
12485/* end confdefs.h. */
351df804
KG
12486#undef $ac_tr_decl
12487#define $ac_tr_decl 1
ba479fd2 12488
c1800ec8
ZW
12489#include "ansidecl.h"
12490#include "system.h"
12491#ifdef HAVE_SYS_TIMES_H
12492#include <sys/times.h>
12493#endif
12494
12495
ba479fd2
NN
12496int
12497main ()
12498{
c1800ec8
ZW
12499#ifndef $ac_func
12500char *(*pfn) = (char *(*)) $ac_func ;
12501#endif
ba479fd2
NN
12502 ;
12503 return 0;
12504}
12505_ACEOF
12506rm -f conftest.$ac_objext
b61ff9c8
BS
12507if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12508 (eval $ac_compile) 2>conftest.er1
ba479fd2 12509 ac_status=$?
86da66b5
HPN
12510 grep -v '^ *+' conftest.er1 >conftest.err
12511 rm -f conftest.er1
12512 cat conftest.err >&5
ba479fd2 12513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12514 (exit $ac_status); } &&
12515 { ac_try='test -z "$ac_c_werror_flag"
12516 || test ! -s conftest.err'
12517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12518 (eval $ac_try) 2>&5
12519 ac_status=$?
12520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12521 (exit $ac_status); }; } &&
12522 { ac_try='test -s conftest.$ac_objext'
12523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12524 (eval $ac_try) 2>&5
12525 ac_status=$?
12526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12527 (exit $ac_status); }; }; then
2f41c1d6
PB
12528 eval "gcc_cv_have_decl_$ac_func=yes"
12529else
12530 echo "$as_me: failed program was:" >&5
12531sed 's/^/| /' conftest.$ac_ext >&5
ab22c1fa 12532
b61ff9c8 12533eval "gcc_cv_have_decl_$ac_func=no"
2f41c1d6 12534fi
b61ff9c8 12535rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
12536fi
12537
12538if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12539 echo "$as_me:$LINENO: result: yes" >&5
12540echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 12541#define $ac_tr_decl 1
ba479fd2
NN
12542_ACEOF
12543
c1800ec8 12544else
b61ff9c8
BS
12545 echo "$as_me:$LINENO: result: no" >&5
12546echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 12547#define $ac_tr_decl 0
ba479fd2
NN
12548_ACEOF
12549
c1800ec8
ZW
12550fi
12551
12552done
c1800ec8
ZW
12553
12554
4f6d8cc8
GK
12555
12556for ac_func in sigaltstack
12557do
12558 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
12559echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12560echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
12561if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
4f6d8cc8
GK
12562 echo $ECHO_N "(cached) $ECHO_C" >&6
12563else
12564 cat >conftest.$ac_ext <<_ACEOF
12565/* confdefs.h. */
12566_ACEOF
12567cat confdefs.h >>conftest.$ac_ext
12568cat >>conftest.$ac_ext <<_ACEOF
12569/* end confdefs.h. */
12570#undef $ac_tr_decl
12571#define $ac_tr_decl 1
12572
12573#include "ansidecl.h"
12574#include "system.h"
12575#include <signal.h>
12576
12577
12578int
12579main ()
12580{
12581#ifndef $ac_func
12582char *(*pfn) = (char *(*)) $ac_func ;
12583#endif
12584 ;
12585 return 0;
12586}
12587_ACEOF
12588rm -f conftest.$ac_objext
b61ff9c8
BS
12589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12590 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
12591 ac_status=$?
12592 grep -v '^ *+' conftest.er1 >conftest.err
12593 rm -f conftest.er1
12594 cat conftest.err >&5
12595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12596 (exit $ac_status); } &&
12597 { ac_try='test -z "$ac_c_werror_flag"
12598 || test ! -s conftest.err'
12599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12600 (eval $ac_try) 2>&5
12601 ac_status=$?
12602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12603 (exit $ac_status); }; } &&
12604 { ac_try='test -s conftest.$ac_objext'
12605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12606 (eval $ac_try) 2>&5
12607 ac_status=$?
12608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12609 (exit $ac_status); }; }; then
8b1f719a
PB
12610 eval "gcc_cv_have_decl_$ac_func=yes"
12611else
12612 echo "$as_me: failed program was:" >&5
12613sed 's/^/| /' conftest.$ac_ext >&5
4f6d8cc8 12614
b61ff9c8 12615eval "gcc_cv_have_decl_$ac_func=no"
4f6d8cc8 12616fi
b61ff9c8 12617rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8
GK
12618fi
12619
12620if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
12621 echo "$as_me:$LINENO: result: yes" >&5
12622echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
12623#define $ac_tr_decl 1
12624_ACEOF
12625
12626else
b61ff9c8
BS
12627 echo "$as_me:$LINENO: result: no" >&5
12628echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
12629#define $ac_tr_decl 0
12630_ACEOF
12631
12632fi
12633
12634done
12635
12636
c1800ec8 12637# More time-related stuff.
b61ff9c8
BS
12638echo "$as_me:$LINENO: checking for struct tms" >&5
12639echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
ba479fd2
NN
12640if test "${ac_cv_struct_tms+set}" = set; then
12641 echo $ECHO_N "(cached) $ECHO_C" >&6
12642else
12643
12644cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12645/* confdefs.h. */
12646_ACEOF
12647cat confdefs.h >>conftest.$ac_ext
12648cat >>conftest.$ac_ext <<_ACEOF
12649/* end confdefs.h. */
c1800ec8
ZW
12650
12651#include "ansidecl.h"
12652#include "system.h"
12653#ifdef HAVE_SYS_TIMES_H
12654#include <sys/times.h>
12655#endif
12656
ba479fd2
NN
12657int
12658main ()
12659{
c1800ec8 12660struct tms tms;
ba479fd2
NN
12661 ;
12662 return 0;
12663}
12664_ACEOF
12665rm -f conftest.$ac_objext
b61ff9c8
BS
12666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12667 (eval $ac_compile) 2>conftest.er1
ba479fd2 12668 ac_status=$?
86da66b5
HPN
12669 grep -v '^ *+' conftest.er1 >conftest.err
12670 rm -f conftest.er1
12671 cat conftest.err >&5
ba479fd2 12672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12673 (exit $ac_status); } &&
12674 { ac_try='test -z "$ac_c_werror_flag"
12675 || test ! -s conftest.err'
12676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12677 (eval $ac_try) 2>&5
12678 ac_status=$?
12679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12680 (exit $ac_status); }; } &&
12681 { ac_try='test -s conftest.$ac_objext'
12682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12683 (eval $ac_try) 2>&5
12684 ac_status=$?
12685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12686 (exit $ac_status); }; }; then
c1800ec8
ZW
12687 ac_cv_struct_tms=yes
12688else
ba479fd2
NN
12689 echo "$as_me: failed program was:" >&5
12690sed 's/^/| /' conftest.$ac_ext >&5
12691
b61ff9c8 12692ac_cv_struct_tms=no
c1800ec8 12693fi
b61ff9c8 12694rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 12695fi
b61ff9c8
BS
12696echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
12697echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 12698if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
12699
12700cat >>confdefs.h <<\_ACEOF
c1800ec8 12701#define HAVE_STRUCT_TMS 1
ba479fd2 12702_ACEOF
c1800ec8
ZW
12703
12704fi
12705
12706# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
12707# revisit after autoconf 2.50.
b61ff9c8
BS
12708echo "$as_me:$LINENO: checking for clock_t" >&5
12709echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
ba479fd2
NN
12710if test "${gcc_cv_type_clock_t+set}" = set; then
12711 echo $ECHO_N "(cached) $ECHO_C" >&6
12712else
12713
12714cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12715/* confdefs.h. */
12716_ACEOF
12717cat confdefs.h >>conftest.$ac_ext
12718cat >>conftest.$ac_ext <<_ACEOF
12719/* end confdefs.h. */
c1800ec8
ZW
12720
12721#include "ansidecl.h"
12722#include "system.h"
12723
ba479fd2
NN
12724int
12725main ()
12726{
c1800ec8 12727clock_t x;
ba479fd2
NN
12728 ;
12729 return 0;
12730}
12731_ACEOF
12732rm -f conftest.$ac_objext
b61ff9c8
BS
12733if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12734 (eval $ac_compile) 2>conftest.er1
ba479fd2 12735 ac_status=$?
86da66b5
HPN
12736 grep -v '^ *+' conftest.er1 >conftest.err
12737 rm -f conftest.er1
12738 cat conftest.err >&5
ba479fd2 12739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12740 (exit $ac_status); } &&
12741 { ac_try='test -z "$ac_c_werror_flag"
12742 || test ! -s conftest.err'
12743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12744 (eval $ac_try) 2>&5
12745 ac_status=$?
12746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12747 (exit $ac_status); }; } &&
12748 { ac_try='test -s conftest.$ac_objext'
12749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12750 (eval $ac_try) 2>&5
12751 ac_status=$?
12752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12753 (exit $ac_status); }; }; then
c1800ec8
ZW
12754 gcc_cv_type_clock_t=yes
12755else
ba479fd2
NN
12756 echo "$as_me: failed program was:" >&5
12757sed 's/^/| /' conftest.$ac_ext >&5
12758
b61ff9c8 12759gcc_cv_type_clock_t=no
c1800ec8 12760fi
b61ff9c8 12761rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 12762fi
b61ff9c8
BS
12763echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
12764echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 12765if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
12766
12767cat >>confdefs.h <<\_ACEOF
c1800ec8 12768#define HAVE_CLOCK_T 1
ba479fd2 12769_ACEOF
c1800ec8
ZW
12770
12771fi
12772
eb70d86d
AS
12773# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
12774CFLAGS="$saved_CFLAGS"
12775
b61ff9c8 12776# Check whether --enable-initfini-array or --disable-initfini-array was given.
07cf4226 12777if test "${enable_initfini_array+set}" = set; then
b61ff9c8
BS
12778 enableval="$enable_initfini_array"
12779
07cf4226 12780else
ba479fd2 12781
b61ff9c8
BS
12782echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
12783echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
ba479fd2
NN
12784if test "${gcc_cv_initfini_array+set}" = set; then
12785 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 12786else
eb70d86d 12787 if test "$cross_compiling" = yes; then
918c4fe4 12788 gcc_cv_initfini_array=no
eb70d86d 12789else
ba479fd2 12790 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12791/* confdefs.h. */
12792_ACEOF
12793cat confdefs.h >>conftest.$ac_ext
12794cat >>conftest.$ac_ext <<_ACEOF
12795/* end confdefs.h. */
eb70d86d 12796
07cf4226
DM
12797static int x = -1;
12798int main (void) { return x; }
12799int foo (void) { x = 0; }
12800int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
12801_ACEOF
12802rm -f conftest$ac_exeext
b61ff9c8
BS
12803if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12804 (eval $ac_link) 2>&5
ba479fd2
NN
12805 ac_status=$?
12806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12807 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
12808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12809 (eval $ac_try) 2>&5
ba479fd2
NN
12810 ac_status=$?
12811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12812 (exit $ac_status); }; }; then
918c4fe4 12813 gcc_cv_initfini_array=yes
eb70d86d 12814else
ba479fd2
NN
12815 echo "$as_me: program exited with status $ac_status" >&5
12816echo "$as_me: failed program was:" >&5
12817sed 's/^/| /' conftest.$ac_ext >&5
12818
12819( exit $ac_status )
12820gcc_cv_initfini_array=no
eb70d86d 12821fi
b61ff9c8 12822rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 12823fi
07cf4226 12824fi
b61ff9c8
BS
12825echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
12826echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 12827 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 12828
b61ff9c8 12829fi;
63cf211a 12830if test $enable_initfini_array = yes; then
ba479fd2
NN
12831
12832cat >>confdefs.h <<\_ACEOF
eb70d86d 12833#define HAVE_INITFINI_ARRAY 1
ba479fd2 12834_ACEOF
07cf4226 12835
eb70d86d 12836fi
81bf3d9e 12837
ba479fd2 12838# mkdir takes a single argument on some systems.
b61ff9c8
BS
12839echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
12840echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
ba479fd2
NN
12841if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
12842 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 12843else
ba479fd2 12844 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12845/* confdefs.h. */
12846_ACEOF
12847cat confdefs.h >>conftest.$ac_ext
12848cat >>conftest.$ac_ext <<_ACEOF
12849/* end confdefs.h. */
75923b2f
MK
12850
12851#include <sys/types.h>
12852#ifdef HAVE_SYS_STAT_H
12853# include <sys/stat.h>
12854#endif
12855#ifdef HAVE_UNISTD_H
12856# include <unistd.h>
12857#endif
12858#ifdef HAVE_DIRECT_H
12859# include <direct.h>
12860#endif
ba479fd2
NN
12861int
12862main ()
12863{
75923b2f 12864mkdir ("foo", 0);
ba479fd2
NN
12865 ;
12866 return 0;
12867}
12868_ACEOF
12869rm -f conftest.$ac_objext
b61ff9c8
BS
12870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12871 (eval $ac_compile) 2>conftest.er1
ba479fd2 12872 ac_status=$?
86da66b5
HPN
12873 grep -v '^ *+' conftest.er1 >conftest.err
12874 rm -f conftest.er1
12875 cat conftest.err >&5
ba479fd2 12876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12877 (exit $ac_status); } &&
12878 { ac_try='test -z "$ac_c_werror_flag"
12879 || test ! -s conftest.err'
12880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12881 (eval $ac_try) 2>&5
12882 ac_status=$?
12883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12884 (exit $ac_status); }; } &&
12885 { ac_try='test -s conftest.$ac_objext'
12886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12887 (eval $ac_try) 2>&5
12888 ac_status=$?
12889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12890 (exit $ac_status); }; }; then
75923b2f
MK
12891 gcc_cv_mkdir_takes_one_arg=no
12892else
ba479fd2
NN
12893 echo "$as_me: failed program was:" >&5
12894sed 's/^/| /' conftest.$ac_ext >&5
12895
b61ff9c8 12896gcc_cv_mkdir_takes_one_arg=yes
75923b2f 12897fi
b61ff9c8 12898rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 12899fi
b61ff9c8
BS
12900echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
12901echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 12902if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
12903
12904cat >>confdefs.h <<\_ACEOF
75923b2f 12905#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 12906_ACEOF
75923b2f
MK
12907
12908fi
12909
12910
861bb6c1
JL
12911# File extensions
12912manext='.1'
12913objext='.o'
12914
12915
12916
4977bab6 12917# With Setjmp/Longjmp based exception handling.
b61ff9c8 12918# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
4977bab6 12919if test "${enable_sjlj_exceptions+set}" = set; then
b61ff9c8 12920 enableval="$enable_sjlj_exceptions"
399fe3e1
JDA
12921 case $target in
12922 *-*-hpux10*)
12923 if test $enableval != yes; then
12924 { echo "$as_me:$LINENO: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&5
12925echo "$as_me: WARNING: dwarf2 exceptions not supported, sjlj exceptions forced" >&2;}
12926 enableval=yes
12927 fi
12928 ;;
12929esac
12930force_sjlj_exceptions=yes
12931else
12932 case $target in
12933 *-*-hpux10*)
12934 force_sjlj_exceptions=yes
12935 enableval=yes
12936 ;;
12937 *)
12938 force_sjlj_exceptions=no
12939 ;;
12940esac
12941fi;
12942if test $force_sjlj_exceptions = yes; then
b61ff9c8 12943 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 12944
ba479fd2
NN
12945cat >>confdefs.h <<_ACEOF
12946#define CONFIG_SJLJ_EXCEPTIONS $sjlj
12947_ACEOF
4977bab6 12948
399fe3e1 12949fi
4977bab6 12950
443728bb
L
12951# For platforms with the unwind ABI which includes an unwind library,
12952# libunwind, we can choose to use the system libunwind.
e61c76c9
SE
12953# config.gcc also contains tests of with_system_libunwind.
12954
4977bab6 12955
b61ff9c8 12956# Check whether --with-system-libunwind or --without-system-libunwind was given.
443728bb 12957if test "${with_system_libunwind+set}" = set; then
b61ff9c8 12958 withval="$with_system_libunwind"
4977bab6 12959
b61ff9c8 12960fi;
e61c76c9
SE
12961 # If system-libunwind was not specifically set, pick a default setting.
12962 if test x$with_system_libunwind = x; then
12963 case ${target} in
12964 ia64-*-hpux*) with_system_libunwind=yes ;;
12965 *) with_system_libunwind=no ;;
12966 esac
12967 fi
12968 # Based on system-libunwind and target, do we have ipinfo?
12969 if test x$with_system_libunwind = xyes; then
12970 case ${target} in
12971 ia64-*-*) have_unwind_getipinfo=no ;;
12972 *) have_unwind_getipinfo=yes ;;
12973 esac
12974 else
a0e02041
AP
12975 # Darwin before version 9 does not have _Unwind_GetIPInfo.
12976
12977 case ${target} in
12978 *-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;;
12979 *) have_unwind_getipinfo=yes ;;
12980 esac
12981
e61c76c9 12982 fi
4977bab6 12983
e61c76c9 12984 if test x$have_unwind_getipinfo = xyes; then
e64f5acf
SE
12985
12986cat >>confdefs.h <<\_ACEOF
12987#define HAVE_GETIPINFO 1
12988_ACEOF
12989
e61c76c9
SE
12990 fi
12991
e64f5acf 12992
34a86c2b
NN
12993# --------------------------------------------------------
12994# Build, host, and target specific configuration fragments
12995# --------------------------------------------------------
12996
5b28c537
NN
12997# Collect build-machine-specific information.
12998. ${srcdir}/config.build
12999
a89ea0df
NN
13000# Collect host-machine-specific information.
13001. ${srcdir}/config.host
13002
ef69da62 13003target_gtfiles=
a89ea0df
NN
13004
13005# Collect target-machine-specific information.
8ad9fb33 13006. ${srcdir}/config.gcc
861bb6c1
JL
13007
13008extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 13009extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
13010
13011# Default the target-machine variables that were not explicitly set.
75bffa71 13012if test x"$tm_file" = x
861bb6c1
JL
13013then tm_file=$cpu_type/$cpu_type.h; fi
13014
6b2adea9 13015if test x"$extra_headers" = x
861bb6c1
JL
13016then extra_headers=; fi
13017
75bffa71 13018if test x$md_file = x
e98e406f 13019then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 13020
75bffa71 13021if test x$out_file = x
861bb6c1
JL
13022then out_file=$cpu_type/$cpu_type.c; fi
13023
75bffa71 13024if test x"$tmake_file" = x
861bb6c1
JL
13025then tmake_file=$cpu_type/t-$cpu_type
13026fi
13027
90e6a802 13028if test x"$dwarf2" = xyes
756ee602 13029then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
13030fi
13031
861bb6c1 13032# Say what files are being used for the output code and MD file.
11642c3a 13033echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
13034echo "Using \`$srcdir/config/$md_file' as machine description file."
13035
11642c3a 13036# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
13037# about them and drop them.
13038
11642c3a
ZW
13039bx=
13040for x in $build_xm_file; do
13041 if test -f $srcdir/config/$x
13042 then bx="$bx $x"
ba479fd2
NN
13043 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13044echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13045 fi
13046done
13047build_xm_file="$bx"
13048
13049hx=
13050for x in $host_xm_file; do
13051 if test -f $srcdir/config/$x
13052 then hx="$hx $x"
ba479fd2
NN
13053 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13054echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13055 fi
13056done
13057host_xm_file="$hx"
13058
13059tx=
13060for x in $xm_file; do
13061 if test -f $srcdir/config/$x
13062 then tx="$tx $x"
ba479fd2
NN
13063 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
13064echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
13065 fi
13066done
13067xm_file="$tx"
13068
861bb6c1
JL
13069count=a
13070for f in $tm_file; do
13071 count=${count}x
13072done
75bffa71 13073if test $count = ax; then
861bb6c1
JL
13074 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
13075else
13076 echo "Using the following target machine macro files:"
13077 for f in $tm_file; do
13078 echo " $srcdir/config/$f"
13079 done
13080fi
13081
4977bab6 13082if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
13083
13084cat >>confdefs.h <<\_ACEOF
4977bab6 13085#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 13086_ACEOF
4977bab6
ZW
13087
13088fi
13089
99fa8911
AP
13090if test x$use_long_long_for_widest_fast_int = xyes; then
13091
13092cat >>confdefs.h <<\_ACEOF
13093#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
13094_ACEOF
13095
13096fi
13097
861bb6c1
JL
13098count=a
13099for f in $host_xm_file; do
13100 count=${count}x
13101done
11642c3a
ZW
13102if test $count = a; then
13103 :
13104elif test $count = ax; then
861bb6c1
JL
13105 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
13106else
13107 echo "Using the following host machine macro files:"
13108 for f in $host_xm_file; do
13109 echo " $srcdir/config/$f"
13110 done
13111fi
476d9098 13112echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 13113
75bffa71 13114if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
13115 count=a
13116 for f in $build_xm_file; do
13117 count=${count}x
13118 done
11642c3a
ZW
13119 if test $count = a; then
13120 :
13121 elif test $count = ax; then
861bb6c1
JL
13122 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
13123 else
13124 echo "Using the following build machine macro files:"
13125 for f in $build_xm_file; do
13126 echo " $srcdir/config/$f"
13127 done
13128 fi
13129fi
13130
4f6d8cc8 13131case ${host} in
b8ec3cc8 13132 powerpc*-*-darwin*)
b61ff9c8
BS
13133 echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
13134echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6
4f6d8cc8
GK
13135if test "${gcc_cv_mcontext_underscores+set}" = set; then
13136 echo $ECHO_N "(cached) $ECHO_C" >&6
13137else
13138 cat >conftest.$ac_ext <<_ACEOF
13139
ba7da42a 13140#include <sys/cdefs.h>
de4fb767 13141#include <sys/signal.h>
4f6d8cc8
GK
13142#include <ucontext.h>
13143int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
13144
13145_ACEOF
13146rm -f conftest.$ac_objext
b61ff9c8
BS
13147if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13148 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
13149 ac_status=$?
13150 grep -v '^ *+' conftest.er1 >conftest.err
13151 rm -f conftest.er1
13152 cat conftest.err >&5
13153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13154 (exit $ac_status); } &&
13155 { ac_try='test -z "$ac_c_werror_flag"
13156 || test ! -s conftest.err'
13157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13158 (eval $ac_try) 2>&5
13159 ac_status=$?
13160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13161 (exit $ac_status); }; } &&
13162 { ac_try='test -s conftest.$ac_objext'
13163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13164 (eval $ac_try) 2>&5
13165 ac_status=$?
13166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13167 (exit $ac_status); }; }; then
4f6d8cc8
GK
13168 gcc_cv_mcontext_underscores=no
13169else
13170 echo "$as_me: failed program was:" >&5
13171sed 's/^/| /' conftest.$ac_ext >&5
13172
b61ff9c8 13173gcc_cv_mcontext_underscores=yes
4f6d8cc8 13174fi
b61ff9c8 13175rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8 13176fi
b61ff9c8
BS
13177echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
13178echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6
4f6d8cc8
GK
13179 if test $gcc_cv_mcontext_underscores = yes; then
13180
13181cat >>confdefs.h <<\_ACEOF
13182#define HAS_MCONTEXT_T_UNDERSCORES
13183_ACEOF
13184
13185 fi
13186 ;;
13187esac
13188
8bb915b6
NN
13189# ---------
13190# Threading
13191# ---------
13192
c2e494a8 13193# Check if a valid thread package
615be2cf 13194case ${enable_threads} in
c2e494a8
NN
13195 "" | no)
13196 # No threads
13197 target_thread_file='single'
13198 ;;
13199 yes)
13200 # default
13201 target_thread_file='single'
13202 ;;
18167442 13203 aix | dce | gnat | irix | posix | posix95 | rtems | \
d9dced13 13204 single | solaris | vxworks | win32 | mipssde)
615be2cf 13205 target_thread_file=${enable_threads}
c2e494a8
NN
13206 ;;
13207 *)
615be2cf 13208 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
13209 exit 1
13210 ;;
13211esac
13212
13213if test x${thread_file} = x; then
13214 # No thread file set by target-specific clauses in config.gcc,
13215 # so use file chosen by default logic above
13216 thread_file=${target_thread_file}
861bb6c1
JL
13217fi
13218
8bb915b6
NN
13219# Make gthr-default.h if we have a thread file.
13220gthread_flags=
13221if test $thread_file != single; then
b15a9f63
RW
13222 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h-t
13223 if diff gthr-default.h-t gthr-default.h 2>/dev/null; then
13224 rm -f gthr-default.h-t
13225 else
13226 mv -f gthr-default.h-t gthr-default.h
13227 fi
8bb915b6
NN
13228 gthread_flags=-DHAVE_GTHR_DEFAULT
13229fi
13230
13231
13232# --------
13233# UNSORTED
13234# --------
13235
18fbf599 13236use_cxa_atexit=no
2121a768
JT
13237if test x$enable___cxa_atexit = xyes || \
13238 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599 13239 if test x$host = x$target; then
97388150
DS
13240 case $host in
13241 # mingw32 doesn't have __cxa_atexit but uses atexit registration
13242 # keyed to flag_use_cxa_atexit
13243 *-*-mingw32*)
13244 use_cxa_atexit=yes
13245 ;;
13246 *)
b61ff9c8
BS
13247 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
13248echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
354b7da5
DH
13249if test "${ac_cv_func___cxa_atexit+set}" = set; then
13250 echo $ECHO_N "(cached) $ECHO_C" >&6
13251else
13252 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
13253/* confdefs.h. */
13254_ACEOF
13255cat confdefs.h >>conftest.$ac_ext
13256cat >>conftest.$ac_ext <<_ACEOF
13257/* end confdefs.h. */
86da66b5
HPN
13258/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
13259 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13260#define __cxa_atexit innocuous___cxa_atexit
13261
354b7da5
DH
13262/* System header to define __stub macros and hopefully few prototypes,
13263 which can conflict with char __cxa_atexit (); below.
13264 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13265 <limits.h> exists even on freestanding compilers. */
86da66b5 13266
354b7da5
DH
13267#ifdef __STDC__
13268# include <limits.h>
13269#else
13270# include <assert.h>
13271#endif
86da66b5
HPN
13272
13273#undef __cxa_atexit
13274
b61ff9c8 13275/* Override any gcc2 internal prototype to avoid an error. */
354b7da5
DH
13276#ifdef __cplusplus
13277extern "C"
b61ff9c8 13278{
354b7da5 13279#endif
b61ff9c8
BS
13280/* We use char because int might match the return type of a gcc2
13281 builtin and then its argument prototype would still apply. */
354b7da5
DH
13282char __cxa_atexit ();
13283/* The GNU C library defines this for functions which it implements
13284 to always fail with ENOSYS. Some functions are actually named
13285 something starting with __ and the normal name is an alias. */
b61ff9c8 13286#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
354b7da5 13287choke me
b61ff9c8
BS
13288#else
13289char (*f) () = __cxa_atexit;
13290#endif
13291#ifdef __cplusplus
13292}
354b7da5
DH
13293#endif
13294
13295int
13296main ()
13297{
b61ff9c8 13298return f != __cxa_atexit;
354b7da5
DH
13299 ;
13300 return 0;
13301}
13302_ACEOF
13303rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
13304if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13305 (eval $ac_link) 2>conftest.er1
354b7da5 13306 ac_status=$?
86da66b5
HPN
13307 grep -v '^ *+' conftest.er1 >conftest.err
13308 rm -f conftest.er1
13309 cat conftest.err >&5
354b7da5 13310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13311 (exit $ac_status); } &&
13312 { ac_try='test -z "$ac_c_werror_flag"
13313 || test ! -s conftest.err'
13314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13315 (eval $ac_try) 2>&5
13316 ac_status=$?
13317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13318 (exit $ac_status); }; } &&
13319 { ac_try='test -s conftest$ac_exeext'
13320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13321 (eval $ac_try) 2>&5
13322 ac_status=$?
13323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13324 (exit $ac_status); }; }; then
354b7da5
DH
13325 ac_cv_func___cxa_atexit=yes
13326else
13327 echo "$as_me: failed program was:" >&5
13328sed 's/^/| /' conftest.$ac_ext >&5
13329
b61ff9c8 13330ac_cv_func___cxa_atexit=no
354b7da5 13331fi
b61ff9c8 13332rm -f conftest.err conftest.$ac_objext \
86da66b5 13333 conftest$ac_exeext conftest.$ac_ext
354b7da5 13334fi
b61ff9c8
BS
13335echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
13336echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
354b7da5 13337if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
13338 use_cxa_atexit=yes
13339else
13340 echo "__cxa_atexit can't be enabled on this target"
13341fi
13342
5f60e48f 13343 ;;
97388150 13344 esac
18fbf599
PB
13345 else
13346 # We can't check for __cxa_atexit when building a cross, so assume
13347 # it is available
13348 use_cxa_atexit=yes
13349 fi
13350 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
13351
13352cat >>confdefs.h <<\_ACEOF
c7b5e395 13353#define DEFAULT_USE_CXA_ATEXIT 2
ba479fd2 13354_ACEOF
2121a768 13355
18fbf599 13356 fi
2121a768
JT
13357fi
13358
a5381466 13359# Look for a file containing extra machine modes.
1c0ca89d
ZW
13360if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
13361 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
13362
13363
13364cat >>confdefs.h <<_ACEOF
e22340b0 13365#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 13366_ACEOF
a5381466
ZW
13367
13368fi
13369
75685792
RS
13370# Convert extra_options into a form suitable for Makefile use.
13371extra_opt_files=
13372for f in $extra_options; do
13373 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
13374done
13375
13376
b7cb92ad 13377# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 13378# the first file included by config.h.
4977bab6 13379# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 13380# as well. If host!=build, we are in error and need to do more
db81d74a 13381# work to find out the build config parameters.
75bffa71 13382if test x$host = x$build
db81d74a 13383then
eaf4e618 13384 build_auto=auto-host.h
b7cb92ad
JL
13385else
13386 # We create a subdir, then run autoconf in the subdir.
13387 # To prevent recursion we set host and build for the new
13388 # invocation of configure to the build for this invocation
ba479fd2 13389 # of configure.
b7cb92ad
JL
13390 tempdir=build.$$
13391 rm -rf $tempdir
13392 mkdir $tempdir
13393 cd $tempdir
13394 case ${srcdir} in
255b8a49 13395 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
13396 *) realsrcdir=../${srcdir};;
13397 esac
d920e825
L
13398 saved_CFLAGS="${CFLAGS}"
13399 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
f8c33439 13400 LDFLAGS="${LDFLAGS_FOR_BUILD}" \
d920e825 13401 ${realsrcdir}/configure \
33e70558 13402 --enable-languages=${enable_languages-all} \
534d0cc0 13403 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 13404 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
13405
13406 # We just finished tests for the build machine, so rename
13407 # the file auto-build.h in the gcc directory.
13408 mv auto-host.h ../auto-build.h
13409 cd ..
13410 rm -rf $tempdir
eaf4e618 13411 build_auto=auto-build.h
db81d74a
RH
13412fi
13413
06f0b04c 13414
eaf4e618 13415tm_file="${tm_file} defaults.h"
4977bab6
ZW
13416tm_p_file="${tm_p_file} tm-preds.h"
13417host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
13418build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 13419# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 13420# put this back in temporarily.
232b67d9 13421xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 13422
34a86c2b
NN
13423# --------
13424# UNSORTED
13425# --------
13426
cc1e60ea 13427# Compile in configure arguments.
8105825d 13428if test -f configargs.h ; then
cc1e60ea 13429 # Being re-configured.
022dae81 13430 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
13431 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
13432else
13433 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
13434fi
eeae7b41
DJ
13435
13436# Double all backslashes and backslash all quotes to turn
13437# gcc_config_arguments into a C string.
13438sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
13439$gcc_config_arguments
13440EOF
13441gcc_config_arguments_str=`cat conftest.out`
13442rm -f conftest.out
13443
cc1e60ea
JM
13444cat > configargs.h <<EOF
13445/* Generated automatically. */
eeae7b41 13446static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 13447static const char thread_model[] = "$thread_file";
7816bea0
DJ
13448
13449static const struct {
13450 const char *name, *value;
13451} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
13452EOF
13453
ab87f8c8 13454# Internationalization
18fc9bd4
RG
13455# If we haven't got the data from the intl directory,
13456# assume NLS is disabled.
13457USE_NLS=no
13458LIBINTL=
13459LIBINTL_DEP=
13460INCINTL=
13461XGETTEXT=
13462GMSGFMT=
13463POSUB=
13464
13465if test -f ../intl/config.intl; then
13466 . ../intl/config.intl
13467fi
b61ff9c8
BS
13468echo "$as_me:$LINENO: checking whether NLS is requested" >&5
13469echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
18fc9bd4 13470if test x"$USE_NLS" != xyes; then
b61ff9c8
BS
13471 echo "$as_me:$LINENO: result: no" >&5
13472echo "${ECHO_T}no" >&6
18fc9bd4 13473else
b61ff9c8
BS
13474 echo "$as_me:$LINENO: result: yes" >&5
13475echo "${ECHO_T}yes" >&6
18fc9bd4
RG
13476
13477cat >>confdefs.h <<\_ACEOF
13478#define ENABLE_NLS 1
13479_ACEOF
13480
13481
b61ff9c8
BS
13482 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
13483echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
18fc9bd4
RG
13484 # Look for .po and .gmo files in the source directory.
13485 CATALOGS=
13486 XLINGUAS=
13487 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
13488 # If there aren't any .gmo files the shell will give us the
13489 # literal string "../path/to/srcdir/po/*.gmo" which has to be
13490 # weeded out.
13491 case "$cat" in *\**)
13492 continue;;
13493 esac
13494 # The quadruple backslash is collapsed to a double backslash
13495 # by the backticks, then collapsed again by the double quotes,
13496 # leaving us with one backslash in the sed expression (right
13497 # before the dot that mustn't act as a wildcard).
13498 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
13499 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
13500 # The user is allowed to set LINGUAS to a list of languages to
13501 # install catalogs for. If it's empty that means "all of them."
13502 if test "x$LINGUAS" = x; then
13503 CATALOGS="$CATALOGS $cat"
13504 XLINGUAS="$XLINGUAS $lang"
13505 else
13506 case "$LINGUAS" in *$lang*)
13507 CATALOGS="$CATALOGS $cat"
13508 XLINGUAS="$XLINGUAS $lang"
13509 ;;
13510 esac
13511 fi
13512 done
13513 LINGUAS="$XLINGUAS"
b61ff9c8
BS
13514 echo "$as_me:$LINENO: result: $LINGUAS" >&5
13515echo "${ECHO_T}$LINGUAS" >&6
18fc9bd4
RG
13516
13517
13518 DATADIRNAME=share
13519
13520 INSTOBJEXT=.mo
13521
13522 GENCAT=gencat
13523
13524 CATOBJEXT=.gmo
13525
13526fi
861bb6c1 13527
56694dd9
ZW
13528# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
13529# -liconv on the link line twice.
13530case "$LIBINTL" in *$LIBICONV*)
13531 LIBICONV= ;;
13532esac
dc6746e7 13533
b61ff9c8 13534# Check whether --enable-secureplt or --disable-secureplt was given.
7f970b70 13535if test "${enable_secureplt+set}" = set; then
b61ff9c8 13536 enableval="$enable_secureplt"
7f970b70 13537
b61ff9c8 13538fi;
7f970b70 13539
922e3e33
UB
13540# Check whether --enable-cld or --disable-cld was given.
13541if test "${enable_cld+set}" = set; then
13542 enableval="$enable_cld"
13543
13544else
13545 enable_cld=no
13546fi;
13547
56694dd9 13548# Windows32 Registry support for specifying GCC installation paths.
b61ff9c8 13549# Check whether --enable-win32-registry or --disable-win32-registry was given.
56694dd9 13550if test "${enable_win32_registry+set}" = set; then
b61ff9c8 13551 enableval="$enable_win32_registry"
dc6746e7 13552
b61ff9c8 13553fi;
ba479fd2 13554
a1286ef5
ZW
13555case $host_os in
13556 win32 | pe | cygwin* | mingw32* | uwin*)
13557 if test "x$enable_win32_registry" != xno; then
b61ff9c8
BS
13558 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
13559echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
ba479fd2
NN
13560if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
13561 echo $ECHO_N "(cached) $ECHO_C" >&6
13562else
13563 ac_func_search_save_LIBS=$LIBS
b61ff9c8 13564ac_cv_search_RegOpenKeyExA=no
ba479fd2 13565cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
13566/* confdefs.h. */
13567_ACEOF
13568cat confdefs.h >>conftest.$ac_ext
13569cat >>conftest.$ac_ext <<_ACEOF
13570/* end confdefs.h. */
861bb6c1 13571
b61ff9c8 13572/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
13573#ifdef __cplusplus
13574extern "C"
13575#endif
b61ff9c8
BS
13576/* We use char because int might match the return type of a gcc2
13577 builtin and then its argument prototype would still apply. */
ba479fd2
NN
13578char RegOpenKeyExA ();
13579int
13580main ()
13581{
b61ff9c8 13582RegOpenKeyExA ();
ba479fd2
NN
13583 ;
13584 return 0;
13585}
13586_ACEOF
b61ff9c8
BS
13587rm -f conftest.$ac_objext conftest$ac_exeext
13588if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13589 (eval $ac_link) 2>conftest.er1
ba479fd2 13590 ac_status=$?
86da66b5
HPN
13591 grep -v '^ *+' conftest.er1 >conftest.err
13592 rm -f conftest.er1
13593 cat conftest.err >&5
ba479fd2 13594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
13595 (exit $ac_status); } &&
13596 { ac_try='test -z "$ac_c_werror_flag"
13597 || test ! -s conftest.err'
13598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13599 (eval $ac_try) 2>&5
13600 ac_status=$?
13601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13602 (exit $ac_status); }; } &&
13603 { ac_try='test -s conftest$ac_exeext'
13604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13605 (eval $ac_try) 2>&5
13606 ac_status=$?
13607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13608 (exit $ac_status); }; }; then
13609 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 13610else
ba479fd2
NN
13611 echo "$as_me: failed program was:" >&5
13612sed 's/^/| /' conftest.$ac_ext >&5
13613
1a4b763e 13614fi
b61ff9c8
BS
13615rm -f conftest.err conftest.$ac_objext \
13616 conftest$ac_exeext conftest.$ac_ext
13617if test "$ac_cv_search_RegOpenKeyExA" = no; then
13618 for ac_lib in advapi32; do
13619 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13620 cat >conftest.$ac_ext <<_ACEOF
13621/* confdefs.h. */
13622_ACEOF
13623cat confdefs.h >>conftest.$ac_ext
13624cat >>conftest.$ac_ext <<_ACEOF
13625/* end confdefs.h. */
2f41c1d6 13626
b61ff9c8
BS
13627/* Override any gcc2 internal prototype to avoid an error. */
13628#ifdef __cplusplus
13629extern "C"
13630#endif
13631/* We use char because int might match the return type of a gcc2
13632 builtin and then its argument prototype would still apply. */
13633char RegOpenKeyExA ();
13634int
13635main ()
13636{
13637RegOpenKeyExA ();
13638 ;
13639 return 0;
13640}
13641_ACEOF
13642rm -f conftest.$ac_objext conftest$ac_exeext
13643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13644 (eval $ac_link) 2>conftest.er1
13645 ac_status=$?
13646 grep -v '^ *+' conftest.er1 >conftest.err
13647 rm -f conftest.er1
13648 cat conftest.err >&5
13649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13650 (exit $ac_status); } &&
13651 { ac_try='test -z "$ac_c_werror_flag"
13652 || test ! -s conftest.err'
13653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13654 (eval $ac_try) 2>&5
13655 ac_status=$?
13656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13657 (exit $ac_status); }; } &&
13658 { ac_try='test -s conftest$ac_exeext'
13659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13660 (eval $ac_try) 2>&5
13661 ac_status=$?
13662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13663 (exit $ac_status); }; }; then
13664 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
13665break
1a4b763e 13666else
b61ff9c8
BS
13667 echo "$as_me: failed program was:" >&5
13668sed 's/^/| /' conftest.$ac_ext >&5
13669
13670fi
13671rm -f conftest.err conftest.$ac_objext \
13672 conftest$ac_exeext conftest.$ac_ext
13673 done
dd7f7a6e
EC
13674fi
13675LIBS=$ac_func_search_save_LIBS
13676fi
b61ff9c8
BS
13677echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
13678echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
13679if test "$ac_cv_search_RegOpenKeyExA" != no; then
13680 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
dd7f7a6e
EC
13681
13682else
13683 enable_win32_registry=no
13684fi
13685
13686 fi
13687
13688 if test "x$enable_win32_registry" != xno; then
13689
13690cat >>confdefs.h <<\_ACEOF
13691#define ENABLE_WIN32_REGISTRY 1
13692_ACEOF
13693
13694
13695 if test "x$enable_win32_registry" != xyes \
13696 && test "x$enable_win32_registry" != x; then
13697
13698cat >>confdefs.h <<_ACEOF
13699#define WIN32_REGISTRY_KEY "$enable_win32_registry"
13700_ACEOF
13701
13702 fi
13703 fi
13704 ;;
13705esac
ab87f8c8 13706
56694dd9
ZW
13707# Get an absolute path to the GCC top-level source directory
13708holddir=`${PWDCMD-pwd}`
13709cd $srcdir
13710topdir=`${PWDCMD-pwd}`
13711cd $holddir
ab87f8c8 13712
56694dd9 13713# Conditionalize the makefile for this host machine.
2ed26f6b 13714xmake_file=
c406e779 13715for f in ${host_xmake_file}
56694dd9
ZW
13716do
13717 if test -f ${srcdir}/config/$f
13718 then
2ed26f6b 13719 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
13720 fi
13721done
093e61a6 13722
56694dd9 13723# Conditionalize the makefile for this target machine.
2ed26f6b 13724tmake_file_=
c406e779 13725for f in ${tmake_file}
56694dd9
ZW
13726do
13727 if test -f ${srcdir}/config/$f
13728 then
2ed26f6b 13729 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
13730 fi
13731done
2ed26f6b 13732tmake_file="${tmake_file_}"
71a94577 13733
ab87f8c8
JL
13734out_object_file=`basename $out_file .c`.o
13735
75685792
RS
13736tm_file_list="options.h"
13737tm_include_list="options.h"
ab87f8c8 13738for f in $tm_file; do
64ccbc99 13739 case $f in
3ca43df7
RS
13740 ./* )
13741 f=`echo $f | sed 's/^..//'`
13742 tm_file_list="${tm_file_list} $f"
13743 tm_include_list="${tm_include_list} $f"
13744 ;;
d02af173 13745 defaults.h )
e22340b0
ZW
13746 tm_file_list="${tm_file_list} \$(srcdir)/$f"
13747 tm_include_list="${tm_include_list} $f"
13748 ;;
13749 * )
13750 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
13751 tm_include_list="${tm_include_list} config/$f"
13752 ;;
64ccbc99 13753 esac
ab87f8c8
JL
13754done
13755
11642c3a 13756tm_p_file_list=
e22340b0 13757tm_p_include_list=
11642c3a 13758for f in $tm_p_file; do
4977bab6
ZW
13759 case $f in
13760 tm-preds.h )
e22340b0
ZW
13761 tm_p_file_list="${tm_p_file_list} $f"
13762 tm_p_include_list="${tm_p_include_list} $f"
13763 ;;
13764 * )
13765 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
13766 tm_p_include_list="${tm_p_include_list} config/$f"
13767 esac
13768done
13769
13770xm_file_list=
13771xm_include_list=
13772for f in $xm_file; do
13773 case $f in
13774 ansidecl.h )
13775 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
13776 xm_include_list="${xm_include_list} $f"
13777 ;;
13778 auto-host.h )
13779 xm_file_list="${xm_file_list} $f"
13780 xm_include_list="${xm_include_list} $f"
13781 ;;
13782 * )
13783 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
13784 xm_include_list="${xm_include_list} config/$f"
13785 ;;
4977bab6 13786 esac
11642c3a
ZW
13787done
13788
ab87f8c8 13789host_xm_file_list=
e22340b0 13790host_xm_include_list=
ab87f8c8 13791for f in $host_xm_file; do
64ccbc99 13792 case $f in
d02af173 13793 ansidecl.h )
e22340b0
ZW
13794 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
13795 host_xm_include_list="${host_xm_include_list} $f"
13796 ;;
e2500fed 13797 auto-host.h )
e22340b0
ZW
13798 host_xm_file_list="${host_xm_file_list} $f"
13799 host_xm_include_list="${host_xm_include_list} $f"
13800 ;;
13801 * )
13802 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
13803 host_xm_include_list="${host_xm_include_list} config/$f"
13804 ;;
64ccbc99 13805 esac
ab87f8c8
JL
13806done
13807
13808build_xm_file_list=
13809for f in $build_xm_file; do
64ccbc99 13810 case $f in
d02af173 13811 ansidecl.h )
e22340b0
ZW
13812 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
13813 build_xm_include_list="${build_xm_include_list} $f"
13814 ;;
e2500fed 13815 auto-build.h | auto-host.h )
e22340b0
ZW
13816 build_xm_file_list="${build_xm_file_list} $f"
13817 build_xm_include_list="${build_xm_include_list} $f"
13818 ;;
13819 * )
13820 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
13821 build_xm_include_list="${build_xm_include_list} config/$f"
13822 ;;
64ccbc99 13823 esac
ab87f8c8
JL
13824done
13825
2989d30c
GK
13826# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
13827# cross-compiler which does not use the native headers and libraries.
a078a589 13828# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
13829CROSS=
13830ALL=all.internal
13831SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
13832
13833if test "x$with_build_sysroot" != x; then
14da6073 13834 build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
13835else
13836 # This value is used, even on a native system, because
13837 # CROSS_SYSTEM_HEADER_DIR is just
13838 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
13839 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
13840fi
13841
ab87f8c8
JL
13842if test x$host != x$target
13843then
2989d30c 13844 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
a078a589 13845 ALL=all.cross
160633c6 13846 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 13847 case "$host","$target" in
3a7e8b87
GK
13848 # Darwin crosses can use the host system's libraries and headers,
13849 # because of the fat library support. Of course, it must be the
13850 # same version of Darwin on both sides. Allow the user to
13851 # just say --target=foo-darwin without a version number to mean
13852 # "the version on this system".
13853 *-*-darwin*,*-*-darwin*)
13854 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
13855 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
13856 if test $hostos = $targetos -o $targetos = darwin ; then
13857 CROSS=
13858 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
13859 with_headers=yes
13860 fi
13861 ;;
13862
343f59d9
AM
13863 i?86-*-*,x86_64-*-* \
13864 | powerpc*-*-*,powerpc64*-*-*)
13865 CROSS="$CROSS -DNATIVE_CROSS" ;;
13866 esac
7a615b25 13867elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 13868 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
13869fi
13870
b39d221a
EC
13871# If this is a cross-compiler that does not
13872# have its own set of headers then define
13873# inhibit_libc
13874
dc06db20
R
13875# If this is using newlib, without having the headers available now,
13876# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
13877# This prevents libgcc2 from containing any code which requires libc
13878# support.
a929bc28 13879: ${inhibit_libc=false}
dc06db20
R
13880if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
13881 test x$with_newlib = xyes ; } &&
e50084fa 13882 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 13883 inhibit_libc=true
b39d221a
EC
13884fi
13885
13886
a078a589
ZW
13887# When building gcc with a cross-compiler, we need to adjust things so
13888# that the generator programs are still built with the native compiler.
52c0e446 13889# Also, we cannot run fixincludes.
a078a589
ZW
13890
13891# These are the normal (build=host) settings:
ba479fd2
NN
13892CC_FOR_BUILD='$(CC)'
13893BUILD_CFLAGS='$(ALL_CFLAGS)'
f8c33439 13894BUILD_LDFLAGS='$(LDFLAGS)'
ba479fd2 13895STMP_FIXINC=stmp-fixinc
8ad9fb33 13896
83599948
NS
13897# And these apply if build != host, or we are generating coverage data
13898if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 13899then
b11e4747 13900 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
f8c33439 13901 BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
ab87f8c8
JL
13902fi
13903
13904# Expand extra_headers to include complete path.
13905# This substitutes for lots of t-* files.
13906extra_headers_list=
b1ef58c8
NN
13907# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
13908for file in ${extra_headers} ; do
13909 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
13910done
ab87f8c8 13911
1617e5ee
GK
13912# If use_gcc_tgmath is set, append ginclude/tgmath.h.
13913if test x"$use_gcc_tgmath" = xyes
13914then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h"
13915fi
13916
c38f02df
ILT
13917# Define collect2 in Makefile.
13918case $host_can_use_collect2 in
13919 no) collect2= ;;
13920 *) collect2='collect2$(exeext)' ;;
13921esac
13922
13923
ab87f8c8 13924# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
13925case $use_collect2 in
13926 no) use_collect2= ;;
13927 "") ;;
ba479fd2 13928 *)
34a86c2b
NN
13929 host_xm_defines="${host_xm_defines} USE_COLLECT2"
13930 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
13931 case $host_can_use_collect2 in
13932 no)
13933 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
13934echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
13935 { (exit 1); exit 1; }; }
13936 ;;
13937 esac
34a86c2b
NN
13938 ;;
13939esac
ab87f8c8 13940
8bb915b6
NN
13941# ---------------------------
13942# Assembler & linker features
13943# ---------------------------
13944
da0f6381
PB
13945# During stage 2, ld is actually gcc/collect-ld, which is a small script to
13946# discern between when to use prev-ld/ld-new and when to use ld/ld-new.
13947# However when ld-new is first executed from the build tree, libtool will
13948# relink it as .libs/lt-ld-new, so that it can give it an RPATH that refers
13949# to the build tree. While doing this we need to use the previous-stage
13950# linker, or we have an infinite loop. The presence of a shell script as
13951# ld/ld-new, and the fact that the script *uses ld itself*, is what confuses
13952# the gcc/collect-ld script. So we need to know how libtool works, or
13953# exec-tool will fail.
e8b05380 13954
da0f6381 13955
5d47bb02
PG
13956case `pwd` in
13957 *\ * | *\ *)
13958 { echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
13959echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
13960esac
da0f6381
PB
13961
13962
da0f6381 13963
5d47bb02
PG
13964macro_version='2.2.6'
13965macro_revision='1.3012'
da0f6381
PB
13966
13967
13968
13969
13970
13971
da0f6381
PB
13972
13973
13974
13975
13976
13977
13978
5d47bb02 13979ltmain="$ac_aux_dir/ltmain.sh"
da0f6381
PB
13980
13981echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
13982echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
13983if test "${lt_cv_path_SED+set}" = set; then
e8b05380
PB
13984 echo $ECHO_N "(cached) $ECHO_C" >&6
13985else
da0f6381
PB
13986 # Loop through the user's path and test for sed and gsed.
13987# Then use that list of sed's as ones to test for truncation.
13988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380
PB
13989for as_dir in $PATH
13990do
13991 IFS=$as_save_IFS
13992 test -z "$as_dir" && as_dir=.
da0f6381
PB
13993 for lt_ac_prog in sed gsed; do
13994 for ac_exec_ext in '' $ac_executable_extensions; do
13995 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
13996 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
13997 fi
13998 done
13999 done
e8b05380 14000done
da0f6381
PB
14001IFS=$as_save_IFS
14002lt_ac_max=0
14003lt_ac_count=0
14004# Add /usr/xpg4/bin/sed as it is typically found on Solaris
14005# along with /bin/sed that truncates output.
14006for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
14007 test ! -f $lt_ac_sed && continue
14008 cat /dev/null > conftest.in
14009 lt_ac_count=0
14010 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
14011 # Check for GNU sed and select it if it is found.
14012 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
14013 lt_cv_path_SED=$lt_ac_sed
14014 break
14015 fi
14016 while true; do
14017 cat conftest.in conftest.in >conftest.tmp
14018 mv conftest.tmp conftest.in
14019 cp conftest.in conftest.nl
14020 echo >>conftest.nl
14021 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
14022 cmp -s conftest.out conftest.nl || break
14023 # 10000 chars as input seems more than enough
14024 test $lt_ac_count -gt 10 && break
14025 lt_ac_count=`expr $lt_ac_count + 1`
14026 if test $lt_ac_count -gt $lt_ac_max; then
14027 lt_ac_max=$lt_ac_count
14028 lt_cv_path_SED=$lt_ac_sed
14029 fi
14030 done
e8b05380
PB
14031done
14032
e8b05380 14033fi
b61ff9c8 14034
da0f6381 14035SED=$lt_cv_path_SED
e8b05380 14036
da0f6381
PB
14037echo "$as_me:$LINENO: result: $SED" >&5
14038echo "${ECHO_T}$SED" >&6
e8b05380 14039
da0f6381
PB
14040test -z "$SED" && SED=sed
14041Xsed="$SED -e 1s/^X//"
e8b05380 14042
e8b05380
PB
14043
14044
ad9c4d9f 14045
da0f6381
PB
14046
14047
14048
14049
14050
14051
14052
14053echo "$as_me:$LINENO: checking for fgrep" >&5
14054echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
14055if test "${ac_cv_prog_fgrep+set}" = set; then
14056 echo $ECHO_N "(cached) $ECHO_C" >&6
e8b05380 14057else
da0f6381
PB
14058 if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1
14059 then ac_cv_prog_fgrep='grep -F'
14060 else ac_cv_prog_fgrep='fgrep'
14061 fi
981d4858 14062fi
da0f6381
PB
14063echo "$as_me:$LINENO: result: $ac_cv_prog_fgrep" >&5
14064echo "${ECHO_T}$ac_cv_prog_fgrep" >&6
14065 FGREP=$ac_cv_prog_fgrep
9e423e6d 14066
9f18db39 14067
da0f6381 14068test -z "$GREP" && GREP=grep
9f18db39 14069
da0f6381
PB
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088# Check whether --with-gnu-ld or --without-gnu-ld was given.
14089if test "${with_gnu_ld+set}" = set; then
14090 withval="$with_gnu_ld"
14091 test "$withval" = no || with_gnu_ld=yes
14092else
14093 with_gnu_ld=no
14094fi;
14095ac_prog=ld
14096if test "$GCC" = yes; then
14097 # Check if gcc -print-prog-name=ld gives a path.
14098 echo "$as_me:$LINENO: checking for ld used by $CC" >&5
14099echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
14100 case $host in
14101 *-*-mingw*)
14102 # gcc leaves a trailing carriage return which upsets mingw
14103 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
14104 *)
14105 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
14106 esac
14107 case $ac_prog in
14108 # Accept absolute paths.
14109 [\\/]* | ?:[\\/]*)
14110 re_direlt='/[^/][^/]*/\.\./'
14111 # Canonicalize the pathname of ld
14112 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
14113 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
14114 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
14115 done
14116 test -z "$LD" && LD="$ac_prog"
14117 ;;
14118 "")
14119 # If it fails, then pretend we aren't using GCC.
14120 ac_prog=ld
14121 ;;
14122 *)
14123 # If it is relative, then search for the first ld in PATH.
14124 with_gnu_ld=unknown
14125 ;;
14126 esac
14127elif test "$with_gnu_ld" = yes; then
14128 echo "$as_me:$LINENO: checking for GNU ld" >&5
14129echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
14130else
14131 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
14132echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
14133fi
14134if test "${lt_cv_path_LD+set}" = set; then
14135 echo $ECHO_N "(cached) $ECHO_C" >&6
14136else
14137 if test -z "$LD"; then
14138 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14139 for ac_dir in $PATH; do
14140 IFS="$lt_save_ifs"
14141 test -z "$ac_dir" && ac_dir=.
14142 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
14143 lt_cv_path_LD="$ac_dir/$ac_prog"
14144 # Check to see if the program is GNU ld. I'd rather use --version,
14145 # but apparently some variants of GNU ld only accept -v.
14146 # Break only if it was the GNU/non-GNU ld that we prefer.
14147 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
14148 *GNU* | *'with BFD'*)
14149 test "$with_gnu_ld" != no && break
14150 ;;
14151 *)
14152 test "$with_gnu_ld" != yes && break
14153 ;;
14154 esac
14155 fi
14156 done
14157 IFS="$lt_save_ifs"
14158else
14159 lt_cv_path_LD="$LD" # Let the user override the test with a path.
14160fi
14161fi
14162
14163LD="$lt_cv_path_LD"
14164if test -n "$LD"; then
14165 echo "$as_me:$LINENO: result: $LD" >&5
14166echo "${ECHO_T}$LD" >&6
14167else
14168 echo "$as_me:$LINENO: result: no" >&5
14169echo "${ECHO_T}no" >&6
14170fi
14171test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
14172echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
14173 { (exit 1); exit 1; }; }
14174echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
14175echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
14176if test "${lt_cv_prog_gnu_ld+set}" = set; then
14177 echo $ECHO_N "(cached) $ECHO_C" >&6
14178else
14179 # I'd rather use --version here, but apparently some GNU lds only accept -v.
14180case `$LD -v 2>&1 </dev/null` in
14181*GNU* | *'with BFD'*)
14182 lt_cv_prog_gnu_ld=yes
14183 ;;
14184*)
14185 lt_cv_prog_gnu_ld=no
14186 ;;
14187esac
14188fi
14189echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
14190echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
14191with_gnu_ld=$lt_cv_prog_gnu_ld
14192
14193
14194
14195
14196
14197
14198
14199
14200
da0f6381
PB
14201echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
14202echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6
14203if test "${lt_cv_path_NM+set}" = set; then
14204 echo $ECHO_N "(cached) $ECHO_C" >&6
14205else
14206 if test -n "$NM"; then
14207 # Let the user override the test.
14208 lt_cv_path_NM="$NM"
14209else
14210 lt_nm_to_check="${ac_tool_prefix}nm"
14211 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
14212 lt_nm_to_check="$lt_nm_to_check nm"
14213 fi
14214 for lt_tmp_nm in $lt_nm_to_check; do
14215 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14216 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
14217 IFS="$lt_save_ifs"
14218 test -z "$ac_dir" && ac_dir=.
14219 tmp_nm="$ac_dir/$lt_tmp_nm"
14220 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
14221 # Check to see if the nm accepts a BSD-compat flag.
14222 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
14223 # nm: unknown option "B" ignored
14224 # Tru64's nm complains that /dev/null is an invalid object file
14225 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
14226 */dev/null* | *'Invalid file or object type'*)
14227 lt_cv_path_NM="$tmp_nm -B"
14228 break
14229 ;;
14230 *)
14231 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
14232 */dev/null*)
14233 lt_cv_path_NM="$tmp_nm -p"
14234 break
14235 ;;
14236 *)
14237 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
14238 continue # so that we can try to find one that supports BSD flags
14239 ;;
14240 esac
14241 ;;
14242 esac
14243 fi
14244 done
14245 IFS="$lt_save_ifs"
14246 done
14247 : ${lt_cv_path_NM=no}
14248fi
14249fi
14250echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
14251echo "${ECHO_T}$lt_cv_path_NM" >&6
14252if test "$lt_cv_path_NM" != "no"; then
14253 NM="$lt_cv_path_NM"
14254else
14255 # Didn't find any BSD compatible name lister, look for dumpbin.
14256 if test -n "$ac_tool_prefix"; then
14257 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
14258 do
14259 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14260set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14261echo "$as_me:$LINENO: checking for $ac_word" >&5
14262echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14263if test "${ac_cv_prog_DUMPBIN+set}" = set; then
14264 echo $ECHO_N "(cached) $ECHO_C" >&6
14265else
14266 if test -n "$DUMPBIN"; then
14267 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
14268else
14269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14270for as_dir in $PATH
14271do
14272 IFS=$as_save_IFS
14273 test -z "$as_dir" && as_dir=.
14274 for ac_exec_ext in '' $ac_executable_extensions; do
14275 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14276 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
14277 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14278 break 2
14279 fi
14280done
14281done
14282
14283fi
14284fi
14285DUMPBIN=$ac_cv_prog_DUMPBIN
14286if test -n "$DUMPBIN"; then
14287 echo "$as_me:$LINENO: result: $DUMPBIN" >&5
14288echo "${ECHO_T}$DUMPBIN" >&6
14289else
14290 echo "$as_me:$LINENO: result: no" >&5
14291echo "${ECHO_T}no" >&6
14292fi
14293
14294 test -n "$DUMPBIN" && break
14295 done
14296fi
14297if test -z "$DUMPBIN"; then
14298 ac_ct_DUMPBIN=$DUMPBIN
14299 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
14300do
14301 # Extract the first word of "$ac_prog", so it can be a program name with args.
14302set dummy $ac_prog; ac_word=$2
14303echo "$as_me:$LINENO: checking for $ac_word" >&5
14304echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14305if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
14306 echo $ECHO_N "(cached) $ECHO_C" >&6
14307else
14308 if test -n "$ac_ct_DUMPBIN"; then
14309 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
14310else
14311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14312for as_dir in $PATH
14313do
14314 IFS=$as_save_IFS
14315 test -z "$as_dir" && as_dir=.
14316 for ac_exec_ext in '' $ac_executable_extensions; do
14317 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14318 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
14319 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14320 break 2
14321 fi
14322done
14323done
14324
14325fi
14326fi
14327ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
14328if test -n "$ac_ct_DUMPBIN"; then
14329 echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
14330echo "${ECHO_T}$ac_ct_DUMPBIN" >&6
14331else
14332 echo "$as_me:$LINENO: result: no" >&5
14333echo "${ECHO_T}no" >&6
14334fi
14335
14336 test -n "$ac_ct_DUMPBIN" && break
14337done
14338test -n "$ac_ct_DUMPBIN" || ac_ct_DUMPBIN=":"
14339
14340 DUMPBIN=$ac_ct_DUMPBIN
14341fi
14342
14343
14344 if test "$DUMPBIN" != ":"; then
14345 NM="$DUMPBIN"
14346 fi
14347fi
14348test -z "$NM" && NM=nm
14349
14350
14351
14352
14353
14354
14355echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
14356echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6
14357if test "${lt_cv_nm_interface+set}" = set; then
14358 echo $ECHO_N "(cached) $ECHO_C" >&6
14359else
14360 lt_cv_nm_interface="BSD nm"
14361 echo "int some_variable = 0;" > conftest.$ac_ext
aca600aa 14362 (eval echo "\"\$as_me:14362: $ac_compile\"" >&5)
da0f6381
PB
14363 (eval "$ac_compile" 2>conftest.err)
14364 cat conftest.err >&5
aca600aa 14365 (eval echo "\"\$as_me:14365: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
da0f6381
PB
14366 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
14367 cat conftest.err >&5
aca600aa 14368 (eval echo "\"\$as_me:14368: output\"" >&5)
da0f6381
PB
14369 cat conftest.out >&5
14370 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
14371 lt_cv_nm_interface="MS dumpbin"
14372 fi
14373 rm -f conftest*
14374fi
14375echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
14376echo "${ECHO_T}$lt_cv_nm_interface" >&6
14377
14378echo "$as_me:$LINENO: checking whether ln -s works" >&5
14379echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
14380LN_S=$as_ln_s
14381if test "$LN_S" = "ln -s"; then
14382 echo "$as_me:$LINENO: result: yes" >&5
14383echo "${ECHO_T}yes" >&6
14384else
14385 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
14386echo "${ECHO_T}no, using $LN_S" >&6
14387fi
14388
14389# find the maximum length of command line arguments
14390echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
14391echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
14392if test "${lt_cv_sys_max_cmd_len+set}" = set; then
14393 echo $ECHO_N "(cached) $ECHO_C" >&6
14394else
14395 i=0
14396 teststring="ABCD"
14397
14398 case $build_os in
14399 msdosdjgpp*)
14400 # On DJGPP, this test can blow up pretty badly due to problems in libc
14401 # (any single argument exceeding 2000 bytes causes a buffer overrun
14402 # during glob expansion). Even if it were fixed, the result of this
14403 # check would be larger than it should be.
14404 lt_cv_sys_max_cmd_len=12288; # 12K is about right
14405 ;;
14406
14407 gnu*)
14408 # Under GNU Hurd, this test is not required because there is
14409 # no limit to the length of command line arguments.
14410 # Libtool will interpret -1 as no limit whatsoever
14411 lt_cv_sys_max_cmd_len=-1;
14412 ;;
14413
5d47bb02 14414 cygwin* | mingw* | cegcc*)
da0f6381
PB
14415 # On Win9x/ME, this test blows up -- it succeeds, but takes
14416 # about 5 minutes as the teststring grows exponentially.
14417 # Worse, since 9x/ME are not pre-emptively multitasking,
14418 # you end up with a "frozen" computer, even though with patience
14419 # the test eventually succeeds (with a max line length of 256k).
14420 # Instead, let's just punt: use the minimum linelength reported by
14421 # all of the supported platforms: 8192 (on NT/2K/XP).
14422 lt_cv_sys_max_cmd_len=8192;
14423 ;;
14424
14425 amigaos*)
14426 # On AmigaOS with pdksh, this test takes hours, literally.
14427 # So we just punt and use a minimum line length of 8192.
14428 lt_cv_sys_max_cmd_len=8192;
14429 ;;
14430
14431 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
14432 # This has been around since 386BSD, at least. Likely further.
14433 if test -x /sbin/sysctl; then
14434 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
14435 elif test -x /usr/sbin/sysctl; then
14436 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
14437 else
14438 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
14439 fi
14440 # And add a safety zone
14441 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
14442 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
14443 ;;
14444
14445 interix*)
14446 # We know the value 262144 and hardcode it with a safety zone (like BSD)
14447 lt_cv_sys_max_cmd_len=196608
14448 ;;
14449
14450 osf*)
14451 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
14452 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
14453 # nice to cause kernel panics so lets avoid the loop below.
14454 # First set a reasonable default.
14455 lt_cv_sys_max_cmd_len=16384
14456 #
14457 if test -x /sbin/sysconfig; then
14458 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
14459 *1*) lt_cv_sys_max_cmd_len=-1 ;;
14460 esac
14461 fi
14462 ;;
14463 sco3.2v5*)
14464 lt_cv_sys_max_cmd_len=102400
14465 ;;
14466 sysv5* | sco5v6* | sysv4.2uw2*)
14467 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
14468 if test -n "$kargmax"; then
14469 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
14470 else
14471 lt_cv_sys_max_cmd_len=32768
14472 fi
14473 ;;
14474 *)
5d47bb02
PG
14475 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
14476 if test -n "$lt_cv_sys_max_cmd_len"; then
da0f6381
PB
14477 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
14478 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
14479 else
14480 # Make teststring a little bigger before we do anything with it.
14481 # a 1K string should be a reasonable start.
14482 for i in 1 2 3 4 5 6 7 8 ; do
14483 teststring=$teststring$teststring
14484 done
14485 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
14486 # If test is not a shell built-in, we'll probably end up computing a
14487 # maximum length that is only half of the actual maximum length, but
14488 # we can't tell.
14489 while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
14490 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
14491 test $i != 17 # 1/2 MB should be enough
14492 do
14493 i=`expr $i + 1`
14494 teststring=$teststring$teststring
14495 done
14496 # Only check the string length outside the loop.
14497 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
14498 teststring=
14499 # Add a significant safety factor because C++ compilers can tack on
14500 # massive amounts of additional arguments before passing them to the
14501 # linker. It appears as though 1/2 is a usable value.
14502 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
14503 fi
14504 ;;
14505 esac
14506
14507fi
14508
14509if test -n $lt_cv_sys_max_cmd_len ; then
14510 echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
14511echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
14512else
14513 echo "$as_me:$LINENO: result: none" >&5
14514echo "${ECHO_T}none" >&6
14515fi
14516max_cmd_len=$lt_cv_sys_max_cmd_len
14517
14518
14519
14520
14521
14522
da0f6381
PB
14523: ${CP="cp -f"}
14524: ${MV="mv -f"}
14525: ${RM="rm -f"}
14526
14527echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
14528echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6
14529# Try some XSI features
14530xsi_shell=no
14531( _lt_dummy="a/b/c"
14532 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
5d47bb02
PG
14533 = c,a/b,, \
14534 && eval 'test $(( 1 + 1 )) -eq 2 \
14535 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
da0f6381
PB
14536 && xsi_shell=yes
14537echo "$as_me:$LINENO: result: $xsi_shell" >&5
14538echo "${ECHO_T}$xsi_shell" >&6
14539
14540
14541echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
14542echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6
14543lt_shell_append=no
14544( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
14545 >/dev/null 2>&1 \
14546 && lt_shell_append=yes
14547echo "$as_me:$LINENO: result: $lt_shell_append" >&5
14548echo "${ECHO_T}$lt_shell_append" >&6
14549
14550
14551if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
14552 lt_unset=unset
14553else
14554 lt_unset=false
14555fi
14556
14557
14558
14559
14560
14561# test EBCDIC or ASCII
14562case `echo X|tr X '\101'` in
14563 A) # ASCII based system
14564 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
14565 lt_SP2NL='tr \040 \012'
14566 lt_NL2SP='tr \015\012 \040\040'
14567 ;;
14568 *) # EBCDIC based system
14569 lt_SP2NL='tr \100 \n'
14570 lt_NL2SP='tr \r\n \100\100'
14571 ;;
14572esac
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
14583echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
14584if test "${lt_cv_ld_reload_flag+set}" = set; then
14585 echo $ECHO_N "(cached) $ECHO_C" >&6
14586else
14587 lt_cv_ld_reload_flag='-r'
14588fi
14589echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
14590echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
14591reload_flag=$lt_cv_ld_reload_flag
14592case $reload_flag in
14593"" | " "*) ;;
14594*) reload_flag=" $reload_flag" ;;
14595esac
14596reload_cmds='$LD$reload_flag -o $output$reload_objs'
14597case $host_os in
14598 darwin*)
14599 if test "$GCC" = yes; then
14600 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
14601 else
14602 reload_cmds='$LD$reload_flag -o $output$reload_objs'
14603 fi
14604 ;;
14605esac
14606
14607
14608
14609
14610
14611
14612
14613
14614
5d47bb02
PG
14615if test -n "$ac_tool_prefix"; then
14616 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
14617set dummy ${ac_tool_prefix}objdump; ac_word=$2
14618echo "$as_me:$LINENO: checking for $ac_word" >&5
14619echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14620if test "${ac_cv_prog_OBJDUMP+set}" = set; then
14621 echo $ECHO_N "(cached) $ECHO_C" >&6
14622else
14623 if test -n "$OBJDUMP"; then
14624 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
14625else
14626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14627for as_dir in $PATH
14628do
14629 IFS=$as_save_IFS
14630 test -z "$as_dir" && as_dir=.
14631 for ac_exec_ext in '' $ac_executable_extensions; do
14632 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14633 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
14634 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14635 break 2
14636 fi
14637done
14638done
14639
14640fi
14641fi
14642OBJDUMP=$ac_cv_prog_OBJDUMP
14643if test -n "$OBJDUMP"; then
14644 echo "$as_me:$LINENO: result: $OBJDUMP" >&5
14645echo "${ECHO_T}$OBJDUMP" >&6
14646else
14647 echo "$as_me:$LINENO: result: no" >&5
14648echo "${ECHO_T}no" >&6
14649fi
14650
14651fi
14652if test -z "$ac_cv_prog_OBJDUMP"; then
14653 ac_ct_OBJDUMP=$OBJDUMP
14654 # Extract the first word of "objdump", so it can be a program name with args.
14655set dummy objdump; ac_word=$2
14656echo "$as_me:$LINENO: checking for $ac_word" >&5
14657echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14658if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
14659 echo $ECHO_N "(cached) $ECHO_C" >&6
14660else
14661 if test -n "$ac_ct_OBJDUMP"; then
14662 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
14663else
14664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14665for as_dir in $PATH
14666do
14667 IFS=$as_save_IFS
14668 test -z "$as_dir" && as_dir=.
14669 for ac_exec_ext in '' $ac_executable_extensions; do
14670 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14671 ac_cv_prog_ac_ct_OBJDUMP="objdump"
14672 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14673 break 2
14674 fi
14675done
14676done
14677
14678 test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false"
14679fi
14680fi
14681ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
14682if test -n "$ac_ct_OBJDUMP"; then
14683 echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
14684echo "${ECHO_T}$ac_ct_OBJDUMP" >&6
14685else
14686 echo "$as_me:$LINENO: result: no" >&5
14687echo "${ECHO_T}no" >&6
14688fi
14689
14690 OBJDUMP=$ac_ct_OBJDUMP
14691else
14692 OBJDUMP="$ac_cv_prog_OBJDUMP"
14693fi
14694
14695test -z "$OBJDUMP" && OBJDUMP=objdump
14696
14697
14698
14699
14700
14701
14702
14703
da0f6381
PB
14704
14705echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
14706echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6
14707if test "${lt_cv_deplibs_check_method+set}" = set; then
14708 echo $ECHO_N "(cached) $ECHO_C" >&6
14709else
14710 lt_cv_file_magic_cmd='$MAGIC_CMD'
14711lt_cv_file_magic_test_file=
14712lt_cv_deplibs_check_method='unknown'
14713# Need to set the preceding variable on all platforms that support
14714# interlibrary dependencies.
14715# 'none' -- dependencies not supported.
14716# `unknown' -- same as none, but documents that we really don't know.
14717# 'pass_all' -- all dependencies passed with no checks.
14718# 'test_compile' -- check by making test program.
14719# 'file_magic [[regex]]' -- check by looking for files in library path
14720# which responds to the $file_magic_cmd with a given extended regex.
14721# If you have `file' or equivalent on your system and you're not sure
14722# whether `pass_all' will *always* work, you probably want this one.
14723
14724case $host_os in
14725aix[4-9]*)
14726 lt_cv_deplibs_check_method=pass_all
14727 ;;
14728
14729beos*)
14730 lt_cv_deplibs_check_method=pass_all
14731 ;;
14732
14733bsdi[45]*)
14734 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
14735 lt_cv_file_magic_cmd='/usr/bin/file -L'
14736 lt_cv_file_magic_test_file=/shlib/libc.so
14737 ;;
14738
14739cygwin*)
14740 # func_win32_libid is a shell function defined in ltmain.sh
14741 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
14742 lt_cv_file_magic_cmd='func_win32_libid'
14743 ;;
14744
14745mingw* | pw32*)
14746 # Base MSYS/MinGW do not provide the 'file' command needed by
14747 # func_win32_libid shell function, so use a weaker test based on 'objdump',
14748 # unless we find 'file', for example because we are cross-compiling.
14749 if ( file / ) >/dev/null 2>&1; then
14750 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
14751 lt_cv_file_magic_cmd='func_win32_libid'
14752 else
14753 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
14754 lt_cv_file_magic_cmd='$OBJDUMP -f'
14755 fi
14756 ;;
14757
5d47bb02
PG
14758cegcc)
14759 # use the weaker test based on 'objdump'. See mingw*.
14760 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
14761 lt_cv_file_magic_cmd='$OBJDUMP -f'
14762 ;;
14763
da0f6381
PB
14764darwin* | rhapsody*)
14765 lt_cv_deplibs_check_method=pass_all
14766 ;;
14767
14768freebsd* | dragonfly*)
14769 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
14770 case $host_cpu in
14771 i*86 )
14772 # Not sure whether the presence of OpenBSD here was a mistake.
14773 # Let's accept both of them until this is cleared up.
14774 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
14775 lt_cv_file_magic_cmd=/usr/bin/file
14776 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
14777 ;;
14778 esac
14779 else
14780 lt_cv_deplibs_check_method=pass_all
14781 fi
14782 ;;
14783
14784gnu*)
14785 lt_cv_deplibs_check_method=pass_all
14786 ;;
14787
14788hpux10.20* | hpux11*)
14789 lt_cv_file_magic_cmd=/usr/bin/file
14790 case $host_cpu in
14791 ia64*)
14792 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
14793 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
14794 ;;
14795 hppa*64*)
14796 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]'
14797 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
14798 ;;
14799 *)
14800 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
14801 lt_cv_file_magic_test_file=/usr/lib/libc.sl
14802 ;;
14803 esac
14804 ;;
14805
14806interix[3-9]*)
14807 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
14808 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
14809 ;;
14810
14811irix5* | irix6* | nonstopux*)
14812 case $LD in
14813 *-32|*"-32 ") libmagic=32-bit;;
14814 *-n32|*"-n32 ") libmagic=N32;;
14815 *-64|*"-64 ") libmagic=64-bit;;
14816 *) libmagic=never-match;;
14817 esac
14818 lt_cv_deplibs_check_method=pass_all
14819 ;;
14820
14821# This must be Linux ELF.
7a9d3fe8 14822linux* | k*bsd*-gnu | kopensolaris*-gnu)
da0f6381
PB
14823 lt_cv_deplibs_check_method=pass_all
14824 ;;
14825
14826netbsd*)
14827 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
14828 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
14829 else
14830 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
14831 fi
14832 ;;
14833
14834newos6*)
14835 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
14836 lt_cv_file_magic_cmd=/usr/bin/file
14837 lt_cv_file_magic_test_file=/usr/lib/libnls.so
14838 ;;
14839
14840*nto* | *qnx*)
14841 lt_cv_deplibs_check_method=pass_all
14842 ;;
14843
14844openbsd*)
14845 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
14846 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
14847 else
14848 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
14849 fi
14850 ;;
14851
14852osf3* | osf4* | osf5*)
14853 lt_cv_deplibs_check_method=pass_all
14854 ;;
14855
14856rdos*)
14857 lt_cv_deplibs_check_method=pass_all
14858 ;;
14859
14860solaris*)
14861 lt_cv_deplibs_check_method=pass_all
14862 ;;
14863
14864sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
14865 lt_cv_deplibs_check_method=pass_all
14866 ;;
14867
14868sysv4 | sysv4.3*)
14869 case $host_vendor in
14870 motorola)
14871 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]'
14872 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
14873 ;;
14874 ncr)
14875 lt_cv_deplibs_check_method=pass_all
14876 ;;
14877 sequent)
14878 lt_cv_file_magic_cmd='/bin/file'
14879 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
14880 ;;
14881 sni)
14882 lt_cv_file_magic_cmd='/bin/file'
14883 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
14884 lt_cv_file_magic_test_file=/lib/libc.so
14885 ;;
14886 siemens)
14887 lt_cv_deplibs_check_method=pass_all
14888 ;;
14889 pc)
14890 lt_cv_deplibs_check_method=pass_all
14891 ;;
14892 esac
14893 ;;
14894
14895tpf*)
14896 lt_cv_deplibs_check_method=pass_all
14897 ;;
14898esac
14899
14900fi
14901echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
14902echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
14903file_magic_cmd=$lt_cv_file_magic_cmd
14904deplibs_check_method=$lt_cv_deplibs_check_method
14905test -z "$deplibs_check_method" && deplibs_check_method=unknown
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918if test -n "$ac_tool_prefix"; then
14919 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
14920set dummy ${ac_tool_prefix}ar; ac_word=$2
14921echo "$as_me:$LINENO: checking for $ac_word" >&5
14922echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14923if test "${ac_cv_prog_AR+set}" = set; then
14924 echo $ECHO_N "(cached) $ECHO_C" >&6
14925else
14926 if test -n "$AR"; then
14927 ac_cv_prog_AR="$AR" # Let the user override the test.
14928else
14929as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14930for as_dir in $PATH
14931do
14932 IFS=$as_save_IFS
14933 test -z "$as_dir" && as_dir=.
14934 for ac_exec_ext in '' $ac_executable_extensions; do
14935 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14936 ac_cv_prog_AR="${ac_tool_prefix}ar"
14937 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14938 break 2
14939 fi
14940done
14941done
14942
14943fi
14944fi
14945AR=$ac_cv_prog_AR
14946if test -n "$AR"; then
14947 echo "$as_me:$LINENO: result: $AR" >&5
14948echo "${ECHO_T}$AR" >&6
14949else
14950 echo "$as_me:$LINENO: result: no" >&5
14951echo "${ECHO_T}no" >&6
14952fi
14953
14954fi
14955if test -z "$ac_cv_prog_AR"; then
14956 ac_ct_AR=$AR
14957 # Extract the first word of "ar", so it can be a program name with args.
14958set dummy ar; ac_word=$2
14959echo "$as_me:$LINENO: checking for $ac_word" >&5
14960echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14961if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
14962 echo $ECHO_N "(cached) $ECHO_C" >&6
14963else
14964 if test -n "$ac_ct_AR"; then
14965 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
14966else
14967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14968for as_dir in $PATH
14969do
14970 IFS=$as_save_IFS
14971 test -z "$as_dir" && as_dir=.
14972 for ac_exec_ext in '' $ac_executable_extensions; do
14973 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14974 ac_cv_prog_ac_ct_AR="ar"
14975 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14976 break 2
14977 fi
14978done
14979done
14980
14981 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
14982fi
14983fi
14984ac_ct_AR=$ac_cv_prog_ac_ct_AR
14985if test -n "$ac_ct_AR"; then
14986 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
14987echo "${ECHO_T}$ac_ct_AR" >&6
14988else
14989 echo "$as_me:$LINENO: result: no" >&5
14990echo "${ECHO_T}no" >&6
14991fi
14992
14993 AR=$ac_ct_AR
14994else
14995 AR="$ac_cv_prog_AR"
14996fi
14997
14998test -z "$AR" && AR=ar
14999test -z "$AR_FLAGS" && AR_FLAGS=cru
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011if test -n "$ac_tool_prefix"; then
15012 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
15013set dummy ${ac_tool_prefix}strip; ac_word=$2
15014echo "$as_me:$LINENO: checking for $ac_word" >&5
15015echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15016if test "${ac_cv_prog_STRIP+set}" = set; then
15017 echo $ECHO_N "(cached) $ECHO_C" >&6
15018else
15019 if test -n "$STRIP"; then
15020 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
15021else
15022as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15023for as_dir in $PATH
15024do
15025 IFS=$as_save_IFS
15026 test -z "$as_dir" && as_dir=.
15027 for ac_exec_ext in '' $ac_executable_extensions; do
15028 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15029 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
15030 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15031 break 2
15032 fi
15033done
15034done
15035
15036fi
15037fi
15038STRIP=$ac_cv_prog_STRIP
15039if test -n "$STRIP"; then
15040 echo "$as_me:$LINENO: result: $STRIP" >&5
15041echo "${ECHO_T}$STRIP" >&6
15042else
15043 echo "$as_me:$LINENO: result: no" >&5
15044echo "${ECHO_T}no" >&6
15045fi
15046
15047fi
15048if test -z "$ac_cv_prog_STRIP"; then
15049 ac_ct_STRIP=$STRIP
15050 # Extract the first word of "strip", so it can be a program name with args.
15051set dummy strip; ac_word=$2
15052echo "$as_me:$LINENO: checking for $ac_word" >&5
15053echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15054if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
15055 echo $ECHO_N "(cached) $ECHO_C" >&6
15056else
15057 if test -n "$ac_ct_STRIP"; then
15058 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
15059else
15060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15061for as_dir in $PATH
15062do
15063 IFS=$as_save_IFS
15064 test -z "$as_dir" && as_dir=.
15065 for ac_exec_ext in '' $ac_executable_extensions; do
15066 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15067 ac_cv_prog_ac_ct_STRIP="strip"
15068 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15069 break 2
15070 fi
15071done
15072done
15073
15074 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
15075fi
15076fi
15077ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
15078if test -n "$ac_ct_STRIP"; then
15079 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
15080echo "${ECHO_T}$ac_ct_STRIP" >&6
15081else
15082 echo "$as_me:$LINENO: result: no" >&5
15083echo "${ECHO_T}no" >&6
15084fi
15085
15086 STRIP=$ac_ct_STRIP
15087else
15088 STRIP="$ac_cv_prog_STRIP"
15089fi
15090
15091test -z "$STRIP" && STRIP=:
15092
15093
15094
15095
15096
15097
15098if test -n "$ac_tool_prefix"; then
15099 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
15100set dummy ${ac_tool_prefix}ranlib; ac_word=$2
15101echo "$as_me:$LINENO: checking for $ac_word" >&5
15102echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15103if test "${ac_cv_prog_RANLIB+set}" = set; then
15104 echo $ECHO_N "(cached) $ECHO_C" >&6
15105else
15106 if test -n "$RANLIB"; then
15107 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
15108else
15109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15110for as_dir in $PATH
15111do
15112 IFS=$as_save_IFS
15113 test -z "$as_dir" && as_dir=.
15114 for ac_exec_ext in '' $ac_executable_extensions; do
15115 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15116 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
15117 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15118 break 2
15119 fi
15120done
15121done
15122
15123fi
15124fi
15125RANLIB=$ac_cv_prog_RANLIB
15126if test -n "$RANLIB"; then
15127 echo "$as_me:$LINENO: result: $RANLIB" >&5
15128echo "${ECHO_T}$RANLIB" >&6
15129else
15130 echo "$as_me:$LINENO: result: no" >&5
15131echo "${ECHO_T}no" >&6
15132fi
15133
15134fi
15135if test -z "$ac_cv_prog_RANLIB"; then
15136 ac_ct_RANLIB=$RANLIB
15137 # Extract the first word of "ranlib", so it can be a program name with args.
15138set dummy ranlib; ac_word=$2
15139echo "$as_me:$LINENO: checking for $ac_word" >&5
15140echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15141if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
15142 echo $ECHO_N "(cached) $ECHO_C" >&6
15143else
15144 if test -n "$ac_ct_RANLIB"; then
15145 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
15146else
15147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15148for as_dir in $PATH
15149do
15150 IFS=$as_save_IFS
15151 test -z "$as_dir" && as_dir=.
15152 for ac_exec_ext in '' $ac_executable_extensions; do
15153 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15154 ac_cv_prog_ac_ct_RANLIB="ranlib"
15155 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15156 break 2
15157 fi
15158done
15159done
15160
15161 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
15162fi
15163fi
15164ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
15165if test -n "$ac_ct_RANLIB"; then
15166 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
15167echo "${ECHO_T}$ac_ct_RANLIB" >&6
15168else
15169 echo "$as_me:$LINENO: result: no" >&5
15170echo "${ECHO_T}no" >&6
15171fi
15172
15173 RANLIB=$ac_ct_RANLIB
15174else
15175 RANLIB="$ac_cv_prog_RANLIB"
15176fi
15177
15178test -z "$RANLIB" && RANLIB=:
15179
15180
15181
15182
15183
15184
15185# Determine commands to create old-style static archives.
5d47bb02 15186old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
da0f6381
PB
15187old_postinstall_cmds='chmod 644 $oldlib'
15188old_postuninstall_cmds=
15189
15190if test -n "$RANLIB"; then
15191 case $host_os in
15192 openbsd*)
15193 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
15194 ;;
15195 *)
15196 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
15197 ;;
15198 esac
15199 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
15200fi
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235# If no C compiler was specified, use CC.
15236LTCC=${LTCC-"$CC"}
15237
15238# If no C compiler flags were specified, use CFLAGS.
15239LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
15240
15241# Allow CC to be a program name with arguments.
15242compiler=$CC
15243
15244
15245# Check for command to grab the raw symbol name followed by C symbol from nm.
15246echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
15247echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
15248if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
15249 echo $ECHO_N "(cached) $ECHO_C" >&6
15250else
15251
15252# These are sane defaults that work on at least a few old systems.
15253# [They come from Ultrix. What could be older than Ultrix?!! ;)]
15254
15255# Character class describing NM global symbol codes.
15256symcode='[BCDEGRST]'
15257
15258# Regexp to match symbols that can be accessed directly from C.
15259sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
15260
15261# Define system-specific variables.
15262case $host_os in
15263aix*)
15264 symcode='[BCDT]'
15265 ;;
5d47bb02 15266cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
15267 symcode='[ABCDGISTW]'
15268 ;;
15269hpux*)
15270 if test "$host_cpu" = ia64; then
15271 symcode='[ABCDEGRST]'
15272 fi
15273 ;;
15274irix* | nonstopux*)
15275 symcode='[BCDEGRST]'
15276 ;;
15277osf*)
15278 symcode='[BCDEGQRST]'
15279 ;;
15280solaris*)
15281 symcode='[BDRT]'
15282 ;;
15283sco3.2v5*)
15284 symcode='[DT]'
15285 ;;
15286sysv4.2uw2*)
15287 symcode='[DT]'
15288 ;;
15289sysv5* | sco5v6* | unixware* | OpenUNIX*)
15290 symcode='[ABDT]'
15291 ;;
15292sysv4)
15293 symcode='[DFNSTU]'
15294 ;;
15295esac
15296
15297# If we're using GNU nm, then use its standard symbol codes.
15298case `$NM -V 2>&1` in
15299*GNU* | *'with BFD'*)
15300 symcode='[ABCDGIRSTW]' ;;
15301esac
15302
15303# Transform an extracted symbol line into a proper C declaration.
15304# Some systems (esp. on ia64) link data and code symbols differently,
15305# so use this general approach.
15306lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
15307
15308# Transform an extracted symbol line into symbol name and symbol address
15309lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
5d47bb02 15310lt_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
15311
15312# Handle CRLF in mingw tool chain
15313opt_cr=
15314case $build_os in
15315mingw*)
15316 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
15317 ;;
15318esac
15319
15320# Try without a prefix underscore, then with it.
15321for ac_symprfx in "" "_"; do
15322
15323 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
15324 symxfrm="\\1 $ac_symprfx\\2 \\2"
15325
15326 # Write the raw and C identifiers.
15327 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
15328 # Fake it for dumpbin and say T for any non-static function
15329 # and D for any global variable.
15330 # Also find C++ and __fastcall symbols from MSVC++,
15331 # which start with @ or ?.
15332 lt_cv_sys_global_symbol_pipe="$AWK '"\
15333" {last_section=section; section=\$ 3};"\
15334" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
15335" \$ 0!~/External *\|/{next};"\
15336" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
15337" {if(hide[section]) next};"\
15338" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
15339" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
15340" s[1]~/^[@?]/{print s[1], s[1]; next};"\
15341" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
15342" ' prfx=^$ac_symprfx"
15343 else
15344 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
15345 fi
15346
15347 # Check to see that the pipe works correctly.
15348 pipe_works=no
15349
15350 rm -f conftest*
15351 cat > conftest.$ac_ext <<_LT_EOF
15352#ifdef __cplusplus
15353extern "C" {
15354#endif
15355char nm_test_var;
15356void nm_test_func(void);
15357void nm_test_func(void){}
15358#ifdef __cplusplus
15359}
15360#endif
15361int main(){nm_test_var='a';nm_test_func();return(0);}
15362_LT_EOF
15363
15364 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15365 (eval $ac_compile) 2>&5
15366 ac_status=$?
15367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15368 (exit $ac_status); }; then
15369 # Now try to grab the symbols.
15370 nlist=conftest.nm
15371 if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
15372 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
15373 ac_status=$?
15374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15375 (exit $ac_status); } && test -s "$nlist"; then
15376 # Try sorting and uniquifying the output.
15377 if sort "$nlist" | uniq > "$nlist"T; then
15378 mv -f "$nlist"T "$nlist"
15379 else
15380 rm -f "$nlist"T
15381 fi
15382
15383 # Make sure that we snagged all the symbols we need.
15384 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
15385 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
15386 cat <<_LT_EOF > conftest.$ac_ext
15387#ifdef __cplusplus
15388extern "C" {
15389#endif
15390
15391_LT_EOF
15392 # Now generate the symbol file.
15393 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
15394
15395 cat <<_LT_EOF >> conftest.$ac_ext
15396
15397/* The mapping between symbol names and symbols. */
15398const struct {
15399 const char *name;
15400 void *address;
15401}
15402lt__PROGRAM__LTX_preloaded_symbols[] =
15403{
15404 { "@PROGRAM@", (void *) 0 },
15405_LT_EOF
15406 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
15407 cat <<\_LT_EOF >> conftest.$ac_ext
15408 {0, (void *) 0}
15409};
15410
15411/* This works around a problem in FreeBSD linker */
15412#ifdef FREEBSD_WORKAROUND
15413static const void *lt_preloaded_setup() {
15414 return lt__PROGRAM__LTX_preloaded_symbols;
15415}
15416#endif
15417
15418#ifdef __cplusplus
15419}
15420#endif
15421_LT_EOF
15422 # Now try linking the two files.
15423 mv conftest.$ac_objext conftstm.$ac_objext
15424 lt_save_LIBS="$LIBS"
15425 lt_save_CFLAGS="$CFLAGS"
15426 LIBS="conftstm.$ac_objext"
15427 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
15428 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15429 (eval $ac_link) 2>&5
15430 ac_status=$?
15431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15432 (exit $ac_status); } && test -s conftest${ac_exeext}; then
15433 pipe_works=yes
15434 fi
15435 LIBS="$lt_save_LIBS"
15436 CFLAGS="$lt_save_CFLAGS"
15437 else
15438 echo "cannot find nm_test_func in $nlist" >&5
15439 fi
15440 else
15441 echo "cannot find nm_test_var in $nlist" >&5
15442 fi
15443 else
15444 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
15445 fi
15446 else
15447 echo "$progname: failed program was:" >&5
15448 cat conftest.$ac_ext >&5
15449 fi
5d47bb02 15450 rm -rf conftest* conftst*
da0f6381
PB
15451
15452 # Do not use the global_symbol_pipe unless it works.
15453 if test "$pipe_works" = yes; then
15454 break
15455 else
15456 lt_cv_sys_global_symbol_pipe=
15457 fi
15458done
15459
15460fi
15461
15462if test -z "$lt_cv_sys_global_symbol_pipe"; then
15463 lt_cv_sys_global_symbol_to_cdecl=
15464fi
15465if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
15466 echo "$as_me:$LINENO: result: failed" >&5
15467echo "${ECHO_T}failed" >&6
15468else
15469 echo "$as_me:$LINENO: result: ok" >&5
15470echo "${ECHO_T}ok" >&6
15471fi
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
5d47bb02
PG
15487
15488
15489
15490
15491
da0f6381
PB
15492
15493
15494# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
15495if test "${enable_libtool_lock+set}" = set; then
15496 enableval="$enable_libtool_lock"
15497
15498fi;
15499test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
15500
15501# Some flags need to be propagated to the compiler or linker for good
15502# libtool support.
15503case $host in
15504ia64-*-hpux*)
15505 # Find out which ABI we are using.
15506 echo 'int i;' > conftest.$ac_ext
15507 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15508 (eval $ac_compile) 2>&5
15509 ac_status=$?
15510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15511 (exit $ac_status); }; then
15512 case `/usr/bin/file conftest.$ac_objext` in
15513 *ELF-32*)
15514 HPUX_IA64_MODE="32"
15515 ;;
15516 *ELF-64*)
15517 HPUX_IA64_MODE="64"
15518 ;;
15519 esac
15520 fi
15521 rm -rf conftest*
15522 ;;
15523*-*-irix6*)
15524 # Find out which ABI we are using.
aca600aa 15525 echo '#line 15525 "configure"' > conftest.$ac_ext
da0f6381
PB
15526 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15527 (eval $ac_compile) 2>&5
15528 ac_status=$?
15529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15530 (exit $ac_status); }; then
15531 if test "$lt_cv_prog_gnu_ld" = yes; then
15532 case `/usr/bin/file conftest.$ac_objext` in
15533 *32-bit*)
15534 LD="${LD-ld} -melf32bsmip"
15535 ;;
15536 *N32*)
15537 LD="${LD-ld} -melf32bmipn32"
15538 ;;
15539 *64-bit*)
15540 LD="${LD-ld} -melf64bmip"
15541 ;;
15542 esac
15543 else
15544 case `/usr/bin/file conftest.$ac_objext` in
15545 *32-bit*)
15546 LD="${LD-ld} -32"
15547 ;;
15548 *N32*)
15549 LD="${LD-ld} -n32"
15550 ;;
15551 *64-bit*)
15552 LD="${LD-ld} -64"
15553 ;;
15554 esac
15555 fi
15556 fi
15557 rm -rf conftest*
15558 ;;
15559
15560x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
15561s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
15562 # Find out which ABI we are using.
15563 echo 'int i;' > conftest.$ac_ext
15564 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15565 (eval $ac_compile) 2>&5
15566 ac_status=$?
15567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15568 (exit $ac_status); }; then
15569 case `/usr/bin/file conftest.o` in
15570 *32-bit*)
15571 case $host in
15572 x86_64-*kfreebsd*-gnu)
15573 LD="${LD-ld} -m elf_i386_fbsd"
15574 ;;
15575 x86_64-*linux*)
15576 LD="${LD-ld} -m elf_i386"
15577 ;;
15578 ppc64-*linux*|powerpc64-*linux*)
15579 LD="${LD-ld} -m elf32ppclinux"
15580 ;;
15581 s390x-*linux*)
15582 LD="${LD-ld} -m elf_s390"
15583 ;;
15584 sparc64-*linux*)
15585 LD="${LD-ld} -m elf32_sparc"
15586 ;;
15587 esac
15588 ;;
15589 *64-bit*)
15590 case $host in
15591 x86_64-*kfreebsd*-gnu)
15592 LD="${LD-ld} -m elf_x86_64_fbsd"
15593 ;;
15594 x86_64-*linux*)
15595 LD="${LD-ld} -m elf_x86_64"
15596 ;;
15597 ppc*-*linux*|powerpc*-*linux*)
15598 LD="${LD-ld} -m elf64ppc"
15599 ;;
15600 s390*-*linux*|s390*-*tpf*)
15601 LD="${LD-ld} -m elf64_s390"
15602 ;;
15603 sparc*-*linux*)
15604 LD="${LD-ld} -m elf64_sparc"
15605 ;;
15606 esac
15607 ;;
15608 esac
15609 fi
15610 rm -rf conftest*
15611 ;;
15612
15613*-*-sco3.2v5*)
15614 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
15615 SAVE_CFLAGS="$CFLAGS"
15616 CFLAGS="$CFLAGS -belf"
15617 echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
15618echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
15619if test "${lt_cv_cc_needs_belf+set}" = set; then
15620 echo $ECHO_N "(cached) $ECHO_C" >&6
15621else
15622 ac_ext=c
15623ac_cpp='$CPP $CPPFLAGS'
15624ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15625ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15626ac_compiler_gnu=$ac_cv_c_compiler_gnu
15627
15628 cat >conftest.$ac_ext <<_ACEOF
15629/* confdefs.h. */
15630_ACEOF
15631cat confdefs.h >>conftest.$ac_ext
15632cat >>conftest.$ac_ext <<_ACEOF
15633/* end confdefs.h. */
15634
15635int
15636main ()
15637{
15638
15639 ;
15640 return 0;
15641}
15642_ACEOF
15643rm -f conftest.$ac_objext conftest$ac_exeext
15644if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15645 (eval $ac_link) 2>conftest.er1
15646 ac_status=$?
15647 grep -v '^ *+' conftest.er1 >conftest.err
15648 rm -f conftest.er1
15649 cat conftest.err >&5
15650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15651 (exit $ac_status); } &&
15652 { ac_try='test -z "$ac_c_werror_flag"
15653 || test ! -s conftest.err'
15654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15655 (eval $ac_try) 2>&5
15656 ac_status=$?
15657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15658 (exit $ac_status); }; } &&
15659 { ac_try='test -s conftest$ac_exeext'
15660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15661 (eval $ac_try) 2>&5
15662 ac_status=$?
15663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15664 (exit $ac_status); }; }; then
15665 lt_cv_cc_needs_belf=yes
15666else
15667 echo "$as_me: failed program was:" >&5
15668sed 's/^/| /' conftest.$ac_ext >&5
15669
15670lt_cv_cc_needs_belf=no
15671fi
15672rm -f conftest.err conftest.$ac_objext \
15673 conftest$ac_exeext conftest.$ac_ext
15674 ac_ext=c
15675ac_cpp='$CPP $CPPFLAGS'
15676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15678ac_compiler_gnu=$ac_cv_c_compiler_gnu
15679
15680fi
15681echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
15682echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
15683 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
15684 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
15685 CFLAGS="$SAVE_CFLAGS"
15686 fi
15687 ;;
15688sparc*-*solaris*)
15689 # Find out which ABI we are using.
15690 echo 'int i;' > conftest.$ac_ext
15691 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15692 (eval $ac_compile) 2>&5
15693 ac_status=$?
15694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15695 (exit $ac_status); }; then
15696 case `/usr/bin/file conftest.o` in
15697 *64-bit*)
15698 case $lt_cv_prog_gnu_ld in
15699 yes*) LD="${LD-ld} -m elf64_sparc" ;;
5d47bb02
PG
15700 *)
15701 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
15702 LD="${LD-ld} -64"
15703 fi
15704 ;;
da0f6381
PB
15705 esac
15706 ;;
15707 esac
15708 fi
15709 rm -rf conftest*
15710 ;;
15711esac
15712
5d47bb02
PG
15713need_locks="$enable_libtool_lock"
15714
15715
15716 case $host_os in
15717 rhapsody* | darwin*)
15718 if test -n "$ac_tool_prefix"; then
15719 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
15720set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
15721echo "$as_me:$LINENO: checking for $ac_word" >&5
15722echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15723if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
15724 echo $ECHO_N "(cached) $ECHO_C" >&6
15725else
15726 if test -n "$DSYMUTIL"; then
15727 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
15728else
15729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15730for as_dir in $PATH
15731do
15732 IFS=$as_save_IFS
15733 test -z "$as_dir" && as_dir=.
15734 for ac_exec_ext in '' $ac_executable_extensions; do
15735 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15736 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
15737 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15738 break 2
15739 fi
15740done
15741done
15742
15743fi
15744fi
15745DSYMUTIL=$ac_cv_prog_DSYMUTIL
15746if test -n "$DSYMUTIL"; then
15747 echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
15748echo "${ECHO_T}$DSYMUTIL" >&6
15749else
15750 echo "$as_me:$LINENO: result: no" >&5
15751echo "${ECHO_T}no" >&6
15752fi
15753
15754fi
15755if test -z "$ac_cv_prog_DSYMUTIL"; then
15756 ac_ct_DSYMUTIL=$DSYMUTIL
15757 # Extract the first word of "dsymutil", so it can be a program name with args.
15758set dummy dsymutil; ac_word=$2
15759echo "$as_me:$LINENO: checking for $ac_word" >&5
15760echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15761if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
15762 echo $ECHO_N "(cached) $ECHO_C" >&6
15763else
15764 if test -n "$ac_ct_DSYMUTIL"; then
15765 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
15766else
15767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15768for as_dir in $PATH
15769do
15770 IFS=$as_save_IFS
15771 test -z "$as_dir" && as_dir=.
15772 for ac_exec_ext in '' $ac_executable_extensions; do
15773 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15774 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
15775 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15776 break 2
15777 fi
15778done
15779done
15780
15781 test -z "$ac_cv_prog_ac_ct_DSYMUTIL" && ac_cv_prog_ac_ct_DSYMUTIL=":"
15782fi
15783fi
15784ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
15785if test -n "$ac_ct_DSYMUTIL"; then
15786 echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
15787echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6
15788else
15789 echo "$as_me:$LINENO: result: no" >&5
15790echo "${ECHO_T}no" >&6
15791fi
15792
15793 DSYMUTIL=$ac_ct_DSYMUTIL
15794else
15795 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
15796fi
15797
15798 if test -n "$ac_tool_prefix"; then
15799 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
15800set dummy ${ac_tool_prefix}nmedit; ac_word=$2
15801echo "$as_me:$LINENO: checking for $ac_word" >&5
15802echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15803if test "${ac_cv_prog_NMEDIT+set}" = set; then
15804 echo $ECHO_N "(cached) $ECHO_C" >&6
15805else
15806 if test -n "$NMEDIT"; then
15807 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
15808else
15809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15810for as_dir in $PATH
15811do
15812 IFS=$as_save_IFS
15813 test -z "$as_dir" && as_dir=.
15814 for ac_exec_ext in '' $ac_executable_extensions; do
15815 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15816 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
15817 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15818 break 2
15819 fi
15820done
15821done
15822
15823fi
15824fi
15825NMEDIT=$ac_cv_prog_NMEDIT
15826if test -n "$NMEDIT"; then
15827 echo "$as_me:$LINENO: result: $NMEDIT" >&5
15828echo "${ECHO_T}$NMEDIT" >&6
15829else
15830 echo "$as_me:$LINENO: result: no" >&5
15831echo "${ECHO_T}no" >&6
15832fi
15833
15834fi
15835if test -z "$ac_cv_prog_NMEDIT"; then
15836 ac_ct_NMEDIT=$NMEDIT
15837 # Extract the first word of "nmedit", so it can be a program name with args.
15838set dummy nmedit; ac_word=$2
15839echo "$as_me:$LINENO: checking for $ac_word" >&5
15840echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15841if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
15842 echo $ECHO_N "(cached) $ECHO_C" >&6
15843else
15844 if test -n "$ac_ct_NMEDIT"; then
15845 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
15846else
15847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15848for as_dir in $PATH
15849do
15850 IFS=$as_save_IFS
15851 test -z "$as_dir" && as_dir=.
15852 for ac_exec_ext in '' $ac_executable_extensions; do
15853 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15854 ac_cv_prog_ac_ct_NMEDIT="nmedit"
15855 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15856 break 2
15857 fi
15858done
15859done
15860
15861 test -z "$ac_cv_prog_ac_ct_NMEDIT" && ac_cv_prog_ac_ct_NMEDIT=":"
15862fi
15863fi
15864ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
15865if test -n "$ac_ct_NMEDIT"; then
15866 echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
15867echo "${ECHO_T}$ac_ct_NMEDIT" >&6
15868else
15869 echo "$as_me:$LINENO: result: no" >&5
15870echo "${ECHO_T}no" >&6
15871fi
15872
15873 NMEDIT=$ac_ct_NMEDIT
15874else
15875 NMEDIT="$ac_cv_prog_NMEDIT"
15876fi
15877
15878 if test -n "$ac_tool_prefix"; then
15879 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
15880set dummy ${ac_tool_prefix}lipo; ac_word=$2
15881echo "$as_me:$LINENO: checking for $ac_word" >&5
15882echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15883if test "${ac_cv_prog_LIPO+set}" = set; then
15884 echo $ECHO_N "(cached) $ECHO_C" >&6
15885else
15886 if test -n "$LIPO"; then
15887 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
15888else
15889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15890for as_dir in $PATH
15891do
15892 IFS=$as_save_IFS
15893 test -z "$as_dir" && as_dir=.
15894 for ac_exec_ext in '' $ac_executable_extensions; do
15895 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15896 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
15897 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15898 break 2
15899 fi
15900done
15901done
15902
15903fi
15904fi
15905LIPO=$ac_cv_prog_LIPO
15906if test -n "$LIPO"; then
15907 echo "$as_me:$LINENO: result: $LIPO" >&5
15908echo "${ECHO_T}$LIPO" >&6
15909else
15910 echo "$as_me:$LINENO: result: no" >&5
15911echo "${ECHO_T}no" >&6
15912fi
15913
15914fi
15915if test -z "$ac_cv_prog_LIPO"; then
15916 ac_ct_LIPO=$LIPO
15917 # Extract the first word of "lipo", so it can be a program name with args.
15918set dummy lipo; ac_word=$2
15919echo "$as_me:$LINENO: checking for $ac_word" >&5
15920echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15921if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then
15922 echo $ECHO_N "(cached) $ECHO_C" >&6
15923else
15924 if test -n "$ac_ct_LIPO"; then
15925 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
15926else
15927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15928for as_dir in $PATH
15929do
15930 IFS=$as_save_IFS
15931 test -z "$as_dir" && as_dir=.
15932 for ac_exec_ext in '' $ac_executable_extensions; do
15933 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15934 ac_cv_prog_ac_ct_LIPO="lipo"
15935 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15936 break 2
15937 fi
15938done
15939done
15940
15941 test -z "$ac_cv_prog_ac_ct_LIPO" && ac_cv_prog_ac_ct_LIPO=":"
15942fi
15943fi
15944ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
15945if test -n "$ac_ct_LIPO"; then
15946 echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5
15947echo "${ECHO_T}$ac_ct_LIPO" >&6
15948else
15949 echo "$as_me:$LINENO: result: no" >&5
15950echo "${ECHO_T}no" >&6
15951fi
15952
15953 LIPO=$ac_ct_LIPO
15954else
15955 LIPO="$ac_cv_prog_LIPO"
15956fi
15957
15958 if test -n "$ac_tool_prefix"; then
15959 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
15960set dummy ${ac_tool_prefix}otool; ac_word=$2
15961echo "$as_me:$LINENO: checking for $ac_word" >&5
15962echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15963if test "${ac_cv_prog_OTOOL+set}" = set; then
15964 echo $ECHO_N "(cached) $ECHO_C" >&6
15965else
15966 if test -n "$OTOOL"; then
15967 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
15968else
15969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15970for as_dir in $PATH
15971do
15972 IFS=$as_save_IFS
15973 test -z "$as_dir" && as_dir=.
15974 for ac_exec_ext in '' $ac_executable_extensions; do
15975 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15976 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
15977 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15978 break 2
15979 fi
15980done
15981done
15982
15983fi
15984fi
15985OTOOL=$ac_cv_prog_OTOOL
15986if test -n "$OTOOL"; then
15987 echo "$as_me:$LINENO: result: $OTOOL" >&5
15988echo "${ECHO_T}$OTOOL" >&6
15989else
15990 echo "$as_me:$LINENO: result: no" >&5
15991echo "${ECHO_T}no" >&6
15992fi
15993
15994fi
15995if test -z "$ac_cv_prog_OTOOL"; then
15996 ac_ct_OTOOL=$OTOOL
15997 # Extract the first word of "otool", so it can be a program name with args.
15998set dummy otool; ac_word=$2
15999echo "$as_me:$LINENO: checking for $ac_word" >&5
16000echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16001if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then
16002 echo $ECHO_N "(cached) $ECHO_C" >&6
16003else
16004 if test -n "$ac_ct_OTOOL"; then
16005 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
16006else
16007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16008for as_dir in $PATH
16009do
16010 IFS=$as_save_IFS
16011 test -z "$as_dir" && as_dir=.
16012 for ac_exec_ext in '' $ac_executable_extensions; do
16013 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16014 ac_cv_prog_ac_ct_OTOOL="otool"
16015 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16016 break 2
16017 fi
16018done
16019done
16020
16021 test -z "$ac_cv_prog_ac_ct_OTOOL" && ac_cv_prog_ac_ct_OTOOL=":"
16022fi
16023fi
16024ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
16025if test -n "$ac_ct_OTOOL"; then
16026 echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5
16027echo "${ECHO_T}$ac_ct_OTOOL" >&6
16028else
16029 echo "$as_me:$LINENO: result: no" >&5
16030echo "${ECHO_T}no" >&6
16031fi
16032
16033 OTOOL=$ac_ct_OTOOL
16034else
16035 OTOOL="$ac_cv_prog_OTOOL"
16036fi
16037
16038 if test -n "$ac_tool_prefix"; then
16039 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
16040set dummy ${ac_tool_prefix}otool64; ac_word=$2
16041echo "$as_me:$LINENO: checking for $ac_word" >&5
16042echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16043if test "${ac_cv_prog_OTOOL64+set}" = set; then
16044 echo $ECHO_N "(cached) $ECHO_C" >&6
16045else
16046 if test -n "$OTOOL64"; then
16047 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
16048else
16049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16050for as_dir in $PATH
16051do
16052 IFS=$as_save_IFS
16053 test -z "$as_dir" && as_dir=.
16054 for ac_exec_ext in '' $ac_executable_extensions; do
16055 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16056 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
16057 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16058 break 2
16059 fi
16060done
16061done
16062
16063fi
16064fi
16065OTOOL64=$ac_cv_prog_OTOOL64
16066if test -n "$OTOOL64"; then
16067 echo "$as_me:$LINENO: result: $OTOOL64" >&5
16068echo "${ECHO_T}$OTOOL64" >&6
16069else
16070 echo "$as_me:$LINENO: result: no" >&5
16071echo "${ECHO_T}no" >&6
16072fi
16073
16074fi
16075if test -z "$ac_cv_prog_OTOOL64"; then
16076 ac_ct_OTOOL64=$OTOOL64
16077 # Extract the first word of "otool64", so it can be a program name with args.
16078set dummy otool64; ac_word=$2
16079echo "$as_me:$LINENO: checking for $ac_word" >&5
16080echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16081if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then
16082 echo $ECHO_N "(cached) $ECHO_C" >&6
16083else
16084 if test -n "$ac_ct_OTOOL64"; then
16085 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
16086else
16087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16088for as_dir in $PATH
16089do
16090 IFS=$as_save_IFS
16091 test -z "$as_dir" && as_dir=.
16092 for ac_exec_ext in '' $ac_executable_extensions; do
16093 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16094 ac_cv_prog_ac_ct_OTOOL64="otool64"
16095 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16096 break 2
16097 fi
16098done
16099done
16100
16101 test -z "$ac_cv_prog_ac_ct_OTOOL64" && ac_cv_prog_ac_ct_OTOOL64=":"
16102fi
16103fi
16104ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
16105if test -n "$ac_ct_OTOOL64"; then
16106 echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5
16107echo "${ECHO_T}$ac_ct_OTOOL64" >&6
16108else
16109 echo "$as_me:$LINENO: result: no" >&5
16110echo "${ECHO_T}no" >&6
16111fi
16112
16113 OTOOL64=$ac_ct_OTOOL64
16114else
16115 OTOOL64="$ac_cv_prog_OTOOL64"
16116fi
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144 echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
16145echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6
16146if test "${lt_cv_apple_cc_single_mod+set}" = set; then
16147 echo $ECHO_N "(cached) $ECHO_C" >&6
16148else
16149 lt_cv_apple_cc_single_mod=no
16150 if test -z "${LT_MULTI_MODULE}"; then
16151 # By default we will add the -single_module flag. You can override
16152 # by either setting the environment variable LT_MULTI_MODULE
16153 # non-empty at configure time, or by adding -multi_module to the
16154 # link flags.
16155 rm -rf libconftest.dylib*
16156 echo "int foo(void){return 1;}" > conftest.c
16157 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
16158-dynamiclib -Wl,-single_module conftest.c" >&5
16159 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
16160 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
16161 _lt_result=$?
16162 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
16163 lt_cv_apple_cc_single_mod=yes
16164 else
16165 cat conftest.err >&5
16166 fi
16167 rm -rf libconftest.dylib*
16168 rm -f conftest.*
16169 fi
16170fi
16171echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
16172echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6
16173 echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
16174echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6
16175if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
16176 echo $ECHO_N "(cached) $ECHO_C" >&6
16177else
16178 lt_cv_ld_exported_symbols_list=no
16179 save_LDFLAGS=$LDFLAGS
16180 echo "_main" > conftest.sym
16181 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
16182 cat >conftest.$ac_ext <<_ACEOF
16183/* confdefs.h. */
16184_ACEOF
16185cat confdefs.h >>conftest.$ac_ext
16186cat >>conftest.$ac_ext <<_ACEOF
16187/* end confdefs.h. */
16188
16189int
16190main ()
16191{
16192
16193 ;
16194 return 0;
16195}
16196_ACEOF
16197rm -f conftest.$ac_objext conftest$ac_exeext
16198if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16199 (eval $ac_link) 2>conftest.er1
16200 ac_status=$?
16201 grep -v '^ *+' conftest.er1 >conftest.err
16202 rm -f conftest.er1
16203 cat conftest.err >&5
16204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16205 (exit $ac_status); } &&
16206 { ac_try='test -z "$ac_c_werror_flag"
16207 || test ! -s conftest.err'
16208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16209 (eval $ac_try) 2>&5
16210 ac_status=$?
16211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16212 (exit $ac_status); }; } &&
16213 { ac_try='test -s conftest$ac_exeext'
16214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16215 (eval $ac_try) 2>&5
16216 ac_status=$?
16217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16218 (exit $ac_status); }; }; then
16219 lt_cv_ld_exported_symbols_list=yes
16220else
16221 echo "$as_me: failed program was:" >&5
16222sed 's/^/| /' conftest.$ac_ext >&5
16223
16224lt_cv_ld_exported_symbols_list=no
16225fi
16226rm -f conftest.err conftest.$ac_objext \
16227 conftest$ac_exeext conftest.$ac_ext
16228 LDFLAGS="$save_LDFLAGS"
16229
16230fi
16231echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
16232echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6
16233 case $host_os in
16234 rhapsody* | darwin1.[012])
16235 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
16236 darwin1.*)
16237 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
16238 darwin*) # darwin 5.x on
16239 # if running on 10.5 or later, the deployment target defaults
16240 # to the OS version, if on x86, and 10.4, the deployment
16241 # target defaults to 10.4. Don't you love it?
16242 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
16243 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
16244 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
16245 10.[012]*)
16246 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
16247 10.*)
16248 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
16249 esac
16250 ;;
16251 esac
16252 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
16253 _lt_dar_single_mod='$single_module'
16254 fi
16255 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
16256 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
16257 else
16258 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
16259 fi
16260 if test "$DSYMUTIL" != ":"; then
16261 _lt_dsymutil='~$DSYMUTIL $lib || :'
16262 else
16263 _lt_dsymutil=
16264 fi
16265 ;;
16266 esac
da0f6381
PB
16267
16268
16269for ac_header in dlfcn.h
16270do
16271as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16272echo "$as_me:$LINENO: checking for $ac_header" >&5
16273echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16274if eval "test \"\${$as_ac_Header+set}\" = set"; then
16275 echo $ECHO_N "(cached) $ECHO_C" >&6
16276else
16277 cat >conftest.$ac_ext <<_ACEOF
16278/* confdefs.h. */
16279_ACEOF
16280cat confdefs.h >>conftest.$ac_ext
16281cat >>conftest.$ac_ext <<_ACEOF
16282/* end confdefs.h. */
16283#include <$ac_header>
16284_ACEOF
16285if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16286 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16287 ac_status=$?
16288 grep -v '^ *+' conftest.er1 >conftest.err
16289 rm -f conftest.er1
16290 cat conftest.err >&5
16291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16292 (exit $ac_status); } >/dev/null; then
16293 if test -s conftest.err; then
16294 ac_cpp_err=$ac_c_preproc_warn_flag
16295 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16296 else
16297 ac_cpp_err=
16298 fi
16299else
16300 ac_cpp_err=yes
16301fi
16302if test -z "$ac_cpp_err"; then
16303 eval "$as_ac_Header=yes"
16304else
16305 echo "$as_me: failed program was:" >&5
16306sed 's/^/| /' conftest.$ac_ext >&5
16307
16308 eval "$as_ac_Header=no"
16309fi
16310rm -f conftest.err conftest.$ac_ext
16311fi
16312echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16313echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16314if test `eval echo '${'$as_ac_Header'}'` = yes; then
16315 cat >>confdefs.h <<_ACEOF
16316#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16317_ACEOF
16318
16319fi
16320done
16321
16322
16323
5d47bb02
PG
16324# Set options
16325
16326
16327
16328 enable_dlopen=no
16329
16330
16331 enable_win32_dll=no
16332
16333
16334 # Check whether --enable-shared or --disable-shared was given.
16335if test "${enable_shared+set}" = set; then
16336 enableval="$enable_shared"
16337 p=${PACKAGE-default}
16338 case $enableval in
16339 yes) enable_shared=yes ;;
16340 no) enable_shared=no ;;
16341 *)
16342 enable_shared=no
16343 # Look at the argument we got. We use all the common list separators.
16344 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
16345 for pkg in $enableval; do
16346 IFS="$lt_save_ifs"
16347 if test "X$pkg" = "X$p"; then
16348 enable_shared=yes
16349 fi
16350 done
16351 IFS="$lt_save_ifs"
16352 ;;
16353 esac
16354else
16355 enable_shared=yes
16356fi;
16357
16358
16359
16360
16361
16362
16363
16364
16365 # Check whether --enable-static or --disable-static was given.
16366if test "${enable_static+set}" = set; then
16367 enableval="$enable_static"
16368 p=${PACKAGE-default}
16369 case $enableval in
16370 yes) enable_static=yes ;;
16371 no) enable_static=no ;;
16372 *)
16373 enable_static=no
16374 # Look at the argument we got. We use all the common list separators.
16375 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
16376 for pkg in $enableval; do
16377 IFS="$lt_save_ifs"
16378 if test "X$pkg" = "X$p"; then
16379 enable_static=yes
16380 fi
16381 done
16382 IFS="$lt_save_ifs"
16383 ;;
16384 esac
16385else
16386 enable_static=yes
16387fi;
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397# Check whether --with-pic or --without-pic was given.
16398if test "${with_pic+set}" = set; then
16399 withval="$with_pic"
16400 pic_mode="$withval"
16401else
16402 pic_mode=default
16403fi;
16404
16405test -z "$pic_mode" && pic_mode=default
16406
16407
16408
16409
16410
16411
16412
16413 # Check whether --enable-fast-install or --disable-fast-install was given.
16414if test "${enable_fast_install+set}" = set; then
16415 enableval="$enable_fast_install"
16416 p=${PACKAGE-default}
16417 case $enableval in
16418 yes) enable_fast_install=yes ;;
16419 no) enable_fast_install=no ;;
16420 *)
16421 enable_fast_install=no
16422 # Look at the argument we got. We use all the common list separators.
16423 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
16424 for pkg in $enableval; do
16425 IFS="$lt_save_ifs"
16426 if test "X$pkg" = "X$p"; then
16427 enable_fast_install=yes
16428 fi
16429 done
16430 IFS="$lt_save_ifs"
16431 ;;
16432 esac
16433else
16434 enable_fast_install=yes
16435fi;
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
da0f6381
PB
16446# This can be used to rebuild libtool when needed
16447LIBTOOL_DEPS="$ltmain"
16448
16449# Always use our own libtool.
16450LIBTOOL='$(SHELL) $(top_builddir)/libtool'
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476test -z "$LN_S" && LN_S="ln -s"
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491if test -n "${ZSH_VERSION+set}" ; then
16492 setopt NO_GLOB_SUBST
16493fi
16494
16495echo "$as_me:$LINENO: checking for objdir" >&5
16496echo $ECHO_N "checking for objdir... $ECHO_C" >&6
16497if test "${lt_cv_objdir+set}" = set; then
16498 echo $ECHO_N "(cached) $ECHO_C" >&6
16499else
16500 rm -f .libs 2>/dev/null
16501mkdir .libs 2>/dev/null
16502if test -d .libs; then
16503 lt_cv_objdir=.libs
16504else
16505 # MS-DOS does not allow filenames that begin with a dot.
16506 lt_cv_objdir=_libs
16507fi
16508rmdir .libs 2>/dev/null
16509fi
16510echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
16511echo "${ECHO_T}$lt_cv_objdir" >&6
16512objdir=$lt_cv_objdir
16513
16514
16515
16516
16517
16518cat >>confdefs.h <<_ACEOF
16519#define LT_OBJDIR "$lt_cv_objdir/"
16520_ACEOF
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538case $host_os in
16539aix3*)
16540 # AIX sometimes has problems with the GCC collect2 program. For some
16541 # reason, if we set the COLLECT_NAMES environment variable, the problems
16542 # vanish in a puff of smoke.
16543 if test "X${COLLECT_NAMES+set}" != Xset; then
16544 COLLECT_NAMES=
16545 export COLLECT_NAMES
16546 fi
16547 ;;
16548esac
16549
16550# Sed substitution that helps us do robust quoting. It backslashifies
16551# metacharacters that are still active within double-quoted strings.
16552sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
16553
16554# Same as above, but do not quote variable references.
16555double_quote_subst='s/\(["`\\]\)/\\\1/g'
16556
16557# Sed substitution to delay expansion of an escaped shell variable in a
16558# double_quote_subst'ed string.
16559delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
16560
16561# Sed substitution to delay expansion of an escaped single quote.
16562delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
16563
16564# Sed substitution to avoid accidental globbing in evaled expressions
16565no_glob_subst='s/\*/\\\*/g'
16566
16567# Global variables:
16568ofile=libtool
16569can_build_shared=yes
16570
16571# All known linkers require a `.a' archive for static linking (except MSVC,
16572# which needs '.lib').
16573libext=a
16574
16575with_gnu_ld="$lt_cv_prog_gnu_ld"
16576
16577old_CC="$CC"
16578old_CFLAGS="$CFLAGS"
16579
16580# Set sane defaults for various variables
16581test -z "$CC" && CC=cc
16582test -z "$LTCC" && LTCC=$CC
16583test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
16584test -z "$LD" && LD=ld
16585test -z "$ac_objext" && ac_objext=o
16586
16587for cc_temp in $compiler""; do
16588 case $cc_temp in
16589 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
16590 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
16591 \-*) ;;
16592 *) break;;
16593 esac
16594done
16595cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
16596
16597
16598# Only perform the check for file, if the check method requires it
16599test -z "$MAGIC_CMD" && MAGIC_CMD=file
16600case $deplibs_check_method in
16601file_magic*)
16602 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
16603 echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
16604echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
16605if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
16606 echo $ECHO_N "(cached) $ECHO_C" >&6
16607else
16608 case $MAGIC_CMD in
16609[\\/*] | ?:[\\/]*)
16610 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
16611 ;;
16612*)
16613 lt_save_MAGIC_CMD="$MAGIC_CMD"
16614 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16615 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
16616 for ac_dir in $ac_dummy; do
16617 IFS="$lt_save_ifs"
16618 test -z "$ac_dir" && ac_dir=.
16619 if test -f $ac_dir/${ac_tool_prefix}file; then
16620 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
16621 if test -n "$file_magic_test_file"; then
16622 case $deplibs_check_method in
16623 "file_magic "*)
16624 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
16625 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16626 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
16627 $EGREP "$file_magic_regex" > /dev/null; then
16628 :
16629 else
16630 cat <<_LT_EOF 1>&2
16631
16632*** Warning: the command libtool uses to detect shared libraries,
16633*** $file_magic_cmd, produces output that libtool cannot recognize.
16634*** The result is that libtool may fail to recognize shared libraries
16635*** as such. This will affect the creation of libtool libraries that
16636*** depend on shared libraries, but programs linked with such libtool
16637*** libraries will work regardless of this problem. Nevertheless, you
16638*** may want to report the problem to your system manager and/or to
16639*** bug-libtool@gnu.org
16640
16641_LT_EOF
16642 fi ;;
16643 esac
16644 fi
16645 break
16646 fi
16647 done
16648 IFS="$lt_save_ifs"
16649 MAGIC_CMD="$lt_save_MAGIC_CMD"
16650 ;;
16651esac
16652fi
16653
16654MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16655if test -n "$MAGIC_CMD"; then
16656 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
16657echo "${ECHO_T}$MAGIC_CMD" >&6
16658else
16659 echo "$as_me:$LINENO: result: no" >&5
16660echo "${ECHO_T}no" >&6
16661fi
16662
16663
16664
16665
16666
16667if test -z "$lt_cv_path_MAGIC_CMD"; then
16668 if test -n "$ac_tool_prefix"; then
16669 echo "$as_me:$LINENO: checking for file" >&5
16670echo $ECHO_N "checking for file... $ECHO_C" >&6
16671if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
16672 echo $ECHO_N "(cached) $ECHO_C" >&6
16673else
16674 case $MAGIC_CMD in
16675[\\/*] | ?:[\\/]*)
16676 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
16677 ;;
16678*)
16679 lt_save_MAGIC_CMD="$MAGIC_CMD"
16680 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16681 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
16682 for ac_dir in $ac_dummy; do
16683 IFS="$lt_save_ifs"
16684 test -z "$ac_dir" && ac_dir=.
16685 if test -f $ac_dir/file; then
16686 lt_cv_path_MAGIC_CMD="$ac_dir/file"
16687 if test -n "$file_magic_test_file"; then
16688 case $deplibs_check_method in
16689 "file_magic "*)
16690 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
16691 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16692 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
16693 $EGREP "$file_magic_regex" > /dev/null; then
16694 :
16695 else
16696 cat <<_LT_EOF 1>&2
16697
16698*** Warning: the command libtool uses to detect shared libraries,
16699*** $file_magic_cmd, produces output that libtool cannot recognize.
16700*** The result is that libtool may fail to recognize shared libraries
16701*** as such. This will affect the creation of libtool libraries that
16702*** depend on shared libraries, but programs linked with such libtool
16703*** libraries will work regardless of this problem. Nevertheless, you
16704*** may want to report the problem to your system manager and/or to
16705*** bug-libtool@gnu.org
16706
16707_LT_EOF
16708 fi ;;
16709 esac
16710 fi
16711 break
16712 fi
16713 done
16714 IFS="$lt_save_ifs"
16715 MAGIC_CMD="$lt_save_MAGIC_CMD"
16716 ;;
16717esac
16718fi
16719
16720MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
16721if test -n "$MAGIC_CMD"; then
16722 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
16723echo "${ECHO_T}$MAGIC_CMD" >&6
16724else
16725 echo "$as_me:$LINENO: result: no" >&5
16726echo "${ECHO_T}no" >&6
16727fi
16728
16729
16730 else
16731 MAGIC_CMD=:
16732 fi
16733fi
16734
16735 fi
16736 ;;
16737esac
16738
16739# Use C for the default configuration in the libtool script
16740
16741lt_save_CC="$CC"
16742ac_ext=c
16743ac_cpp='$CPP $CPPFLAGS'
16744ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16745ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16746ac_compiler_gnu=$ac_cv_c_compiler_gnu
16747
16748
16749# Source file extension for C test sources.
16750ac_ext=c
16751
16752# Object file extension for compiled C test sources.
16753objext=o
16754objext=$objext
16755
16756# Code to be used in simple compile tests
16757lt_simple_compile_test_code="int some_variable = 0;"
16758
16759# Code to be used in simple link tests
16760lt_simple_link_test_code='int main(){return(0);}'
16761
16762
16763
16764
16765
16766
16767
16768# If no C compiler was specified, use CC.
16769LTCC=${LTCC-"$CC"}
16770
16771# If no C compiler flags were specified, use CFLAGS.
16772LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
16773
16774# Allow CC to be a program name with arguments.
16775compiler=$CC
16776
16777# Save the default compiler, since it gets overwritten when the other
16778# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
16779compiler_DEFAULT=$CC
16780
16781# save warnings/boilerplate of simple test code
16782ac_outfile=conftest.$ac_objext
16783echo "$lt_simple_compile_test_code" >conftest.$ac_ext
16784eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
16785_lt_compiler_boilerplate=`cat conftest.err`
16786$RM conftest*
16787
16788ac_outfile=conftest.$ac_objext
16789echo "$lt_simple_link_test_code" >conftest.$ac_ext
16790eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
16791_lt_linker_boilerplate=`cat conftest.err`
5d47bb02 16792$RM -r conftest*
da0f6381
PB
16793
16794
16795## CAVEAT EMPTOR:
16796## There is no encapsulation within the following macros, do not change
16797## the running order or otherwise move them around unless you know exactly
16798## what you are doing...
16799if test -n "$compiler"; then
16800
16801lt_prog_compiler_no_builtin_flag=
16802
16803if test "$GCC" = yes; then
16804 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
16805
16806 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
16807echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
16808if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
16809 echo $ECHO_N "(cached) $ECHO_C" >&6
16810else
16811 lt_cv_prog_compiler_rtti_exceptions=no
16812 ac_outfile=conftest.$ac_objext
16813 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16814 lt_compiler_flag="-fno-rtti -fno-exceptions"
16815 # Insert the option either (1) after the last *FLAGS variable, or
16816 # (2) before a word containing "conftest.", or (3) at the end.
16817 # Note that $ac_compile itself does not contain backslashes and begins
16818 # with a dollar sign (not a hyphen), so the echo should work correctly.
16819 # The option is referenced via a variable to avoid confusing sed.
16820 lt_compile=`echo "$ac_compile" | $SED \
16821 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16822 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16823 -e 's:$: $lt_compiler_flag:'`
aca600aa 16824 (eval echo "\"\$as_me:16824: $lt_compile\"" >&5)
da0f6381
PB
16825 (eval "$lt_compile" 2>conftest.err)
16826 ac_status=$?
16827 cat conftest.err >&5
aca600aa 16828 echo "$as_me:16828: \$? = $ac_status" >&5
da0f6381
PB
16829 if (exit $ac_status) && test -s "$ac_outfile"; then
16830 # The compiler can only warn and ignore the option if not recognized
16831 # So say no if there are warnings other than the usual output.
16832 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
16833 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16834 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16835 lt_cv_prog_compiler_rtti_exceptions=yes
16836 fi
16837 fi
16838 $RM conftest*
16839
16840fi
16841echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
16842echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
16843
16844if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
16845 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
16846else
16847 :
16848fi
16849
16850fi
16851
16852
16853
16854
16855
16856
16857 lt_prog_compiler_wl=
16858lt_prog_compiler_pic=
16859lt_prog_compiler_static=
16860
16861echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
16862echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
16863
16864 if test "$GCC" = yes; then
16865 lt_prog_compiler_wl='-Wl,'
16866 lt_prog_compiler_static='-static'
16867
16868 case $host_os in
16869 aix*)
16870 # All AIX code is PIC.
16871 if test "$host_cpu" = ia64; then
16872 # AIX 5 now supports IA64 processor
16873 lt_prog_compiler_static='-Bstatic'
16874 fi
16875 ;;
16876
16877 amigaos*)
5d47bb02
PG
16878 case $host_cpu in
16879 powerpc)
16880 # see comment about AmigaOS4 .so support
16881 lt_prog_compiler_pic='-fPIC'
16882 ;;
16883 m68k)
16884 # FIXME: we need at least 68020 code to build shared libraries, but
16885 # adding the `-m68020' flag to GCC prevents building anything better,
16886 # like `-m68040'.
16887 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
16888 ;;
16889 esac
da0f6381
PB
16890 ;;
16891
16892 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
16893 # PIC is the default for these OSes.
16894 ;;
16895
5d47bb02 16896 mingw* | cygwin* | pw32* | os2* | cegcc*)
da0f6381
PB
16897 # This hack is so that the source file can tell whether it is being
16898 # built for inclusion in a dll (and should export symbols for example).
16899 # Although the cygwin gcc ignores -fPIC, still need this for old-style
16900 # (--disable-auto-import) libraries
16901 lt_prog_compiler_pic='-DDLL_EXPORT'
16902 ;;
16903
16904 darwin* | rhapsody*)
16905 # PIC is the default on this platform
16906 # Common symbols not allowed in MH_DYLIB files
16907 lt_prog_compiler_pic='-fno-common'
16908 ;;
16909
16910 hpux*)
5d47bb02
PG
16911 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
16912 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
16913 # sets the default TLS model and affects inlining.
da0f6381 16914 case $host_cpu in
5d47bb02 16915 hppa*64*)
da0f6381
PB
16916 # +Z the default
16917 ;;
16918 *)
16919 lt_prog_compiler_pic='-fPIC'
16920 ;;
16921 esac
16922 ;;
16923
16924 interix[3-9]*)
16925 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
16926 # Instead, we relocate shared libraries at runtime.
16927 ;;
16928
16929 msdosdjgpp*)
16930 # Just because we use GCC doesn't mean we suddenly get shared libraries
16931 # on systems that don't support them.
16932 lt_prog_compiler_can_build_shared=no
16933 enable_shared=no
16934 ;;
16935
16936 *nto* | *qnx*)
16937 # QNX uses GNU C++, but need to define -shared option too, otherwise
16938 # it will coredump.
16939 lt_prog_compiler_pic='-fPIC -shared'
16940 ;;
16941
16942 sysv4*MP*)
16943 if test -d /usr/nec; then
16944 lt_prog_compiler_pic=-Kconform_pic
16945 fi
16946 ;;
16947
16948 *)
16949 lt_prog_compiler_pic='-fPIC'
16950 ;;
16951 esac
16952 else
16953 # PORTME Check for flag to pass linker flags through the system compiler.
16954 case $host_os in
16955 aix*)
16956 lt_prog_compiler_wl='-Wl,'
16957 if test "$host_cpu" = ia64; then
16958 # AIX 5 now supports IA64 processor
16959 lt_prog_compiler_static='-Bstatic'
16960 else
16961 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
16962 fi
16963 ;;
da0f6381 16964
5d47bb02 16965 mingw* | cygwin* | pw32* | os2* | cegcc*)
da0f6381
PB
16966 # This hack is so that the source file can tell whether it is being
16967 # built for inclusion in a dll (and should export symbols for example).
16968 lt_prog_compiler_pic='-DDLL_EXPORT'
16969 ;;
16970
16971 hpux9* | hpux10* | hpux11*)
16972 lt_prog_compiler_wl='-Wl,'
16973 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16974 # not for PA HP-UX.
16975 case $host_cpu in
16976 hppa*64*|ia64*)
16977 # +Z the default
16978 ;;
16979 *)
16980 lt_prog_compiler_pic='+Z'
16981 ;;
16982 esac
16983 # Is there a better lt_prog_compiler_static that works with the bundled CC?
16984 lt_prog_compiler_static='${wl}-a ${wl}archive'
16985 ;;
16986
16987 irix5* | irix6* | nonstopux*)
16988 lt_prog_compiler_wl='-Wl,'
16989 # PIC (with -KPIC) is the default.
16990 lt_prog_compiler_static='-non_shared'
16991 ;;
16992
7a9d3fe8 16993 linux* | k*bsd*-gnu | kopensolaris*-gnu)
da0f6381 16994 case $cc_basename in
5d47bb02
PG
16995 # old Intel for x86_64 which still supported -KPIC.
16996 ecc*)
da0f6381
PB
16997 lt_prog_compiler_wl='-Wl,'
16998 lt_prog_compiler_pic='-KPIC'
16999 lt_prog_compiler_static='-static'
17000 ;;
5d47bb02
PG
17001 # icc used to be incompatible with GCC.
17002 # ICC 10 doesn't accept -KPIC any more.
17003 icc* | ifort*)
17004 lt_prog_compiler_wl='-Wl,'
17005 lt_prog_compiler_pic='-fPIC'
17006 lt_prog_compiler_static='-static'
17007 ;;
17008 # Lahey Fortran 8.1.
17009 lf95*)
17010 lt_prog_compiler_wl='-Wl,'
17011 lt_prog_compiler_pic='--shared'
17012 lt_prog_compiler_static='--static'
17013 ;;
da0f6381
PB
17014 pgcc* | pgf77* | pgf90* | pgf95*)
17015 # Portland Group compilers (*not* the Pentium gcc compiler,
17016 # which looks to be a dead project)
17017 lt_prog_compiler_wl='-Wl,'
17018 lt_prog_compiler_pic='-fpic'
17019 lt_prog_compiler_static='-Bstatic'
17020 ;;
17021 ccc*)
17022 lt_prog_compiler_wl='-Wl,'
17023 # All Alpha code is PIC.
17024 lt_prog_compiler_static='-non_shared'
17025 ;;
5d47bb02
PG
17026 xl*)
17027 # IBM XL C 8.0/Fortran 10.1 on PPC
17028 lt_prog_compiler_wl='-Wl,'
17029 lt_prog_compiler_pic='-qpic'
17030 lt_prog_compiler_static='-qstaticlink'
17031 ;;
da0f6381
PB
17032 *)
17033 case `$CC -V 2>&1 | sed 5q` in
17034 *Sun\ C*)
17035 # Sun C 5.9
17036 lt_prog_compiler_pic='-KPIC'
17037 lt_prog_compiler_static='-Bstatic'
17038 lt_prog_compiler_wl='-Wl,'
17039 ;;
17040 *Sun\ F*)
17041 # Sun Fortran 8.3 passes all unrecognized flags to the linker
17042 lt_prog_compiler_pic='-KPIC'
17043 lt_prog_compiler_static='-Bstatic'
17044 lt_prog_compiler_wl=''
17045 ;;
17046 esac
17047 ;;
17048 esac
17049 ;;
17050
17051 newsos6)
17052 lt_prog_compiler_pic='-KPIC'
17053 lt_prog_compiler_static='-Bstatic'
17054 ;;
17055
17056 *nto* | *qnx*)
17057 # QNX uses GNU C++, but need to define -shared option too, otherwise
17058 # it will coredump.
17059 lt_prog_compiler_pic='-fPIC -shared'
17060 ;;
17061
17062 osf3* | osf4* | osf5*)
17063 lt_prog_compiler_wl='-Wl,'
17064 # All OSF/1 code is PIC.
17065 lt_prog_compiler_static='-non_shared'
17066 ;;
17067
17068 rdos*)
17069 lt_prog_compiler_static='-non_shared'
17070 ;;
17071
17072 solaris*)
17073 lt_prog_compiler_pic='-KPIC'
17074 lt_prog_compiler_static='-Bstatic'
17075 case $cc_basename in
17076 f77* | f90* | f95*)
17077 lt_prog_compiler_wl='-Qoption ld ';;
17078 *)
17079 lt_prog_compiler_wl='-Wl,';;
17080 esac
17081 ;;
17082
17083 sunos4*)
17084 lt_prog_compiler_wl='-Qoption ld '
17085 lt_prog_compiler_pic='-PIC'
17086 lt_prog_compiler_static='-Bstatic'
17087 ;;
17088
17089 sysv4 | sysv4.2uw2* | sysv4.3*)
17090 lt_prog_compiler_wl='-Wl,'
17091 lt_prog_compiler_pic='-KPIC'
17092 lt_prog_compiler_static='-Bstatic'
17093 ;;
17094
17095 sysv4*MP*)
17096 if test -d /usr/nec ;then
17097 lt_prog_compiler_pic='-Kconform_pic'
17098 lt_prog_compiler_static='-Bstatic'
17099 fi
17100 ;;
17101
17102 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
17103 lt_prog_compiler_wl='-Wl,'
17104 lt_prog_compiler_pic='-KPIC'
17105 lt_prog_compiler_static='-Bstatic'
17106 ;;
17107
17108 unicos*)
17109 lt_prog_compiler_wl='-Wl,'
17110 lt_prog_compiler_can_build_shared=no
17111 ;;
17112
17113 uts4*)
17114 lt_prog_compiler_pic='-pic'
17115 lt_prog_compiler_static='-Bstatic'
17116 ;;
17117
17118 *)
17119 lt_prog_compiler_can_build_shared=no
17120 ;;
17121 esac
17122 fi
17123
17124case $host_os in
17125 # For platforms which do not support PIC, -DPIC is meaningless:
17126 *djgpp*)
17127 lt_prog_compiler_pic=
17128 ;;
17129 *)
17130 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
17131 ;;
17132esac
17133echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
17134echo "${ECHO_T}$lt_prog_compiler_pic" >&6
17135
17136
17137
17138
17139
17140
17141#
17142# Check to make sure the PIC flag actually works.
17143#
17144if test -n "$lt_prog_compiler_pic"; then
17145 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
17146echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
5d47bb02 17147if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
da0f6381
PB
17148 echo $ECHO_N "(cached) $ECHO_C" >&6
17149else
5d47bb02 17150 lt_cv_prog_compiler_pic_works=no
da0f6381
PB
17151 ac_outfile=conftest.$ac_objext
17152 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
17153 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
17154 # Insert the option either (1) after the last *FLAGS variable, or
17155 # (2) before a word containing "conftest.", or (3) at the end.
17156 # Note that $ac_compile itself does not contain backslashes and begins
17157 # with a dollar sign (not a hyphen), so the echo should work correctly.
17158 # The option is referenced via a variable to avoid confusing sed.
17159 lt_compile=`echo "$ac_compile" | $SED \
17160 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17161 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17162 -e 's:$: $lt_compiler_flag:'`
aca600aa 17163 (eval echo "\"\$as_me:17163: $lt_compile\"" >&5)
da0f6381
PB
17164 (eval "$lt_compile" 2>conftest.err)
17165 ac_status=$?
17166 cat conftest.err >&5
aca600aa 17167 echo "$as_me:17167: \$? = $ac_status" >&5
da0f6381
PB
17168 if (exit $ac_status) && test -s "$ac_outfile"; then
17169 # The compiler can only warn and ignore the option if not recognized
17170 # So say no if there are warnings other than the usual output.
17171 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
17172 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
17173 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
5d47bb02 17174 lt_cv_prog_compiler_pic_works=yes
da0f6381
PB
17175 fi
17176 fi
17177 $RM conftest*
17178
17179fi
5d47bb02
PG
17180echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
17181echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6
da0f6381 17182
5d47bb02 17183if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
da0f6381
PB
17184 case $lt_prog_compiler_pic in
17185 "" | " "*) ;;
17186 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
17187 esac
17188else
17189 lt_prog_compiler_pic=
17190 lt_prog_compiler_can_build_shared=no
17191fi
17192
17193fi
17194
17195
17196
17197
17198
17199
17200#
17201# Check to make sure the static flag actually works.
17202#
17203wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
17204echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
17205echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
5d47bb02 17206if test "${lt_cv_prog_compiler_static_works+set}" = set; then
da0f6381
PB
17207 echo $ECHO_N "(cached) $ECHO_C" >&6
17208else
5d47bb02 17209 lt_cv_prog_compiler_static_works=no
da0f6381
PB
17210 save_LDFLAGS="$LDFLAGS"
17211 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
17212 echo "$lt_simple_link_test_code" > conftest.$ac_ext
17213 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
17214 # The linker can only warn and ignore the option if not recognized
17215 # So say no if there are warnings
17216 if test -s conftest.err; then
17217 # Append any errors to the config.log.
17218 cat conftest.err 1>&5
17219 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
17220 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
17221 if diff conftest.exp conftest.er2 >/dev/null; then
5d47bb02 17222 lt_cv_prog_compiler_static_works=yes
da0f6381
PB
17223 fi
17224 else
5d47bb02 17225 lt_cv_prog_compiler_static_works=yes
da0f6381
PB
17226 fi
17227 fi
5d47bb02 17228 $RM -r conftest*
da0f6381
PB
17229 LDFLAGS="$save_LDFLAGS"
17230
17231fi
5d47bb02
PG
17232echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
17233echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6
da0f6381 17234
5d47bb02 17235if test x"$lt_cv_prog_compiler_static_works" = xyes; then
da0f6381
PB
17236 :
17237else
17238 lt_prog_compiler_static=
17239fi
17240
17241
17242
17243
17244
17245
17246
17247 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
17248echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
17249if test "${lt_cv_prog_compiler_c_o+set}" = set; then
17250 echo $ECHO_N "(cached) $ECHO_C" >&6
17251else
17252 lt_cv_prog_compiler_c_o=no
17253 $RM -r conftest 2>/dev/null
17254 mkdir conftest
17255 cd conftest
17256 mkdir out
17257 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
17258
17259 lt_compiler_flag="-o out/conftest2.$ac_objext"
17260 # Insert the option either (1) after the last *FLAGS variable, or
17261 # (2) before a word containing "conftest.", or (3) at the end.
17262 # Note that $ac_compile itself does not contain backslashes and begins
17263 # with a dollar sign (not a hyphen), so the echo should work correctly.
17264 lt_compile=`echo "$ac_compile" | $SED \
17265 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17266 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17267 -e 's:$: $lt_compiler_flag:'`
aca600aa 17268 (eval echo "\"\$as_me:17268: $lt_compile\"" >&5)
da0f6381
PB
17269 (eval "$lt_compile" 2>out/conftest.err)
17270 ac_status=$?
17271 cat out/conftest.err >&5
aca600aa 17272 echo "$as_me:17272: \$? = $ac_status" >&5
da0f6381
PB
17273 if (exit $ac_status) && test -s out/conftest2.$ac_objext
17274 then
17275 # The compiler can only warn and ignore the option if not recognized
17276 # So say no if there are warnings
17277 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
17278 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
17279 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
17280 lt_cv_prog_compiler_c_o=yes
17281 fi
17282 fi
17283 chmod u+w . 2>&5
17284 $RM conftest*
17285 # SGI C++ compiler will create directory out/ii_files/ for
17286 # template instantiation
17287 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
17288 $RM out/* && rmdir out
17289 cd ..
17290 $RM -r conftest
17291 $RM conftest*
17292
17293fi
17294echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
17295echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
17296
17297
17298
17299
17300
17301
17302 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
17303echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
17304if test "${lt_cv_prog_compiler_c_o+set}" = set; then
17305 echo $ECHO_N "(cached) $ECHO_C" >&6
17306else
17307 lt_cv_prog_compiler_c_o=no
17308 $RM -r conftest 2>/dev/null
17309 mkdir conftest
17310 cd conftest
17311 mkdir out
17312 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
17313
17314 lt_compiler_flag="-o out/conftest2.$ac_objext"
17315 # Insert the option either (1) after the last *FLAGS variable, or
17316 # (2) before a word containing "conftest.", or (3) at the end.
17317 # Note that $ac_compile itself does not contain backslashes and begins
17318 # with a dollar sign (not a hyphen), so the echo should work correctly.
17319 lt_compile=`echo "$ac_compile" | $SED \
17320 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17321 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17322 -e 's:$: $lt_compiler_flag:'`
aca600aa 17323 (eval echo "\"\$as_me:17323: $lt_compile\"" >&5)
da0f6381
PB
17324 (eval "$lt_compile" 2>out/conftest.err)
17325 ac_status=$?
17326 cat out/conftest.err >&5
aca600aa 17327 echo "$as_me:17327: \$? = $ac_status" >&5
da0f6381
PB
17328 if (exit $ac_status) && test -s out/conftest2.$ac_objext
17329 then
17330 # The compiler can only warn and ignore the option if not recognized
17331 # So say no if there are warnings
17332 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
17333 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
17334 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
17335 lt_cv_prog_compiler_c_o=yes
17336 fi
17337 fi
17338 chmod u+w . 2>&5
17339 $RM conftest*
17340 # SGI C++ compiler will create directory out/ii_files/ for
17341 # template instantiation
17342 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
17343 $RM out/* && rmdir out
17344 cd ..
17345 $RM -r conftest
17346 $RM conftest*
17347
17348fi
17349echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
17350echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
17351
17352
17353
17354
17355hard_links="nottested"
17356if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
17357 # do not overwrite the value of need_locks provided by the user
17358 echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
17359echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
17360 hard_links=yes
17361 $RM conftest*
17362 ln conftest.a conftest.b 2>/dev/null && hard_links=no
17363 touch conftest.a
17364 ln conftest.a conftest.b 2>&5 || hard_links=no
17365 ln conftest.a conftest.b 2>/dev/null && hard_links=no
17366 echo "$as_me:$LINENO: result: $hard_links" >&5
17367echo "${ECHO_T}$hard_links" >&6
17368 if test "$hard_links" = no; then
17369 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
17370echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
17371 need_locks=warn
17372 fi
17373else
17374 need_locks=no
17375fi
17376
17377
17378
17379
17380
17381
17382 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
17383echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
17384
17385 runpath_var=
17386 allow_undefined_flag=
17387 always_export_symbols=no
17388 archive_cmds=
17389 archive_expsym_cmds=
17390 compiler_needs_object=no
17391 enable_shared_with_static_runtimes=no
17392 export_dynamic_flag_spec=
17393 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
17394 hardcode_automatic=no
17395 hardcode_direct=no
17396 hardcode_direct_absolute=no
17397 hardcode_libdir_flag_spec=
17398 hardcode_libdir_flag_spec_ld=
17399 hardcode_libdir_separator=
17400 hardcode_minus_L=no
17401 hardcode_shlibpath_var=unsupported
17402 inherit_rpath=no
17403 link_all_deplibs=unknown
17404 module_cmds=
17405 module_expsym_cmds=
17406 old_archive_from_new_cmds=
17407 old_archive_from_expsyms_cmds=
17408 thread_safe_flag_spec=
17409 whole_archive_flag_spec=
17410 # include_expsyms should be a list of space-separated symbols to be *always*
17411 # included in the symbol list
17412 include_expsyms=
17413 # exclude_expsyms can be an extended regexp of symbols to exclude
17414 # it will be wrapped by ` (' and `)$', so one must not match beginning or
17415 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
17416 # as well as any symbol that contains `d'.
5d47bb02 17417 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
da0f6381
PB
17418 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
17419 # platforms (ab)use it in PIC code, but their linkers get confused if
17420 # the symbol is explicitly referenced. Since portable code cannot
17421 # rely on this symbol name, it's probably fine to never include it in
17422 # preloaded symbol tables.
5d47bb02 17423 # Exclude shared library initialization/finalization symbols.
da0f6381
PB
17424 extract_expsyms_cmds=
17425
17426 case $host_os in
5d47bb02 17427 cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
17428 # FIXME: the MSVC++ port hasn't been tested in a loooong time
17429 # When not using gcc, we currently assume that we are using
17430 # Microsoft Visual C++.
17431 if test "$GCC" != yes; then
17432 with_gnu_ld=no
17433 fi
17434 ;;
17435 interix*)
17436 # we just hope/assume this is gcc and not c89 (= MSVC++)
17437 with_gnu_ld=yes
17438 ;;
17439 openbsd*)
17440 with_gnu_ld=no
17441 ;;
17442 esac
17443
17444 ld_shlibs=yes
17445 if test "$with_gnu_ld" = yes; then
17446 # If archive_cmds runs LD, not CC, wlarc should be empty
17447 wlarc='${wl}'
17448
17449 # Set some defaults for GNU ld with shared library support. These
17450 # are reset later if shared libraries are not supported. Putting them
17451 # here allows them to be overridden if necessary.
17452 runpath_var=LD_RUN_PATH
17453 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17454 export_dynamic_flag_spec='${wl}--export-dynamic'
17455 # ancient GNU ld didn't support --whole-archive et. al.
17456 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
17457 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
17458 else
17459 whole_archive_flag_spec=
17460 fi
17461 supports_anon_versioning=no
17462 case `$LD -v 2>&1` in
17463 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
17464 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
17465 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
17466 *\ 2.11.*) ;; # other 2.11 versions
17467 *) supports_anon_versioning=yes ;;
17468 esac
17469
17470 # See if GNU ld supports shared libraries.
17471 case $host_os in
17472 aix[3-9]*)
17473 # On AIX/PPC, the GNU linker is very broken
17474 if test "$host_cpu" != ia64; then
17475 ld_shlibs=no
17476 cat <<_LT_EOF 1>&2
17477
17478*** Warning: the GNU linker, at least up to release 2.9.1, is reported
17479*** to be unable to reliably create shared libraries on AIX.
17480*** Therefore, libtool is disabling shared libraries support. If you
17481*** really care for shared libraries, you may want to modify your PATH
17482*** so that a non-GNU linker is found, and then restart.
17483
17484_LT_EOF
17485 fi
17486 ;;
17487
17488 amigaos*)
5d47bb02
PG
17489 case $host_cpu in
17490 powerpc)
17491 # see comment about AmigaOS4 .so support
17492 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17493 archive_expsym_cmds=''
17494 ;;
17495 m68k)
17496 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)'
17497 hardcode_libdir_flag_spec='-L$libdir'
17498 hardcode_minus_L=yes
17499 ;;
17500 esac
da0f6381
PB
17501 ;;
17502
17503 beos*)
17504 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17505 allow_undefined_flag=unsupported
17506 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
17507 # support --undefined. This deserves some investigation. FIXME
17508 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17509 else
17510 ld_shlibs=no
17511 fi
17512 ;;
17513
5d47bb02 17514 cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
17515 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
17516 # as there is no search path for DLLs.
17517 hardcode_libdir_flag_spec='-L$libdir'
17518 allow_undefined_flag=unsupported
17519 always_export_symbols=no
17520 enable_shared_with_static_runtimes=yes
17521 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
17522
17523 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
17524 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17525 # If the export-symbols file already is a .def file (1st line
17526 # is EXPORTS), use it as is; otherwise, prepend...
17527 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
17528 cp $export_symbols $output_objdir/$soname.def;
17529 else
17530 echo EXPORTS > $output_objdir/$soname.def;
17531 cat $export_symbols >> $output_objdir/$soname.def;
17532 fi~
17533 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17534 else
17535 ld_shlibs=no
17536 fi
17537 ;;
17538
17539 interix[3-9]*)
17540 hardcode_direct=no
17541 hardcode_shlibpath_var=no
17542 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
17543 export_dynamic_flag_spec='${wl}-E'
17544 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
17545 # Instead, shared libraries are loaded at an image base (0x10000000 by
17546 # default) and relocated if they conflict, which is a slow very memory
17547 # consuming and fragmenting process. To avoid this, we pick a random,
17548 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
17549 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
17550 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
17551 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'
17552 ;;
17553
7a9d3fe8 17554 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
da0f6381
PB
17555 tmp_diet=no
17556 if test "$host_os" = linux-dietlibc; then
17557 case $cc_basename in
17558 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
17559 esac
17560 fi
17561 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
17562 && test "$tmp_diet" = no
17563 then
17564 tmp_addflag=
5d47bb02 17565 tmp_sharedflag='-shared'
da0f6381
PB
17566 case $cc_basename,$host_cpu in
17567 pgcc*) # Portland Group C compiler
17568 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'
17569 tmp_addflag=' $pic_flag'
17570 ;;
17571 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
17572 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'
17573 tmp_addflag=' $pic_flag -Mnomain' ;;
17574 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
17575 tmp_addflag=' -i_dynamic' ;;
17576 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
17577 tmp_addflag=' -i_dynamic -nofor_main' ;;
17578 ifc* | ifort*) # Intel Fortran compiler
17579 tmp_addflag=' -nofor_main' ;;
5d47bb02
PG
17580 lf95*) # Lahey Fortran 8.1
17581 whole_archive_flag_spec=
17582 tmp_sharedflag='--shared' ;;
17583 xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
17584 tmp_sharedflag='-qmkshrobj'
17585 tmp_addflag= ;;
da0f6381
PB
17586 esac
17587 case `$CC -V 2>&1 | sed 5q` in
17588 *Sun\ C*) # Sun C 5.9
17589 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'
17590 compiler_needs_object=yes
17591 tmp_sharedflag='-G' ;;
17592 *Sun\ F*) # Sun Fortran 8.3
17593 tmp_sharedflag='-G' ;;
da0f6381
PB
17594 esac
17595 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17596
17597 if test "x$supports_anon_versioning" = xyes; then
17598 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
17599 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
17600 echo "local: *; };" >> $output_objdir/$libname.ver~
17601 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
17602 fi
5d47bb02
PG
17603
17604 case $cc_basename in
17605 xlf*)
17606 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
17607 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
17608 hardcode_libdir_flag_spec=
17609 hardcode_libdir_flag_spec_ld='-rpath $libdir'
17610 archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
17611 if test "x$supports_anon_versioning" = xyes; then
17612 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
17613 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
17614 echo "local: *; };" >> $output_objdir/$libname.ver~
17615 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
17616 fi
17617 ;;
17618 esac
da0f6381
PB
17619 else
17620 ld_shlibs=no
17621 fi
17622 ;;
17623
17624 netbsd*)
17625 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
17626 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
17627 wlarc=
17628 else
17629 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17630 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17631 fi
17632 ;;
17633
17634 solaris*)
17635 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
17636 ld_shlibs=no
17637 cat <<_LT_EOF 1>&2
17638
17639*** Warning: The releases 2.8.* of the GNU linker cannot reliably
17640*** create shared libraries on Solaris systems. Therefore, libtool
17641*** is disabling shared libraries support. We urge you to upgrade GNU
17642*** binutils to release 2.9.1 or newer. Another option is to modify
17643*** your PATH or compiler configuration so that the native linker is
17644*** used, and then restart.
17645
17646_LT_EOF
17647 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17648 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17649 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17650 else
17651 ld_shlibs=no
17652 fi
17653 ;;
17654
17655 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
17656 case `$LD -v 2>&1` in
17657 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
17658 ld_shlibs=no
17659 cat <<_LT_EOF 1>&2
17660
17661*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
17662*** reliably create shared libraries on SCO systems. Therefore, libtool
17663*** is disabling shared libraries support. We urge you to upgrade GNU
17664*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
17665*** your PATH or compiler configuration so that the native linker is
17666*** used, and then restart.
17667
17668_LT_EOF
17669 ;;
17670 *)
17671 # For security reasons, it is highly recommended that you always
17672 # use absolute paths for naming shared libraries, and exclude the
17673 # DT_RUNPATH tag from executables and libraries. But doing so
17674 # requires that you compile everything twice, which is a pain.
17675 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17676 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17677 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17678 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17679 else
17680 ld_shlibs=no
17681 fi
17682 ;;
17683 esac
17684 ;;
17685
17686 sunos4*)
17687 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17688 wlarc=
17689 hardcode_direct=yes
17690 hardcode_shlibpath_var=no
17691 ;;
17692
17693 *)
17694 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17695 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17696 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17697 else
17698 ld_shlibs=no
17699 fi
17700 ;;
17701 esac
17702
17703 if test "$ld_shlibs" = no; then
17704 runpath_var=
17705 hardcode_libdir_flag_spec=
17706 export_dynamic_flag_spec=
17707 whole_archive_flag_spec=
17708 fi
17709 else
17710 # PORTME fill in a description of your system's linker (not GNU ld)
17711 case $host_os in
17712 aix3*)
17713 allow_undefined_flag=unsupported
17714 always_export_symbols=yes
17715 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'
17716 # Note: this linker hardcodes the directories in LIBPATH if there
17717 # are no directories specified by -L.
17718 hardcode_minus_L=yes
17719 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
17720 # Neither direct hardcoding nor static linking is supported with a
17721 # broken collect2.
17722 hardcode_direct=unsupported
17723 fi
17724 ;;
17725
17726 aix[4-9]*)
17727 if test "$host_cpu" = ia64; then
17728 # On IA64, the linker does run time linking by default, so we don't
17729 # have to do anything special.
17730 aix_use_runtimelinking=no
17731 exp_sym_flag='-Bexport'
17732 no_entry_flag=""
17733 else
17734 # If we're using GNU nm, then we don't want the "-C" option.
17735 # -C means demangle to AIX nm, but means don't demangle with GNU nm
17736 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
17737 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'
17738 else
17739 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'
17740 fi
17741 aix_use_runtimelinking=no
17742
17743 # Test if we are trying to use run time linking or normal
17744 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
17745 # need to do runtime linking.
17746 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
17747 for ld_flag in $LDFLAGS; do
17748 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
17749 aix_use_runtimelinking=yes
17750 break
17751 fi
17752 done
17753 ;;
17754 esac
17755
17756 exp_sym_flag='-bexport'
17757 no_entry_flag='-bnoentry'
17758 fi
17759
17760 # When large executables or shared objects are built, AIX ld can
17761 # have problems creating the table of contents. If linking a library
17762 # or program results in "error TOC overflow" add -mminimal-toc to
17763 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
17764 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
17765
17766 archive_cmds=''
17767 hardcode_direct=yes
17768 hardcode_direct_absolute=yes
17769 hardcode_libdir_separator=':'
17770 link_all_deplibs=yes
17771 file_list_spec='${wl}-f,'
17772
17773 if test "$GCC" = yes; then
17774 case $host_os in aix4.[012]|aix4.[012].*)
17775 # We only want to do this on AIX 4.2 and lower, the check
17776 # below for broken collect2 doesn't work under 4.3+
17777 collect2name=`${CC} -print-prog-name=collect2`
17778 if test -f "$collect2name" &&
17779 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
17780 then
17781 # We have reworked collect2
17782 :
17783 else
17784 # We have old collect2
17785 hardcode_direct=unsupported
17786 # It fails to find uninstalled libraries when the uninstalled
17787 # path is not listed in the libpath. Setting hardcode_minus_L
17788 # to unsupported forces relinking
17789 hardcode_minus_L=yes
17790 hardcode_libdir_flag_spec='-L$libdir'
17791 hardcode_libdir_separator=
17792 fi
17793 ;;
17794 esac
17795 shared_flag='-shared'
17796 if test "$aix_use_runtimelinking" = yes; then
17797 shared_flag="$shared_flag "'${wl}-G'
17798 fi
17799 else
17800 # not using gcc
17801 if test "$host_cpu" = ia64; then
17802 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
17803 # chokes on -Wl,-G. The following line is correct:
17804 shared_flag='-G'
17805 else
17806 if test "$aix_use_runtimelinking" = yes; then
17807 shared_flag='${wl}-G'
17808 else
17809 shared_flag='${wl}-bM:SRE'
17810 fi
17811 fi
17812 fi
17813
5d47bb02 17814 export_dynamic_flag_spec='${wl}-bexpall'
da0f6381
PB
17815 # It seems that -bexpall does not export symbols beginning with
17816 # underscore (_), so it is better to generate a list of symbols to export.
17817 always_export_symbols=yes
17818 if test "$aix_use_runtimelinking" = yes; then
17819 # Warning - without using the other runtime loading flags (-brtl),
17820 # -berok will link without error, but may produce a broken library.
17821 allow_undefined_flag='-berok'
17822 # Determine the default libpath from the value encoded in an
17823 # empty executable.
17824 cat >conftest.$ac_ext <<_ACEOF
17825/* confdefs.h. */
17826_ACEOF
17827cat confdefs.h >>conftest.$ac_ext
17828cat >>conftest.$ac_ext <<_ACEOF
17829/* end confdefs.h. */
17830
17831int
17832main ()
17833{
17834
17835 ;
17836 return 0;
17837}
17838_ACEOF
17839rm -f conftest.$ac_objext conftest$ac_exeext
17840if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17841 (eval $ac_link) 2>conftest.er1
17842 ac_status=$?
17843 grep -v '^ *+' conftest.er1 >conftest.err
17844 rm -f conftest.er1
17845 cat conftest.err >&5
17846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17847 (exit $ac_status); } &&
17848 { ac_try='test -z "$ac_c_werror_flag"
17849 || test ! -s conftest.err'
17850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17851 (eval $ac_try) 2>&5
17852 ac_status=$?
17853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17854 (exit $ac_status); }; } &&
17855 { ac_try='test -s conftest$ac_exeext'
17856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17857 (eval $ac_try) 2>&5
17858 ac_status=$?
17859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17860 (exit $ac_status); }; }; then
17861
17862lt_aix_libpath_sed='
17863 /Import File Strings/,/^$/ {
17864 /^0/ {
17865 s/^0 *\(.*\)$/\1/
17866 p
17867 }
17868 }'
17869aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17870# Check for a 64-bit object if we didn't find anything.
17871if test -z "$aix_libpath"; then
17872 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17873fi
17874else
17875 echo "$as_me: failed program was:" >&5
17876sed 's/^/| /' conftest.$ac_ext >&5
17877
17878fi
17879rm -f conftest.err conftest.$ac_objext \
17880 conftest$ac_exeext conftest.$ac_ext
17881if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17882
17883 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
17884 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"
17885 else
17886 if test "$host_cpu" = ia64; then
17887 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
17888 allow_undefined_flag="-z nodefs"
17889 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"
17890 else
17891 # Determine the default libpath from the value encoded in an
17892 # empty executable.
17893 cat >conftest.$ac_ext <<_ACEOF
17894/* confdefs.h. */
17895_ACEOF
17896cat confdefs.h >>conftest.$ac_ext
17897cat >>conftest.$ac_ext <<_ACEOF
17898/* end confdefs.h. */
17899
17900int
17901main ()
17902{
17903
17904 ;
17905 return 0;
17906}
17907_ACEOF
17908rm -f conftest.$ac_objext conftest$ac_exeext
17909if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17910 (eval $ac_link) 2>conftest.er1
17911 ac_status=$?
17912 grep -v '^ *+' conftest.er1 >conftest.err
17913 rm -f conftest.er1
17914 cat conftest.err >&5
17915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17916 (exit $ac_status); } &&
17917 { ac_try='test -z "$ac_c_werror_flag"
17918 || test ! -s conftest.err'
17919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17920 (eval $ac_try) 2>&5
17921 ac_status=$?
17922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17923 (exit $ac_status); }; } &&
17924 { ac_try='test -s conftest$ac_exeext'
17925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17926 (eval $ac_try) 2>&5
17927 ac_status=$?
17928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17929 (exit $ac_status); }; }; then
17930
17931lt_aix_libpath_sed='
17932 /Import File Strings/,/^$/ {
17933 /^0/ {
17934 s/^0 *\(.*\)$/\1/
17935 p
17936 }
17937 }'
17938aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17939# Check for a 64-bit object if we didn't find anything.
17940if test -z "$aix_libpath"; then
17941 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17942fi
17943else
17944 echo "$as_me: failed program was:" >&5
17945sed 's/^/| /' conftest.$ac_ext >&5
17946
17947fi
17948rm -f conftest.err conftest.$ac_objext \
17949 conftest$ac_exeext conftest.$ac_ext
17950if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17951
17952 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
17953 # Warning - without using the other run time loading flags,
17954 # -berok will link without error, but may produce a broken library.
17955 no_undefined_flag=' ${wl}-bernotok'
17956 allow_undefined_flag=' ${wl}-berok'
17957 # Exported symbols can be pulled into shared objects from archives
17958 whole_archive_flag_spec='$convenience'
17959 archive_cmds_need_lc=yes
17960 # This is similar to how AIX traditionally builds its shared libraries.
17961 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'
17962 fi
17963 fi
17964 ;;
17965
17966 amigaos*)
5d47bb02
PG
17967 case $host_cpu in
17968 powerpc)
17969 # see comment about AmigaOS4 .so support
17970 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17971 archive_expsym_cmds=''
17972 ;;
17973 m68k)
17974 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)'
17975 hardcode_libdir_flag_spec='-L$libdir'
17976 hardcode_minus_L=yes
17977 ;;
17978 esac
da0f6381
PB
17979 ;;
17980
17981 bsdi[45]*)
17982 export_dynamic_flag_spec=-rdynamic
17983 ;;
17984
5d47bb02 17985 cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
17986 # When not using gcc, we currently assume that we are using
17987 # Microsoft Visual C++.
17988 # hardcode_libdir_flag_spec is actually meaningless, as there is
17989 # no search path for DLLs.
17990 hardcode_libdir_flag_spec=' '
17991 allow_undefined_flag=unsupported
17992 # Tell ltmain to make .lib files, not .a files.
17993 libext=lib
17994 # Tell ltmain to make .dll files, not .so files.
17995 shrext_cmds=".dll"
17996 # FIXME: Setting linknames here is a bad hack.
17997 archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
17998 # The linker will automatically build a .lib file if we build a DLL.
17999 old_archive_from_new_cmds='true'
18000 # FIXME: Should let the user specify the lib program.
18001 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
18002 fix_srcfile_path='`cygpath -w "$srcfile"`'
18003 enable_shared_with_static_runtimes=yes
18004 ;;
18005
18006 darwin* | rhapsody*)
da0f6381 18007
5d47bb02
PG
18008
18009 archive_cmds_need_lc=no
18010 hardcode_direct=no
18011 hardcode_automatic=yes
18012 hardcode_shlibpath_var=unsupported
18013 whole_archive_flag_spec=''
18014 link_all_deplibs=yes
18015 allow_undefined_flag="$_lt_dar_allow_undefined"
18016 case $cc_basename in
18017 ifort*) _lt_dar_can_shared=yes ;;
18018 *) _lt_dar_can_shared=$GCC ;;
18019 esac
18020 if test "$_lt_dar_can_shared" = "yes"; then
18021 output_verbose_link_cmd=echo
18022 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
18023 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
18024 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}"
18025 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}"
18026
18027 else
18028 ld_shlibs=no
18029 fi
18030
da0f6381
PB
18031 ;;
18032
18033 dgux*)
18034 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
18035 hardcode_libdir_flag_spec='-L$libdir'
18036 hardcode_shlibpath_var=no
18037 ;;
18038
18039 freebsd1*)
18040 ld_shlibs=no
18041 ;;
18042
18043 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
18044 # support. Future versions do this automatically, but an explicit c++rt0.o
18045 # does not break anything, and helps significantly (at the cost of a little
18046 # extra space).
18047 freebsd2.2*)
18048 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
18049 hardcode_libdir_flag_spec='-R$libdir'
18050 hardcode_direct=yes
18051 hardcode_shlibpath_var=no
18052 ;;
18053
18054 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
18055 freebsd2*)
18056 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
18057 hardcode_direct=yes
18058 hardcode_minus_L=yes
18059 hardcode_shlibpath_var=no
18060 ;;
18061
18062 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
18063 freebsd* | dragonfly*)
18064 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
18065 hardcode_libdir_flag_spec='-R$libdir'
18066 hardcode_direct=yes
18067 hardcode_shlibpath_var=no
18068 ;;
18069
18070 hpux9*)
18071 if test "$GCC" = yes; then
18072 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'
18073 else
18074 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'
18075 fi
18076 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
18077 hardcode_libdir_separator=:
18078 hardcode_direct=yes
18079
18080 # hardcode_minus_L: Not really in the search PATH,
18081 # but as the default location of the library.
18082 hardcode_minus_L=yes
18083 export_dynamic_flag_spec='${wl}-E'
18084 ;;
18085
18086 hpux10*)
18087 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
18088 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
18089 else
18090 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
18091 fi
18092 if test "$with_gnu_ld" = no; then
18093 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
18094 hardcode_libdir_flag_spec_ld='+b $libdir'
18095 hardcode_libdir_separator=:
18096 hardcode_direct=yes
18097 hardcode_direct_absolute=yes
18098 export_dynamic_flag_spec='${wl}-E'
18099 # hardcode_minus_L: Not really in the search PATH,
18100 # but as the default location of the library.
18101 hardcode_minus_L=yes
18102 fi
18103 ;;
18104
18105 hpux11*)
18106 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
18107 case $host_cpu in
18108 hppa*64*)
18109 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
18110 ;;
18111 ia64*)
5d47bb02 18112 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
da0f6381
PB
18113 ;;
18114 *)
18115 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
18116 ;;
18117 esac
18118 else
18119 case $host_cpu in
18120 hppa*64*)
18121 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
18122 ;;
18123 ia64*)
18124 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
18125 ;;
18126 *)
18127 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
18128 ;;
18129 esac
18130 fi
18131 if test "$with_gnu_ld" = no; then
18132 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
18133 hardcode_libdir_separator=:
18134
18135 case $host_cpu in
18136 hppa*64*|ia64*)
18137 hardcode_direct=no
18138 hardcode_shlibpath_var=no
18139 ;;
18140 *)
18141 hardcode_direct=yes
18142 hardcode_direct_absolute=yes
18143 export_dynamic_flag_spec='${wl}-E'
18144
18145 # hardcode_minus_L: Not really in the search PATH,
18146 # but as the default location of the library.
18147 hardcode_minus_L=yes
18148 ;;
18149 esac
18150 fi
18151 ;;
18152
18153 irix5* | irix6* | nonstopux*)
18154 if test "$GCC" = yes; then
18155 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'
18156 # Try to use the -exported_symbol ld option, if it does not
18157 # work, assume that -exports_file does not work either and
18158 # implicitly export all symbols.
18159 save_LDFLAGS="$LDFLAGS"
18160 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
18161 cat >conftest.$ac_ext <<_ACEOF
18162int foo(void) {}
18163_ACEOF
18164rm -f conftest.$ac_objext conftest$ac_exeext
18165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18166 (eval $ac_link) 2>conftest.er1
18167 ac_status=$?
18168 grep -v '^ *+' conftest.er1 >conftest.err
18169 rm -f conftest.er1
18170 cat conftest.err >&5
18171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18172 (exit $ac_status); } &&
18173 { ac_try='test -z "$ac_c_werror_flag"
18174 || test ! -s conftest.err'
18175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18176 (eval $ac_try) 2>&5
18177 ac_status=$?
18178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18179 (exit $ac_status); }; } &&
18180 { ac_try='test -s conftest$ac_exeext'
18181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18182 (eval $ac_try) 2>&5
18183 ac_status=$?
18184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18185 (exit $ac_status); }; }; then
18186 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'
18187
18188else
18189 echo "$as_me: failed program was:" >&5
18190sed 's/^/| /' conftest.$ac_ext >&5
18191
18192fi
18193rm -f conftest.err conftest.$ac_objext \
18194 conftest$ac_exeext conftest.$ac_ext
18195 LDFLAGS="$save_LDFLAGS"
18196 else
18197 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'
18198 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'
18199 fi
18200 archive_cmds_need_lc='no'
18201 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
18202 hardcode_libdir_separator=:
18203 inherit_rpath=yes
18204 link_all_deplibs=yes
18205 ;;
18206
18207 netbsd*)
18208 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
18209 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
18210 else
18211 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
18212 fi
18213 hardcode_libdir_flag_spec='-R$libdir'
18214 hardcode_direct=yes
18215 hardcode_shlibpath_var=no
18216 ;;
18217
18218 newsos6)
18219 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
18220 hardcode_direct=yes
18221 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
18222 hardcode_libdir_separator=:
18223 hardcode_shlibpath_var=no
18224 ;;
18225
18226 *nto* | *qnx*)
18227 ;;
18228
18229 openbsd*)
5d47bb02
PG
18230 if test -f /usr/libexec/ld.so; then
18231 hardcode_direct=yes
18232 hardcode_shlibpath_var=no
18233 hardcode_direct_absolute=yes
18234 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
da0f6381 18235 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5d47bb02 18236 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
da0f6381 18237 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5d47bb02
PG
18238 export_dynamic_flag_spec='${wl}-E'
18239 else
18240 case $host_os in
18241 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
18242 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
18243 hardcode_libdir_flag_spec='-R$libdir'
18244 ;;
18245 *)
18246 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
18247 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
18248 ;;
18249 esac
18250 fi
18251 else
18252 ld_shlibs=no
da0f6381
PB
18253 fi
18254 ;;
18255
18256 os2*)
18257 hardcode_libdir_flag_spec='-L$libdir'
18258 hardcode_minus_L=yes
18259 allow_undefined_flag=unsupported
18260 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'
18261 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
18262 ;;
18263
18264 osf3*)
18265 if test "$GCC" = yes; then
18266 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
18267 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'
18268 else
18269 allow_undefined_flag=' -expect_unresolved \*'
18270 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'
18271 fi
18272 archive_cmds_need_lc='no'
18273 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
18274 hardcode_libdir_separator=:
18275 ;;
18276
18277 osf4* | osf5*) # as osf3* with the addition of -msym flag
18278 if test "$GCC" = yes; then
18279 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
18280 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'
18281 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
18282 else
18283 allow_undefined_flag=' -expect_unresolved \*'
18284 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'
18285 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~
18286 $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'
18287
18288 # Both c and cxx compiler support -rpath directly
18289 hardcode_libdir_flag_spec='-rpath $libdir'
18290 fi
18291 archive_cmds_need_lc='no'
18292 hardcode_libdir_separator=:
18293 ;;
18294
18295 solaris*)
18296 no_undefined_flag=' -z defs'
18297 if test "$GCC" = yes; then
18298 wlarc='${wl}'
18299 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
18300 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18301 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
18302 else
18303 case `$CC -V 2>&1` in
18304 *"Compilers 5.0"*)
18305 wlarc=''
18306 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
18307 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18308 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
18309 ;;
18310 *)
18311 wlarc='${wl}'
18312 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
18313 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
18314 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
18315 ;;
18316 esac
18317 fi
18318 hardcode_libdir_flag_spec='-R$libdir'
18319 hardcode_shlibpath_var=no
18320 case $host_os in
18321 solaris2.[0-5] | solaris2.[0-5].*) ;;
18322 *)
18323 # The compiler driver will combine and reorder linker options,
18324 # but understands `-z linker_flag'. GCC discards it without `$wl',
18325 # but is careful enough not to reorder.
18326 # Supported since Solaris 2.6 (maybe 2.5.1?)
18327 if test "$GCC" = yes; then
18328 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
18329 else
18330 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
18331 fi
18332 ;;
18333 esac
18334 link_all_deplibs=yes
18335 ;;
18336
18337 sunos4*)
18338 if test "x$host_vendor" = xsequent; then
18339 # Use $CC to link under sequent, because it throws in some extra .o
18340 # files that make .init and .fini sections work.
18341 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
18342 else
18343 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
18344 fi
18345 hardcode_libdir_flag_spec='-L$libdir'
18346 hardcode_direct=yes
18347 hardcode_minus_L=yes
18348 hardcode_shlibpath_var=no
18349 ;;
18350
18351 sysv4)
18352 case $host_vendor in
18353 sni)
18354 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
18355 hardcode_direct=yes # is this really true???
18356 ;;
18357 siemens)
18358 ## LD is ld it makes a PLAMLIB
18359 ## CC just makes a GrossModule.
18360 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
18361 reload_cmds='$CC -r -o $output$reload_objs'
18362 hardcode_direct=no
18363 ;;
18364 motorola)
18365 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
18366 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
18367 ;;
18368 esac
18369 runpath_var='LD_RUN_PATH'
18370 hardcode_shlibpath_var=no
18371 ;;
18372
18373 sysv4.3*)
18374 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
18375 hardcode_shlibpath_var=no
18376 export_dynamic_flag_spec='-Bexport'
18377 ;;
18378
18379 sysv4*MP*)
18380 if test -d /usr/nec; then
18381 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
18382 hardcode_shlibpath_var=no
18383 runpath_var=LD_RUN_PATH
18384 hardcode_runpath_var=yes
18385 ld_shlibs=yes
18386 fi
18387 ;;
18388
18389 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
18390 no_undefined_flag='${wl}-z,text'
18391 archive_cmds_need_lc=no
18392 hardcode_shlibpath_var=no
18393 runpath_var='LD_RUN_PATH'
18394
18395 if test "$GCC" = yes; then
18396 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18397 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18398 else
18399 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18400 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18401 fi
18402 ;;
18403
18404 sysv5* | sco3.2v5* | sco5v6*)
18405 # Note: We can NOT use -z defs as we might desire, because we do not
18406 # link with -lc, and that would cause any symbols used from libc to
18407 # always be unresolved, which means just about no library would
18408 # ever link correctly. If we're not using GNU ld we use -z text
18409 # though, which does catch some bad symbols but isn't as heavy-handed
18410 # as -z defs.
18411 no_undefined_flag='${wl}-z,text'
18412 allow_undefined_flag='${wl}-z,nodefs'
18413 archive_cmds_need_lc=no
18414 hardcode_shlibpath_var=no
18415 hardcode_libdir_flag_spec='${wl}-R,$libdir'
18416 hardcode_libdir_separator=':'
18417 link_all_deplibs=yes
18418 export_dynamic_flag_spec='${wl}-Bexport'
18419 runpath_var='LD_RUN_PATH'
18420
18421 if test "$GCC" = yes; then
18422 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18423 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18424 else
18425 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18426 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18427 fi
18428 ;;
18429
18430 uts4*)
18431 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
18432 hardcode_libdir_flag_spec='-L$libdir'
18433 hardcode_shlibpath_var=no
18434 ;;
18435
18436 *)
18437 ld_shlibs=no
18438 ;;
18439 esac
18440
18441 if test x$host_vendor = xsni; then
18442 case $host in
18443 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
18444 export_dynamic_flag_spec='${wl}-Blargedynsym'
18445 ;;
18446 esac
18447 fi
18448 fi
18449
18450echo "$as_me:$LINENO: result: $ld_shlibs" >&5
18451echo "${ECHO_T}$ld_shlibs" >&6
18452test "$ld_shlibs" = no && can_build_shared=no
18453
18454with_gnu_ld=$with_gnu_ld
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470#
18471# Do we need to explicitly link libc?
18472#
18473case "x$archive_cmds_need_lc" in
18474x|xyes)
18475 # Assume -lc should be added
18476 archive_cmds_need_lc=yes
18477
18478 if test "$enable_shared" = yes && test "$GCC" = yes; then
18479 case $archive_cmds in
18480 *'~'*)
18481 # FIXME: we may have to deal with multi-command sequences.
18482 ;;
18483 '$CC '*)
18484 # Test whether the compiler implicitly links with -lc since on some
18485 # systems, -lgcc has to come before -lc. If gcc already passes -lc
18486 # to ld, don't add -lc before -lgcc.
18487 echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
18488echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
baafc534
RW
18489if test "${lt_cv_archive_cmds_need_lc+set}" = set; then
18490 echo $ECHO_N "(cached) $ECHO_C" >&6
18491else
18492 $RM conftest*
18493 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
da0f6381 18494
baafc534 18495 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
da0f6381
PB
18496 (eval $ac_compile) 2>&5
18497 ac_status=$?
18498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18499 (exit $ac_status); } 2>conftest.err; then
baafc534
RW
18500 soname=conftest
18501 lib=conftest
18502 libobjs=conftest.$ac_objext
18503 deplibs=
18504 wl=$lt_prog_compiler_wl
18505 pic_flag=$lt_prog_compiler_pic
18506 compiler_flags=-v
18507 linker_flags=-v
18508 verstring=
18509 output_objdir=.
18510 libname=conftest
18511 lt_save_allow_undefined_flag=$allow_undefined_flag
18512 allow_undefined_flag=
18513 if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
da0f6381
PB
18514 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
18515 ac_status=$?
18516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18517 (exit $ac_status); }
baafc534
RW
18518 then
18519 lt_cv_archive_cmds_need_lc=no
18520 else
18521 lt_cv_archive_cmds_need_lc=yes
18522 fi
18523 allow_undefined_flag=$lt_save_allow_undefined_flag
18524 else
18525 cat conftest.err 1>&5
18526 fi
18527 $RM conftest*
18528
18529fi
18530echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5
18531echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
18532 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
da0f6381
PB
18533 ;;
18534 esac
18535 fi
18536 ;;
18537esac
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
18696echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
5d47bb02
PG
18697
18698if test "$GCC" = yes; then
da0f6381
PB
18699 case $host_os in
18700 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
18701 *) lt_awk_arg="/^libraries:/" ;;
18702 esac
18703 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
18704 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
18705 # if the path contains ";" then we assume it to be the separator
18706 # otherwise default to the standard path separator (i.e. ":") - it is
18707 # assumed that no part of a normal pathname contains ";" but that should
18708 # okay in the real world where ";" in dirpaths is itself problematic.
18709 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
18710 else
18711 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
18712 fi
18713 # Ok, now we have the path, separated by spaces, we can step through it
18714 # and add multilib dir if necessary.
18715 lt_tmp_lt_search_path_spec=
18716 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
18717 for lt_sys_path in $lt_search_path_spec; do
18718 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
18719 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
18720 else
18721 test -d "$lt_sys_path" && \
18722 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
18723 fi
18724 done
18725 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
18726BEGIN {RS=" "; FS="/|\n";} {
18727 lt_foo="";
18728 lt_count=0;
18729 for (lt_i = NF; lt_i > 0; lt_i--) {
18730 if ($lt_i != "" && $lt_i != ".") {
18731 if ($lt_i == "..") {
18732 lt_count++;
18733 } else {
18734 if (lt_count == 0) {
18735 lt_foo="/" $lt_i lt_foo;
18736 } else {
18737 lt_count--;
18738 }
18739 }
18740 }
18741 }
18742 if (lt_foo != "") { lt_freq[lt_foo]++; }
18743 if (lt_freq[lt_foo] == 1) { print lt_foo; }
18744}'`
18745 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
18746else
18747 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
18748fi
18749library_names_spec=
18750libname_spec='lib$name'
18751soname_spec=
18752shrext_cmds=".so"
18753postinstall_cmds=
18754postuninstall_cmds=
18755finish_cmds=
18756finish_eval=
18757shlibpath_var=
18758shlibpath_overrides_runpath=unknown
18759version_type=none
18760dynamic_linker="$host_os ld.so"
18761sys_lib_dlsearch_path_spec="/lib /usr/lib"
18762need_lib_prefix=unknown
18763hardcode_into_libs=no
18764
18765# when you set need_version to no, make sure it does not cause -set_version
18766# flags to be left without arguments
18767need_version=unknown
18768
18769case $host_os in
18770aix3*)
18771 version_type=linux
18772 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
18773 shlibpath_var=LIBPATH
18774
18775 # AIX 3 has no versioning support, so we append a major version to the name.
18776 soname_spec='${libname}${release}${shared_ext}$major'
18777 ;;
18778
18779aix[4-9]*)
18780 version_type=linux
18781 need_lib_prefix=no
18782 need_version=no
18783 hardcode_into_libs=yes
18784 if test "$host_cpu" = ia64; then
18785 # AIX 5 supports IA64
18786 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
18787 shlibpath_var=LD_LIBRARY_PATH
18788 else
18789 # With GCC up to 2.95.x, collect2 would create an import file
18790 # for dependence libraries. The import file would start with
18791 # the line `#! .'. This would cause the generated library to
18792 # depend on `.', always an invalid library. This was fixed in
18793 # development snapshots of GCC prior to 3.0.
18794 case $host_os in
18795 aix4 | aix4.[01] | aix4.[01].*)
18796 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
18797 echo ' yes '
18798 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
18799 :
18800 else
18801 can_build_shared=no
18802 fi
18803 ;;
18804 esac
18805 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
18806 # soname into executable. Probably we can add versioning support to
18807 # collect2, so additional links can be useful in future.
18808 if test "$aix_use_runtimelinking" = yes; then
18809 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
18810 # instead of lib<name>.a to let people know that these are not
18811 # typical AIX shared libraries.
18812 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18813 else
18814 # We preserve .a as extension for shared libraries through AIX4.2
18815 # and later when we are not doing run time linking.
18816 library_names_spec='${libname}${release}.a $libname.a'
18817 soname_spec='${libname}${release}${shared_ext}$major'
18818 fi
18819 shlibpath_var=LIBPATH
18820 fi
18821 ;;
18822
18823amigaos*)
5d47bb02
PG
18824 case $host_cpu in
18825 powerpc)
18826 # Since July 2007 AmigaOS4 officially supports .so libraries.
18827 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
18828 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18829 ;;
18830 m68k)
da0f6381
PB
18831 library_names_spec='$libname.ixlibrary $libname.a'
18832 # Create ${libname}_ixlibrary.a entries in /sys/libs.
18833 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
18834 ;;
18835 esac
da0f6381
PB
18836 ;;
18837
18838beos*)
18839 library_names_spec='${libname}${shared_ext}'
18840 dynamic_linker="$host_os ld.so"
18841 shlibpath_var=LIBRARY_PATH
18842 ;;
18843
18844bsdi[45]*)
18845 version_type=linux
18846 need_version=no
18847 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18848 soname_spec='${libname}${release}${shared_ext}$major'
18849 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
18850 shlibpath_var=LD_LIBRARY_PATH
18851 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
18852 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
18853 # the default ld.so.conf also contains /usr/contrib/lib and
18854 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
18855 # libtool to hard-code these into programs
18856 ;;
18857
5d47bb02 18858cygwin* | mingw* | pw32* | cegcc*)
da0f6381
PB
18859 version_type=windows
18860 shrext_cmds=".dll"
18861 need_version=no
18862 need_lib_prefix=no
18863
5d47bb02
PG
18864 case $GCC,$host_os in
18865 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
da0f6381
PB
18866 library_names_spec='$libname.dll.a'
18867 # DLL is installed to $(libdir)/../bin by postinstall_cmds
18868 postinstall_cmds='base_file=`basename \${file}`~
18869 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
18870 dldir=$destdir/`dirname \$dlpath`~
18871 test -d \$dldir || mkdir -p \$dldir~
18872 $install_prog $dir/$dlname \$dldir/$dlname~
18873 chmod a+x \$dldir/$dlname~
18874 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
18875 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
18876 fi'
18877 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
18878 dlpath=$dir/\$dldll~
18879 $RM \$dlpath'
18880 shlibpath_overrides_runpath=yes
18881
18882 case $host_os in
18883 cygwin*)
18884 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
18885 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18886 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
18887 ;;
5d47bb02 18888 mingw* | cegcc*)
da0f6381
PB
18889 # MinGW DLLs use traditional 'lib' prefix
18890 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18891 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
18892 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
18893 # It is most probably a Windows format PATH printed by
18894 # mingw gcc, but we are running on Cygwin. Gcc prints its search
18895 # path with ; separators, and with drive letters. We can handle the
18896 # drive letters (cygwin fileutils understands them), so leave them,
18897 # especially as we might pass files found there to a mingw objdump,
18898 # which wouldn't understand a cygwinified path. Ahh.
18899 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
18900 else
18901 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
18902 fi
18903 ;;
18904 pw32*)
18905 # pw32 DLLs use 'pw' prefix rather than 'lib'
18906 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18907 ;;
18908 esac
18909 ;;
18910
18911 *)
18912 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
18913 ;;
18914 esac
18915 dynamic_linker='Win32 ld.exe'
18916 # FIXME: first we should search . and the directory the executable is in
18917 shlibpath_var=PATH
18918 ;;
18919
18920darwin* | rhapsody*)
18921 dynamic_linker="$host_os dyld"
18922 version_type=darwin
18923 need_lib_prefix=no
18924 need_version=no
18925 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
18926 soname_spec='${libname}${release}${major}$shared_ext'
18927 shlibpath_overrides_runpath=yes
18928 shlibpath_var=DYLD_LIBRARY_PATH
18929 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
18930
18931 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
18932 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
18933 ;;
18934
18935dgux*)
18936 version_type=linux
18937 need_lib_prefix=no
18938 need_version=no
18939 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
18940 soname_spec='${libname}${release}${shared_ext}$major'
18941 shlibpath_var=LD_LIBRARY_PATH
18942 ;;
18943
18944freebsd1*)
18945 dynamic_linker=no
18946 ;;
18947
18948freebsd* | dragonfly*)
18949 # DragonFly does not have aout. When/if they implement a new
18950 # versioning mechanism, adjust this.
18951 if test -x /usr/bin/objformat; then
18952 objformat=`/usr/bin/objformat`
18953 else
18954 case $host_os in
18955 freebsd[123]*) objformat=aout ;;
18956 *) objformat=elf ;;
18957 esac
18958 fi
18959 version_type=freebsd-$objformat
18960 case $version_type in
18961 freebsd-elf*)
18962 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
18963 need_version=no
18964 need_lib_prefix=no
18965 ;;
18966 freebsd-*)
18967 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
18968 need_version=yes
18969 ;;
18970 esac
18971 shlibpath_var=LD_LIBRARY_PATH
18972 case $host_os in
18973 freebsd2*)
18974 shlibpath_overrides_runpath=yes
18975 ;;
18976 freebsd3.[01]* | freebsdelf3.[01]*)
18977 shlibpath_overrides_runpath=yes
18978 hardcode_into_libs=yes
18979 ;;
18980 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
18981 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
18982 shlibpath_overrides_runpath=no
18983 hardcode_into_libs=yes
18984 ;;
18985 *) # from 4.6 on, and DragonFly
18986 shlibpath_overrides_runpath=yes
18987 hardcode_into_libs=yes
18988 ;;
18989 esac
18990 ;;
18991
18992gnu*)
18993 version_type=linux
18994 need_lib_prefix=no
18995 need_version=no
18996 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
18997 soname_spec='${libname}${release}${shared_ext}$major'
18998 shlibpath_var=LD_LIBRARY_PATH
18999 hardcode_into_libs=yes
19000 ;;
19001
19002hpux9* | hpux10* | hpux11*)
19003 # Give a soname corresponding to the major version so that dld.sl refuses to
19004 # link against other versions.
19005 version_type=sunos
19006 need_lib_prefix=no
19007 need_version=no
19008 case $host_cpu in
19009 ia64*)
19010 shrext_cmds='.so'
19011 hardcode_into_libs=yes
19012 dynamic_linker="$host_os dld.so"
19013 shlibpath_var=LD_LIBRARY_PATH
19014 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
19015 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19016 soname_spec='${libname}${release}${shared_ext}$major'
19017 if test "X$HPUX_IA64_MODE" = X32; then
19018 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
19019 else
19020 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
19021 fi
19022 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
19023 ;;
19024 hppa*64*)
19025 shrext_cmds='.sl'
19026 hardcode_into_libs=yes
19027 dynamic_linker="$host_os dld.sl"
19028 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
19029 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
19030 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19031 soname_spec='${libname}${release}${shared_ext}$major'
19032 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
19033 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
19034 ;;
19035 *)
19036 shrext_cmds='.sl'
19037 dynamic_linker="$host_os dld.sl"
19038 shlibpath_var=SHLIB_PATH
19039 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
19040 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19041 soname_spec='${libname}${release}${shared_ext}$major'
19042 ;;
19043 esac
19044 # HP-UX runs *really* slowly unless shared libraries are mode 555.
19045 postinstall_cmds='chmod 555 $lib'
19046 ;;
19047
19048interix[3-9]*)
19049 version_type=linux
19050 need_lib_prefix=no
19051 need_version=no
19052 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
19053 soname_spec='${libname}${release}${shared_ext}$major'
19054 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
19055 shlibpath_var=LD_LIBRARY_PATH
19056 shlibpath_overrides_runpath=no
19057 hardcode_into_libs=yes
19058 ;;
19059
19060irix5* | irix6* | nonstopux*)
19061 case $host_os in
19062 nonstopux*) version_type=nonstopux ;;
19063 *)
19064 if test "$lt_cv_prog_gnu_ld" = yes; then
19065 version_type=linux
19066 else
19067 version_type=irix
19068 fi ;;
19069 esac
19070 need_lib_prefix=no
19071 need_version=no
19072 soname_spec='${libname}${release}${shared_ext}$major'
19073 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
19074 case $host_os in
19075 irix5* | nonstopux*)
19076 libsuff= shlibsuff=
19077 ;;
19078 *)
19079 case $LD in # libtool.m4 will add one of these switches to LD
19080 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
19081 libsuff= shlibsuff= libmagic=32-bit;;
19082 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
19083 libsuff=32 shlibsuff=N32 libmagic=N32;;
19084 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
19085 libsuff=64 shlibsuff=64 libmagic=64-bit;;
19086 *) libsuff= shlibsuff= libmagic=never-match;;
19087 esac
19088 ;;
19089 esac
19090 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
19091 shlibpath_overrides_runpath=no
19092 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
19093 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
19094 hardcode_into_libs=yes
19095 ;;
19096
19097# No shared lib support for Linux oldld, aout, or coff.
19098linux*oldld* | linux*aout* | linux*coff*)
19099 dynamic_linker=no
19100 ;;
19101
19102# This must be Linux ELF.
7a9d3fe8 19103linux* | k*bsd*-gnu | kopensolaris*-gnu)
da0f6381
PB
19104 version_type=linux
19105 need_lib_prefix=no
19106 need_version=no
19107 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19108 soname_spec='${libname}${release}${shared_ext}$major'
19109 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
19110 shlibpath_var=LD_LIBRARY_PATH
19111 shlibpath_overrides_runpath=no
baafc534 19112
da0f6381 19113 # Some binutils ld are patched to set DT_RUNPATH
baafc534
RW
19114 if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then
19115 echo $ECHO_N "(cached) $ECHO_C" >&6
19116else
19117 lt_cv_shlibpath_overrides_runpath=no
19118 save_LDFLAGS=$LDFLAGS
19119 save_libdir=$libdir
19120 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
19121 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
19122 cat >conftest.$ac_ext <<_ACEOF
da0f6381
PB
19123/* confdefs.h. */
19124_ACEOF
19125cat confdefs.h >>conftest.$ac_ext
19126cat >>conftest.$ac_ext <<_ACEOF
19127/* end confdefs.h. */
19128
19129int
19130main ()
19131{
19132
19133 ;
19134 return 0;
19135}
19136_ACEOF
19137rm -f conftest.$ac_objext conftest$ac_exeext
19138if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19139 (eval $ac_link) 2>conftest.er1
19140 ac_status=$?
19141 grep -v '^ *+' conftest.er1 >conftest.err
19142 rm -f conftest.er1
19143 cat conftest.err >&5
19144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19145 (exit $ac_status); } &&
19146 { ac_try='test -z "$ac_c_werror_flag"
19147 || test ! -s conftest.err'
19148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19149 (eval $ac_try) 2>&5
19150 ac_status=$?
19151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19152 (exit $ac_status); }; } &&
19153 { ac_try='test -s conftest$ac_exeext'
19154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19155 (eval $ac_try) 2>&5
19156 ac_status=$?
19157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19158 (exit $ac_status); }; }; then
5d47bb02 19159 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
baafc534 19160 lt_cv_shlibpath_overrides_runpath=yes
da0f6381
PB
19161fi
19162
19163else
19164 echo "$as_me: failed program was:" >&5
19165sed 's/^/| /' conftest.$ac_ext >&5
19166
19167fi
19168rm -f conftest.err conftest.$ac_objext \
19169 conftest$ac_exeext conftest.$ac_ext
baafc534
RW
19170 LDFLAGS=$save_LDFLAGS
19171 libdir=$save_libdir
19172
19173fi
19174
19175 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
da0f6381
PB
19176
19177 # This implies no fast_install, which is unacceptable.
19178 # Some rework will be needed to allow for fast_install
19179 # before this can be enabled.
19180 hardcode_into_libs=yes
19181
19182 # Append ld.so.conf contents to the search path
19183 if test -f /etc/ld.so.conf; then
5d47bb02 19184 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
19185 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
19186 fi
19187
19188 # We used to test for /lib/ld.so.1 and disable shared libraries on
19189 # powerpc, because MkLinux only supported shared libraries with the
19190 # GNU dynamic linker. Since this was broken with cross compilers,
19191 # most powerpc-linux boxes support dynamic linking these days and
19192 # people can always --disable-shared, the test was removed, and we
19193 # assume the GNU/Linux dynamic linker is in use.
19194 dynamic_linker='GNU/Linux ld.so'
19195 ;;
19196
19197netbsd*)
19198 version_type=sunos
19199 need_lib_prefix=no
19200 need_version=no
19201 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
19202 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
19203 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
19204 dynamic_linker='NetBSD (a.out) ld.so'
19205 else
19206 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
19207 soname_spec='${libname}${release}${shared_ext}$major'
19208 dynamic_linker='NetBSD ld.elf_so'
19209 fi
19210 shlibpath_var=LD_LIBRARY_PATH
19211 shlibpath_overrides_runpath=yes
19212 hardcode_into_libs=yes
19213 ;;
19214
19215newsos6)
19216 version_type=linux
19217 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19218 shlibpath_var=LD_LIBRARY_PATH
19219 shlibpath_overrides_runpath=yes
19220 ;;
19221
19222*nto* | *qnx*)
19223 version_type=qnx
19224 need_lib_prefix=no
19225 need_version=no
19226 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19227 soname_spec='${libname}${release}${shared_ext}$major'
19228 shlibpath_var=LD_LIBRARY_PATH
19229 shlibpath_overrides_runpath=no
19230 hardcode_into_libs=yes
19231 dynamic_linker='ldqnx.so'
19232 ;;
19233
19234openbsd*)
19235 version_type=sunos
19236 sys_lib_dlsearch_path_spec="/usr/lib"
19237 need_lib_prefix=no
19238 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
19239 case $host_os in
19240 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
19241 *) need_version=no ;;
19242 esac
19243 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
19244 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
19245 shlibpath_var=LD_LIBRARY_PATH
19246 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
19247 case $host_os in
19248 openbsd2.[89] | openbsd2.[89].*)
19249 shlibpath_overrides_runpath=no
19250 ;;
19251 *)
19252 shlibpath_overrides_runpath=yes
19253 ;;
19254 esac
19255 else
19256 shlibpath_overrides_runpath=yes
19257 fi
19258 ;;
19259
19260os2*)
19261 libname_spec='$name'
19262 shrext_cmds=".dll"
19263 need_lib_prefix=no
19264 library_names_spec='$libname${shared_ext} $libname.a'
19265 dynamic_linker='OS/2 ld.exe'
19266 shlibpath_var=LIBPATH
19267 ;;
19268
19269osf3* | osf4* | osf5*)
19270 version_type=osf
19271 need_lib_prefix=no
19272 need_version=no
19273 soname_spec='${libname}${release}${shared_ext}$major'
19274 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19275 shlibpath_var=LD_LIBRARY_PATH
19276 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
19277 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
19278 ;;
19279
19280rdos*)
19281 dynamic_linker=no
19282 ;;
19283
19284solaris*)
19285 version_type=linux
19286 need_lib_prefix=no
19287 need_version=no
19288 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19289 soname_spec='${libname}${release}${shared_ext}$major'
19290 shlibpath_var=LD_LIBRARY_PATH
19291 shlibpath_overrides_runpath=yes
19292 hardcode_into_libs=yes
19293 # ldd complains unless libraries are executable
19294 postinstall_cmds='chmod +x $lib'
19295 ;;
19296
19297sunos4*)
19298 version_type=sunos
19299 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
19300 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
19301 shlibpath_var=LD_LIBRARY_PATH
19302 shlibpath_overrides_runpath=yes
19303 if test "$with_gnu_ld" = yes; then
19304 need_lib_prefix=no
19305 fi
19306 need_version=yes
19307 ;;
19308
19309sysv4 | sysv4.3*)
19310 version_type=linux
19311 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19312 soname_spec='${libname}${release}${shared_ext}$major'
19313 shlibpath_var=LD_LIBRARY_PATH
19314 case $host_vendor in
19315 sni)
19316 shlibpath_overrides_runpath=no
19317 need_lib_prefix=no
19318 runpath_var=LD_RUN_PATH
19319 ;;
19320 siemens)
19321 need_lib_prefix=no
19322 ;;
19323 motorola)
19324 need_lib_prefix=no
19325 need_version=no
19326 shlibpath_overrides_runpath=no
19327 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
19328 ;;
19329 esac
19330 ;;
19331
19332sysv4*MP*)
19333 if test -d /usr/nec ;then
19334 version_type=linux
19335 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
19336 soname_spec='$libname${shared_ext}.$major'
19337 shlibpath_var=LD_LIBRARY_PATH
19338 fi
19339 ;;
19340
19341sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
19342 version_type=freebsd-elf
19343 need_lib_prefix=no
19344 need_version=no
19345 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
19346 soname_spec='${libname}${release}${shared_ext}$major'
19347 shlibpath_var=LD_LIBRARY_PATH
19348 shlibpath_overrides_runpath=yes
19349 hardcode_into_libs=yes
19350 if test "$with_gnu_ld" = yes; then
19351 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
19352 else
19353 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
19354 case $host_os in
19355 sco3.2v5*)
19356 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
19357 ;;
19358 esac
19359 fi
19360 sys_lib_dlsearch_path_spec='/usr/lib'
19361 ;;
19362
19363tpf*)
19364 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
19365 version_type=linux
19366 need_lib_prefix=no
19367 need_version=no
5d47bb02 19368 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
da0f6381
PB
19369 shlibpath_var=LD_LIBRARY_PATH
19370 shlibpath_overrides_runpath=no
19371 hardcode_into_libs=yes
19372 ;;
19373
19374uts4*)
19375 version_type=linux
19376 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19377 soname_spec='${libname}${release}${shared_ext}$major'
19378 shlibpath_var=LD_LIBRARY_PATH
19379 ;;
19380
19381*)
19382 dynamic_linker=no
19383 ;;
19384esac
19385echo "$as_me:$LINENO: result: $dynamic_linker" >&5
19386echo "${ECHO_T}$dynamic_linker" >&6
19387test "$dynamic_linker" = no && can_build_shared=no
19388
19389variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
19390if test "$GCC" = yes; then
19391 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
19392fi
19393
5d47bb02
PG
19394if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
19395 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
19396fi
19397if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
19398 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
19399fi
19400
da0f6381
PB
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
19488echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
19489hardcode_action=
19490if test -n "$hardcode_libdir_flag_spec" ||
19491 test -n "$runpath_var" ||
19492 test "X$hardcode_automatic" = "Xyes" ; then
19493
19494 # We can hardcode non-existent directories.
19495 if test "$hardcode_direct" != no &&
19496 # If the only mechanism to avoid hardcoding is shlibpath_var, we
19497 # have to relink, otherwise we might link with an installed library
19498 # when we should be linking with a yet-to-be-installed one
19499 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
19500 test "$hardcode_minus_L" != no; then
19501 # Linking always hardcodes the temporary library directory.
19502 hardcode_action=relink
19503 else
19504 # We can link without hardcoding, and we can hardcode nonexisting dirs.
19505 hardcode_action=immediate
19506 fi
19507else
19508 # We cannot hardcode anything, or else we can only hardcode existing
19509 # directories.
19510 hardcode_action=unsupported
19511fi
19512echo "$as_me:$LINENO: result: $hardcode_action" >&5
19513echo "${ECHO_T}$hardcode_action" >&6
19514
19515if test "$hardcode_action" = relink ||
19516 test "$inherit_rpath" = yes; then
19517 # Fast installation is not supported
19518 enable_fast_install=no
19519elif test "$shlibpath_overrides_runpath" = yes ||
19520 test "$enable_shared" = no; then
19521 # Fast installation is not necessary
19522 enable_fast_install=needless
19523fi
19524
19525
19526
19527
19528
19529
19530 if test "x$enable_dlopen" != xyes; then
19531 enable_dlopen=unknown
19532 enable_dlopen_self=unknown
19533 enable_dlopen_self_static=unknown
19534else
19535 lt_cv_dlopen=no
19536 lt_cv_dlopen_libs=
19537
19538 case $host_os in
19539 beos*)
19540 lt_cv_dlopen="load_add_on"
19541 lt_cv_dlopen_libs=
19542 lt_cv_dlopen_self=yes
19543 ;;
19544
5d47bb02 19545 mingw* | pw32* | cegcc*)
da0f6381
PB
19546 lt_cv_dlopen="LoadLibrary"
19547 lt_cv_dlopen_libs=
19548 ;;
19549
19550 cygwin*)
19551 lt_cv_dlopen="dlopen"
19552 lt_cv_dlopen_libs=
19553 ;;
19554
19555 darwin*)
19556 # if libdl is installed we need to link against it
19557 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19558echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
19559if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19560 echo $ECHO_N "(cached) $ECHO_C" >&6
19561else
19562 ac_check_lib_save_LIBS=$LIBS
19563LIBS="-ldl $LIBS"
19564cat >conftest.$ac_ext <<_ACEOF
19565/* confdefs.h. */
19566_ACEOF
19567cat confdefs.h >>conftest.$ac_ext
19568cat >>conftest.$ac_ext <<_ACEOF
19569/* end confdefs.h. */
19570
19571/* Override any gcc2 internal prototype to avoid an error. */
19572#ifdef __cplusplus
19573extern "C"
19574#endif
19575/* We use char because int might match the return type of a gcc2
19576 builtin and then its argument prototype would still apply. */
19577char dlopen ();
19578int
19579main ()
19580{
19581dlopen ();
19582 ;
19583 return 0;
19584}
19585_ACEOF
19586rm -f conftest.$ac_objext conftest$ac_exeext
19587if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19588 (eval $ac_link) 2>conftest.er1
19589 ac_status=$?
19590 grep -v '^ *+' conftest.er1 >conftest.err
19591 rm -f conftest.er1
19592 cat conftest.err >&5
19593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19594 (exit $ac_status); } &&
19595 { ac_try='test -z "$ac_c_werror_flag"
19596 || test ! -s conftest.err'
19597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19598 (eval $ac_try) 2>&5
19599 ac_status=$?
19600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19601 (exit $ac_status); }; } &&
19602 { ac_try='test -s conftest$ac_exeext'
19603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19604 (eval $ac_try) 2>&5
19605 ac_status=$?
19606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19607 (exit $ac_status); }; }; then
19608 ac_cv_lib_dl_dlopen=yes
19609else
19610 echo "$as_me: failed program was:" >&5
19611sed 's/^/| /' conftest.$ac_ext >&5
19612
19613ac_cv_lib_dl_dlopen=no
19614fi
19615rm -f conftest.err conftest.$ac_objext \
19616 conftest$ac_exeext conftest.$ac_ext
19617LIBS=$ac_check_lib_save_LIBS
19618fi
19619echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19620echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
19621if test $ac_cv_lib_dl_dlopen = yes; then
19622 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
19623else
19624
19625 lt_cv_dlopen="dyld"
19626 lt_cv_dlopen_libs=
19627 lt_cv_dlopen_self=yes
19628
19629fi
19630
19631 ;;
19632
19633 *)
19634 echo "$as_me:$LINENO: checking for shl_load" >&5
19635echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
19636if test "${ac_cv_func_shl_load+set}" = set; then
19637 echo $ECHO_N "(cached) $ECHO_C" >&6
19638else
19639 cat >conftest.$ac_ext <<_ACEOF
19640/* confdefs.h. */
19641_ACEOF
19642cat confdefs.h >>conftest.$ac_ext
19643cat >>conftest.$ac_ext <<_ACEOF
19644/* end confdefs.h. */
19645/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
19646 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19647#define shl_load innocuous_shl_load
19648
19649/* System header to define __stub macros and hopefully few prototypes,
19650 which can conflict with char shl_load (); below.
19651 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19652 <limits.h> exists even on freestanding compilers. */
19653
19654#ifdef __STDC__
19655# include <limits.h>
19656#else
19657# include <assert.h>
19658#endif
19659
19660#undef shl_load
19661
19662/* Override any gcc2 internal prototype to avoid an error. */
19663#ifdef __cplusplus
19664extern "C"
19665{
19666#endif
19667/* We use char because int might match the return type of a gcc2
19668 builtin and then its argument prototype would still apply. */
19669char shl_load ();
19670/* The GNU C library defines this for functions which it implements
19671 to always fail with ENOSYS. Some functions are actually named
19672 something starting with __ and the normal name is an alias. */
19673#if defined (__stub_shl_load) || defined (__stub___shl_load)
19674choke me
19675#else
19676char (*f) () = shl_load;
19677#endif
19678#ifdef __cplusplus
19679}
19680#endif
19681
19682int
19683main ()
19684{
19685return f != shl_load;
19686 ;
19687 return 0;
19688}
19689_ACEOF
19690rm -f conftest.$ac_objext conftest$ac_exeext
19691if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19692 (eval $ac_link) 2>conftest.er1
19693 ac_status=$?
19694 grep -v '^ *+' conftest.er1 >conftest.err
19695 rm -f conftest.er1
19696 cat conftest.err >&5
19697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19698 (exit $ac_status); } &&
19699 { ac_try='test -z "$ac_c_werror_flag"
19700 || test ! -s conftest.err'
19701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19702 (eval $ac_try) 2>&5
19703 ac_status=$?
19704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19705 (exit $ac_status); }; } &&
19706 { ac_try='test -s conftest$ac_exeext'
19707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19708 (eval $ac_try) 2>&5
19709 ac_status=$?
19710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19711 (exit $ac_status); }; }; then
19712 ac_cv_func_shl_load=yes
19713else
19714 echo "$as_me: failed program was:" >&5
19715sed 's/^/| /' conftest.$ac_ext >&5
19716
19717ac_cv_func_shl_load=no
19718fi
19719rm -f conftest.err conftest.$ac_objext \
19720 conftest$ac_exeext conftest.$ac_ext
19721fi
19722echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
19723echo "${ECHO_T}$ac_cv_func_shl_load" >&6
19724if test $ac_cv_func_shl_load = yes; then
19725 lt_cv_dlopen="shl_load"
19726else
19727 echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
19728echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
19729if test "${ac_cv_lib_dld_shl_load+set}" = set; then
19730 echo $ECHO_N "(cached) $ECHO_C" >&6
19731else
19732 ac_check_lib_save_LIBS=$LIBS
19733LIBS="-ldld $LIBS"
19734cat >conftest.$ac_ext <<_ACEOF
19735/* confdefs.h. */
19736_ACEOF
19737cat confdefs.h >>conftest.$ac_ext
19738cat >>conftest.$ac_ext <<_ACEOF
19739/* end confdefs.h. */
19740
19741/* Override any gcc2 internal prototype to avoid an error. */
19742#ifdef __cplusplus
19743extern "C"
19744#endif
19745/* We use char because int might match the return type of a gcc2
19746 builtin and then its argument prototype would still apply. */
19747char shl_load ();
19748int
19749main ()
19750{
19751shl_load ();
19752 ;
19753 return 0;
19754}
19755_ACEOF
19756rm -f conftest.$ac_objext conftest$ac_exeext
19757if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19758 (eval $ac_link) 2>conftest.er1
19759 ac_status=$?
19760 grep -v '^ *+' conftest.er1 >conftest.err
19761 rm -f conftest.er1
19762 cat conftest.err >&5
19763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19764 (exit $ac_status); } &&
19765 { ac_try='test -z "$ac_c_werror_flag"
19766 || test ! -s conftest.err'
19767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19768 (eval $ac_try) 2>&5
19769 ac_status=$?
19770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19771 (exit $ac_status); }; } &&
19772 { ac_try='test -s conftest$ac_exeext'
19773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19774 (eval $ac_try) 2>&5
19775 ac_status=$?
19776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19777 (exit $ac_status); }; }; then
19778 ac_cv_lib_dld_shl_load=yes
19779else
19780 echo "$as_me: failed program was:" >&5
19781sed 's/^/| /' conftest.$ac_ext >&5
19782
19783ac_cv_lib_dld_shl_load=no
19784fi
19785rm -f conftest.err conftest.$ac_objext \
19786 conftest$ac_exeext conftest.$ac_ext
19787LIBS=$ac_check_lib_save_LIBS
19788fi
19789echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
19790echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
19791if test $ac_cv_lib_dld_shl_load = yes; then
5d47bb02 19792 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
da0f6381
PB
19793else
19794 echo "$as_me:$LINENO: checking for dlopen" >&5
19795echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
19796if test "${ac_cv_func_dlopen+set}" = set; then
19797 echo $ECHO_N "(cached) $ECHO_C" >&6
19798else
19799 cat >conftest.$ac_ext <<_ACEOF
19800/* confdefs.h. */
19801_ACEOF
19802cat confdefs.h >>conftest.$ac_ext
19803cat >>conftest.$ac_ext <<_ACEOF
19804/* end confdefs.h. */
19805/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
19806 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19807#define dlopen innocuous_dlopen
19808
19809/* System header to define __stub macros and hopefully few prototypes,
19810 which can conflict with char dlopen (); below.
19811 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19812 <limits.h> exists even on freestanding compilers. */
19813
19814#ifdef __STDC__
19815# include <limits.h>
19816#else
19817# include <assert.h>
19818#endif
19819
19820#undef dlopen
19821
19822/* Override any gcc2 internal prototype to avoid an error. */
19823#ifdef __cplusplus
19824extern "C"
19825{
19826#endif
19827/* We use char because int might match the return type of a gcc2
19828 builtin and then its argument prototype would still apply. */
19829char dlopen ();
19830/* The GNU C library defines this for functions which it implements
19831 to always fail with ENOSYS. Some functions are actually named
19832 something starting with __ and the normal name is an alias. */
19833#if defined (__stub_dlopen) || defined (__stub___dlopen)
19834choke me
19835#else
19836char (*f) () = dlopen;
19837#endif
19838#ifdef __cplusplus
19839}
19840#endif
19841
19842int
19843main ()
19844{
19845return f != dlopen;
19846 ;
19847 return 0;
19848}
19849_ACEOF
19850rm -f conftest.$ac_objext conftest$ac_exeext
19851if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19852 (eval $ac_link) 2>conftest.er1
19853 ac_status=$?
19854 grep -v '^ *+' conftest.er1 >conftest.err
19855 rm -f conftest.er1
19856 cat conftest.err >&5
19857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19858 (exit $ac_status); } &&
19859 { ac_try='test -z "$ac_c_werror_flag"
19860 || test ! -s conftest.err'
19861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19862 (eval $ac_try) 2>&5
19863 ac_status=$?
19864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19865 (exit $ac_status); }; } &&
19866 { ac_try='test -s conftest$ac_exeext'
19867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19868 (eval $ac_try) 2>&5
19869 ac_status=$?
19870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19871 (exit $ac_status); }; }; then
19872 ac_cv_func_dlopen=yes
19873else
19874 echo "$as_me: failed program was:" >&5
19875sed 's/^/| /' conftest.$ac_ext >&5
19876
19877ac_cv_func_dlopen=no
19878fi
19879rm -f conftest.err conftest.$ac_objext \
19880 conftest$ac_exeext conftest.$ac_ext
19881fi
19882echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
19883echo "${ECHO_T}$ac_cv_func_dlopen" >&6
19884if test $ac_cv_func_dlopen = yes; then
19885 lt_cv_dlopen="dlopen"
19886else
19887 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19888echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
19889if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19890 echo $ECHO_N "(cached) $ECHO_C" >&6
19891else
19892 ac_check_lib_save_LIBS=$LIBS
19893LIBS="-ldl $LIBS"
19894cat >conftest.$ac_ext <<_ACEOF
19895/* confdefs.h. */
19896_ACEOF
19897cat confdefs.h >>conftest.$ac_ext
19898cat >>conftest.$ac_ext <<_ACEOF
19899/* end confdefs.h. */
19900
19901/* Override any gcc2 internal prototype to avoid an error. */
19902#ifdef __cplusplus
19903extern "C"
19904#endif
19905/* We use char because int might match the return type of a gcc2
19906 builtin and then its argument prototype would still apply. */
19907char dlopen ();
19908int
19909main ()
19910{
19911dlopen ();
19912 ;
19913 return 0;
19914}
19915_ACEOF
19916rm -f conftest.$ac_objext conftest$ac_exeext
19917if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19918 (eval $ac_link) 2>conftest.er1
19919 ac_status=$?
19920 grep -v '^ *+' conftest.er1 >conftest.err
19921 rm -f conftest.er1
19922 cat conftest.err >&5
19923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19924 (exit $ac_status); } &&
19925 { ac_try='test -z "$ac_c_werror_flag"
19926 || test ! -s conftest.err'
19927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19928 (eval $ac_try) 2>&5
19929 ac_status=$?
19930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19931 (exit $ac_status); }; } &&
19932 { ac_try='test -s conftest$ac_exeext'
19933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19934 (eval $ac_try) 2>&5
19935 ac_status=$?
19936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19937 (exit $ac_status); }; }; then
19938 ac_cv_lib_dl_dlopen=yes
19939else
19940 echo "$as_me: failed program was:" >&5
19941sed 's/^/| /' conftest.$ac_ext >&5
19942
19943ac_cv_lib_dl_dlopen=no
19944fi
19945rm -f conftest.err conftest.$ac_objext \
19946 conftest$ac_exeext conftest.$ac_ext
19947LIBS=$ac_check_lib_save_LIBS
19948fi
19949echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19950echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
19951if test $ac_cv_lib_dl_dlopen = yes; then
19952 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
19953else
19954 echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
19955echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
19956if test "${ac_cv_lib_svld_dlopen+set}" = set; then
19957 echo $ECHO_N "(cached) $ECHO_C" >&6
19958else
19959 ac_check_lib_save_LIBS=$LIBS
19960LIBS="-lsvld $LIBS"
19961cat >conftest.$ac_ext <<_ACEOF
19962/* confdefs.h. */
19963_ACEOF
19964cat confdefs.h >>conftest.$ac_ext
19965cat >>conftest.$ac_ext <<_ACEOF
19966/* end confdefs.h. */
19967
19968/* Override any gcc2 internal prototype to avoid an error. */
19969#ifdef __cplusplus
19970extern "C"
19971#endif
19972/* We use char because int might match the return type of a gcc2
19973 builtin and then its argument prototype would still apply. */
19974char dlopen ();
19975int
19976main ()
19977{
19978dlopen ();
19979 ;
19980 return 0;
19981}
19982_ACEOF
19983rm -f conftest.$ac_objext conftest$ac_exeext
19984if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19985 (eval $ac_link) 2>conftest.er1
19986 ac_status=$?
19987 grep -v '^ *+' conftest.er1 >conftest.err
19988 rm -f conftest.er1
19989 cat conftest.err >&5
19990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19991 (exit $ac_status); } &&
19992 { ac_try='test -z "$ac_c_werror_flag"
19993 || test ! -s conftest.err'
19994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19995 (eval $ac_try) 2>&5
19996 ac_status=$?
19997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19998 (exit $ac_status); }; } &&
19999 { ac_try='test -s conftest$ac_exeext'
20000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20001 (eval $ac_try) 2>&5
20002 ac_status=$?
20003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20004 (exit $ac_status); }; }; then
20005 ac_cv_lib_svld_dlopen=yes
20006else
20007 echo "$as_me: failed program was:" >&5
20008sed 's/^/| /' conftest.$ac_ext >&5
20009
20010ac_cv_lib_svld_dlopen=no
20011fi
20012rm -f conftest.err conftest.$ac_objext \
20013 conftest$ac_exeext conftest.$ac_ext
20014LIBS=$ac_check_lib_save_LIBS
20015fi
20016echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
20017echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
20018if test $ac_cv_lib_svld_dlopen = yes; then
20019 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
20020else
20021 echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
20022echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
20023if test "${ac_cv_lib_dld_dld_link+set}" = set; then
20024 echo $ECHO_N "(cached) $ECHO_C" >&6
20025else
20026 ac_check_lib_save_LIBS=$LIBS
20027LIBS="-ldld $LIBS"
20028cat >conftest.$ac_ext <<_ACEOF
20029/* confdefs.h. */
20030_ACEOF
20031cat confdefs.h >>conftest.$ac_ext
20032cat >>conftest.$ac_ext <<_ACEOF
20033/* end confdefs.h. */
20034
20035/* Override any gcc2 internal prototype to avoid an error. */
20036#ifdef __cplusplus
20037extern "C"
20038#endif
20039/* We use char because int might match the return type of a gcc2
20040 builtin and then its argument prototype would still apply. */
20041char dld_link ();
20042int
20043main ()
20044{
20045dld_link ();
20046 ;
20047 return 0;
20048}
20049_ACEOF
20050rm -f conftest.$ac_objext conftest$ac_exeext
20051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20052 (eval $ac_link) 2>conftest.er1
20053 ac_status=$?
20054 grep -v '^ *+' conftest.er1 >conftest.err
20055 rm -f conftest.er1
20056 cat conftest.err >&5
20057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20058 (exit $ac_status); } &&
20059 { ac_try='test -z "$ac_c_werror_flag"
20060 || test ! -s conftest.err'
20061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20062 (eval $ac_try) 2>&5
20063 ac_status=$?
20064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20065 (exit $ac_status); }; } &&
20066 { ac_try='test -s conftest$ac_exeext'
20067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20068 (eval $ac_try) 2>&5
20069 ac_status=$?
20070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20071 (exit $ac_status); }; }; then
20072 ac_cv_lib_dld_dld_link=yes
20073else
20074 echo "$as_me: failed program was:" >&5
20075sed 's/^/| /' conftest.$ac_ext >&5
20076
20077ac_cv_lib_dld_dld_link=no
20078fi
20079rm -f conftest.err conftest.$ac_objext \
20080 conftest$ac_exeext conftest.$ac_ext
20081LIBS=$ac_check_lib_save_LIBS
20082fi
20083echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
20084echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
20085if test $ac_cv_lib_dld_dld_link = yes; then
5d47bb02 20086 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
da0f6381
PB
20087fi
20088
20089
20090fi
20091
20092
20093fi
20094
20095
20096fi
20097
20098
20099fi
20100
20101
20102fi
20103
20104 ;;
20105 esac
20106
20107 if test "x$lt_cv_dlopen" != xno; then
20108 enable_dlopen=yes
20109 else
20110 enable_dlopen=no
20111 fi
20112
20113 case $lt_cv_dlopen in
20114 dlopen)
20115 save_CPPFLAGS="$CPPFLAGS"
20116 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
20117
20118 save_LDFLAGS="$LDFLAGS"
20119 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
20120
20121 save_LIBS="$LIBS"
20122 LIBS="$lt_cv_dlopen_libs $LIBS"
20123
20124 echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
20125echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
20126if test "${lt_cv_dlopen_self+set}" = set; then
20127 echo $ECHO_N "(cached) $ECHO_C" >&6
20128else
20129 if test "$cross_compiling" = yes; then :
20130 lt_cv_dlopen_self=cross
20131else
20132 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
20133 lt_status=$lt_dlunknown
20134 cat > conftest.$ac_ext <<_LT_EOF
aca600aa 20135#line 20135 "configure"
da0f6381
PB
20136#include "confdefs.h"
20137
20138#if HAVE_DLFCN_H
20139#include <dlfcn.h>
20140#endif
20141
20142#include <stdio.h>
20143
20144#ifdef RTLD_GLOBAL
20145# define LT_DLGLOBAL RTLD_GLOBAL
20146#else
20147# ifdef DL_GLOBAL
20148# define LT_DLGLOBAL DL_GLOBAL
20149# else
20150# define LT_DLGLOBAL 0
20151# endif
20152#endif
20153
20154/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
20155 find out it does not work in some platform. */
20156#ifndef LT_DLLAZY_OR_NOW
20157# ifdef RTLD_LAZY
20158# define LT_DLLAZY_OR_NOW RTLD_LAZY
20159# else
20160# ifdef DL_LAZY
20161# define LT_DLLAZY_OR_NOW DL_LAZY
20162# else
20163# ifdef RTLD_NOW
20164# define LT_DLLAZY_OR_NOW RTLD_NOW
20165# else
20166# ifdef DL_NOW
20167# define LT_DLLAZY_OR_NOW DL_NOW
20168# else
20169# define LT_DLLAZY_OR_NOW 0
20170# endif
20171# endif
20172# endif
20173# endif
20174#endif
20175
da0f6381
PB
20176void fnord() { int i=42;}
20177int main ()
20178{
20179 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
20180 int status = $lt_dlunknown;
20181
20182 if (self)
20183 {
20184 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
20185 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
20186 /* dlclose (self); */
20187 }
20188 else
20189 puts (dlerror ());
20190
5d47bb02 20191 return status;
da0f6381
PB
20192}
20193_LT_EOF
20194 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20195 (eval $ac_link) 2>&5
20196 ac_status=$?
20197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20198 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
20199 (./conftest; exit; ) >&5 2>/dev/null
20200 lt_status=$?
20201 case x$lt_status in
20202 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
20203 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
20204 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
20205 esac
20206 else :
20207 # compilation failed
20208 lt_cv_dlopen_self=no
20209 fi
20210fi
20211rm -fr conftest*
20212
20213
20214fi
20215echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
20216echo "${ECHO_T}$lt_cv_dlopen_self" >&6
20217
20218 if test "x$lt_cv_dlopen_self" = xyes; then
20219 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
20220 echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
20221echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
20222if test "${lt_cv_dlopen_self_static+set}" = set; then
20223 echo $ECHO_N "(cached) $ECHO_C" >&6
20224else
20225 if test "$cross_compiling" = yes; then :
20226 lt_cv_dlopen_self_static=cross
20227else
20228 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
20229 lt_status=$lt_dlunknown
20230 cat > conftest.$ac_ext <<_LT_EOF
aca600aa 20231#line 20231 "configure"
da0f6381
PB
20232#include "confdefs.h"
20233
20234#if HAVE_DLFCN_H
20235#include <dlfcn.h>
20236#endif
20237
20238#include <stdio.h>
20239
20240#ifdef RTLD_GLOBAL
20241# define LT_DLGLOBAL RTLD_GLOBAL
20242#else
20243# ifdef DL_GLOBAL
20244# define LT_DLGLOBAL DL_GLOBAL
20245# else
20246# define LT_DLGLOBAL 0
20247# endif
20248#endif
20249
20250/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
20251 find out it does not work in some platform. */
20252#ifndef LT_DLLAZY_OR_NOW
20253# ifdef RTLD_LAZY
20254# define LT_DLLAZY_OR_NOW RTLD_LAZY
20255# else
20256# ifdef DL_LAZY
20257# define LT_DLLAZY_OR_NOW DL_LAZY
20258# else
20259# ifdef RTLD_NOW
20260# define LT_DLLAZY_OR_NOW RTLD_NOW
20261# else
20262# ifdef DL_NOW
20263# define LT_DLLAZY_OR_NOW DL_NOW
20264# else
20265# define LT_DLLAZY_OR_NOW 0
20266# endif
20267# endif
20268# endif
20269# endif
20270#endif
20271
da0f6381
PB
20272void fnord() { int i=42;}
20273int main ()
20274{
20275 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
20276 int status = $lt_dlunknown;
20277
20278 if (self)
20279 {
20280 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
20281 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
20282 /* dlclose (self); */
20283 }
20284 else
20285 puts (dlerror ());
20286
5d47bb02 20287 return status;
da0f6381
PB
20288}
20289_LT_EOF
20290 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20291 (eval $ac_link) 2>&5
20292 ac_status=$?
20293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20294 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
20295 (./conftest; exit; ) >&5 2>/dev/null
20296 lt_status=$?
20297 case x$lt_status in
20298 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
20299 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
20300 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
20301 esac
20302 else :
20303 # compilation failed
20304 lt_cv_dlopen_self_static=no
20305 fi
20306fi
20307rm -fr conftest*
20308
20309
20310fi
20311echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
20312echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
20313 fi
20314
20315 CPPFLAGS="$save_CPPFLAGS"
20316 LDFLAGS="$save_LDFLAGS"
20317 LIBS="$save_LIBS"
20318 ;;
20319 esac
20320
20321 case $lt_cv_dlopen_self in
20322 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
20323 *) enable_dlopen_self=unknown ;;
20324 esac
20325
20326 case $lt_cv_dlopen_self_static in
20327 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
20328 *) enable_dlopen_self_static=unknown ;;
20329 esac
20330fi
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348striplib=
20349old_striplib=
20350echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
20351echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
20352if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
20353 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
20354 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
20355 echo "$as_me:$LINENO: result: yes" >&5
20356echo "${ECHO_T}yes" >&6
20357else
20358# FIXME - insert some real tests, host_os isn't really good enough
20359 case $host_os in
20360 darwin*)
20361 if test -n "$STRIP" ; then
20362 striplib="$STRIP -x"
20363 old_striplib="$STRIP -S"
20364 echo "$as_me:$LINENO: result: yes" >&5
20365echo "${ECHO_T}yes" >&6
20366 else
20367 echo "$as_me:$LINENO: result: no" >&5
20368echo "${ECHO_T}no" >&6
20369 fi
20370 ;;
20371 *)
20372 echo "$as_me:$LINENO: result: no" >&5
20373echo "${ECHO_T}no" >&6
20374 ;;
20375 esac
20376fi
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389 # Report which library types will actually be built
20390 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
20391echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
20392 echo "$as_me:$LINENO: result: $can_build_shared" >&5
20393echo "${ECHO_T}$can_build_shared" >&6
20394
20395 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
20396echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
20397 test "$can_build_shared" = "no" && enable_shared=no
20398
20399 # On AIX, shared libraries and static libraries use the same namespace, and
20400 # are all built from PIC.
20401 case $host_os in
20402 aix3*)
20403 test "$enable_shared" = yes && enable_static=no
20404 if test -n "$RANLIB"; then
20405 archive_cmds="$archive_cmds~\$RANLIB \$lib"
20406 postinstall_cmds='$RANLIB $lib'
20407 fi
20408 ;;
20409
20410 aix[4-9]*)
20411 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
20412 test "$enable_shared" = yes && enable_static=no
20413 fi
20414 ;;
20415 esac
20416 echo "$as_me:$LINENO: result: $enable_shared" >&5
20417echo "${ECHO_T}$enable_shared" >&6
20418
20419 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
20420echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
20421 # Make sure either enable_shared or enable_static is yes.
20422 test "$enable_shared" = yes || enable_static=yes
20423 echo "$as_me:$LINENO: result: $enable_static" >&5
20424echo "${ECHO_T}$enable_static" >&6
20425
20426
20427
20428
20429fi
20430ac_ext=c
20431ac_cpp='$CPP $CPPFLAGS'
20432ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20433ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20434ac_compiler_gnu=$ac_cv_c_compiler_gnu
20435
20436CC="$lt_save_CC"
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453# Only expand once:
20454
20455
20456
20457
20458
20459# Identify the assembler which will work hand-in-glove with the newly
20460# built GCC, so that we can examine its features. This is the assembler
20461# which will be driven by the driver program.
20462#
20463# If build != host, and we aren't building gas in-tree, we identify a
20464# build->target assembler and hope that it will have the same features
20465# as the host->target assembler we'll be using.
20466gcc_cv_gas_major_version=
20467gcc_cv_gas_minor_version=
20468gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
20469
20470if test "${gcc_cv_as+set}" = set; then
20471 :
20472else
20473
20474if test -x "$DEFAULT_ASSEMBLER"; then
20475 gcc_cv_as="$DEFAULT_ASSEMBLER"
20476elif test -f $gcc_cv_as_gas_srcdir/configure.in \
20477 && test -f ../gas/Makefile \
20478 && test x$build = x$host; then
20479 gcc_cv_as=../gas/as-new$build_exeext
20480elif test -x as$build_exeext; then
20481 # Build using assembler in the current directory.
20482 gcc_cv_as=./as$build_exeext
20483elif test -x $AS_FOR_TARGET; then
20484 gcc_cv_as="$AS_FOR_TARGET"
20485else
20486 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
20487set dummy $AS_FOR_TARGET; ac_word=$2
20488echo "$as_me:$LINENO: checking for $ac_word" >&5
20489echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20490if test "${ac_cv_path_gcc_cv_as+set}" = set; then
20491 echo $ECHO_N "(cached) $ECHO_C" >&6
20492else
20493 case $gcc_cv_as in
20494 [\\/]* | ?:[\\/]*)
20495 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
20496 ;;
20497 *)
20498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20499for as_dir in $PATH
20500do
20501 IFS=$as_save_IFS
20502 test -z "$as_dir" && as_dir=.
20503 for ac_exec_ext in '' $ac_executable_extensions; do
20504 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20505 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
20506 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20507 break 2
20508 fi
20509done
20510done
20511
20512 ;;
20513esac
20514fi
20515gcc_cv_as=$ac_cv_path_gcc_cv_as
20516
20517if test -n "$gcc_cv_as"; then
20518 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
20519echo "${ECHO_T}$gcc_cv_as" >&6
20520else
20521 echo "$as_me:$LINENO: result: no" >&5
20522echo "${ECHO_T}no" >&6
20523fi
20524
20525fi
20526fi
20527
20528
20529ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
20530
20531case "$ORIGINAL_AS_FOR_TARGET" in
20532 ./as | ./as$build_exeext) ;;
20533 *) ac_config_files="$ac_config_files as:exec-tool.in"
20534 ;;
20535esac
20536
20537echo "$as_me:$LINENO: checking what assembler to use" >&5
20538echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
20539if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
20540 # Single tree build which includes gas. We want to prefer it
20541 # over whatever linker top-level may have detected, since
20542 # we'll use what we're building after installation anyway.
20543 echo "$as_me:$LINENO: result: newly built gas" >&5
20544echo "${ECHO_T}newly built gas" >&6
20545 in_tree_gas=yes
20546 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20547for f in $gcc_cv_as_bfd_srcdir/configure \
20548 $gcc_cv_as_gas_srcdir/configure \
20549 $gcc_cv_as_gas_srcdir/configure.in \
20550 $gcc_cv_as_gas_srcdir/Makefile.in ; do
20551 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20552 if test x$gcc_cv_gas_version != x; then
20553 break
20554 fi
20555done
20556gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
20557gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20558gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
20559case $gcc_cv_gas_patch_version in
20560 "") gcc_cv_gas_patch_version="0" ;;
20561esac
20562gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
20563 + $gcc_cv_gas_minor_version \) \* 1000 \
20564 + $gcc_cv_gas_patch_version`
20565
20566 in_tree_gas_is_elf=no
20567 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
20568 || (grep 'obj_format = multi' ../gas/Makefile \
20569 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
20570 then
20571 in_tree_gas_is_elf=yes
20572 fi
20573else
20574 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
20575echo "${ECHO_T}$gcc_cv_as" >&6
20576 in_tree_gas=no
20577fi
20578
20579# Identify the linker which will work hand-in-glove with the newly
20580# built GCC, so that we can examine its features. This is the linker
20581# which will be driven by the driver program.
20582#
20583# If build != host, and we aren't building gas in-tree, we identify a
20584# build->target linker and hope that it will have the same features
20585# as the host->target linker we'll be using.
20586gcc_cv_gld_major_version=
20587gcc_cv_gld_minor_version=
20588gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
20589gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
20590
20591if test "${gcc_cv_ld+set}" = set; then
20592 :
20593else
20594
20595if test -x "$DEFAULT_LINKER"; then
20596 gcc_cv_ld="$DEFAULT_LINKER"
20597elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
20598 && test -f ../ld/Makefile \
20599 && test x$build = x$host; then
20600 gcc_cv_ld=../ld/ld-new$build_exeext
e8b05380
PB
20601elif test -x collect-ld$build_exeext; then
20602 # Build using linker in the current directory.
20603 gcc_cv_ld=./collect-ld$build_exeext
20604elif test -x $LD_FOR_TARGET; then
20605 gcc_cv_ld="$LD_FOR_TARGET"
20606else
20607 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
20608set dummy $LD_FOR_TARGET; ac_word=$2
b61ff9c8
BS
20609echo "$as_me:$LINENO: checking for $ac_word" >&5
20610echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 20611if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
d739199a
DJ
20612 echo $ECHO_N "(cached) $ECHO_C" >&6
20613else
e8b05380 20614 case $gcc_cv_ld in
d739199a 20615 [\\/]* | ?:[\\/]*)
e8b05380 20616 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
20617 ;;
20618 *)
20619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20620for as_dir in $PATH
20621do
20622 IFS=$as_save_IFS
20623 test -z "$as_dir" && as_dir=.
20624 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 20625 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 20626 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
20627 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20628 break 2
20629 fi
20630done
20631done
20632
20633 ;;
20634esac
20635fi
e8b05380 20636gcc_cv_ld=$ac_cv_path_gcc_cv_ld
b61ff9c8 20637
e8b05380 20638if test -n "$gcc_cv_ld"; then
b61ff9c8
BS
20639 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
20640echo "${ECHO_T}$gcc_cv_ld" >&6
d739199a 20641else
b61ff9c8
BS
20642 echo "$as_me:$LINENO: result: no" >&5
20643echo "${ECHO_T}no" >&6
d739199a
DJ
20644fi
20645
20646fi
e8b05380
PB
20647fi
20648
20649
20650ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
20651
be0fe523
PB
20652case "$ORIGINAL_LD_FOR_TARGET" in
20653 ./collect-ld | ./collect-ld$build_exeext) ;;
b61ff9c8 20654 *) ac_config_files="$ac_config_files collect-ld:exec-tool.in"
be0fe523
PB
20655 ;;
20656esac
e8b05380 20657
b61ff9c8
BS
20658echo "$as_me:$LINENO: checking what linker to use" >&5
20659echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
e8b05380
PB
20660if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
20661 # Single tree build which includes ld. We want to prefer it
20662 # over whatever linker top-level may have detected, since
20663 # we'll use what we're building after installation anyway.
b61ff9c8
BS
20664 echo "$as_me:$LINENO: result: newly built ld" >&5
20665echo "${ECHO_T}newly built ld" >&6
e8b05380
PB
20666 in_tree_ld=yes
20667 in_tree_ld_is_elf=no
20668 if (grep 'EMUL = .*elf' ../ld/Makefile \
20669 || grep 'EMUL = .*linux' ../ld/Makefile \
20670 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
20671 in_tree_ld_is_elf=yes
20672 fi
20673 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
20674 do
20675 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
20676 if test x$gcc_cv_gld_version != x; then
20677 break
20678 fi
20679 done
20680 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
20681 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
20682else
b61ff9c8
BS
20683 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
20684echo "${ECHO_T}$gcc_cv_ld" >&6
e8b05380
PB
20685 in_tree_ld=no
20686fi
20687
20688# Figure out what nm we will be using.
20689gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
20690if test "${gcc_cv_nm+set}" = set; then
20691 :
20692else
20693
20694if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20695 && test -f ../binutils/Makefile \
20696 && test x$build = x$host; then
e8b05380
PB
20697 gcc_cv_nm=../binutils/nm-new$build_exeext
20698elif test -x nm$build_exeext; then
20699 gcc_cv_nm=./nm$build_exeext
20700elif test -x $NM_FOR_TARGET; then
20701 gcc_cv_nm="$NM_FOR_TARGET"
20702else
20703 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
20704set dummy $NM_FOR_TARGET; ac_word=$2
b61ff9c8
BS
20705echo "$as_me:$LINENO: checking for $ac_word" >&5
20706echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 20707if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
d739199a
DJ
20708 echo $ECHO_N "(cached) $ECHO_C" >&6
20709else
e8b05380 20710 case $gcc_cv_nm in
d739199a 20711 [\\/]* | ?:[\\/]*)
e8b05380 20712 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
20713 ;;
20714 *)
20715 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20716for as_dir in $PATH
20717do
20718 IFS=$as_save_IFS
20719 test -z "$as_dir" && as_dir=.
20720 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 20721 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 20722 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
20723 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20724 break 2
20725 fi
20726done
20727done
20728
20729 ;;
20730esac
20731fi
e8b05380 20732gcc_cv_nm=$ac_cv_path_gcc_cv_nm
b61ff9c8 20733
e8b05380 20734if test -n "$gcc_cv_nm"; then
b61ff9c8
BS
20735 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
20736echo "${ECHO_T}$gcc_cv_nm" >&6
d739199a 20737else
b61ff9c8
BS
20738 echo "$as_me:$LINENO: result: no" >&5
20739echo "${ECHO_T}no" >&6
d739199a
DJ
20740fi
20741
20742fi
e8b05380 20743fi
d739199a 20744
e8b05380 20745
b61ff9c8
BS
20746echo "$as_me:$LINENO: checking what nm to use" >&5
20747echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
e8b05380
PB
20748if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
20749 # Single tree build which includes binutils.
b61ff9c8
BS
20750 echo "$as_me:$LINENO: result: newly built nm" >&5
20751echo "${ECHO_T}newly built nm" >&6
e8b05380
PB
20752 in_tree_nm=yes
20753else
b61ff9c8
BS
20754 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
20755echo "${ECHO_T}$gcc_cv_nm" >&6
e8b05380
PB
20756 in_tree_nm=no
20757fi
20758
20759ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
20760
be0fe523
PB
20761case "$ORIGINAL_NM_FOR_TARGET" in
20762 ./nm | ./nm$build_exeext) ;;
b61ff9c8 20763 *) ac_config_files="$ac_config_files nm:exec-tool.in"
be0fe523
PB
20764 ;;
20765esac
20766
e8b05380
PB
20767
20768# Figure out what objdump we will be using.
20769if test "${gcc_cv_objdump+set}" = set; then
20770 :
20771else
20772
20773if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
20774 && test -f ../binutils/Makefile \
20775 && test x$build = x$host; then
e8b05380
PB
20776 # Single tree build which includes binutils.
20777 gcc_cv_objdump=../binutils/objdump$build_exeext
20778elif test -x objdump$build_exeext; then
20779 gcc_cv_objdump=./objdump$build_exeext
20780elif test -x $OBJDUMP_FOR_TARGET; then
20781 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
20782else
20783 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
20784set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
b61ff9c8
BS
20785echo "$as_me:$LINENO: checking for $ac_word" >&5
20786echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 20787if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
9f18db39
PB
20788 echo $ECHO_N "(cached) $ECHO_C" >&6
20789else
e8b05380 20790 case $gcc_cv_objdump in
9f18db39 20791 [\\/]* | ?:[\\/]*)
e8b05380 20792 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
20793 ;;
20794 *)
20795 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 20796for as_dir in $PATH
9f18db39
PB
20797do
20798 IFS=$as_save_IFS
20799 test -z "$as_dir" && as_dir=.
20800 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 20801 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 20802 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
9f18db39
PB
20803 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20804 break 2
20805 fi
20806done
20807done
779243f7 20808
9f18db39
PB
20809 ;;
20810esac
20811fi
e8b05380 20812gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
b61ff9c8 20813
e8b05380 20814if test -n "$gcc_cv_objdump"; then
b61ff9c8
BS
20815 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
20816echo "${ECHO_T}$gcc_cv_objdump" >&6
9f18db39 20817else
b61ff9c8
BS
20818 echo "$as_me:$LINENO: result: no" >&5
20819echo "${ECHO_T}no" >&6
9f18db39
PB
20820fi
20821
e8b05380
PB
20822fi
20823fi
9f18db39 20824
e8b05380 20825
b61ff9c8
BS
20826echo "$as_me:$LINENO: checking what objdump to use" >&5
20827echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
e8b05380
PB
20828if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
20829 # Single tree build which includes binutils.
b61ff9c8
BS
20830 echo "$as_me:$LINENO: result: newly built objdump" >&5
20831echo "${ECHO_T}newly built objdump" >&6
e8b05380 20832elif test x$gcc_cv_objdump = x; then
b61ff9c8
BS
20833 echo "$as_me:$LINENO: result: not found" >&5
20834echo "${ECHO_T}not found" >&6
e8b05380 20835else
b61ff9c8
BS
20836 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
20837echo "${ECHO_T}$gcc_cv_objdump" >&6
a2eafc76 20838fi
3cae5780 20839
6e97481b
JJ
20840# Figure out what readelf we will be using.
20841if test "${gcc_cv_readelf+set}" = set; then
20842 :
20843else
20844
20845if test -f $gcc_cv_binutils_srcdir/configure.in \
20846 && test -f ../binutils/Makefile \
20847 && test x$build = x$host; then
20848 # Single tree build which includes binutils.
20849 gcc_cv_readelf=../binutils/readelf$build_exeext
20850elif test -x readelf$build_exeext; then
20851 gcc_cv_readelf=./readelf$build_exeext
20852else
20853 # Extract the first word of "readelf", so it can be a program name with args.
20854set dummy readelf; ac_word=$2
20855echo "$as_me:$LINENO: checking for $ac_word" >&5
20856echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20857if test "${ac_cv_path_gcc_cv_readelf+set}" = set; then
20858 echo $ECHO_N "(cached) $ECHO_C" >&6
20859else
20860 case $gcc_cv_readelf in
20861 [\\/]* | ?:[\\/]*)
20862 ac_cv_path_gcc_cv_readelf="$gcc_cv_readelf" # Let the user override the test with a path.
20863 ;;
20864 *)
20865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20866for as_dir in $PATH
20867do
20868 IFS=$as_save_IFS
20869 test -z "$as_dir" && as_dir=.
20870 for ac_exec_ext in '' $ac_executable_extensions; do
20871 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20872 ac_cv_path_gcc_cv_readelf="$as_dir/$ac_word$ac_exec_ext"
20873 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20874 break 2
20875 fi
20876done
20877done
20878
20879 ;;
20880esac
20881fi
20882gcc_cv_readelf=$ac_cv_path_gcc_cv_readelf
20883
20884if test -n "$gcc_cv_readelf"; then
20885 echo "$as_me:$LINENO: result: $gcc_cv_readelf" >&5
20886echo "${ECHO_T}$gcc_cv_readelf" >&6
20887else
20888 echo "$as_me:$LINENO: result: no" >&5
20889echo "${ECHO_T}no" >&6
20890fi
20891
20892fi
20893fi
20894
20895
20896echo "$as_me:$LINENO: checking what readelf to use" >&5
20897echo $ECHO_N "checking what readelf to use... $ECHO_C" >&6
20898if test "$gcc_cv_readelf" = ../binutils/readelf$build_exeext; then
20899 # Single tree build which includes binutils.
20900 echo "$as_me:$LINENO: result: newly built readelf" >&5
20901echo "${ECHO_T}newly built readelf" >&6
20902elif test x$gcc_cv_readelf = x; then
20903 echo "$as_me:$LINENO: result: not found" >&5
20904echo "${ECHO_T}not found" >&6
20905else
20906 echo "$as_me:$LINENO: result: $gcc_cv_readelf" >&5
20907echo "${ECHO_T}$gcc_cv_readelf" >&6
20908fi
20909
981d4858 20910# Figure out what assembler alignment features are present.
b61ff9c8
BS
20911echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
20912echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
ba479fd2
NN
20913if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
20914 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20915else
20916 gcc_cv_as_balign_and_p2align=no
20917 if test $in_tree_gas = yes; then
20918 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
20919 then gcc_cv_as_balign_and_p2align=yes
20920fi
20921 elif test x$gcc_cv_as != x; then
6e3f3080 20922 echo '.balign 4
8ada417f 20923.p2align 2' > conftest.s
ba479fd2
NN
20924 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20926 (eval $ac_try) 2>&5
20927 ac_status=$?
20928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20929 (exit $ac_status); }; }
8ada417f
ZW
20930 then
20931 gcc_cv_as_balign_and_p2align=yes
20932 else
20933 echo "configure: failed program was" >&5
20934 cat conftest.s >&5
20935 fi
20936 rm -f conftest.o conftest.s
20937 fi
20938fi
b61ff9c8
BS
20939echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
20940echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 20941if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
20942
20943cat >>confdefs.h <<\_ACEOF
981d4858 20944#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 20945_ACEOF
981d4858 20946
ad9c4d9f
NN
20947fi
20948
b61ff9c8
BS
20949echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
20950echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
ba479fd2
NN
20951if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
20952 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
20953else
20954 gcc_cv_as_max_skip_p2align=no
20955 if test $in_tree_gas = yes; then
20956 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
20957 then gcc_cv_as_max_skip_p2align=yes
20958fi
20959 elif test x$gcc_cv_as != x; then
6e3f3080 20960 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
20961 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
20962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20963 (eval $ac_try) 2>&5
20964 ac_status=$?
20965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20966 (exit $ac_status); }; }
8ada417f
ZW
20967 then
20968 gcc_cv_as_max_skip_p2align=yes
20969 else
20970 echo "configure: failed program was" >&5
20971 cat conftest.s >&5
20972 fi
20973 rm -f conftest.o conftest.s
20974 fi
ad9c4d9f 20975fi
b61ff9c8
BS
20976echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
20977echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 20978if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
20979
20980cat >>confdefs.h <<\_ACEOF
9e423e6d 20981#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 20982_ACEOF
9e423e6d 20983
9e423e6d 20984fi
ad9c4d9f 20985
b61ff9c8
BS
20986echo "$as_me:$LINENO: checking assembler for .literal16" >&5
20987echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6
5708d18d
MS
20988if test "${gcc_cv_as_literal16+set}" = set; then
20989 echo $ECHO_N "(cached) $ECHO_C" >&6
20990else
20991 gcc_cv_as_literal16=no
20992 if test $in_tree_gas = yes; then
20993 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
20994 then gcc_cv_as_literal16=yes
20995fi
20996 elif test x$gcc_cv_as != x; then
20997 echo '.literal16' > conftest.s
20998 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
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 then
21005 gcc_cv_as_literal16=yes
21006 else
21007 echo "configure: failed program was" >&5
21008 cat conftest.s >&5
21009 fi
21010 rm -f conftest.o conftest.s
21011 fi
21012fi
b61ff9c8
BS
21013echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5
21014echo "${ECHO_T}$gcc_cv_as_literal16" >&6
5708d18d
MS
21015if test $gcc_cv_as_literal16 = yes; then
21016
21017cat >>confdefs.h <<\_ACEOF
21018#define HAVE_GAS_LITERAL16 1
21019_ACEOF
21020
21021fi
21022
b61ff9c8
BS
21023echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
21024echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
ba479fd2
NN
21025if test "${gcc_cv_as_subsection_m1+set}" = set; then
21026 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
21027else
21028 gcc_cv_as_subsection_m1=no
21029 if test $in_tree_gas = yes; then
21030 if test $in_tree_gas_is_elf = yes \
21031 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
21032 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 21033fi
8ada417f 21034 elif test x$gcc_cv_as != x; then
6e3f3080 21035 echo 'conftest_label1: .word 0
d1accaa3
JJ
21036.subsection -1
21037conftest_label2: .word 0
8ada417f 21038.previous' > conftest.s
ba479fd2
NN
21039 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21041 (eval $ac_try) 2>&5
21042 ac_status=$?
21043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21044 (exit $ac_status); }; }
8ada417f
ZW
21045 then
21046 if test x$gcc_cv_nm != x; then
21047 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
21048 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
21049 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
21050 then :
21051 else gcc_cv_as_subsection_m1=yes
21052 fi
21053 rm -f conftest.nm1 conftest.nm2
21054 fi
21055 else
21056 echo "configure: failed program was" >&5
21057 cat conftest.s >&5
21058 fi
21059 rm -f conftest.o conftest.s
21060 fi
981d4858 21061fi
b61ff9c8
BS
21062echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
21063echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 21064if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
21065
21066cat >>confdefs.h <<\_ACEOF
981d4858 21067#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 21068_ACEOF
981d4858 21069
d1accaa3 21070fi
ad9c4d9f 21071
b61ff9c8
BS
21072echo "$as_me:$LINENO: checking assembler for .weak" >&5
21073echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
ba479fd2
NN
21074if test "${gcc_cv_as_weak+set}" = set; then
21075 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
21076else
21077 gcc_cv_as_weak=no
21078 if test $in_tree_gas = yes; then
21079 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
21080 then gcc_cv_as_weak=yes
ad9c4d9f 21081fi
8ada417f 21082 elif test x$gcc_cv_as != x; then
6e3f3080 21083 echo ' .weak foobar' > conftest.s
ba479fd2
NN
21084 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21086 (eval $ac_try) 2>&5
21087 ac_status=$?
21088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21089 (exit $ac_status); }; }
8ada417f
ZW
21090 then
21091 gcc_cv_as_weak=yes
21092 else
21093 echo "configure: failed program was" >&5
21094 cat conftest.s >&5
21095 fi
21096 rm -f conftest.o conftest.s
21097 fi
981d4858 21098fi
b61ff9c8
BS
21099echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
21100echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 21101if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
21102
21103cat >>confdefs.h <<\_ACEOF
981d4858 21104#define HAVE_GAS_WEAK 1
ba479fd2 21105_ACEOF
981d4858 21106
12822146 21107fi
ad9c4d9f 21108
b61ff9c8
BS
21109echo "$as_me:$LINENO: checking assembler for .weakref" >&5
21110echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
a0203ca7
AO
21111if test "${gcc_cv_as_weakref+set}" = set; then
21112 echo $ECHO_N "(cached) $ECHO_C" >&6
21113else
21114 gcc_cv_as_weakref=no
21115 if test $in_tree_gas = yes; then
21116 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
21117 then gcc_cv_as_weakref=yes
21118fi
21119 elif test x$gcc_cv_as != x; then
21120 echo ' .weakref foobar, barfnot' > conftest.s
21121 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21123 (eval $ac_try) 2>&5
21124 ac_status=$?
21125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21126 (exit $ac_status); }; }
21127 then
21128 gcc_cv_as_weakref=yes
21129 else
21130 echo "configure: failed program was" >&5
21131 cat conftest.s >&5
21132 fi
21133 rm -f conftest.o conftest.s
21134 fi
21135fi
b61ff9c8
BS
21136echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
21137echo "${ECHO_T}$gcc_cv_as_weakref" >&6
a0203ca7
AO
21138if test $gcc_cv_as_weakref = yes; then
21139
21140cat >>confdefs.h <<\_ACEOF
21141#define HAVE_GAS_WEAKREF 1
21142_ACEOF
21143
21144fi
21145
b61ff9c8
BS
21146echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
21147echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
e41f3691
JDA
21148if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
21149 echo $ECHO_N "(cached) $ECHO_C" >&6
21150else
21151 gcc_cv_as_nsubspa_comdat=no
21152 if test $in_tree_gas = yes; then
21153 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
21154 then gcc_cv_as_nsubspa_comdat=yes
21155fi
21156 elif test x$gcc_cv_as != x; then
21157 echo ' .SPACE $TEXT$
21158 .NSUBSPA $CODE$,COMDAT' > conftest.s
21159 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21161 (eval $ac_try) 2>&5
21162 ac_status=$?
21163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21164 (exit $ac_status); }; }
21165 then
21166 gcc_cv_as_nsubspa_comdat=yes
21167 else
21168 echo "configure: failed program was" >&5
21169 cat conftest.s >&5
21170 fi
21171 rm -f conftest.o conftest.s
21172 fi
21173fi
b61ff9c8
BS
21174echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
21175echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
e41f3691
JDA
21176if test $gcc_cv_as_nsubspa_comdat = yes; then
21177
21178cat >>confdefs.h <<\_ACEOF
21179#define HAVE_GAS_NSUBSPA_COMDAT 1
21180_ACEOF
21181
21182fi
21183
8ada417f
ZW
21184# .hidden needs to be supported in both the assembler and the linker,
21185# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
21186# This is irritatingly difficult to feature test for; we have to check the
21187# date string after the version number. If we've got an in-tree
21188# ld, we don't know its patchlevel version, so we set the baseline at 2.13
21189# to be safe.
21190# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
b61ff9c8
BS
21191echo "$as_me:$LINENO: checking assembler for .hidden" >&5
21192echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
ba479fd2
NN
21193if test "${gcc_cv_as_hidden+set}" = set; then
21194 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
21195else
21196 gcc_cv_as_hidden=no
21197 if test $in_tree_gas = yes; then
21198 if test $in_tree_gas_is_elf = yes \
21199 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
21200 then gcc_cv_as_hidden=yes
21201fi
21202 elif test x$gcc_cv_as != x; then
6e3f3080 21203 echo ' .hidden foobar
8ada417f 21204foobar:' > conftest.s
ba479fd2
NN
21205 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21207 (eval $ac_try) 2>&5
21208 ac_status=$?
21209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21210 (exit $ac_status); }; }
8ada417f
ZW
21211 then
21212 gcc_cv_as_hidden=yes
21213 else
21214 echo "configure: failed program was" >&5
21215 cat conftest.s >&5
21216 fi
21217 rm -f conftest.o conftest.s
21218 fi
21219fi
b61ff9c8
BS
21220echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
21221echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 21222
ad9c4d9f 21223
b61ff9c8
BS
21224echo "$as_me:$LINENO: checking linker for .hidden support" >&5
21225echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
ba479fd2
NN
21226if test "${gcc_cv_ld_hidden+set}" = set; then
21227 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
21228else
21229 if test $in_tree_ld = yes ; then
21230 gcc_cv_ld_hidden=no
21231 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 \
21232 && test $in_tree_ld_is_elf = yes; then
21233 gcc_cv_ld_hidden=yes
21234 fi
21235else
21236 gcc_cv_ld_hidden=yes
bace148a 21237 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
21238 if echo "$ld_ver" | grep GNU > /dev/null; then
21239 ld_vers=`echo $ld_ver | sed -n \
115e6e55 21240 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
8ada417f 21241 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
21242 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
21243 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
21244 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
21245 if test 0"$ld_date" -lt 20020404; then
21246 if test -n "$ld_date"; then
21247 # If there was date string, but was earlier than 2002-04-04, fail
21248 gcc_cv_ld_hidden=no
21249 elif test -z "$ld_vers"; then
21250 # If there was no date string nor ld version number, something is wrong
21251 gcc_cv_ld_hidden=no
21252 else
8ada417f
ZW
21253 test -z "$ld_vers_patch" && ld_vers_patch=0
21254 if test "$ld_vers_major" -lt 2; then
21255 gcc_cv_ld_hidden=no
21256 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
21257 gcc_cv_ld_hidden="no"
21258 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
21259 gcc_cv_ld_hidden=no
c72931a6 21260 fi
8ada417f 21261 fi
789b7de5 21262 fi
8ada417f 21263 else
28690784 21264 case "${target}" in
b0fd7d27 21265 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
21266 gcc_cv_ld_hidden=yes
21267 ;;
5e87dc23
RO
21268 *-*-solaris2.9* | *-*-solaris2.1[0-9]*)
21269 gcc_cv_ld_hidden=yes
21270 ;;
28690784
JDA
21271 *)
21272 gcc_cv_ld_hidden=no
21273 ;;
21274 esac
8ada417f
ZW
21275 fi
21276fi
6d07784a 21277fi
b61ff9c8
BS
21278echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
21279echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 21280libgcc_visibility=no
ad9c4d9f 21281
232b67d9 21282
8e3940b2 21283if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 21284 libgcc_visibility=yes
ba479fd2
NN
21285
21286cat >>confdefs.h <<\_ACEOF
8ada417f 21287#define HAVE_GAS_HIDDEN 1
ba479fd2 21288_ACEOF
ad9c4d9f
NN
21289
21290fi
21291
e73da78e
RO
21292echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
21293echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
21294gcc_cv_ld_ro_rw_mix=unknown
21295if test $in_tree_ld = yes ; then
21296 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 \
21297 && test $in_tree_ld_is_elf = yes; then
21298 gcc_cv_ld_ro_rw_mix=read-write
21299 fi
21300elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
21301 echo '.section myfoosect, "a"' > conftest1.s
21302 echo '.section myfoosect, "aw"' > conftest2.s
21303 echo '.byte 1' >> conftest2.s
21304 echo '.section myfoosect, "a"' > conftest3.s
21305 echo '.byte 0' >> conftest3.s
21306 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
21307 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
21308 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
21309 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
21310 conftest2.o conftest3.o > /dev/null 2>&1; then
21311 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
21312 | sed -e '/myfoosect/!d' -e N`
21313 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
21314 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
21315 gcc_cv_ld_ro_rw_mix=read-only
21316 else
21317 gcc_cv_ld_ro_rw_mix=read-write
21318 fi
21319 fi
21320 fi
21321 rm -f conftest.* conftest[123].*
21322fi
21323if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
21324
21325cat >>confdefs.h <<\_ACEOF
21326#define HAVE_LD_RO_RW_SECTION_MIXING 1
21327_ACEOF
21328
21329fi
21330echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
21331echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
21332
8ada417f 21333# Check if we have .[us]leb128, and support symbol arithmetic with it.
b61ff9c8
BS
21334echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
21335echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
ba479fd2
NN
21336if test "${gcc_cv_as_leb128+set}" = set; then
21337 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
21338else
21339 gcc_cv_as_leb128=no
21340 if test $in_tree_gas = yes; then
21341 if test $in_tree_gas_is_elf = yes \
21342 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
21343 then gcc_cv_as_leb128=yes
21344fi
21345 elif test x$gcc_cv_as != x; then
6e3f3080 21346 echo ' .data
b7460f24
RH
21347 .uleb128 L2 - L1
21348L1:
21349 .uleb128 1280
21350 .sleb128 -1010
8ada417f 21351L2:' > conftest.s
ba479fd2
NN
21352 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21354 (eval $ac_try) 2>&5
21355 ac_status=$?
21356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21357 (exit $ac_status); }; }
8ada417f
ZW
21358 then
21359 # GAS versions before 2.11 do not support uleb128,
21360 # despite appearing to.
21361 # ??? There exists an elf-specific test that will crash
21362 # the assembler. Perhaps it's better to figure out whether
21363 # arbitrary sections are supported and try the test.
bace148a 21364 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f 21365 if echo "$as_ver" | grep GNU > /dev/null; then
ddcd0f6f 21366 as_vers=`echo $as_ver | sed -n \
115e6e55 21367 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
ddcd0f6f
BS
21368 as_major=`expr "$as_vers" : '\([0-9]*\)'`
21369 as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
21370 if test $as_major -eq 2 && test $as_minor -lt 11
21371 then :
21372 else gcc_cv_as_leb128=yes
21373 fi
21374 fi
21375 else
21376 echo "configure: failed program was" >&5
21377 cat conftest.s >&5
21378 fi
21379 rm -f conftest.o conftest.s
21380 fi
b7460f24 21381fi
b61ff9c8
BS
21382echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
21383echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 21384if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
21385
21386cat >>confdefs.h <<\_ACEOF
b7460f24 21387#define HAVE_AS_LEB128 1
ba479fd2 21388_ACEOF
b7460f24
RH
21389
21390fi
ad9c4d9f 21391
d4ea4622
RH
21392# Check if we have assembler support for unwind directives.
21393echo "$as_me:$LINENO: checking assembler for cfi directives" >&5
21394echo $ECHO_N "checking assembler for cfi directives... $ECHO_C" >&6
21395if test "${gcc_cv_as_cfi_directive+set}" = set; then
21396 echo $ECHO_N "(cached) $ECHO_C" >&6
21397else
21398 gcc_cv_as_cfi_directive=no
6e60703f 21399 if test x$gcc_cv_as != x; then
d4ea4622
RH
21400 echo ' .text
21401 .cfi_startproc
21402 .cfi_offset 0, 0
21403 .cfi_same_value 1
21404 .cfi_def_cfa 1, 2
21405 .cfi_escape 1, 2, 3, 4, 5
21406 .cfi_endproc' > conftest.s
21407 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21409 (eval $ac_try) 2>&5
21410 ac_status=$?
21411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21412 (exit $ac_status); }; }
21413 then
e73da78e
RO
21414 case "$target" in
21415 *-*-solaris*)
21416 # If the linker used on Solaris (like Sun ld) isn't capable of merging
21417 # read-only and read-write sections, we need to make sure that the
21418 # assembler used emits read-write .eh_frame sections.
21419 if test "x$gcc_cv_ld_ro_rw_mix" != xread-write; then
21420 if test "x$gcc_cv_objdump" != x; then
21421 if $gcc_cv_objdump -h conftest.o 2>/dev/null | \
21422 sed -e /.eh_frame/!d -e N | grep READONLY > /dev/null; then
21423 gcc_cv_as_cfi_directive=no
21424 else
21425 gcc_cv_as_cfi_directive=yes
21426 fi
21427 else
21428 # no objdump, err on the side of caution
21429 gcc_cv_as_cfi_directive=no
21430 fi
21431 else
21432 gcc_cv_as_cfi_directive=yes
21433 fi
21434 ;;
21435 *-*-*)
21436 gcc_cv_as_cfi_directive=yes
21437 ;;
21438esac
d4ea4622
RH
21439 else
21440 echo "configure: failed program was" >&5
21441 cat conftest.s >&5
21442 fi
21443 rm -f conftest.o conftest.s
21444 fi
21445fi
21446echo "$as_me:$LINENO: result: $gcc_cv_as_cfi_directive" >&5
21447echo "${ECHO_T}$gcc_cv_as_cfi_directive" >&6
21448
6e97481b
JJ
21449if test $gcc_cv_as_cfi_directive = yes && test x$gcc_cv_readelf != x; then
21450echo "$as_me:$LINENO: checking assembler for working cfi advance" >&5
21451echo $ECHO_N "checking assembler for working cfi advance... $ECHO_C" >&6
21452if test "${gcc_cv_as_cfi_advance_working+set}" = set; then
21453 echo $ECHO_N "(cached) $ECHO_C" >&6
21454else
21455 gcc_cv_as_cfi_advance_working=no
21456 if test x$gcc_cv_as != x; then
21457 echo ' .text
21458 .cfi_startproc
21459 .cfi_adjust_cfa_offset 64
21460 .skip 512, 0
21461 .cfi_adjust_cfa_offset 128
21462 .cfi_endproc' > conftest.s
21463 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21465 (eval $ac_try) 2>&5
21466 ac_status=$?
21467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21468 (exit $ac_status); }; }
21469 then
21470
21471if $gcc_cv_readelf -wf conftest.o 2>/dev/null \
21472 | grep 'DW_CFA_advance_loc[12]:[ ][ ]*512[ ]' >/dev/null; then
21473 gcc_cv_as_cfi_advance_working=yes
21474fi
21475
21476 else
21477 echo "configure: failed program was" >&5
21478 cat conftest.s >&5
21479 fi
21480 rm -f conftest.o conftest.s
21481 fi
21482fi
21483echo "$as_me:$LINENO: result: $gcc_cv_as_cfi_advance_working" >&5
21484echo "${ECHO_T}$gcc_cv_as_cfi_advance_working" >&6
21485
21486else
66f91112
EB
21487 # no readelf, err on the side of caution
21488 gcc_cv_as_cfi_advance_working=no
6e97481b 21489fi
d4ea4622
RH
21490
21491cat >>confdefs.h <<_ACEOF
6e97481b
JJ
21492#define HAVE_GAS_CFI_DIRECTIVE `if test $gcc_cv_as_cfi_directive = yes \
21493 && test $gcc_cv_as_cfi_advance_working = yes; then echo 1; else echo 0; fi`
d4ea4622
RH
21494_ACEOF
21495
21496
058514b3
RH
21497echo "$as_me:$LINENO: checking assembler for cfi personality directive" >&5
21498echo $ECHO_N "checking assembler for cfi personality directive... $ECHO_C" >&6
21499if test "${gcc_cv_as_cfi_personality_directive+set}" = set; then
21500 echo $ECHO_N "(cached) $ECHO_C" >&6
21501else
21502 gcc_cv_as_cfi_personality_directive=no
6e60703f 21503 if test x$gcc_cv_as != x; then
058514b3 21504 echo ' .text
042628f9 21505 .cfi_startproc
058514b3
RH
21506 .cfi_personality 0, symbol
21507 .cfi_endproc' > conftest.s
21508 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21510 (eval $ac_try) 2>&5
21511 ac_status=$?
21512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21513 (exit $ac_status); }; }
21514 then
21515 gcc_cv_as_cfi_personality_directive=yes
21516 else
21517 echo "configure: failed program was" >&5
21518 cat conftest.s >&5
21519 fi
21520 rm -f conftest.o conftest.s
21521 fi
21522fi
21523echo "$as_me:$LINENO: result: $gcc_cv_as_cfi_personality_directive" >&5
21524echo "${ECHO_T}$gcc_cv_as_cfi_personality_directive" >&6
21525
21526
21527cat >>confdefs.h <<_ACEOF
21528#define HAVE_GAS_CFI_PERSONALITY_DIRECTIVE `if test $gcc_cv_as_cfi_personality_directive = yes;
21529 then echo 1; else echo 0; fi`
21530_ACEOF
21531
21532
8ada417f
ZW
21533# GAS versions up to and including 2.11.0 may mis-optimize
21534# .eh_frame data.
b61ff9c8
BS
21535echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
21536echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
ba479fd2
NN
21537if test "${gcc_cv_as_eh_frame+set}" = set; then
21538 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
21539else
21540 gcc_cv_as_eh_frame=no
21541 if test $in_tree_gas = yes; then
21542 if test $in_tree_gas_is_elf = yes \
21543 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21544 then gcc_cv_as_eh_frame=yes
ad9c4d9f 21545fi
8ada417f 21546 elif test x$gcc_cv_as != x; then
6e3f3080 21547 echo ' .text
c64688ae
RH
21548.LFB1:
21549 .4byte 0
21550.L1:
21551 .4byte 0
21552.LFE1:
21553 .section .eh_frame,"aw",@progbits
21554__FRAME_BEGIN__:
21555 .4byte .LECIE1-.LSCIE1
21556.LSCIE1:
21557 .4byte 0x0
21558 .byte 0x1
21559 .ascii "z\0"
21560 .byte 0x1
21561 .byte 0x78
21562 .byte 0x1a
21563 .byte 0x0
21564 .byte 0x4
21565 .4byte 1
21566 .p2align 1
21567.LECIE1:
21568.LSFDE1:
21569 .4byte .LEFDE1-.LASFDE1
21570.LASFDE1:
21571 .4byte .LASFDE1-__FRAME_BEGIN__
21572 .4byte .LFB1
21573 .4byte .LFE1-.LFB1
21574 .byte 0x4
21575 .4byte .LFE1-.LFB1
21576 .byte 0x4
21577 .4byte .L1-.LFB1
8ada417f 21578.LEFDE1:' > conftest.s
ba479fd2
NN
21579 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
21580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21581 (eval $ac_try) 2>&5
21582 ac_status=$?
21583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21584 (exit $ac_status); }; }
8ada417f
ZW
21585 then
21586 cat > conftest.lit <<EOF
c64688ae
RH
21587 0000 10000000 00000000 017a0001 781a0004 .........z..x...
21588 0010 01000000 12000000 18000000 00000000 ................
093e61a6 21589 0020 08000000 04080000 0044 .........D
01efb963 21590EOF
ba479fd2 21591cat > conftest.big <<EOF
01efb963
AS
21592 0000 00000010 00000000 017a0001 781a0004 .........z..x...
21593 0010 00000001 00000012 00000018 00000000 ................
093e61a6 21594 0020 00000008 04000000 0844 .........D
c64688ae 21595EOF
8ada417f
ZW
21596 # If the assembler didn't choke, and we can objdump,
21597 # and we got the correct data, then succeed.
dbc02e7f
AS
21598 # The text in the here-document typically retains its unix-style line
21599 # endings, while the output of objdump will use host line endings.
21600 # Therefore, use diff -b for the comparisons.
8ada417f
ZW
21601 if test x$gcc_cv_objdump != x \
21602 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
21603 | tail -3 > conftest.got \
dbc02e7f
AS
21604 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
21605 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
8ada417f
ZW
21606 then
21607 gcc_cv_as_eh_frame=yes
ba479fd2
NN
21608 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
21609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21610 (eval $ac_try) 2>&5
21611 ac_status=$?
21612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21613 (exit $ac_status); }; }; then
8ada417f
ZW
21614 gcc_cv_as_eh_frame=buggy
21615 else
21616 # Uh oh, what do we do now?
21617 gcc_cv_as_eh_frame=no
21618 fi
21619 else
21620 echo "configure: failed program was" >&5
21621 cat conftest.s >&5
21622 fi
21623 rm -f conftest.o conftest.s
21624 fi
c64688ae 21625fi
b61ff9c8
BS
21626echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
21627echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 21628
6e3f3080 21629
63cf211a 21630if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
21631
21632cat >>confdefs.h <<\_ACEOF
8ada417f 21633#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 21634_ACEOF
ad9c4d9f
NN
21635
21636fi
21637
b61ff9c8
BS
21638echo "$as_me:$LINENO: checking assembler for section merging support" >&5
21639echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
ba479fd2
NN
21640if test "${gcc_cv_as_shf_merge+set}" = set; then
21641 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
21642else
21643 gcc_cv_as_shf_merge=no
21644 if test $in_tree_gas = yes; then
21645 if test $in_tree_gas_is_elf = yes \
21646 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21647 then gcc_cv_as_shf_merge=yes
21648fi
21649 elif test x$gcc_cv_as != x; then
6e3f3080 21650 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
21651 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
21652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21653 (eval $ac_try) 2>&5
21654 ac_status=$?
21655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21656 (exit $ac_status); }; }
8ada417f
ZW
21657 then
21658 gcc_cv_as_shf_merge=yes
21659 else
21660 echo "configure: failed program was" >&5
21661 cat conftest.s >&5
21662 fi
21663 rm -f conftest.o conftest.s
21664 fi
201556f0 21665fi
b61ff9c8
BS
21666echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
21667echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 21668
c18a5b6c 21669if test $gcc_cv_as_shf_merge = no; then
b61ff9c8
BS
21670 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
21671echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
c18a5b6c
MM
21672if test "${gcc_cv_as_shf_merge+set}" = set; then
21673 echo $ECHO_N "(cached) $ECHO_C" >&6
21674else
21675 gcc_cv_as_shf_merge=no
21676 if test $in_tree_gas = yes; then
21677 if test $in_tree_gas_is_elf = yes \
21678 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
21679 then gcc_cv_as_shf_merge=yes
21680fi
21681 elif test x$gcc_cv_as != x; then
21682 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
21683 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
21684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21685 (eval $ac_try) 2>&5
21686 ac_status=$?
21687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21688 (exit $ac_status); }; }
21689 then
21690 gcc_cv_as_shf_merge=yes
21691 else
21692 echo "configure: failed program was" >&5
21693 cat conftest.s >&5
21694 fi
21695 rm -f conftest.o conftest.s
21696 fi
21697fi
b61ff9c8
BS
21698echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
21699echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
c18a5b6c
MM
21700
21701fi
8ad9fb33 21702
ba479fd2 21703cat >>confdefs.h <<_ACEOF
8ad9fb33 21704#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 21705_ACEOF
201556f0 21706
201556f0 21707
b61ff9c8
BS
21708echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
21709echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
21710if test "${gcc_cv_as_comdat_group+set}" = set; then
21711 echo $ECHO_N "(cached) $ECHO_C" >&6
21712else
21713 gcc_cv_as_comdat_group=no
21714 if test $in_tree_gas = yes; then
21715 if test $in_tree_gas_is_elf = yes \
11176d2a 21716 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
21717 then gcc_cv_as_comdat_group=yes
21718fi
21719 elif test x$gcc_cv_as != x; then
21720 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
21721 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
21722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21723 (eval $ac_try) 2>&5
21724 ac_status=$?
21725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21726 (exit $ac_status); }; }
21727 then
21728 gcc_cv_as_comdat_group=yes
21729 else
21730 echo "configure: failed program was" >&5
21731 cat conftest.s >&5
21732 fi
21733 rm -f conftest.o conftest.s
21734 fi
21735fi
b61ff9c8
BS
21736echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
21737echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
c18a5b6c
MM
21738
21739if test $gcc_cv_as_comdat_group = yes; then
21740 gcc_cv_as_comdat_group_percent=no
21741else
b61ff9c8
BS
21742 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
21743echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
21744if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
21745 echo $ECHO_N "(cached) $ECHO_C" >&6
21746else
21747 gcc_cv_as_comdat_group_percent=no
21748 if test $in_tree_gas = yes; then
21749 if test $in_tree_gas_is_elf = yes \
11176d2a 21750 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
21751 then gcc_cv_as_comdat_group_percent=yes
21752fi
21753 elif test x$gcc_cv_as != x; then
21754 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
21755 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
21756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21757 (eval $ac_try) 2>&5
21758 ac_status=$?
21759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21760 (exit $ac_status); }; }
21761 then
21762 gcc_cv_as_comdat_group_percent=yes
21763 else
21764 echo "configure: failed program was" >&5
21765 cat conftest.s >&5
21766 fi
21767 rm -f conftest.o conftest.s
21768 fi
21769fi
b61ff9c8
BS
21770echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
21771echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
c18a5b6c
MM
21772
21773fi
11176d2a
JB
21774if test $in_tree_ld != yes && test x"$ld_vers" != x; then
21775 comdat_group=yes
21776 if test 0"$ld_date" -lt 20050308; then
21777 if test -n "$ld_date"; then
21778 # If there was date string, but was earlier than 2005-03-08, fail
21779 comdat_group=no
21780 elif test "$ld_vers_major" -lt 2; then
21781 comdat_group=no
21782 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
21783 comdat_group=no
21784 fi
21785 fi
1cf0118d
RO
21786else
21787 # assume linkers other than GNU ld don't support COMDAT group
21788 comdat_group=no
21789fi
21790if test $comdat_group = no; then
21791 gcc_cv_as_comdat_group=no
21792 gcc_cv_as_comdat_group_percent=no
11176d2a 21793fi
c18a5b6c
MM
21794
21795cat >>confdefs.h <<_ACEOF
11176d2a 21796#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
21797_ACEOF
21798
21799
6a7a462c 21800# Thread-local storage - the check is heavily parameterized.
f996902d
RH
21801conftest_s=
21802tls_first_major=
21803tls_first_minor=
9739c90c 21804tls_as_opt=
f996902d 21805case "$target" in
6f9b006d
RH
21806 alpha*-*-*)
21807 conftest_s='
21808 .section ".tdata","awT",@progbits
21809foo: .long 25
21810 .text
21811 ldq $27,__tls_get_addr($29) !literal!1
21812 lda $16,foo($29) !tlsgd!1
21813 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
21814 ldq $27,__tls_get_addr($29) !literal!2
21815 lda $16,foo($29) !tlsldm!2
21816 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
21817 ldq $1,foo($29) !gotdtprel
21818 ldah $2,foo($29) !dtprelhi
21819 lda $3,foo($2) !dtprello
21820 lda $4,foo($29) !dtprel
21821 ldq $1,foo($29) !gottprel
21822 ldah $2,foo($29) !tprelhi
21823 lda $3,foo($2) !tprello
21824 lda $4,foo($29) !tprel'
21825 tls_first_major=2
21826 tls_first_minor=13
2f3321ca 21827 tls_as_opt=--fatal-warnings
6f9b006d 21828 ;;
ad9646c7
HPN
21829 cris-*-*|crisv32-*-*)
21830 conftest_s='
21831 .section ".tdata","awT",@progbits
21832x: .long 25
21833 .text
21834 move.d x:IE,$r10
21835 nop'
21836 tls_first_major=2
21837 tls_first_minor=20
21838 tls_as_opt=--fatal-warnings
21839 ;;
e4dd71de
AH
21840 frv*-*-*)
21841 conftest_s='
21842 .section ".tdata","awT",@progbits
21843x: .long 25
21844 .text
21845 call #gettlsoff(x)'
21846 tls_first_major=2
21847 tls_first_minor=14
21848 ;;
51076f96
RC
21849 hppa*-*-linux*)
21850 conftest_s='
21851t1: .reg %r20
21852t2: .reg %r21
21853gp: .reg %r19
21854 .section ".tdata","awT",@progbits
21855foo: .long 25
21856 .text
21857 .align 4
21858 addil LT%foo-$tls_gdidx$,gp
21859 ldo RT%foo-$tls_gdidx$(%r1),%arg0
21860 b __tls_get_addr
21861 nop
21862 addil LT%foo-$tls_ldidx$,gp
21863 b __tls_get_addr
21864 ldo RT%foo-$tls_ldidx$(%r1),%arg0
21865 addil LR%foo-$tls_dtpoff$,%ret0
21866 ldo RR%foo-$tls_dtpoff$(%r1),%t1
21867 mfctl %cr27,%t1
21868 addil LT%foo-$tls_ieoff$,gp
21869 ldw RT%foo-$tls_ieoff$(%r1),%t2
21870 add %t1,%t2,%t3
21871 mfctl %cr27,%t1
21872 addil LR%foo-$tls_leoff$,%t1
21873 ldo RR%foo-$tls_leoff$(%r1),%t2'
21874 tls_first_major=2
21875 tls_first_minor=15
21876 tls_as_opt=--fatal-warnings
21877 ;;
d3585b76
DJ
21878 arm*-*-*)
21879 conftest_s='
21880 .section ".tdata","awT",%progbits
21881foo: .long 25
21882 .text
21883.word foo(gottpoff)
21884.word foo(tpoff)
21885.word foo(tlsgd)
21886.word foo(tlsldm)
21887.word foo(tlsldo)'
21888 tls_first_major=2
21889 tls_first_minor=17
21890 ;;
f996902d
RH
21891 i[34567]86-*-*)
21892 conftest_s='
21893 .section ".tdata","awT",@progbits
21894foo: .long 25
21895 .text
21896 movl %gs:0, %eax
21897 leal foo@TLSGD(,%ebx,1), %eax
21898 leal foo@TLSLDM(%ebx), %eax
21899 leal foo@DTPOFF(%eax), %edx
21900 movl foo@GOTTPOFF(%ebx), %eax
21901 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
21902 addl foo@GOTNTPOFF(%ebx), %eax
21903 movl foo@INDNTPOFF, %eax
f996902d
RH
21904 movl $foo@TPOFF, %eax
21905 subl $foo@TPOFF, %eax
21906 leal foo@NTPOFF(%ecx), %eax'
21907 tls_first_major=2
75d38379 21908 tls_first_minor=14
2f3321ca 21909 tls_as_opt=--fatal-warnings
75d38379
JJ
21910 ;;
21911 x86_64-*-*)
21912 conftest_s='
21913 .section ".tdata","awT",@progbits
21914foo: .long 25
21915 .text
21916 movq %fs:0, %rax
21917 leaq foo@TLSGD(%rip), %rdi
21918 leaq foo@TLSLD(%rip), %rdi
21919 leaq foo@DTPOFF(%rax), %rdx
21920 movq foo@GOTTPOFF(%rip), %rax
21921 movq $foo@TPOFF, %rax'
21922 tls_first_major=2
21923 tls_first_minor=14
2f3321ca 21924 tls_as_opt=--fatal-warnings
f996902d 21925 ;;
7b6e506e
RH
21926 ia64-*-*)
21927 conftest_s='
21928 .section ".tdata","awT",@progbits
21929foo: data8 25
21930 .text
21931 addl r16 = @ltoff(@dtpmod(foo#)), gp
21932 addl r17 = @ltoff(@dtprel(foo#)), gp
21933 addl r18 = @ltoff(@tprel(foo#)), gp
21934 addl r19 = @dtprel(foo#), gp
21935 adds r21 = @dtprel(foo#), r13
21936 movl r23 = @dtprel(foo#)
21937 addl r20 = @tprel(foo#), gp
21938 adds r22 = @tprel(foo#), r13
21939 movl r24 = @tprel(foo#)'
21940 tls_first_major=2
21941 tls_first_minor=13
2f3321ca 21942 tls_as_opt=--fatal-warnings
7b6e506e 21943 ;;
69229b81
DJ
21944 mips*-*-*)
21945 conftest_s='
21946 .section .tdata,"awT",@progbits
21947x:
21948 .word 2
21949 .text
21950 addiu $4, $28, %tlsgd(x)
21951 addiu $4, $28, %tlsldm(x)
21952 lui $4, %dtprel_hi(x)
21953 addiu $4, $4, %dtprel_lo(x)
21954 lw $4, %gottprel(x)($28)
21955 lui $4, %tprel_hi(x)
21956 addiu $4, $4, %tprel_lo(x)'
21957 tls_first_major=2
21958 tls_first_minor=16
21959 tls_as_opt='-32 --fatal-warnings'
21960 ;;
c4501e62
JJ
21961 powerpc-*-*)
21962 conftest_s='
21963 .section ".tdata","awT",@progbits
21964 .align 2
21965ld0: .space 4
21966ld1: .space 4
21967x1: .space 4
21968x2: .space 4
21969x3: .space 4
21970 .text
21971 addi 3,31,ld0@got@tlsgd
21972 bl __tls_get_addr
21973 addi 3,31,x1@got@tlsld
21974 bl __tls_get_addr
21975 addi 9,3,x1@dtprel
21976 addis 9,3,x2@dtprel@ha
21977 addi 9,9,x2@dtprel@l
21978 lwz 9,x3@got@tprel(31)
21979 add 9,9,x@tls
21980 addi 9,2,x1@tprel
21981 addis 9,2,x2@tprel@ha
21982 addi 9,9,x2@tprel@l'
21983 tls_first_major=2
21984 tls_first_minor=14
2f3321ca 21985 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
21986 ;;
21987 powerpc64-*-*)
21988 conftest_s='
21989 .section ".tdata","awT",@progbits
21990 .align 3
21991ld0: .space 8
21992ld1: .space 8
21993x1: .space 8
21994x2: .space 8
21995x3: .space 8
21996 .text
21997 addi 3,2,ld0@got@tlsgd
21998 bl .__tls_get_addr
21999 nop
22000 addi 3,2,ld1@toc
22001 bl .__tls_get_addr
22002 nop
22003 addi 3,2,x1@got@tlsld
22004 bl .__tls_get_addr
22005 nop
22006 addi 9,3,x1@dtprel
22007 bl .__tls_get_addr
22008 nop
22009 addis 9,3,x2@dtprel@ha
22010 addi 9,9,x2@dtprel@l
22011 bl .__tls_get_addr
22012 nop
22013 ld 9,x3@got@dtprel(2)
22014 add 9,9,3
22015 bl .__tls_get_addr
22016 nop'
22017 tls_first_major=2
22018 tls_first_minor=14
2f3321ca 22019 tls_as_opt="-a64 --fatal-warnings"
c4501e62 22020 ;;
fd3cd001
UW
22021 s390-*-*)
22022 conftest_s='
22023 .section ".tdata","awT",@progbits
22024foo: .long 25
22025 .text
22026 .long foo@TLSGD
22027 .long foo@TLSLDM
22028 .long foo@DTPOFF
22029 .long foo@NTPOFF
22030 .long foo@GOTNTPOFF
22031 .long foo@INDNTPOFF
22032 l %r1,foo@GOTNTPOFF(%r12)
22033 l %r1,0(%r1):tls_load:foo
22034 bas %r14,0(%r1,%r13):tls_gdcall:foo
22035 bas %r14,0(%r1,%r13):tls_ldcall:foo'
22036 tls_first_major=2
22037 tls_first_minor=14
2f3321ca 22038 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
22039 ;;
22040 s390x-*-*)
22041 conftest_s='
22042 .section ".tdata","awT",@progbits
22043foo: .long 25
22044 .text
22045 .quad foo@TLSGD
22046 .quad foo@TLSLDM
22047 .quad foo@DTPOFF
22048 .quad foo@NTPOFF
22049 .quad foo@GOTNTPOFF
22050 lg %r1,foo@GOTNTPOFF(%r12)
22051 larl %r1,foo@INDNTPOFF
22052 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
22053 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
22054 tls_first_major=2
22055 tls_first_minor=14
2f3321ca 22056 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 22057 ;;
9ff13962
KK
22058 sh-*-* | sh[34]-*-*)
22059 conftest_s='
22060 .section ".tdata","awT",@progbits
22061foo: .long 25
22062 .text
22063 .long foo@TLSGD
22064 .long foo@TLSLDM
22065 .long foo@DTPOFF
22066 .long foo@GOTTPOFF
22067 .long foo@TPOFF'
22068 tls_first_major=2
22069 tls_first_minor=13
2f3321ca 22070 tls_as_opt=--fatal-warnings
9ff13962 22071 ;;
5751a10b 22072 sparc*-*-*)
2f3321ca 22073 case "$target" in
7935dc1b
EB
22074 sparc*-sun-solaris2.[56789]*)
22075 # TLS was introduced in the Solaris 9 4/04 release but
22076 # we do not enable it by default on Solaris 9 either.
22077 if test "x$enable_tls" = xyes ; then
22078 on_solaris=yes
22079 else
22080 enable_tls=no;
22081 fi
22082 ;;
2f3321ca
EB
22083 sparc*-sun-solaris2.*)
22084 on_solaris=yes
22085 ;;
22086 *)
22087 on_solaris=no
22088 ;;
22089 esac
22090 if test x$on_solaris = xyes && test x$gas_flag = xno; then
22091 conftest_s='
22092 .section ".tdata",#alloc,#write,#tls
22093foo: .long 25
22094 .text
22095 sethi %tgd_hi22(foo), %o0
22096 add %o0, %tgd_lo10(foo), %o1
22097 add %l7, %o1, %o0, %tgd_add(foo)
22098 call __tls_get_addr, %tgd_call(foo)
22099 sethi %tldm_hi22(foo), %l1
22100 add %l1, %tldm_lo10(foo), %l2
22101 add %l7, %l2, %o0, %tldm_add(foo)
22102 call __tls_get_addr, %tldm_call(foo)
22103 sethi %tldo_hix22(foo), %l3
22104 xor %l3, %tldo_lox10(foo), %l4
22105 add %o0, %l4, %l5, %tldo_add(foo)
22106 sethi %tie_hi22(foo), %o3
22107 add %o3, %tie_lo10(foo), %o3
22108 ld [%l7 + %o3], %o2, %tie_ld(foo)
22109 add %g7, %o2, %o4, %tie_add(foo)
22110 sethi %tle_hix22(foo), %l1
22111 xor %l1, %tle_lox10(foo), %o5
22112 ld [%g7 + %o5], %o1'
22113 tls_first_major=0
22114 tls_first_minor=0
22115 else
22116 conftest_s='
5751a10b
JJ
22117 .section ".tdata","awT",@progbits
22118foo: .long 25
22119 .text
22120 sethi %tgd_hi22(foo), %o0
22121 add %o0, %tgd_lo10(foo), %o1
22122 add %l7, %o1, %o0, %tgd_add(foo)
22123 call __tls_get_addr, %tgd_call(foo)
22124 sethi %tldm_hi22(foo), %l1
22125 add %l1, %tldm_lo10(foo), %l2
22126 add %l7, %l2, %o0, %tldm_add(foo)
22127 call __tls_get_addr, %tldm_call(foo)
22128 sethi %tldo_hix22(foo), %l3
22129 xor %l3, %tldo_lox10(foo), %l4
22130 add %o0, %l4, %l5, %tldo_add(foo)
22131 sethi %tie_hi22(foo), %o3
22132 add %o3, %tie_lo10(foo), %o3
22133 ld [%l7 + %o3], %o2, %tie_ld(foo)
22134 add %g7, %o2, %o4, %tie_add(foo)
22135 sethi %tle_hix22(foo), %l1
22136 xor %l1, %tle_lox10(foo), %o5
22137 ld [%g7 + %o5], %o1'
22138 tls_first_major=2
22139 tls_first_minor=14
2f3321ca
EB
22140 tls_as_opt="-32 --fatal-warnings"
22141 fi
5751a10b 22142 ;;
6a7a462c
BW
22143 xtensa*-*-*)
22144 conftest_s='
22145 .section ".tdata","awT",@progbits
22146foo: .long 25
22147 .text
22148 movi a8, foo@TLSFUNC
22149 movi a10, foo@TLSARG
22150 callx8.tls a8, foo@TLSCALL'
22151 tls_first_major=2
22152 tls_first_minor=19
22153 ;;
f996902d 22154esac
8dea1cca
DD
22155set_have_as_tls=no
22156if test "x$enable_tls" = xno ; then
22157 : # TLS explicitly disabled.
22158elif test "x$enable_tls" = xyes ; then
22159 set_have_as_tls=yes # TLS explicitly enabled.
22160elif test -z "$tls_first_major"; then
8ada417f
ZW
22161 : # If we don't have a check, assume no support.
22162else
b61ff9c8
BS
22163 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
22164echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
ba479fd2
NN
22165if test "${gcc_cv_as_tls+set}" = set; then
22166 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22167else
22168 gcc_cv_as_tls=no
22169 if test $in_tree_gas = yes; then
22170 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
22171 then gcc_cv_as_tls=yes
ad9c4d9f 22172fi
8ada417f 22173 elif test x$gcc_cv_as != x; then
6e3f3080 22174 echo "$conftest_s" > conftest.s
2f3321ca 22175 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
22176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22177 (eval $ac_try) 2>&5
22178 ac_status=$?
22179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22180 (exit $ac_status); }; }
8ada417f
ZW
22181 then
22182 gcc_cv_as_tls=yes
22183 else
22184 echo "configure: failed program was" >&5
22185 cat conftest.s >&5
22186 fi
22187 rm -f conftest.o conftest.s
f996902d 22188 fi
f996902d 22189fi
b61ff9c8
BS
22190echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
22191echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 22192if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
22193 set_have_as_tls=yes
22194fi
22195fi
22196if test $set_have_as_tls = yes ; then
ba479fd2
NN
22197
22198cat >>confdefs.h <<\_ACEOF
f996902d 22199#define HAVE_AS_TLS 1
ba479fd2 22200_ACEOF
f996902d 22201
8ada417f
ZW
22202fi
22203
22204# Target-specific assembler checks.
f996902d 22205
b61ff9c8
BS
22206echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
22207echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
7e9d8517
L
22208gcc_cv_ld_static_dynamic=no
22209if test $in_tree_ld = yes ; then
83f0ccb8 22210 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
22211 gcc_cv_ld_static_dynamic=yes
22212 fi
22213elif test x$gcc_cv_ld != x; then
22214 # Check if linker supports -Bstatic/-Bdynamic option
22215 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
22216 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
22217 gcc_cv_ld_static_dynamic=yes
22218 fi
22219fi
22220if test x"$gcc_cv_ld_static_dynamic" = xyes; then
22221
22222cat >>confdefs.h <<\_ACEOF
22223#define HAVE_LD_STATIC_DYNAMIC 1
22224_ACEOF
22225
22226fi
b61ff9c8
BS
22227echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
22228echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
7e9d8517 22229
d594623a 22230if test x"$demangler_in_ld" = xyes; then
b61ff9c8
BS
22231 echo "$as_me:$LINENO: checking linker --demangle support" >&5
22232echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
d594623a
L
22233 gcc_cv_ld_demangle=no
22234 if test $in_tree_ld = yes; then
22235 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 \
22236 gcc_cv_ld_demangle=yes
22237 fi
22238 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
22239 # Check if the GNU linker supports --demangle option
22240 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
22241 gcc_cv_ld_demangle=yes
22242 fi
22243 fi
22244 if test x"$gcc_cv_ld_demangle" = xyes; then
22245
22246cat >>confdefs.h <<\_ACEOF
22247#define HAVE_LD_DEMANGLE 1
22248_ACEOF
22249
22250 fi
b61ff9c8
BS
22251 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
22252echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
d594623a
L
22253fi
22254
3a37b08e
RH
22255case "$target" in
22256 # All TARGET_ABI_OSF targets.
22257 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
b61ff9c8
BS
22258 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
22259echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
22260if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
22261 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 22262else
8ada417f
ZW
22263 gcc_cv_as_alpha_explicit_relocs=no
22264 if test $in_tree_gas = yes; then
22265 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
22266 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 22267fi
8ada417f 22268 elif test x$gcc_cv_as != x; then
6e3f3080 22269 echo ' .set nomacro
3a37b08e
RH
22270 .text
22271 extbl $3, $2, $3 !lituse_bytoff!1
22272 ldq $2, a($29) !literal!1
22273 ldq $4, b($29) !literal!2
22274 ldq_u $3, 0($2) !lituse_base!1
22275 ldq $27, f($29) !literal!5
22276 jsr $26, ($27), f !lituse_jsr!5
22277 ldah $29, 0($26) !gpdisp!3
22278 lda $0, c($29) !gprel
22279 ldah $1, d($29) !gprelhigh
22280 lda $1, d($1) !gprellow
8ada417f 22281 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
22282 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22284 (eval $ac_try) 2>&5
22285 ac_status=$?
22286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22287 (exit $ac_status); }; }
8ada417f
ZW
22288 then
22289 gcc_cv_as_alpha_explicit_relocs=yes
22290 else
22291 echo "configure: failed program was" >&5
22292 cat conftest.s >&5
22293 fi
22294 rm -f conftest.o conftest.s
22295 fi
cafe096b 22296fi
b61ff9c8
BS
22297echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
22298echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 22299if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
22300
22301cat >>confdefs.h <<\_ACEOF
3a37b08e 22302#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 22303_ACEOF
3a37b08e 22304
d006f5eb 22305fi
b61ff9c8
BS
22306 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
22307echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
d006f5eb
RH
22308if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
22309 echo $ECHO_N "(cached) $ECHO_C" >&6
22310else
22311 gcc_cv_as_alpha_jsrdirect_relocs=no
22312 if test $in_tree_gas = yes; then
22313 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
22314 then gcc_cv_as_alpha_jsrdirect_relocs=yes
22315fi
22316 elif test x$gcc_cv_as != x; then
22317 echo ' .set nomacro
22318 .text
22319 ldq $27, a($29) !literal!1
22320 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
22321 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22323 (eval $ac_try) 2>&5
22324 ac_status=$?
22325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22326 (exit $ac_status); }; }
22327 then
22328 gcc_cv_as_alpha_jsrdirect_relocs=yes
22329 else
22330 echo "configure: failed program was" >&5
22331 cat conftest.s >&5
22332 fi
22333 rm -f conftest.o conftest.s
22334 fi
22335fi
b61ff9c8
BS
22336echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
22337echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
d006f5eb
RH
22338if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
22339
22340cat >>confdefs.h <<\_ACEOF
22341#define HAVE_AS_JSRDIRECT_RELOCS 1
22342_ACEOF
22343
86da66b5
HPN
22344fi
22345 ;;
22346
22347 cris-*-*)
b61ff9c8
BS
22348 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
22349echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
86da66b5
HPN
22350if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
22351 echo $ECHO_N "(cached) $ECHO_C" >&6
22352else
22353 gcc_cv_as_cris_no_mul_bug=no
22354 if test $in_tree_gas = yes; then
22355 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
22356 then gcc_cv_as_cris_no_mul_bug=yes
22357fi
22358 elif test x$gcc_cv_as != x; then
22359 echo '.text' > conftest.s
22360 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
22361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22362 (eval $ac_try) 2>&5
22363 ac_status=$?
22364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22365 (exit $ac_status); }; }
22366 then
22367 gcc_cv_as_cris_no_mul_bug=yes
22368 else
22369 echo "configure: failed program was" >&5
22370 cat conftest.s >&5
22371 fi
22372 rm -f conftest.o conftest.s
22373 fi
22374fi
b61ff9c8
BS
22375echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
22376echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
86da66b5
HPN
22377if test $gcc_cv_as_cris_no_mul_bug = yes; then
22378
22379cat >>confdefs.h <<\_ACEOF
22380#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
22381_ACEOF
22382
8ada417f 22383fi
3a37b08e 22384 ;;
8ada417f 22385
1cb36a98 22386 sparc*-*-*)
b61ff9c8
BS
22387 echo "$as_me:$LINENO: checking assembler for .register" >&5
22388echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
ba479fd2
NN
22389if test "${gcc_cv_as_sparc_register_op+set}" = set; then
22390 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 22391else
8ada417f
ZW
22392 gcc_cv_as_sparc_register_op=no
22393 if test x$gcc_cv_as != x; then
6e3f3080 22394 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
22395 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22397 (eval $ac_try) 2>&5
22398 ac_status=$?
22399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22400 (exit $ac_status); }; }
8ada417f
ZW
22401 then
22402 gcc_cv_as_sparc_register_op=yes
22403 else
22404 echo "configure: failed program was" >&5
22405 cat conftest.s >&5
22406 fi
22407 rm -f conftest.o conftest.s
22408 fi
cafe096b 22409fi
b61ff9c8
BS
22410echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
22411echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 22412if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
22413
22414cat >>confdefs.h <<\_ACEOF
1cb36a98 22415#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 22416_ACEOF
1cb36a98 22417
8ada417f 22418fi
1cb36a98 22419
b61ff9c8
BS
22420 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
22421echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
ba479fd2
NN
22422if test "${gcc_cv_as_sparc_relax+set}" = set; then
22423 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 22424else
8ada417f
ZW
22425 gcc_cv_as_sparc_relax=no
22426 if test x$gcc_cv_as != x; then
6e3f3080 22427 echo '.text' > conftest.s
ba479fd2
NN
22428 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
22429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22430 (eval $ac_try) 2>&5
22431 ac_status=$?
22432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22433 (exit $ac_status); }; }
8ada417f
ZW
22434 then
22435 gcc_cv_as_sparc_relax=yes
22436 else
22437 echo "configure: failed program was" >&5
22438 cat conftest.s >&5
22439 fi
22440 rm -f conftest.o conftest.s
22441 fi
cafe096b 22442fi
b61ff9c8
BS
22443echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
22444echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 22445if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
22446
22447cat >>confdefs.h <<\_ACEOF
e95b1e6a 22448#define HAVE_AS_RELAX_OPTION 1
ba479fd2 22449_ACEOF
e95b1e6a 22450
8ada417f 22451fi
e95b1e6a 22452
b61ff9c8
BS
22453 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
22454echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
ba479fd2
NN
22455if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
22456 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 22457else
8ada417f
ZW
22458 gcc_cv_as_sparc_ua_pcrel=no
22459 if test x$gcc_cv_as != x; then
6e3f3080 22460 echo '.text
8ada417f
ZW
22461foo:
22462 nop
22463.data
22464.align 4
22465.byte 0
22466.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
22467 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
22468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22469 (eval $ac_try) 2>&5
22470 ac_status=$?
22471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22472 (exit $ac_status); }; }
8ada417f
ZW
22473 then
22474 if test x$gcc_cv_ld != x \
22475 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
22476 gcc_cv_as_sparc_ua_pcrel=yes
22477 fi
22478 rm -f conftest
22479 else
22480 echo "configure: failed program was" >&5
22481 cat conftest.s >&5
22482 fi
22483 rm -f conftest.o conftest.s
22484 fi
cafe096b 22485fi
b61ff9c8
BS
22486echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
22487echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 22488if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
22489
22490cat >>confdefs.h <<\_ACEOF
17e9e88c 22491#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 22492_ACEOF
17e9e88c 22493
17e9e88c 22494
b61ff9c8
BS
22495 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
22496echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
ba479fd2
NN
22497if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
22498 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 22499else
8ada417f
ZW
22500 gcc_cv_as_sparc_ua_pcrel_hidden=no
22501 if test x$gcc_cv_as != x; then
6e3f3080 22502 echo '.data
8ada417f
ZW
22503.align 4
22504.byte 0x31
22505.uaword %r_disp32(foo)
22506.byte 0x32, 0x33, 0x34
22507.global foo
22508.hidden foo
22509foo:
22510.skip 4' > conftest.s
ba479fd2
NN
22511 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
22512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22513 (eval $ac_try) 2>&5
22514 ac_status=$?
22515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22516 (exit $ac_status); }; }
8ada417f
ZW
22517 then
22518 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
22519 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
22520 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
22521 | grep ' 31000000 07323334' > /dev/null 2>&1; then
22522 if $gcc_cv_objdump -R conftest 2> /dev/null \
22523 | grep 'DISP32' > /dev/null 2>&1; then
22524 :
22525 else
22526 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 22527 fi
8ada417f
ZW
22528 fi
22529 rm -f conftest
22530 else
22531 echo "configure: failed program was" >&5
22532 cat conftest.s >&5
22533 fi
22534 rm -f conftest.o conftest.s
22535 fi
cafe096b 22536fi
b61ff9c8
BS
22537echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
22538echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 22539if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
22540
22541cat >>confdefs.h <<\_ACEOF
cf7b8b0d 22542#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 22543_ACEOF
cf7b8b0d 22544
8ada417f 22545fi
ba479fd2 22546
8ada417f 22547fi # unaligned pcrel relocs
cf7b8b0d 22548
b61ff9c8
BS
22549 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
22550echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
ba479fd2
NN
22551if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
22552 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 22553else
8ada417f
ZW
22554 gcc_cv_as_sparc_offsetable_lo10=no
22555 if test x$gcc_cv_as != x; then
6e3f3080 22556 echo '.text
8ada417f
ZW
22557 or %g1, %lo(ab) + 12, %g1
22558 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
22559 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
22560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22561 (eval $ac_try) 2>&5
22562 ac_status=$?
22563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22564 (exit $ac_status); }; }
8ada417f
ZW
22565 then
22566 if test x$gcc_cv_objdump != x \
ecb0ccbc 22567 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 22568 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 22569 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
22570 fi
22571 else
22572 echo "configure: failed program was" >&5
22573 cat conftest.s >&5
22574 fi
22575 rm -f conftest.o conftest.s
22576 fi
cafe096b 22577fi
b61ff9c8
BS
22578echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
22579echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 22580if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
22581
22582cat >>confdefs.h <<\_ACEOF
1cb36a98 22583#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 22584_ACEOF
1cb36a98 22585
8ada417f 22586fi
1cb36a98
RH
22587 ;;
22588
c307e6dd 22589 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
22590 case $target_os in
22591 cygwin* | pe | mingw32*)
22592 # Used for DWARF 2 in PE
b61ff9c8
BS
22593 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
22594echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
d38bc601
BF
22595if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
22596 echo $ECHO_N "(cached) $ECHO_C" >&6
22597else
22598 gcc_cv_as_ix86_pe_secrel32=no
22599 if test $in_tree_gas = yes; then
22600 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
22601 then gcc_cv_as_ix86_pe_secrel32=yes
22602fi
22603 elif test x$gcc_cv_as != x; then
22604 echo '.text
22605foo: nop
22606.data
22607 .secrel32 foo' > conftest.s
22608 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22610 (eval $ac_try) 2>&5
22611 ac_status=$?
22612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22613 (exit $ac_status); }; }
22614 then
22615 if test x$gcc_cv_ld != x \
22616 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
22617 gcc_cv_as_ix86_pe_secrel32=yes
22618 fi
22619 rm -f conftest
22620 else
22621 echo "configure: failed program was" >&5
22622 cat conftest.s >&5
22623 fi
22624 rm -f conftest.o conftest.s
22625 fi
22626fi
b61ff9c8
BS
22627echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
22628echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
d38bc601
BF
22629if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
22630
22631cat >>confdefs.h <<\_ACEOF
22632#define HAVE_GAS_PE_SECREL32_RELOC 1
22633_ACEOF
22634
22635fi
22636 ;;
22637 esac
22638
b61ff9c8
BS
22639 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
22640echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
ba479fd2
NN
22641if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
22642 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22643else
22644 gcc_cv_as_ix86_filds_fists=no
22645 if test $in_tree_gas = yes; then
22646 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
22647 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 22648fi
8ada417f 22649 elif test x$gcc_cv_as != x; then
6e3f3080 22650 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
22651 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22653 (eval $ac_try) 2>&5
22654 ac_status=$?
22655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22656 (exit $ac_status); }; }
8ada417f
ZW
22657 then
22658 gcc_cv_as_ix86_filds_fists=yes
22659 else
22660 echo "configure: failed program was" >&5
22661 cat conftest.s >&5
981d4858 22662 fi
8ada417f
ZW
22663 rm -f conftest.o conftest.s
22664 fi
22665fi
b61ff9c8
BS
22666echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
22667echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 22668if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
22669
22670cat >>confdefs.h <<\_ACEOF
8ada417f 22671#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 22672_ACEOF
ad9c4d9f 22673
f6f5dff2
RO
22674fi
22675
b61ff9c8
BS
22676 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
22677echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
ba479fd2
NN
22678if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
22679 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
22680else
22681 gcc_cv_as_ix86_cmov_sun_syntax=no
22682 if test x$gcc_cv_as != x; then
6e3f3080 22683 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
22684 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22686 (eval $ac_try) 2>&5
22687 ac_status=$?
22688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22689 (exit $ac_status); }; }
f6f5dff2
RO
22690 then
22691 gcc_cv_as_ix86_cmov_sun_syntax=yes
22692 else
22693 echo "configure: failed program was" >&5
22694 cat conftest.s >&5
22695 fi
22696 rm -f conftest.o conftest.s
22697 fi
22698fi
b61ff9c8
BS
22699echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
22700echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 22701if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
22702
22703cat >>confdefs.h <<\_ACEOF
f6f5dff2 22704#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 22705_ACEOF
f6f5dff2 22706
b6c03bcd
RS
22707fi
22708
b61ff9c8
BS
22709 echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5
22710echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6
b6c03bcd
RS
22711if test "${gcc_cv_as_ix86_ffreep+set}" = set; then
22712 echo $ECHO_N "(cached) $ECHO_C" >&6
22713else
22714 gcc_cv_as_ix86_ffreep=no
22715 if test x$gcc_cv_as != x; then
22716 echo 'ffreep %st(1)' > conftest.s
22717 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22719 (eval $ac_try) 2>&5
22720 ac_status=$?
22721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22722 (exit $ac_status); }; }
22723 then
22724 gcc_cv_as_ix86_ffreep=yes
22725 else
22726 echo "configure: failed program was" >&5
22727 cat conftest.s >&5
22728 fi
22729 rm -f conftest.o conftest.s
22730 fi
22731fi
b61ff9c8
BS
22732echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5
22733echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6
b6c03bcd
RS
22734if test $gcc_cv_as_ix86_ffreep = yes; then
22735
22736cat >>confdefs.h <<\_ACEOF
22737#define HAVE_AS_IX86_FFREEP 1
22738_ACEOF
22739
38ca3765
UB
22740fi
22741
b61ff9c8
BS
22742 echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5
22743echo $ECHO_N "checking assembler for sahf mnemonic... $ECHO_C" >&6
38ca3765
UB
22744if test "${gcc_cv_as_ix86_sahf+set}" = set; then
22745 echo $ECHO_N "(cached) $ECHO_C" >&6
22746else
22747 gcc_cv_as_ix86_sahf=no
22748 if test x$gcc_cv_as != x; then
22749 echo 'sahf' > conftest.s
22750 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22752 (eval $ac_try) 2>&5
22753 ac_status=$?
22754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22755 (exit $ac_status); }; }
22756 then
22757 gcc_cv_as_ix86_sahf=yes
22758 else
22759 echo "configure: failed program was" >&5
22760 cat conftest.s >&5
22761 fi
22762 rm -f conftest.o conftest.s
22763 fi
22764fi
b61ff9c8
BS
22765echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_sahf" >&5
22766echo "${ECHO_T}$gcc_cv_as_ix86_sahf" >&6
38ca3765
UB
22767if test $gcc_cv_as_ix86_sahf = yes; then
22768
22769cat >>confdefs.h <<\_ACEOF
22770#define HAVE_AS_IX86_SAHF 1
22771_ACEOF
22772
68b92f78
RS
22773fi
22774
b61ff9c8
BS
22775 echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5
22776echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6
68b92f78
RS
22777if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then
22778 echo $ECHO_N "(cached) $ECHO_C" >&6
22779else
22780 gcc_cv_as_ix86_diff_sect_delta=no
22781 if test x$gcc_cv_as != x; then
22782 echo '.section .rodata
22783.L1:
22784 .long .L2-.L1
22785 .long .L3-.L1
22786 .text
22787.L3: nop
22788.L2: nop' > conftest.s
22789 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22791 (eval $ac_try) 2>&5
22792 ac_status=$?
22793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22794 (exit $ac_status); }; }
22795 then
22796 gcc_cv_as_ix86_diff_sect_delta=yes
22797 else
22798 echo "configure: failed program was" >&5
22799 cat conftest.s >&5
22800 fi
22801 rm -f conftest.o conftest.s
22802 fi
22803fi
b61ff9c8
BS
22804echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
22805echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6
68b92f78
RS
22806if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
22807
22808cat >>confdefs.h <<\_ACEOF
22809#define HAVE_AS_IX86_DIFF_SECT_DELTA 1
22810_ACEOF
22811
ad9c4d9f
NN
22812fi
22813
6f3ca281
ZW
22814 # This one is used unconditionally by i386.[ch]; it is to be defined
22815 # to 1 if the feature is present, 0 otherwise.
b61ff9c8
BS
22816 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
22817echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
ba479fd2
NN
22818if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
22819 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
22820else
22821 gcc_cv_as_ix86_gotoff_in_data=no
22822 if test $in_tree_gas = yes; then
22823 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
22824 then gcc_cv_as_ix86_gotoff_in_data=yes
22825fi
22826 elif test x$gcc_cv_as != x; then
6e3f3080 22827 echo ' .text
f88c65f7
RH
22828.L0:
22829 nop
22830 .data
8ada417f 22831 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
22832 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22834 (eval $ac_try) 2>&5
22835 ac_status=$?
22836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22837 (exit $ac_status); }; }
8ada417f
ZW
22838 then
22839 gcc_cv_as_ix86_gotoff_in_data=yes
22840 else
22841 echo "configure: failed program was" >&5
22842 cat conftest.s >&5
f88c65f7 22843 fi
8ada417f
ZW
22844 rm -f conftest.o conftest.s
22845 fi
22846fi
b61ff9c8
BS
22847echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
22848echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 22849
6f3ca281 22850
ba479fd2 22851cat >>confdefs.h <<_ACEOF
6f3ca281 22852#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 22853_ACEOF
f88c65f7 22854
1cb36a98 22855 ;;
ef1ecf87
RH
22856
22857 ia64*-*-*)
b61ff9c8
BS
22858 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
22859echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
ba479fd2
NN
22860if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
22861 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 22862else
8ada417f
ZW
22863 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
22864 if test $in_tree_gas = yes; then
22865 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
22866 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 22867fi
8ada417f 22868 elif test x$gcc_cv_as != x; then
6e3f3080 22869 echo ' .text
ef1ecf87
RH
22870 addl r15 = @ltoffx(x#), gp
22871 ;;
cfa9ee99 22872 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
22873 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22875 (eval $ac_try) 2>&5
22876 ac_status=$?
22877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22878 (exit $ac_status); }; }
8ada417f 22879 then
cfa9ee99 22880 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
22881 else
22882 echo "configure: failed program was" >&5
22883 cat conftest.s >&5
2c4a9cff 22884 fi
8ada417f
ZW
22885 rm -f conftest.o conftest.s
22886 fi
22887fi
b61ff9c8
BS
22888echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
22889echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 22890if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
22891
22892cat >>confdefs.h <<\_ACEOF
cfa9ee99 22893#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 22894_ACEOF
8ada417f 22895
cfa9ee99 22896fi
8ada417f 22897
2c4a9cff 22898 ;;
8ada417f 22899
2c4a9cff 22900 powerpc*-*-*)
8ada417f 22901 case $target in
432218ba
DE
22902 *-*-aix*) conftest_s=' .machine "pwr5"
22903 .csect .text[PR]
6b37db3c 22904 mfcr 3,128';;
8af4d362 22905 *-*-darwin*)
b61ff9c8
BS
22906 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
22907echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
8af4d362
PB
22908if test "${gcc_cv_as_machine_directive+set}" = set; then
22909 echo $ECHO_N "(cached) $ECHO_C" >&6
22910else
22911 gcc_cv_as_machine_directive=no
22912 if test x$gcc_cv_as != x; then
22913 echo ' .machine ppc7400' > conftest.s
22914 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22916 (eval $ac_try) 2>&5
22917 ac_status=$?
22918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22919 (exit $ac_status); }; }
22920 then
22921 gcc_cv_as_machine_directive=yes
22922 else
22923 echo "configure: failed program was" >&5
22924 cat conftest.s >&5
22925 fi
22926 rm -f conftest.o conftest.s
22927 fi
22928fi
b61ff9c8
BS
22929echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
22930echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
8af4d362
PB
22931
22932 if test x$gcc_cv_as_machine_directive != xyes; then
22933 echo "*** This target requires an assembler supporting \".machine\"" >&2
22934 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
22935 test x$build = x$target && exit 1
22936 fi
22937 conftest_s=' .text
6b37db3c 22938 mfcr r3,128';;
4c67db14 22939 *) conftest_s=' .machine power4
d2ab3e37 22940 .text
6b37db3c 22941 mfcr 3,128';;
8ada417f 22942 esac
8ada417f 22943
b61ff9c8
BS
22944 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
22945echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
ba479fd2
NN
22946if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
22947 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 22948else
8ada417f
ZW
22949 gcc_cv_as_powerpc_mfcrf=no
22950 if test $in_tree_gas = yes; then
22951 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
22952 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 22953fi
8ada417f 22954 elif test x$gcc_cv_as != x; then
6e3f3080 22955 echo "$conftest_s" > conftest.s
ba479fd2
NN
22956 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
22957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22958 (eval $ac_try) 2>&5
22959 ac_status=$?
22960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22961 (exit $ac_status); }; }
8ada417f
ZW
22962 then
22963 gcc_cv_as_powerpc_mfcrf=yes
22964 else
22965 echo "configure: failed program was" >&5
22966 cat conftest.s >&5
22967 fi
22968 rm -f conftest.o conftest.s
22969 fi
2c4a9cff 22970fi
b61ff9c8
BS
22971echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
22972echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 22973if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
22974
22975cat >>confdefs.h <<\_ACEOF
2c4a9cff 22976#define HAVE_AS_MFCRF 1
ba479fd2 22977_ACEOF
ef1ecf87 22978
8ada417f 22979fi
432218ba
DE
22980
22981 case $target in
22982 *-*-aix*) conftest_s=' .machine "pwr5"
22983 .csect .text[PR]
22984 popcntb 3,3';;
22985 *) conftest_s=' .machine power5
22986 .text
22987 popcntb 3,3';;
22988 esac
22989
b61ff9c8
BS
22990 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
22991echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
432218ba
DE
22992if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
22993 echo $ECHO_N "(cached) $ECHO_C" >&6
22994else
22995 gcc_cv_as_powerpc_popcntb=no
22996 if test $in_tree_gas = yes; then
22997 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
22998 then gcc_cv_as_powerpc_popcntb=yes
22999fi
23000 elif test x$gcc_cv_as != x; then
23001 echo "$conftest_s" > conftest.s
23002 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
23003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23004 (eval $ac_try) 2>&5
23005 ac_status=$?
23006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23007 (exit $ac_status); }; }
23008 then
23009 gcc_cv_as_powerpc_popcntb=yes
23010 else
23011 echo "configure: failed program was" >&5
23012 cat conftest.s >&5
23013 fi
23014 rm -f conftest.o conftest.s
23015 fi
23016fi
b61ff9c8
BS
23017echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
23018echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
432218ba
DE
23019if test $gcc_cv_as_powerpc_popcntb = yes; then
23020
23021cat >>confdefs.h <<\_ACEOF
23022#define HAVE_AS_POPCNTB 1
23023_ACEOF
23024
9719f3b7
DE
23025fi
23026
23027 case $target in
23028 *-*-aix*) conftest_s=' .machine "pwr5x"
23029 .csect .text[PR]
23030 frin 1,1';;
1e04bfdc 23031 *) conftest_s=' .machine power5
9719f3b7
DE
23032 .text
23033 frin 1,1';;
23034 esac
23035
b61ff9c8
BS
23036 echo "$as_me:$LINENO: checking assembler for fp round support" >&5
23037echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
9719f3b7
DE
23038if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
23039 echo $ECHO_N "(cached) $ECHO_C" >&6
23040else
23041 gcc_cv_as_powerpc_fprnd=no
23042 if test $in_tree_gas = yes; then
23043 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
23044 then gcc_cv_as_powerpc_fprnd=yes
23045fi
23046 elif test x$gcc_cv_as != x; then
23047 echo "$conftest_s" > conftest.s
23048 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
23049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23050 (eval $ac_try) 2>&5
23051 ac_status=$?
23052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23053 (exit $ac_status); }; }
23054 then
23055 gcc_cv_as_powerpc_fprnd=yes
23056 else
23057 echo "configure: failed program was" >&5
23058 cat conftest.s >&5
23059 fi
23060 rm -f conftest.o conftest.s
23061 fi
23062fi
b61ff9c8
BS
23063echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
23064echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
9719f3b7
DE
23065if test $gcc_cv_as_powerpc_fprnd = yes; then
23066
23067cat >>confdefs.h <<\_ACEOF
23068#define HAVE_AS_FPRND 1
23069_ACEOF
23070
44cd321e
PS
23071fi
23072
23073 case $target in
23074 *-*-aix*) conftest_s=' .machine "pwr6"
23075 .csect .text[PR]
23076 mffgpr 1,3';;
23077 *) conftest_s=' .machine power6
23078 .text
23079 mffgpr 1,3';;
23080 esac
23081
b61ff9c8
BS
23082 echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5
23083echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6
44cd321e
PS
23084if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then
23085 echo $ECHO_N "(cached) $ECHO_C" >&6
23086else
23087 gcc_cv_as_powerpc_mfpgpr=no
23088 if test $in_tree_gas = yes; then
23089 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
23090 then gcc_cv_as_powerpc_mfpgpr=yes
23091fi
23092 elif test x$gcc_cv_as != x; then
23093 echo "$conftest_s" > conftest.s
23094 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
23095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23096 (eval $ac_try) 2>&5
23097 ac_status=$?
23098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23099 (exit $ac_status); }; }
23100 then
23101 gcc_cv_as_powerpc_mfpgpr=yes
23102 else
23103 echo "configure: failed program was" >&5
23104 cat conftest.s >&5
23105 fi
23106 rm -f conftest.o conftest.s
23107 fi
23108fi
b61ff9c8
BS
23109echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5
23110echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6
44cd321e
PS
23111if test $gcc_cv_as_powerpc_mfpgpr = yes; then
23112
23113cat >>confdefs.h <<\_ACEOF
23114#define HAVE_AS_MFPGPR 1
23115_ACEOF
23116
432218ba
DE
23117fi
23118
7f970b70
AM
23119 case $target in
23120 *-*-aix*) conftest_s=' .csect .text[PR]
23121LCF..0:
23122 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
23123 *-*-darwin*)
23124 conftest_s=' .text
23125LCF0:
23126 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
23127 *) conftest_s=' .text
23128.LCF0:
23129 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
23130 esac
23131
b61ff9c8
BS
23132 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
23133echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
695d8830
AS
23134if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
23135 echo $ECHO_N "(cached) $ECHO_C" >&6
23136else
23137 gcc_cv_as_powerpc_rel16=no
23138 if test $in_tree_gas = yes; then
23139 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
23140 then gcc_cv_as_powerpc_rel16=yes
23141fi
23142 elif test x$gcc_cv_as != x; then
23143 echo "$conftest_s" > conftest.s
23144 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
23145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23146 (eval $ac_try) 2>&5
23147 ac_status=$?
23148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23149 (exit $ac_status); }; }
23150 then
23151 gcc_cv_as_powerpc_rel16=yes
23152 else
23153 echo "configure: failed program was" >&5
23154 cat conftest.s >&5
23155 fi
23156 rm -f conftest.o conftest.s
23157 fi
23158fi
b61ff9c8
BS
23159echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
23160echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
695d8830
AS
23161if test $gcc_cv_as_powerpc_rel16 = yes; then
23162
23163cat >>confdefs.h <<\_ACEOF
23164#define HAVE_AS_REL16 1
23165_ACEOF
23166
23167fi
23168
b639c3c2
JJ
23169 case $target in
23170 *-*-aix*) conftest_s=' .machine "pwr6"
23171 .csect .text[PR]
23172 cmpb 3,4,5';;
23173 *) conftest_s=' .machine power6
23174 .text
23175 cmpb 3,4,5';;
23176 esac
23177
b61ff9c8
BS
23178 echo "$as_me:$LINENO: checking assembler for compare bytes support" >&5
23179echo $ECHO_N "checking assembler for compare bytes support... $ECHO_C" >&6
b639c3c2
JJ
23180if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then
23181 echo $ECHO_N "(cached) $ECHO_C" >&6
23182else
23183 gcc_cv_as_powerpc_cmpb=no
23184 if test $in_tree_gas = yes; then
23185 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
23186 then gcc_cv_as_powerpc_cmpb=yes
23187fi
23188 elif test x$gcc_cv_as != x; then
23189 echo "$conftest_s" > conftest.s
23190 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
23191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23192 (eval $ac_try) 2>&5
23193 ac_status=$?
23194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23195 (exit $ac_status); }; }
23196 then
23197 gcc_cv_as_powerpc_cmpb=yes
23198 else
23199 echo "configure: failed program was" >&5
23200 cat conftest.s >&5
23201 fi
23202 rm -f conftest.o conftest.s
23203 fi
23204fi
b61ff9c8
BS
23205echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_cmpb" >&5
23206echo "${ECHO_T}$gcc_cv_as_powerpc_cmpb" >&6
b639c3c2
JJ
23207if test $gcc_cv_as_powerpc_cmpb = yes; then
23208
23209cat >>confdefs.h <<\_ACEOF
23210#define HAVE_AS_CMPB 1
23211_ACEOF
23212
23213fi
23214
23215 case $target in
23216 *-*-aix*) conftest_s=' .machine "pwr6"
23217 .csect .text[PR]
0d74c0ee 23218 dadd 1,2,3';;
b639c3c2
JJ
23219 *) conftest_s=' .machine power6
23220 .text
0d74c0ee 23221 dadd 1,2,3';;
b639c3c2
JJ
23222 esac
23223
b61ff9c8
BS
23224 echo "$as_me:$LINENO: checking assembler for decimal float support" >&5
23225echo $ECHO_N "checking assembler for decimal float support... $ECHO_C" >&6
b639c3c2
JJ
23226if test "${gcc_cv_as_powerpc_dfp+set}" = set; then
23227 echo $ECHO_N "(cached) $ECHO_C" >&6
23228else
23229 gcc_cv_as_powerpc_dfp=no
23230 if test $in_tree_gas = yes; then
23231 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
23232 then gcc_cv_as_powerpc_dfp=yes
23233fi
23234 elif test x$gcc_cv_as != x; then
23235 echo "$conftest_s" > conftest.s
23236 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
23237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23238 (eval $ac_try) 2>&5
23239 ac_status=$?
23240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23241 (exit $ac_status); }; }
23242 then
23243 gcc_cv_as_powerpc_dfp=yes
23244 else
23245 echo "configure: failed program was" >&5
23246 cat conftest.s >&5
23247 fi
23248 rm -f conftest.o conftest.s
23249 fi
23250fi
b61ff9c8
BS
23251echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_dfp" >&5
23252echo "${ECHO_T}$gcc_cv_as_powerpc_dfp" >&6
b639c3c2
JJ
23253if test $gcc_cv_as_powerpc_dfp = yes; then
23254
23255cat >>confdefs.h <<\_ACEOF
23256#define HAVE_AS_DFP 1
23257_ACEOF
23258
d40c9e33
PB
23259fi
23260
23261 case $target in
23262 *-*-aix*) conftest_s=' .machine "pwr7"
23263 .csect .text[PR]
23264 lxvd2x 1,2,3';;
23265 *) conftest_s=' .machine power7
23266 .text
23267 lxvd2x 1,2,3';;
23268 esac
23269
23270 echo "$as_me:$LINENO: checking assembler for vector-scalar support" >&5
23271echo $ECHO_N "checking assembler for vector-scalar support... $ECHO_C" >&6
23272if test "${gcc_cv_as_powerpc_vsx+set}" = set; then
23273 echo $ECHO_N "(cached) $ECHO_C" >&6
23274else
23275 gcc_cv_as_powerpc_vsx=no
23276 if test $in_tree_gas = yes; then
23277 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
23278 then gcc_cv_as_powerpc_vsx=yes
23279fi
23280 elif test x$gcc_cv_as != x; then
23281 echo "$conftest_s" > conftest.s
23282 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
23283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23284 (eval $ac_try) 2>&5
23285 ac_status=$?
23286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23287 (exit $ac_status); }; }
23288 then
23289 gcc_cv_as_powerpc_vsx=yes
23290 else
23291 echo "configure: failed program was" >&5
23292 cat conftest.s >&5
23293 fi
23294 rm -f conftest.o conftest.s
23295 fi
23296fi
23297echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_vsx" >&5
23298echo "${ECHO_T}$gcc_cv_as_powerpc_vsx" >&6
23299if test $gcc_cv_as_powerpc_vsx = yes; then
23300
23301cat >>confdefs.h <<\_ACEOF
23302#define HAVE_AS_VSX 1
23303_ACEOF
23304
e51917ae
JM
23305fi
23306
b61ff9c8
BS
23307 echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
23308echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
e51917ae
JM
23309if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then
23310 echo $ECHO_N "(cached) $ECHO_C" >&6
23311else
23312 gcc_cv_as_powerpc_gnu_attribute=no
23313 if test $in_tree_gas = yes; then
23314 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
23315 then gcc_cv_as_powerpc_gnu_attribute=yes
23316fi
23317 elif test x$gcc_cv_as != x; then
23318 echo '.gnu_attribute 4,1' > conftest.s
23319 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
23320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23321 (eval $ac_try) 2>&5
23322 ac_status=$?
23323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23324 (exit $ac_status); }; }
23325 then
23326 gcc_cv_as_powerpc_gnu_attribute=yes
23327 else
23328 echo "configure: failed program was" >&5
23329 cat conftest.s >&5
23330 fi
23331 rm -f conftest.o conftest.s
23332 fi
23333fi
b61ff9c8
BS
23334echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_gnu_attribute" >&5
23335echo "${ECHO_T}$gcc_cv_as_powerpc_gnu_attribute" >&6
e51917ae
JM
23336if test $gcc_cv_as_powerpc_gnu_attribute = yes; then
23337
23338cat >>confdefs.h <<\_ACEOF
23339#define HAVE_AS_GNU_ATTRIBUTE 1
23340_ACEOF
23341
9752c4ad
AM
23342fi
23343
23344 echo "$as_me:$LINENO: checking assembler for tls marker support" >&5
23345echo $ECHO_N "checking assembler for tls marker support... $ECHO_C" >&6
23346if test "${gcc_cv_as_powerpc_tls_markers+set}" = set; then
23347 echo $ECHO_N "(cached) $ECHO_C" >&6
23348else
23349 gcc_cv_as_powerpc_tls_markers=no
23350 if test $in_tree_gas = yes; then
207bf79d 23351 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 0`
9752c4ad
AM
23352 then gcc_cv_as_powerpc_tls_markers=yes
23353fi
23354 elif test x$gcc_cv_as != x; then
23355 echo ' bl __tls_get_addr(x@tlsgd)' > conftest.s
23356 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
23357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23358 (eval $ac_try) 2>&5
23359 ac_status=$?
23360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23361 (exit $ac_status); }; }
23362 then
23363 gcc_cv_as_powerpc_tls_markers=yes
23364 else
23365 echo "configure: failed program was" >&5
23366 cat conftest.s >&5
23367 fi
23368 rm -f conftest.o conftest.s
23369 fi
23370fi
23371echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_tls_markers" >&5
23372echo "${ECHO_T}$gcc_cv_as_powerpc_tls_markers" >&6
23373if test $gcc_cv_as_powerpc_tls_markers = yes; then
23374
23375cat >>confdefs.h <<\_ACEOF
23376#define HAVE_AS_TLS_MARKERS 1
23377_ACEOF
23378
7f970b70 23379fi
8ada417f
ZW
23380 ;;
23381
23382 mips*-*-*)
b61ff9c8
BS
23383 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
23384echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
23385if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
23386 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
23387else
23388 gcc_cv_as_mips_explicit_relocs=no
23389 if test $in_tree_gas = yes; then
23390 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
23391 then gcc_cv_as_mips_explicit_relocs=yes
23392fi
23393 elif test x$gcc_cv_as != x; then
6e3f3080 23394 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
23395 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
23396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23397 (eval $ac_try) 2>&5
23398 ac_status=$?
23399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23400 (exit $ac_status); }; }
8ada417f
ZW
23401 then
23402 gcc_cv_as_mips_explicit_relocs=yes
23403 else
23404 echo "configure: failed program was" >&5
23405 cat conftest.s >&5
ef1ecf87 23406 fi
8ada417f
ZW
23407 rm -f conftest.o conftest.s
23408 fi
23409fi
b61ff9c8
BS
23410echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
23411echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
23412if test $gcc_cv_as_mips_explicit_relocs = yes; then
23413 if test x$target_cpu_default = x
23414 then target_cpu_default=MASK_EXPLICIT_RELOCS
23415 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
23416 fi
4551169f 23417fi
b61ff9c8
BS
23418 echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5
23419echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6
4551169f
RS
23420if test "${gcc_cv_as_mips_no_shared+set}" = set; then
23421 echo $ECHO_N "(cached) $ECHO_C" >&6
23422else
23423 gcc_cv_as_mips_no_shared=no
23424 if test $in_tree_gas = yes; then
23425 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
23426 then gcc_cv_as_mips_no_shared=yes
23427fi
23428 elif test x$gcc_cv_as != x; then
23429 echo 'nop' > conftest.s
23430 if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5'
23431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23432 (eval $ac_try) 2>&5
23433 ac_status=$?
23434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23435 (exit $ac_status); }; }
23436 then
23437 gcc_cv_as_mips_no_shared=yes
23438 else
23439 echo "configure: failed program was" >&5
23440 cat conftest.s >&5
23441 fi
23442 rm -f conftest.o conftest.s
23443 fi
23444fi
b61ff9c8
BS
23445echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5
23446echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6
4551169f
RS
23447if test $gcc_cv_as_mips_no_shared = yes; then
23448
23449cat >>confdefs.h <<\_ACEOF
23450#define HAVE_AS_NO_SHARED 1
23451_ACEOF
23452
dcb957d9
JM
23453fi
23454
b61ff9c8
BS
23455 echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
23456echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
dcb957d9
JM
23457if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then
23458 echo $ECHO_N "(cached) $ECHO_C" >&6
23459else
23460 gcc_cv_as_mips_gnu_attribute=no
23461 if test $in_tree_gas = yes; then
23462 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
23463 then gcc_cv_as_mips_gnu_attribute=yes
23464fi
23465 elif test x$gcc_cv_as != x; then
23466 echo '.gnu_attribute 4,1' > conftest.s
23467 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
23468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23469 (eval $ac_try) 2>&5
23470 ac_status=$?
23471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23472 (exit $ac_status); }; }
23473 then
23474 gcc_cv_as_mips_gnu_attribute=yes
23475 else
23476 echo "configure: failed program was" >&5
23477 cat conftest.s >&5
23478 fi
23479 rm -f conftest.o conftest.s
23480 fi
23481fi
b61ff9c8
BS
23482echo "$as_me:$LINENO: result: $gcc_cv_as_mips_gnu_attribute" >&5
23483echo "${ECHO_T}$gcc_cv_as_mips_gnu_attribute" >&6
dcb957d9
JM
23484if test $gcc_cv_as_mips_gnu_attribute = yes; then
23485
23486cat >>confdefs.h <<\_ACEOF
23487#define HAVE_AS_GNU_ATTRIBUTE 1
23488_ACEOF
23489
a44380d2
JM
23490fi
23491
b61ff9c8
BS
23492 echo "$as_me:$LINENO: checking assembler for .dtprelword support" >&5
23493echo $ECHO_N "checking assembler for .dtprelword support... $ECHO_C" >&6
a44380d2
JM
23494if test "${gcc_cv_as_mips_dtprelword+set}" = set; then
23495 echo $ECHO_N "(cached) $ECHO_C" >&6
23496else
23497 gcc_cv_as_mips_dtprelword=no
23498 if test $in_tree_gas = yes; then
23499 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
23500 then gcc_cv_as_mips_dtprelword=yes
23501fi
23502 elif test x$gcc_cv_as != x; then
23503 echo '.section .tdata,"awT",@progbits
23504x:
23505 .word 2
23506 .text
23507 .dtprelword x+0x8000' > conftest.s
23508 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
23509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23510 (eval $ac_try) 2>&5
23511 ac_status=$?
23512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23513 (exit $ac_status); }; }
23514 then
23515 gcc_cv_as_mips_dtprelword=yes
23516 else
23517 echo "configure: failed program was" >&5
23518 cat conftest.s >&5
23519 fi
23520 rm -f conftest.o conftest.s
23521 fi
23522fi
b61ff9c8
BS
23523echo "$as_me:$LINENO: result: $gcc_cv_as_mips_dtprelword" >&5
23524echo "${ECHO_T}$gcc_cv_as_mips_dtprelword" >&6
a44380d2
JM
23525if test $gcc_cv_as_mips_dtprelword = yes; then
23526
23527cat >>confdefs.h <<\_ACEOF
23528#define HAVE_AS_DTPRELWORD 1
23529_ACEOF
23530
8ada417f 23531fi
dbad5e72
SE
23532 ;;
23533esac
8ada417f 23534
dbad5e72
SE
23535# Mips and HP-UX need the GNU assembler.
23536# Linux on IA64 might be able to use the Intel assembler.
23537
23538case "$target" in
23539 mips*-*-* | *-*-hpux* )
82563d35
RS
23540 if test x$gas_flag = xyes \
23541 || test x"$host" != x"$build" \
23542 || test ! -x "$gcc_cv_as" \
23543 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
23544 :
23545 else
23546 echo "*** This configuration requires the GNU assembler" >&2
23547 exit 1
23548 fi
ef1ecf87 23549 ;;
1cb36a98 23550esac
dbad5e72 23551
9d147085
RH
23552# ??? Not all targets support dwarf2 debug_line, even within a version
23553# of gas. Moreover, we need to emit a valid instruction to trigger any
23554# info to the output file. So, as supported targets are added to gas 2.11,
23555# add some instruction here to (also) show we expect this might work.
23556# ??? Once 2.11 is released, probably need to add first known working
23557# version to the per-target configury.
23558case "$target" in
80486e06 23559 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
cd985f66 23560 | x86_64*-*-* | hppa*-*-* | arm*-*-* \
ad9646c7 23561 | xstormy16*-*-* | cris-*-* | crisv32-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \
15a43677 23562 | spu-*-* | fido*-*-* | m32c-*-*)
9d147085
RH
23563 insn="nop"
23564 ;;
57116d8d 23565 ia64*-*-* | s390*-*-*)
9d147085
RH
23566 insn="nop 0"
23567 ;;
2853bc5a
HPN
23568 mmix-*-*)
23569 insn="swym 0"
23570 ;;
8ada417f
ZW
23571esac
23572if test x"$insn" != x; then
23573 conftest_s="\
23574 .file 1 \"conftest.s\"
23575 .loc 1 3 0
23576 $insn"
b61ff9c8
BS
23577 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
23578echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
ba479fd2
NN
23579if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
23580 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
23581else
23582 gcc_cv_as_dwarf2_debug_line=no
23583 if test $in_tree_gas = yes; then
23584 if test $in_tree_gas_is_elf = yes \
23585 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
23586 then gcc_cv_as_dwarf2_debug_line=yes
23587fi
23588 elif test x$gcc_cv_as != x; then
6e3f3080 23589 echo "$conftest_s" > conftest.s
ba479fd2
NN
23590 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
23591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23592 (eval $ac_try) 2>&5
23593 ac_status=$?
23594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23595 (exit $ac_status); }; }
8ada417f 23596 then
080a5bb0
EB
23597 if test x$gcc_cv_objdump != x \
23598 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
23599 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
23600 gcc_cv_as_dwarf2_debug_line=yes
23601 fi
23602 else
23603 echo "configure: failed program was" >&5
23604 cat conftest.s >&5
23605 fi
23606 rm -f conftest.o conftest.s
23607 fi
23608fi
b61ff9c8
BS
23609echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
23610echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 23611
ad9c4d9f 23612
8ada417f
ZW
23613# The .debug_line file table must be in the exact order that
23614# we specified the files, since these indices are also used
23615# by DW_AT_decl_file. Approximate this test by testing if
23616# the assembler bitches if the same index is assigned twice.
b61ff9c8
BS
23617 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
23618echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
ba479fd2
NN
23619if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
23620 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
23621else
23622 gcc_cv_as_dwarf2_file_buggy=no
23623 if test x$gcc_cv_as != x; then
6e3f3080 23624 echo ' .file 1 "foo.s"
8ada417f 23625 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
23626 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
23627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23628 (eval $ac_try) 2>&5
23629 ac_status=$?
23630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23631 (exit $ac_status); }; }
8ada417f
ZW
23632 then
23633 gcc_cv_as_dwarf2_file_buggy=yes
23634 else
23635 echo "configure: failed program was" >&5
23636 cat conftest.s >&5
23637 fi
23638 rm -f conftest.o conftest.s
23639 fi
ad9c4d9f 23640fi
b61ff9c8
BS
23641echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
23642echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
23643
23644
23645 if test $gcc_cv_as_dwarf2_debug_line = yes \
23646 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
23647
23648cat >>confdefs.h <<\_ACEOF
9d147085 23649#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 23650_ACEOF
9d147085 23651
8ada417f 23652 fi
ad9c4d9f 23653
b61ff9c8
BS
23654 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
23655echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
ba479fd2
NN
23656if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
23657 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
23658else
23659 gcc_cv_as_gdwarf2_flag=no
23660 if test $in_tree_gas = yes; then
23661 if test $in_tree_gas_is_elf = yes \
23662 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
23663 then gcc_cv_as_gdwarf2_flag=yes
23664fi
23665 elif test x$gcc_cv_as != x; then
6e3f3080 23666 echo "$insn" > conftest.s
ba479fd2
NN
23667 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
23668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23669 (eval $ac_try) 2>&5
23670 ac_status=$?
23671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23672 (exit $ac_status); }; }
8ada417f
ZW
23673 then
23674 gcc_cv_as_gdwarf2_flag=yes
23675 else
23676 echo "configure: failed program was" >&5
23677 cat conftest.s >&5
23678 fi
23679 rm -f conftest.o conftest.s
23680 fi
ad9c4d9f 23681fi
b61ff9c8
BS
23682echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
23683echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 23684if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
23685
23686cat >>confdefs.h <<\_ACEOF
5f0e9ea2 23687#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 23688_ACEOF
5f0e9ea2
GK
23689
23690fi
ad9c4d9f 23691
b61ff9c8
BS
23692 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
23693echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
ba479fd2
NN
23694if test "${gcc_cv_as_gstabs_flag+set}" = set; then
23695 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
23696else
23697 gcc_cv_as_gstabs_flag=no
23698 if test $in_tree_gas = yes; then
23699 if test $in_tree_gas_is_elf = yes \
23700 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
23701 then gcc_cv_as_gstabs_flag=yes
23702fi
23703 elif test x$gcc_cv_as != x; then
6e3f3080 23704 echo "$insn" > conftest.s
ba479fd2
NN
23705 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
23706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23707 (eval $ac_try) 2>&5
23708 ac_status=$?
23709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23710 (exit $ac_status); }; }
8ada417f
ZW
23711 then
23712 # The native Solaris 9/Intel assembler doesn't understand --gstabs
23713 # and warns about it, but still exits successfully. So check for
23714 # this.
ba479fd2
NN
23715 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
23716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23717 (eval $ac_try) 2>&5
23718 ac_status=$?
23719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23720 (exit $ac_status); }; }
8ada417f
ZW
23721 then :
23722 else gcc_cv_as_gstabs_flag=yes
23723 fi
23724 else
23725 echo "configure: failed program was" >&5
23726 cat conftest.s >&5
23727 fi
23728 rm -f conftest.o conftest.s
23729 fi
ad9c4d9f 23730fi
b61ff9c8
BS
23731echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
23732echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 23733if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
23734
23735cat >>confdefs.h <<\_ACEOF
5f0e9ea2 23736#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 23737_ACEOF
5f0e9ea2 23738
c8aea42c
PB
23739fi
23740
b61ff9c8
BS
23741 echo "$as_me:$LINENO: checking assembler for --debug-prefix-map option" >&5
23742echo $ECHO_N "checking assembler for --debug-prefix-map option... $ECHO_C" >&6
c8aea42c
PB
23743if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then
23744 echo $ECHO_N "(cached) $ECHO_C" >&6
23745else
23746 gcc_cv_as_debug_prefix_map_flag=no
23747 if test $in_tree_gas = yes; then
303a4698 23748 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
c8aea42c
PB
23749 then gcc_cv_as_debug_prefix_map_flag=yes
23750fi
23751 elif test x$gcc_cv_as != x; then
23752 echo "$insn" > conftest.s
23753 if { ac_try='$gcc_cv_as --debug-prefix-map /a=/b -o conftest.o conftest.s >&5'
23754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23755 (eval $ac_try) 2>&5
23756 ac_status=$?
23757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23758 (exit $ac_status); }; }
23759 then
23760 gcc_cv_as_debug_prefix_map_flag=yes
23761 else
23762 echo "configure: failed program was" >&5
23763 cat conftest.s >&5
23764 fi
23765 rm -f conftest.o conftest.s
23766 fi
23767fi
b61ff9c8
BS
23768echo "$as_me:$LINENO: result: $gcc_cv_as_debug_prefix_map_flag" >&5
23769echo "${ECHO_T}$gcc_cv_as_debug_prefix_map_flag" >&6
c8aea42c
PB
23770if test $gcc_cv_as_debug_prefix_map_flag = yes; then
23771
23772cat >>confdefs.h <<\_ACEOF
23773#define HAVE_AS_DEBUG_PREFIX_MAP 1
23774_ACEOF
23775
5f0e9ea2 23776fi
8ada417f 23777fi
5f0e9ea2 23778
28e6bb13
NC
23779echo "$as_me:$LINENO: checking assembler for .lcomm with alignment" >&5
23780echo $ECHO_N "checking assembler for .lcomm with alignment... $ECHO_C" >&6
23781if test "${gcc_cv_as_lcomm_with_alignment+set}" = set; then
23782 echo $ECHO_N "(cached) $ECHO_C" >&6
23783else
23784 gcc_cv_as_lcomm_with_alignment=no
23785 if test x$gcc_cv_as != x; then
23786 echo '.lcomm bar,4,16' > conftest.s
23787 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
23788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23789 (eval $ac_try) 2>&5
23790 ac_status=$?
23791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23792 (exit $ac_status); }; }
23793 then
23794 gcc_cv_as_lcomm_with_alignment=yes
23795 else
23796 echo "configure: failed program was" >&5
23797 cat conftest.s >&5
23798 fi
23799 rm -f conftest.o conftest.s
23800 fi
23801fi
23802echo "$as_me:$LINENO: result: $gcc_cv_as_lcomm_with_alignment" >&5
23803echo "${ECHO_T}$gcc_cv_as_lcomm_with_alignment" >&6
23804if test $gcc_cv_as_lcomm_with_alignment = yes; then
23805
23806cat >>confdefs.h <<\_ACEOF
23807#define HAVE_GAS_LCOMM_WITH_ALIGNMENT 1
23808_ACEOF
23809
23810fi
23811
b61ff9c8
BS
23812echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5
23813echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6
03943c05
AO
23814if test "${gcc_cv_as_line_zero+set}" = set; then
23815 echo $ECHO_N "(cached) $ECHO_C" >&6
23816else
23817 gcc_cv_as_line_zero=no
23818 if test $in_tree_gas = yes; then
cf0eb7a1
AO
23819 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
23820 then gcc_cv_as_line_zero=yes
03943c05
AO
23821fi
23822 elif test "x$gcc_cv_as" != x; then
23823 { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
23824 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
23825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23826 (eval $ac_try) 2>&5
23827 ac_status=$?
23828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23829 (exit $ac_status); }; } &&
23830 test "x`cat conftest.out`" = x
23831 then
23832 gcc_cv_as_line_zero=yes
23833 else
23834 echo "configure: failed program was" >&5
23835 cat conftest.s >&5
23836 echo "configure: error output was" >&5
23837 cat conftest.out >&5
23838 fi
23839 rm -f conftest.o conftest.s conftest.out
23840 fi
23841fi
b61ff9c8
BS
23842echo "$as_me:$LINENO: result: $gcc_cv_as_line_zero" >&5
23843echo "${ECHO_T}$gcc_cv_as_line_zero" >&6
03943c05
AO
23844if test "x$gcc_cv_as_line_zero" = xyes; then
23845
23846cat >>confdefs.h <<\_ACEOF
23847#define HAVE_AS_LINE_ZERO 1
23848_ACEOF
23849
23850fi
23851
b61ff9c8
BS
23852echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
23853echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 23854gcc_cv_ld_eh_frame_hdr=no
34a86c2b 23855if test $in_tree_ld = yes ; then
5408ac6c
HPN
23856 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 \
23857 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
23858 gcc_cv_ld_eh_frame_hdr=yes
23859 fi
23860elif test x$gcc_cv_ld != x; then
23861 # Check if linker supports --eh-frame-hdr option
23862 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
23863 gcc_cv_ld_eh_frame_hdr=yes
23864 fi
23865fi
232b67d9 23866
275b60d6 23867if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
23868
23869cat >>confdefs.h <<\_ACEOF
275b60d6 23870#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 23871_ACEOF
275b60d6
JJ
23872
23873fi
b61ff9c8
BS
23874echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
23875echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 23876
b61ff9c8
BS
23877echo "$as_me:$LINENO: checking linker position independent executable support" >&5
23878echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
23879gcc_cv_ld_pie=no
23880if test $in_tree_ld = yes ; then
5408ac6c
HPN
23881 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 \
23882 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
23883 gcc_cv_ld_pie=yes
23884 fi
23885elif test x$gcc_cv_ld != x; then
23886 # Check if linker supports -pie option
23887 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
23888 gcc_cv_ld_pie=yes
23889 fi
23890fi
23891if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
23892
23893cat >>confdefs.h <<\_ACEOF
24a4dd31 23894#define HAVE_LD_PIE 1
ba479fd2 23895_ACEOF
24a4dd31
JJ
23896
23897fi
b61ff9c8
BS
23898echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
23899echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 23900
b61ff9c8
BS
23901echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5
23902echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6
22ba88ef 23903gcc_cv_ld_eh_gc_sections=no
b639c3c2
JJ
23904if test $in_tree_ld = yes ; then
23905 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 \
23906 && test $in_tree_ld_is_elf = yes; then
23907 gcc_cv_ld_eh_gc_sections=yes
23908 fi
23909elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
23910 cat > conftest.s <<EOF
23911 .section .text
23912.globl _start
23913 .type _start, @function
23914_start:
23915 .long foo
23916 .size _start, .-_start
23917 .section .text.foo,"ax",@progbits
23918 .type foo, @function
23919foo:
23920 .long 0
23921 .size foo, .-foo
23922 .section .gcc_except_table.foo,"a",@progbits
23923.L0:
23924 .long 0
23925 .section .eh_frame,"a",@progbits
23926 .long .L0
23927EOF
23928 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
23929 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
23930 | grep "gc-sections option ignored" > /dev/null; then
23931 gcc_cv_ld_eh_gc_sections=no
23932 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
23933 gcc_cv_ld_eh_gc_sections=yes
23934 # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
23935 if test x$gcc_cv_as_comdat_group != xyes; then
23936 gcc_cv_ld_eh_gc_sections=no
23937 cat > conftest.s <<EOF
23938 .section .text
23939.globl _start
23940 .type _start, @function
23941_start:
23942 .long foo
23943 .size _start, .-_start
23944 .section .gnu.linkonce.t.foo,"ax",@progbits
23945 .type foo, @function
23946foo:
23947 .long 0
23948 .size foo, .-foo
23949 .section .gcc_except_table.foo,"a",@progbits
23950.L0:
23951 .long 0
23952 .section .eh_frame,"a",@progbits
23953 .long .L0
23954EOF
23955 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
23956 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
23957 | grep "gc-sections option ignored" > /dev/null; then
23958 gcc_cv_ld_eh_gc_sections=no
23959 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
23960 gcc_cv_ld_eh_gc_sections=yes
23961 fi
23962 fi
23963 fi
23964 fi
23965 fi
23966 rm -f conftest.s conftest.o conftest
23967fi
e9d207d9
EB
23968case "$target" in
23969 hppa*-*-linux*)
23970 # ??? This apparently exposes a binutils bug with PC-relative relocations.
23971 gcc_cv_ld_eh_gc_sections=no
23972 ;;
23973esac
22ba88ef
EB
23974if test x$gcc_cv_ld_eh_gc_sections = xyes; then
23975
23976cat >>confdefs.h <<\_ACEOF
23977#define HAVE_LD_EH_GC_SECTIONS 1
23978_ACEOF
23979
23980fi
b61ff9c8
BS
23981echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5
23982echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6
22ba88ef 23983
8bb915b6
NN
23984# --------
23985# UNSORTED
23986# --------
23987
b61ff9c8
BS
23988echo "$as_me:$LINENO: checking linker --as-needed support" >&5
23989echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
23990if test "${gcc_cv_ld_as_needed+set}" = set; then
23991 echo $ECHO_N "(cached) $ECHO_C" >&6
23992else
23993 gcc_cv_ld_as_needed=no
765f1bf9
AM
23994if test $in_tree_ld = yes ; then
23995 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 \
23996 && test $in_tree_ld_is_elf = yes; then
23997 gcc_cv_ld_as_needed=yes
23998 fi
23999elif test x$gcc_cv_ld != x; then
24000 # Check if linker supports --as-needed and --no-as-needed options
24001 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
24002 gcc_cv_ld_as_needed=yes
24003 fi
24004fi
82e923f6
RS
24005
24006fi
b61ff9c8
BS
24007echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
24008echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
24009if test x"$gcc_cv_ld_as_needed" = xyes; then
24010
24011cat >>confdefs.h <<\_ACEOF
24012#define HAVE_LD_AS_NEEDED 1
24013_ACEOF
24014
24015fi
765f1bf9 24016
d82bf747
AM
24017case "$target:$tm_file" in
24018 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
b61ff9c8
BS
24019 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
24020echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
85b776df
AM
24021if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
24022 echo $ECHO_N "(cached) $ECHO_C" >&6
24023else
24024 gcc_cv_ld_no_dot_syms=no
24025 if test $in_tree_ld = yes ; then
24026 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
24027 gcc_cv_ld_no_dot_syms=yes
24028 fi
24029 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
24030 cat > conftest1.s <<EOF
24031 .text
24032 bl .foo
24033EOF
24034 cat > conftest2.s <<EOF
24035 .section ".opd","aw"
24036 .align 3
24037 .globl foo
24038 .type foo,@function
24039foo:
24040 .quad .LEfoo,.TOC.@tocbase,0
24041 .text
24042.LEfoo:
24043 blr
24044 .size foo,.-.LEfoo
24045EOF
24046 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
24047 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
24048 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
24049 gcc_cv_ld_no_dot_syms=yes
24050 fi
24051 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
24052 fi
24053
24054fi
b61ff9c8
BS
24055echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
24056echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
85b776df
AM
24057 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
24058
24059cat >>confdefs.h <<\_ACEOF
24060#define HAVE_LD_NO_DOT_SYMS 1
24061_ACEOF
24062
24063 fi
24064 ;;
24065esac
24066
b61ff9c8
BS
24067echo "$as_me:$LINENO: checking linker --sysroot support" >&5
24068echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
380e5ca4
MM
24069if test "${gcc_cv_ld_sysroot+set}" = set; then
24070 echo $ECHO_N "(cached) $ECHO_C" >&6
24071else
24072 gcc_cv_ld_sysroot=no
24073 if test $in_tree_ld = yes ; then
24074 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 24075 gcc_cv_ld_sysroot=yes
380e5ca4
MM
24076 fi
24077 elif test x$gcc_cv_ld != x; then
24078 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
24079 gcc_cv_ld_sysroot=yes
24080 fi
24081 fi
24082fi
b61ff9c8
BS
24083echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
24084echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
380e5ca4
MM
24085if test x"$gcc_cv_ld_sysroot" = xyes; then
24086
24087cat >>confdefs.h <<\_ACEOF
24088#define HAVE_LD_SYSROOT 1
24089_ACEOF
24090
24091fi
24092
9fb28a67 24093if test x$with_sysroot = x && test x$host = x$target \
c794c06f
CD
24094 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
24095 && test "$prefix" != "NONE"; then
ba479fd2
NN
24096
24097cat >>confdefs.h <<_ACEOF
793e9558 24098#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 24099_ACEOF
793e9558
PB
24100
24101fi
24102
77008252 24103# Test for stack protector support in target C library.
b61ff9c8
BS
24104echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5
24105echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6
77008252
JJ
24106if test "${gcc_cv_libc_provides_ssp+set}" = set; then
24107 echo $ECHO_N "(cached) $ECHO_C" >&6
24108else
24109 gcc_cv_libc_provides_ssp=no
a6ccdbab 24110 case "$target" in
22f96a0f 24111 *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
77008252
JJ
24112 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
24113 if test "x$with_sysroot" = x; then
24114 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
24115 elif test "x$with_build_sysroot" != "x"; then
24116 glibc_header_dir="${with_build_sysroot}/usr/include"
77008252
JJ
24117 elif test "x$with_sysroot" = xyes; then
24118 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
24119 else
24120 glibc_header_dir="${with_sysroot}/usr/include"
24121 fi
24122 else
24123 glibc_header_dir=/usr/include
24124 fi
24125 # glibc 2.4 and later provides __stack_chk_fail and
24126 # either __stack_chk_guard, or TLS access to stack guard canary.
24127 if test -f $glibc_header_dir/features.h \
24128 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
24129 $glibc_header_dir/features.h > /dev/null; then
24130 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
24131 $glibc_header_dir/features.h > /dev/null; then
24132 gcc_cv_libc_provides_ssp=yes
24133 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
24134 $glibc_header_dir/features.h > /dev/null \
24135 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
24136 $glibc_header_dir/features.h > /dev/null; then
24137 gcc_cv_libc_provides_ssp=yes
fed6d628
BF
24138 elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \
24139 $glibc_header_dir/features.h > /dev/null && \
24140 test -f $glibc_header_dir/bits/uClibc_config.h && \
24141 $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \
24142 $glibc_header_dir/bits/uClibc_config.h > /dev/null; then
24143 gcc_cv_libc_provides_ssp=yes
77008252 24144 fi
fed6d628 24145 fi
a6ccdbab 24146 ;;
4cc115a2
TS
24147 *-*-gnu*)
24148 # Avoid complicated tests (see
24149 # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
24150 # simply assert that glibc does provide this, which is true for all
24151 # realistically usable GNU/Hurd configurations.
24152 gcc_cv_libc_provides_ssp=yes;;
a6ccdbab 24153 *-*-darwin*)
b61ff9c8
BS
24154 echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5
24155echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6
a6ccdbab
EC
24156if test "${ac_cv_func___stack_chk_fail+set}" = set; then
24157 echo $ECHO_N "(cached) $ECHO_C" >&6
24158else
24159 cat >conftest.$ac_ext <<_ACEOF
24160/* confdefs.h. */
24161_ACEOF
24162cat confdefs.h >>conftest.$ac_ext
24163cat >>conftest.$ac_ext <<_ACEOF
24164/* end confdefs.h. */
24165/* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail.
24166 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24167#define __stack_chk_fail innocuous___stack_chk_fail
24168
24169/* System header to define __stub macros and hopefully few prototypes,
24170 which can conflict with char __stack_chk_fail (); below.
24171 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24172 <limits.h> exists even on freestanding compilers. */
24173
24174#ifdef __STDC__
24175# include <limits.h>
24176#else
24177# include <assert.h>
24178#endif
24179
24180#undef __stack_chk_fail
24181
b61ff9c8 24182/* Override any gcc2 internal prototype to avoid an error. */
a6ccdbab
EC
24183#ifdef __cplusplus
24184extern "C"
b61ff9c8 24185{
a6ccdbab 24186#endif
b61ff9c8
BS
24187/* We use char because int might match the return type of a gcc2
24188 builtin and then its argument prototype would still apply. */
a6ccdbab
EC
24189char __stack_chk_fail ();
24190/* The GNU C library defines this for functions which it implements
24191 to always fail with ENOSYS. Some functions are actually named
24192 something starting with __ and the normal name is an alias. */
b61ff9c8 24193#if defined (__stub___stack_chk_fail) || defined (__stub_____stack_chk_fail)
a6ccdbab 24194choke me
b61ff9c8
BS
24195#else
24196char (*f) () = __stack_chk_fail;
24197#endif
24198#ifdef __cplusplus
24199}
a6ccdbab
EC
24200#endif
24201
24202int
24203main ()
24204{
b61ff9c8 24205return f != __stack_chk_fail;
a6ccdbab
EC
24206 ;
24207 return 0;
24208}
24209_ACEOF
24210rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
24211if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24212 (eval $ac_link) 2>conftest.er1
a6ccdbab
EC
24213 ac_status=$?
24214 grep -v '^ *+' conftest.er1 >conftest.err
24215 rm -f conftest.er1
24216 cat conftest.err >&5
24217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
24218 (exit $ac_status); } &&
24219 { ac_try='test -z "$ac_c_werror_flag"
24220 || test ! -s conftest.err'
24221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24222 (eval $ac_try) 2>&5
24223 ac_status=$?
24224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24225 (exit $ac_status); }; } &&
24226 { ac_try='test -s conftest$ac_exeext'
24227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24228 (eval $ac_try) 2>&5
24229 ac_status=$?
24230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24231 (exit $ac_status); }; }; then
8b1f719a
PB
24232 ac_cv_func___stack_chk_fail=yes
24233else
a6ccdbab
EC
24234 echo "$as_me: failed program was:" >&5
24235sed 's/^/| /' conftest.$ac_ext >&5
24236
b61ff9c8 24237ac_cv_func___stack_chk_fail=no
a6ccdbab 24238fi
b61ff9c8 24239rm -f conftest.err conftest.$ac_objext \
a6ccdbab
EC
24240 conftest$ac_exeext conftest.$ac_ext
24241fi
b61ff9c8
BS
24242echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5
24243echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6
a6ccdbab
EC
24244if test $ac_cv_func___stack_chk_fail = yes; then
24245 gcc_cv_libc_provides_ssp=yes
24246else
24247 echo "no __stack_chk_fail on this target"
77008252 24248fi
a6ccdbab
EC
24249
24250 ;;
77008252 24251 *) gcc_cv_libc_provides_ssp=no ;;
a6ccdbab
EC
24252 esac
24253fi
b61ff9c8
BS
24254echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
24255echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6
a6ccdbab 24256
77008252
JJ
24257if test x$gcc_cv_libc_provides_ssp = xyes; then
24258
24259cat >>confdefs.h <<\_ACEOF
24260#define TARGET_LIBC_PROVIDES_SSP 1
24261_ACEOF
24262
24263fi
24264
ed965309
JJ
24265# Check if TFmode long double should be used by default or not.
24266# Some glibc targets used DFmode long double, but with glibc 2.4
24267# and later they can use TFmode.
24268case "$target" in
f7cc5390
JM
24269 powerpc*-*-linux* | \
24270 powerpc*-*-gnu* | \
ed965309
JJ
24271 sparc*-*-linux* | \
24272 s390*-*-linux* | \
24273 alpha*-*-linux*)
24274
b61ff9c8 24275# Check whether --with-long-double-128 or --without-long-double-128 was given.
ed965309 24276if test "${with_long_double_128+set}" = set; then
b61ff9c8
BS
24277 withval="$with_long_double_128"
24278 gcc_cv_target_ldbl128="$with_long_double_128"
ed965309
JJ
24279else
24280 gcc_cv_target_ldbl128=no
24281 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
24282 if test "x$with_sysroot" = x; then
24283 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
24284 elif test "x$with_build_sysroot" != "x"; then
24285 glibc_header_dir="${with_build_sysroot}/usr/include"
ed965309
JJ
24286 elif test "x$with_sysroot" = xyes; then
24287 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
24288 else
24289 glibc_header_dir="${with_sysroot}/usr/include"
24290 fi
24291 else
24292 glibc_header_dir=/usr/include
24293 fi
65280f6c 24294 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
ed965309
JJ
24295 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
24296 && gcc_cv_target_ldbl128=yes
65280f6c 24297
b61ff9c8 24298fi;
ed965309
JJ
24299 ;;
24300esac
24301if test x$gcc_cv_target_ldbl128 = xyes; then
24302
24303cat >>confdefs.h <<\_ACEOF
24304#define TARGET_DEFAULT_LONG_DOUBLE_128 1
24305_ACEOF
24306
24307fi
24308
81bf3d9e 24309# Find out what GC implementation we want, or may, use.
ba479fd2 24310
b61ff9c8 24311# Check whether --with-gc or --without-gc was given.
81bf3d9e 24312if test "${with_gc+set}" = set; then
b61ff9c8
BS
24313 withval="$with_gc"
24314 case "$withval" in
08cee789 24315 page)
81bf3d9e 24316 GGC=ggc-$withval
08cee789
DJ
24317 ;;
24318 zone)
24319 GGC=ggc-$withval
24320
24321cat >>confdefs.h <<\_ACEOF
24322#define GGC_ZONE 1
24323_ACEOF
24324
81bf3d9e
RH
24325 ;;
24326 *)
ba479fd2
NN
24327 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
24328echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
24329 { (exit 1); exit 1; }; }
81bf3d9e
RH
24330 ;;
24331esac
24332else
005537df 24333 GGC=ggc-page
b61ff9c8 24334fi;
81bf3d9e
RH
24335
24336echo "Using $GGC for garbage collection."
24337
3c809ba4 24338# Use the system's zlib library.
b8dad04b
ZW
24339zlibdir=-L../zlib
24340zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 24341
b61ff9c8 24342# Check whether --with-system-zlib or --without-system-zlib was given.
3c809ba4 24343if test "${with_system_zlib+set}" = set; then
b61ff9c8
BS
24344 withval="$with_system_zlib"
24345 zlibdir=
3c809ba4
AG
24346zlibinc=
24347
b61ff9c8 24348fi;
b8ec3cc8 24349
703d89ab 24350
ab22c1fa 24351
1a4b763e 24352
b61ff9c8
BS
24353echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
24354echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
24355 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
dc6746e7 24356if test "${enable_maintainer_mode+set}" = set; then
b61ff9c8
BS
24357 enableval="$enable_maintainer_mode"
24358 maintainer_mode=$enableval
dc6746e7
PT
24359else
24360 maintainer_mode=no
b61ff9c8 24361fi;
a6ccdbab 24362
b61ff9c8
BS
24363echo "$as_me:$LINENO: result: $maintainer_mode" >&5
24364echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
24365
24366if test "$maintainer_mode" = "yes"; then
24367 MAINT=''
24368else
24369 MAINT='#'
24370fi
24371
8bb915b6
NN
24372# --------------
24373# Language hooks
24374# --------------
24375
861bb6c1
JL
24376# Make empty files to contain the specs and options for each language.
24377# Then add #include lines to for a compiler that has specs and/or options.
24378
cc11cc9b 24379subdirs=
d7b42618 24380lang_opt_files=
861bb6c1 24381lang_specs_files=
3103b7db 24382lang_tree_files=
861bb6c1
JL
24383# These (without "all_") are set in each config-lang.in.
24384# `language' must be a single word so is spelled singularly.
24385all_languages=
861bb6c1 24386all_compilers=
47ad7893 24387all_outputs='Makefile gccbug'
861bb6c1 24388# List of language makefile fragments.
2ed26f6b
ZW
24389all_lang_makefrags=
24390# List of language subdirectory makefiles. Deprecated.
861bb6c1 24391all_lang_makefiles=
703d89ab 24392# Additional files for gengtype
ef69da62 24393all_gtfiles="$target_gtfiles"
861bb6c1 24394
cc11cc9b
PB
24395# These are the languages that are set in --enable-languages,
24396# and are available in the GCC tree.
24397all_selected_languages=
24398
861bb6c1
JL
24399# Add the language fragments.
24400# Languages are added via two mechanisms. Some information must be
24401# recorded in makefile variables, these are defined in config-lang.in.
24402# We accumulate them and plug them into the main Makefile.
24403# The other mechanism is a set of hooks for each of the main targets
24404# like `clean', `install', etc.
24405
861bb6c1 24406language_hooks="Make-hooks"
861bb6c1 24407
cc11cc9b 24408for lang in ${srcdir}/*/config-lang.in
861bb6c1 24409do
1546bb64
PB
24410 test "$lang" = "${srcdir}/*/config-lang.in" && continue
24411
cc11cc9b
PB
24412 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
24413 if test "x$lang_alias" = x
24414 then
24415 echo "$lang doesn't set \$language." 1>&2
24416 exit 1
24417 fi
24418 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
24419 subdirs="$subdirs $subdir"
349c3166
OH
24420
24421 # $gcc_subdir is where the gcc integration files are to be found
24422 # for a language, both for internal compiler purposes (compiler
24423 # sources implementing front-end to GCC tree converters), and for
24424 # build infrastructure purposes (Make-lang.in, etc.)
24425 #
24426 # This will be <subdir> (relative to $srcdir) if a line like
24427 # gcc_subdir="<subdir>" or gcc_subdir=<subdir>
24428 # is found in <langdir>/config-lang.in, and will remain <langdir>
24429 # otherwise.
24430 #
24431 # Except for the language alias (fetched above), the regular
24432 # "config-lang.in" contents are always retrieved from $gcc_subdir,
24433 # so a <langdir>/config-lang.in setting gcc_subdir typically sets
24434 # only this and the language alias.
24435
24436 gcc_subdir=`sed -n -e 's,^gcc_subdir=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^gcc_subdir=\([^ ]*\).*$,\1,p' $lang`
24437 if [ "$gcc_subdir" = "" ]; then
24438 gcc_subdir="$subdir"
24439 fi
24440
cc11cc9b
PB
24441 case ",$enable_languages," in
24442 *,$lang_alias,*)
24443 all_selected_languages="$all_selected_languages $lang_alias"
349c3166
OH
24444 if test -f $srcdir/$gcc_subdir/lang-specs.h; then
24445 lang_specs_files="$lang_specs_files $srcdir/$gcc_subdir/lang-specs.h"
cc11cc9b
PB
24446 fi
24447 ;;
24448 esac
24449
cc11cc9b
PB
24450 language=
24451 boot_language=
24452 compilers=
cc11cc9b
PB
24453 outputs=
24454 gtfiles=
1546bb64 24455 subdir_requires=
349c3166 24456 . ${srcdir}/$gcc_subdir/config-lang.in
cc11cc9b
PB
24457 if test "x$language" = x
24458 then
349c3166 24459 echo "${srcdir}/$gcc_subdir/config-lang.in doesn't set \$language." 1>&2
cc11cc9b
PB
24460 exit 1
24461 fi
1546bb64
PB
24462
24463 ok=:
24464 case ",$enable_languages," in
24465 *,$lang_alias,*) ;;
24466 *)
24467 for i in $subdir_requires; do
b6348cb3 24468 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
24469 ok=false
24470 break
24471 done
24472 ;;
24473 esac
24474 $ok || continue
24475
349c3166
OH
24476 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in"
24477 if test -f $srcdir/$gcc_subdir/lang.opt; then
24478 lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt"
1546bb64 24479 fi
349c3166
OH
24480 if test -f $srcdir/$gcc_subdir/$subdir-tree.def; then
24481 lang_tree_files="$lang_tree_files $srcdir/$gcc_subdir/$subdir-tree.def"
1546bb64 24482 fi
349c3166
OH
24483 if test -f ${srcdir}/$gcc_subdir/Makefile.in
24484 then all_lang_makefiles="$gcc_subdir/Makefile"
cc11cc9b
PB
24485 fi
24486 all_languages="$all_languages $language"
cc11cc9b 24487 all_compilers="$all_compilers $compilers"
cc11cc9b 24488 all_outputs="$all_outputs $outputs"
703d89ab 24489 all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
861bb6c1
JL
24490done
24491
8ac9d31f
TJ
24492# Pick up gtfiles for c
24493gtfiles=
8ac9d31f 24494. ${srcdir}/c-config-lang.in
703d89ab 24495all_gtfiles="$all_gtfiles [c] $gtfiles"
8ac9d31f 24496
cbc59f01 24497check_languages=
cc11cc9b 24498for language in $all_selected_languages
cbc59f01 24499do
cc11cc9b 24500 check_languages="$check_languages check-$language"
cbc59f01
DD
24501done
24502
62b81e45 24503# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 24504# lang.${target}. Only do so for selected languages.
861bb6c1
JL
24505
24506rm -f Make-hooks
24507touch Make-hooks
bd97af06 24508target_list="all.cross start.encap rest.encap tags \
bcc3d150
BM
24509 install-common install-man install-info install-pdf dvi pdf \
24510 html uninstall info man srcextra srcman srcinfo \
8b1f719a 24511 mostlyclean clean distclean maintainer-clean"
cc11cc9b 24512
861bb6c1
JL
24513for t in $target_list
24514do
24515 x=
cc11cc9b 24516 for lang in $all_selected_languages
861bb6c1 24517 do
cc11cc9b 24518 x="$x $lang.$t"
861bb6c1
JL
24519 done
24520 echo "lang.$t: $x" >> Make-hooks
24521done
24522
8bb915b6
NN
24523# --------
24524# UNSORTED
24525# --------
24526
cc06d68c 24527# Create .gdbinit.
861bb6c1 24528
cc06d68c
GP
24529echo "dir ." > .gdbinit
24530echo "dir ${srcdir}" >> .gdbinit
24531if test x$gdb_needs_out_file_path = xyes
24532then
24533 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
24534fi
24535if test "x$subdirs" != x; then
24536 for s in $subdirs
24537 do
24538 echo "dir ${srcdir}/$s" >> .gdbinit
24539 done
861bb6c1 24540fi
cc06d68c 24541echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 24542
15c723f3 24543gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)'
d062c304
JL
24544
24545
2ce3c6c6 24546
2bbea3a6
RH
24547# Find a directory in which to install a shared libgcc.
24548
b61ff9c8 24549# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
2bbea3a6 24550if test "${enable_version_specific_runtime_libs+set}" = set; then
b61ff9c8 24551 enableval="$enable_version_specific_runtime_libs"
ba479fd2 24552
b61ff9c8 24553fi;
2bbea3a6
RH
24554
24555
b61ff9c8 24556# Check whether --with-slibdir or --without-slibdir was given.
5b15f277 24557if test "${with_slibdir+set}" = set; then
b61ff9c8
BS
24558 withval="$with_slibdir"
24559 slibdir="$with_slibdir"
5b15f277
RH
24560else
24561 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 24562 slibdir='$(libsubdir)'
5b15f277 24563elif test "$host" != "$target"; then
2bbea3a6
RH
24564 slibdir='$(build_tooldir)/lib'
24565else
5b15f277 24566 slibdir='$(libdir)'
2bbea3a6 24567fi
b61ff9c8 24568fi;
2bbea3a6
RH
24569
24570
22482f74 24571
b61ff9c8 24572# Check whether --with-datarootdir or --without-datarootdir was given.
22482f74 24573if test "${with_datarootdir+set}" = set; then
b61ff9c8
BS
24574 withval="$with_datarootdir"
24575 datarootdir="\${prefix}/$with_datarootdir"
22482f74
MS
24576else
24577 datarootdir='$(prefix)/share'
b61ff9c8 24578fi;
22482f74
MS
24579
24580
a6ccdbab 24581
b61ff9c8 24582# Check whether --with-docdir or --without-docdir was given.
22482f74 24583if test "${with_docdir+set}" = set; then
b61ff9c8
BS
24584 withval="$with_docdir"
24585 docdir="\${prefix}/$with_docdir"
22482f74
MS
24586else
24587 docdir='$(datarootdir)'
b61ff9c8 24588fi;
703d89ab 24589
ab22c1fa 24590
1a4b763e 24591
b61ff9c8 24592# Check whether --with-htmldir or --without-htmldir was given.
22482f74 24593if test "${with_htmldir+set}" = set; then
b61ff9c8
BS
24594 withval="$with_htmldir"
24595 htmldir="\${prefix}/$with_htmldir"
22482f74
MS
24596else
24597 htmldir='$(docdir)'
b61ff9c8 24598fi;
861bb6c1
JL
24599
24600
703d89ab 24601# Substitute configuration variables
861bb6c1
JL
24602
24603
24604
24605
24606
24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
9b16d2c4 24646
e9a25f70 24647
6e26218f 24648
c8724862 24649
11642c3a
ZW
24650
24651
24652
3d9d2476 24653
e2500fed 24654
a0e527e3 24655
aca600aa
AS
24656
24657
24658
c776a6d0 24659
207bf79d 24660
51b9ff45 24661
861bb6c1 24662
6e3f3080
NN
24663# Echo link setup.
24664if test x${build} = x${host} ; then
24665 if test x${host} = x${target} ; then
24666 echo "Links are now set up to build a native compiler for ${target}." 1>&2
24667 else
24668 echo "Links are now set up to build a cross-compiler" 1>&2
24669 echo " from ${host} to ${target}." 1>&2
24670 fi
24671else
24672 if test x${host} = x${target} ; then
24673 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
24674 echo " for ${target}." 1>&2
24675 else
24676 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
24677 echo " from ${host} to ${target}." 1>&2
24678 fi
24679fi
24680
6de9cd9a
DN
24681
24682
24683
f8bf9252
SP
24684
24685
24686
24687
24688
24689if test "x${CLOOGLIBS}" != "x" ; then
24690
24691cat >>confdefs.h <<\_ACEOF
24692#define HAVE_cloog 1
24693_ACEOF
24694
f8bf9252
SP
24695fi
24696
68a607d8
DN
24697# Check for plugin support
24698# Check whether --enable-plugin or --disable-plugin was given.
24699if test "${enable_plugin+set}" = set; then
24700 enableval="$enable_plugin"
24701 enable_plugin=$enableval
24702else
24703 enable_plugin=yes; default_plugin=yes
24704fi;
24705
24706pluginlibs=
24707if test x"$enable_plugin" = x"yes"; then
24708 # Check that the host supports -rdynamic and -ldl
24709 have_rdynamic=no
24710 have_dl=no
24711 saved_LDFLAGS="$LDFLAGS"
24712 saved_LIBS="$LIBS"
24713 LIBS=
24714
24715 # Check -rdynamic
24716 LDFLAGS="$LDFLAGS -rdynamic"
24717 echo "$as_me:$LINENO: checking for -rdynamic" >&5
24718echo $ECHO_N "checking for -rdynamic... $ECHO_C" >&6
24719 cat >conftest.$ac_ext <<_ACEOF
24720/* confdefs.h. */
24721_ACEOF
24722cat confdefs.h >>conftest.$ac_ext
24723cat >>conftest.$ac_ext <<_ACEOF
24724/* end confdefs.h. */
24725
24726int
24727main ()
24728{
24729return 0;
24730 ;
24731 return 0;
24732}
24733_ACEOF
24734rm -f conftest.$ac_objext conftest$ac_exeext
24735if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24736 (eval $ac_link) 2>conftest.er1
24737 ac_status=$?
24738 grep -v '^ *+' conftest.er1 >conftest.err
24739 rm -f conftest.er1
24740 cat conftest.err >&5
24741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24742 (exit $ac_status); } &&
24743 { ac_try='test -z "$ac_c_werror_flag"
24744 || test ! -s conftest.err'
24745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24746 (eval $ac_try) 2>&5
24747 ac_status=$?
24748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24749 (exit $ac_status); }; } &&
24750 { ac_try='test -s conftest$ac_exeext'
24751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24752 (eval $ac_try) 2>&5
24753 ac_status=$?
24754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24755 (exit $ac_status); }; }; then
24756 echo "$as_me:$LINENO: result: yes" >&5
24757echo "${ECHO_T}yes" >&6; have_rdynamic=yes
24758else
24759 echo "$as_me: failed program was:" >&5
24760sed 's/^/| /' conftest.$ac_ext >&5
24761
24762echo "$as_me:$LINENO: result: no" >&5
24763echo "${ECHO_T}no" >&6
24764fi
24765rm -f conftest.err conftest.$ac_objext \
24766 conftest$ac_exeext conftest.$ac_ext
24767 if test x"$have_rdynamic" = x"yes" ; then
24768 pluginlibs="-rdynamic"
24769 fi
24770
24771 # Check -ldl
24772 LDFLAGS="$LDFLAGS -ldl"
24773 echo "$as_me:$LINENO: checking for -ldl" >&5
24774echo $ECHO_N "checking for -ldl... $ECHO_C" >&6
24775 cat >conftest.$ac_ext <<_ACEOF
24776/* confdefs.h. */
24777_ACEOF
24778cat confdefs.h >>conftest.$ac_ext
24779cat >>conftest.$ac_ext <<_ACEOF
24780/* end confdefs.h. */
24781#include <dlfcn.h>
24782int
24783main ()
24784{
24785volatile int f = 0; if (f) dlopen ("dummy", 0);
24786 ;
24787 return 0;
24788}
24789_ACEOF
24790rm -f conftest.$ac_objext conftest$ac_exeext
24791if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24792 (eval $ac_link) 2>conftest.er1
24793 ac_status=$?
24794 grep -v '^ *+' conftest.er1 >conftest.err
24795 rm -f conftest.er1
24796 cat conftest.err >&5
24797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24798 (exit $ac_status); } &&
24799 { ac_try='test -z "$ac_c_werror_flag"
24800 || test ! -s conftest.err'
24801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24802 (eval $ac_try) 2>&5
24803 ac_status=$?
24804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24805 (exit $ac_status); }; } &&
24806 { ac_try='test -s conftest$ac_exeext'
24807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24808 (eval $ac_try) 2>&5
24809 ac_status=$?
24810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24811 (exit $ac_status); }; }; then
24812 echo "$as_me:$LINENO: result: yes" >&5
24813echo "${ECHO_T}yes" >&6; have_dl=yes
24814else
24815 echo "$as_me: failed program was:" >&5
24816sed 's/^/| /' conftest.$ac_ext >&5
24817
24818echo "$as_me:$LINENO: result: no" >&5
24819echo "${ECHO_T}no" >&6
24820fi
24821rm -f conftest.err conftest.$ac_objext \
24822 conftest$ac_exeext conftest.$ac_ext
24823 if test x"$have_dl" = x"yes"; then
24824 pluginlibs="$pluginlibs -ldl"
24825 fi
24826
24827 # Check that we can build shared objects with -fPIC -shared
24828 LDFLAGS="$LDFLAGS -fPIC -shared"
24829 echo "$as_me:$LINENO: checking for -fPIC -shared" >&5
24830echo $ECHO_N "checking for -fPIC -shared... $ECHO_C" >&6
24831 cat >conftest.$ac_ext <<_ACEOF
24832/* confdefs.h. */
24833_ACEOF
24834cat confdefs.h >>conftest.$ac_ext
24835cat >>conftest.$ac_ext <<_ACEOF
24836/* end confdefs.h. */
24837extern int X;
24838int
24839main ()
24840{
24841return X == 0;
24842 ;
24843 return 0;
24844}
24845_ACEOF
24846rm -f conftest.$ac_objext conftest$ac_exeext
24847if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24848 (eval $ac_link) 2>conftest.er1
24849 ac_status=$?
24850 grep -v '^ *+' conftest.er1 >conftest.err
24851 rm -f conftest.er1
24852 cat conftest.err >&5
24853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24854 (exit $ac_status); } &&
24855 { ac_try='test -z "$ac_c_werror_flag"
24856 || test ! -s conftest.err'
24857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24858 (eval $ac_try) 2>&5
24859 ac_status=$?
24860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24861 (exit $ac_status); }; } &&
24862 { ac_try='test -s conftest$ac_exeext'
24863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24864 (eval $ac_try) 2>&5
24865 ac_status=$?
24866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24867 (exit $ac_status); }; }; then
24868 echo "$as_me:$LINENO: result: yes" >&5
24869echo "${ECHO_T}yes" >&6; have_pic_shared=yes
24870else
24871 echo "$as_me: failed program was:" >&5
24872sed 's/^/| /' conftest.$ac_ext >&5
24873
24874echo "$as_me:$LINENO: result: no" >&5
24875echo "${ECHO_T}no" >&6; have_pic_shared=no
24876fi
24877rm -f conftest.err conftest.$ac_objext \
24878 conftest$ac_exeext conftest.$ac_ext
24879 if test x"$have_pic_shared" != x"yes"; then
24880 pluginlibs=
24881 enable_plugin=no
24882 fi
24883
24884 # If plugin support had been requested but not available, fail.
24885 if test x"$enable_plugin" = x"no" ; then
24886 if test x"$default_plugin" != x"yes"; then
24887 { { echo "$as_me:$LINENO: error:
24888Building GCC with plugin support requires a host that supports
24889-fPIC, -shared, -ldl and -rdynamic." >&5
24890echo "$as_me: error:
24891Building GCC with plugin support requires a host that supports
24892-fPIC, -shared, -ldl and -rdynamic." >&2;}
24893 { (exit 1); exit 1; }; }
24894 fi
24895 fi
24896
24897 LDFLAGS="$saved_LDFLAGS"
24898 LIBS="$saved_LIBS"
24899fi
24900
24901
24902
24903if test x"$enable_plugin" = x"yes"; then
24904
24905cat >>confdefs.h <<\_ACEOF
24906#define ENABLE_PLUGIN 1
24907_ACEOF
24908
24909fi
24910
6e3f3080
NN
24911# Configure the subdirectories
24912# AC_CONFIG_SUBDIRS($subdirs)
24913
24914# Create the Makefile
24915# and configure language subdirectories
b61ff9c8 24916 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
24917
24918
b61ff9c8 24919 ac_config_commands="$ac_config_commands default"
914c5af7 24920
ba479fd2 24921cat >confcache <<\_ACEOF
6e3f3080
NN
24922# This file is a shell script that caches the results of configure
24923# tests run on this system so they can be shared between configure
ba479fd2
NN
24924# scripts and configure runs, see configure's option --config-cache.
24925# It is not useful on other systems. If it contains results you don't
24926# want to keep, you may remove or edit it.
6e3f3080 24927#
ba479fd2
NN
24928# config.status only pays attention to the cache file if you give it
24929# the --recheck option to rerun configure.
6e3f3080 24930#
ba479fd2
NN
24931# `ac_cv_env_foo' variables (set or unset) will be overridden when
24932# loading this file, other *unset* `ac_cv_foo' will be assigned the
24933# following values.
24934
24935_ACEOF
24936
6e3f3080
NN
24937# The following way of writing the cache mishandles newlines in values,
24938# but we know of no workaround that is simple, portable, and efficient.
b61ff9c8 24939# So, don't put newlines in cache variables' values.
6e3f3080
NN
24940# Ultrix sh set writes to stderr and can't be redirected directly,
24941# and sets the high bit in the cache file unless we assign to the vars.
b61ff9c8 24942{
ba479fd2 24943 (set) 2>&1 |
b61ff9c8
BS
24944 case `(ac_space=' '; set | grep ac_space) 2>&1` in
24945 *ac_space=\ *)
ba479fd2
NN
24946 # `set' does not quote correctly, so add quotes (double-quote
24947 # substitution turns \\\\ into \\, and sed turns \\ into \).
24948 sed -n \
86da66b5
HPN
24949 "s/'/'\\\\''/g;
24950 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
b61ff9c8 24951 ;;
ba479fd2
NN
24952 *)
24953 # `set' quotes correctly as required by POSIX, so do not add quotes.
b61ff9c8
BS
24954 sed -n \
24955 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 24956 ;;
b61ff9c8
BS
24957 esac;
24958} |
ba479fd2
NN
24959 sed '
24960 t clear
b61ff9c8 24961 : clear
ba479fd2
NN
24962 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24963 t end
b61ff9c8
BS
24964 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24965 : end' >>confcache
24966if diff $cache_file confcache >/dev/null 2>&1; then :; else
24967 if test -w $cache_file; then
24968 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
ba479fd2 24969 cat confcache >$cache_file
6e3f3080 24970 else
b61ff9c8 24971 echo "not updating unwritable cache $cache_file"
6e3f3080
NN
24972 fi
24973fi
24974rm -f confcache
24975
24976test "x$prefix" = xNONE && prefix=$ac_default_prefix
24977# Let make expand exec_prefix.
24978test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24979
b61ff9c8
BS
24980# VPATH may cause trouble with some makes, so we remove $(srcdir),
24981# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24982# trailing colons and then remove the whole line if VPATH becomes empty
24983# (actually we leave an empty line to preserve line numbers).
24984if test "x$srcdir" = x.; then
24985 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24986s/:*\$(srcdir):*/:/;
24987s/:*\${srcdir}:*/:/;
24988s/:*@srcdir@:*/:/;
24989s/^\([^=]*=[ ]*\):*/\1/;
24990s/:*$//;
24991s/^[^=]*=[ ]*$//;
24992}'
24993fi
24994
63cf211a 24995DEFS=-DHAVE_CONFIG_H
6e3f3080 24996
ba479fd2
NN
24997ac_libobjs=
24998ac_ltlibobjs=
24999for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25000 # 1. Remove the extension, and $U if already installed.
b61ff9c8
BS
25001 ac_i=`echo "$ac_i" |
25002 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
25003 # 2. Add them.
25004 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
25005 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
ba479fd2
NN
25006done
25007LIBOBJS=$ac_libobjs
63cf211a 25008
ba479fd2
NN
25009LTLIBOBJS=$ac_ltlibobjs
25010
25011
25012
25013: ${CONFIG_STATUS=./config.status}
25014ac_clean_files_save=$ac_clean_files
25015ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25016{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25017echo "$as_me: creating $CONFIG_STATUS" >&6;}
25018cat >$CONFIG_STATUS <<_ACEOF
25019#! $SHELL
25020# Generated by $as_me.
6e3f3080
NN
25021# Run this file to recreate the current configuration.
25022# Compiler output produced by configure, useful for debugging
ba479fd2 25023# configure, is in config.log if it exists.
6e3f3080 25024
ba479fd2
NN
25025debug=false
25026ac_cs_recheck=false
25027ac_cs_silent=false
25028SHELL=\${CONFIG_SHELL-$SHELL}
25029_ACEOF
25030
25031cat >>$CONFIG_STATUS <<\_ACEOF
25032## --------------------- ##
25033## M4sh Initialization. ##
25034## --------------------- ##
25035
b61ff9c8 25036# Be Bourne compatible
ba479fd2
NN
25037if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25038 emulate sh
25039 NULLCMD=:
25040 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
25041 # is contrary to our usage. Disable this feature.
25042 alias -g '${1+"$@"}'='"$@"'
b61ff9c8
BS
25043elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
25044 set -o posix
2f41c1d6 25045fi
b61ff9c8 25046DUALCASE=1; export DUALCASE # for MKS sh
ab22c1fa 25047
1a4b763e
BS
25048# Support unset when possible.
25049if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25050 as_unset=unset
25051else
25052 as_unset=false
25053fi
25054
ab22c1fa 25055
1a4b763e 25056# Work around bugs in pre-3.0 UWIN ksh.
b61ff9c8 25057$as_unset ENV MAIL MAILPATH
1a4b763e
BS
25058PS1='$ '
25059PS2='> '
25060PS4='+ '
25061
25062# NLS nuisances.
25063for as_var in \
25064 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25065 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25066 LC_TELEPHONE LC_TIME
2f41c1d6 25067do
1a4b763e
BS
25068 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25069 eval $as_var=C; export $as_var
25070 else
b61ff9c8 25071 $as_unset $as_var
1a4b763e
BS
25072 fi
25073done
25074
25075# Required to use basename.
b61ff9c8 25076if expr a : '\(a\)' >/dev/null 2>&1; then
1a4b763e
BS
25077 as_expr=expr
25078else
25079 as_expr=false
25080fi
25081
b61ff9c8 25082if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
1a4b763e
BS
25083 as_basename=basename
25084else
25085 as_basename=false
25086fi
25087
25088
25089# Name of the executable.
b61ff9c8 25090as_me=`$as_basename "$0" ||
1a4b763e
BS
25091$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25092 X"$0" : 'X\(//\)$' \| \
b61ff9c8
BS
25093 X"$0" : 'X\(/\)$' \| \
25094 . : '\(.\)' 2>/dev/null ||
1a4b763e 25095echo X/"$0" |
b61ff9c8
BS
25096 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
25097 /^X\/\(\/\/\)$/{ s//\1/; q; }
25098 /^X\/\(\/\).*/{ s//\1/; q; }
25099 s/.*/./; q'`
1a4b763e 25100
b61ff9c8
BS
25101
25102# PATH needs CR, and LINENO needs CR and PATH.
25103# Avoid depending upon Character Ranges.
25104as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25105as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25106as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25107as_cr_digits='0123456789'
25108as_cr_alnum=$as_cr_Letters$as_cr_digits
25109
25110# The user is always right.
25111if test "${PATH_SEPARATOR+set}" != set; then
25112 echo "#! /bin/sh" >conf$$.sh
25113 echo "exit 0" >>conf$$.sh
25114 chmod +x conf$$.sh
25115 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
25116 PATH_SEPARATOR=';'
25117 else
25118 PATH_SEPARATOR=:
25119 fi
25120 rm -f conf$$.sh
25121fi
1a4b763e
BS
25122
25123
b61ff9c8
BS
25124 as_lineno_1=$LINENO
25125 as_lineno_2=$LINENO
25126 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
25127 test "x$as_lineno_1" != "x$as_lineno_2" &&
25128 test "x$as_lineno_3" = "x$as_lineno_2" || {
25129 # Find who we are. Look in the path if we contain no path at all
25130 # relative or not.
25131 case $0 in
25132 *[\\/]* ) as_myself=$0 ;;
25133 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25134for as_dir in $PATH
25135do
25136 IFS=$as_save_IFS
25137 test -z "$as_dir" && as_dir=.
25138 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25139done
1a4b763e 25140
b61ff9c8
BS
25141 ;;
25142 esac
25143 # We did not find ourselves, most probably we were run as `sh COMMAND'
25144 # in which case we are not to be found in the path.
25145 if test "x$as_myself" = x; then
25146 as_myself=$0
25147 fi
25148 if test ! -f "$as_myself"; then
25149 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
25150echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
25151 { (exit 1); exit 1; }; }
25152 fi
25153 case $CONFIG_SHELL in
25154 '')
25155 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25156for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
25157do
25158 IFS=$as_save_IFS
25159 test -z "$as_dir" && as_dir=.
25160 for as_base in sh bash ksh sh5; do
25161 case $as_dir in
25162 /*)
25163 if ("$as_dir/$as_base" -c '
8b1f719a
PB
25164 as_lineno_1=$LINENO
25165 as_lineno_2=$LINENO
b61ff9c8 25166 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
8b1f719a 25167 test "x$as_lineno_1" != "x$as_lineno_2" &&
b61ff9c8
BS
25168 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
25169 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
25170 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
25171 CONFIG_SHELL=$as_dir/$as_base
25172 export CONFIG_SHELL
25173 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
25174 fi;;
25175 esac
25176 done
25177done
25178;;
25179 esac
ba479fd2
NN
25180
25181 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25182 # uniformly replaced by the line number. The first 'sed' inserts a
b61ff9c8
BS
25183 # line-number line before each line; the second 'sed' does the real
25184 # work. The second script uses 'N' to pair each line-number line
25185 # with the numbered line, and appends trailing '-' during
25186 # substitution so that $LINENO is not a special case at line end.
ba479fd2 25187 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b61ff9c8
BS
25188 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
25189 sed '=' <$as_myself |
ba479fd2
NN
25190 sed '
25191 N
b61ff9c8
BS
25192 s,$,-,
25193 : loop
25194 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
ba479fd2 25195 t loop
b61ff9c8
BS
25196 s,-$,,
25197 s,^['$as_cr_digits']*\n,,
ba479fd2 25198 ' >$as_me.lineno &&
b61ff9c8
BS
25199 chmod +x $as_me.lineno ||
25200 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
25201echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
ba479fd2
NN
25202 { (exit 1); exit 1; }; }
25203
25204 # Don't try to exec as it changes $[0], causing all sort of problems
25205 # (the dirname of $[0] is not the place where we might find the
b61ff9c8
BS
25206 # original and so on. Autoconf is especially sensible to this).
25207 . ./$as_me.lineno
ba479fd2
NN
25208 # Exit status is that of the last command.
25209 exit
25210}
25211
25212
b61ff9c8
BS
25213case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
25214 *c*,-n*) ECHO_N= ECHO_C='
25215' ECHO_T=' ' ;;
25216 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
25217 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
ba479fd2
NN
25218esac
25219
b61ff9c8 25220if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
25221 as_expr=expr
25222else
25223 as_expr=false
25224fi
25225
25226rm -f conf$$ conf$$.exe conf$$.file
25227echo >conf$$.file
25228if ln -s conf$$.file conf$$ 2>/dev/null; then
b61ff9c8
BS
25229 # We could just check for DJGPP; but this test a) works b) is more generic
25230 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
25231 if test -f conf$$.exe; then
25232 # Don't use ln at all; we don't have any links
ba479fd2 25233 as_ln_s='cp -p'
b61ff9c8
BS
25234 else
25235 as_ln_s='ln -s'
25236 fi
ba479fd2
NN
25237elif ln conf$$.file conf$$ 2>/dev/null; then
25238 as_ln_s=ln
25239else
25240 as_ln_s='cp -p'
25241fi
b61ff9c8 25242rm -f conf$$ conf$$.exe conf$$.file
ba479fd2
NN
25243
25244if mkdir -p . 2>/dev/null; then
25245 as_mkdir_p=:
25246else
86da66b5 25247 test -d ./-p && rmdir ./-p
ba479fd2
NN
25248 as_mkdir_p=false
25249fi
25250
b61ff9c8 25251as_executable_p="test -f"
ba479fd2
NN
25252
25253# Sed expression to map a string onto a valid CPP name.
86da66b5 25254as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
25255
25256# Sed expression to map a string onto a valid variable name.
86da66b5 25257as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
25258
25259
b61ff9c8
BS
25260# IFS
25261# We need space, tab and new line, in precisely that order.
25262as_nl='
25263'
25264IFS=" $as_nl"
25265
25266# CDPATH.
25267$as_unset CDPATH
25268
ba479fd2
NN
25269exec 6>&1
25270
b61ff9c8 25271# Open the log real soon, to keep \$[0] and so on meaningful, and to
ba479fd2 25272# report actual input values of CONFIG_FILES etc. instead of their
b61ff9c8
BS
25273# values after options handling. Logging --version etc. is OK.
25274exec 5>>config.log
25275{
25276 echo
25277 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25278## Running $as_me. ##
25279_ASBOX
25280} >&5
25281cat >&5 <<_CSEOF
25282
ba479fd2 25283This file was extended by $as_me, which was
b61ff9c8 25284generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
25285
25286 CONFIG_FILES = $CONFIG_FILES
25287 CONFIG_HEADERS = $CONFIG_HEADERS
25288 CONFIG_LINKS = $CONFIG_LINKS
25289 CONFIG_COMMANDS = $CONFIG_COMMANDS
25290 $ $0 $@
25291
b61ff9c8
BS
25292_CSEOF
25293echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
25294echo >&5
ba479fd2
NN
25295_ACEOF
25296
25297# Files that config.status was made for.
b61ff9c8
BS
25298if test -n "$ac_config_files"; then
25299 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
25300fi
2f41c1d6 25301
b61ff9c8
BS
25302if test -n "$ac_config_headers"; then
25303 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
25304fi
25305
25306if test -n "$ac_config_links"; then
25307 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
25308fi
25309
25310if test -n "$ac_config_commands"; then
25311 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
25312fi
ba479fd2
NN
25313
25314cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8 25315
ba479fd2
NN
25316ac_cs_usage="\
25317\`$as_me' instantiates files from templates according to the
25318current configuration.
25319
25320Usage: $0 [OPTIONS] [FILE]...
25321
25322 -h, --help print this help, then exit
b61ff9c8 25323 -V, --version print version number, then exit
ba479fd2
NN
25324 -q, --quiet do not print progress messages
25325 -d, --debug don't remove temporary files
25326 --recheck update $as_me by reconfiguring in the same conditions
25327 --file=FILE[:TEMPLATE]
86da66b5 25328 instantiate the configuration file FILE
ba479fd2 25329 --header=FILE[:TEMPLATE]
86da66b5 25330 instantiate the configuration header FILE
ba479fd2
NN
25331
25332Configuration files:
25333$config_files
25334
25335Configuration headers:
25336$config_headers
25337
25338Configuration commands:
25339$config_commands
25340
25341Report bugs to <bug-autoconf@gnu.org>."
1a4b763e 25342_ACEOF
b61ff9c8 25343
ba479fd2
NN
25344cat >>$CONFIG_STATUS <<_ACEOF
25345ac_cs_version="\\
25346config.status
b61ff9c8
BS
25347configured by $0, generated by GNU Autoconf 2.59,
25348 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
ba479fd2 25349
b61ff9c8 25350Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
25351This config.status script is free software; the Free Software Foundation
25352gives unlimited permission to copy, distribute and modify it."
b61ff9c8 25353srcdir=$srcdir
ba479fd2
NN
25354_ACEOF
25355
25356cat >>$CONFIG_STATUS <<\_ACEOF
25357# If no file are specified by the user, then we need to provide default
25358# value. By we need to know if files were specified by the user.
25359ac_need_defaults=:
25360while test $# != 0
25361do
25362 case $1 in
25363 --*=*)
b61ff9c8
BS
25364 ac_option=`expr "x$1" : 'x\([^=]*\)='`
25365 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
ba479fd2
NN
25366 ac_shift=:
25367 ;;
b61ff9c8 25368 -*)
ba479fd2
NN
25369 ac_option=$1
25370 ac_optarg=$2
25371 ac_shift=shift
25372 ;;
b61ff9c8
BS
25373 *) # This is not an option, so the user has probably given explicit
25374 # arguments.
25375 ac_option=$1
25376 ac_need_defaults=false;;
ba479fd2
NN
25377 esac
25378
25379 case $ac_option in
25380 # Handling of the options.
b61ff9c8
BS
25381_ACEOF
25382cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
25383 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25384 ac_cs_recheck=: ;;
b61ff9c8
BS
25385 --version | --vers* | -V )
25386 echo "$ac_cs_version"; exit 0 ;;
25387 --he | --h)
25388 # Conflict between --help and --header
25389 { { echo "$as_me:$LINENO: error: ambiguous option: $1
25390Try \`$0 --help' for more information." >&5
25391echo "$as_me: error: ambiguous option: $1
25392Try \`$0 --help' for more information." >&2;}
25393 { (exit 1); exit 1; }; };;
25394 --help | --hel | -h )
25395 echo "$ac_cs_usage"; exit 0 ;;
25396 --debug | --d* | -d )
ba479fd2
NN
25397 debug=: ;;
25398 --file | --fil | --fi | --f )
25399 $ac_shift
25400 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
25401 ac_need_defaults=false;;
25402 --header | --heade | --head | --hea )
25403 $ac_shift
25404 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
25405 ac_need_defaults=false;;
25406 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25407 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25408 ac_cs_silent=: ;;
25409
25410 # This is an error.
b61ff9c8
BS
25411 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
25412Try \`$0 --help' for more information." >&5
25413echo "$as_me: error: unrecognized option: $1
25414Try \`$0 --help' for more information." >&2;}
ba479fd2
NN
25415 { (exit 1); exit 1; }; } ;;
25416
b61ff9c8 25417 *) ac_config_targets="$ac_config_targets $1" ;;
ba479fd2
NN
25418
25419 esac
25420 shift
6e3f3080 25421done
ba479fd2
NN
25422
25423ac_configure_extra_args=
25424
25425if $ac_cs_silent; then
25426 exec 6>/dev/null
25427 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
25428fi
25429
ba479fd2
NN
25430_ACEOF
25431cat >>$CONFIG_STATUS <<_ACEOF
25432if \$ac_cs_recheck; then
b61ff9c8
BS
25433 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25434 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
ba479fd2 25435fi
861bb6c1 25436
ba479fd2
NN
25437_ACEOF
25438
25439cat >>$CONFIG_STATUS <<_ACEOF
25440#
b61ff9c8 25441# INIT-COMMANDS section.
ba479fd2 25442#
b61ff9c8 25443
ba479fd2 25444subdirs='$subdirs'
ba479fd2
NN
25445
25446_ACEOF
25447
1a4b763e 25448
b61ff9c8
BS
25449
25450cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
25451for ac_config_target in $ac_config_targets
25452do
b61ff9c8
BS
25453 case "$ac_config_target" in
25454 # Handling of arguments.
25455 "as" ) CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
25456 "collect-ld" ) CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
25457 "nm" ) CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
25458 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
25459 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25460 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
ba479fd2
NN
25461 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25462echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25463 { (exit 1); exit 1; }; };;
861bb6c1 25464 esac
ba479fd2
NN
25465done
25466
25467# If the user did not use the arguments to specify the items to instantiate,
25468# then the envvar interface is used. Set only those that are not.
25469# We use the long form for the default assignment because of an extremely
25470# bizarre bug on SunOS 4.1.3.
25471if $ac_need_defaults; then
25472 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25473 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25474 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25475fi
25476
25477# Have a temporary directory for convenience. Make it in the build tree
b61ff9c8 25478# simply because there is no reason to put it here, and in addition,
ba479fd2 25479# creating and moving files from /tmp can sometimes cause problems.
b61ff9c8 25480# Create a temporary directory, and hook for its removal unless debugging.
ba479fd2
NN
25481$debug ||
25482{
b61ff9c8 25483 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
ba479fd2
NN
25484 trap '{ (exit 1); exit 1; }' 1 2 13 15
25485}
b61ff9c8 25486
ba479fd2 25487# Create a (secure) tmp directory for tmp files.
6e3f3080 25488
ba479fd2 25489{
b61ff9c8 25490 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
ba479fd2
NN
25491 test -n "$tmp" && test -d "$tmp"
25492} ||
25493{
b61ff9c8
BS
25494 tmp=./confstat$$-$RANDOM
25495 (umask 077 && mkdir $tmp)
ba479fd2
NN
25496} ||
25497{
25498 echo "$me: cannot create a temporary directory in ." >&2
25499 { (exit 1); exit 1; }
25500}
25501
b61ff9c8
BS
25502_ACEOF
25503
25504cat >>$CONFIG_STATUS <<_ACEOF
25505
ba479fd2 25506#
b61ff9c8 25507# CONFIG_FILES section.
ba479fd2
NN
25508#
25509
25510# No need to generate the scripts if there are no CONFIG_FILES.
25511# This happens for instance when ./config.status config.h
b61ff9c8
BS
25512if test -n "\$CONFIG_FILES"; then
25513 # Protect against being on the right side of a sed subst in config.status.
25514 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
25515 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
25516s,@SHELL@,$SHELL,;t t
25517s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
25518s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
25519s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
25520s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
25521s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
25522s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
25523s,@exec_prefix@,$exec_prefix,;t t
25524s,@prefix@,$prefix,;t t
25525s,@program_transform_name@,$program_transform_name,;t t
25526s,@bindir@,$bindir,;t t
25527s,@sbindir@,$sbindir,;t t
25528s,@libexecdir@,$libexecdir,;t t
25529s,@datadir@,$datadir,;t t
25530s,@sysconfdir@,$sysconfdir,;t t
25531s,@sharedstatedir@,$sharedstatedir,;t t
25532s,@localstatedir@,$localstatedir,;t t
25533s,@libdir@,$libdir,;t t
25534s,@includedir@,$includedir,;t t
25535s,@oldincludedir@,$oldincludedir,;t t
25536s,@infodir@,$infodir,;t t
25537s,@mandir@,$mandir,;t t
25538s,@build_alias@,$build_alias,;t t
25539s,@host_alias@,$host_alias,;t t
25540s,@target_alias@,$target_alias,;t t
25541s,@DEFS@,$DEFS,;t t
25542s,@ECHO_C@,$ECHO_C,;t t
25543s,@ECHO_N@,$ECHO_N,;t t
25544s,@ECHO_T@,$ECHO_T,;t t
25545s,@LIBS@,$LIBS,;t t
25546s,@build@,$build,;t t
25547s,@build_cpu@,$build_cpu,;t t
25548s,@build_vendor@,$build_vendor,;t t
25549s,@build_os@,$build_os,;t t
25550s,@host@,$host,;t t
25551s,@host_cpu@,$host_cpu,;t t
25552s,@host_vendor@,$host_vendor,;t t
25553s,@host_os@,$host_os,;t t
25554s,@target@,$target,;t t
25555s,@target_cpu@,$target_cpu,;t t
25556s,@target_vendor@,$target_vendor,;t t
25557s,@target_os@,$target_os,;t t
25558s,@target_noncanonical@,$target_noncanonical,;t t
25559s,@build_libsubdir@,$build_libsubdir,;t t
25560s,@build_subdir@,$build_subdir,;t t
25561s,@host_subdir@,$host_subdir,;t t
25562s,@target_subdir@,$target_subdir,;t t
25563s,@GENINSRC@,$GENINSRC,;t t
25564s,@CC@,$CC,;t t
25565s,@CFLAGS@,$CFLAGS,;t t
25566s,@LDFLAGS@,$LDFLAGS,;t t
25567s,@CPPFLAGS@,$CPPFLAGS,;t t
25568s,@ac_ct_CC@,$ac_ct_CC,;t t
25569s,@EXEEXT@,$EXEEXT,;t t
25570s,@OBJEXT@,$OBJEXT,;t t
3d4e720a
ST
25571s,@GNATBIND@,$GNATBIND,;t t
25572s,@ac_ct_GNATBIND@,$ac_ct_GNATBIND,;t t
25573s,@GNATMAKE@,$GNATMAKE,;t t
25574s,@ac_ct_GNATMAKE@,$ac_ct_GNATMAKE,;t t
b61ff9c8
BS
25575s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
25576s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
25577s,@CPP@,$CPP,;t t
25578s,@EGREP@,$EGREP,;t t
25579s,@loose_warn@,$loose_warn,;t t
b61ff9c8
BS
25580s,@strict_warn@,$strict_warn,;t t
25581s,@warn_cflags@,$warn_cflags,;t t
25582s,@nocommon_flag@,$nocommon_flag,;t t
25583s,@TREEBROWSER@,$TREEBROWSER,;t t
25584s,@valgrind_path@,$valgrind_path,;t t
25585s,@valgrind_path_defines@,$valgrind_path_defines,;t t
25586s,@valgrind_command@,$valgrind_command,;t t
25587s,@coverage_flags@,$coverage_flags,;t t
25588s,@enable_multilib@,$enable_multilib,;t t
25589s,@enable_decimal_float@,$enable_decimal_float,;t t
25590s,@enable_fixed_point@,$enable_fixed_point,;t t
25591s,@enable_shared@,$enable_shared,;t t
25592s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
25593s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
25594s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
25595s,@onestep@,$onestep,;t t
25596s,@PKGVERSION@,$PKGVERSION,;t t
25597s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
25598s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
25599s,@datarootdir@,$datarootdir,;t t
25600s,@docdir@,$docdir,;t t
25601s,@htmldir@,$htmldir,;t t
25602s,@SET_MAKE@,$SET_MAKE,;t t
25603s,@AWK@,$AWK,;t t
25604s,@LN_S@,$LN_S,;t t
25605s,@LN@,$LN,;t t
25606s,@RANLIB@,$RANLIB,;t t
25607s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
25608s,@ranlib_flags@,$ranlib_flags,;t t
25609s,@INSTALL@,$INSTALL,;t t
25610s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
25611s,@INSTALL_DATA@,$INSTALL_DATA,;t t
25612s,@make_compare_target@,$make_compare_target,;t t
25613s,@have_mktemp_command@,$have_mktemp_command,;t t
25614s,@MAKEINFO@,$MAKEINFO,;t t
25615s,@BUILD_INFO@,$BUILD_INFO,;t t
25616s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
25617s,@FLEX@,$FLEX,;t t
25618s,@BISON@,$BISON,;t t
25619s,@NM@,$NM,;t t
25620s,@AR@,$AR,;t t
25621s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
25622s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
25623s,@LDEXP_LIB@,$LDEXP_LIB,;t t
b61ff9c8
BS
25624s,@LIBICONV@,$LIBICONV,;t t
25625s,@LTLIBICONV@,$LTLIBICONV,;t t
25626s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
25627s,@manext@,$manext,;t t
25628s,@objext@,$objext,;t t
25629s,@gthread_flags@,$gthread_flags,;t t
25630s,@extra_modes_file@,$extra_modes_file,;t t
25631s,@extra_opt_files@,$extra_opt_files,;t t
25632s,@USE_NLS@,$USE_NLS,;t t
25633s,@LIBINTL@,$LIBINTL,;t t
25634s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
25635s,@INCINTL@,$INCINTL,;t t
25636s,@XGETTEXT@,$XGETTEXT,;t t
25637s,@GMSGFMT@,$GMSGFMT,;t t
25638s,@POSUB@,$POSUB,;t t
25639s,@CATALOGS@,$CATALOGS,;t t
25640s,@DATADIRNAME@,$DATADIRNAME,;t t
25641s,@INSTOBJEXT@,$INSTOBJEXT,;t t
25642s,@GENCAT@,$GENCAT,;t t
25643s,@CATOBJEXT@,$CATOBJEXT,;t t
b61ff9c8
BS
25644s,@CROSS@,$CROSS,;t t
25645s,@ALL@,$ALL,;t t
25646s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
25647s,@inhibit_libc@,$inhibit_libc,;t t
25648s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
25649s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
f8c33439 25650s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
b61ff9c8 25651s,@STMP_FIXINC@,$STMP_FIXINC,;t t
b61ff9c8 25652s,@collect2@,$collect2,;t t
da0f6381
PB
25653s,@LIBTOOL@,$LIBTOOL,;t t
25654s,@SED@,$SED,;t t
25655s,@FGREP@,$FGREP,;t t
25656s,@GREP@,$GREP,;t t
25657s,@LD@,$LD,;t t
25658s,@DUMPBIN@,$DUMPBIN,;t t
25659s,@ac_ct_DUMPBIN@,$ac_ct_DUMPBIN,;t t
5d47bb02
PG
25660s,@OBJDUMP@,$OBJDUMP,;t t
25661s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t
da0f6381
PB
25662s,@ac_ct_AR@,$ac_ct_AR,;t t
25663s,@STRIP@,$STRIP,;t t
25664s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
25665s,@lt_ECHO@,$lt_ECHO,;t t
5d47bb02
PG
25666s,@DSYMUTIL@,$DSYMUTIL,;t t
25667s,@ac_ct_DSYMUTIL@,$ac_ct_DSYMUTIL,;t t
25668s,@NMEDIT@,$NMEDIT,;t t
25669s,@ac_ct_NMEDIT@,$ac_ct_NMEDIT,;t t
25670s,@LIPO@,$LIPO,;t t
25671s,@ac_ct_LIPO@,$ac_ct_LIPO,;t t
25672s,@OTOOL@,$OTOOL,;t t
25673s,@ac_ct_OTOOL@,$ac_ct_OTOOL,;t t
25674s,@OTOOL64@,$OTOOL64,;t t
25675s,@ac_ct_OTOOL64@,$ac_ct_OTOOL64,;t t
da0f6381
PB
25676s,@objdir@,$objdir,;t t
25677s,@enable_fast_install@,$enable_fast_install,;t t
b61ff9c8
BS
25678s,@gcc_cv_as@,$gcc_cv_as,;t t
25679s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
25680s,@gcc_cv_ld@,$gcc_cv_ld,;t t
25681s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
25682s,@gcc_cv_nm@,$gcc_cv_nm,;t t
25683s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
25684s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
6e97481b 25685s,@gcc_cv_readelf@,$gcc_cv_readelf,;t t
b61ff9c8
BS
25686s,@libgcc_visibility@,$libgcc_visibility,;t t
25687s,@GGC@,$GGC,;t t
25688s,@zlibdir@,$zlibdir,;t t
25689s,@zlibinc@,$zlibinc,;t t
25690s,@MAINT@,$MAINT,;t t
25691s,@gcc_tooldir@,$gcc_tooldir,;t t
25692s,@dollar@,$dollar,;t t
25693s,@slibdir@,$slibdir,;t t
b61ff9c8
BS
25694s,@subdirs@,$subdirs,;t t
25695s,@srcdir@,$srcdir,;t t
25696s,@all_compilers@,$all_compilers,;t t
25697s,@all_gtfiles@,$all_gtfiles,;t t
25698s,@all_lang_makefrags@,$all_lang_makefrags,;t t
25699s,@all_lang_makefiles@,$all_lang_makefiles,;t t
25700s,@all_languages@,$all_languages,;t t
25701s,@all_selected_languages@,$all_selected_languages,;t t
25702s,@build_exeext@,$build_exeext,;t t
25703s,@build_install_headers_dir@,$build_install_headers_dir,;t t
25704s,@build_xm_file_list@,$build_xm_file_list,;t t
25705s,@build_xm_include_list@,$build_xm_include_list,;t t
25706s,@build_xm_defines@,$build_xm_defines,;t t
a0e527e3 25707s,@build_file_translate@,$build_file_translate,;t t
b61ff9c8
BS
25708s,@check_languages@,$check_languages,;t t
25709s,@cpp_install_dir@,$cpp_install_dir,;t t
25710s,@xmake_file@,$xmake_file,;t t
25711s,@tmake_file@,$tmake_file,;t t
aca600aa
AS
25712s,@TM_ENDIAN_CONFIG@,$TM_ENDIAN_CONFIG,;t t
25713s,@TM_MULTILIB_CONFIG@,$TM_MULTILIB_CONFIG,;t t
25714s,@TM_MULTILIB_EXCEPTIONS_CONFIG@,$TM_MULTILIB_EXCEPTIONS_CONFIG,;t t
b61ff9c8
BS
25715s,@extra_gcc_objs@,$extra_gcc_objs,;t t
25716s,@extra_headers_list@,$extra_headers_list,;t t
25717s,@extra_objs@,$extra_objs,;t t
25718s,@extra_parts@,$extra_parts,;t t
25719s,@extra_passes@,$extra_passes,;t t
25720s,@extra_programs@,$extra_programs,;t t
25721s,@float_h_file@,$float_h_file,;t t
25722s,@gcc_config_arguments@,$gcc_config_arguments,;t t
25723s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
25724s,@host_exeext@,$host_exeext,;t t
25725s,@host_xm_file_list@,$host_xm_file_list,;t t
25726s,@host_xm_include_list@,$host_xm_include_list,;t t
25727s,@host_xm_defines@,$host_xm_defines,;t t
25728s,@out_host_hook_obj@,$out_host_hook_obj,;t t
25729s,@install@,$install,;t t
25730s,@lang_opt_files@,$lang_opt_files,;t t
25731s,@lang_specs_files@,$lang_specs_files,;t t
25732s,@lang_tree_files@,$lang_tree_files,;t t
25733s,@local_prefix@,$local_prefix,;t t
25734s,@md_file@,$md_file,;t t
25735s,@objc_boehm_gc@,$objc_boehm_gc,;t t
25736s,@out_file@,$out_file,;t t
25737s,@out_object_file@,$out_object_file,;t t
25738s,@thread_file@,$thread_file,;t t
25739s,@tm_file_list@,$tm_file_list,;t t
25740s,@tm_include_list@,$tm_include_list,;t t
25741s,@tm_defines@,$tm_defines,;t t
25742s,@tm_p_file_list@,$tm_p_file_list,;t t
25743s,@tm_p_include_list@,$tm_p_include_list,;t t
25744s,@xm_file_list@,$xm_file_list,;t t
25745s,@xm_include_list@,$xm_include_list,;t t
25746s,@xm_defines@,$xm_defines,;t t
207bf79d 25747s,@use_gcc_stdint@,$use_gcc_stdint,;t t
b61ff9c8
BS
25748s,@c_target_objs@,$c_target_objs,;t t
25749s,@cxx_target_objs@,$cxx_target_objs,;t t
c776a6d0 25750s,@fortran_target_objs@,$fortran_target_objs,;t t
b61ff9c8
BS
25751s,@target_cpu_default@,$target_cpu_default,;t t
25752s,@GMPLIBS@,$GMPLIBS,;t t
25753s,@GMPINC@,$GMPINC,;t t
f8bf9252
SP
25754s,@PPLLIBS@,$PPLLIBS,;t t
25755s,@PPLINC@,$PPLINC,;t t
25756s,@CLOOGLIBS@,$CLOOGLIBS,;t t
25757s,@CLOOGINC@,$CLOOGINC,;t t
68a607d8
DN
25758s,@pluginlibs@,$pluginlibs,;t t
25759s,@enable_plugin@,$enable_plugin,;t t
b61ff9c8
BS
25760s,@LIBOBJS@,$LIBOBJS,;t t
25761s,@LTLIBOBJS@,$LTLIBOBJS,;t t
25762/@language_hooks@/r $language_hooks
25763s,@language_hooks@,,;t t
25764CEOF
25765
25766_ACEOF
25767
25768 cat >>$CONFIG_STATUS <<\_ACEOF
25769 # Split the substitutions into bite-sized pieces for seds with
25770 # small command number limits, like on Digital OSF/1 and HP-UX.
25771 ac_max_sed_lines=48
25772 ac_sed_frag=1 # Number of current file.
25773 ac_beg=1 # First line for current file.
25774 ac_end=$ac_max_sed_lines # Line after last line for current file.
25775 ac_more_lines=:
25776 ac_sed_cmds=
25777 while $ac_more_lines; do
25778 if test $ac_beg -gt 1; then
25779 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25780 else
25781 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25782 fi
25783 if test ! -s $tmp/subs.frag; then
25784 ac_more_lines=false
25785 else
25786 # The purpose of the label and of the branching condition is to
25787 # speed up the sed processing (if there are no `@' at all, there
25788 # is no need to browse any of the substitutions).
25789 # These are the two extra sed commands mentioned above.
25790 (echo ':t
25791 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25792 if test -z "$ac_sed_cmds"; then
25793 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25794 else
25795 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25796 fi
25797 ac_sed_frag=`expr $ac_sed_frag + 1`
25798 ac_beg=$ac_end
25799 ac_end=`expr $ac_end + $ac_max_sed_lines`
25800 fi
25801 done
25802 if test -z "$ac_sed_cmds"; then
25803 ac_sed_cmds=cat
1a4b763e 25804 fi
b61ff9c8 25805fi # test -n "$CONFIG_FILES"
1a4b763e 25806
1a4b763e 25807_ACEOF
ba479fd2 25808cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8
BS
25809for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25810 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25811 case $ac_file in
25812 - | *:- | *:-:* ) # input from stdin
25813 cat >$tmp/stdin
25814 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25815 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25816 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25817 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25818 * ) ac_file_in=$ac_file.in ;;
703d89ab
ZW
25819 esac
25820
b61ff9c8
BS
25821 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25822 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
ba479fd2 25823$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
25824 X"$ac_file" : 'X\(//\)[^/]' \| \
25825 X"$ac_file" : 'X\(//\)$' \| \
b61ff9c8
BS
25826 X"$ac_file" : 'X\(/\)' \| \
25827 . : '\(.\)' 2>/dev/null ||
ba479fd2 25828echo X"$ac_file" |
b61ff9c8
BS
25829 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25830 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25831 /^X\(\/\/\)$/{ s//\1/; q; }
25832 /^X\(\/\).*/{ s//\1/; q; }
25833 s/.*/./; q'`
25834 { if $as_mkdir_p; then
25835 mkdir -p "$ac_dir"
25836 else
25837 as_dir="$ac_dir"
ba479fd2 25838 as_dirs=
b61ff9c8
BS
25839 while test ! -d "$as_dir"; do
25840 as_dirs="$as_dir $as_dirs"
25841 as_dir=`(dirname "$as_dir") 2>/dev/null ||
ba479fd2 25842$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
25843 X"$as_dir" : 'X\(//\)[^/]' \| \
25844 X"$as_dir" : 'X\(//\)$' \| \
b61ff9c8
BS
25845 X"$as_dir" : 'X\(/\)' \| \
25846 . : '\(.\)' 2>/dev/null ||
ba479fd2 25847echo X"$as_dir" |
b61ff9c8
BS
25848 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25849 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25850 /^X\(\/\/\)$/{ s//\1/; q; }
25851 /^X\(\/\).*/{ s//\1/; q; }
25852 s/.*/./; q'`
ba479fd2 25853 done
b61ff9c8
BS
25854 test ! -n "$as_dirs" || mkdir $as_dirs
25855 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
25856echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
ba479fd2 25857 { (exit 1); exit 1; }; }; }
b61ff9c8 25858
ba479fd2
NN
25859 ac_builddir=.
25860
b61ff9c8 25861if test "$ac_dir" != .; then
ba479fd2 25862 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b61ff9c8
BS
25863 # A "../" for each directory in $ac_dir_suffix.
25864 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
25865else
25866 ac_dir_suffix= ac_top_builddir=
25867fi
ba479fd2
NN
25868
25869case $srcdir in
b61ff9c8 25870 .) # No --srcdir option. We are building in place.
ba479fd2 25871 ac_srcdir=.
b61ff9c8
BS
25872 if test -z "$ac_top_builddir"; then
25873 ac_top_srcdir=.
25874 else
25875 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
25876 fi ;;
25877 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 25878 ac_srcdir=$srcdir$ac_dir_suffix;
b61ff9c8
BS
25879 ac_top_srcdir=$srcdir ;;
25880 *) # Relative path.
25881 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
25882 ac_top_srcdir=$ac_top_builddir$srcdir ;;
ba479fd2 25883esac
ba479fd2 25884
b61ff9c8
BS
25885# Do not use `cd foo && pwd` to compute absolute paths, because
25886# the directories may not exist.
25887case `pwd` in
25888.) ac_abs_builddir="$ac_dir";;
25889*)
25890 case "$ac_dir" in
25891 .) ac_abs_builddir=`pwd`;;
25892 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
25893 *) ac_abs_builddir=`pwd`/"$ac_dir";;
25894 esac;;
25895esac
25896case $ac_abs_builddir in
25897.) ac_abs_top_builddir=${ac_top_builddir}.;;
25898*)
25899 case ${ac_top_builddir}. in
25900 .) ac_abs_top_builddir=$ac_abs_builddir;;
25901 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
25902 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
25903 esac;;
25904esac
25905case $ac_abs_builddir in
25906.) ac_abs_srcdir=$ac_srcdir;;
25907*)
25908 case $ac_srcdir in
25909 .) ac_abs_srcdir=$ac_abs_builddir;;
25910 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
25911 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
25912 esac;;
25913esac
25914case $ac_abs_builddir in
25915.) ac_abs_top_srcdir=$ac_top_srcdir;;
25916*)
25917 case $ac_top_srcdir in
25918 .) ac_abs_top_srcdir=$ac_abs_builddir;;
25919 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
25920 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
25921 esac;;
25922esac
703d89ab 25923
ab22c1fa 25924
1a4b763e 25925
b61ff9c8
BS
25926 if test x"$ac_file" != x-; then
25927 { echo "$as_me:$LINENO: creating $ac_file" >&5
25928echo "$as_me: creating $ac_file" >&6;}
25929 rm -f "$ac_file"
25930 fi
25931 # Let's still pretend it is `configure' which instantiates (i.e., don't
25932 # use $as_me), people would be surprised to read:
25933 # /* config.h. Generated by config.status. */
25934 if test x"$ac_file" = x-; then
25935 configure_input=
25936 else
25937 configure_input="$ac_file. "
25938 fi
25939 configure_input=$configure_input"Generated from `echo $ac_file_in |
25940 sed 's,.*/,,'` by configure."
25941
25942 # First look for the input files in the build tree, otherwise in the
25943 # src tree.
25944 ac_file_inputs=`IFS=:
25945 for f in $ac_file_in; do
25946 case $f in
25947 -) echo $tmp/stdin ;;
25948 [\\/$]*)
25949 # Absolute (can't be DOS-style, as IFS=:)
25950 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
25951echo "$as_me: error: cannot find input file: $f" >&2;}
25952 { (exit 1); exit 1; }; }
25953 echo "$f";;
25954 *) # Relative
25955 if test -f "$f"; then
25956 # Build tree
25957 echo "$f"
25958 elif test -f "$srcdir/$f"; then
25959 # Source tree
25960 echo "$srcdir/$f"
25961 else
25962 # /dev/null tree
25963 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
25964echo "$as_me: error: cannot find input file: $f" >&2;}
25965 { (exit 1); exit 1; }; }
25966 fi;;
25967 esac
25968 done` || { (exit 1); exit 1; }
a6ccdbab 25969_ACEOF
ba479fd2
NN
25970cat >>$CONFIG_STATUS <<_ACEOF
25971 sed "$ac_vpsub
25972$extrasub
25973_ACEOF
25974cat >>$CONFIG_STATUS <<\_ACEOF
25975:t
25976/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b61ff9c8
BS
25977s,@configure_input@,$configure_input,;t t
25978s,@srcdir@,$ac_srcdir,;t t
25979s,@abs_srcdir@,$ac_abs_srcdir,;t t
25980s,@top_srcdir@,$ac_top_srcdir,;t t
25981s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
25982s,@builddir@,$ac_builddir,;t t
25983s,@abs_builddir@,$ac_abs_builddir,;t t
25984s,@top_builddir@,$ac_top_builddir,;t t
25985s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
25986" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25987 rm -f $tmp/stdin
25988 if test x"$ac_file" != x-; then
25989 mv $tmp/out $ac_file
25990 else
25991 cat $tmp/out
25992 rm -f $tmp/out
25993 fi
25994
25995 # Run the commands associated with the file.
be0fe523 25996 case $ac_file in
b61ff9c8
BS
25997 as ) chmod +x as ;;
25998 collect-ld ) chmod +x collect-ld ;;
25999 nm ) chmod +x nm ;;
be0fe523 26000 esac
b61ff9c8
BS
26001done
26002_ACEOF
26003cat >>$CONFIG_STATUS <<\_ACEOF
26004
26005#
26006# CONFIG_HEADER section.
26007#
26008
26009# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
26010# NAME is the cpp macro being defined and VALUE is the value it is being given.
26011#
26012# ac_d sets the value in "#define NAME VALUE" lines.
26013ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
26014ac_dB='[ ].*$,\1#\2'
a3bba767 26015ac_dC=' '
b61ff9c8
BS
26016ac_dD=',;t'
26017# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
26018ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
26019ac_uB='$,\1#\2define\3'
26020ac_uC=' '
26021ac_uD=',;t'
26022
26023for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
26024 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26025 case $ac_file in
26026 - | *:- | *:-:* ) # input from stdin
26027 cat >$tmp/stdin
26028 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26029 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26030 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26031 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26032 * ) ac_file_in=$ac_file.in ;;
26033 esac
26034
26035 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
26036echo "$as_me: creating $ac_file" >&6;}
26037
26038 # First look for the input files in the build tree, otherwise in the
26039 # src tree.
26040 ac_file_inputs=`IFS=:
26041 for f in $ac_file_in; do
26042 case $f in
26043 -) echo $tmp/stdin ;;
26044 [\\/$]*)
26045 # Absolute (can't be DOS-style, as IFS=:)
26046 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
26047echo "$as_me: error: cannot find input file: $f" >&2;}
26048 { (exit 1); exit 1; }; }
26049 # Do quote $f, to prevent DOS paths from being IFS'd.
26050 echo "$f";;
26051 *) # Relative
26052 if test -f "$f"; then
26053 # Build tree
26054 echo "$f"
26055 elif test -f "$srcdir/$f"; then
26056 # Source tree
26057 echo "$srcdir/$f"
26058 else
26059 # /dev/null tree
26060 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
26061echo "$as_me: error: cannot find input file: $f" >&2;}
26062 { (exit 1); exit 1; }; }
26063 fi;;
26064 esac
26065 done` || { (exit 1); exit 1; }
26066 # Remove the trailing spaces.
26067 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
26068
26069_ACEOF
26070
26071# Transform confdefs.h into two sed scripts, `conftest.defines' and
26072# `conftest.undefs', that substitutes the proper values into
26073# config.h.in to produce config.h. The first handles `#define'
26074# templates, and the second `#undef' templates.
26075# And first: Protect against being on the right side of a sed subst in
26076# config.status. Protect against being in an unquoted here document
26077# in config.status.
26078rm -f conftest.defines conftest.undefs
26079# Using a here document instead of a string reduces the quoting nightmare.
26080# Putting comments in sed scripts is not portable.
26081#
26082# `end' is used to avoid that the second main sed command (meant for
26083# 0-ary CPP macros) applies to n-ary macro definitions.
26084# See the Autoconf documentation for `clear'.
26085cat >confdef2sed.sed <<\_ACEOF
26086s/[\\&,]/\\&/g
26087s,[\\$`],\\&,g
26088t clear
26089: clear
26090s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
26091t end
26092s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
26093: end
26094_ACEOF
26095# If some macros were called several times there might be several times
26096# the same #defines, which is useless. Nevertheless, we may not want to
26097# sort them, since we want the *last* AC-DEFINE to be honored.
26098uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
26099sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
26100rm -f confdef2sed.sed
26101
26102# This sed command replaces #undef with comments. This is necessary, for
861bb6c1
JL
26103# example, in the case of _POSIX_SOURCE, which is predefined and required
26104# on some systems where configure will not decide to define it.
b61ff9c8
BS
26105cat >>conftest.undefs <<\_ACEOF
26106s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
26107_ACEOF
26108
26109# Break up conftest.defines because some shells have a limit on the size
26110# of here documents, and old seds have small limits too (100 cmds).
26111echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
26112echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
26113echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
26114echo ' :' >>$CONFIG_STATUS
26115rm -f conftest.tail
26116while grep . conftest.defines >/dev/null
ba479fd2 26117do
b61ff9c8
BS
26118 # Write a limited-size here document to $tmp/defines.sed.
26119 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
26120 # Speed up: don't consider the non `#define' lines.
26121 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
26122 # Work around the forget-to-reset-the-flag bug.
26123 echo 't clr' >>$CONFIG_STATUS
26124 echo ': clr' >>$CONFIG_STATUS
26125 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
ba479fd2 26126 echo 'CEOF
b61ff9c8
BS
26127 sed -f $tmp/defines.sed $tmp/in >$tmp/out
26128 rm -f $tmp/in
26129 mv $tmp/out $tmp/in
26130' >>$CONFIG_STATUS
26131 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
ba479fd2
NN
26132 rm -f conftest.defines
26133 mv conftest.tail conftest.defines
26134done
b61ff9c8
BS
26135rm -f conftest.defines
26136echo ' fi # grep' >>$CONFIG_STATUS
26137echo >>$CONFIG_STATUS
26138
26139# Break up conftest.undefs because some shells have a limit on the size
26140# of here documents, and old seds have small limits too (100 cmds).
26141echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
26142rm -f conftest.tail
26143while grep . conftest.undefs >/dev/null
26144do
26145 # Write a limited-size here document to $tmp/undefs.sed.
26146 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
26147 # Speed up: don't consider the non `#undef'
26148 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
26149 # Work around the forget-to-reset-the-flag bug.
26150 echo 't clr' >>$CONFIG_STATUS
26151 echo ': clr' >>$CONFIG_STATUS
26152 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
26153 echo 'CEOF
26154 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
26155 rm -f $tmp/in
26156 mv $tmp/out $tmp/in
26157' >>$CONFIG_STATUS
26158 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
26159 rm -f conftest.undefs
26160 mv conftest.tail conftest.undefs
26161done
26162rm -f conftest.undefs
ba479fd2
NN
26163
26164cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8
BS
26165 # Let's still pretend it is `configure' which instantiates (i.e., don't
26166 # use $as_me), people would be surprised to read:
26167 # /* config.h. Generated by config.status. */
26168 if test x"$ac_file" = x-; then
26169 echo "/* Generated by configure. */" >$tmp/config.h
26170 else
26171 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
26172 fi
26173 cat $tmp/in >>$tmp/config.h
26174 rm -f $tmp/in
ba479fd2 26175 if test x"$ac_file" != x-; then
b61ff9c8 26176 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
ba479fd2
NN
26177 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26178echo "$as_me: $ac_file is unchanged" >&6;}
26179 else
b61ff9c8
BS
26180 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
26181$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26182 X"$ac_file" : 'X\(//\)[^/]' \| \
26183 X"$ac_file" : 'X\(//\)$' \| \
26184 X"$ac_file" : 'X\(/\)' \| \
26185 . : '\(.\)' 2>/dev/null ||
26186echo X"$ac_file" |
26187 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26188 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26189 /^X\(\/\/\)$/{ s//\1/; q; }
26190 /^X\(\/\).*/{ s//\1/; q; }
26191 s/.*/./; q'`
26192 { if $as_mkdir_p; then
26193 mkdir -p "$ac_dir"
26194 else
26195 as_dir="$ac_dir"
26196 as_dirs=
26197 while test ! -d "$as_dir"; do
26198 as_dirs="$as_dir $as_dirs"
26199 as_dir=`(dirname "$as_dir") 2>/dev/null ||
26200$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26201 X"$as_dir" : 'X\(//\)[^/]' \| \
26202 X"$as_dir" : 'X\(//\)$' \| \
26203 X"$as_dir" : 'X\(/\)' \| \
26204 . : '\(.\)' 2>/dev/null ||
26205echo X"$as_dir" |
26206 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26207 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26208 /^X\(\/\/\)$/{ s//\1/; q; }
26209 /^X\(\/\).*/{ s//\1/; q; }
26210 s/.*/./; q'`
26211 done
26212 test ! -n "$as_dirs" || mkdir $as_dirs
26213 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
26214echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
26215 { (exit 1); exit 1; }; }; }
26216
ba479fd2 26217 rm -f $ac_file
b61ff9c8 26218 mv $tmp/config.h $ac_file
ba479fd2
NN
26219 fi
26220 else
b61ff9c8
BS
26221 cat $tmp/config.h
26222 rm -f $tmp/config.h
ba479fd2 26223 fi
b61ff9c8
BS
26224done
26225_ACEOF
26226cat >>$CONFIG_STATUS <<\_ACEOF
2f41c1d6 26227
b61ff9c8
BS
26228#
26229# CONFIG_COMMANDS section.
26230#
26231for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
26232 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
26233 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
26234 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
26235$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26236 X"$ac_dest" : 'X\(//\)[^/]' \| \
26237 X"$ac_dest" : 'X\(//\)$' \| \
26238 X"$ac_dest" : 'X\(/\)' \| \
26239 . : '\(.\)' 2>/dev/null ||
26240echo X"$ac_dest" |
26241 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26242 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26243 /^X\(\/\/\)$/{ s//\1/; q; }
26244 /^X\(\/\).*/{ s//\1/; q; }
26245 s/.*/./; q'`
26246 { if $as_mkdir_p; then
26247 mkdir -p "$ac_dir"
26248 else
26249 as_dir="$ac_dir"
26250 as_dirs=
26251 while test ! -d "$as_dir"; do
26252 as_dirs="$as_dir $as_dirs"
26253 as_dir=`(dirname "$as_dir") 2>/dev/null ||
26254$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26255 X"$as_dir" : 'X\(//\)[^/]' \| \
26256 X"$as_dir" : 'X\(//\)$' \| \
26257 X"$as_dir" : 'X\(/\)' \| \
26258 . : '\(.\)' 2>/dev/null ||
26259echo X"$as_dir" |
26260 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26261 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26262 /^X\(\/\/\)$/{ s//\1/; q; }
26263 /^X\(\/\).*/{ s//\1/; q; }
26264 s/.*/./; q'`
26265 done
26266 test ! -n "$as_dirs" || mkdir $as_dirs
26267 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
26268echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
26269 { (exit 1); exit 1; }; }; }
2f41c1d6 26270
b61ff9c8 26271 ac_builddir=.
2f41c1d6 26272
b61ff9c8
BS
26273if test "$ac_dir" != .; then
26274 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
26275 # A "../" for each directory in $ac_dir_suffix.
26276 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
26277else
26278 ac_dir_suffix= ac_top_builddir=
26279fi
26280
26281case $srcdir in
26282 .) # No --srcdir option. We are building in place.
26283 ac_srcdir=.
26284 if test -z "$ac_top_builddir"; then
26285 ac_top_srcdir=.
26286 else
26287 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
26288 fi ;;
26289 [\\/]* | ?:[\\/]* ) # Absolute path.
26290 ac_srcdir=$srcdir$ac_dir_suffix;
26291 ac_top_srcdir=$srcdir ;;
26292 *) # Relative path.
26293 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
26294 ac_top_srcdir=$ac_top_builddir$srcdir ;;
26295esac
26296
26297# Do not use `cd foo && pwd` to compute absolute paths, because
26298# the directories may not exist.
26299case `pwd` in
26300.) ac_abs_builddir="$ac_dir";;
26301*)
26302 case "$ac_dir" in
26303 .) ac_abs_builddir=`pwd`;;
26304 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
26305 *) ac_abs_builddir=`pwd`/"$ac_dir";;
26306 esac;;
26307esac
26308case $ac_abs_builddir in
26309.) ac_abs_top_builddir=${ac_top_builddir}.;;
26310*)
26311 case ${ac_top_builddir}. in
26312 .) ac_abs_top_builddir=$ac_abs_builddir;;
26313 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
26314 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
26315 esac;;
26316esac
26317case $ac_abs_builddir in
26318.) ac_abs_srcdir=$ac_srcdir;;
26319*)
26320 case $ac_srcdir in
26321 .) ac_abs_srcdir=$ac_abs_builddir;;
26322 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
26323 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
26324 esac;;
26325esac
26326case $ac_abs_builddir in
26327.) ac_abs_top_srcdir=$ac_top_srcdir;;
26328*)
26329 case $ac_top_srcdir in
26330 .) ac_abs_top_srcdir=$ac_abs_builddir;;
26331 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
26332 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
26333 esac;;
26334esac
26335
26336
26337 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
26338echo "$as_me: executing $ac_dest commands" >&6;}
26339 case $ac_dest in
26340 default )
f1faaabd
NN
26341case ${CONFIG_HEADERS} in
26342 *auto-host.h:config.in*)
26343 echo > cstamp-h ;;
861bb6c1 26344esac
2ed26f6b 26345# Make sure all the subdirs exist.
3b620440 26346for d in $subdirs doc build
2ed26f6b 26347do
2ed26f6b 26348 test -d $d || mkdir $d
2ed26f6b 26349done
ba479fd2
NN
26350 ;;
26351 esac
b61ff9c8
BS
26352done
26353_ACEOF
cafe096b 26354
b61ff9c8 26355cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
26356
26357{ (exit 0); exit 0; }
26358_ACEOF
861bb6c1 26359chmod +x $CONFIG_STATUS
ba479fd2
NN
26360ac_clean_files=$ac_clean_files_save
26361
26362
26363# configure is writing to config.log, and then calls config.status.
26364# config.status does its own redirection, appending to config.log.
26365# Unfortunately, on DOS this fails, as config.log is still kept open
26366# by configure, so config.status won't be able to write to it; its
26367# output is simply discarded. So we exec the FD to /dev/null,
26368# effectively closing config.log, so it can be properly (re)opened and
26369# appended to by config.status. When coming back to configure, we
26370# need to make the FD available again.
26371if test "$no_create" != yes; then
26372 ac_cs_success=:
26373 ac_config_status_args=
26374 test "$silent" = yes &&
26375 ac_config_status_args="$ac_config_status_args --quiet"
26376 exec 5>/dev/null
26377 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26378 exec 5>>config.log
26379 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26380 # would make configure fail if this is the last instruction.
26381 $ac_cs_success || { (exit 1); exit 1; }
26382fi
861bb6c1 26383