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