]> git.ipfire.org Git - thirdparty/gcc.git/blame - libiberty/configure
PR c++/19149
[thirdparty/gcc.git] / libiberty / configure
CommitLineData
f0a93313 1#! /bin/sh
f0a93313 2# Guess values for system-dependent variables and create Makefiles.
7f759422 3# Generated by GNU Autoconf 2.59.
f0a93313 4#
ac09b42b 5# Copyright (C) 2003 Free Software Foundation, Inc.
f0a93313 6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
a6089b1e 8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
11
12# Be Bourne compatible
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+"$@"}'='"$@"'
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
21fi
ac09b42b 22DUALCASE=1; export DUALCASE # for MKS sh
a6089b1e 23
24# Support unset when possible.
ac09b42b 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
a6089b1e 26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
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
ac09b42b 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
a6089b1e 45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
48 fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54else
55 as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
66as_me=`$as_basename "$0" ||
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
76
77
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
85
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
97fi
98
99
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
116
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 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
137 /*)
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
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
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
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.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
166 N
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
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
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
184}
185
186
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= ;;
192esac
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
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
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
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
210 fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
217
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
ac09b42b 221 test -d ./-p && rmdir ./-p
a6089b1e 222 as_mkdir_p=false
223fi
224
225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
ac09b42b 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
a6089b1e 229
230# Sed expression to map a string onto a valid variable name.
ac09b42b 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
a6089b1e 232
233
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
242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
f0a93313 250
a6089b1e 251#
252# Initializations.
253#
f0a93313 254ac_default_prefix=/usr/local
a6089b1e 255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
274ac_unique_file="xmalloc.c"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
fdf7ca85 312ac_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 libiberty_topdir MAINT NOTMAINT MAKEINFO BUILD_INFO PERL HAVE_PERL build build_cpu build_vendor build_os host host_cpu host_vendor host_os AR ac_ct_AR RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP ac_libiberty_warn_cflags LN_S STRIP ac_ct_STRIP LIBTOOL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA EGREP LIBOBJS CHECK target_header_dir pexecute ltpexecute INSTALL_DEST enable_shared LTLIBOBJS'
a6089b1e 313ac_subst_files='host_makefile_frag'
f0a93313 314
315# Initialize some variables set by options.
a6089b1e 316ac_init_help=
317ac_init_version=false
f0a93313 318# The variables have the same names as the options, with
319# dashes changed to underlines.
a6089b1e 320cache_file=/dev/null
f0a93313 321exec_prefix=NONE
f0a93313 322no_create=
f0a93313 323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
f0a93313 331verbose=
332x_includes=NONE
333x_libraries=NONE
a6089b1e 334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
f0a93313 340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
f0a93313 353ac_prev=
354for ac_option
355do
f0a93313 356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
361 fi
362
a6089b1e 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
f0a93313 364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
a6089b1e 367 case $ac_option in
f0a93313 368
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
a6089b1e 372 bindir=$ac_optarg ;;
f0a93313 373
374 -build | --build | --buil | --bui | --bu)
a6089b1e 375 ac_prev=build_alias ;;
f0a93313 376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
a6089b1e 377 build_alias=$ac_optarg ;;
f0a93313 378
379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
a6089b1e 384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
f0a93313 388
389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
a6089b1e 393 datadir=$ac_optarg ;;
f0a93313 394
395 -disable-* | --disable-*)
a6089b1e 396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
f0a93313 397 # Reject names that are not valid shell variable names.
a6089b1e 398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
f0a93313 403
404 -enable-* | --enable-*)
a6089b1e 405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
f0a93313 406 # Reject names that are not valid shell variable names.
a6089b1e 407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
f0a93313 413 *) ac_optarg=yes ;;
414 esac
a6089b1e 415 eval "enable_$ac_feature='$ac_optarg'" ;;
f0a93313 416
417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
a6089b1e 424 exec_prefix=$ac_optarg ;;
f0a93313 425
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
429
a6089b1e 430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
f0a93313 436
437 -host | --host | --hos | --ho)
a6089b1e 438 ac_prev=host_alias ;;
f0a93313 439 -host=* | --host=* | --hos=* | --ho=*)
a6089b1e 440 host_alias=$ac_optarg ;;
f0a93313 441
442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
a6089b1e 447 includedir=$ac_optarg ;;
f0a93313 448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
a6089b1e 452 infodir=$ac_optarg ;;
f0a93313 453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
a6089b1e 457 libdir=$ac_optarg ;;
f0a93313 458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
a6089b1e 464 libexecdir=$ac_optarg ;;
f0a93313 465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
a6089b1e 473 localstatedir=$ac_optarg ;;
f0a93313 474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
a6089b1e 478 mandir=$ac_optarg ;;
f0a93313 479
480 -nfp | --nfp | --nf)
481 # Obsolete; use --without-fp.
482 with_fp=no ;;
483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
a6089b1e 485 | --no-cr | --no-c | -n)
f0a93313 486 no_create=yes ;;
487
488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
491
492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
a6089b1e 499 oldincludedir=$ac_optarg ;;
f0a93313 500
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
a6089b1e 504 prefix=$ac_optarg ;;
f0a93313 505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
a6089b1e 511 program_prefix=$ac_optarg ;;
f0a93313 512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
a6089b1e 518 program_suffix=$ac_optarg ;;
f0a93313 519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
a6089b1e 535 program_transform_name=$ac_optarg ;;
f0a93313 536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
a6089b1e 545 sbindir=$ac_optarg ;;
f0a93313 546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
a6089b1e 556 sharedstatedir=$ac_optarg ;;
f0a93313 557
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
a6089b1e 561 site=$ac_optarg ;;
f0a93313 562
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
a6089b1e 566 srcdir=$ac_optarg ;;
f0a93313 567
568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
a6089b1e 573 sysconfdir=$ac_optarg ;;
f0a93313 574
575 -target | --target | --targe | --targ | --tar | --ta | --t)
a6089b1e 576 ac_prev=target_alias ;;
f0a93313 577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
a6089b1e 578 target_alias=$ac_optarg ;;
f0a93313 579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
a6089b1e 583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
f0a93313 585
586 -with-* | --with-*)
a6089b1e 587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
f0a93313 588 # Reject names that are not valid shell variable names.
a6089b1e 589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
f0a93313 592 ac_package=`echo $ac_package| sed 's/-/_/g'`
a6089b1e 593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
f0a93313 595 *) ac_optarg=yes ;;
596 esac
a6089b1e 597 eval "with_$ac_package='$ac_optarg'" ;;
f0a93313 598
599 -without-* | --without-*)
a6089b1e 600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
f0a93313 601 # Reject names that are not valid shell variable names.
a6089b1e 602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
f0a93313 607
608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
a6089b1e 617 x_includes=$ac_optarg ;;
f0a93313 618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
a6089b1e 624 x_libraries=$ac_optarg ;;
f0a93313 625
a6089b1e 626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
f0a93313 629 ;;
630
a6089b1e 631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
f0a93313 641 *)
a6089b1e 642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
f0a93313 647 ;;
648
649 esac
650done
651
652if test -n "$ac_prev"; then
a6089b1e 653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
f0a93313 656fi
f0a93313 657
a6089b1e 658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
666 esac
667done
f0a93313 668
a6089b1e 669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
ac09b42b 671 localstatedir libdir includedir oldincludedir infodir mandir
f0a93313 672do
a6089b1e 673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
f0a93313 678 esac
679done
680
a6089b1e 681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
687
688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
f0a93313 698
a6089b1e 699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
f0a93313 703
f0a93313 704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707 ac_srcdir_defaulted=yes
708 # Try the directory containing this script, then its parent.
a6089b1e 709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ac09b42b 711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
a6089b1e 715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
f0a93313 721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
a6089b1e 730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
f0a93313 732 else
a6089b1e 733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
f0a93313 735 fi
736fi
a6089b1e 737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
773
774#
775# Report the --help message.
776#
777if test "$ac_init_help" = "long"; then
778 # Omit some internal or obsolete options to make the list less imposing.
779 # This message is too long to be a string in the A/UX 3.1 sh.
780 cat <<_ACEOF
781\`configure' configures this package to adapt to many kinds of systems.
782
783Usage: $0 [OPTION]... [VAR=VALUE]...
784
785To assign environment variables (e.g., CC, CFLAGS...), specify them as
786VAR=VALUE. See below for descriptions of some of the useful variables.
787
788Defaults for the options are specified in brackets.
789
790Configuration:
791 -h, --help display this help and exit
792 --help=short display options specific to this package
793 --help=recursive display the short help of all the included packages
794 -V, --version display version information and exit
795 -q, --quiet, --silent do not print \`checking...' messages
796 --cache-file=FILE cache test results in FILE [disabled]
797 -C, --config-cache alias for \`--cache-file=config.cache'
798 -n, --no-create do not create output files
799 --srcdir=DIR find the sources in DIR [configure dir or \`..']
800
801_ACEOF
802
803 cat <<_ACEOF
804Installation directories:
805 --prefix=PREFIX install architecture-independent files in PREFIX
ac09b42b 806 [$ac_default_prefix]
a6089b1e 807 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
ac09b42b 808 [PREFIX]
a6089b1e 809
810By default, \`make install' will install all the files in
811\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
812an installation prefix other than \`$ac_default_prefix' using \`--prefix',
813for instance \`--prefix=\$HOME'.
814
815For better control, use the options below.
816
817Fine tuning of the installation directories:
818 --bindir=DIR user executables [EPREFIX/bin]
819 --sbindir=DIR system admin executables [EPREFIX/sbin]
820 --libexecdir=DIR program executables [EPREFIX/libexec]
821 --datadir=DIR read-only architecture-independent data [PREFIX/share]
822 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
823 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
824 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
825 --libdir=DIR object code libraries [EPREFIX/lib]
826 --includedir=DIR C header files [PREFIX/include]
827 --oldincludedir=DIR C header files for non-gcc [/usr/include]
828 --infodir=DIR info documentation [PREFIX/info]
829 --mandir=DIR man documentation [PREFIX/man]
830_ACEOF
831
832 cat <<\_ACEOF
833
834System types:
835 --build=BUILD configure for building on BUILD [guessed]
836 --host=HOST cross-compile to build programs to run on HOST [BUILD]
837_ACEOF
838fi
839
840if test -n "$ac_init_help"; then
841
842 cat <<\_ACEOF
843
844Optional Features:
845 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
846 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
847 --enable-maintainer-mode
848 enable make rules and dependencies not useful
849 (and sometimes confusing) to the casual installer
fdf7ca85 850 --enable-shared=PKGS build shared libraries default=no
0bc5435c 851 --enable-static=PKGS build static libraries default=yes
852 --enable-fast-install=PKGS optimize for fast installation default=yes
853 --disable-libtool-lock avoid locking (might break parallel builds)
a6089b1e 854 --enable-install-libiberty Install headers for end users
855
856Optional Packages:
857 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
858 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
859 --with-target-subdir=SUBDIR Configuring in a subdirectory for target
860 --with-build-subdir=SUBDIR Configuring in a subdirectory for build
861 --with-cross-host=HOST Configuring with a cross compiler
862 --with-newlib Configuring with newlib
0bc5435c 863 --with-gnu-ld assume the C compiler uses GNU ld default=no
864 --with-pic try to use only PIC/non-PIC objects default=use both
a6089b1e 865
866Some influential environment variables:
867 CC C compiler command
868 CFLAGS C compiler flags
869 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
870 nonstandard directory <lib dir>
871 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
872 headers in a nonstandard directory <include dir>
873 CPP C preprocessor
874
875Use these variables to override the choices made by `configure' or to help
876it to find libraries and programs with nonstandard names/locations.
877
878_ACEOF
879fi
880
881if test "$ac_init_help" = "recursive"; then
882 # If there are subdirs, report their specific --help.
883 ac_popdir=`pwd`
884 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
885 test -d $ac_dir || continue
886 ac_builddir=.
887
888if test "$ac_dir" != .; then
889 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
890 # A "../" for each directory in $ac_dir_suffix.
891 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
892else
893 ac_dir_suffix= ac_top_builddir=
894fi
895
896case $srcdir in
897 .) # No --srcdir option. We are building in place.
898 ac_srcdir=.
899 if test -z "$ac_top_builddir"; then
900 ac_top_srcdir=.
901 else
902 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
903 fi ;;
904 [\\/]* | ?:[\\/]* ) # Absolute path.
905 ac_srcdir=$srcdir$ac_dir_suffix;
906 ac_top_srcdir=$srcdir ;;
907 *) # Relative path.
908 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
909 ac_top_srcdir=$ac_top_builddir$srcdir ;;
910esac
7f759422 911
912# Do not use `cd foo && pwd` to compute absolute paths, because
913# the directories may not exist.
914case `pwd` in
915.) ac_abs_builddir="$ac_dir";;
ac09b42b 916*)
7f759422 917 case "$ac_dir" in
918 .) ac_abs_builddir=`pwd`;;
919 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
920 *) ac_abs_builddir=`pwd`/"$ac_dir";;
ac09b42b 921 esac;;
922esac
7f759422 923case $ac_abs_builddir in
ac09b42b 924.) ac_abs_top_builddir=${ac_top_builddir}.;;
925*)
926 case ${ac_top_builddir}. in
7f759422 927 .) ac_abs_top_builddir=$ac_abs_builddir;;
ac09b42b 928 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
7f759422 929 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
ac09b42b 930 esac;;
931esac
7f759422 932case $ac_abs_builddir in
ac09b42b 933.) ac_abs_srcdir=$ac_srcdir;;
934*)
935 case $ac_srcdir in
7f759422 936 .) ac_abs_srcdir=$ac_abs_builddir;;
ac09b42b 937 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
7f759422 938 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
ac09b42b 939 esac;;
940esac
7f759422 941case $ac_abs_builddir in
ac09b42b 942.) ac_abs_top_srcdir=$ac_top_srcdir;;
943*)
944 case $ac_top_srcdir in
7f759422 945 .) ac_abs_top_srcdir=$ac_abs_builddir;;
ac09b42b 946 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
7f759422 947 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
ac09b42b 948 esac;;
949esac
a6089b1e 950
951 cd $ac_dir
952 # Check for guested configure; otherwise get Cygnus style configure.
953 if test -f $ac_srcdir/configure.gnu; then
954 echo
955 $SHELL $ac_srcdir/configure.gnu --help=recursive
956 elif test -f $ac_srcdir/configure; then
957 echo
958 $SHELL $ac_srcdir/configure --help=recursive
959 elif test -f $ac_srcdir/configure.ac ||
ac09b42b 960 test -f $ac_srcdir/configure.in; then
a6089b1e 961 echo
962 $ac_configure --help
963 else
964 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
965 fi
0bc5435c 966 cd $ac_popdir
a6089b1e 967 done
968fi
969
970test -n "$ac_init_help" && exit 0
971if $ac_init_version; then
972 cat <<\_ACEOF
973
ac09b42b 974Copyright (C) 2003 Free Software Foundation, Inc.
a6089b1e 975This configure script is free software; the Free Software Foundation
976gives unlimited permission to copy, distribute and modify it.
977_ACEOF
978 exit 0
979fi
980exec 5>config.log
981cat >&5 <<_ACEOF
982This file contains any messages produced by compilers while
983running configure, to aid debugging if configure makes a mistake.
984
985It was created by $as_me, which was
7f759422 986generated by GNU Autoconf 2.59. Invocation command line was
a6089b1e 987
988 $ $0 $@
989
990_ACEOF
991{
992cat <<_ASUNAME
993## --------- ##
994## Platform. ##
995## --------- ##
996
997hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
998uname -m = `(uname -m) 2>/dev/null || echo unknown`
999uname -r = `(uname -r) 2>/dev/null || echo unknown`
1000uname -s = `(uname -s) 2>/dev/null || echo unknown`
1001uname -v = `(uname -v) 2>/dev/null || echo unknown`
1002
1003/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1004/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1005
1006/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1007/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1008/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1009hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1010/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1011/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1012/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1013
1014_ASUNAME
1015
1016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1017for as_dir in $PATH
1018do
1019 IFS=$as_save_IFS
1020 test -z "$as_dir" && as_dir=.
1021 echo "PATH: $as_dir"
1022done
1023
1024} >&5
1025
1026cat >&5 <<_ACEOF
1027
1028
1029## ----------- ##
1030## Core tests. ##
1031## ----------- ##
f0a93313 1032
a6089b1e 1033_ACEOF
1034
1035
1036# Keep a trace of the command line.
1037# Strip out --no-create and --no-recursion so they do not pile up.
1038# Strip out --silent because we don't want to record it for future runs.
1039# Also quote any args containing shell meta-characters.
1040# Make two passes to allow for proper duplicate-argument suppression.
1041ac_configure_args=
1042ac_configure_args0=
1043ac_configure_args1=
1044ac_sep=
1045ac_must_keep_next=false
1046for ac_pass in 1 2
1047do
1048 for ac_arg
1049 do
1050 case $ac_arg in
1051 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1052 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1053 | -silent | --silent | --silen | --sile | --sil)
1054 continue ;;
1055 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1056 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1057 esac
1058 case $ac_pass in
1059 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1060 2)
1061 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1062 if test $ac_must_keep_next = true; then
ac09b42b 1063 ac_must_keep_next=false # Got value, back to normal.
a6089b1e 1064 else
ac09b42b 1065 case $ac_arg in
1066 *=* | --config-cache | -C | -disable-* | --disable-* \
1067 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1068 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1069 | -with-* | --with-* | -without-* | --without-* | --x)
1070 case "$ac_configure_args0 " in
1071 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1072 esac
1073 ;;
1074 -* ) ac_must_keep_next=true ;;
1075 esac
a6089b1e 1076 fi
1077 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1078 # Get rid of the leading space.
1079 ac_sep=" "
1080 ;;
1081 esac
1082 done
1083done
1084$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1085$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1086
1087# When interrupted or exit'd, cleanup temporary files, and complete
1088# config.log. We remove comments because anyway the quotes in there
1089# would cause problems or look ugly.
1090# WARNING: Be sure not to use single quotes in there, as some shells,
1091# such as our DU 5.0 friend, will then `close' the trap.
1092trap 'exit_status=$?
1093 # Save into config.log some information that might help in debugging.
1094 {
1095 echo
1096
1097 cat <<\_ASBOX
1098## ---------------- ##
1099## Cache variables. ##
1100## ---------------- ##
1101_ASBOX
1102 echo
1103 # The following way of writing the cache mishandles newlines in values,
1104{
1105 (set) 2>&1 |
1106 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1107 *ac_space=\ *)
1108 sed -n \
ac09b42b 1109 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1110 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
a6089b1e 1111 ;;
1112 *)
1113 sed -n \
ac09b42b 1114 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
a6089b1e 1115 ;;
1116 esac;
1117}
1118 echo
1119
1120 cat <<\_ASBOX
1121## ----------------- ##
1122## Output variables. ##
1123## ----------------- ##
1124_ASBOX
1125 echo
1126 for ac_var in $ac_subst_vars
1127 do
1128 eval ac_val=$`echo $ac_var`
1129 echo "$ac_var='"'"'$ac_val'"'"'"
1130 done | sort
1131 echo
1132
1133 if test -n "$ac_subst_files"; then
1134 cat <<\_ASBOX
1135## ------------- ##
1136## Output files. ##
1137## ------------- ##
1138_ASBOX
1139 echo
1140 for ac_var in $ac_subst_files
1141 do
1142 eval ac_val=$`echo $ac_var`
ac09b42b 1143 echo "$ac_var='"'"'$ac_val'"'"'"
a6089b1e 1144 done | sort
1145 echo
1146 fi
1147
1148 if test -s confdefs.h; then
1149 cat <<\_ASBOX
1150## ----------- ##
1151## confdefs.h. ##
1152## ----------- ##
1153_ASBOX
1154 echo
1155 sed "/^$/d" confdefs.h | sort
1156 echo
1157 fi
1158 test "$ac_signal" != 0 &&
1159 echo "$as_me: caught signal $ac_signal"
1160 echo "$as_me: exit $exit_status"
1161 } >&5
ac09b42b 1162 rm -f core *.core &&
a6089b1e 1163 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1164 exit $exit_status
1165 ' 0
1166for ac_signal in 1 2 13 15; do
1167 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1168done
1169ac_signal=0
1170
1171# confdefs.h avoids OS command line length limits that DEFS can exceed.
1172rm -rf conftest* confdefs.h
1173# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1174echo >confdefs.h
1175
1176# Predefined preprocessor variables.
1177
1178cat >>confdefs.h <<_ACEOF
1179#define PACKAGE_NAME "$PACKAGE_NAME"
1180_ACEOF
1181
1182
1183cat >>confdefs.h <<_ACEOF
1184#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1185_ACEOF
1186
1187
1188cat >>confdefs.h <<_ACEOF
1189#define PACKAGE_VERSION "$PACKAGE_VERSION"
1190_ACEOF
1191
1192
1193cat >>confdefs.h <<_ACEOF
1194#define PACKAGE_STRING "$PACKAGE_STRING"
1195_ACEOF
1196
1197
1198cat >>confdefs.h <<_ACEOF
1199#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1200_ACEOF
1201
1202
1203# Let the site file select an alternate cache file if it wants to.
f0a93313 1204# Prefer explicitly selected file to automatically selected ones.
38f91bf2 1205if test -z "$CONFIG_SITE"; then
1206 if test "x$prefix" != xNONE; then
1207 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1208 else
1209 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
f0a93313 1210 fi
1211fi
1212for ac_site_file in $CONFIG_SITE; do
1213 if test -r "$ac_site_file"; then
a6089b1e 1214 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1215echo "$as_me: loading site script $ac_site_file" >&6;}
1216 sed 's/^/| /' "$ac_site_file" >&5
f0a93313 1217 . "$ac_site_file"
1218 fi
1219done
1220
1221if test -r "$cache_file"; then
a6089b1e 1222 # Some versions of bash will fail to source /dev/null (special
1223 # files actually), so we avoid doing that.
1224 if test -f "$cache_file"; then
1225 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1226echo "$as_me: loading cache $cache_file" >&6;}
1227 case $cache_file in
1228 [\\/]* | ?:[\\/]* ) . $cache_file;;
1229 *) . ./$cache_file;;
1230 esac
1231 fi
f0a93313 1232else
a6089b1e 1233 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1234echo "$as_me: creating cache $cache_file" >&6;}
1235 >$cache_file
1236fi
1237
1238# Check that the precious variables saved in the cache have kept the same
1239# value.
1240ac_cache_corrupted=false
1241for ac_var in `(set) 2>&1 |
ac09b42b 1242 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
a6089b1e 1243 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1244 eval ac_new_set=\$ac_env_${ac_var}_set
1245 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1246 eval ac_new_val="\$ac_env_${ac_var}_value"
1247 case $ac_old_set,$ac_new_set in
1248 set,)
1249 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1250echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1251 ac_cache_corrupted=: ;;
1252 ,set)
1253 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1254echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1255 ac_cache_corrupted=: ;;
1256 ,);;
1257 *)
1258 if test "x$ac_old_val" != "x$ac_new_val"; then
ac09b42b 1259 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
a6089b1e 1260echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ac09b42b 1261 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
a6089b1e 1262echo "$as_me: former value: $ac_old_val" >&2;}
ac09b42b 1263 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
a6089b1e 1264echo "$as_me: current value: $ac_new_val" >&2;}
ac09b42b 1265 ac_cache_corrupted=:
a6089b1e 1266 fi;;
1267 esac
1268 # Pass precious variables to config.status.
1269 if test "$ac_new_set" = set; then
1270 case $ac_new_val in
1271 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1272 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1273 *) ac_arg=$ac_var=$ac_new_val ;;
1274 esac
1275 case " $ac_configure_args " in
1276 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1277 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1278 esac
1279 fi
1280done
1281if $ac_cache_corrupted; then
1282 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1283echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1284 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1285echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1286 { (exit 1); exit 1; }; }
f0a93313 1287fi
1288
1289ac_ext=c
f0a93313 1290ac_cpp='$CPP $CPPFLAGS'
a6089b1e 1291ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1292ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1293ac_compiler_gnu=$ac_cv_c_compiler_gnu
f0a93313 1294
1295
1296
0b045cf7 1297
f0a93313 1298
a6089b1e 1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
6c13736f 1313
fdf7ca85 1314
1315# FIXME: libiberty doesn't support --disable-static
1316enable_static=yes
a6089b1e 1317
1318# This works around the fact that libtool configuration may change LD
1319# for this particular configuration, but some shells, instead of
1320# keeping the changes in LD private, export them just because LD is
1321# exported. We don't use libtool yet, but some day we might, so...
1322ORIGINAL_LD_FOR_MULTILIBS=$LD
1323
1324
1325# Check whether --with-target-subdir or --without-target-subdir was given.
1326if test "${with_target_subdir+set}" = set; then
1327 withval="$with_target_subdir"
1328
1329fi;
1330
1331# Check whether --with-build-subdir or --without-build-subdir was given.
1332if test "${with_build_subdir+set}" = set; then
1333 withval="$with_build_subdir"
1334
1335fi;
60d10194 1336
804ec1bf 1337# Check whether --with-cross-host or --without-cross-host was given.
1338if test "${with_cross_host+set}" = set; then
1339 withval="$with_cross_host"
a6089b1e 1340
1341fi;
804ec1bf 1342
f0a93313 1343# Check whether --with-newlib or --without-newlib was given.
1344if test "${with_newlib+set}" = set; then
1345 withval="$with_newlib"
f0a93313 1346
a6089b1e 1347fi;
f0a93313 1348
1349if test "${srcdir}" = "."; then
60d10194 1350 if test -n "${with_build_subdir}"; then
1351 libiberty_topdir="${srcdir}/../.."
1352 with_target_subdir=
1353 elif test -z "${with_target_subdir}"; then
f0a93313 1354 libiberty_topdir="${srcdir}/.."
1355 else
1356 if test "${with_target_subdir}" != "."; then
1357 libiberty_topdir="${srcdir}/${with_multisrctop}../.."
1358 else
1359 libiberty_topdir="${srcdir}/${with_multisrctop}.."
1360 fi
1361 fi
1362else
1363 libiberty_topdir="${srcdir}/.."
1364fi
7f13318a 1365
f0a93313 1366ac_aux_dir=
1367for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do
1368 if test -f $ac_dir/install-sh; then
1369 ac_aux_dir=$ac_dir
1370 ac_install_sh="$ac_aux_dir/install-sh -c"
1371 break
1372 elif test -f $ac_dir/install.sh; then
1373 ac_aux_dir=$ac_dir
1374 ac_install_sh="$ac_aux_dir/install.sh -c"
1375 break
a6089b1e 1376 elif test -f $ac_dir/shtool; then
1377 ac_aux_dir=$ac_dir
1378 ac_install_sh="$ac_aux_dir/shtool install -c"
1379 break
f0a93313 1380 fi
1381done
1382if test -z "$ac_aux_dir"; then
a6089b1e 1383 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" >&5
1384echo "$as_me: error: cannot find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" >&2;}
1385 { (exit 1); exit 1; }; }
f0a93313 1386fi
a6089b1e 1387ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1388ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1389ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
f0a93313 1390
1391
1392
a6089b1e 1393echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
1394echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
614a23c6 1395 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1396if test "${enable_maintainer_mode+set}" = set; then
1397 enableval="$enable_maintainer_mode"
1398 maintainer_mode=$enableval
1399else
1400 maintainer_mode=no
a6089b1e 1401fi;
614a23c6 1402
a6089b1e 1403echo "$as_me:$LINENO: result: $maintainer_mode" >&5
1404echo "${ECHO_T}$maintainer_mode" >&6
614a23c6 1405
1406if test "$maintainer_mode" = "yes"; then
1407 MAINT=''
1408 NOTMAINT='#'
1409else
1410 MAINT='#'
1411 NOTMAINT=''
1412fi
1413
5b7836cc 1414# Do we have a single-tree copy of texinfo? Even if we do, we can't
1415# rely on it - libiberty is built before texinfo.
1416# Extract the first word of "makeinfo", so it can be a program name with args.
614a23c6 1417set dummy makeinfo; ac_word=$2
a6089b1e 1418echo "$as_me:$LINENO: checking for $ac_word" >&5
1419echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1420if test "${ac_cv_prog_MAKEINFO+set}" = set; then
1421 echo $ECHO_N "(cached) $ECHO_C" >&6
614a23c6 1422else
1423 if test -n "$MAKEINFO"; then
1424 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
1425else
a6089b1e 1426as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1427for as_dir in $PATH
1428do
1429 IFS=$as_save_IFS
1430 test -z "$as_dir" && as_dir=.
1431 for ac_exec_ext in '' $ac_executable_extensions; do
1432 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1433 ac_cv_prog_MAKEINFO="makeinfo"
1434 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1435 break 2
1436 fi
1437done
1438done
1439
614a23c6 1440fi
1441fi
a6089b1e 1442MAKEINFO=$ac_cv_prog_MAKEINFO
614a23c6 1443if test -n "$MAKEINFO"; then
a6089b1e 1444 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
1445echo "${ECHO_T}$MAKEINFO" >&6
614a23c6 1446else
a6089b1e 1447 echo "$as_me:$LINENO: result: no" >&5
1448echo "${ECHO_T}no" >&6
614a23c6 1449fi
1450
7c9e70dd 1451if test "x$MAKEINFO" = "x"; then
1452 MAKEINFO="@echo makeinfo missing; true"
5b7836cc 1453 BUILD_INFO=
7c9e70dd 1454else
1455 BUILD_INFO=info
40a84a93 1456 case "$MAKEINFO" in
1457 */missing\ makeinfo*)
7c9e70dd 1458 BUILD_INFO=
a6089b1e 1459 { echo "$as_me:$LINENO: WARNING:
40a84a93 1460*** Makeinfo is missing. Info documentation will not be built." >&5
1461echo "$as_me: WARNING:
1462*** Makeinfo is missing. Info documentation will not be built." >&2;}
1463 ;;
1464 *)
1465 case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in
1466 x*\ [1-3].* )
1467 MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
1468 BUILD_INFO=
1469 { echo "$as_me:$LINENO: WARNING:
a6089b1e 1470*** Makeinfo is too old. Info documentation will not be built." >&5
1471echo "$as_me: WARNING:
1472*** Makeinfo is too old. Info documentation will not be built." >&2;}
40a84a93 1473 ;;
1474 esac
7c9e70dd 1475 ;;
1476 esac
1477fi
5b7836cc 1478
614a23c6 1479
1480
1481# Extract the first word of "perl", so it can be a program name with args.
1482set dummy perl; ac_word=$2
a6089b1e 1483echo "$as_me:$LINENO: checking for $ac_word" >&5
1484echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1485if test "${ac_cv_prog_PERL+set}" = set; then
1486 echo $ECHO_N "(cached) $ECHO_C" >&6
614a23c6 1487else
1488 if test -n "$PERL"; then
1489 ac_cv_prog_PERL="$PERL" # Let the user override the test.
1490else
a6089b1e 1491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1492for as_dir in $PATH
1493do
1494 IFS=$as_save_IFS
1495 test -z "$as_dir" && as_dir=.
1496 for ac_exec_ext in '' $ac_executable_extensions; do
1497 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1498 ac_cv_prog_PERL="perl"
1499 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1500 break 2
1501 fi
1502done
1503done
1504
614a23c6 1505fi
1506fi
a6089b1e 1507PERL=$ac_cv_prog_PERL
614a23c6 1508if test -n "$PERL"; then
a6089b1e 1509 echo "$as_me:$LINENO: result: $PERL" >&5
1510echo "${ECHO_T}$PERL" >&6
614a23c6 1511else
a6089b1e 1512 echo "$as_me:$LINENO: result: no" >&5
1513echo "${ECHO_T}no" >&6
614a23c6 1514fi
1515
1516if test x"$PERL" = x""; then
1517 HAVE_PERL='#'
1518else
1519 HAVE_PERL=''
1520fi
1521
1522
f0a93313 1523# Make sure we can run config.sub.
a6089b1e 1524$ac_config_sub sun4 >/dev/null 2>&1 ||
1525 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1526echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1527 { (exit 1); exit 1; }; }
f0a93313 1528
a6089b1e 1529echo "$as_me:$LINENO: checking build system type" >&5
1530echo $ECHO_N "checking build system type... $ECHO_C" >&6
1531if test "${ac_cv_build+set}" = set; then
1532 echo $ECHO_N "(cached) $ECHO_C" >&6
1533else
1534 ac_cv_build_alias=$build_alias
1535test -z "$ac_cv_build_alias" &&
1536 ac_cv_build_alias=`$ac_config_guess`
1537test -z "$ac_cv_build_alias" &&
1538 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1539echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1540 { (exit 1); exit 1; }; }
1541ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1542 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1543echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1544 { (exit 1); exit 1; }; }
f0a93313 1545
a6089b1e 1546fi
1547echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1548echo "${ECHO_T}$ac_cv_build" >&6
1549build=$ac_cv_build
1550build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1551build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1552build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
f0a93313 1553
1554
a6089b1e 1555echo "$as_me:$LINENO: checking host system type" >&5
1556echo $ECHO_N "checking host system type... $ECHO_C" >&6
1557if test "${ac_cv_host+set}" = set; then
1558 echo $ECHO_N "(cached) $ECHO_C" >&6
1559else
1560 ac_cv_host_alias=$host_alias
1561test -z "$ac_cv_host_alias" &&
1562 ac_cv_host_alias=$ac_cv_build_alias
1563ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1564 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1565echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1566 { (exit 1); exit 1; }; }
f0a93313 1567
a6089b1e 1568fi
1569echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1570echo "${ECHO_T}$ac_cv_host" >&6
1571host=$ac_cv_host
1572host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1573host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1574host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
f0a93313 1575
f0a93313 1576
f0a93313 1577
f0a93313 1578
a6089b1e 1579if test -n "$ac_tool_prefix"; then
1580 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
f0a93313 1581set dummy ${ac_tool_prefix}ar; ac_word=$2
a6089b1e 1582echo "$as_me:$LINENO: checking for $ac_word" >&5
1583echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1584if test "${ac_cv_prog_AR+set}" = set; then
1585 echo $ECHO_N "(cached) $ECHO_C" >&6
f0a93313 1586else
1587 if test -n "$AR"; then
1588 ac_cv_prog_AR="$AR" # Let the user override the test.
1589else
a6089b1e 1590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1591for as_dir in $PATH
1592do
1593 IFS=$as_save_IFS
1594 test -z "$as_dir" && as_dir=.
1595 for ac_exec_ext in '' $ac_executable_extensions; do
1596 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1597 ac_cv_prog_AR="${ac_tool_prefix}ar"
1598 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1599 break 2
1600 fi
1601done
1602done
1603
f0a93313 1604fi
1605fi
a6089b1e 1606AR=$ac_cv_prog_AR
f0a93313 1607if test -n "$AR"; then
a6089b1e 1608 echo "$as_me:$LINENO: result: $AR" >&5
1609echo "${ECHO_T}$AR" >&6
f0a93313 1610else
a6089b1e 1611 echo "$as_me:$LINENO: result: no" >&5
1612echo "${ECHO_T}no" >&6
1613fi
1614
f0a93313 1615fi
a6089b1e 1616if test -z "$ac_cv_prog_AR"; then
1617 ac_ct_AR=$AR
1618 # Extract the first word of "ar", so it can be a program name with args.
1619set dummy ar; ac_word=$2
1620echo "$as_me:$LINENO: checking for $ac_word" >&5
1621echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1622if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
1623 echo $ECHO_N "(cached) $ECHO_C" >&6
1624else
1625 if test -n "$ac_ct_AR"; then
1626 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
1627else
1628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1629for as_dir in $PATH
1630do
1631 IFS=$as_save_IFS
1632 test -z "$as_dir" && as_dir=.
1633 for ac_exec_ext in '' $ac_executable_extensions; do
1634 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1635 ac_cv_prog_ac_ct_AR="ar"
1636 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1637 break 2
1638 fi
1639done
1640done
f0a93313 1641
a6089b1e 1642fi
1643fi
1644ac_ct_AR=$ac_cv_prog_ac_ct_AR
1645if test -n "$ac_ct_AR"; then
1646 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
1647echo "${ECHO_T}$ac_ct_AR" >&6
1648else
1649 echo "$as_me:$LINENO: result: no" >&5
1650echo "${ECHO_T}no" >&6
1651fi
f0a93313 1652
a6089b1e 1653 AR=$ac_ct_AR
1654else
1655 AR="$ac_cv_prog_AR"
1656fi
f0a93313 1657
a6089b1e 1658if test -n "$ac_tool_prefix"; then
1659 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
f0a93313 1660set dummy ${ac_tool_prefix}ranlib; ac_word=$2
a6089b1e 1661echo "$as_me:$LINENO: checking for $ac_word" >&5
1662echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1663if test "${ac_cv_prog_RANLIB+set}" = set; then
1664 echo $ECHO_N "(cached) $ECHO_C" >&6
f0a93313 1665else
1666 if test -n "$RANLIB"; then
1667 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1668else
a6089b1e 1669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1670for as_dir in $PATH
1671do
1672 IFS=$as_save_IFS
1673 test -z "$as_dir" && as_dir=.
1674 for ac_exec_ext in '' $ac_executable_extensions; do
1675 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1676 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1677 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1678 break 2
1679 fi
1680done
1681done
1682
f0a93313 1683fi
1684fi
a6089b1e 1685RANLIB=$ac_cv_prog_RANLIB
f0a93313 1686if test -n "$RANLIB"; then
a6089b1e 1687 echo "$as_me:$LINENO: result: $RANLIB" >&5
1688echo "${ECHO_T}$RANLIB" >&6
f0a93313 1689else
a6089b1e 1690 echo "$as_me:$LINENO: result: no" >&5
1691echo "${ECHO_T}no" >&6
f0a93313 1692fi
1693
a6089b1e 1694fi
f0a93313 1695if test -z "$ac_cv_prog_RANLIB"; then
a6089b1e 1696 ac_ct_RANLIB=$RANLIB
f0a93313 1697 # Extract the first word of "ranlib", so it can be a program name with args.
1698set dummy ranlib; ac_word=$2
a6089b1e 1699echo "$as_me:$LINENO: checking for $ac_word" >&5
1700echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1701if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
1702 echo $ECHO_N "(cached) $ECHO_C" >&6
f0a93313 1703else
a6089b1e 1704 if test -n "$ac_ct_RANLIB"; then
1705 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
f0a93313 1706else
a6089b1e 1707as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1708for as_dir in $PATH
1709do
1710 IFS=$as_save_IFS
1711 test -z "$as_dir" && as_dir=.
1712 for ac_exec_ext in '' $ac_executable_extensions; do
1713 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1714 ac_cv_prog_ac_ct_RANLIB="ranlib"
1715 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1716 break 2
1717 fi
1718done
1719done
1720
1721 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
f0a93313 1722fi
1723fi
a6089b1e 1724ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
1725if test -n "$ac_ct_RANLIB"; then
1726 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
1727echo "${ECHO_T}$ac_ct_RANLIB" >&6
f0a93313 1728else
a6089b1e 1729 echo "$as_me:$LINENO: result: no" >&5
1730echo "${ECHO_T}no" >&6
f0a93313 1731fi
1732
a6089b1e 1733 RANLIB=$ac_ct_RANLIB
f0a93313 1734else
a6089b1e 1735 RANLIB="$ac_cv_prog_RANLIB"
f0a93313 1736fi
1737
1738
6d93ad38 1739
a6089b1e 1740ac_ext=c
1741ac_cpp='$CPP $CPPFLAGS'
1742ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1743ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1744ac_compiler_gnu=$ac_cv_c_compiler_gnu
1745if test -n "$ac_tool_prefix"; then
1746 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1747set dummy ${ac_tool_prefix}gcc; ac_word=$2
1748echo "$as_me:$LINENO: checking for $ac_word" >&5
1749echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1750if test "${ac_cv_prog_CC+set}" = set; then
1751 echo $ECHO_N "(cached) $ECHO_C" >&6
1752else
1753 if test -n "$CC"; then
1754 ac_cv_prog_CC="$CC" # Let the user override the test.
1755else
1756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1757for as_dir in $PATH
1758do
1759 IFS=$as_save_IFS
1760 test -z "$as_dir" && as_dir=.
1761 for ac_exec_ext in '' $ac_executable_extensions; do
1762 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1763 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1764 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1765 break 2
1766 fi
1767done
1768done
1769
1770fi
1771fi
1772CC=$ac_cv_prog_CC
1773if test -n "$CC"; then
1774 echo "$as_me:$LINENO: result: $CC" >&5
1775echo "${ECHO_T}$CC" >&6
1776else
1777 echo "$as_me:$LINENO: result: no" >&5
1778echo "${ECHO_T}no" >&6
1779fi
1780
1781fi
1782if test -z "$ac_cv_prog_CC"; then
1783 ac_ct_CC=$CC
1784 # Extract the first word of "gcc", so it can be a program name with args.
f0a93313 1785set dummy gcc; ac_word=$2
a6089b1e 1786echo "$as_me:$LINENO: checking for $ac_word" >&5
1787echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1788if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1789 echo $ECHO_N "(cached) $ECHO_C" >&6
1790else
1791 if test -n "$ac_ct_CC"; then
1792 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1793else
1794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1795for as_dir in $PATH
1796do
1797 IFS=$as_save_IFS
1798 test -z "$as_dir" && as_dir=.
1799 for ac_exec_ext in '' $ac_executable_extensions; do
1800 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1801 ac_cv_prog_ac_ct_CC="gcc"
1802 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1803 break 2
1804 fi
1805done
1806done
1807
1808fi
1809fi
1810ac_ct_CC=$ac_cv_prog_ac_ct_CC
1811if test -n "$ac_ct_CC"; then
1812 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1813echo "${ECHO_T}$ac_ct_CC" >&6
1814else
1815 echo "$as_me:$LINENO: result: no" >&5
1816echo "${ECHO_T}no" >&6
1817fi
1818
1819 CC=$ac_ct_CC
1820else
1821 CC="$ac_cv_prog_CC"
1822fi
1823
1824if test -z "$CC"; then
1825 if test -n "$ac_tool_prefix"; then
1826 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1827set dummy ${ac_tool_prefix}cc; ac_word=$2
1828echo "$as_me:$LINENO: checking for $ac_word" >&5
1829echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1830if test "${ac_cv_prog_CC+set}" = set; then
1831 echo $ECHO_N "(cached) $ECHO_C" >&6
f0a93313 1832else
1833 if test -n "$CC"; then
1834 ac_cv_prog_CC="$CC" # Let the user override the test.
1835else
a6089b1e 1836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1837for as_dir in $PATH
1838do
1839 IFS=$as_save_IFS
1840 test -z "$as_dir" && as_dir=.
1841 for ac_exec_ext in '' $ac_executable_extensions; do
1842 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1843 ac_cv_prog_CC="${ac_tool_prefix}cc"
1844 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1845 break 2
1846 fi
1847done
1848done
1849
f0a93313 1850fi
1851fi
a6089b1e 1852CC=$ac_cv_prog_CC
f0a93313 1853if test -n "$CC"; then
a6089b1e 1854 echo "$as_me:$LINENO: result: $CC" >&5
1855echo "${ECHO_T}$CC" >&6
1856else
1857 echo "$as_me:$LINENO: result: no" >&5
1858echo "${ECHO_T}no" >&6
1859fi
1860
1861fi
1862if test -z "$ac_cv_prog_CC"; then
1863 ac_ct_CC=$CC
1864 # Extract the first word of "cc", so it can be a program name with args.
1865set dummy cc; ac_word=$2
1866echo "$as_me:$LINENO: checking for $ac_word" >&5
1867echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1868if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1869 echo $ECHO_N "(cached) $ECHO_C" >&6
1870else
1871 if test -n "$ac_ct_CC"; then
1872 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
f0a93313 1873else
a6089b1e 1874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1875for as_dir in $PATH
1876do
1877 IFS=$as_save_IFS
1878 test -z "$as_dir" && as_dir=.
1879 for ac_exec_ext in '' $ac_executable_extensions; do
1880 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1881 ac_cv_prog_ac_ct_CC="cc"
1882 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1883 break 2
1884 fi
1885done
1886done
1887
1888fi
1889fi
1890ac_ct_CC=$ac_cv_prog_ac_ct_CC
1891if test -n "$ac_ct_CC"; then
1892 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1893echo "${ECHO_T}$ac_ct_CC" >&6
1894else
1895 echo "$as_me:$LINENO: result: no" >&5
1896echo "${ECHO_T}no" >&6
f0a93313 1897fi
1898
a6089b1e 1899 CC=$ac_ct_CC
1900else
1901 CC="$ac_cv_prog_CC"
1902fi
1903
1904fi
f0a93313 1905if test -z "$CC"; then
1906 # Extract the first word of "cc", so it can be a program name with args.
1907set dummy cc; ac_word=$2
a6089b1e 1908echo "$as_me:$LINENO: checking for $ac_word" >&5
1909echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1910if test "${ac_cv_prog_CC+set}" = set; then
1911 echo $ECHO_N "(cached) $ECHO_C" >&6
f0a93313 1912else
1913 if test -n "$CC"; then
1914 ac_cv_prog_CC="$CC" # Let the user override the test.
1915else
f0a93313 1916 ac_prog_rejected=no
a6089b1e 1917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1918for as_dir in $PATH
1919do
1920 IFS=$as_save_IFS
1921 test -z "$as_dir" && as_dir=.
1922 for ac_exec_ext in '' $ac_executable_extensions; do
1923 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1924 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1925 ac_prog_rejected=yes
1926 continue
1927 fi
1928 ac_cv_prog_CC="cc"
1929 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1930 break 2
1931 fi
1932done
1933done
1934
f0a93313 1935if test $ac_prog_rejected = yes; then
1936 # We found a bogon in the path, so make sure we never use it.
1937 set dummy $ac_cv_prog_CC
1938 shift
a6089b1e 1939 if test $# != 0; then
f0a93313 1940 # We chose a different compiler from the bogus one.
1941 # However, it has the same basename, so the bogon will be chosen
1942 # first if we set CC to just the basename; use the full file name.
1943 shift
a6089b1e 1944 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
f0a93313 1945 fi
1946fi
1947fi
1948fi
a6089b1e 1949CC=$ac_cv_prog_CC
f0a93313 1950if test -n "$CC"; then
a6089b1e 1951 echo "$as_me:$LINENO: result: $CC" >&5
1952echo "${ECHO_T}$CC" >&6
f0a93313 1953else
a6089b1e 1954 echo "$as_me:$LINENO: result: no" >&5
1955echo "${ECHO_T}no" >&6
f0a93313 1956fi
1957
f0a93313 1958fi
a6089b1e 1959if test -z "$CC"; then
1960 if test -n "$ac_tool_prefix"; then
1961 for ac_prog in cl
1962 do
1963 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1964set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1965echo "$as_me:$LINENO: checking for $ac_word" >&5
1966echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1967if test "${ac_cv_prog_CC+set}" = set; then
1968 echo $ECHO_N "(cached) $ECHO_C" >&6
f0a93313 1969else
a6089b1e 1970 if test -n "$CC"; then
1971 ac_cv_prog_CC="$CC" # Let the user override the test.
f0a93313 1972else
a6089b1e 1973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1974for as_dir in $PATH
1975do
1976 IFS=$as_save_IFS
1977 test -z "$as_dir" && as_dir=.
1978 for ac_exec_ext in '' $ac_executable_extensions; do
1979 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1980 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1981 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1982 break 2
1983 fi
1984done
1985done
1986
f0a93313 1987fi
1988fi
a6089b1e 1989CC=$ac_cv_prog_CC
1990if test -n "$CC"; then
1991 echo "$as_me:$LINENO: result: $CC" >&5
1992echo "${ECHO_T}$CC" >&6
f0a93313 1993else
a6089b1e 1994 echo "$as_me:$LINENO: result: no" >&5
1995echo "${ECHO_T}no" >&6
f0a93313 1996fi
f0a93313 1997
a6089b1e 1998 test -n "$CC" && break
1999 done
f0a93313 2000fi
a6089b1e 2001if test -z "$CC"; then
2002 ac_ct_CC=$CC
2003 for ac_prog in cl
2004do
2005 # Extract the first word of "$ac_prog", so it can be a program name with args.
2006set dummy $ac_prog; ac_word=$2
2007echo "$as_me:$LINENO: checking for $ac_word" >&5
2008echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2009if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2010 echo $ECHO_N "(cached) $ECHO_C" >&6
2011else
2012 if test -n "$ac_ct_CC"; then
2013 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2014else
2015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2016for as_dir in $PATH
2017do
2018 IFS=$as_save_IFS
2019 test -z "$as_dir" && as_dir=.
2020 for ac_exec_ext in '' $ac_executable_extensions; do
2021 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2022 ac_cv_prog_ac_ct_CC="$ac_prog"
2023 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2024 break 2
f0a93313 2025 fi
a6089b1e 2026done
2027done
2028
2029fi
2030fi
2031ac_ct_CC=$ac_cv_prog_ac_ct_CC
2032if test -n "$ac_ct_CC"; then
2033 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2034echo "${ECHO_T}$ac_ct_CC" >&6
f0a93313 2035else
a6089b1e 2036 echo "$as_me:$LINENO: result: no" >&5
2037echo "${ECHO_T}no" >&6
f0a93313 2038fi
2039
a6089b1e 2040 test -n "$ac_ct_CC" && break
2041done
f0a93313 2042
a6089b1e 2043 CC=$ac_ct_CC
2044fi
2045
2046fi
2047
2048
2049test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2050See \`config.log' for more details." >&5
2051echo "$as_me: error: no acceptable C compiler found in \$PATH
2052See \`config.log' for more details." >&2;}
2053 { (exit 1); exit 1; }; }
2054
2055# Provide some information about the compiler.
2056echo "$as_me:$LINENO:" \
2057 "checking for C compiler version" >&5
2058ac_compiler=`set X $ac_compile; echo $2`
2059{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2060 (eval $ac_compiler --version </dev/null >&5) 2>&5
2061 ac_status=$?
2062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2063 (exit $ac_status); }
2064{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2065 (eval $ac_compiler -v </dev/null >&5) 2>&5
2066 ac_status=$?
2067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2068 (exit $ac_status); }
2069{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2070 (eval $ac_compiler -V </dev/null >&5) 2>&5
2071 ac_status=$?
2072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2073 (exit $ac_status); }
2074
2075cat >conftest.$ac_ext <<_ACEOF
a6089b1e 2076/* confdefs.h. */
2077_ACEOF
2078cat confdefs.h >>conftest.$ac_ext
2079cat >>conftest.$ac_ext <<_ACEOF
2080/* end confdefs.h. */
ec255163 2081
a6089b1e 2082int
2083main ()
2084{
2085
2086 ;
2087 return 0;
2088}
2089_ACEOF
2090# FIXME: Cleanup?
2091if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2092 (eval $ac_link) 2>&5
2093 ac_status=$?
2094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2095 (exit $ac_status); }; then
2096 gcc_no_link=no
2097else
2098 gcc_no_link=yes
2099fi
2100
2101if test x$gcc_no_link = xyes; then
2102 # Setting cross_compile will disable run tests; it will
2103 # also disable AC_CHECK_FILE but that's generally
2104 # correct if we can't link.
2105 cross_compiling=yes
2106 EXEEXT=
2107else
2108 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 2109/* confdefs.h. */
2110_ACEOF
2111cat confdefs.h >>conftest.$ac_ext
2112cat >>conftest.$ac_ext <<_ACEOF
2113/* end confdefs.h. */
2114
2115int
2116main ()
2117{
2118
2119 ;
2120 return 0;
2121}
2122_ACEOF
2123ac_clean_files_save=$ac_clean_files
2124ac_clean_files="$ac_clean_files a.out a.exe b.out"
2125# Try to create an executable without -o first, disregard a.out.
2126# It will help us diagnose broken compilers, and finding out an intuition
2127# of exeext.
ac09b42b 2128echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2129echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
a6089b1e 2130ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2131if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2132 (eval $ac_link_default) 2>&5
2133 ac_status=$?
2134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2135 (exit $ac_status); }; then
2136 # Find the output, starting from the most likely. This scheme is
2137# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2138# resort.
2139
2140# Be careful to initialize this variable, since it used to be cached.
2141# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2142ac_cv_exeext=
2143# b.out is created by i960 compilers.
2144for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2145do
2146 test -f "$ac_file" || continue
2147 case $ac_file in
2148 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
ac09b42b 2149 ;;
a6089b1e 2150 conftest.$ac_ext )
ac09b42b 2151 # This is the source file.
2152 ;;
a6089b1e 2153 [ab].out )
ac09b42b 2154 # We found the default executable, but exeext='' is most
2155 # certainly right.
2156 break;;
a6089b1e 2157 *.* )
ac09b42b 2158 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2159 # FIXME: I believe we export ac_cv_exeext for Libtool,
2160 # but it would be cool to find out if it's true. Does anybody
2161 # maintain Libtool? --akim.
2162 export ac_cv_exeext
2163 break;;
a6089b1e 2164 * )
ac09b42b 2165 break;;
a6089b1e 2166 esac
2167done
b2835908 2168else
a6089b1e 2169 echo "$as_me: failed program was:" >&5
2170sed 's/^/| /' conftest.$ac_ext >&5
2171
2172{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2173See \`config.log' for more details." >&5
2174echo "$as_me: error: C compiler cannot create executables
2175See \`config.log' for more details." >&2;}
2176 { (exit 77); exit 77; }; }
2177fi
2178
2179ac_exeext=$ac_cv_exeext
2180echo "$as_me:$LINENO: result: $ac_file" >&5
2181echo "${ECHO_T}$ac_file" >&6
2182
2183# Check the compiler produces executables we can run. If not, either
2184# the compiler is broken, or we cross compile.
2185echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2186echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2187# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2188# If not cross compiling, check that we can run a simple program.
2189if test "$cross_compiling" != yes; then
2190 if { ac_try='./$ac_file'
2191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2192 (eval $ac_try) 2>&5
2193 ac_status=$?
2194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2195 (exit $ac_status); }; }; then
2196 cross_compiling=no
2197 else
2198 if test "$cross_compiling" = maybe; then
2199 cross_compiling=yes
2200 else
2201 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2202If you meant to cross compile, use \`--host'.
2203See \`config.log' for more details." >&5
2204echo "$as_me: error: cannot run C compiled programs.
2205If you meant to cross compile, use \`--host'.
2206See \`config.log' for more details." >&2;}
2207 { (exit 1); exit 1; }; }
b2835908 2208 fi
2209 fi
a6089b1e 2210fi
2211echo "$as_me:$LINENO: result: yes" >&5
2212echo "${ECHO_T}yes" >&6
2213
2214rm -f a.out a.exe conftest$ac_cv_exeext b.out
2215ac_clean_files=$ac_clean_files_save
2216# Check the compiler produces executables we can run. If not, either
2217# the compiler is broken, or we cross compile.
2218echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2219echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2220echo "$as_me:$LINENO: result: $cross_compiling" >&5
2221echo "${ECHO_T}$cross_compiling" >&6
2222
2223echo "$as_me:$LINENO: checking for suffix of executables" >&5
2224echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2225if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2226 (eval $ac_link) 2>&5
2227 ac_status=$?
2228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2229 (exit $ac_status); }; then
2230 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2231# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2232# work properly (i.e., refer to `conftest.exe'), while it won't with
2233# `rm'.
2234for ac_file in conftest.exe conftest conftest.*; do
2235 test -f "$ac_file" || continue
2236 case $ac_file in
2237 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2238 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
ac09b42b 2239 export ac_cv_exeext
2240 break;;
a6089b1e 2241 * ) break;;
2242 esac
2243done
b2835908 2244else
a6089b1e 2245 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2246See \`config.log' for more details." >&5
2247echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2248See \`config.log' for more details." >&2;}
2249 { (exit 1); exit 1; }; }
b2835908 2250fi
b2835908 2251
a6089b1e 2252rm -f conftest$ac_cv_exeext
2253echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2254echo "${ECHO_T}$ac_cv_exeext" >&6
2255
2256rm -f conftest.$ac_ext
2257EXEEXT=$ac_cv_exeext
2258ac_exeext=$EXEEXT
b2835908 2259fi
a6089b1e 2260echo "$as_me:$LINENO: checking for suffix of object files" >&5
2261echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2262if test "${ac_cv_objext+set}" = set; then
2263 echo $ECHO_N "(cached) $ECHO_C" >&6
b2835908 2264else
a6089b1e 2265 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 2266/* confdefs.h. */
2267_ACEOF
2268cat confdefs.h >>conftest.$ac_ext
2269cat >>conftest.$ac_ext <<_ACEOF
2270/* end confdefs.h. */
b2835908 2271
a6089b1e 2272int
2273main ()
2274{
b2835908 2275
a6089b1e 2276 ;
2277 return 0;
2278}
2279_ACEOF
2280rm -f conftest.o conftest.obj
2281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2282 (eval $ac_compile) 2>&5
2283 ac_status=$?
2284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2285 (exit $ac_status); }; then
2286 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2287 case $ac_file in
2288 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2289 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2290 break;;
2291 esac
2292done
b2835908 2293else
a6089b1e 2294 echo "$as_me: failed program was:" >&5
2295sed 's/^/| /' conftest.$ac_ext >&5
2296
2297{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2298See \`config.log' for more details." >&5
2299echo "$as_me: error: cannot compute suffix of object files: cannot compile
2300See \`config.log' for more details." >&2;}
2301 { (exit 1); exit 1; }; }
2302fi
2303
2304rm -f conftest.$ac_cv_objext conftest.$ac_ext
b2835908 2305fi
a6089b1e 2306echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2307echo "${ECHO_T}$ac_cv_objext" >&6
2308OBJEXT=$ac_cv_objext
2309ac_objext=$OBJEXT
2310echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2311echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2312if test "${ac_cv_c_compiler_gnu+set}" = set; then
2313 echo $ECHO_N "(cached) $ECHO_C" >&6
2314else
2315 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 2316/* confdefs.h. */
2317_ACEOF
2318cat confdefs.h >>conftest.$ac_ext
2319cat >>conftest.$ac_ext <<_ACEOF
2320/* end confdefs.h. */
2321
2322int
2323main ()
2324{
2325#ifndef __GNUC__
2326 choke me
2327#endif
b2835908 2328
a6089b1e 2329 ;
2330 return 0;
2331}
2332_ACEOF
2333rm -f conftest.$ac_objext
2334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac09b42b 2335 (eval $ac_compile) 2>conftest.er1
a6089b1e 2336 ac_status=$?
ac09b42b 2337 grep -v '^ *+' conftest.er1 >conftest.err
2338 rm -f conftest.er1
2339 cat conftest.err >&5
a6089b1e 2340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2341 (exit $ac_status); } &&
0bc5435c 2342 { ac_try='test -z "$ac_c_werror_flag"
2343 || test ! -s conftest.err'
ac09b42b 2344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2345 (eval $ac_try) 2>&5
2346 ac_status=$?
2347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2348 (exit $ac_status); }; } &&
2349 { ac_try='test -s conftest.$ac_objext'
a6089b1e 2350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2351 (eval $ac_try) 2>&5
2352 ac_status=$?
2353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2354 (exit $ac_status); }; }; then
2355 ac_compiler_gnu=yes
2356else
2357 echo "$as_me: failed program was:" >&5
2358sed 's/^/| /' conftest.$ac_ext >&5
2359
2360ac_compiler_gnu=no
2361fi
ac09b42b 2362rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a6089b1e 2363ac_cv_c_compiler_gnu=$ac_compiler_gnu
2364
2365fi
2366echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2367echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2368GCC=`test $ac_compiler_gnu = yes && echo yes`
2369ac_test_CFLAGS=${CFLAGS+set}
2370ac_save_CFLAGS=$CFLAGS
2371CFLAGS="-g"
2372echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2373echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2374if test "${ac_cv_prog_cc_g+set}" = set; then
2375 echo $ECHO_N "(cached) $ECHO_C" >&6
2376else
2377 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 2378/* confdefs.h. */
2379_ACEOF
2380cat confdefs.h >>conftest.$ac_ext
2381cat >>conftest.$ac_ext <<_ACEOF
2382/* end confdefs.h. */
b2835908 2383
a6089b1e 2384int
2385main ()
2386{
b2835908 2387
a6089b1e 2388 ;
2389 return 0;
2390}
2391_ACEOF
2392rm -f conftest.$ac_objext
2393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac09b42b 2394 (eval $ac_compile) 2>conftest.er1
a6089b1e 2395 ac_status=$?
ac09b42b 2396 grep -v '^ *+' conftest.er1 >conftest.err
2397 rm -f conftest.er1
2398 cat conftest.err >&5
a6089b1e 2399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2400 (exit $ac_status); } &&
0bc5435c 2401 { ac_try='test -z "$ac_c_werror_flag"
2402 || test ! -s conftest.err'
ac09b42b 2403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2404 (eval $ac_try) 2>&5
2405 ac_status=$?
2406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2407 (exit $ac_status); }; } &&
2408 { ac_try='test -s conftest.$ac_objext'
a6089b1e 2409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2410 (eval $ac_try) 2>&5
2411 ac_status=$?
2412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2413 (exit $ac_status); }; }; then
2414 ac_cv_prog_cc_g=yes
2415else
2416 echo "$as_me: failed program was:" >&5
2417sed 's/^/| /' conftest.$ac_ext >&5
f0a93313 2418
a6089b1e 2419ac_cv_prog_cc_g=no
2420fi
ac09b42b 2421rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a6089b1e 2422fi
2423echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2424echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2425if test "$ac_test_CFLAGS" = set; then
2426 CFLAGS=$ac_save_CFLAGS
2427elif test $ac_cv_prog_cc_g = yes; then
f0a93313 2428 if test "$GCC" = yes; then
a6089b1e 2429 CFLAGS="-g -O2"
f0a93313 2430 else
a6089b1e 2431 CFLAGS="-g"
f0a93313 2432 fi
2433else
a6089b1e 2434 if test "$GCC" = yes; then
2435 CFLAGS="-O2"
2436 else
2437 CFLAGS=
2438 fi
f0a93313 2439fi
a6089b1e 2440echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2441echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2442if test "${ac_cv_prog_cc_stdc+set}" = set; then
2443 echo $ECHO_N "(cached) $ECHO_C" >&6
2444else
2445 ac_cv_prog_cc_stdc=no
2446ac_save_CC=$CC
2447cat >conftest.$ac_ext <<_ACEOF
a6089b1e 2448/* confdefs.h. */
2449_ACEOF
2450cat confdefs.h >>conftest.$ac_ext
2451cat >>conftest.$ac_ext <<_ACEOF
2452/* end confdefs.h. */
2453#include <stdarg.h>
2454#include <stdio.h>
2455#include <sys/types.h>
2456#include <sys/stat.h>
2457/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2458struct buf { int x; };
2459FILE * (*rcsopen) (struct buf *, struct stat *, int);
2460static char *e (p, i)
2461 char **p;
2462 int i;
2463{
2464 return p[i];
ec255163 2465}
a6089b1e 2466static char *f (char * (*g) (char **, int), char **p, ...)
2467{
2468 char *s;
2469 va_list v;
2470 va_start (v,p);
2471 s = g (p, va_arg (v,int));
2472 va_end (v);
2473 return s;
ec255163 2474}
ac09b42b 2475
2476/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2477 function prototypes and stuff, but not '\xHH' hex character constants.
2478 These don't provoke an error unfortunately, instead are silently treated
2479 as 'x'. The following induces an error, until -std1 is added to get
2480 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2481 array size at least. It's necessary to write '\x00'==0 to get something
2482 that's true only with -std1. */
2483int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2484
a6089b1e 2485int test (int i, double x);
2486struct s1 {int (*f) (int a);};
2487struct s2 {int (*f) (double a);};
2488int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2489int argc;
2490char **argv;
2491int
2492main ()
2493{
2494return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2495 ;
2496 return 0;
ec255163 2497}
a6089b1e 2498_ACEOF
2499# Don't try gcc -ansi; that turns off useful extensions and
2500# breaks some systems' header files.
2501# AIX -qlanglvl=ansi
2502# Ultrix and OSF/1 -std1
2503# HP-UX 10.20 and later -Ae
2504# HP-UX older versions -Aa -D_HPUX_SOURCE
2505# SVR4 -Xc -D__EXTENSIONS__
2506for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2507do
2508 CC="$ac_save_CC $ac_arg"
2509 rm -f conftest.$ac_objext
2510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac09b42b 2511 (eval $ac_compile) 2>conftest.er1
a6089b1e 2512 ac_status=$?
ac09b42b 2513 grep -v '^ *+' conftest.er1 >conftest.err
2514 rm -f conftest.er1
2515 cat conftest.err >&5
a6089b1e 2516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2517 (exit $ac_status); } &&
0bc5435c 2518 { ac_try='test -z "$ac_c_werror_flag"
2519 || test ! -s conftest.err'
ac09b42b 2520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2521 (eval $ac_try) 2>&5
2522 ac_status=$?
2523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2524 (exit $ac_status); }; } &&
2525 { ac_try='test -s conftest.$ac_objext'
a6089b1e 2526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2527 (eval $ac_try) 2>&5
2528 ac_status=$?
2529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2530 (exit $ac_status); }; }; then
2531 ac_cv_prog_cc_stdc=$ac_arg
2532break
2533else
2534 echo "$as_me: failed program was:" >&5
2535sed 's/^/| /' conftest.$ac_ext >&5
2536
2537fi
ac09b42b 2538rm -f conftest.err conftest.$ac_objext
a6089b1e 2539done
2540rm -f conftest.$ac_ext conftest.$ac_objext
2541CC=$ac_save_CC
2542
2543fi
2544
2545case "x$ac_cv_prog_cc_stdc" in
2546 x|xno)
2547 echo "$as_me:$LINENO: result: none needed" >&5
2548echo "${ECHO_T}none needed" >&6 ;;
2549 *)
2550 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2551echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2552 CC="$CC $ac_cv_prog_cc_stdc" ;;
2553esac
2554
2555# Some people use a C++ compiler to compile C. Since we use `exit',
2556# in C++ we need to declare it. In case someone uses the same compiler
2557# for both compiling C and C++ we need to have the C++ compiler decide
2558# the declaration of exit, since it's the most demanding environment.
2559cat >conftest.$ac_ext <<_ACEOF
2560#ifndef __cplusplus
2561 choke me
2562#endif
2563_ACEOF
2564rm -f conftest.$ac_objext
2565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac09b42b 2566 (eval $ac_compile) 2>conftest.er1
a6089b1e 2567 ac_status=$?
ac09b42b 2568 grep -v '^ *+' conftest.er1 >conftest.err
2569 rm -f conftest.er1
2570 cat conftest.err >&5
a6089b1e 2571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2572 (exit $ac_status); } &&
0bc5435c 2573 { ac_try='test -z "$ac_c_werror_flag"
2574 || test ! -s conftest.err'
ac09b42b 2575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2576 (eval $ac_try) 2>&5
2577 ac_status=$?
2578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2579 (exit $ac_status); }; } &&
2580 { ac_try='test -s conftest.$ac_objext'
a6089b1e 2581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2582 (eval $ac_try) 2>&5
2583 ac_status=$?
2584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2585 (exit $ac_status); }; }; then
2586 for ac_declaration in \
ac09b42b 2587 '' \
a6089b1e 2588 'extern "C" void std::exit (int) throw (); using std::exit;' \
2589 'extern "C" void std::exit (int); using std::exit;' \
2590 'extern "C" void exit (int) throw ();' \
2591 'extern "C" void exit (int);' \
2592 'void exit (int);'
2593do
2594 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 2595/* confdefs.h. */
2596_ACEOF
2597cat confdefs.h >>conftest.$ac_ext
2598cat >>conftest.$ac_ext <<_ACEOF
2599/* end confdefs.h. */
40a84a93 2600$ac_declaration
ac09b42b 2601#include <stdlib.h>
a6089b1e 2602int
2603main ()
2604{
2605exit (42);
2606 ;
2607 return 0;
ec255163 2608}
a6089b1e 2609_ACEOF
2610rm -f conftest.$ac_objext
2611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac09b42b 2612 (eval $ac_compile) 2>conftest.er1
a6089b1e 2613 ac_status=$?
ac09b42b 2614 grep -v '^ *+' conftest.er1 >conftest.err
2615 rm -f conftest.er1
2616 cat conftest.err >&5
a6089b1e 2617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2618 (exit $ac_status); } &&
0bc5435c 2619 { ac_try='test -z "$ac_c_werror_flag"
2620 || test ! -s conftest.err'
ac09b42b 2621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2622 (eval $ac_try) 2>&5
2623 ac_status=$?
2624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2625 (exit $ac_status); }; } &&
2626 { ac_try='test -s conftest.$ac_objext'
a6089b1e 2627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2628 (eval $ac_try) 2>&5
2629 ac_status=$?
2630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2631 (exit $ac_status); }; }; then
2632 :
2633else
2634 echo "$as_me: failed program was:" >&5
2635sed 's/^/| /' conftest.$ac_ext >&5
2636
2637continue
2638fi
ac09b42b 2639rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a6089b1e 2640 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 2641/* confdefs.h. */
2642_ACEOF
2643cat confdefs.h >>conftest.$ac_ext
2644cat >>conftest.$ac_ext <<_ACEOF
2645/* end confdefs.h. */
2646$ac_declaration
2647int
2648main ()
2649{
2650exit (42);
2651 ;
2652 return 0;
ec255163 2653}
a6089b1e 2654_ACEOF
2655rm -f conftest.$ac_objext
2656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac09b42b 2657 (eval $ac_compile) 2>conftest.er1
a6089b1e 2658 ac_status=$?
ac09b42b 2659 grep -v '^ *+' conftest.er1 >conftest.err
2660 rm -f conftest.er1
2661 cat conftest.err >&5
a6089b1e 2662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2663 (exit $ac_status); } &&
0bc5435c 2664 { ac_try='test -z "$ac_c_werror_flag"
2665 || test ! -s conftest.err'
ac09b42b 2666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2667 (eval $ac_try) 2>&5
2668 ac_status=$?
2669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2670 (exit $ac_status); }; } &&
2671 { ac_try='test -s conftest.$ac_objext'
a6089b1e 2672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2673 (eval $ac_try) 2>&5
2674 ac_status=$?
2675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2676 (exit $ac_status); }; }; then
2677 break
2678else
2679 echo "$as_me: failed program was:" >&5
2680sed 's/^/| /' conftest.$ac_ext >&5
ec255163 2681
a6089b1e 2682fi
ac09b42b 2683rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a6089b1e 2684done
2685rm -f conftest*
2686if test -n "$ac_declaration"; then
2687 echo '#ifdef __cplusplus' >>confdefs.h
2688 echo $ac_declaration >>confdefs.h
2689 echo '#endif' >>confdefs.h
2690fi
2691
2692else
2693 echo "$as_me: failed program was:" >&5
2694sed 's/^/| /' conftest.$ac_ext >&5
2695
2696fi
ac09b42b 2697rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a6089b1e 2698ac_ext=c
2699ac_cpp='$CPP $CPPFLAGS'
2700ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2701ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2702ac_compiler_gnu=$ac_cv_c_compiler_gnu
2703
90305aaf 2704ac_ext=c
2705ac_cpp='$CPP $CPPFLAGS'
2706ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2707ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2708ac_compiler_gnu=$ac_cv_c_compiler_gnu
2709echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2710echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2711# On Suns, sometimes $CPP names a directory.
2712if test -n "$CPP" && test -d "$CPP"; then
2713 CPP=
2714fi
2715if test -z "$CPP"; then
2716 if test "${ac_cv_prog_CPP+set}" = set; then
2717 echo $ECHO_N "(cached) $ECHO_C" >&6
2718else
2719 # Double quotes because CPP needs to be expanded
2720 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2721 do
2722 ac_preproc_ok=false
2723for ac_c_preproc_warn_flag in '' yes
2724do
2725 # Use a header file that comes with gcc, so configuring glibc
2726 # with a fresh cross-compiler works.
2727 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2728 # <limits.h> exists even on freestanding compilers.
2729 # On the NeXT, cc -E runs the code through the compiler's parser,
2730 # not just through cpp. "Syntax error" is here to catch this case.
2731 cat >conftest.$ac_ext <<_ACEOF
90305aaf 2732/* confdefs.h. */
2733_ACEOF
2734cat confdefs.h >>conftest.$ac_ext
2735cat >>conftest.$ac_ext <<_ACEOF
2736/* end confdefs.h. */
2737#ifdef __STDC__
2738# include <limits.h>
2739#else
2740# include <assert.h>
2741#endif
ac09b42b 2742 Syntax error
90305aaf 2743_ACEOF
2744if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2745 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2746 ac_status=$?
2747 grep -v '^ *+' conftest.er1 >conftest.err
2748 rm -f conftest.er1
2749 cat conftest.err >&5
2750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2751 (exit $ac_status); } >/dev/null; then
2752 if test -s conftest.err; then
2753 ac_cpp_err=$ac_c_preproc_warn_flag
ac09b42b 2754 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
90305aaf 2755 else
2756 ac_cpp_err=
2757 fi
2758else
2759 ac_cpp_err=yes
2760fi
2761if test -z "$ac_cpp_err"; then
2762 :
2763else
2764 echo "$as_me: failed program was:" >&5
2765sed 's/^/| /' conftest.$ac_ext >&5
2766
2767 # Broken: fails on valid input.
2768continue
2769fi
2770rm -f conftest.err conftest.$ac_ext
2771
2772 # OK, works on sane cases. Now check whether non-existent headers
2773 # can be detected and how.
2774 cat >conftest.$ac_ext <<_ACEOF
90305aaf 2775/* confdefs.h. */
2776_ACEOF
2777cat confdefs.h >>conftest.$ac_ext
2778cat >>conftest.$ac_ext <<_ACEOF
2779/* end confdefs.h. */
2780#include <ac_nonexistent.h>
2781_ACEOF
2782if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2783 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2784 ac_status=$?
2785 grep -v '^ *+' conftest.er1 >conftest.err
2786 rm -f conftest.er1
2787 cat conftest.err >&5
2788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2789 (exit $ac_status); } >/dev/null; then
2790 if test -s conftest.err; then
2791 ac_cpp_err=$ac_c_preproc_warn_flag
ac09b42b 2792 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
90305aaf 2793 else
2794 ac_cpp_err=
2795 fi
2796else
2797 ac_cpp_err=yes
2798fi
2799if test -z "$ac_cpp_err"; then
2800 # Broken: success on invalid input.
2801continue
2802else
2803 echo "$as_me: failed program was:" >&5
2804sed 's/^/| /' conftest.$ac_ext >&5
2805
2806 # Passes both tests.
2807ac_preproc_ok=:
2808break
2809fi
2810rm -f conftest.err conftest.$ac_ext
2811
2812done
2813# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2814rm -f conftest.err conftest.$ac_ext
2815if $ac_preproc_ok; then
2816 break
2817fi
2818
2819 done
2820 ac_cv_prog_CPP=$CPP
2821
2822fi
2823 CPP=$ac_cv_prog_CPP
2824else
2825 ac_cv_prog_CPP=$CPP
2826fi
2827echo "$as_me:$LINENO: result: $CPP" >&5
2828echo "${ECHO_T}$CPP" >&6
2829ac_preproc_ok=false
2830for ac_c_preproc_warn_flag in '' yes
2831do
2832 # Use a header file that comes with gcc, so configuring glibc
2833 # with a fresh cross-compiler works.
2834 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2835 # <limits.h> exists even on freestanding compilers.
2836 # On the NeXT, cc -E runs the code through the compiler's parser,
2837 # not just through cpp. "Syntax error" is here to catch this case.
2838 cat >conftest.$ac_ext <<_ACEOF
90305aaf 2839/* confdefs.h. */
2840_ACEOF
2841cat confdefs.h >>conftest.$ac_ext
2842cat >>conftest.$ac_ext <<_ACEOF
2843/* end confdefs.h. */
2844#ifdef __STDC__
2845# include <limits.h>
2846#else
2847# include <assert.h>
2848#endif
ac09b42b 2849 Syntax error
90305aaf 2850_ACEOF
2851if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2852 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2853 ac_status=$?
2854 grep -v '^ *+' conftest.er1 >conftest.err
2855 rm -f conftest.er1
2856 cat conftest.err >&5
2857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2858 (exit $ac_status); } >/dev/null; then
2859 if test -s conftest.err; then
2860 ac_cpp_err=$ac_c_preproc_warn_flag
ac09b42b 2861 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
90305aaf 2862 else
2863 ac_cpp_err=
2864 fi
2865else
2866 ac_cpp_err=yes
2867fi
2868if test -z "$ac_cpp_err"; then
2869 :
2870else
2871 echo "$as_me: failed program was:" >&5
2872sed 's/^/| /' conftest.$ac_ext >&5
2873
2874 # Broken: fails on valid input.
2875continue
2876fi
2877rm -f conftest.err conftest.$ac_ext
2878
2879 # OK, works on sane cases. Now check whether non-existent headers
2880 # can be detected and how.
2881 cat >conftest.$ac_ext <<_ACEOF
90305aaf 2882/* confdefs.h. */
2883_ACEOF
2884cat confdefs.h >>conftest.$ac_ext
2885cat >>conftest.$ac_ext <<_ACEOF
2886/* end confdefs.h. */
2887#include <ac_nonexistent.h>
2888_ACEOF
2889if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2890 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2891 ac_status=$?
2892 grep -v '^ *+' conftest.er1 >conftest.err
2893 rm -f conftest.er1
2894 cat conftest.err >&5
2895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2896 (exit $ac_status); } >/dev/null; then
2897 if test -s conftest.err; then
2898 ac_cpp_err=$ac_c_preproc_warn_flag
ac09b42b 2899 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
90305aaf 2900 else
2901 ac_cpp_err=
2902 fi
2903else
2904 ac_cpp_err=yes
2905fi
2906if test -z "$ac_cpp_err"; then
2907 # Broken: success on invalid input.
2908continue
2909else
2910 echo "$as_me: failed program was:" >&5
2911sed 's/^/| /' conftest.$ac_ext >&5
2912
2913 # Passes both tests.
2914ac_preproc_ok=:
2915break
2916fi
2917rm -f conftest.err conftest.$ac_ext
2918
2919done
2920# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2921rm -f conftest.err conftest.$ac_ext
2922if $ac_preproc_ok; then
2923 :
2924else
2925 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2926See \`config.log' for more details." >&5
2927echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2928See \`config.log' for more details." >&2;}
2929 { (exit 1); exit 1; }; }
2930fi
2931
2932ac_ext=c
2933ac_cpp='$CPP $CPPFLAGS'
2934ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2935ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2936ac_compiler_gnu=$ac_cv_c_compiler_gnu
2937
2938
2939ac_c_preproc_warn_flag=yes
a6089b1e 2940
fdf7ca85 2941if test x$GCC = xyes; then
2942 ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
0bc5435c 2943fi
fdf7ca85 2944
2945
2946
2947echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
2948echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2949if test "${ac_cv_c_const+set}" = set; then
0bc5435c 2950 echo $ECHO_N "(cached) $ECHO_C" >&6
2951else
fdf7ca85 2952 cat >conftest.$ac_ext <<_ACEOF
2953/* confdefs.h. */
2954_ACEOF
2955cat confdefs.h >>conftest.$ac_ext
2956cat >>conftest.$ac_ext <<_ACEOF
2957/* end confdefs.h. */
2958
2959int
2960main ()
2961{
2962/* FIXME: Include the comments suggested by Paul. */
2963#ifndef __cplusplus
2964 /* Ultrix mips cc rejects this. */
2965 typedef int charset[2];
2966 const charset x;
2967 /* SunOS 4.1.1 cc rejects this. */
2968 char const *const *ccp;
2969 char **p;
2970 /* NEC SVR4.0.2 mips cc rejects this. */
2971 struct point {int x, y;};
2972 static struct point const zero = {0,0};
2973 /* AIX XL C 1.02.0.0 rejects this.
2974 It does not let you subtract one const X* pointer from another in
2975 an arm of an if-expression whose if-part is not a constant
2976 expression */
2977 const char *g = "string";
2978 ccp = &g + (g ? g-g : 0);
2979 /* HPUX 7.0 cc rejects these. */
2980 ++ccp;
2981 p = (char**) ccp;
2982 ccp = (char const *const *) p;
2983 { /* SCO 3.2v4 cc rejects this. */
2984 char *t;
2985 char const *s = 0 ? (char *) 0 : (char const *) 0;
2986
2987 *t++ = 0;
2988 }
2989 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2990 int x[] = {25, 17};
2991 const int *foo = &x[0];
2992 ++foo;
2993 }
2994 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2995 typedef const int *iptr;
2996 iptr p = 0;
2997 ++p;
2998 }
2999 { /* AIX XL C 1.02.0.0 rejects this saying
3000 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3001 struct s { int j; const int *ap[3]; };
3002 struct s *b; b->j = 5;
3003 }
3004 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3005 const int foo = 10;
3006 }
3007#endif
3008
3009 ;
3010 return 0;
3011}
3012_ACEOF
3013rm -f conftest.$ac_objext
3014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3015 (eval $ac_compile) 2>conftest.er1
3016 ac_status=$?
3017 grep -v '^ *+' conftest.er1 >conftest.err
3018 rm -f conftest.er1
3019 cat conftest.err >&5
3020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3021 (exit $ac_status); } &&
3022 { ac_try='test -z "$ac_c_werror_flag"
3023 || test ! -s conftest.err'
3024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3025 (eval $ac_try) 2>&5
3026 ac_status=$?
3027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3028 (exit $ac_status); }; } &&
3029 { ac_try='test -s conftest.$ac_objext'
3030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3031 (eval $ac_try) 2>&5
3032 ac_status=$?
3033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3034 (exit $ac_status); }; }; then
3035 ac_cv_c_const=yes
0bc5435c 3036else
fdf7ca85 3037 echo "$as_me: failed program was:" >&5
3038sed 's/^/| /' conftest.$ac_ext >&5
3039
3040ac_cv_c_const=no
0bc5435c 3041fi
fdf7ca85 3042rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
0bc5435c 3043fi
fdf7ca85 3044echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3045echo "${ECHO_T}$ac_cv_c_const" >&6
3046if test $ac_cv_c_const = no; then
3047
3048cat >>confdefs.h <<\_ACEOF
3049#define const
3050_ACEOF
0bc5435c 3051
0bc5435c 3052fi
fdf7ca85 3053
3054echo "$as_me:$LINENO: checking for inline" >&5
3055echo $ECHO_N "checking for inline... $ECHO_C" >&6
3056if test "${ac_cv_c_inline+set}" = set; then
0bc5435c 3057 echo $ECHO_N "(cached) $ECHO_C" >&6
3058else
fdf7ca85 3059 ac_cv_c_inline=no
3060for ac_kw in inline __inline__ __inline; do
3061 cat >conftest.$ac_ext <<_ACEOF
3062/* confdefs.h. */
3063_ACEOF
3064cat confdefs.h >>conftest.$ac_ext
3065cat >>conftest.$ac_ext <<_ACEOF
3066/* end confdefs.h. */
3067#ifndef __cplusplus
3068typedef int foo_t;
3069static $ac_kw foo_t static_foo () {return 0; }
3070$ac_kw foo_t foo () {return 0; }
3071#endif
a6089b1e 3072
fdf7ca85 3073_ACEOF
3074rm -f conftest.$ac_objext
3075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3076 (eval $ac_compile) 2>conftest.er1
3077 ac_status=$?
3078 grep -v '^ *+' conftest.er1 >conftest.err
3079 rm -f conftest.er1
3080 cat conftest.err >&5
3081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3082 (exit $ac_status); } &&
3083 { ac_try='test -z "$ac_c_werror_flag"
3084 || test ! -s conftest.err'
3085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3086 (eval $ac_try) 2>&5
3087 ac_status=$?
3088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3089 (exit $ac_status); }; } &&
3090 { ac_try='test -s conftest.$ac_objext'
3091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3092 (eval $ac_try) 2>&5
3093 ac_status=$?
3094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3095 (exit $ac_status); }; }; then
3096 ac_cv_c_inline=$ac_kw; break
a6089b1e 3097else
fdf7ca85 3098 echo "$as_me: failed program was:" >&5
3099sed 's/^/| /' conftest.$ac_ext >&5
0bc5435c 3100
0bc5435c 3101fi
fdf7ca85 3102rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3103done
3104
0bc5435c 3105fi
fdf7ca85 3106echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3107echo "${ECHO_T}$ac_cv_c_inline" >&6
0bc5435c 3108
0bc5435c 3109
fdf7ca85 3110case $ac_cv_c_inline in
3111 inline | yes) ;;
3112 *)
3113 case $ac_cv_c_inline in
3114 no) ac_val=;;
3115 *) ac_val=$ac_cv_c_inline;;
3116 esac
3117 cat >>confdefs.h <<_ACEOF
3118#ifndef __cplusplus
3119#define inline $ac_val
3120#endif
3121_ACEOF
3122 ;;
3123esac
0bc5435c 3124
fdf7ca85 3125echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
3126echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
3127if test "${ac_cv_c_bigendian+set}" = set; then
0bc5435c 3128 echo $ECHO_N "(cached) $ECHO_C" >&6
3129else
fdf7ca85 3130 ac_cv_c_bigendian=unknown
3131# See if sys/param.h defines the BYTE_ORDER macro.
3132cat >conftest.$ac_ext <<_ACEOF
3133/* confdefs.h. */
3134_ACEOF
3135cat confdefs.h >>conftest.$ac_ext
3136cat >>conftest.$ac_ext <<_ACEOF
3137/* end confdefs.h. */
3138#include <sys/types.h>
3139#include <sys/param.h>
3140int
3141main ()
3142{
0bc5435c 3143
fdf7ca85 3144#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3145 bogus endian macros
3146#endif
3147 ;
3148 return 0;
3149}
3150_ACEOF
3151rm -f conftest.$ac_objext
3152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3153 (eval $ac_compile) 2>conftest.er1
3154 ac_status=$?
3155 grep -v '^ *+' conftest.er1 >conftest.err
3156 rm -f conftest.er1
3157 cat conftest.err >&5
3158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3159 (exit $ac_status); } &&
3160 { ac_try='test -z "$ac_c_werror_flag"
3161 || test ! -s conftest.err'
3162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3163 (eval $ac_try) 2>&5
3164 ac_status=$?
3165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3166 (exit $ac_status); }; } &&
3167 { ac_try='test -s conftest.$ac_objext'
3168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3169 (eval $ac_try) 2>&5
3170 ac_status=$?
3171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3172 (exit $ac_status); }; }; then
3173 # It does; now see whether it defined to BIG_ENDIAN or not.
3174cat >conftest.$ac_ext <<_ACEOF
3175/* confdefs.h. */
3176_ACEOF
3177cat confdefs.h >>conftest.$ac_ext
3178cat >>conftest.$ac_ext <<_ACEOF
3179/* end confdefs.h. */
3180#include <sys/types.h>
3181#include <sys/param.h>
3182int
3183main ()
3184{
0bc5435c 3185
fdf7ca85 3186#if BYTE_ORDER != BIG_ENDIAN
3187 not big endian
3188#endif
3189 ;
3190 return 0;
3191}
3192_ACEOF
3193rm -f conftest.$ac_objext
3194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3195 (eval $ac_compile) 2>conftest.er1
3196 ac_status=$?
3197 grep -v '^ *+' conftest.er1 >conftest.err
3198 rm -f conftest.er1
3199 cat conftest.err >&5
3200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3201 (exit $ac_status); } &&
3202 { ac_try='test -z "$ac_c_werror_flag"
3203 || test ! -s conftest.err'
3204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3205 (eval $ac_try) 2>&5
3206 ac_status=$?
3207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3208 (exit $ac_status); }; } &&
3209 { ac_try='test -s conftest.$ac_objext'
3210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3211 (eval $ac_try) 2>&5
3212 ac_status=$?
3213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3214 (exit $ac_status); }; }; then
3215 ac_cv_c_bigendian=yes
3216else
3217 echo "$as_me: failed program was:" >&5
3218sed 's/^/| /' conftest.$ac_ext >&5
0bc5435c 3219
fdf7ca85 3220ac_cv_c_bigendian=no
3221fi
3222rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3223else
3224 echo "$as_me: failed program was:" >&5
3225sed 's/^/| /' conftest.$ac_ext >&5
0bc5435c 3226
fdf7ca85 3227fi
3228rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3229if test $ac_cv_c_bigendian = unknown; then
3230if test "$cross_compiling" = yes; then
3231 echo $ac_n "cross-compiling... " 2>&6
3232else
3233 cat >conftest.$ac_ext <<_ACEOF
3234/* confdefs.h. */
3235_ACEOF
3236cat confdefs.h >>conftest.$ac_ext
3237cat >>conftest.$ac_ext <<_ACEOF
3238/* end confdefs.h. */
3239main () {
3240 /* Are we little or big endian? From Harbison&Steele. */
3241 union
3242 {
3243 long l;
3244 char c[sizeof (long)];
3245 } u;
3246 u.l = 1;
3247 exit (u.c[sizeof (long) - 1] == 1);
3248}
3249_ACEOF
3250rm -f conftest$ac_exeext
3251if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3252 (eval $ac_link) 2>&5
3253 ac_status=$?
3254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3255 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3257 (eval $ac_try) 2>&5
3258 ac_status=$?
3259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3260 (exit $ac_status); }; }; then
3261 ac_cv_c_bigendian=no
3262else
3263 echo "$as_me: program exited with status $ac_status" >&5
3264echo "$as_me: failed program was:" >&5
3265sed 's/^/| /' conftest.$ac_ext >&5
0bc5435c 3266
fdf7ca85 3267( exit $ac_status )
3268ac_cv_c_bigendian=yes
3269fi
3270rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3271fi
3272fi
3273fi
3274echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
3275echo "${ECHO_T}$ac_cv_c_bigendian" >&6
3276if test $ac_cv_c_bigendian = unknown; then
3277echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
3278echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
0bc5435c 3279
fdf7ca85 3280cat >conftest.c <<EOF
3281short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3282short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3283void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3284short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3285short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3286void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3287int main() { _ascii (); _ebcdic (); return 0; }
3288EOF
3289 if test -f conftest.c ; then
3290 if ${CC-cc} ${CFLAGS} -c conftest.c -o conftest.o && test -f conftest.o ; then
3291 if test `grep -l BIGenDianSyS conftest.o` ; then
3292 echo $ac_n ' big endian probe OK, ' 1>&6
3293 ac_cv_c_bigendian=yes
3294 fi
3295 if test `grep -l LiTTleEnDian conftest.o` ; then
3296 echo $ac_n ' little endian probe OK, ' 1>&6
3297 if test $ac_cv_c_bigendian = yes ; then
3298 ac_cv_c_bigendian=unknown;
3299 else
3300 ac_cv_c_bigendian=no
3301 fi
3302 fi
3303 echo $ac_n 'guessing bigendian ... ' >&6
3304 fi
0bc5435c 3305 fi
fdf7ca85 3306echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
3307echo "${ECHO_T}$ac_cv_c_bigendian" >&6
3308fi
3309if test $ac_cv_c_bigendian = yes; then
0bc5435c 3310
fdf7ca85 3311cat >>confdefs.h <<\_ACEOF
3312#define WORDS_BIGENDIAN 1
3313_ACEOF
0bc5435c 3314
0bc5435c 3315
fdf7ca85 3316cat >>confdefs.h <<\_ACEOF
3317#define HOST_WORDS_BIG_ENDIAN 1
3318_ACEOF
0bc5435c 3319
fdf7ca85 3320 BYTEORDER=4321
3321else
3322 BYTEORDER=1234
0bc5435c 3323fi
0bc5435c 3324
fdf7ca85 3325cat >>confdefs.h <<_ACEOF
3326#define BYTEORDER $BYTEORDER
3327_ACEOF
0bc5435c 3328
fdf7ca85 3329if test $ac_cv_c_bigendian = unknown; then
3330 { { echo "$as_me:$LINENO: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&5
3331echo "$as_me: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&2;}
3332 { (exit 1); exit 1; }; }
3333fi
0bc5435c 3334
0bc5435c 3335
fdf7ca85 3336# Check whether --enable-shared or --disable-shared was given.
3337if test "${enable_shared+set}" = set; then
3338 enableval="$enable_shared"
3339 p=${PACKAGE-default}
3340case $enableval in
3341yes) enable_shared=yes ;;
3342no) enable_shared=no ;;
3343*)
3344 enable_shared=no
3345 # Look at the argument we got. We use all the common list separators.
3346 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3347 for pkg in $enableval; do
3348 if test "X$pkg" = "X$p"; then
3349 enable_shared=yes
3350 fi
3351 done
3352 IFS="$ac_save_ifs"
0bc5435c 3353 ;;
fdf7ca85 3354esac
3355else
3356 enable_shared=no
3357fi;
0bc5435c 3358
fdf7ca85 3359# Check whether --enable-static or --disable-static was given.
3360if test "${enable_static+set}" = set; then
3361 enableval="$enable_static"
3362 p=${PACKAGE-default}
3363case $enableval in
3364yes) enable_static=yes ;;
3365no) enable_static=no ;;
3366*)
3367 enable_static=no
3368 # Look at the argument we got. We use all the common list separators.
3369 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3370 for pkg in $enableval; do
3371 if test "X$pkg" = "X$p"; then
3372 enable_static=yes
0bc5435c 3373 fi
3374 done
3375 IFS="$ac_save_ifs"
0bc5435c 3376 ;;
3377esac
0bc5435c 3378else
fdf7ca85 3379 enable_static=yes
3380fi;
3381# Check whether --enable-fast-install or --disable-fast-install was given.
3382if test "${enable_fast_install+set}" = set; then
3383 enableval="$enable_fast_install"
3384 p=${PACKAGE-default}
3385case $enableval in
3386yes) enable_fast_install=yes ;;
3387no) enable_fast_install=no ;;
3388*)
3389 enable_fast_install=no
3390 # Look at the argument we got. We use all the common list separators.
3391 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3392 for pkg in $enableval; do
3393 if test "X$pkg" = "X$p"; then
3394 enable_fast_install=yes
3395 fi
3396 done
3397 IFS="$ac_save_ifs"
3398 ;;
3399esac
3400else
3401 enable_fast_install=yes
3402fi;
0bc5435c 3403
fdf7ca85 3404# Check whether --with-gnu-ld or --without-gnu-ld was given.
3405if test "${with_gnu_ld+set}" = set; then
3406 withval="$with_gnu_ld"
3407 test "$withval" = no || with_gnu_ld=yes
0bc5435c 3408else
fdf7ca85 3409 with_gnu_ld=no
3410fi;
3411ac_prog=ld
3412if test "$GCC" = yes; then
3413 # Check if gcc -print-prog-name=ld gives a path.
3414 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
3415echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
3416 case $host in
3417 *-*-mingw*)
3418 # gcc leaves a trailing carriage return which upsets mingw
3419 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
0bc5435c 3420 *)
fdf7ca85 3421 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3422 esac
3423 case $ac_prog in
3424 # Accept absolute paths.
3425 [\\/]* | [A-Za-z]:[\\/]*)
3426 re_direlt='/[^/][^/]*/\.\./'
3427 # Canonicalize the path of ld
3428 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3429 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3430 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3431 done
3432 test -z "$LD" && LD="$ac_prog"
3433 ;;
3434 "")
3435 # If it fails, then pretend we aren't using GCC.
3436 ac_prog=ld
3437 ;;
3438 *)
3439 # If it is relative, then search for the first ld in PATH.
3440 with_gnu_ld=unknown
3441 ;;
3442 esac
3443elif test "$with_gnu_ld" = yes; then
3444 echo "$as_me:$LINENO: checking for GNU ld" >&5
3445echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
3446else
3447 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
3448echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
3449fi
3450if test "${lt_cv_path_LD+set}" = set; then
3451 echo $ECHO_N "(cached) $ECHO_C" >&6
3452else
3453 if test -z "$LD"; then
3454 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3455 for ac_dir in $PATH; do
3456 test -z "$ac_dir" && ac_dir=.
3457 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3458 lt_cv_path_LD="$ac_dir/$ac_prog"
3459 # Check to see if the program is GNU ld. I'd rather use --version,
3460 # but apparently some GNU ld's only accept -v.
3461 # Break only if it was the GNU/non-GNU ld that we prefer.
3462 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3463 test "$with_gnu_ld" != no && break
3464 else
3465 test "$with_gnu_ld" != yes && break
0bc5435c 3466 fi
0bc5435c 3467 fi
3468 done
3469 IFS="$ac_save_ifs"
0bc5435c 3470else
fdf7ca85 3471 lt_cv_path_LD="$LD" # Let the user override the test with a path.
0bc5435c 3472fi
0bc5435c 3473fi
3474
fdf7ca85 3475LD="$lt_cv_path_LD"
3476if test -n "$LD"; then
3477 echo "$as_me:$LINENO: result: $LD" >&5
3478echo "${ECHO_T}$LD" >&6
0bc5435c 3479else
3480 echo "$as_me:$LINENO: result: no" >&5
3481echo "${ECHO_T}no" >&6
3482fi
fdf7ca85 3483test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
3484echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
3485 { (exit 1); exit 1; }; }
3486echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
3487echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
3488if test "${lt_cv_prog_gnu_ld+set}" = set; then
0bc5435c 3489 echo $ECHO_N "(cached) $ECHO_C" >&6
3490else
fdf7ca85 3491 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3492if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3493 lt_cv_prog_gnu_ld=yes
0bc5435c 3494else
fdf7ca85 3495 lt_cv_prog_gnu_ld=no
0bc5435c 3496fi
0bc5435c 3497fi
fdf7ca85 3498echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
3499echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
3500with_gnu_ld=$lt_cv_prog_gnu_ld
0bc5435c 3501
0bc5435c 3502
fdf7ca85 3503echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
3504echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
3505if test "${lt_cv_ld_reload_flag+set}" = set; then
0bc5435c 3506 echo $ECHO_N "(cached) $ECHO_C" >&6
3507else
fdf7ca85 3508 lt_cv_ld_reload_flag='-r'
0bc5435c 3509fi
fdf7ca85 3510echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
3511echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
3512reload_flag=$lt_cv_ld_reload_flag
3513test -n "$reload_flag" && reload_flag=" $reload_flag"
0bc5435c 3514
fdf7ca85 3515echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
3516echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
3517if test "${lt_cv_path_NM+set}" = set; then
0bc5435c 3518 echo $ECHO_N "(cached) $ECHO_C" >&6
3519else
fdf7ca85 3520 if test -n "$NM"; then
3521 # Let the user override the test.
3522 lt_cv_path_NM="$NM"
0bc5435c 3523else
fdf7ca85 3524 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3525 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3526 test -z "$ac_dir" && ac_dir=.
3527 tmp_nm=$ac_dir/${ac_tool_prefix}nm
3528 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3529 # Check to see if the nm accepts a BSD-compat flag.
3530 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3531 # nm: unknown option "B" ignored
3532 # Tru64's nm complains that /dev/null is an invalid object file
3533 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3534 lt_cv_path_NM="$tmp_nm -B"
3535 break
3536 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3537 lt_cv_path_NM="$tmp_nm -p"
3538 break
3539 else
3540 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3541 continue # so that we can try to find one that supports BSD flags
3542 fi
3543 fi
3544 done
3545 IFS="$ac_save_ifs"
3546 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
0bc5435c 3547fi
0bc5435c 3548fi
3549
fdf7ca85 3550NM="$lt_cv_path_NM"
3551echo "$as_me:$LINENO: result: $NM" >&5
3552echo "${ECHO_T}$NM" >&6
0bc5435c 3553
fdf7ca85 3554echo "$as_me:$LINENO: checking whether ln -s works" >&5
3555echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3556LN_S=$as_ln_s
3557if test "$LN_S" = "ln -s"; then
3558 echo "$as_me:$LINENO: result: yes" >&5
3559echo "${ECHO_T}yes" >&6
3560else
3561 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
3562echo "${ECHO_T}no, using $LN_S" >&6
3563fi
0bc5435c 3564
fdf7ca85 3565echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
3566echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
3567if test "${lt_cv_deplibs_check_method+set}" = set; then
3568 echo $ECHO_N "(cached) $ECHO_C" >&6
3569else
3570 lt_cv_file_magic_cmd='$MAGIC_CMD'
3571lt_cv_file_magic_test_file=
3572lt_cv_deplibs_check_method='unknown'
3573# Need to set the preceding variable on all platforms that support
3574# interlibrary dependencies.
3575# 'none' -- dependencies not supported.
3576# `unknown' -- same as none, but documents that we really don't know.
3577# 'pass_all' -- all dependencies passed with no checks.
3578# 'test_compile' -- check by making test program.
3579# 'file_magic [regex]' -- check by looking for files in library path
3580# which responds to the $file_magic_cmd with a given egrep regex.
3581# If you have `file' or equivalent on your system and you're not sure
3582# whether `pass_all' will *always* work, you probably want this one.
0bc5435c 3583
fdf7ca85 3584case $host_os in
3585aix*)
3586 lt_cv_deplibs_check_method=pass_all
3587 ;;
0bc5435c 3588
fdf7ca85 3589beos*)
3590 lt_cv_deplibs_check_method=pass_all
3591 ;;
0bc5435c 3592
fdf7ca85 3593bsdi4*)
3594 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3595 lt_cv_file_magic_cmd='/usr/bin/file -L'
3596 lt_cv_file_magic_test_file=/shlib/libc.so
3597 ;;
0bc5435c 3598
fdf7ca85 3599cygwin* | mingw* |pw32*)
3600 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3601 lt_cv_file_magic_cmd='$OBJDUMP -f'
0bc5435c 3602 ;;
3603
fdf7ca85 3604darwin* | rhapsody*)
3605 # this will be overwritten by pass_all, but leave it in just in case
3606 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3607 lt_cv_file_magic_cmd='/usr/bin/file -L'
3608 case "$host_os" in
3609 rhapsody* | darwin1.012)
3610 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
3611 ;;
3612 *) # Darwin 1.3 on
3613 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3614 ;;
3615 esac
3616 lt_cv_deplibs_check_method=pass_all
0bc5435c 3617 ;;
3618
fdf7ca85 3619freebsd* | kfreebsd*-gnu)
3620 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3621 case $host_cpu in
3622 i*86 )
3623 # Not sure whether the presence of OpenBSD here was a mistake.
3624 # Let's accept both of them until this is cleared up.
3625 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3626 lt_cv_file_magic_cmd=/usr/bin/file
3627 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
0bc5435c 3628 ;;
3629 esac
fdf7ca85 3630 else
3631 lt_cv_deplibs_check_method=pass_all
0bc5435c 3632 fi
0bc5435c 3633 ;;
3634
fdf7ca85 3635gnu*)
3636 lt_cv_deplibs_check_method=pass_all
3637 ;;
a6089b1e 3638
fdf7ca85 3639hpux10.20*|hpux11*)
3640 case $host_cpu in
3641 hppa*)
3642 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3643 lt_cv_file_magic_cmd=/usr/bin/file
3644 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3645 ;;
3646 ia64*)
3647 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
3648 lt_cv_file_magic_cmd=/usr/bin/file
3649 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3650 ;;
3651 esac
3652 ;;
a6089b1e 3653
fdf7ca85 3654irix5* | irix6*)
3655 case $host_os in
3656 irix5*)
3657 # this will be overridden with pass_all, but let us keep it just in case
3658 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3659 ;;
3660 *)
3661 case $LD in
3662 *-32|*"-32 ") libmagic=32-bit;;
3663 *-n32|*"-n32 ") libmagic=N32;;
3664 *-64|*"-64 ") libmagic=64-bit;;
3665 *) libmagic=never-match;;
3666 esac
3667 # this will be overridden with pass_all, but let us keep it just in case
3668 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3669 ;;
3670 esac
3671 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3672 lt_cv_deplibs_check_method=pass_all
3673 ;;
0bc5435c 3674
fdf7ca85 3675# This must be Linux ELF.
3676linux-gnu*)
3677 lt_cv_deplibs_check_method=pass_all
3678 ;;
a6089b1e 3679
fdf7ca85 3680netbsd* | knetbsd*-gnu)
3681 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3682 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3683 else
3684 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
0bc5435c 3685 fi
3686 ;;
3687
fdf7ca85 3688newsos6)
3689 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3690 lt_cv_file_magic_cmd=/usr/bin/file
3691 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3692 ;;
0bc5435c 3693
fdf7ca85 3694osf3* | osf4* | osf5*)
3695 # this will be overridden with pass_all, but let us keep it just in case
3696 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3697 lt_cv_file_magic_test_file=/shlib/libc.so
3698 lt_cv_deplibs_check_method=pass_all
3699 ;;
0bc5435c 3700
fdf7ca85 3701sco3.2v5*)
3702 lt_cv_deplibs_check_method=pass_all
3703 ;;
0bc5435c 3704
fdf7ca85 3705solaris*)
3706 lt_cv_deplibs_check_method=pass_all
3707 lt_cv_file_magic_test_file=/lib/libc.so
3708 ;;
a6089b1e 3709
fdf7ca85 3710sysv5uw[78]* | sysv4*uw2*)
3711 lt_cv_deplibs_check_method=pass_all
3712 ;;
3713
3714sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3715 case $host_vendor in
3716 ncr)
3717 lt_cv_deplibs_check_method=pass_all
3718 ;;
3719 motorola)
3720 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]'
3721 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3722 ;;
3723 esac
3724 ;;
3725esac
a6089b1e 3726
3727fi
fdf7ca85 3728echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
3729echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
3730file_magic_cmd=$lt_cv_file_magic_cmd
3731deplibs_check_method=$lt_cv_deplibs_check_method
0bc5435c 3732
a6089b1e 3733
fdf7ca85 3734
3735
3736# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
3737
3738# Only perform the check for file, if the check method requires it
3739case $deplibs_check_method in
3740file_magic*)
3741 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3742 echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
3743echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
3744if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
3745 echo $ECHO_N "(cached) $ECHO_C" >&6
a6089b1e 3746else
fdf7ca85 3747 case $MAGIC_CMD in
3748 /*)
3749 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3750 ;;
3751 ?:/*)
3752 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3753 ;;
3754 *)
3755 ac_save_MAGIC_CMD="$MAGIC_CMD"
3756 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3757 ac_dummy="/usr/bin:$PATH"
3758 for ac_dir in $ac_dummy; do
3759 test -z "$ac_dir" && ac_dir=.
3760 if test -f $ac_dir/${ac_tool_prefix}file; then
3761 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
3762 if test -n "$file_magic_test_file"; then
3763 case $deplibs_check_method in
3764 "file_magic "*)
3765 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3766 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3767 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3768 egrep "$file_magic_regex" > /dev/null; then
3769 :
3770 else
3771 cat <<EOF 1>&2
3772
3773*** Warning: the command libtool uses to detect shared libraries,
3774*** $file_magic_cmd, produces output that libtool cannot recognize.
3775*** The result is that libtool may fail to recognize shared libraries
3776*** as such. This will affect the creation of libtool libraries that
3777*** depend on shared libraries, but programs linked with such libtool
3778*** libraries will work regardless of this problem. Nevertheless, you
3779*** may want to report the problem to your system manager and/or to
3780*** bug-libtool@gnu.org
3781
3782EOF
3783 fi ;;
3784 esac
3785 fi
3786 break
3787 fi
3788 done
3789 IFS="$ac_save_ifs"
3790 MAGIC_CMD="$ac_save_MAGIC_CMD"
3791 ;;
3792esac
ec255163 3793fi
3794
fdf7ca85 3795MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3796if test -n "$MAGIC_CMD"; then
3797 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
3798echo "${ECHO_T}$MAGIC_CMD" >&6
3799else
3800 echo "$as_me:$LINENO: result: no" >&5
3801echo "${ECHO_T}no" >&6
3802fi
a6089b1e 3803
fdf7ca85 3804if test -z "$lt_cv_path_MAGIC_CMD"; then
3805 if test -n "$ac_tool_prefix"; then
3806 echo "$as_me:$LINENO: checking for file" >&5
3807echo $ECHO_N "checking for file... $ECHO_C" >&6
3808if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
3809 echo $ECHO_N "(cached) $ECHO_C" >&6
3810else
3811 case $MAGIC_CMD in
3812 /*)
3813 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3814 ;;
3815 ?:/*)
3816 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3817 ;;
3818 *)
3819 ac_save_MAGIC_CMD="$MAGIC_CMD"
3820 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3821 ac_dummy="/usr/bin:$PATH"
3822 for ac_dir in $ac_dummy; do
3823 test -z "$ac_dir" && ac_dir=.
3824 if test -f $ac_dir/file; then
3825 lt_cv_path_MAGIC_CMD="$ac_dir/file"
3826 if test -n "$file_magic_test_file"; then
3827 case $deplibs_check_method in
3828 "file_magic "*)
3829 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3830 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3831 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3832 egrep "$file_magic_regex" > /dev/null; then
3833 :
3834 else
3835 cat <<EOF 1>&2
0bc5435c 3836
fdf7ca85 3837*** Warning: the command libtool uses to detect shared libraries,
3838*** $file_magic_cmd, produces output that libtool cannot recognize.
3839*** The result is that libtool may fail to recognize shared libraries
3840*** as such. This will affect the creation of libtool libraries that
3841*** depend on shared libraries, but programs linked with such libtool
3842*** libraries will work regardless of this problem. Nevertheless, you
3843*** may want to report the problem to your system manager and/or to
3844*** bug-libtool@gnu.org
0bc5435c 3845
fdf7ca85 3846EOF
3847 fi ;;
3848 esac
3849 fi
3850 break
3851 fi
3852 done
3853 IFS="$ac_save_ifs"
3854 MAGIC_CMD="$ac_save_MAGIC_CMD"
3855 ;;
3856esac
3857fi
0bc5435c 3858
fdf7ca85 3859MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3860if test -n "$MAGIC_CMD"; then
3861 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
3862echo "${ECHO_T}$MAGIC_CMD" >&6
3863else
3864 echo "$as_me:$LINENO: result: no" >&5
3865echo "${ECHO_T}no" >&6
3866fi
0bc5435c 3867
fdf7ca85 3868 else
3869 MAGIC_CMD=:
3870 fi
3871fi
0bc5435c 3872
fdf7ca85 3873 fi
3874 ;;
3875esac
0bc5435c 3876
fdf7ca85 3877if test -n "$ac_tool_prefix"; then
3878 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3879set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3880echo "$as_me:$LINENO: checking for $ac_word" >&5
3881echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3882if test "${ac_cv_prog_RANLIB+set}" = set; then
3883 echo $ECHO_N "(cached) $ECHO_C" >&6
3884else
3885 if test -n "$RANLIB"; then
3886 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3887else
3888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3889for as_dir in $PATH
3890do
3891 IFS=$as_save_IFS
3892 test -z "$as_dir" && as_dir=.
3893 for ac_exec_ext in '' $ac_executable_extensions; do
3894 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3895 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3896 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3897 break 2
3898 fi
3899done
3900done
0bc5435c 3901
fdf7ca85 3902fi
3903fi
3904RANLIB=$ac_cv_prog_RANLIB
3905if test -n "$RANLIB"; then
3906 echo "$as_me:$LINENO: result: $RANLIB" >&5
3907echo "${ECHO_T}$RANLIB" >&6
3908else
3909 echo "$as_me:$LINENO: result: no" >&5
3910echo "${ECHO_T}no" >&6
3911fi
0bc5435c 3912
fdf7ca85 3913fi
3914if test -z "$ac_cv_prog_RANLIB"; then
3915 ac_ct_RANLIB=$RANLIB
3916 # Extract the first word of "ranlib", so it can be a program name with args.
3917set dummy ranlib; ac_word=$2
3918echo "$as_me:$LINENO: checking for $ac_word" >&5
3919echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3921 echo $ECHO_N "(cached) $ECHO_C" >&6
3922else
3923 if test -n "$ac_ct_RANLIB"; then
3924 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3925else
3926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3927for as_dir in $PATH
3928do
3929 IFS=$as_save_IFS
3930 test -z "$as_dir" && as_dir=.
3931 for ac_exec_ext in '' $ac_executable_extensions; do
3932 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3933 ac_cv_prog_ac_ct_RANLIB="ranlib"
3934 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3935 break 2
3936 fi
3937done
3938done
0bc5435c 3939
fdf7ca85 3940 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3941fi
3942fi
3943ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3944if test -n "$ac_ct_RANLIB"; then
3945 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3946echo "${ECHO_T}$ac_ct_RANLIB" >&6
3947else
3948 echo "$as_me:$LINENO: result: no" >&5
3949echo "${ECHO_T}no" >&6
0bc5435c 3950fi
a6089b1e 3951
fdf7ca85 3952 RANLIB=$ac_ct_RANLIB
3953else
3954 RANLIB="$ac_cv_prog_RANLIB"
3955fi
a6089b1e 3956
fdf7ca85 3957if test -n "$ac_tool_prefix"; then
3958 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3959set dummy ${ac_tool_prefix}strip; ac_word=$2
3960echo "$as_me:$LINENO: checking for $ac_word" >&5
3961echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3962if test "${ac_cv_prog_STRIP+set}" = set; then
a6089b1e 3963 echo $ECHO_N "(cached) $ECHO_C" >&6
3964else
fdf7ca85 3965 if test -n "$STRIP"; then
3966 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3967else
3968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3969for as_dir in $PATH
3970do
3971 IFS=$as_save_IFS
3972 test -z "$as_dir" && as_dir=.
3973 for ac_exec_ext in '' $ac_executable_extensions; do
3974 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3975 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3976 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3977 break 2
3978 fi
3979done
3980done
a6089b1e 3981
fdf7ca85 3982fi
3983fi
3984STRIP=$ac_cv_prog_STRIP
3985if test -n "$STRIP"; then
3986 echo "$as_me:$LINENO: result: $STRIP" >&5
3987echo "${ECHO_T}$STRIP" >&6
3988else
3989 echo "$as_me:$LINENO: result: no" >&5
3990echo "${ECHO_T}no" >&6
3991fi
a6089b1e 3992
fdf7ca85 3993fi
3994if test -z "$ac_cv_prog_STRIP"; then
3995 ac_ct_STRIP=$STRIP
3996 # Extract the first word of "strip", so it can be a program name with args.
3997set dummy strip; ac_word=$2
3998echo "$as_me:$LINENO: checking for $ac_word" >&5
3999echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4000if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4001 echo $ECHO_N "(cached) $ECHO_C" >&6
a6089b1e 4002else
fdf7ca85 4003 if test -n "$ac_ct_STRIP"; then
4004 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4005else
4006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4007for as_dir in $PATH
4008do
4009 IFS=$as_save_IFS
4010 test -z "$as_dir" && as_dir=.
4011 for ac_exec_ext in '' $ac_executable_extensions; do
4012 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4013 ac_cv_prog_ac_ct_STRIP="strip"
4014 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4015 break 2
4016 fi
4017done
4018done
a6089b1e 4019
fdf7ca85 4020 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
a6089b1e 4021fi
a6089b1e 4022fi
fdf7ca85 4023ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4024if test -n "$ac_ct_STRIP"; then
4025 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4026echo "${ECHO_T}$ac_ct_STRIP" >&6
4027else
4028 echo "$as_me:$LINENO: result: no" >&5
4029echo "${ECHO_T}no" >&6
ec255163 4030fi
4031
fdf7ca85 4032 STRIP=$ac_ct_STRIP
ec255163 4033else
fdf7ca85 4034 STRIP="$ac_cv_prog_STRIP"
4035fi
ec255163 4036
a6089b1e 4037
fdf7ca85 4038# Check for any special flags to pass to ltconfig.
4039libtool_flags="--cache-file=$cache_file"
4040test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
4041test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
4042test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
4043test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
4044test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
ec255163 4045
ac09b42b 4046
fdf7ca85 4047# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4048if test "${enable_libtool_lock+set}" = set; then
4049 enableval="$enable_libtool_lock"
ac09b42b 4050
fdf7ca85 4051fi;
4052test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
4053test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
ec255163 4054
fdf7ca85 4055
4056# Check whether --with-pic or --without-pic was given.
4057if test "${with_pic+set}" = set; then
4058 withval="$with_pic"
4059 pic_mode="$withval"
b3552be1 4060else
fdf7ca85 4061 pic_mode=default
4062fi;
4063test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
4064test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
b3552be1 4065
fdf7ca85 4066# Some flags need to be propagated to the compiler or linker for good
4067# libtool support.
4068case $host in
4069*-*-irix6*)
4070 # Find out which ABI we are using.
4071 echo '#line 4071 "configure"' > conftest.$ac_ext
4072 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4073 (eval $ac_compile) 2>&5
a6089b1e 4074 ac_status=$?
4075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
fdf7ca85 4076 (exit $ac_status); }; then
4077 if test "$lt_cv_prog_gnu_ld" = yes; then
4078 case `/usr/bin/file conftest.$ac_objext` in
4079 *32-bit*)
4080 LD="${LD-ld} -melf32bsmip"
4081 ;;
4082 *N32*)
4083 LD="${LD-ld} -melf32bmipn32"
4084 ;;
4085 *64-bit*)
4086 LD="${LD-ld} -melf64bmip"
4087 ;;
4088 esac
4089 else
4090 case `/usr/bin/file conftest.$ac_objext` in
4091 *32-bit*)
4092 LD="${LD-ld} -32"
4093 ;;
4094 *N32*)
4095 LD="${LD-ld} -n32"
4096 ;;
4097 *64-bit*)
4098 LD="${LD-ld} -64"
4099 ;;
4100 esac
4101 fi
4102 fi
4103 rm -rf conftest*
4104 ;;
4105
4106ia64-*-hpux*)
4107 # Find out which ABI we are using.
4108 echo 'int i;' > conftest.$ac_ext
4109 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4110 (eval $ac_compile) 2>&5
ac09b42b 4111 ac_status=$?
4112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
fdf7ca85 4113 (exit $ac_status); }; then
4114 case "`/usr/bin/file conftest.o`" in
4115 *ELF-32*)
4116 HPUX_IA64_MODE="32"
4117 ;;
4118 *ELF-64*)
4119 HPUX_IA64_MODE="64"
4120 ;;
4121 esac
4122 fi
4123 rm -rf conftest*
4124 ;;
4125
4126x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
4127 # Find out which ABI we are using.
4128 echo 'int i;' > conftest.$ac_ext
4129 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4130 (eval $ac_compile) 2>&5
a6089b1e 4131 ac_status=$?
4132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
fdf7ca85 4133 (exit $ac_status); }; then
4134 case "`/usr/bin/file conftest.o`" in
4135 *32-bit*)
4136 case $host in
4137 x86_64-*linux*)
4138 LD="${LD-ld} -m elf_i386"
4139 ;;
4140 ppc64-*linux*|powerpc64-*linux*)
4141 LD="${LD-ld} -m elf32ppclinux"
4142 ;;
4143 s390x-*linux*)
4144 LD="${LD-ld} -m elf_s390"
4145 ;;
4146 sparc64-*linux*)
4147 LD="${LD-ld} -m elf32_sparc"
4148 ;;
4149 esac
4150 ;;
4151 *64-bit*)
4152 case $host in
4153 x86_64-*linux*)
4154 LD="${LD-ld} -m elf_x86_64"
4155 ;;
4156 ppc*-*linux*|powerpc*-*linux*)
4157 LD="${LD-ld} -m elf64ppc"
4158 ;;
4159 s390*-*linux*)
4160 LD="${LD-ld} -m elf64_s390"
4161 ;;
4162 sparc*-*linux*)
4163 LD="${LD-ld} -m elf64_sparc"
4164 ;;
4165 esac
4166 ;;
4167 esac
4168 fi
4169 rm -rf conftest*
4170 ;;
4171
4172*-*-sco3.2v5*)
4173 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4174 SAVE_CFLAGS="$CFLAGS"
4175 CFLAGS="$CFLAGS -belf"
4176 echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
4177echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
4178if test "${lt_cv_cc_needs_belf+set}" = set; then
4179 echo $ECHO_N "(cached) $ECHO_C" >&6
4180else
4181
4182
4183 ac_ext=c
4184ac_cpp='$CPP $CPPFLAGS'
4185ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4186ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4187ac_compiler_gnu=$ac_cv_c_compiler_gnu
4188
4189 if test x$gcc_no_link = xyes; then
4190 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
4191echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
4192 { (exit 1); exit 1; }; }
4193fi
a6089b1e 4194cat >conftest.$ac_ext <<_ACEOF
a6089b1e 4195/* confdefs.h. */
4196_ACEOF
4197cat confdefs.h >>conftest.$ac_ext
4198cat >>conftest.$ac_ext <<_ACEOF
4199/* end confdefs.h. */
fdf7ca85 4200
a6089b1e 4201int
4202main ()
4203{
b3552be1 4204
a6089b1e 4205 ;
4206 return 0;
4207}
4208_ACEOF
fdf7ca85 4209rm -f conftest.$ac_objext conftest$ac_exeext
4210if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4211 (eval $ac_link) 2>conftest.er1
a6089b1e 4212 ac_status=$?
ac09b42b 4213 grep -v '^ *+' conftest.er1 >conftest.err
4214 rm -f conftest.er1
4215 cat conftest.err >&5
a6089b1e 4216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4217 (exit $ac_status); } &&
0bc5435c 4218 { ac_try='test -z "$ac_c_werror_flag"
4219 || test ! -s conftest.err'
ac09b42b 4220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4221 (eval $ac_try) 2>&5
4222 ac_status=$?
4223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4224 (exit $ac_status); }; } &&
fdf7ca85 4225 { ac_try='test -s conftest$ac_exeext'
a6089b1e 4226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4227 (eval $ac_try) 2>&5
4228 ac_status=$?
4229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4230 (exit $ac_status); }; }; then
fdf7ca85 4231 lt_cv_cc_needs_belf=yes
b3552be1 4232else
a6089b1e 4233 echo "$as_me: failed program was:" >&5
4234sed 's/^/| /' conftest.$ac_ext >&5
4235
fdf7ca85 4236lt_cv_cc_needs_belf=no
b3552be1 4237fi
fdf7ca85 4238rm -f conftest.err conftest.$ac_objext \
4239 conftest$ac_exeext conftest.$ac_ext
4240 ac_ext=c
4241ac_cpp='$CPP $CPPFLAGS'
4242ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4243ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4244ac_compiler_gnu=$ac_cv_c_compiler_gnu
a6089b1e 4245
b3552be1 4246fi
fdf7ca85 4247echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
4248echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
4249 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4250 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4251 CFLAGS="$SAVE_CFLAGS"
4252 fi
4253 ;;
4254
4255
4256esac
4257
4258
4259# Save cache, so that ltconfig can load it
4260cat >confcache <<\_ACEOF
4261# This file is a shell script that caches the results of configure
4262# tests run on this system so they can be shared between configure
4263# scripts and configure runs, see configure's option --config-cache.
4264# It is not useful on other systems. If it contains results you don't
4265# want to keep, you may remove or edit it.
4266#
4267# config.status only pays attention to the cache file if you give it
4268# the --recheck option to rerun configure.
4269#
4270# `ac_cv_env_foo' variables (set or unset) will be overridden when
4271# loading this file, other *unset* `ac_cv_foo' will be assigned the
4272# following values.
4273
a6089b1e 4274_ACEOF
a6089b1e 4275
fdf7ca85 4276# The following way of writing the cache mishandles newlines in values,
4277# but we know of no workaround that is simple, portable, and efficient.
4278# So, don't put newlines in cache variables' values.
4279# Ultrix sh set writes to stderr and can't be redirected directly,
4280# and sets the high bit in the cache file unless we assign to the vars.
4281{
4282 (set) 2>&1 |
4283 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4284 *ac_space=\ *)
4285 # `set' does not quote correctly, so add quotes (double-quote
4286 # substitution turns \\\\ into \\, and sed turns \\ into \).
4287 sed -n \
4288 "s/'/'\\\\''/g;
4289 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
4290 ;;
4291 *)
4292 # `set' quotes correctly as required by POSIX, so do not add quotes.
4293 sed -n \
4294 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
4295 ;;
4296 esac;
4297} |
4298 sed '
4299 t clear
4300 : clear
4301 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
4302 t end
4303 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
4304 : end' >>confcache
4305if diff $cache_file confcache >/dev/null 2>&1; then :; else
4306 if test -w $cache_file; then
4307 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
4308 cat confcache >$cache_file
4309 else
4310 echo "not updating unwritable cache $cache_file"
4311 fi
b3552be1 4312fi
fdf7ca85 4313rm -f confcache
b3552be1 4314
fdf7ca85 4315# Actually configure libtool. ac_aux_dir is where install-sh is found.
4316AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
4317MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
4318LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
4319AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
4320objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
4321deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
4322${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
4323$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
4324|| { { echo "$as_me:$LINENO: error: libtool configure failed" >&5
4325echo "$as_me: error: libtool configure failed" >&2;}
4326 { (exit 1); exit 1; }; }
4327
4328# Reload cache, that may have been modified by ltconfig
4329if test -r "$cache_file"; then
4330 # Some versions of bash will fail to source /dev/null (special
4331 # files actually), so we avoid doing that.
4332 if test -f "$cache_file"; then
4333 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
4334echo "$as_me: loading cache $cache_file" >&6;}
4335 case $cache_file in
4336 [\\/]* | ?:[\\/]* ) . $cache_file;;
4337 *) . ./$cache_file;;
4338 esac
b3552be1 4339 fi
fdf7ca85 4340else
4341 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
4342echo "$as_me: creating cache $cache_file" >&6;}
4343 >$cache_file
b3552be1 4344fi
a6089b1e 4345
b3552be1 4346
fdf7ca85 4347# This can be used to rebuild libtool when needed
4348LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
a6089b1e 4349
fdf7ca85 4350# Always use our own libtool.
4351LIBTOOL='$(SHELL) $(top_builddir)/libtool'
4352
4353# Redirect the config.log output again, so that the ltconfig log is not
4354# clobbered by the next message.
4355exec 5>>./config.log
b3552be1 4356
a6089b1e 4357
b3552be1 4358
b3552be1 4359
f0a93313 4360
4361
4362
a6089b1e 4363 ac_config_headers="$ac_config_headers config.h:config.in"
f0a93313 4364
4365
4366
4367# Find a good install program. We prefer a C program (faster),
4368# so one script is as good as another. But avoid the broken or
4369# incompatible versions:
4370# SysV /etc/install, /usr/sbin/install
4371# SunOS /usr/etc/install
4372# IRIX /sbin/install
4373# AIX /bin/install
a6089b1e 4374# AmigaOS /C/install, which installs bootblocks on floppy discs
f0a93313 4375# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4376# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4377# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
ac09b42b 4378# OS/2's system install, which has a completely different semantic
f0a93313 4379# ./install, which can be erroneously created by make from ./install.sh.
a6089b1e 4380echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4381echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
f0a93313 4382if test -z "$INSTALL"; then
a6089b1e 4383if test "${ac_cv_path_install+set}" = set; then
4384 echo $ECHO_N "(cached) $ECHO_C" >&6
4385else
4386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4387for as_dir in $PATH
4388do
4389 IFS=$as_save_IFS
4390 test -z "$as_dir" && as_dir=.
4391 # Account for people who put trailing slashes in PATH elements.
4392case $as_dir/ in
4393 ./ | .// | /cC/* | \
4394 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
ac09b42b 4395 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
a6089b1e 4396 /usr/ucb/* ) ;;
4397 *)
4398 # OSF1 and SCO ODT 3.0 have their own names for install.
4399 # Don't use installbsd from OSF since it installs stuff as root
4400 # by default.
4401 for ac_prog in ginstall scoinst install; do
4402 for ac_exec_ext in '' $ac_executable_extensions; do
ac09b42b 4403 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4404 if test $ac_prog = install &&
4405 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4406 # AIX install. It has an incompatible calling convention.
4407 :
4408 elif test $ac_prog = install &&
4409 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4410 # program-specific install script used by HP pwplus--don't use.
4411 :
4412 else
4413 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4414 break 3
4415 fi
4416 fi
f0a93313 4417 done
a6089b1e 4418 done
4419 ;;
4420esac
4421done
4422
f0a93313 4423
4424fi
4425 if test "${ac_cv_path_install+set}" = set; then
a6089b1e 4426 INSTALL=$ac_cv_path_install
f0a93313 4427 else
4428 # As a last resort, use the slow shell script. We don't cache a
4429 # path for INSTALL within a source directory, because that will
4430 # break other packages using the cache if that directory is
4431 # removed, or if the path is relative.
a6089b1e 4432 INSTALL=$ac_install_sh
f0a93313 4433 fi
4434fi
a6089b1e 4435echo "$as_me:$LINENO: result: $INSTALL" >&5
4436echo "${ECHO_T}$INSTALL" >&6
f0a93313 4437
4438# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4439# It thinks the first close brace ends the variable substitution.
4440test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4441
a6089b1e 4442test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
301e59c9 4443
f0a93313 4444test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4445
4446
4447. ${srcdir}/config.table
4448host_makefile_frag=${frag}
4449
4450
4451# It's OK to check for header files. Although the compiler may not be
4452# able to link anything, it had better be able to at least compile
4453# something.
a6089b1e 4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
6c13736f 4477
4478for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h
a6089b1e 4479do
4480as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
90305aaf 4481echo "$as_me:$LINENO: checking for $ac_header" >&5
a6089b1e 4482echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4483if eval "test \"\${$as_ac_Header+set}\" = set"; then
4484 echo $ECHO_N "(cached) $ECHO_C" >&6
a6089b1e 4485else
90305aaf 4486 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 4487/* confdefs.h. */
4488_ACEOF
4489cat confdefs.h >>conftest.$ac_ext
4490cat >>conftest.$ac_ext <<_ACEOF
4491/* end confdefs.h. */
4492#include <$ac_header>
4493_ACEOF
4494if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4495 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4496 ac_status=$?
4497 grep -v '^ *+' conftest.er1 >conftest.err
4498 rm -f conftest.er1
4499 cat conftest.err >&5
4500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4501 (exit $ac_status); } >/dev/null; then
4502 if test -s conftest.err; then
4503 ac_cpp_err=$ac_c_preproc_warn_flag
ac09b42b 4504 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
a6089b1e 4505 else
4506 ac_cpp_err=
4507 fi
b6477ce7 4508else
a6089b1e 4509 ac_cpp_err=yes
4510fi
4511if test -z "$ac_cpp_err"; then
90305aaf 4512 eval "$as_ac_Header=yes"
a6089b1e 4513else
4514 echo "$as_me: failed program was:" >&5
4515sed 's/^/| /' conftest.$ac_ext >&5
4516
90305aaf 4517 eval "$as_ac_Header=no"
a6089b1e 4518fi
4519rm -f conftest.err conftest.$ac_ext
a6089b1e 4520fi
4521echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4522echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
a6089b1e 4523if test `eval echo '${'$as_ac_Header'}'` = yes; then
4524 cat >>confdefs.h <<_ACEOF
4525#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4526_ACEOF
4527
4528fi
a6089b1e 4529done
4530
4531echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
4532echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4533if test "${ac_cv_header_sys_wait_h+set}" = set; then
4534 echo $ECHO_N "(cached) $ECHO_C" >&6
4535else
4536 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 4537/* confdefs.h. */
4538_ACEOF
4539cat confdefs.h >>conftest.$ac_ext
4540cat >>conftest.$ac_ext <<_ACEOF
4541/* end confdefs.h. */
7b190504 4542#include <sys/types.h>
a6089b1e 4543#include <sys/wait.h>
4544#ifndef WEXITSTATUS
4545# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
b6477ce7 4546#endif
a6089b1e 4547#ifndef WIFEXITED
4548# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4549#endif
4550
4551int
4552main ()
4553{
4554 int s;
4555 wait (&s);
4556 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4557 ;
4558 return 0;
4559}
4560_ACEOF
4561rm -f conftest.$ac_objext
4562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac09b42b 4563 (eval $ac_compile) 2>conftest.er1
a6089b1e 4564 ac_status=$?
ac09b42b 4565 grep -v '^ *+' conftest.er1 >conftest.err
4566 rm -f conftest.er1
4567 cat conftest.err >&5
a6089b1e 4568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4569 (exit $ac_status); } &&
0bc5435c 4570 { ac_try='test -z "$ac_c_werror_flag"
4571 || test ! -s conftest.err'
ac09b42b 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'
a6089b1e 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
4583 ac_cv_header_sys_wait_h=yes
7b190504 4584else
a6089b1e 4585 echo "$as_me: failed program was:" >&5
4586sed 's/^/| /' conftest.$ac_ext >&5
4587
4588ac_cv_header_sys_wait_h=no
7b190504 4589fi
ac09b42b 4590rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a6089b1e 4591fi
4592echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
4593echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
4594if test $ac_cv_header_sys_wait_h = yes; then
4595
90305aaf 4596cat >>confdefs.h <<\_ACEOF
4597#define HAVE_SYS_WAIT_H 1
4598_ACEOF
4599
4600fi
4601
4602echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4603echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4604if test "${ac_cv_header_time+set}" = set; then
4605 echo $ECHO_N "(cached) $ECHO_C" >&6
4606else
4607 cat >conftest.$ac_ext <<_ACEOF
90305aaf 4608/* confdefs.h. */
4609_ACEOF
4610cat confdefs.h >>conftest.$ac_ext
4611cat >>conftest.$ac_ext <<_ACEOF
4612/* end confdefs.h. */
4613#include <sys/types.h>
4614#include <sys/time.h>
4615#include <time.h>
4616
4617int
4618main ()
4619{
4620if ((struct tm *) 0)
4621return 0;
4622 ;
4623 return 0;
4624}
4625_ACEOF
4626rm -f conftest.$ac_objext
4627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac09b42b 4628 (eval $ac_compile) 2>conftest.er1
90305aaf 4629 ac_status=$?
ac09b42b 4630 grep -v '^ *+' conftest.er1 >conftest.err
4631 rm -f conftest.er1
4632 cat conftest.err >&5
90305aaf 4633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4634 (exit $ac_status); } &&
0bc5435c 4635 { ac_try='test -z "$ac_c_werror_flag"
4636 || test ! -s conftest.err'
ac09b42b 4637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4638 (eval $ac_try) 2>&5
4639 ac_status=$?
4640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4641 (exit $ac_status); }; } &&
4642 { ac_try='test -s conftest.$ac_objext'
90305aaf 4643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4644 (eval $ac_try) 2>&5
4645 ac_status=$?
4646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4647 (exit $ac_status); }; }; then
4648 ac_cv_header_time=yes
4649else
4650 echo "$as_me: failed program was:" >&5
4651sed 's/^/| /' conftest.$ac_ext >&5
4652
4653ac_cv_header_time=no
4654fi
ac09b42b 4655rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
90305aaf 4656fi
4657echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
4658echo "${ECHO_T}$ac_cv_header_time" >&6
4659if test $ac_cv_header_time = yes; then
4660
4661cat >>confdefs.h <<\_ACEOF
4662#define TIME_WITH_SYS_TIME 1
4663_ACEOF
4664
4665fi
4666
4667
4668echo "$as_me:$LINENO: checking whether errno must be declared" >&5
4669echo $ECHO_N "checking whether errno must be declared... $ECHO_C" >&6
4670if test "${libiberty_cv_declare_errno+set}" = set; then
4671 echo $ECHO_N "(cached) $ECHO_C" >&6
4672else
4673 cat >conftest.$ac_ext <<_ACEOF
90305aaf 4674/* confdefs.h. */
4675_ACEOF
4676cat confdefs.h >>conftest.$ac_ext
4677cat >>conftest.$ac_ext <<_ACEOF
4678/* end confdefs.h. */
4679#include <errno.h>
4680int
4681main ()
4682{
4683int x = errno;
4684 ;
4685 return 0;
4686}
4687_ACEOF
4688rm -f conftest.$ac_objext
4689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac09b42b 4690 (eval $ac_compile) 2>conftest.er1
90305aaf 4691 ac_status=$?
ac09b42b 4692 grep -v '^ *+' conftest.er1 >conftest.err
4693 rm -f conftest.er1
4694 cat conftest.err >&5
90305aaf 4695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4696 (exit $ac_status); } &&
0bc5435c 4697 { ac_try='test -z "$ac_c_werror_flag"
4698 || test ! -s conftest.err'
ac09b42b 4699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4700 (eval $ac_try) 2>&5
4701 ac_status=$?
4702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4703 (exit $ac_status); }; } &&
4704 { ac_try='test -s conftest.$ac_objext'
90305aaf 4705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4706 (eval $ac_try) 2>&5
4707 ac_status=$?
4708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4709 (exit $ac_status); }; }; then
4710 libiberty_cv_declare_errno=no
4711else
4712 echo "$as_me: failed program was:" >&5
4713sed 's/^/| /' conftest.$ac_ext >&5
4714
4715libiberty_cv_declare_errno=yes
4716fi
ac09b42b 4717rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
90305aaf 4718fi
4719echo "$as_me:$LINENO: result: $libiberty_cv_declare_errno" >&5
4720echo "${ECHO_T}$libiberty_cv_declare_errno" >&6
4721if test $libiberty_cv_declare_errno = yes
4722then
4723cat >>confdefs.h <<\_ACEOF
4724#define NEED_DECLARATION_ERRNO 1
4725_ACEOF
4726
4727fi
4728
4729
4927c18d 4730# Determine the size of an int for struct fibnode.
90305aaf 4731echo "$as_me:$LINENO: checking for egrep" >&5
4732echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4733if test "${ac_cv_prog_egrep+set}" = set; then
4734 echo $ECHO_N "(cached) $ECHO_C" >&6
4735else
4736 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4737 then ac_cv_prog_egrep='grep -E'
4738 else ac_cv_prog_egrep='egrep'
4739 fi
4740fi
4741echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4742echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4743 EGREP=$ac_cv_prog_egrep
4744
4745
4746echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4747echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4748if test "${ac_cv_header_stdc+set}" = set; then
4749 echo $ECHO_N "(cached) $ECHO_C" >&6
4750else
4751 cat >conftest.$ac_ext <<_ACEOF
90305aaf 4752/* confdefs.h. */
4753_ACEOF
4754cat confdefs.h >>conftest.$ac_ext
4755cat >>conftest.$ac_ext <<_ACEOF
4756/* end confdefs.h. */
4757#include <stdlib.h>
4758#include <stdarg.h>
4759#include <string.h>
4760#include <float.h>
4761
4762int
4763main ()
4764{
4765
4766 ;
4767 return 0;
4768}
4769_ACEOF
4770rm -f conftest.$ac_objext
4771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac09b42b 4772 (eval $ac_compile) 2>conftest.er1
90305aaf 4773 ac_status=$?
ac09b42b 4774 grep -v '^ *+' conftest.er1 >conftest.err
4775 rm -f conftest.er1
4776 cat conftest.err >&5
90305aaf 4777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4778 (exit $ac_status); } &&
0bc5435c 4779 { ac_try='test -z "$ac_c_werror_flag"
4780 || test ! -s conftest.err'
ac09b42b 4781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4782 (eval $ac_try) 2>&5
4783 ac_status=$?
4784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4785 (exit $ac_status); }; } &&
4786 { ac_try='test -s conftest.$ac_objext'
90305aaf 4787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4788 (eval $ac_try) 2>&5
4789 ac_status=$?
4790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4791 (exit $ac_status); }; }; then
4792 ac_cv_header_stdc=yes
4793else
4794 echo "$as_me: failed program was:" >&5
4795sed 's/^/| /' conftest.$ac_ext >&5
4796
4797ac_cv_header_stdc=no
4798fi
ac09b42b 4799rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
90305aaf 4800
4801if test $ac_cv_header_stdc = yes; then
4802 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4803 cat >conftest.$ac_ext <<_ACEOF
90305aaf 4804/* confdefs.h. */
4805_ACEOF
4806cat confdefs.h >>conftest.$ac_ext
4807cat >>conftest.$ac_ext <<_ACEOF
4808/* end confdefs.h. */
4809#include <string.h>
4810
4811_ACEOF
4812if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4813 $EGREP "memchr" >/dev/null 2>&1; then
4814 :
4815else
4816 ac_cv_header_stdc=no
4817fi
4818rm -f conftest*
4819
4820fi
4821
4822if test $ac_cv_header_stdc = yes; then
4823 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4824 cat >conftest.$ac_ext <<_ACEOF
90305aaf 4825/* confdefs.h. */
4826_ACEOF
4827cat confdefs.h >>conftest.$ac_ext
4828cat >>conftest.$ac_ext <<_ACEOF
4829/* end confdefs.h. */
4830#include <stdlib.h>
4831
a6089b1e 4832_ACEOF
90305aaf 4833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4834 $EGREP "free" >/dev/null 2>&1; then
4835 :
4836else
4837 ac_cv_header_stdc=no
4838fi
4839rm -f conftest*
a6089b1e 4840
4841fi
4842
90305aaf 4843if test $ac_cv_header_stdc = yes; then
4844 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4845 if test "$cross_compiling" = yes; then
4846 :
a6089b1e 4847else
4848 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 4849/* confdefs.h. */
4850_ACEOF
4851cat confdefs.h >>conftest.$ac_ext
4852cat >>conftest.$ac_ext <<_ACEOF
4853/* end confdefs.h. */
90305aaf 4854#include <ctype.h>
4855#if ((' ' & 0x0FF) == 0x020)
4856# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4857# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4858#else
4859# define ISLOWER(c) \
ac09b42b 4860 (('a' <= (c) && (c) <= 'i') \
4861 || ('j' <= (c) && (c) <= 'r') \
4862 || ('s' <= (c) && (c) <= 'z'))
90305aaf 4863# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4864#endif
a6089b1e 4865
90305aaf 4866#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a6089b1e 4867int
4868main ()
4869{
90305aaf 4870 int i;
4871 for (i = 0; i < 256; i++)
4872 if (XOR (islower (i), ISLOWER (i))
ac09b42b 4873 || toupper (i) != TOUPPER (i))
90305aaf 4874 exit(2);
4875 exit (0);
a6089b1e 4876}
4877_ACEOF
90305aaf 4878rm -f conftest$ac_exeext
4879if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4880 (eval $ac_link) 2>&5
a6089b1e 4881 ac_status=$?
4882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
90305aaf 4883 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6089b1e 4884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4885 (eval $ac_try) 2>&5
4886 ac_status=$?
4887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4888 (exit $ac_status); }; }; then
90305aaf 4889 :
a6089b1e 4890else
90305aaf 4891 echo "$as_me: program exited with status $ac_status" >&5
4892echo "$as_me: failed program was:" >&5
a6089b1e 4893sed 's/^/| /' conftest.$ac_ext >&5
4894
90305aaf 4895( exit $ac_status )
4896ac_cv_header_stdc=no
a6089b1e 4897fi
ac09b42b 4898rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a6089b1e 4899fi
90305aaf 4900fi
4901fi
4902echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4903echo "${ECHO_T}$ac_cv_header_stdc" >&6
4904if test $ac_cv_header_stdc = yes; then
a6089b1e 4905
4906cat >>confdefs.h <<\_ACEOF
90305aaf 4907#define STDC_HEADERS 1
a6089b1e 4908_ACEOF
4909
4910fi
4911
90305aaf 4912# On IRIX 5.3, sys/types and inttypes.h are conflicting.
a6089b1e 4913
90305aaf 4914
4915
4916
4917
4918
4919
4920
4921
4922for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
ac09b42b 4923 inttypes.h stdint.h unistd.h
90305aaf 4924do
4925as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4926echo "$as_me:$LINENO: checking for $ac_header" >&5
4927echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4928if eval "test \"\${$as_ac_Header+set}\" = set"; then
a6089b1e 4929 echo $ECHO_N "(cached) $ECHO_C" >&6
4930else
4931 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 4932/* confdefs.h. */
4933_ACEOF
4934cat confdefs.h >>conftest.$ac_ext
4935cat >>conftest.$ac_ext <<_ACEOF
4936/* end confdefs.h. */
90305aaf 4937#include <$ac_header>
a6089b1e 4938_ACEOF
90305aaf 4939if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4940 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
a6089b1e 4941 ac_status=$?
90305aaf 4942 grep -v '^ *+' conftest.er1 >conftest.err
4943 rm -f conftest.er1
4944 cat conftest.err >&5
a6089b1e 4945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
90305aaf 4946 (exit $ac_status); } >/dev/null; then
4947 if test -s conftest.err; then
4948 ac_cpp_err=$ac_c_preproc_warn_flag
ac09b42b 4949 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
90305aaf 4950 else
4951 ac_cpp_err=
4952 fi
4953else
4954 ac_cpp_err=yes
4955fi
4956if test -z "$ac_cpp_err"; then
4957 eval "$as_ac_Header=yes"
a6089b1e 4958else
4959 echo "$as_me: failed program was:" >&5
4960sed 's/^/| /' conftest.$ac_ext >&5
4961
90305aaf 4962 eval "$as_ac_Header=no"
a6089b1e 4963fi
90305aaf 4964rm -f conftest.err conftest.$ac_ext
a6089b1e 4965fi
90305aaf 4966echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4967echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4968if test `eval echo '${'$as_ac_Header'}'` = yes; then
4969 cat >>confdefs.h <<_ACEOF
4970#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
a6089b1e 4971_ACEOF
4972
4973fi
90305aaf 4974done
a6089b1e 4975
4976
4927c18d 4977echo "$as_me:$LINENO: checking for int" >&5
4978echo $ECHO_N "checking for int... $ECHO_C" >&6
4979if test "${ac_cv_type_int+set}" = set; then
4980 echo $ECHO_N "(cached) $ECHO_C" >&6
4981else
4982 cat >conftest.$ac_ext <<_ACEOF
4983/* confdefs.h. */
4984_ACEOF
4985cat confdefs.h >>conftest.$ac_ext
4986cat >>conftest.$ac_ext <<_ACEOF
4987/* end confdefs.h. */
4988$ac_includes_default
4989int
4990main ()
4991{
4992if ((int *) 0)
4993 return 0;
4994if (sizeof (int))
4995 return 0;
4996 ;
4997 return 0;
4998}
4999_ACEOF
5000rm -f conftest.$ac_objext
5001if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5002 (eval $ac_compile) 2>conftest.er1
5003 ac_status=$?
5004 grep -v '^ *+' conftest.er1 >conftest.err
5005 rm -f conftest.er1
5006 cat conftest.err >&5
5007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5008 (exit $ac_status); } &&
0bc5435c 5009 { ac_try='test -z "$ac_c_werror_flag"
5010 || test ! -s conftest.err'
4927c18d 5011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5012 (eval $ac_try) 2>&5
5013 ac_status=$?
5014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5015 (exit $ac_status); }; } &&
5016 { ac_try='test -s conftest.$ac_objext'
5017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5018 (eval $ac_try) 2>&5
5019 ac_status=$?
5020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5021 (exit $ac_status); }; }; then
5022 ac_cv_type_int=yes
5023else
5024 echo "$as_me: failed program was:" >&5
5025sed 's/^/| /' conftest.$ac_ext >&5
5026
5027ac_cv_type_int=no
5028fi
5029rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5030fi
5031echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5032echo "${ECHO_T}$ac_cv_type_int" >&6
5033
5034echo "$as_me:$LINENO: checking size of int" >&5
5035echo $ECHO_N "checking size of int... $ECHO_C" >&6
5036if test "${ac_cv_sizeof_int+set}" = set; then
5037 echo $ECHO_N "(cached) $ECHO_C" >&6
5038else
5039 if test "$ac_cv_type_int" = yes; then
5040 # The cast to unsigned long works around a bug in the HP C Compiler
5041 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5042 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5043 # This bug is HP SR number 8606223364.
5044 if test "$cross_compiling" = yes; then
5045 # Depending upon the size, compute the lo and hi bounds.
5046cat >conftest.$ac_ext <<_ACEOF
5047/* confdefs.h. */
5048_ACEOF
5049cat confdefs.h >>conftest.$ac_ext
5050cat >>conftest.$ac_ext <<_ACEOF
5051/* end confdefs.h. */
5052$ac_includes_default
5053int
5054main ()
5055{
5056static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5057test_array [0] = 0
5058
5059 ;
5060 return 0;
5061}
5062_ACEOF
5063rm -f conftest.$ac_objext
5064if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5065 (eval $ac_compile) 2>conftest.er1
5066 ac_status=$?
5067 grep -v '^ *+' conftest.er1 >conftest.err
5068 rm -f conftest.er1
5069 cat conftest.err >&5
5070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5071 (exit $ac_status); } &&
0bc5435c 5072 { ac_try='test -z "$ac_c_werror_flag"
5073 || test ! -s conftest.err'
4927c18d 5074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5075 (eval $ac_try) 2>&5
5076 ac_status=$?
5077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5078 (exit $ac_status); }; } &&
5079 { ac_try='test -s conftest.$ac_objext'
5080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5081 (eval $ac_try) 2>&5
5082 ac_status=$?
5083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5084 (exit $ac_status); }; }; then
5085 ac_lo=0 ac_mid=0
5086 while :; do
5087 cat >conftest.$ac_ext <<_ACEOF
5088/* confdefs.h. */
5089_ACEOF
5090cat confdefs.h >>conftest.$ac_ext
5091cat >>conftest.$ac_ext <<_ACEOF
5092/* end confdefs.h. */
5093$ac_includes_default
5094int
5095main ()
5096{
5097static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5098test_array [0] = 0
5099
5100 ;
5101 return 0;
5102}
5103_ACEOF
5104rm -f conftest.$ac_objext
5105if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5106 (eval $ac_compile) 2>conftest.er1
5107 ac_status=$?
5108 grep -v '^ *+' conftest.er1 >conftest.err
5109 rm -f conftest.er1
5110 cat conftest.err >&5
5111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5112 (exit $ac_status); } &&
0bc5435c 5113 { ac_try='test -z "$ac_c_werror_flag"
5114 || test ! -s conftest.err'
4927c18d 5115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5116 (eval $ac_try) 2>&5
5117 ac_status=$?
5118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5119 (exit $ac_status); }; } &&
5120 { ac_try='test -s conftest.$ac_objext'
5121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5122 (eval $ac_try) 2>&5
5123 ac_status=$?
5124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5125 (exit $ac_status); }; }; then
5126 ac_hi=$ac_mid; break
5127else
5128 echo "$as_me: failed program was:" >&5
5129sed 's/^/| /' conftest.$ac_ext >&5
5130
5131ac_lo=`expr $ac_mid + 1`
5132 if test $ac_lo -le $ac_mid; then
5133 ac_lo= ac_hi=
5134 break
5135 fi
5136 ac_mid=`expr 2 '*' $ac_mid + 1`
5137fi
5138rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5139 done
5140else
5141 echo "$as_me: failed program was:" >&5
5142sed 's/^/| /' conftest.$ac_ext >&5
5143
5144cat >conftest.$ac_ext <<_ACEOF
5145/* confdefs.h. */
5146_ACEOF
5147cat confdefs.h >>conftest.$ac_ext
5148cat >>conftest.$ac_ext <<_ACEOF
5149/* end confdefs.h. */
5150$ac_includes_default
5151int
5152main ()
5153{
5154static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5155test_array [0] = 0
5156
5157 ;
5158 return 0;
5159}
5160_ACEOF
5161rm -f conftest.$ac_objext
5162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5163 (eval $ac_compile) 2>conftest.er1
5164 ac_status=$?
5165 grep -v '^ *+' conftest.er1 >conftest.err
5166 rm -f conftest.er1
5167 cat conftest.err >&5
5168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5169 (exit $ac_status); } &&
0bc5435c 5170 { ac_try='test -z "$ac_c_werror_flag"
5171 || test ! -s conftest.err'
4927c18d 5172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5173 (eval $ac_try) 2>&5
5174 ac_status=$?
5175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5176 (exit $ac_status); }; } &&
5177 { ac_try='test -s conftest.$ac_objext'
5178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5179 (eval $ac_try) 2>&5
5180 ac_status=$?
5181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5182 (exit $ac_status); }; }; then
5183 ac_hi=-1 ac_mid=-1
5184 while :; do
5185 cat >conftest.$ac_ext <<_ACEOF
5186/* confdefs.h. */
5187_ACEOF
5188cat confdefs.h >>conftest.$ac_ext
5189cat >>conftest.$ac_ext <<_ACEOF
5190/* end confdefs.h. */
5191$ac_includes_default
5192int
5193main ()
5194{
5195static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5196test_array [0] = 0
5197
5198 ;
5199 return 0;
5200}
5201_ACEOF
5202rm -f conftest.$ac_objext
5203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5204 (eval $ac_compile) 2>conftest.er1
5205 ac_status=$?
5206 grep -v '^ *+' conftest.er1 >conftest.err
5207 rm -f conftest.er1
5208 cat conftest.err >&5
5209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5210 (exit $ac_status); } &&
0bc5435c 5211 { ac_try='test -z "$ac_c_werror_flag"
5212 || test ! -s conftest.err'
4927c18d 5213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5214 (eval $ac_try) 2>&5
5215 ac_status=$?
5216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5217 (exit $ac_status); }; } &&
5218 { ac_try='test -s conftest.$ac_objext'
5219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5220 (eval $ac_try) 2>&5
5221 ac_status=$?
5222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5223 (exit $ac_status); }; }; then
5224 ac_lo=$ac_mid; break
5225else
5226 echo "$as_me: failed program was:" >&5
5227sed 's/^/| /' conftest.$ac_ext >&5
5228
5229ac_hi=`expr '(' $ac_mid ')' - 1`
5230 if test $ac_mid -le $ac_hi; then
5231 ac_lo= ac_hi=
5232 break
5233 fi
5234 ac_mid=`expr 2 '*' $ac_mid`
5235fi
5236rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5237 done
5238else
5239 echo "$as_me: failed program was:" >&5
5240sed 's/^/| /' conftest.$ac_ext >&5
5241
5242ac_lo= ac_hi=
5243fi
5244rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5245fi
5246rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5247# Binary search between lo and hi bounds.
5248while test "x$ac_lo" != "x$ac_hi"; do
5249 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5250 cat >conftest.$ac_ext <<_ACEOF
5251/* confdefs.h. */
5252_ACEOF
5253cat confdefs.h >>conftest.$ac_ext
5254cat >>conftest.$ac_ext <<_ACEOF
5255/* end confdefs.h. */
5256$ac_includes_default
5257int
5258main ()
5259{
5260static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5261test_array [0] = 0
5262
5263 ;
5264 return 0;
5265}
5266_ACEOF
5267rm -f conftest.$ac_objext
5268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5269 (eval $ac_compile) 2>conftest.er1
5270 ac_status=$?
5271 grep -v '^ *+' conftest.er1 >conftest.err
5272 rm -f conftest.er1
5273 cat conftest.err >&5
5274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5275 (exit $ac_status); } &&
0bc5435c 5276 { ac_try='test -z "$ac_c_werror_flag"
5277 || test ! -s conftest.err'
4927c18d 5278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5279 (eval $ac_try) 2>&5
5280 ac_status=$?
5281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5282 (exit $ac_status); }; } &&
5283 { ac_try='test -s conftest.$ac_objext'
5284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5285 (eval $ac_try) 2>&5
5286 ac_status=$?
5287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5288 (exit $ac_status); }; }; then
5289 ac_hi=$ac_mid
5290else
5291 echo "$as_me: failed program was:" >&5
5292sed 's/^/| /' conftest.$ac_ext >&5
5293
5294ac_lo=`expr '(' $ac_mid ')' + 1`
5295fi
5296rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5297done
5298case $ac_lo in
5299?*) ac_cv_sizeof_int=$ac_lo;;
5300'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5301See \`config.log' for more details." >&5
5302echo "$as_me: error: cannot compute sizeof (int), 77
5303See \`config.log' for more details." >&2;}
5304 { (exit 1); exit 1; }; } ;;
5305esac
5306else
5307 if test "$cross_compiling" = yes; then
0bc5435c 5308 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5309See \`config.log' for more details." >&5
5310echo "$as_me: error: cannot run test program while cross compiling
5311See \`config.log' for more details." >&2;}
4927c18d 5312 { (exit 1); exit 1; }; }
5313else
5314 cat >conftest.$ac_ext <<_ACEOF
5315/* confdefs.h. */
5316_ACEOF
5317cat confdefs.h >>conftest.$ac_ext
5318cat >>conftest.$ac_ext <<_ACEOF
5319/* end confdefs.h. */
5320$ac_includes_default
5321long longval () { return (long) (sizeof (int)); }
5322unsigned long ulongval () { return (long) (sizeof (int)); }
5323#include <stdio.h>
5324#include <stdlib.h>
5325int
5326main ()
5327{
5328
5329 FILE *f = fopen ("conftest.val", "w");
5330 if (! f)
5331 exit (1);
5332 if (((long) (sizeof (int))) < 0)
5333 {
5334 long i = longval ();
5335 if (i != ((long) (sizeof (int))))
5336 exit (1);
5337 fprintf (f, "%ld\n", i);
5338 }
5339 else
5340 {
5341 unsigned long i = ulongval ();
5342 if (i != ((long) (sizeof (int))))
5343 exit (1);
5344 fprintf (f, "%lu\n", i);
5345 }
5346 exit (ferror (f) || fclose (f) != 0);
5347
5348 ;
5349 return 0;
5350}
5351_ACEOF
5352rm -f conftest$ac_exeext
5353if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5354 (eval $ac_link) 2>&5
5355 ac_status=$?
5356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5357 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5359 (eval $ac_try) 2>&5
5360 ac_status=$?
5361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5362 (exit $ac_status); }; }; then
5363 ac_cv_sizeof_int=`cat conftest.val`
5364else
5365 echo "$as_me: program exited with status $ac_status" >&5
5366echo "$as_me: failed program was:" >&5
5367sed 's/^/| /' conftest.$ac_ext >&5
5368
5369( exit $ac_status )
5370{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5371See \`config.log' for more details." >&5
5372echo "$as_me: error: cannot compute sizeof (int), 77
5373See \`config.log' for more details." >&2;}
5374 { (exit 1); exit 1; }; }
5375fi
5376rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5377fi
5378fi
5379rm -f conftest.val
5380else
5381 ac_cv_sizeof_int=0
5382fi
5383fi
5384echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5385echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5386cat >>confdefs.h <<_ACEOF
5387#define SIZEOF_INT $ac_cv_sizeof_int
5388_ACEOF
5389
5390
5391
a6089b1e 5392echo "$as_me:$LINENO: checking for uintptr_t" >&5
5393echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
5394if test "${ac_cv_type_uintptr_t+set}" = set; then
5395 echo $ECHO_N "(cached) $ECHO_C" >&6
5396else
5397 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 5398/* confdefs.h. */
5399_ACEOF
5400cat confdefs.h >>conftest.$ac_ext
5401cat >>conftest.$ac_ext <<_ACEOF
5402/* end confdefs.h. */
5403$ac_includes_default
5404int
5405main ()
5406{
5407if ((uintptr_t *) 0)
5408 return 0;
5409if (sizeof (uintptr_t))
5410 return 0;
5411 ;
5412 return 0;
5413}
5414_ACEOF
5415rm -f conftest.$ac_objext
5416if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac09b42b 5417 (eval $ac_compile) 2>conftest.er1
a6089b1e 5418 ac_status=$?
ac09b42b 5419 grep -v '^ *+' conftest.er1 >conftest.err
5420 rm -f conftest.er1
5421 cat conftest.err >&5
a6089b1e 5422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5423 (exit $ac_status); } &&
0bc5435c 5424 { ac_try='test -z "$ac_c_werror_flag"
5425 || test ! -s conftest.err'
ac09b42b 5426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5427 (eval $ac_try) 2>&5
5428 ac_status=$?
5429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5430 (exit $ac_status); }; } &&
5431 { ac_try='test -s conftest.$ac_objext'
a6089b1e 5432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5433 (eval $ac_try) 2>&5
5434 ac_status=$?
5435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436 (exit $ac_status); }; }; then
5437 ac_cv_type_uintptr_t=yes
5438else
5439 echo "$as_me: failed program was:" >&5
5440sed 's/^/| /' conftest.$ac_ext >&5
7b190504 5441
a6089b1e 5442ac_cv_type_uintptr_t=no
5443fi
ac09b42b 5444rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b6477ce7 5445fi
a6089b1e 5446echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
5447echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
5448if test $ac_cv_type_uintptr_t = yes; then
5449 :
5450else
5451
5452cat >>confdefs.h <<_ACEOF
b6477ce7 5453#define uintptr_t unsigned long
a6089b1e 5454_ACEOF
b6477ce7 5455
5456fi
7b190504 5457
6c13736f 5458
5459# Look for a 64-bit type.
5460echo "$as_me:$LINENO: checking for a 64-bit type" >&5
5461echo $ECHO_N "checking for a 64-bit type... $ECHO_C" >&6
5462if test "${liberty_cv_uint64+set}" = set; then
5463 echo $ECHO_N "(cached) $ECHO_C" >&6
5464else
5465 cat >conftest.$ac_ext <<_ACEOF
5466/* confdefs.h. */
5467_ACEOF
5468cat confdefs.h >>conftest.$ac_ext
5469cat >>conftest.$ac_ext <<_ACEOF
5470/* end confdefs.h. */
5471#ifdef HAVE_STDINT_H
5472#include <stdint.h>
5473#endif
5474int
5475main ()
5476{
5477extern uint64_t foo;
5478 ;
5479 return 0;
5480}
5481_ACEOF
5482rm -f conftest.$ac_objext
5483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5484 (eval $ac_compile) 2>conftest.er1
5485 ac_status=$?
5486 grep -v '^ *+' conftest.er1 >conftest.err
5487 rm -f conftest.er1
5488 cat conftest.err >&5
5489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5490 (exit $ac_status); } &&
0bc5435c 5491 { ac_try='test -z "$ac_c_werror_flag"
5492 || test ! -s conftest.err'
6c13736f 5493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5494 (eval $ac_try) 2>&5
5495 ac_status=$?
5496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5497 (exit $ac_status); }; } &&
5498 { ac_try='test -s conftest.$ac_objext'
5499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5500 (eval $ac_try) 2>&5
5501 ac_status=$?
5502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5503 (exit $ac_status); }; }; then
5504 liberty_cv_uint64=uint64_t
5505else
5506 echo "$as_me: failed program was:" >&5
5507sed 's/^/| /' conftest.$ac_ext >&5
5508
5509cat >conftest.$ac_ext <<_ACEOF
5510/* confdefs.h. */
5511_ACEOF
5512cat confdefs.h >>conftest.$ac_ext
5513cat >>conftest.$ac_ext <<_ACEOF
5514/* end confdefs.h. */
5515#ifdef HAVE_LIMITS_H
5516#include <limits.h>
5517#endif
5518#ifndef CHAR_BIT
5519#define CHAR_BIT 8
5520#endif
5521int
5522main ()
5523{
5524extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1];
5525 ;
5526 return 0;
5527}
5528_ACEOF
5529rm -f conftest.$ac_objext
5530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5531 (eval $ac_compile) 2>conftest.er1
5532 ac_status=$?
5533 grep -v '^ *+' conftest.er1 >conftest.err
5534 rm -f conftest.er1
5535 cat conftest.err >&5
5536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5537 (exit $ac_status); } &&
0bc5435c 5538 { ac_try='test -z "$ac_c_werror_flag"
5539 || test ! -s conftest.err'
6c13736f 5540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5541 (eval $ac_try) 2>&5
5542 ac_status=$?
5543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5544 (exit $ac_status); }; } &&
5545 { ac_try='test -s conftest.$ac_objext'
5546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5547 (eval $ac_try) 2>&5
5548 ac_status=$?
5549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5550 (exit $ac_status); }; }; then
5551 liberty_cv_uint64="unsigned long"
5552else
5553 echo "$as_me: failed program was:" >&5
5554sed 's/^/| /' conftest.$ac_ext >&5
5555
5556cat >conftest.$ac_ext <<_ACEOF
5557/* confdefs.h. */
5558_ACEOF
5559cat confdefs.h >>conftest.$ac_ext
5560cat >>conftest.$ac_ext <<_ACEOF
5561/* end confdefs.h. */
5562#ifdef HAVE_LIMITS_H
5563#include <limits.h>
5564#endif
5565#ifndef CHAR_BIT
5566#define CHAR_BIT 8
5567#endif
5568int
5569main ()
5570{
5571extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1];
5572 ;
5573 return 0;
5574}
5575_ACEOF
5576rm -f conftest.$ac_objext
5577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5578 (eval $ac_compile) 2>conftest.er1
5579 ac_status=$?
5580 grep -v '^ *+' conftest.er1 >conftest.err
5581 rm -f conftest.er1
5582 cat conftest.err >&5
5583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5584 (exit $ac_status); } &&
0bc5435c 5585 { ac_try='test -z "$ac_c_werror_flag"
5586 || test ! -s conftest.err'
6c13736f 5587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5588 (eval $ac_try) 2>&5
5589 ac_status=$?
5590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5591 (exit $ac_status); }; } &&
5592 { ac_try='test -s conftest.$ac_objext'
5593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5594 (eval $ac_try) 2>&5
5595 ac_status=$?
5596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5597 (exit $ac_status); }; }; then
5598 liberty_cv_uint64="unsigned long long"
5599else
5600 echo "$as_me: failed program was:" >&5
5601sed 's/^/| /' conftest.$ac_ext >&5
5602
5603liberty_cv_uint64=none
5604fi
5605rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5606fi
5607rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5608fi
5609rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5610fi
5611
5612echo "$as_me:$LINENO: result: $liberty_cv_uint64" >&5
5613echo "${ECHO_T}$liberty_cv_uint64" >&6
5614if test "$liberty_cv_uint64" != none; then
5615
b6b1fbb6 5616cat >>confdefs.h <<_ACEOF
5617#define UNSIGNED_64BIT_TYPE $liberty_cv_uint64
6c13736f 5618_ACEOF
5619
5620fi
5621
b5e94eb4 5622# Given the above check, we always have uintptr_t or a fallback
5623# definition. So define HAVE_UINTPTR_T in case any imported code
5624# relies on it.
7b190504 5625
a6089b1e 5626cat >>confdefs.h <<\_ACEOF
5627#define HAVE_UINTPTR_T 1
5628_ACEOF
5629
5630
5631echo "$as_me:$LINENO: checking for pid_t" >&5
5632echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5633if test "${ac_cv_type_pid_t+set}" = set; then
5634 echo $ECHO_N "(cached) $ECHO_C" >&6
5635else
5636 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 5637/* confdefs.h. */
5638_ACEOF
5639cat confdefs.h >>conftest.$ac_ext
5640cat >>conftest.$ac_ext <<_ACEOF
5641/* end confdefs.h. */
5642$ac_includes_default
5643int
5644main ()
5645{
5646if ((pid_t *) 0)
5647 return 0;
5648if (sizeof (pid_t))
5649 return 0;
5650 ;
5651 return 0;
5652}
5653_ACEOF
5654rm -f conftest.$ac_objext
5655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac09b42b 5656 (eval $ac_compile) 2>conftest.er1
a6089b1e 5657 ac_status=$?
ac09b42b 5658 grep -v '^ *+' conftest.er1 >conftest.err
5659 rm -f conftest.er1
5660 cat conftest.err >&5
a6089b1e 5661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5662 (exit $ac_status); } &&
0bc5435c 5663 { ac_try='test -z "$ac_c_werror_flag"
5664 || test ! -s conftest.err'
ac09b42b 5665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5666 (eval $ac_try) 2>&5
5667 ac_status=$?
5668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5669 (exit $ac_status); }; } &&
5670 { ac_try='test -s conftest.$ac_objext'
a6089b1e 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); }; }; then
63e428d5 5676 ac_cv_type_pid_t=yes
5677else
a6089b1e 5678 echo "$as_me: failed program was:" >&5
5679sed 's/^/| /' conftest.$ac_ext >&5
63e428d5 5680
a6089b1e 5681ac_cv_type_pid_t=no
63e428d5 5682fi
ac09b42b 5683rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a6089b1e 5684fi
5685echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5686echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5687if test $ac_cv_type_pid_t = yes; then
5688 :
5689else
5690
5691cat >>confdefs.h <<_ACEOF
63e428d5 5692#define pid_t int
a6089b1e 5693_ACEOF
63e428d5 5694
5695fi
5696
5697
f0a93313 5698# This is the list of functions which libiberty will provide if they
5699# are not available on the host.
5700
5701funcs="asprintf"
5702funcs="$funcs atexit"
5703funcs="$funcs basename"
5704funcs="$funcs bcmp"
5705funcs="$funcs bcopy"
5b9c32cc 5706funcs="$funcs bsearch"
f0a93313 5707funcs="$funcs bzero"
34fa8831 5708funcs="$funcs calloc"
f0a93313 5709funcs="$funcs clock"
8568af22 5710funcs="$funcs ffs"
f0a93313 5711funcs="$funcs getcwd"
5712funcs="$funcs getpagesize"
5713funcs="$funcs index"
5714funcs="$funcs insque"
5715funcs="$funcs memchr"
5716funcs="$funcs memcmp"
5717funcs="$funcs memcpy"
5718funcs="$funcs memmove"
79d940a3 5719funcs="$funcs mempcpy"
f0a93313 5720funcs="$funcs memset"
301e59c9 5721funcs="$funcs mkstemps"
ad3893f9 5722funcs="$funcs putenv"
f0a93313 5723funcs="$funcs random"
5724funcs="$funcs rename"
5725funcs="$funcs rindex"
ad3893f9 5726funcs="$funcs setenv"
09fd37ef 5727funcs="$funcs snprintf"
f0a93313 5728funcs="$funcs sigsetmask"
79d940a3 5729funcs="$funcs stpcpy"
5730funcs="$funcs stpncpy"
f0a93313 5731funcs="$funcs strcasecmp"
5732funcs="$funcs strchr"
5733funcs="$funcs strdup"
5734funcs="$funcs strncasecmp"
5735funcs="$funcs strrchr"
5736funcs="$funcs strstr"
5737funcs="$funcs strtod"
5738funcs="$funcs strtol"
5739funcs="$funcs strtoul"
5740funcs="$funcs tmpnam"
5741funcs="$funcs vasprintf"
5742funcs="$funcs vfprintf"
5743funcs="$funcs vprintf"
09fd37ef 5744funcs="$funcs vsnprintf"
f0a93313 5745funcs="$funcs vsprintf"
5746funcs="$funcs waitpid"
5747
5748# Also in the old function.def file: alloca, vfork, getopt.
5749
5e90539e 5750vars="sys_errlist sys_nerr sys_siglist"
f0a93313 5751
18912799 5752checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
8f3b8386 5753checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
0991d38e 5754checkfuncs="$checkfuncs getsysinfo table sysctl"
f0a93313 5755
5756# These are neither executed nor required, but they help keep
5757# autoheader happy without adding a bunch of text to acconfig.h.
5758if test "x" = "y"; then
f0a93313 5759
f0a93313 5760
a6089b1e 5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
5823 getcwd getpagesize index insque mkstemps memchr memcmp memcpy \
5824 memmove mempcpy memset putenv random rename rindex sigsetmask \
5825 strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr \
5826 strtod strtol strtoul tmpnam vasprintf vfprintf vprintf \
5827 vsprintf waitpid getrusage on_exit psignal strerror strsignal \
5828 sysconf times sbrk gettimeofday ffs snprintf vsnprintf \
5829 pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl \
5830 realpath canonicalize_file_name
5831do
5832as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5833echo "$as_me:$LINENO: checking for $ac_func" >&5
5834echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5835if eval "test \"\${$as_ac_var+set}\" = set"; then
5836 echo $ECHO_N "(cached) $ECHO_C" >&6
5837else
5838 if test x$gcc_no_link = xyes; then
5839 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5840echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5841 { (exit 1); exit 1; }; }
5842fi
5843cat >conftest.$ac_ext <<_ACEOF
a6089b1e 5844/* confdefs.h. */
5845_ACEOF
5846cat confdefs.h >>conftest.$ac_ext
5847cat >>conftest.$ac_ext <<_ACEOF
5848/* end confdefs.h. */
5849/* System header to define __stub macros and hopefully few prototypes,
5850 which can conflict with char $ac_func (); below.
5851 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
fc139dea 5852 <limits.h> exists even on freestanding compilers. Under hpux,
5853 including <limits.h> includes <sys/time.h> and causes problems
5854 checking for functions defined therein. */
5855#if defined (__STDC__) && !defined (_HPUX_SOURCE)
a6089b1e 5856# include <limits.h>
5857#else
5858# include <assert.h>
5859#endif
5860/* Override any gcc2 internal prototype to avoid an error. */
5861#ifdef __cplusplus
5862extern "C"
5863{
5864#endif
5865/* We use char because int might match the return type of a gcc2
5866 builtin and then its argument prototype would still apply. */
5867char $ac_func ();
5868/* The GNU C library defines this for functions which it implements
f0a93313 5869 to always fail with ENOSYS. Some functions are actually named
5870 something starting with __ and the normal name is an alias. */
5871#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5872choke me
5873#else
a6089b1e 5874char (*f) () = $ac_func;
5875#endif
5876#ifdef __cplusplus
5877}
f0a93313 5878#endif
5879
a6089b1e 5880int
5881main ()
5882{
5883return f != $ac_func;
5884 ;
5885 return 0;
5886}
5887_ACEOF
5888rm -f conftest.$ac_objext conftest$ac_exeext
5889if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac09b42b 5890 (eval $ac_link) 2>conftest.er1
a6089b1e 5891 ac_status=$?
ac09b42b 5892 grep -v '^ *+' conftest.er1 >conftest.err
5893 rm -f conftest.er1
5894 cat conftest.err >&5
a6089b1e 5895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5896 (exit $ac_status); } &&
0bc5435c 5897 { ac_try='test -z "$ac_c_werror_flag"
5898 || test ! -s conftest.err'
ac09b42b 5899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5900 (eval $ac_try) 2>&5
5901 ac_status=$?
5902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5903 (exit $ac_status); }; } &&
5904 { ac_try='test -s conftest$ac_exeext'
a6089b1e 5905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5906 (eval $ac_try) 2>&5
5907 ac_status=$?
5908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5909 (exit $ac_status); }; }; then
5910 eval "$as_ac_var=yes"
5911else
5912 echo "$as_me: failed program was:" >&5
5913sed 's/^/| /' conftest.$ac_ext >&5
5914
5915eval "$as_ac_var=no"
5916fi
ac09b42b 5917rm -f conftest.err conftest.$ac_objext \
5918 conftest$ac_exeext conftest.$ac_ext
a6089b1e 5919fi
5920echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5921echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5922if test `eval echo '${'$as_ac_var'}'` = yes; then
5923 cat >>confdefs.h <<_ACEOF
5924#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5925_ACEOF
25b160f7 5926
f0a93313 5927fi
5928done
5929
a6089b1e 5930
5931cat >>confdefs.h <<\_ACEOF
ec255163 5932#define HAVE_SYS_ERRLIST 1
a6089b1e 5933_ACEOF
5934
ec255163 5935
a6089b1e 5936cat >>confdefs.h <<\_ACEOF
5b9c32cc 5937#define HAVE_SYS_NERR 1
a6089b1e 5938_ACEOF
5939
ec255163 5940
a6089b1e 5941cat >>confdefs.h <<\_ACEOF
ec255163 5942#define HAVE_SYS_SIGLIST 1
a6089b1e 5943_ACEOF
ec255163 5944
f0a93313 5945fi
5946
5947# For each of these functions, if the host does not provide the
5948# function we want to put FN.o in LIBOBJS, and if the host does
f8d49ce1 5949# provide the function, we want to define HAVE_FN in config.h.
f0a93313 5950
5951setobjs=
715f424c 5952CHECK=
9123512a 5953target_header_dir=
f0a93313 5954if test -n "${with_target_subdir}"; then
5955
804ec1bf 5956 # We are being configured as a target library. AC_REPLACE_FUNCS
f0a93313 5957 # may not work correctly, because the compiler may not be able to
804ec1bf 5958 # link executables. Note that we may still be being configured
5959 # native.
f0a93313 5960
5961 # If we are being configured for newlib, we know which functions
5962 # newlib provide and which ones we will be expected to provide.
5963
5964 if test "x${with_newlib}" = "xyes"; then
ac09b42b 5965 case $LIBOBJS in
5966 "asprintf.$ac_objext" | \
5967 *" asprintf.$ac_objext" | \
5968 "asprintf.$ac_objext "* | \
5969 *" asprintf.$ac_objext "* ) ;;
5970 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;;
5971esac
5972
5973 case $LIBOBJS in
5974 "basename.$ac_objext" | \
5975 *" basename.$ac_objext" | \
5976 "basename.$ac_objext "* | \
5977 *" basename.$ac_objext "* ) ;;
5978 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
5979esac
5980
5981 case $LIBOBJS in
5982 "insque.$ac_objext" | \
5983 *" insque.$ac_objext" | \
5984 "insque.$ac_objext "* | \
5985 *" insque.$ac_objext "* ) ;;
5986 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
5987esac
5988
5989 case $LIBOBJS in
5990 "random.$ac_objext" | \
5991 *" random.$ac_objext" | \
5992 "random.$ac_objext "* | \
5993 *" random.$ac_objext "* ) ;;
5994 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
5995esac
5996
5997 case $LIBOBJS in
5998 "strdup.$ac_objext" | \
5999 *" strdup.$ac_objext" | \
6000 "strdup.$ac_objext "* | \
6001 *" strdup.$ac_objext "* ) ;;
6002 *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
6003esac
6004
6005 case $LIBOBJS in
6006 "vasprintf.$ac_objext" | \
6007 *" vasprintf.$ac_objext" | \
6008 "vasprintf.$ac_objext "* | \
6009 *" vasprintf.$ac_objext "* ) ;;
6010 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
6011esac
6012
f0a93313 6013
6014 for f in $funcs; do
6015 case "$f" in
804ec1bf 6016 asprintf | basename | insque | random | strdup | vasprintf)
f0a93313 6017 ;;
6018 *)
6019 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
a6089b1e 6020 cat >>confdefs.h <<_ACEOF
f0a93313 6021#define $n 1
a6089b1e 6022_ACEOF
f0a93313 6023
6024 ;;
6025 esac
6026 done
6027
6028 # newlib doesnt provide any of the variables in $vars, so we
6029 # dont have to check them here.
6030
804ec1bf 6031 # Of the functions in $checkfuncs, newlib only has strerror.
f0a93313 6032 cat >> confdefs.h <<\EOF
6033#define HAVE_STRERROR 1
6034EOF
6035
6036
6037 setobjs=yes
6038
6039 fi
715f424c 6040
9123512a 6041 # We may wish to install the target headers somewhere.
6042 # Check whether --enable-install-libiberty or --disable-install-libiberty was given.
6043if test "${enable_install_libiberty+set}" = set; then
6044 enableval="$enable_install_libiberty"
6045 enable_install_libiberty=$enableval
6046else
6047 enable_install_libiberty=no
a6089b1e 6048fi;
9123512a 6049 # Option parsed, now set things appropriately.
6050 case x"$enable_install_libiberty" in
6051 xyes|x)
6052 target_header_dir=libiberty
6053 ;;
a6089b1e 6054 xno)
9123512a 6055 target_header_dir=
6056 ;;
a6089b1e 6057 *)
9123512a 6058 # This could be sanity-checked in various ways...
6059 target_header_dir="${enable_install_libiberty}"
6060 ;;
6061 esac
6062
6063
715f424c 6064else
6065
6066 # Not a target library, so we set things up to run the test suite.
6067 CHECK=check-cplus-dem
6068
f0a93313 6069fi
6070
715f424c 6071
6072
9123512a 6073
3652f680 6074case "${host}" in
da383dd4 6075 *-*-cygwin* | *-*-mingw*)
3652f680 6076 cat >> confdefs.h <<\EOF
6077#define HAVE_SYS_ERRLIST 1
6078EOF
6079
6080 cat >> confdefs.h <<\EOF
6081#define HAVE_SYS_NERR 1
6082EOF
6083
6084 ;;
6085esac
6086
f0a93313 6087if test -z "${setobjs}"; then
6088 case "${host}" in
6089
6090 *-*-vxworks*)
6091 # Handle VxWorks configuration specially, since on VxWorks the
6092 # libraries are actually on the target board, not in the file
6093 # system.
ac09b42b 6094 case $LIBOBJS in
6095 "basename.$ac_objext" | \
6096 *" basename.$ac_objext" | \
6097 "basename.$ac_objext "* | \
6098 *" basename.$ac_objext "* ) ;;
6099 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
6100esac
6101
6102 case $LIBOBJS in
6103 "getpagesize.$ac_objext" | \
6104 *" getpagesize.$ac_objext" | \
6105 "getpagesize.$ac_objext "* | \
6106 *" getpagesize.$ac_objext "* ) ;;
6107 *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;;
6108esac
6109
6110 case $LIBOBJS in
6111 "insque.$ac_objext" | \
6112 *" insque.$ac_objext" | \
6113 "insque.$ac_objext "* | \
6114 *" insque.$ac_objext "* ) ;;
6115 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
6116esac
6117
6118 case $LIBOBJS in
6119 "random.$ac_objext" | \
6120 *" random.$ac_objext" | \
6121 "random.$ac_objext "* | \
6122 *" random.$ac_objext "* ) ;;
6123 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
6124esac
6125
6126 case $LIBOBJS in
6127 "strcasecmp.$ac_objext" | \
6128 *" strcasecmp.$ac_objext" | \
6129 "strcasecmp.$ac_objext "* | \
6130 *" strcasecmp.$ac_objext "* ) ;;
6131 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" ;;
6132esac
6133
6134 case $LIBOBJS in
6135 "strncasecmp.$ac_objext" | \
6136 *" strncasecmp.$ac_objext" | \
6137 "strncasecmp.$ac_objext "* | \
6138 *" strncasecmp.$ac_objext "* ) ;;
6139 *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;;
6140esac
6141
6142 case $LIBOBJS in
6143 "strdup.$ac_objext" | \
6144 *" strdup.$ac_objext" | \
6145 "strdup.$ac_objext "* | \
6146 *" strdup.$ac_objext "* ) ;;
6147 *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
6148esac
6149
6150 case $LIBOBJS in
6151 "vfork.$ac_objext" | \
6152 *" vfork.$ac_objext" | \
6153 "vfork.$ac_objext "* | \
6154 *" vfork.$ac_objext "* ) ;;
6155 *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
6156esac
6157
6158 case $LIBOBJS in
6159 "waitpid.$ac_objext" | \
6160 *" waitpid.$ac_objext" | \
6161 "waitpid.$ac_objext "* | \
6162 *" waitpid.$ac_objext "* ) ;;
6163 *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;;
6164esac
6165
6166 case $LIBOBJS in
6167 "vasprintf.$ac_objext" | \
6168 *" vasprintf.$ac_objext" | \
6169 "vasprintf.$ac_objext "* | \
6170 *" vasprintf.$ac_objext "* ) ;;
6171 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
6172esac
6173
f0a93313 6174 for f in $funcs; do
6175 case "$f" in
6176 basename | getpagesize | insque | random | strcasecmp)
6177 ;;
6178 strncasecmp | strdup | vfork | waitpid | vasprintf)
6179 ;;
6180 *)
6181 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
a6089b1e 6182 cat >>confdefs.h <<_ACEOF
f0a93313 6183#define $n 1
a6089b1e 6184_ACEOF
f0a93313 6185
6186 ;;
6187 esac
6188 done
6189
6190 # VxWorks doesn't provide any of the variables in $vars, so we
6191 # don't have to check them here.
6192
6193 # Of the functions in $checkfuncs, VxWorks only has strerror.
6194 cat >> confdefs.h <<\EOF
6195#define HAVE_STRERROR 1
6196EOF
6197
6198
6199 setobjs=yes
6200 ;;
6201
6202 esac
6203fi
6204
6205if test -z "${setobjs}"; then
6206
6207 case "${host}" in
6208
7b8b8d43 6209 *-*-cygwin*)
6210 # The Cygwin library actually uses a couple of files from
f0a93313 6211 # libiberty when it is built. If we are building a native
7b8b8d43 6212 # Cygwin, and we run the tests, we will appear to have these
f0a93313 6213 # files. However, when we go on to build winsup, we will wind up
6214 # with a library which does not have the files, since they should
6215 # have come from libiberty.
6216
6217 # We handle this by removing the functions the winsup library
6218 # provides from our shell variables, so that they appear to be
6219 # missing.
6220
4aabc076 6221 # DJ - only if we're *building* cygwin, not just building *with* cygwin
a6089b1e 6222
4aabc076 6223 if test -n "${with_target_subdir}"
6224 then
6225 funcs="`echo $funcs | sed -e 's/random//'`"
ac09b42b 6226 case $LIBOBJS in
6227 "random.$ac_objext" | \
6228 *" random.$ac_objext" | \
6229 "random.$ac_objext "* | \
6230 *" random.$ac_objext "* ) ;;
6231 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
6232esac
6233
4aabc076 6234 vars="`echo $vars | sed -e 's/sys_siglist//'`"
6235 checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
6236 fi
f0a93313 6237 ;;
6238
6239 *-*-mingw32*)
6240 # Under mingw32, sys_nerr and sys_errlist exist, but they are
6241 # macros, so the test below won't find them.
ec255163 6242 libiberty_cv_var_sys_nerr=yes
6243 libiberty_cv_var_sys_errlist=yes
f0a93313 6244 ;;
6245
d267f778 6246 *-*-uwin*)
a6089b1e 6247 # Under some versions of uwin, vfork is notoriously buggy and the test
d267f778 6248 # can hang configure; on other versions, vfork exists just as a stub.
6249 # FIXME: This should be removed once vfork in uwin's runtime is fixed.
6250 ac_cv_func_vfork_works=no
dbf15cfc 6251 # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
a6089b1e 6252 # macros (actually, these are imported from a DLL, but the end effect
dbf15cfc 6253 # is the same), so the test below won't find them.
ec255163 6254 libiberty_cv_var_sys_nerr=yes
6255 libiberty_cv_var_sys_errlist=yes
d267f778 6256 ;;
6257
8f966bdb 6258 *-*-*vms*)
a6089b1e 6259 # Under VMS, vfork works very different than on Unix. The standard test
8f966bdb 6260 # won't work, and it isn't easily adaptable. It makes more sense to
6261 # just force it.
6262 ac_cv_func_vfork_works=yes
6263 ;;
6264
f0a93313 6265 esac
6266
6267 # We haven't set the list of objects yet. Use the standard autoconf
6268 # tests. This will only work if the compiler works.
a6089b1e 6269 echo "$as_me:$LINENO: checking for library containing strerror" >&5
6270echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
6271if test "${ac_cv_search_strerror+set}" = set; then
6272 echo $ECHO_N "(cached) $ECHO_C" >&6
6273else
6274 ac_func_search_save_LIBS=$LIBS
6275ac_cv_search_strerror=no
6276if test x$gcc_no_link = xyes; then
6277 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6278echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6279 { (exit 1); exit 1; }; }
6280fi
6281cat >conftest.$ac_ext <<_ACEOF
a6089b1e 6282/* confdefs.h. */
6283_ACEOF
6284cat confdefs.h >>conftest.$ac_ext
6285cat >>conftest.$ac_ext <<_ACEOF
6286/* end confdefs.h. */
f0a93313 6287
a6089b1e 6288/* Override any gcc2 internal prototype to avoid an error. */
6289#ifdef __cplusplus
6290extern "C"
6291#endif
6292/* We use char because int might match the return type of a gcc2
6293 builtin and then its argument prototype would still apply. */
6294char strerror ();
6295int
6296main ()
6297{
6298strerror ();
6299 ;
6300 return 0;
6301}
6302_ACEOF
6303rm -f conftest.$ac_objext conftest$ac_exeext
6304if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac09b42b 6305 (eval $ac_link) 2>conftest.er1
a6089b1e 6306 ac_status=$?
ac09b42b 6307 grep -v '^ *+' conftest.er1 >conftest.err
6308 rm -f conftest.er1
6309 cat conftest.err >&5
a6089b1e 6310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6311 (exit $ac_status); } &&
0bc5435c 6312 { ac_try='test -z "$ac_c_werror_flag"
6313 || test ! -s conftest.err'
ac09b42b 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_exeext'
a6089b1e 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
6325 ac_cv_search_strerror="none required"
6326else
6327 echo "$as_me: failed program was:" >&5
6328sed 's/^/| /' conftest.$ac_ext >&5
6329
6330fi
ac09b42b 6331rm -f conftest.err conftest.$ac_objext \
6332 conftest$ac_exeext conftest.$ac_ext
a6089b1e 6333if test "$ac_cv_search_strerror" = no; then
6334 for ac_lib in cposix; do
6335 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6336 if test x$gcc_no_link = xyes; then
6337 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6338echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6339 { (exit 1); exit 1; }; }
6340fi
6341cat >conftest.$ac_ext <<_ACEOF
a6089b1e 6342/* confdefs.h. */
6343_ACEOF
6344cat confdefs.h >>conftest.$ac_ext
6345cat >>conftest.$ac_ext <<_ACEOF
6346/* end confdefs.h. */
301e59c9 6347
a6089b1e 6348/* Override any gcc2 internal prototype to avoid an error. */
6349#ifdef __cplusplus
6350extern "C"
6351#endif
6352/* We use char because int might match the return type of a gcc2
6353 builtin and then its argument prototype would still apply. */
6354char strerror ();
6355int
6356main ()
6357{
6358strerror ();
6359 ;
6360 return 0;
6361}
6362_ACEOF
6363rm -f conftest.$ac_objext conftest$ac_exeext
6364if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac09b42b 6365 (eval $ac_link) 2>conftest.er1
a6089b1e 6366 ac_status=$?
ac09b42b 6367 grep -v '^ *+' conftest.er1 >conftest.err
6368 rm -f conftest.er1
6369 cat conftest.err >&5
a6089b1e 6370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6371 (exit $ac_status); } &&
0bc5435c 6372 { ac_try='test -z "$ac_c_werror_flag"
6373 || test ! -s conftest.err'
ac09b42b 6374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6375 (eval $ac_try) 2>&5
6376 ac_status=$?
6377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6378 (exit $ac_status); }; } &&
6379 { ac_try='test -s conftest$ac_exeext'
a6089b1e 6380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6381 (eval $ac_try) 2>&5
6382 ac_status=$?
6383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6384 (exit $ac_status); }; }; then
6385 ac_cv_search_strerror="-l$ac_lib"
6386break
6387else
6388 echo "$as_me: failed program was:" >&5
6389sed 's/^/| /' conftest.$ac_ext >&5
6390
6391fi
ac09b42b 6392rm -f conftest.err conftest.$ac_objext \
6393 conftest$ac_exeext conftest.$ac_ext
a6089b1e 6394 done
f0a93313 6395fi
a6089b1e 6396LIBS=$ac_func_search_save_LIBS
6397fi
6398echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
6399echo "${ECHO_T}$ac_cv_search_strerror" >&6
6400if test "$ac_cv_search_strerror" != no; then
6401 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
f0a93313 6402
f0a93313 6403fi
f0a93313 6404
a6089b1e 6405
6406for ac_func in $funcs
f0a93313 6407do
a6089b1e 6408as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6409echo "$as_me:$LINENO: checking for $ac_func" >&5
6410echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6411if eval "test \"\${$as_ac_var+set}\" = set"; then
6412 echo $ECHO_N "(cached) $ECHO_C" >&6
6413else
6414 if test x$gcc_no_link = xyes; then
6415 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6416echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6417 { (exit 1); exit 1; }; }
6418fi
6419cat >conftest.$ac_ext <<_ACEOF
a6089b1e 6420/* confdefs.h. */
6421_ACEOF
6422cat confdefs.h >>conftest.$ac_ext
6423cat >>conftest.$ac_ext <<_ACEOF
6424/* end confdefs.h. */
f0a93313 6425/* System header to define __stub macros and hopefully few prototypes,
a6089b1e 6426 which can conflict with char $ac_func (); below.
6427 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
fc139dea 6428 <limits.h> exists even on freestanding compilers. Under hpux,
6429 including <limits.h> includes <sys/time.h> and causes problems
6430 checking for functions defined therein. */
6431#if defined (__STDC__) && !defined (_HPUX_SOURCE)
a6089b1e 6432# include <limits.h>
6433#else
6434# include <assert.h>
6435#endif
f0a93313 6436/* Override any gcc2 internal prototype to avoid an error. */
a6089b1e 6437#ifdef __cplusplus
6438extern "C"
6439{
6440#endif
f0a93313 6441/* We use char because int might match the return type of a gcc2
a6089b1e 6442 builtin and then its argument prototype would still apply. */
6443char $ac_func ();
f0a93313 6444/* The GNU C library defines this for functions which it implements
6445 to always fail with ENOSYS. Some functions are actually named
6446 something starting with __ and the normal name is an alias. */
6447#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6448choke me
6449#else
a6089b1e 6450char (*f) () = $ac_func;
6451#endif
6452#ifdef __cplusplus
6453}
f0a93313 6454#endif
6455
a6089b1e 6456int
6457main ()
6458{
6459return f != $ac_func;
6460 ;
6461 return 0;
6462}
6463_ACEOF
6464rm -f conftest.$ac_objext conftest$ac_exeext
6465if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac09b42b 6466 (eval $ac_link) 2>conftest.er1
a6089b1e 6467 ac_status=$?
ac09b42b 6468 grep -v '^ *+' conftest.er1 >conftest.err
6469 rm -f conftest.er1
6470 cat conftest.err >&5
a6089b1e 6471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6472 (exit $ac_status); } &&
0bc5435c 6473 { ac_try='test -z "$ac_c_werror_flag"
6474 || test ! -s conftest.err'
ac09b42b 6475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6476 (eval $ac_try) 2>&5
6477 ac_status=$?
6478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6479 (exit $ac_status); }; } &&
6480 { ac_try='test -s conftest$ac_exeext'
a6089b1e 6481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6482 (eval $ac_try) 2>&5
6483 ac_status=$?
6484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6485 (exit $ac_status); }; }; then
6486 eval "$as_ac_var=yes"
6487else
6488 echo "$as_me: failed program was:" >&5
6489sed 's/^/| /' conftest.$ac_ext >&5
6490
6491eval "$as_ac_var=no"
6492fi
ac09b42b 6493rm -f conftest.err conftest.$ac_objext \
6494 conftest$ac_exeext conftest.$ac_ext
a6089b1e 6495fi
6496echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6497echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6498if test `eval echo '${'$as_ac_var'}'` = yes; then
6499 cat >>confdefs.h <<_ACEOF
6500#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6501_ACEOF
6502
6503else
ac09b42b 6504 case $LIBOBJS in
6505 "$ac_func.$ac_objext" | \
6506 *" $ac_func.$ac_objext" | \
6507 "$ac_func.$ac_objext "* | \
6508 *" $ac_func.$ac_objext "* ) ;;
6509 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
6510esac
6511
f0a93313 6512fi
6513done
6514
6515
a6089b1e 6516 echo "$as_me:$LINENO: checking whether alloca needs Cray hooks" >&5
6517echo $ECHO_N "checking whether alloca needs Cray hooks... $ECHO_C" >&6
6518if test "${ac_cv_os_cray+set}" = set; then
6519 echo $ECHO_N "(cached) $ECHO_C" >&6
f0a93313 6520else
a6089b1e 6521 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 6522/* confdefs.h. */
6523_ACEOF
6524cat confdefs.h >>conftest.$ac_ext
6525cat >>conftest.$ac_ext <<_ACEOF
6526/* end confdefs.h. */
f0a93313 6527#if defined(CRAY) && ! defined(CRAY2)
6528webecray
6529#else
6530wenotbecray
6531#endif
6532
a6089b1e 6533_ACEOF
f0a93313 6534if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
a6089b1e 6535 $EGREP "webecray" >/dev/null 2>&1; then
f0a93313 6536 ac_cv_os_cray=yes
6537else
f0a93313 6538 ac_cv_os_cray=no
6539fi
6540rm -f conftest*
6541
6542fi
a6089b1e 6543echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
6544echo "${ECHO_T}$ac_cv_os_cray" >&6
f0a93313 6545if test $ac_cv_os_cray = yes; then
f8d49ce1 6546 for ac_func in _getb67 GETB67 getb67; do
a6089b1e 6547 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6548echo "$as_me:$LINENO: checking for $ac_func" >&5
6549echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6550if eval "test \"\${$as_ac_var+set}\" = set"; then
6551 echo $ECHO_N "(cached) $ECHO_C" >&6
6552else
6553 if test x$gcc_no_link = xyes; then
6554 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6555echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6556 { (exit 1); exit 1; }; }
6557fi
6558cat >conftest.$ac_ext <<_ACEOF
a6089b1e 6559/* confdefs.h. */
6560_ACEOF
6561cat confdefs.h >>conftest.$ac_ext
6562cat >>conftest.$ac_ext <<_ACEOF
6563/* end confdefs.h. */
f0a93313 6564/* System header to define __stub macros and hopefully few prototypes,
a6089b1e 6565 which can conflict with char $ac_func (); below.
6566 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
fc139dea 6567 <limits.h> exists even on freestanding compilers. Under hpux,
6568 including <limits.h> includes <sys/time.h> and causes problems
6569 checking for functions defined therein. */
6570#if defined (__STDC__) && !defined (_HPUX_SOURCE)
a6089b1e 6571# include <limits.h>
6572#else
6573# include <assert.h>
6574#endif
f0a93313 6575/* Override any gcc2 internal prototype to avoid an error. */
a6089b1e 6576#ifdef __cplusplus
6577extern "C"
6578{
6579#endif
f0a93313 6580/* We use char because int might match the return type of a gcc2
a6089b1e 6581 builtin and then its argument prototype would still apply. */
6582char $ac_func ();
f0a93313 6583/* The GNU C library defines this for functions which it implements
6584 to always fail with ENOSYS. Some functions are actually named
6585 something starting with __ and the normal name is an alias. */
6586#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6587choke me
6588#else
a6089b1e 6589char (*f) () = $ac_func;
6590#endif
6591#ifdef __cplusplus
6592}
f0a93313 6593#endif
6594
a6089b1e 6595int
6596main ()
6597{
6598return f != $ac_func;
6599 ;
6600 return 0;
6601}
6602_ACEOF
6603rm -f conftest.$ac_objext conftest$ac_exeext
6604if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac09b42b 6605 (eval $ac_link) 2>conftest.er1
a6089b1e 6606 ac_status=$?
ac09b42b 6607 grep -v '^ *+' conftest.er1 >conftest.err
6608 rm -f conftest.er1
6609 cat conftest.err >&5
a6089b1e 6610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6611 (exit $ac_status); } &&
0bc5435c 6612 { ac_try='test -z "$ac_c_werror_flag"
6613 || test ! -s conftest.err'
ac09b42b 6614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6615 (eval $ac_try) 2>&5
6616 ac_status=$?
6617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6618 (exit $ac_status); }; } &&
6619 { ac_try='test -s conftest$ac_exeext'
a6089b1e 6620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6621 (eval $ac_try) 2>&5
6622 ac_status=$?
6623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6624 (exit $ac_status); }; }; then
6625 eval "$as_ac_var=yes"
6626else
6627 echo "$as_me: failed program was:" >&5
6628sed 's/^/| /' conftest.$ac_ext >&5
6629
6630eval "$as_ac_var=no"
6631fi
ac09b42b 6632rm -f conftest.err conftest.$ac_objext \
6633 conftest$ac_exeext conftest.$ac_ext
a6089b1e 6634fi
6635echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6636echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6637if test `eval echo '${'$as_ac_var'}'` = yes; then
6638
6639cat >>confdefs.h <<_ACEOF
f0a93313 6640#define CRAY_STACKSEG_END $ac_func
a6089b1e 6641_ACEOF
f0a93313 6642 break
f0a93313 6643fi
6644
f8d49ce1 6645 done
f0a93313 6646fi
6647
a6089b1e 6648echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
6649echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
6650if test "${ac_cv_c_stack_direction+set}" = set; then
6651 echo $ECHO_N "(cached) $ECHO_C" >&6
f0a93313 6652else
6653 if test "$cross_compiling" = yes; then
6654 ac_cv_c_stack_direction=0
6655else
a6089b1e 6656 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 6657/* confdefs.h. */
6658_ACEOF
6659cat confdefs.h >>conftest.$ac_ext
6660cat >>conftest.$ac_ext <<_ACEOF
6661/* end confdefs.h. */
f0a93313 6662find_stack_direction ()
6663{
6664 static char *addr = 0;
6665 auto char dummy;
6666 if (addr == 0)
6667 {
6668 addr = &dummy;
6669 return find_stack_direction ();
6670 }
6671 else
6672 return (&dummy > addr) ? 1 : -1;
6673}
6674main ()
6675{
6676 exit (find_stack_direction() < 0);
6677}
a6089b1e 6678_ACEOF
6679rm -f conftest$ac_exeext
6680if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6681 (eval $ac_link) 2>&5
6682 ac_status=$?
6683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6684 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6686 (eval $ac_try) 2>&5
6687 ac_status=$?
6688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6689 (exit $ac_status); }; }; then
f0a93313 6690 ac_cv_c_stack_direction=1
6691else
a6089b1e 6692 echo "$as_me: program exited with status $ac_status" >&5
6693echo "$as_me: failed program was:" >&5
6694sed 's/^/| /' conftest.$ac_ext >&5
6695
6696( exit $ac_status )
6697ac_cv_c_stack_direction=-1
f0a93313 6698fi
ac09b42b 6699rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
f0a93313 6700fi
f0a93313 6701fi
a6089b1e 6702echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
6703echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
f0a93313 6704
a6089b1e 6705cat >>confdefs.h <<_ACEOF
f0a93313 6706#define STACK_DIRECTION $ac_cv_c_stack_direction
a6089b1e 6707_ACEOF
6708
f0a93313 6709
dde96550 6710
a6089b1e 6711
6712for ac_header in unistd.h vfork.h
6713do
6714as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
90305aaf 6715echo "$as_me:$LINENO: checking for $ac_header" >&5
a6089b1e 6716echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6717if eval "test \"\${$as_ac_Header+set}\" = set"; then
6718 echo $ECHO_N "(cached) $ECHO_C" >&6
a6089b1e 6719else
90305aaf 6720 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 6721/* confdefs.h. */
6722_ACEOF
6723cat confdefs.h >>conftest.$ac_ext
6724cat >>conftest.$ac_ext <<_ACEOF
6725/* end confdefs.h. */
6726#include <$ac_header>
6727_ACEOF
6728if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6729 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6730 ac_status=$?
6731 grep -v '^ *+' conftest.er1 >conftest.err
6732 rm -f conftest.er1
6733 cat conftest.err >&5
6734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6735 (exit $ac_status); } >/dev/null; then
6736 if test -s conftest.err; then
6737 ac_cpp_err=$ac_c_preproc_warn_flag
ac09b42b 6738 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
a6089b1e 6739 else
6740 ac_cpp_err=
6741 fi
f0a93313 6742else
a6089b1e 6743 ac_cpp_err=yes
6744fi
6745if test -z "$ac_cpp_err"; then
90305aaf 6746 eval "$as_ac_Header=yes"
a6089b1e 6747else
6748 echo "$as_me: failed program was:" >&5
6749sed 's/^/| /' conftest.$ac_ext >&5
6750
90305aaf 6751 eval "$as_ac_Header=no"
a6089b1e 6752fi
6753rm -f conftest.err conftest.$ac_ext
f0a93313 6754fi
a6089b1e 6755echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6756echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
a6089b1e 6757if test `eval echo '${'$as_ac_Header'}'` = yes; then
6758 cat >>confdefs.h <<_ACEOF
6759#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6760_ACEOF
f0a93313 6761
f0a93313 6762fi
a6089b1e 6763done
6764
6765
6766
6767for ac_func in fork vfork
6768do
6769as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6770echo "$as_me:$LINENO: checking for $ac_func" >&5
6771echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6772if eval "test \"\${$as_ac_var+set}\" = set"; then
6773 echo $ECHO_N "(cached) $ECHO_C" >&6
6774else
6775 if test x$gcc_no_link = xyes; then
6776 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6777echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6778 { (exit 1); exit 1; }; }
6779fi
6780cat >conftest.$ac_ext <<_ACEOF
a6089b1e 6781/* confdefs.h. */
6782_ACEOF
6783cat confdefs.h >>conftest.$ac_ext
6784cat >>conftest.$ac_ext <<_ACEOF
6785/* end confdefs.h. */
f0a93313 6786/* System header to define __stub macros and hopefully few prototypes,
a6089b1e 6787 which can conflict with char $ac_func (); below.
6788 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
fc139dea 6789 <limits.h> exists even on freestanding compilers. Under hpux,
6790 including <limits.h> includes <sys/time.h> and causes problems
6791 checking for functions defined therein. */
6792#if defined (__STDC__) && !defined (_HPUX_SOURCE)
a6089b1e 6793# include <limits.h>
6794#else
6795# include <assert.h>
6796#endif
f0a93313 6797/* Override any gcc2 internal prototype to avoid an error. */
a6089b1e 6798#ifdef __cplusplus
6799extern "C"
6800{
6801#endif
f0a93313 6802/* We use char because int might match the return type of a gcc2
a6089b1e 6803 builtin and then its argument prototype would still apply. */
6804char $ac_func ();
f0a93313 6805/* The GNU C library defines this for functions which it implements
6806 to always fail with ENOSYS. Some functions are actually named
6807 something starting with __ and the normal name is an alias. */
a6089b1e 6808#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
f0a93313 6809choke me
6810#else
a6089b1e 6811char (*f) () = $ac_func;
6812#endif
6813#ifdef __cplusplus
6814}
f0a93313 6815#endif
6816
a6089b1e 6817int
6818main ()
6819{
6820return f != $ac_func;
6821 ;
6822 return 0;
6823}
6824_ACEOF
6825rm -f conftest.$ac_objext conftest$ac_exeext
6826if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac09b42b 6827 (eval $ac_link) 2>conftest.er1
a6089b1e 6828 ac_status=$?
ac09b42b 6829 grep -v '^ *+' conftest.er1 >conftest.err
6830 rm -f conftest.er1
6831 cat conftest.err >&5
a6089b1e 6832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6833 (exit $ac_status); } &&
0bc5435c 6834 { ac_try='test -z "$ac_c_werror_flag"
6835 || test ! -s conftest.err'
ac09b42b 6836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6837 (eval $ac_try) 2>&5
6838 ac_status=$?
6839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6840 (exit $ac_status); }; } &&
6841 { ac_try='test -s conftest$ac_exeext'
a6089b1e 6842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6843 (eval $ac_try) 2>&5
6844 ac_status=$?
6845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6846 (exit $ac_status); }; }; then
6847 eval "$as_ac_var=yes"
6848else
6849 echo "$as_me: failed program was:" >&5
6850sed 's/^/| /' conftest.$ac_ext >&5
6851
6852eval "$as_ac_var=no"
6853fi
ac09b42b 6854rm -f conftest.err conftest.$ac_objext \
6855 conftest$ac_exeext conftest.$ac_ext
a6089b1e 6856fi
6857echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6858echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6859if test `eval echo '${'$as_ac_var'}'` = yes; then
6860 cat >>confdefs.h <<_ACEOF
6861#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6862_ACEOF
6863
f0a93313 6864fi
a6089b1e 6865done
f0a93313 6866
a6089b1e 6867if test "x$ac_cv_func_fork" = xyes; then
6868 echo "$as_me:$LINENO: checking for working fork" >&5
6869echo $ECHO_N "checking for working fork... $ECHO_C" >&6
6870if test "${ac_cv_func_fork_works+set}" = set; then
6871 echo $ECHO_N "(cached) $ECHO_C" >&6
f0a93313 6872else
a6089b1e 6873 if test "$cross_compiling" = yes; then
6874 ac_cv_func_fork_works=cross
6875else
6876 cat >conftest.$ac_ext <<_ACEOF
6877/* By Ruediger Kuhlmann. */
6878 #include <sys/types.h>
6879 #if HAVE_UNISTD_H
6880 # include <unistd.h>
6881 #endif
6882 /* Some systems only have a dummy stub for fork() */
6883 int main ()
6884 {
ac09b42b 6885 if (fork() < 0)
6886 exit (1);
6887 exit (0);
a6089b1e 6888 }
6889_ACEOF
6890rm -f conftest$ac_exeext
6891if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6892 (eval $ac_link) 2>&5
6893 ac_status=$?
6894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6895 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6897 (eval $ac_try) 2>&5
6898 ac_status=$?
6899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6900 (exit $ac_status); }; }; then
6901 ac_cv_func_fork_works=yes
6902else
6903 echo "$as_me: program exited with status $ac_status" >&5
6904echo "$as_me: failed program was:" >&5
6905sed 's/^/| /' conftest.$ac_ext >&5
6906
6907( exit $ac_status )
6908ac_cv_func_fork_works=no
6909fi
ac09b42b 6910rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a6089b1e 6911fi
6912fi
6913echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
6914echo "${ECHO_T}$ac_cv_func_fork_works" >&6
6915
6916else
6917 ac_cv_func_fork_works=$ac_cv_func_fork
6918fi
6919if test "x$ac_cv_func_fork_works" = xcross; then
6920 case $host in
6921 *-*-amigaos* | *-*-msdosdjgpp*)
6922 # Override, as these systems have only a dummy fork() stub
6923 ac_cv_func_fork_works=no
6924 ;;
6925 *)
6926 ac_cv_func_fork_works=yes
6927 ;;
6928 esac
6929 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
6930echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
f0a93313 6931fi
f0a93313 6932ac_cv_func_vfork_works=$ac_cv_func_vfork
a6089b1e 6933if test "x$ac_cv_func_vfork" = xyes; then
6934 echo "$as_me:$LINENO: checking for working vfork" >&5
6935echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
6936if test "${ac_cv_func_vfork_works+set}" = set; then
6937 echo $ECHO_N "(cached) $ECHO_C" >&6
f0a93313 6938else
a6089b1e 6939 if test "$cross_compiling" = yes; then
6940 ac_cv_func_vfork_works=cross
6941else
6942 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 6943/* confdefs.h. */
6944_ACEOF
6945cat confdefs.h >>conftest.$ac_ext
6946cat >>conftest.$ac_ext <<_ACEOF
6947/* end confdefs.h. */
f0a93313 6948/* Thanks to Paul Eggert for this test. */
6949#include <stdio.h>
a6089b1e 6950#include <stdlib.h>
f0a93313 6951#include <sys/types.h>
6952#include <sys/stat.h>
a6089b1e 6953#include <sys/wait.h>
6954#if HAVE_UNISTD_H
6955# include <unistd.h>
f0a93313 6956#endif
a6089b1e 6957#if HAVE_VFORK_H
6958# include <vfork.h>
f0a93313 6959#endif
6960/* On some sparc systems, changes by the child to local and incoming
a6089b1e 6961 argument registers are propagated back to the parent. The compiler
6962 is told about this with #include <vfork.h>, but some compilers
6963 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
6964 static variable whose address is put into a register that is
6965 clobbered by the vfork. */
6966static void
f0a93313 6967#ifdef __cplusplus
6968sparc_address_test (int arg)
a6089b1e 6969# else
f0a93313 6970sparc_address_test (arg) int arg;
6971#endif
6972{
6973 static pid_t child;
6974 if (!child) {
6975 child = vfork ();
6976 if (child < 0) {
6977 perror ("vfork");
6978 _exit(2);
6979 }
6980 if (!child) {
6981 arg = getpid();
6982 write(-1, "", 0);
6983 _exit (arg);
6984 }
6985 }
6986}
a6089b1e 6987
6988int
6989main ()
6990{
f0a93313 6991 pid_t parent = getpid ();
6992 pid_t child;
6993
a6089b1e 6994 sparc_address_test (0);
f0a93313 6995
6996 child = vfork ();
6997
6998 if (child == 0) {
a6089b1e 6999 /* Here is another test for sparc vfork register problems. This
7000 test uses lots of local variables, at least as many local
7001 variables as main has allocated so far including compiler
7002 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
7003 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
7004 reuse the register of parent for one of the local variables,
7005 since it will think that parent can't possibly be used any more
7006 in this routine. Assigning to the local variable will thus
7007 munge parent in the parent process. */
f0a93313 7008 pid_t
7009 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
7010 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
7011 /* Convince the compiler that p..p7 are live; otherwise, it might
7012 use the same hardware register for all 8 local variables. */
7013 if (p != p1 || p != p2 || p != p3 || p != p4
7014 || p != p5 || p != p6 || p != p7)
7015 _exit(1);
7016
a6089b1e 7017 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
7018 from child file descriptors. If the child closes a descriptor
7019 before it execs or exits, this munges the parent's descriptor
7020 as well. Test for this by closing stdout in the child. */
f0a93313 7021 _exit(close(fileno(stdout)) != 0);
7022 } else {
7023 int status;
7024 struct stat st;
7025
7026 while (wait(&status) != child)
7027 ;
7028 exit(
7029 /* Was there some problem with vforking? */
7030 child < 0
7031
7032 /* Did the child fail? (This shouldn't happen.) */
7033 || status
7034
7035 /* Did the vfork/compiler bug occur? */
7036 || parent != getpid()
7037
7038 /* Did the file descriptor bug occur? */
7039 || fstat(fileno(stdout), &st) != 0
7040 );
7041 }
7042}
a6089b1e 7043_ACEOF
7044rm -f conftest$ac_exeext
7045if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7046 (eval $ac_link) 2>&5
7047 ac_status=$?
7048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7049 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7051 (eval $ac_try) 2>&5
7052 ac_status=$?
7053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7054 (exit $ac_status); }; }; then
f0a93313 7055 ac_cv_func_vfork_works=yes
7056else
a6089b1e 7057 echo "$as_me: program exited with status $ac_status" >&5
7058echo "$as_me: failed program was:" >&5
7059sed 's/^/| /' conftest.$ac_ext >&5
7060
7061( exit $ac_status )
7062ac_cv_func_vfork_works=no
7063fi
ac09b42b 7064rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
f0a93313 7065fi
f0a93313 7066fi
a6089b1e 7067echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
7068echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
f0a93313 7069
a6089b1e 7070fi;
7071if test "x$ac_cv_func_fork_works" = xcross; then
ac09b42b 7072 ac_cv_func_vfork_works=$ac_cv_func_vfork
a6089b1e 7073 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
7074echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
f0a93313 7075fi
7076
a6089b1e 7077if test "x$ac_cv_func_vfork_works" = xyes; then
7078
7079cat >>confdefs.h <<\_ACEOF
7080#define HAVE_WORKING_VFORK 1
7081_ACEOF
7082
7083else
7084
7085cat >>confdefs.h <<\_ACEOF
f0a93313 7086#define vfork fork
a6089b1e 7087_ACEOF
7088
7089fi
7090if test "x$ac_cv_func_fork_works" = xyes; then
7091
7092cat >>confdefs.h <<\_ACEOF
7093#define HAVE_WORKING_FORK 1
7094_ACEOF
f0a93313 7095
7096fi
7097
7098 if test $ac_cv_func_vfork_works = no; then
ac09b42b 7099 case $LIBOBJS in
7100 "vfork.$ac_objext" | \
7101 *" vfork.$ac_objext" | \
7102 "vfork.$ac_objext "* | \
7103 *" vfork.$ac_objext "* ) ;;
7104 *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
7105esac
7106
f0a93313 7107 fi
31972771 7108 # We only need _doprnt if we might use it to implement v*printf.
7109 if test $ac_cv_func_vprintf != yes \
7110 || test $ac_cv_func_vfprintf != yes \
7111 || test $ac_cv_func_vsprintf != yes; then
a6089b1e 7112
7113for ac_func in _doprnt
31972771 7114do
a6089b1e 7115as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7116echo "$as_me:$LINENO: checking for $ac_func" >&5
7117echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7118if eval "test \"\${$as_ac_var+set}\" = set"; then
7119 echo $ECHO_N "(cached) $ECHO_C" >&6
7120else
7121 if test x$gcc_no_link = xyes; then
7122 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7123echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7124 { (exit 1); exit 1; }; }
7125fi
7126cat >conftest.$ac_ext <<_ACEOF
a6089b1e 7127/* confdefs.h. */
7128_ACEOF
7129cat confdefs.h >>conftest.$ac_ext
7130cat >>conftest.$ac_ext <<_ACEOF
7131/* end confdefs.h. */
31972771 7132/* System header to define __stub macros and hopefully few prototypes,
a6089b1e 7133 which can conflict with char $ac_func (); below.
7134 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
fc139dea 7135 <limits.h> exists even on freestanding compilers. Under hpux,
7136 including <limits.h> includes <sys/time.h> and causes problems
7137 checking for functions defined therein. */
7138#if defined (__STDC__) && !defined (_HPUX_SOURCE)
a6089b1e 7139# include <limits.h>
7140#else
7141# include <assert.h>
7142#endif
31972771 7143/* Override any gcc2 internal prototype to avoid an error. */
a6089b1e 7144#ifdef __cplusplus
7145extern "C"
7146{
7147#endif
31972771 7148/* We use char because int might match the return type of a gcc2
a6089b1e 7149 builtin and then its argument prototype would still apply. */
7150char $ac_func ();
31972771 7151/* The GNU C library defines this for functions which it implements
7152 to always fail with ENOSYS. Some functions are actually named
7153 something starting with __ and the normal name is an alias. */
7154#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7155choke me
7156#else
a6089b1e 7157char (*f) () = $ac_func;
7158#endif
7159#ifdef __cplusplus
7160}
31972771 7161#endif
7162
a6089b1e 7163int
7164main ()
7165{
7166return f != $ac_func;
7167 ;
7168 return 0;
7169}
7170_ACEOF
7171rm -f conftest.$ac_objext conftest$ac_exeext
7172if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac09b42b 7173 (eval $ac_link) 2>conftest.er1
a6089b1e 7174 ac_status=$?
ac09b42b 7175 grep -v '^ *+' conftest.er1 >conftest.err
7176 rm -f conftest.er1
7177 cat conftest.err >&5
a6089b1e 7178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7179 (exit $ac_status); } &&
0bc5435c 7180 { ac_try='test -z "$ac_c_werror_flag"
7181 || test ! -s conftest.err'
ac09b42b 7182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7183 (eval $ac_try) 2>&5
7184 ac_status=$?
7185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7186 (exit $ac_status); }; } &&
7187 { ac_try='test -s conftest$ac_exeext'
a6089b1e 7188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7189 (eval $ac_try) 2>&5
7190 ac_status=$?
7191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7192 (exit $ac_status); }; }; then
7193 eval "$as_ac_var=yes"
7194else
7195 echo "$as_me: failed program was:" >&5
7196sed 's/^/| /' conftest.$ac_ext >&5
7197
7198eval "$as_ac_var=no"
7199fi
ac09b42b 7200rm -f conftest.err conftest.$ac_objext \
7201 conftest$ac_exeext conftest.$ac_ext
a6089b1e 7202fi
7203echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7204echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7205if test `eval echo '${'$as_ac_var'}'` = yes; then
7206 cat >>confdefs.h <<_ACEOF
7207#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7208_ACEOF
7209
7210else
ac09b42b 7211 case $LIBOBJS in
7212 "$ac_func.$ac_objext" | \
7213 *" $ac_func.$ac_objext" | \
7214 "$ac_func.$ac_objext "* | \
7215 *" $ac_func.$ac_objext "* ) ;;
7216 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
7217esac
7218
31972771 7219fi
7220done
7221
7222
98b6fc70 7223 else
a6089b1e 7224
7225for ac_func in _doprnt
98b6fc70 7226do
a6089b1e 7227as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7228echo "$as_me:$LINENO: checking for $ac_func" >&5
7229echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7230if eval "test \"\${$as_ac_var+set}\" = set"; then
7231 echo $ECHO_N "(cached) $ECHO_C" >&6
7232else
7233 if test x$gcc_no_link = xyes; then
7234 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7235echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7236 { (exit 1); exit 1; }; }
7237fi
7238cat >conftest.$ac_ext <<_ACEOF
a6089b1e 7239/* confdefs.h. */
7240_ACEOF
7241cat confdefs.h >>conftest.$ac_ext
7242cat >>conftest.$ac_ext <<_ACEOF
7243/* end confdefs.h. */
98b6fc70 7244/* System header to define __stub macros and hopefully few prototypes,
a6089b1e 7245 which can conflict with char $ac_func (); below.
7246 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
fc139dea 7247 <limits.h> exists even on freestanding compilers. Under hpux,
7248 including <limits.h> includes <sys/time.h> and causes problems
7249 checking for functions defined therein. */
7250#if defined (__STDC__) && !defined (_HPUX_SOURCE)
a6089b1e 7251# include <limits.h>
7252#else
7253# include <assert.h>
7254#endif
98b6fc70 7255/* Override any gcc2 internal prototype to avoid an error. */
a6089b1e 7256#ifdef __cplusplus
7257extern "C"
7258{
7259#endif
98b6fc70 7260/* We use char because int might match the return type of a gcc2
a6089b1e 7261 builtin and then its argument prototype would still apply. */
7262char $ac_func ();
98b6fc70 7263/* The GNU C library defines this for functions which it implements
7264 to always fail with ENOSYS. Some functions are actually named
7265 something starting with __ and the normal name is an alias. */
7266#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7267choke me
7268#else
a6089b1e 7269char (*f) () = $ac_func;
7270#endif
7271#ifdef __cplusplus
7272}
98b6fc70 7273#endif
7274
a6089b1e 7275int
7276main ()
7277{
7278return f != $ac_func;
7279 ;
7280 return 0;
7281}
7282_ACEOF
7283rm -f conftest.$ac_objext conftest$ac_exeext
7284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac09b42b 7285 (eval $ac_link) 2>conftest.er1
a6089b1e 7286 ac_status=$?
ac09b42b 7287 grep -v '^ *+' conftest.er1 >conftest.err
7288 rm -f conftest.er1
7289 cat conftest.err >&5
a6089b1e 7290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7291 (exit $ac_status); } &&
0bc5435c 7292 { ac_try='test -z "$ac_c_werror_flag"
7293 || test ! -s conftest.err'
ac09b42b 7294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7295 (eval $ac_try) 2>&5
7296 ac_status=$?
7297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7298 (exit $ac_status); }; } &&
7299 { ac_try='test -s conftest$ac_exeext'
a6089b1e 7300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7301 (eval $ac_try) 2>&5
7302 ac_status=$?
7303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7304 (exit $ac_status); }; }; then
7305 eval "$as_ac_var=yes"
7306else
7307 echo "$as_me: failed program was:" >&5
7308sed 's/^/| /' conftest.$ac_ext >&5
7309
7310eval "$as_ac_var=no"
7311fi
ac09b42b 7312rm -f conftest.err conftest.$ac_objext \
7313 conftest$ac_exeext conftest.$ac_ext
a6089b1e 7314fi
7315echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7316echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7317if test `eval echo '${'$as_ac_var'}'` = yes; then
7318 cat >>confdefs.h <<_ACEOF
7319#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7320_ACEOF
98b6fc70 7321
98b6fc70 7322fi
7323done
7324
31972771 7325 fi
7326
f0a93313 7327 for v in $vars; do
a6089b1e 7328 echo "$as_me:$LINENO: checking for $v" >&5
7329echo $ECHO_N "checking for $v... $ECHO_C" >&6
7330 if eval "test \"\${libiberty_cv_var_$v+set}\" = set"; then
7331 echo $ECHO_N "(cached) $ECHO_C" >&6
7332else
7333 if test x$gcc_no_link = xyes; then
7334 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7335echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7336 { (exit 1); exit 1; }; }
7337fi
7338cat >conftest.$ac_ext <<_ACEOF
a6089b1e 7339/* confdefs.h. */
7340_ACEOF
7341cat confdefs.h >>conftest.$ac_ext
7342cat >>conftest.$ac_ext <<_ACEOF
7343/* end confdefs.h. */
f0a93313 7344int *p;
a6089b1e 7345int
7346main ()
7347{
daa2cd64 7348extern int $v []; p = $v;
a6089b1e 7349 ;
7350 return 0;
7351}
7352_ACEOF
7353rm -f conftest.$ac_objext conftest$ac_exeext
7354if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac09b42b 7355 (eval $ac_link) 2>conftest.er1
a6089b1e 7356 ac_status=$?
ac09b42b 7357 grep -v '^ *+' conftest.er1 >conftest.err
7358 rm -f conftest.er1
7359 cat conftest.err >&5
a6089b1e 7360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7361 (exit $ac_status); } &&
0bc5435c 7362 { ac_try='test -z "$ac_c_werror_flag"
7363 || test ! -s conftest.err'
ac09b42b 7364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7365 (eval $ac_try) 2>&5
7366 ac_status=$?
7367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7368 (exit $ac_status); }; } &&
7369 { ac_try='test -s conftest$ac_exeext'
a6089b1e 7370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7371 (eval $ac_try) 2>&5
7372 ac_status=$?
7373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7374 (exit $ac_status); }; }; then
f0a93313 7375 eval "libiberty_cv_var_$v=yes"
7376else
a6089b1e 7377 echo "$as_me: failed program was:" >&5
7378sed 's/^/| /' conftest.$ac_ext >&5
7379
7380eval "libiberty_cv_var_$v=no"
f0a93313 7381fi
ac09b42b 7382rm -f conftest.err conftest.$ac_objext \
7383 conftest$ac_exeext conftest.$ac_ext
f0a93313 7384fi
7385
7386 if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
a6089b1e 7387 echo "$as_me:$LINENO: result: yes" >&5
7388echo "${ECHO_T}yes" >&6
f0a93313 7389 n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
a6089b1e 7390 cat >>confdefs.h <<_ACEOF
f0a93313 7391#define $n 1
a6089b1e 7392_ACEOF
f0a93313 7393
7394 else
a6089b1e 7395 echo "$as_me:$LINENO: result: no" >&5
7396echo "${ECHO_T}no" >&6
f0a93313 7397 fi
7398 done
5e90539e 7399
7400 # special check for _system_configuration because AIX <4.3.2 do not
7401 # contain the `physmem' member.
a6089b1e 7402 echo "$as_me:$LINENO: checking for external symbol _system_configuration" >&5
7403echo $ECHO_N "checking for external symbol _system_configuration... $ECHO_C" >&6
7404 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 7405/* confdefs.h. */
7406_ACEOF
7407cat confdefs.h >>conftest.$ac_ext
7408cat >>conftest.$ac_ext <<_ACEOF
7409/* end confdefs.h. */
5e90539e 7410#include <sys/systemcfg.h>
a6089b1e 7411int
7412main ()
7413{
5e90539e 7414double x = _system_configuration.physmem;
a6089b1e 7415 ;
7416 return 0;
7417}
7418_ACEOF
7419rm -f conftest.$ac_objext
7420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac09b42b 7421 (eval $ac_compile) 2>conftest.er1
a6089b1e 7422 ac_status=$?
ac09b42b 7423 grep -v '^ *+' conftest.er1 >conftest.err
7424 rm -f conftest.er1
7425 cat conftest.err >&5
a6089b1e 7426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7427 (exit $ac_status); } &&
0bc5435c 7428 { ac_try='test -z "$ac_c_werror_flag"
7429 || test ! -s conftest.err'
ac09b42b 7430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7431 (eval $ac_try) 2>&5
7432 ac_status=$?
7433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7434 (exit $ac_status); }; } &&
7435 { ac_try='test -s conftest.$ac_objext'
a6089b1e 7436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7437 (eval $ac_try) 2>&5
7438 ac_status=$?
7439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7440 (exit $ac_status); }; }; then
7441 echo "$as_me:$LINENO: result: yes" >&5
7442echo "${ECHO_T}yes" >&6
7443
7444cat >>confdefs.h <<\_ACEOF
5e90539e 7445#define HAVE__SYSTEM_CONFIGURATION 1
a6089b1e 7446_ACEOF
5e90539e 7447
7448else
a6089b1e 7449 echo "$as_me: failed program was:" >&5
7450sed 's/^/| /' conftest.$ac_ext >&5
7451
7452echo "$as_me:$LINENO: result: no" >&5
7453echo "${ECHO_T}no" >&6
5e90539e 7454fi
ac09b42b 7455rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a6089b1e 7456
5e90539e 7457
a6089b1e 7458for ac_func in $checkfuncs
f0a93313 7459do
a6089b1e 7460as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7461echo "$as_me:$LINENO: checking for $ac_func" >&5
7462echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7463if eval "test \"\${$as_ac_var+set}\" = set"; then
7464 echo $ECHO_N "(cached) $ECHO_C" >&6
7465else
7466 if test x$gcc_no_link = xyes; then
7467 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7468echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7469 { (exit 1); exit 1; }; }
7470fi
7471cat >conftest.$ac_ext <<_ACEOF
a6089b1e 7472/* confdefs.h. */
7473_ACEOF
7474cat confdefs.h >>conftest.$ac_ext
7475cat >>conftest.$ac_ext <<_ACEOF
7476/* end confdefs.h. */
f0a93313 7477/* System header to define __stub macros and hopefully few prototypes,
a6089b1e 7478 which can conflict with char $ac_func (); below.
7479 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
fc139dea 7480 <limits.h> exists even on freestanding compilers. Under hpux,
7481 including <limits.h> includes <sys/time.h> and causes problems
7482 checking for functions defined therein. */
7483#if defined (__STDC__) && !defined (_HPUX_SOURCE)
a6089b1e 7484# include <limits.h>
7485#else
7486# include <assert.h>
7487#endif
f0a93313 7488/* Override any gcc2 internal prototype to avoid an error. */
a6089b1e 7489#ifdef __cplusplus
7490extern "C"
7491{
7492#endif
f0a93313 7493/* We use char because int might match the return type of a gcc2
a6089b1e 7494 builtin and then its argument prototype would still apply. */
7495char $ac_func ();
f0a93313 7496/* The GNU C library defines this for functions which it implements
7497 to always fail with ENOSYS. Some functions are actually named
7498 something starting with __ and the normal name is an alias. */
7499#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7500choke me
7501#else
a6089b1e 7502char (*f) () = $ac_func;
7503#endif
7504#ifdef __cplusplus
7505}
f0a93313 7506#endif
7507
a6089b1e 7508int
7509main ()
7510{
7511return f != $ac_func;
7512 ;
7513 return 0;
7514}
7515_ACEOF
7516rm -f conftest.$ac_objext conftest$ac_exeext
7517if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac09b42b 7518 (eval $ac_link) 2>conftest.er1
a6089b1e 7519 ac_status=$?
ac09b42b 7520 grep -v '^ *+' conftest.er1 >conftest.err
7521 rm -f conftest.er1
7522 cat conftest.err >&5
a6089b1e 7523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7524 (exit $ac_status); } &&
0bc5435c 7525 { ac_try='test -z "$ac_c_werror_flag"
7526 || test ! -s conftest.err'
ac09b42b 7527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7528 (eval $ac_try) 2>&5
7529 ac_status=$?
7530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7531 (exit $ac_status); }; } &&
7532 { ac_try='test -s conftest$ac_exeext'
a6089b1e 7533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7534 (eval $ac_try) 2>&5
7535 ac_status=$?
7536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7537 (exit $ac_status); }; }; then
7538 eval "$as_ac_var=yes"
7539else
7540 echo "$as_me: failed program was:" >&5
7541sed 's/^/| /' conftest.$ac_ext >&5
7542
7543eval "$as_ac_var=no"
7544fi
ac09b42b 7545rm -f conftest.err conftest.$ac_objext \
7546 conftest$ac_exeext conftest.$ac_ext
a6089b1e 7547fi
7548echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7549echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7550if test `eval echo '${'$as_ac_var'}'` = yes; then
7551 cat >>confdefs.h <<_ACEOF
7552#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7553_ACEOF
f0a93313 7554
f0a93313 7555fi
7556done
7557
a6089b1e 7558 echo "$as_me:$LINENO: checking whether canonicalize_file_name must be declared" >&5
7559echo $ECHO_N "checking whether canonicalize_file_name must be declared... $ECHO_C" >&6
7560if test "${libiberty_cv_decl_needed_canonicalize_file_name+set}" = set; then
7561 echo $ECHO_N "(cached) $ECHO_C" >&6
846a645c 7562else
a6089b1e 7563 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 7564/* confdefs.h. */
7565_ACEOF
7566cat confdefs.h >>conftest.$ac_ext
7567cat >>conftest.$ac_ext <<_ACEOF
7568/* end confdefs.h. */
846a645c 7569
7570#include "confdefs.h"
7571#include <stdio.h>
7572#ifdef HAVE_STRING_H
7573#include <string.h>
7574#else
7575#ifdef HAVE_STRINGS_H
7576#include <strings.h>
7577#endif
7578#endif
7579#ifdef HAVE_STDLIB_H
7580#include <stdlib.h>
7581#endif
7582#ifdef HAVE_UNISTD_H
7583#include <unistd.h>
7584#endif
a6089b1e 7585int
7586main ()
7587{
846a645c 7588char *(*pfn) = (char *(*)) canonicalize_file_name
a6089b1e 7589 ;
7590 return 0;
7591}
7592_ACEOF
7593rm -f conftest.$ac_objext
7594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac09b42b 7595 (eval $ac_compile) 2>conftest.er1
a6089b1e 7596 ac_status=$?
ac09b42b 7597 grep -v '^ *+' conftest.er1 >conftest.err
7598 rm -f conftest.er1
7599 cat conftest.err >&5
a6089b1e 7600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7601 (exit $ac_status); } &&
0bc5435c 7602 { ac_try='test -z "$ac_c_werror_flag"
7603 || test ! -s conftest.err'
ac09b42b 7604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7605 (eval $ac_try) 2>&5
7606 ac_status=$?
7607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7608 (exit $ac_status); }; } &&
7609 { ac_try='test -s conftest.$ac_objext'
a6089b1e 7610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7611 (eval $ac_try) 2>&5
7612 ac_status=$?
7613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7614 (exit $ac_status); }; }; then
846a645c 7615 libiberty_cv_decl_needed_canonicalize_file_name=no
7616else
a6089b1e 7617 echo "$as_me: failed program was:" >&5
7618sed 's/^/| /' conftest.$ac_ext >&5
7619
7620libiberty_cv_decl_needed_canonicalize_file_name=yes
846a645c 7621fi
ac09b42b 7622rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
846a645c 7623fi
7624
a6089b1e 7625echo "$as_me:$LINENO: result: $libiberty_cv_decl_needed_canonicalize_file_name" >&5
7626echo "${ECHO_T}$libiberty_cv_decl_needed_canonicalize_file_name" >&6
846a645c 7627if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then
a6089b1e 7628
7629cat >>confdefs.h <<\_ACEOF
846a645c 7630#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
a6089b1e 7631_ACEOF
846a645c 7632
7633fi
7634
f0a93313 7635fi
7636
8cb0536d 7637# Figure out which version of pexecute to use.
7638case "${host}" in
0bc5435c 7639 *-*-mingw* | *-*-winnt*) pex=./pex-win32 ;;
7640 *-*-msdosdjgpp*) pex=./pex-djgpp ;;
7641 *-*-msdos*) pex=./pex-msdos ;;
7642 *-*-os2-emx*) pex=./pex-os2 ;;
7643 *) pex=./pex-unix ;;
8cb0536d 7644esac
0bc5435c 7645pexecute=${pex}.o
7646ltpexecute=${pex}.lo
7647
8cb0536d 7648
7649
a6089b1e 7650if test x$gcc_no_link = xyes; then
7651 if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
7652 ac_cv_func_mmap_fixed_mapped=no
7653 fi
7654fi
7655if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
7656
7657
7658for ac_header in stdlib.h unistd.h
b3524c8f 7659do
a6089b1e 7660as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
90305aaf 7661echo "$as_me:$LINENO: checking for $ac_header" >&5
a6089b1e 7662echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7663if eval "test \"\${$as_ac_Header+set}\" = set"; then
7664 echo $ECHO_N "(cached) $ECHO_C" >&6
a6089b1e 7665else
90305aaf 7666 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 7667/* confdefs.h. */
7668_ACEOF
7669cat confdefs.h >>conftest.$ac_ext
7670cat >>conftest.$ac_ext <<_ACEOF
7671/* end confdefs.h. */
7672#include <$ac_header>
7673_ACEOF
7674if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7675 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7676 ac_status=$?
7677 grep -v '^ *+' conftest.er1 >conftest.err
7678 rm -f conftest.er1
7679 cat conftest.err >&5
7680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7681 (exit $ac_status); } >/dev/null; then
7682 if test -s conftest.err; then
7683 ac_cpp_err=$ac_c_preproc_warn_flag
ac09b42b 7684 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
a6089b1e 7685 else
7686 ac_cpp_err=
7687 fi
7688else
7689 ac_cpp_err=yes
7690fi
7691if test -z "$ac_cpp_err"; then
90305aaf 7692 eval "$as_ac_Header=yes"
a6089b1e 7693else
7694 echo "$as_me: failed program was:" >&5
7695sed 's/^/| /' conftest.$ac_ext >&5
7696
90305aaf 7697 eval "$as_ac_Header=no"
a6089b1e 7698fi
7699rm -f conftest.err conftest.$ac_ext
b3524c8f 7700fi
a6089b1e 7701echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7702echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
a6089b1e 7703if test `eval echo '${'$as_ac_Header'}'` = yes; then
7704 cat >>confdefs.h <<_ACEOF
7705#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7706_ACEOF
7707
b3524c8f 7708fi
7709done
7710
a6089b1e 7711
b3524c8f 7712for ac_func in getpagesize
7713do
a6089b1e 7714as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7715echo "$as_me:$LINENO: checking for $ac_func" >&5
7716echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7717if eval "test \"\${$as_ac_var+set}\" = set"; then
7718 echo $ECHO_N "(cached) $ECHO_C" >&6
7719else
7720 if test x$gcc_no_link = xyes; then
7721 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7722echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7723 { (exit 1); exit 1; }; }
7724fi
7725cat >conftest.$ac_ext <<_ACEOF
a6089b1e 7726/* confdefs.h. */
7727_ACEOF
7728cat confdefs.h >>conftest.$ac_ext
7729cat >>conftest.$ac_ext <<_ACEOF
7730/* end confdefs.h. */
b3524c8f 7731/* System header to define __stub macros and hopefully few prototypes,
a6089b1e 7732 which can conflict with char $ac_func (); below.
7733 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
fc139dea 7734 <limits.h> exists even on freestanding compilers. Under hpux,
7735 including <limits.h> includes <sys/time.h> and causes problems
7736 checking for functions defined therein. */
7737#if defined (__STDC__) && !defined (_HPUX_SOURCE)
a6089b1e 7738# include <limits.h>
7739#else
7740# include <assert.h>
7741#endif
b3524c8f 7742/* Override any gcc2 internal prototype to avoid an error. */
a6089b1e 7743#ifdef __cplusplus
7744extern "C"
7745{
7746#endif
b3524c8f 7747/* We use char because int might match the return type of a gcc2
a6089b1e 7748 builtin and then its argument prototype would still apply. */
7749char $ac_func ();
b3524c8f 7750/* The GNU C library defines this for functions which it implements
7751 to always fail with ENOSYS. Some functions are actually named
7752 something starting with __ and the normal name is an alias. */
7753#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7754choke me
7755#else
a6089b1e 7756char (*f) () = $ac_func;
7757#endif
7758#ifdef __cplusplus
7759}
b3524c8f 7760#endif
7761
a6089b1e 7762int
7763main ()
7764{
7765return f != $ac_func;
7766 ;
7767 return 0;
7768}
7769_ACEOF
7770rm -f conftest.$ac_objext conftest$ac_exeext
7771if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac09b42b 7772 (eval $ac_link) 2>conftest.er1
a6089b1e 7773 ac_status=$?
ac09b42b 7774 grep -v '^ *+' conftest.er1 >conftest.err
7775 rm -f conftest.er1
7776 cat conftest.err >&5
a6089b1e 7777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7778 (exit $ac_status); } &&
0bc5435c 7779 { ac_try='test -z "$ac_c_werror_flag"
7780 || test ! -s conftest.err'
ac09b42b 7781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7782 (eval $ac_try) 2>&5
7783 ac_status=$?
7784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7785 (exit $ac_status); }; } &&
7786 { ac_try='test -s conftest$ac_exeext'
a6089b1e 7787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7788 (eval $ac_try) 2>&5
7789 ac_status=$?
7790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7791 (exit $ac_status); }; }; then
7792 eval "$as_ac_var=yes"
7793else
7794 echo "$as_me: failed program was:" >&5
7795sed 's/^/| /' conftest.$ac_ext >&5
7796
7797eval "$as_ac_var=no"
7798fi
ac09b42b 7799rm -f conftest.err conftest.$ac_objext \
7800 conftest$ac_exeext conftest.$ac_ext
a6089b1e 7801fi
7802echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7803echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7804if test `eval echo '${'$as_ac_var'}'` = yes; then
7805 cat >>confdefs.h <<_ACEOF
7806#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7807_ACEOF
b3524c8f 7808
b3524c8f 7809fi
7810done
7811
a6089b1e 7812echo "$as_me:$LINENO: checking for working mmap" >&5
7813echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7814if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7815 echo $ECHO_N "(cached) $ECHO_C" >&6
b3524c8f 7816else
7817 if test "$cross_compiling" = yes; then
7818 ac_cv_func_mmap_fixed_mapped=no
7819else
a6089b1e 7820 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 7821/* confdefs.h. */
7822_ACEOF
7823cat confdefs.h >>conftest.$ac_ext
7824cat >>conftest.$ac_ext <<_ACEOF
7825/* end confdefs.h. */
7826$ac_includes_default
7827/* malloc might have been renamed as rpl_malloc. */
7828#undef malloc
b3524c8f 7829
7830/* Thanks to Mike Haertel and Jim Avera for this test.
7831 Here is a matrix of mmap possibilities:
7832 mmap private not fixed
7833 mmap private fixed at somewhere currently unmapped
7834 mmap private fixed at somewhere already mapped
7835 mmap shared not fixed
7836 mmap shared fixed at somewhere currently unmapped
7837 mmap shared fixed at somewhere already mapped
7838 For private mappings, we should verify that changes cannot be read()
7839 back from the file, nor mmap's back from the file at a different
7840 address. (There have been systems where private was not correctly
7841 implemented like the infamous i386 svr4.0, and systems where the
a6089b1e 7842 VM page cache was not coherent with the file system buffer cache
b3524c8f 7843 like early versions of FreeBSD and possibly contemporary NetBSD.)
7844 For shared mappings, we should conversely verify that changes get
a6089b1e 7845 propagated back to all the places they're supposed to be.
b3524c8f 7846
7847 Grep wants private fixed already mapped.
7848 The main things grep needs to know about mmap are:
7849 * does it exist and is it safe to write into the mmap'd area
7850 * how to use it (BSD variants) */
a6089b1e 7851
b3524c8f 7852#include <fcntl.h>
7853#include <sys/mman.h>
7854
a6089b1e 7855#if !STDC_HEADERS && !HAVE_STDLIB_H
7856char *malloc ();
c08775b2 7857#endif
7858
b3524c8f 7859/* This mess was copied from the GNU getpagesize.h. */
a6089b1e 7860#if !HAVE_GETPAGESIZE
b3524c8f 7861/* Assume that all systems that can run configure have sys/param.h. */
a6089b1e 7862# if !HAVE_SYS_PARAM_H
b3524c8f 7863# define HAVE_SYS_PARAM_H 1
7864# endif
7865
7866# ifdef _SC_PAGESIZE
7867# define getpagesize() sysconf(_SC_PAGESIZE)
7868# else /* no _SC_PAGESIZE */
a6089b1e 7869# if HAVE_SYS_PARAM_H
b3524c8f 7870# include <sys/param.h>
7871# ifdef EXEC_PAGESIZE
7872# define getpagesize() EXEC_PAGESIZE
7873# else /* no EXEC_PAGESIZE */
7874# ifdef NBPG
7875# define getpagesize() NBPG * CLSIZE
7876# ifndef CLSIZE
7877# define CLSIZE 1
7878# endif /* no CLSIZE */
7879# else /* no NBPG */
7880# ifdef NBPC
7881# define getpagesize() NBPC
7882# else /* no NBPC */
7883# ifdef PAGESIZE
7884# define getpagesize() PAGESIZE
7885# endif /* PAGESIZE */
7886# endif /* no NBPC */
7887# endif /* no NBPG */
7888# endif /* no EXEC_PAGESIZE */
7889# else /* no HAVE_SYS_PARAM_H */
7890# define getpagesize() 8192 /* punt totally */
7891# endif /* no HAVE_SYS_PARAM_H */
7892# endif /* no _SC_PAGESIZE */
7893
7894#endif /* no HAVE_GETPAGESIZE */
7895
b3524c8f 7896int
a6089b1e 7897main ()
b3524c8f 7898{
a6089b1e 7899 char *data, *data2, *data3;
7900 int i, pagesize;
7901 int fd;
b3524c8f 7902
a6089b1e 7903 pagesize = getpagesize ();
7904
7905 /* First, make a file with some known garbage in it. */
7906 data = (char *) malloc (pagesize);
7907 if (!data)
7908 exit (1);
7909 for (i = 0; i < pagesize; ++i)
7910 *(data + i) = rand ();
7911 umask (0);
7912 fd = creat ("conftest.mmap", 0600);
7913 if (fd < 0)
7914 exit (1);
7915 if (write (fd, data, pagesize) != pagesize)
7916 exit (1);
7917 close (fd);
7918
7919 /* Next, try to mmap the file at a fixed address which already has
7920 something else allocated at it. If we can, also make sure that
7921 we see the same garbage. */
7922 fd = open ("conftest.mmap", O_RDWR);
7923 if (fd < 0)
7924 exit (1);
7925 data2 = (char *) malloc (2 * pagesize);
7926 if (!data2)
7927 exit (1);
ac09b42b 7928 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
a6089b1e 7929 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
ac09b42b 7930 MAP_PRIVATE | MAP_FIXED, fd, 0L))
a6089b1e 7931 exit (1);
7932 for (i = 0; i < pagesize; ++i)
7933 if (*(data + i) != *(data2 + i))
7934 exit (1);
7935
7936 /* Finally, make sure that changes to the mapped area do not
7937 percolate back to the file as seen by read(). (This is a bug on
7938 some variants of i386 svr4.0.) */
7939 for (i = 0; i < pagesize; ++i)
7940 *(data2 + i) = *(data2 + i) + 1;
7941 data3 = (char *) malloc (pagesize);
7942 if (!data3)
7943 exit (1);
7944 if (read (fd, data3, pagesize) != pagesize)
7945 exit (1);
7946 for (i = 0; i < pagesize; ++i)
7947 if (*(data + i) != *(data3 + i))
7948 exit (1);
7949 close (fd);
7950 exit (0);
7951}
7952_ACEOF
7953rm -f conftest$ac_exeext
7954if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7955 (eval $ac_link) 2>&5
7956 ac_status=$?
7957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7958 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7960 (eval $ac_try) 2>&5
7961 ac_status=$?
7962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7963 (exit $ac_status); }; }; then
b3524c8f 7964 ac_cv_func_mmap_fixed_mapped=yes
7965else
a6089b1e 7966 echo "$as_me: program exited with status $ac_status" >&5
7967echo "$as_me: failed program was:" >&5
7968sed 's/^/| /' conftest.$ac_ext >&5
7969
7970( exit $ac_status )
7971ac_cv_func_mmap_fixed_mapped=no
b3524c8f 7972fi
ac09b42b 7973rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b3524c8f 7974fi
b3524c8f 7975fi
a6089b1e 7976echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
7977echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
b3524c8f 7978if test $ac_cv_func_mmap_fixed_mapped = yes; then
a6089b1e 7979
7980cat >>confdefs.h <<\_ACEOF
b3524c8f 7981#define HAVE_MMAP 1
a6089b1e 7982_ACEOF
b3524c8f 7983
7984fi
a6089b1e 7985rm -f conftest.mmap
b3524c8f 7986
a6089b1e 7987fi
b3524c8f 7988
a6089b1e 7989echo "$as_me:$LINENO: checking for working strncmp" >&5
7990echo $ECHO_N "checking for working strncmp... $ECHO_C" >&6
7991if test "${ac_cv_func_strncmp_works+set}" = set; then
7992 echo $ECHO_N "(cached) $ECHO_C" >&6
b3524c8f 7993else
7994 if test "$cross_compiling" = yes; then
7995 ac_cv_func_strncmp_works=no
7996else
a6089b1e 7997 cat >conftest.$ac_ext <<_ACEOF
a6089b1e 7998/* confdefs.h. */
7999_ACEOF
8000cat confdefs.h >>conftest.$ac_ext
8001cat >>conftest.$ac_ext <<_ACEOF
8002/* end confdefs.h. */
b3524c8f 8003
8004/* Test by Jim Wilson and Kaveh Ghazi.
8005 Check whether strncmp reads past the end of its string parameters. */
8006#include <sys/types.h>
8007
8008#ifdef HAVE_FCNTL_H
8009#include <fcntl.h>
8010#endif
8011
8012#ifdef HAVE_SYS_MMAN_H
8013#include <sys/mman.h>
8014#endif
8015
8016#ifndef MAP_ANON
8017#ifdef MAP_ANONYMOUS
8018#define MAP_ANON MAP_ANONYMOUS
8019#else
8020#define MAP_ANON MAP_FILE
8021#endif
8022#endif
8023
8024#ifndef MAP_FILE
8025#define MAP_FILE 0
8026#endif
8027#ifndef O_RDONLY
8028#define O_RDONLY 0
8029#endif
8030
8031#define MAP_LEN 0x10000
8032
8033main ()
8034{
8035#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
8036 char *p;
8037 int dev_zero;
8038
8039 dev_zero = open ("/dev/zero", O_RDONLY);
8040 if (dev_zero < 0)
8041 exit (1);
a6089b1e 8042
b3524c8f 8043 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
8044 MAP_ANON|MAP_PRIVATE, dev_zero, 0);
936c37fd 8045 if (p == (char *)-1)
8046 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
8047 MAP_ANON|MAP_PRIVATE, -1, 0);
b3524c8f 8048 if (p == (char *)-1)
8049 exit (2);
8050 else
8051 {
8052 char *string = "__si_type_info";
8053 char *q = (char *) p + MAP_LEN - strlen (string) - 2;
8054 char *r = (char *) p + 0xe;
8055
8056 strcpy (q, string);
8057 strcpy (r, string);
8058 strncmp (r, q, 14);
8059 }
8060#endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */
8061 exit (0);
8062}
8063
a6089b1e 8064_ACEOF
8065rm -f conftest$ac_exeext
8066if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8067 (eval $ac_link) 2>&5
8068 ac_status=$?
8069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8070 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8072 (eval $ac_try) 2>&5
8073 ac_status=$?
8074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8075 (exit $ac_status); }; }; then
b3524c8f 8076 ac_cv_func_strncmp_works=yes
8077else
a6089b1e 8078 echo "$as_me: program exited with status $ac_status" >&5
8079echo "$as_me: failed program was:" >&5
8080sed 's/^/| /' conftest.$ac_ext >&5
8081
8082( exit $ac_status )
8083ac_cv_func_strncmp_works=no
b3524c8f 8084fi
ac09b42b 8085rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
b3524c8f 8086fi
b3524c8f 8087rm -f core core.* *.core
8088fi
a6089b1e 8089echo "$as_me:$LINENO: result: $ac_cv_func_strncmp_works" >&5
8090echo "${ECHO_T}$ac_cv_func_strncmp_works" >&6
b3524c8f 8091if test $ac_cv_func_strncmp_works = no ; then
ac09b42b 8092 case $LIBOBJS in
8093 "strncmp.$ac_objext" | \
8094 *" strncmp.$ac_objext" | \
8095 "strncmp.$ac_objext "* | \
8096 *" strncmp.$ac_objext "* ) ;;
8097 *) LIBOBJS="$LIBOBJS strncmp.$ac_objext" ;;
8098esac
8099
b3524c8f 8100fi
8101
8102
f0a93313 8103# Install a library built with a cross compiler in $(tooldir) rather
8104# than $(libdir).
804ec1bf 8105if test -z "${with_cross_host}"; then
f0a93313 8106 INSTALL_DEST=libdir
8107else
8108 INSTALL_DEST=tooldir
8109fi
8110
8111
fdf7ca85 8112# Add `./' to avoid VPATH.
8113
8114L=""
8115for l in x $LIBOBJS; do
8116 case $l in
8117 x) ;;
8118 *) L="$L ./$l" ;;
8119 esac
8120done
8121LIBOBJS="$L"
8122
8123
8124L=""
8125for l in x $LTLIBOBJS; do
8126 case $l in
8127 x) ;;
8128 *) L="$L ./$l" ;;
8129 esac
8130done
8131LTLIBOBJS="$L"
8132
8133
8134
f0a93313 8135# We need multilib support, but only if configuring for the target.
a6089b1e 8136 ac_config_files="$ac_config_files Makefile testsuite/Makefile"
6c13736f 8137
a6089b1e 8138 ac_config_commands="$ac_config_commands default"
6c13736f 8139
a6089b1e 8140cat >confcache <<\_ACEOF
f0a93313 8141# This file is a shell script that caches the results of configure
8142# tests run on this system so they can be shared between configure
a6089b1e 8143# scripts and configure runs, see configure's option --config-cache.
8144# It is not useful on other systems. If it contains results you don't
8145# want to keep, you may remove or edit it.
f0a93313 8146#
a6089b1e 8147# config.status only pays attention to the cache file if you give it
8148# the --recheck option to rerun configure.
f0a93313 8149#
a6089b1e 8150# `ac_cv_env_foo' variables (set or unset) will be overridden when
8151# loading this file, other *unset* `ac_cv_foo' will be assigned the
8152# following values.
8153
8154_ACEOF
8155
f0a93313 8156# The following way of writing the cache mishandles newlines in values,
8157# but we know of no workaround that is simple, portable, and efficient.
8158# So, don't put newlines in cache variables' values.
8159# Ultrix sh set writes to stderr and can't be redirected directly,
8160# and sets the high bit in the cache file unless we assign to the vars.
a6089b1e 8161{
8162 (set) 2>&1 |
8163 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8164 *ac_space=\ *)
8165 # `set' does not quote correctly, so add quotes (double-quote
8166 # substitution turns \\\\ into \\, and sed turns \\ into \).
8167 sed -n \
ac09b42b 8168 "s/'/'\\\\''/g;
8169 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
a6089b1e 8170 ;;
8171 *)
8172 # `set' quotes correctly as required by POSIX, so do not add quotes.
8173 sed -n \
ac09b42b 8174 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
a6089b1e 8175 ;;
8176 esac;
8177} |
8178 sed '
8179 t clear
8180 : clear
8181 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
8182 t end
8183 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
8184 : end' >>confcache
8185if diff $cache_file confcache >/dev/null 2>&1; then :; else
f0a93313 8186 if test -w $cache_file; then
a6089b1e 8187 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
8188 cat confcache >$cache_file
f0a93313 8189 else
8190 echo "not updating unwritable cache $cache_file"
8191 fi
8192fi
8193rm -f confcache
8194
f0a93313 8195test "x$prefix" = xNONE && prefix=$ac_default_prefix
8196# Let make expand exec_prefix.
8197test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8198
a6089b1e 8199# VPATH may cause trouble with some makes, so we remove $(srcdir),
8200# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
8201# trailing colons and then remove the whole line if VPATH becomes empty
8202# (actually we leave an empty line to preserve line numbers).
f0a93313 8203if test "x$srcdir" = x.; then
ac09b42b 8204 ac_vpsub='/^[ ]*VPATH[ ]*=/{
a6089b1e 8205s/:*\$(srcdir):*/:/;
8206s/:*\${srcdir}:*/:/;
8207s/:*@srcdir@:*/:/;
ac09b42b 8208s/^\([^=]*=[ ]*\):*/\1/;
a6089b1e 8209s/:*$//;
ac09b42b 8210s/^[^=]*=[ ]*$//;
a6089b1e 8211}'
f0a93313 8212fi
8213
f0a93313 8214DEFS=-DHAVE_CONFIG_H
8215
a6089b1e 8216ac_libobjs=
8217ac_ltlibobjs=
8218for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
8219 # 1. Remove the extension, and $U if already installed.
8220 ac_i=`echo "$ac_i" |
ac09b42b 8221 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
a6089b1e 8222 # 2. Add them.
8223 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
8224 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
8225done
8226LIBOBJS=$ac_libobjs
f0a93313 8227
a6089b1e 8228LTLIBOBJS=$ac_ltlibobjs
8229
8230
8231
8232: ${CONFIG_STATUS=./config.status}
8233ac_clean_files_save=$ac_clean_files
8234ac_clean_files="$ac_clean_files $CONFIG_STATUS"
8235{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
8236echo "$as_me: creating $CONFIG_STATUS" >&6;}
8237cat >$CONFIG_STATUS <<_ACEOF
8238#! $SHELL
8239# Generated by $as_me.
f0a93313 8240# Run this file to recreate the current configuration.
f0a93313 8241# Compiler output produced by configure, useful for debugging
a6089b1e 8242# configure, is in config.log if it exists.
f0a93313 8243
a6089b1e 8244debug=false
8245ac_cs_recheck=false
8246ac_cs_silent=false
8247SHELL=\${CONFIG_SHELL-$SHELL}
8248_ACEOF
8249
8250cat >>$CONFIG_STATUS <<\_ACEOF
8251## --------------------- ##
8252## M4sh Initialization. ##
8253## --------------------- ##
8254
8255# Be Bourne compatible
8256if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
8257 emulate sh
8258 NULLCMD=:
8259 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
8260 # is contrary to our usage. Disable this feature.
8261 alias -g '${1+"$@"}'='"$@"'
8262elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
8263 set -o posix
8264fi
ac09b42b 8265DUALCASE=1; export DUALCASE # for MKS sh
a6089b1e 8266
8267# Support unset when possible.
ac09b42b 8268if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
a6089b1e 8269 as_unset=unset
8270else
8271 as_unset=false
8272fi
8273
8274
8275# Work around bugs in pre-3.0 UWIN ksh.
8276$as_unset ENV MAIL MAILPATH
8277PS1='$ '
8278PS2='> '
8279PS4='+ '
8280
8281# NLS nuisances.
8282for as_var in \
8283 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
8284 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
8285 LC_TELEPHONE LC_TIME
f0a93313 8286do
ac09b42b 8287 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
a6089b1e 8288 eval $as_var=C; export $as_var
8289 else
8290 $as_unset $as_var
8291 fi
f0a93313 8292done
8293
a6089b1e 8294# Required to use basename.
8295if expr a : '\(a\)' >/dev/null 2>&1; then
8296 as_expr=expr
8297else
8298 as_expr=false
8299fi
f0a93313 8300
a6089b1e 8301if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
8302 as_basename=basename
8303else
8304 as_basename=false
8305fi
f0a93313 8306
f0a93313 8307
a6089b1e 8308# Name of the executable.
8309as_me=`$as_basename "$0" ||
8310$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
8311 X"$0" : 'X\(//\)$' \| \
8312 X"$0" : 'X\(/\)$' \| \
8313 . : '\(.\)' 2>/dev/null ||
8314echo X/"$0" |
8315 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
8316 /^X\/\(\/\/\)$/{ s//\1/; q; }
8317 /^X\/\(\/\).*/{ s//\1/; q; }
8318 s/.*/./; q'`
8319
8320
8321# PATH needs CR, and LINENO needs CR and PATH.
8322# Avoid depending upon Character Ranges.
8323as_cr_letters='abcdefghijklmnopqrstuvwxyz'
8324as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
8325as_cr_Letters=$as_cr_letters$as_cr_LETTERS
8326as_cr_digits='0123456789'
8327as_cr_alnum=$as_cr_Letters$as_cr_digits
f0a93313 8328
a6089b1e 8329# The user is always right.
8330if test "${PATH_SEPARATOR+set}" != set; then
8331 echo "#! /bin/sh" >conf$$.sh
8332 echo "exit 0" >>conf$$.sh
8333 chmod +x conf$$.sh
8334 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8335 PATH_SEPARATOR=';'
f0a93313 8336 else
a6089b1e 8337 PATH_SEPARATOR=:
f0a93313 8338 fi
a6089b1e 8339 rm -f conf$$.sh
8340fi
8341
8342
8343 as_lineno_1=$LINENO
8344 as_lineno_2=$LINENO
8345 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
8346 test "x$as_lineno_1" != "x$as_lineno_2" &&
8347 test "x$as_lineno_3" = "x$as_lineno_2" || {
8348 # Find who we are. Look in the path if we contain no path at all
8349 # relative or not.
8350 case $0 in
8351 *[\\/]* ) as_myself=$0 ;;
8352 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8353for as_dir in $PATH
8354do
8355 IFS=$as_save_IFS
8356 test -z "$as_dir" && as_dir=.
8357 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
8358done
8359
8360 ;;
8361 esac
8362 # We did not find ourselves, most probably we were run as `sh COMMAND'
8363 # in which case we are not to be found in the path.
8364 if test "x$as_myself" = x; then
8365 as_myself=$0
8366 fi
8367 if test ! -f "$as_myself"; then
8368 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
8369echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
8370 { (exit 1); exit 1; }; }
8371 fi
8372 case $CONFIG_SHELL in
8373 '')
8374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8375for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
8376do
8377 IFS=$as_save_IFS
8378 test -z "$as_dir" && as_dir=.
8379 for as_base in sh bash ksh sh5; do
8380 case $as_dir in
8381 /*)
8382 if ("$as_dir/$as_base" -c '
8383 as_lineno_1=$LINENO
8384 as_lineno_2=$LINENO
8385 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
8386 test "x$as_lineno_1" != "x$as_lineno_2" &&
8387 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
8388 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
8389 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
8390 CONFIG_SHELL=$as_dir/$as_base
8391 export CONFIG_SHELL
8392 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
8393 fi;;
8394 esac
8395 done
8396done
8397;;
8398 esac
8399
8400 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
8401 # uniformly replaced by the line number. The first 'sed' inserts a
8402 # line-number line before each line; the second 'sed' does the real
8403 # work. The second script uses 'N' to pair each line-number line
8404 # with the numbered line, and appends trailing '-' during
8405 # substitution so that $LINENO is not a special case at line end.
8406 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
8407 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
8408 sed '=' <$as_myself |
8409 sed '
8410 N
8411 s,$,-,
8412 : loop
8413 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
8414 t loop
8415 s,-$,,
8416 s,^['$as_cr_digits']*\n,,
8417 ' >$as_me.lineno &&
8418 chmod +x $as_me.lineno ||
8419 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
8420echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
8421 { (exit 1); exit 1; }; }
8422
8423 # Don't try to exec as it changes $[0], causing all sort of problems
8424 # (the dirname of $[0] is not the place where we might find the
8425 # original and so on. Autoconf is especially sensible to this).
8426 . ./$as_me.lineno
8427 # Exit status is that of the last command.
8428 exit
8429}
8430
8431
8432case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
8433 *c*,-n*) ECHO_N= ECHO_C='
8434' ECHO_T=' ' ;;
8435 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
8436 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
8437esac
8438
8439if expr a : '\(a\)' >/dev/null 2>&1; then
8440 as_expr=expr
8441else
8442 as_expr=false
8443fi
8444
8445rm -f conf$$ conf$$.exe conf$$.file
8446echo >conf$$.file
8447if ln -s conf$$.file conf$$ 2>/dev/null; then
8448 # We could just check for DJGPP; but this test a) works b) is more generic
8449 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
8450 if test -f conf$$.exe; then
8451 # Don't use ln at all; we don't have any links
8452 as_ln_s='cp -p'
f0a93313 8453 else
a6089b1e 8454 as_ln_s='ln -s'
f0a93313 8455 fi
a6089b1e 8456elif ln conf$$.file conf$$ 2>/dev/null; then
8457 as_ln_s=ln
8458else
8459 as_ln_s='cp -p'
8460fi
8461rm -f conf$$ conf$$.exe conf$$.file
8462
8463if mkdir -p . 2>/dev/null; then
8464 as_mkdir_p=:
8465else
ac09b42b 8466 test -d ./-p && rmdir ./-p
a6089b1e 8467 as_mkdir_p=false
8468fi
8469
8470as_executable_p="test -f"
8471
8472# Sed expression to map a string onto a valid CPP name.
ac09b42b 8473as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
a6089b1e 8474
8475# Sed expression to map a string onto a valid variable name.
ac09b42b 8476as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
a6089b1e 8477
8478
8479# IFS
8480# We need space, tab and new line, in precisely that order.
8481as_nl='
8482'
8483IFS=" $as_nl"
8484
8485# CDPATH.
8486$as_unset CDPATH
8487
8488exec 6>&1
8489
8490# Open the log real soon, to keep \$[0] and so on meaningful, and to
8491# report actual input values of CONFIG_FILES etc. instead of their
8492# values after options handling. Logging --version etc. is OK.
8493exec 5>>config.log
8494{
8495 echo
8496 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
8497## Running $as_me. ##
8498_ASBOX
8499} >&5
8500cat >&5 <<_CSEOF
8501
8502This file was extended by $as_me, which was
7f759422 8503generated by GNU Autoconf 2.59. Invocation command line was
a6089b1e 8504
8505 CONFIG_FILES = $CONFIG_FILES
8506 CONFIG_HEADERS = $CONFIG_HEADERS
8507 CONFIG_LINKS = $CONFIG_LINKS
8508 CONFIG_COMMANDS = $CONFIG_COMMANDS
8509 $ $0 $@
8510
8511_CSEOF
8512echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
8513echo >&5
8514_ACEOF
8515
8516# Files that config.status was made for.
8517if test -n "$ac_config_files"; then
8518 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
8519fi
8520
8521if test -n "$ac_config_headers"; then
8522 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
8523fi
8524
8525if test -n "$ac_config_links"; then
8526 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
8527fi
8528
8529if test -n "$ac_config_commands"; then
8530 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
8531fi
8532
8533cat >>$CONFIG_STATUS <<\_ACEOF
8534
8535ac_cs_usage="\
8536\`$as_me' instantiates files from templates according to the
8537current configuration.
8538
8539Usage: $0 [OPTIONS] [FILE]...
8540
8541 -h, --help print this help, then exit
8542 -V, --version print version number, then exit
8543 -q, --quiet do not print progress messages
8544 -d, --debug don't remove temporary files
8545 --recheck update $as_me by reconfiguring in the same conditions
8546 --file=FILE[:TEMPLATE]
ac09b42b 8547 instantiate the configuration file FILE
a6089b1e 8548 --header=FILE[:TEMPLATE]
ac09b42b 8549 instantiate the configuration header FILE
a6089b1e 8550
8551Configuration files:
8552$config_files
8553
8554Configuration headers:
8555$config_headers
8556
8557Configuration commands:
8558$config_commands
8559
8560Report bugs to <bug-autoconf@gnu.org>."
8561_ACEOF
8562
8563cat >>$CONFIG_STATUS <<_ACEOF
8564ac_cs_version="\\
8565config.status
7f759422 8566configured by $0, generated by GNU Autoconf 2.59,
a6089b1e 8567 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
8568
ac09b42b 8569Copyright (C) 2003 Free Software Foundation, Inc.
a6089b1e 8570This config.status script is free software; the Free Software Foundation
8571gives unlimited permission to copy, distribute and modify it."
8572srcdir=$srcdir
8573INSTALL="$INSTALL"
8574_ACEOF
8575
8576cat >>$CONFIG_STATUS <<\_ACEOF
8577# If no file are specified by the user, then we need to provide default
8578# value. By we need to know if files were specified by the user.
8579ac_need_defaults=:
8580while test $# != 0
8581do
8582 case $1 in
8583 --*=*)
8584 ac_option=`expr "x$1" : 'x\([^=]*\)='`
8585 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
8586 ac_shift=:
8587 ;;
8588 -*)
8589 ac_option=$1
8590 ac_optarg=$2
8591 ac_shift=shift
8592 ;;
8593 *) # This is not an option, so the user has probably given explicit
8594 # arguments.
8595 ac_option=$1
8596 ac_need_defaults=false;;
8597 esac
8598
8599 case $ac_option in
8600 # Handling of the options.
8601_ACEOF
8602cat >>$CONFIG_STATUS <<\_ACEOF
8603 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8604 ac_cs_recheck=: ;;
8605 --version | --vers* | -V )
8606 echo "$ac_cs_version"; exit 0 ;;
8607 --he | --h)
8608 # Conflict between --help and --header
8609 { { echo "$as_me:$LINENO: error: ambiguous option: $1
8610Try \`$0 --help' for more information." >&5
8611echo "$as_me: error: ambiguous option: $1
8612Try \`$0 --help' for more information." >&2;}
8613 { (exit 1); exit 1; }; };;
8614 --help | --hel | -h )
8615 echo "$ac_cs_usage"; exit 0 ;;
8616 --debug | --d* | -d )
8617 debug=: ;;
8618 --file | --fil | --fi | --f )
8619 $ac_shift
8620 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
8621 ac_need_defaults=false;;
8622 --header | --heade | --head | --hea )
8623 $ac_shift
8624 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
8625 ac_need_defaults=false;;
8626 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
8627 | -silent | --silent | --silen | --sile | --sil | --si | --s)
8628 ac_cs_silent=: ;;
8629
8630 # This is an error.
8631 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
8632Try \`$0 --help' for more information." >&5
8633echo "$as_me: error: unrecognized option: $1
8634Try \`$0 --help' for more information." >&2;}
8635 { (exit 1); exit 1; }; } ;;
8636
8637 *) ac_config_targets="$ac_config_targets $1" ;;
8638
8639 esac
8640 shift
f0a93313 8641done
a6089b1e 8642
8643ac_configure_extra_args=
8644
8645if $ac_cs_silent; then
8646 exec 6>/dev/null
8647 ac_configure_extra_args="$ac_configure_extra_args --silent"
f0a93313 8648fi
f0a93313 8649
a6089b1e 8650_ACEOF
8651cat >>$CONFIG_STATUS <<_ACEOF
8652if \$ac_cs_recheck; then
8653 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
8654 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
8655fi
f0a93313 8656
a6089b1e 8657_ACEOF
8658
8659cat >>$CONFIG_STATUS <<_ACEOF
8660#
8661# INIT-COMMANDS section.
8662#
8663
8664srcdir=${srcdir}
8665host=${host}
8666target=${target}
8667with_target_subdir=${with_target_subdir}
a6089b1e 8668with_multisubdir=${with_multisubdir}
8669ac_configure_args="--enable-multilib ${ac_configure_args}"
8670CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
8671ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
8672libiberty_topdir=${libiberty_topdir}
8673
8674
8675_ACEOF
8676
8677
8678
8679cat >>$CONFIG_STATUS <<\_ACEOF
8680for ac_config_target in $ac_config_targets
8681do
8682 case "$ac_config_target" in
8683 # Handling of arguments.
8684 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
8685 "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
8686 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
8687 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
8688 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
8689echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
8690 { (exit 1); exit 1; }; };;
f0a93313 8691 esac
a6089b1e 8692done
f0a93313 8693
a6089b1e 8694# If the user did not use the arguments to specify the items to instantiate,
8695# then the envvar interface is used. Set only those that are not.
8696# We use the long form for the default assignment because of an extremely
8697# bizarre bug on SunOS 4.1.3.
8698if $ac_need_defaults; then
8699 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
8700 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
8701 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
8702fi
8703
8704# Have a temporary directory for convenience. Make it in the build tree
8705# simply because there is no reason to put it here, and in addition,
8706# creating and moving files from /tmp can sometimes cause problems.
8707# Create a temporary directory, and hook for its removal unless debugging.
8708$debug ||
8709{
8710 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
8711 trap '{ (exit 1); exit 1; }' 1 2 13 15
8712}
f0a93313 8713
a6089b1e 8714# Create a (secure) tmp directory for tmp files.
8715
8716{
8717 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
8718 test -n "$tmp" && test -d "$tmp"
8719} ||
8720{
8721 tmp=./confstat$$-$RANDOM
8722 (umask 077 && mkdir $tmp)
8723} ||
8724{
8725 echo "$me: cannot create a temporary directory in ." >&2
8726 { (exit 1); exit 1; }
8727}
8728
8729_ACEOF
8730
8731cat >>$CONFIG_STATUS <<_ACEOF
8732
8733#
8734# CONFIG_FILES section.
8735#
8736
8737# No need to generate the scripts if there are no CONFIG_FILES.
8738# This happens for instance when ./config.status config.h
8739if test -n "\$CONFIG_FILES"; then
8740 # Protect against being on the right side of a sed subst in config.status.
8741 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
8742 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
8743s,@SHELL@,$SHELL,;t t
8744s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
8745s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
8746s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
8747s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
8748s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
8749s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
8750s,@exec_prefix@,$exec_prefix,;t t
8751s,@prefix@,$prefix,;t t
8752s,@program_transform_name@,$program_transform_name,;t t
8753s,@bindir@,$bindir,;t t
8754s,@sbindir@,$sbindir,;t t
8755s,@libexecdir@,$libexecdir,;t t
8756s,@datadir@,$datadir,;t t
8757s,@sysconfdir@,$sysconfdir,;t t
8758s,@sharedstatedir@,$sharedstatedir,;t t
8759s,@localstatedir@,$localstatedir,;t t
8760s,@libdir@,$libdir,;t t
8761s,@includedir@,$includedir,;t t
8762s,@oldincludedir@,$oldincludedir,;t t
8763s,@infodir@,$infodir,;t t
8764s,@mandir@,$mandir,;t t
8765s,@build_alias@,$build_alias,;t t
8766s,@host_alias@,$host_alias,;t t
8767s,@target_alias@,$target_alias,;t t
8768s,@DEFS@,$DEFS,;t t
8769s,@ECHO_C@,$ECHO_C,;t t
8770s,@ECHO_N@,$ECHO_N,;t t
8771s,@ECHO_T@,$ECHO_T,;t t
8772s,@LIBS@,$LIBS,;t t
8773s,@libiberty_topdir@,$libiberty_topdir,;t t
8774s,@MAINT@,$MAINT,;t t
8775s,@NOTMAINT@,$NOTMAINT,;t t
8776s,@MAKEINFO@,$MAKEINFO,;t t
8777s,@BUILD_INFO@,$BUILD_INFO,;t t
8778s,@PERL@,$PERL,;t t
8779s,@HAVE_PERL@,$HAVE_PERL,;t t
8780s,@build@,$build,;t t
8781s,@build_cpu@,$build_cpu,;t t
8782s,@build_vendor@,$build_vendor,;t t
8783s,@build_os@,$build_os,;t t
8784s,@host@,$host,;t t
8785s,@host_cpu@,$host_cpu,;t t
8786s,@host_vendor@,$host_vendor,;t t
8787s,@host_os@,$host_os,;t t
8788s,@AR@,$AR,;t t
8789s,@ac_ct_AR@,$ac_ct_AR,;t t
8790s,@RANLIB@,$RANLIB,;t t
8791s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
8792s,@CC@,$CC,;t t
8793s,@CFLAGS@,$CFLAGS,;t t
8794s,@LDFLAGS@,$LDFLAGS,;t t
8795s,@CPPFLAGS@,$CPPFLAGS,;t t
8796s,@ac_ct_CC@,$ac_ct_CC,;t t
8797s,@EXEEXT@,$EXEEXT,;t t
8798s,@OBJEXT@,$OBJEXT,;t t
90305aaf 8799s,@CPP@,$CPP,;t t
fdf7ca85 8800s,@ac_libiberty_warn_cflags@,$ac_libiberty_warn_cflags,;t t
0bc5435c 8801s,@LN_S@,$LN_S,;t t
8802s,@STRIP@,$STRIP,;t t
8803s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
8804s,@LIBTOOL@,$LIBTOOL,;t t
a6089b1e 8805s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
8806s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
8807s,@INSTALL_DATA@,$INSTALL_DATA,;t t
a6089b1e 8808s,@EGREP@,$EGREP,;t t
8809s,@LIBOBJS@,$LIBOBJS,;t t
8810s,@CHECK@,$CHECK,;t t
8811s,@target_header_dir@,$target_header_dir,;t t
8812s,@pexecute@,$pexecute,;t t
0bc5435c 8813s,@ltpexecute@,$ltpexecute,;t t
a6089b1e 8814s,@INSTALL_DEST@,$INSTALL_DEST,;t t
fdf7ca85 8815s,@enable_shared@,$enable_shared,;t t
a6089b1e 8816s,@LTLIBOBJS@,$LTLIBOBJS,;t t
8817/@host_makefile_frag@/r $host_makefile_frag
8818s,@host_makefile_frag@,,;t t
8819CEOF
8820
8821_ACEOF
8822
8823 cat >>$CONFIG_STATUS <<\_ACEOF
8824 # Split the substitutions into bite-sized pieces for seds with
8825 # small command number limits, like on Digital OSF/1 and HP-UX.
8826 ac_max_sed_lines=48
8827 ac_sed_frag=1 # Number of current file.
8828 ac_beg=1 # First line for current file.
8829 ac_end=$ac_max_sed_lines # Line after last line for current file.
8830 ac_more_lines=:
8831 ac_sed_cmds=
8832 while $ac_more_lines; do
8833 if test $ac_beg -gt 1; then
8834 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
8835 else
8836 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
8837 fi
8838 if test ! -s $tmp/subs.frag; then
8839 ac_more_lines=false
8840 else
8841 # The purpose of the label and of the branching condition is to
8842 # speed up the sed processing (if there are no `@' at all, there
8843 # is no need to browse any of the substitutions).
8844 # These are the two extra sed commands mentioned above.
8845 (echo ':t
8846 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
8847 if test -z "$ac_sed_cmds"; then
ac09b42b 8848 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
a6089b1e 8849 else
ac09b42b 8850 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
a6089b1e 8851 fi
8852 ac_sed_frag=`expr $ac_sed_frag + 1`
8853 ac_beg=$ac_end
8854 ac_end=`expr $ac_end + $ac_max_sed_lines`
8855 fi
8856 done
8857 if test -z "$ac_sed_cmds"; then
8858 ac_sed_cmds=cat
f0a93313 8859 fi
a6089b1e 8860fi # test -n "$CONFIG_FILES"
f0a93313 8861
a6089b1e 8862_ACEOF
8863cat >>$CONFIG_STATUS <<\_ACEOF
8864for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
8865 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8866 case $ac_file in
8867 - | *:- | *:-:* ) # input from stdin
ac09b42b 8868 cat >$tmp/stdin
8869 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8870 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
a6089b1e 8871 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac09b42b 8872 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
a6089b1e 8873 * ) ac_file_in=$ac_file.in ;;
f0a93313 8874 esac
8875
a6089b1e 8876 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
8877 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
8878$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ac09b42b 8879 X"$ac_file" : 'X\(//\)[^/]' \| \
8880 X"$ac_file" : 'X\(//\)$' \| \
8881 X"$ac_file" : 'X\(/\)' \| \
8882 . : '\(.\)' 2>/dev/null ||
a6089b1e 8883echo X"$ac_file" |
8884 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8885 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8886 /^X\(\/\/\)$/{ s//\1/; q; }
8887 /^X\(\/\).*/{ s//\1/; q; }
8888 s/.*/./; q'`
8889 { if $as_mkdir_p; then
8890 mkdir -p "$ac_dir"
8891 else
8892 as_dir="$ac_dir"
8893 as_dirs=
8894 while test ! -d "$as_dir"; do
8895 as_dirs="$as_dir $as_dirs"
8896 as_dir=`(dirname "$as_dir") 2>/dev/null ||
8897$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ac09b42b 8898 X"$as_dir" : 'X\(//\)[^/]' \| \
8899 X"$as_dir" : 'X\(//\)$' \| \
8900 X"$as_dir" : 'X\(/\)' \| \
8901 . : '\(.\)' 2>/dev/null ||
a6089b1e 8902echo X"$as_dir" |
8903 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8904 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8905 /^X\(\/\/\)$/{ s//\1/; q; }
8906 /^X\(\/\).*/{ s//\1/; q; }
8907 s/.*/./; q'`
8908 done
8909 test ! -n "$as_dirs" || mkdir $as_dirs
8910 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
8911echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
8912 { (exit 1); exit 1; }; }; }
8913
8914 ac_builddir=.
f0a93313 8915
a6089b1e 8916if test "$ac_dir" != .; then
8917 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
8918 # A "../" for each directory in $ac_dir_suffix.
8919 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
8920else
8921 ac_dir_suffix= ac_top_builddir=
8922fi
8923
8924case $srcdir in
8925 .) # No --srcdir option. We are building in place.
8926 ac_srcdir=.
8927 if test -z "$ac_top_builddir"; then
8928 ac_top_srcdir=.
8929 else
8930 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
8931 fi ;;
8932 [\\/]* | ?:[\\/]* ) # Absolute path.
8933 ac_srcdir=$srcdir$ac_dir_suffix;
8934 ac_top_srcdir=$srcdir ;;
8935 *) # Relative path.
8936 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
8937 ac_top_srcdir=$ac_top_builddir$srcdir ;;
8938esac
7f759422 8939
8940# Do not use `cd foo && pwd` to compute absolute paths, because
8941# the directories may not exist.
8942case `pwd` in
8943.) ac_abs_builddir="$ac_dir";;
ac09b42b 8944*)
7f759422 8945 case "$ac_dir" in
8946 .) ac_abs_builddir=`pwd`;;
8947 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
8948 *) ac_abs_builddir=`pwd`/"$ac_dir";;
ac09b42b 8949 esac;;
8950esac
7f759422 8951case $ac_abs_builddir in
ac09b42b 8952.) ac_abs_top_builddir=${ac_top_builddir}.;;
8953*)
8954 case ${ac_top_builddir}. in
7f759422 8955 .) ac_abs_top_builddir=$ac_abs_builddir;;
ac09b42b 8956 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
7f759422 8957 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
ac09b42b 8958 esac;;
8959esac
7f759422 8960case $ac_abs_builddir in
ac09b42b 8961.) ac_abs_srcdir=$ac_srcdir;;
8962*)
8963 case $ac_srcdir in
7f759422 8964 .) ac_abs_srcdir=$ac_abs_builddir;;
ac09b42b 8965 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
7f759422 8966 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
ac09b42b 8967 esac;;
8968esac
7f759422 8969case $ac_abs_builddir in
ac09b42b 8970.) ac_abs_top_srcdir=$ac_top_srcdir;;
8971*)
8972 case $ac_top_srcdir in
7f759422 8973 .) ac_abs_top_srcdir=$ac_abs_builddir;;
ac09b42b 8974 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
7f759422 8975 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
ac09b42b 8976 esac;;
8977esac
a6089b1e 8978
8979
8980 case $INSTALL in
8981 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
8982 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
f0a93313 8983 esac
8984
0bc5435c 8985 if test x"$ac_file" != x-; then
8986 { echo "$as_me:$LINENO: creating $ac_file" >&5
8987echo "$as_me: creating $ac_file" >&6;}
8988 rm -f "$ac_file"
8989 fi
a6089b1e 8990 # Let's still pretend it is `configure' which instantiates (i.e., don't
8991 # use $as_me), people would be surprised to read:
8992 # /* config.h. Generated by config.status. */
8993 if test x"$ac_file" = x-; then
8994 configure_input=
8995 else
8996 configure_input="$ac_file. "
8997 fi
8998 configure_input=$configure_input"Generated from `echo $ac_file_in |
ac09b42b 8999 sed 's,.*/,,'` by configure."
a6089b1e 9000
9001 # First look for the input files in the build tree, otherwise in the
9002 # src tree.
9003 ac_file_inputs=`IFS=:
9004 for f in $ac_file_in; do
9005 case $f in
9006 -) echo $tmp/stdin ;;
9007 [\\/$]*)
ac09b42b 9008 # Absolute (can't be DOS-style, as IFS=:)
9009 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
a6089b1e 9010echo "$as_me: error: cannot find input file: $f" >&2;}
9011 { (exit 1); exit 1; }; }
ac09b42b 9012 echo "$f";;
a6089b1e 9013 *) # Relative
ac09b42b 9014 if test -f "$f"; then
9015 # Build tree
9016 echo "$f"
9017 elif test -f "$srcdir/$f"; then
9018 # Source tree
9019 echo "$srcdir/$f"
9020 else
9021 # /dev/null tree
9022 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
a6089b1e 9023echo "$as_me: error: cannot find input file: $f" >&2;}
9024 { (exit 1); exit 1; }; }
ac09b42b 9025 fi;;
a6089b1e 9026 esac
9027 done` || { (exit 1); exit 1; }
9028_ACEOF
9029cat >>$CONFIG_STATUS <<_ACEOF
9030 sed "$ac_vpsub
9031$extrasub
9032_ACEOF
9033cat >>$CONFIG_STATUS <<\_ACEOF
9034:t
9035/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
9036s,@configure_input@,$configure_input,;t t
9037s,@srcdir@,$ac_srcdir,;t t
9038s,@abs_srcdir@,$ac_abs_srcdir,;t t
9039s,@top_srcdir@,$ac_top_srcdir,;t t
9040s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
9041s,@builddir@,$ac_builddir,;t t
9042s,@abs_builddir@,$ac_abs_builddir,;t t
9043s,@top_builddir@,$ac_top_builddir,;t t
9044s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
9045s,@INSTALL@,$ac_INSTALL,;t t
9046" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
9047 rm -f $tmp/stdin
9048 if test x"$ac_file" != x-; then
9049 mv $tmp/out $ac_file
9050 else
9051 cat $tmp/out
9052 rm -f $tmp/out
9053 fi
9054
9055done
9056_ACEOF
9057cat >>$CONFIG_STATUS <<\_ACEOF
9058
9059#
9060# CONFIG_HEADER section.
9061#
f0a93313 9062
9063# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9064# NAME is the cpp macro being defined and VALUE is the value it is being given.
9065#
9066# ac_d sets the value in "#define NAME VALUE" lines.
ac09b42b 9067ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9068ac_dB='[ ].*$,\1#\2'
a6089b1e 9069ac_dC=' '
9070ac_dD=',;t'
9071# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac09b42b 9072ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
a6089b1e 9073ac_uB='$,\1#\2define\3'
f0a93313 9074ac_uC=' '
a6089b1e 9075ac_uD=',;t'
9076
9077for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
f0a93313 9078 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
a6089b1e 9079 case $ac_file in
9080 - | *:- | *:-:* ) # input from stdin
ac09b42b 9081 cat >$tmp/stdin
9082 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
9083 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
a6089b1e 9084 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac09b42b 9085 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
a6089b1e 9086 * ) ac_file_in=$ac_file.in ;;
f0a93313 9087 esac
9088
a6089b1e 9089 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
9090echo "$as_me: creating $ac_file" >&6;}
9091
9092 # First look for the input files in the build tree, otherwise in the
9093 # src tree.
9094 ac_file_inputs=`IFS=:
9095 for f in $ac_file_in; do
9096 case $f in
9097 -) echo $tmp/stdin ;;
9098 [\\/$]*)
ac09b42b 9099 # Absolute (can't be DOS-style, as IFS=:)
9100 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
a6089b1e 9101echo "$as_me: error: cannot find input file: $f" >&2;}
9102 { (exit 1); exit 1; }; }
ac09b42b 9103 # Do quote $f, to prevent DOS paths from being IFS'd.
9104 echo "$f";;
a6089b1e 9105 *) # Relative
ac09b42b 9106 if test -f "$f"; then
9107 # Build tree
9108 echo "$f"
9109 elif test -f "$srcdir/$f"; then
9110 # Source tree
9111 echo "$srcdir/$f"
9112 else
9113 # /dev/null tree
9114 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
a6089b1e 9115echo "$as_me: error: cannot find input file: $f" >&2;}
9116 { (exit 1); exit 1; }; }
ac09b42b 9117 fi;;
a6089b1e 9118 esac
9119 done` || { (exit 1); exit 1; }
9120 # Remove the trailing spaces.
ac09b42b 9121 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
a6089b1e 9122
9123_ACEOF
9124
9125# Transform confdefs.h into two sed scripts, `conftest.defines' and
9126# `conftest.undefs', that substitutes the proper values into
9127# config.h.in to produce config.h. The first handles `#define'
9128# templates, and the second `#undef' templates.
9129# And first: Protect against being on the right side of a sed subst in
9130# config.status. Protect against being in an unquoted here document
9131# in config.status.
9132rm -f conftest.defines conftest.undefs
9133# Using a here document instead of a string reduces the quoting nightmare.
9134# Putting comments in sed scripts is not portable.
9135#
9136# `end' is used to avoid that the second main sed command (meant for
9137# 0-ary CPP macros) applies to n-ary macro definitions.
9138# See the Autoconf documentation for `clear'.
9139cat >confdef2sed.sed <<\_ACEOF
9140s/[\\&,]/\\&/g
9141s,[\\$`],\\&,g
9142t clear
9143: clear
ac09b42b 9144s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
a6089b1e 9145t end
ac09b42b 9146s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
a6089b1e 9147: end
9148_ACEOF
9149# If some macros were called several times there might be several times
9150# the same #defines, which is useless. Nevertheless, we may not want to
9151# sort them, since we want the *last* AC-DEFINE to be honored.
9152uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
9153sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
9154rm -f confdef2sed.sed
f0a93313 9155
9156# This sed command replaces #undef with comments. This is necessary, for
9157# example, in the case of _POSIX_SOURCE, which is predefined and required
9158# on some systems where configure will not decide to define it.
a6089b1e 9159cat >>conftest.undefs <<\_ACEOF
ac09b42b 9160s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
a6089b1e 9161_ACEOF
9162
9163# Break up conftest.defines because some shells have a limit on the size
9164# of here documents, and old seds have small limits too (100 cmds).
9165echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
ac09b42b 9166echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
a6089b1e 9167echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
9168echo ' :' >>$CONFIG_STATUS
9169rm -f conftest.tail
9170while grep . conftest.defines >/dev/null
9171do
9172 # Write a limited-size here document to $tmp/defines.sed.
9173 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
9174 # Speed up: don't consider the non `#define' lines.
ac09b42b 9175 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
a6089b1e 9176 # Work around the forget-to-reset-the-flag bug.
9177 echo 't clr' >>$CONFIG_STATUS
9178 echo ': clr' >>$CONFIG_STATUS
9179 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
9180 echo 'CEOF
9181 sed -f $tmp/defines.sed $tmp/in >$tmp/out
9182 rm -f $tmp/in
9183 mv $tmp/out $tmp/in
9184' >>$CONFIG_STATUS
9185 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
9186 rm -f conftest.defines
9187 mv conftest.tail conftest.defines
9188done
9189rm -f conftest.defines
9190echo ' fi # grep' >>$CONFIG_STATUS
9191echo >>$CONFIG_STATUS
f0a93313 9192
a6089b1e 9193# Break up conftest.undefs because some shells have a limit on the size
9194# of here documents, and old seds have small limits too (100 cmds).
9195echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
f0a93313 9196rm -f conftest.tail
a6089b1e 9197while grep . conftest.undefs >/dev/null
f0a93313 9198do
a6089b1e 9199 # Write a limited-size here document to $tmp/undefs.sed.
9200 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
9201 # Speed up: don't consider the non `#undef'
ac09b42b 9202 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
a6089b1e 9203 # Work around the forget-to-reset-the-flag bug.
9204 echo 't clr' >>$CONFIG_STATUS
9205 echo ': clr' >>$CONFIG_STATUS
9206 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
f0a93313 9207 echo 'CEOF
a6089b1e 9208 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
9209 rm -f $tmp/in
9210 mv $tmp/out $tmp/in
9211' >>$CONFIG_STATUS
9212 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
9213 rm -f conftest.undefs
9214 mv conftest.tail conftest.undefs
9215done
9216rm -f conftest.undefs
9217
9218cat >>$CONFIG_STATUS <<\_ACEOF
9219 # Let's still pretend it is `configure' which instantiates (i.e., don't
9220 # use $as_me), people would be surprised to read:
9221 # /* config.h. Generated by config.status. */
9222 if test x"$ac_file" = x-; then
9223 echo "/* Generated by configure. */" >$tmp/config.h
f0a93313 9224 else
a6089b1e 9225 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
f0a93313 9226 fi
a6089b1e 9227 cat $tmp/in >>$tmp/config.h
9228 rm -f $tmp/in
9229 if test x"$ac_file" != x-; then
9230 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
9231 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
9232echo "$as_me: $ac_file is unchanged" >&6;}
9233 else
9234 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
9235$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ac09b42b 9236 X"$ac_file" : 'X\(//\)[^/]' \| \
9237 X"$ac_file" : 'X\(//\)$' \| \
9238 X"$ac_file" : 'X\(/\)' \| \
9239 . : '\(.\)' 2>/dev/null ||
a6089b1e 9240echo X"$ac_file" |
9241 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9242 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9243 /^X\(\/\/\)$/{ s//\1/; q; }
9244 /^X\(\/\).*/{ s//\1/; q; }
9245 s/.*/./; q'`
9246 { if $as_mkdir_p; then
9247 mkdir -p "$ac_dir"
9248 else
9249 as_dir="$ac_dir"
9250 as_dirs=
9251 while test ! -d "$as_dir"; do
9252 as_dirs="$as_dir $as_dirs"
9253 as_dir=`(dirname "$as_dir") 2>/dev/null ||
9254$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ac09b42b 9255 X"$as_dir" : 'X\(//\)[^/]' \| \
9256 X"$as_dir" : 'X\(//\)$' \| \
9257 X"$as_dir" : 'X\(/\)' \| \
9258 . : '\(.\)' 2>/dev/null ||
a6089b1e 9259echo X"$as_dir" |
9260 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9261 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9262 /^X\(\/\/\)$/{ s//\1/; q; }
9263 /^X\(\/\).*/{ s//\1/; q; }
9264 s/.*/./; q'`
9265 done
9266 test ! -n "$as_dirs" || mkdir $as_dirs
9267 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
9268echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
9269 { (exit 1); exit 1; }; }; }
f0a93313 9270
a6089b1e 9271 rm -f $ac_file
9272 mv $tmp/config.h $ac_file
9273 fi
9274 else
9275 cat $tmp/config.h
9276 rm -f $tmp/config.h
9277 fi
9278done
9279_ACEOF
9280cat >>$CONFIG_STATUS <<\_ACEOF
f0a93313 9281
a6089b1e 9282#
9283# CONFIG_COMMANDS section.
9284#
9285for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
9286 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
9287 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
9288 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
9289$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ac09b42b 9290 X"$ac_dest" : 'X\(//\)[^/]' \| \
9291 X"$ac_dest" : 'X\(//\)$' \| \
9292 X"$ac_dest" : 'X\(/\)' \| \
9293 . : '\(.\)' 2>/dev/null ||
a6089b1e 9294echo X"$ac_dest" |
9295 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9296 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9297 /^X\(\/\/\)$/{ s//\1/; q; }
9298 /^X\(\/\).*/{ s//\1/; q; }
9299 s/.*/./; q'`
ac09b42b 9300 { if $as_mkdir_p; then
9301 mkdir -p "$ac_dir"
9302 else
9303 as_dir="$ac_dir"
9304 as_dirs=
9305 while test ! -d "$as_dir"; do
9306 as_dirs="$as_dir $as_dirs"
9307 as_dir=`(dirname "$as_dir") 2>/dev/null ||
9308$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9309 X"$as_dir" : 'X\(//\)[^/]' \| \
9310 X"$as_dir" : 'X\(//\)$' \| \
9311 X"$as_dir" : 'X\(/\)' \| \
9312 . : '\(.\)' 2>/dev/null ||
9313echo X"$as_dir" |
9314 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9315 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9316 /^X\(\/\/\)$/{ s//\1/; q; }
9317 /^X\(\/\).*/{ s//\1/; q; }
9318 s/.*/./; q'`
9319 done
9320 test ! -n "$as_dirs" || mkdir $as_dirs
9321 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
9322echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
9323 { (exit 1); exit 1; }; }; }
9324
a6089b1e 9325 ac_builddir=.
9326
9327if test "$ac_dir" != .; then
9328 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
9329 # A "../" for each directory in $ac_dir_suffix.
9330 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
9331else
9332 ac_dir_suffix= ac_top_builddir=
9333fi
9334
9335case $srcdir in
9336 .) # No --srcdir option. We are building in place.
9337 ac_srcdir=.
9338 if test -z "$ac_top_builddir"; then
9339 ac_top_srcdir=.
9340 else
9341 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
9342 fi ;;
9343 [\\/]* | ?:[\\/]* ) # Absolute path.
9344 ac_srcdir=$srcdir$ac_dir_suffix;
9345 ac_top_srcdir=$srcdir ;;
9346 *) # Relative path.
9347 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
9348 ac_top_srcdir=$ac_top_builddir$srcdir ;;
9349esac
7f759422 9350
9351# Do not use `cd foo && pwd` to compute absolute paths, because
9352# the directories may not exist.
9353case `pwd` in
9354.) ac_abs_builddir="$ac_dir";;
ac09b42b 9355*)
7f759422 9356 case "$ac_dir" in
9357 .) ac_abs_builddir=`pwd`;;
9358 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
9359 *) ac_abs_builddir=`pwd`/"$ac_dir";;
ac09b42b 9360 esac;;
9361esac
7f759422 9362case $ac_abs_builddir in
ac09b42b 9363.) ac_abs_top_builddir=${ac_top_builddir}.;;
9364*)
9365 case ${ac_top_builddir}. in
7f759422 9366 .) ac_abs_top_builddir=$ac_abs_builddir;;
ac09b42b 9367 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
7f759422 9368 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
ac09b42b 9369 esac;;
9370esac
7f759422 9371case $ac_abs_builddir in
ac09b42b 9372.) ac_abs_srcdir=$ac_srcdir;;
9373*)
9374 case $ac_srcdir in
7f759422 9375 .) ac_abs_srcdir=$ac_abs_builddir;;
ac09b42b 9376 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
7f759422 9377 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
ac09b42b 9378 esac;;
9379esac
7f759422 9380case $ac_abs_builddir in
ac09b42b 9381.) ac_abs_top_srcdir=$ac_top_srcdir;;
9382*)
9383 case $ac_top_srcdir in
7f759422 9384 .) ac_abs_top_srcdir=$ac_abs_builddir;;
ac09b42b 9385 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
7f759422 9386 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
ac09b42b 9387 esac;;
9388esac
a6089b1e 9389
9390
9391 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
9392echo "$as_me: executing $ac_dest commands" >&6;}
9393 case $ac_dest in
9394 default ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
f0a93313 9395if test -n "$CONFIG_FILES"; then
b279e2c1 9396 if test -n "${with_target_subdir}"; then
f0a93313 9397 # FIXME: We shouldn't need to set ac_file
9398 ac_file=Makefile
0b045cf7 9399 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
f0a93313 9400 . ${libiberty_topdir}/config-ml.in
9401 fi
a6089b1e 9402fi ;;
9403 esac
9404done
9405_ACEOF
9406
9407cat >>$CONFIG_STATUS <<\_ACEOF
9408
9409{ (exit 0); exit 0; }
9410_ACEOF
f0a93313 9411chmod +x $CONFIG_STATUS
a6089b1e 9412ac_clean_files=$ac_clean_files_save
9413
9414
9415# configure is writing to config.log, and then calls config.status.
9416# config.status does its own redirection, appending to config.log.
9417# Unfortunately, on DOS this fails, as config.log is still kept open
9418# by configure, so config.status won't be able to write to it; its
9419# output is simply discarded. So we exec the FD to /dev/null,
9420# effectively closing config.log, so it can be properly (re)opened and
9421# appended to by config.status. When coming back to configure, we
9422# need to make the FD available again.
9423if test "$no_create" != yes; then
9424 ac_cs_success=:
9425 ac_config_status_args=
9426 test "$silent" = yes &&
9427 ac_config_status_args="$ac_config_status_args --quiet"
9428 exec 5>/dev/null
9429 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
9430 exec 5>>config.log
9431 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
9432 # would make configure fail if this is the last instruction.
9433 $ac_cs_success || { (exit 1); exit 1; }
9434fi
f0a93313 9435