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