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