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