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