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