gdb/
[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)
899de170 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
899de170
L
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
a104c397
PB
3349ac_libiberty_warn_cflags=
3350save_CFLAGS="$CFLAGS"
1f616ca1 3351for option in -W -Wall -Wwrite-strings -Wc++-compat \
a104c397
PB
3352 -Wstrict-prototypes; do
3353 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
3354
3355 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
3356echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
3357if eval "test \"\${$as_acx_Woption+set}\" = set"; then
fd7d450d
DD
3358 echo $ECHO_N "(cached) $ECHO_C" >&6
3359else
a104c397
PB
3360 CFLAGS="$option"
3361 cat >conftest.$ac_ext <<_ACEOF
fd7d450d
DD
3362/* confdefs.h. */
3363_ACEOF
3364cat confdefs.h >>conftest.$ac_ext
3365cat >>conftest.$ac_ext <<_ACEOF
3366/* end confdefs.h. */
3367
a104c397
PB
3368int
3369main ()
3370{
3371
3372 ;
3373 return 0;
3374}
fd7d450d
DD
3375_ACEOF
3376rm -f conftest.$ac_objext
3377if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3378 (eval $ac_compile) 2>conftest.er1
3379 ac_status=$?
3380 grep -v '^ *+' conftest.er1 >conftest.err
3381 rm -f conftest.er1
3382 cat conftest.err >&5
3383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3384 (exit $ac_status); } &&
3385 { ac_try='test -z "$ac_c_werror_flag"
3386 || test ! -s conftest.err'
3387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3388 (eval $ac_try) 2>&5
3389 ac_status=$?
3390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3391 (exit $ac_status); }; } &&
3392 { ac_try='test -s conftest.$ac_objext'
3393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3394 (eval $ac_try) 2>&5
3395 ac_status=$?
3396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3397 (exit $ac_status); }; }; then
a104c397 3398 eval "$as_acx_Woption=yes"
fd7d450d
DD
3399else
3400 echo "$as_me: failed program was:" >&5
3401sed 's/^/| /' conftest.$ac_ext >&5
3402
a104c397 3403eval "$as_acx_Woption=no"
fd7d450d
DD
3404fi
3405rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fd7d450d
DD
3406
3407fi
a104c397
PB
3408echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
3409echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3410 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
3411 ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }$option"
fd7d450d 3412fi
11a338da 3413
a104c397
PB
3414 done
3415CFLAGS="$save_CFLAGS"
3416
1f616ca1
PB
3417if test "$GCC" = yes; then
3418 echo "$as_me:$LINENO: checking whether $CC supports -pedantic " >&5
3419echo $ECHO_N "checking whether $CC supports -pedantic ... $ECHO_C" >&6
3420if test "${acx_cv_prog_cc_pedantic_+set}" = set; then
3421 echo $ECHO_N "(cached) $ECHO_C" >&6
3422else
3423 save_CFLAGS="$CFLAGS"
3424CFLAGS="-pedantic "
3425cat >conftest.$ac_ext <<_ACEOF
3426/* confdefs.h. */
3427_ACEOF
3428cat confdefs.h >>conftest.$ac_ext
3429cat >>conftest.$ac_ext <<_ACEOF
3430/* end confdefs.h. */
3431
3432int
3433main ()
3434{
3435
3436 ;
3437 return 0;
3438}
3439_ACEOF
3440rm -f conftest.$ac_objext
3441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3442 (eval $ac_compile) 2>conftest.er1
3443 ac_status=$?
3444 grep -v '^ *+' conftest.er1 >conftest.err
3445 rm -f conftest.er1
3446 cat conftest.err >&5
3447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3448 (exit $ac_status); } &&
3449 { ac_try='test -z "$ac_c_werror_flag"
3450 || test ! -s conftest.err'
3451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3452 (eval $ac_try) 2>&5
3453 ac_status=$?
3454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3455 (exit $ac_status); }; } &&
3456 { ac_try='test -s conftest.$ac_objext'
3457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3458 (eval $ac_try) 2>&5
3459 ac_status=$?
3460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3461 (exit $ac_status); }; }; then
3462 acx_cv_prog_cc_pedantic_=yes
3463else
3464 echo "$as_me: failed program was:" >&5
3465sed 's/^/| /' conftest.$ac_ext >&5
3466
3467acx_cv_prog_cc_pedantic_=no
3468fi
3469rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3470CFLAGS="$save_CFLAGS"
3471fi
3472echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic_" >&5
3473echo "${ECHO_T}$acx_cv_prog_cc_pedantic_" >&6
3474if test $acx_cv_prog_cc_pedantic_ = yes; then
3475 ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }-pedantic "
3476fi
3477
3478
3479fi
3480
3481
11a338da 3482
46a10049
DD
3483if test "x$CC" != xcc; then
3484 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
3485echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
3486else
3487 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
3488echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
3489fi
3490set dummy $CC; ac_cc=`echo $2 |
3491 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
3492if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
3493 echo $ECHO_N "(cached) $ECHO_C" >&6
3494else
3495 cat >conftest.$ac_ext <<_ACEOF
3496/* confdefs.h. */
3497_ACEOF
3498cat confdefs.h >>conftest.$ac_ext
3499cat >>conftest.$ac_ext <<_ACEOF
3500/* end confdefs.h. */
3501
3502int
3503main ()
3504{
3505
3506 ;
3507 return 0;
3508}
3509_ACEOF
3510# Make sure it works both with $CC and with simple cc.
3511# We do the test twice because some compilers refuse to overwrite an
3512# existing .o file with -o, though they will create one.
3513ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
3514if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3515 (eval $ac_try) 2>&5
3516 ac_status=$?
3517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3518 (exit $ac_status); } &&
3519 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3520 (eval $ac_try) 2>&5
3521 ac_status=$?
3522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3523 (exit $ac_status); };
3524then
3525 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
3526 if test "x$CC" != xcc; then
3527 # Test first that cc exists at all.
3528 if { ac_try='cc -c conftest.$ac_ext >&5'
3529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3530 (eval $ac_try) 2>&5
3531 ac_status=$?
3532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3533 (exit $ac_status); }; }; then
3534 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
3535 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3536 (eval $ac_try) 2>&5
3537 ac_status=$?
3538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3539 (exit $ac_status); } &&
3540 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3541 (eval $ac_try) 2>&5
3542 ac_status=$?
3543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3544 (exit $ac_status); };
3545 then
3546 # cc works too.
3547 :
3548 else
3549 # cc exists but doesn't like -o.
3550 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3551 fi
3552 fi
3553 fi
3554else
3555 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3556fi
3557rm -f conftest*
3558
3559fi
3560if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
3561 echo "$as_me:$LINENO: result: yes" >&5
3562echo "${ECHO_T}yes" >&6
3563else
3564 echo "$as_me:$LINENO: result: no" >&5
3565echo "${ECHO_T}no" >&6
3566
3567cat >>confdefs.h <<\_ACEOF
3568#define NO_MINUS_C_MINUS_O 1
3569_ACEOF
3570
3571fi
3572
3573# autoconf is lame and doesn't give us any substitution variable for this.
3574if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
3575 NO_MINUS_C_MINUS_O=yes
3576else
3577 OUTPUT_OPTION='-o $@'
3578fi
3579
3580
3581
11a338da
DD
3582echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3583echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3584if test "${ac_cv_c_const+set}" = set; then
96e00b33
L
3585 echo $ECHO_N "(cached) $ECHO_C" >&6
3586else
11a338da
DD
3587 cat >conftest.$ac_ext <<_ACEOF
3588/* confdefs.h. */
3589_ACEOF
3590cat confdefs.h >>conftest.$ac_ext
3591cat >>conftest.$ac_ext <<_ACEOF
3592/* end confdefs.h. */
3593
3594int
3595main ()
3596{
3597/* FIXME: Include the comments suggested by Paul. */
3598#ifndef __cplusplus
3599 /* Ultrix mips cc rejects this. */
3600 typedef int charset[2];
3601 const charset x;
3602 /* SunOS 4.1.1 cc rejects this. */
3603 char const *const *ccp;
3604 char **p;
3605 /* NEC SVR4.0.2 mips cc rejects this. */
3606 struct point {int x, y;};
3607 static struct point const zero = {0,0};
3608 /* AIX XL C 1.02.0.0 rejects this.
3609 It does not let you subtract one const X* pointer from another in
3610 an arm of an if-expression whose if-part is not a constant
3611 expression */
3612 const char *g = "string";
3613 ccp = &g + (g ? g-g : 0);
3614 /* HPUX 7.0 cc rejects these. */
3615 ++ccp;
3616 p = (char**) ccp;
3617 ccp = (char const *const *) p;
3618 { /* SCO 3.2v4 cc rejects this. */
3619 char *t;
3620 char const *s = 0 ? (char *) 0 : (char const *) 0;
3621
3622 *t++ = 0;
3623 }
3624 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3625 int x[] = {25, 17};
3626 const int *foo = &x[0];
3627 ++foo;
3628 }
3629 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3630 typedef const int *iptr;
3631 iptr p = 0;
3632 ++p;
3633 }
3634 { /* AIX XL C 1.02.0.0 rejects this saying
3635 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3636 struct s { int j; const int *ap[3]; };
3637 struct s *b; b->j = 5;
3638 }
3639 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3640 const int foo = 10;
3641 }
3642#endif
3643
3644 ;
3645 return 0;
3646}
3647_ACEOF
3648rm -f conftest.$ac_objext
3649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3650 (eval $ac_compile) 2>conftest.er1
3651 ac_status=$?
3652 grep -v '^ *+' conftest.er1 >conftest.err
3653 rm -f conftest.er1
3654 cat conftest.err >&5
3655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3656 (exit $ac_status); } &&
fd7d450d
DD
3657 { ac_try='test -z "$ac_c_werror_flag"
3658 || test ! -s conftest.err'
11a338da
DD
3659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3660 (eval $ac_try) 2>&5
3661 ac_status=$?
3662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3663 (exit $ac_status); }; } &&
3664 { ac_try='test -s conftest.$ac_objext'
3665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3666 (eval $ac_try) 2>&5
3667 ac_status=$?
3668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3669 (exit $ac_status); }; }; then
3670 ac_cv_c_const=yes
96e00b33 3671else
11a338da
DD
3672 echo "$as_me: failed program was:" >&5
3673sed 's/^/| /' conftest.$ac_ext >&5
3674
3675ac_cv_c_const=no
96e00b33 3676fi
11a338da 3677rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2299a76d 3678fi
11a338da
DD
3679echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3680echo "${ECHO_T}$ac_cv_c_const" >&6
3681if test $ac_cv_c_const = no; then
3682
3683cat >>confdefs.h <<\_ACEOF
3684#define const
3685_ACEOF
2299a76d 3686
96e00b33 3687fi
11a338da
DD
3688
3689echo "$as_me:$LINENO: checking for inline" >&5
3690echo $ECHO_N "checking for inline... $ECHO_C" >&6
3691if test "${ac_cv_c_inline+set}" = set; then
96e00b33
L
3692 echo $ECHO_N "(cached) $ECHO_C" >&6
3693else
11a338da
DD
3694 ac_cv_c_inline=no
3695for ac_kw in inline __inline__ __inline; do
3696 cat >conftest.$ac_ext <<_ACEOF
3697/* confdefs.h. */
3698_ACEOF
3699cat confdefs.h >>conftest.$ac_ext
3700cat >>conftest.$ac_ext <<_ACEOF
3701/* end confdefs.h. */
3702#ifndef __cplusplus
3703typedef int foo_t;
3704static $ac_kw foo_t static_foo () {return 0; }
3705$ac_kw foo_t foo () {return 0; }
3706#endif
96e00b33 3707
11a338da
DD
3708_ACEOF
3709rm -f conftest.$ac_objext
3710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3711 (eval $ac_compile) 2>conftest.er1
3712 ac_status=$?
3713 grep -v '^ *+' conftest.er1 >conftest.err
3714 rm -f conftest.er1
3715 cat conftest.err >&5
3716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3717 (exit $ac_status); } &&
fd7d450d
DD
3718 { ac_try='test -z "$ac_c_werror_flag"
3719 || test ! -s conftest.err'
11a338da
DD
3720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3721 (eval $ac_try) 2>&5
3722 ac_status=$?
3723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3724 (exit $ac_status); }; } &&
3725 { ac_try='test -s conftest.$ac_objext'
3726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3727 (eval $ac_try) 2>&5
3728 ac_status=$?
3729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3730 (exit $ac_status); }; }; then
3731 ac_cv_c_inline=$ac_kw; break
2299a76d 3732else
11a338da
DD
3733 echo "$as_me: failed program was:" >&5
3734sed 's/^/| /' conftest.$ac_ext >&5
96e00b33 3735
96e00b33 3736fi
11a338da
DD
3737rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3738done
3739
96e00b33 3740fi
11a338da
DD
3741echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3742echo "${ECHO_T}$ac_cv_c_inline" >&6
96e00b33 3743
96e00b33 3744
11a338da
DD
3745case $ac_cv_c_inline in
3746 inline | yes) ;;
3747 *)
3748 case $ac_cv_c_inline in
3749 no) ac_val=;;
3750 *) ac_val=$ac_cv_c_inline;;
3751 esac
3752 cat >>confdefs.h <<_ACEOF
3753#ifndef __cplusplus
3754#define inline $ac_val
3755#endif
3756_ACEOF
3757 ;;
3758esac
96e00b33 3759
11a338da
DD
3760echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
3761echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
3762if test "${ac_cv_c_bigendian+set}" = set; then
96e00b33
L
3763 echo $ECHO_N "(cached) $ECHO_C" >&6
3764else
0093138c 3765 # See if sys/param.h defines the BYTE_ORDER macro.
11a338da
DD
3766cat >conftest.$ac_ext <<_ACEOF
3767/* confdefs.h. */
3768_ACEOF
3769cat confdefs.h >>conftest.$ac_ext
3770cat >>conftest.$ac_ext <<_ACEOF
3771/* end confdefs.h. */
3772#include <sys/types.h>
3773#include <sys/param.h>
0093138c 3774
11a338da
DD
3775int
3776main ()
3777{
11a338da
DD
3778#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3779 bogus endian macros
3780#endif
0093138c 3781
11a338da
DD
3782 ;
3783 return 0;
3784}
3785_ACEOF
3786rm -f conftest.$ac_objext
3787if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3788 (eval $ac_compile) 2>conftest.er1
3789 ac_status=$?
3790 grep -v '^ *+' conftest.er1 >conftest.err
3791 rm -f conftest.er1
46a10049
DD
3792 cat conftest.err >&5
3793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3794 (exit $ac_status); } &&
fd7d450d
DD
3795 { ac_try='test -z "$ac_c_werror_flag"
3796 || test ! -s conftest.err'
46a10049
DD
3797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3798 (eval $ac_try) 2>&5
58670637
DD
3799 ac_status=$?
3800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
46a10049
DD
3801 (exit $ac_status); }; } &&
3802 { ac_try='test -s conftest.$ac_objext'
3803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3804 (eval $ac_try) 2>&5
2299a76d
DJ
3805 ac_status=$?
3806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
46a10049
DD
3807 (exit $ac_status); }; }; then
3808 # It does; now see whether it defined to BIG_ENDIAN or not.
2299a76d 3809cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
3810/* confdefs.h. */
3811_ACEOF
3812cat confdefs.h >>conftest.$ac_ext
3813cat >>conftest.$ac_ext <<_ACEOF
3814/* end confdefs.h. */
46a10049
DD
3815#include <sys/types.h>
3816#include <sys/param.h>
0093138c 3817
2299a76d
DJ
3818int
3819main ()
3820{
46a10049
DD
3821#if BYTE_ORDER != BIG_ENDIAN
3822 not big endian
3823#endif
0093138c 3824
2299a76d
DJ
3825 ;
3826 return 0;
3827}
3828_ACEOF
46a10049
DD
3829rm -f conftest.$ac_objext
3830if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3831 (eval $ac_compile) 2>conftest.er1
2299a76d 3832 ac_status=$?
58670637
DD
3833 grep -v '^ *+' conftest.er1 >conftest.err
3834 rm -f conftest.er1
3835 cat conftest.err >&5
2299a76d
DJ
3836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3837 (exit $ac_status); } &&
fd7d450d
DD
3838 { ac_try='test -z "$ac_c_werror_flag"
3839 || test ! -s conftest.err'
58670637
DD
3840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3841 (eval $ac_try) 2>&5
3842 ac_status=$?
3843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3844 (exit $ac_status); }; } &&
46a10049 3845 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
3846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3847 (eval $ac_try) 2>&5
3848 ac_status=$?
3849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3850 (exit $ac_status); }; }; then
46a10049 3851 ac_cv_c_bigendian=yes
7108c5dc 3852else
2299a76d
DJ
3853 echo "$as_me: failed program was:" >&5
3854sed 's/^/| /' conftest.$ac_ext >&5
3855
46a10049 3856ac_cv_c_bigendian=no
7108c5dc 3857fi
46a10049
DD
3858rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3859else
3860 echo "$as_me: failed program was:" >&5
3861sed 's/^/| /' conftest.$ac_ext >&5
2299a76d 3862
0093138c
DD
3863# It does not; compile a test program.
3864if test "$cross_compiling" = yes; then
3865 # try to guess the endianness by grepping values into an object file
3866 ac_cv_c_bigendian=unknown
3867 cat >conftest.$ac_ext <<_ACEOF
3868/* confdefs.h. */
3869_ACEOF
3870cat confdefs.h >>conftest.$ac_ext
3871cat >>conftest.$ac_ext <<_ACEOF
3872/* end confdefs.h. */
3873short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3874short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3875void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
3876short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3877short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3878void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
3879int
3880main ()
3881{
3882 _ascii (); _ebcdic ();
3883 ;
3884 return 0;
3885}
3886_ACEOF
3887rm -f conftest.$ac_objext
3888if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3889 (eval $ac_compile) 2>conftest.er1
3890 ac_status=$?
3891 grep -v '^ *+' conftest.er1 >conftest.err
3892 rm -f conftest.er1
3893 cat conftest.err >&5
3894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3895 (exit $ac_status); } &&
fd7d450d
DD
3896 { ac_try='test -z "$ac_c_werror_flag"
3897 || test ! -s conftest.err'
0093138c
DD
3898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3899 (eval $ac_try) 2>&5
3900 ac_status=$?
3901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3902 (exit $ac_status); }; } &&
3903 { ac_try='test -s conftest.$ac_objext'
3904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3905 (eval $ac_try) 2>&5
3906 ac_status=$?
3907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3908 (exit $ac_status); }; }; then
3909 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
3910 ac_cv_c_bigendian=yes
3911fi
3912if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
3913 if test "$ac_cv_c_bigendian" = unknown; then
3914 ac_cv_c_bigendian=no
3915 else
3916 # finding both strings is unlikely to happen, but who knows?
3917 ac_cv_c_bigendian=unknown
3918 fi
3919fi
3920else
3921 echo "$as_me: failed program was:" >&5
3922sed 's/^/| /' conftest.$ac_ext >&5
3923
7108c5dc 3924fi
46a10049 3925rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
46a10049
DD
3926else
3927 cat >conftest.$ac_ext <<_ACEOF
3928/* confdefs.h. */
3929_ACEOF
3930cat confdefs.h >>conftest.$ac_ext
3931cat >>conftest.$ac_ext <<_ACEOF
3932/* end confdefs.h. */
0093138c
DD
3933int
3934main ()
3935{
46a10049
DD
3936 /* Are we little or big endian? From Harbison&Steele. */
3937 union
3938 {
3939 long l;
3940 char c[sizeof (long)];
3941 } u;
3942 u.l = 1;
3943 exit (u.c[sizeof (long) - 1] == 1);
3944}
2299a76d 3945_ACEOF
46a10049
DD
3946rm -f conftest$ac_exeext
3947if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3948 (eval $ac_link) 2>&5
3949 ac_status=$?
3950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3951 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3953 (eval $ac_try) 2>&5
3954 ac_status=$?
3955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3956 (exit $ac_status); }; }; then
3957 ac_cv_c_bigendian=no
3958else
3959 echo "$as_me: program exited with status $ac_status" >&5
3960echo "$as_me: failed program was:" >&5
3961sed 's/^/| /' conftest.$ac_ext >&5
2299a76d 3962
46a10049
DD
3963( exit $ac_status )
3964ac_cv_c_bigendian=yes
7108c5dc 3965fi
46a10049
DD
3966rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3967fi
3968fi
0093138c 3969rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
46a10049
DD
3970fi
3971echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
3972echo "${ECHO_T}$ac_cv_c_bigendian" >&6
0093138c
DD
3973case $ac_cv_c_bigendian in
3974 yes)
2299a76d 3975
46a10049
DD
3976cat >>confdefs.h <<\_ACEOF
3977#define WORDS_BIGENDIAN 1
3978_ACEOF
0093138c
DD
3979 ;;
3980 no)
3981 ;;
3982 *)
3983 { { echo "$as_me:$LINENO: error: unknown endianness
3984presetting ac_cv_c_bigendian=no (or yes) will help" >&5
3985echo "$as_me: error: unknown endianness
3986presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
3987 { (exit 1); exit 1; }; } ;;
3988esac
7108c5dc 3989
252b5132
RH
3990
3991
3992
2299a76d 3993 ac_config_headers="$ac_config_headers config.h:config.in"
252b5132
RH
3994
3995
3996
3997# Find a good install program. We prefer a C program (faster),
3998# so one script is as good as another. But avoid the broken or
3999# incompatible versions:
4000# SysV /etc/install, /usr/sbin/install
4001# SunOS /usr/etc/install
4002# IRIX /sbin/install
4003# AIX /bin/install
2299a76d 4004# AmigaOS /C/install, which installs bootblocks on floppy discs
252b5132
RH
4005# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4006# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4007# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
58670637 4008# OS/2's system install, which has a completely different semantic
252b5132 4009# ./install, which can be erroneously created by make from ./install.sh.
2299a76d
DJ
4010echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4011echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
252b5132 4012if test -z "$INSTALL"; then
2299a76d
DJ
4013if test "${ac_cv_path_install+set}" = set; then
4014 echo $ECHO_N "(cached) $ECHO_C" >&6
4015else
4016 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4017for as_dir in $PATH
4018do
4019 IFS=$as_save_IFS
4020 test -z "$as_dir" && as_dir=.
4021 # Account for people who put trailing slashes in PATH elements.
4022case $as_dir/ in
4023 ./ | .// | /cC/* | \
4024 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
58670637 4025 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
2299a76d
DJ
4026 /usr/ucb/* ) ;;
4027 *)
4028 # OSF1 and SCO ODT 3.0 have their own names for install.
4029 # Don't use installbsd from OSF since it installs stuff as root
4030 # by default.
4031 for ac_prog in ginstall scoinst install; do
4032 for ac_exec_ext in '' $ac_executable_extensions; do
58670637
DD
4033 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4034 if test $ac_prog = install &&
4035 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4036 # AIX install. It has an incompatible calling convention.
4037 :
4038 elif test $ac_prog = install &&
4039 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4040 # program-specific install script used by HP pwplus--don't use.
4041 :
4042 else
4043 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4044 break 3
4045 fi
4046 fi
252b5132 4047 done
2299a76d
DJ
4048 done
4049 ;;
4050esac
4051done
4052
252b5132
RH
4053
4054fi
4055 if test "${ac_cv_path_install+set}" = set; then
2299a76d 4056 INSTALL=$ac_cv_path_install
252b5132
RH
4057 else
4058 # As a last resort, use the slow shell script. We don't cache a
4059 # path for INSTALL within a source directory, because that will
4060 # break other packages using the cache if that directory is
4061 # removed, or if the path is relative.
2299a76d 4062 INSTALL=$ac_install_sh
252b5132
RH
4063 fi
4064fi
2299a76d
DJ
4065echo "$as_me:$LINENO: result: $INSTALL" >&5
4066echo "${ECHO_T}$INSTALL" >&6
252b5132
RH
4067
4068# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4069# It thinks the first close brace ends the variable substitution.
4070test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4071
2299a76d 4072test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
252b5132
RH
4073
4074test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4075
4076
4cf896a5
KC
4077# Don't build the shared library for build.
4078if [ -n "${with_build_subdir}" ]; then
4079 enable_shared=no
4080fi
4081
4082frag=
4083case "${host}" in
4084 rs6000-ibm-aix3.1 | rs6000-ibm-aix)
4085 frag=mh-aix ;;
4086 *-*-cxux7*) frag=mh-cxux7 ;;
4087 *-*-freebsd2.1.*) frag=mh-fbsd21 ;;
4088 *-*-freebsd2.2.[012]) frag=mh-fbsd21 ;;
4089 i370-*-opened*) frag=mh-openedition ;;
4090 i[34567]86-*-windows*) frag=mh-windows ;;
4091esac
4092
4093if [ -n "${frag}" ]; then
c779bab8 4094 frag=${libiberty_topdir}/libiberty/config/$frag
4cf896a5
KC
4095fi
4096
4097# If they didn't specify --enable-shared, don't generate shared libs.
4098case "${enable_shared}" in
4099 yes) shared=yes ;;
4100 no) shared=no ;;
4101 "") shared=no ;;
4102 *) shared=yes ;;
4103esac
4104if [ "${shared}" = "yes" ]; then
4cf896a5
KC
4105 case "${host}" in
4106 *-*-cygwin*) ;;
c779bab8
PB
4107 alpha*-*-linux*) PICFLAG=-fPIC ;;
4108 arm*-*-*) PICFLAG=-fPIC ;;
4109 hppa*-*-*) PICFLAG=-fPIC ;;
4110 i370-*-*) PICFLAG=-fPIC ;;
4111 ia64-*-*) PICFLAG=-fpic ;;
4cf896a5 4112 i[34567]86-*-* | x86_64-*-*)
c779bab8
PB
4113 PICFLAG=-fpic ;;
4114 m68k-*-*) PICFLAG=-fpic ;;
017c1138 4115 mips*-*-linux) PICFLAG=-fPIC ;;
4cf896a5 4116 powerpc*-*-aix*) ;;
c779bab8
PB
4117 powerpc*-*-*) PICFLAG=-fPIC ;;
4118 sparc*-*-*) case "${CFLAGS}" in
4119 *-fpic* ) PICFLAG=-fpic ;;
4120 * ) PICFLAG=-fPIC ;;
4121 esac ;;
4122 s390*-*-*) PICFLAG=-fpic ;;
4cf896a5 4123 esac
4cf896a5
KC
4124fi
4125
c779bab8 4126
4cf896a5
KC
4127echo "# Warning: this fragment is automatically generated" > temp-frag
4128
c779bab8
PB
4129if [ -n "${frag}" ] && [ -f "${frag}" ]; then
4130 echo "Appending ${frag} to xhost-mkfrag"
4131 echo "# Following fragment copied from ${frag}" >> temp-frag
4132 cat ${frag} >> temp-frag
4133fi
4cf896a5
KC
4134
4135# record if we want to build shared libs.
4136if [ "${shared}" = "yes" ]; then
4137 echo enable_shared = yes >> temp-frag
4138else
4139 echo enable_shared = no >> temp-frag
4140fi
4141
4142frag=xhost-mkfrag
4143${CONFIG_SHELL-/bin/sh} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag
4144
252b5132
RH
4145host_makefile_frag=${frag}
4146
4147
4148# It's OK to check for header files. Although the compiler may not be
4149# able to link anything, it had better be able to at least compile
4150# something.
2299a76d
DJ
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
bb6a587d 4174
ac119ae8
DD
4175
4176for 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
4177do
4178as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8ddbb593 4179echo "$as_me:$LINENO: checking for $ac_header" >&5
2299a76d
DJ
4180echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4181if eval "test \"\${$as_ac_Header+set}\" = set"; then
4182 echo $ECHO_N "(cached) $ECHO_C" >&6
2299a76d 4183else
8ddbb593 4184 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
4185/* confdefs.h. */
4186_ACEOF
4187cat confdefs.h >>conftest.$ac_ext
4188cat >>conftest.$ac_ext <<_ACEOF
4189/* end confdefs.h. */
4190#include <$ac_header>
4191_ACEOF
4192if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4193 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4194 ac_status=$?
4195 grep -v '^ *+' conftest.er1 >conftest.err
4196 rm -f conftest.er1
4197 cat conftest.err >&5
4198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4199 (exit $ac_status); } >/dev/null; then
4200 if test -s conftest.err; then
4201 ac_cpp_err=$ac_c_preproc_warn_flag
58670637 4202 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2299a76d
DJ
4203 else
4204 ac_cpp_err=
4205 fi
15ae9e71 4206else
2299a76d
DJ
4207 ac_cpp_err=yes
4208fi
4209if test -z "$ac_cpp_err"; then
8ddbb593 4210 eval "$as_ac_Header=yes"
2299a76d
DJ
4211else
4212 echo "$as_me: failed program was:" >&5
4213sed 's/^/| /' conftest.$ac_ext >&5
4214
8ddbb593 4215 eval "$as_ac_Header=no"
2299a76d
DJ
4216fi
4217rm -f conftest.err conftest.$ac_ext
2299a76d
DJ
4218fi
4219echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4220echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2299a76d
DJ
4221if test `eval echo '${'$as_ac_Header'}'` = yes; then
4222 cat >>confdefs.h <<_ACEOF
4223#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4224_ACEOF
4225
4226fi
2299a76d
DJ
4227done
4228
4229echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
4230echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4231if test "${ac_cv_header_sys_wait_h+set}" = set; then
4232 echo $ECHO_N "(cached) $ECHO_C" >&6
4233else
4234 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
4235/* confdefs.h. */
4236_ACEOF
4237cat confdefs.h >>conftest.$ac_ext
4238cat >>conftest.$ac_ext <<_ACEOF
4239/* end confdefs.h. */
dc579051 4240#include <sys/types.h>
2299a76d
DJ
4241#include <sys/wait.h>
4242#ifndef WEXITSTATUS
4243# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
15ae9e71 4244#endif
2299a76d
DJ
4245#ifndef WIFEXITED
4246# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4247#endif
4248
4249int
4250main ()
4251{
4252 int s;
4253 wait (&s);
4254 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4255 ;
4256 return 0;
4257}
4258_ACEOF
4259rm -f conftest.$ac_objext
4260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 4261 (eval $ac_compile) 2>conftest.er1
2299a76d 4262 ac_status=$?
58670637
DD
4263 grep -v '^ *+' conftest.er1 >conftest.err
4264 rm -f conftest.er1
4265 cat conftest.err >&5
2299a76d
DJ
4266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4267 (exit $ac_status); } &&
fd7d450d
DD
4268 { ac_try='test -z "$ac_c_werror_flag"
4269 || test ! -s conftest.err'
58670637
DD
4270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4271 (eval $ac_try) 2>&5
4272 ac_status=$?
4273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4274 (exit $ac_status); }; } &&
4275 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
4276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4277 (eval $ac_try) 2>&5
4278 ac_status=$?
4279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4280 (exit $ac_status); }; }; then
4281 ac_cv_header_sys_wait_h=yes
dc579051 4282else
2299a76d
DJ
4283 echo "$as_me: failed program was:" >&5
4284sed 's/^/| /' conftest.$ac_ext >&5
4285
4286ac_cv_header_sys_wait_h=no
dc579051 4287fi
58670637 4288rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2299a76d
DJ
4289fi
4290echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
4291echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
4292if test $ac_cv_header_sys_wait_h = yes; then
4293
8ddbb593
DJ
4294cat >>confdefs.h <<\_ACEOF
4295#define HAVE_SYS_WAIT_H 1
4296_ACEOF
4297
4298fi
4299
4300echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4301echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4302if test "${ac_cv_header_time+set}" = set; then
4303 echo $ECHO_N "(cached) $ECHO_C" >&6
4304else
4305 cat >conftest.$ac_ext <<_ACEOF
8ddbb593
DJ
4306/* confdefs.h. */
4307_ACEOF
4308cat confdefs.h >>conftest.$ac_ext
4309cat >>conftest.$ac_ext <<_ACEOF
4310/* end confdefs.h. */
4311#include <sys/types.h>
4312#include <sys/time.h>
4313#include <time.h>
4314
4315int
4316main ()
4317{
4318if ((struct tm *) 0)
4319return 0;
4320 ;
4321 return 0;
4322}
4323_ACEOF
4324rm -f conftest.$ac_objext
4325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 4326 (eval $ac_compile) 2>conftest.er1
8ddbb593 4327 ac_status=$?
58670637
DD
4328 grep -v '^ *+' conftest.er1 >conftest.err
4329 rm -f conftest.er1
4330 cat conftest.err >&5
8ddbb593
DJ
4331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4332 (exit $ac_status); } &&
fd7d450d
DD
4333 { ac_try='test -z "$ac_c_werror_flag"
4334 || test ! -s conftest.err'
58670637
DD
4335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4336 (eval $ac_try) 2>&5
4337 ac_status=$?
4338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4339 (exit $ac_status); }; } &&
4340 { ac_try='test -s conftest.$ac_objext'
8ddbb593
DJ
4341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4342 (eval $ac_try) 2>&5
4343 ac_status=$?
4344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4345 (exit $ac_status); }; }; then
4346 ac_cv_header_time=yes
4347else
4348 echo "$as_me: failed program was:" >&5
4349sed 's/^/| /' conftest.$ac_ext >&5
4350
4351ac_cv_header_time=no
4352fi
58670637 4353rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8ddbb593
DJ
4354fi
4355echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
4356echo "${ECHO_T}$ac_cv_header_time" >&6
4357if test $ac_cv_header_time = yes; then
4358
4359cat >>confdefs.h <<\_ACEOF
4360#define TIME_WITH_SYS_TIME 1
4361_ACEOF
4362
4363fi
4364
4365
4366echo "$as_me:$LINENO: checking whether errno must be declared" >&5
4367echo $ECHO_N "checking whether errno must be declared... $ECHO_C" >&6
4368if test "${libiberty_cv_declare_errno+set}" = set; then
4369 echo $ECHO_N "(cached) $ECHO_C" >&6
4370else
4371 cat >conftest.$ac_ext <<_ACEOF
8ddbb593
DJ
4372/* confdefs.h. */
4373_ACEOF
4374cat confdefs.h >>conftest.$ac_ext
4375cat >>conftest.$ac_ext <<_ACEOF
4376/* end confdefs.h. */
4377#include <errno.h>
4378int
4379main ()
4380{
4381int x = errno;
4382 ;
4383 return 0;
4384}
4385_ACEOF
4386rm -f conftest.$ac_objext
4387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 4388 (eval $ac_compile) 2>conftest.er1
8ddbb593 4389 ac_status=$?
58670637
DD
4390 grep -v '^ *+' conftest.er1 >conftest.err
4391 rm -f conftest.er1
4392 cat conftest.err >&5
8ddbb593
DJ
4393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4394 (exit $ac_status); } &&
fd7d450d
DD
4395 { ac_try='test -z "$ac_c_werror_flag"
4396 || test ! -s conftest.err'
58670637
DD
4397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4398 (eval $ac_try) 2>&5
4399 ac_status=$?
4400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4401 (exit $ac_status); }; } &&
4402 { ac_try='test -s conftest.$ac_objext'
8ddbb593
DJ
4403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4404 (eval $ac_try) 2>&5
4405 ac_status=$?
4406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4407 (exit $ac_status); }; }; then
4408 libiberty_cv_declare_errno=no
4409else
4410 echo "$as_me: failed program was:" >&5
4411sed 's/^/| /' conftest.$ac_ext >&5
4412
4413libiberty_cv_declare_errno=yes
4414fi
58670637 4415rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8ddbb593
DJ
4416fi
4417echo "$as_me:$LINENO: result: $libiberty_cv_declare_errno" >&5
4418echo "${ECHO_T}$libiberty_cv_declare_errno" >&6
4419if test $libiberty_cv_declare_errno = yes
4420then
4421cat >>confdefs.h <<\_ACEOF
4422#define NEED_DECLARATION_ERRNO 1
4423_ACEOF
4424
4425fi
4426
4427
40a59a4c 4428# Determine the size of an int for struct fibnode.
8ddbb593
DJ
4429echo "$as_me:$LINENO: checking for egrep" >&5
4430echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4431if test "${ac_cv_prog_egrep+set}" = set; then
4432 echo $ECHO_N "(cached) $ECHO_C" >&6
4433else
4434 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4435 then ac_cv_prog_egrep='grep -E'
4436 else ac_cv_prog_egrep='egrep'
4437 fi
4438fi
4439echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4440echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4441 EGREP=$ac_cv_prog_egrep
4442
4443
4444echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4445echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4446if test "${ac_cv_header_stdc+set}" = set; then
4447 echo $ECHO_N "(cached) $ECHO_C" >&6
4448else
4449 cat >conftest.$ac_ext <<_ACEOF
8ddbb593
DJ
4450/* confdefs.h. */
4451_ACEOF
4452cat confdefs.h >>conftest.$ac_ext
4453cat >>conftest.$ac_ext <<_ACEOF
4454/* end confdefs.h. */
4455#include <stdlib.h>
4456#include <stdarg.h>
4457#include <string.h>
4458#include <float.h>
4459
4460int
4461main ()
4462{
4463
4464 ;
4465 return 0;
4466}
4467_ACEOF
4468rm -f conftest.$ac_objext
4469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 4470 (eval $ac_compile) 2>conftest.er1
8ddbb593 4471 ac_status=$?
58670637
DD
4472 grep -v '^ *+' conftest.er1 >conftest.err
4473 rm -f conftest.er1
4474 cat conftest.err >&5
8ddbb593
DJ
4475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4476 (exit $ac_status); } &&
fd7d450d
DD
4477 { ac_try='test -z "$ac_c_werror_flag"
4478 || test ! -s conftest.err'
58670637
DD
4479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4480 (eval $ac_try) 2>&5
4481 ac_status=$?
4482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4483 (exit $ac_status); }; } &&
4484 { ac_try='test -s conftest.$ac_objext'
8ddbb593
DJ
4485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4486 (eval $ac_try) 2>&5
4487 ac_status=$?
4488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4489 (exit $ac_status); }; }; then
4490 ac_cv_header_stdc=yes
4491else
4492 echo "$as_me: failed program was:" >&5
4493sed 's/^/| /' conftest.$ac_ext >&5
4494
4495ac_cv_header_stdc=no
4496fi
58670637 4497rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8ddbb593
DJ
4498
4499if test $ac_cv_header_stdc = yes; then
4500 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4501 cat >conftest.$ac_ext <<_ACEOF
8ddbb593
DJ
4502/* confdefs.h. */
4503_ACEOF
4504cat confdefs.h >>conftest.$ac_ext
4505cat >>conftest.$ac_ext <<_ACEOF
4506/* end confdefs.h. */
4507#include <string.h>
4508
4509_ACEOF
4510if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4511 $EGREP "memchr" >/dev/null 2>&1; then
4512 :
4513else
4514 ac_cv_header_stdc=no
4515fi
4516rm -f conftest*
4517
4518fi
4519
4520if test $ac_cv_header_stdc = yes; then
4521 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4522 cat >conftest.$ac_ext <<_ACEOF
8ddbb593
DJ
4523/* confdefs.h. */
4524_ACEOF
4525cat confdefs.h >>conftest.$ac_ext
4526cat >>conftest.$ac_ext <<_ACEOF
4527/* end confdefs.h. */
4528#include <stdlib.h>
4529
2299a76d 4530_ACEOF
8ddbb593
DJ
4531if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4532 $EGREP "free" >/dev/null 2>&1; then
4533 :
4534else
4535 ac_cv_header_stdc=no
4536fi
4537rm -f conftest*
2299a76d
DJ
4538
4539fi
4540
8ddbb593
DJ
4541if test $ac_cv_header_stdc = yes; then
4542 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4543 if test "$cross_compiling" = yes; then
4544 :
2299a76d
DJ
4545else
4546 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
4547/* confdefs.h. */
4548_ACEOF
4549cat confdefs.h >>conftest.$ac_ext
4550cat >>conftest.$ac_ext <<_ACEOF
4551/* end confdefs.h. */
8ddbb593
DJ
4552#include <ctype.h>
4553#if ((' ' & 0x0FF) == 0x020)
4554# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4555# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4556#else
4557# define ISLOWER(c) \
58670637
DD
4558 (('a' <= (c) && (c) <= 'i') \
4559 || ('j' <= (c) && (c) <= 'r') \
4560 || ('s' <= (c) && (c) <= 'z'))
8ddbb593
DJ
4561# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4562#endif
2299a76d 4563
8ddbb593 4564#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2299a76d
DJ
4565int
4566main ()
4567{
8ddbb593
DJ
4568 int i;
4569 for (i = 0; i < 256; i++)
4570 if (XOR (islower (i), ISLOWER (i))
58670637 4571 || toupper (i) != TOUPPER (i))
8ddbb593
DJ
4572 exit(2);
4573 exit (0);
2299a76d
DJ
4574}
4575_ACEOF
8ddbb593
DJ
4576rm -f conftest$ac_exeext
4577if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4578 (eval $ac_link) 2>&5
2299a76d
DJ
4579 ac_status=$?
4580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8ddbb593 4581 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2299a76d
DJ
4582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4583 (eval $ac_try) 2>&5
4584 ac_status=$?
4585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4586 (exit $ac_status); }; }; then
8ddbb593 4587 :
2299a76d 4588else
8ddbb593
DJ
4589 echo "$as_me: program exited with status $ac_status" >&5
4590echo "$as_me: failed program was:" >&5
2299a76d
DJ
4591sed 's/^/| /' conftest.$ac_ext >&5
4592
8ddbb593
DJ
4593( exit $ac_status )
4594ac_cv_header_stdc=no
2299a76d 4595fi
58670637 4596rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2299a76d 4597fi
8ddbb593
DJ
4598fi
4599fi
4600echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4601echo "${ECHO_T}$ac_cv_header_stdc" >&6
4602if test $ac_cv_header_stdc = yes; then
2299a76d
DJ
4603
4604cat >>confdefs.h <<\_ACEOF
8ddbb593 4605#define STDC_HEADERS 1
2299a76d
DJ
4606_ACEOF
4607
4608fi
4609
8ddbb593 4610# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2299a76d 4611
8ddbb593
DJ
4612
4613
4614
4615
4616
4617
4618
4619
4620for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
58670637 4621 inttypes.h stdint.h unistd.h
8ddbb593
DJ
4622do
4623as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4624echo "$as_me:$LINENO: checking for $ac_header" >&5
4625echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4626if eval "test \"\${$as_ac_Header+set}\" = set"; then
2299a76d
DJ
4627 echo $ECHO_N "(cached) $ECHO_C" >&6
4628else
4629 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
4630/* confdefs.h. */
4631_ACEOF
4632cat confdefs.h >>conftest.$ac_ext
4633cat >>conftest.$ac_ext <<_ACEOF
4634/* end confdefs.h. */
8ddbb593 4635#include <$ac_header>
2299a76d 4636_ACEOF
8ddbb593
DJ
4637if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4638 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2299a76d 4639 ac_status=$?
8ddbb593
DJ
4640 grep -v '^ *+' conftest.er1 >conftest.err
4641 rm -f conftest.er1
4642 cat conftest.err >&5
2299a76d 4643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8ddbb593
DJ
4644 (exit $ac_status); } >/dev/null; then
4645 if test -s conftest.err; then
4646 ac_cpp_err=$ac_c_preproc_warn_flag
58670637 4647 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8ddbb593
DJ
4648 else
4649 ac_cpp_err=
4650 fi
4651else
4652 ac_cpp_err=yes
4653fi
4654if test -z "$ac_cpp_err"; then
4655 eval "$as_ac_Header=yes"
2299a76d
DJ
4656else
4657 echo "$as_me: failed program was:" >&5
4658sed 's/^/| /' conftest.$ac_ext >&5
4659
8ddbb593 4660 eval "$as_ac_Header=no"
2299a76d 4661fi
8ddbb593 4662rm -f conftest.err conftest.$ac_ext
2299a76d 4663fi
8ddbb593
DJ
4664echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4665echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4666if test `eval echo '${'$as_ac_Header'}'` = yes; then
4667 cat >>confdefs.h <<_ACEOF
4668#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2299a76d
DJ
4669_ACEOF
4670
4671fi
8ddbb593 4672done
2299a76d
DJ
4673
4674
40a59a4c
DD
4675echo "$as_me:$LINENO: checking for int" >&5
4676echo $ECHO_N "checking for int... $ECHO_C" >&6
4677if test "${ac_cv_type_int+set}" = set; then
4678 echo $ECHO_N "(cached) $ECHO_C" >&6
4679else
4680 cat >conftest.$ac_ext <<_ACEOF
4681/* confdefs.h. */
4682_ACEOF
4683cat confdefs.h >>conftest.$ac_ext
4684cat >>conftest.$ac_ext <<_ACEOF
4685/* end confdefs.h. */
4686$ac_includes_default
4687int
4688main ()
4689{
4690if ((int *) 0)
4691 return 0;
4692if (sizeof (int))
4693 return 0;
4694 ;
4695 return 0;
4696}
4697_ACEOF
4698rm -f conftest.$ac_objext
4699if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4700 (eval $ac_compile) 2>conftest.er1
4701 ac_status=$?
4702 grep -v '^ *+' conftest.er1 >conftest.err
4703 rm -f conftest.er1
4704 cat conftest.err >&5
4705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4706 (exit $ac_status); } &&
fd7d450d
DD
4707 { ac_try='test -z "$ac_c_werror_flag"
4708 || test ! -s conftest.err'
40a59a4c
DD
4709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4710 (eval $ac_try) 2>&5
4711 ac_status=$?
4712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4713 (exit $ac_status); }; } &&
4714 { ac_try='test -s conftest.$ac_objext'
4715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4716 (eval $ac_try) 2>&5
4717 ac_status=$?
4718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4719 (exit $ac_status); }; }; then
4720 ac_cv_type_int=yes
4721else
4722 echo "$as_me: failed program was:" >&5
4723sed 's/^/| /' conftest.$ac_ext >&5
4724
4725ac_cv_type_int=no
4726fi
4727rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4728fi
4729echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4730echo "${ECHO_T}$ac_cv_type_int" >&6
4731
4732echo "$as_me:$LINENO: checking size of int" >&5
4733echo $ECHO_N "checking size of int... $ECHO_C" >&6
4734if test "${ac_cv_sizeof_int+set}" = set; then
4735 echo $ECHO_N "(cached) $ECHO_C" >&6
4736else
4737 if test "$ac_cv_type_int" = yes; then
4738 # The cast to unsigned long works around a bug in the HP C Compiler
4739 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4740 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4741 # This bug is HP SR number 8606223364.
4742 if test "$cross_compiling" = yes; then
4743 # Depending upon the size, compute the lo and hi bounds.
4744cat >conftest.$ac_ext <<_ACEOF
4745/* confdefs.h. */
4746_ACEOF
4747cat confdefs.h >>conftest.$ac_ext
4748cat >>conftest.$ac_ext <<_ACEOF
4749/* end confdefs.h. */
4750$ac_includes_default
4751int
4752main ()
4753{
4754static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4755test_array [0] = 0
4756
4757 ;
4758 return 0;
4759}
4760_ACEOF
4761rm -f conftest.$ac_objext
4762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4763 (eval $ac_compile) 2>conftest.er1
4764 ac_status=$?
4765 grep -v '^ *+' conftest.er1 >conftest.err
4766 rm -f conftest.er1
4767 cat conftest.err >&5
4768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4769 (exit $ac_status); } &&
fd7d450d
DD
4770 { ac_try='test -z "$ac_c_werror_flag"
4771 || test ! -s conftest.err'
40a59a4c
DD
4772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4773 (eval $ac_try) 2>&5
4774 ac_status=$?
4775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4776 (exit $ac_status); }; } &&
4777 { ac_try='test -s conftest.$ac_objext'
4778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4779 (eval $ac_try) 2>&5
4780 ac_status=$?
4781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4782 (exit $ac_status); }; }; then
4783 ac_lo=0 ac_mid=0
4784 while :; do
4785 cat >conftest.$ac_ext <<_ACEOF
4786/* confdefs.h. */
4787_ACEOF
4788cat confdefs.h >>conftest.$ac_ext
4789cat >>conftest.$ac_ext <<_ACEOF
4790/* end confdefs.h. */
4791$ac_includes_default
4792int
4793main ()
4794{
4795static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4796test_array [0] = 0
4797
4798 ;
4799 return 0;
4800}
4801_ACEOF
4802rm -f conftest.$ac_objext
4803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4804 (eval $ac_compile) 2>conftest.er1
4805 ac_status=$?
4806 grep -v '^ *+' conftest.er1 >conftest.err
4807 rm -f conftest.er1
4808 cat conftest.err >&5
4809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4810 (exit $ac_status); } &&
fd7d450d
DD
4811 { ac_try='test -z "$ac_c_werror_flag"
4812 || test ! -s conftest.err'
40a59a4c
DD
4813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4814 (eval $ac_try) 2>&5
4815 ac_status=$?
4816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4817 (exit $ac_status); }; } &&
4818 { ac_try='test -s conftest.$ac_objext'
4819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4820 (eval $ac_try) 2>&5
4821 ac_status=$?
4822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4823 (exit $ac_status); }; }; then
4824 ac_hi=$ac_mid; break
4825else
4826 echo "$as_me: failed program was:" >&5
4827sed 's/^/| /' conftest.$ac_ext >&5
4828
4829ac_lo=`expr $ac_mid + 1`
4830 if test $ac_lo -le $ac_mid; then
4831 ac_lo= ac_hi=
4832 break
4833 fi
4834 ac_mid=`expr 2 '*' $ac_mid + 1`
4835fi
4836rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4837 done
4838else
4839 echo "$as_me: failed program was:" >&5
4840sed 's/^/| /' conftest.$ac_ext >&5
4841
4842cat >conftest.$ac_ext <<_ACEOF
4843/* confdefs.h. */
4844_ACEOF
4845cat confdefs.h >>conftest.$ac_ext
4846cat >>conftest.$ac_ext <<_ACEOF
4847/* end confdefs.h. */
4848$ac_includes_default
4849int
4850main ()
4851{
4852static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4853test_array [0] = 0
4854
4855 ;
4856 return 0;
4857}
4858_ACEOF
4859rm -f conftest.$ac_objext
4860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4861 (eval $ac_compile) 2>conftest.er1
4862 ac_status=$?
4863 grep -v '^ *+' conftest.er1 >conftest.err
4864 rm -f conftest.er1
4865 cat conftest.err >&5
4866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4867 (exit $ac_status); } &&
fd7d450d
DD
4868 { ac_try='test -z "$ac_c_werror_flag"
4869 || test ! -s conftest.err'
40a59a4c
DD
4870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4871 (eval $ac_try) 2>&5
4872 ac_status=$?
4873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4874 (exit $ac_status); }; } &&
4875 { ac_try='test -s conftest.$ac_objext'
4876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4877 (eval $ac_try) 2>&5
4878 ac_status=$?
4879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4880 (exit $ac_status); }; }; then
4881 ac_hi=-1 ac_mid=-1
4882 while :; do
4883 cat >conftest.$ac_ext <<_ACEOF
4884/* confdefs.h. */
4885_ACEOF
4886cat confdefs.h >>conftest.$ac_ext
4887cat >>conftest.$ac_ext <<_ACEOF
4888/* end confdefs.h. */
4889$ac_includes_default
4890int
4891main ()
4892{
4893static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4894test_array [0] = 0
4895
4896 ;
4897 return 0;
4898}
4899_ACEOF
4900rm -f conftest.$ac_objext
4901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4902 (eval $ac_compile) 2>conftest.er1
4903 ac_status=$?
4904 grep -v '^ *+' conftest.er1 >conftest.err
4905 rm -f conftest.er1
4906 cat conftest.err >&5
4907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4908 (exit $ac_status); } &&
fd7d450d
DD
4909 { ac_try='test -z "$ac_c_werror_flag"
4910 || test ! -s conftest.err'
40a59a4c
DD
4911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4912 (eval $ac_try) 2>&5
4913 ac_status=$?
4914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4915 (exit $ac_status); }; } &&
4916 { ac_try='test -s conftest.$ac_objext'
4917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4918 (eval $ac_try) 2>&5
4919 ac_status=$?
4920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4921 (exit $ac_status); }; }; then
4922 ac_lo=$ac_mid; break
4923else
4924 echo "$as_me: failed program was:" >&5
4925sed 's/^/| /' conftest.$ac_ext >&5
4926
4927ac_hi=`expr '(' $ac_mid ')' - 1`
4928 if test $ac_mid -le $ac_hi; then
4929 ac_lo= ac_hi=
4930 break
4931 fi
4932 ac_mid=`expr 2 '*' $ac_mid`
4933fi
4934rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4935 done
4936else
4937 echo "$as_me: failed program was:" >&5
4938sed 's/^/| /' conftest.$ac_ext >&5
4939
4940ac_lo= ac_hi=
4941fi
4942rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4943fi
4944rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4945# Binary search between lo and hi bounds.
4946while test "x$ac_lo" != "x$ac_hi"; do
4947 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4948 cat >conftest.$ac_ext <<_ACEOF
4949/* confdefs.h. */
4950_ACEOF
4951cat confdefs.h >>conftest.$ac_ext
4952cat >>conftest.$ac_ext <<_ACEOF
4953/* end confdefs.h. */
4954$ac_includes_default
4955int
4956main ()
4957{
4958static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4959test_array [0] = 0
4960
4961 ;
4962 return 0;
4963}
4964_ACEOF
4965rm -f conftest.$ac_objext
4966if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4967 (eval $ac_compile) 2>conftest.er1
4968 ac_status=$?
4969 grep -v '^ *+' conftest.er1 >conftest.err
4970 rm -f conftest.er1
4971 cat conftest.err >&5
4972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4973 (exit $ac_status); } &&
fd7d450d
DD
4974 { ac_try='test -z "$ac_c_werror_flag"
4975 || test ! -s conftest.err'
40a59a4c
DD
4976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4977 (eval $ac_try) 2>&5
4978 ac_status=$?
4979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4980 (exit $ac_status); }; } &&
4981 { ac_try='test -s conftest.$ac_objext'
4982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4983 (eval $ac_try) 2>&5
4984 ac_status=$?
4985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4986 (exit $ac_status); }; }; then
4987 ac_hi=$ac_mid
4988else
4989 echo "$as_me: failed program was:" >&5
4990sed 's/^/| /' conftest.$ac_ext >&5
4991
4992ac_lo=`expr '(' $ac_mid ')' + 1`
4993fi
4994rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4995done
4996case $ac_lo in
4997?*) ac_cv_sizeof_int=$ac_lo;;
c8536f38
DD
4998'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
4999echo "$as_me: error: in \`$ac_pwd':" >&2;}
5000{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
40a59a4c
DD
5001See \`config.log' for more details." >&5
5002echo "$as_me: error: cannot compute sizeof (int), 77
5003See \`config.log' for more details." >&2;}
c8536f38 5004 { (exit 1); exit 1; }; }; } ;;
40a59a4c
DD
5005esac
5006else
5007 if test "$cross_compiling" = yes; then
c8536f38
DD
5008 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5009echo "$as_me: error: in \`$ac_pwd':" >&2;}
5010{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
fd7d450d
DD
5011See \`config.log' for more details." >&5
5012echo "$as_me: error: cannot run test program while cross compiling
5013See \`config.log' for more details." >&2;}
c8536f38 5014 { (exit 1); exit 1; }; }; }
40a59a4c
DD
5015else
5016 cat >conftest.$ac_ext <<_ACEOF
5017/* confdefs.h. */
5018_ACEOF
5019cat confdefs.h >>conftest.$ac_ext
5020cat >>conftest.$ac_ext <<_ACEOF
5021/* end confdefs.h. */
5022$ac_includes_default
5023long longval () { return (long) (sizeof (int)); }
5024unsigned long ulongval () { return (long) (sizeof (int)); }
5025#include <stdio.h>
5026#include <stdlib.h>
5027int
5028main ()
5029{
5030
5031 FILE *f = fopen ("conftest.val", "w");
5032 if (! f)
5033 exit (1);
5034 if (((long) (sizeof (int))) < 0)
5035 {
5036 long i = longval ();
5037 if (i != ((long) (sizeof (int))))
5038 exit (1);
5039 fprintf (f, "%ld\n", i);
5040 }
5041 else
5042 {
5043 unsigned long i = ulongval ();
5044 if (i != ((long) (sizeof (int))))
5045 exit (1);
5046 fprintf (f, "%lu\n", i);
5047 }
5048 exit (ferror (f) || fclose (f) != 0);
5049
5050 ;
5051 return 0;
5052}
5053_ACEOF
5054rm -f conftest$ac_exeext
5055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5056 (eval $ac_link) 2>&5
5057 ac_status=$?
5058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5059 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5061 (eval $ac_try) 2>&5
5062 ac_status=$?
5063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064 (exit $ac_status); }; }; then
5065 ac_cv_sizeof_int=`cat conftest.val`
5066else
5067 echo "$as_me: program exited with status $ac_status" >&5
5068echo "$as_me: failed program was:" >&5
5069sed 's/^/| /' conftest.$ac_ext >&5
5070
5071( exit $ac_status )
c8536f38
DD
5072{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5073echo "$as_me: error: in \`$ac_pwd':" >&2;}
40a59a4c
DD
5074{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5075See \`config.log' for more details." >&5
5076echo "$as_me: error: cannot compute sizeof (int), 77
5077See \`config.log' for more details." >&2;}
c8536f38 5078 { (exit 1); exit 1; }; }; }
40a59a4c
DD
5079fi
5080rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5081fi
5082fi
5083rm -f conftest.val
5084else
5085 ac_cv_sizeof_int=0
5086fi
5087fi
5088echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5089echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5090cat >>confdefs.h <<_ACEOF
5091#define SIZEOF_INT $ac_cv_sizeof_int
5092_ACEOF
5093
5094
5095
2299a76d
DJ
5096echo "$as_me:$LINENO: checking for uintptr_t" >&5
5097echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
5098if test "${ac_cv_type_uintptr_t+set}" = set; then
5099 echo $ECHO_N "(cached) $ECHO_C" >&6
5100else
5101 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
5102/* confdefs.h. */
5103_ACEOF
5104cat confdefs.h >>conftest.$ac_ext
5105cat >>conftest.$ac_ext <<_ACEOF
5106/* end confdefs.h. */
5107$ac_includes_default
5108int
5109main ()
5110{
5111if ((uintptr_t *) 0)
5112 return 0;
5113if (sizeof (uintptr_t))
5114 return 0;
5115 ;
5116 return 0;
5117}
5118_ACEOF
5119rm -f conftest.$ac_objext
5120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 5121 (eval $ac_compile) 2>conftest.er1
2299a76d 5122 ac_status=$?
58670637
DD
5123 grep -v '^ *+' conftest.er1 >conftest.err
5124 rm -f conftest.er1
5125 cat conftest.err >&5
2299a76d
DJ
5126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5127 (exit $ac_status); } &&
fd7d450d
DD
5128 { ac_try='test -z "$ac_c_werror_flag"
5129 || test ! -s conftest.err'
58670637
DD
5130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5131 (eval $ac_try) 2>&5
5132 ac_status=$?
5133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5134 (exit $ac_status); }; } &&
5135 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
5136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5137 (eval $ac_try) 2>&5
5138 ac_status=$?
5139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5140 (exit $ac_status); }; }; then
5141 ac_cv_type_uintptr_t=yes
5142else
5143 echo "$as_me: failed program was:" >&5
5144sed 's/^/| /' conftest.$ac_ext >&5
dc579051 5145
2299a76d
DJ
5146ac_cv_type_uintptr_t=no
5147fi
58670637 5148rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15ae9e71 5149fi
2299a76d
DJ
5150echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
5151echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
5152if test $ac_cv_type_uintptr_t = yes; then
5153 :
5154else
5155
5156cat >>confdefs.h <<_ACEOF
15ae9e71 5157#define uintptr_t unsigned long
2299a76d 5158_ACEOF
15ae9e71
DD
5159
5160fi
dc579051 5161
bb6a587d
DD
5162
5163# Look for a 64-bit type.
5164echo "$as_me:$LINENO: checking for a 64-bit type" >&5
5165echo $ECHO_N "checking for a 64-bit type... $ECHO_C" >&6
5166if test "${liberty_cv_uint64+set}" = set; then
5167 echo $ECHO_N "(cached) $ECHO_C" >&6
5168else
5169 cat >conftest.$ac_ext <<_ACEOF
5170/* confdefs.h. */
5171_ACEOF
5172cat confdefs.h >>conftest.$ac_ext
5173cat >>conftest.$ac_ext <<_ACEOF
5174/* end confdefs.h. */
5175#ifdef HAVE_STDINT_H
5176#include <stdint.h>
5177#endif
5178int
5179main ()
5180{
5181extern uint64_t foo;
5182 ;
5183 return 0;
5184}
5185_ACEOF
5186rm -f conftest.$ac_objext
5187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5188 (eval $ac_compile) 2>conftest.er1
5189 ac_status=$?
5190 grep -v '^ *+' conftest.er1 >conftest.err
5191 rm -f conftest.er1
5192 cat conftest.err >&5
5193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5194 (exit $ac_status); } &&
fd7d450d
DD
5195 { ac_try='test -z "$ac_c_werror_flag"
5196 || test ! -s conftest.err'
bb6a587d
DD
5197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5198 (eval $ac_try) 2>&5
5199 ac_status=$?
5200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5201 (exit $ac_status); }; } &&
5202 { ac_try='test -s conftest.$ac_objext'
5203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5204 (eval $ac_try) 2>&5
5205 ac_status=$?
5206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5207 (exit $ac_status); }; }; then
5208 liberty_cv_uint64=uint64_t
5209else
5210 echo "$as_me: failed program was:" >&5
5211sed 's/^/| /' conftest.$ac_ext >&5
5212
5213cat >conftest.$ac_ext <<_ACEOF
5214/* confdefs.h. */
5215_ACEOF
5216cat confdefs.h >>conftest.$ac_ext
5217cat >>conftest.$ac_ext <<_ACEOF
5218/* end confdefs.h. */
5219#ifdef HAVE_LIMITS_H
5220#include <limits.h>
5221#endif
5222#ifndef CHAR_BIT
5223#define CHAR_BIT 8
5224#endif
5225int
5226main ()
5227{
5228extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1];
5229 ;
5230 return 0;
5231}
5232_ACEOF
5233rm -f conftest.$ac_objext
5234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5235 (eval $ac_compile) 2>conftest.er1
5236 ac_status=$?
5237 grep -v '^ *+' conftest.er1 >conftest.err
5238 rm -f conftest.er1
5239 cat conftest.err >&5
5240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5241 (exit $ac_status); } &&
fd7d450d
DD
5242 { ac_try='test -z "$ac_c_werror_flag"
5243 || test ! -s conftest.err'
bb6a587d
DD
5244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5245 (eval $ac_try) 2>&5
5246 ac_status=$?
5247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5248 (exit $ac_status); }; } &&
5249 { ac_try='test -s conftest.$ac_objext'
5250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5251 (eval $ac_try) 2>&5
5252 ac_status=$?
5253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5254 (exit $ac_status); }; }; then
5255 liberty_cv_uint64="unsigned long"
5256else
5257 echo "$as_me: failed program was:" >&5
5258sed 's/^/| /' conftest.$ac_ext >&5
5259
5260cat >conftest.$ac_ext <<_ACEOF
5261/* confdefs.h. */
5262_ACEOF
5263cat confdefs.h >>conftest.$ac_ext
5264cat >>conftest.$ac_ext <<_ACEOF
5265/* end confdefs.h. */
5266#ifdef HAVE_LIMITS_H
5267#include <limits.h>
5268#endif
5269#ifndef CHAR_BIT
5270#define CHAR_BIT 8
5271#endif
5272int
5273main ()
5274{
5275extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1];
5276 ;
5277 return 0;
5278}
5279_ACEOF
5280rm -f conftest.$ac_objext
5281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5282 (eval $ac_compile) 2>conftest.er1
5283 ac_status=$?
5284 grep -v '^ *+' conftest.er1 >conftest.err
5285 rm -f conftest.er1
5286 cat conftest.err >&5
5287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5288 (exit $ac_status); } &&
fd7d450d
DD
5289 { ac_try='test -z "$ac_c_werror_flag"
5290 || test ! -s conftest.err'
bb6a587d
DD
5291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5292 (eval $ac_try) 2>&5
5293 ac_status=$?
5294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5295 (exit $ac_status); }; } &&
5296 { ac_try='test -s conftest.$ac_objext'
5297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5298 (eval $ac_try) 2>&5
5299 ac_status=$?
5300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5301 (exit $ac_status); }; }; then
5302 liberty_cv_uint64="unsigned long long"
5303else
5304 echo "$as_me: failed program was:" >&5
5305sed 's/^/| /' conftest.$ac_ext >&5
5306
5307liberty_cv_uint64=none
5308fi
5309rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5310fi
5311rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5312fi
5313rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5314fi
5315
5316echo "$as_me:$LINENO: result: $liberty_cv_uint64" >&5
5317echo "${ECHO_T}$liberty_cv_uint64" >&6
5318if test "$liberty_cv_uint64" != none; then
5319
7e9f5c71
DD
5320cat >>confdefs.h <<_ACEOF
5321#define UNSIGNED_64BIT_TYPE $liberty_cv_uint64
bb6a587d
DD
5322_ACEOF
5323
5324fi
5325
daf7c4ad
DD
5326# Given the above check, we always have uintptr_t or a fallback
5327# definition. So define HAVE_UINTPTR_T in case any imported code
5328# relies on it.
dc579051 5329
2299a76d
DJ
5330cat >>confdefs.h <<\_ACEOF
5331#define HAVE_UINTPTR_T 1
5332_ACEOF
5333
5334
5335echo "$as_me:$LINENO: checking for pid_t" >&5
5336echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5337if test "${ac_cv_type_pid_t+set}" = set; then
5338 echo $ECHO_N "(cached) $ECHO_C" >&6
5339else
5340 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
5341/* confdefs.h. */
5342_ACEOF
5343cat confdefs.h >>conftest.$ac_ext
5344cat >>conftest.$ac_ext <<_ACEOF
5345/* end confdefs.h. */
5346$ac_includes_default
5347int
5348main ()
5349{
5350if ((pid_t *) 0)
5351 return 0;
5352if (sizeof (pid_t))
5353 return 0;
5354 ;
5355 return 0;
5356}
5357_ACEOF
5358rm -f conftest.$ac_objext
5359if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 5360 (eval $ac_compile) 2>conftest.er1
2299a76d 5361 ac_status=$?
58670637
DD
5362 grep -v '^ *+' conftest.er1 >conftest.err
5363 rm -f conftest.er1
5364 cat conftest.err >&5
2299a76d
DJ
5365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5366 (exit $ac_status); } &&
fd7d450d
DD
5367 { ac_try='test -z "$ac_c_werror_flag"
5368 || test ! -s conftest.err'
58670637
DD
5369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5370 (eval $ac_try) 2>&5
5371 ac_status=$?
5372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5373 (exit $ac_status); }; } &&
5374 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
5375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5376 (eval $ac_try) 2>&5
5377 ac_status=$?
5378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5379 (exit $ac_status); }; }; then
cafa3917
DD
5380 ac_cv_type_pid_t=yes
5381else
2299a76d
DJ
5382 echo "$as_me: failed program was:" >&5
5383sed 's/^/| /' conftest.$ac_ext >&5
cafa3917 5384
2299a76d 5385ac_cv_type_pid_t=no
cafa3917 5386fi
58670637 5387rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2299a76d
DJ
5388fi
5389echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5390echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5391if test $ac_cv_type_pid_t = yes; then
5392 :
5393else
5394
5395cat >>confdefs.h <<_ACEOF
cafa3917 5396#define pid_t int
2299a76d 5397_ACEOF
cafa3917
DD
5398
5399fi
5400
5401
252b5132
RH
5402# This is the list of functions which libiberty will provide if they
5403# are not available on the host.
5404
5405funcs="asprintf"
5406funcs="$funcs atexit"
5407funcs="$funcs basename"
5408funcs="$funcs bcmp"
5409funcs="$funcs bcopy"
c6da642e 5410funcs="$funcs bsearch"
252b5132
RH
5411funcs="$funcs bzero"
5412funcs="$funcs calloc"
5413funcs="$funcs clock"
7b78baae 5414funcs="$funcs ffs"
252b5132
RH
5415funcs="$funcs getcwd"
5416funcs="$funcs getpagesize"
0fad4bdb 5417funcs="$funcs gettimeofday"
252b5132
RH
5418funcs="$funcs index"
5419funcs="$funcs insque"
5420funcs="$funcs memchr"
5421funcs="$funcs memcmp"
5422funcs="$funcs memcpy"
5423funcs="$funcs memmove"
10b57b38 5424funcs="$funcs mempcpy"
252b5132
RH
5425funcs="$funcs memset"
5426funcs="$funcs mkstemps"
0c0a36a4 5427funcs="$funcs putenv"
252b5132
RH
5428funcs="$funcs random"
5429funcs="$funcs rename"
5430funcs="$funcs rindex"
0c0a36a4 5431funcs="$funcs setenv"
2ed1e5cc 5432funcs="$funcs snprintf"
252b5132 5433funcs="$funcs sigsetmask"
10b57b38
DD
5434funcs="$funcs stpcpy"
5435funcs="$funcs stpncpy"
252b5132
RH
5436funcs="$funcs strcasecmp"
5437funcs="$funcs strchr"
5438funcs="$funcs strdup"
5439funcs="$funcs strncasecmp"
0fad4bdb 5440funcs="$funcs strndup"
252b5132
RH
5441funcs="$funcs strrchr"
5442funcs="$funcs strstr"
5443funcs="$funcs strtod"
5444funcs="$funcs strtol"
5445funcs="$funcs strtoul"
67f3cb05 5446funcs="$funcs strverscmp"
252b5132
RH
5447funcs="$funcs tmpnam"
5448funcs="$funcs vasprintf"
5449funcs="$funcs vfprintf"
5450funcs="$funcs vprintf"
2ed1e5cc 5451funcs="$funcs vsnprintf"
252b5132
RH
5452funcs="$funcs vsprintf"
5453funcs="$funcs waitpid"
5454
5455# Also in the old function.def file: alloca, vfork, getopt.
5456
e69f6c8c 5457vars="sys_errlist sys_nerr sys_siglist"
252b5132 5458
0c0a36a4 5459checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
192cbe66 5460checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
ac119ae8 5461checkfuncs="$checkfuncs getsysinfo table sysctl wait3 wait4 __fsetlocking"
252b5132
RH
5462
5463# These are neither executed nor required, but they help keep
5464# autoheader happy without adding a bunch of text to acconfig.h.
5465if test "x" = "y"; then
252b5132 5466
252b5132 5467
2299a76d
DJ
5468
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
0fad4bdb
DD
5526
5527
aa55ccb1
DD
5528
5529
2299a76d 5530
ac119ae8 5531
67f3cb05 5532
2299a76d
DJ
5533
5534
5535for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
0fad4bdb 5536 getcwd getpagesize gettimeofday index insque mkstemps memchr memcmp memcpy \
2299a76d 5537 memmove mempcpy memset putenv random rename rindex sigsetmask \
0fad4bdb 5538 strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strndup strrchr strstr \
67f3cb05 5539 strtod strtol strtoul strverscmp tmpnam vasprintf vfprintf vprintf \
2299a76d
DJ
5540 vsprintf waitpid getrusage on_exit psignal strerror strsignal \
5541 sysconf times sbrk gettimeofday ffs snprintf vsnprintf \
b109e79a 5542 pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl wait3 wait4 \
ac119ae8 5543 realpath canonicalize_file_name __fsetlocking
2299a76d
DJ
5544do
5545as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5546echo "$as_me:$LINENO: checking for $ac_func" >&5
5547echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5548if eval "test \"\${$as_ac_var+set}\" = set"; then
5549 echo $ECHO_N "(cached) $ECHO_C" >&6
5550else
5551 if test x$gcc_no_link = xyes; then
5552 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5553echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5554 { (exit 1); exit 1; }; }
5555fi
5556cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
5557/* confdefs.h. */
5558_ACEOF
5559cat confdefs.h >>conftest.$ac_ext
5560cat >>conftest.$ac_ext <<_ACEOF
5561/* end confdefs.h. */
5562/* System header to define __stub macros and hopefully few prototypes,
5563 which can conflict with char $ac_func (); below.
5564 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
5565 <limits.h> exists even on freestanding compilers. Under hpux,
5566 including <limits.h> includes <sys/time.h> and causes problems
5567 checking for functions defined therein. */
5568#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
5569# include <limits.h>
5570#else
5571# include <assert.h>
5572#endif
5573/* Override any gcc2 internal prototype to avoid an error. */
5574#ifdef __cplusplus
5575extern "C"
5576{
5577#endif
5578/* We use char because int might match the return type of a gcc2
5579 builtin and then its argument prototype would still apply. */
5580char $ac_func ();
5581/* The GNU C library defines this for functions which it implements
252b5132
RH
5582 to always fail with ENOSYS. Some functions are actually named
5583 something starting with __ and the normal name is an alias. */
5584#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5585choke me
5586#else
2299a76d
DJ
5587char (*f) () = $ac_func;
5588#endif
5589#ifdef __cplusplus
5590}
252b5132
RH
5591#endif
5592
2299a76d
DJ
5593int
5594main ()
5595{
5596return f != $ac_func;
5597 ;
5598 return 0;
5599}
5600_ACEOF
5601rm -f conftest.$ac_objext conftest$ac_exeext
5602if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 5603 (eval $ac_link) 2>conftest.er1
2299a76d 5604 ac_status=$?
58670637
DD
5605 grep -v '^ *+' conftest.er1 >conftest.err
5606 rm -f conftest.er1
5607 cat conftest.err >&5
2299a76d
DJ
5608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5609 (exit $ac_status); } &&
fd7d450d
DD
5610 { ac_try='test -z "$ac_c_werror_flag"
5611 || test ! -s conftest.err'
58670637
DD
5612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5613 (eval $ac_try) 2>&5
5614 ac_status=$?
5615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5616 (exit $ac_status); }; } &&
5617 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
5618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5619 (eval $ac_try) 2>&5
5620 ac_status=$?
5621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5622 (exit $ac_status); }; }; then
5623 eval "$as_ac_var=yes"
5624else
5625 echo "$as_me: failed program was:" >&5
5626sed 's/^/| /' conftest.$ac_ext >&5
5627
5628eval "$as_ac_var=no"
5629fi
58670637
DD
5630rm -f conftest.err conftest.$ac_objext \
5631 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
5632fi
5633echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5634echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5635if test `eval echo '${'$as_ac_var'}'` = yes; then
5636 cat >>confdefs.h <<_ACEOF
5637#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5638_ACEOF
900d2082 5639
252b5132
RH
5640fi
5641done
5642
41c953f9
DD
5643 echo "$as_me:$LINENO: checking whether basename is declared" >&5
5644echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6
5645if test "${ac_cv_have_decl_basename+set}" = set; then
5646 echo $ECHO_N "(cached) $ECHO_C" >&6
5647else
5648 cat >conftest.$ac_ext <<_ACEOF
5649/* confdefs.h. */
5650_ACEOF
5651cat confdefs.h >>conftest.$ac_ext
5652cat >>conftest.$ac_ext <<_ACEOF
5653/* end confdefs.h. */
5654$ac_includes_default
5655int
5656main ()
5657{
5658#ifndef basename
5659 char *p = (char *) basename;
5660#endif
5661
5662 ;
5663 return 0;
5664}
5665_ACEOF
5666rm -f conftest.$ac_objext
5667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5668 (eval $ac_compile) 2>conftest.er1
5669 ac_status=$?
5670 grep -v '^ *+' conftest.er1 >conftest.err
5671 rm -f conftest.er1
5672 cat conftest.err >&5
5673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5674 (exit $ac_status); } &&
fd7d450d
DD
5675 { ac_try='test -z "$ac_c_werror_flag"
5676 || test ! -s conftest.err'
41c953f9
DD
5677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5678 (eval $ac_try) 2>&5
5679 ac_status=$?
5680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5681 (exit $ac_status); }; } &&
5682 { ac_try='test -s conftest.$ac_objext'
5683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5684 (eval $ac_try) 2>&5
5685 ac_status=$?
5686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5687 (exit $ac_status); }; }; then
5688 ac_cv_have_decl_basename=yes
5689else
5690 echo "$as_me: failed program was:" >&5
5691sed 's/^/| /' conftest.$ac_ext >&5
5692
5693ac_cv_have_decl_basename=no
5694fi
5695rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5696fi
5697echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5
5698echo "${ECHO_T}$ac_cv_have_decl_basename" >&6
5699if test $ac_cv_have_decl_basename = yes; then
5700
5701cat >>confdefs.h <<_ACEOF
5702#define HAVE_DECL_BASENAME 1
5703_ACEOF
5704
5705
5706else
5707 cat >>confdefs.h <<_ACEOF
5708#define HAVE_DECL_BASENAME 0
5709_ACEOF
5710
5711
5712fi
5713echo "$as_me:$LINENO: checking whether ffs is declared" >&5
5714echo $ECHO_N "checking whether ffs is declared... $ECHO_C" >&6
5715if test "${ac_cv_have_decl_ffs+set}" = set; then
5716 echo $ECHO_N "(cached) $ECHO_C" >&6
5717else
5718 cat >conftest.$ac_ext <<_ACEOF
5719/* confdefs.h. */
5720_ACEOF
5721cat confdefs.h >>conftest.$ac_ext
5722cat >>conftest.$ac_ext <<_ACEOF
5723/* end confdefs.h. */
5724$ac_includes_default
5725int
5726main ()
5727{
5728#ifndef ffs
5729 char *p = (char *) ffs;
5730#endif
5731
5732 ;
5733 return 0;
5734}
5735_ACEOF
5736rm -f conftest.$ac_objext
5737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5738 (eval $ac_compile) 2>conftest.er1
5739 ac_status=$?
5740 grep -v '^ *+' conftest.er1 >conftest.err
5741 rm -f conftest.er1
5742 cat conftest.err >&5
5743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5744 (exit $ac_status); } &&
fd7d450d
DD
5745 { ac_try='test -z "$ac_c_werror_flag"
5746 || test ! -s conftest.err'
41c953f9
DD
5747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5748 (eval $ac_try) 2>&5
5749 ac_status=$?
5750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5751 (exit $ac_status); }; } &&
5752 { ac_try='test -s conftest.$ac_objext'
5753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5754 (eval $ac_try) 2>&5
5755 ac_status=$?
5756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5757 (exit $ac_status); }; }; then
5758 ac_cv_have_decl_ffs=yes
5759else
5760 echo "$as_me: failed program was:" >&5
5761sed 's/^/| /' conftest.$ac_ext >&5
5762
5763ac_cv_have_decl_ffs=no
5764fi
5765rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5766fi
5767echo "$as_me:$LINENO: result: $ac_cv_have_decl_ffs" >&5
5768echo "${ECHO_T}$ac_cv_have_decl_ffs" >&6
5769if test $ac_cv_have_decl_ffs = yes; then
5770
5771cat >>confdefs.h <<_ACEOF
5772#define HAVE_DECL_FFS 1
5773_ACEOF
5774
5775
5776else
5777 cat >>confdefs.h <<_ACEOF
5778#define HAVE_DECL_FFS 0
5779_ACEOF
5780
5781
5782fi
5783echo "$as_me:$LINENO: checking whether asprintf is declared" >&5
5784echo $ECHO_N "checking whether asprintf is declared... $ECHO_C" >&6
5785if test "${ac_cv_have_decl_asprintf+set}" = set; then
5786 echo $ECHO_N "(cached) $ECHO_C" >&6
5787else
5788 cat >conftest.$ac_ext <<_ACEOF
5789/* confdefs.h. */
5790_ACEOF
5791cat confdefs.h >>conftest.$ac_ext
5792cat >>conftest.$ac_ext <<_ACEOF
5793/* end confdefs.h. */
5794$ac_includes_default
5795int
5796main ()
5797{
5798#ifndef asprintf
5799 char *p = (char *) asprintf;
5800#endif
5801
5802 ;
5803 return 0;
5804}
5805_ACEOF
5806rm -f conftest.$ac_objext
5807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5808 (eval $ac_compile) 2>conftest.er1
5809 ac_status=$?
5810 grep -v '^ *+' conftest.er1 >conftest.err
5811 rm -f conftest.er1
5812 cat conftest.err >&5
5813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5814 (exit $ac_status); } &&
fd7d450d
DD
5815 { ac_try='test -z "$ac_c_werror_flag"
5816 || test ! -s conftest.err'
41c953f9
DD
5817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5818 (eval $ac_try) 2>&5
5819 ac_status=$?
5820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5821 (exit $ac_status); }; } &&
5822 { ac_try='test -s conftest.$ac_objext'
5823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5824 (eval $ac_try) 2>&5
5825 ac_status=$?
5826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5827 (exit $ac_status); }; }; then
5828 ac_cv_have_decl_asprintf=yes
5829else
5830 echo "$as_me: failed program was:" >&5
5831sed 's/^/| /' conftest.$ac_ext >&5
5832
5833ac_cv_have_decl_asprintf=no
5834fi
5835rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5836fi
5837echo "$as_me:$LINENO: result: $ac_cv_have_decl_asprintf" >&5
5838echo "${ECHO_T}$ac_cv_have_decl_asprintf" >&6
5839if test $ac_cv_have_decl_asprintf = yes; then
5840
5841cat >>confdefs.h <<_ACEOF
5842#define HAVE_DECL_ASPRINTF 1
5843_ACEOF
5844
5845
5846else
5847 cat >>confdefs.h <<_ACEOF
5848#define HAVE_DECL_ASPRINTF 0
5849_ACEOF
5850
5851
5852fi
5853echo "$as_me:$LINENO: checking whether vasprintf is declared" >&5
5854echo $ECHO_N "checking whether vasprintf is declared... $ECHO_C" >&6
5855if test "${ac_cv_have_decl_vasprintf+set}" = set; then
5856 echo $ECHO_N "(cached) $ECHO_C" >&6
5857else
5858 cat >conftest.$ac_ext <<_ACEOF
5859/* confdefs.h. */
5860_ACEOF
5861cat confdefs.h >>conftest.$ac_ext
5862cat >>conftest.$ac_ext <<_ACEOF
5863/* end confdefs.h. */
5864$ac_includes_default
5865int
5866main ()
5867{
5868#ifndef vasprintf
5869 char *p = (char *) vasprintf;
5870#endif
5871
5872 ;
5873 return 0;
5874}
5875_ACEOF
5876rm -f conftest.$ac_objext
5877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5878 (eval $ac_compile) 2>conftest.er1
5879 ac_status=$?
5880 grep -v '^ *+' conftest.er1 >conftest.err
5881 rm -f conftest.er1
5882 cat conftest.err >&5
5883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5884 (exit $ac_status); } &&
fd7d450d
DD
5885 { ac_try='test -z "$ac_c_werror_flag"
5886 || test ! -s conftest.err'
41c953f9
DD
5887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5888 (eval $ac_try) 2>&5
5889 ac_status=$?
5890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5891 (exit $ac_status); }; } &&
5892 { ac_try='test -s conftest.$ac_objext'
5893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5894 (eval $ac_try) 2>&5
5895 ac_status=$?
5896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5897 (exit $ac_status); }; }; then
5898 ac_cv_have_decl_vasprintf=yes
5899else
5900 echo "$as_me: failed program was:" >&5
5901sed 's/^/| /' conftest.$ac_ext >&5
5902
5903ac_cv_have_decl_vasprintf=no
5904fi
5905rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5906fi
5907echo "$as_me:$LINENO: result: $ac_cv_have_decl_vasprintf" >&5
5908echo "${ECHO_T}$ac_cv_have_decl_vasprintf" >&6
5909if test $ac_cv_have_decl_vasprintf = yes; then
5910
5911cat >>confdefs.h <<_ACEOF
5912#define HAVE_DECL_VASPRINTF 1
5913_ACEOF
5914
5915
5916else
5917 cat >>confdefs.h <<_ACEOF
5918#define HAVE_DECL_VASPRINTF 0
5919_ACEOF
5920
5921
01e94249
DD
5922fi
5923echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
5924echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
5925if test "${ac_cv_have_decl_snprintf+set}" = set; then
5926 echo $ECHO_N "(cached) $ECHO_C" >&6
5927else
5928 cat >conftest.$ac_ext <<_ACEOF
5929/* confdefs.h. */
5930_ACEOF
5931cat confdefs.h >>conftest.$ac_ext
5932cat >>conftest.$ac_ext <<_ACEOF
5933/* end confdefs.h. */
5934$ac_includes_default
5935int
5936main ()
5937{
5938#ifndef snprintf
5939 char *p = (char *) snprintf;
5940#endif
5941
5942 ;
5943 return 0;
5944}
5945_ACEOF
5946rm -f conftest.$ac_objext
5947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5948 (eval $ac_compile) 2>conftest.er1
5949 ac_status=$?
5950 grep -v '^ *+' conftest.er1 >conftest.err
5951 rm -f conftest.er1
5952 cat conftest.err >&5
5953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5954 (exit $ac_status); } &&
fd7d450d
DD
5955 { ac_try='test -z "$ac_c_werror_flag"
5956 || test ! -s conftest.err'
01e94249
DD
5957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5958 (eval $ac_try) 2>&5
5959 ac_status=$?
5960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5961 (exit $ac_status); }; } &&
5962 { ac_try='test -s conftest.$ac_objext'
5963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5964 (eval $ac_try) 2>&5
5965 ac_status=$?
5966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5967 (exit $ac_status); }; }; then
5968 ac_cv_have_decl_snprintf=yes
5969else
5970 echo "$as_me: failed program was:" >&5
5971sed 's/^/| /' conftest.$ac_ext >&5
5972
5973ac_cv_have_decl_snprintf=no
5974fi
5975rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5976fi
5977echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
5978echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
5979if test $ac_cv_have_decl_snprintf = yes; then
5980
5981cat >>confdefs.h <<_ACEOF
5982#define HAVE_DECL_SNPRINTF 1
5983_ACEOF
5984
5985
5986else
5987 cat >>confdefs.h <<_ACEOF
5988#define HAVE_DECL_SNPRINTF 0
5989_ACEOF
5990
5991
5992fi
5993echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
5994echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
5995if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
5996 echo $ECHO_N "(cached) $ECHO_C" >&6
5997else
5998 cat >conftest.$ac_ext <<_ACEOF
5999/* confdefs.h. */
6000_ACEOF
6001cat confdefs.h >>conftest.$ac_ext
6002cat >>conftest.$ac_ext <<_ACEOF
6003/* end confdefs.h. */
6004$ac_includes_default
6005int
6006main ()
6007{
6008#ifndef vsnprintf
6009 char *p = (char *) vsnprintf;
6010#endif
6011
6012 ;
6013 return 0;
6014}
6015_ACEOF
6016rm -f conftest.$ac_objext
6017if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6018 (eval $ac_compile) 2>conftest.er1
6019 ac_status=$?
6020 grep -v '^ *+' conftest.er1 >conftest.err
6021 rm -f conftest.er1
6022 cat conftest.err >&5
6023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6024 (exit $ac_status); } &&
fd7d450d
DD
6025 { ac_try='test -z "$ac_c_werror_flag"
6026 || test ! -s conftest.err'
01e94249
DD
6027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6028 (eval $ac_try) 2>&5
6029 ac_status=$?
6030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6031 (exit $ac_status); }; } &&
6032 { ac_try='test -s conftest.$ac_objext'
6033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6034 (eval $ac_try) 2>&5
6035 ac_status=$?
6036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6037 (exit $ac_status); }; }; then
6038 ac_cv_have_decl_vsnprintf=yes
6039else
6040 echo "$as_me: failed program was:" >&5
6041sed 's/^/| /' conftest.$ac_ext >&5
6042
6043ac_cv_have_decl_vsnprintf=no
6044fi
6045rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6046fi
6047echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
6048echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
6049if test $ac_cv_have_decl_vsnprintf = yes; then
6050
6051cat >>confdefs.h <<_ACEOF
6052#define HAVE_DECL_VSNPRINTF 1
6053_ACEOF
6054
6055
6056else
6057 cat >>confdefs.h <<_ACEOF
6058#define HAVE_DECL_VSNPRINTF 0
6059_ACEOF
6060
6061
41c953f9
DD
6062fi
6063
6064
2299a76d
DJ
6065
6066cat >>confdefs.h <<\_ACEOF
92655e19 6067#define HAVE_SYS_ERRLIST 1
2299a76d
DJ
6068_ACEOF
6069
92655e19 6070
2299a76d 6071cat >>confdefs.h <<\_ACEOF
c6da642e 6072#define HAVE_SYS_NERR 1
2299a76d
DJ
6073_ACEOF
6074
92655e19 6075
2299a76d 6076cat >>confdefs.h <<\_ACEOF
92655e19 6077#define HAVE_SYS_SIGLIST 1
2299a76d 6078_ACEOF
92655e19 6079
252b5132
RH
6080fi
6081
6082# For each of these functions, if the host does not provide the
6083# function we want to put FN.o in LIBOBJS, and if the host does
30673bf5 6084# provide the function, we want to define HAVE_FN in config.h.
252b5132
RH
6085
6086setobjs=
0c0a36a4 6087CHECK=
50d4562d 6088target_header_dir=
252b5132
RH
6089if test -n "${with_target_subdir}"; then
6090
6091 # We are being configured as a target library. AC_REPLACE_FUNCS
6092 # may not work correctly, because the compiler may not be able to
6093 # link executables. Note that we may still be being configured
6094 # native.
6095
6096 # If we are being configured for newlib, we know which functions
6097 # newlib provide and which ones we will be expected to provide.
6098
6099 if test "x${with_newlib}" = "xyes"; then
58670637
DD
6100 case $LIBOBJS in
6101 "asprintf.$ac_objext" | \
6102 *" asprintf.$ac_objext" | \
6103 "asprintf.$ac_objext "* | \
6104 *" asprintf.$ac_objext "* ) ;;
6105 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;;
6106esac
6107
6108 case $LIBOBJS in
6109 "basename.$ac_objext" | \
6110 *" basename.$ac_objext" | \
6111 "basename.$ac_objext "* | \
6112 *" basename.$ac_objext "* ) ;;
6113 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
6114esac
6115
6116 case $LIBOBJS in
6117 "insque.$ac_objext" | \
6118 *" insque.$ac_objext" | \
6119 "insque.$ac_objext "* | \
6120 *" insque.$ac_objext "* ) ;;
6121 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
6122esac
6123
6124 case $LIBOBJS in
6125 "random.$ac_objext" | \
6126 *" random.$ac_objext" | \
6127 "random.$ac_objext "* | \
6128 *" random.$ac_objext "* ) ;;
6129 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
6130esac
6131
6132 case $LIBOBJS in
6133 "strdup.$ac_objext" | \
6134 *" strdup.$ac_objext" | \
6135 "strdup.$ac_objext "* | \
6136 *" strdup.$ac_objext "* ) ;;
6137 *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
6138esac
6139
6140 case $LIBOBJS in
6141 "vasprintf.$ac_objext" | \
6142 *" vasprintf.$ac_objext" | \
6143 "vasprintf.$ac_objext "* | \
6144 *" vasprintf.$ac_objext "* ) ;;
6145 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
6146esac
6147
252b5132
RH
6148
6149 for f in $funcs; do
6150 case "$f" in
6151 asprintf | basename | insque | random | strdup | vasprintf)
6152 ;;
6153 *)
6154 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2299a76d 6155 cat >>confdefs.h <<_ACEOF
252b5132 6156#define $n 1
2299a76d 6157_ACEOF
252b5132
RH
6158
6159 ;;
6160 esac
6161 done
6162
6163 # newlib doesnt provide any of the variables in $vars, so we
6164 # dont have to check them here.
6165
6166 # Of the functions in $checkfuncs, newlib only has strerror.
0093138c 6167 cat >>confdefs.h <<\_ACEOF
252b5132 6168#define HAVE_STRERROR 1
0093138c 6169_ACEOF
252b5132
RH
6170
6171
6172 setobjs=yes
6173
6174 fi
0c0a36a4 6175
069e4b19
CV
6176 # If we are being configured for Mingw, we know which functions
6177 # Mingw provides and which ones we will be expected to provide.
6178
6179 case "${host}" in
6180 *-*-mingw*)
6181 case $LIBOBJS in
6182 "asprintf.$ac_objext" | \
6183 *" asprintf.$ac_objext" | \
6184 "asprintf.$ac_objext "* | \
6185 *" asprintf.$ac_objext "* ) ;;
6186 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;;
6187esac
6188
6189 case $LIBOBJS in
6190 "basename.$ac_objext" | \
6191 *" basename.$ac_objext" | \
6192 "basename.$ac_objext "* | \
6193 *" basename.$ac_objext "* ) ;;
6194 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
6195esac
6196
6197 case $LIBOBJS in
6198 "bcmp.$ac_objext" | \
6199 *" bcmp.$ac_objext" | \
6200 "bcmp.$ac_objext "* | \
6201 *" bcmp.$ac_objext "* ) ;;
6202 *) LIBOBJS="$LIBOBJS bcmp.$ac_objext" ;;
6203esac
6204
6205 case $LIBOBJS in
6206 "bcopy.$ac_objext" | \
6207 *" bcopy.$ac_objext" | \
6208 "bcopy.$ac_objext "* | \
6209 *" bcopy.$ac_objext "* ) ;;
6210 *) LIBOBJS="$LIBOBJS bcopy.$ac_objext" ;;
6211esac
6212
6213 case $LIBOBJS in
6214 "bzero.$ac_objext" | \
6215 *" bzero.$ac_objext" | \
6216 "bzero.$ac_objext "* | \
6217 *" bzero.$ac_objext "* ) ;;
6218 *) LIBOBJS="$LIBOBJS bzero.$ac_objext" ;;
6219esac
6220
6221 case $LIBOBJS in
6222 "clock.$ac_objext" | \
6223 *" clock.$ac_objext" | \
6224 "clock.$ac_objext "* | \
6225 *" clock.$ac_objext "* ) ;;
6226 *) LIBOBJS="$LIBOBJS clock.$ac_objext" ;;
6227esac
6228
6229 case $LIBOBJS in
6230 "ffs.$ac_objext" | \
6231 *" ffs.$ac_objext" | \
6232 "ffs.$ac_objext "* | \
6233 *" ffs.$ac_objext "* ) ;;
6234 *) LIBOBJS="$LIBOBJS ffs.$ac_objext" ;;
6235esac
6236
6237 case $LIBOBJS in
6238 "getpagesize.$ac_objext" | \
6239 *" getpagesize.$ac_objext" | \
6240 "getpagesize.$ac_objext "* | \
6241 *" getpagesize.$ac_objext "* ) ;;
6242 *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;;
6243esac
6244
6245 case $LIBOBJS in
6246 "index.$ac_objext" | \
6247 *" index.$ac_objext" | \
6248 "index.$ac_objext "* | \
6249 *" index.$ac_objext "* ) ;;
6250 *) LIBOBJS="$LIBOBJS index.$ac_objext" ;;
6251esac
6252
6253 case $LIBOBJS in
6254 "insque.$ac_objext" | \
6255 *" insque.$ac_objext" | \
6256 "insque.$ac_objext "* | \
6257 *" insque.$ac_objext "* ) ;;
6258 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
6259esac
6260
6261 case $LIBOBJS in
6262 "mempcpy.$ac_objext" | \
6263 *" mempcpy.$ac_objext" | \
6264 "mempcpy.$ac_objext "* | \
6265 *" mempcpy.$ac_objext "* ) ;;
6266 *) LIBOBJS="$LIBOBJS mempcpy.$ac_objext" ;;
6267esac
6268
6269 case $LIBOBJS in
6270 "mkstemps.$ac_objext" | \
6271 *" mkstemps.$ac_objext" | \
6272 "mkstemps.$ac_objext "* | \
6273 *" mkstemps.$ac_objext "* ) ;;
6274 *) LIBOBJS="$LIBOBJS mkstemps.$ac_objext" ;;
6275esac
6276
6277 case $LIBOBJS in
6278 "random.$ac_objext" | \
6279 *" random.$ac_objext" | \
6280 "random.$ac_objext "* | \
6281 *" random.$ac_objext "* ) ;;
6282 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
6283esac
6284
6285 case $LIBOBJS in
6286 "rindex.$ac_objext" | \
6287 *" rindex.$ac_objext" | \
6288 "rindex.$ac_objext "* | \
6289 *" rindex.$ac_objext "* ) ;;
6290 *) LIBOBJS="$LIBOBJS rindex.$ac_objext" ;;
6291esac
6292
6293 case $LIBOBJS in
6294 "sigsetmask.$ac_objext" | \
6295 *" sigsetmask.$ac_objext" | \
6296 "sigsetmask.$ac_objext "* | \
6297 *" sigsetmask.$ac_objext "* ) ;;
6298 *) LIBOBJS="$LIBOBJS sigsetmask.$ac_objext" ;;
6299esac
6300
6301 case $LIBOBJS in
6302 "stpcpy.$ac_objext" | \
6303 *" stpcpy.$ac_objext" | \
6304 "stpcpy.$ac_objext "* | \
6305 *" stpcpy.$ac_objext "* ) ;;
6306 *) LIBOBJS="$LIBOBJS stpcpy.$ac_objext" ;;
6307esac
6308
6309 case $LIBOBJS in
6310 "stpncpy.$ac_objext" | \
6311 *" stpncpy.$ac_objext" | \
6312 "stpncpy.$ac_objext "* | \
6313 *" stpncpy.$ac_objext "* ) ;;
6314 *) LIBOBJS="$LIBOBJS stpncpy.$ac_objext" ;;
6315esac
6316
6317 case $LIBOBJS in
6318 "strndup.$ac_objext" | \
6319 *" strndup.$ac_objext" | \
6320 "strndup.$ac_objext "* | \
6321 *" strndup.$ac_objext "* ) ;;
6322 *) LIBOBJS="$LIBOBJS strndup.$ac_objext" ;;
6323esac
6324
6325 case $LIBOBJS in
6326 "strverscmp.$ac_objext" | \
6327 *" strverscmp.$ac_objext" | \
6328 "strverscmp.$ac_objext "* | \
6329 *" strverscmp.$ac_objext "* ) ;;
6330 *) LIBOBJS="$LIBOBJS strverscmp.$ac_objext" ;;
6331esac
6332
6333 case $LIBOBJS in
6334 "vasprintf.$ac_objext" | \
6335 *" vasprintf.$ac_objext" | \
6336 "vasprintf.$ac_objext "* | \
6337 *" vasprintf.$ac_objext "* ) ;;
6338 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
6339esac
6340
6341 case $LIBOBJS in
6342 "waitpid.$ac_objext" | \
6343 *" waitpid.$ac_objext" | \
6344 "waitpid.$ac_objext "* | \
6345 *" waitpid.$ac_objext "* ) ;;
6346 *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;;
6347esac
6348
6349
6350 for f in $funcs; do
6351 case "$f" in
6352 asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strverscmp | vasprintf | waitpid)
6353 ;;
6354 *)
6355 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6356 cat >>confdefs.h <<_ACEOF
6357#define $n 1
6358_ACEOF
6359
6360 ;;
6361 esac
6362 done
6363
6364 # Mingw doesnt provide any of the variables in $vars, so we
6365 # dont have to check them here.
6366
6367 # Of the functions in $checkfuncs, Mingw only has strerror.
6368 cat >>confdefs.h <<\_ACEOF
6369#define HAVE_STRERROR 1
6370_ACEOF
6371
6372
6373 setobjs=yes
6374 ;;
6375
6376 esac
6377
50d4562d
DD
6378 # We may wish to install the target headers somewhere.
6379 # Check whether --enable-install-libiberty or --disable-install-libiberty was given.
6380if test "${enable_install_libiberty+set}" = set; then
6381 enableval="$enable_install_libiberty"
6382 enable_install_libiberty=$enableval
6383else
6384 enable_install_libiberty=no
2299a76d 6385fi;
50d4562d
DD
6386 # Option parsed, now set things appropriately.
6387 case x"$enable_install_libiberty" in
6388 xyes|x)
6389 target_header_dir=libiberty
6390 ;;
2299a76d 6391 xno)
50d4562d
DD
6392 target_header_dir=
6393 ;;
2299a76d 6394 *)
50d4562d
DD
6395 # This could be sanity-checked in various ways...
6396 target_header_dir="${enable_install_libiberty}"
6397 ;;
6398 esac
6399
6400
0c0a36a4
ILT
6401else
6402
6403 # Not a target library, so we set things up to run the test suite.
b109e79a 6404 CHECK=really-check
0c0a36a4 6405
252b5132
RH
6406fi
6407
0c0a36a4
ILT
6408
6409
50d4562d 6410
f01b59ed 6411case "${host}" in
bef8b55d 6412 *-*-cygwin* | *-*-mingw*)
0093138c 6413 cat >>confdefs.h <<\_ACEOF
f01b59ed 6414#define HAVE_SYS_ERRLIST 1
0093138c 6415_ACEOF
f01b59ed 6416
0093138c 6417 cat >>confdefs.h <<\_ACEOF
f01b59ed 6418#define HAVE_SYS_NERR 1
0093138c 6419_ACEOF
f01b59ed
DD
6420
6421 ;;
6422esac
6423
252b5132
RH
6424if test -z "${setobjs}"; then
6425 case "${host}" in
6426
6427 *-*-vxworks*)
6428 # Handle VxWorks configuration specially, since on VxWorks the
6429 # libraries are actually on the target board, not in the file
6430 # system.
58670637
DD
6431 case $LIBOBJS in
6432 "basename.$ac_objext" | \
6433 *" basename.$ac_objext" | \
6434 "basename.$ac_objext "* | \
6435 *" basename.$ac_objext "* ) ;;
6436 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
6437esac
6438
6439 case $LIBOBJS in
6440 "getpagesize.$ac_objext" | \
6441 *" getpagesize.$ac_objext" | \
6442 "getpagesize.$ac_objext "* | \
6443 *" getpagesize.$ac_objext "* ) ;;
6444 *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;;
6445esac
6446
6447 case $LIBOBJS in
6448 "insque.$ac_objext" | \
6449 *" insque.$ac_objext" | \
6450 "insque.$ac_objext "* | \
6451 *" insque.$ac_objext "* ) ;;
6452 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
6453esac
6454
6455 case $LIBOBJS in
6456 "random.$ac_objext" | \
6457 *" random.$ac_objext" | \
6458 "random.$ac_objext "* | \
6459 *" random.$ac_objext "* ) ;;
6460 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
6461esac
6462
6463 case $LIBOBJS in
6464 "strcasecmp.$ac_objext" | \
6465 *" strcasecmp.$ac_objext" | \
6466 "strcasecmp.$ac_objext "* | \
6467 *" strcasecmp.$ac_objext "* ) ;;
6468 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" ;;
6469esac
6470
6471 case $LIBOBJS in
6472 "strncasecmp.$ac_objext" | \
6473 *" strncasecmp.$ac_objext" | \
6474 "strncasecmp.$ac_objext "* | \
6475 *" strncasecmp.$ac_objext "* ) ;;
6476 *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;;
6477esac
6478
6479 case $LIBOBJS in
6480 "strdup.$ac_objext" | \
6481 *" strdup.$ac_objext" | \
6482 "strdup.$ac_objext "* | \
6483 *" strdup.$ac_objext "* ) ;;
6484 *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
6485esac
6486
6487 case $LIBOBJS in
6488 "vfork.$ac_objext" | \
6489 *" vfork.$ac_objext" | \
6490 "vfork.$ac_objext "* | \
6491 *" vfork.$ac_objext "* ) ;;
6492 *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
6493esac
6494
6495 case $LIBOBJS in
6496 "waitpid.$ac_objext" | \
6497 *" waitpid.$ac_objext" | \
6498 "waitpid.$ac_objext "* | \
6499 *" waitpid.$ac_objext "* ) ;;
6500 *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;;
6501esac
6502
6503 case $LIBOBJS in
6504 "vasprintf.$ac_objext" | \
6505 *" vasprintf.$ac_objext" | \
6506 "vasprintf.$ac_objext "* | \
6507 *" vasprintf.$ac_objext "* ) ;;
6508 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
6509esac
6510
252b5132
RH
6511 for f in $funcs; do
6512 case "$f" in
6513 basename | getpagesize | insque | random | strcasecmp)
6514 ;;
6515 strncasecmp | strdup | vfork | waitpid | vasprintf)
6516 ;;
6517 *)
6518 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2299a76d 6519 cat >>confdefs.h <<_ACEOF
252b5132 6520#define $n 1
2299a76d 6521_ACEOF
252b5132
RH
6522
6523 ;;
6524 esac
6525 done
6526
6527 # VxWorks doesn't provide any of the variables in $vars, so we
6528 # don't have to check them here.
6529
6530 # Of the functions in $checkfuncs, VxWorks only has strerror.
0093138c 6531 cat >>confdefs.h <<\_ACEOF
252b5132 6532#define HAVE_STRERROR 1
0093138c 6533_ACEOF
252b5132
RH
6534
6535
1f92e180
DD
6536 setobjs=yes
6537 ;;
6538
6539 *-*-msdosdjgpp)
6540 for f in atexit basename bcmp bcopy bsearch bzero calloc clock ffs \
008d60eb 6541 getcwd getpagesize getrusage gettimeofday \
1f92e180
DD
6542 index insque memchr memcmp memcpy memmove memset psignal \
6543 putenv random rename rindex sbrk setenv stpcpy strcasecmp \
6544 strchr strdup strerror strncasecmp strrchr strstr strtod \
6545 strtol strtoul sysconf times tmpnam vfprintf vprintf \
6546 vsprintf waitpid
6547 do
6548 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6549 cat >>confdefs.h <<_ACEOF
6550#define $n 1
6551_ACEOF
6552
6553 done
6554
6555
252b5132
RH
6556 setobjs=yes
6557 ;;
6558
6559 esac
6560fi
6561
6562if test -z "${setobjs}"; then
6563
6564 case "${host}" in
6565
252b5132
RH
6566 *-*-mingw32*)
6567 # Under mingw32, sys_nerr and sys_errlist exist, but they are
6568 # macros, so the test below won't find them.
92655e19
DD
6569 libiberty_cv_var_sys_nerr=yes
6570 libiberty_cv_var_sys_errlist=yes
252b5132
RH
6571 ;;
6572
65dce80e
DD
6573 *-*-msdosdjgpp*)
6574 # vfork and fork are stubs.
6575 ac_cv_func_vfork_works=no
6576 ;;
6577
252b5132 6578 *-*-uwin*)
2299a76d 6579 # Under some versions of uwin, vfork is notoriously buggy and the test
252b5132
RH
6580 # can hang configure; on other versions, vfork exists just as a stub.
6581 # FIXME: This should be removed once vfork in uwin's runtime is fixed.
6582 ac_cv_func_vfork_works=no
0c0a36a4 6583 # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
2299a76d 6584 # macros (actually, these are imported from a DLL, but the end effect
0c0a36a4 6585 # is the same), so the test below won't find them.
92655e19
DD
6586 libiberty_cv_var_sys_nerr=yes
6587 libiberty_cv_var_sys_errlist=yes
252b5132
RH
6588 ;;
6589
c0eb281b 6590 *-*-*vms*)
2299a76d 6591 # Under VMS, vfork works very different than on Unix. The standard test
c0eb281b
DD
6592 # won't work, and it isn't easily adaptable. It makes more sense to
6593 # just force it.
6594 ac_cv_func_vfork_works=yes
6595 ;;
6596
252b5132
RH
6597 esac
6598
6599 # We haven't set the list of objects yet. Use the standard autoconf
6600 # tests. This will only work if the compiler works.
2299a76d
DJ
6601 echo "$as_me:$LINENO: checking for library containing strerror" >&5
6602echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
6603if test "${ac_cv_search_strerror+set}" = set; then
6604 echo $ECHO_N "(cached) $ECHO_C" >&6
6605else
6606 ac_func_search_save_LIBS=$LIBS
6607ac_cv_search_strerror=no
6608if test x$gcc_no_link = xyes; then
6609 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6610echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6611 { (exit 1); exit 1; }; }
6612fi
6613cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
6614/* confdefs.h. */
6615_ACEOF
6616cat confdefs.h >>conftest.$ac_ext
6617cat >>conftest.$ac_ext <<_ACEOF
6618/* end confdefs.h. */
252b5132 6619
2299a76d
DJ
6620/* Override any gcc2 internal prototype to avoid an error. */
6621#ifdef __cplusplus
6622extern "C"
6623#endif
6624/* We use char because int might match the return type of a gcc2
6625 builtin and then its argument prototype would still apply. */
6626char strerror ();
6627int
6628main ()
6629{
6630strerror ();
6631 ;
6632 return 0;
6633}
6634_ACEOF
6635rm -f conftest.$ac_objext conftest$ac_exeext
6636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 6637 (eval $ac_link) 2>conftest.er1
2299a76d 6638 ac_status=$?
58670637
DD
6639 grep -v '^ *+' conftest.er1 >conftest.err
6640 rm -f conftest.er1
6641 cat conftest.err >&5
2299a76d
DJ
6642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6643 (exit $ac_status); } &&
fd7d450d
DD
6644 { ac_try='test -z "$ac_c_werror_flag"
6645 || test ! -s conftest.err'
58670637
DD
6646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6647 (eval $ac_try) 2>&5
6648 ac_status=$?
6649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6650 (exit $ac_status); }; } &&
6651 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
6652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6653 (eval $ac_try) 2>&5
6654 ac_status=$?
6655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6656 (exit $ac_status); }; }; then
6657 ac_cv_search_strerror="none required"
6658else
6659 echo "$as_me: failed program was:" >&5
6660sed 's/^/| /' conftest.$ac_ext >&5
6661
6662fi
58670637
DD
6663rm -f conftest.err conftest.$ac_objext \
6664 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
6665if test "$ac_cv_search_strerror" = no; then
6666 for ac_lib in cposix; do
6667 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6668 if test x$gcc_no_link = xyes; then
6669 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6670echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6671 { (exit 1); exit 1; }; }
6672fi
6673cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
6674/* confdefs.h. */
6675_ACEOF
6676cat confdefs.h >>conftest.$ac_ext
6677cat >>conftest.$ac_ext <<_ACEOF
6678/* end confdefs.h. */
252b5132 6679
2299a76d
DJ
6680/* Override any gcc2 internal prototype to avoid an error. */
6681#ifdef __cplusplus
6682extern "C"
6683#endif
6684/* We use char because int might match the return type of a gcc2
6685 builtin and then its argument prototype would still apply. */
6686char strerror ();
6687int
6688main ()
6689{
6690strerror ();
6691 ;
6692 return 0;
6693}
6694_ACEOF
6695rm -f conftest.$ac_objext conftest$ac_exeext
6696if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 6697 (eval $ac_link) 2>conftest.er1
2299a76d 6698 ac_status=$?
58670637
DD
6699 grep -v '^ *+' conftest.er1 >conftest.err
6700 rm -f conftest.er1
6701 cat conftest.err >&5
2299a76d
DJ
6702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6703 (exit $ac_status); } &&
fd7d450d
DD
6704 { ac_try='test -z "$ac_c_werror_flag"
6705 || test ! -s conftest.err'
58670637
DD
6706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6707 (eval $ac_try) 2>&5
6708 ac_status=$?
6709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6710 (exit $ac_status); }; } &&
6711 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
6712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6713 (eval $ac_try) 2>&5
6714 ac_status=$?
6715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6716 (exit $ac_status); }; }; then
6717 ac_cv_search_strerror="-l$ac_lib"
6718break
6719else
6720 echo "$as_me: failed program was:" >&5
6721sed 's/^/| /' conftest.$ac_ext >&5
6722
6723fi
58670637
DD
6724rm -f conftest.err conftest.$ac_objext \
6725 conftest$ac_exeext conftest.$ac_ext
2299a76d 6726 done
252b5132 6727fi
2299a76d
DJ
6728LIBS=$ac_func_search_save_LIBS
6729fi
6730echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
6731echo "${ECHO_T}$ac_cv_search_strerror" >&6
6732if test "$ac_cv_search_strerror" != no; then
6733 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
252b5132 6734
252b5132 6735fi
252b5132 6736
2299a76d
DJ
6737
6738for ac_func in $funcs
252b5132 6739do
2299a76d
DJ
6740as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6741echo "$as_me:$LINENO: checking for $ac_func" >&5
6742echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6743if eval "test \"\${$as_ac_var+set}\" = set"; then
6744 echo $ECHO_N "(cached) $ECHO_C" >&6
6745else
6746 if test x$gcc_no_link = xyes; then
6747 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6748echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6749 { (exit 1); exit 1; }; }
6750fi
6751cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
6752/* confdefs.h. */
6753_ACEOF
6754cat confdefs.h >>conftest.$ac_ext
6755cat >>conftest.$ac_ext <<_ACEOF
6756/* end confdefs.h. */
252b5132 6757/* System header to define __stub macros and hopefully few prototypes,
2299a76d
DJ
6758 which can conflict with char $ac_func (); below.
6759 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
6760 <limits.h> exists even on freestanding compilers. Under hpux,
6761 including <limits.h> includes <sys/time.h> and causes problems
6762 checking for functions defined therein. */
6763#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
6764# include <limits.h>
6765#else
6766# include <assert.h>
6767#endif
252b5132 6768/* Override any gcc2 internal prototype to avoid an error. */
2299a76d
DJ
6769#ifdef __cplusplus
6770extern "C"
6771{
6772#endif
252b5132 6773/* We use char because int might match the return type of a gcc2
2299a76d
DJ
6774 builtin and then its argument prototype would still apply. */
6775char $ac_func ();
252b5132
RH
6776/* The GNU C library defines this for functions which it implements
6777 to always fail with ENOSYS. Some functions are actually named
6778 something starting with __ and the normal name is an alias. */
6779#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6780choke me
6781#else
2299a76d
DJ
6782char (*f) () = $ac_func;
6783#endif
6784#ifdef __cplusplus
6785}
252b5132
RH
6786#endif
6787
2299a76d
DJ
6788int
6789main ()
6790{
6791return f != $ac_func;
6792 ;
6793 return 0;
6794}
6795_ACEOF
6796rm -f conftest.$ac_objext conftest$ac_exeext
6797if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 6798 (eval $ac_link) 2>conftest.er1
2299a76d 6799 ac_status=$?
58670637
DD
6800 grep -v '^ *+' conftest.er1 >conftest.err
6801 rm -f conftest.er1
6802 cat conftest.err >&5
2299a76d
DJ
6803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6804 (exit $ac_status); } &&
fd7d450d
DD
6805 { ac_try='test -z "$ac_c_werror_flag"
6806 || test ! -s conftest.err'
58670637
DD
6807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6808 (eval $ac_try) 2>&5
6809 ac_status=$?
6810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6811 (exit $ac_status); }; } &&
6812 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
6813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6814 (eval $ac_try) 2>&5
6815 ac_status=$?
6816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6817 (exit $ac_status); }; }; then
6818 eval "$as_ac_var=yes"
6819else
6820 echo "$as_me: failed program was:" >&5
6821sed 's/^/| /' conftest.$ac_ext >&5
6822
6823eval "$as_ac_var=no"
6824fi
58670637
DD
6825rm -f conftest.err conftest.$ac_objext \
6826 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
6827fi
6828echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6829echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6830if test `eval echo '${'$as_ac_var'}'` = yes; then
6831 cat >>confdefs.h <<_ACEOF
6832#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6833_ACEOF
6834
6835else
58670637
DD
6836 case $LIBOBJS in
6837 "$ac_func.$ac_objext" | \
6838 *" $ac_func.$ac_objext" | \
6839 "$ac_func.$ac_objext "* | \
6840 *" $ac_func.$ac_objext "* ) ;;
6841 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
6842esac
6843
252b5132
RH
6844fi
6845done
6846
6847
2299a76d
DJ
6848 echo "$as_me:$LINENO: checking whether alloca needs Cray hooks" >&5
6849echo $ECHO_N "checking whether alloca needs Cray hooks... $ECHO_C" >&6
6850if test "${ac_cv_os_cray+set}" = set; then
6851 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 6852else
2299a76d 6853 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
6854/* confdefs.h. */
6855_ACEOF
6856cat confdefs.h >>conftest.$ac_ext
6857cat >>conftest.$ac_ext <<_ACEOF
6858/* end confdefs.h. */
252b5132
RH
6859#if defined(CRAY) && ! defined(CRAY2)
6860webecray
6861#else
6862wenotbecray
6863#endif
6864
2299a76d 6865_ACEOF
252b5132 6866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2299a76d 6867 $EGREP "webecray" >/dev/null 2>&1; then
252b5132
RH
6868 ac_cv_os_cray=yes
6869else
252b5132
RH
6870 ac_cv_os_cray=no
6871fi
6872rm -f conftest*
6873
6874fi
2299a76d
DJ
6875echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
6876echo "${ECHO_T}$ac_cv_os_cray" >&6
252b5132 6877if test $ac_cv_os_cray = yes; then
30673bf5 6878 for ac_func in _getb67 GETB67 getb67; do
2299a76d
DJ
6879 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6880echo "$as_me:$LINENO: checking for $ac_func" >&5
6881echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6882if eval "test \"\${$as_ac_var+set}\" = set"; then
6883 echo $ECHO_N "(cached) $ECHO_C" >&6
6884else
6885 if test x$gcc_no_link = xyes; then
6886 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6887echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6888 { (exit 1); exit 1; }; }
6889fi
6890cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
6891/* confdefs.h. */
6892_ACEOF
6893cat confdefs.h >>conftest.$ac_ext
6894cat >>conftest.$ac_ext <<_ACEOF
6895/* end confdefs.h. */
252b5132 6896/* System header to define __stub macros and hopefully few prototypes,
2299a76d
DJ
6897 which can conflict with char $ac_func (); below.
6898 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
6899 <limits.h> exists even on freestanding compilers. Under hpux,
6900 including <limits.h> includes <sys/time.h> and causes problems
6901 checking for functions defined therein. */
6902#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
6903# include <limits.h>
6904#else
6905# include <assert.h>
6906#endif
252b5132 6907/* Override any gcc2 internal prototype to avoid an error. */
2299a76d
DJ
6908#ifdef __cplusplus
6909extern "C"
6910{
6911#endif
252b5132 6912/* We use char because int might match the return type of a gcc2
2299a76d
DJ
6913 builtin and then its argument prototype would still apply. */
6914char $ac_func ();
252b5132
RH
6915/* The GNU C library defines this for functions which it implements
6916 to always fail with ENOSYS. Some functions are actually named
6917 something starting with __ and the normal name is an alias. */
6918#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6919choke me
6920#else
2299a76d
DJ
6921char (*f) () = $ac_func;
6922#endif
6923#ifdef __cplusplus
6924}
252b5132
RH
6925#endif
6926
2299a76d
DJ
6927int
6928main ()
6929{
6930return f != $ac_func;
6931 ;
6932 return 0;
6933}
6934_ACEOF
6935rm -f conftest.$ac_objext conftest$ac_exeext
6936if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 6937 (eval $ac_link) 2>conftest.er1
2299a76d 6938 ac_status=$?
58670637
DD
6939 grep -v '^ *+' conftest.er1 >conftest.err
6940 rm -f conftest.er1
6941 cat conftest.err >&5
2299a76d
DJ
6942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6943 (exit $ac_status); } &&
fd7d450d
DD
6944 { ac_try='test -z "$ac_c_werror_flag"
6945 || test ! -s conftest.err'
58670637
DD
6946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6947 (eval $ac_try) 2>&5
6948 ac_status=$?
6949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6950 (exit $ac_status); }; } &&
6951 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
6952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6953 (eval $ac_try) 2>&5
6954 ac_status=$?
6955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6956 (exit $ac_status); }; }; then
6957 eval "$as_ac_var=yes"
6958else
6959 echo "$as_me: failed program was:" >&5
6960sed 's/^/| /' conftest.$ac_ext >&5
6961
6962eval "$as_ac_var=no"
6963fi
58670637
DD
6964rm -f conftest.err conftest.$ac_objext \
6965 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
6966fi
6967echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6968echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6969if test `eval echo '${'$as_ac_var'}'` = yes; then
6970
6971cat >>confdefs.h <<_ACEOF
252b5132 6972#define CRAY_STACKSEG_END $ac_func
2299a76d 6973_ACEOF
252b5132 6974 break
252b5132
RH
6975fi
6976
30673bf5 6977 done
252b5132
RH
6978fi
6979
2299a76d
DJ
6980echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
6981echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
6982if test "${ac_cv_c_stack_direction+set}" = set; then
6983 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
6984else
6985 if test "$cross_compiling" = yes; then
6986 ac_cv_c_stack_direction=0
6987else
2299a76d 6988 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
6989/* confdefs.h. */
6990_ACEOF
6991cat confdefs.h >>conftest.$ac_ext
6992cat >>conftest.$ac_ext <<_ACEOF
6993/* end confdefs.h. */
252b5132
RH
6994find_stack_direction ()
6995{
6996 static char *addr = 0;
6997 auto char dummy;
6998 if (addr == 0)
6999 {
7000 addr = &dummy;
7001 return find_stack_direction ();
7002 }
7003 else
7004 return (&dummy > addr) ? 1 : -1;
7005}
7006main ()
7007{
7008 exit (find_stack_direction() < 0);
7009}
2299a76d
DJ
7010_ACEOF
7011rm -f conftest$ac_exeext
7012if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7013 (eval $ac_link) 2>&5
7014 ac_status=$?
7015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7016 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7018 (eval $ac_try) 2>&5
7019 ac_status=$?
7020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7021 (exit $ac_status); }; }; then
252b5132
RH
7022 ac_cv_c_stack_direction=1
7023else
2299a76d
DJ
7024 echo "$as_me: program exited with status $ac_status" >&5
7025echo "$as_me: failed program was:" >&5
7026sed 's/^/| /' conftest.$ac_ext >&5
7027
7028( exit $ac_status )
7029ac_cv_c_stack_direction=-1
252b5132 7030fi
58670637 7031rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
252b5132 7032fi
252b5132 7033fi
2299a76d
DJ
7034echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
7035echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
252b5132 7036
2299a76d 7037cat >>confdefs.h <<_ACEOF
252b5132 7038#define STACK_DIRECTION $ac_cv_c_stack_direction
2299a76d
DJ
7039_ACEOF
7040
252b5132 7041
0c0a36a4 7042
2299a76d
DJ
7043
7044for ac_header in unistd.h vfork.h
7045do
7046as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8ddbb593 7047echo "$as_me:$LINENO: checking for $ac_header" >&5
2299a76d
DJ
7048echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7049if eval "test \"\${$as_ac_Header+set}\" = set"; then
7050 echo $ECHO_N "(cached) $ECHO_C" >&6
2299a76d 7051else
8ddbb593 7052 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7053/* confdefs.h. */
7054_ACEOF
7055cat confdefs.h >>conftest.$ac_ext
7056cat >>conftest.$ac_ext <<_ACEOF
7057/* end confdefs.h. */
7058#include <$ac_header>
7059_ACEOF
7060if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7061 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7062 ac_status=$?
7063 grep -v '^ *+' conftest.er1 >conftest.err
7064 rm -f conftest.er1
7065 cat conftest.err >&5
7066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7067 (exit $ac_status); } >/dev/null; then
7068 if test -s conftest.err; then
7069 ac_cpp_err=$ac_c_preproc_warn_flag
58670637 7070 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2299a76d
DJ
7071 else
7072 ac_cpp_err=
7073 fi
252b5132 7074else
2299a76d
DJ
7075 ac_cpp_err=yes
7076fi
7077if test -z "$ac_cpp_err"; then
8ddbb593 7078 eval "$as_ac_Header=yes"
2299a76d
DJ
7079else
7080 echo "$as_me: failed program was:" >&5
7081sed 's/^/| /' conftest.$ac_ext >&5
7082
8ddbb593 7083 eval "$as_ac_Header=no"
2299a76d
DJ
7084fi
7085rm -f conftest.err conftest.$ac_ext
252b5132 7086fi
2299a76d
DJ
7087echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7088echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2299a76d
DJ
7089if test `eval echo '${'$as_ac_Header'}'` = yes; then
7090 cat >>confdefs.h <<_ACEOF
7091#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7092_ACEOF
252b5132 7093
252b5132 7094fi
2299a76d
DJ
7095done
7096
7097
7098
7099for ac_func in fork vfork
7100do
7101as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7102echo "$as_me:$LINENO: checking for $ac_func" >&5
7103echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7104if eval "test \"\${$as_ac_var+set}\" = set"; then
7105 echo $ECHO_N "(cached) $ECHO_C" >&6
7106else
7107 if test x$gcc_no_link = xyes; then
7108 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7109echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7110 { (exit 1); exit 1; }; }
7111fi
7112cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7113/* confdefs.h. */
7114_ACEOF
7115cat confdefs.h >>conftest.$ac_ext
7116cat >>conftest.$ac_ext <<_ACEOF
7117/* end confdefs.h. */
252b5132 7118/* System header to define __stub macros and hopefully few prototypes,
2299a76d
DJ
7119 which can conflict with char $ac_func (); below.
7120 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
7121 <limits.h> exists even on freestanding compilers. Under hpux,
7122 including <limits.h> includes <sys/time.h> and causes problems
7123 checking for functions defined therein. */
7124#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
7125# include <limits.h>
7126#else
7127# include <assert.h>
7128#endif
252b5132 7129/* Override any gcc2 internal prototype to avoid an error. */
2299a76d
DJ
7130#ifdef __cplusplus
7131extern "C"
7132{
7133#endif
252b5132 7134/* We use char because int might match the return type of a gcc2
2299a76d
DJ
7135 builtin and then its argument prototype would still apply. */
7136char $ac_func ();
252b5132
RH
7137/* The GNU C library defines this for functions which it implements
7138 to always fail with ENOSYS. Some functions are actually named
7139 something starting with __ and the normal name is an alias. */
2299a76d 7140#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
252b5132
RH
7141choke me
7142#else
2299a76d
DJ
7143char (*f) () = $ac_func;
7144#endif
7145#ifdef __cplusplus
7146}
252b5132
RH
7147#endif
7148
2299a76d
DJ
7149int
7150main ()
7151{
7152return f != $ac_func;
7153 ;
7154 return 0;
7155}
7156_ACEOF
7157rm -f conftest.$ac_objext conftest$ac_exeext
7158if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 7159 (eval $ac_link) 2>conftest.er1
2299a76d 7160 ac_status=$?
58670637
DD
7161 grep -v '^ *+' conftest.er1 >conftest.err
7162 rm -f conftest.er1
7163 cat conftest.err >&5
2299a76d
DJ
7164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7165 (exit $ac_status); } &&
fd7d450d
DD
7166 { ac_try='test -z "$ac_c_werror_flag"
7167 || test ! -s conftest.err'
58670637
DD
7168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7169 (eval $ac_try) 2>&5
7170 ac_status=$?
7171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7172 (exit $ac_status); }; } &&
7173 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
7174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7175 (eval $ac_try) 2>&5
7176 ac_status=$?
7177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7178 (exit $ac_status); }; }; then
7179 eval "$as_ac_var=yes"
7180else
7181 echo "$as_me: failed program was:" >&5
7182sed 's/^/| /' conftest.$ac_ext >&5
7183
7184eval "$as_ac_var=no"
7185fi
58670637
DD
7186rm -f conftest.err conftest.$ac_objext \
7187 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
7188fi
7189echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7190echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7191if test `eval echo '${'$as_ac_var'}'` = yes; then
7192 cat >>confdefs.h <<_ACEOF
7193#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7194_ACEOF
7195
252b5132 7196fi
2299a76d 7197done
252b5132 7198
2299a76d
DJ
7199if test "x$ac_cv_func_fork" = xyes; then
7200 echo "$as_me:$LINENO: checking for working fork" >&5
7201echo $ECHO_N "checking for working fork... $ECHO_C" >&6
7202if test "${ac_cv_func_fork_works+set}" = set; then
7203 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7204else
2299a76d
DJ
7205 if test "$cross_compiling" = yes; then
7206 ac_cv_func_fork_works=cross
7207else
7208 cat >conftest.$ac_ext <<_ACEOF
7209/* By Ruediger Kuhlmann. */
7210 #include <sys/types.h>
7211 #if HAVE_UNISTD_H
7212 # include <unistd.h>
7213 #endif
7214 /* Some systems only have a dummy stub for fork() */
7215 int main ()
7216 {
58670637
DD
7217 if (fork() < 0)
7218 exit (1);
7219 exit (0);
2299a76d
DJ
7220 }
7221_ACEOF
7222rm -f conftest$ac_exeext
7223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7224 (eval $ac_link) 2>&5
7225 ac_status=$?
7226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7227 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7229 (eval $ac_try) 2>&5
7230 ac_status=$?
7231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7232 (exit $ac_status); }; }; then
7233 ac_cv_func_fork_works=yes
7234else
7235 echo "$as_me: program exited with status $ac_status" >&5
7236echo "$as_me: failed program was:" >&5
7237sed 's/^/| /' conftest.$ac_ext >&5
7238
7239( exit $ac_status )
7240ac_cv_func_fork_works=no
7241fi
58670637 7242rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2299a76d
DJ
7243fi
7244fi
7245echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
7246echo "${ECHO_T}$ac_cv_func_fork_works" >&6
7247
7248else
7249 ac_cv_func_fork_works=$ac_cv_func_fork
7250fi
7251if test "x$ac_cv_func_fork_works" = xcross; then
7252 case $host in
7253 *-*-amigaos* | *-*-msdosdjgpp*)
7254 # Override, as these systems have only a dummy fork() stub
7255 ac_cv_func_fork_works=no
7256 ;;
7257 *)
7258 ac_cv_func_fork_works=yes
7259 ;;
7260 esac
7261 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
7262echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
252b5132 7263fi
252b5132 7264ac_cv_func_vfork_works=$ac_cv_func_vfork
2299a76d
DJ
7265if test "x$ac_cv_func_vfork" = xyes; then
7266 echo "$as_me:$LINENO: checking for working vfork" >&5
7267echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
7268if test "${ac_cv_func_vfork_works+set}" = set; then
7269 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7270else
2299a76d
DJ
7271 if test "$cross_compiling" = yes; then
7272 ac_cv_func_vfork_works=cross
7273else
7274 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7275/* confdefs.h. */
7276_ACEOF
7277cat confdefs.h >>conftest.$ac_ext
7278cat >>conftest.$ac_ext <<_ACEOF
7279/* end confdefs.h. */
252b5132
RH
7280/* Thanks to Paul Eggert for this test. */
7281#include <stdio.h>
2299a76d 7282#include <stdlib.h>
252b5132
RH
7283#include <sys/types.h>
7284#include <sys/stat.h>
2299a76d
DJ
7285#include <sys/wait.h>
7286#if HAVE_UNISTD_H
7287# include <unistd.h>
252b5132 7288#endif
2299a76d
DJ
7289#if HAVE_VFORK_H
7290# include <vfork.h>
252b5132
RH
7291#endif
7292/* On some sparc systems, changes by the child to local and incoming
2299a76d
DJ
7293 argument registers are propagated back to the parent. The compiler
7294 is told about this with #include <vfork.h>, but some compilers
7295 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
7296 static variable whose address is put into a register that is
7297 clobbered by the vfork. */
7298static void
252b5132
RH
7299#ifdef __cplusplus
7300sparc_address_test (int arg)
2299a76d 7301# else
252b5132
RH
7302sparc_address_test (arg) int arg;
7303#endif
7304{
7305 static pid_t child;
7306 if (!child) {
7307 child = vfork ();
7308 if (child < 0) {
7309 perror ("vfork");
7310 _exit(2);
7311 }
7312 if (!child) {
7313 arg = getpid();
7314 write(-1, "", 0);
7315 _exit (arg);
7316 }
7317 }
7318}
2299a76d
DJ
7319
7320int
7321main ()
7322{
252b5132
RH
7323 pid_t parent = getpid ();
7324 pid_t child;
7325
2299a76d 7326 sparc_address_test (0);
252b5132
RH
7327
7328 child = vfork ();
7329
7330 if (child == 0) {
2299a76d
DJ
7331 /* Here is another test for sparc vfork register problems. This
7332 test uses lots of local variables, at least as many local
7333 variables as main has allocated so far including compiler
7334 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
7335 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
7336 reuse the register of parent for one of the local variables,
7337 since it will think that parent can't possibly be used any more
7338 in this routine. Assigning to the local variable will thus
7339 munge parent in the parent process. */
252b5132
RH
7340 pid_t
7341 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
7342 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
7343 /* Convince the compiler that p..p7 are live; otherwise, it might
7344 use the same hardware register for all 8 local variables. */
7345 if (p != p1 || p != p2 || p != p3 || p != p4
7346 || p != p5 || p != p6 || p != p7)
7347 _exit(1);
7348
2299a76d
DJ
7349 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
7350 from child file descriptors. If the child closes a descriptor
7351 before it execs or exits, this munges the parent's descriptor
7352 as well. Test for this by closing stdout in the child. */
252b5132
RH
7353 _exit(close(fileno(stdout)) != 0);
7354 } else {
7355 int status;
7356 struct stat st;
7357
7358 while (wait(&status) != child)
7359 ;
7360 exit(
7361 /* Was there some problem with vforking? */
7362 child < 0
7363
7364 /* Did the child fail? (This shouldn't happen.) */
7365 || status
7366
7367 /* Did the vfork/compiler bug occur? */
7368 || parent != getpid()
7369
7370 /* Did the file descriptor bug occur? */
7371 || fstat(fileno(stdout), &st) != 0
7372 );
7373 }
7374}
2299a76d
DJ
7375_ACEOF
7376rm -f conftest$ac_exeext
7377if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7378 (eval $ac_link) 2>&5
7379 ac_status=$?
7380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7381 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7383 (eval $ac_try) 2>&5
7384 ac_status=$?
7385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7386 (exit $ac_status); }; }; then
252b5132
RH
7387 ac_cv_func_vfork_works=yes
7388else
2299a76d
DJ
7389 echo "$as_me: program exited with status $ac_status" >&5
7390echo "$as_me: failed program was:" >&5
7391sed 's/^/| /' conftest.$ac_ext >&5
7392
7393( exit $ac_status )
7394ac_cv_func_vfork_works=no
7395fi
58670637 7396rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
252b5132 7397fi
252b5132 7398fi
2299a76d
DJ
7399echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
7400echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
252b5132 7401
2299a76d
DJ
7402fi;
7403if test "x$ac_cv_func_fork_works" = xcross; then
58670637 7404 ac_cv_func_vfork_works=$ac_cv_func_vfork
2299a76d
DJ
7405 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
7406echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
252b5132
RH
7407fi
7408
2299a76d
DJ
7409if test "x$ac_cv_func_vfork_works" = xyes; then
7410
7411cat >>confdefs.h <<\_ACEOF
7412#define HAVE_WORKING_VFORK 1
7413_ACEOF
7414
7415else
7416
7417cat >>confdefs.h <<\_ACEOF
252b5132 7418#define vfork fork
2299a76d
DJ
7419_ACEOF
7420
7421fi
7422if test "x$ac_cv_func_fork_works" = xyes; then
7423
7424cat >>confdefs.h <<\_ACEOF
7425#define HAVE_WORKING_FORK 1
7426_ACEOF
252b5132
RH
7427
7428fi
7429
7430 if test $ac_cv_func_vfork_works = no; then
58670637
DD
7431 case $LIBOBJS in
7432 "vfork.$ac_objext" | \
7433 *" vfork.$ac_objext" | \
7434 "vfork.$ac_objext "* | \
7435 *" vfork.$ac_objext "* ) ;;
7436 *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
7437esac
7438
252b5132 7439 fi
24acd898
DD
7440 # We only need _doprnt if we might use it to implement v*printf.
7441 if test $ac_cv_func_vprintf != yes \
7442 || test $ac_cv_func_vfprintf != yes \
7443 || test $ac_cv_func_vsprintf != yes; then
2299a76d
DJ
7444
7445for ac_func in _doprnt
24acd898 7446do
2299a76d
DJ
7447as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7448echo "$as_me:$LINENO: checking for $ac_func" >&5
7449echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7450if eval "test \"\${$as_ac_var+set}\" = set"; then
7451 echo $ECHO_N "(cached) $ECHO_C" >&6
7452else
7453 if test x$gcc_no_link = xyes; then
7454 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7455echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7456 { (exit 1); exit 1; }; }
7457fi
7458cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7459/* confdefs.h. */
7460_ACEOF
7461cat confdefs.h >>conftest.$ac_ext
7462cat >>conftest.$ac_ext <<_ACEOF
7463/* end confdefs.h. */
24acd898 7464/* System header to define __stub macros and hopefully few prototypes,
2299a76d
DJ
7465 which can conflict with char $ac_func (); below.
7466 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
7467 <limits.h> exists even on freestanding compilers. Under hpux,
7468 including <limits.h> includes <sys/time.h> and causes problems
7469 checking for functions defined therein. */
7470#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
7471# include <limits.h>
7472#else
7473# include <assert.h>
7474#endif
24acd898 7475/* Override any gcc2 internal prototype to avoid an error. */
2299a76d
DJ
7476#ifdef __cplusplus
7477extern "C"
7478{
7479#endif
24acd898 7480/* We use char because int might match the return type of a gcc2
2299a76d
DJ
7481 builtin and then its argument prototype would still apply. */
7482char $ac_func ();
24acd898
DD
7483/* The GNU C library defines this for functions which it implements
7484 to always fail with ENOSYS. Some functions are actually named
7485 something starting with __ and the normal name is an alias. */
7486#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7487choke me
7488#else
2299a76d
DJ
7489char (*f) () = $ac_func;
7490#endif
7491#ifdef __cplusplus
7492}
24acd898
DD
7493#endif
7494
2299a76d
DJ
7495int
7496main ()
7497{
7498return f != $ac_func;
7499 ;
7500 return 0;
7501}
7502_ACEOF
7503rm -f conftest.$ac_objext conftest$ac_exeext
7504if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 7505 (eval $ac_link) 2>conftest.er1
2299a76d 7506 ac_status=$?
58670637
DD
7507 grep -v '^ *+' conftest.er1 >conftest.err
7508 rm -f conftest.er1
7509 cat conftest.err >&5
2299a76d
DJ
7510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7511 (exit $ac_status); } &&
fd7d450d
DD
7512 { ac_try='test -z "$ac_c_werror_flag"
7513 || test ! -s conftest.err'
58670637
DD
7514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7515 (eval $ac_try) 2>&5
7516 ac_status=$?
7517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7518 (exit $ac_status); }; } &&
7519 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
7520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7521 (eval $ac_try) 2>&5
7522 ac_status=$?
7523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7524 (exit $ac_status); }; }; then
7525 eval "$as_ac_var=yes"
7526else
7527 echo "$as_me: failed program was:" >&5
7528sed 's/^/| /' conftest.$ac_ext >&5
7529
7530eval "$as_ac_var=no"
7531fi
58670637
DD
7532rm -f conftest.err conftest.$ac_objext \
7533 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
7534fi
7535echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7536echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7537if test `eval echo '${'$as_ac_var'}'` = yes; then
7538 cat >>confdefs.h <<_ACEOF
7539#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7540_ACEOF
7541
7542else
58670637
DD
7543 case $LIBOBJS in
7544 "$ac_func.$ac_objext" | \
7545 *" $ac_func.$ac_objext" | \
7546 "$ac_func.$ac_objext "* | \
7547 *" $ac_func.$ac_objext "* ) ;;
7548 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
7549esac
7550
24acd898
DD
7551fi
7552done
7553
7554
cc096b71 7555 else
2299a76d
DJ
7556
7557for ac_func in _doprnt
cc096b71 7558do
2299a76d
DJ
7559as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7560echo "$as_me:$LINENO: checking for $ac_func" >&5
7561echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7562if eval "test \"\${$as_ac_var+set}\" = set"; then
7563 echo $ECHO_N "(cached) $ECHO_C" >&6
7564else
7565 if test x$gcc_no_link = xyes; then
7566 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7567echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7568 { (exit 1); exit 1; }; }
7569fi
7570cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7571/* confdefs.h. */
7572_ACEOF
7573cat confdefs.h >>conftest.$ac_ext
7574cat >>conftest.$ac_ext <<_ACEOF
7575/* end confdefs.h. */
cc096b71 7576/* System header to define __stub macros and hopefully few prototypes,
2299a76d
DJ
7577 which can conflict with char $ac_func (); below.
7578 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
7579 <limits.h> exists even on freestanding compilers. Under hpux,
7580 including <limits.h> includes <sys/time.h> and causes problems
7581 checking for functions defined therein. */
7582#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
7583# include <limits.h>
7584#else
7585# include <assert.h>
7586#endif
cc096b71 7587/* Override any gcc2 internal prototype to avoid an error. */
2299a76d
DJ
7588#ifdef __cplusplus
7589extern "C"
7590{
7591#endif
cc096b71 7592/* We use char because int might match the return type of a gcc2
2299a76d
DJ
7593 builtin and then its argument prototype would still apply. */
7594char $ac_func ();
cc096b71
DD
7595/* The GNU C library defines this for functions which it implements
7596 to always fail with ENOSYS. Some functions are actually named
7597 something starting with __ and the normal name is an alias. */
7598#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7599choke me
7600#else
2299a76d
DJ
7601char (*f) () = $ac_func;
7602#endif
7603#ifdef __cplusplus
7604}
cc096b71
DD
7605#endif
7606
2299a76d
DJ
7607int
7608main ()
7609{
7610return f != $ac_func;
7611 ;
7612 return 0;
7613}
7614_ACEOF
7615rm -f conftest.$ac_objext conftest$ac_exeext
7616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 7617 (eval $ac_link) 2>conftest.er1
2299a76d 7618 ac_status=$?
58670637
DD
7619 grep -v '^ *+' conftest.er1 >conftest.err
7620 rm -f conftest.er1
7621 cat conftest.err >&5
2299a76d
DJ
7622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7623 (exit $ac_status); } &&
fd7d450d
DD
7624 { ac_try='test -z "$ac_c_werror_flag"
7625 || test ! -s conftest.err'
58670637
DD
7626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7627 (eval $ac_try) 2>&5
7628 ac_status=$?
7629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7630 (exit $ac_status); }; } &&
7631 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
7632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7633 (eval $ac_try) 2>&5
7634 ac_status=$?
7635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7636 (exit $ac_status); }; }; then
7637 eval "$as_ac_var=yes"
7638else
7639 echo "$as_me: failed program was:" >&5
7640sed 's/^/| /' conftest.$ac_ext >&5
7641
7642eval "$as_ac_var=no"
7643fi
58670637
DD
7644rm -f conftest.err conftest.$ac_objext \
7645 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
7646fi
7647echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7648echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7649if test `eval echo '${'$as_ac_var'}'` = yes; then
7650 cat >>confdefs.h <<_ACEOF
7651#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7652_ACEOF
cc096b71 7653
cc096b71
DD
7654fi
7655done
7656
24acd898
DD
7657 fi
7658
252b5132 7659 for v in $vars; do
2299a76d
DJ
7660 echo "$as_me:$LINENO: checking for $v" >&5
7661echo $ECHO_N "checking for $v... $ECHO_C" >&6
7662 if eval "test \"\${libiberty_cv_var_$v+set}\" = set"; then
7663 echo $ECHO_N "(cached) $ECHO_C" >&6
7664else
7665 if test x$gcc_no_link = xyes; then
7666 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7667echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7668 { (exit 1); exit 1; }; }
7669fi
7670cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7671/* confdefs.h. */
7672_ACEOF
7673cat confdefs.h >>conftest.$ac_ext
7674cat >>conftest.$ac_ext <<_ACEOF
7675/* end confdefs.h. */
252b5132 7676int *p;
2299a76d
DJ
7677int
7678main ()
7679{
18893690 7680extern int $v []; p = $v;
2299a76d
DJ
7681 ;
7682 return 0;
7683}
7684_ACEOF
7685rm -f conftest.$ac_objext conftest$ac_exeext
7686if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 7687 (eval $ac_link) 2>conftest.er1
2299a76d 7688 ac_status=$?
58670637
DD
7689 grep -v '^ *+' conftest.er1 >conftest.err
7690 rm -f conftest.er1
7691 cat conftest.err >&5
2299a76d
DJ
7692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7693 (exit $ac_status); } &&
fd7d450d
DD
7694 { ac_try='test -z "$ac_c_werror_flag"
7695 || test ! -s conftest.err'
58670637
DD
7696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7697 (eval $ac_try) 2>&5
7698 ac_status=$?
7699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7700 (exit $ac_status); }; } &&
7701 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
7702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7703 (eval $ac_try) 2>&5
7704 ac_status=$?
7705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7706 (exit $ac_status); }; }; then
252b5132
RH
7707 eval "libiberty_cv_var_$v=yes"
7708else
2299a76d
DJ
7709 echo "$as_me: failed program was:" >&5
7710sed 's/^/| /' conftest.$ac_ext >&5
7711
7712eval "libiberty_cv_var_$v=no"
252b5132 7713fi
58670637
DD
7714rm -f conftest.err conftest.$ac_objext \
7715 conftest$ac_exeext conftest.$ac_ext
252b5132
RH
7716fi
7717
7718 if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
2299a76d
DJ
7719 echo "$as_me:$LINENO: result: yes" >&5
7720echo "${ECHO_T}yes" >&6
252b5132 7721 n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2299a76d 7722 cat >>confdefs.h <<_ACEOF
252b5132 7723#define $n 1
2299a76d 7724_ACEOF
252b5132
RH
7725
7726 else
2299a76d
DJ
7727 echo "$as_me:$LINENO: result: no" >&5
7728echo "${ECHO_T}no" >&6
252b5132
RH
7729 fi
7730 done
e69f6c8c
DD
7731
7732 # special check for _system_configuration because AIX <4.3.2 do not
7733 # contain the `physmem' member.
2299a76d
DJ
7734 echo "$as_me:$LINENO: checking for external symbol _system_configuration" >&5
7735echo $ECHO_N "checking for external symbol _system_configuration... $ECHO_C" >&6
7736 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7737/* confdefs.h. */
7738_ACEOF
7739cat confdefs.h >>conftest.$ac_ext
7740cat >>conftest.$ac_ext <<_ACEOF
7741/* end confdefs.h. */
e69f6c8c 7742#include <sys/systemcfg.h>
2299a76d
DJ
7743int
7744main ()
7745{
e69f6c8c 7746double x = _system_configuration.physmem;
2299a76d
DJ
7747 ;
7748 return 0;
7749}
7750_ACEOF
7751rm -f conftest.$ac_objext
7752if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 7753 (eval $ac_compile) 2>conftest.er1
2299a76d 7754 ac_status=$?
58670637
DD
7755 grep -v '^ *+' conftest.er1 >conftest.err
7756 rm -f conftest.er1
7757 cat conftest.err >&5
2299a76d
DJ
7758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7759 (exit $ac_status); } &&
fd7d450d
DD
7760 { ac_try='test -z "$ac_c_werror_flag"
7761 || test ! -s conftest.err'
58670637
DD
7762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7763 (eval $ac_try) 2>&5
7764 ac_status=$?
7765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7766 (exit $ac_status); }; } &&
7767 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
7768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7769 (eval $ac_try) 2>&5
7770 ac_status=$?
7771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7772 (exit $ac_status); }; }; then
7773 echo "$as_me:$LINENO: result: yes" >&5
7774echo "${ECHO_T}yes" >&6
7775
7776cat >>confdefs.h <<\_ACEOF
e69f6c8c 7777#define HAVE__SYSTEM_CONFIGURATION 1
2299a76d 7778_ACEOF
e69f6c8c
DD
7779
7780else
2299a76d
DJ
7781 echo "$as_me: failed program was:" >&5
7782sed 's/^/| /' conftest.$ac_ext >&5
7783
7784echo "$as_me:$LINENO: result: no" >&5
7785echo "${ECHO_T}no" >&6
e69f6c8c 7786fi
58670637 7787rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2299a76d 7788
e69f6c8c 7789
2299a76d 7790for ac_func in $checkfuncs
252b5132 7791do
2299a76d
DJ
7792as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7793echo "$as_me:$LINENO: checking for $ac_func" >&5
7794echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7795if eval "test \"\${$as_ac_var+set}\" = set"; then
7796 echo $ECHO_N "(cached) $ECHO_C" >&6
7797else
7798 if test x$gcc_no_link = xyes; then
7799 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7800echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7801 { (exit 1); exit 1; }; }
7802fi
7803cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
7804/* confdefs.h. */
7805_ACEOF
7806cat confdefs.h >>conftest.$ac_ext
7807cat >>conftest.$ac_ext <<_ACEOF
7808/* end confdefs.h. */
eb383413 7809/* System header to define __stub macros and hopefully few prototypes,
2299a76d
DJ
7810 which can conflict with char $ac_func (); below.
7811 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
7812 <limits.h> exists even on freestanding compilers. Under hpux,
7813 including <limits.h> includes <sys/time.h> and causes problems
7814 checking for functions defined therein. */
7815#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
7816# include <limits.h>
7817#else
7818# include <assert.h>
7819#endif
eb383413 7820/* Override any gcc2 internal prototype to avoid an error. */
2299a76d
DJ
7821#ifdef __cplusplus
7822extern "C"
7823{
7824#endif
eb383413 7825/* We use char because int might match the return type of a gcc2
2299a76d
DJ
7826 builtin and then its argument prototype would still apply. */
7827char $ac_func ();
eb383413
L
7828/* The GNU C library defines this for functions which it implements
7829 to always fail with ENOSYS. Some functions are actually named
7830 something starting with __ and the normal name is an alias. */
7831#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7832choke me
7833#else
2299a76d
DJ
7834char (*f) () = $ac_func;
7835#endif
7836#ifdef __cplusplus
7837}
eb383413
L
7838#endif
7839
2299a76d
DJ
7840int
7841main ()
7842{
7843return f != $ac_func;
7844 ;
7845 return 0;
7846}
7847_ACEOF
7848rm -f conftest.$ac_objext conftest$ac_exeext
7849if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 7850 (eval $ac_link) 2>conftest.er1
2299a76d 7851 ac_status=$?
58670637
DD
7852 grep -v '^ *+' conftest.er1 >conftest.err
7853 rm -f conftest.er1
7854 cat conftest.err >&5
2299a76d
DJ
7855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7856 (exit $ac_status); } &&
fd7d450d
DD
7857 { ac_try='test -z "$ac_c_werror_flag"
7858 || test ! -s conftest.err'
58670637
DD
7859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7860 (eval $ac_try) 2>&5
7861 ac_status=$?
7862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7863 (exit $ac_status); }; } &&
7864 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
7865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7866 (eval $ac_try) 2>&5
7867 ac_status=$?
7868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7869 (exit $ac_status); }; }; then
7870 eval "$as_ac_var=yes"
7871else
7872 echo "$as_me: failed program was:" >&5
7873sed 's/^/| /' conftest.$ac_ext >&5
7874
7875eval "$as_ac_var=no"
7876fi
58670637
DD
7877rm -f conftest.err conftest.$ac_objext \
7878 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
7879fi
7880echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7881echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7882if test `eval echo '${'$as_ac_var'}'` = yes; then
7883 cat >>confdefs.h <<_ACEOF
7884#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7885_ACEOF
eb383413 7886
eb383413
L
7887fi
7888done
7889
fa99459d
DD
7890 echo "$as_me:$LINENO: checking whether basename is declared" >&5
7891echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6
7892if test "${ac_cv_have_decl_basename+set}" = set; then
7893 echo $ECHO_N "(cached) $ECHO_C" >&6
7894else
7895 cat >conftest.$ac_ext <<_ACEOF
7896/* confdefs.h. */
7897_ACEOF
7898cat confdefs.h >>conftest.$ac_ext
7899cat >>conftest.$ac_ext <<_ACEOF
7900/* end confdefs.h. */
7901$ac_includes_default
7902int
7903main ()
7904{
7905#ifndef basename
7906 char *p = (char *) basename;
7907#endif
7908
7909 ;
7910 return 0;
7911}
7912_ACEOF
7913rm -f conftest.$ac_objext
7914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7915 (eval $ac_compile) 2>conftest.er1
7916 ac_status=$?
7917 grep -v '^ *+' conftest.er1 >conftest.err
7918 rm -f conftest.er1
7919 cat conftest.err >&5
7920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7921 (exit $ac_status); } &&
fd7d450d
DD
7922 { ac_try='test -z "$ac_c_werror_flag"
7923 || test ! -s conftest.err'
fa99459d
DD
7924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7925 (eval $ac_try) 2>&5
7926 ac_status=$?
7927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7928 (exit $ac_status); }; } &&
7929 { ac_try='test -s conftest.$ac_objext'
7930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7931 (eval $ac_try) 2>&5
7932 ac_status=$?
7933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7934 (exit $ac_status); }; }; then
7935 ac_cv_have_decl_basename=yes
7936else
7937 echo "$as_me: failed program was:" >&5
7938sed 's/^/| /' conftest.$ac_ext >&5
7939
7940ac_cv_have_decl_basename=no
7941fi
7942rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7943fi
7944echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5
7945echo "${ECHO_T}$ac_cv_have_decl_basename" >&6
7946if test $ac_cv_have_decl_basename = yes; then
7947
7948cat >>confdefs.h <<_ACEOF
7949#define HAVE_DECL_BASENAME 1
7950_ACEOF
7951
7952
7953else
7954 cat >>confdefs.h <<_ACEOF
7955#define HAVE_DECL_BASENAME 0
7956_ACEOF
7957
7958
7959fi
7960echo "$as_me:$LINENO: checking whether ffs is declared" >&5
7961echo $ECHO_N "checking whether ffs is declared... $ECHO_C" >&6
7962if test "${ac_cv_have_decl_ffs+set}" = set; then
7963 echo $ECHO_N "(cached) $ECHO_C" >&6
7964else
7965 cat >conftest.$ac_ext <<_ACEOF
7966/* confdefs.h. */
7967_ACEOF
7968cat confdefs.h >>conftest.$ac_ext
7969cat >>conftest.$ac_ext <<_ACEOF
7970/* end confdefs.h. */
7971$ac_includes_default
7972int
7973main ()
7974{
7975#ifndef ffs
7976 char *p = (char *) ffs;
7977#endif
7978
7979 ;
7980 return 0;
7981}
7982_ACEOF
7983rm -f conftest.$ac_objext
7984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7985 (eval $ac_compile) 2>conftest.er1
7986 ac_status=$?
7987 grep -v '^ *+' conftest.er1 >conftest.err
7988 rm -f conftest.er1
7989 cat conftest.err >&5
7990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7991 (exit $ac_status); } &&
fd7d450d
DD
7992 { ac_try='test -z "$ac_c_werror_flag"
7993 || test ! -s conftest.err'
fa99459d
DD
7994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7995 (eval $ac_try) 2>&5
7996 ac_status=$?
7997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7998 (exit $ac_status); }; } &&
7999 { ac_try='test -s conftest.$ac_objext'
8000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8001 (eval $ac_try) 2>&5
8002 ac_status=$?
8003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8004 (exit $ac_status); }; }; then
8005 ac_cv_have_decl_ffs=yes
8006else
8007 echo "$as_me: failed program was:" >&5
8008sed 's/^/| /' conftest.$ac_ext >&5
8009
8010ac_cv_have_decl_ffs=no
8011fi
8012rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8013fi
8014echo "$as_me:$LINENO: result: $ac_cv_have_decl_ffs" >&5
8015echo "${ECHO_T}$ac_cv_have_decl_ffs" >&6
8016if test $ac_cv_have_decl_ffs = yes; then
8017
8018cat >>confdefs.h <<_ACEOF
8019#define HAVE_DECL_FFS 1
8020_ACEOF
8021
8022
8023else
8024 cat >>confdefs.h <<_ACEOF
8025#define HAVE_DECL_FFS 0
8026_ACEOF
8027
8028
8029fi
8030echo "$as_me:$LINENO: checking whether asprintf is declared" >&5
8031echo $ECHO_N "checking whether asprintf is declared... $ECHO_C" >&6
8032if test "${ac_cv_have_decl_asprintf+set}" = set; then
8033 echo $ECHO_N "(cached) $ECHO_C" >&6
8034else
8035 cat >conftest.$ac_ext <<_ACEOF
8036/* confdefs.h. */
8037_ACEOF
8038cat confdefs.h >>conftest.$ac_ext
8039cat >>conftest.$ac_ext <<_ACEOF
8040/* end confdefs.h. */
8041$ac_includes_default
8042int
8043main ()
8044{
8045#ifndef asprintf
8046 char *p = (char *) asprintf;
8047#endif
8048
8049 ;
8050 return 0;
8051}
8052_ACEOF
8053rm -f conftest.$ac_objext
8054if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8055 (eval $ac_compile) 2>conftest.er1
8056 ac_status=$?
8057 grep -v '^ *+' conftest.er1 >conftest.err
8058 rm -f conftest.er1
8059 cat conftest.err >&5
8060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8061 (exit $ac_status); } &&
fd7d450d
DD
8062 { ac_try='test -z "$ac_c_werror_flag"
8063 || test ! -s conftest.err'
fa99459d
DD
8064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8065 (eval $ac_try) 2>&5
8066 ac_status=$?
8067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8068 (exit $ac_status); }; } &&
8069 { ac_try='test -s conftest.$ac_objext'
8070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8071 (eval $ac_try) 2>&5
8072 ac_status=$?
8073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8074 (exit $ac_status); }; }; then
8075 ac_cv_have_decl_asprintf=yes
8076else
8077 echo "$as_me: failed program was:" >&5
8078sed 's/^/| /' conftest.$ac_ext >&5
8079
8080ac_cv_have_decl_asprintf=no
8081fi
8082rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8083fi
8084echo "$as_me:$LINENO: result: $ac_cv_have_decl_asprintf" >&5
8085echo "${ECHO_T}$ac_cv_have_decl_asprintf" >&6
8086if test $ac_cv_have_decl_asprintf = yes; then
8087
8088cat >>confdefs.h <<_ACEOF
8089#define HAVE_DECL_ASPRINTF 1
8090_ACEOF
8091
8092
8093else
8094 cat >>confdefs.h <<_ACEOF
8095#define HAVE_DECL_ASPRINTF 0
8096_ACEOF
8097
8098
8099fi
8100echo "$as_me:$LINENO: checking whether vasprintf is declared" >&5
8101echo $ECHO_N "checking whether vasprintf is declared... $ECHO_C" >&6
8102if test "${ac_cv_have_decl_vasprintf+set}" = set; then
8103 echo $ECHO_N "(cached) $ECHO_C" >&6
8104else
8105 cat >conftest.$ac_ext <<_ACEOF
8106/* confdefs.h. */
8107_ACEOF
8108cat confdefs.h >>conftest.$ac_ext
8109cat >>conftest.$ac_ext <<_ACEOF
8110/* end confdefs.h. */
8111$ac_includes_default
8112int
8113main ()
8114{
8115#ifndef vasprintf
8116 char *p = (char *) vasprintf;
8117#endif
8118
8119 ;
8120 return 0;
8121}
8122_ACEOF
8123rm -f conftest.$ac_objext
8124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8125 (eval $ac_compile) 2>conftest.er1
8126 ac_status=$?
8127 grep -v '^ *+' conftest.er1 >conftest.err
8128 rm -f conftest.er1
8129 cat conftest.err >&5
8130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8131 (exit $ac_status); } &&
fd7d450d
DD
8132 { ac_try='test -z "$ac_c_werror_flag"
8133 || test ! -s conftest.err'
fa99459d
DD
8134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8135 (eval $ac_try) 2>&5
8136 ac_status=$?
8137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8138 (exit $ac_status); }; } &&
8139 { ac_try='test -s conftest.$ac_objext'
8140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8141 (eval $ac_try) 2>&5
8142 ac_status=$?
8143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8144 (exit $ac_status); }; }; then
8145 ac_cv_have_decl_vasprintf=yes
8146else
8147 echo "$as_me: failed program was:" >&5
8148sed 's/^/| /' conftest.$ac_ext >&5
8149
8150ac_cv_have_decl_vasprintf=no
8151fi
8152rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8153fi
8154echo "$as_me:$LINENO: result: $ac_cv_have_decl_vasprintf" >&5
8155echo "${ECHO_T}$ac_cv_have_decl_vasprintf" >&6
8156if test $ac_cv_have_decl_vasprintf = yes; then
8157
8158cat >>confdefs.h <<_ACEOF
8159#define HAVE_DECL_VASPRINTF 1
8160_ACEOF
8161
8162
8163else
8164 cat >>confdefs.h <<_ACEOF
8165#define HAVE_DECL_VASPRINTF 0
8166_ACEOF
8167
8168
01e94249
DD
8169fi
8170echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
8171echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
8172if test "${ac_cv_have_decl_snprintf+set}" = set; then
8173 echo $ECHO_N "(cached) $ECHO_C" >&6
8174else
8175 cat >conftest.$ac_ext <<_ACEOF
8176/* confdefs.h. */
8177_ACEOF
8178cat confdefs.h >>conftest.$ac_ext
8179cat >>conftest.$ac_ext <<_ACEOF
8180/* end confdefs.h. */
8181$ac_includes_default
8182int
8183main ()
8184{
8185#ifndef snprintf
8186 char *p = (char *) snprintf;
8187#endif
8188
8189 ;
8190 return 0;
8191}
8192_ACEOF
8193rm -f conftest.$ac_objext
8194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8195 (eval $ac_compile) 2>conftest.er1
8196 ac_status=$?
8197 grep -v '^ *+' conftest.er1 >conftest.err
8198 rm -f conftest.er1
8199 cat conftest.err >&5
8200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8201 (exit $ac_status); } &&
fd7d450d
DD
8202 { ac_try='test -z "$ac_c_werror_flag"
8203 || test ! -s conftest.err'
01e94249
DD
8204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8205 (eval $ac_try) 2>&5
8206 ac_status=$?
8207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8208 (exit $ac_status); }; } &&
8209 { ac_try='test -s conftest.$ac_objext'
8210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8211 (eval $ac_try) 2>&5
8212 ac_status=$?
8213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8214 (exit $ac_status); }; }; then
8215 ac_cv_have_decl_snprintf=yes
8216else
8217 echo "$as_me: failed program was:" >&5
8218sed 's/^/| /' conftest.$ac_ext >&5
8219
8220ac_cv_have_decl_snprintf=no
8221fi
8222rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8223fi
8224echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
8225echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
8226if test $ac_cv_have_decl_snprintf = yes; then
8227
8228cat >>confdefs.h <<_ACEOF
8229#define HAVE_DECL_SNPRINTF 1
8230_ACEOF
8231
8232
8233else
8234 cat >>confdefs.h <<_ACEOF
8235#define HAVE_DECL_SNPRINTF 0
8236_ACEOF
8237
8238
8239fi
8240echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
8241echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
8242if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
8243 echo $ECHO_N "(cached) $ECHO_C" >&6
8244else
8245 cat >conftest.$ac_ext <<_ACEOF
8246/* confdefs.h. */
8247_ACEOF
8248cat confdefs.h >>conftest.$ac_ext
8249cat >>conftest.$ac_ext <<_ACEOF
8250/* end confdefs.h. */
8251$ac_includes_default
8252int
8253main ()
8254{
8255#ifndef vsnprintf
8256 char *p = (char *) vsnprintf;
8257#endif
8258
8259 ;
8260 return 0;
8261}
8262_ACEOF
8263rm -f conftest.$ac_objext
8264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8265 (eval $ac_compile) 2>conftest.er1
8266 ac_status=$?
8267 grep -v '^ *+' conftest.er1 >conftest.err
8268 rm -f conftest.er1
8269 cat conftest.err >&5
8270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8271 (exit $ac_status); } &&
fd7d450d
DD
8272 { ac_try='test -z "$ac_c_werror_flag"
8273 || test ! -s conftest.err'
01e94249
DD
8274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8275 (eval $ac_try) 2>&5
8276 ac_status=$?
8277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8278 (exit $ac_status); }; } &&
8279 { ac_try='test -s conftest.$ac_objext'
8280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8281 (eval $ac_try) 2>&5
8282 ac_status=$?
8283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8284 (exit $ac_status); }; }; then
8285 ac_cv_have_decl_vsnprintf=yes
8286else
8287 echo "$as_me: failed program was:" >&5
8288sed 's/^/| /' conftest.$ac_ext >&5
8289
8290ac_cv_have_decl_vsnprintf=no
8291fi
8292rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8293fi
8294echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
8295echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
8296if test $ac_cv_have_decl_vsnprintf = yes; then
8297
8298cat >>confdefs.h <<_ACEOF
8299#define HAVE_DECL_VSNPRINTF 1
8300_ACEOF
8301
8302
8303else
8304 cat >>confdefs.h <<_ACEOF
8305#define HAVE_DECL_VSNPRINTF 0
8306_ACEOF
8307
8308
abf6a75b
DD
8309fi
8310
8311
8312 echo "$as_me:$LINENO: checking whether calloc is declared" >&5
8313echo $ECHO_N "checking whether calloc is declared... $ECHO_C" >&6
8314if test "${ac_cv_have_decl_calloc+set}" = set; then
8315 echo $ECHO_N "(cached) $ECHO_C" >&6
8316else
8317 cat >conftest.$ac_ext <<_ACEOF
8318/* confdefs.h. */
8319_ACEOF
8320cat confdefs.h >>conftest.$ac_ext
8321cat >>conftest.$ac_ext <<_ACEOF
8322/* end confdefs.h. */
8323$ac_includes_default
8324int
8325main ()
8326{
8327#ifndef calloc
8328 char *p = (char *) calloc;
8329#endif
8330
8331 ;
8332 return 0;
8333}
8334_ACEOF
8335rm -f conftest.$ac_objext
8336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8337 (eval $ac_compile) 2>conftest.er1
8338 ac_status=$?
8339 grep -v '^ *+' conftest.er1 >conftest.err
8340 rm -f conftest.er1
8341 cat conftest.err >&5
8342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8343 (exit $ac_status); } &&
fd7d450d
DD
8344 { ac_try='test -z "$ac_c_werror_flag"
8345 || test ! -s conftest.err'
abf6a75b
DD
8346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8347 (eval $ac_try) 2>&5
8348 ac_status=$?
8349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8350 (exit $ac_status); }; } &&
8351 { ac_try='test -s conftest.$ac_objext'
8352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8353 (eval $ac_try) 2>&5
8354 ac_status=$?
8355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8356 (exit $ac_status); }; }; then
8357 ac_cv_have_decl_calloc=yes
8358else
8359 echo "$as_me: failed program was:" >&5
8360sed 's/^/| /' conftest.$ac_ext >&5
8361
8362ac_cv_have_decl_calloc=no
8363fi
8364rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8365fi
8366echo "$as_me:$LINENO: result: $ac_cv_have_decl_calloc" >&5
8367echo "${ECHO_T}$ac_cv_have_decl_calloc" >&6
8368if test $ac_cv_have_decl_calloc = yes; then
8369
8370cat >>confdefs.h <<_ACEOF
8371#define HAVE_DECL_CALLOC 1
8372_ACEOF
8373
8374
8375else
8376 cat >>confdefs.h <<_ACEOF
8377#define HAVE_DECL_CALLOC 0
8378_ACEOF
8379
8380
8381fi
8382echo "$as_me:$LINENO: checking whether getenv is declared" >&5
8383echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
8384if test "${ac_cv_have_decl_getenv+set}" = set; then
8385 echo $ECHO_N "(cached) $ECHO_C" >&6
8386else
8387 cat >conftest.$ac_ext <<_ACEOF
8388/* confdefs.h. */
8389_ACEOF
8390cat confdefs.h >>conftest.$ac_ext
8391cat >>conftest.$ac_ext <<_ACEOF
8392/* end confdefs.h. */
8393$ac_includes_default
8394int
8395main ()
8396{
8397#ifndef getenv
8398 char *p = (char *) getenv;
8399#endif
8400
8401 ;
8402 return 0;
8403}
8404_ACEOF
8405rm -f conftest.$ac_objext
8406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8407 (eval $ac_compile) 2>conftest.er1
8408 ac_status=$?
8409 grep -v '^ *+' conftest.er1 >conftest.err
8410 rm -f conftest.er1
8411 cat conftest.err >&5
8412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8413 (exit $ac_status); } &&
fd7d450d
DD
8414 { ac_try='test -z "$ac_c_werror_flag"
8415 || test ! -s conftest.err'
abf6a75b
DD
8416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8417 (eval $ac_try) 2>&5
8418 ac_status=$?
8419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8420 (exit $ac_status); }; } &&
8421 { ac_try='test -s conftest.$ac_objext'
8422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8423 (eval $ac_try) 2>&5
8424 ac_status=$?
8425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8426 (exit $ac_status); }; }; then
8427 ac_cv_have_decl_getenv=yes
8428else
8429 echo "$as_me: failed program was:" >&5
8430sed 's/^/| /' conftest.$ac_ext >&5
8431
8432ac_cv_have_decl_getenv=no
8433fi
8434rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8435fi
8436echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
8437echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
8438if test $ac_cv_have_decl_getenv = yes; then
8439
8440cat >>confdefs.h <<_ACEOF
8441#define HAVE_DECL_GETENV 1
8442_ACEOF
8443
8444
8445else
8446 cat >>confdefs.h <<_ACEOF
8447#define HAVE_DECL_GETENV 0
8448_ACEOF
8449
8450
a4e5c0d8
DD
8451fi
8452echo "$as_me:$LINENO: checking whether getopt is declared" >&5
8453echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6
8454if test "${ac_cv_have_decl_getopt+set}" = set; then
8455 echo $ECHO_N "(cached) $ECHO_C" >&6
8456else
8457 cat >conftest.$ac_ext <<_ACEOF
8458/* confdefs.h. */
8459_ACEOF
8460cat confdefs.h >>conftest.$ac_ext
8461cat >>conftest.$ac_ext <<_ACEOF
8462/* end confdefs.h. */
8463$ac_includes_default
8464int
8465main ()
8466{
8467#ifndef getopt
8468 char *p = (char *) getopt;
8469#endif
8470
8471 ;
8472 return 0;
8473}
8474_ACEOF
8475rm -f conftest.$ac_objext
8476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8477 (eval $ac_compile) 2>conftest.er1
8478 ac_status=$?
8479 grep -v '^ *+' conftest.er1 >conftest.err
8480 rm -f conftest.er1
8481 cat conftest.err >&5
8482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8483 (exit $ac_status); } &&
fd7d450d
DD
8484 { ac_try='test -z "$ac_c_werror_flag"
8485 || test ! -s conftest.err'
a4e5c0d8
DD
8486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8487 (eval $ac_try) 2>&5
8488 ac_status=$?
8489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8490 (exit $ac_status); }; } &&
8491 { ac_try='test -s conftest.$ac_objext'
8492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8493 (eval $ac_try) 2>&5
8494 ac_status=$?
8495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496 (exit $ac_status); }; }; then
8497 ac_cv_have_decl_getopt=yes
8498else
8499 echo "$as_me: failed program was:" >&5
8500sed 's/^/| /' conftest.$ac_ext >&5
8501
8502ac_cv_have_decl_getopt=no
8503fi
8504rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8505fi
8506echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5
8507echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6
8508if test $ac_cv_have_decl_getopt = yes; then
8509
8510cat >>confdefs.h <<_ACEOF
8511#define HAVE_DECL_GETOPT 1
8512_ACEOF
8513
8514
8515else
8516 cat >>confdefs.h <<_ACEOF
8517#define HAVE_DECL_GETOPT 0
8518_ACEOF
8519
8520
abf6a75b
DD
8521fi
8522echo "$as_me:$LINENO: checking whether malloc is declared" >&5
8523echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
8524if test "${ac_cv_have_decl_malloc+set}" = set; then
8525 echo $ECHO_N "(cached) $ECHO_C" >&6
8526else
8527 cat >conftest.$ac_ext <<_ACEOF
8528/* confdefs.h. */
8529_ACEOF
8530cat confdefs.h >>conftest.$ac_ext
8531cat >>conftest.$ac_ext <<_ACEOF
8532/* end confdefs.h. */
8533$ac_includes_default
8534int
8535main ()
8536{
8537#ifndef malloc
8538 char *p = (char *) malloc;
8539#endif
8540
8541 ;
8542 return 0;
8543}
8544_ACEOF
8545rm -f conftest.$ac_objext
8546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8547 (eval $ac_compile) 2>conftest.er1
8548 ac_status=$?
8549 grep -v '^ *+' conftest.er1 >conftest.err
8550 rm -f conftest.er1
8551 cat conftest.err >&5
8552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8553 (exit $ac_status); } &&
fd7d450d
DD
8554 { ac_try='test -z "$ac_c_werror_flag"
8555 || test ! -s conftest.err'
abf6a75b
DD
8556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8557 (eval $ac_try) 2>&5
8558 ac_status=$?
8559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8560 (exit $ac_status); }; } &&
8561 { ac_try='test -s conftest.$ac_objext'
8562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8563 (eval $ac_try) 2>&5
8564 ac_status=$?
8565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8566 (exit $ac_status); }; }; then
8567 ac_cv_have_decl_malloc=yes
8568else
8569 echo "$as_me: failed program was:" >&5
8570sed 's/^/| /' conftest.$ac_ext >&5
8571
8572ac_cv_have_decl_malloc=no
8573fi
8574rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8575fi
8576echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
8577echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
8578if test $ac_cv_have_decl_malloc = yes; then
8579
8580cat >>confdefs.h <<_ACEOF
8581#define HAVE_DECL_MALLOC 1
8582_ACEOF
8583
8584
8585else
8586 cat >>confdefs.h <<_ACEOF
8587#define HAVE_DECL_MALLOC 0
8588_ACEOF
8589
8590
8591fi
8592echo "$as_me:$LINENO: checking whether realloc is declared" >&5
8593echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6
8594if test "${ac_cv_have_decl_realloc+set}" = set; then
8595 echo $ECHO_N "(cached) $ECHO_C" >&6
8596else
8597 cat >conftest.$ac_ext <<_ACEOF
8598/* confdefs.h. */
8599_ACEOF
8600cat confdefs.h >>conftest.$ac_ext
8601cat >>conftest.$ac_ext <<_ACEOF
8602/* end confdefs.h. */
8603$ac_includes_default
8604int
8605main ()
8606{
8607#ifndef realloc
8608 char *p = (char *) realloc;
8609#endif
8610
8611 ;
8612 return 0;
8613}
8614_ACEOF
8615rm -f conftest.$ac_objext
8616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8617 (eval $ac_compile) 2>conftest.er1
8618 ac_status=$?
8619 grep -v '^ *+' conftest.er1 >conftest.err
8620 rm -f conftest.er1
8621 cat conftest.err >&5
8622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8623 (exit $ac_status); } &&
fd7d450d
DD
8624 { ac_try='test -z "$ac_c_werror_flag"
8625 || test ! -s conftest.err'
abf6a75b
DD
8626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8627 (eval $ac_try) 2>&5
8628 ac_status=$?
8629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8630 (exit $ac_status); }; } &&
8631 { ac_try='test -s conftest.$ac_objext'
8632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8633 (eval $ac_try) 2>&5
8634 ac_status=$?
8635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8636 (exit $ac_status); }; }; then
8637 ac_cv_have_decl_realloc=yes
8638else
8639 echo "$as_me: failed program was:" >&5
8640sed 's/^/| /' conftest.$ac_ext >&5
8641
8642ac_cv_have_decl_realloc=no
8643fi
8644rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8645fi
8646echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5
8647echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6
8648if test $ac_cv_have_decl_realloc = yes; then
8649
8650cat >>confdefs.h <<_ACEOF
8651#define HAVE_DECL_REALLOC 1
8652_ACEOF
8653
8654
8655else
8656 cat >>confdefs.h <<_ACEOF
8657#define HAVE_DECL_REALLOC 0
8658_ACEOF
8659
8660
8661fi
8662echo "$as_me:$LINENO: checking whether sbrk is declared" >&5
8663echo $ECHO_N "checking whether sbrk is declared... $ECHO_C" >&6
8664if test "${ac_cv_have_decl_sbrk+set}" = set; then
8665 echo $ECHO_N "(cached) $ECHO_C" >&6
8666else
8667 cat >conftest.$ac_ext <<_ACEOF
8668/* confdefs.h. */
8669_ACEOF
8670cat confdefs.h >>conftest.$ac_ext
8671cat >>conftest.$ac_ext <<_ACEOF
8672/* end confdefs.h. */
8673$ac_includes_default
8674int
8675main ()
8676{
8677#ifndef sbrk
8678 char *p = (char *) sbrk;
8679#endif
8680
8681 ;
8682 return 0;
8683}
8684_ACEOF
8685rm -f conftest.$ac_objext
8686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8687 (eval $ac_compile) 2>conftest.er1
8688 ac_status=$?
8689 grep -v '^ *+' conftest.er1 >conftest.err
8690 rm -f conftest.er1
8691 cat conftest.err >&5
8692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8693 (exit $ac_status); } &&
fd7d450d
DD
8694 { ac_try='test -z "$ac_c_werror_flag"
8695 || test ! -s conftest.err'
abf6a75b
DD
8696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8697 (eval $ac_try) 2>&5
8698 ac_status=$?
8699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8700 (exit $ac_status); }; } &&
8701 { ac_try='test -s conftest.$ac_objext'
8702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8703 (eval $ac_try) 2>&5
8704 ac_status=$?
8705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8706 (exit $ac_status); }; }; then
8707 ac_cv_have_decl_sbrk=yes
8708else
8709 echo "$as_me: failed program was:" >&5
8710sed 's/^/| /' conftest.$ac_ext >&5
8711
8712ac_cv_have_decl_sbrk=no
8713fi
8714rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8715fi
8716echo "$as_me:$LINENO: result: $ac_cv_have_decl_sbrk" >&5
8717echo "${ECHO_T}$ac_cv_have_decl_sbrk" >&6
8718if test $ac_cv_have_decl_sbrk = yes; then
8719
8720cat >>confdefs.h <<_ACEOF
8721#define HAVE_DECL_SBRK 1
8722_ACEOF
8723
8724
8725else
8726 cat >>confdefs.h <<_ACEOF
8727#define HAVE_DECL_SBRK 0
8728_ACEOF
8729
8730
67f3cb05
GK
8731fi
8732
8733
8734 echo "$as_me:$LINENO: checking whether strverscmp is declared" >&5
8735echo $ECHO_N "checking whether strverscmp is declared... $ECHO_C" >&6
8736if test "${ac_cv_have_decl_strverscmp+set}" = set; then
8737 echo $ECHO_N "(cached) $ECHO_C" >&6
8738else
8739 cat >conftest.$ac_ext <<_ACEOF
8740/* confdefs.h. */
8741_ACEOF
8742cat confdefs.h >>conftest.$ac_ext
8743cat >>conftest.$ac_ext <<_ACEOF
8744/* end confdefs.h. */
8745$ac_includes_default
8746int
8747main ()
8748{
8749#ifndef strverscmp
8750 char *p = (char *) strverscmp;
8751#endif
8752
8753 ;
8754 return 0;
8755}
8756_ACEOF
8757rm -f conftest.$ac_objext
8758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8759 (eval $ac_compile) 2>conftest.er1
8760 ac_status=$?
8761 grep -v '^ *+' conftest.er1 >conftest.err
8762 rm -f conftest.er1
8763 cat conftest.err >&5
8764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8765 (exit $ac_status); } &&
fd7d450d
DD
8766 { ac_try='test -z "$ac_c_werror_flag"
8767 || test ! -s conftest.err'
67f3cb05
GK
8768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8769 (eval $ac_try) 2>&5
8770 ac_status=$?
8771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8772 (exit $ac_status); }; } &&
8773 { ac_try='test -s conftest.$ac_objext'
8774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8775 (eval $ac_try) 2>&5
8776 ac_status=$?
8777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8778 (exit $ac_status); }; }; then
8779 ac_cv_have_decl_strverscmp=yes
8780else
8781 echo "$as_me: failed program was:" >&5
8782sed 's/^/| /' conftest.$ac_ext >&5
8783
8784ac_cv_have_decl_strverscmp=no
8785fi
8786rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8787fi
8788echo "$as_me:$LINENO: result: $ac_cv_have_decl_strverscmp" >&5
8789echo "${ECHO_T}$ac_cv_have_decl_strverscmp" >&6
8790if test $ac_cv_have_decl_strverscmp = yes; then
8791
8792cat >>confdefs.h <<_ACEOF
8793#define HAVE_DECL_STRVERSCMP 1
8794_ACEOF
8795
8796
8797else
8798 cat >>confdefs.h <<_ACEOF
8799#define HAVE_DECL_STRVERSCMP 0
8800_ACEOF
8801
8802
fa99459d
DD
8803fi
8804
8805
2299a76d
DJ
8806 echo "$as_me:$LINENO: checking whether canonicalize_file_name must be declared" >&5
8807echo $ECHO_N "checking whether canonicalize_file_name must be declared... $ECHO_C" >&6
8808if test "${libiberty_cv_decl_needed_canonicalize_file_name+set}" = set; then
8809 echo $ECHO_N "(cached) $ECHO_C" >&6
ba61a412 8810else
2299a76d 8811 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
8812/* confdefs.h. */
8813_ACEOF
8814cat confdefs.h >>conftest.$ac_ext
8815cat >>conftest.$ac_ext <<_ACEOF
8816/* end confdefs.h. */
ba61a412
DJ
8817
8818#include "confdefs.h"
8819#include <stdio.h>
8820#ifdef HAVE_STRING_H
8821#include <string.h>
8822#else
8823#ifdef HAVE_STRINGS_H
8824#include <strings.h>
8825#endif
8826#endif
8827#ifdef HAVE_STDLIB_H
8828#include <stdlib.h>
8829#endif
8830#ifdef HAVE_UNISTD_H
8831#include <unistd.h>
8832#endif
2299a76d
DJ
8833int
8834main ()
8835{
ba61a412 8836char *(*pfn) = (char *(*)) canonicalize_file_name
2299a76d
DJ
8837 ;
8838 return 0;
8839}
8840_ACEOF
8841rm -f conftest.$ac_objext
8842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
58670637 8843 (eval $ac_compile) 2>conftest.er1
2299a76d 8844 ac_status=$?
58670637
DD
8845 grep -v '^ *+' conftest.er1 >conftest.err
8846 rm -f conftest.er1
8847 cat conftest.err >&5
2299a76d
DJ
8848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8849 (exit $ac_status); } &&
fd7d450d
DD
8850 { ac_try='test -z "$ac_c_werror_flag"
8851 || test ! -s conftest.err'
58670637
DD
8852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8853 (eval $ac_try) 2>&5
8854 ac_status=$?
8855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8856 (exit $ac_status); }; } &&
8857 { ac_try='test -s conftest.$ac_objext'
2299a76d
DJ
8858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8859 (eval $ac_try) 2>&5
8860 ac_status=$?
8861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8862 (exit $ac_status); }; }; then
ba61a412
DJ
8863 libiberty_cv_decl_needed_canonicalize_file_name=no
8864else
2299a76d
DJ
8865 echo "$as_me: failed program was:" >&5
8866sed 's/^/| /' conftest.$ac_ext >&5
8867
8868libiberty_cv_decl_needed_canonicalize_file_name=yes
ba61a412 8869fi
58670637 8870rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba61a412
DJ
8871fi
8872
2299a76d
DJ
8873echo "$as_me:$LINENO: result: $libiberty_cv_decl_needed_canonicalize_file_name" >&5
8874echo "${ECHO_T}$libiberty_cv_decl_needed_canonicalize_file_name" >&6
ba61a412 8875if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then
2299a76d
DJ
8876
8877cat >>confdefs.h <<\_ACEOF
ba61a412 8878#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
2299a76d 8879_ACEOF
ba61a412
DJ
8880
8881fi
8882
eb383413
L
8883fi
8884
5a17353c
DD
8885# Figure out which version of pexecute to use.
8886case "${host}" in
46a10049
DD
8887 *-*-mingw* | *-*-winnt*) pexecute=./pex-win32.o ;;
8888 *-*-msdosdjgpp*) pexecute=./pex-djgpp.o ;;
8889 *-*-msdos*) pexecute=./pex-msdos.o ;;
46a10049 8890 *) pexecute=./pex-unix.o ;;
5a17353c
DD
8891esac
8892
8893
2299a76d
DJ
8894if test x$gcc_no_link = xyes; then
8895 if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
8896 ac_cv_func_mmap_fixed_mapped=no
8897 fi
8898fi
67f3cb05 8899if test "x${ac_cv_func_mmap_fixed_mapped}" != xno; then
2299a76d
DJ
8900
8901
8902for ac_header in stdlib.h unistd.h
eb383413 8903do
2299a76d 8904as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8ddbb593 8905echo "$as_me:$LINENO: checking for $ac_header" >&5
2299a76d
DJ
8906echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8907if eval "test \"\${$as_ac_Header+set}\" = set"; then
8908 echo $ECHO_N "(cached) $ECHO_C" >&6
2299a76d 8909else
8ddbb593 8910 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
8911/* confdefs.h. */
8912_ACEOF
8913cat confdefs.h >>conftest.$ac_ext
8914cat >>conftest.$ac_ext <<_ACEOF
8915/* end confdefs.h. */
8916#include <$ac_header>
8917_ACEOF
8918if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8919 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8920 ac_status=$?
8921 grep -v '^ *+' conftest.er1 >conftest.err
8922 rm -f conftest.er1
8923 cat conftest.err >&5
8924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8925 (exit $ac_status); } >/dev/null; then
8926 if test -s conftest.err; then
8927 ac_cpp_err=$ac_c_preproc_warn_flag
58670637 8928 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2299a76d
DJ
8929 else
8930 ac_cpp_err=
8931 fi
8932else
8933 ac_cpp_err=yes
8934fi
8935if test -z "$ac_cpp_err"; then
8ddbb593 8936 eval "$as_ac_Header=yes"
2299a76d
DJ
8937else
8938 echo "$as_me: failed program was:" >&5
8939sed 's/^/| /' conftest.$ac_ext >&5
8940
8ddbb593 8941 eval "$as_ac_Header=no"
2299a76d
DJ
8942fi
8943rm -f conftest.err conftest.$ac_ext
eb383413 8944fi
2299a76d
DJ
8945echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8946echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2299a76d
DJ
8947if test `eval echo '${'$as_ac_Header'}'` = yes; then
8948 cat >>confdefs.h <<_ACEOF
8949#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8950_ACEOF
8951
eb383413
L
8952fi
8953done
8954
2299a76d 8955
eb383413
L
8956for ac_func in getpagesize
8957do
2299a76d
DJ
8958as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8959echo "$as_me:$LINENO: checking for $ac_func" >&5
8960echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8961if eval "test \"\${$as_ac_var+set}\" = set"; then
8962 echo $ECHO_N "(cached) $ECHO_C" >&6
8963else
8964 if test x$gcc_no_link = xyes; then
8965 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
8966echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
8967 { (exit 1); exit 1; }; }
8968fi
8969cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
8970/* confdefs.h. */
8971_ACEOF
8972cat confdefs.h >>conftest.$ac_ext
8973cat >>conftest.$ac_ext <<_ACEOF
8974/* end confdefs.h. */
252b5132 8975/* System header to define __stub macros and hopefully few prototypes,
2299a76d
DJ
8976 which can conflict with char $ac_func (); below.
8977 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
60b04ee8
DD
8978 <limits.h> exists even on freestanding compilers. Under hpux,
8979 including <limits.h> includes <sys/time.h> and causes problems
8980 checking for functions defined therein. */
8981#if defined (__STDC__) && !defined (_HPUX_SOURCE)
2299a76d
DJ
8982# include <limits.h>
8983#else
8984# include <assert.h>
8985#endif
252b5132 8986/* Override any gcc2 internal prototype to avoid an error. */
2299a76d
DJ
8987#ifdef __cplusplus
8988extern "C"
8989{
8990#endif
252b5132 8991/* We use char because int might match the return type of a gcc2
2299a76d
DJ
8992 builtin and then its argument prototype would still apply. */
8993char $ac_func ();
252b5132
RH
8994/* The GNU C library defines this for functions which it implements
8995 to always fail with ENOSYS. Some functions are actually named
8996 something starting with __ and the normal name is an alias. */
8997#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8998choke me
8999#else
2299a76d
DJ
9000char (*f) () = $ac_func;
9001#endif
9002#ifdef __cplusplus
9003}
252b5132
RH
9004#endif
9005
2299a76d
DJ
9006int
9007main ()
9008{
9009return f != $ac_func;
9010 ;
9011 return 0;
9012}
9013_ACEOF
9014rm -f conftest.$ac_objext conftest$ac_exeext
9015if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
58670637 9016 (eval $ac_link) 2>conftest.er1
2299a76d 9017 ac_status=$?
58670637
DD
9018 grep -v '^ *+' conftest.er1 >conftest.err
9019 rm -f conftest.er1
9020 cat conftest.err >&5
2299a76d
DJ
9021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9022 (exit $ac_status); } &&
fd7d450d
DD
9023 { ac_try='test -z "$ac_c_werror_flag"
9024 || test ! -s conftest.err'
58670637
DD
9025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9026 (eval $ac_try) 2>&5
9027 ac_status=$?
9028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9029 (exit $ac_status); }; } &&
9030 { ac_try='test -s conftest$ac_exeext'
2299a76d
DJ
9031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9032 (eval $ac_try) 2>&5
9033 ac_status=$?
9034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9035 (exit $ac_status); }; }; then
9036 eval "$as_ac_var=yes"
9037else
9038 echo "$as_me: failed program was:" >&5
9039sed 's/^/| /' conftest.$ac_ext >&5
9040
9041eval "$as_ac_var=no"
9042fi
58670637
DD
9043rm -f conftest.err conftest.$ac_objext \
9044 conftest$ac_exeext conftest.$ac_ext
2299a76d
DJ
9045fi
9046echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9047echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9048if test `eval echo '${'$as_ac_var'}'` = yes; then
9049 cat >>confdefs.h <<_ACEOF
9050#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9051_ACEOF
252b5132 9052
252b5132
RH
9053fi
9054done
9055
2299a76d
DJ
9056echo "$as_me:$LINENO: checking for working mmap" >&5
9057echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
9058if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9059 echo $ECHO_N "(cached) $ECHO_C" >&6
eb383413
L
9060else
9061 if test "$cross_compiling" = yes; then
9062 ac_cv_func_mmap_fixed_mapped=no
9063else
2299a76d 9064 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
9065/* confdefs.h. */
9066_ACEOF
9067cat confdefs.h >>conftest.$ac_ext
9068cat >>conftest.$ac_ext <<_ACEOF
9069/* end confdefs.h. */
9070$ac_includes_default
9071/* malloc might have been renamed as rpl_malloc. */
9072#undef malloc
eb383413
L
9073
9074/* Thanks to Mike Haertel and Jim Avera for this test.
9075 Here is a matrix of mmap possibilities:
9076 mmap private not fixed
9077 mmap private fixed at somewhere currently unmapped
9078 mmap private fixed at somewhere already mapped
9079 mmap shared not fixed
9080 mmap shared fixed at somewhere currently unmapped
9081 mmap shared fixed at somewhere already mapped
9082 For private mappings, we should verify that changes cannot be read()
9083 back from the file, nor mmap's back from the file at a different
9084 address. (There have been systems where private was not correctly
9085 implemented like the infamous i386 svr4.0, and systems where the
2299a76d 9086 VM page cache was not coherent with the file system buffer cache
eb383413
L
9087 like early versions of FreeBSD and possibly contemporary NetBSD.)
9088 For shared mappings, we should conversely verify that changes get
2299a76d 9089 propagated back to all the places they're supposed to be.
eb383413
L
9090
9091 Grep wants private fixed already mapped.
9092 The main things grep needs to know about mmap are:
9093 * does it exist and is it safe to write into the mmap'd area
9094 * how to use it (BSD variants) */
2299a76d 9095
eb383413
L
9096#include <fcntl.h>
9097#include <sys/mman.h>
9098
2299a76d
DJ
9099#if !STDC_HEADERS && !HAVE_STDLIB_H
9100char *malloc ();
5f73c378
DD
9101#endif
9102
eb383413 9103/* This mess was copied from the GNU getpagesize.h. */
2299a76d 9104#if !HAVE_GETPAGESIZE
eb383413 9105/* Assume that all systems that can run configure have sys/param.h. */
2299a76d 9106# if !HAVE_SYS_PARAM_H
eb383413
L
9107# define HAVE_SYS_PARAM_H 1
9108# endif
9109
9110# ifdef _SC_PAGESIZE
9111# define getpagesize() sysconf(_SC_PAGESIZE)
9112# else /* no _SC_PAGESIZE */
2299a76d 9113# if HAVE_SYS_PARAM_H
eb383413
L
9114# include <sys/param.h>
9115# ifdef EXEC_PAGESIZE
9116# define getpagesize() EXEC_PAGESIZE
9117# else /* no EXEC_PAGESIZE */
9118# ifdef NBPG
9119# define getpagesize() NBPG * CLSIZE
9120# ifndef CLSIZE
9121# define CLSIZE 1
9122# endif /* no CLSIZE */
9123# else /* no NBPG */
9124# ifdef NBPC
9125# define getpagesize() NBPC
9126# else /* no NBPC */
9127# ifdef PAGESIZE
9128# define getpagesize() PAGESIZE
9129# endif /* PAGESIZE */
9130# endif /* no NBPC */
9131# endif /* no NBPG */
9132# endif /* no EXEC_PAGESIZE */
9133# else /* no HAVE_SYS_PARAM_H */
9134# define getpagesize() 8192 /* punt totally */
9135# endif /* no HAVE_SYS_PARAM_H */
9136# endif /* no _SC_PAGESIZE */
9137
9138#endif /* no HAVE_GETPAGESIZE */
9139
eb383413 9140int
2299a76d 9141main ()
eb383413 9142{
2299a76d
DJ
9143 char *data, *data2, *data3;
9144 int i, pagesize;
9145 int fd;
eb383413 9146
2299a76d
DJ
9147 pagesize = getpagesize ();
9148
9149 /* First, make a file with some known garbage in it. */
9150 data = (char *) malloc (pagesize);
9151 if (!data)
9152 exit (1);
9153 for (i = 0; i < pagesize; ++i)
9154 *(data + i) = rand ();
9155 umask (0);
9156 fd = creat ("conftest.mmap", 0600);
9157 if (fd < 0)
9158 exit (1);
9159 if (write (fd, data, pagesize) != pagesize)
9160 exit (1);
9161 close (fd);
9162
9163 /* Next, try to mmap the file at a fixed address which already has
9164 something else allocated at it. If we can, also make sure that
9165 we see the same garbage. */
9166 fd = open ("conftest.mmap", O_RDWR);
9167 if (fd < 0)
9168 exit (1);
9169 data2 = (char *) malloc (2 * pagesize);
9170 if (!data2)
9171 exit (1);
58670637 9172 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
2299a76d 9173 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
58670637 9174 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2299a76d
DJ
9175 exit (1);
9176 for (i = 0; i < pagesize; ++i)
9177 if (*(data + i) != *(data2 + i))
9178 exit (1);
9179
9180 /* Finally, make sure that changes to the mapped area do not
9181 percolate back to the file as seen by read(). (This is a bug on
9182 some variants of i386 svr4.0.) */
9183 for (i = 0; i < pagesize; ++i)
9184 *(data2 + i) = *(data2 + i) + 1;
9185 data3 = (char *) malloc (pagesize);
9186 if (!data3)
9187 exit (1);
9188 if (read (fd, data3, pagesize) != pagesize)
9189 exit (1);
9190 for (i = 0; i < pagesize; ++i)
9191 if (*(data + i) != *(data3 + i))
9192 exit (1);
9193 close (fd);
9194 exit (0);
9195}
9196_ACEOF
9197rm -f conftest$ac_exeext
9198if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9199 (eval $ac_link) 2>&5
9200 ac_status=$?
9201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9202 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9204 (eval $ac_try) 2>&5
9205 ac_status=$?
9206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9207 (exit $ac_status); }; }; then
eb383413
L
9208 ac_cv_func_mmap_fixed_mapped=yes
9209else
2299a76d
DJ
9210 echo "$as_me: program exited with status $ac_status" >&5
9211echo "$as_me: failed program was:" >&5
9212sed 's/^/| /' conftest.$ac_ext >&5
9213
9214( exit $ac_status )
9215ac_cv_func_mmap_fixed_mapped=no
eb383413 9216fi
58670637 9217rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb383413 9218fi
eb383413 9219fi
2299a76d
DJ
9220echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
9221echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
eb383413 9222if test $ac_cv_func_mmap_fixed_mapped = yes; then
2299a76d
DJ
9223
9224cat >>confdefs.h <<\_ACEOF
eb383413 9225#define HAVE_MMAP 1
2299a76d 9226_ACEOF
eb383413 9227
252b5132 9228fi
2299a76d 9229rm -f conftest.mmap
252b5132 9230
2299a76d 9231fi
eb383413 9232
2299a76d
DJ
9233echo "$as_me:$LINENO: checking for working strncmp" >&5
9234echo $ECHO_N "checking for working strncmp... $ECHO_C" >&6
9235if test "${ac_cv_func_strncmp_works+set}" = set; then
9236 echo $ECHO_N "(cached) $ECHO_C" >&6
eb383413
L
9237else
9238 if test "$cross_compiling" = yes; then
9239 ac_cv_func_strncmp_works=no
9240else
2299a76d 9241 cat >conftest.$ac_ext <<_ACEOF
2299a76d
DJ
9242/* confdefs.h. */
9243_ACEOF
9244cat confdefs.h >>conftest.$ac_ext
9245cat >>conftest.$ac_ext <<_ACEOF
9246/* end confdefs.h. */
eb383413
L
9247
9248/* Test by Jim Wilson and Kaveh Ghazi.
9249 Check whether strncmp reads past the end of its string parameters. */
9250#include <sys/types.h>
9251
9252#ifdef HAVE_FCNTL_H
9253#include <fcntl.h>
9254#endif
9255
9256#ifdef HAVE_SYS_MMAN_H
9257#include <sys/mman.h>
9258#endif
9259
9260#ifndef MAP_ANON
9261#ifdef MAP_ANONYMOUS
9262#define MAP_ANON MAP_ANONYMOUS
9263#else
9264#define MAP_ANON MAP_FILE
9265#endif
9266#endif
9267
9268#ifndef MAP_FILE
9269#define MAP_FILE 0
9270#endif
9271#ifndef O_RDONLY
9272#define O_RDONLY 0
9273#endif
9274
9275#define MAP_LEN 0x10000
9276
9277main ()
9278{
9279#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
9280 char *p;
9281 int dev_zero;
9282
9283 dev_zero = open ("/dev/zero", O_RDONLY);
9284 if (dev_zero < 0)
9285 exit (1);
2299a76d 9286
eb383413
L
9287 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
9288 MAP_ANON|MAP_PRIVATE, dev_zero, 0);
f348a7b1
DD
9289 if (p == (char *)-1)
9290 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
9291 MAP_ANON|MAP_PRIVATE, -1, 0);
eb383413
L
9292 if (p == (char *)-1)
9293 exit (2);
9294 else
9295 {
9296 char *string = "__si_type_info";
9297 char *q = (char *) p + MAP_LEN - strlen (string) - 2;
9298 char *r = (char *) p + 0xe;
9299
9300 strcpy (q, string);
9301 strcpy (r, string);
9302 strncmp (r, q, 14);
9303 }
9304#endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */
9305 exit (0);
9306}
9307
2299a76d
DJ
9308_ACEOF
9309rm -f conftest$ac_exeext
9310if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9311 (eval $ac_link) 2>&5
9312 ac_status=$?
9313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9314 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9316 (eval $ac_try) 2>&5
9317 ac_status=$?
9318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9319 (exit $ac_status); }; }; then
eb383413
L
9320 ac_cv_func_strncmp_works=yes
9321else
2299a76d
DJ
9322 echo "$as_me: program exited with status $ac_status" >&5
9323echo "$as_me: failed program was:" >&5
9324sed 's/^/| /' conftest.$ac_ext >&5
9325
9326( exit $ac_status )
9327ac_cv_func_strncmp_works=no
eb383413 9328fi
58670637 9329rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb383413 9330fi
eb383413
L
9331rm -f core core.* *.core
9332fi
2299a76d
DJ
9333echo "$as_me:$LINENO: result: $ac_cv_func_strncmp_works" >&5
9334echo "${ECHO_T}$ac_cv_func_strncmp_works" >&6
eb383413 9335if test $ac_cv_func_strncmp_works = no ; then
58670637
DD
9336 case $LIBOBJS in
9337 "strncmp.$ac_objext" | \
9338 *" strncmp.$ac_objext" | \
9339 "strncmp.$ac_objext "* | \
9340 *" strncmp.$ac_objext "* ) ;;
9341 *) LIBOBJS="$LIBOBJS strncmp.$ac_objext" ;;
9342esac
9343
eb383413
L
9344fi
9345
9346
252b5132
RH
9347# Install a library built with a cross compiler in $(tooldir) rather
9348# than $(libdir).
9349if test -z "${with_cross_host}"; then
9350 INSTALL_DEST=libdir
9351else
9352 INSTALL_DEST=tooldir
9353fi
9354
9355
11a338da
DD
9356
9357L=""
9358for l in x $LIBOBJS; do
9359 case $l in
9360 x) ;;
9361 *) L="$L ./$l" ;;
9362 esac
9363done
9364LIBOBJS="$L"
9365
545c9aee
DD
9366
9367
9368
9369
252b5132 9370# We need multilib support, but only if configuring for the target.
2299a76d 9371 ac_config_files="$ac_config_files Makefile testsuite/Makefile"
bb6a587d 9372
2299a76d 9373 ac_config_commands="$ac_config_commands default"
bb6a587d 9374
2299a76d 9375cat >confcache <<\_ACEOF
252b5132
RH
9376# This file is a shell script that caches the results of configure
9377# tests run on this system so they can be shared between configure
2299a76d
DJ
9378# scripts and configure runs, see configure's option --config-cache.
9379# It is not useful on other systems. If it contains results you don't
9380# want to keep, you may remove or edit it.
252b5132 9381#
2299a76d
DJ
9382# config.status only pays attention to the cache file if you give it
9383# the --recheck option to rerun configure.
252b5132 9384#
2299a76d
DJ
9385# `ac_cv_env_foo' variables (set or unset) will be overridden when
9386# loading this file, other *unset* `ac_cv_foo' will be assigned the
9387# following values.
9388
9389_ACEOF
9390
252b5132
RH
9391# The following way of writing the cache mishandles newlines in values,
9392# but we know of no workaround that is simple, portable, and efficient.
9393# So, don't put newlines in cache variables' values.
9394# Ultrix sh set writes to stderr and can't be redirected directly,
9395# and sets the high bit in the cache file unless we assign to the vars.
2299a76d
DJ
9396{
9397 (set) 2>&1 |
9398 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9399 *ac_space=\ *)
9400 # `set' does not quote correctly, so add quotes (double-quote
9401 # substitution turns \\\\ into \\, and sed turns \\ into \).
9402 sed -n \
58670637
DD
9403 "s/'/'\\\\''/g;
9404 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
2299a76d
DJ
9405 ;;
9406 *)
9407 # `set' quotes correctly as required by POSIX, so do not add quotes.
9408 sed -n \
58670637 9409 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
2299a76d
DJ
9410 ;;
9411 esac;
9412} |
9413 sed '
9414 t clear
9415 : clear
9416 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
9417 t end
9418 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
9419 : end' >>confcache
9420if diff $cache_file confcache >/dev/null 2>&1; then :; else
252b5132 9421 if test -w $cache_file; then
2299a76d
DJ
9422 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
9423 cat confcache >$cache_file
252b5132
RH
9424 else
9425 echo "not updating unwritable cache $cache_file"
9426 fi
9427fi
9428rm -f confcache
9429
252b5132
RH
9430test "x$prefix" = xNONE && prefix=$ac_default_prefix
9431# Let make expand exec_prefix.
9432test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9433
2299a76d
DJ
9434# VPATH may cause trouble with some makes, so we remove $(srcdir),
9435# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
9436# trailing colons and then remove the whole line if VPATH becomes empty
9437# (actually we leave an empty line to preserve line numbers).
252b5132 9438if test "x$srcdir" = x.; then
58670637 9439 ac_vpsub='/^[ ]*VPATH[ ]*=/{
2299a76d
DJ
9440s/:*\$(srcdir):*/:/;
9441s/:*\${srcdir}:*/:/;
9442s/:*@srcdir@:*/:/;
58670637 9443s/^\([^=]*=[ ]*\):*/\1/;
2299a76d 9444s/:*$//;
58670637 9445s/^[^=]*=[ ]*$//;
2299a76d 9446}'
252b5132
RH
9447fi
9448
252b5132
RH
9449DEFS=-DHAVE_CONFIG_H
9450
2299a76d
DJ
9451ac_libobjs=
9452ac_ltlibobjs=
9453for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
9454 # 1. Remove the extension, and $U if already installed.
9455 ac_i=`echo "$ac_i" |
58670637 9456 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
2299a76d
DJ
9457 # 2. Add them.
9458 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
9459 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
9460done
9461LIBOBJS=$ac_libobjs
252b5132 9462
2299a76d
DJ
9463LTLIBOBJS=$ac_ltlibobjs
9464
9465
9466
9467: ${CONFIG_STATUS=./config.status}
9468ac_clean_files_save=$ac_clean_files
9469ac_clean_files="$ac_clean_files $CONFIG_STATUS"
9470{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
9471echo "$as_me: creating $CONFIG_STATUS" >&6;}
9472cat >$CONFIG_STATUS <<_ACEOF
9473#! $SHELL
9474# Generated by $as_me.
252b5132 9475# Run this file to recreate the current configuration.
252b5132 9476# Compiler output produced by configure, useful for debugging
2299a76d 9477# configure, is in config.log if it exists.
252b5132 9478
2299a76d
DJ
9479debug=false
9480ac_cs_recheck=false
9481ac_cs_silent=false
9482SHELL=\${CONFIG_SHELL-$SHELL}
9483_ACEOF
9484
9485cat >>$CONFIG_STATUS <<\_ACEOF
9486## --------------------- ##
9487## M4sh Initialization. ##
9488## --------------------- ##
9489
9490# Be Bourne compatible
9491if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
9492 emulate sh
9493 NULLCMD=:
9494 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
9495 # is contrary to our usage. Disable this feature.
9496 alias -g '${1+"$@"}'='"$@"'
9497elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
9498 set -o posix
9499fi
58670637 9500DUALCASE=1; export DUALCASE # for MKS sh
2299a76d
DJ
9501
9502# Support unset when possible.
58670637 9503if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
2299a76d
DJ
9504 as_unset=unset
9505else
9506 as_unset=false
9507fi
9508
9509
9510# Work around bugs in pre-3.0 UWIN ksh.
9511$as_unset ENV MAIL MAILPATH
9512PS1='$ '
9513PS2='> '
9514PS4='+ '
9515
9516# NLS nuisances.
9517for as_var in \
9518 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
9519 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
9520 LC_TELEPHONE LC_TIME
252b5132 9521do
58670637 9522 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
2299a76d
DJ
9523 eval $as_var=C; export $as_var
9524 else
9525 $as_unset $as_var
9526 fi
252b5132
RH
9527done
9528
2299a76d
DJ
9529# Required to use basename.
9530if expr a : '\(a\)' >/dev/null 2>&1; then
9531 as_expr=expr
9532else
9533 as_expr=false
9534fi
252b5132 9535
2299a76d
DJ
9536if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
9537 as_basename=basename
9538else
9539 as_basename=false
9540fi
252b5132 9541
252b5132 9542
2299a76d
DJ
9543# Name of the executable.
9544as_me=`$as_basename "$0" ||
9545$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9546 X"$0" : 'X\(//\)$' \| \
9547 X"$0" : 'X\(/\)$' \| \
9548 . : '\(.\)' 2>/dev/null ||
9549echo X/"$0" |
9550 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
9551 /^X\/\(\/\/\)$/{ s//\1/; q; }
9552 /^X\/\(\/\).*/{ s//\1/; q; }
9553 s/.*/./; q'`
9554
9555
9556# PATH needs CR, and LINENO needs CR and PATH.
9557# Avoid depending upon Character Ranges.
9558as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9559as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9560as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9561as_cr_digits='0123456789'
9562as_cr_alnum=$as_cr_Letters$as_cr_digits
252b5132 9563
2299a76d
DJ
9564# The user is always right.
9565if test "${PATH_SEPARATOR+set}" != set; then
9566 echo "#! /bin/sh" >conf$$.sh
9567 echo "exit 0" >>conf$$.sh
9568 chmod +x conf$$.sh
9569 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
9570 PATH_SEPARATOR=';'
252b5132 9571 else
2299a76d 9572 PATH_SEPARATOR=:
252b5132 9573 fi
2299a76d
DJ
9574 rm -f conf$$.sh
9575fi
9576
9577
9578 as_lineno_1=$LINENO
9579 as_lineno_2=$LINENO
9580 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
9581 test "x$as_lineno_1" != "x$as_lineno_2" &&
9582 test "x$as_lineno_3" = "x$as_lineno_2" || {
9583 # Find who we are. Look in the path if we contain no path at all
9584 # relative or not.
9585 case $0 in
9586 *[\\/]* ) as_myself=$0 ;;
9587 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9588for as_dir in $PATH
9589do
9590 IFS=$as_save_IFS
9591 test -z "$as_dir" && as_dir=.
9592 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
9593done
9594
9595 ;;
9596 esac
9597 # We did not find ourselves, most probably we were run as `sh COMMAND'
9598 # in which case we are not to be found in the path.
9599 if test "x$as_myself" = x; then
9600 as_myself=$0
9601 fi
9602 if test ! -f "$as_myself"; then
9603 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
9604echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
9605 { (exit 1); exit 1; }; }
9606 fi
9607 case $CONFIG_SHELL in
9608 '')
9609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9610for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
9611do
9612 IFS=$as_save_IFS
9613 test -z "$as_dir" && as_dir=.
9614 for as_base in sh bash ksh sh5; do
9615 case $as_dir in
9616 /*)
9617 if ("$as_dir/$as_base" -c '
9618 as_lineno_1=$LINENO
9619 as_lineno_2=$LINENO
9620 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
9621 test "x$as_lineno_1" != "x$as_lineno_2" &&
9622 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
9623 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
9624 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
9625 CONFIG_SHELL=$as_dir/$as_base
9626 export CONFIG_SHELL
9627 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
9628 fi;;
9629 esac
9630 done
9631done
9632;;
9633 esac
9634
9635 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
9636 # uniformly replaced by the line number. The first 'sed' inserts a
9637 # line-number line before each line; the second 'sed' does the real
9638 # work. The second script uses 'N' to pair each line-number line
9639 # with the numbered line, and appends trailing '-' during
9640 # substitution so that $LINENO is not a special case at line end.
9641 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
9642 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
9643 sed '=' <$as_myself |
9644 sed '
9645 N
9646 s,$,-,
9647 : loop
9648 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
9649 t loop
9650 s,-$,,
9651 s,^['$as_cr_digits']*\n,,
9652 ' >$as_me.lineno &&
9653 chmod +x $as_me.lineno ||
9654 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
9655echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
9656 { (exit 1); exit 1; }; }
9657
9658 # Don't try to exec as it changes $[0], causing all sort of problems
9659 # (the dirname of $[0] is not the place where we might find the
9660 # original and so on. Autoconf is especially sensible to this).
9661 . ./$as_me.lineno
9662 # Exit status is that of the last command.
9663 exit
9664}
9665
9666
9667case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
9668 *c*,-n*) ECHO_N= ECHO_C='
9669' ECHO_T=' ' ;;
9670 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
9671 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
9672esac
9673
9674if expr a : '\(a\)' >/dev/null 2>&1; then
9675 as_expr=expr
9676else
9677 as_expr=false
9678fi
9679
9680rm -f conf$$ conf$$.exe conf$$.file
9681echo >conf$$.file
9682if ln -s conf$$.file conf$$ 2>/dev/null; then
9683 # We could just check for DJGPP; but this test a) works b) is more generic
9684 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
9685 if test -f conf$$.exe; then
9686 # Don't use ln at all; we don't have any links
9687 as_ln_s='cp -p'
252b5132 9688 else
2299a76d 9689 as_ln_s='ln -s'
252b5132 9690 fi
2299a76d
DJ
9691elif ln conf$$.file conf$$ 2>/dev/null; then
9692 as_ln_s=ln
9693else
9694 as_ln_s='cp -p'
9695fi
9696rm -f conf$$ conf$$.exe conf$$.file
9697
9698if mkdir -p . 2>/dev/null; then
9699 as_mkdir_p=:
9700else
58670637 9701 test -d ./-p && rmdir ./-p
2299a76d
DJ
9702 as_mkdir_p=false
9703fi
9704
9705as_executable_p="test -f"
9706
9707# Sed expression to map a string onto a valid CPP name.
58670637 9708as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
2299a76d
DJ
9709
9710# Sed expression to map a string onto a valid variable name.
58670637 9711as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
2299a76d
DJ
9712
9713
9714# IFS
9715# We need space, tab and new line, in precisely that order.
9716as_nl='
9717'
9718IFS=" $as_nl"
9719
9720# CDPATH.
9721$as_unset CDPATH
9722
9723exec 6>&1
9724
9725# Open the log real soon, to keep \$[0] and so on meaningful, and to
9726# report actual input values of CONFIG_FILES etc. instead of their
9727# values after options handling. Logging --version etc. is OK.
9728exec 5>>config.log
9729{
9730 echo
9731 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
9732## Running $as_me. ##
9733_ASBOX
9734} >&5
9735cat >&5 <<_CSEOF
9736
9737This file was extended by $as_me, which was
85f969cd 9738generated by GNU Autoconf 2.59. Invocation command line was
2299a76d
DJ
9739
9740 CONFIG_FILES = $CONFIG_FILES
9741 CONFIG_HEADERS = $CONFIG_HEADERS
9742 CONFIG_LINKS = $CONFIG_LINKS
9743 CONFIG_COMMANDS = $CONFIG_COMMANDS
9744 $ $0 $@
9745
9746_CSEOF
9747echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
9748echo >&5
9749_ACEOF
9750
9751# Files that config.status was made for.
9752if test -n "$ac_config_files"; then
9753 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
9754fi
9755
9756if test -n "$ac_config_headers"; then
9757 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
9758fi
9759
9760if test -n "$ac_config_links"; then
9761 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
9762fi
9763
9764if test -n "$ac_config_commands"; then
9765 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
9766fi
9767
9768cat >>$CONFIG_STATUS <<\_ACEOF
9769
9770ac_cs_usage="\
9771\`$as_me' instantiates files from templates according to the
9772current configuration.
9773
9774Usage: $0 [OPTIONS] [FILE]...
9775
9776 -h, --help print this help, then exit
9777 -V, --version print version number, then exit
9778 -q, --quiet do not print progress messages
9779 -d, --debug don't remove temporary files
9780 --recheck update $as_me by reconfiguring in the same conditions
9781 --file=FILE[:TEMPLATE]
58670637 9782 instantiate the configuration file FILE
2299a76d 9783 --header=FILE[:TEMPLATE]
58670637 9784 instantiate the configuration header FILE
2299a76d
DJ
9785
9786Configuration files:
9787$config_files
9788
9789Configuration headers:
9790$config_headers
9791
9792Configuration commands:
9793$config_commands
9794
9795Report bugs to <bug-autoconf@gnu.org>."
9796_ACEOF
9797
9798cat >>$CONFIG_STATUS <<_ACEOF
9799ac_cs_version="\\
9800config.status
85f969cd 9801configured by $0, generated by GNU Autoconf 2.59,
2299a76d
DJ
9802 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
9803
58670637 9804Copyright (C) 2003 Free Software Foundation, Inc.
2299a76d
DJ
9805This config.status script is free software; the Free Software Foundation
9806gives unlimited permission to copy, distribute and modify it."
9807srcdir=$srcdir
9808INSTALL="$INSTALL"
9809_ACEOF
9810
9811cat >>$CONFIG_STATUS <<\_ACEOF
9812# If no file are specified by the user, then we need to provide default
9813# value. By we need to know if files were specified by the user.
9814ac_need_defaults=:
9815while test $# != 0
9816do
9817 case $1 in
9818 --*=*)
9819 ac_option=`expr "x$1" : 'x\([^=]*\)='`
9820 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
9821 ac_shift=:
9822 ;;
9823 -*)
9824 ac_option=$1
9825 ac_optarg=$2
9826 ac_shift=shift
9827 ;;
9828 *) # This is not an option, so the user has probably given explicit
9829 # arguments.
9830 ac_option=$1
9831 ac_need_defaults=false;;
9832 esac
9833
9834 case $ac_option in
9835 # Handling of the options.
9836_ACEOF
9837cat >>$CONFIG_STATUS <<\_ACEOF
9838 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9839 ac_cs_recheck=: ;;
9840 --version | --vers* | -V )
9841 echo "$ac_cs_version"; exit 0 ;;
9842 --he | --h)
9843 # Conflict between --help and --header
9844 { { echo "$as_me:$LINENO: error: ambiguous option: $1
9845Try \`$0 --help' for more information." >&5
9846echo "$as_me: error: ambiguous option: $1
9847Try \`$0 --help' for more information." >&2;}
9848 { (exit 1); exit 1; }; };;
9849 --help | --hel | -h )
9850 echo "$ac_cs_usage"; exit 0 ;;
9851 --debug | --d* | -d )
9852 debug=: ;;
9853 --file | --fil | --fi | --f )
9854 $ac_shift
9855 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
9856 ac_need_defaults=false;;
9857 --header | --heade | --head | --hea )
9858 $ac_shift
9859 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
9860 ac_need_defaults=false;;
9861 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
9862 | -silent | --silent | --silen | --sile | --sil | --si | --s)
9863 ac_cs_silent=: ;;
9864
9865 # This is an error.
9866 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
9867Try \`$0 --help' for more information." >&5
9868echo "$as_me: error: unrecognized option: $1
9869Try \`$0 --help' for more information." >&2;}
9870 { (exit 1); exit 1; }; } ;;
9871
9872 *) ac_config_targets="$ac_config_targets $1" ;;
9873
9874 esac
9875 shift
252b5132 9876done
2299a76d
DJ
9877
9878ac_configure_extra_args=
9879
9880if $ac_cs_silent; then
9881 exec 6>/dev/null
9882 ac_configure_extra_args="$ac_configure_extra_args --silent"
252b5132 9883fi
252b5132 9884
2299a76d
DJ
9885_ACEOF
9886cat >>$CONFIG_STATUS <<_ACEOF
9887if \$ac_cs_recheck; then
9888 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
9889 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
9890fi
252b5132 9891
2299a76d
DJ
9892_ACEOF
9893
9894cat >>$CONFIG_STATUS <<_ACEOF
9895#
9896# INIT-COMMANDS section.
9897#
9898
9899srcdir=${srcdir}
9900host=${host}
9901target=${target}
9902with_target_subdir=${with_target_subdir}
2299a76d
DJ
9903with_multisubdir=${with_multisubdir}
9904ac_configure_args="--enable-multilib ${ac_configure_args}"
9905CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
9906ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
9907libiberty_topdir=${libiberty_topdir}
9908
9909
9910_ACEOF
9911
9912
9913
9914cat >>$CONFIG_STATUS <<\_ACEOF
9915for ac_config_target in $ac_config_targets
9916do
9917 case "$ac_config_target" in
9918 # Handling of arguments.
9919 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
9920 "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
9921 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
9922 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
9923 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
9924echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
9925 { (exit 1); exit 1; }; };;
252b5132 9926 esac
2299a76d 9927done
252b5132 9928
2299a76d
DJ
9929# If the user did not use the arguments to specify the items to instantiate,
9930# then the envvar interface is used. Set only those that are not.
9931# We use the long form for the default assignment because of an extremely
9932# bizarre bug on SunOS 4.1.3.
9933if $ac_need_defaults; then
9934 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
9935 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
9936 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
9937fi
9938
9939# Have a temporary directory for convenience. Make it in the build tree
9940# simply because there is no reason to put it here, and in addition,
9941# creating and moving files from /tmp can sometimes cause problems.
9942# Create a temporary directory, and hook for its removal unless debugging.
9943$debug ||
9944{
9945 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
9946 trap '{ (exit 1); exit 1; }' 1 2 13 15
9947}
252b5132 9948
2299a76d
DJ
9949# Create a (secure) tmp directory for tmp files.
9950
9951{
9952 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
9953 test -n "$tmp" && test -d "$tmp"
9954} ||
9955{
9956 tmp=./confstat$$-$RANDOM
9957 (umask 077 && mkdir $tmp)
9958} ||
9959{
9960 echo "$me: cannot create a temporary directory in ." >&2
9961 { (exit 1); exit 1; }
9962}
9963
9964_ACEOF
9965
9966cat >>$CONFIG_STATUS <<_ACEOF
9967
9968#
9969# CONFIG_FILES section.
9970#
9971
9972# No need to generate the scripts if there are no CONFIG_FILES.
9973# This happens for instance when ./config.status config.h
9974if test -n "\$CONFIG_FILES"; then
9975 # Protect against being on the right side of a sed subst in config.status.
9976 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
9977 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
9978s,@SHELL@,$SHELL,;t t
9979s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
9980s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
9981s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
9982s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
9983s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
9984s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
9985s,@exec_prefix@,$exec_prefix,;t t
9986s,@prefix@,$prefix,;t t
9987s,@program_transform_name@,$program_transform_name,;t t
9988s,@bindir@,$bindir,;t t
9989s,@sbindir@,$sbindir,;t t
9990s,@libexecdir@,$libexecdir,;t t
9991s,@datadir@,$datadir,;t t
9992s,@sysconfdir@,$sysconfdir,;t t
9993s,@sharedstatedir@,$sharedstatedir,;t t
9994s,@localstatedir@,$localstatedir,;t t
9995s,@libdir@,$libdir,;t t
9996s,@includedir@,$includedir,;t t
9997s,@oldincludedir@,$oldincludedir,;t t
9998s,@infodir@,$infodir,;t t
9999s,@mandir@,$mandir,;t t
10000s,@build_alias@,$build_alias,;t t
10001s,@host_alias@,$host_alias,;t t
10002s,@target_alias@,$target_alias,;t t
10003s,@DEFS@,$DEFS,;t t
10004s,@ECHO_C@,$ECHO_C,;t t
10005s,@ECHO_N@,$ECHO_N,;t t
10006s,@ECHO_T@,$ECHO_T,;t t
10007s,@LIBS@,$LIBS,;t t
10008s,@libiberty_topdir@,$libiberty_topdir,;t t
10009s,@MAINT@,$MAINT,;t t
10010s,@NOTMAINT@,$NOTMAINT,;t t
10011s,@MAKEINFO@,$MAKEINFO,;t t
10012s,@BUILD_INFO@,$BUILD_INFO,;t t
10013s,@PERL@,$PERL,;t t
10014s,@HAVE_PERL@,$HAVE_PERL,;t t
10015s,@build@,$build,;t t
10016s,@build_cpu@,$build_cpu,;t t
10017s,@build_vendor@,$build_vendor,;t t
10018s,@build_os@,$build_os,;t t
10019s,@host@,$host,;t t
10020s,@host_cpu@,$host_cpu,;t t
10021s,@host_vendor@,$host_vendor,;t t
10022s,@host_os@,$host_os,;t t
10023s,@AR@,$AR,;t t
10024s,@ac_ct_AR@,$ac_ct_AR,;t t
10025s,@RANLIB@,$RANLIB,;t t
10026s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
10027s,@CC@,$CC,;t t
10028s,@CFLAGS@,$CFLAGS,;t t
10029s,@LDFLAGS@,$LDFLAGS,;t t
10030s,@CPPFLAGS@,$CPPFLAGS,;t t
10031s,@ac_ct_CC@,$ac_ct_CC,;t t
10032s,@EXEEXT@,$EXEEXT,;t t
10033s,@OBJEXT@,$OBJEXT,;t t
8ddbb593 10034s,@CPP@,$CPP,;t t
11a338da 10035s,@ac_libiberty_warn_cflags@,$ac_libiberty_warn_cflags,;t t
46a10049
DD
10036s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
10037s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
2299a76d
DJ
10038s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
10039s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
10040s,@INSTALL_DATA@,$INSTALL_DATA,;t t
c779bab8 10041s,@PICFLAG@,$PICFLAG,;t t
2299a76d
DJ
10042s,@EGREP@,$EGREP,;t t
10043s,@LIBOBJS@,$LIBOBJS,;t t
10044s,@CHECK@,$CHECK,;t t
10045s,@target_header_dir@,$target_header_dir,;t t
10046s,@pexecute@,$pexecute,;t t
10047s,@INSTALL_DEST@,$INSTALL_DEST,;t t
545c9aee
DD
10048s,@datarootdir@,$datarootdir,;t t
10049s,@docdir@,$docdir,;t t
10050s,@htmldir@,$htmldir,;t t
2299a76d
DJ
10051s,@LTLIBOBJS@,$LTLIBOBJS,;t t
10052/@host_makefile_frag@/r $host_makefile_frag
10053s,@host_makefile_frag@,,;t t
10054CEOF
10055
10056_ACEOF
10057
10058 cat >>$CONFIG_STATUS <<\_ACEOF
10059 # Split the substitutions into bite-sized pieces for seds with
10060 # small command number limits, like on Digital OSF/1 and HP-UX.
10061 ac_max_sed_lines=48
10062 ac_sed_frag=1 # Number of current file.
10063 ac_beg=1 # First line for current file.
10064 ac_end=$ac_max_sed_lines # Line after last line for current file.
10065 ac_more_lines=:
10066 ac_sed_cmds=
10067 while $ac_more_lines; do
10068 if test $ac_beg -gt 1; then
10069 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
10070 else
10071 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
10072 fi
10073 if test ! -s $tmp/subs.frag; then
10074 ac_more_lines=false
10075 else
10076 # The purpose of the label and of the branching condition is to
10077 # speed up the sed processing (if there are no `@' at all, there
10078 # is no need to browse any of the substitutions).
10079 # These are the two extra sed commands mentioned above.
10080 (echo ':t
10081 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
10082 if test -z "$ac_sed_cmds"; then
58670637 10083 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
2299a76d 10084 else
58670637 10085 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
2299a76d
DJ
10086 fi
10087 ac_sed_frag=`expr $ac_sed_frag + 1`
10088 ac_beg=$ac_end
10089 ac_end=`expr $ac_end + $ac_max_sed_lines`
10090 fi
10091 done
10092 if test -z "$ac_sed_cmds"; then
10093 ac_sed_cmds=cat
252b5132 10094 fi
2299a76d 10095fi # test -n "$CONFIG_FILES"
252b5132 10096
2299a76d
DJ
10097_ACEOF
10098cat >>$CONFIG_STATUS <<\_ACEOF
10099for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
10100 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10101 case $ac_file in
10102 - | *:- | *:-:* ) # input from stdin
58670637
DD
10103 cat >$tmp/stdin
10104 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
10105 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
2299a76d 10106 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
58670637 10107 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
2299a76d 10108 * ) ac_file_in=$ac_file.in ;;
252b5132
RH
10109 esac
10110
2299a76d
DJ
10111 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
10112 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
10113$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58670637
DD
10114 X"$ac_file" : 'X\(//\)[^/]' \| \
10115 X"$ac_file" : 'X\(//\)$' \| \
10116 X"$ac_file" : 'X\(/\)' \| \
10117 . : '\(.\)' 2>/dev/null ||
2299a76d
DJ
10118echo X"$ac_file" |
10119 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10120 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10121 /^X\(\/\/\)$/{ s//\1/; q; }
10122 /^X\(\/\).*/{ s//\1/; q; }
10123 s/.*/./; q'`
10124 { if $as_mkdir_p; then
10125 mkdir -p "$ac_dir"
10126 else
10127 as_dir="$ac_dir"
10128 as_dirs=
10129 while test ! -d "$as_dir"; do
10130 as_dirs="$as_dir $as_dirs"
10131 as_dir=`(dirname "$as_dir") 2>/dev/null ||
10132$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58670637
DD
10133 X"$as_dir" : 'X\(//\)[^/]' \| \
10134 X"$as_dir" : 'X\(//\)$' \| \
10135 X"$as_dir" : 'X\(/\)' \| \
10136 . : '\(.\)' 2>/dev/null ||
2299a76d
DJ
10137echo X"$as_dir" |
10138 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10139 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10140 /^X\(\/\/\)$/{ s//\1/; q; }
10141 /^X\(\/\).*/{ s//\1/; q; }
10142 s/.*/./; q'`
10143 done
10144 test ! -n "$as_dirs" || mkdir $as_dirs
10145 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
10146echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
10147 { (exit 1); exit 1; }; }; }
10148
10149 ac_builddir=.
252b5132 10150
2299a76d
DJ
10151if test "$ac_dir" != .; then
10152 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
10153 # A "../" for each directory in $ac_dir_suffix.
10154 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
10155else
10156 ac_dir_suffix= ac_top_builddir=
10157fi
10158
10159case $srcdir in
10160 .) # No --srcdir option. We are building in place.
10161 ac_srcdir=.
10162 if test -z "$ac_top_builddir"; then
10163 ac_top_srcdir=.
10164 else
10165 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
10166 fi ;;
10167 [\\/]* | ?:[\\/]* ) # Absolute path.
10168 ac_srcdir=$srcdir$ac_dir_suffix;
10169 ac_top_srcdir=$srcdir ;;
10170 *) # Relative path.
10171 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
10172 ac_top_srcdir=$ac_top_builddir$srcdir ;;
10173esac
85f969cd
DD
10174
10175# Do not use `cd foo && pwd` to compute absolute paths, because
10176# the directories may not exist.
10177case `pwd` in
10178.) ac_abs_builddir="$ac_dir";;
58670637 10179*)
85f969cd
DD
10180 case "$ac_dir" in
10181 .) ac_abs_builddir=`pwd`;;
10182 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
10183 *) ac_abs_builddir=`pwd`/"$ac_dir";;
58670637
DD
10184 esac;;
10185esac
85f969cd 10186case $ac_abs_builddir in
58670637
DD
10187.) ac_abs_top_builddir=${ac_top_builddir}.;;
10188*)
10189 case ${ac_top_builddir}. in
85f969cd 10190 .) ac_abs_top_builddir=$ac_abs_builddir;;
58670637 10191 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
85f969cd 10192 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
58670637
DD
10193 esac;;
10194esac
85f969cd 10195case $ac_abs_builddir in
58670637
DD
10196.) ac_abs_srcdir=$ac_srcdir;;
10197*)
10198 case $ac_srcdir in
85f969cd 10199 .) ac_abs_srcdir=$ac_abs_builddir;;
58670637 10200 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
85f969cd 10201 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
58670637
DD
10202 esac;;
10203esac
85f969cd 10204case $ac_abs_builddir in
58670637
DD
10205.) ac_abs_top_srcdir=$ac_top_srcdir;;
10206*)
10207 case $ac_top_srcdir in
85f969cd 10208 .) ac_abs_top_srcdir=$ac_abs_builddir;;
58670637 10209 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
85f969cd 10210 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
58670637
DD
10211 esac;;
10212esac
2299a76d
DJ
10213
10214
10215 case $INSTALL in
10216 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
10217 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
252b5132
RH
10218 esac
10219
fd7d450d
DD
10220 if test x"$ac_file" != x-; then
10221 { echo "$as_me:$LINENO: creating $ac_file" >&5
10222echo "$as_me: creating $ac_file" >&6;}
10223 rm -f "$ac_file"
10224 fi
2299a76d
DJ
10225 # Let's still pretend it is `configure' which instantiates (i.e., don't
10226 # use $as_me), people would be surprised to read:
10227 # /* config.h. Generated by config.status. */
10228 if test x"$ac_file" = x-; then
10229 configure_input=
10230 else
10231 configure_input="$ac_file. "
10232 fi
10233 configure_input=$configure_input"Generated from `echo $ac_file_in |
58670637 10234 sed 's,.*/,,'` by configure."
2299a76d
DJ
10235
10236 # First look for the input files in the build tree, otherwise in the
10237 # src tree.
10238 ac_file_inputs=`IFS=:
10239 for f in $ac_file_in; do
10240 case $f in
10241 -) echo $tmp/stdin ;;
10242 [\\/$]*)
58670637
DD
10243 # Absolute (can't be DOS-style, as IFS=:)
10244 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
2299a76d
DJ
10245echo "$as_me: error: cannot find input file: $f" >&2;}
10246 { (exit 1); exit 1; }; }
58670637 10247 echo "$f";;
2299a76d 10248 *) # Relative
58670637
DD
10249 if test -f "$f"; then
10250 # Build tree
10251 echo "$f"
10252 elif test -f "$srcdir/$f"; then
10253 # Source tree
10254 echo "$srcdir/$f"
10255 else
10256 # /dev/null tree
10257 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
2299a76d
DJ
10258echo "$as_me: error: cannot find input file: $f" >&2;}
10259 { (exit 1); exit 1; }; }
58670637 10260 fi;;
2299a76d
DJ
10261 esac
10262 done` || { (exit 1); exit 1; }
10263_ACEOF
10264cat >>$CONFIG_STATUS <<_ACEOF
10265 sed "$ac_vpsub
10266$extrasub
10267_ACEOF
10268cat >>$CONFIG_STATUS <<\_ACEOF
10269:t
10270/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
10271s,@configure_input@,$configure_input,;t t
10272s,@srcdir@,$ac_srcdir,;t t
10273s,@abs_srcdir@,$ac_abs_srcdir,;t t
10274s,@top_srcdir@,$ac_top_srcdir,;t t
10275s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
10276s,@builddir@,$ac_builddir,;t t
10277s,@abs_builddir@,$ac_abs_builddir,;t t
10278s,@top_builddir@,$ac_top_builddir,;t t
10279s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
10280s,@INSTALL@,$ac_INSTALL,;t t
10281" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
10282 rm -f $tmp/stdin
10283 if test x"$ac_file" != x-; then
10284 mv $tmp/out $ac_file
10285 else
10286 cat $tmp/out
10287 rm -f $tmp/out
10288 fi
10289
10290done
10291_ACEOF
10292cat >>$CONFIG_STATUS <<\_ACEOF
10293
10294#
10295# CONFIG_HEADER section.
10296#
252b5132
RH
10297
10298# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10299# NAME is the cpp macro being defined and VALUE is the value it is being given.
10300#
10301# ac_d sets the value in "#define NAME VALUE" lines.
58670637
DD
10302ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10303ac_dB='[ ].*$,\1#\2'
2299a76d
DJ
10304ac_dC=' '
10305ac_dD=',;t'
10306# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
58670637 10307ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2299a76d 10308ac_uB='$,\1#\2define\3'
252b5132 10309ac_uC=' '
2299a76d
DJ
10310ac_uD=',;t'
10311
10312for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
252b5132 10313 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2299a76d
DJ
10314 case $ac_file in
10315 - | *:- | *:-:* ) # input from stdin
58670637
DD
10316 cat >$tmp/stdin
10317 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
10318 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
2299a76d 10319 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
58670637 10320 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
2299a76d 10321 * ) ac_file_in=$ac_file.in ;;
252b5132
RH
10322 esac
10323
2299a76d
DJ
10324 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
10325echo "$as_me: creating $ac_file" >&6;}
10326
10327 # First look for the input files in the build tree, otherwise in the
10328 # src tree.
10329 ac_file_inputs=`IFS=:
10330 for f in $ac_file_in; do
10331 case $f in
10332 -) echo $tmp/stdin ;;
10333 [\\/$]*)
58670637
DD
10334 # Absolute (can't be DOS-style, as IFS=:)
10335 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
2299a76d
DJ
10336echo "$as_me: error: cannot find input file: $f" >&2;}
10337 { (exit 1); exit 1; }; }
58670637
DD
10338 # Do quote $f, to prevent DOS paths from being IFS'd.
10339 echo "$f";;
2299a76d 10340 *) # Relative
58670637
DD
10341 if test -f "$f"; then
10342 # Build tree
10343 echo "$f"
10344 elif test -f "$srcdir/$f"; then
10345 # Source tree
10346 echo "$srcdir/$f"
10347 else
10348 # /dev/null tree
10349 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
2299a76d
DJ
10350echo "$as_me: error: cannot find input file: $f" >&2;}
10351 { (exit 1); exit 1; }; }
58670637 10352 fi;;
2299a76d
DJ
10353 esac
10354 done` || { (exit 1); exit 1; }
10355 # Remove the trailing spaces.
58670637 10356 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
2299a76d
DJ
10357
10358_ACEOF
10359
10360# Transform confdefs.h into two sed scripts, `conftest.defines' and
10361# `conftest.undefs', that substitutes the proper values into
10362# config.h.in to produce config.h. The first handles `#define'
10363# templates, and the second `#undef' templates.
10364# And first: Protect against being on the right side of a sed subst in
10365# config.status. Protect against being in an unquoted here document
10366# in config.status.
10367rm -f conftest.defines conftest.undefs
10368# Using a here document instead of a string reduces the quoting nightmare.
10369# Putting comments in sed scripts is not portable.
10370#
10371# `end' is used to avoid that the second main sed command (meant for
10372# 0-ary CPP macros) applies to n-ary macro definitions.
10373# See the Autoconf documentation for `clear'.
10374cat >confdef2sed.sed <<\_ACEOF
10375s/[\\&,]/\\&/g
10376s,[\\$`],\\&,g
10377t clear
10378: clear
58670637 10379s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
2299a76d 10380t end
58670637 10381s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
2299a76d
DJ
10382: end
10383_ACEOF
10384# If some macros were called several times there might be several times
10385# the same #defines, which is useless. Nevertheless, we may not want to
10386# sort them, since we want the *last* AC-DEFINE to be honored.
10387uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
10388sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
10389rm -f confdef2sed.sed
252b5132
RH
10390
10391# This sed command replaces #undef with comments. This is necessary, for
10392# example, in the case of _POSIX_SOURCE, which is predefined and required
10393# on some systems where configure will not decide to define it.
2299a76d 10394cat >>conftest.undefs <<\_ACEOF
58670637 10395s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
2299a76d
DJ
10396_ACEOF
10397
10398# Break up conftest.defines because some shells have a limit on the size
10399# of here documents, and old seds have small limits too (100 cmds).
10400echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
58670637 10401echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
2299a76d
DJ
10402echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
10403echo ' :' >>$CONFIG_STATUS
10404rm -f conftest.tail
10405while grep . conftest.defines >/dev/null
10406do
10407 # Write a limited-size here document to $tmp/defines.sed.
10408 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
10409 # Speed up: don't consider the non `#define' lines.
58670637 10410 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
2299a76d
DJ
10411 # Work around the forget-to-reset-the-flag bug.
10412 echo 't clr' >>$CONFIG_STATUS
10413 echo ': clr' >>$CONFIG_STATUS
10414 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
10415 echo 'CEOF
10416 sed -f $tmp/defines.sed $tmp/in >$tmp/out
10417 rm -f $tmp/in
10418 mv $tmp/out $tmp/in
10419' >>$CONFIG_STATUS
10420 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
10421 rm -f conftest.defines
10422 mv conftest.tail conftest.defines
10423done
10424rm -f conftest.defines
10425echo ' fi # grep' >>$CONFIG_STATUS
10426echo >>$CONFIG_STATUS
252b5132 10427
2299a76d
DJ
10428# Break up conftest.undefs because some shells have a limit on the size
10429# of here documents, and old seds have small limits too (100 cmds).
10430echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
252b5132 10431rm -f conftest.tail
2299a76d 10432while grep . conftest.undefs >/dev/null
252b5132 10433do
2299a76d
DJ
10434 # Write a limited-size here document to $tmp/undefs.sed.
10435 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
10436 # Speed up: don't consider the non `#undef'
58670637 10437 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
2299a76d
DJ
10438 # Work around the forget-to-reset-the-flag bug.
10439 echo 't clr' >>$CONFIG_STATUS
10440 echo ': clr' >>$CONFIG_STATUS
10441 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
252b5132 10442 echo 'CEOF
2299a76d
DJ
10443 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
10444 rm -f $tmp/in
10445 mv $tmp/out $tmp/in
10446' >>$CONFIG_STATUS
10447 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
10448 rm -f conftest.undefs
10449 mv conftest.tail conftest.undefs
10450done
10451rm -f conftest.undefs
10452
10453cat >>$CONFIG_STATUS <<\_ACEOF
10454 # Let's still pretend it is `configure' which instantiates (i.e., don't
10455 # use $as_me), people would be surprised to read:
10456 # /* config.h. Generated by config.status. */
10457 if test x"$ac_file" = x-; then
10458 echo "/* Generated by configure. */" >$tmp/config.h
252b5132 10459 else
2299a76d 10460 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
252b5132 10461 fi
2299a76d
DJ
10462 cat $tmp/in >>$tmp/config.h
10463 rm -f $tmp/in
10464 if test x"$ac_file" != x-; then
10465 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
10466 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
10467echo "$as_me: $ac_file is unchanged" >&6;}
10468 else
10469 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
10470$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58670637
DD
10471 X"$ac_file" : 'X\(//\)[^/]' \| \
10472 X"$ac_file" : 'X\(//\)$' \| \
10473 X"$ac_file" : 'X\(/\)' \| \
10474 . : '\(.\)' 2>/dev/null ||
2299a76d
DJ
10475echo X"$ac_file" |
10476 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10477 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10478 /^X\(\/\/\)$/{ s//\1/; q; }
10479 /^X\(\/\).*/{ s//\1/; q; }
10480 s/.*/./; q'`
10481 { if $as_mkdir_p; then
10482 mkdir -p "$ac_dir"
10483 else
10484 as_dir="$ac_dir"
10485 as_dirs=
10486 while test ! -d "$as_dir"; do
10487 as_dirs="$as_dir $as_dirs"
10488 as_dir=`(dirname "$as_dir") 2>/dev/null ||
10489$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58670637
DD
10490 X"$as_dir" : 'X\(//\)[^/]' \| \
10491 X"$as_dir" : 'X\(//\)$' \| \
10492 X"$as_dir" : 'X\(/\)' \| \
10493 . : '\(.\)' 2>/dev/null ||
2299a76d
DJ
10494echo X"$as_dir" |
10495 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10496 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10497 /^X\(\/\/\)$/{ s//\1/; q; }
10498 /^X\(\/\).*/{ s//\1/; q; }
10499 s/.*/./; q'`
10500 done
10501 test ! -n "$as_dirs" || mkdir $as_dirs
10502 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
10503echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
10504 { (exit 1); exit 1; }; }; }
252b5132 10505
2299a76d
DJ
10506 rm -f $ac_file
10507 mv $tmp/config.h $ac_file
10508 fi
10509 else
10510 cat $tmp/config.h
10511 rm -f $tmp/config.h
10512 fi
10513done
10514_ACEOF
10515cat >>$CONFIG_STATUS <<\_ACEOF
252b5132 10516
2299a76d
DJ
10517#
10518# CONFIG_COMMANDS section.
10519#
10520for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
10521 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
10522 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
10523 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
10524$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58670637
DD
10525 X"$ac_dest" : 'X\(//\)[^/]' \| \
10526 X"$ac_dest" : 'X\(//\)$' \| \
10527 X"$ac_dest" : 'X\(/\)' \| \
10528 . : '\(.\)' 2>/dev/null ||
2299a76d
DJ
10529echo X"$ac_dest" |
10530 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10531 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10532 /^X\(\/\/\)$/{ s//\1/; q; }
10533 /^X\(\/\).*/{ s//\1/; q; }
10534 s/.*/./; q'`
58670637
DD
10535 { if $as_mkdir_p; then
10536 mkdir -p "$ac_dir"
10537 else
10538 as_dir="$ac_dir"
10539 as_dirs=
10540 while test ! -d "$as_dir"; do
10541 as_dirs="$as_dir $as_dirs"
10542 as_dir=`(dirname "$as_dir") 2>/dev/null ||
10543$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10544 X"$as_dir" : 'X\(//\)[^/]' \| \
10545 X"$as_dir" : 'X\(//\)$' \| \
10546 X"$as_dir" : 'X\(/\)' \| \
10547 . : '\(.\)' 2>/dev/null ||
10548echo X"$as_dir" |
10549 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10550 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10551 /^X\(\/\/\)$/{ s//\1/; q; }
10552 /^X\(\/\).*/{ s//\1/; q; }
10553 s/.*/./; q'`
10554 done
10555 test ! -n "$as_dirs" || mkdir $as_dirs
10556 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
10557echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
10558 { (exit 1); exit 1; }; }; }
10559
2299a76d
DJ
10560 ac_builddir=.
10561
10562if test "$ac_dir" != .; then
10563 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
10564 # A "../" for each directory in $ac_dir_suffix.
10565 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
10566else
10567 ac_dir_suffix= ac_top_builddir=
10568fi
10569
10570case $srcdir in
10571 .) # No --srcdir option. We are building in place.
10572 ac_srcdir=.
10573 if test -z "$ac_top_builddir"; then
10574 ac_top_srcdir=.
10575 else
10576 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
10577 fi ;;
10578 [\\/]* | ?:[\\/]* ) # Absolute path.
10579 ac_srcdir=$srcdir$ac_dir_suffix;
10580 ac_top_srcdir=$srcdir ;;
10581 *) # Relative path.
10582 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
10583 ac_top_srcdir=$ac_top_builddir$srcdir ;;
10584esac
85f969cd
DD
10585
10586# Do not use `cd foo && pwd` to compute absolute paths, because
10587# the directories may not exist.
10588case `pwd` in
10589.) ac_abs_builddir="$ac_dir";;
58670637 10590*)
85f969cd
DD
10591 case "$ac_dir" in
10592 .) ac_abs_builddir=`pwd`;;
10593 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
10594 *) ac_abs_builddir=`pwd`/"$ac_dir";;
58670637
DD
10595 esac;;
10596esac
85f969cd 10597case $ac_abs_builddir in
58670637
DD
10598.) ac_abs_top_builddir=${ac_top_builddir}.;;
10599*)
10600 case ${ac_top_builddir}. in
85f969cd 10601 .) ac_abs_top_builddir=$ac_abs_builddir;;
58670637 10602 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
85f969cd 10603 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
58670637
DD
10604 esac;;
10605esac
85f969cd 10606case $ac_abs_builddir in
58670637
DD
10607.) ac_abs_srcdir=$ac_srcdir;;
10608*)
10609 case $ac_srcdir in
85f969cd 10610 .) ac_abs_srcdir=$ac_abs_builddir;;
58670637 10611 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
85f969cd 10612 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
58670637
DD
10613 esac;;
10614esac
85f969cd 10615case $ac_abs_builddir in
58670637
DD
10616.) ac_abs_top_srcdir=$ac_top_srcdir;;
10617*)
10618 case $ac_top_srcdir in
85f969cd 10619 .) ac_abs_top_srcdir=$ac_abs_builddir;;
58670637 10620 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
85f969cd 10621 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
58670637
DD
10622 esac;;
10623esac
2299a76d
DJ
10624
10625
10626 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
10627echo "$as_me: executing $ac_dest commands" >&6;}
10628 case $ac_dest in
10629 default ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
252b5132 10630if test -n "$CONFIG_FILES"; then
c7efc4d5 10631 if test -n "${with_target_subdir}"; then
252b5132
RH
10632 # FIXME: We shouldn't need to set ac_file
10633 ac_file=Makefile
52d98c2d 10634 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
252b5132
RH
10635 . ${libiberty_topdir}/config-ml.in
10636 fi
2299a76d
DJ
10637fi ;;
10638 esac
10639done
10640_ACEOF
10641
10642cat >>$CONFIG_STATUS <<\_ACEOF
10643
10644{ (exit 0); exit 0; }
10645_ACEOF
252b5132 10646chmod +x $CONFIG_STATUS
2299a76d
DJ
10647ac_clean_files=$ac_clean_files_save
10648
10649
10650# configure is writing to config.log, and then calls config.status.
10651# config.status does its own redirection, appending to config.log.
10652# Unfortunately, on DOS this fails, as config.log is still kept open
10653# by configure, so config.status won't be able to write to it; its
10654# output is simply discarded. So we exec the FD to /dev/null,
10655# effectively closing config.log, so it can be properly (re)opened and
10656# appended to by config.status. When coming back to configure, we
10657# need to make the FD available again.
10658if test "$no_create" != yes; then
10659 ac_cs_success=:
10660 ac_config_status_args=
10661 test "$silent" = yes &&
10662 ac_config_status_args="$ac_config_status_args --quiet"
10663 exec 5>/dev/null
10664 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
10665 exec 5>>config.log
10666 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
10667 # would make configure fail if this is the last instruction.
10668 $ac_cs_success || { (exit 1); exit 1; }
10669fi
252b5132 10670
This page took 0.928276 seconds and 4 git commands to generate.