bfd/
[deliverable/binutils-gdb.git] / libiberty / configure
CommitLineData
252b5132 1#! /bin/sh
252b5132 2# Guess values for system-dependent variables and create Makefiles.
85f969cd 3# Generated by GNU Autoconf 2.59.
252b5132 4#
58670637 5# Copyright (C) 2003 Free Software Foundation, Inc.
252b5132
RH
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
2299a76d
DJ
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
58670637 22DUALCASE=1; export DUALCASE # for MKS sh
2299a76d
DJ
23
24# Support unset when possible.
58670637 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
2299a76d
DJ
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
58670637 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
2299a76d
DJ
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
58670637 221 test -d ./-p && rmdir ./-p
2299a76d
DJ
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.
58670637 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
2299a76d
DJ
229
230# Sed expression to map a string onto a valid variable name.
58670637 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
2299a76d
DJ
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
252b5132 250
2299a76d
DJ
251#
252# Initializations.
253#
252b5132 254ac_default_prefix=/usr/local
2299a76d
DJ
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
c779bab8 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 NO_MINUS_C_MINUS_O OUTPUT_OPTION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PICFLAG EGREP LIBOBJS CHECK target_header_dir pexecute INSTALL_DEST datarootdir docdir htmldir LTLIBOBJS'
2299a76d 313ac_subst_files='host_makefile_frag'
c8536f38 314ac_pwd=`pwd`
252b5132
RH
315
316# Initialize some variables set by options.
2299a76d
DJ
317ac_init_help=
318ac_init_version=false
252b5132
RH
319# The variables have the same names as the options, with
320# dashes changed to underlines.
2299a76d 321cache_file=/dev/null
252b5132 322exec_prefix=NONE
252b5132 323no_create=
252b5132
RH
324no_recursion=
325prefix=NONE
326program_prefix=NONE
327program_suffix=NONE
328program_transform_name=s,x,x,
329silent=
330site=
331srcdir=
252b5132
RH
332verbose=
333x_includes=NONE
334x_libraries=NONE
2299a76d
DJ
335
336# Installation directory options.
337# These are left unexpanded so users can "make install exec_prefix=/foo"
338# and all the variables that are supposed to be based on exec_prefix
339# by default will actually change.
340# Use braces instead of parens because sh, perl, etc. also accept them.
252b5132
RH
341bindir='${exec_prefix}/bin'
342sbindir='${exec_prefix}/sbin'
343libexecdir='${exec_prefix}/libexec'
344datadir='${prefix}/share'
345sysconfdir='${prefix}/etc'
346sharedstatedir='${prefix}/com'
347localstatedir='${prefix}/var'
348libdir='${exec_prefix}/lib'
349includedir='${prefix}/include'
350oldincludedir='/usr/include'
351infodir='${prefix}/info'
352mandir='${prefix}/man'
353
252b5132
RH
354ac_prev=
355for ac_option
356do
252b5132
RH
357 # If the previous option needs an argument, assign it.
358 if test -n "$ac_prev"; then
359 eval "$ac_prev=\$ac_option"
360 ac_prev=
361 continue
362 fi
363
2299a76d 364 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
252b5132
RH
365
366 # Accept the important Cygnus configure options, so we can diagnose typos.
367
2299a76d 368 case $ac_option in
252b5132
RH
369
370 -bindir | --bindir | --bindi | --bind | --bin | --bi)
371 ac_prev=bindir ;;
372 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2299a76d 373 bindir=$ac_optarg ;;
252b5132
RH
374
375 -build | --build | --buil | --bui | --bu)
2299a76d 376 ac_prev=build_alias ;;
252b5132 377 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2299a76d 378 build_alias=$ac_optarg ;;
252b5132
RH
379
380 -cache-file | --cache-file | --cache-fil | --cache-fi \
381 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
382 ac_prev=cache_file ;;
383 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
384 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2299a76d
DJ
385 cache_file=$ac_optarg ;;
386
387 --config-cache | -C)
388 cache_file=config.cache ;;
252b5132
RH
389
390 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
391 ac_prev=datadir ;;
392 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
393 | --da=*)
2299a76d 394 datadir=$ac_optarg ;;
252b5132
RH
395
396 -disable-* | --disable-*)
2299a76d 397 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
252b5132 398 # Reject names that are not valid shell variable names.
2299a76d
DJ
399 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
401 { (exit 1); exit 1; }; }
402 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
403 eval "enable_$ac_feature=no" ;;
252b5132
RH
404
405 -enable-* | --enable-*)
2299a76d 406 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252b5132 407 # Reject names that are not valid shell variable names.
2299a76d
DJ
408 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
409 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
410 { (exit 1); exit 1; }; }
411 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
412 case $ac_option in
413 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
252b5132
RH
414 *) ac_optarg=yes ;;
415 esac
2299a76d 416 eval "enable_$ac_feature='$ac_optarg'" ;;
252b5132
RH
417
418 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
419 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
420 | --exec | --exe | --ex)
421 ac_prev=exec_prefix ;;
422 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
423 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
424 | --exec=* | --exe=* | --ex=*)
2299a76d 425 exec_prefix=$ac_optarg ;;
252b5132
RH
426
427 -gas | --gas | --ga | --g)
428 # Obsolete; use --with-gas.
429 with_gas=yes ;;
430
2299a76d
DJ
431 -help | --help | --hel | --he | -h)
432 ac_init_help=long ;;
433 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
434 ac_init_help=recursive ;;
435 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
436 ac_init_help=short ;;
252b5132
RH
437
438 -host | --host | --hos | --ho)
2299a76d 439 ac_prev=host_alias ;;
252b5132 440 -host=* | --host=* | --hos=* | --ho=*)
2299a76d 441 host_alias=$ac_optarg ;;
252b5132
RH
442
443 -includedir | --includedir | --includedi | --included | --include \
444 | --includ | --inclu | --incl | --inc)
445 ac_prev=includedir ;;
446 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
447 | --includ=* | --inclu=* | --incl=* | --inc=*)
2299a76d 448 includedir=$ac_optarg ;;
252b5132
RH
449
450 -infodir | --infodir | --infodi | --infod | --info | --inf)
451 ac_prev=infodir ;;
452 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2299a76d 453 infodir=$ac_optarg ;;
252b5132
RH
454
455 -libdir | --libdir | --libdi | --libd)
456 ac_prev=libdir ;;
457 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2299a76d 458 libdir=$ac_optarg ;;
252b5132
RH
459
460 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
461 | --libexe | --libex | --libe)
462 ac_prev=libexecdir ;;
463 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
464 | --libexe=* | --libex=* | --libe=*)
2299a76d 465 libexecdir=$ac_optarg ;;
252b5132
RH
466
467 -localstatedir | --localstatedir | --localstatedi | --localstated \
468 | --localstate | --localstat | --localsta | --localst \
469 | --locals | --local | --loca | --loc | --lo)
470 ac_prev=localstatedir ;;
471 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
472 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
473 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
2299a76d 474 localstatedir=$ac_optarg ;;
252b5132
RH
475
476 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
477 ac_prev=mandir ;;
478 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2299a76d 479 mandir=$ac_optarg ;;
252b5132
RH
480
481 -nfp | --nfp | --nf)
482 # Obsolete; use --without-fp.
483 with_fp=no ;;
484
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2299a76d 486 | --no-cr | --no-c | -n)
252b5132
RH
487 no_create=yes ;;
488
489 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
490 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
491 no_recursion=yes ;;
492
493 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
494 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
495 | --oldin | --oldi | --old | --ol | --o)
496 ac_prev=oldincludedir ;;
497 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
498 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
499 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2299a76d 500 oldincludedir=$ac_optarg ;;
252b5132
RH
501
502 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
503 ac_prev=prefix ;;
504 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2299a76d 505 prefix=$ac_optarg ;;
252b5132
RH
506
507 -program-prefix | --program-prefix | --program-prefi | --program-pref \
508 | --program-pre | --program-pr | --program-p)
509 ac_prev=program_prefix ;;
510 -program-prefix=* | --program-prefix=* | --program-prefi=* \
511 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2299a76d 512 program_prefix=$ac_optarg ;;
252b5132
RH
513
514 -program-suffix | --program-suffix | --program-suffi | --program-suff \
515 | --program-suf | --program-su | --program-s)
516 ac_prev=program_suffix ;;
517 -program-suffix=* | --program-suffix=* | --program-suffi=* \
518 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2299a76d 519 program_suffix=$ac_optarg ;;
252b5132
RH
520
521 -program-transform-name | --program-transform-name \
522 | --program-transform-nam | --program-transform-na \
523 | --program-transform-n | --program-transform- \
524 | --program-transform | --program-transfor \
525 | --program-transfo | --program-transf \
526 | --program-trans | --program-tran \
527 | --progr-tra | --program-tr | --program-t)
528 ac_prev=program_transform_name ;;
529 -program-transform-name=* | --program-transform-name=* \
530 | --program-transform-nam=* | --program-transform-na=* \
531 | --program-transform-n=* | --program-transform-=* \
532 | --program-transform=* | --program-transfor=* \
533 | --program-transfo=* | --program-transf=* \
534 | --program-trans=* | --program-tran=* \
535 | --progr-tra=* | --program-tr=* | --program-t=*)
2299a76d 536 program_transform_name=$ac_optarg ;;
252b5132
RH
537
538 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
539 | -silent | --silent | --silen | --sile | --sil)
540 silent=yes ;;
541
542 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
543 ac_prev=sbindir ;;
544 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
545 | --sbi=* | --sb=*)
2299a76d 546 sbindir=$ac_optarg ;;
252b5132
RH
547
548 -sharedstatedir | --sharedstatedir | --sharedstatedi \
549 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
550 | --sharedst | --shareds | --shared | --share | --shar \
551 | --sha | --sh)
552 ac_prev=sharedstatedir ;;
553 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
554 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
555 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
556 | --sha=* | --sh=*)
2299a76d 557 sharedstatedir=$ac_optarg ;;
252b5132
RH
558
559 -site | --site | --sit)
560 ac_prev=site ;;
561 -site=* | --site=* | --sit=*)
2299a76d 562 site=$ac_optarg ;;
252b5132
RH
563
564 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
565 ac_prev=srcdir ;;
566 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2299a76d 567 srcdir=$ac_optarg ;;
252b5132
RH
568
569 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
570 | --syscon | --sysco | --sysc | --sys | --sy)
571 ac_prev=sysconfdir ;;
572 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
573 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2299a76d 574 sysconfdir=$ac_optarg ;;
252b5132
RH
575
576 -target | --target | --targe | --targ | --tar | --ta | --t)
2299a76d 577 ac_prev=target_alias ;;
252b5132 578 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2299a76d 579 target_alias=$ac_optarg ;;
252b5132
RH
580
581 -v | -verbose | --verbose | --verbos | --verbo | --verb)
582 verbose=yes ;;
583
2299a76d
DJ
584 -version | --version | --versio | --versi | --vers | -V)
585 ac_init_version=: ;;
252b5132
RH
586
587 -with-* | --with-*)
2299a76d 588 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
252b5132 589 # Reject names that are not valid shell variable names.
2299a76d
DJ
590 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
591 { echo "$as_me: error: invalid package name: $ac_package" >&2
592 { (exit 1); exit 1; }; }
252b5132 593 ac_package=`echo $ac_package| sed 's/-/_/g'`
2299a76d
DJ
594 case $ac_option in
595 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
252b5132
RH
596 *) ac_optarg=yes ;;
597 esac
2299a76d 598 eval "with_$ac_package='$ac_optarg'" ;;
252b5132
RH
599
600 -without-* | --without-*)
2299a76d 601 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
252b5132 602 # Reject names that are not valid shell variable names.
2299a76d
DJ
603 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
604 { echo "$as_me: error: invalid package name: $ac_package" >&2
605 { (exit 1); exit 1; }; }
606 ac_package=`echo $ac_package | sed 's/-/_/g'`
607 eval "with_$ac_package=no" ;;
252b5132
RH
608
609 --x)
610 # Obsolete; use --with-x.
611 with_x=yes ;;
612
613 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
614 | --x-incl | --x-inc | --x-in | --x-i)
615 ac_prev=x_includes ;;
616 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
617 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2299a76d 618 x_includes=$ac_optarg ;;
252b5132
RH
619
620 -x-libraries | --x-libraries | --x-librarie | --x-librari \
621 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
622 ac_prev=x_libraries ;;
623 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
624 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2299a76d 625 x_libraries=$ac_optarg ;;
252b5132 626
2299a76d
DJ
627 -*) { echo "$as_me: error: unrecognized option: $ac_option
628Try \`$0 --help' for more information." >&2
629 { (exit 1); exit 1; }; }
252b5132
RH
630 ;;
631
2299a76d
DJ
632 *=*)
633 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
634 # Reject names that are not valid shell variable names.
635 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
636 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
637 { (exit 1); exit 1; }; }
638 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
639 eval "$ac_envvar='$ac_optarg'"
640 export $ac_envvar ;;
641
252b5132 642 *)
2299a76d
DJ
643 # FIXME: should be removed in autoconf 3.0.
644 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
645 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
646 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
647 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
252b5132
RH
648 ;;
649
650 esac
651done
652
653if test -n "$ac_prev"; then
2299a76d
DJ
654 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
655 { echo "$as_me: error: missing argument to $ac_option" >&2
656 { (exit 1); exit 1; }; }
252b5132 657fi
252b5132 658
2299a76d
DJ
659# Be sure to have absolute paths.
660for ac_var in exec_prefix prefix
661do
662 eval ac_val=$`echo $ac_var`
663 case $ac_val in
664 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
665 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
666 { (exit 1); exit 1; }; };;
667 esac
668done
252b5132 669
2299a76d
DJ
670# Be sure to have absolute paths.
671for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
58670637 672 localstatedir libdir includedir oldincludedir infodir mandir
252b5132 673do
2299a76d
DJ
674 eval ac_val=$`echo $ac_var`
675 case $ac_val in
676 [\\/$]* | ?:[\\/]* ) ;;
677 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
678 { (exit 1); exit 1; }; };;
252b5132
RH
679 esac
680done
681
2299a76d
DJ
682# There might be people who depend on the old broken behavior: `$host'
683# used to hold the argument of --host etc.
684# FIXME: To remove some day.
685build=$build_alias
686host=$host_alias
687target=$target_alias
688
689# FIXME: To remove some day.
690if test "x$host_alias" != x; then
691 if test "x$build_alias" = x; then
692 cross_compiling=maybe
693 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
694 If a cross compiler is detected then cross compile mode will be used." >&2
695 elif test "x$build_alias" != "x$host_alias"; then
696 cross_compiling=yes
697 fi
698fi
252b5132 699
2299a76d
DJ
700ac_tool_prefix=
701test -n "$host_alias" && ac_tool_prefix=$host_alias-
702
703test "$silent" = yes && exec 6>/dev/null
252b5132 704
252b5132
RH
705
706# Find the source files, if location was not specified.
707if test -z "$srcdir"; then
708 ac_srcdir_defaulted=yes
709 # Try the directory containing this script, then its parent.
2299a76d
DJ
710 ac_confdir=`(dirname "$0") 2>/dev/null ||
711$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58670637
DD
712 X"$0" : 'X\(//\)[^/]' \| \
713 X"$0" : 'X\(//\)$' \| \
714 X"$0" : 'X\(/\)' \| \
715 . : '\(.\)' 2>/dev/null ||
2299a76d
DJ
716echo X"$0" |
717 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
718 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
719 /^X\(\/\/\)$/{ s//\1/; q; }
720 /^X\(\/\).*/{ s//\1/; q; }
721 s/.*/./; q'`
252b5132
RH
722 srcdir=$ac_confdir
723 if test ! -r $srcdir/$ac_unique_file; then
724 srcdir=..
725 fi
726else
727 ac_srcdir_defaulted=no
728fi
729if test ! -r $srcdir/$ac_unique_file; then
730 if test "$ac_srcdir_defaulted" = yes; then
2299a76d
DJ
731 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
732 { (exit 1); exit 1; }; }
252b5132 733 else
2299a76d
DJ
734 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
735 { (exit 1); exit 1; }; }
252b5132
RH
736 fi
737fi
2299a76d
DJ
738(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
739 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
740 { (exit 1); exit 1; }; }
741srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
742ac_env_build_alias_set=${build_alias+set}
743ac_env_build_alias_value=$build_alias
744ac_cv_env_build_alias_set=${build_alias+set}
745ac_cv_env_build_alias_value=$build_alias
746ac_env_host_alias_set=${host_alias+set}
747ac_env_host_alias_value=$host_alias
748ac_cv_env_host_alias_set=${host_alias+set}
749ac_cv_env_host_alias_value=$host_alias
750ac_env_target_alias_set=${target_alias+set}
751ac_env_target_alias_value=$target_alias
752ac_cv_env_target_alias_set=${target_alias+set}
753ac_cv_env_target_alias_value=$target_alias
754ac_env_CC_set=${CC+set}
755ac_env_CC_value=$CC
756ac_cv_env_CC_set=${CC+set}
757ac_cv_env_CC_value=$CC
758ac_env_CFLAGS_set=${CFLAGS+set}
759ac_env_CFLAGS_value=$CFLAGS
760ac_cv_env_CFLAGS_set=${CFLAGS+set}
761ac_cv_env_CFLAGS_value=$CFLAGS
762ac_env_LDFLAGS_set=${LDFLAGS+set}
763ac_env_LDFLAGS_value=$LDFLAGS
764ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
765ac_cv_env_LDFLAGS_value=$LDFLAGS
766ac_env_CPPFLAGS_set=${CPPFLAGS+set}
767ac_env_CPPFLAGS_value=$CPPFLAGS
768ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_cv_env_CPPFLAGS_value=$CPPFLAGS
770ac_env_CPP_set=${CPP+set}
771ac_env_CPP_value=$CPP
772ac_cv_env_CPP_set=${CPP+set}
773ac_cv_env_CPP_value=$CPP
774
775#
776# Report the --help message.
777#
778if test "$ac_init_help" = "long"; then
779 # Omit some internal or obsolete options to make the list less imposing.
780 # This message is too long to be a string in the A/UX 3.1 sh.
781 cat <<_ACEOF
782\`configure' configures this package to adapt to many kinds of systems.
783
784Usage: $0 [OPTION]... [VAR=VALUE]...
785
786To assign environment variables (e.g., CC, CFLAGS...), specify them as
787VAR=VALUE. See below for descriptions of some of the useful variables.
788
789Defaults for the options are specified in brackets.
790
791Configuration:
792 -h, --help display this help and exit
793 --help=short display options specific to this package
794 --help=recursive display the short help of all the included packages
795 -V, --version display version information and exit
796 -q, --quiet, --silent do not print \`checking...' messages
797 --cache-file=FILE cache test results in FILE [disabled]
798 -C, --config-cache alias for \`--cache-file=config.cache'
799 -n, --no-create do not create output files
800 --srcdir=DIR find the sources in DIR [configure dir or \`..']
801
802_ACEOF
803
804 cat <<_ACEOF
805Installation directories:
806 --prefix=PREFIX install architecture-independent files in PREFIX
58670637 807 [$ac_default_prefix]
2299a76d 808 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
58670637 809 [PREFIX]
2299a76d
DJ
810
811By default, \`make install' will install all the files in
812\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
813an installation prefix other than \`$ac_default_prefix' using \`--prefix',
814for instance \`--prefix=\$HOME'.
815
816For better control, use the options below.
817
818Fine tuning of the installation directories:
819 --bindir=DIR user executables [EPREFIX/bin]
820 --sbindir=DIR system admin executables [EPREFIX/sbin]
821 --libexecdir=DIR program executables [EPREFIX/libexec]
822 --datadir=DIR read-only architecture-independent data [PREFIX/share]
823 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
824 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
825 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
826 --libdir=DIR object code libraries [EPREFIX/lib]
827 --includedir=DIR C header files [PREFIX/include]
828 --oldincludedir=DIR C header files for non-gcc [/usr/include]
829 --infodir=DIR info documentation [PREFIX/info]
830 --mandir=DIR man documentation [PREFIX/man]
831_ACEOF
832
833 cat <<\_ACEOF
834
835System types:
836 --build=BUILD configure for building on BUILD [guessed]
837 --host=HOST cross-compile to build programs to run on HOST [BUILD]
838_ACEOF
839fi
840
841if test -n "$ac_init_help"; then
842
843 cat <<\_ACEOF
844
845Optional Features:
846 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
847 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
848 --enable-maintainer-mode
849 enable make rules and dependencies not useful
850 (and sometimes confusing) to the casual installer
958afec3 851 --enable-multilib build many library versions (default)
d053aef8 852 --disable-largefile omit support for large files
2299a76d
DJ
853 --enable-install-libiberty Install headers for end users
854
855Optional Packages:
856 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
857 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
858 --with-target-subdir=SUBDIR Configuring in a subdirectory for target
859 --with-build-subdir=SUBDIR Configuring in a subdirectory for build
860 --with-cross-host=HOST Configuring with a cross compiler
861 --with-newlib Configuring with newlib
862
863Some influential environment variables:
864 CC C compiler command
865 CFLAGS C compiler flags
866 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
867 nonstandard directory <lib dir>
868 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
869 headers in a nonstandard directory <include dir>
870 CPP C preprocessor
871
872Use these variables to override the choices made by `configure' or to help
873it to find libraries and programs with nonstandard names/locations.
874
875_ACEOF
876fi
877
878if test "$ac_init_help" = "recursive"; then
879 # If there are subdirs, report their specific --help.
880 ac_popdir=`pwd`
881 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
882 test -d $ac_dir || continue
883 ac_builddir=.
884
885if test "$ac_dir" != .; then
886 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
887 # A "../" for each directory in $ac_dir_suffix.
888 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
889else
890 ac_dir_suffix= ac_top_builddir=
891fi
892
893case $srcdir in
894 .) # No --srcdir option. We are building in place.
895 ac_srcdir=.
896 if test -z "$ac_top_builddir"; then
897 ac_top_srcdir=.
898 else
899 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
900 fi ;;
901 [\\/]* | ?:[\\/]* ) # Absolute path.
902 ac_srcdir=$srcdir$ac_dir_suffix;
903 ac_top_srcdir=$srcdir ;;
904 *) # Relative path.
905 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
906 ac_top_srcdir=$ac_top_builddir$srcdir ;;
907esac
85f969cd
DD
908
909# Do not use `cd foo && pwd` to compute absolute paths, because
910# the directories may not exist.
911case `pwd` in
912.) ac_abs_builddir="$ac_dir";;
58670637 913*)
85f969cd
DD
914 case "$ac_dir" in
915 .) ac_abs_builddir=`pwd`;;
916 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
917 *) ac_abs_builddir=`pwd`/"$ac_dir";;
58670637
DD
918 esac;;
919esac
85f969cd 920case $ac_abs_builddir in
58670637
DD
921.) ac_abs_top_builddir=${ac_top_builddir}.;;
922*)
923 case ${ac_top_builddir}. in
85f969cd 924 .) ac_abs_top_builddir=$ac_abs_builddir;;
58670637 925 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
85f969cd 926 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
58670637
DD
927 esac;;
928esac
85f969cd 929case $ac_abs_builddir in
58670637
DD
930.) ac_abs_srcdir=$ac_srcdir;;
931*)
932 case $ac_srcdir in
85f969cd 933 .) ac_abs_srcdir=$ac_abs_builddir;;
58670637 934 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
85f969cd 935 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
58670637
DD
936 esac;;
937esac
85f969cd 938case $ac_abs_builddir in
58670637
DD
939.) ac_abs_top_srcdir=$ac_top_srcdir;;
940*)
941 case $ac_top_srcdir in
85f969cd 942 .) ac_abs_top_srcdir=$ac_abs_builddir;;
58670637 943 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
85f969cd 944 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
58670637
DD
945 esac;;
946esac
2299a76d
DJ
947
948 cd $ac_dir
949 # Check for guested configure; otherwise get Cygnus style configure.
950 if test -f $ac_srcdir/configure.gnu; then
951 echo
952 $SHELL $ac_srcdir/configure.gnu --help=recursive
953 elif test -f $ac_srcdir/configure; then
954 echo
955 $SHELL $ac_srcdir/configure --help=recursive
956 elif test -f $ac_srcdir/configure.ac ||
58670637 957 test -f $ac_srcdir/configure.in; then
2299a76d
DJ
958 echo
959 $ac_configure --help
960 else
961 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
962 fi
fd7d450d 963 cd $ac_popdir
2299a76d
DJ
964 done
965fi
966
967test -n "$ac_init_help" && exit 0
968if $ac_init_version; then
969 cat <<\_ACEOF
970
58670637 971Copyright (C) 2003 Free Software Foundation, Inc.
2299a76d
DJ
972This configure script is free software; the Free Software Foundation
973gives unlimited permission to copy, distribute and modify it.
974_ACEOF
975 exit 0
976fi
977exec 5>config.log
978cat >&5 <<_ACEOF
979This file contains any messages produced by compilers while
980running configure, to aid debugging if configure makes a mistake.
981
982It was created by $as_me, which was
85f969cd 983generated by GNU Autoconf 2.59. Invocation command line was
2299a76d
DJ
984
985 $ $0 $@
986
987_ACEOF
988{
989cat <<_ASUNAME
990## --------- ##
991## Platform. ##
992## --------- ##
993
994hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
995uname -m = `(uname -m) 2>/dev/null || echo unknown`
996uname -r = `(uname -r) 2>/dev/null || echo unknown`
997uname -s = `(uname -s) 2>/dev/null || echo unknown`
998uname -v = `(uname -v) 2>/dev/null || echo unknown`
999
1000/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1001/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1002
1003/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1004/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1005/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1006hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1007/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1008/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1009/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1010
1011_ASUNAME
1012
1013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1014for as_dir in $PATH
1015do
1016 IFS=$as_save_IFS
1017 test -z "$as_dir" && as_dir=.
1018 echo "PATH: $as_dir"
1019done
1020
1021} >&5
1022
1023cat >&5 <<_ACEOF
1024
1025
1026## ----------- ##
1027## Core tests. ##
1028## ----------- ##
252b5132 1029
2299a76d
DJ
1030_ACEOF
1031
1032
1033# Keep a trace of the command line.
1034# Strip out --no-create and --no-recursion so they do not pile up.
1035# Strip out --silent because we don't want to record it for future runs.
1036# Also quote any args containing shell meta-characters.
1037# Make two passes to allow for proper duplicate-argument suppression.
1038ac_configure_args=
1039ac_configure_args0=
1040ac_configure_args1=
1041ac_sep=
1042ac_must_keep_next=false
1043for ac_pass in 1 2
1044do
1045 for ac_arg
1046 do
1047 case $ac_arg in
1048 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1049 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1050 | -silent | --silent | --silen | --sile | --sil)
1051 continue ;;
1052 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1053 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1054 esac
1055 case $ac_pass in
1056 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1057 2)
1058 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1059 if test $ac_must_keep_next = true; then
58670637 1060 ac_must_keep_next=false # Got value, back to normal.
2299a76d 1061 else
58670637
DD
1062 case $ac_arg in
1063 *=* | --config-cache | -C | -disable-* | --disable-* \
1064 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1065 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1066 | -with-* | --with-* | -without-* | --without-* | --x)
1067 case "$ac_configure_args0 " in
1068 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1069 esac
1070 ;;
1071 -* ) ac_must_keep_next=true ;;
1072 esac
2299a76d
DJ
1073 fi
1074 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1075 # Get rid of the leading space.
1076 ac_sep=" "
1077 ;;
1078 esac
1079 done
1080done
1081$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1082$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1083
1084# When interrupted or exit'd, cleanup temporary files, and complete
1085# config.log. We remove comments because anyway the quotes in there
1086# would cause problems or look ugly.
1087# WARNING: Be sure not to use single quotes in there, as some shells,
1088# such as our DU 5.0 friend, will then `close' the trap.
1089trap 'exit_status=$?
1090 # Save into config.log some information that might help in debugging.
1091 {
1092 echo
1093
1094 cat <<\_ASBOX
1095## ---------------- ##
1096## Cache variables. ##
1097## ---------------- ##
1098_ASBOX
1099 echo
1100 # The following way of writing the cache mishandles newlines in values,
1101{
1102 (set) 2>&1 |
1103 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1104 *ac_space=\ *)
1105 sed -n \
58670637
DD
1106 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1107 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
2299a76d
DJ
1108 ;;
1109 *)
1110 sed -n \
58670637 1111 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
2299a76d
DJ
1112 ;;
1113 esac;
1114}
1115 echo
1116
1117 cat <<\_ASBOX
1118## ----------------- ##
1119## Output variables. ##
1120## ----------------- ##
1121_ASBOX
1122 echo
1123 for ac_var in $ac_subst_vars
1124 do
1125 eval ac_val=$`echo $ac_var`
1126 echo "$ac_var='"'"'$ac_val'"'"'"
1127 done | sort
1128 echo
1129
1130 if test -n "$ac_subst_files"; then
1131 cat <<\_ASBOX
1132## ------------- ##
1133## Output files. ##
1134## ------------- ##
1135_ASBOX
1136 echo
1137 for ac_var in $ac_subst_files
1138 do
1139 eval ac_val=$`echo $ac_var`
58670637 1140 echo "$ac_var='"'"'$ac_val'"'"'"
2299a76d
DJ
1141 done | sort
1142 echo
1143 fi
1144
1145 if test -s confdefs.h; then
1146 cat <<\_ASBOX
1147## ----------- ##
1148## confdefs.h. ##
1149## ----------- ##
1150_ASBOX
1151 echo
1152 sed "/^$/d" confdefs.h | sort
1153 echo
1154 fi
1155 test "$ac_signal" != 0 &&
1156 echo "$as_me: caught signal $ac_signal"
1157 echo "$as_me: exit $exit_status"
1158 } >&5
58670637 1159 rm -f core *.core &&
2299a76d
DJ
1160 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1161 exit $exit_status
1162 ' 0
1163for ac_signal in 1 2 13 15; do
1164 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1165done
1166ac_signal=0
1167
1168# confdefs.h avoids OS command line length limits that DEFS can exceed.
1169rm -rf conftest* confdefs.h
1170# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1171echo >confdefs.h
1172
1173# Predefined preprocessor variables.
1174
1175cat >>confdefs.h <<_ACEOF
1176#define PACKAGE_NAME "$PACKAGE_NAME"
1177_ACEOF
1178
1179
1180cat >>confdefs.h <<_ACEOF
1181#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1182_ACEOF
1183
1184
1185cat >>confdefs.h <<_ACEOF
1186#define PACKAGE_VERSION "$PACKAGE_VERSION"
1187_ACEOF
1188
1189
1190cat >>confdefs.h <<_ACEOF
1191#define PACKAGE_STRING "$PACKAGE_STRING"
1192_ACEOF
1193
1194
1195cat >>confdefs.h <<_ACEOF
1196#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1197_ACEOF
1198
1199
1200# Let the site file select an alternate cache file if it wants to.
252b5132 1201# Prefer explicitly selected file to automatically selected ones.
b39b76b8
DD
1202if test -z "$CONFIG_SITE"; then
1203 if test "x$prefix" != xNONE; then
1204 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1205 else
1206 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
252b5132
RH
1207 fi
1208fi
1209for ac_site_file in $CONFIG_SITE; do
1210 if test -r "$ac_site_file"; then
2299a76d
DJ
1211 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1212echo "$as_me: loading site script $ac_site_file" >&6;}
1213 sed 's/^/| /' "$ac_site_file" >&5
252b5132
RH
1214 . "$ac_site_file"
1215 fi
1216done
1217
1218if test -r "$cache_file"; then
2299a76d
DJ
1219 # Some versions of bash will fail to source /dev/null (special
1220 # files actually), so we avoid doing that.
1221 if test -f "$cache_file"; then
1222 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1223echo "$as_me: loading cache $cache_file" >&6;}
1224 case $cache_file in
1225 [\\/]* | ?:[\\/]* ) . $cache_file;;
1226 *) . ./$cache_file;;
1227 esac
1228 fi
252b5132 1229else
2299a76d
DJ
1230 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1231echo "$as_me: creating cache $cache_file" >&6;}
1232 >$cache_file
1233fi
1234
1235# Check that the precious variables saved in the cache have kept the same
1236# value.
1237ac_cache_corrupted=false
1238for ac_var in `(set) 2>&1 |
58670637 1239 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
2299a76d
DJ
1240 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1241 eval ac_new_set=\$ac_env_${ac_var}_set
1242 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1243 eval ac_new_val="\$ac_env_${ac_var}_value"
1244 case $ac_old_set,$ac_new_set in
1245 set,)
1246 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1247echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1248 ac_cache_corrupted=: ;;
1249 ,set)
1250 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1251echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1252 ac_cache_corrupted=: ;;
1253 ,);;
1254 *)
1255 if test "x$ac_old_val" != "x$ac_new_val"; then
5ae54241
DD
1256 # differences in whitespace do not lead to failure.
1257 ac_old_val_w=`echo x $ac_old_val`
1258 ac_new_val_w=`echo x $ac_new_val`
1259 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1260 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
2299a76d 1261echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
5ae54241
DD
1262 ac_cache_corrupted=:
1263 else
1264 { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1265echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1266 eval $ac_var=\$ac_old_val
1267 fi
1268 { echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1269echo "$as_me: former value: \`$ac_old_val'" >&2;}
1270 { echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1271echo "$as_me: current value: \`$ac_new_val'" >&2;}
2299a76d
DJ
1272 fi;;
1273 esac
1274 # Pass precious variables to config.status.
1275 if test "$ac_new_set" = set; then
1276 case $ac_new_val in
1277 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1278 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1279 *) ac_arg=$ac_var=$ac_new_val ;;
1280 esac
1281 case " $ac_configure_args " in
1282 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1283 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1284 esac
1285 fi
1286done
1287if $ac_cache_corrupted; then
c8536f38
DD
1288 { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1289echo "$as_me: error: in \`$ac_pwd':" >&2;}
2299a76d
DJ
1290 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1291echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1292 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1293echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1294 { (exit 1); exit 1; }; }
252b5132
RH
1295fi
1296
1297ac_ext=c
252b5132 1298ac_cpp='$CPP $CPPFLAGS'
2299a76d
DJ
1299ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1300ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1301ac_compiler_gnu=$ac_cv_c_compiler_gnu
252b5132
RH
1302
1303
1304
52d98c2d 1305
252b5132 1306
2299a76d
DJ
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
c8536f38
DD
1319
1320
1321
2299a76d
DJ
1322
1323
bb6a587d 1324
2299a76d
DJ
1325
1326# This works around the fact that libtool configuration may change LD
1327# for this particular configuration, but some shells, instead of
1328# keeping the changes in LD private, export them just because LD is
1329# exported. We don't use libtool yet, but some day we might, so...
1330ORIGINAL_LD_FOR_MULTILIBS=$LD
1331
1332
1333# Check whether --with-target-subdir or --without-target-subdir was given.
1334if test "${with_target_subdir+set}" = set; then
1335 withval="$with_target_subdir"
1336
1337fi;
1338
1339# Check whether --with-build-subdir or --without-build-subdir was given.
1340if test "${with_build_subdir+set}" = set; then
1341 withval="$with_build_subdir"
1342
1343fi;
cfed0715 1344
252b5132
RH
1345# Check whether --with-cross-host or --without-cross-host was given.
1346if test "${with_cross_host+set}" = set; then
1347 withval="$with_cross_host"
2299a76d
DJ
1348
1349fi;
252b5132
RH
1350
1351# Check whether --with-newlib or --without-newlib was given.
1352if test "${with_newlib+set}" = set; then
1353 withval="$with_newlib"
252b5132 1354
2299a76d 1355fi;
252b5132
RH
1356
1357if test "${srcdir}" = "."; then
cfed0715
DD
1358 if test -n "${with_build_subdir}"; then
1359 libiberty_topdir="${srcdir}/../.."
1360 with_target_subdir=
1361 elif test -z "${with_target_subdir}"; then
252b5132
RH
1362 libiberty_topdir="${srcdir}/.."
1363 else
1364 if test "${with_target_subdir}" != "."; then
1365 libiberty_topdir="${srcdir}/${with_multisrctop}../.."
1366 else
1367 libiberty_topdir="${srcdir}/${with_multisrctop}.."
1368 fi
1369 fi
1370else
1371 libiberty_topdir="${srcdir}/.."
1372fi
85b9a938 1373
252b5132
RH
1374ac_aux_dir=
1375for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do
1376 if test -f $ac_dir/install-sh; then
1377 ac_aux_dir=$ac_dir
1378 ac_install_sh="$ac_aux_dir/install-sh -c"
1379 break
1380 elif test -f $ac_dir/install.sh; then
1381 ac_aux_dir=$ac_dir
1382 ac_install_sh="$ac_aux_dir/install.sh -c"
1383 break
2299a76d
DJ
1384 elif test -f $ac_dir/shtool; then
1385 ac_aux_dir=$ac_dir
1386 ac_install_sh="$ac_aux_dir/shtool install -c"
1387 break
252b5132
RH
1388 fi
1389done
1390if test -z "$ac_aux_dir"; then
2299a76d
DJ
1391 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" >&5
1392echo "$as_me: error: cannot find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" >&2;}
1393 { (exit 1); exit 1; }; }
252b5132 1394fi
2299a76d
DJ
1395ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1396ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1397ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
252b5132
RH
1398
1399
1400
2299a76d
DJ
1401echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
1402echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
39423523
DD
1403 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1404if test "${enable_maintainer_mode+set}" = set; then
1405 enableval="$enable_maintainer_mode"
1406 maintainer_mode=$enableval
1407else
1408 maintainer_mode=no
2299a76d 1409fi;
39423523 1410
2299a76d
DJ
1411echo "$as_me:$LINENO: result: $maintainer_mode" >&5
1412echo "${ECHO_T}$maintainer_mode" >&6
39423523
DD
1413
1414if test "$maintainer_mode" = "yes"; then
1415 MAINT=''
1416 NOTMAINT='#'
1417else
1418 MAINT='#'
1419 NOTMAINT=''
1420fi
1421
da191b5b
DD
1422# Do we have a single-tree copy of texinfo? Even if we do, we can't
1423# rely on it - libiberty is built before texinfo.
1424# Extract the first word of "makeinfo", so it can be a program name with args.
39423523 1425set dummy makeinfo; ac_word=$2
2299a76d
DJ
1426echo "$as_me:$LINENO: checking for $ac_word" >&5
1427echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1428if test "${ac_cv_prog_MAKEINFO+set}" = set; then
1429 echo $ECHO_N "(cached) $ECHO_C" >&6
39423523
DD
1430else
1431 if test -n "$MAKEINFO"; then
1432 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
1433else
2299a76d
DJ
1434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1435for as_dir in $PATH
1436do
1437 IFS=$as_save_IFS
1438 test -z "$as_dir" && as_dir=.
1439 for ac_exec_ext in '' $ac_executable_extensions; do
1440 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1441 ac_cv_prog_MAKEINFO="makeinfo"
1442 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1443 break 2
1444 fi
1445done
1446done
1447
39423523
DD
1448fi
1449fi
2299a76d 1450MAKEINFO=$ac_cv_prog_MAKEINFO
39423523 1451if test -n "$MAKEINFO"; then
2299a76d
DJ
1452 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
1453echo "${ECHO_T}$MAKEINFO" >&6
39423523 1454else
2299a76d
DJ
1455 echo "$as_me:$LINENO: result: no" >&5
1456echo "${ECHO_T}no" >&6
39423523
DD
1457fi
1458
1a78a35a
DD
1459if test "x$MAKEINFO" = "x"; then
1460 MAKEINFO="@echo makeinfo missing; true"
da191b5b 1461 BUILD_INFO=
1a78a35a
DD
1462else
1463 BUILD_INFO=info
b7ca9213
L
1464 case "$MAKEINFO" in
1465 */missing\ makeinfo*)
1a78a35a 1466 BUILD_INFO=
2299a76d 1467 { echo "$as_me:$LINENO: WARNING:
b7ca9213
L
1468*** Makeinfo is missing. Info documentation will not be built." >&5
1469echo "$as_me: WARNING:
1470*** Makeinfo is missing. Info documentation will not be built." >&2;}
1471 ;;
1472 *)
1473 case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in
1474 x*\ [1-3].* )
1475 MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
1476 BUILD_INFO=
1477 { echo "$as_me:$LINENO: WARNING:
2299a76d
DJ
1478*** Makeinfo is too old. Info documentation will not be built." >&5
1479echo "$as_me: WARNING:
1480*** Makeinfo is too old. Info documentation will not be built." >&2;}
b7ca9213
L
1481 ;;
1482 esac
1a78a35a
DD
1483 ;;
1484 esac
1485fi
da191b5b 1486
39423523
DD
1487
1488
1489# Extract the first word of "perl", so it can be a program name with args.
1490set dummy perl; ac_word=$2
2299a76d
DJ
1491echo "$as_me:$LINENO: checking for $ac_word" >&5
1492echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1493if test "${ac_cv_prog_PERL+set}" = set; then
1494 echo $ECHO_N "(cached) $ECHO_C" >&6
39423523
DD
1495else
1496 if test -n "$PERL"; then
1497 ac_cv_prog_PERL="$PERL" # Let the user override the test.
1498else
2299a76d
DJ
1499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1500for as_dir in $PATH
1501do
1502 IFS=$as_save_IFS
1503 test -z "$as_dir" && as_dir=.
1504 for ac_exec_ext in '' $ac_executable_extensions; do
1505 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1506 ac_cv_prog_PERL="perl"
1507 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1508 break 2
1509 fi
1510done
1511done
1512
39423523
DD
1513fi
1514fi
2299a76d 1515PERL=$ac_cv_prog_PERL
39423523 1516if test -n "$PERL"; then
2299a76d
DJ
1517 echo "$as_me:$LINENO: result: $PERL" >&5
1518echo "${ECHO_T}$PERL" >&6
39423523 1519else
2299a76d
DJ
1520 echo "$as_me:$LINENO: result: no" >&5
1521echo "${ECHO_T}no" >&6
39423523
DD
1522fi
1523
1524if test x"$PERL" = x""; then
1525 HAVE_PERL='#'
1526else
1527 HAVE_PERL=''
1528fi
1529
1530
252b5132 1531# Make sure we can run config.sub.
2299a76d
DJ
1532$ac_config_sub sun4 >/dev/null 2>&1 ||
1533 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1534echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1535 { (exit 1); exit 1; }; }
252b5132 1536
2299a76d
DJ
1537echo "$as_me:$LINENO: checking build system type" >&5
1538echo $ECHO_N "checking build system type... $ECHO_C" >&6
1539if test "${ac_cv_build+set}" = set; then
1540 echo $ECHO_N "(cached) $ECHO_C" >&6
1541else
1542 ac_cv_build_alias=$build_alias
1543test -z "$ac_cv_build_alias" &&
1544 ac_cv_build_alias=`$ac_config_guess`
1545test -z "$ac_cv_build_alias" &&
1546 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1547echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1548 { (exit 1); exit 1; }; }
1549ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1550 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1551echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1552 { (exit 1); exit 1; }; }
252b5132 1553
2299a76d
DJ
1554fi
1555echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1556echo "${ECHO_T}$ac_cv_build" >&6
1557build=$ac_cv_build
1558build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1559build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1560build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
252b5132
RH
1561
1562
2299a76d
DJ
1563echo "$as_me:$LINENO: checking host system type" >&5
1564echo $ECHO_N "checking host system type... $ECHO_C" >&6
1565if test "${ac_cv_host+set}" = set; then
1566 echo $ECHO_N "(cached) $ECHO_C" >&6
1567else
1568 ac_cv_host_alias=$host_alias
1569test -z "$ac_cv_host_alias" &&
1570 ac_cv_host_alias=$ac_cv_build_alias
1571ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1572 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1573echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1574 { (exit 1); exit 1; }; }
252b5132 1575
2299a76d
DJ
1576fi
1577echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1578echo "${ECHO_T}$ac_cv_host" >&6
1579host=$ac_cv_host
1580host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1581host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1582host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
252b5132 1583
252b5132 1584
252b5132 1585
252b5132 1586
2299a76d
DJ
1587if test -n "$ac_tool_prefix"; then
1588 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
252b5132 1589set dummy ${ac_tool_prefix}ar; ac_word=$2
2299a76d
DJ
1590echo "$as_me:$LINENO: checking for $ac_word" >&5
1591echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1592if test "${ac_cv_prog_AR+set}" = set; then
1593 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
1594else
1595 if test -n "$AR"; then
1596 ac_cv_prog_AR="$AR" # Let the user override the test.
1597else
2299a76d
DJ
1598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1599for as_dir in $PATH
1600do
1601 IFS=$as_save_IFS
1602 test -z "$as_dir" && as_dir=.
1603 for ac_exec_ext in '' $ac_executable_extensions; do
1604 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1605 ac_cv_prog_AR="${ac_tool_prefix}ar"
1606 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1607 break 2
1608 fi
1609done
1610done
1611
252b5132
RH
1612fi
1613fi
2299a76d 1614AR=$ac_cv_prog_AR
252b5132 1615if test -n "$AR"; then
2299a76d
DJ
1616 echo "$as_me:$LINENO: result: $AR" >&5
1617echo "${ECHO_T}$AR" >&6
252b5132 1618else
2299a76d
DJ
1619 echo "$as_me:$LINENO: result: no" >&5
1620echo "${ECHO_T}no" >&6
1621fi
1622
252b5132 1623fi
2299a76d
DJ
1624if test -z "$ac_cv_prog_AR"; then
1625 ac_ct_AR=$AR
1626 # Extract the first word of "ar", so it can be a program name with args.
1627set dummy ar; ac_word=$2
1628echo "$as_me:$LINENO: checking for $ac_word" >&5
1629echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1630if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
1631 echo $ECHO_N "(cached) $ECHO_C" >&6
1632else
1633 if test -n "$ac_ct_AR"; then
1634 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
1635else
1636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1637for as_dir in $PATH
1638do
1639 IFS=$as_save_IFS
1640 test -z "$as_dir" && as_dir=.
1641 for ac_exec_ext in '' $ac_executable_extensions; do
1642 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1643 ac_cv_prog_ac_ct_AR="ar"
1644 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1645 break 2
1646 fi
1647done
1648done
252b5132 1649
2299a76d
DJ
1650fi
1651fi
1652ac_ct_AR=$ac_cv_prog_ac_ct_AR
1653if test -n "$ac_ct_AR"; then
1654 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
1655echo "${ECHO_T}$ac_ct_AR" >&6
1656else
1657 echo "$as_me:$LINENO: result: no" >&5
1658echo "${ECHO_T}no" >&6
1659fi
252b5132 1660
2299a76d
DJ
1661 AR=$ac_ct_AR
1662else
1663 AR="$ac_cv_prog_AR"
1664fi
252b5132 1665
2299a76d
DJ
1666if test -n "$ac_tool_prefix"; then
1667 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
252b5132 1668set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2299a76d
DJ
1669echo "$as_me:$LINENO: checking for $ac_word" >&5
1670echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1671if test "${ac_cv_prog_RANLIB+set}" = set; then
1672 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
1673else
1674 if test -n "$RANLIB"; then
1675 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1676else
2299a76d
DJ
1677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1678for as_dir in $PATH
1679do
1680 IFS=$as_save_IFS
1681 test -z "$as_dir" && as_dir=.
1682 for ac_exec_ext in '' $ac_executable_extensions; do
1683 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1684 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1685 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1686 break 2
1687 fi
1688done
1689done
1690
252b5132
RH
1691fi
1692fi
2299a76d 1693RANLIB=$ac_cv_prog_RANLIB
252b5132 1694if test -n "$RANLIB"; then
2299a76d
DJ
1695 echo "$as_me:$LINENO: result: $RANLIB" >&5
1696echo "${ECHO_T}$RANLIB" >&6
252b5132 1697else
2299a76d
DJ
1698 echo "$as_me:$LINENO: result: no" >&5
1699echo "${ECHO_T}no" >&6
252b5132
RH
1700fi
1701
2299a76d 1702fi
252b5132 1703if test -z "$ac_cv_prog_RANLIB"; then
2299a76d 1704 ac_ct_RANLIB=$RANLIB
252b5132
RH
1705 # Extract the first word of "ranlib", so it can be a program name with args.
1706set dummy ranlib; ac_word=$2
2299a76d
DJ
1707echo "$as_me:$LINENO: checking for $ac_word" >&5
1708echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1709if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
1710 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 1711else
2299a76d
DJ
1712 if test -n "$ac_ct_RANLIB"; then
1713 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
252b5132 1714else
2299a76d
DJ
1715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1716for as_dir in $PATH
1717do
1718 IFS=$as_save_IFS
1719 test -z "$as_dir" && as_dir=.
1720 for ac_exec_ext in '' $ac_executable_extensions; do
1721 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1722 ac_cv_prog_ac_ct_RANLIB="ranlib"
1723 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1724 break 2
1725 fi
1726done
1727done
1728
1729 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
252b5132
RH
1730fi
1731fi
2299a76d
DJ
1732ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
1733if test -n "$ac_ct_RANLIB"; then
1734 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
1735echo "${ECHO_T}$ac_ct_RANLIB" >&6
252b5132 1736else
2299a76d
DJ
1737 echo "$as_me:$LINENO: result: no" >&5
1738echo "${ECHO_T}no" >&6
252b5132
RH
1739fi
1740
2299a76d 1741 RANLIB=$ac_ct_RANLIB
252b5132 1742else
2299a76d 1743 RANLIB="$ac_cv_prog_RANLIB"
252b5132
RH
1744fi
1745
1746
958afec3
GK
1747# Add --enable-multilib to configure.
1748# Default to --enable-multilib
1749# Check whether --enable-multilib or --disable-multilib was given.
1750if test "${enable_multilib+set}" = set; then
1751 enableval="$enable_multilib"
1752 case "$enableval" in
1753 yes) multilib=yes ;;
1754 no) multilib=no ;;
1755 *) { { echo "$as_me:$LINENO: error: bad value $enableval for multilib option" >&5
1756echo "$as_me: error: bad value $enableval for multilib option" >&2;}
1757 { (exit 1); exit 1; }; } ;;
1758 esac
1759else
1760 multilib=yes
1761fi;
1762
1763# Even if the default multilib is not a cross compilation,
1764# it may be that some of the other multilibs are.
1765if test $cross_compiling = no && test $multilib = yes \
1766 && test "x${with_multisubdir}" != x ; then
1767 cross_compiling=maybe
1768fi
1769
0c0a36a4 1770
2299a76d
DJ
1771ac_ext=c
1772ac_cpp='$CPP $CPPFLAGS'
1773ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1774ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1775ac_compiler_gnu=$ac_cv_c_compiler_gnu
1776if test -n "$ac_tool_prefix"; then
1777 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1778set dummy ${ac_tool_prefix}gcc; ac_word=$2
1779echo "$as_me:$LINENO: checking for $ac_word" >&5
1780echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1781if test "${ac_cv_prog_CC+set}" = set; then
1782 echo $ECHO_N "(cached) $ECHO_C" >&6
1783else
1784 if test -n "$CC"; then
1785 ac_cv_prog_CC="$CC" # Let the user override the test.
1786else
1787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1788for as_dir in $PATH
1789do
1790 IFS=$as_save_IFS
1791 test -z "$as_dir" && as_dir=.
1792 for ac_exec_ext in '' $ac_executable_extensions; do
1793 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1794 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1795 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1796 break 2
1797 fi
1798done
1799done
1800
1801fi
1802fi
1803CC=$ac_cv_prog_CC
1804if test -n "$CC"; then
1805 echo "$as_me:$LINENO: result: $CC" >&5
1806echo "${ECHO_T}$CC" >&6
1807else
1808 echo "$as_me:$LINENO: result: no" >&5
1809echo "${ECHO_T}no" >&6
1810fi
1811
1812fi
1813if test -z "$ac_cv_prog_CC"; then
1814 ac_ct_CC=$CC
1815 # Extract the first word of "gcc", so it can be a program name with args.
252b5132 1816set dummy gcc; ac_word=$2
2299a76d
DJ
1817echo "$as_me:$LINENO: checking for $ac_word" >&5
1818echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1819if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1820 echo $ECHO_N "(cached) $ECHO_C" >&6
1821else
1822 if test -n "$ac_ct_CC"; then
1823 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1824else
1825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1826for as_dir in $PATH
1827do
1828 IFS=$as_save_IFS
1829 test -z "$as_dir" && as_dir=.
1830 for ac_exec_ext in '' $ac_executable_extensions; do
1831 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1832 ac_cv_prog_ac_ct_CC="gcc"
1833 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1834 break 2
1835 fi
1836done
1837done
1838
1839fi
1840fi
1841ac_ct_CC=$ac_cv_prog_ac_ct_CC
1842if test -n "$ac_ct_CC"; then
1843 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1844echo "${ECHO_T}$ac_ct_CC" >&6
1845else
1846 echo "$as_me:$LINENO: result: no" >&5
1847echo "${ECHO_T}no" >&6
1848fi
1849
1850 CC=$ac_ct_CC
1851else
1852 CC="$ac_cv_prog_CC"
1853fi
1854
1855if test -z "$CC"; then
1856 if test -n "$ac_tool_prefix"; then
1857 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1858set dummy ${ac_tool_prefix}cc; ac_word=$2
1859echo "$as_me:$LINENO: checking for $ac_word" >&5
1860echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1861if test "${ac_cv_prog_CC+set}" = set; then
1862 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
1863else
1864 if test -n "$CC"; then
1865 ac_cv_prog_CC="$CC" # Let the user override the test.
1866else
2299a76d
DJ
1867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1868for as_dir in $PATH
1869do
1870 IFS=$as_save_IFS
1871 test -z "$as_dir" && as_dir=.
1872 for ac_exec_ext in '' $ac_executable_extensions; do
1873 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1874 ac_cv_prog_CC="${ac_tool_prefix}cc"
1875 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1876 break 2
1877 fi
1878done
1879done
1880
252b5132
RH
1881fi
1882fi
2299a76d 1883CC=$ac_cv_prog_CC
252b5132 1884if test -n "$CC"; then
2299a76d
DJ
1885 echo "$as_me:$LINENO: result: $CC" >&5
1886echo "${ECHO_T}$CC" >&6
1887else
1888 echo "$as_me:$LINENO: result: no" >&5
1889echo "${ECHO_T}no" >&6
1890fi
1891
1892fi
1893if test -z "$ac_cv_prog_CC"; then
1894 ac_ct_CC=$CC
1895 # Extract the first word of "cc", so it can be a program name with args.
1896set dummy cc; ac_word=$2
1897echo "$as_me:$LINENO: checking for $ac_word" >&5
1898echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1899if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1900 echo $ECHO_N "(cached) $ECHO_C" >&6
1901else
1902 if test -n "$ac_ct_CC"; then
1903 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
252b5132 1904else
2299a76d
DJ
1905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1906for as_dir in $PATH
1907do
1908 IFS=$as_save_IFS
1909 test -z "$as_dir" && as_dir=.
1910 for ac_exec_ext in '' $ac_executable_extensions; do
1911 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1912 ac_cv_prog_ac_ct_CC="cc"
1913 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1914 break 2
1915 fi
1916done
1917done
1918
1919fi
1920fi
1921ac_ct_CC=$ac_cv_prog_ac_ct_CC
1922if test -n "$ac_ct_CC"; then
1923 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1924echo "${ECHO_T}$ac_ct_CC" >&6
1925else
1926 echo "$as_me:$LINENO: result: no" >&5
1927echo "${ECHO_T}no" >&6
252b5132
RH
1928fi
1929
2299a76d
DJ
1930 CC=$ac_ct_CC
1931else
1932 CC="$ac_cv_prog_CC"
1933fi
1934
1935fi
252b5132
RH
1936if test -z "$CC"; then
1937 # Extract the first word of "cc", so it can be a program name with args.
1938set dummy cc; ac_word=$2
2299a76d
DJ
1939echo "$as_me:$LINENO: checking for $ac_word" >&5
1940echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1941if test "${ac_cv_prog_CC+set}" = set; then
1942 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
1943else
1944 if test -n "$CC"; then
1945 ac_cv_prog_CC="$CC" # Let the user override the test.
1946else
252b5132 1947 ac_prog_rejected=no
2299a76d
DJ
1948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1949for as_dir in $PATH
1950do
1951 IFS=$as_save_IFS
1952 test -z "$as_dir" && as_dir=.
1953 for ac_exec_ext in '' $ac_executable_extensions; do
1954 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1955 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1956 ac_prog_rejected=yes
1957 continue
1958 fi
1959 ac_cv_prog_CC="cc"
1960 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1961 break 2
1962 fi
1963done
1964done
1965
252b5132
RH
1966if test $ac_prog_rejected = yes; then
1967 # We found a bogon in the path, so make sure we never use it.
1968 set dummy $ac_cv_prog_CC
1969 shift
2299a76d 1970 if test $# != 0; then
252b5132
RH
1971 # We chose a different compiler from the bogus one.
1972 # However, it has the same basename, so the bogon will be chosen
1973 # first if we set CC to just the basename; use the full file name.
1974 shift
2299a76d 1975 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
252b5132
RH
1976 fi
1977fi
1978fi
1979fi
2299a76d 1980CC=$ac_cv_prog_CC
252b5132 1981if test -n "$CC"; then
2299a76d
DJ
1982 echo "$as_me:$LINENO: result: $CC" >&5
1983echo "${ECHO_T}$CC" >&6
252b5132 1984else
2299a76d
DJ
1985 echo "$as_me:$LINENO: result: no" >&5
1986echo "${ECHO_T}no" >&6
252b5132
RH
1987fi
1988
252b5132 1989fi
2299a76d
DJ
1990if test -z "$CC"; then
1991 if test -n "$ac_tool_prefix"; then
1992 for ac_prog in cl
1993 do
1994 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1995set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1996echo "$as_me:$LINENO: checking for $ac_word" >&5
1997echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1998if test "${ac_cv_prog_CC+set}" = set; then
1999 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 2000else
2299a76d
DJ
2001 if test -n "$CC"; then
2002 ac_cv_prog_CC="$CC" # Let the user override the test.
252b5132 2003else
2299a76d
DJ
2004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2005for as_dir in $PATH
2006do
2007 IFS=$as_save_IFS
2008 test -z "$as_dir" && as_dir=.
2009 for ac_exec_ext in '' $ac_executable_extensions; do
2010 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2011 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2012 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2013 break 2
2014 fi
2015done
2016done
2017
252b5132
RH
2018fi
2019fi
2299a76d
DJ
2020CC=$ac_cv_prog_CC
2021if test -n "$CC"; then
2022 echo "$as_me:$LINENO: result: $CC" >&5
2023echo "${ECHO_T}$CC" >&6
252b5132 2024else
2299a76d
DJ
2025 echo "$as_me:$LINENO: result: no" >&5
2026echo "${ECHO_T}no" >&6
252b5132 2027fi
252b5132 2028
2299a76d
DJ
2029 test -n "$CC" && break
2030 done
252b5132 2031fi
2299a76d
DJ
2032if test -z "$CC"; then
2033 ac_ct_CC=$CC
2034 for ac_prog in cl
2035do
2036 # Extract the first word of "$ac_prog", so it can be a program name with args.
2037set dummy $ac_prog; ac_word=$2
2038echo "$as_me:$LINENO: checking for $ac_word" >&5
2039echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2040if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2041 echo $ECHO_N "(cached) $ECHO_C" >&6
2042else
2043 if test -n "$ac_ct_CC"; then
2044 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2045else
2046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2047for as_dir in $PATH
2048do
2049 IFS=$as_save_IFS
2050 test -z "$as_dir" && as_dir=.
2051 for ac_exec_ext in '' $ac_executable_extensions; do
2052 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2053 ac_cv_prog_ac_ct_CC="$ac_prog"
2054 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2055 break 2
252b5132 2056 fi
2299a76d
DJ
2057done
2058done
2059
2060fi
2061fi
2062ac_ct_CC=$ac_cv_prog_ac_ct_CC
2063if test -n "$ac_ct_CC"; then
2064 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2065echo "${ECHO_T}$ac_ct_CC" >&6
252b5132 2066else
2299a76d
DJ
2067 echo "$as_me:$LINENO: result: no" >&5
2068echo "${ECHO_T}no" >&6
252b5132
RH
2069fi
2070
2299a76d
DJ
2071 test -n "$ac_ct_CC" && break
2072done
252b5132 2073
2299a76d
DJ
2074 CC=$ac_ct_CC
2075fi
2076
2077fi
2078
2079
c8536f38
DD
2080test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2081echo "$as_me: error: in \`$ac_pwd':" >&2;}
2082{ { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2299a76d
DJ
2083See \`config.log' for more details." >&5
2084echo "$as_me: error: no acceptable C compiler found in \$PATH
2085See \`config.log' for more details." >&2;}
c8536f38 2086 { (exit 1); exit 1; }; }; }
2299a76d
DJ
2087
2088# Provide some information about the compiler.
2089echo "$as_me:$LINENO:" \
2090 "checking for C compiler version" >&5
2091ac_compiler=`set X $ac_compile; echo $2`
2092{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2093 (eval $ac_compiler --version </dev/null >&5) 2>&5
2094 ac_status=$?
2095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2096 (exit $ac_status); }
2097{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2098 (eval $ac_compiler -v </dev/null >&5) 2>&5
2099 ac_status=$?
2100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2101 (exit $ac_status); }
2102{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2103 (eval $ac_compiler -V </dev/null >&5) 2>&5
2104 ac_status=$?
2105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2106 (exit $ac_status); }
2107
2108cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
2109/* confdefs.h. */
2110_ACEOF
2111cat confdefs.h >>conftest.$ac_ext
2112cat >>conftest.$ac_ext <<_ACEOF
2113/* end confdefs.h. */
92655e19 2114
2299a76d
DJ
2115int
2116main ()
2117{
2118
2119 ;
2120 return 0;
2121}
2122_ACEOF
2123# FIXME: Cleanup?
2124if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2125 (eval $ac_link) 2>&5
2126 ac_status=$?
2127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2128 (exit $ac_status); }; then
2129 gcc_no_link=no
2130else
2131 gcc_no_link=yes
2132fi
2133
2134if test x$gcc_no_link = xyes; then
2135 # Setting cross_compile will disable run tests; it will
2136 # also disable AC_CHECK_FILE but that's generally
2137 # correct if we can't link.
2138 cross_compiling=yes
2139 EXEEXT=
2140else
2141 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
2142/* confdefs.h. */
2143_ACEOF
2144cat confdefs.h >>conftest.$ac_ext
2145cat >>conftest.$ac_ext <<_ACEOF
2146/* end confdefs.h. */
2147
2148int
2149main ()
2150{
2151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156ac_clean_files_save=$ac_clean_files
2157ac_clean_files="$ac_clean_files a.out a.exe b.out"
2158# Try to create an executable without -o first, disregard a.out.
2159# It will help us diagnose broken compilers, and finding out an intuition
2160# of exeext.
58670637
DD
2161echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2162echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2299a76d
DJ
2163ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2164if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2165 (eval $ac_link_default) 2>&5
2166 ac_status=$?
2167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2168 (exit $ac_status); }; then
2169 # Find the output, starting from the most likely. This scheme is
2170# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2171# resort.
2172
2173# Be careful to initialize this variable, since it used to be cached.
2174# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2175ac_cv_exeext=
2176# b.out is created by i960 compilers.
2177for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2178do
2179 test -f "$ac_file" || continue
2180 case $ac_file in
2181 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
58670637 2182 ;;
2299a76d 2183 conftest.$ac_ext )
58670637
DD
2184 # This is the source file.
2185 ;;
2299a76d 2186 [ab].out )
58670637
DD
2187 # We found the default executable, but exeext='' is most
2188 # certainly right.
2189 break;;
2299a76d 2190 *.* )
58670637
DD
2191 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2192 # FIXME: I believe we export ac_cv_exeext for Libtool,
2193 # but it would be cool to find out if it's true. Does anybody
2194 # maintain Libtool? --akim.
2195 export ac_cv_exeext
2196 break;;
2299a76d 2197 * )
58670637 2198 break;;
2299a76d
DJ
2199 esac
2200done
b39b76b8 2201else
2299a76d
DJ
2202 echo "$as_me: failed program was:" >&5
2203sed 's/^/| /' conftest.$ac_ext >&5
2204
c8536f38
DD
2205{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2206echo "$as_me: error: in \`$ac_pwd':" >&2;}
2299a76d
DJ
2207{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2208See \`config.log' for more details." >&5
2209echo "$as_me: error: C compiler cannot create executables
2210See \`config.log' for more details." >&2;}
c8536f38 2211 { (exit 77); exit 77; }; }; }
2299a76d
DJ
2212fi
2213
2214ac_exeext=$ac_cv_exeext
2215echo "$as_me:$LINENO: result: $ac_file" >&5
2216echo "${ECHO_T}$ac_file" >&6
2217
2218# Check the compiler produces executables we can run. If not, either
2219# the compiler is broken, or we cross compile.
2220echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2221echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2222# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2223# If not cross compiling, check that we can run a simple program.
2224if test "$cross_compiling" != yes; then
2225 if { ac_try='./$ac_file'
2226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2227 (eval $ac_try) 2>&5
2228 ac_status=$?
2229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2230 (exit $ac_status); }; }; then
2231 cross_compiling=no
2232 else
2233 if test "$cross_compiling" = maybe; then
2234 cross_compiling=yes
2235 else
c8536f38
DD
2236 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2237echo "$as_me: error: in \`$ac_pwd':" >&2;}
2238{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2299a76d
DJ
2239If you meant to cross compile, use \`--host'.
2240See \`config.log' for more details." >&5
2241echo "$as_me: error: cannot run C compiled programs.
2242If you meant to cross compile, use \`--host'.
2243See \`config.log' for more details." >&2;}
c8536f38 2244 { (exit 1); exit 1; }; }; }
b39b76b8
DD
2245 fi
2246 fi
2299a76d
DJ
2247fi
2248echo "$as_me:$LINENO: result: yes" >&5
2249echo "${ECHO_T}yes" >&6
2250
2251rm -f a.out a.exe conftest$ac_cv_exeext b.out
2252ac_clean_files=$ac_clean_files_save
2253# Check the compiler produces executables we can run. If not, either
2254# the compiler is broken, or we cross compile.
2255echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2256echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2257echo "$as_me:$LINENO: result: $cross_compiling" >&5
2258echo "${ECHO_T}$cross_compiling" >&6
2259
2260echo "$as_me:$LINENO: checking for suffix of executables" >&5
2261echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2263 (eval $ac_link) 2>&5
2264 ac_status=$?
2265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2266 (exit $ac_status); }; then
2267 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2268# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2269# work properly (i.e., refer to `conftest.exe'), while it won't with
2270# `rm'.
2271for ac_file in conftest.exe conftest conftest.*; do
2272 test -f "$ac_file" || continue
2273 case $ac_file in
2274 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2275 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
58670637
DD
2276 export ac_cv_exeext
2277 break;;
2299a76d
DJ
2278 * ) break;;
2279 esac
2280done
b39b76b8 2281else
c8536f38
DD
2282 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2283echo "$as_me: error: in \`$ac_pwd':" >&2;}
2284{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2299a76d
DJ
2285See \`config.log' for more details." >&5
2286echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2287See \`config.log' for more details." >&2;}
c8536f38 2288 { (exit 1); exit 1; }; }; }
b39b76b8 2289fi
b39b76b8 2290
2299a76d
DJ
2291rm -f conftest$ac_cv_exeext
2292echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2293echo "${ECHO_T}$ac_cv_exeext" >&6
2294
2295rm -f conftest.$ac_ext
2296EXEEXT=$ac_cv_exeext
2297ac_exeext=$EXEEXT
b39b76b8 2298fi
2299a76d
DJ
2299echo "$as_me:$LINENO: checking for suffix of object files" >&5
2300echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2301if test "${ac_cv_objext+set}" = set; then
2302 echo $ECHO_N "(cached) $ECHO_C" >&6
b39b76b8 2303else
2299a76d 2304 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
2305/* confdefs.h. */
2306_ACEOF
2307cat confdefs.h >>conftest.$ac_ext
2308cat >>conftest.$ac_ext <<_ACEOF
2309/* end confdefs.h. */
b39b76b8 2310
2299a76d
DJ
2311int
2312main ()
2313{
b39b76b8 2314
2299a76d
DJ
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319rm -f conftest.o conftest.obj
2320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2321 (eval $ac_compile) 2>&5
2322 ac_status=$?
2323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2324 (exit $ac_status); }; then
2325 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2326 case $ac_file in
2327 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2328 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2329 break;;
2330 esac
2331done
b39b76b8 2332else
2299a76d
DJ
2333 echo "$as_me: failed program was:" >&5
2334sed 's/^/| /' conftest.$ac_ext >&5
2335
c8536f38
DD
2336{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2337echo "$as_me: error: in \`$ac_pwd':" >&2;}
2299a76d
DJ
2338{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2339See \`config.log' for more details." >&5
2340echo "$as_me: error: cannot compute suffix of object files: cannot compile
2341See \`config.log' for more details." >&2;}
c8536f38 2342 { (exit 1); exit 1; }; }; }
2299a76d
DJ
2343fi
2344
2345rm -f conftest.$ac_cv_objext conftest.$ac_ext
b39b76b8 2346fi
2299a76d
DJ
2347echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2348echo "${ECHO_T}$ac_cv_objext" >&6
2349OBJEXT=$ac_cv_objext
2350ac_objext=$OBJEXT
2351echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2352echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2353if test "${ac_cv_c_compiler_gnu+set}" = set; then
2354 echo $ECHO_N "(cached) $ECHO_C" >&6
2355else
2356 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
2357/* confdefs.h. */
2358_ACEOF
2359cat confdefs.h >>conftest.$ac_ext
2360cat >>conftest.$ac_ext <<_ACEOF
2361/* end confdefs.h. */
2362
2363int
2364main ()
2365{
2366#ifndef __GNUC__
2367 choke me
2368#endif
b39b76b8 2369
2299a76d
DJ
2370 ;
2371 return 0;
2372}
2373_ACEOF
2374rm -f conftest.$ac_objext
2375if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 2376 (eval $ac_compile) 2>conftest.er1
2299a76d 2377 ac_status=$?
58670637
DD
2378 grep -v '^ *+' conftest.er1 >conftest.err
2379 rm -f conftest.er1
2380 cat conftest.err >&5
2299a76d
DJ
2381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2382 (exit $ac_status); } &&
fd7d450d
DD
2383 { ac_try='test -z "$ac_c_werror_flag"
2384 || test ! -s conftest.err'
58670637
DD
2385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2386 (eval $ac_try) 2>&5
2387 ac_status=$?
2388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2389 (exit $ac_status); }; } &&
2390 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
2391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2392 (eval $ac_try) 2>&5
2393 ac_status=$?
2394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2395 (exit $ac_status); }; }; then
2396 ac_compiler_gnu=yes
2397else
2398 echo "$as_me: failed program was:" >&5
2399sed 's/^/| /' conftest.$ac_ext >&5
2400
2401ac_compiler_gnu=no
2402fi
58670637 2403rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2299a76d
DJ
2404ac_cv_c_compiler_gnu=$ac_compiler_gnu
2405
2406fi
2407echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2408echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2409GCC=`test $ac_compiler_gnu = yes && echo yes`
2410ac_test_CFLAGS=${CFLAGS+set}
2411ac_save_CFLAGS=$CFLAGS
2412CFLAGS="-g"
2413echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2414echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2415if test "${ac_cv_prog_cc_g+set}" = set; then
2416 echo $ECHO_N "(cached) $ECHO_C" >&6
2417else
2418 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
2419/* confdefs.h. */
2420_ACEOF
2421cat confdefs.h >>conftest.$ac_ext
2422cat >>conftest.$ac_ext <<_ACEOF
2423/* end confdefs.h. */
b39b76b8 2424
2299a76d
DJ
2425int
2426main ()
2427{
b39b76b8 2428
2299a76d
DJ
2429 ;
2430 return 0;
2431}
2432_ACEOF
2433rm -f conftest.$ac_objext
2434if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 2435 (eval $ac_compile) 2>conftest.er1
2299a76d 2436 ac_status=$?
58670637
DD
2437 grep -v '^ *+' conftest.er1 >conftest.err
2438 rm -f conftest.er1
2439 cat conftest.err >&5
2299a76d
DJ
2440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2441 (exit $ac_status); } &&
fd7d450d
DD
2442 { ac_try='test -z "$ac_c_werror_flag"
2443 || test ! -s conftest.err'
58670637
DD
2444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2445 (eval $ac_try) 2>&5
2446 ac_status=$?
2447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2448 (exit $ac_status); }; } &&
2449 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
2450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2451 (eval $ac_try) 2>&5
2452 ac_status=$?
2453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2454 (exit $ac_status); }; }; then
2455 ac_cv_prog_cc_g=yes
2456else
2457 echo "$as_me: failed program was:" >&5
2458sed 's/^/| /' conftest.$ac_ext >&5
252b5132 2459
2299a76d
DJ
2460ac_cv_prog_cc_g=no
2461fi
58670637 2462rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2299a76d
DJ
2463fi
2464echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2465echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2466if test "$ac_test_CFLAGS" = set; then
2467 CFLAGS=$ac_save_CFLAGS
2468elif test $ac_cv_prog_cc_g = yes; then
252b5132 2469 if test "$GCC" = yes; then
2299a76d 2470 CFLAGS="-g -O2"
252b5132 2471 else
2299a76d 2472 CFLAGS="-g"
252b5132
RH
2473 fi
2474else
2299a76d
DJ
2475 if test "$GCC" = yes; then
2476 CFLAGS="-O2"
2477 else
2478 CFLAGS=
2479 fi
252b5132 2480fi
2299a76d
DJ
2481echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2482echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2483if test "${ac_cv_prog_cc_stdc+set}" = set; then
2484 echo $ECHO_N "(cached) $ECHO_C" >&6
2485else
2486 ac_cv_prog_cc_stdc=no
2487ac_save_CC=$CC
2488cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
2489/* confdefs.h. */
2490_ACEOF
2491cat confdefs.h >>conftest.$ac_ext
2492cat >>conftest.$ac_ext <<_ACEOF
2493/* end confdefs.h. */
2494#include <stdarg.h>
2495#include <stdio.h>
2496#include <sys/types.h>
2497#include <sys/stat.h>
2498/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2499struct buf { int x; };
2500FILE * (*rcsopen) (struct buf *, struct stat *, int);
2501static char *e (p, i)
2502 char **p;
2503 int i;
2504{
2505 return p[i];
92655e19 2506}
2299a76d
DJ
2507static char *f (char * (*g) (char **, int), char **p, ...)
2508{
2509 char *s;
2510 va_list v;
2511 va_start (v,p);
2512 s = g (p, va_arg (v,int));
2513 va_end (v);
2514 return s;
92655e19 2515}
58670637
DD
2516
2517/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2518 function prototypes and stuff, but not '\xHH' hex character constants.
2519 These don't provoke an error unfortunately, instead are silently treated
2520 as 'x'. The following induces an error, until -std1 is added to get
2521 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2522 array size at least. It's necessary to write '\x00'==0 to get something
2523 that's true only with -std1. */
2524int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2525
2299a76d
DJ
2526int test (int i, double x);
2527struct s1 {int (*f) (int a);};
2528struct s2 {int (*f) (double a);};
2529int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2530int argc;
2531char **argv;
2532int
2533main ()
2534{
2535return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2536 ;
2537 return 0;
92655e19 2538}
2299a76d
DJ
2539_ACEOF
2540# Don't try gcc -ansi; that turns off useful extensions and
2541# breaks some systems' header files.
2542# AIX -qlanglvl=ansi
2543# Ultrix and OSF/1 -std1
2544# HP-UX 10.20 and later -Ae
2545# HP-UX older versions -Aa -D_HPUX_SOURCE
2546# SVR4 -Xc -D__EXTENSIONS__
2547for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2548do
2549 CC="$ac_save_CC $ac_arg"
2550 rm -f conftest.$ac_objext
2551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 2552 (eval $ac_compile) 2>conftest.er1
2299a76d 2553 ac_status=$?
58670637
DD
2554 grep -v '^ *+' conftest.er1 >conftest.err
2555 rm -f conftest.er1
2556 cat conftest.err >&5
2299a76d
DJ
2557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2558 (exit $ac_status); } &&
fd7d450d
DD
2559 { ac_try='test -z "$ac_c_werror_flag"
2560 || test ! -s conftest.err'
58670637
DD
2561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2562 (eval $ac_try) 2>&5
2563 ac_status=$?
2564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2565 (exit $ac_status); }; } &&
2566 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
2567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2568 (eval $ac_try) 2>&5
2569 ac_status=$?
2570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2571 (exit $ac_status); }; }; then
2572 ac_cv_prog_cc_stdc=$ac_arg
2573break
2574else
2575 echo "$as_me: failed program was:" >&5
2576sed 's/^/| /' conftest.$ac_ext >&5
2577
2578fi
58670637 2579rm -f conftest.err conftest.$ac_objext
2299a76d
DJ
2580done
2581rm -f conftest.$ac_ext conftest.$ac_objext
2582CC=$ac_save_CC
2583
2584fi
2585
2586case "x$ac_cv_prog_cc_stdc" in
2587 x|xno)
2588 echo "$as_me:$LINENO: result: none needed" >&5
2589echo "${ECHO_T}none needed" >&6 ;;
2590 *)
2591 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2592echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2593 CC="$CC $ac_cv_prog_cc_stdc" ;;
2594esac
2595
2596# Some people use a C++ compiler to compile C. Since we use `exit',
2597# in C++ we need to declare it. In case someone uses the same compiler
2598# for both compiling C and C++ we need to have the C++ compiler decide
2599# the declaration of exit, since it's the most demanding environment.
2600cat >conftest.$ac_ext <<_ACEOF
2601#ifndef __cplusplus
2602 choke me
2603#endif
2604_ACEOF
2605rm -f conftest.$ac_objext
2606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 2607 (eval $ac_compile) 2>conftest.er1
2299a76d 2608 ac_status=$?
58670637
DD
2609 grep -v '^ *+' conftest.er1 >conftest.err
2610 rm -f conftest.er1
2611 cat conftest.err >&5
2299a76d
DJ
2612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2613 (exit $ac_status); } &&
fd7d450d
DD
2614 { ac_try='test -z "$ac_c_werror_flag"
2615 || test ! -s conftest.err'
58670637
DD
2616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2617 (eval $ac_try) 2>&5
2618 ac_status=$?
2619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2620 (exit $ac_status); }; } &&
2621 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
2622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2623 (eval $ac_try) 2>&5
2624 ac_status=$?
2625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2626 (exit $ac_status); }; }; then
2627 for ac_declaration in \
58670637 2628 '' \
2299a76d
DJ
2629 'extern "C" void std::exit (int) throw (); using std::exit;' \
2630 'extern "C" void std::exit (int); using std::exit;' \
2631 'extern "C" void exit (int) throw ();' \
2632 'extern "C" void exit (int);' \
2633 'void exit (int);'
2634do
2635 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
2636/* confdefs.h. */
2637_ACEOF
2638cat confdefs.h >>conftest.$ac_ext
2639cat >>conftest.$ac_ext <<_ACEOF
2640/* end confdefs.h. */
b7ca9213 2641$ac_declaration
58670637 2642#include <stdlib.h>
2299a76d
DJ
2643int
2644main ()
2645{
2646exit (42);
2647 ;
2648 return 0;
92655e19 2649}
2299a76d
DJ
2650_ACEOF
2651rm -f conftest.$ac_objext
2652if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 2653 (eval $ac_compile) 2>conftest.er1
2299a76d 2654 ac_status=$?
58670637
DD
2655 grep -v '^ *+' conftest.er1 >conftest.err
2656 rm -f conftest.er1
2657 cat conftest.err >&5
2299a76d
DJ
2658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2659 (exit $ac_status); } &&
fd7d450d
DD
2660 { ac_try='test -z "$ac_c_werror_flag"
2661 || test ! -s conftest.err'
58670637
DD
2662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2663 (eval $ac_try) 2>&5
2664 ac_status=$?
2665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2666 (exit $ac_status); }; } &&
2667 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
2668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2669 (eval $ac_try) 2>&5
2670 ac_status=$?
2671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2672 (exit $ac_status); }; }; then
2673 :
2674else
2675 echo "$as_me: failed program was:" >&5
2676sed 's/^/| /' conftest.$ac_ext >&5
2677
2678continue
2679fi
58670637 2680rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2299a76d 2681 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
2682/* confdefs.h. */
2683_ACEOF
2684cat confdefs.h >>conftest.$ac_ext
2685cat >>conftest.$ac_ext <<_ACEOF
2686/* end confdefs.h. */
2687$ac_declaration
2688int
2689main ()
2690{
2691exit (42);
2692 ;
2693 return 0;
92655e19 2694}
2299a76d
DJ
2695_ACEOF
2696rm -f conftest.$ac_objext
2697if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 2698 (eval $ac_compile) 2>conftest.er1
2299a76d 2699 ac_status=$?
58670637
DD
2700 grep -v '^ *+' conftest.er1 >conftest.err
2701 rm -f conftest.er1
2702 cat conftest.err >&5
2299a76d
DJ
2703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2704 (exit $ac_status); } &&
fd7d450d
DD
2705 { ac_try='test -z "$ac_c_werror_flag"
2706 || test ! -s conftest.err'
58670637
DD
2707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2708 (eval $ac_try) 2>&5
2709 ac_status=$?
2710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2711 (exit $ac_status); }; } &&
2712 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
2713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2714 (eval $ac_try) 2>&5
2715 ac_status=$?
2716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2717 (exit $ac_status); }; }; then
2718 break
2719else
2720 echo "$as_me: failed program was:" >&5
2721sed 's/^/| /' conftest.$ac_ext >&5
92655e19 2722
2299a76d 2723fi
58670637 2724rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2299a76d
DJ
2725done
2726rm -f conftest*
2727if test -n "$ac_declaration"; then
2728 echo '#ifdef __cplusplus' >>confdefs.h
2729 echo $ac_declaration >>confdefs.h
2730 echo '#endif' >>confdefs.h
2731fi
2732
2733else
2734 echo "$as_me: failed program was:" >&5
2735sed 's/^/| /' conftest.$ac_ext >&5
2736
2737fi
58670637 2738rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2299a76d
DJ
2739ac_ext=c
2740ac_cpp='$CPP $CPPFLAGS'
2741ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2742ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2743ac_compiler_gnu=$ac_cv_c_compiler_gnu
2744
d053aef8
JK
2745
2746# Check whether --enable-largefile or --disable-largefile was given.
2747if test "${enable_largefile+set}" = set; then
2748 enableval="$enable_largefile"
2749
2750fi;
2751if test "$enable_largefile" != no; then
2752
2753 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
2754echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
2755if test "${ac_cv_sys_largefile_CC+set}" = set; then
2756 echo $ECHO_N "(cached) $ECHO_C" >&6
2757else
2758 ac_cv_sys_largefile_CC=no
2759 if test "$GCC" != yes; then
2760 ac_save_CC=$CC
2761 while :; do
2762 # IRIX 6.2 and later do not support large files by default,
2763 # so use the C compiler's -n32 option if that helps.
2764 cat >conftest.$ac_ext <<_ACEOF
2765/* confdefs.h. */
2766_ACEOF
2767cat confdefs.h >>conftest.$ac_ext
2768cat >>conftest.$ac_ext <<_ACEOF
2769/* end confdefs.h. */
2770#include <sys/types.h>
2771 /* Check that off_t can represent 2**63 - 1 correctly.
2772 We can't simply define LARGE_OFF_T to be 9223372036854775807,
2773 since some C++ compilers masquerading as C compilers
2774 incorrectly reject 9223372036854775807. */
2775#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
2776 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
2777 && LARGE_OFF_T % 2147483647 == 1)
2778 ? 1 : -1];
2779int
2780main ()
2781{
2782
2783 ;
2784 return 0;
2785}
2786_ACEOF
2787 rm -f conftest.$ac_objext
2788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2789 (eval $ac_compile) 2>conftest.er1
2790 ac_status=$?
2791 grep -v '^ *+' conftest.er1 >conftest.err
2792 rm -f conftest.er1
2793 cat conftest.err >&5
2794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2795 (exit $ac_status); } &&
2796 { ac_try='test -z "$ac_c_werror_flag"
2797 || test ! -s conftest.err'
2798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2799 (eval $ac_try) 2>&5
2800 ac_status=$?
2801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2802 (exit $ac_status); }; } &&
2803 { ac_try='test -s conftest.$ac_objext'
2804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2805 (eval $ac_try) 2>&5
2806 ac_status=$?
2807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2808 (exit $ac_status); }; }; then
2809 break
2810else
2811 echo "$as_me: failed program was:" >&5
2812sed 's/^/| /' conftest.$ac_ext >&5
2813
2814fi
2815rm -f conftest.err conftest.$ac_objext
2816 CC="$CC -n32"
2817 rm -f conftest.$ac_objext
2818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2819 (eval $ac_compile) 2>conftest.er1
2820 ac_status=$?
2821 grep -v '^ *+' conftest.er1 >conftest.err
2822 rm -f conftest.er1
2823 cat conftest.err >&5
2824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2825 (exit $ac_status); } &&
2826 { ac_try='test -z "$ac_c_werror_flag"
2827 || test ! -s conftest.err'
2828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2829 (eval $ac_try) 2>&5
2830 ac_status=$?
2831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2832 (exit $ac_status); }; } &&
2833 { ac_try='test -s conftest.$ac_objext'
2834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2835 (eval $ac_try) 2>&5
2836 ac_status=$?
2837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2838 (exit $ac_status); }; }; then
2839 ac_cv_sys_largefile_CC=' -n32'; break
2840else
2841 echo "$as_me: failed program was:" >&5
2842sed 's/^/| /' conftest.$ac_ext >&5
2843
2844fi
2845rm -f conftest.err conftest.$ac_objext
2846 break
2847 done
2848 CC=$ac_save_CC
2849 rm -f conftest.$ac_ext
2850 fi
2851fi
2852echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
2853echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
2854 if test "$ac_cv_sys_largefile_CC" != no; then
2855 CC=$CC$ac_cv_sys_largefile_CC
2856 fi
2857
2858 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
2859echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
2860if test "${ac_cv_sys_file_offset_bits+set}" = set; then
2861 echo $ECHO_N "(cached) $ECHO_C" >&6
2862else
2863 while :; do
2864 ac_cv_sys_file_offset_bits=no
2865 cat >conftest.$ac_ext <<_ACEOF
2866/* confdefs.h. */
2867_ACEOF
2868cat confdefs.h >>conftest.$ac_ext
2869cat >>conftest.$ac_ext <<_ACEOF
2870/* end confdefs.h. */
2871#include <sys/types.h>
2872 /* Check that off_t can represent 2**63 - 1 correctly.
2873 We can't simply define LARGE_OFF_T to be 9223372036854775807,
2874 since some C++ compilers masquerading as C compilers
2875 incorrectly reject 9223372036854775807. */
2876#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
2877 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
2878 && LARGE_OFF_T % 2147483647 == 1)
2879 ? 1 : -1];
2880int
2881main ()
2882{
2883
2884 ;
2885 return 0;
2886}
2887_ACEOF
2888rm -f conftest.$ac_objext
2889if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2890 (eval $ac_compile) 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); } &&
2897 { ac_try='test -z "$ac_c_werror_flag"
2898 || test ! -s conftest.err'
2899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2900 (eval $ac_try) 2>&5
2901 ac_status=$?
2902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2903 (exit $ac_status); }; } &&
2904 { ac_try='test -s conftest.$ac_objext'
2905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2906 (eval $ac_try) 2>&5
2907 ac_status=$?
2908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2909 (exit $ac_status); }; }; then
2910 break
2911else
2912 echo "$as_me: failed program was:" >&5
2913sed 's/^/| /' conftest.$ac_ext >&5
2914
2915fi
2916rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2917 cat >conftest.$ac_ext <<_ACEOF
2918/* confdefs.h. */
2919_ACEOF
2920cat confdefs.h >>conftest.$ac_ext
2921cat >>conftest.$ac_ext <<_ACEOF
2922/* end confdefs.h. */
2923#define _FILE_OFFSET_BITS 64
2924#include <sys/types.h>
2925 /* Check that off_t can represent 2**63 - 1 correctly.
2926 We can't simply define LARGE_OFF_T to be 9223372036854775807,
2927 since some C++ compilers masquerading as C compilers
2928 incorrectly reject 9223372036854775807. */
2929#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
2930 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
2931 && LARGE_OFF_T % 2147483647 == 1)
2932 ? 1 : -1];
2933int
2934main ()
2935{
2936
2937 ;
2938 return 0;
2939}
2940_ACEOF
2941rm -f conftest.$ac_objext
2942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2943 (eval $ac_compile) 2>conftest.er1
2944 ac_status=$?
2945 grep -v '^ *+' conftest.er1 >conftest.err
2946 rm -f conftest.er1
2947 cat conftest.err >&5
2948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2949 (exit $ac_status); } &&
2950 { ac_try='test -z "$ac_c_werror_flag"
2951 || test ! -s conftest.err'
2952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2953 (eval $ac_try) 2>&5
2954 ac_status=$?
2955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2956 (exit $ac_status); }; } &&
2957 { ac_try='test -s conftest.$ac_objext'
2958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2959 (eval $ac_try) 2>&5
2960 ac_status=$?
2961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2962 (exit $ac_status); }; }; then
2963 ac_cv_sys_file_offset_bits=64; break
2964else
2965 echo "$as_me: failed program was:" >&5
2966sed 's/^/| /' conftest.$ac_ext >&5
2967
2968fi
2969rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2970 break
2971done
2972fi
2973echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
2974echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
2975if test "$ac_cv_sys_file_offset_bits" != no; then
2976
2977cat >>confdefs.h <<_ACEOF
2978#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
2979_ACEOF
2980
2981fi
2982rm -f conftest*
2983 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
2984echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
2985if test "${ac_cv_sys_large_files+set}" = set; then
2986 echo $ECHO_N "(cached) $ECHO_C" >&6
2987else
2988 while :; do
2989 ac_cv_sys_large_files=no
2990 cat >conftest.$ac_ext <<_ACEOF
2991/* confdefs.h. */
2992_ACEOF
2993cat confdefs.h >>conftest.$ac_ext
2994cat >>conftest.$ac_ext <<_ACEOF
2995/* end confdefs.h. */
2996#include <sys/types.h>
2997 /* Check that off_t can represent 2**63 - 1 correctly.
2998 We can't simply define LARGE_OFF_T to be 9223372036854775807,
2999 since some C++ compilers masquerading as C compilers
3000 incorrectly reject 9223372036854775807. */
3001#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3002 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3003 && LARGE_OFF_T % 2147483647 == 1)
3004 ? 1 : -1];
3005int
3006main ()
3007{
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 break
3036else
3037 echo "$as_me: failed program was:" >&5
3038sed 's/^/| /' conftest.$ac_ext >&5
3039
3040fi
3041rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3042 cat >conftest.$ac_ext <<_ACEOF
3043/* confdefs.h. */
3044_ACEOF
3045cat confdefs.h >>conftest.$ac_ext
3046cat >>conftest.$ac_ext <<_ACEOF
3047/* end confdefs.h. */
3048#define _LARGE_FILES 1
3049#include <sys/types.h>
3050 /* Check that off_t can represent 2**63 - 1 correctly.
3051 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3052 since some C++ compilers masquerading as C compilers
3053 incorrectly reject 9223372036854775807. */
3054#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3055 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3056 && LARGE_OFF_T % 2147483647 == 1)
3057 ? 1 : -1];
3058int
3059main ()
3060{
3061
3062 ;
3063 return 0;
3064}
3065_ACEOF
3066rm -f conftest.$ac_objext
3067if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3068 (eval $ac_compile) 2>conftest.er1
3069 ac_status=$?
3070 grep -v '^ *+' conftest.er1 >conftest.err
3071 rm -f conftest.er1
3072 cat conftest.err >&5
3073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3074 (exit $ac_status); } &&
3075 { ac_try='test -z "$ac_c_werror_flag"
3076 || test ! -s conftest.err'
3077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3078 (eval $ac_try) 2>&5
3079 ac_status=$?
3080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3081 (exit $ac_status); }; } &&
3082 { ac_try='test -s conftest.$ac_objext'
3083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3084 (eval $ac_try) 2>&5
3085 ac_status=$?
3086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3087 (exit $ac_status); }; }; then
3088 ac_cv_sys_large_files=1; break
3089else
3090 echo "$as_me: failed program was:" >&5
3091sed 's/^/| /' conftest.$ac_ext >&5
3092
3093fi
3094rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3095 break
3096done
3097fi
3098echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
3099echo "${ECHO_T}$ac_cv_sys_large_files" >&6
3100if test "$ac_cv_sys_large_files" != no; then
3101
3102cat >>confdefs.h <<_ACEOF
3103#define _LARGE_FILES $ac_cv_sys_large_files
3104_ACEOF
3105
3106fi
3107rm -f conftest*
3108fi
3109
8ddbb593
DJ
3110ac_ext=c
3111ac_cpp='$CPP $CPPFLAGS'
3112ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3113ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3114ac_compiler_gnu=$ac_cv_c_compiler_gnu
3115echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3116echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3117# On Suns, sometimes $CPP names a directory.
3118if test -n "$CPP" && test -d "$CPP"; then
3119 CPP=
3120fi
3121if test -z "$CPP"; then
3122 if test "${ac_cv_prog_CPP+set}" = set; then
3123 echo $ECHO_N "(cached) $ECHO_C" >&6
3124else
3125 # Double quotes because CPP needs to be expanded
3126 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3127 do
3128 ac_preproc_ok=false
3129for ac_c_preproc_warn_flag in '' yes
3130do
3131 # Use a header file that comes with gcc, so configuring glibc
3132 # with a fresh cross-compiler works.
3133 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3134 # <limits.h> exists even on freestanding compilers.
3135 # On the NeXT, cc -E runs the code through the compiler's parser,
3136 # not just through cpp. "Syntax error" is here to catch this case.
3137 cat >conftest.$ac_ext <<_ACEOF
8ddbb593
DJ
3138/* confdefs.h. */
3139_ACEOF
3140cat confdefs.h >>conftest.$ac_ext
3141cat >>conftest.$ac_ext <<_ACEOF
3142/* end confdefs.h. */
3143#ifdef __STDC__
3144# include <limits.h>
3145#else
3146# include <assert.h>
3147#endif
58670637 3148 Syntax error
8ddbb593
DJ
3149_ACEOF
3150if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3151 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3152 ac_status=$?
3153 grep -v '^ *+' conftest.er1 >conftest.err
3154 rm -f conftest.er1
3155 cat conftest.err >&5
3156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3157 (exit $ac_status); } >/dev/null; then
3158 if test -s conftest.err; then
3159 ac_cpp_err=$ac_c_preproc_warn_flag
58670637 3160 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8ddbb593
DJ
3161 else
3162 ac_cpp_err=
3163 fi
3164else
3165 ac_cpp_err=yes
3166fi
3167if test -z "$ac_cpp_err"; then
3168 :
3169else
3170 echo "$as_me: failed program was:" >&5
3171sed 's/^/| /' conftest.$ac_ext >&5
3172
3173 # Broken: fails on valid input.
3174continue
3175fi
3176rm -f conftest.err conftest.$ac_ext
3177
3178 # OK, works on sane cases. Now check whether non-existent headers
3179 # can be detected and how.
3180 cat >conftest.$ac_ext <<_ACEOF
8ddbb593
DJ
3181/* confdefs.h. */
3182_ACEOF
3183cat confdefs.h >>conftest.$ac_ext
3184cat >>conftest.$ac_ext <<_ACEOF
3185/* end confdefs.h. */
3186#include <ac_nonexistent.h>
3187_ACEOF
3188if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3189 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3190 ac_status=$?
3191 grep -v '^ *+' conftest.er1 >conftest.err
3192 rm -f conftest.er1
3193 cat conftest.err >&5
3194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3195 (exit $ac_status); } >/dev/null; then
3196 if test -s conftest.err; then
3197 ac_cpp_err=$ac_c_preproc_warn_flag
58670637 3198 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8ddbb593
DJ
3199 else
3200 ac_cpp_err=
3201 fi
3202else
3203 ac_cpp_err=yes
3204fi
3205if test -z "$ac_cpp_err"; then
3206 # Broken: success on invalid input.
3207continue
3208else
3209 echo "$as_me: failed program was:" >&5
3210sed 's/^/| /' conftest.$ac_ext >&5
3211
3212 # Passes both tests.
3213ac_preproc_ok=:
3214break
3215fi
3216rm -f conftest.err conftest.$ac_ext
3217
3218done
3219# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3220rm -f conftest.err conftest.$ac_ext
3221if $ac_preproc_ok; then
3222 break
3223fi
3224
3225 done
3226 ac_cv_prog_CPP=$CPP
3227
3228fi
3229 CPP=$ac_cv_prog_CPP
3230else
3231 ac_cv_prog_CPP=$CPP
3232fi
3233echo "$as_me:$LINENO: result: $CPP" >&5
3234echo "${ECHO_T}$CPP" >&6
3235ac_preproc_ok=false
3236for ac_c_preproc_warn_flag in '' yes
3237do
3238 # Use a header file that comes with gcc, so configuring glibc
3239 # with a fresh cross-compiler works.
3240 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3241 # <limits.h> exists even on freestanding compilers.
3242 # On the NeXT, cc -E runs the code through the compiler's parser,
3243 # not just through cpp. "Syntax error" is here to catch this case.
3244 cat >conftest.$ac_ext <<_ACEOF
8ddbb593
DJ
3245/* confdefs.h. */
3246_ACEOF
3247cat confdefs.h >>conftest.$ac_ext
3248cat >>conftest.$ac_ext <<_ACEOF
3249/* end confdefs.h. */
3250#ifdef __STDC__
3251# include <limits.h>
3252#else
3253# include <assert.h>
3254#endif
58670637 3255 Syntax error
8ddbb593
DJ
3256_ACEOF
3257if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3258 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3259 ac_status=$?
3260 grep -v '^ *+' conftest.er1 >conftest.err
3261 rm -f conftest.er1
3262 cat conftest.err >&5
3263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3264 (exit $ac_status); } >/dev/null; then
3265 if test -s conftest.err; then
3266 ac_cpp_err=$ac_c_preproc_warn_flag
58670637 3267 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8ddbb593
DJ
3268 else
3269 ac_cpp_err=
3270 fi
3271else
3272 ac_cpp_err=yes
3273fi
3274if test -z "$ac_cpp_err"; then
3275 :
3276else
3277 echo "$as_me: failed program was:" >&5
3278sed 's/^/| /' conftest.$ac_ext >&5
3279
3280 # Broken: fails on valid input.
3281continue
3282fi
3283rm -f conftest.err conftest.$ac_ext
3284
3285 # OK, works on sane cases. Now check whether non-existent headers
3286 # can be detected and how.
3287 cat >conftest.$ac_ext <<_ACEOF
8ddbb593
DJ
3288/* confdefs.h. */
3289_ACEOF
3290cat confdefs.h >>conftest.$ac_ext
3291cat >>conftest.$ac_ext <<_ACEOF
3292/* end confdefs.h. */
3293#include <ac_nonexistent.h>
3294_ACEOF
3295if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3296 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3297 ac_status=$?
3298 grep -v '^ *+' conftest.er1 >conftest.err
3299 rm -f conftest.er1
3300 cat conftest.err >&5
3301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3302 (exit $ac_status); } >/dev/null; then
3303 if test -s conftest.err; then
3304 ac_cpp_err=$ac_c_preproc_warn_flag
58670637 3305 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8ddbb593
DJ
3306 else
3307 ac_cpp_err=
3308 fi
3309else
3310 ac_cpp_err=yes
3311fi
3312if test -z "$ac_cpp_err"; then
3313 # Broken: success on invalid input.
3314continue
3315else
3316 echo "$as_me: failed program was:" >&5
3317sed 's/^/| /' conftest.$ac_ext >&5
3318
3319 # Passes both tests.
3320ac_preproc_ok=:
3321break
3322fi
3323rm -f conftest.err conftest.$ac_ext
3324
3325done
3326# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3327rm -f conftest.err conftest.$ac_ext
3328if $ac_preproc_ok; then
3329 :
3330else
c8536f38
DD
3331 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3332echo "$as_me: error: in \`$ac_pwd':" >&2;}
3333{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
8ddbb593
DJ
3334See \`config.log' for more details." >&5
3335echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3336See \`config.log' for more details." >&2;}
c8536f38 3337 { (exit 1); exit 1; }; }; }
8ddbb593
DJ
3338fi
3339
3340ac_ext=c
3341ac_cpp='$CPP $CPPFLAGS'
3342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3344ac_compiler_gnu=$ac_cv_c_compiler_gnu
3345
3346
3347ac_c_preproc_warn_flag=yes
2299a76d 3348
fd7d450d 3349
a104c397
PB
3350ac_libiberty_warn_cflags=
3351save_CFLAGS="$CFLAGS"
1f616ca1 3352for option in -W -Wall -Wwrite-strings -Wc++-compat \
a104c397
PB
3353 -Wstrict-prototypes; do
3354 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
3355
3356 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
3357echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
3358if eval "test \"\${$as_acx_Woption+set}\" = set"; then
fd7d450d
DD
3359 echo $ECHO_N "(cached) $ECHO_C" >&6
3360else
a104c397
PB
3361 CFLAGS="$option"
3362 cat >conftest.$ac_ext <<_ACEOF
fd7d450d
DD
3363/* confdefs.h. */
3364_ACEOF
3365cat confdefs.h >>conftest.$ac_ext
3366cat >>conftest.$ac_ext <<_ACEOF
3367/* end confdefs.h. */
3368
a104c397
PB
3369int
3370main ()
3371{
3372
3373 ;
3374 return 0;
3375}
fd7d450d
DD
3376_ACEOF
3377rm -f conftest.$ac_objext
3378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3379 (eval $ac_compile) 2>conftest.er1
3380 ac_status=$?
3381 grep -v '^ *+' conftest.er1 >conftest.err
3382 rm -f conftest.er1
3383 cat conftest.err >&5
3384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3385 (exit $ac_status); } &&
3386 { ac_try='test -z "$ac_c_werror_flag"
3387 || test ! -s conftest.err'
3388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3389 (eval $ac_try) 2>&5
3390 ac_status=$?
3391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3392 (exit $ac_status); }; } &&
3393 { ac_try='test -s conftest.$ac_objext'
3394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3395 (eval $ac_try) 2>&5
3396 ac_status=$?
3397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3398 (exit $ac_status); }; }; then
a104c397 3399 eval "$as_acx_Woption=yes"
fd7d450d
DD
3400else
3401 echo "$as_me: failed program was:" >&5
3402sed 's/^/| /' conftest.$ac_ext >&5
3403
a104c397 3404eval "$as_acx_Woption=no"
fd7d450d
DD
3405fi
3406rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fd7d450d
DD
3407
3408fi
a104c397
PB
3409echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
3410echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3411 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
3412 ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }$option"
fd7d450d 3413fi
11a338da 3414
a104c397
PB
3415 done
3416CFLAGS="$save_CFLAGS"
3417
1f616ca1
PB
3418if test "$GCC" = yes; then
3419 echo "$as_me:$LINENO: checking whether $CC supports -pedantic " >&5
3420echo $ECHO_N "checking whether $CC supports -pedantic ... $ECHO_C" >&6
3421if test "${acx_cv_prog_cc_pedantic_+set}" = set; then
3422 echo $ECHO_N "(cached) $ECHO_C" >&6
3423else
3424 save_CFLAGS="$CFLAGS"
3425CFLAGS="-pedantic "
3426cat >conftest.$ac_ext <<_ACEOF
3427/* confdefs.h. */
3428_ACEOF
3429cat confdefs.h >>conftest.$ac_ext
3430cat >>conftest.$ac_ext <<_ACEOF
3431/* end confdefs.h. */
3432
3433int
3434main ()
3435{
3436
3437 ;
3438 return 0;
3439}
3440_ACEOF
3441rm -f conftest.$ac_objext
3442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3443 (eval $ac_compile) 2>conftest.er1
3444 ac_status=$?
3445 grep -v '^ *+' conftest.er1 >conftest.err
3446 rm -f conftest.er1
3447 cat conftest.err >&5
3448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3449 (exit $ac_status); } &&
3450 { ac_try='test -z "$ac_c_werror_flag"
3451 || test ! -s conftest.err'
3452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3453 (eval $ac_try) 2>&5
3454 ac_status=$?
3455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3456 (exit $ac_status); }; } &&
3457 { ac_try='test -s conftest.$ac_objext'
3458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3459 (eval $ac_try) 2>&5
3460 ac_status=$?
3461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3462 (exit $ac_status); }; }; then
3463 acx_cv_prog_cc_pedantic_=yes
3464else
3465 echo "$as_me: failed program was:" >&5
3466sed 's/^/| /' conftest.$ac_ext >&5
3467
3468acx_cv_prog_cc_pedantic_=no
3469fi
3470rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3471CFLAGS="$save_CFLAGS"
3472fi
3473echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic_" >&5
3474echo "${ECHO_T}$acx_cv_prog_cc_pedantic_" >&6
3475if test $acx_cv_prog_cc_pedantic_ = yes; then
3476 ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }-pedantic "
3477fi
3478
3479
3480fi
3481
3482
11a338da 3483
46a10049
DD
3484if test "x$CC" != xcc; then
3485 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
3486echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
3487else
3488 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
3489echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
3490fi
3491set dummy $CC; ac_cc=`echo $2 |
3492 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
3493if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
3494 echo $ECHO_N "(cached) $ECHO_C" >&6
3495else
3496 cat >conftest.$ac_ext <<_ACEOF
3497/* confdefs.h. */
3498_ACEOF
3499cat confdefs.h >>conftest.$ac_ext
3500cat >>conftest.$ac_ext <<_ACEOF
3501/* end confdefs.h. */
3502
3503int
3504main ()
3505{
3506
3507 ;
3508 return 0;
3509}
3510_ACEOF
3511# Make sure it works both with $CC and with simple cc.
3512# We do the test twice because some compilers refuse to overwrite an
3513# existing .o file with -o, though they will create one.
3514ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
3515if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3516 (eval $ac_try) 2>&5
3517 ac_status=$?
3518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3519 (exit $ac_status); } &&
3520 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3521 (eval $ac_try) 2>&5
3522 ac_status=$?
3523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3524 (exit $ac_status); };
3525then
3526 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
3527 if test "x$CC" != xcc; then
3528 # Test first that cc exists at all.
3529 if { ac_try='cc -c conftest.$ac_ext >&5'
3530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3531 (eval $ac_try) 2>&5
3532 ac_status=$?
3533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3534 (exit $ac_status); }; }; then
3535 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
3536 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3537 (eval $ac_try) 2>&5
3538 ac_status=$?
3539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3540 (exit $ac_status); } &&
3541 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3542 (eval $ac_try) 2>&5
3543 ac_status=$?
3544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3545 (exit $ac_status); };
3546 then
3547 # cc works too.
3548 :
3549 else
3550 # cc exists but doesn't like -o.
3551 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3552 fi
3553 fi
3554 fi
3555else
3556 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3557fi
3558rm -f conftest*
3559
3560fi
3561if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
3562 echo "$as_me:$LINENO: result: yes" >&5
3563echo "${ECHO_T}yes" >&6
3564else
3565 echo "$as_me:$LINENO: result: no" >&5
3566echo "${ECHO_T}no" >&6
3567
3568cat >>confdefs.h <<\_ACEOF
3569#define NO_MINUS_C_MINUS_O 1
3570_ACEOF
3571
3572fi
3573
3574# autoconf is lame and doesn't give us any substitution variable for this.
3575if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
3576 NO_MINUS_C_MINUS_O=yes
3577else
3578 OUTPUT_OPTION='-o $@'
3579fi
3580
3581
3582
11a338da
DD
3583echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3584echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3585if test "${ac_cv_c_const+set}" = set; then
96e00b33
L
3586 echo $ECHO_N "(cached) $ECHO_C" >&6
3587else
11a338da
DD
3588 cat >conftest.$ac_ext <<_ACEOF
3589/* confdefs.h. */
3590_ACEOF
3591cat confdefs.h >>conftest.$ac_ext
3592cat >>conftest.$ac_ext <<_ACEOF
3593/* end confdefs.h. */
3594
3595int
3596main ()
3597{
3598/* FIXME: Include the comments suggested by Paul. */
3599#ifndef __cplusplus
3600 /* Ultrix mips cc rejects this. */
3601 typedef int charset[2];
3602 const charset x;
3603 /* SunOS 4.1.1 cc rejects this. */
3604 char const *const *ccp;
3605 char **p;
3606 /* NEC SVR4.0.2 mips cc rejects this. */
3607 struct point {int x, y;};
3608 static struct point const zero = {0,0};
3609 /* AIX XL C 1.02.0.0 rejects this.
3610 It does not let you subtract one const X* pointer from another in
3611 an arm of an if-expression whose if-part is not a constant
3612 expression */
3613 const char *g = "string";
3614 ccp = &g + (g ? g-g : 0);
3615 /* HPUX 7.0 cc rejects these. */
3616 ++ccp;
3617 p = (char**) ccp;
3618 ccp = (char const *const *) p;
3619 { /* SCO 3.2v4 cc rejects this. */
3620 char *t;
3621 char const *s = 0 ? (char *) 0 : (char const *) 0;
3622
3623 *t++ = 0;
3624 }
3625 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3626 int x[] = {25, 17};
3627 const int *foo = &x[0];
3628 ++foo;
3629 }
3630 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3631 typedef const int *iptr;
3632 iptr p = 0;
3633 ++p;
3634 }
3635 { /* AIX XL C 1.02.0.0 rejects this saying
3636 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3637 struct s { int j; const int *ap[3]; };
3638 struct s *b; b->j = 5;
3639 }
3640 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3641 const int foo = 10;
3642 }
3643#endif
3644
3645 ;
3646 return 0;
3647}
3648_ACEOF
3649rm -f conftest.$ac_objext
3650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3651 (eval $ac_compile) 2>conftest.er1
3652 ac_status=$?
3653 grep -v '^ *+' conftest.er1 >conftest.err
3654 rm -f conftest.er1
3655 cat conftest.err >&5
3656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3657 (exit $ac_status); } &&
fd7d450d
DD
3658 { ac_try='test -z "$ac_c_werror_flag"
3659 || test ! -s conftest.err'
11a338da
DD
3660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3661 (eval $ac_try) 2>&5
3662 ac_status=$?
3663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3664 (exit $ac_status); }; } &&
3665 { ac_try='test -s conftest.$ac_objext'
3666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3667 (eval $ac_try) 2>&5
3668 ac_status=$?
3669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3670 (exit $ac_status); }; }; then
3671 ac_cv_c_const=yes
96e00b33 3672else
11a338da
DD
3673 echo "$as_me: failed program was:" >&5
3674sed 's/^/| /' conftest.$ac_ext >&5
3675
3676ac_cv_c_const=no
96e00b33 3677fi
11a338da 3678rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2299a76d 3679fi
11a338da
DD
3680echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3681echo "${ECHO_T}$ac_cv_c_const" >&6
3682if test $ac_cv_c_const = no; then
3683
3684cat >>confdefs.h <<\_ACEOF
3685#define const
3686_ACEOF
2299a76d 3687
96e00b33 3688fi
11a338da
DD
3689
3690echo "$as_me:$LINENO: checking for inline" >&5
3691echo $ECHO_N "checking for inline... $ECHO_C" >&6
3692if test "${ac_cv_c_inline+set}" = set; then
96e00b33
L
3693 echo $ECHO_N "(cached) $ECHO_C" >&6
3694else
11a338da
DD
3695 ac_cv_c_inline=no
3696for ac_kw in inline __inline__ __inline; do
3697 cat >conftest.$ac_ext <<_ACEOF
3698/* confdefs.h. */
3699_ACEOF
3700cat confdefs.h >>conftest.$ac_ext
3701cat >>conftest.$ac_ext <<_ACEOF
3702/* end confdefs.h. */
3703#ifndef __cplusplus
3704typedef int foo_t;
3705static $ac_kw foo_t static_foo () {return 0; }
3706$ac_kw foo_t foo () {return 0; }
3707#endif
96e00b33 3708
11a338da
DD
3709_ACEOF
3710rm -f conftest.$ac_objext
3711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3712 (eval $ac_compile) 2>conftest.er1
3713 ac_status=$?
3714 grep -v '^ *+' conftest.er1 >conftest.err
3715 rm -f conftest.er1
3716 cat conftest.err >&5
3717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3718 (exit $ac_status); } &&
fd7d450d
DD
3719 { ac_try='test -z "$ac_c_werror_flag"
3720 || test ! -s conftest.err'
11a338da
DD
3721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3722 (eval $ac_try) 2>&5
3723 ac_status=$?
3724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3725 (exit $ac_status); }; } &&
3726 { ac_try='test -s conftest.$ac_objext'
3727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3728 (eval $ac_try) 2>&5
3729 ac_status=$?
3730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3731 (exit $ac_status); }; }; then
3732 ac_cv_c_inline=$ac_kw; break
2299a76d 3733else
11a338da
DD
3734 echo "$as_me: failed program was:" >&5
3735sed 's/^/| /' conftest.$ac_ext >&5
96e00b33 3736
96e00b33 3737fi
11a338da
DD
3738rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3739done
3740
96e00b33 3741fi
11a338da
DD
3742echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3743echo "${ECHO_T}$ac_cv_c_inline" >&6
96e00b33 3744
96e00b33 3745
11a338da
DD
3746case $ac_cv_c_inline in
3747 inline | yes) ;;
3748 *)
3749 case $ac_cv_c_inline in
3750 no) ac_val=;;
3751 *) ac_val=$ac_cv_c_inline;;
3752 esac
3753 cat >>confdefs.h <<_ACEOF
3754#ifndef __cplusplus
3755#define inline $ac_val
3756#endif
3757_ACEOF
3758 ;;
3759esac
96e00b33 3760
11a338da
DD
3761echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
3762echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
3763if test "${ac_cv_c_bigendian+set}" = set; then
96e00b33
L
3764 echo $ECHO_N "(cached) $ECHO_C" >&6
3765else
0093138c 3766 # See if sys/param.h defines the BYTE_ORDER macro.
11a338da
DD
3767cat >conftest.$ac_ext <<_ACEOF
3768/* confdefs.h. */
3769_ACEOF
3770cat confdefs.h >>conftest.$ac_ext
3771cat >>conftest.$ac_ext <<_ACEOF
3772/* end confdefs.h. */
3773#include <sys/types.h>
3774#include <sys/param.h>
0093138c 3775
11a338da
DD
3776int
3777main ()
3778{
11a338da
DD
3779#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3780 bogus endian macros
3781#endif
0093138c 3782
11a338da
DD
3783 ;
3784 return 0;
3785}
3786_ACEOF
3787rm -f conftest.$ac_objext
3788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3789 (eval $ac_compile) 2>conftest.er1
3790 ac_status=$?
3791 grep -v '^ *+' conftest.er1 >conftest.err
3792 rm -f conftest.er1
46a10049
DD
3793 cat conftest.err >&5
3794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3795 (exit $ac_status); } &&
fd7d450d
DD
3796 { ac_try='test -z "$ac_c_werror_flag"
3797 || test ! -s conftest.err'
46a10049
DD
3798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3799 (eval $ac_try) 2>&5
58670637
DD
3800 ac_status=$?
3801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
46a10049
DD
3802 (exit $ac_status); }; } &&
3803 { ac_try='test -s conftest.$ac_objext'
3804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3805 (eval $ac_try) 2>&5
2299a76d
DJ
3806 ac_status=$?
3807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
46a10049
DD
3808 (exit $ac_status); }; }; then
3809 # It does; now see whether it defined to BIG_ENDIAN or not.
2299a76d 3810cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
3811/* confdefs.h. */
3812_ACEOF
3813cat confdefs.h >>conftest.$ac_ext
3814cat >>conftest.$ac_ext <<_ACEOF
3815/* end confdefs.h. */
46a10049
DD
3816#include <sys/types.h>
3817#include <sys/param.h>
0093138c 3818
2299a76d
DJ
3819int
3820main ()
3821{
46a10049
DD
3822#if BYTE_ORDER != BIG_ENDIAN
3823 not big endian
3824#endif
0093138c 3825
2299a76d
DJ
3826 ;
3827 return 0;
3828}
3829_ACEOF
46a10049
DD
3830rm -f conftest.$ac_objext
3831if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3832 (eval $ac_compile) 2>conftest.er1
2299a76d 3833 ac_status=$?
58670637
DD
3834 grep -v '^ *+' conftest.er1 >conftest.err
3835 rm -f conftest.er1
3836 cat conftest.err >&5
2299a76d
DJ
3837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3838 (exit $ac_status); } &&
fd7d450d
DD
3839 { ac_try='test -z "$ac_c_werror_flag"
3840 || test ! -s conftest.err'
58670637
DD
3841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3842 (eval $ac_try) 2>&5
3843 ac_status=$?
3844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3845 (exit $ac_status); }; } &&
46a10049 3846 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
3847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3848 (eval $ac_try) 2>&5
3849 ac_status=$?
3850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3851 (exit $ac_status); }; }; then
46a10049 3852 ac_cv_c_bigendian=yes
7108c5dc 3853else
2299a76d
DJ
3854 echo "$as_me: failed program was:" >&5
3855sed 's/^/| /' conftest.$ac_ext >&5
3856
46a10049 3857ac_cv_c_bigendian=no
7108c5dc 3858fi
46a10049
DD
3859rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3860else
3861 echo "$as_me: failed program was:" >&5
3862sed 's/^/| /' conftest.$ac_ext >&5
2299a76d 3863
0093138c
DD
3864# It does not; compile a test program.
3865if test "$cross_compiling" = yes; then
3866 # try to guess the endianness by grepping values into an object file
3867 ac_cv_c_bigendian=unknown
3868 cat >conftest.$ac_ext <<_ACEOF
3869/* confdefs.h. */
3870_ACEOF
3871cat confdefs.h >>conftest.$ac_ext
3872cat >>conftest.$ac_ext <<_ACEOF
3873/* end confdefs.h. */
3874short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3875short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3876void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
3877short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3878short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3879void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
3880int
3881main ()
3882{
3883 _ascii (); _ebcdic ();
3884 ;
3885 return 0;
3886}
3887_ACEOF
3888rm -f conftest.$ac_objext
3889if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3890 (eval $ac_compile) 2>conftest.er1
3891 ac_status=$?
3892 grep -v '^ *+' conftest.er1 >conftest.err
3893 rm -f conftest.er1
3894 cat conftest.err >&5
3895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3896 (exit $ac_status); } &&
fd7d450d
DD
3897 { ac_try='test -z "$ac_c_werror_flag"
3898 || test ! -s conftest.err'
0093138c
DD
3899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3900 (eval $ac_try) 2>&5
3901 ac_status=$?
3902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3903 (exit $ac_status); }; } &&
3904 { ac_try='test -s conftest.$ac_objext'
3905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3906 (eval $ac_try) 2>&5
3907 ac_status=$?
3908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3909 (exit $ac_status); }; }; then
3910 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
3911 ac_cv_c_bigendian=yes
3912fi
3913if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
3914 if test "$ac_cv_c_bigendian" = unknown; then
3915 ac_cv_c_bigendian=no
3916 else
3917 # finding both strings is unlikely to happen, but who knows?
3918 ac_cv_c_bigendian=unknown
3919 fi
3920fi
3921else
3922 echo "$as_me: failed program was:" >&5
3923sed 's/^/| /' conftest.$ac_ext >&5
3924
7108c5dc 3925fi
46a10049 3926rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
46a10049
DD
3927else
3928 cat >conftest.$ac_ext <<_ACEOF
3929/* confdefs.h. */
3930_ACEOF
3931cat confdefs.h >>conftest.$ac_ext
3932cat >>conftest.$ac_ext <<_ACEOF
3933/* end confdefs.h. */
0093138c
DD
3934int
3935main ()
3936{
46a10049
DD
3937 /* Are we little or big endian? From Harbison&Steele. */
3938 union
3939 {
3940 long l;
3941 char c[sizeof (long)];
3942 } u;
3943 u.l = 1;
3944 exit (u.c[sizeof (long) - 1] == 1);
3945}
2299a76d 3946_ACEOF
46a10049
DD
3947rm -f conftest$ac_exeext
3948if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3949 (eval $ac_link) 2>&5
3950 ac_status=$?
3951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3952 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3954 (eval $ac_try) 2>&5
3955 ac_status=$?
3956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3957 (exit $ac_status); }; }; then
3958 ac_cv_c_bigendian=no
3959else
3960 echo "$as_me: program exited with status $ac_status" >&5
3961echo "$as_me: failed program was:" >&5
3962sed 's/^/| /' conftest.$ac_ext >&5
2299a76d 3963
46a10049
DD
3964( exit $ac_status )
3965ac_cv_c_bigendian=yes
7108c5dc 3966fi
46a10049
DD
3967rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3968fi
3969fi
0093138c 3970rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
46a10049
DD
3971fi
3972echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
3973echo "${ECHO_T}$ac_cv_c_bigendian" >&6
0093138c
DD
3974case $ac_cv_c_bigendian in
3975 yes)
2299a76d 3976
46a10049
DD
3977cat >>confdefs.h <<\_ACEOF
3978#define WORDS_BIGENDIAN 1
3979_ACEOF
0093138c
DD
3980 ;;
3981 no)
3982 ;;
3983 *)
3984 { { echo "$as_me:$LINENO: error: unknown endianness
3985presetting ac_cv_c_bigendian=no (or yes) will help" >&5
3986echo "$as_me: error: unknown endianness
3987presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
3988 { (exit 1); exit 1; }; } ;;
3989esac
7108c5dc 3990
252b5132
RH
3991
3992
3993
2299a76d 3994 ac_config_headers="$ac_config_headers config.h:config.in"
252b5132
RH
3995
3996
3997
3998# Find a good install program. We prefer a C program (faster),
3999# so one script is as good as another. But avoid the broken or
4000# incompatible versions:
4001# SysV /etc/install, /usr/sbin/install
4002# SunOS /usr/etc/install
4003# IRIX /sbin/install
4004# AIX /bin/install
2299a76d 4005# AmigaOS /C/install, which installs bootblocks on floppy discs
252b5132
RH
4006# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4007# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4008# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
58670637 4009# OS/2's system install, which has a completely different semantic
252b5132 4010# ./install, which can be erroneously created by make from ./install.sh.
2299a76d
DJ
4011echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4012echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
252b5132 4013if test -z "$INSTALL"; then
2299a76d
DJ
4014if test "${ac_cv_path_install+set}" = set; then
4015 echo $ECHO_N "(cached) $ECHO_C" >&6
4016else
4017 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4018for as_dir in $PATH
4019do
4020 IFS=$as_save_IFS
4021 test -z "$as_dir" && as_dir=.
4022 # Account for people who put trailing slashes in PATH elements.
4023case $as_dir/ in
4024 ./ | .// | /cC/* | \
4025 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
58670637 4026 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
2299a76d
DJ
4027 /usr/ucb/* ) ;;
4028 *)
4029 # OSF1 and SCO ODT 3.0 have their own names for install.
4030 # Don't use installbsd from OSF since it installs stuff as root
4031 # by default.
4032 for ac_prog in ginstall scoinst install; do
4033 for ac_exec_ext in '' $ac_executable_extensions; do
58670637
DD
4034 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4035 if test $ac_prog = install &&
4036 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4037 # AIX install. It has an incompatible calling convention.
4038 :
4039 elif test $ac_prog = install &&
4040 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4041 # program-specific install script used by HP pwplus--don't use.
4042 :
4043 else
4044 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4045 break 3
4046 fi
4047 fi
252b5132 4048 done
2299a76d
DJ
4049 done
4050 ;;
4051esac
4052done
4053
252b5132
RH
4054
4055fi
4056 if test "${ac_cv_path_install+set}" = set; then
2299a76d 4057 INSTALL=$ac_cv_path_install
252b5132
RH
4058 else
4059 # As a last resort, use the slow shell script. We don't cache a
4060 # path for INSTALL within a source directory, because that will
4061 # break other packages using the cache if that directory is
4062 # removed, or if the path is relative.
2299a76d 4063 INSTALL=$ac_install_sh
252b5132
RH
4064 fi
4065fi
2299a76d
DJ
4066echo "$as_me:$LINENO: result: $INSTALL" >&5
4067echo "${ECHO_T}$INSTALL" >&6
252b5132
RH
4068
4069# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4070# It thinks the first close brace ends the variable substitution.
4071test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4072
2299a76d 4073test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
252b5132
RH
4074
4075test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4076
4077
4cf896a5
KC
4078# Don't build the shared library for build.
4079if [ -n "${with_build_subdir}" ]; then
4080 enable_shared=no
4081fi
4082
4083frag=
4084case "${host}" in
4085 rs6000-ibm-aix3.1 | rs6000-ibm-aix)
4086 frag=mh-aix ;;
4087 *-*-cxux7*) frag=mh-cxux7 ;;
4088 *-*-freebsd2.1.*) frag=mh-fbsd21 ;;
4089 *-*-freebsd2.2.[012]) frag=mh-fbsd21 ;;
4090 i370-*-opened*) frag=mh-openedition ;;
4091 i[34567]86-*-windows*) frag=mh-windows ;;
4092esac
4093
4094if [ -n "${frag}" ]; then
c779bab8 4095 frag=${libiberty_topdir}/libiberty/config/$frag
4cf896a5
KC
4096fi
4097
4098# If they didn't specify --enable-shared, don't generate shared libs.
4099case "${enable_shared}" in
4100 yes) shared=yes ;;
4101 no) shared=no ;;
4102 "") shared=no ;;
4103 *) shared=yes ;;
4104esac
4105if [ "${shared}" = "yes" ]; then
4cf896a5
KC
4106 case "${host}" in
4107 *-*-cygwin*) ;;
c779bab8
PB
4108 alpha*-*-linux*) PICFLAG=-fPIC ;;
4109 arm*-*-*) PICFLAG=-fPIC ;;
4110 hppa*-*-*) PICFLAG=-fPIC ;;
4111 i370-*-*) PICFLAG=-fPIC ;;
4112 ia64-*-*) PICFLAG=-fpic ;;
4cf896a5 4113 i[34567]86-*-* | x86_64-*-*)
c779bab8
PB
4114 PICFLAG=-fpic ;;
4115 m68k-*-*) PICFLAG=-fpic ;;
017c1138 4116 mips*-*-linux) PICFLAG=-fPIC ;;
4cf896a5 4117 powerpc*-*-aix*) ;;
c779bab8
PB
4118 powerpc*-*-*) PICFLAG=-fPIC ;;
4119 sparc*-*-*) case "${CFLAGS}" in
4120 *-fpic* ) PICFLAG=-fpic ;;
4121 * ) PICFLAG=-fPIC ;;
4122 esac ;;
4123 s390*-*-*) PICFLAG=-fpic ;;
4cf896a5 4124 esac
4cf896a5
KC
4125fi
4126
c779bab8 4127
4cf896a5
KC
4128echo "# Warning: this fragment is automatically generated" > temp-frag
4129
c779bab8
PB
4130if [ -n "${frag}" ] && [ -f "${frag}" ]; then
4131 echo "Appending ${frag} to xhost-mkfrag"
4132 echo "# Following fragment copied from ${frag}" >> temp-frag
4133 cat ${frag} >> temp-frag
4134fi
4cf896a5
KC
4135
4136# record if we want to build shared libs.
4137if [ "${shared}" = "yes" ]; then
4138 echo enable_shared = yes >> temp-frag
4139else
4140 echo enable_shared = no >> temp-frag
4141fi
4142
4143frag=xhost-mkfrag
4144${CONFIG_SHELL-/bin/sh} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag
4145
252b5132
RH
4146host_makefile_frag=${frag}
4147
4148
4149# It's OK to check for header files. Although the compiler may not be
4150# able to link anything, it had better be able to at least compile
4151# something.
2299a76d
DJ
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
bb6a587d 4175
ac119ae8
DD
4176
4177for 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 stdio_ext.h
2299a76d
DJ
4178do
4179as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8ddbb593 4180echo "$as_me:$LINENO: checking for $ac_header" >&5
2299a76d
DJ
4181echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4182if eval "test \"\${$as_ac_Header+set}\" = set"; then
4183 echo $ECHO_N "(cached) $ECHO_C" >&6
2299a76d 4184else
8ddbb593 4185 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
4186/* confdefs.h. */
4187_ACEOF
4188cat confdefs.h >>conftest.$ac_ext
4189cat >>conftest.$ac_ext <<_ACEOF
4190/* end confdefs.h. */
4191#include <$ac_header>
4192_ACEOF
4193if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4194 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4195 ac_status=$?
4196 grep -v '^ *+' conftest.er1 >conftest.err
4197 rm -f conftest.er1
4198 cat conftest.err >&5
4199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4200 (exit $ac_status); } >/dev/null; then
4201 if test -s conftest.err; then
4202 ac_cpp_err=$ac_c_preproc_warn_flag
58670637 4203 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2299a76d
DJ
4204 else
4205 ac_cpp_err=
4206 fi
15ae9e71 4207else
2299a76d
DJ
4208 ac_cpp_err=yes
4209fi
4210if test -z "$ac_cpp_err"; then
8ddbb593 4211 eval "$as_ac_Header=yes"
2299a76d
DJ
4212else
4213 echo "$as_me: failed program was:" >&5
4214sed 's/^/| /' conftest.$ac_ext >&5
4215
8ddbb593 4216 eval "$as_ac_Header=no"
2299a76d
DJ
4217fi
4218rm -f conftest.err conftest.$ac_ext
2299a76d
DJ
4219fi
4220echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4221echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2299a76d
DJ
4222if test `eval echo '${'$as_ac_Header'}'` = yes; then
4223 cat >>confdefs.h <<_ACEOF
4224#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4225_ACEOF
4226
4227fi
2299a76d
DJ
4228done
4229
4230echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
4231echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4232if test "${ac_cv_header_sys_wait_h+set}" = set; then
4233 echo $ECHO_N "(cached) $ECHO_C" >&6
4234else
4235 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
4236/* confdefs.h. */
4237_ACEOF
4238cat confdefs.h >>conftest.$ac_ext
4239cat >>conftest.$ac_ext <<_ACEOF
4240/* end confdefs.h. */
dc579051 4241#include <sys/types.h>
2299a76d
DJ
4242#include <sys/wait.h>
4243#ifndef WEXITSTATUS
4244# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
15ae9e71 4245#endif
2299a76d
DJ
4246#ifndef WIFEXITED
4247# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4248#endif
4249
4250int
4251main ()
4252{
4253 int s;
4254 wait (&s);
4255 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4256 ;
4257 return 0;
4258}
4259_ACEOF
4260rm -f conftest.$ac_objext
4261if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 4262 (eval $ac_compile) 2>conftest.er1
2299a76d 4263 ac_status=$?
58670637
DD
4264 grep -v '^ *+' conftest.er1 >conftest.err
4265 rm -f conftest.er1
4266 cat conftest.err >&5
2299a76d
DJ
4267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4268 (exit $ac_status); } &&
fd7d450d
DD
4269 { ac_try='test -z "$ac_c_werror_flag"
4270 || test ! -s conftest.err'
58670637
DD
4271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4272 (eval $ac_try) 2>&5
4273 ac_status=$?
4274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4275 (exit $ac_status); }; } &&
4276 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
4277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4278 (eval $ac_try) 2>&5
4279 ac_status=$?
4280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4281 (exit $ac_status); }; }; then
4282 ac_cv_header_sys_wait_h=yes
dc579051 4283else
2299a76d
DJ
4284 echo "$as_me: failed program was:" >&5
4285sed 's/^/| /' conftest.$ac_ext >&5
4286
4287ac_cv_header_sys_wait_h=no
dc579051 4288fi
58670637 4289rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2299a76d
DJ
4290fi
4291echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
4292echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
4293if test $ac_cv_header_sys_wait_h = yes; then
4294
8ddbb593
DJ
4295cat >>confdefs.h <<\_ACEOF
4296#define HAVE_SYS_WAIT_H 1
4297_ACEOF
4298
4299fi
4300
4301echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4302echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4303if test "${ac_cv_header_time+set}" = set; then
4304 echo $ECHO_N "(cached) $ECHO_C" >&6
4305else
4306 cat >conftest.$ac_ext <<_ACEOF
8ddbb593
DJ
4307/* confdefs.h. */
4308_ACEOF
4309cat confdefs.h >>conftest.$ac_ext
4310cat >>conftest.$ac_ext <<_ACEOF
4311/* end confdefs.h. */
4312#include <sys/types.h>
4313#include <sys/time.h>
4314#include <time.h>
4315
4316int
4317main ()
4318{
4319if ((struct tm *) 0)
4320return 0;
4321 ;
4322 return 0;
4323}
4324_ACEOF
4325rm -f conftest.$ac_objext
4326if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 4327 (eval $ac_compile) 2>conftest.er1
8ddbb593 4328 ac_status=$?
58670637
DD
4329 grep -v '^ *+' conftest.er1 >conftest.err
4330 rm -f conftest.er1
4331 cat conftest.err >&5
8ddbb593
DJ
4332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4333 (exit $ac_status); } &&
fd7d450d
DD
4334 { ac_try='test -z "$ac_c_werror_flag"
4335 || test ! -s conftest.err'
58670637
DD
4336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4337 (eval $ac_try) 2>&5
4338 ac_status=$?
4339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4340 (exit $ac_status); }; } &&
4341 { ac_try='test -s conftest.$ac_objext'
8ddbb593
DJ
4342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4343 (eval $ac_try) 2>&5
4344 ac_status=$?
4345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4346 (exit $ac_status); }; }; then
4347 ac_cv_header_time=yes
4348else
4349 echo "$as_me: failed program was:" >&5
4350sed 's/^/| /' conftest.$ac_ext >&5
4351
4352ac_cv_header_time=no
4353fi
58670637 4354rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8ddbb593
DJ
4355fi
4356echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
4357echo "${ECHO_T}$ac_cv_header_time" >&6
4358if test $ac_cv_header_time = yes; then
4359
4360cat >>confdefs.h <<\_ACEOF
4361#define TIME_WITH_SYS_TIME 1
4362_ACEOF
4363
4364fi
4365
4366
4367echo "$as_me:$LINENO: checking whether errno must be declared" >&5
4368echo $ECHO_N "checking whether errno must be declared... $ECHO_C" >&6
4369if test "${libiberty_cv_declare_errno+set}" = set; then
4370 echo $ECHO_N "(cached) $ECHO_C" >&6
4371else
4372 cat >conftest.$ac_ext <<_ACEOF
8ddbb593
DJ
4373/* confdefs.h. */
4374_ACEOF
4375cat confdefs.h >>conftest.$ac_ext
4376cat >>conftest.$ac_ext <<_ACEOF
4377/* end confdefs.h. */
4378#include <errno.h>
4379int
4380main ()
4381{
4382int x = errno;
4383 ;
4384 return 0;
4385}
4386_ACEOF
4387rm -f conftest.$ac_objext
4388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 4389 (eval $ac_compile) 2>conftest.er1
8ddbb593 4390 ac_status=$?
58670637
DD
4391 grep -v '^ *+' conftest.er1 >conftest.err
4392 rm -f conftest.er1
4393 cat conftest.err >&5
8ddbb593
DJ
4394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4395 (exit $ac_status); } &&
fd7d450d
DD
4396 { ac_try='test -z "$ac_c_werror_flag"
4397 || test ! -s conftest.err'
58670637
DD
4398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4399 (eval $ac_try) 2>&5
4400 ac_status=$?
4401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4402 (exit $ac_status); }; } &&
4403 { ac_try='test -s conftest.$ac_objext'
8ddbb593
DJ
4404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4405 (eval $ac_try) 2>&5
4406 ac_status=$?
4407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4408 (exit $ac_status); }; }; then
4409 libiberty_cv_declare_errno=no
4410else
4411 echo "$as_me: failed program was:" >&5
4412sed 's/^/| /' conftest.$ac_ext >&5
4413
4414libiberty_cv_declare_errno=yes
4415fi
58670637 4416rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8ddbb593
DJ
4417fi
4418echo "$as_me:$LINENO: result: $libiberty_cv_declare_errno" >&5
4419echo "${ECHO_T}$libiberty_cv_declare_errno" >&6
4420if test $libiberty_cv_declare_errno = yes
4421then
4422cat >>confdefs.h <<\_ACEOF
4423#define NEED_DECLARATION_ERRNO 1
4424_ACEOF
4425
4426fi
4427
4428
40a59a4c 4429# Determine the size of an int for struct fibnode.
8ddbb593
DJ
4430echo "$as_me:$LINENO: checking for egrep" >&5
4431echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4432if test "${ac_cv_prog_egrep+set}" = set; then
4433 echo $ECHO_N "(cached) $ECHO_C" >&6
4434else
4435 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4436 then ac_cv_prog_egrep='grep -E'
4437 else ac_cv_prog_egrep='egrep'
4438 fi
4439fi
4440echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4441echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4442 EGREP=$ac_cv_prog_egrep
4443
4444
4445echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4446echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4447if test "${ac_cv_header_stdc+set}" = set; then
4448 echo $ECHO_N "(cached) $ECHO_C" >&6
4449else
4450 cat >conftest.$ac_ext <<_ACEOF
8ddbb593
DJ
4451/* confdefs.h. */
4452_ACEOF
4453cat confdefs.h >>conftest.$ac_ext
4454cat >>conftest.$ac_ext <<_ACEOF
4455/* end confdefs.h. */
4456#include <stdlib.h>
4457#include <stdarg.h>
4458#include <string.h>
4459#include <float.h>
4460
4461int
4462main ()
4463{
4464
4465 ;
4466 return 0;
4467}
4468_ACEOF
4469rm -f conftest.$ac_objext
4470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 4471 (eval $ac_compile) 2>conftest.er1
8ddbb593 4472 ac_status=$?
58670637
DD
4473 grep -v '^ *+' conftest.er1 >conftest.err
4474 rm -f conftest.er1
4475 cat conftest.err >&5
8ddbb593
DJ
4476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4477 (exit $ac_status); } &&
fd7d450d
DD
4478 { ac_try='test -z "$ac_c_werror_flag"
4479 || test ! -s conftest.err'
58670637
DD
4480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4481 (eval $ac_try) 2>&5
4482 ac_status=$?
4483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484 (exit $ac_status); }; } &&
4485 { ac_try='test -s conftest.$ac_objext'
8ddbb593
DJ
4486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4487 (eval $ac_try) 2>&5
4488 ac_status=$?
4489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4490 (exit $ac_status); }; }; then
4491 ac_cv_header_stdc=yes
4492else
4493 echo "$as_me: failed program was:" >&5
4494sed 's/^/| /' conftest.$ac_ext >&5
4495
4496ac_cv_header_stdc=no
4497fi
58670637 4498rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8ddbb593
DJ
4499
4500if test $ac_cv_header_stdc = yes; then
4501 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4502 cat >conftest.$ac_ext <<_ACEOF
8ddbb593
DJ
4503/* confdefs.h. */
4504_ACEOF
4505cat confdefs.h >>conftest.$ac_ext
4506cat >>conftest.$ac_ext <<_ACEOF
4507/* end confdefs.h. */
4508#include <string.h>
4509
4510_ACEOF
4511if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4512 $EGREP "memchr" >/dev/null 2>&1; then
4513 :
4514else
4515 ac_cv_header_stdc=no
4516fi
4517rm -f conftest*
4518
4519fi
4520
4521if test $ac_cv_header_stdc = yes; then
4522 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4523 cat >conftest.$ac_ext <<_ACEOF
8ddbb593
DJ
4524/* confdefs.h. */
4525_ACEOF
4526cat confdefs.h >>conftest.$ac_ext
4527cat >>conftest.$ac_ext <<_ACEOF
4528/* end confdefs.h. */
4529#include <stdlib.h>
4530
2299a76d 4531_ACEOF
8ddbb593
DJ
4532if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4533 $EGREP "free" >/dev/null 2>&1; then
4534 :
4535else
4536 ac_cv_header_stdc=no
4537fi
4538rm -f conftest*
2299a76d
DJ
4539
4540fi
4541
8ddbb593
DJ
4542if test $ac_cv_header_stdc = yes; then
4543 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4544 if test "$cross_compiling" = yes; then
4545 :
2299a76d
DJ
4546else
4547 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
4548/* confdefs.h. */
4549_ACEOF
4550cat confdefs.h >>conftest.$ac_ext
4551cat >>conftest.$ac_ext <<_ACEOF
4552/* end confdefs.h. */
8ddbb593
DJ
4553#include <ctype.h>
4554#if ((' ' & 0x0FF) == 0x020)
4555# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4556# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4557#else
4558# define ISLOWER(c) \
58670637
DD
4559 (('a' <= (c) && (c) <= 'i') \
4560 || ('j' <= (c) && (c) <= 'r') \
4561 || ('s' <= (c) && (c) <= 'z'))
8ddbb593
DJ
4562# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4563#endif
2299a76d 4564
8ddbb593 4565#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2299a76d
DJ
4566int
4567main ()
4568{
8ddbb593
DJ
4569 int i;
4570 for (i = 0; i < 256; i++)
4571 if (XOR (islower (i), ISLOWER (i))
58670637 4572 || toupper (i) != TOUPPER (i))
8ddbb593
DJ
4573 exit(2);
4574 exit (0);
2299a76d
DJ
4575}
4576_ACEOF
8ddbb593
DJ
4577rm -f conftest$ac_exeext
4578if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4579 (eval $ac_link) 2>&5
2299a76d
DJ
4580 ac_status=$?
4581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8ddbb593 4582 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2299a76d
DJ
4583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4584 (eval $ac_try) 2>&5
4585 ac_status=$?
4586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4587 (exit $ac_status); }; }; then
8ddbb593 4588 :
2299a76d 4589else
8ddbb593
DJ
4590 echo "$as_me: program exited with status $ac_status" >&5
4591echo "$as_me: failed program was:" >&5
2299a76d
DJ
4592sed 's/^/| /' conftest.$ac_ext >&5
4593
8ddbb593
DJ
4594( exit $ac_status )
4595ac_cv_header_stdc=no
2299a76d 4596fi
58670637 4597rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2299a76d 4598fi
8ddbb593
DJ
4599fi
4600fi
4601echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4602echo "${ECHO_T}$ac_cv_header_stdc" >&6
4603if test $ac_cv_header_stdc = yes; then
2299a76d
DJ
4604
4605cat >>confdefs.h <<\_ACEOF
8ddbb593 4606#define STDC_HEADERS 1
2299a76d
DJ
4607_ACEOF
4608
4609fi
4610
8ddbb593 4611# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2299a76d 4612
8ddbb593
DJ
4613
4614
4615
4616
4617
4618
4619
4620
4621for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
58670637 4622 inttypes.h stdint.h unistd.h
8ddbb593
DJ
4623do
4624as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4625echo "$as_me:$LINENO: checking for $ac_header" >&5
4626echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4627if eval "test \"\${$as_ac_Header+set}\" = set"; then
2299a76d
DJ
4628 echo $ECHO_N "(cached) $ECHO_C" >&6
4629else
4630 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
4631/* confdefs.h. */
4632_ACEOF
4633cat confdefs.h >>conftest.$ac_ext
4634cat >>conftest.$ac_ext <<_ACEOF
4635/* end confdefs.h. */
8ddbb593 4636#include <$ac_header>
2299a76d 4637_ACEOF
8ddbb593
DJ
4638if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4639 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2299a76d 4640 ac_status=$?
8ddbb593
DJ
4641 grep -v '^ *+' conftest.er1 >conftest.err
4642 rm -f conftest.er1
4643 cat conftest.err >&5
2299a76d 4644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8ddbb593
DJ
4645 (exit $ac_status); } >/dev/null; then
4646 if test -s conftest.err; then
4647 ac_cpp_err=$ac_c_preproc_warn_flag
58670637 4648 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8ddbb593
DJ
4649 else
4650 ac_cpp_err=
4651 fi
4652else
4653 ac_cpp_err=yes
4654fi
4655if test -z "$ac_cpp_err"; then
4656 eval "$as_ac_Header=yes"
2299a76d
DJ
4657else
4658 echo "$as_me: failed program was:" >&5
4659sed 's/^/| /' conftest.$ac_ext >&5
4660
8ddbb593 4661 eval "$as_ac_Header=no"
2299a76d 4662fi
8ddbb593 4663rm -f conftest.err conftest.$ac_ext
2299a76d 4664fi
8ddbb593
DJ
4665echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4666echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4667if test `eval echo '${'$as_ac_Header'}'` = yes; then
4668 cat >>confdefs.h <<_ACEOF
4669#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2299a76d
DJ
4670_ACEOF
4671
4672fi
8ddbb593 4673done
2299a76d
DJ
4674
4675
40a59a4c
DD
4676echo "$as_me:$LINENO: checking for int" >&5
4677echo $ECHO_N "checking for int... $ECHO_C" >&6
4678if test "${ac_cv_type_int+set}" = set; then
4679 echo $ECHO_N "(cached) $ECHO_C" >&6
4680else
4681 cat >conftest.$ac_ext <<_ACEOF
4682/* confdefs.h. */
4683_ACEOF
4684cat confdefs.h >>conftest.$ac_ext
4685cat >>conftest.$ac_ext <<_ACEOF
4686/* end confdefs.h. */
4687$ac_includes_default
4688int
4689main ()
4690{
4691if ((int *) 0)
4692 return 0;
4693if (sizeof (int))
4694 return 0;
4695 ;
4696 return 0;
4697}
4698_ACEOF
4699rm -f conftest.$ac_objext
4700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4701 (eval $ac_compile) 2>conftest.er1
4702 ac_status=$?
4703 grep -v '^ *+' conftest.er1 >conftest.err
4704 rm -f conftest.er1
4705 cat conftest.err >&5
4706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4707 (exit $ac_status); } &&
fd7d450d
DD
4708 { ac_try='test -z "$ac_c_werror_flag"
4709 || test ! -s conftest.err'
40a59a4c
DD
4710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4711 (eval $ac_try) 2>&5
4712 ac_status=$?
4713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4714 (exit $ac_status); }; } &&
4715 { ac_try='test -s conftest.$ac_objext'
4716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4717 (eval $ac_try) 2>&5
4718 ac_status=$?
4719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4720 (exit $ac_status); }; }; then
4721 ac_cv_type_int=yes
4722else
4723 echo "$as_me: failed program was:" >&5
4724sed 's/^/| /' conftest.$ac_ext >&5
4725
4726ac_cv_type_int=no
4727fi
4728rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4729fi
4730echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4731echo "${ECHO_T}$ac_cv_type_int" >&6
4732
4733echo "$as_me:$LINENO: checking size of int" >&5
4734echo $ECHO_N "checking size of int... $ECHO_C" >&6
4735if test "${ac_cv_sizeof_int+set}" = set; then
4736 echo $ECHO_N "(cached) $ECHO_C" >&6
4737else
4738 if test "$ac_cv_type_int" = yes; then
4739 # The cast to unsigned long works around a bug in the HP C Compiler
4740 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4741 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4742 # This bug is HP SR number 8606223364.
4743 if test "$cross_compiling" = yes; then
4744 # Depending upon the size, compute the lo and hi bounds.
4745cat >conftest.$ac_ext <<_ACEOF
4746/* confdefs.h. */
4747_ACEOF
4748cat confdefs.h >>conftest.$ac_ext
4749cat >>conftest.$ac_ext <<_ACEOF
4750/* end confdefs.h. */
4751$ac_includes_default
4752int
4753main ()
4754{
4755static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4756test_array [0] = 0
4757
4758 ;
4759 return 0;
4760}
4761_ACEOF
4762rm -f conftest.$ac_objext
4763if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4764 (eval $ac_compile) 2>conftest.er1
4765 ac_status=$?
4766 grep -v '^ *+' conftest.er1 >conftest.err
4767 rm -f conftest.er1
4768 cat conftest.err >&5
4769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4770 (exit $ac_status); } &&
fd7d450d
DD
4771 { ac_try='test -z "$ac_c_werror_flag"
4772 || test ! -s conftest.err'
40a59a4c
DD
4773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4774 (eval $ac_try) 2>&5
4775 ac_status=$?
4776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4777 (exit $ac_status); }; } &&
4778 { ac_try='test -s conftest.$ac_objext'
4779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4780 (eval $ac_try) 2>&5
4781 ac_status=$?
4782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4783 (exit $ac_status); }; }; then
4784 ac_lo=0 ac_mid=0
4785 while :; do
4786 cat >conftest.$ac_ext <<_ACEOF
4787/* confdefs.h. */
4788_ACEOF
4789cat confdefs.h >>conftest.$ac_ext
4790cat >>conftest.$ac_ext <<_ACEOF
4791/* end confdefs.h. */
4792$ac_includes_default
4793int
4794main ()
4795{
4796static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4797test_array [0] = 0
4798
4799 ;
4800 return 0;
4801}
4802_ACEOF
4803rm -f conftest.$ac_objext
4804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4805 (eval $ac_compile) 2>conftest.er1
4806 ac_status=$?
4807 grep -v '^ *+' conftest.er1 >conftest.err
4808 rm -f conftest.er1
4809 cat conftest.err >&5
4810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4811 (exit $ac_status); } &&
fd7d450d
DD
4812 { ac_try='test -z "$ac_c_werror_flag"
4813 || test ! -s conftest.err'
40a59a4c
DD
4814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4815 (eval $ac_try) 2>&5
4816 ac_status=$?
4817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4818 (exit $ac_status); }; } &&
4819 { ac_try='test -s conftest.$ac_objext'
4820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4821 (eval $ac_try) 2>&5
4822 ac_status=$?
4823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4824 (exit $ac_status); }; }; then
4825 ac_hi=$ac_mid; break
4826else
4827 echo "$as_me: failed program was:" >&5
4828sed 's/^/| /' conftest.$ac_ext >&5
4829
4830ac_lo=`expr $ac_mid + 1`
4831 if test $ac_lo -le $ac_mid; then
4832 ac_lo= ac_hi=
4833 break
4834 fi
4835 ac_mid=`expr 2 '*' $ac_mid + 1`
4836fi
4837rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4838 done
4839else
4840 echo "$as_me: failed program was:" >&5
4841sed 's/^/| /' conftest.$ac_ext >&5
4842
4843cat >conftest.$ac_ext <<_ACEOF
4844/* confdefs.h. */
4845_ACEOF
4846cat confdefs.h >>conftest.$ac_ext
4847cat >>conftest.$ac_ext <<_ACEOF
4848/* end confdefs.h. */
4849$ac_includes_default
4850int
4851main ()
4852{
4853static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4854test_array [0] = 0
4855
4856 ;
4857 return 0;
4858}
4859_ACEOF
4860rm -f conftest.$ac_objext
4861if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4862 (eval $ac_compile) 2>conftest.er1
4863 ac_status=$?
4864 grep -v '^ *+' conftest.er1 >conftest.err
4865 rm -f conftest.er1
4866 cat conftest.err >&5
4867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4868 (exit $ac_status); } &&
fd7d450d
DD
4869 { ac_try='test -z "$ac_c_werror_flag"
4870 || test ! -s conftest.err'
40a59a4c
DD
4871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4872 (eval $ac_try) 2>&5
4873 ac_status=$?
4874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4875 (exit $ac_status); }; } &&
4876 { ac_try='test -s conftest.$ac_objext'
4877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4878 (eval $ac_try) 2>&5
4879 ac_status=$?
4880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4881 (exit $ac_status); }; }; then
4882 ac_hi=-1 ac_mid=-1
4883 while :; do
4884 cat >conftest.$ac_ext <<_ACEOF
4885/* confdefs.h. */
4886_ACEOF
4887cat confdefs.h >>conftest.$ac_ext
4888cat >>conftest.$ac_ext <<_ACEOF
4889/* end confdefs.h. */
4890$ac_includes_default
4891int
4892main ()
4893{
4894static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4895test_array [0] = 0
4896
4897 ;
4898 return 0;
4899}
4900_ACEOF
4901rm -f conftest.$ac_objext
4902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4903 (eval $ac_compile) 2>conftest.er1
4904 ac_status=$?
4905 grep -v '^ *+' conftest.er1 >conftest.err
4906 rm -f conftest.er1
4907 cat conftest.err >&5
4908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4909 (exit $ac_status); } &&
fd7d450d
DD
4910 { ac_try='test -z "$ac_c_werror_flag"
4911 || test ! -s conftest.err'
40a59a4c
DD
4912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4913 (eval $ac_try) 2>&5
4914 ac_status=$?
4915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4916 (exit $ac_status); }; } &&
4917 { ac_try='test -s conftest.$ac_objext'
4918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4919 (eval $ac_try) 2>&5
4920 ac_status=$?
4921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4922 (exit $ac_status); }; }; then
4923 ac_lo=$ac_mid; break
4924else
4925 echo "$as_me: failed program was:" >&5
4926sed 's/^/| /' conftest.$ac_ext >&5
4927
4928ac_hi=`expr '(' $ac_mid ')' - 1`
4929 if test $ac_mid -le $ac_hi; then
4930 ac_lo= ac_hi=
4931 break
4932 fi
4933 ac_mid=`expr 2 '*' $ac_mid`
4934fi
4935rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4936 done
4937else
4938 echo "$as_me: failed program was:" >&5
4939sed 's/^/| /' conftest.$ac_ext >&5
4940
4941ac_lo= ac_hi=
4942fi
4943rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4944fi
4945rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4946# Binary search between lo and hi bounds.
4947while test "x$ac_lo" != "x$ac_hi"; do
4948 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4949 cat >conftest.$ac_ext <<_ACEOF
4950/* confdefs.h. */
4951_ACEOF
4952cat confdefs.h >>conftest.$ac_ext
4953cat >>conftest.$ac_ext <<_ACEOF
4954/* end confdefs.h. */
4955$ac_includes_default
4956int
4957main ()
4958{
4959static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4960test_array [0] = 0
4961
4962 ;
4963 return 0;
4964}
4965_ACEOF
4966rm -f conftest.$ac_objext
4967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4968 (eval $ac_compile) 2>conftest.er1
4969 ac_status=$?
4970 grep -v '^ *+' conftest.er1 >conftest.err
4971 rm -f conftest.er1
4972 cat conftest.err >&5
4973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4974 (exit $ac_status); } &&
fd7d450d
DD
4975 { ac_try='test -z "$ac_c_werror_flag"
4976 || test ! -s conftest.err'
40a59a4c
DD
4977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4978 (eval $ac_try) 2>&5
4979 ac_status=$?
4980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4981 (exit $ac_status); }; } &&
4982 { ac_try='test -s conftest.$ac_objext'
4983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4984 (eval $ac_try) 2>&5
4985 ac_status=$?
4986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4987 (exit $ac_status); }; }; then
4988 ac_hi=$ac_mid
4989else
4990 echo "$as_me: failed program was:" >&5
4991sed 's/^/| /' conftest.$ac_ext >&5
4992
4993ac_lo=`expr '(' $ac_mid ')' + 1`
4994fi
4995rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4996done
4997case $ac_lo in
4998?*) ac_cv_sizeof_int=$ac_lo;;
c8536f38
DD
4999'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5000echo "$as_me: error: in \`$ac_pwd':" >&2;}
5001{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
40a59a4c
DD
5002See \`config.log' for more details." >&5
5003echo "$as_me: error: cannot compute sizeof (int), 77
5004See \`config.log' for more details." >&2;}
c8536f38 5005 { (exit 1); exit 1; }; }; } ;;
40a59a4c
DD
5006esac
5007else
5008 if test "$cross_compiling" = yes; then
c8536f38
DD
5009 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5010echo "$as_me: error: in \`$ac_pwd':" >&2;}
5011{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
fd7d450d
DD
5012See \`config.log' for more details." >&5
5013echo "$as_me: error: cannot run test program while cross compiling
5014See \`config.log' for more details." >&2;}
c8536f38 5015 { (exit 1); exit 1; }; }; }
40a59a4c
DD
5016else
5017 cat >conftest.$ac_ext <<_ACEOF
5018/* confdefs.h. */
5019_ACEOF
5020cat confdefs.h >>conftest.$ac_ext
5021cat >>conftest.$ac_ext <<_ACEOF
5022/* end confdefs.h. */
5023$ac_includes_default
5024long longval () { return (long) (sizeof (int)); }
5025unsigned long ulongval () { return (long) (sizeof (int)); }
5026#include <stdio.h>
5027#include <stdlib.h>
5028int
5029main ()
5030{
5031
5032 FILE *f = fopen ("conftest.val", "w");
5033 if (! f)
5034 exit (1);
5035 if (((long) (sizeof (int))) < 0)
5036 {
5037 long i = longval ();
5038 if (i != ((long) (sizeof (int))))
5039 exit (1);
5040 fprintf (f, "%ld\n", i);
5041 }
5042 else
5043 {
5044 unsigned long i = ulongval ();
5045 if (i != ((long) (sizeof (int))))
5046 exit (1);
5047 fprintf (f, "%lu\n", i);
5048 }
5049 exit (ferror (f) || fclose (f) != 0);
5050
5051 ;
5052 return 0;
5053}
5054_ACEOF
5055rm -f conftest$ac_exeext
5056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5057 (eval $ac_link) 2>&5
5058 ac_status=$?
5059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5062 (eval $ac_try) 2>&5
5063 ac_status=$?
5064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065 (exit $ac_status); }; }; then
5066 ac_cv_sizeof_int=`cat conftest.val`
5067else
5068 echo "$as_me: program exited with status $ac_status" >&5
5069echo "$as_me: failed program was:" >&5
5070sed 's/^/| /' conftest.$ac_ext >&5
5071
5072( exit $ac_status )
c8536f38
DD
5073{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5074echo "$as_me: error: in \`$ac_pwd':" >&2;}
40a59a4c
DD
5075{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5076See \`config.log' for more details." >&5
5077echo "$as_me: error: cannot compute sizeof (int), 77
5078See \`config.log' for more details." >&2;}
c8536f38 5079 { (exit 1); exit 1; }; }; }
40a59a4c
DD
5080fi
5081rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5082fi
5083fi
5084rm -f conftest.val
5085else
5086 ac_cv_sizeof_int=0
5087fi
5088fi
5089echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5090echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5091cat >>confdefs.h <<_ACEOF
5092#define SIZEOF_INT $ac_cv_sizeof_int
5093_ACEOF
5094
5095
5096
2299a76d
DJ
5097echo "$as_me:$LINENO: checking for uintptr_t" >&5
5098echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
5099if test "${ac_cv_type_uintptr_t+set}" = set; then
5100 echo $ECHO_N "(cached) $ECHO_C" >&6
5101else
5102 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
5103/* confdefs.h. */
5104_ACEOF
5105cat confdefs.h >>conftest.$ac_ext
5106cat >>conftest.$ac_ext <<_ACEOF
5107/* end confdefs.h. */
5108$ac_includes_default
5109int
5110main ()
5111{
5112if ((uintptr_t *) 0)
5113 return 0;
5114if (sizeof (uintptr_t))
5115 return 0;
5116 ;
5117 return 0;
5118}
5119_ACEOF
5120rm -f conftest.$ac_objext
5121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 5122 (eval $ac_compile) 2>conftest.er1
2299a76d 5123 ac_status=$?
58670637
DD
5124 grep -v '^ *+' conftest.er1 >conftest.err
5125 rm -f conftest.er1
5126 cat conftest.err >&5
2299a76d
DJ
5127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5128 (exit $ac_status); } &&
fd7d450d
DD
5129 { ac_try='test -z "$ac_c_werror_flag"
5130 || test ! -s conftest.err'
58670637
DD
5131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5132 (eval $ac_try) 2>&5
5133 ac_status=$?
5134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5135 (exit $ac_status); }; } &&
5136 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
5137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5138 (eval $ac_try) 2>&5
5139 ac_status=$?
5140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5141 (exit $ac_status); }; }; then
5142 ac_cv_type_uintptr_t=yes
5143else
5144 echo "$as_me: failed program was:" >&5
5145sed 's/^/| /' conftest.$ac_ext >&5
dc579051 5146
2299a76d
DJ
5147ac_cv_type_uintptr_t=no
5148fi
58670637 5149rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15ae9e71 5150fi
2299a76d
DJ
5151echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
5152echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
5153if test $ac_cv_type_uintptr_t = yes; then
5154 :
5155else
5156
5157cat >>confdefs.h <<_ACEOF
15ae9e71 5158#define uintptr_t unsigned long
2299a76d 5159_ACEOF
15ae9e71
DD
5160
5161fi
dc579051 5162
bb6a587d
DD
5163
5164# Look for a 64-bit type.
5165echo "$as_me:$LINENO: checking for a 64-bit type" >&5
5166echo $ECHO_N "checking for a 64-bit type... $ECHO_C" >&6
5167if test "${liberty_cv_uint64+set}" = set; then
5168 echo $ECHO_N "(cached) $ECHO_C" >&6
5169else
5170 cat >conftest.$ac_ext <<_ACEOF
5171/* confdefs.h. */
5172_ACEOF
5173cat confdefs.h >>conftest.$ac_ext
5174cat >>conftest.$ac_ext <<_ACEOF
5175/* end confdefs.h. */
5176#ifdef HAVE_STDINT_H
5177#include <stdint.h>
5178#endif
5179int
5180main ()
5181{
5182extern uint64_t foo;
5183 ;
5184 return 0;
5185}
5186_ACEOF
5187rm -f conftest.$ac_objext
5188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5189 (eval $ac_compile) 2>conftest.er1
5190 ac_status=$?
5191 grep -v '^ *+' conftest.er1 >conftest.err
5192 rm -f conftest.er1
5193 cat conftest.err >&5
5194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5195 (exit $ac_status); } &&
fd7d450d
DD
5196 { ac_try='test -z "$ac_c_werror_flag"
5197 || test ! -s conftest.err'
bb6a587d
DD
5198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5199 (eval $ac_try) 2>&5
5200 ac_status=$?
5201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5202 (exit $ac_status); }; } &&
5203 { ac_try='test -s conftest.$ac_objext'
5204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5205 (eval $ac_try) 2>&5
5206 ac_status=$?
5207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5208 (exit $ac_status); }; }; then
5209 liberty_cv_uint64=uint64_t
5210else
5211 echo "$as_me: failed program was:" >&5
5212sed 's/^/| /' conftest.$ac_ext >&5
5213
5214cat >conftest.$ac_ext <<_ACEOF
5215/* confdefs.h. */
5216_ACEOF
5217cat confdefs.h >>conftest.$ac_ext
5218cat >>conftest.$ac_ext <<_ACEOF
5219/* end confdefs.h. */
5220#ifdef HAVE_LIMITS_H
5221#include <limits.h>
5222#endif
5223#ifndef CHAR_BIT
5224#define CHAR_BIT 8
5225#endif
5226int
5227main ()
5228{
5229extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1];
5230 ;
5231 return 0;
5232}
5233_ACEOF
5234rm -f conftest.$ac_objext
5235if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5236 (eval $ac_compile) 2>conftest.er1
5237 ac_status=$?
5238 grep -v '^ *+' conftest.er1 >conftest.err
5239 rm -f conftest.er1
5240 cat conftest.err >&5
5241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5242 (exit $ac_status); } &&
fd7d450d
DD
5243 { ac_try='test -z "$ac_c_werror_flag"
5244 || test ! -s conftest.err'
bb6a587d
DD
5245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5246 (eval $ac_try) 2>&5
5247 ac_status=$?
5248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5249 (exit $ac_status); }; } &&
5250 { ac_try='test -s conftest.$ac_objext'
5251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5252 (eval $ac_try) 2>&5
5253 ac_status=$?
5254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5255 (exit $ac_status); }; }; then
5256 liberty_cv_uint64="unsigned long"
5257else
5258 echo "$as_me: failed program was:" >&5
5259sed 's/^/| /' conftest.$ac_ext >&5
5260
5261cat >conftest.$ac_ext <<_ACEOF
5262/* confdefs.h. */
5263_ACEOF
5264cat confdefs.h >>conftest.$ac_ext
5265cat >>conftest.$ac_ext <<_ACEOF
5266/* end confdefs.h. */
5267#ifdef HAVE_LIMITS_H
5268#include <limits.h>
5269#endif
5270#ifndef CHAR_BIT
5271#define CHAR_BIT 8
5272#endif
5273int
5274main ()
5275{
5276extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1];
5277 ;
5278 return 0;
5279}
5280_ACEOF
5281rm -f conftest.$ac_objext
5282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5283 (eval $ac_compile) 2>conftest.er1
5284 ac_status=$?
5285 grep -v '^ *+' conftest.er1 >conftest.err
5286 rm -f conftest.er1
5287 cat conftest.err >&5
5288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5289 (exit $ac_status); } &&
fd7d450d
DD
5290 { ac_try='test -z "$ac_c_werror_flag"
5291 || test ! -s conftest.err'
bb6a587d
DD
5292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5293 (eval $ac_try) 2>&5
5294 ac_status=$?
5295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5296 (exit $ac_status); }; } &&
5297 { ac_try='test -s conftest.$ac_objext'
5298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5299 (eval $ac_try) 2>&5
5300 ac_status=$?
5301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5302 (exit $ac_status); }; }; then
5303 liberty_cv_uint64="unsigned long long"
5304else
5305 echo "$as_me: failed program was:" >&5
5306sed 's/^/| /' conftest.$ac_ext >&5
5307
5308liberty_cv_uint64=none
5309fi
5310rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5311fi
5312rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5313fi
5314rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5315fi
5316
5317echo "$as_me:$LINENO: result: $liberty_cv_uint64" >&5
5318echo "${ECHO_T}$liberty_cv_uint64" >&6
5319if test "$liberty_cv_uint64" != none; then
5320
7e9f5c71
DD
5321cat >>confdefs.h <<_ACEOF
5322#define UNSIGNED_64BIT_TYPE $liberty_cv_uint64
bb6a587d
DD
5323_ACEOF
5324
5325fi
5326
daf7c4ad
DD
5327# Given the above check, we always have uintptr_t or a fallback
5328# definition. So define HAVE_UINTPTR_T in case any imported code
5329# relies on it.
dc579051 5330
2299a76d
DJ
5331cat >>confdefs.h <<\_ACEOF
5332#define HAVE_UINTPTR_T 1
5333_ACEOF
5334
5335
5336echo "$as_me:$LINENO: checking for pid_t" >&5
5337echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5338if test "${ac_cv_type_pid_t+set}" = set; then
5339 echo $ECHO_N "(cached) $ECHO_C" >&6
5340else
5341 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
5342/* confdefs.h. */
5343_ACEOF
5344cat confdefs.h >>conftest.$ac_ext
5345cat >>conftest.$ac_ext <<_ACEOF
5346/* end confdefs.h. */
5347$ac_includes_default
5348int
5349main ()
5350{
5351if ((pid_t *) 0)
5352 return 0;
5353if (sizeof (pid_t))
5354 return 0;
5355 ;
5356 return 0;
5357}
5358_ACEOF
5359rm -f conftest.$ac_objext
5360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 5361 (eval $ac_compile) 2>conftest.er1
2299a76d 5362 ac_status=$?
58670637
DD
5363 grep -v '^ *+' conftest.er1 >conftest.err
5364 rm -f conftest.er1
5365 cat conftest.err >&5
2299a76d
DJ
5366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5367 (exit $ac_status); } &&
fd7d450d
DD
5368 { ac_try='test -z "$ac_c_werror_flag"
5369 || test ! -s conftest.err'
58670637
DD
5370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5371 (eval $ac_try) 2>&5
5372 ac_status=$?
5373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5374 (exit $ac_status); }; } &&
5375 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
5376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5377 (eval $ac_try) 2>&5
5378 ac_status=$?
5379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5380 (exit $ac_status); }; }; then
cafa3917
DD
5381 ac_cv_type_pid_t=yes
5382else
2299a76d
DJ
5383 echo "$as_me: failed program was:" >&5
5384sed 's/^/| /' conftest.$ac_ext >&5
cafa3917 5385
2299a76d 5386ac_cv_type_pid_t=no
cafa3917 5387fi
58670637 5388rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2299a76d
DJ
5389fi
5390echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5391echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5392if test $ac_cv_type_pid_t = yes; then
5393 :
5394else
5395
5396cat >>confdefs.h <<_ACEOF
cafa3917 5397#define pid_t int
2299a76d 5398_ACEOF
cafa3917
DD
5399
5400fi
5401
5402
252b5132
RH
5403# This is the list of functions which libiberty will provide if they
5404# are not available on the host.
5405
5406funcs="asprintf"
5407funcs="$funcs atexit"
5408funcs="$funcs basename"
5409funcs="$funcs bcmp"
5410funcs="$funcs bcopy"
c6da642e 5411funcs="$funcs bsearch"
252b5132
RH
5412funcs="$funcs bzero"
5413funcs="$funcs calloc"
5414funcs="$funcs clock"
7b78baae 5415funcs="$funcs ffs"
252b5132
RH
5416funcs="$funcs getcwd"
5417funcs="$funcs getpagesize"
0fad4bdb 5418funcs="$funcs gettimeofday"
252b5132
RH
5419funcs="$funcs index"
5420funcs="$funcs insque"
5421funcs="$funcs memchr"
5422funcs="$funcs memcmp"
5423funcs="$funcs memcpy"
5424funcs="$funcs memmove"
10b57b38 5425funcs="$funcs mempcpy"
252b5132
RH
5426funcs="$funcs memset"
5427funcs="$funcs mkstemps"
0c0a36a4 5428funcs="$funcs putenv"
252b5132
RH
5429funcs="$funcs random"
5430funcs="$funcs rename"
5431funcs="$funcs rindex"
0c0a36a4 5432funcs="$funcs setenv"
2ed1e5cc 5433funcs="$funcs snprintf"
252b5132 5434funcs="$funcs sigsetmask"
10b57b38
DD
5435funcs="$funcs stpcpy"
5436funcs="$funcs stpncpy"
252b5132
RH
5437funcs="$funcs strcasecmp"
5438funcs="$funcs strchr"
5439funcs="$funcs strdup"
5440funcs="$funcs strncasecmp"
0fad4bdb 5441funcs="$funcs strndup"
252b5132
RH
5442funcs="$funcs strrchr"
5443funcs="$funcs strstr"
5444funcs="$funcs strtod"
5445funcs="$funcs strtol"
5446funcs="$funcs strtoul"
67f3cb05 5447funcs="$funcs strverscmp"
252b5132
RH
5448funcs="$funcs tmpnam"
5449funcs="$funcs vasprintf"
5450funcs="$funcs vfprintf"
5451funcs="$funcs vprintf"
2ed1e5cc 5452funcs="$funcs vsnprintf"
252b5132
RH
5453funcs="$funcs vsprintf"
5454funcs="$funcs waitpid"
5455
5456# Also in the old function.def file: alloca, vfork, getopt.
5457
e69f6c8c 5458vars="sys_errlist sys_nerr sys_siglist"
252b5132 5459
0c0a36a4 5460checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
192cbe66 5461checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
ac119ae8 5462checkfuncs="$checkfuncs getsysinfo table sysctl wait3 wait4 __fsetlocking"
252b5132
RH
5463
5464# These are neither executed nor required, but they help keep
5465# autoheader happy without adding a bunch of text to acconfig.h.
5466if test "x" = "y"; then
252b5132 5467
252b5132 5468
2299a76d
DJ
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
0fad4bdb
DD
5527
5528
aa55ccb1
DD
5529
5530
2299a76d 5531
ac119ae8 5532
67f3cb05 5533
2299a76d
DJ
5534
5535
5536for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
0fad4bdb 5537 getcwd getpagesize gettimeofday index insque mkstemps memchr memcmp memcpy \
2299a76d 5538 memmove mempcpy memset putenv random rename rindex sigsetmask \
0fad4bdb 5539 strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strndup strrchr strstr \
67f3cb05 5540 strtod strtol strtoul strverscmp tmpnam vasprintf vfprintf vprintf \
2299a76d
DJ
5541 vsprintf waitpid getrusage on_exit psignal strerror strsignal \
5542 sysconf times sbrk gettimeofday ffs snprintf vsnprintf \
b109e79a 5543 pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl wait3 wait4 \
ac119ae8 5544 realpath canonicalize_file_name __fsetlocking
2299a76d
DJ
5545do
5546as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5547echo "$as_me:$LINENO: checking for $ac_func" >&5
5548echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5549if eval "test \"\${$as_ac_var+set}\" = set"; then
5550 echo $ECHO_N "(cached) $ECHO_C" >&6
5551else
5552 if test x$gcc_no_link = xyes; then
5553 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5554echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5555 { (exit 1); exit 1; }; }
5556fi
5557cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
5558/* confdefs.h. */
5559_ACEOF
5560cat confdefs.h >>conftest.$ac_ext
5561cat >>conftest.$ac_ext <<_ACEOF
5562/* end confdefs.h. */
5563/* System header to define __stub macros and hopefully few prototypes,
5564 which can conflict with char $ac_func (); below.
5565 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
5566 <limits.h> exists even on freestanding compilers. Under hpux,
5567 including <limits.h> includes <sys/time.h> and causes problems
5568 checking for functions defined therein. */
5569#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
5570# include <limits.h>
5571#else
5572# include <assert.h>
5573#endif
5574/* Override any gcc2 internal prototype to avoid an error. */
5575#ifdef __cplusplus
5576extern "C"
5577{
5578#endif
5579/* We use char because int might match the return type of a gcc2
5580 builtin and then its argument prototype would still apply. */
5581char $ac_func ();
5582/* The GNU C library defines this for functions which it implements
252b5132
RH
5583 to always fail with ENOSYS. Some functions are actually named
5584 something starting with __ and the normal name is an alias. */
5585#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5586choke me
5587#else
2299a76d
DJ
5588char (*f) () = $ac_func;
5589#endif
5590#ifdef __cplusplus
5591}
252b5132
RH
5592#endif
5593
2299a76d
DJ
5594int
5595main ()
5596{
5597return f != $ac_func;
5598 ;
5599 return 0;
5600}
5601_ACEOF
5602rm -f conftest.$ac_objext conftest$ac_exeext
5603if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 5604 (eval $ac_link) 2>conftest.er1
2299a76d 5605 ac_status=$?
58670637
DD
5606 grep -v '^ *+' conftest.er1 >conftest.err
5607 rm -f conftest.er1
5608 cat conftest.err >&5
2299a76d
DJ
5609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5610 (exit $ac_status); } &&
fd7d450d
DD
5611 { ac_try='test -z "$ac_c_werror_flag"
5612 || test ! -s conftest.err'
58670637
DD
5613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5614 (eval $ac_try) 2>&5
5615 ac_status=$?
5616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5617 (exit $ac_status); }; } &&
5618 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
5619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5620 (eval $ac_try) 2>&5
5621 ac_status=$?
5622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5623 (exit $ac_status); }; }; then
5624 eval "$as_ac_var=yes"
5625else
5626 echo "$as_me: failed program was:" >&5
5627sed 's/^/| /' conftest.$ac_ext >&5
5628
5629eval "$as_ac_var=no"
5630fi
58670637
DD
5631rm -f conftest.err conftest.$ac_objext \
5632 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
5633fi
5634echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5635echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5636if test `eval echo '${'$as_ac_var'}'` = yes; then
5637 cat >>confdefs.h <<_ACEOF
5638#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5639_ACEOF
900d2082 5640
252b5132
RH
5641fi
5642done
5643
41c953f9
DD
5644 echo "$as_me:$LINENO: checking whether basename is declared" >&5
5645echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6
5646if test "${ac_cv_have_decl_basename+set}" = set; then
5647 echo $ECHO_N "(cached) $ECHO_C" >&6
5648else
5649 cat >conftest.$ac_ext <<_ACEOF
5650/* confdefs.h. */
5651_ACEOF
5652cat confdefs.h >>conftest.$ac_ext
5653cat >>conftest.$ac_ext <<_ACEOF
5654/* end confdefs.h. */
5655$ac_includes_default
5656int
5657main ()
5658{
5659#ifndef basename
5660 char *p = (char *) basename;
5661#endif
5662
5663 ;
5664 return 0;
5665}
5666_ACEOF
5667rm -f conftest.$ac_objext
5668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5669 (eval $ac_compile) 2>conftest.er1
5670 ac_status=$?
5671 grep -v '^ *+' conftest.er1 >conftest.err
5672 rm -f conftest.er1
5673 cat conftest.err >&5
5674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5675 (exit $ac_status); } &&
fd7d450d
DD
5676 { ac_try='test -z "$ac_c_werror_flag"
5677 || test ! -s conftest.err'
41c953f9
DD
5678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5679 (eval $ac_try) 2>&5
5680 ac_status=$?
5681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5682 (exit $ac_status); }; } &&
5683 { ac_try='test -s conftest.$ac_objext'
5684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5685 (eval $ac_try) 2>&5
5686 ac_status=$?
5687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5688 (exit $ac_status); }; }; then
5689 ac_cv_have_decl_basename=yes
5690else
5691 echo "$as_me: failed program was:" >&5
5692sed 's/^/| /' conftest.$ac_ext >&5
5693
5694ac_cv_have_decl_basename=no
5695fi
5696rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5697fi
5698echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5
5699echo "${ECHO_T}$ac_cv_have_decl_basename" >&6
5700if test $ac_cv_have_decl_basename = yes; then
5701
5702cat >>confdefs.h <<_ACEOF
5703#define HAVE_DECL_BASENAME 1
5704_ACEOF
5705
5706
5707else
5708 cat >>confdefs.h <<_ACEOF
5709#define HAVE_DECL_BASENAME 0
5710_ACEOF
5711
5712
5713fi
5714echo "$as_me:$LINENO: checking whether ffs is declared" >&5
5715echo $ECHO_N "checking whether ffs is declared... $ECHO_C" >&6
5716if test "${ac_cv_have_decl_ffs+set}" = set; then
5717 echo $ECHO_N "(cached) $ECHO_C" >&6
5718else
5719 cat >conftest.$ac_ext <<_ACEOF
5720/* confdefs.h. */
5721_ACEOF
5722cat confdefs.h >>conftest.$ac_ext
5723cat >>conftest.$ac_ext <<_ACEOF
5724/* end confdefs.h. */
5725$ac_includes_default
5726int
5727main ()
5728{
5729#ifndef ffs
5730 char *p = (char *) ffs;
5731#endif
5732
5733 ;
5734 return 0;
5735}
5736_ACEOF
5737rm -f conftest.$ac_objext
5738if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5739 (eval $ac_compile) 2>conftest.er1
5740 ac_status=$?
5741 grep -v '^ *+' conftest.er1 >conftest.err
5742 rm -f conftest.er1
5743 cat conftest.err >&5
5744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5745 (exit $ac_status); } &&
fd7d450d
DD
5746 { ac_try='test -z "$ac_c_werror_flag"
5747 || test ! -s conftest.err'
41c953f9
DD
5748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5749 (eval $ac_try) 2>&5
5750 ac_status=$?
5751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5752 (exit $ac_status); }; } &&
5753 { ac_try='test -s conftest.$ac_objext'
5754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5755 (eval $ac_try) 2>&5
5756 ac_status=$?
5757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5758 (exit $ac_status); }; }; then
5759 ac_cv_have_decl_ffs=yes
5760else
5761 echo "$as_me: failed program was:" >&5
5762sed 's/^/| /' conftest.$ac_ext >&5
5763
5764ac_cv_have_decl_ffs=no
5765fi
5766rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5767fi
5768echo "$as_me:$LINENO: result: $ac_cv_have_decl_ffs" >&5
5769echo "${ECHO_T}$ac_cv_have_decl_ffs" >&6
5770if test $ac_cv_have_decl_ffs = yes; then
5771
5772cat >>confdefs.h <<_ACEOF
5773#define HAVE_DECL_FFS 1
5774_ACEOF
5775
5776
5777else
5778 cat >>confdefs.h <<_ACEOF
5779#define HAVE_DECL_FFS 0
5780_ACEOF
5781
5782
5783fi
5784echo "$as_me:$LINENO: checking whether asprintf is declared" >&5
5785echo $ECHO_N "checking whether asprintf is declared... $ECHO_C" >&6
5786if test "${ac_cv_have_decl_asprintf+set}" = set; then
5787 echo $ECHO_N "(cached) $ECHO_C" >&6
5788else
5789 cat >conftest.$ac_ext <<_ACEOF
5790/* confdefs.h. */
5791_ACEOF
5792cat confdefs.h >>conftest.$ac_ext
5793cat >>conftest.$ac_ext <<_ACEOF
5794/* end confdefs.h. */
5795$ac_includes_default
5796int
5797main ()
5798{
5799#ifndef asprintf
5800 char *p = (char *) asprintf;
5801#endif
5802
5803 ;
5804 return 0;
5805}
5806_ACEOF
5807rm -f conftest.$ac_objext
5808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5809 (eval $ac_compile) 2>conftest.er1
5810 ac_status=$?
5811 grep -v '^ *+' conftest.er1 >conftest.err
5812 rm -f conftest.er1
5813 cat conftest.err >&5
5814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5815 (exit $ac_status); } &&
fd7d450d
DD
5816 { ac_try='test -z "$ac_c_werror_flag"
5817 || test ! -s conftest.err'
41c953f9
DD
5818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5819 (eval $ac_try) 2>&5
5820 ac_status=$?
5821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5822 (exit $ac_status); }; } &&
5823 { ac_try='test -s conftest.$ac_objext'
5824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5825 (eval $ac_try) 2>&5
5826 ac_status=$?
5827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5828 (exit $ac_status); }; }; then
5829 ac_cv_have_decl_asprintf=yes
5830else
5831 echo "$as_me: failed program was:" >&5
5832sed 's/^/| /' conftest.$ac_ext >&5
5833
5834ac_cv_have_decl_asprintf=no
5835fi
5836rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5837fi
5838echo "$as_me:$LINENO: result: $ac_cv_have_decl_asprintf" >&5
5839echo "${ECHO_T}$ac_cv_have_decl_asprintf" >&6
5840if test $ac_cv_have_decl_asprintf = yes; then
5841
5842cat >>confdefs.h <<_ACEOF
5843#define HAVE_DECL_ASPRINTF 1
5844_ACEOF
5845
5846
5847else
5848 cat >>confdefs.h <<_ACEOF
5849#define HAVE_DECL_ASPRINTF 0
5850_ACEOF
5851
5852
5853fi
5854echo "$as_me:$LINENO: checking whether vasprintf is declared" >&5
5855echo $ECHO_N "checking whether vasprintf is declared... $ECHO_C" >&6
5856if test "${ac_cv_have_decl_vasprintf+set}" = set; then
5857 echo $ECHO_N "(cached) $ECHO_C" >&6
5858else
5859 cat >conftest.$ac_ext <<_ACEOF
5860/* confdefs.h. */
5861_ACEOF
5862cat confdefs.h >>conftest.$ac_ext
5863cat >>conftest.$ac_ext <<_ACEOF
5864/* end confdefs.h. */
5865$ac_includes_default
5866int
5867main ()
5868{
5869#ifndef vasprintf
5870 char *p = (char *) vasprintf;
5871#endif
5872
5873 ;
5874 return 0;
5875}
5876_ACEOF
5877rm -f conftest.$ac_objext
5878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5879 (eval $ac_compile) 2>conftest.er1
5880 ac_status=$?
5881 grep -v '^ *+' conftest.er1 >conftest.err
5882 rm -f conftest.er1
5883 cat conftest.err >&5
5884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5885 (exit $ac_status); } &&
fd7d450d
DD
5886 { ac_try='test -z "$ac_c_werror_flag"
5887 || test ! -s conftest.err'
41c953f9
DD
5888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5889 (eval $ac_try) 2>&5
5890 ac_status=$?
5891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5892 (exit $ac_status); }; } &&
5893 { ac_try='test -s conftest.$ac_objext'
5894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5895 (eval $ac_try) 2>&5
5896 ac_status=$?
5897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5898 (exit $ac_status); }; }; then
5899 ac_cv_have_decl_vasprintf=yes
5900else
5901 echo "$as_me: failed program was:" >&5
5902sed 's/^/| /' conftest.$ac_ext >&5
5903
5904ac_cv_have_decl_vasprintf=no
5905fi
5906rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5907fi
5908echo "$as_me:$LINENO: result: $ac_cv_have_decl_vasprintf" >&5
5909echo "${ECHO_T}$ac_cv_have_decl_vasprintf" >&6
5910if test $ac_cv_have_decl_vasprintf = yes; then
5911
5912cat >>confdefs.h <<_ACEOF
5913#define HAVE_DECL_VASPRINTF 1
5914_ACEOF
5915
5916
5917else
5918 cat >>confdefs.h <<_ACEOF
5919#define HAVE_DECL_VASPRINTF 0
5920_ACEOF
5921
5922
01e94249
DD
5923fi
5924echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
5925echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
5926if test "${ac_cv_have_decl_snprintf+set}" = set; then
5927 echo $ECHO_N "(cached) $ECHO_C" >&6
5928else
5929 cat >conftest.$ac_ext <<_ACEOF
5930/* confdefs.h. */
5931_ACEOF
5932cat confdefs.h >>conftest.$ac_ext
5933cat >>conftest.$ac_ext <<_ACEOF
5934/* end confdefs.h. */
5935$ac_includes_default
5936int
5937main ()
5938{
5939#ifndef snprintf
5940 char *p = (char *) snprintf;
5941#endif
5942
5943 ;
5944 return 0;
5945}
5946_ACEOF
5947rm -f conftest.$ac_objext
5948if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5949 (eval $ac_compile) 2>conftest.er1
5950 ac_status=$?
5951 grep -v '^ *+' conftest.er1 >conftest.err
5952 rm -f conftest.er1
5953 cat conftest.err >&5
5954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5955 (exit $ac_status); } &&
fd7d450d
DD
5956 { ac_try='test -z "$ac_c_werror_flag"
5957 || test ! -s conftest.err'
01e94249
DD
5958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5959 (eval $ac_try) 2>&5
5960 ac_status=$?
5961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5962 (exit $ac_status); }; } &&
5963 { ac_try='test -s conftest.$ac_objext'
5964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5965 (eval $ac_try) 2>&5
5966 ac_status=$?
5967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5968 (exit $ac_status); }; }; then
5969 ac_cv_have_decl_snprintf=yes
5970else
5971 echo "$as_me: failed program was:" >&5
5972sed 's/^/| /' conftest.$ac_ext >&5
5973
5974ac_cv_have_decl_snprintf=no
5975fi
5976rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5977fi
5978echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
5979echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
5980if test $ac_cv_have_decl_snprintf = yes; then
5981
5982cat >>confdefs.h <<_ACEOF
5983#define HAVE_DECL_SNPRINTF 1
5984_ACEOF
5985
5986
5987else
5988 cat >>confdefs.h <<_ACEOF
5989#define HAVE_DECL_SNPRINTF 0
5990_ACEOF
5991
5992
5993fi
5994echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
5995echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
5996if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
5997 echo $ECHO_N "(cached) $ECHO_C" >&6
5998else
5999 cat >conftest.$ac_ext <<_ACEOF
6000/* confdefs.h. */
6001_ACEOF
6002cat confdefs.h >>conftest.$ac_ext
6003cat >>conftest.$ac_ext <<_ACEOF
6004/* end confdefs.h. */
6005$ac_includes_default
6006int
6007main ()
6008{
6009#ifndef vsnprintf
6010 char *p = (char *) vsnprintf;
6011#endif
6012
6013 ;
6014 return 0;
6015}
6016_ACEOF
6017rm -f conftest.$ac_objext
6018if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6019 (eval $ac_compile) 2>conftest.er1
6020 ac_status=$?
6021 grep -v '^ *+' conftest.er1 >conftest.err
6022 rm -f conftest.er1
6023 cat conftest.err >&5
6024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6025 (exit $ac_status); } &&
fd7d450d
DD
6026 { ac_try='test -z "$ac_c_werror_flag"
6027 || test ! -s conftest.err'
01e94249
DD
6028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6029 (eval $ac_try) 2>&5
6030 ac_status=$?
6031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6032 (exit $ac_status); }; } &&
6033 { ac_try='test -s conftest.$ac_objext'
6034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6035 (eval $ac_try) 2>&5
6036 ac_status=$?
6037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6038 (exit $ac_status); }; }; then
6039 ac_cv_have_decl_vsnprintf=yes
6040else
6041 echo "$as_me: failed program was:" >&5
6042sed 's/^/| /' conftest.$ac_ext >&5
6043
6044ac_cv_have_decl_vsnprintf=no
6045fi
6046rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6047fi
6048echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
6049echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
6050if test $ac_cv_have_decl_vsnprintf = yes; then
6051
6052cat >>confdefs.h <<_ACEOF
6053#define HAVE_DECL_VSNPRINTF 1
6054_ACEOF
6055
6056
6057else
6058 cat >>confdefs.h <<_ACEOF
6059#define HAVE_DECL_VSNPRINTF 0
6060_ACEOF
6061
6062
41c953f9
DD
6063fi
6064
6065
2299a76d
DJ
6066
6067cat >>confdefs.h <<\_ACEOF
92655e19 6068#define HAVE_SYS_ERRLIST 1
2299a76d
DJ
6069_ACEOF
6070
92655e19 6071
2299a76d 6072cat >>confdefs.h <<\_ACEOF
c6da642e 6073#define HAVE_SYS_NERR 1
2299a76d
DJ
6074_ACEOF
6075
92655e19 6076
2299a76d 6077cat >>confdefs.h <<\_ACEOF
92655e19 6078#define HAVE_SYS_SIGLIST 1
2299a76d 6079_ACEOF
92655e19 6080
252b5132
RH
6081fi
6082
6083# For each of these functions, if the host does not provide the
6084# function we want to put FN.o in LIBOBJS, and if the host does
30673bf5 6085# provide the function, we want to define HAVE_FN in config.h.
252b5132
RH
6086
6087setobjs=
0c0a36a4 6088CHECK=
50d4562d 6089target_header_dir=
252b5132
RH
6090if test -n "${with_target_subdir}"; then
6091
6092 # We are being configured as a target library. AC_REPLACE_FUNCS
6093 # may not work correctly, because the compiler may not be able to
6094 # link executables. Note that we may still be being configured
6095 # native.
6096
6097 # If we are being configured for newlib, we know which functions
6098 # newlib provide and which ones we will be expected to provide.
6099
6100 if test "x${with_newlib}" = "xyes"; then
58670637
DD
6101 case $LIBOBJS in
6102 "asprintf.$ac_objext" | \
6103 *" asprintf.$ac_objext" | \
6104 "asprintf.$ac_objext "* | \
6105 *" asprintf.$ac_objext "* ) ;;
6106 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;;
6107esac
6108
6109 case $LIBOBJS in
6110 "basename.$ac_objext" | \
6111 *" basename.$ac_objext" | \
6112 "basename.$ac_objext "* | \
6113 *" basename.$ac_objext "* ) ;;
6114 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
6115esac
6116
6117 case $LIBOBJS in
6118 "insque.$ac_objext" | \
6119 *" insque.$ac_objext" | \
6120 "insque.$ac_objext "* | \
6121 *" insque.$ac_objext "* ) ;;
6122 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
6123esac
6124
6125 case $LIBOBJS in
6126 "random.$ac_objext" | \
6127 *" random.$ac_objext" | \
6128 "random.$ac_objext "* | \
6129 *" random.$ac_objext "* ) ;;
6130 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
6131esac
6132
6133 case $LIBOBJS in
6134 "strdup.$ac_objext" | \
6135 *" strdup.$ac_objext" | \
6136 "strdup.$ac_objext "* | \
6137 *" strdup.$ac_objext "* ) ;;
6138 *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
6139esac
6140
6141 case $LIBOBJS in
6142 "vasprintf.$ac_objext" | \
6143 *" vasprintf.$ac_objext" | \
6144 "vasprintf.$ac_objext "* | \
6145 *" vasprintf.$ac_objext "* ) ;;
6146 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
6147esac
6148
252b5132
RH
6149
6150 for f in $funcs; do
6151 case "$f" in
6152 asprintf | basename | insque | random | strdup | vasprintf)
6153 ;;
6154 *)
6155 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2299a76d 6156 cat >>confdefs.h <<_ACEOF
252b5132 6157#define $n 1
2299a76d 6158_ACEOF
252b5132
RH
6159
6160 ;;
6161 esac
6162 done
6163
6164 # newlib doesnt provide any of the variables in $vars, so we
6165 # dont have to check them here.
6166
6167 # Of the functions in $checkfuncs, newlib only has strerror.
0093138c 6168 cat >>confdefs.h <<\_ACEOF
252b5132 6169#define HAVE_STRERROR 1
0093138c 6170_ACEOF
252b5132
RH
6171
6172
6173 setobjs=yes
6174
6175 fi
0c0a36a4 6176
069e4b19
CV
6177 # If we are being configured for Mingw, we know which functions
6178 # Mingw provides and which ones we will be expected to provide.
6179
6180 case "${host}" in
6181 *-*-mingw*)
6182 case $LIBOBJS in
6183 "asprintf.$ac_objext" | \
6184 *" asprintf.$ac_objext" | \
6185 "asprintf.$ac_objext "* | \
6186 *" asprintf.$ac_objext "* ) ;;
6187 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;;
6188esac
6189
6190 case $LIBOBJS in
6191 "basename.$ac_objext" | \
6192 *" basename.$ac_objext" | \
6193 "basename.$ac_objext "* | \
6194 *" basename.$ac_objext "* ) ;;
6195 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
6196esac
6197
6198 case $LIBOBJS in
6199 "bcmp.$ac_objext" | \
6200 *" bcmp.$ac_objext" | \
6201 "bcmp.$ac_objext "* | \
6202 *" bcmp.$ac_objext "* ) ;;
6203 *) LIBOBJS="$LIBOBJS bcmp.$ac_objext" ;;
6204esac
6205
6206 case $LIBOBJS in
6207 "bcopy.$ac_objext" | \
6208 *" bcopy.$ac_objext" | \
6209 "bcopy.$ac_objext "* | \
6210 *" bcopy.$ac_objext "* ) ;;
6211 *) LIBOBJS="$LIBOBJS bcopy.$ac_objext" ;;
6212esac
6213
6214 case $LIBOBJS in
6215 "bzero.$ac_objext" | \
6216 *" bzero.$ac_objext" | \
6217 "bzero.$ac_objext "* | \
6218 *" bzero.$ac_objext "* ) ;;
6219 *) LIBOBJS="$LIBOBJS bzero.$ac_objext" ;;
6220esac
6221
6222 case $LIBOBJS in
6223 "clock.$ac_objext" | \
6224 *" clock.$ac_objext" | \
6225 "clock.$ac_objext "* | \
6226 *" clock.$ac_objext "* ) ;;
6227 *) LIBOBJS="$LIBOBJS clock.$ac_objext" ;;
6228esac
6229
6230 case $LIBOBJS in
6231 "ffs.$ac_objext" | \
6232 *" ffs.$ac_objext" | \
6233 "ffs.$ac_objext "* | \
6234 *" ffs.$ac_objext "* ) ;;
6235 *) LIBOBJS="$LIBOBJS ffs.$ac_objext" ;;
6236esac
6237
6238 case $LIBOBJS in
6239 "getpagesize.$ac_objext" | \
6240 *" getpagesize.$ac_objext" | \
6241 "getpagesize.$ac_objext "* | \
6242 *" getpagesize.$ac_objext "* ) ;;
6243 *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;;
6244esac
6245
6246 case $LIBOBJS in
6247 "index.$ac_objext" | \
6248 *" index.$ac_objext" | \
6249 "index.$ac_objext "* | \
6250 *" index.$ac_objext "* ) ;;
6251 *) LIBOBJS="$LIBOBJS index.$ac_objext" ;;
6252esac
6253
6254 case $LIBOBJS in
6255 "insque.$ac_objext" | \
6256 *" insque.$ac_objext" | \
6257 "insque.$ac_objext "* | \
6258 *" insque.$ac_objext "* ) ;;
6259 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
6260esac
6261
6262 case $LIBOBJS in
6263 "mempcpy.$ac_objext" | \
6264 *" mempcpy.$ac_objext" | \
6265 "mempcpy.$ac_objext "* | \
6266 *" mempcpy.$ac_objext "* ) ;;
6267 *) LIBOBJS="$LIBOBJS mempcpy.$ac_objext" ;;
6268esac
6269
6270 case $LIBOBJS in
6271 "mkstemps.$ac_objext" | \
6272 *" mkstemps.$ac_objext" | \
6273 "mkstemps.$ac_objext "* | \
6274 *" mkstemps.$ac_objext "* ) ;;
6275 *) LIBOBJS="$LIBOBJS mkstemps.$ac_objext" ;;
6276esac
6277
6278 case $LIBOBJS in
6279 "random.$ac_objext" | \
6280 *" random.$ac_objext" | \
6281 "random.$ac_objext "* | \
6282 *" random.$ac_objext "* ) ;;
6283 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
6284esac
6285
6286 case $LIBOBJS in
6287 "rindex.$ac_objext" | \
6288 *" rindex.$ac_objext" | \
6289 "rindex.$ac_objext "* | \
6290 *" rindex.$ac_objext "* ) ;;
6291 *) LIBOBJS="$LIBOBJS rindex.$ac_objext" ;;
6292esac
6293
6294 case $LIBOBJS in
6295 "sigsetmask.$ac_objext" | \
6296 *" sigsetmask.$ac_objext" | \
6297 "sigsetmask.$ac_objext "* | \
6298 *" sigsetmask.$ac_objext "* ) ;;
6299 *) LIBOBJS="$LIBOBJS sigsetmask.$ac_objext" ;;
6300esac
6301
6302 case $LIBOBJS in
6303 "stpcpy.$ac_objext" | \
6304 *" stpcpy.$ac_objext" | \
6305 "stpcpy.$ac_objext "* | \
6306 *" stpcpy.$ac_objext "* ) ;;
6307 *) LIBOBJS="$LIBOBJS stpcpy.$ac_objext" ;;
6308esac
6309
6310 case $LIBOBJS in
6311 "stpncpy.$ac_objext" | \
6312 *" stpncpy.$ac_objext" | \
6313 "stpncpy.$ac_objext "* | \
6314 *" stpncpy.$ac_objext "* ) ;;
6315 *) LIBOBJS="$LIBOBJS stpncpy.$ac_objext" ;;
6316esac
6317
6318 case $LIBOBJS in
6319 "strndup.$ac_objext" | \
6320 *" strndup.$ac_objext" | \
6321 "strndup.$ac_objext "* | \
6322 *" strndup.$ac_objext "* ) ;;
6323 *) LIBOBJS="$LIBOBJS strndup.$ac_objext" ;;
6324esac
6325
6326 case $LIBOBJS in
6327 "strverscmp.$ac_objext" | \
6328 *" strverscmp.$ac_objext" | \
6329 "strverscmp.$ac_objext "* | \
6330 *" strverscmp.$ac_objext "* ) ;;
6331 *) LIBOBJS="$LIBOBJS strverscmp.$ac_objext" ;;
6332esac
6333
6334 case $LIBOBJS in
6335 "vasprintf.$ac_objext" | \
6336 *" vasprintf.$ac_objext" | \
6337 "vasprintf.$ac_objext "* | \
6338 *" vasprintf.$ac_objext "* ) ;;
6339 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
6340esac
6341
6342 case $LIBOBJS in
6343 "waitpid.$ac_objext" | \
6344 *" waitpid.$ac_objext" | \
6345 "waitpid.$ac_objext "* | \
6346 *" waitpid.$ac_objext "* ) ;;
6347 *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;;
6348esac
6349
6350
6351 for f in $funcs; do
6352 case "$f" in
6353 asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strverscmp | vasprintf | waitpid)
6354 ;;
6355 *)
6356 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6357 cat >>confdefs.h <<_ACEOF
6358#define $n 1
6359_ACEOF
6360
6361 ;;
6362 esac
6363 done
6364
6365 # Mingw doesnt provide any of the variables in $vars, so we
6366 # dont have to check them here.
6367
6368 # Of the functions in $checkfuncs, Mingw only has strerror.
6369 cat >>confdefs.h <<\_ACEOF
6370#define HAVE_STRERROR 1
6371_ACEOF
6372
6373
6374 setobjs=yes
6375 ;;
6376
6377 esac
6378
50d4562d
DD
6379 # We may wish to install the target headers somewhere.
6380 # Check whether --enable-install-libiberty or --disable-install-libiberty was given.
6381if test "${enable_install_libiberty+set}" = set; then
6382 enableval="$enable_install_libiberty"
6383 enable_install_libiberty=$enableval
6384else
6385 enable_install_libiberty=no
2299a76d 6386fi;
50d4562d
DD
6387 # Option parsed, now set things appropriately.
6388 case x"$enable_install_libiberty" in
6389 xyes|x)
6390 target_header_dir=libiberty
6391 ;;
2299a76d 6392 xno)
50d4562d
DD
6393 target_header_dir=
6394 ;;
2299a76d 6395 *)
50d4562d
DD
6396 # This could be sanity-checked in various ways...
6397 target_header_dir="${enable_install_libiberty}"
6398 ;;
6399 esac
6400
6401
0c0a36a4
ILT
6402else
6403
6404 # Not a target library, so we set things up to run the test suite.
b109e79a 6405 CHECK=really-check
0c0a36a4 6406
252b5132
RH
6407fi
6408
0c0a36a4
ILT
6409
6410
50d4562d 6411
f01b59ed 6412case "${host}" in
bef8b55d 6413 *-*-cygwin* | *-*-mingw*)
0093138c 6414 cat >>confdefs.h <<\_ACEOF
f01b59ed 6415#define HAVE_SYS_ERRLIST 1
0093138c 6416_ACEOF
f01b59ed 6417
0093138c 6418 cat >>confdefs.h <<\_ACEOF
f01b59ed 6419#define HAVE_SYS_NERR 1
0093138c 6420_ACEOF
f01b59ed
DD
6421
6422 ;;
6423esac
6424
252b5132
RH
6425if test -z "${setobjs}"; then
6426 case "${host}" in
6427
6428 *-*-vxworks*)
6429 # Handle VxWorks configuration specially, since on VxWorks the
6430 # libraries are actually on the target board, not in the file
6431 # system.
58670637
DD
6432 case $LIBOBJS in
6433 "basename.$ac_objext" | \
6434 *" basename.$ac_objext" | \
6435 "basename.$ac_objext "* | \
6436 *" basename.$ac_objext "* ) ;;
6437 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
6438esac
6439
6440 case $LIBOBJS in
6441 "getpagesize.$ac_objext" | \
6442 *" getpagesize.$ac_objext" | \
6443 "getpagesize.$ac_objext "* | \
6444 *" getpagesize.$ac_objext "* ) ;;
6445 *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;;
6446esac
6447
6448 case $LIBOBJS in
6449 "insque.$ac_objext" | \
6450 *" insque.$ac_objext" | \
6451 "insque.$ac_objext "* | \
6452 *" insque.$ac_objext "* ) ;;
6453 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
6454esac
6455
6456 case $LIBOBJS in
6457 "random.$ac_objext" | \
6458 *" random.$ac_objext" | \
6459 "random.$ac_objext "* | \
6460 *" random.$ac_objext "* ) ;;
6461 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
6462esac
6463
6464 case $LIBOBJS in
6465 "strcasecmp.$ac_objext" | \
6466 *" strcasecmp.$ac_objext" | \
6467 "strcasecmp.$ac_objext "* | \
6468 *" strcasecmp.$ac_objext "* ) ;;
6469 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" ;;
6470esac
6471
6472 case $LIBOBJS in
6473 "strncasecmp.$ac_objext" | \
6474 *" strncasecmp.$ac_objext" | \
6475 "strncasecmp.$ac_objext "* | \
6476 *" strncasecmp.$ac_objext "* ) ;;
6477 *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;;
6478esac
6479
6480 case $LIBOBJS in
6481 "strdup.$ac_objext" | \
6482 *" strdup.$ac_objext" | \
6483 "strdup.$ac_objext "* | \
6484 *" strdup.$ac_objext "* ) ;;
6485 *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
6486esac
6487
6488 case $LIBOBJS in
6489 "vfork.$ac_objext" | \
6490 *" vfork.$ac_objext" | \
6491 "vfork.$ac_objext "* | \
6492 *" vfork.$ac_objext "* ) ;;
6493 *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
6494esac
6495
6496 case $LIBOBJS in
6497 "waitpid.$ac_objext" | \
6498 *" waitpid.$ac_objext" | \
6499 "waitpid.$ac_objext "* | \
6500 *" waitpid.$ac_objext "* ) ;;
6501 *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;;
6502esac
6503
6504 case $LIBOBJS in
6505 "vasprintf.$ac_objext" | \
6506 *" vasprintf.$ac_objext" | \
6507 "vasprintf.$ac_objext "* | \
6508 *" vasprintf.$ac_objext "* ) ;;
6509 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
6510esac
6511
252b5132
RH
6512 for f in $funcs; do
6513 case "$f" in
6514 basename | getpagesize | insque | random | strcasecmp)
6515 ;;
6516 strncasecmp | strdup | vfork | waitpid | vasprintf)
6517 ;;
6518 *)
6519 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2299a76d 6520 cat >>confdefs.h <<_ACEOF
252b5132 6521#define $n 1
2299a76d 6522_ACEOF
252b5132
RH
6523
6524 ;;
6525 esac
6526 done
6527
6528 # VxWorks doesn't provide any of the variables in $vars, so we
6529 # don't have to check them here.
6530
6531 # Of the functions in $checkfuncs, VxWorks only has strerror.
0093138c 6532 cat >>confdefs.h <<\_ACEOF
252b5132 6533#define HAVE_STRERROR 1
0093138c 6534_ACEOF
252b5132
RH
6535
6536
1f92e180
DD
6537 setobjs=yes
6538 ;;
6539
6540 *-*-msdosdjgpp)
6541 for f in atexit basename bcmp bcopy bsearch bzero calloc clock ffs \
008d60eb 6542 getcwd getpagesize getrusage gettimeofday \
1f92e180
DD
6543 index insque memchr memcmp memcpy memmove memset psignal \
6544 putenv random rename rindex sbrk setenv stpcpy strcasecmp \
6545 strchr strdup strerror strncasecmp strrchr strstr strtod \
6546 strtol strtoul sysconf times tmpnam vfprintf vprintf \
6547 vsprintf waitpid
6548 do
6549 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6550 cat >>confdefs.h <<_ACEOF
6551#define $n 1
6552_ACEOF
6553
6554 done
6555
6556
252b5132
RH
6557 setobjs=yes
6558 ;;
6559
6560 esac
6561fi
6562
6563if test -z "${setobjs}"; then
6564
6565 case "${host}" in
6566
6567 *-*-cygwin*)
6568 # The Cygwin library actually uses a couple of files from
6569 # libiberty when it is built. If we are building a native
6570 # Cygwin, and we run the tests, we will appear to have these
6571 # files. However, when we go on to build winsup, we will wind up
6572 # with a library which does not have the files, since they should
6573 # have come from libiberty.
6574
6575 # We handle this by removing the functions the winsup library
6576 # provides from our shell variables, so that they appear to be
6577 # missing.
6578
64e3a659 6579 # DJ - only if we're *building* cygwin, not just building *with* cygwin
2299a76d 6580
64e3a659
DD
6581 if test -n "${with_target_subdir}"
6582 then
6583 funcs="`echo $funcs | sed -e 's/random//'`"
58670637
DD
6584 case $LIBOBJS in
6585 "random.$ac_objext" | \
6586 *" random.$ac_objext" | \
6587 "random.$ac_objext "* | \
6588 *" random.$ac_objext "* ) ;;
6589 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
6590esac
6591
64e3a659
DD
6592 vars="`echo $vars | sed -e 's/sys_siglist//'`"
6593 checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
6594 fi
252b5132
RH
6595 ;;
6596
6597 *-*-mingw32*)
6598 # Under mingw32, sys_nerr and sys_errlist exist, but they are
6599 # macros, so the test below won't find them.
92655e19
DD
6600 libiberty_cv_var_sys_nerr=yes
6601 libiberty_cv_var_sys_errlist=yes
252b5132
RH
6602 ;;
6603
65dce80e
DD
6604 *-*-msdosdjgpp*)
6605 # vfork and fork are stubs.
6606 ac_cv_func_vfork_works=no
6607 ;;
6608
252b5132 6609 *-*-uwin*)
2299a76d 6610 # Under some versions of uwin, vfork is notoriously buggy and the test
252b5132
RH
6611 # can hang configure; on other versions, vfork exists just as a stub.
6612 # FIXME: This should be removed once vfork in uwin's runtime is fixed.
6613 ac_cv_func_vfork_works=no
0c0a36a4 6614 # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
2299a76d 6615 # macros (actually, these are imported from a DLL, but the end effect
0c0a36a4 6616 # is the same), so the test below won't find them.
92655e19
DD
6617 libiberty_cv_var_sys_nerr=yes
6618 libiberty_cv_var_sys_errlist=yes
252b5132
RH
6619 ;;
6620
c0eb281b 6621 *-*-*vms*)
2299a76d 6622 # Under VMS, vfork works very different than on Unix. The standard test
c0eb281b
DD
6623 # won't work, and it isn't easily adaptable. It makes more sense to
6624 # just force it.
6625 ac_cv_func_vfork_works=yes
6626 ;;
6627
252b5132
RH
6628 esac
6629
6630 # We haven't set the list of objects yet. Use the standard autoconf
6631 # tests. This will only work if the compiler works.
2299a76d
DJ
6632 echo "$as_me:$LINENO: checking for library containing strerror" >&5
6633echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
6634if test "${ac_cv_search_strerror+set}" = set; then
6635 echo $ECHO_N "(cached) $ECHO_C" >&6
6636else
6637 ac_func_search_save_LIBS=$LIBS
6638ac_cv_search_strerror=no
6639if test x$gcc_no_link = xyes; then
6640 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6641echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6642 { (exit 1); exit 1; }; }
6643fi
6644cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
6645/* confdefs.h. */
6646_ACEOF
6647cat confdefs.h >>conftest.$ac_ext
6648cat >>conftest.$ac_ext <<_ACEOF
6649/* end confdefs.h. */
252b5132 6650
2299a76d
DJ
6651/* Override any gcc2 internal prototype to avoid an error. */
6652#ifdef __cplusplus
6653extern "C"
6654#endif
6655/* We use char because int might match the return type of a gcc2
6656 builtin and then its argument prototype would still apply. */
6657char strerror ();
6658int
6659main ()
6660{
6661strerror ();
6662 ;
6663 return 0;
6664}
6665_ACEOF
6666rm -f conftest.$ac_objext conftest$ac_exeext
6667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 6668 (eval $ac_link) 2>conftest.er1
2299a76d 6669 ac_status=$?
58670637
DD
6670 grep -v '^ *+' conftest.er1 >conftest.err
6671 rm -f conftest.er1
6672 cat conftest.err >&5
2299a76d
DJ
6673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6674 (exit $ac_status); } &&
fd7d450d
DD
6675 { ac_try='test -z "$ac_c_werror_flag"
6676 || test ! -s conftest.err'
58670637
DD
6677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6678 (eval $ac_try) 2>&5
6679 ac_status=$?
6680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6681 (exit $ac_status); }; } &&
6682 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
6683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6684 (eval $ac_try) 2>&5
6685 ac_status=$?
6686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6687 (exit $ac_status); }; }; then
6688 ac_cv_search_strerror="none required"
6689else
6690 echo "$as_me: failed program was:" >&5
6691sed 's/^/| /' conftest.$ac_ext >&5
6692
6693fi
58670637
DD
6694rm -f conftest.err conftest.$ac_objext \
6695 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
6696if test "$ac_cv_search_strerror" = no; then
6697 for ac_lib in cposix; do
6698 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6699 if test x$gcc_no_link = xyes; then
6700 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6701echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6702 { (exit 1); exit 1; }; }
6703fi
6704cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
6705/* confdefs.h. */
6706_ACEOF
6707cat confdefs.h >>conftest.$ac_ext
6708cat >>conftest.$ac_ext <<_ACEOF
6709/* end confdefs.h. */
252b5132 6710
2299a76d
DJ
6711/* Override any gcc2 internal prototype to avoid an error. */
6712#ifdef __cplusplus
6713extern "C"
6714#endif
6715/* We use char because int might match the return type of a gcc2
6716 builtin and then its argument prototype would still apply. */
6717char strerror ();
6718int
6719main ()
6720{
6721strerror ();
6722 ;
6723 return 0;
6724}
6725_ACEOF
6726rm -f conftest.$ac_objext conftest$ac_exeext
6727if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 6728 (eval $ac_link) 2>conftest.er1
2299a76d 6729 ac_status=$?
58670637
DD
6730 grep -v '^ *+' conftest.er1 >conftest.err
6731 rm -f conftest.er1
6732 cat conftest.err >&5
2299a76d
DJ
6733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6734 (exit $ac_status); } &&
fd7d450d
DD
6735 { ac_try='test -z "$ac_c_werror_flag"
6736 || test ! -s conftest.err'
58670637
DD
6737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6738 (eval $ac_try) 2>&5
6739 ac_status=$?
6740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6741 (exit $ac_status); }; } &&
6742 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
6743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6744 (eval $ac_try) 2>&5
6745 ac_status=$?
6746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6747 (exit $ac_status); }; }; then
6748 ac_cv_search_strerror="-l$ac_lib"
6749break
6750else
6751 echo "$as_me: failed program was:" >&5
6752sed 's/^/| /' conftest.$ac_ext >&5
6753
6754fi
58670637
DD
6755rm -f conftest.err conftest.$ac_objext \
6756 conftest$ac_exeext conftest.$ac_ext
2299a76d 6757 done
252b5132 6758fi
2299a76d
DJ
6759LIBS=$ac_func_search_save_LIBS
6760fi
6761echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
6762echo "${ECHO_T}$ac_cv_search_strerror" >&6
6763if test "$ac_cv_search_strerror" != no; then
6764 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
252b5132 6765
252b5132 6766fi
252b5132 6767
2299a76d
DJ
6768
6769for ac_func in $funcs
252b5132 6770do
2299a76d
DJ
6771as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6772echo "$as_me:$LINENO: checking for $ac_func" >&5
6773echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6774if eval "test \"\${$as_ac_var+set}\" = set"; then
6775 echo $ECHO_N "(cached) $ECHO_C" >&6
6776else
6777 if test x$gcc_no_link = xyes; then
6778 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6779echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6780 { (exit 1); exit 1; }; }
6781fi
6782cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
6783/* confdefs.h. */
6784_ACEOF
6785cat confdefs.h >>conftest.$ac_ext
6786cat >>conftest.$ac_ext <<_ACEOF
6787/* end confdefs.h. */
252b5132 6788/* System header to define __stub macros and hopefully few prototypes,
2299a76d
DJ
6789 which can conflict with char $ac_func (); below.
6790 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
6791 <limits.h> exists even on freestanding compilers. Under hpux,
6792 including <limits.h> includes <sys/time.h> and causes problems
6793 checking for functions defined therein. */
6794#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
6795# include <limits.h>
6796#else
6797# include <assert.h>
6798#endif
252b5132 6799/* Override any gcc2 internal prototype to avoid an error. */
2299a76d
DJ
6800#ifdef __cplusplus
6801extern "C"
6802{
6803#endif
252b5132 6804/* We use char because int might match the return type of a gcc2
2299a76d
DJ
6805 builtin and then its argument prototype would still apply. */
6806char $ac_func ();
252b5132
RH
6807/* The GNU C library defines this for functions which it implements
6808 to always fail with ENOSYS. Some functions are actually named
6809 something starting with __ and the normal name is an alias. */
6810#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6811choke me
6812#else
2299a76d
DJ
6813char (*f) () = $ac_func;
6814#endif
6815#ifdef __cplusplus
6816}
252b5132
RH
6817#endif
6818
2299a76d
DJ
6819int
6820main ()
6821{
6822return f != $ac_func;
6823 ;
6824 return 0;
6825}
6826_ACEOF
6827rm -f conftest.$ac_objext conftest$ac_exeext
6828if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 6829 (eval $ac_link) 2>conftest.er1
2299a76d 6830 ac_status=$?
58670637
DD
6831 grep -v '^ *+' conftest.er1 >conftest.err
6832 rm -f conftest.er1
6833 cat conftest.err >&5
2299a76d
DJ
6834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6835 (exit $ac_status); } &&
fd7d450d
DD
6836 { ac_try='test -z "$ac_c_werror_flag"
6837 || test ! -s conftest.err'
58670637
DD
6838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6839 (eval $ac_try) 2>&5
6840 ac_status=$?
6841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6842 (exit $ac_status); }; } &&
6843 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
6844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6845 (eval $ac_try) 2>&5
6846 ac_status=$?
6847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6848 (exit $ac_status); }; }; then
6849 eval "$as_ac_var=yes"
6850else
6851 echo "$as_me: failed program was:" >&5
6852sed 's/^/| /' conftest.$ac_ext >&5
6853
6854eval "$as_ac_var=no"
6855fi
58670637
DD
6856rm -f conftest.err conftest.$ac_objext \
6857 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
6858fi
6859echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6860echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6861if test `eval echo '${'$as_ac_var'}'` = yes; then
6862 cat >>confdefs.h <<_ACEOF
6863#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6864_ACEOF
6865
6866else
58670637
DD
6867 case $LIBOBJS in
6868 "$ac_func.$ac_objext" | \
6869 *" $ac_func.$ac_objext" | \
6870 "$ac_func.$ac_objext "* | \
6871 *" $ac_func.$ac_objext "* ) ;;
6872 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
6873esac
6874
252b5132
RH
6875fi
6876done
6877
6878
2299a76d
DJ
6879 echo "$as_me:$LINENO: checking whether alloca needs Cray hooks" >&5
6880echo $ECHO_N "checking whether alloca needs Cray hooks... $ECHO_C" >&6
6881if test "${ac_cv_os_cray+set}" = set; then
6882 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 6883else
2299a76d 6884 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
6885/* confdefs.h. */
6886_ACEOF
6887cat confdefs.h >>conftest.$ac_ext
6888cat >>conftest.$ac_ext <<_ACEOF
6889/* end confdefs.h. */
252b5132
RH
6890#if defined(CRAY) && ! defined(CRAY2)
6891webecray
6892#else
6893wenotbecray
6894#endif
6895
2299a76d 6896_ACEOF
252b5132 6897if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2299a76d 6898 $EGREP "webecray" >/dev/null 2>&1; then
252b5132
RH
6899 ac_cv_os_cray=yes
6900else
252b5132
RH
6901 ac_cv_os_cray=no
6902fi
6903rm -f conftest*
6904
6905fi
2299a76d
DJ
6906echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
6907echo "${ECHO_T}$ac_cv_os_cray" >&6
252b5132 6908if test $ac_cv_os_cray = yes; then
30673bf5 6909 for ac_func in _getb67 GETB67 getb67; do
2299a76d
DJ
6910 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6911echo "$as_me:$LINENO: checking for $ac_func" >&5
6912echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6913if eval "test \"\${$as_ac_var+set}\" = set"; then
6914 echo $ECHO_N "(cached) $ECHO_C" >&6
6915else
6916 if test x$gcc_no_link = xyes; then
6917 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6918echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6919 { (exit 1); exit 1; }; }
6920fi
6921cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
6922/* confdefs.h. */
6923_ACEOF
6924cat confdefs.h >>conftest.$ac_ext
6925cat >>conftest.$ac_ext <<_ACEOF
6926/* end confdefs.h. */
252b5132 6927/* System header to define __stub macros and hopefully few prototypes,
2299a76d
DJ
6928 which can conflict with char $ac_func (); below.
6929 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
6930 <limits.h> exists even on freestanding compilers. Under hpux,
6931 including <limits.h> includes <sys/time.h> and causes problems
6932 checking for functions defined therein. */
6933#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
6934# include <limits.h>
6935#else
6936# include <assert.h>
6937#endif
252b5132 6938/* Override any gcc2 internal prototype to avoid an error. */
2299a76d
DJ
6939#ifdef __cplusplus
6940extern "C"
6941{
6942#endif
252b5132 6943/* We use char because int might match the return type of a gcc2
2299a76d
DJ
6944 builtin and then its argument prototype would still apply. */
6945char $ac_func ();
252b5132
RH
6946/* The GNU C library defines this for functions which it implements
6947 to always fail with ENOSYS. Some functions are actually named
6948 something starting with __ and the normal name is an alias. */
6949#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6950choke me
6951#else
2299a76d
DJ
6952char (*f) () = $ac_func;
6953#endif
6954#ifdef __cplusplus
6955}
252b5132
RH
6956#endif
6957
2299a76d
DJ
6958int
6959main ()
6960{
6961return f != $ac_func;
6962 ;
6963 return 0;
6964}
6965_ACEOF
6966rm -f conftest.$ac_objext conftest$ac_exeext
6967if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 6968 (eval $ac_link) 2>conftest.er1
2299a76d 6969 ac_status=$?
58670637
DD
6970 grep -v '^ *+' conftest.er1 >conftest.err
6971 rm -f conftest.er1
6972 cat conftest.err >&5
2299a76d
DJ
6973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6974 (exit $ac_status); } &&
fd7d450d
DD
6975 { ac_try='test -z "$ac_c_werror_flag"
6976 || test ! -s conftest.err'
58670637
DD
6977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6978 (eval $ac_try) 2>&5
6979 ac_status=$?
6980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6981 (exit $ac_status); }; } &&
6982 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
6983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6984 (eval $ac_try) 2>&5
6985 ac_status=$?
6986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6987 (exit $ac_status); }; }; then
6988 eval "$as_ac_var=yes"
6989else
6990 echo "$as_me: failed program was:" >&5
6991sed 's/^/| /' conftest.$ac_ext >&5
6992
6993eval "$as_ac_var=no"
6994fi
58670637
DD
6995rm -f conftest.err conftest.$ac_objext \
6996 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
6997fi
6998echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6999echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7000if test `eval echo '${'$as_ac_var'}'` = yes; then
7001
7002cat >>confdefs.h <<_ACEOF
252b5132 7003#define CRAY_STACKSEG_END $ac_func
2299a76d 7004_ACEOF
252b5132 7005 break
252b5132
RH
7006fi
7007
30673bf5 7008 done
252b5132
RH
7009fi
7010
2299a76d
DJ
7011echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
7012echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7013if test "${ac_cv_c_stack_direction+set}" = set; then
7014 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
7015else
7016 if test "$cross_compiling" = yes; then
7017 ac_cv_c_stack_direction=0
7018else
2299a76d 7019 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7020/* confdefs.h. */
7021_ACEOF
7022cat confdefs.h >>conftest.$ac_ext
7023cat >>conftest.$ac_ext <<_ACEOF
7024/* end confdefs.h. */
252b5132
RH
7025find_stack_direction ()
7026{
7027 static char *addr = 0;
7028 auto char dummy;
7029 if (addr == 0)
7030 {
7031 addr = &dummy;
7032 return find_stack_direction ();
7033 }
7034 else
7035 return (&dummy > addr) ? 1 : -1;
7036}
7037main ()
7038{
7039 exit (find_stack_direction() < 0);
7040}
2299a76d
DJ
7041_ACEOF
7042rm -f conftest$ac_exeext
7043if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7044 (eval $ac_link) 2>&5
7045 ac_status=$?
7046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7049 (eval $ac_try) 2>&5
7050 ac_status=$?
7051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7052 (exit $ac_status); }; }; then
252b5132
RH
7053 ac_cv_c_stack_direction=1
7054else
2299a76d
DJ
7055 echo "$as_me: program exited with status $ac_status" >&5
7056echo "$as_me: failed program was:" >&5
7057sed 's/^/| /' conftest.$ac_ext >&5
7058
7059( exit $ac_status )
7060ac_cv_c_stack_direction=-1
252b5132 7061fi
58670637 7062rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
252b5132 7063fi
252b5132 7064fi
2299a76d
DJ
7065echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
7066echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
252b5132 7067
2299a76d 7068cat >>confdefs.h <<_ACEOF
252b5132 7069#define STACK_DIRECTION $ac_cv_c_stack_direction
2299a76d
DJ
7070_ACEOF
7071
252b5132 7072
0c0a36a4 7073
2299a76d
DJ
7074
7075for ac_header in unistd.h vfork.h
7076do
7077as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8ddbb593 7078echo "$as_me:$LINENO: checking for $ac_header" >&5
2299a76d
DJ
7079echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7080if eval "test \"\${$as_ac_Header+set}\" = set"; then
7081 echo $ECHO_N "(cached) $ECHO_C" >&6
2299a76d 7082else
8ddbb593 7083 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7084/* confdefs.h. */
7085_ACEOF
7086cat confdefs.h >>conftest.$ac_ext
7087cat >>conftest.$ac_ext <<_ACEOF
7088/* end confdefs.h. */
7089#include <$ac_header>
7090_ACEOF
7091if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7092 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7093 ac_status=$?
7094 grep -v '^ *+' conftest.er1 >conftest.err
7095 rm -f conftest.er1
7096 cat conftest.err >&5
7097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7098 (exit $ac_status); } >/dev/null; then
7099 if test -s conftest.err; then
7100 ac_cpp_err=$ac_c_preproc_warn_flag
58670637 7101 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2299a76d
DJ
7102 else
7103 ac_cpp_err=
7104 fi
252b5132 7105else
2299a76d
DJ
7106 ac_cpp_err=yes
7107fi
7108if test -z "$ac_cpp_err"; then
8ddbb593 7109 eval "$as_ac_Header=yes"
2299a76d
DJ
7110else
7111 echo "$as_me: failed program was:" >&5
7112sed 's/^/| /' conftest.$ac_ext >&5
7113
8ddbb593 7114 eval "$as_ac_Header=no"
2299a76d
DJ
7115fi
7116rm -f conftest.err conftest.$ac_ext
252b5132 7117fi
2299a76d
DJ
7118echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7119echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2299a76d
DJ
7120if test `eval echo '${'$as_ac_Header'}'` = yes; then
7121 cat >>confdefs.h <<_ACEOF
7122#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7123_ACEOF
252b5132 7124
252b5132 7125fi
2299a76d
DJ
7126done
7127
7128
7129
7130for ac_func in fork vfork
7131do
7132as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7133echo "$as_me:$LINENO: checking for $ac_func" >&5
7134echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7135if eval "test \"\${$as_ac_var+set}\" = set"; then
7136 echo $ECHO_N "(cached) $ECHO_C" >&6
7137else
7138 if test x$gcc_no_link = xyes; then
7139 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7140echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7141 { (exit 1); exit 1; }; }
7142fi
7143cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7144/* confdefs.h. */
7145_ACEOF
7146cat confdefs.h >>conftest.$ac_ext
7147cat >>conftest.$ac_ext <<_ACEOF
7148/* end confdefs.h. */
252b5132 7149/* System header to define __stub macros and hopefully few prototypes,
2299a76d
DJ
7150 which can conflict with char $ac_func (); below.
7151 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
7152 <limits.h> exists even on freestanding compilers. Under hpux,
7153 including <limits.h> includes <sys/time.h> and causes problems
7154 checking for functions defined therein. */
7155#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
7156# include <limits.h>
7157#else
7158# include <assert.h>
7159#endif
252b5132 7160/* Override any gcc2 internal prototype to avoid an error. */
2299a76d
DJ
7161#ifdef __cplusplus
7162extern "C"
7163{
7164#endif
252b5132 7165/* We use char because int might match the return type of a gcc2
2299a76d
DJ
7166 builtin and then its argument prototype would still apply. */
7167char $ac_func ();
252b5132
RH
7168/* The GNU C library defines this for functions which it implements
7169 to always fail with ENOSYS. Some functions are actually named
7170 something starting with __ and the normal name is an alias. */
2299a76d 7171#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
252b5132
RH
7172choke me
7173#else
2299a76d
DJ
7174char (*f) () = $ac_func;
7175#endif
7176#ifdef __cplusplus
7177}
252b5132
RH
7178#endif
7179
2299a76d
DJ
7180int
7181main ()
7182{
7183return f != $ac_func;
7184 ;
7185 return 0;
7186}
7187_ACEOF
7188rm -f conftest.$ac_objext conftest$ac_exeext
7189if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 7190 (eval $ac_link) 2>conftest.er1
2299a76d 7191 ac_status=$?
58670637
DD
7192 grep -v '^ *+' conftest.er1 >conftest.err
7193 rm -f conftest.er1
7194 cat conftest.err >&5
2299a76d
DJ
7195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7196 (exit $ac_status); } &&
fd7d450d
DD
7197 { ac_try='test -z "$ac_c_werror_flag"
7198 || test ! -s conftest.err'
58670637
DD
7199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7200 (eval $ac_try) 2>&5
7201 ac_status=$?
7202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7203 (exit $ac_status); }; } &&
7204 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
7205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7206 (eval $ac_try) 2>&5
7207 ac_status=$?
7208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7209 (exit $ac_status); }; }; then
7210 eval "$as_ac_var=yes"
7211else
7212 echo "$as_me: failed program was:" >&5
7213sed 's/^/| /' conftest.$ac_ext >&5
7214
7215eval "$as_ac_var=no"
7216fi
58670637
DD
7217rm -f conftest.err conftest.$ac_objext \
7218 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
7219fi
7220echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7221echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7222if test `eval echo '${'$as_ac_var'}'` = yes; then
7223 cat >>confdefs.h <<_ACEOF
7224#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7225_ACEOF
7226
252b5132 7227fi
2299a76d 7228done
252b5132 7229
2299a76d
DJ
7230if test "x$ac_cv_func_fork" = xyes; then
7231 echo "$as_me:$LINENO: checking for working fork" >&5
7232echo $ECHO_N "checking for working fork... $ECHO_C" >&6
7233if test "${ac_cv_func_fork_works+set}" = set; then
7234 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7235else
2299a76d
DJ
7236 if test "$cross_compiling" = yes; then
7237 ac_cv_func_fork_works=cross
7238else
7239 cat >conftest.$ac_ext <<_ACEOF
7240/* By Ruediger Kuhlmann. */
7241 #include <sys/types.h>
7242 #if HAVE_UNISTD_H
7243 # include <unistd.h>
7244 #endif
7245 /* Some systems only have a dummy stub for fork() */
7246 int main ()
7247 {
58670637
DD
7248 if (fork() < 0)
7249 exit (1);
7250 exit (0);
2299a76d
DJ
7251 }
7252_ACEOF
7253rm -f conftest$ac_exeext
7254if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7255 (eval $ac_link) 2>&5
7256 ac_status=$?
7257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7258 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7260 (eval $ac_try) 2>&5
7261 ac_status=$?
7262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7263 (exit $ac_status); }; }; then
7264 ac_cv_func_fork_works=yes
7265else
7266 echo "$as_me: program exited with status $ac_status" >&5
7267echo "$as_me: failed program was:" >&5
7268sed 's/^/| /' conftest.$ac_ext >&5
7269
7270( exit $ac_status )
7271ac_cv_func_fork_works=no
7272fi
58670637 7273rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2299a76d
DJ
7274fi
7275fi
7276echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
7277echo "${ECHO_T}$ac_cv_func_fork_works" >&6
7278
7279else
7280 ac_cv_func_fork_works=$ac_cv_func_fork
7281fi
7282if test "x$ac_cv_func_fork_works" = xcross; then
7283 case $host in
7284 *-*-amigaos* | *-*-msdosdjgpp*)
7285 # Override, as these systems have only a dummy fork() stub
7286 ac_cv_func_fork_works=no
7287 ;;
7288 *)
7289 ac_cv_func_fork_works=yes
7290 ;;
7291 esac
7292 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
7293echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
252b5132 7294fi
252b5132 7295ac_cv_func_vfork_works=$ac_cv_func_vfork
2299a76d
DJ
7296if test "x$ac_cv_func_vfork" = xyes; then
7297 echo "$as_me:$LINENO: checking for working vfork" >&5
7298echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
7299if test "${ac_cv_func_vfork_works+set}" = set; then
7300 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7301else
2299a76d
DJ
7302 if test "$cross_compiling" = yes; then
7303 ac_cv_func_vfork_works=cross
7304else
7305 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7306/* confdefs.h. */
7307_ACEOF
7308cat confdefs.h >>conftest.$ac_ext
7309cat >>conftest.$ac_ext <<_ACEOF
7310/* end confdefs.h. */
252b5132
RH
7311/* Thanks to Paul Eggert for this test. */
7312#include <stdio.h>
2299a76d 7313#include <stdlib.h>
252b5132
RH
7314#include <sys/types.h>
7315#include <sys/stat.h>
2299a76d
DJ
7316#include <sys/wait.h>
7317#if HAVE_UNISTD_H
7318# include <unistd.h>
252b5132 7319#endif
2299a76d
DJ
7320#if HAVE_VFORK_H
7321# include <vfork.h>
252b5132
RH
7322#endif
7323/* On some sparc systems, changes by the child to local and incoming
2299a76d
DJ
7324 argument registers are propagated back to the parent. The compiler
7325 is told about this with #include <vfork.h>, but some compilers
7326 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
7327 static variable whose address is put into a register that is
7328 clobbered by the vfork. */
7329static void
252b5132
RH
7330#ifdef __cplusplus
7331sparc_address_test (int arg)
2299a76d 7332# else
252b5132
RH
7333sparc_address_test (arg) int arg;
7334#endif
7335{
7336 static pid_t child;
7337 if (!child) {
7338 child = vfork ();
7339 if (child < 0) {
7340 perror ("vfork");
7341 _exit(2);
7342 }
7343 if (!child) {
7344 arg = getpid();
7345 write(-1, "", 0);
7346 _exit (arg);
7347 }
7348 }
7349}
2299a76d
DJ
7350
7351int
7352main ()
7353{
252b5132
RH
7354 pid_t parent = getpid ();
7355 pid_t child;
7356
2299a76d 7357 sparc_address_test (0);
252b5132
RH
7358
7359 child = vfork ();
7360
7361 if (child == 0) {
2299a76d
DJ
7362 /* Here is another test for sparc vfork register problems. This
7363 test uses lots of local variables, at least as many local
7364 variables as main has allocated so far including compiler
7365 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
7366 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
7367 reuse the register of parent for one of the local variables,
7368 since it will think that parent can't possibly be used any more
7369 in this routine. Assigning to the local variable will thus
7370 munge parent in the parent process. */
252b5132
RH
7371 pid_t
7372 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
7373 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
7374 /* Convince the compiler that p..p7 are live; otherwise, it might
7375 use the same hardware register for all 8 local variables. */
7376 if (p != p1 || p != p2 || p != p3 || p != p4
7377 || p != p5 || p != p6 || p != p7)
7378 _exit(1);
7379
2299a76d
DJ
7380 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
7381 from child file descriptors. If the child closes a descriptor
7382 before it execs or exits, this munges the parent's descriptor
7383 as well. Test for this by closing stdout in the child. */
252b5132
RH
7384 _exit(close(fileno(stdout)) != 0);
7385 } else {
7386 int status;
7387 struct stat st;
7388
7389 while (wait(&status) != child)
7390 ;
7391 exit(
7392 /* Was there some problem with vforking? */
7393 child < 0
7394
7395 /* Did the child fail? (This shouldn't happen.) */
7396 || status
7397
7398 /* Did the vfork/compiler bug occur? */
7399 || parent != getpid()
7400
7401 /* Did the file descriptor bug occur? */
7402 || fstat(fileno(stdout), &st) != 0
7403 );
7404 }
7405}
2299a76d
DJ
7406_ACEOF
7407rm -f conftest$ac_exeext
7408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7409 (eval $ac_link) 2>&5
7410 ac_status=$?
7411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7412 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7414 (eval $ac_try) 2>&5
7415 ac_status=$?
7416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7417 (exit $ac_status); }; }; then
252b5132
RH
7418 ac_cv_func_vfork_works=yes
7419else
2299a76d
DJ
7420 echo "$as_me: program exited with status $ac_status" >&5
7421echo "$as_me: failed program was:" >&5
7422sed 's/^/| /' conftest.$ac_ext >&5
7423
7424( exit $ac_status )
7425ac_cv_func_vfork_works=no
7426fi
58670637 7427rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
252b5132 7428fi
252b5132 7429fi
2299a76d
DJ
7430echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
7431echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
252b5132 7432
2299a76d
DJ
7433fi;
7434if test "x$ac_cv_func_fork_works" = xcross; then
58670637 7435 ac_cv_func_vfork_works=$ac_cv_func_vfork
2299a76d
DJ
7436 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
7437echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
252b5132
RH
7438fi
7439
2299a76d
DJ
7440if test "x$ac_cv_func_vfork_works" = xyes; then
7441
7442cat >>confdefs.h <<\_ACEOF
7443#define HAVE_WORKING_VFORK 1
7444_ACEOF
7445
7446else
7447
7448cat >>confdefs.h <<\_ACEOF
252b5132 7449#define vfork fork
2299a76d
DJ
7450_ACEOF
7451
7452fi
7453if test "x$ac_cv_func_fork_works" = xyes; then
7454
7455cat >>confdefs.h <<\_ACEOF
7456#define HAVE_WORKING_FORK 1
7457_ACEOF
252b5132
RH
7458
7459fi
7460
7461 if test $ac_cv_func_vfork_works = no; then
58670637
DD
7462 case $LIBOBJS in
7463 "vfork.$ac_objext" | \
7464 *" vfork.$ac_objext" | \
7465 "vfork.$ac_objext "* | \
7466 *" vfork.$ac_objext "* ) ;;
7467 *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
7468esac
7469
252b5132 7470 fi
24acd898
DD
7471 # We only need _doprnt if we might use it to implement v*printf.
7472 if test $ac_cv_func_vprintf != yes \
7473 || test $ac_cv_func_vfprintf != yes \
7474 || test $ac_cv_func_vsprintf != yes; then
2299a76d
DJ
7475
7476for ac_func in _doprnt
24acd898 7477do
2299a76d
DJ
7478as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7479echo "$as_me:$LINENO: checking for $ac_func" >&5
7480echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7481if eval "test \"\${$as_ac_var+set}\" = set"; then
7482 echo $ECHO_N "(cached) $ECHO_C" >&6
7483else
7484 if test x$gcc_no_link = xyes; then
7485 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7486echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7487 { (exit 1); exit 1; }; }
7488fi
7489cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7490/* confdefs.h. */
7491_ACEOF
7492cat confdefs.h >>conftest.$ac_ext
7493cat >>conftest.$ac_ext <<_ACEOF
7494/* end confdefs.h. */
24acd898 7495/* System header to define __stub macros and hopefully few prototypes,
2299a76d
DJ
7496 which can conflict with char $ac_func (); below.
7497 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
7498 <limits.h> exists even on freestanding compilers. Under hpux,
7499 including <limits.h> includes <sys/time.h> and causes problems
7500 checking for functions defined therein. */
7501#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
7502# include <limits.h>
7503#else
7504# include <assert.h>
7505#endif
24acd898 7506/* Override any gcc2 internal prototype to avoid an error. */
2299a76d
DJ
7507#ifdef __cplusplus
7508extern "C"
7509{
7510#endif
24acd898 7511/* We use char because int might match the return type of a gcc2
2299a76d
DJ
7512 builtin and then its argument prototype would still apply. */
7513char $ac_func ();
24acd898
DD
7514/* The GNU C library defines this for functions which it implements
7515 to always fail with ENOSYS. Some functions are actually named
7516 something starting with __ and the normal name is an alias. */
7517#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7518choke me
7519#else
2299a76d
DJ
7520char (*f) () = $ac_func;
7521#endif
7522#ifdef __cplusplus
7523}
24acd898
DD
7524#endif
7525
2299a76d
DJ
7526int
7527main ()
7528{
7529return f != $ac_func;
7530 ;
7531 return 0;
7532}
7533_ACEOF
7534rm -f conftest.$ac_objext conftest$ac_exeext
7535if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 7536 (eval $ac_link) 2>conftest.er1
2299a76d 7537 ac_status=$?
58670637
DD
7538 grep -v '^ *+' conftest.er1 >conftest.err
7539 rm -f conftest.er1
7540 cat conftest.err >&5
2299a76d
DJ
7541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7542 (exit $ac_status); } &&
fd7d450d
DD
7543 { ac_try='test -z "$ac_c_werror_flag"
7544 || test ! -s conftest.err'
58670637
DD
7545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7546 (eval $ac_try) 2>&5
7547 ac_status=$?
7548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7549 (exit $ac_status); }; } &&
7550 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
7551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7552 (eval $ac_try) 2>&5
7553 ac_status=$?
7554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7555 (exit $ac_status); }; }; then
7556 eval "$as_ac_var=yes"
7557else
7558 echo "$as_me: failed program was:" >&5
7559sed 's/^/| /' conftest.$ac_ext >&5
7560
7561eval "$as_ac_var=no"
7562fi
58670637
DD
7563rm -f conftest.err conftest.$ac_objext \
7564 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
7565fi
7566echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7567echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7568if test `eval echo '${'$as_ac_var'}'` = yes; then
7569 cat >>confdefs.h <<_ACEOF
7570#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7571_ACEOF
7572
7573else
58670637
DD
7574 case $LIBOBJS in
7575 "$ac_func.$ac_objext" | \
7576 *" $ac_func.$ac_objext" | \
7577 "$ac_func.$ac_objext "* | \
7578 *" $ac_func.$ac_objext "* ) ;;
7579 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
7580esac
7581
24acd898
DD
7582fi
7583done
7584
7585
cc096b71 7586 else
2299a76d
DJ
7587
7588for ac_func in _doprnt
cc096b71 7589do
2299a76d
DJ
7590as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7591echo "$as_me:$LINENO: checking for $ac_func" >&5
7592echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7593if eval "test \"\${$as_ac_var+set}\" = set"; then
7594 echo $ECHO_N "(cached) $ECHO_C" >&6
7595else
7596 if test x$gcc_no_link = xyes; then
7597 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7598echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7599 { (exit 1); exit 1; }; }
7600fi
7601cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7602/* confdefs.h. */
7603_ACEOF
7604cat confdefs.h >>conftest.$ac_ext
7605cat >>conftest.$ac_ext <<_ACEOF
7606/* end confdefs.h. */
cc096b71 7607/* System header to define __stub macros and hopefully few prototypes,
2299a76d
DJ
7608 which can conflict with char $ac_func (); below.
7609 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
7610 <limits.h> exists even on freestanding compilers. Under hpux,
7611 including <limits.h> includes <sys/time.h> and causes problems
7612 checking for functions defined therein. */
7613#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
7614# include <limits.h>
7615#else
7616# include <assert.h>
7617#endif
cc096b71 7618/* Override any gcc2 internal prototype to avoid an error. */
2299a76d
DJ
7619#ifdef __cplusplus
7620extern "C"
7621{
7622#endif
cc096b71 7623/* We use char because int might match the return type of a gcc2
2299a76d
DJ
7624 builtin and then its argument prototype would still apply. */
7625char $ac_func ();
cc096b71
DD
7626/* The GNU C library defines this for functions which it implements
7627 to always fail with ENOSYS. Some functions are actually named
7628 something starting with __ and the normal name is an alias. */
7629#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7630choke me
7631#else
2299a76d
DJ
7632char (*f) () = $ac_func;
7633#endif
7634#ifdef __cplusplus
7635}
cc096b71
DD
7636#endif
7637
2299a76d
DJ
7638int
7639main ()
7640{
7641return f != $ac_func;
7642 ;
7643 return 0;
7644}
7645_ACEOF
7646rm -f conftest.$ac_objext conftest$ac_exeext
7647if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 7648 (eval $ac_link) 2>conftest.er1
2299a76d 7649 ac_status=$?
58670637
DD
7650 grep -v '^ *+' conftest.er1 >conftest.err
7651 rm -f conftest.er1
7652 cat conftest.err >&5
2299a76d
DJ
7653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7654 (exit $ac_status); } &&
fd7d450d
DD
7655 { ac_try='test -z "$ac_c_werror_flag"
7656 || test ! -s conftest.err'
58670637
DD
7657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7658 (eval $ac_try) 2>&5
7659 ac_status=$?
7660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7661 (exit $ac_status); }; } &&
7662 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
7663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7664 (eval $ac_try) 2>&5
7665 ac_status=$?
7666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7667 (exit $ac_status); }; }; then
7668 eval "$as_ac_var=yes"
7669else
7670 echo "$as_me: failed program was:" >&5
7671sed 's/^/| /' conftest.$ac_ext >&5
7672
7673eval "$as_ac_var=no"
7674fi
58670637
DD
7675rm -f conftest.err conftest.$ac_objext \
7676 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
7677fi
7678echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7679echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7680if test `eval echo '${'$as_ac_var'}'` = yes; then
7681 cat >>confdefs.h <<_ACEOF
7682#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7683_ACEOF
cc096b71 7684
cc096b71
DD
7685fi
7686done
7687
24acd898
DD
7688 fi
7689
252b5132 7690 for v in $vars; do
2299a76d
DJ
7691 echo "$as_me:$LINENO: checking for $v" >&5
7692echo $ECHO_N "checking for $v... $ECHO_C" >&6
7693 if eval "test \"\${libiberty_cv_var_$v+set}\" = set"; then
7694 echo $ECHO_N "(cached) $ECHO_C" >&6
7695else
7696 if test x$gcc_no_link = xyes; then
7697 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7698echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7699 { (exit 1); exit 1; }; }
7700fi
7701cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7702/* confdefs.h. */
7703_ACEOF
7704cat confdefs.h >>conftest.$ac_ext
7705cat >>conftest.$ac_ext <<_ACEOF
7706/* end confdefs.h. */
252b5132 7707int *p;
2299a76d
DJ
7708int
7709main ()
7710{
18893690 7711extern int $v []; p = $v;
2299a76d
DJ
7712 ;
7713 return 0;
7714}
7715_ACEOF
7716rm -f conftest.$ac_objext conftest$ac_exeext
7717if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 7718 (eval $ac_link) 2>conftest.er1
2299a76d 7719 ac_status=$?
58670637
DD
7720 grep -v '^ *+' conftest.er1 >conftest.err
7721 rm -f conftest.er1
7722 cat conftest.err >&5
2299a76d
DJ
7723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7724 (exit $ac_status); } &&
fd7d450d
DD
7725 { ac_try='test -z "$ac_c_werror_flag"
7726 || test ! -s conftest.err'
58670637
DD
7727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7728 (eval $ac_try) 2>&5
7729 ac_status=$?
7730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7731 (exit $ac_status); }; } &&
7732 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
7733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7734 (eval $ac_try) 2>&5
7735 ac_status=$?
7736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7737 (exit $ac_status); }; }; then
252b5132
RH
7738 eval "libiberty_cv_var_$v=yes"
7739else
2299a76d
DJ
7740 echo "$as_me: failed program was:" >&5
7741sed 's/^/| /' conftest.$ac_ext >&5
7742
7743eval "libiberty_cv_var_$v=no"
252b5132 7744fi
58670637
DD
7745rm -f conftest.err conftest.$ac_objext \
7746 conftest$ac_exeext conftest.$ac_ext
252b5132
RH
7747fi
7748
7749 if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
2299a76d
DJ
7750 echo "$as_me:$LINENO: result: yes" >&5
7751echo "${ECHO_T}yes" >&6
252b5132 7752 n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2299a76d 7753 cat >>confdefs.h <<_ACEOF
252b5132 7754#define $n 1
2299a76d 7755_ACEOF
252b5132
RH
7756
7757 else
2299a76d
DJ
7758 echo "$as_me:$LINENO: result: no" >&5
7759echo "${ECHO_T}no" >&6
252b5132
RH
7760 fi
7761 done
e69f6c8c
DD
7762
7763 # special check for _system_configuration because AIX <4.3.2 do not
7764 # contain the `physmem' member.
2299a76d
DJ
7765 echo "$as_me:$LINENO: checking for external symbol _system_configuration" >&5
7766echo $ECHO_N "checking for external symbol _system_configuration... $ECHO_C" >&6
7767 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7768/* confdefs.h. */
7769_ACEOF
7770cat confdefs.h >>conftest.$ac_ext
7771cat >>conftest.$ac_ext <<_ACEOF
7772/* end confdefs.h. */
e69f6c8c 7773#include <sys/systemcfg.h>
2299a76d
DJ
7774int
7775main ()
7776{
e69f6c8c 7777double x = _system_configuration.physmem;
2299a76d
DJ
7778 ;
7779 return 0;
7780}
7781_ACEOF
7782rm -f conftest.$ac_objext
7783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 7784 (eval $ac_compile) 2>conftest.er1
2299a76d 7785 ac_status=$?
58670637
DD
7786 grep -v '^ *+' conftest.er1 >conftest.err
7787 rm -f conftest.er1
7788 cat conftest.err >&5
2299a76d
DJ
7789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7790 (exit $ac_status); } &&
fd7d450d
DD
7791 { ac_try='test -z "$ac_c_werror_flag"
7792 || test ! -s conftest.err'
58670637
DD
7793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7794 (eval $ac_try) 2>&5
7795 ac_status=$?
7796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7797 (exit $ac_status); }; } &&
7798 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
7799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7800 (eval $ac_try) 2>&5
7801 ac_status=$?
7802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7803 (exit $ac_status); }; }; then
7804 echo "$as_me:$LINENO: result: yes" >&5
7805echo "${ECHO_T}yes" >&6
7806
7807cat >>confdefs.h <<\_ACEOF
e69f6c8c 7808#define HAVE__SYSTEM_CONFIGURATION 1
2299a76d 7809_ACEOF
e69f6c8c
DD
7810
7811else
2299a76d
DJ
7812 echo "$as_me: failed program was:" >&5
7813sed 's/^/| /' conftest.$ac_ext >&5
7814
7815echo "$as_me:$LINENO: result: no" >&5
7816echo "${ECHO_T}no" >&6
e69f6c8c 7817fi
58670637 7818rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2299a76d 7819
e69f6c8c 7820
2299a76d 7821for ac_func in $checkfuncs
252b5132 7822do
2299a76d
DJ
7823as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7824echo "$as_me:$LINENO: checking for $ac_func" >&5
7825echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7826if eval "test \"\${$as_ac_var+set}\" = set"; then
7827 echo $ECHO_N "(cached) $ECHO_C" >&6
7828else
7829 if test x$gcc_no_link = xyes; then
7830 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7831echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7832 { (exit 1); exit 1; }; }
7833fi
7834cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7835/* confdefs.h. */
7836_ACEOF
7837cat confdefs.h >>conftest.$ac_ext
7838cat >>conftest.$ac_ext <<_ACEOF
7839/* end confdefs.h. */
eb383413 7840/* System header to define __stub macros and hopefully few prototypes,
2299a76d
DJ
7841 which can conflict with char $ac_func (); below.
7842 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
7843 <limits.h> exists even on freestanding compilers. Under hpux,
7844 including <limits.h> includes <sys/time.h> and causes problems
7845 checking for functions defined therein. */
7846#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
7847# include <limits.h>
7848#else
7849# include <assert.h>
7850#endif
eb383413 7851/* Override any gcc2 internal prototype to avoid an error. */
2299a76d
DJ
7852#ifdef __cplusplus
7853extern "C"
7854{
7855#endif
eb383413 7856/* We use char because int might match the return type of a gcc2
2299a76d
DJ
7857 builtin and then its argument prototype would still apply. */
7858char $ac_func ();
eb383413
L
7859/* The GNU C library defines this for functions which it implements
7860 to always fail with ENOSYS. Some functions are actually named
7861 something starting with __ and the normal name is an alias. */
7862#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7863choke me
7864#else
2299a76d
DJ
7865char (*f) () = $ac_func;
7866#endif
7867#ifdef __cplusplus
7868}
eb383413
L
7869#endif
7870
2299a76d
DJ
7871int
7872main ()
7873{
7874return f != $ac_func;
7875 ;
7876 return 0;
7877}
7878_ACEOF
7879rm -f conftest.$ac_objext conftest$ac_exeext
7880if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 7881 (eval $ac_link) 2>conftest.er1
2299a76d 7882 ac_status=$?
58670637
DD
7883 grep -v '^ *+' conftest.er1 >conftest.err
7884 rm -f conftest.er1
7885 cat conftest.err >&5
2299a76d
DJ
7886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7887 (exit $ac_status); } &&
fd7d450d
DD
7888 { ac_try='test -z "$ac_c_werror_flag"
7889 || test ! -s conftest.err'
58670637
DD
7890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7891 (eval $ac_try) 2>&5
7892 ac_status=$?
7893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7894 (exit $ac_status); }; } &&
7895 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
7896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7897 (eval $ac_try) 2>&5
7898 ac_status=$?
7899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7900 (exit $ac_status); }; }; then
7901 eval "$as_ac_var=yes"
7902else
7903 echo "$as_me: failed program was:" >&5
7904sed 's/^/| /' conftest.$ac_ext >&5
7905
7906eval "$as_ac_var=no"
7907fi
58670637
DD
7908rm -f conftest.err conftest.$ac_objext \
7909 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
7910fi
7911echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7912echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7913if test `eval echo '${'$as_ac_var'}'` = yes; then
7914 cat >>confdefs.h <<_ACEOF
7915#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7916_ACEOF
eb383413 7917
eb383413
L
7918fi
7919done
7920
fa99459d
DD
7921 echo "$as_me:$LINENO: checking whether basename is declared" >&5
7922echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6
7923if test "${ac_cv_have_decl_basename+set}" = set; then
7924 echo $ECHO_N "(cached) $ECHO_C" >&6
7925else
7926 cat >conftest.$ac_ext <<_ACEOF
7927/* confdefs.h. */
7928_ACEOF
7929cat confdefs.h >>conftest.$ac_ext
7930cat >>conftest.$ac_ext <<_ACEOF
7931/* end confdefs.h. */
7932$ac_includes_default
7933int
7934main ()
7935{
7936#ifndef basename
7937 char *p = (char *) basename;
7938#endif
7939
7940 ;
7941 return 0;
7942}
7943_ACEOF
7944rm -f conftest.$ac_objext
7945if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7946 (eval $ac_compile) 2>conftest.er1
7947 ac_status=$?
7948 grep -v '^ *+' conftest.er1 >conftest.err
7949 rm -f conftest.er1
7950 cat conftest.err >&5
7951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7952 (exit $ac_status); } &&
fd7d450d
DD
7953 { ac_try='test -z "$ac_c_werror_flag"
7954 || test ! -s conftest.err'
fa99459d
DD
7955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7956 (eval $ac_try) 2>&5
7957 ac_status=$?
7958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7959 (exit $ac_status); }; } &&
7960 { ac_try='test -s conftest.$ac_objext'
7961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7962 (eval $ac_try) 2>&5
7963 ac_status=$?
7964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7965 (exit $ac_status); }; }; then
7966 ac_cv_have_decl_basename=yes
7967else
7968 echo "$as_me: failed program was:" >&5
7969sed 's/^/| /' conftest.$ac_ext >&5
7970
7971ac_cv_have_decl_basename=no
7972fi
7973rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7974fi
7975echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5
7976echo "${ECHO_T}$ac_cv_have_decl_basename" >&6
7977if test $ac_cv_have_decl_basename = yes; then
7978
7979cat >>confdefs.h <<_ACEOF
7980#define HAVE_DECL_BASENAME 1
7981_ACEOF
7982
7983
7984else
7985 cat >>confdefs.h <<_ACEOF
7986#define HAVE_DECL_BASENAME 0
7987_ACEOF
7988
7989
7990fi
7991echo "$as_me:$LINENO: checking whether ffs is declared" >&5
7992echo $ECHO_N "checking whether ffs is declared... $ECHO_C" >&6
7993if test "${ac_cv_have_decl_ffs+set}" = set; then
7994 echo $ECHO_N "(cached) $ECHO_C" >&6
7995else
7996 cat >conftest.$ac_ext <<_ACEOF
7997/* confdefs.h. */
7998_ACEOF
7999cat confdefs.h >>conftest.$ac_ext
8000cat >>conftest.$ac_ext <<_ACEOF
8001/* end confdefs.h. */
8002$ac_includes_default
8003int
8004main ()
8005{
8006#ifndef ffs
8007 char *p = (char *) ffs;
8008#endif
8009
8010 ;
8011 return 0;
8012}
8013_ACEOF
8014rm -f conftest.$ac_objext
8015if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8016 (eval $ac_compile) 2>conftest.er1
8017 ac_status=$?
8018 grep -v '^ *+' conftest.er1 >conftest.err
8019 rm -f conftest.er1
8020 cat conftest.err >&5
8021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8022 (exit $ac_status); } &&
fd7d450d
DD
8023 { ac_try='test -z "$ac_c_werror_flag"
8024 || test ! -s conftest.err'
fa99459d
DD
8025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8026 (eval $ac_try) 2>&5
8027 ac_status=$?
8028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8029 (exit $ac_status); }; } &&
8030 { ac_try='test -s conftest.$ac_objext'
8031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8032 (eval $ac_try) 2>&5
8033 ac_status=$?
8034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8035 (exit $ac_status); }; }; then
8036 ac_cv_have_decl_ffs=yes
8037else
8038 echo "$as_me: failed program was:" >&5
8039sed 's/^/| /' conftest.$ac_ext >&5
8040
8041ac_cv_have_decl_ffs=no
8042fi
8043rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8044fi
8045echo "$as_me:$LINENO: result: $ac_cv_have_decl_ffs" >&5
8046echo "${ECHO_T}$ac_cv_have_decl_ffs" >&6
8047if test $ac_cv_have_decl_ffs = yes; then
8048
8049cat >>confdefs.h <<_ACEOF
8050#define HAVE_DECL_FFS 1
8051_ACEOF
8052
8053
8054else
8055 cat >>confdefs.h <<_ACEOF
8056#define HAVE_DECL_FFS 0
8057_ACEOF
8058
8059
8060fi
8061echo "$as_me:$LINENO: checking whether asprintf is declared" >&5
8062echo $ECHO_N "checking whether asprintf is declared... $ECHO_C" >&6
8063if test "${ac_cv_have_decl_asprintf+set}" = set; then
8064 echo $ECHO_N "(cached) $ECHO_C" >&6
8065else
8066 cat >conftest.$ac_ext <<_ACEOF
8067/* confdefs.h. */
8068_ACEOF
8069cat confdefs.h >>conftest.$ac_ext
8070cat >>conftest.$ac_ext <<_ACEOF
8071/* end confdefs.h. */
8072$ac_includes_default
8073int
8074main ()
8075{
8076#ifndef asprintf
8077 char *p = (char *) asprintf;
8078#endif
8079
8080 ;
8081 return 0;
8082}
8083_ACEOF
8084rm -f conftest.$ac_objext
8085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8086 (eval $ac_compile) 2>conftest.er1
8087 ac_status=$?
8088 grep -v '^ *+' conftest.er1 >conftest.err
8089 rm -f conftest.er1
8090 cat conftest.err >&5
8091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8092 (exit $ac_status); } &&
fd7d450d
DD
8093 { ac_try='test -z "$ac_c_werror_flag"
8094 || test ! -s conftest.err'
fa99459d
DD
8095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8096 (eval $ac_try) 2>&5
8097 ac_status=$?
8098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8099 (exit $ac_status); }; } &&
8100 { ac_try='test -s conftest.$ac_objext'
8101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8102 (eval $ac_try) 2>&5
8103 ac_status=$?
8104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8105 (exit $ac_status); }; }; then
8106 ac_cv_have_decl_asprintf=yes
8107else
8108 echo "$as_me: failed program was:" >&5
8109sed 's/^/| /' conftest.$ac_ext >&5
8110
8111ac_cv_have_decl_asprintf=no
8112fi
8113rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8114fi
8115echo "$as_me:$LINENO: result: $ac_cv_have_decl_asprintf" >&5
8116echo "${ECHO_T}$ac_cv_have_decl_asprintf" >&6
8117if test $ac_cv_have_decl_asprintf = yes; then
8118
8119cat >>confdefs.h <<_ACEOF
8120#define HAVE_DECL_ASPRINTF 1
8121_ACEOF
8122
8123
8124else
8125 cat >>confdefs.h <<_ACEOF
8126#define HAVE_DECL_ASPRINTF 0
8127_ACEOF
8128
8129
8130fi
8131echo "$as_me:$LINENO: checking whether vasprintf is declared" >&5
8132echo $ECHO_N "checking whether vasprintf is declared... $ECHO_C" >&6
8133if test "${ac_cv_have_decl_vasprintf+set}" = set; then
8134 echo $ECHO_N "(cached) $ECHO_C" >&6
8135else
8136 cat >conftest.$ac_ext <<_ACEOF
8137/* confdefs.h. */
8138_ACEOF
8139cat confdefs.h >>conftest.$ac_ext
8140cat >>conftest.$ac_ext <<_ACEOF
8141/* end confdefs.h. */
8142$ac_includes_default
8143int
8144main ()
8145{
8146#ifndef vasprintf
8147 char *p = (char *) vasprintf;
8148#endif
8149
8150 ;
8151 return 0;
8152}
8153_ACEOF
8154rm -f conftest.$ac_objext
8155if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8156 (eval $ac_compile) 2>conftest.er1
8157 ac_status=$?
8158 grep -v '^ *+' conftest.er1 >conftest.err
8159 rm -f conftest.er1
8160 cat conftest.err >&5
8161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8162 (exit $ac_status); } &&
fd7d450d
DD
8163 { ac_try='test -z "$ac_c_werror_flag"
8164 || test ! -s conftest.err'
fa99459d
DD
8165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8166 (eval $ac_try) 2>&5
8167 ac_status=$?
8168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8169 (exit $ac_status); }; } &&
8170 { ac_try='test -s conftest.$ac_objext'
8171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8172 (eval $ac_try) 2>&5
8173 ac_status=$?
8174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8175 (exit $ac_status); }; }; then
8176 ac_cv_have_decl_vasprintf=yes
8177else
8178 echo "$as_me: failed program was:" >&5
8179sed 's/^/| /' conftest.$ac_ext >&5
8180
8181ac_cv_have_decl_vasprintf=no
8182fi
8183rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8184fi
8185echo "$as_me:$LINENO: result: $ac_cv_have_decl_vasprintf" >&5
8186echo "${ECHO_T}$ac_cv_have_decl_vasprintf" >&6
8187if test $ac_cv_have_decl_vasprintf = yes; then
8188
8189cat >>confdefs.h <<_ACEOF
8190#define HAVE_DECL_VASPRINTF 1
8191_ACEOF
8192
8193
8194else
8195 cat >>confdefs.h <<_ACEOF
8196#define HAVE_DECL_VASPRINTF 0
8197_ACEOF
8198
8199
01e94249
DD
8200fi
8201echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
8202echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
8203if test "${ac_cv_have_decl_snprintf+set}" = set; then
8204 echo $ECHO_N "(cached) $ECHO_C" >&6
8205else
8206 cat >conftest.$ac_ext <<_ACEOF
8207/* confdefs.h. */
8208_ACEOF
8209cat confdefs.h >>conftest.$ac_ext
8210cat >>conftest.$ac_ext <<_ACEOF
8211/* end confdefs.h. */
8212$ac_includes_default
8213int
8214main ()
8215{
8216#ifndef snprintf
8217 char *p = (char *) snprintf;
8218#endif
8219
8220 ;
8221 return 0;
8222}
8223_ACEOF
8224rm -f conftest.$ac_objext
8225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8226 (eval $ac_compile) 2>conftest.er1
8227 ac_status=$?
8228 grep -v '^ *+' conftest.er1 >conftest.err
8229 rm -f conftest.er1
8230 cat conftest.err >&5
8231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8232 (exit $ac_status); } &&
fd7d450d
DD
8233 { ac_try='test -z "$ac_c_werror_flag"
8234 || test ! -s conftest.err'
01e94249
DD
8235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8236 (eval $ac_try) 2>&5
8237 ac_status=$?
8238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8239 (exit $ac_status); }; } &&
8240 { ac_try='test -s conftest.$ac_objext'
8241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8242 (eval $ac_try) 2>&5
8243 ac_status=$?
8244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8245 (exit $ac_status); }; }; then
8246 ac_cv_have_decl_snprintf=yes
8247else
8248 echo "$as_me: failed program was:" >&5
8249sed 's/^/| /' conftest.$ac_ext >&5
8250
8251ac_cv_have_decl_snprintf=no
8252fi
8253rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8254fi
8255echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
8256echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
8257if test $ac_cv_have_decl_snprintf = yes; then
8258
8259cat >>confdefs.h <<_ACEOF
8260#define HAVE_DECL_SNPRINTF 1
8261_ACEOF
8262
8263
8264else
8265 cat >>confdefs.h <<_ACEOF
8266#define HAVE_DECL_SNPRINTF 0
8267_ACEOF
8268
8269
8270fi
8271echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
8272echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
8273if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
8274 echo $ECHO_N "(cached) $ECHO_C" >&6
8275else
8276 cat >conftest.$ac_ext <<_ACEOF
8277/* confdefs.h. */
8278_ACEOF
8279cat confdefs.h >>conftest.$ac_ext
8280cat >>conftest.$ac_ext <<_ACEOF
8281/* end confdefs.h. */
8282$ac_includes_default
8283int
8284main ()
8285{
8286#ifndef vsnprintf
8287 char *p = (char *) vsnprintf;
8288#endif
8289
8290 ;
8291 return 0;
8292}
8293_ACEOF
8294rm -f conftest.$ac_objext
8295if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8296 (eval $ac_compile) 2>conftest.er1
8297 ac_status=$?
8298 grep -v '^ *+' conftest.er1 >conftest.err
8299 rm -f conftest.er1
8300 cat conftest.err >&5
8301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8302 (exit $ac_status); } &&
fd7d450d
DD
8303 { ac_try='test -z "$ac_c_werror_flag"
8304 || test ! -s conftest.err'
01e94249
DD
8305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8306 (eval $ac_try) 2>&5
8307 ac_status=$?
8308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8309 (exit $ac_status); }; } &&
8310 { ac_try='test -s conftest.$ac_objext'
8311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8312 (eval $ac_try) 2>&5
8313 ac_status=$?
8314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8315 (exit $ac_status); }; }; then
8316 ac_cv_have_decl_vsnprintf=yes
8317else
8318 echo "$as_me: failed program was:" >&5
8319sed 's/^/| /' conftest.$ac_ext >&5
8320
8321ac_cv_have_decl_vsnprintf=no
8322fi
8323rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8324fi
8325echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
8326echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
8327if test $ac_cv_have_decl_vsnprintf = yes; then
8328
8329cat >>confdefs.h <<_ACEOF
8330#define HAVE_DECL_VSNPRINTF 1
8331_ACEOF
8332
8333
8334else
8335 cat >>confdefs.h <<_ACEOF
8336#define HAVE_DECL_VSNPRINTF 0
8337_ACEOF
8338
8339
abf6a75b
DD
8340fi
8341
8342
8343 echo "$as_me:$LINENO: checking whether calloc is declared" >&5
8344echo $ECHO_N "checking whether calloc is declared... $ECHO_C" >&6
8345if test "${ac_cv_have_decl_calloc+set}" = set; then
8346 echo $ECHO_N "(cached) $ECHO_C" >&6
8347else
8348 cat >conftest.$ac_ext <<_ACEOF
8349/* confdefs.h. */
8350_ACEOF
8351cat confdefs.h >>conftest.$ac_ext
8352cat >>conftest.$ac_ext <<_ACEOF
8353/* end confdefs.h. */
8354$ac_includes_default
8355int
8356main ()
8357{
8358#ifndef calloc
8359 char *p = (char *) calloc;
8360#endif
8361
8362 ;
8363 return 0;
8364}
8365_ACEOF
8366rm -f conftest.$ac_objext
8367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8368 (eval $ac_compile) 2>conftest.er1
8369 ac_status=$?
8370 grep -v '^ *+' conftest.er1 >conftest.err
8371 rm -f conftest.er1
8372 cat conftest.err >&5
8373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8374 (exit $ac_status); } &&
fd7d450d
DD
8375 { ac_try='test -z "$ac_c_werror_flag"
8376 || test ! -s conftest.err'
abf6a75b
DD
8377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8378 (eval $ac_try) 2>&5
8379 ac_status=$?
8380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8381 (exit $ac_status); }; } &&
8382 { ac_try='test -s conftest.$ac_objext'
8383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8384 (eval $ac_try) 2>&5
8385 ac_status=$?
8386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8387 (exit $ac_status); }; }; then
8388 ac_cv_have_decl_calloc=yes
8389else
8390 echo "$as_me: failed program was:" >&5
8391sed 's/^/| /' conftest.$ac_ext >&5
8392
8393ac_cv_have_decl_calloc=no
8394fi
8395rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8396fi
8397echo "$as_me:$LINENO: result: $ac_cv_have_decl_calloc" >&5
8398echo "${ECHO_T}$ac_cv_have_decl_calloc" >&6
8399if test $ac_cv_have_decl_calloc = yes; then
8400
8401cat >>confdefs.h <<_ACEOF
8402#define HAVE_DECL_CALLOC 1
8403_ACEOF
8404
8405
8406else
8407 cat >>confdefs.h <<_ACEOF
8408#define HAVE_DECL_CALLOC 0
8409_ACEOF
8410
8411
8412fi
8413echo "$as_me:$LINENO: checking whether getenv is declared" >&5
8414echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
8415if test "${ac_cv_have_decl_getenv+set}" = set; then
8416 echo $ECHO_N "(cached) $ECHO_C" >&6
8417else
8418 cat >conftest.$ac_ext <<_ACEOF
8419/* confdefs.h. */
8420_ACEOF
8421cat confdefs.h >>conftest.$ac_ext
8422cat >>conftest.$ac_ext <<_ACEOF
8423/* end confdefs.h. */
8424$ac_includes_default
8425int
8426main ()
8427{
8428#ifndef getenv
8429 char *p = (char *) getenv;
8430#endif
8431
8432 ;
8433 return 0;
8434}
8435_ACEOF
8436rm -f conftest.$ac_objext
8437if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8438 (eval $ac_compile) 2>conftest.er1
8439 ac_status=$?
8440 grep -v '^ *+' conftest.er1 >conftest.err
8441 rm -f conftest.er1
8442 cat conftest.err >&5
8443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8444 (exit $ac_status); } &&
fd7d450d
DD
8445 { ac_try='test -z "$ac_c_werror_flag"
8446 || test ! -s conftest.err'
abf6a75b
DD
8447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8448 (eval $ac_try) 2>&5
8449 ac_status=$?
8450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8451 (exit $ac_status); }; } &&
8452 { ac_try='test -s conftest.$ac_objext'
8453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8454 (eval $ac_try) 2>&5
8455 ac_status=$?
8456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8457 (exit $ac_status); }; }; then
8458 ac_cv_have_decl_getenv=yes
8459else
8460 echo "$as_me: failed program was:" >&5
8461sed 's/^/| /' conftest.$ac_ext >&5
8462
8463ac_cv_have_decl_getenv=no
8464fi
8465rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8466fi
8467echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
8468echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
8469if test $ac_cv_have_decl_getenv = yes; then
8470
8471cat >>confdefs.h <<_ACEOF
8472#define HAVE_DECL_GETENV 1
8473_ACEOF
8474
8475
8476else
8477 cat >>confdefs.h <<_ACEOF
8478#define HAVE_DECL_GETENV 0
8479_ACEOF
8480
8481
a4e5c0d8
DD
8482fi
8483echo "$as_me:$LINENO: checking whether getopt is declared" >&5
8484echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6
8485if test "${ac_cv_have_decl_getopt+set}" = set; then
8486 echo $ECHO_N "(cached) $ECHO_C" >&6
8487else
8488 cat >conftest.$ac_ext <<_ACEOF
8489/* confdefs.h. */
8490_ACEOF
8491cat confdefs.h >>conftest.$ac_ext
8492cat >>conftest.$ac_ext <<_ACEOF
8493/* end confdefs.h. */
8494$ac_includes_default
8495int
8496main ()
8497{
8498#ifndef getopt
8499 char *p = (char *) getopt;
8500#endif
8501
8502 ;
8503 return 0;
8504}
8505_ACEOF
8506rm -f conftest.$ac_objext
8507if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8508 (eval $ac_compile) 2>conftest.er1
8509 ac_status=$?
8510 grep -v '^ *+' conftest.er1 >conftest.err
8511 rm -f conftest.er1
8512 cat conftest.err >&5
8513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8514 (exit $ac_status); } &&
fd7d450d
DD
8515 { ac_try='test -z "$ac_c_werror_flag"
8516 || test ! -s conftest.err'
a4e5c0d8
DD
8517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8518 (eval $ac_try) 2>&5
8519 ac_status=$?
8520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8521 (exit $ac_status); }; } &&
8522 { ac_try='test -s conftest.$ac_objext'
8523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8524 (eval $ac_try) 2>&5
8525 ac_status=$?
8526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8527 (exit $ac_status); }; }; then
8528 ac_cv_have_decl_getopt=yes
8529else
8530 echo "$as_me: failed program was:" >&5
8531sed 's/^/| /' conftest.$ac_ext >&5
8532
8533ac_cv_have_decl_getopt=no
8534fi
8535rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8536fi
8537echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5
8538echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6
8539if test $ac_cv_have_decl_getopt = yes; then
8540
8541cat >>confdefs.h <<_ACEOF
8542#define HAVE_DECL_GETOPT 1
8543_ACEOF
8544
8545
8546else
8547 cat >>confdefs.h <<_ACEOF
8548#define HAVE_DECL_GETOPT 0
8549_ACEOF
8550
8551
abf6a75b
DD
8552fi
8553echo "$as_me:$LINENO: checking whether malloc is declared" >&5
8554echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
8555if test "${ac_cv_have_decl_malloc+set}" = set; then
8556 echo $ECHO_N "(cached) $ECHO_C" >&6
8557else
8558 cat >conftest.$ac_ext <<_ACEOF
8559/* confdefs.h. */
8560_ACEOF
8561cat confdefs.h >>conftest.$ac_ext
8562cat >>conftest.$ac_ext <<_ACEOF
8563/* end confdefs.h. */
8564$ac_includes_default
8565int
8566main ()
8567{
8568#ifndef malloc
8569 char *p = (char *) malloc;
8570#endif
8571
8572 ;
8573 return 0;
8574}
8575_ACEOF
8576rm -f conftest.$ac_objext
8577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8578 (eval $ac_compile) 2>conftest.er1
8579 ac_status=$?
8580 grep -v '^ *+' conftest.er1 >conftest.err
8581 rm -f conftest.er1
8582 cat conftest.err >&5
8583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8584 (exit $ac_status); } &&
fd7d450d
DD
8585 { ac_try='test -z "$ac_c_werror_flag"
8586 || test ! -s conftest.err'
abf6a75b
DD
8587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8588 (eval $ac_try) 2>&5
8589 ac_status=$?
8590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8591 (exit $ac_status); }; } &&
8592 { ac_try='test -s conftest.$ac_objext'
8593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8594 (eval $ac_try) 2>&5
8595 ac_status=$?
8596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8597 (exit $ac_status); }; }; then
8598 ac_cv_have_decl_malloc=yes
8599else
8600 echo "$as_me: failed program was:" >&5
8601sed 's/^/| /' conftest.$ac_ext >&5
8602
8603ac_cv_have_decl_malloc=no
8604fi
8605rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8606fi
8607echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
8608echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
8609if test $ac_cv_have_decl_malloc = yes; then
8610
8611cat >>confdefs.h <<_ACEOF
8612#define HAVE_DECL_MALLOC 1
8613_ACEOF
8614
8615
8616else
8617 cat >>confdefs.h <<_ACEOF
8618#define HAVE_DECL_MALLOC 0
8619_ACEOF
8620
8621
8622fi
8623echo "$as_me:$LINENO: checking whether realloc is declared" >&5
8624echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6
8625if test "${ac_cv_have_decl_realloc+set}" = set; then
8626 echo $ECHO_N "(cached) $ECHO_C" >&6
8627else
8628 cat >conftest.$ac_ext <<_ACEOF
8629/* confdefs.h. */
8630_ACEOF
8631cat confdefs.h >>conftest.$ac_ext
8632cat >>conftest.$ac_ext <<_ACEOF
8633/* end confdefs.h. */
8634$ac_includes_default
8635int
8636main ()
8637{
8638#ifndef realloc
8639 char *p = (char *) realloc;
8640#endif
8641
8642 ;
8643 return 0;
8644}
8645_ACEOF
8646rm -f conftest.$ac_objext
8647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8648 (eval $ac_compile) 2>conftest.er1
8649 ac_status=$?
8650 grep -v '^ *+' conftest.er1 >conftest.err
8651 rm -f conftest.er1
8652 cat conftest.err >&5
8653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8654 (exit $ac_status); } &&
fd7d450d
DD
8655 { ac_try='test -z "$ac_c_werror_flag"
8656 || test ! -s conftest.err'
abf6a75b
DD
8657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8658 (eval $ac_try) 2>&5
8659 ac_status=$?
8660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8661 (exit $ac_status); }; } &&
8662 { ac_try='test -s conftest.$ac_objext'
8663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8664 (eval $ac_try) 2>&5
8665 ac_status=$?
8666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8667 (exit $ac_status); }; }; then
8668 ac_cv_have_decl_realloc=yes
8669else
8670 echo "$as_me: failed program was:" >&5
8671sed 's/^/| /' conftest.$ac_ext >&5
8672
8673ac_cv_have_decl_realloc=no
8674fi
8675rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8676fi
8677echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5
8678echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6
8679if test $ac_cv_have_decl_realloc = yes; then
8680
8681cat >>confdefs.h <<_ACEOF
8682#define HAVE_DECL_REALLOC 1
8683_ACEOF
8684
8685
8686else
8687 cat >>confdefs.h <<_ACEOF
8688#define HAVE_DECL_REALLOC 0
8689_ACEOF
8690
8691
8692fi
8693echo "$as_me:$LINENO: checking whether sbrk is declared" >&5
8694echo $ECHO_N "checking whether sbrk is declared... $ECHO_C" >&6
8695if test "${ac_cv_have_decl_sbrk+set}" = set; then
8696 echo $ECHO_N "(cached) $ECHO_C" >&6
8697else
8698 cat >conftest.$ac_ext <<_ACEOF
8699/* confdefs.h. */
8700_ACEOF
8701cat confdefs.h >>conftest.$ac_ext
8702cat >>conftest.$ac_ext <<_ACEOF
8703/* end confdefs.h. */
8704$ac_includes_default
8705int
8706main ()
8707{
8708#ifndef sbrk
8709 char *p = (char *) sbrk;
8710#endif
8711
8712 ;
8713 return 0;
8714}
8715_ACEOF
8716rm -f conftest.$ac_objext
8717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8718 (eval $ac_compile) 2>conftest.er1
8719 ac_status=$?
8720 grep -v '^ *+' conftest.er1 >conftest.err
8721 rm -f conftest.er1
8722 cat conftest.err >&5
8723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8724 (exit $ac_status); } &&
fd7d450d
DD
8725 { ac_try='test -z "$ac_c_werror_flag"
8726 || test ! -s conftest.err'
abf6a75b
DD
8727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8728 (eval $ac_try) 2>&5
8729 ac_status=$?
8730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8731 (exit $ac_status); }; } &&
8732 { ac_try='test -s conftest.$ac_objext'
8733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8734 (eval $ac_try) 2>&5
8735 ac_status=$?
8736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8737 (exit $ac_status); }; }; then
8738 ac_cv_have_decl_sbrk=yes
8739else
8740 echo "$as_me: failed program was:" >&5
8741sed 's/^/| /' conftest.$ac_ext >&5
8742
8743ac_cv_have_decl_sbrk=no
8744fi
8745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8746fi
8747echo "$as_me:$LINENO: result: $ac_cv_have_decl_sbrk" >&5
8748echo "${ECHO_T}$ac_cv_have_decl_sbrk" >&6
8749if test $ac_cv_have_decl_sbrk = yes; then
8750
8751cat >>confdefs.h <<_ACEOF
8752#define HAVE_DECL_SBRK 1
8753_ACEOF
8754
8755
8756else
8757 cat >>confdefs.h <<_ACEOF
8758#define HAVE_DECL_SBRK 0
8759_ACEOF
8760
8761
67f3cb05
GK
8762fi
8763
8764
8765 echo "$as_me:$LINENO: checking whether strverscmp is declared" >&5
8766echo $ECHO_N "checking whether strverscmp is declared... $ECHO_C" >&6
8767if test "${ac_cv_have_decl_strverscmp+set}" = set; then
8768 echo $ECHO_N "(cached) $ECHO_C" >&6
8769else
8770 cat >conftest.$ac_ext <<_ACEOF
8771/* confdefs.h. */
8772_ACEOF
8773cat confdefs.h >>conftest.$ac_ext
8774cat >>conftest.$ac_ext <<_ACEOF
8775/* end confdefs.h. */
8776$ac_includes_default
8777int
8778main ()
8779{
8780#ifndef strverscmp
8781 char *p = (char *) strverscmp;
8782#endif
8783
8784 ;
8785 return 0;
8786}
8787_ACEOF
8788rm -f conftest.$ac_objext
8789if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8790 (eval $ac_compile) 2>conftest.er1
8791 ac_status=$?
8792 grep -v '^ *+' conftest.er1 >conftest.err
8793 rm -f conftest.er1
8794 cat conftest.err >&5
8795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8796 (exit $ac_status); } &&
fd7d450d
DD
8797 { ac_try='test -z "$ac_c_werror_flag"
8798 || test ! -s conftest.err'
67f3cb05
GK
8799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8800 (eval $ac_try) 2>&5
8801 ac_status=$?
8802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8803 (exit $ac_status); }; } &&
8804 { ac_try='test -s conftest.$ac_objext'
8805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8806 (eval $ac_try) 2>&5
8807 ac_status=$?
8808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8809 (exit $ac_status); }; }; then
8810 ac_cv_have_decl_strverscmp=yes
8811else
8812 echo "$as_me: failed program was:" >&5
8813sed 's/^/| /' conftest.$ac_ext >&5
8814
8815ac_cv_have_decl_strverscmp=no
8816fi
8817rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8818fi
8819echo "$as_me:$LINENO: result: $ac_cv_have_decl_strverscmp" >&5
8820echo "${ECHO_T}$ac_cv_have_decl_strverscmp" >&6
8821if test $ac_cv_have_decl_strverscmp = yes; then
8822
8823cat >>confdefs.h <<_ACEOF
8824#define HAVE_DECL_STRVERSCMP 1
8825_ACEOF
8826
8827
8828else
8829 cat >>confdefs.h <<_ACEOF
8830#define HAVE_DECL_STRVERSCMP 0
8831_ACEOF
8832
8833
fa99459d
DD
8834fi
8835
8836
2299a76d
DJ
8837 echo "$as_me:$LINENO: checking whether canonicalize_file_name must be declared" >&5
8838echo $ECHO_N "checking whether canonicalize_file_name must be declared... $ECHO_C" >&6
8839if test "${libiberty_cv_decl_needed_canonicalize_file_name+set}" = set; then
8840 echo $ECHO_N "(cached) $ECHO_C" >&6
ba61a412 8841else
2299a76d 8842 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
8843/* confdefs.h. */
8844_ACEOF
8845cat confdefs.h >>conftest.$ac_ext
8846cat >>conftest.$ac_ext <<_ACEOF
8847/* end confdefs.h. */
ba61a412
DJ
8848
8849#include "confdefs.h"
8850#include <stdio.h>
8851#ifdef HAVE_STRING_H
8852#include <string.h>
8853#else
8854#ifdef HAVE_STRINGS_H
8855#include <strings.h>
8856#endif
8857#endif
8858#ifdef HAVE_STDLIB_H
8859#include <stdlib.h>
8860#endif
8861#ifdef HAVE_UNISTD_H
8862#include <unistd.h>
8863#endif
2299a76d
DJ
8864int
8865main ()
8866{
ba61a412 8867char *(*pfn) = (char *(*)) canonicalize_file_name
2299a76d
DJ
8868 ;
8869 return 0;
8870}
8871_ACEOF
8872rm -f conftest.$ac_objext
8873if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 8874 (eval $ac_compile) 2>conftest.er1
2299a76d 8875 ac_status=$?
58670637
DD
8876 grep -v '^ *+' conftest.er1 >conftest.err
8877 rm -f conftest.er1
8878 cat conftest.err >&5
2299a76d
DJ
8879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8880 (exit $ac_status); } &&
fd7d450d
DD
8881 { ac_try='test -z "$ac_c_werror_flag"
8882 || test ! -s conftest.err'
58670637
DD
8883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8884 (eval $ac_try) 2>&5
8885 ac_status=$?
8886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8887 (exit $ac_status); }; } &&
8888 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
8889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8890 (eval $ac_try) 2>&5
8891 ac_status=$?
8892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8893 (exit $ac_status); }; }; then
ba61a412
DJ
8894 libiberty_cv_decl_needed_canonicalize_file_name=no
8895else
2299a76d
DJ
8896 echo "$as_me: failed program was:" >&5
8897sed 's/^/| /' conftest.$ac_ext >&5
8898
8899libiberty_cv_decl_needed_canonicalize_file_name=yes
ba61a412 8900fi
58670637 8901rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba61a412
DJ
8902fi
8903
2299a76d
DJ
8904echo "$as_me:$LINENO: result: $libiberty_cv_decl_needed_canonicalize_file_name" >&5
8905echo "${ECHO_T}$libiberty_cv_decl_needed_canonicalize_file_name" >&6
ba61a412 8906if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then
2299a76d
DJ
8907
8908cat >>confdefs.h <<\_ACEOF
ba61a412 8909#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
2299a76d 8910_ACEOF
ba61a412
DJ
8911
8912fi
8913
eb383413
L
8914fi
8915
5a17353c
DD
8916# Figure out which version of pexecute to use.
8917case "${host}" in
46a10049
DD
8918 *-*-mingw* | *-*-winnt*) pexecute=./pex-win32.o ;;
8919 *-*-msdosdjgpp*) pexecute=./pex-djgpp.o ;;
8920 *-*-msdos*) pexecute=./pex-msdos.o ;;
46a10049 8921 *) pexecute=./pex-unix.o ;;
5a17353c
DD
8922esac
8923
8924
2299a76d
DJ
8925if test x$gcc_no_link = xyes; then
8926 if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
8927 ac_cv_func_mmap_fixed_mapped=no
8928 fi
8929fi
67f3cb05 8930if test "x${ac_cv_func_mmap_fixed_mapped}" != xno; then
2299a76d
DJ
8931
8932
8933for ac_header in stdlib.h unistd.h
eb383413 8934do
2299a76d 8935as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8ddbb593 8936echo "$as_me:$LINENO: checking for $ac_header" >&5
2299a76d
DJ
8937echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8938if eval "test \"\${$as_ac_Header+set}\" = set"; then
8939 echo $ECHO_N "(cached) $ECHO_C" >&6
2299a76d 8940else
8ddbb593 8941 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
8942/* confdefs.h. */
8943_ACEOF
8944cat confdefs.h >>conftest.$ac_ext
8945cat >>conftest.$ac_ext <<_ACEOF
8946/* end confdefs.h. */
8947#include <$ac_header>
8948_ACEOF
8949if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8950 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8951 ac_status=$?
8952 grep -v '^ *+' conftest.er1 >conftest.err
8953 rm -f conftest.er1
8954 cat conftest.err >&5
8955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8956 (exit $ac_status); } >/dev/null; then
8957 if test -s conftest.err; then
8958 ac_cpp_err=$ac_c_preproc_warn_flag
58670637 8959 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2299a76d
DJ
8960 else
8961 ac_cpp_err=
8962 fi
8963else
8964 ac_cpp_err=yes
8965fi
8966if test -z "$ac_cpp_err"; then
8ddbb593 8967 eval "$as_ac_Header=yes"
2299a76d
DJ
8968else
8969 echo "$as_me: failed program was:" >&5
8970sed 's/^/| /' conftest.$ac_ext >&5
8971
8ddbb593 8972 eval "$as_ac_Header=no"
2299a76d
DJ
8973fi
8974rm -f conftest.err conftest.$ac_ext
eb383413 8975fi
2299a76d
DJ
8976echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8977echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2299a76d
DJ
8978if test `eval echo '${'$as_ac_Header'}'` = yes; then
8979 cat >>confdefs.h <<_ACEOF
8980#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8981_ACEOF
8982
eb383413
L
8983fi
8984done
8985
2299a76d 8986
eb383413
L
8987for ac_func in getpagesize
8988do
2299a76d
DJ
8989as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8990echo "$as_me:$LINENO: checking for $ac_func" >&5
8991echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8992if eval "test \"\${$as_ac_var+set}\" = set"; then
8993 echo $ECHO_N "(cached) $ECHO_C" >&6
8994else
8995 if test x$gcc_no_link = xyes; then
8996 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
8997echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
8998 { (exit 1); exit 1; }; }
8999fi
9000cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
9001/* confdefs.h. */
9002_ACEOF
9003cat confdefs.h >>conftest.$ac_ext
9004cat >>conftest.$ac_ext <<_ACEOF
9005/* end confdefs.h. */
252b5132 9006/* System header to define __stub macros and hopefully few prototypes,
2299a76d
DJ
9007 which can conflict with char $ac_func (); below.
9008 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
9009 <limits.h> exists even on freestanding compilers. Under hpux,
9010 including <limits.h> includes <sys/time.h> and causes problems
9011 checking for functions defined therein. */
9012#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
9013# include <limits.h>
9014#else
9015# include <assert.h>
9016#endif
252b5132 9017/* Override any gcc2 internal prototype to avoid an error. */
2299a76d
DJ
9018#ifdef __cplusplus
9019extern "C"
9020{
9021#endif
252b5132 9022/* We use char because int might match the return type of a gcc2
2299a76d
DJ
9023 builtin and then its argument prototype would still apply. */
9024char $ac_func ();
252b5132
RH
9025/* The GNU C library defines this for functions which it implements
9026 to always fail with ENOSYS. Some functions are actually named
9027 something starting with __ and the normal name is an alias. */
9028#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9029choke me
9030#else
2299a76d
DJ
9031char (*f) () = $ac_func;
9032#endif
9033#ifdef __cplusplus
9034}
252b5132
RH
9035#endif
9036
2299a76d
DJ
9037int
9038main ()
9039{
9040return f != $ac_func;
9041 ;
9042 return 0;
9043}
9044_ACEOF
9045rm -f conftest.$ac_objext conftest$ac_exeext
9046if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 9047 (eval $ac_link) 2>conftest.er1
2299a76d 9048 ac_status=$?
58670637
DD
9049 grep -v '^ *+' conftest.er1 >conftest.err
9050 rm -f conftest.er1
9051 cat conftest.err >&5
2299a76d
DJ
9052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9053 (exit $ac_status); } &&
fd7d450d
DD
9054 { ac_try='test -z "$ac_c_werror_flag"
9055 || test ! -s conftest.err'
58670637
DD
9056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9057 (eval $ac_try) 2>&5
9058 ac_status=$?
9059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9060 (exit $ac_status); }; } &&
9061 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
9062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9063 (eval $ac_try) 2>&5
9064 ac_status=$?
9065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9066 (exit $ac_status); }; }; then
9067 eval "$as_ac_var=yes"
9068else
9069 echo "$as_me: failed program was:" >&5
9070sed 's/^/| /' conftest.$ac_ext >&5
9071
9072eval "$as_ac_var=no"
9073fi
58670637
DD
9074rm -f conftest.err conftest.$ac_objext \
9075 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
9076fi
9077echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9078echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9079if test `eval echo '${'$as_ac_var'}'` = yes; then
9080 cat >>confdefs.h <<_ACEOF
9081#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9082_ACEOF
252b5132 9083
252b5132
RH
9084fi
9085done
9086
2299a76d
DJ
9087echo "$as_me:$LINENO: checking for working mmap" >&5
9088echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
9089if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9090 echo $ECHO_N "(cached) $ECHO_C" >&6
eb383413
L
9091else
9092 if test "$cross_compiling" = yes; then
9093 ac_cv_func_mmap_fixed_mapped=no
9094else
2299a76d 9095 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
9096/* confdefs.h. */
9097_ACEOF
9098cat confdefs.h >>conftest.$ac_ext
9099cat >>conftest.$ac_ext <<_ACEOF
9100/* end confdefs.h. */
9101$ac_includes_default
9102/* malloc might have been renamed as rpl_malloc. */
9103#undef malloc
eb383413
L
9104
9105/* Thanks to Mike Haertel and Jim Avera for this test.
9106 Here is a matrix of mmap possibilities:
9107 mmap private not fixed
9108 mmap private fixed at somewhere currently unmapped
9109 mmap private fixed at somewhere already mapped
9110 mmap shared not fixed
9111 mmap shared fixed at somewhere currently unmapped
9112 mmap shared fixed at somewhere already mapped
9113 For private mappings, we should verify that changes cannot be read()
9114 back from the file, nor mmap's back from the file at a different
9115 address. (There have been systems where private was not correctly
9116 implemented like the infamous i386 svr4.0, and systems where the
2299a76d 9117 VM page cache was not coherent with the file system buffer cache
eb383413
L
9118 like early versions of FreeBSD and possibly contemporary NetBSD.)
9119 For shared mappings, we should conversely verify that changes get
2299a76d 9120 propagated back to all the places they're supposed to be.
eb383413
L
9121
9122 Grep wants private fixed already mapped.
9123 The main things grep needs to know about mmap are:
9124 * does it exist and is it safe to write into the mmap'd area
9125 * how to use it (BSD variants) */
2299a76d 9126
eb383413
L
9127#include <fcntl.h>
9128#include <sys/mman.h>
9129
2299a76d
DJ
9130#if !STDC_HEADERS && !HAVE_STDLIB_H
9131char *malloc ();
5f73c378
DD
9132#endif
9133
eb383413 9134/* This mess was copied from the GNU getpagesize.h. */
2299a76d 9135#if !HAVE_GETPAGESIZE
eb383413 9136/* Assume that all systems that can run configure have sys/param.h. */
2299a76d 9137# if !HAVE_SYS_PARAM_H
eb383413
L
9138# define HAVE_SYS_PARAM_H 1
9139# endif
9140
9141# ifdef _SC_PAGESIZE
9142# define getpagesize() sysconf(_SC_PAGESIZE)
9143# else /* no _SC_PAGESIZE */
2299a76d 9144# if HAVE_SYS_PARAM_H
eb383413
L
9145# include <sys/param.h>
9146# ifdef EXEC_PAGESIZE
9147# define getpagesize() EXEC_PAGESIZE
9148# else /* no EXEC_PAGESIZE */
9149# ifdef NBPG
9150# define getpagesize() NBPG * CLSIZE
9151# ifndef CLSIZE
9152# define CLSIZE 1
9153# endif /* no CLSIZE */
9154# else /* no NBPG */
9155# ifdef NBPC
9156# define getpagesize() NBPC
9157# else /* no NBPC */
9158# ifdef PAGESIZE
9159# define getpagesize() PAGESIZE
9160# endif /* PAGESIZE */
9161# endif /* no NBPC */
9162# endif /* no NBPG */
9163# endif /* no EXEC_PAGESIZE */
9164# else /* no HAVE_SYS_PARAM_H */
9165# define getpagesize() 8192 /* punt totally */
9166# endif /* no HAVE_SYS_PARAM_H */
9167# endif /* no _SC_PAGESIZE */
9168
9169#endif /* no HAVE_GETPAGESIZE */
9170
eb383413 9171int
2299a76d 9172main ()
eb383413 9173{
2299a76d
DJ
9174 char *data, *data2, *data3;
9175 int i, pagesize;
9176 int fd;
eb383413 9177
2299a76d
DJ
9178 pagesize = getpagesize ();
9179
9180 /* First, make a file with some known garbage in it. */
9181 data = (char *) malloc (pagesize);
9182 if (!data)
9183 exit (1);
9184 for (i = 0; i < pagesize; ++i)
9185 *(data + i) = rand ();
9186 umask (0);
9187 fd = creat ("conftest.mmap", 0600);
9188 if (fd < 0)
9189 exit (1);
9190 if (write (fd, data, pagesize) != pagesize)
9191 exit (1);
9192 close (fd);
9193
9194 /* Next, try to mmap the file at a fixed address which already has
9195 something else allocated at it. If we can, also make sure that
9196 we see the same garbage. */
9197 fd = open ("conftest.mmap", O_RDWR);
9198 if (fd < 0)
9199 exit (1);
9200 data2 = (char *) malloc (2 * pagesize);
9201 if (!data2)
9202 exit (1);
58670637 9203 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
2299a76d 9204 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
58670637 9205 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2299a76d
DJ
9206 exit (1);
9207 for (i = 0; i < pagesize; ++i)
9208 if (*(data + i) != *(data2 + i))
9209 exit (1);
9210
9211 /* Finally, make sure that changes to the mapped area do not
9212 percolate back to the file as seen by read(). (This is a bug on
9213 some variants of i386 svr4.0.) */
9214 for (i = 0; i < pagesize; ++i)
9215 *(data2 + i) = *(data2 + i) + 1;
9216 data3 = (char *) malloc (pagesize);
9217 if (!data3)
9218 exit (1);
9219 if (read (fd, data3, pagesize) != pagesize)
9220 exit (1);
9221 for (i = 0; i < pagesize; ++i)
9222 if (*(data + i) != *(data3 + i))
9223 exit (1);
9224 close (fd);
9225 exit (0);
9226}
9227_ACEOF
9228rm -f conftest$ac_exeext
9229if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9230 (eval $ac_link) 2>&5
9231 ac_status=$?
9232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9233 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9235 (eval $ac_try) 2>&5
9236 ac_status=$?
9237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9238 (exit $ac_status); }; }; then
eb383413
L
9239 ac_cv_func_mmap_fixed_mapped=yes
9240else
2299a76d
DJ
9241 echo "$as_me: program exited with status $ac_status" >&5
9242echo "$as_me: failed program was:" >&5
9243sed 's/^/| /' conftest.$ac_ext >&5
9244
9245( exit $ac_status )
9246ac_cv_func_mmap_fixed_mapped=no
eb383413 9247fi
58670637 9248rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb383413 9249fi
eb383413 9250fi
2299a76d
DJ
9251echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
9252echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
eb383413 9253if test $ac_cv_func_mmap_fixed_mapped = yes; then
2299a76d
DJ
9254
9255cat >>confdefs.h <<\_ACEOF
eb383413 9256#define HAVE_MMAP 1
2299a76d 9257_ACEOF
eb383413 9258
252b5132 9259fi
2299a76d 9260rm -f conftest.mmap
252b5132 9261
2299a76d 9262fi
eb383413 9263
2299a76d
DJ
9264echo "$as_me:$LINENO: checking for working strncmp" >&5
9265echo $ECHO_N "checking for working strncmp... $ECHO_C" >&6
9266if test "${ac_cv_func_strncmp_works+set}" = set; then
9267 echo $ECHO_N "(cached) $ECHO_C" >&6
eb383413
L
9268else
9269 if test "$cross_compiling" = yes; then
9270 ac_cv_func_strncmp_works=no
9271else
2299a76d 9272 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
9273/* confdefs.h. */
9274_ACEOF
9275cat confdefs.h >>conftest.$ac_ext
9276cat >>conftest.$ac_ext <<_ACEOF
9277/* end confdefs.h. */
eb383413
L
9278
9279/* Test by Jim Wilson and Kaveh Ghazi.
9280 Check whether strncmp reads past the end of its string parameters. */
9281#include <sys/types.h>
9282
9283#ifdef HAVE_FCNTL_H
9284#include <fcntl.h>
9285#endif
9286
9287#ifdef HAVE_SYS_MMAN_H
9288#include <sys/mman.h>
9289#endif
9290
9291#ifndef MAP_ANON
9292#ifdef MAP_ANONYMOUS
9293#define MAP_ANON MAP_ANONYMOUS
9294#else
9295#define MAP_ANON MAP_FILE
9296#endif
9297#endif
9298
9299#ifndef MAP_FILE
9300#define MAP_FILE 0
9301#endif
9302#ifndef O_RDONLY
9303#define O_RDONLY 0
9304#endif
9305
9306#define MAP_LEN 0x10000
9307
9308main ()
9309{
9310#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
9311 char *p;
9312 int dev_zero;
9313
9314 dev_zero = open ("/dev/zero", O_RDONLY);
9315 if (dev_zero < 0)
9316 exit (1);
2299a76d 9317
eb383413
L
9318 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
9319 MAP_ANON|MAP_PRIVATE, dev_zero, 0);
f348a7b1
DD
9320 if (p == (char *)-1)
9321 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
9322 MAP_ANON|MAP_PRIVATE, -1, 0);
eb383413
L
9323 if (p == (char *)-1)
9324 exit (2);
9325 else
9326 {
9327 char *string = "__si_type_info";
9328 char *q = (char *) p + MAP_LEN - strlen (string) - 2;
9329 char *r = (char *) p + 0xe;
9330
9331 strcpy (q, string);
9332 strcpy (r, string);
9333 strncmp (r, q, 14);
9334 }
9335#endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */
9336 exit (0);
9337}
9338
2299a76d
DJ
9339_ACEOF
9340rm -f conftest$ac_exeext
9341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9342 (eval $ac_link) 2>&5
9343 ac_status=$?
9344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9347 (eval $ac_try) 2>&5
9348 ac_status=$?
9349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9350 (exit $ac_status); }; }; then
eb383413
L
9351 ac_cv_func_strncmp_works=yes
9352else
2299a76d
DJ
9353 echo "$as_me: program exited with status $ac_status" >&5
9354echo "$as_me: failed program was:" >&5
9355sed 's/^/| /' conftest.$ac_ext >&5
9356
9357( exit $ac_status )
9358ac_cv_func_strncmp_works=no
eb383413 9359fi
58670637 9360rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb383413 9361fi
eb383413
L
9362rm -f core core.* *.core
9363fi
2299a76d
DJ
9364echo "$as_me:$LINENO: result: $ac_cv_func_strncmp_works" >&5
9365echo "${ECHO_T}$ac_cv_func_strncmp_works" >&6
eb383413 9366if test $ac_cv_func_strncmp_works = no ; then
58670637
DD
9367 case $LIBOBJS in
9368 "strncmp.$ac_objext" | \
9369 *" strncmp.$ac_objext" | \
9370 "strncmp.$ac_objext "* | \
9371 *" strncmp.$ac_objext "* ) ;;
9372 *) LIBOBJS="$LIBOBJS strncmp.$ac_objext" ;;
9373esac
9374
eb383413
L
9375fi
9376
9377
252b5132
RH
9378# Install a library built with a cross compiler in $(tooldir) rather
9379# than $(libdir).
9380if test -z "${with_cross_host}"; then
9381 INSTALL_DEST=libdir
9382else
9383 INSTALL_DEST=tooldir
9384fi
9385
9386
11a338da
DD
9387
9388L=""
9389for l in x $LIBOBJS; do
9390 case $l in
9391 x) ;;
9392 *) L="$L ./$l" ;;
9393 esac
9394done
9395LIBOBJS="$L"
9396
545c9aee
DD
9397
9398
9399
9400
252b5132 9401# We need multilib support, but only if configuring for the target.
2299a76d 9402 ac_config_files="$ac_config_files Makefile testsuite/Makefile"
bb6a587d 9403
2299a76d 9404 ac_config_commands="$ac_config_commands default"
bb6a587d 9405
2299a76d 9406cat >confcache <<\_ACEOF
252b5132
RH
9407# This file is a shell script that caches the results of configure
9408# tests run on this system so they can be shared between configure
2299a76d
DJ
9409# scripts and configure runs, see configure's option --config-cache.
9410# It is not useful on other systems. If it contains results you don't
9411# want to keep, you may remove or edit it.
252b5132 9412#
2299a76d
DJ
9413# config.status only pays attention to the cache file if you give it
9414# the --recheck option to rerun configure.
252b5132 9415#
2299a76d
DJ
9416# `ac_cv_env_foo' variables (set or unset) will be overridden when
9417# loading this file, other *unset* `ac_cv_foo' will be assigned the
9418# following values.
9419
9420_ACEOF
9421
252b5132
RH
9422# The following way of writing the cache mishandles newlines in values,
9423# but we know of no workaround that is simple, portable, and efficient.
9424# So, don't put newlines in cache variables' values.
9425# Ultrix sh set writes to stderr and can't be redirected directly,
9426# and sets the high bit in the cache file unless we assign to the vars.
2299a76d
DJ
9427{
9428 (set) 2>&1 |
9429 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9430 *ac_space=\ *)
9431 # `set' does not quote correctly, so add quotes (double-quote
9432 # substitution turns \\\\ into \\, and sed turns \\ into \).
9433 sed -n \
58670637
DD
9434 "s/'/'\\\\''/g;
9435 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
2299a76d
DJ
9436 ;;
9437 *)
9438 # `set' quotes correctly as required by POSIX, so do not add quotes.
9439 sed -n \
58670637 9440 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
2299a76d
DJ
9441 ;;
9442 esac;
9443} |
9444 sed '
9445 t clear
9446 : clear
9447 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
9448 t end
9449 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
9450 : end' >>confcache
9451if diff $cache_file confcache >/dev/null 2>&1; then :; else
252b5132 9452 if test -w $cache_file; then
2299a76d
DJ
9453 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
9454 cat confcache >$cache_file
252b5132
RH
9455 else
9456 echo "not updating unwritable cache $cache_file"
9457 fi
9458fi
9459rm -f confcache
9460
252b5132
RH
9461test "x$prefix" = xNONE && prefix=$ac_default_prefix
9462# Let make expand exec_prefix.
9463test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9464
2299a76d
DJ
9465# VPATH may cause trouble with some makes, so we remove $(srcdir),
9466# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
9467# trailing colons and then remove the whole line if VPATH becomes empty
9468# (actually we leave an empty line to preserve line numbers).
252b5132 9469if test "x$srcdir" = x.; then
58670637 9470 ac_vpsub='/^[ ]*VPATH[ ]*=/{
2299a76d
DJ
9471s/:*\$(srcdir):*/:/;
9472s/:*\${srcdir}:*/:/;
9473s/:*@srcdir@:*/:/;
58670637 9474s/^\([^=]*=[ ]*\):*/\1/;
2299a76d 9475s/:*$//;
58670637 9476s/^[^=]*=[ ]*$//;
2299a76d 9477}'
252b5132
RH
9478fi
9479
252b5132
RH
9480DEFS=-DHAVE_CONFIG_H
9481
2299a76d
DJ
9482ac_libobjs=
9483ac_ltlibobjs=
9484for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
9485 # 1. Remove the extension, and $U if already installed.
9486 ac_i=`echo "$ac_i" |
58670637 9487 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
2299a76d
DJ
9488 # 2. Add them.
9489 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
9490 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
9491done
9492LIBOBJS=$ac_libobjs
252b5132 9493
2299a76d
DJ
9494LTLIBOBJS=$ac_ltlibobjs
9495
9496
9497
9498: ${CONFIG_STATUS=./config.status}
9499ac_clean_files_save=$ac_clean_files
9500ac_clean_files="$ac_clean_files $CONFIG_STATUS"
9501{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
9502echo "$as_me: creating $CONFIG_STATUS" >&6;}
9503cat >$CONFIG_STATUS <<_ACEOF
9504#! $SHELL
9505# Generated by $as_me.
252b5132 9506# Run this file to recreate the current configuration.
252b5132 9507# Compiler output produced by configure, useful for debugging
2299a76d 9508# configure, is in config.log if it exists.
252b5132 9509
2299a76d
DJ
9510debug=false
9511ac_cs_recheck=false
9512ac_cs_silent=false
9513SHELL=\${CONFIG_SHELL-$SHELL}
9514_ACEOF
9515
9516cat >>$CONFIG_STATUS <<\_ACEOF
9517## --------------------- ##
9518## M4sh Initialization. ##
9519## --------------------- ##
9520
9521# Be Bourne compatible
9522if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
9523 emulate sh
9524 NULLCMD=:
9525 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
9526 # is contrary to our usage. Disable this feature.
9527 alias -g '${1+"$@"}'='"$@"'
9528elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
9529 set -o posix
9530fi
58670637 9531DUALCASE=1; export DUALCASE # for MKS sh
2299a76d
DJ
9532
9533# Support unset when possible.
58670637 9534if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
2299a76d
DJ
9535 as_unset=unset
9536else
9537 as_unset=false
9538fi
9539
9540
9541# Work around bugs in pre-3.0 UWIN ksh.
9542$as_unset ENV MAIL MAILPATH
9543PS1='$ '
9544PS2='> '
9545PS4='+ '
9546
9547# NLS nuisances.
9548for as_var in \
9549 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
9550 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
9551 LC_TELEPHONE LC_TIME
252b5132 9552do
58670637 9553 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
2299a76d
DJ
9554 eval $as_var=C; export $as_var
9555 else
9556 $as_unset $as_var
9557 fi
252b5132
RH
9558done
9559
2299a76d
DJ
9560# Required to use basename.
9561if expr a : '\(a\)' >/dev/null 2>&1; then
9562 as_expr=expr
9563else
9564 as_expr=false
9565fi
252b5132 9566
2299a76d
DJ
9567if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
9568 as_basename=basename
9569else
9570 as_basename=false
9571fi
252b5132 9572
252b5132 9573
2299a76d
DJ
9574# Name of the executable.
9575as_me=`$as_basename "$0" ||
9576$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9577 X"$0" : 'X\(//\)$' \| \
9578 X"$0" : 'X\(/\)$' \| \
9579 . : '\(.\)' 2>/dev/null ||
9580echo X/"$0" |
9581 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
9582 /^X\/\(\/\/\)$/{ s//\1/; q; }
9583 /^X\/\(\/\).*/{ s//\1/; q; }
9584 s/.*/./; q'`
9585
9586
9587# PATH needs CR, and LINENO needs CR and PATH.
9588# Avoid depending upon Character Ranges.
9589as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9590as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9591as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9592as_cr_digits='0123456789'
9593as_cr_alnum=$as_cr_Letters$as_cr_digits
252b5132 9594
2299a76d
DJ
9595# The user is always right.
9596if test "${PATH_SEPARATOR+set}" != set; then
9597 echo "#! /bin/sh" >conf$$.sh
9598 echo "exit 0" >>conf$$.sh
9599 chmod +x conf$$.sh
9600 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
9601 PATH_SEPARATOR=';'
252b5132 9602 else
2299a76d 9603 PATH_SEPARATOR=:
252b5132 9604 fi
2299a76d
DJ
9605 rm -f conf$$.sh
9606fi
9607
9608
9609 as_lineno_1=$LINENO
9610 as_lineno_2=$LINENO
9611 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
9612 test "x$as_lineno_1" != "x$as_lineno_2" &&
9613 test "x$as_lineno_3" = "x$as_lineno_2" || {
9614 # Find who we are. Look in the path if we contain no path at all
9615 # relative or not.
9616 case $0 in
9617 *[\\/]* ) as_myself=$0 ;;
9618 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9619for as_dir in $PATH
9620do
9621 IFS=$as_save_IFS
9622 test -z "$as_dir" && as_dir=.
9623 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
9624done
9625
9626 ;;
9627 esac
9628 # We did not find ourselves, most probably we were run as `sh COMMAND'
9629 # in which case we are not to be found in the path.
9630 if test "x$as_myself" = x; then
9631 as_myself=$0
9632 fi
9633 if test ! -f "$as_myself"; then
9634 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
9635echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
9636 { (exit 1); exit 1; }; }
9637 fi
9638 case $CONFIG_SHELL in
9639 '')
9640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9641for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
9642do
9643 IFS=$as_save_IFS
9644 test -z "$as_dir" && as_dir=.
9645 for as_base in sh bash ksh sh5; do
9646 case $as_dir in
9647 /*)
9648 if ("$as_dir/$as_base" -c '
9649 as_lineno_1=$LINENO
9650 as_lineno_2=$LINENO
9651 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
9652 test "x$as_lineno_1" != "x$as_lineno_2" &&
9653 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
9654 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
9655 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
9656 CONFIG_SHELL=$as_dir/$as_base
9657 export CONFIG_SHELL
9658 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
9659 fi;;
9660 esac
9661 done
9662done
9663;;
9664 esac
9665
9666 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
9667 # uniformly replaced by the line number. The first 'sed' inserts a
9668 # line-number line before each line; the second 'sed' does the real
9669 # work. The second script uses 'N' to pair each line-number line
9670 # with the numbered line, and appends trailing '-' during
9671 # substitution so that $LINENO is not a special case at line end.
9672 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
9673 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
9674 sed '=' <$as_myself |
9675 sed '
9676 N
9677 s,$,-,
9678 : loop
9679 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
9680 t loop
9681 s,-$,,
9682 s,^['$as_cr_digits']*\n,,
9683 ' >$as_me.lineno &&
9684 chmod +x $as_me.lineno ||
9685 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
9686echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
9687 { (exit 1); exit 1; }; }
9688
9689 # Don't try to exec as it changes $[0], causing all sort of problems
9690 # (the dirname of $[0] is not the place where we might find the
9691 # original and so on. Autoconf is especially sensible to this).
9692 . ./$as_me.lineno
9693 # Exit status is that of the last command.
9694 exit
9695}
9696
9697
9698case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
9699 *c*,-n*) ECHO_N= ECHO_C='
9700' ECHO_T=' ' ;;
9701 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
9702 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
9703esac
9704
9705if expr a : '\(a\)' >/dev/null 2>&1; then
9706 as_expr=expr
9707else
9708 as_expr=false
9709fi
9710
9711rm -f conf$$ conf$$.exe conf$$.file
9712echo >conf$$.file
9713if ln -s conf$$.file conf$$ 2>/dev/null; then
9714 # We could just check for DJGPP; but this test a) works b) is more generic
9715 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
9716 if test -f conf$$.exe; then
9717 # Don't use ln at all; we don't have any links
9718 as_ln_s='cp -p'
252b5132 9719 else
2299a76d 9720 as_ln_s='ln -s'
252b5132 9721 fi
2299a76d
DJ
9722elif ln conf$$.file conf$$ 2>/dev/null; then
9723 as_ln_s=ln
9724else
9725 as_ln_s='cp -p'
9726fi
9727rm -f conf$$ conf$$.exe conf$$.file
9728
9729if mkdir -p . 2>/dev/null; then
9730 as_mkdir_p=:
9731else
58670637 9732 test -d ./-p && rmdir ./-p
2299a76d
DJ
9733 as_mkdir_p=false
9734fi
9735
9736as_executable_p="test -f"
9737
9738# Sed expression to map a string onto a valid CPP name.
58670637 9739as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
2299a76d
DJ
9740
9741# Sed expression to map a string onto a valid variable name.
58670637 9742as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
2299a76d
DJ
9743
9744
9745# IFS
9746# We need space, tab and new line, in precisely that order.
9747as_nl='
9748'
9749IFS=" $as_nl"
9750
9751# CDPATH.
9752$as_unset CDPATH
9753
9754exec 6>&1
9755
9756# Open the log real soon, to keep \$[0] and so on meaningful, and to
9757# report actual input values of CONFIG_FILES etc. instead of their
9758# values after options handling. Logging --version etc. is OK.
9759exec 5>>config.log
9760{
9761 echo
9762 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
9763## Running $as_me. ##
9764_ASBOX
9765} >&5
9766cat >&5 <<_CSEOF
9767
9768This file was extended by $as_me, which was
85f969cd 9769generated by GNU Autoconf 2.59. Invocation command line was
2299a76d
DJ
9770
9771 CONFIG_FILES = $CONFIG_FILES
9772 CONFIG_HEADERS = $CONFIG_HEADERS
9773 CONFIG_LINKS = $CONFIG_LINKS
9774 CONFIG_COMMANDS = $CONFIG_COMMANDS
9775 $ $0 $@
9776
9777_CSEOF
9778echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
9779echo >&5
9780_ACEOF
9781
9782# Files that config.status was made for.
9783if test -n "$ac_config_files"; then
9784 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
9785fi
9786
9787if test -n "$ac_config_headers"; then
9788 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
9789fi
9790
9791if test -n "$ac_config_links"; then
9792 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
9793fi
9794
9795if test -n "$ac_config_commands"; then
9796 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
9797fi
9798
9799cat >>$CONFIG_STATUS <<\_ACEOF
9800
9801ac_cs_usage="\
9802\`$as_me' instantiates files from templates according to the
9803current configuration.
9804
9805Usage: $0 [OPTIONS] [FILE]...
9806
9807 -h, --help print this help, then exit
9808 -V, --version print version number, then exit
9809 -q, --quiet do not print progress messages
9810 -d, --debug don't remove temporary files
9811 --recheck update $as_me by reconfiguring in the same conditions
9812 --file=FILE[:TEMPLATE]
58670637 9813 instantiate the configuration file FILE
2299a76d 9814 --header=FILE[:TEMPLATE]
58670637 9815 instantiate the configuration header FILE
2299a76d
DJ
9816
9817Configuration files:
9818$config_files
9819
9820Configuration headers:
9821$config_headers
9822
9823Configuration commands:
9824$config_commands
9825
9826Report bugs to <bug-autoconf@gnu.org>."
9827_ACEOF
9828
9829cat >>$CONFIG_STATUS <<_ACEOF
9830ac_cs_version="\\
9831config.status
85f969cd 9832configured by $0, generated by GNU Autoconf 2.59,
2299a76d
DJ
9833 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
9834
58670637 9835Copyright (C) 2003 Free Software Foundation, Inc.
2299a76d
DJ
9836This config.status script is free software; the Free Software Foundation
9837gives unlimited permission to copy, distribute and modify it."
9838srcdir=$srcdir
9839INSTALL="$INSTALL"
9840_ACEOF
9841
9842cat >>$CONFIG_STATUS <<\_ACEOF
9843# If no file are specified by the user, then we need to provide default
9844# value. By we need to know if files were specified by the user.
9845ac_need_defaults=:
9846while test $# != 0
9847do
9848 case $1 in
9849 --*=*)
9850 ac_option=`expr "x$1" : 'x\([^=]*\)='`
9851 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
9852 ac_shift=:
9853 ;;
9854 -*)
9855 ac_option=$1
9856 ac_optarg=$2
9857 ac_shift=shift
9858 ;;
9859 *) # This is not an option, so the user has probably given explicit
9860 # arguments.
9861 ac_option=$1
9862 ac_need_defaults=false;;
9863 esac
9864
9865 case $ac_option in
9866 # Handling of the options.
9867_ACEOF
9868cat >>$CONFIG_STATUS <<\_ACEOF
9869 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9870 ac_cs_recheck=: ;;
9871 --version | --vers* | -V )
9872 echo "$ac_cs_version"; exit 0 ;;
9873 --he | --h)
9874 # Conflict between --help and --header
9875 { { echo "$as_me:$LINENO: error: ambiguous option: $1
9876Try \`$0 --help' for more information." >&5
9877echo "$as_me: error: ambiguous option: $1
9878Try \`$0 --help' for more information." >&2;}
9879 { (exit 1); exit 1; }; };;
9880 --help | --hel | -h )
9881 echo "$ac_cs_usage"; exit 0 ;;
9882 --debug | --d* | -d )
9883 debug=: ;;
9884 --file | --fil | --fi | --f )
9885 $ac_shift
9886 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
9887 ac_need_defaults=false;;
9888 --header | --heade | --head | --hea )
9889 $ac_shift
9890 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
9891 ac_need_defaults=false;;
9892 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
9893 | -silent | --silent | --silen | --sile | --sil | --si | --s)
9894 ac_cs_silent=: ;;
9895
9896 # This is an error.
9897 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
9898Try \`$0 --help' for more information." >&5
9899echo "$as_me: error: unrecognized option: $1
9900Try \`$0 --help' for more information." >&2;}
9901 { (exit 1); exit 1; }; } ;;
9902
9903 *) ac_config_targets="$ac_config_targets $1" ;;
9904
9905 esac
9906 shift
252b5132 9907done
2299a76d
DJ
9908
9909ac_configure_extra_args=
9910
9911if $ac_cs_silent; then
9912 exec 6>/dev/null
9913 ac_configure_extra_args="$ac_configure_extra_args --silent"
252b5132 9914fi
252b5132 9915
2299a76d
DJ
9916_ACEOF
9917cat >>$CONFIG_STATUS <<_ACEOF
9918if \$ac_cs_recheck; then
9919 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
9920 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
9921fi
252b5132 9922
2299a76d
DJ
9923_ACEOF
9924
9925cat >>$CONFIG_STATUS <<_ACEOF
9926#
9927# INIT-COMMANDS section.
9928#
9929
9930srcdir=${srcdir}
9931host=${host}
9932target=${target}
9933with_target_subdir=${with_target_subdir}
2299a76d
DJ
9934with_multisubdir=${with_multisubdir}
9935ac_configure_args="--enable-multilib ${ac_configure_args}"
9936CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
9937ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
9938libiberty_topdir=${libiberty_topdir}
9939
9940
9941_ACEOF
9942
9943
9944
9945cat >>$CONFIG_STATUS <<\_ACEOF
9946for ac_config_target in $ac_config_targets
9947do
9948 case "$ac_config_target" in
9949 # Handling of arguments.
9950 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
9951 "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
9952 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
9953 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
9954 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
9955echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
9956 { (exit 1); exit 1; }; };;
252b5132 9957 esac
2299a76d 9958done
252b5132 9959
2299a76d
DJ
9960# If the user did not use the arguments to specify the items to instantiate,
9961# then the envvar interface is used. Set only those that are not.
9962# We use the long form for the default assignment because of an extremely
9963# bizarre bug on SunOS 4.1.3.
9964if $ac_need_defaults; then
9965 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
9966 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
9967 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
9968fi
9969
9970# Have a temporary directory for convenience. Make it in the build tree
9971# simply because there is no reason to put it here, and in addition,
9972# creating and moving files from /tmp can sometimes cause problems.
9973# Create a temporary directory, and hook for its removal unless debugging.
9974$debug ||
9975{
9976 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
9977 trap '{ (exit 1); exit 1; }' 1 2 13 15
9978}
252b5132 9979
2299a76d
DJ
9980# Create a (secure) tmp directory for tmp files.
9981
9982{
9983 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
9984 test -n "$tmp" && test -d "$tmp"
9985} ||
9986{
9987 tmp=./confstat$$-$RANDOM
9988 (umask 077 && mkdir $tmp)
9989} ||
9990{
9991 echo "$me: cannot create a temporary directory in ." >&2
9992 { (exit 1); exit 1; }
9993}
9994
9995_ACEOF
9996
9997cat >>$CONFIG_STATUS <<_ACEOF
9998
9999#
10000# CONFIG_FILES section.
10001#
10002
10003# No need to generate the scripts if there are no CONFIG_FILES.
10004# This happens for instance when ./config.status config.h
10005if test -n "\$CONFIG_FILES"; then
10006 # Protect against being on the right side of a sed subst in config.status.
10007 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
10008 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
10009s,@SHELL@,$SHELL,;t t
10010s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
10011s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
10012s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
10013s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
10014s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
10015s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
10016s,@exec_prefix@,$exec_prefix,;t t
10017s,@prefix@,$prefix,;t t
10018s,@program_transform_name@,$program_transform_name,;t t
10019s,@bindir@,$bindir,;t t
10020s,@sbindir@,$sbindir,;t t
10021s,@libexecdir@,$libexecdir,;t t
10022s,@datadir@,$datadir,;t t
10023s,@sysconfdir@,$sysconfdir,;t t
10024s,@sharedstatedir@,$sharedstatedir,;t t
10025s,@localstatedir@,$localstatedir,;t t
10026s,@libdir@,$libdir,;t t
10027s,@includedir@,$includedir,;t t
10028s,@oldincludedir@,$oldincludedir,;t t
10029s,@infodir@,$infodir,;t t
10030s,@mandir@,$mandir,;t t
10031s,@build_alias@,$build_alias,;t t
10032s,@host_alias@,$host_alias,;t t
10033s,@target_alias@,$target_alias,;t t
10034s,@DEFS@,$DEFS,;t t
10035s,@ECHO_C@,$ECHO_C,;t t
10036s,@ECHO_N@,$ECHO_N,;t t
10037s,@ECHO_T@,$ECHO_T,;t t
10038s,@LIBS@,$LIBS,;t t
10039s,@libiberty_topdir@,$libiberty_topdir,;t t
10040s,@MAINT@,$MAINT,;t t
10041s,@NOTMAINT@,$NOTMAINT,;t t
10042s,@MAKEINFO@,$MAKEINFO,;t t
10043s,@BUILD_INFO@,$BUILD_INFO,;t t
10044s,@PERL@,$PERL,;t t
10045s,@HAVE_PERL@,$HAVE_PERL,;t t
10046s,@build@,$build,;t t
10047s,@build_cpu@,$build_cpu,;t t
10048s,@build_vendor@,$build_vendor,;t t
10049s,@build_os@,$build_os,;t t
10050s,@host@,$host,;t t
10051s,@host_cpu@,$host_cpu,;t t
10052s,@host_vendor@,$host_vendor,;t t
10053s,@host_os@,$host_os,;t t
10054s,@AR@,$AR,;t t
10055s,@ac_ct_AR@,$ac_ct_AR,;t t
10056s,@RANLIB@,$RANLIB,;t t
10057s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
10058s,@CC@,$CC,;t t
10059s,@CFLAGS@,$CFLAGS,;t t
10060s,@LDFLAGS@,$LDFLAGS,;t t
10061s,@CPPFLAGS@,$CPPFLAGS,;t t
10062s,@ac_ct_CC@,$ac_ct_CC,;t t
10063s,@EXEEXT@,$EXEEXT,;t t
10064s,@OBJEXT@,$OBJEXT,;t t
8ddbb593 10065s,@CPP@,$CPP,;t t
11a338da 10066s,@ac_libiberty_warn_cflags@,$ac_libiberty_warn_cflags,;t t
46a10049
DD
10067s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
10068s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
2299a76d
DJ
10069s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
10070s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
10071s,@INSTALL_DATA@,$INSTALL_DATA,;t t
c779bab8 10072s,@PICFLAG@,$PICFLAG,;t t
2299a76d
DJ
10073s,@EGREP@,$EGREP,;t t
10074s,@LIBOBJS@,$LIBOBJS,;t t
10075s,@CHECK@,$CHECK,;t t
10076s,@target_header_dir@,$target_header_dir,;t t
10077s,@pexecute@,$pexecute,;t t
10078s,@INSTALL_DEST@,$INSTALL_DEST,;t t
545c9aee
DD
10079s,@datarootdir@,$datarootdir,;t t
10080s,@docdir@,$docdir,;t t
10081s,@htmldir@,$htmldir,;t t
2299a76d
DJ
10082s,@LTLIBOBJS@,$LTLIBOBJS,;t t
10083/@host_makefile_frag@/r $host_makefile_frag
10084s,@host_makefile_frag@,,;t t
10085CEOF
10086
10087_ACEOF
10088
10089 cat >>$CONFIG_STATUS <<\_ACEOF
10090 # Split the substitutions into bite-sized pieces for seds with
10091 # small command number limits, like on Digital OSF/1 and HP-UX.
10092 ac_max_sed_lines=48
10093 ac_sed_frag=1 # Number of current file.
10094 ac_beg=1 # First line for current file.
10095 ac_end=$ac_max_sed_lines # Line after last line for current file.
10096 ac_more_lines=:
10097 ac_sed_cmds=
10098 while $ac_more_lines; do
10099 if test $ac_beg -gt 1; then
10100 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
10101 else
10102 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
10103 fi
10104 if test ! -s $tmp/subs.frag; then
10105 ac_more_lines=false
10106 else
10107 # The purpose of the label and of the branching condition is to
10108 # speed up the sed processing (if there are no `@' at all, there
10109 # is no need to browse any of the substitutions).
10110 # These are the two extra sed commands mentioned above.
10111 (echo ':t
10112 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
10113 if test -z "$ac_sed_cmds"; then
58670637 10114 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
2299a76d 10115 else
58670637 10116 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
2299a76d
DJ
10117 fi
10118 ac_sed_frag=`expr $ac_sed_frag + 1`
10119 ac_beg=$ac_end
10120 ac_end=`expr $ac_end + $ac_max_sed_lines`
10121 fi
10122 done
10123 if test -z "$ac_sed_cmds"; then
10124 ac_sed_cmds=cat
252b5132 10125 fi
2299a76d 10126fi # test -n "$CONFIG_FILES"
252b5132 10127
2299a76d
DJ
10128_ACEOF
10129cat >>$CONFIG_STATUS <<\_ACEOF
10130for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
10131 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10132 case $ac_file in
10133 - | *:- | *:-:* ) # input from stdin
58670637
DD
10134 cat >$tmp/stdin
10135 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
10136 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
2299a76d 10137 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
58670637 10138 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
2299a76d 10139 * ) ac_file_in=$ac_file.in ;;
252b5132
RH
10140 esac
10141
2299a76d
DJ
10142 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
10143 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
10144$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58670637
DD
10145 X"$ac_file" : 'X\(//\)[^/]' \| \
10146 X"$ac_file" : 'X\(//\)$' \| \
10147 X"$ac_file" : 'X\(/\)' \| \
10148 . : '\(.\)' 2>/dev/null ||
2299a76d
DJ
10149echo X"$ac_file" |
10150 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10151 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10152 /^X\(\/\/\)$/{ s//\1/; q; }
10153 /^X\(\/\).*/{ s//\1/; q; }
10154 s/.*/./; q'`
10155 { if $as_mkdir_p; then
10156 mkdir -p "$ac_dir"
10157 else
10158 as_dir="$ac_dir"
10159 as_dirs=
10160 while test ! -d "$as_dir"; do
10161 as_dirs="$as_dir $as_dirs"
10162 as_dir=`(dirname "$as_dir") 2>/dev/null ||
10163$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58670637
DD
10164 X"$as_dir" : 'X\(//\)[^/]' \| \
10165 X"$as_dir" : 'X\(//\)$' \| \
10166 X"$as_dir" : 'X\(/\)' \| \
10167 . : '\(.\)' 2>/dev/null ||
2299a76d
DJ
10168echo X"$as_dir" |
10169 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10170 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10171 /^X\(\/\/\)$/{ s//\1/; q; }
10172 /^X\(\/\).*/{ s//\1/; q; }
10173 s/.*/./; q'`
10174 done
10175 test ! -n "$as_dirs" || mkdir $as_dirs
10176 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
10177echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
10178 { (exit 1); exit 1; }; }; }
10179
10180 ac_builddir=.
252b5132 10181
2299a76d
DJ
10182if test "$ac_dir" != .; then
10183 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
10184 # A "../" for each directory in $ac_dir_suffix.
10185 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
10186else
10187 ac_dir_suffix= ac_top_builddir=
10188fi
10189
10190case $srcdir in
10191 .) # No --srcdir option. We are building in place.
10192 ac_srcdir=.
10193 if test -z "$ac_top_builddir"; then
10194 ac_top_srcdir=.
10195 else
10196 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
10197 fi ;;
10198 [\\/]* | ?:[\\/]* ) # Absolute path.
10199 ac_srcdir=$srcdir$ac_dir_suffix;
10200 ac_top_srcdir=$srcdir ;;
10201 *) # Relative path.
10202 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
10203 ac_top_srcdir=$ac_top_builddir$srcdir ;;
10204esac
85f969cd
DD
10205
10206# Do not use `cd foo && pwd` to compute absolute paths, because
10207# the directories may not exist.
10208case `pwd` in
10209.) ac_abs_builddir="$ac_dir";;
58670637 10210*)
85f969cd
DD
10211 case "$ac_dir" in
10212 .) ac_abs_builddir=`pwd`;;
10213 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
10214 *) ac_abs_builddir=`pwd`/"$ac_dir";;
58670637
DD
10215 esac;;
10216esac
85f969cd 10217case $ac_abs_builddir in
58670637
DD
10218.) ac_abs_top_builddir=${ac_top_builddir}.;;
10219*)
10220 case ${ac_top_builddir}. in
85f969cd 10221 .) ac_abs_top_builddir=$ac_abs_builddir;;
58670637 10222 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
85f969cd 10223 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
58670637
DD
10224 esac;;
10225esac
85f969cd 10226case $ac_abs_builddir in
58670637
DD
10227.) ac_abs_srcdir=$ac_srcdir;;
10228*)
10229 case $ac_srcdir in
85f969cd 10230 .) ac_abs_srcdir=$ac_abs_builddir;;
58670637 10231 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
85f969cd 10232 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
58670637
DD
10233 esac;;
10234esac
85f969cd 10235case $ac_abs_builddir in
58670637
DD
10236.) ac_abs_top_srcdir=$ac_top_srcdir;;
10237*)
10238 case $ac_top_srcdir in
85f969cd 10239 .) ac_abs_top_srcdir=$ac_abs_builddir;;
58670637 10240 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
85f969cd 10241 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
58670637
DD
10242 esac;;
10243esac
2299a76d
DJ
10244
10245
10246 case $INSTALL in
10247 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
10248 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
252b5132
RH
10249 esac
10250
fd7d450d
DD
10251 if test x"$ac_file" != x-; then
10252 { echo "$as_me:$LINENO: creating $ac_file" >&5
10253echo "$as_me: creating $ac_file" >&6;}
10254 rm -f "$ac_file"
10255 fi
2299a76d
DJ
10256 # Let's still pretend it is `configure' which instantiates (i.e., don't
10257 # use $as_me), people would be surprised to read:
10258 # /* config.h. Generated by config.status. */
10259 if test x"$ac_file" = x-; then
10260 configure_input=
10261 else
10262 configure_input="$ac_file. "
10263 fi
10264 configure_input=$configure_input"Generated from `echo $ac_file_in |
58670637 10265 sed 's,.*/,,'` by configure."
2299a76d
DJ
10266
10267 # First look for the input files in the build tree, otherwise in the
10268 # src tree.
10269 ac_file_inputs=`IFS=:
10270 for f in $ac_file_in; do
10271 case $f in
10272 -) echo $tmp/stdin ;;
10273 [\\/$]*)
58670637
DD
10274 # Absolute (can't be DOS-style, as IFS=:)
10275 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
2299a76d
DJ
10276echo "$as_me: error: cannot find input file: $f" >&2;}
10277 { (exit 1); exit 1; }; }
58670637 10278 echo "$f";;
2299a76d 10279 *) # Relative
58670637
DD
10280 if test -f "$f"; then
10281 # Build tree
10282 echo "$f"
10283 elif test -f "$srcdir/$f"; then
10284 # Source tree
10285 echo "$srcdir/$f"
10286 else
10287 # /dev/null tree
10288 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
2299a76d
DJ
10289echo "$as_me: error: cannot find input file: $f" >&2;}
10290 { (exit 1); exit 1; }; }
58670637 10291 fi;;
2299a76d
DJ
10292 esac
10293 done` || { (exit 1); exit 1; }
10294_ACEOF
10295cat >>$CONFIG_STATUS <<_ACEOF
10296 sed "$ac_vpsub
10297$extrasub
10298_ACEOF
10299cat >>$CONFIG_STATUS <<\_ACEOF
10300:t
10301/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
10302s,@configure_input@,$configure_input,;t t
10303s,@srcdir@,$ac_srcdir,;t t
10304s,@abs_srcdir@,$ac_abs_srcdir,;t t
10305s,@top_srcdir@,$ac_top_srcdir,;t t
10306s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
10307s,@builddir@,$ac_builddir,;t t
10308s,@abs_builddir@,$ac_abs_builddir,;t t
10309s,@top_builddir@,$ac_top_builddir,;t t
10310s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
10311s,@INSTALL@,$ac_INSTALL,;t t
10312" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
10313 rm -f $tmp/stdin
10314 if test x"$ac_file" != x-; then
10315 mv $tmp/out $ac_file
10316 else
10317 cat $tmp/out
10318 rm -f $tmp/out
10319 fi
10320
10321done
10322_ACEOF
10323cat >>$CONFIG_STATUS <<\_ACEOF
10324
10325#
10326# CONFIG_HEADER section.
10327#
252b5132
RH
10328
10329# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10330# NAME is the cpp macro being defined and VALUE is the value it is being given.
10331#
10332# ac_d sets the value in "#define NAME VALUE" lines.
58670637
DD
10333ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10334ac_dB='[ ].*$,\1#\2'
2299a76d
DJ
10335ac_dC=' '
10336ac_dD=',;t'
10337# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
58670637 10338ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2299a76d 10339ac_uB='$,\1#\2define\3'
252b5132 10340ac_uC=' '
2299a76d
DJ
10341ac_uD=',;t'
10342
10343for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
252b5132 10344 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2299a76d
DJ
10345 case $ac_file in
10346 - | *:- | *:-:* ) # input from stdin
58670637
DD
10347 cat >$tmp/stdin
10348 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
10349 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
2299a76d 10350 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
58670637 10351 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
2299a76d 10352 * ) ac_file_in=$ac_file.in ;;
252b5132
RH
10353 esac
10354
2299a76d
DJ
10355 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
10356echo "$as_me: creating $ac_file" >&6;}
10357
10358 # First look for the input files in the build tree, otherwise in the
10359 # src tree.
10360 ac_file_inputs=`IFS=:
10361 for f in $ac_file_in; do
10362 case $f in
10363 -) echo $tmp/stdin ;;
10364 [\\/$]*)
58670637
DD
10365 # Absolute (can't be DOS-style, as IFS=:)
10366 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
2299a76d
DJ
10367echo "$as_me: error: cannot find input file: $f" >&2;}
10368 { (exit 1); exit 1; }; }
58670637
DD
10369 # Do quote $f, to prevent DOS paths from being IFS'd.
10370 echo "$f";;
2299a76d 10371 *) # Relative
58670637
DD
10372 if test -f "$f"; then
10373 # Build tree
10374 echo "$f"
10375 elif test -f "$srcdir/$f"; then
10376 # Source tree
10377 echo "$srcdir/$f"
10378 else
10379 # /dev/null tree
10380 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
2299a76d
DJ
10381echo "$as_me: error: cannot find input file: $f" >&2;}
10382 { (exit 1); exit 1; }; }
58670637 10383 fi;;
2299a76d
DJ
10384 esac
10385 done` || { (exit 1); exit 1; }
10386 # Remove the trailing spaces.
58670637 10387 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
2299a76d
DJ
10388
10389_ACEOF
10390
10391# Transform confdefs.h into two sed scripts, `conftest.defines' and
10392# `conftest.undefs', that substitutes the proper values into
10393# config.h.in to produce config.h. The first handles `#define'
10394# templates, and the second `#undef' templates.
10395# And first: Protect against being on the right side of a sed subst in
10396# config.status. Protect against being in an unquoted here document
10397# in config.status.
10398rm -f conftest.defines conftest.undefs
10399# Using a here document instead of a string reduces the quoting nightmare.
10400# Putting comments in sed scripts is not portable.
10401#
10402# `end' is used to avoid that the second main sed command (meant for
10403# 0-ary CPP macros) applies to n-ary macro definitions.
10404# See the Autoconf documentation for `clear'.
10405cat >confdef2sed.sed <<\_ACEOF
10406s/[\\&,]/\\&/g
10407s,[\\$`],\\&,g
10408t clear
10409: clear
58670637 10410s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
2299a76d 10411t end
58670637 10412s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
2299a76d
DJ
10413: end
10414_ACEOF
10415# If some macros were called several times there might be several times
10416# the same #defines, which is useless. Nevertheless, we may not want to
10417# sort them, since we want the *last* AC-DEFINE to be honored.
10418uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
10419sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
10420rm -f confdef2sed.sed
252b5132
RH
10421
10422# This sed command replaces #undef with comments. This is necessary, for
10423# example, in the case of _POSIX_SOURCE, which is predefined and required
10424# on some systems where configure will not decide to define it.
2299a76d 10425cat >>conftest.undefs <<\_ACEOF
58670637 10426s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
2299a76d
DJ
10427_ACEOF
10428
10429# Break up conftest.defines because some shells have a limit on the size
10430# of here documents, and old seds have small limits too (100 cmds).
10431echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
58670637 10432echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
2299a76d
DJ
10433echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
10434echo ' :' >>$CONFIG_STATUS
10435rm -f conftest.tail
10436while grep . conftest.defines >/dev/null
10437do
10438 # Write a limited-size here document to $tmp/defines.sed.
10439 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
10440 # Speed up: don't consider the non `#define' lines.
58670637 10441 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
2299a76d
DJ
10442 # Work around the forget-to-reset-the-flag bug.
10443 echo 't clr' >>$CONFIG_STATUS
10444 echo ': clr' >>$CONFIG_STATUS
10445 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
10446 echo 'CEOF
10447 sed -f $tmp/defines.sed $tmp/in >$tmp/out
10448 rm -f $tmp/in
10449 mv $tmp/out $tmp/in
10450' >>$CONFIG_STATUS
10451 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
10452 rm -f conftest.defines
10453 mv conftest.tail conftest.defines
10454done
10455rm -f conftest.defines
10456echo ' fi # grep' >>$CONFIG_STATUS
10457echo >>$CONFIG_STATUS
252b5132 10458
2299a76d
DJ
10459# Break up conftest.undefs because some shells have a limit on the size
10460# of here documents, and old seds have small limits too (100 cmds).
10461echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
252b5132 10462rm -f conftest.tail
2299a76d 10463while grep . conftest.undefs >/dev/null
252b5132 10464do
2299a76d
DJ
10465 # Write a limited-size here document to $tmp/undefs.sed.
10466 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
10467 # Speed up: don't consider the non `#undef'
58670637 10468 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
2299a76d
DJ
10469 # Work around the forget-to-reset-the-flag bug.
10470 echo 't clr' >>$CONFIG_STATUS
10471 echo ': clr' >>$CONFIG_STATUS
10472 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
252b5132 10473 echo 'CEOF
2299a76d
DJ
10474 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
10475 rm -f $tmp/in
10476 mv $tmp/out $tmp/in
10477' >>$CONFIG_STATUS
10478 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
10479 rm -f conftest.undefs
10480 mv conftest.tail conftest.undefs
10481done
10482rm -f conftest.undefs
10483
10484cat >>$CONFIG_STATUS <<\_ACEOF
10485 # Let's still pretend it is `configure' which instantiates (i.e., don't
10486 # use $as_me), people would be surprised to read:
10487 # /* config.h. Generated by config.status. */
10488 if test x"$ac_file" = x-; then
10489 echo "/* Generated by configure. */" >$tmp/config.h
252b5132 10490 else
2299a76d 10491 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
252b5132 10492 fi
2299a76d
DJ
10493 cat $tmp/in >>$tmp/config.h
10494 rm -f $tmp/in
10495 if test x"$ac_file" != x-; then
10496 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
10497 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
10498echo "$as_me: $ac_file is unchanged" >&6;}
10499 else
10500 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
10501$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58670637
DD
10502 X"$ac_file" : 'X\(//\)[^/]' \| \
10503 X"$ac_file" : 'X\(//\)$' \| \
10504 X"$ac_file" : 'X\(/\)' \| \
10505 . : '\(.\)' 2>/dev/null ||
2299a76d
DJ
10506echo X"$ac_file" |
10507 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10508 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10509 /^X\(\/\/\)$/{ s//\1/; q; }
10510 /^X\(\/\).*/{ s//\1/; q; }
10511 s/.*/./; q'`
10512 { if $as_mkdir_p; then
10513 mkdir -p "$ac_dir"
10514 else
10515 as_dir="$ac_dir"
10516 as_dirs=
10517 while test ! -d "$as_dir"; do
10518 as_dirs="$as_dir $as_dirs"
10519 as_dir=`(dirname "$as_dir") 2>/dev/null ||
10520$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58670637
DD
10521 X"$as_dir" : 'X\(//\)[^/]' \| \
10522 X"$as_dir" : 'X\(//\)$' \| \
10523 X"$as_dir" : 'X\(/\)' \| \
10524 . : '\(.\)' 2>/dev/null ||
2299a76d
DJ
10525echo X"$as_dir" |
10526 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10527 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10528 /^X\(\/\/\)$/{ s//\1/; q; }
10529 /^X\(\/\).*/{ s//\1/; q; }
10530 s/.*/./; q'`
10531 done
10532 test ! -n "$as_dirs" || mkdir $as_dirs
10533 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
10534echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
10535 { (exit 1); exit 1; }; }; }
252b5132 10536
2299a76d
DJ
10537 rm -f $ac_file
10538 mv $tmp/config.h $ac_file
10539 fi
10540 else
10541 cat $tmp/config.h
10542 rm -f $tmp/config.h
10543 fi
10544done
10545_ACEOF
10546cat >>$CONFIG_STATUS <<\_ACEOF
252b5132 10547
2299a76d
DJ
10548#
10549# CONFIG_COMMANDS section.
10550#
10551for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
10552 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
10553 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
10554 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
10555$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58670637
DD
10556 X"$ac_dest" : 'X\(//\)[^/]' \| \
10557 X"$ac_dest" : 'X\(//\)$' \| \
10558 X"$ac_dest" : 'X\(/\)' \| \
10559 . : '\(.\)' 2>/dev/null ||
2299a76d
DJ
10560echo X"$ac_dest" |
10561 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10562 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10563 /^X\(\/\/\)$/{ s//\1/; q; }
10564 /^X\(\/\).*/{ s//\1/; q; }
10565 s/.*/./; q'`
58670637
DD
10566 { if $as_mkdir_p; then
10567 mkdir -p "$ac_dir"
10568 else
10569 as_dir="$ac_dir"
10570 as_dirs=
10571 while test ! -d "$as_dir"; do
10572 as_dirs="$as_dir $as_dirs"
10573 as_dir=`(dirname "$as_dir") 2>/dev/null ||
10574$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10575 X"$as_dir" : 'X\(//\)[^/]' \| \
10576 X"$as_dir" : 'X\(//\)$' \| \
10577 X"$as_dir" : 'X\(/\)' \| \
10578 . : '\(.\)' 2>/dev/null ||
10579echo X"$as_dir" |
10580 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10581 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10582 /^X\(\/\/\)$/{ s//\1/; q; }
10583 /^X\(\/\).*/{ s//\1/; q; }
10584 s/.*/./; q'`
10585 done
10586 test ! -n "$as_dirs" || mkdir $as_dirs
10587 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
10588echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
10589 { (exit 1); exit 1; }; }; }
10590
2299a76d
DJ
10591 ac_builddir=.
10592
10593if test "$ac_dir" != .; then
10594 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
10595 # A "../" for each directory in $ac_dir_suffix.
10596 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
10597else
10598 ac_dir_suffix= ac_top_builddir=
10599fi
10600
10601case $srcdir in
10602 .) # No --srcdir option. We are building in place.
10603 ac_srcdir=.
10604 if test -z "$ac_top_builddir"; then
10605 ac_top_srcdir=.
10606 else
10607 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
10608 fi ;;
10609 [\\/]* | ?:[\\/]* ) # Absolute path.
10610 ac_srcdir=$srcdir$ac_dir_suffix;
10611 ac_top_srcdir=$srcdir ;;
10612 *) # Relative path.
10613 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
10614 ac_top_srcdir=$ac_top_builddir$srcdir ;;
10615esac
85f969cd
DD
10616
10617# Do not use `cd foo && pwd` to compute absolute paths, because
10618# the directories may not exist.
10619case `pwd` in
10620.) ac_abs_builddir="$ac_dir";;
58670637 10621*)
85f969cd
DD
10622 case "$ac_dir" in
10623 .) ac_abs_builddir=`pwd`;;
10624 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
10625 *) ac_abs_builddir=`pwd`/"$ac_dir";;
58670637
DD
10626 esac;;
10627esac
85f969cd 10628case $ac_abs_builddir in
58670637
DD
10629.) ac_abs_top_builddir=${ac_top_builddir}.;;
10630*)
10631 case ${ac_top_builddir}. in
85f969cd 10632 .) ac_abs_top_builddir=$ac_abs_builddir;;
58670637 10633 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
85f969cd 10634 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
58670637
DD
10635 esac;;
10636esac
85f969cd 10637case $ac_abs_builddir in
58670637
DD
10638.) ac_abs_srcdir=$ac_srcdir;;
10639*)
10640 case $ac_srcdir in
85f969cd 10641 .) ac_abs_srcdir=$ac_abs_builddir;;
58670637 10642 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
85f969cd 10643 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
58670637
DD
10644 esac;;
10645esac
85f969cd 10646case $ac_abs_builddir in
58670637
DD
10647.) ac_abs_top_srcdir=$ac_top_srcdir;;
10648*)
10649 case $ac_top_srcdir in
85f969cd 10650 .) ac_abs_top_srcdir=$ac_abs_builddir;;
58670637 10651 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
85f969cd 10652 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
58670637
DD
10653 esac;;
10654esac
2299a76d
DJ
10655
10656
10657 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
10658echo "$as_me: executing $ac_dest commands" >&6;}
10659 case $ac_dest in
10660 default ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
252b5132 10661if test -n "$CONFIG_FILES"; then
c7efc4d5 10662 if test -n "${with_target_subdir}"; then
252b5132
RH
10663 # FIXME: We shouldn't need to set ac_file
10664 ac_file=Makefile
52d98c2d 10665 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
252b5132
RH
10666 . ${libiberty_topdir}/config-ml.in
10667 fi
2299a76d
DJ
10668fi ;;
10669 esac
10670done
10671_ACEOF
10672
10673cat >>$CONFIG_STATUS <<\_ACEOF
10674
10675{ (exit 0); exit 0; }
10676_ACEOF
252b5132 10677chmod +x $CONFIG_STATUS
2299a76d
DJ
10678ac_clean_files=$ac_clean_files_save
10679
10680
10681# configure is writing to config.log, and then calls config.status.
10682# config.status does its own redirection, appending to config.log.
10683# Unfortunately, on DOS this fails, as config.log is still kept open
10684# by configure, so config.status won't be able to write to it; its
10685# output is simply discarded. So we exec the FD to /dev/null,
10686# effectively closing config.log, so it can be properly (re)opened and
10687# appended to by config.status. When coming back to configure, we
10688# need to make the FD available again.
10689if test "$no_create" != yes; then
10690 ac_cs_success=:
10691 ac_config_status_args=
10692 test "$silent" = yes &&
10693 ac_config_status_args="$ac_config_status_args --quiet"
10694 exec 5>/dev/null
10695 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
10696 exec 5>>config.log
10697 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
10698 # would make configure fail if this is the last instruction.
10699 $ac_cs_success || { (exit 1); exit 1; }
10700fi
252b5132 10701
This page took 1.494282 seconds and 4 git commands to generate.