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