]> git.ipfire.org Git - thirdparty/gcc.git/blame - libiberty/configure
avr.c (avr_mcu_t): Remove atmega32hvb.
[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 ;;
951b54cc 3732 mips*-*-linux) PICFLAG=-fPIC ;;
769b009e 3733 powerpc*-*-aix*) ;;
c91c9c2e
PB
3734 powerpc*-*-*) PICFLAG=-fPIC ;;
3735 sparc*-*-*) case "${CFLAGS}" in
3736 *-fpic* ) PICFLAG=-fpic ;;
3737 * ) PICFLAG=-fPIC ;;
3738 esac ;;
3739 s390*-*-*) PICFLAG=-fpic ;;
769b009e 3740 esac
769b009e
KC
3741fi
3742
c91c9c2e 3743
769b009e
KC
3744echo "# Warning: this fragment is automatically generated" > temp-frag
3745
c91c9c2e
PB
3746if [ -n "${frag}" ] && [ -f "${frag}" ]; then
3747 echo "Appending ${frag} to xhost-mkfrag"
3748 echo "# Following fragment copied from ${frag}" >> temp-frag
3749 cat ${frag} >> temp-frag
3750fi
769b009e
KC
3751
3752# record if we want to build shared libs.
3753if [ "${shared}" = "yes" ]; then
3754 echo enable_shared = yes >> temp-frag
3755else
3756 echo enable_shared = no >> temp-frag
3757fi
3758
3759frag=xhost-mkfrag
3760${CONFIG_SHELL-/bin/sh} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag
3761
0bc0cd11
JL
3762host_makefile_frag=${frag}
3763
3764
3765# It's OK to check for header files. Although the compiler may not be
3766# able to link anything, it had better be able to at least compile
3767# something.
238235ef
DJ
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
9bf3c9cc 3791
78a7dc90
KG
3792
3793for 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
3794do
3795as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b033df90 3796echo "$as_me:$LINENO: checking for $ac_header" >&5
238235ef
DJ
3797echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3798if eval "test \"\${$as_ac_Header+set}\" = set"; then
3799 echo $ECHO_N "(cached) $ECHO_C" >&6
238235ef 3800else
b033df90 3801 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
3802/* confdefs.h. */
3803_ACEOF
3804cat confdefs.h >>conftest.$ac_ext
3805cat >>conftest.$ac_ext <<_ACEOF
3806/* end confdefs.h. */
3807#include <$ac_header>
3808_ACEOF
3809if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3810 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3811 ac_status=$?
3812 grep -v '^ *+' conftest.er1 >conftest.err
3813 rm -f conftest.er1
3814 cat conftest.err >&5
3815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3816 (exit $ac_status); } >/dev/null; then
3817 if test -s conftest.err; then
3818 ac_cpp_err=$ac_c_preproc_warn_flag
3beb1315 3819 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
238235ef
DJ
3820 else
3821 ac_cpp_err=
3822 fi
fdfc290b 3823else
238235ef
DJ
3824 ac_cpp_err=yes
3825fi
3826if test -z "$ac_cpp_err"; then
b033df90 3827 eval "$as_ac_Header=yes"
238235ef
DJ
3828else
3829 echo "$as_me: failed program was:" >&5
3830sed 's/^/| /' conftest.$ac_ext >&5
3831
b033df90 3832 eval "$as_ac_Header=no"
238235ef
DJ
3833fi
3834rm -f conftest.err conftest.$ac_ext
238235ef
DJ
3835fi
3836echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3837echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
238235ef
DJ
3838if test `eval echo '${'$as_ac_Header'}'` = yes; then
3839 cat >>confdefs.h <<_ACEOF
3840#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3841_ACEOF
3842
3843fi
238235ef
DJ
3844done
3845
3846echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
3847echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
3848if test "${ac_cv_header_sys_wait_h+set}" = set; then
3849 echo $ECHO_N "(cached) $ECHO_C" >&6
3850else
3851 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
3852/* confdefs.h. */
3853_ACEOF
3854cat confdefs.h >>conftest.$ac_ext
3855cat >>conftest.$ac_ext <<_ACEOF
3856/* end confdefs.h. */
d3982b71 3857#include <sys/types.h>
238235ef
DJ
3858#include <sys/wait.h>
3859#ifndef WEXITSTATUS
3860# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
fdfc290b 3861#endif
238235ef
DJ
3862#ifndef WIFEXITED
3863# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3864#endif
3865
3866int
3867main ()
3868{
3869 int s;
3870 wait (&s);
3871 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3872 ;
3873 return 0;
3874}
3875_ACEOF
3876rm -f conftest.$ac_objext
3877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 3878 (eval $ac_compile) 2>conftest.er1
238235ef 3879 ac_status=$?
3beb1315
HPN
3880 grep -v '^ *+' conftest.er1 >conftest.err
3881 rm -f conftest.er1
3882 cat conftest.err >&5
238235ef
DJ
3883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3884 (exit $ac_status); } &&
e8f9ec35
GDR
3885 { ac_try='test -z "$ac_c_werror_flag"
3886 || test ! -s conftest.err'
3beb1315
HPN
3887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3888 (eval $ac_try) 2>&5
3889 ac_status=$?
3890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3891 (exit $ac_status); }; } &&
3892 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
3893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3894 (eval $ac_try) 2>&5
3895 ac_status=$?
3896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3897 (exit $ac_status); }; }; then
3898 ac_cv_header_sys_wait_h=yes
d3982b71 3899else
238235ef
DJ
3900 echo "$as_me: failed program was:" >&5
3901sed 's/^/| /' conftest.$ac_ext >&5
3902
3903ac_cv_header_sys_wait_h=no
d3982b71 3904fi
3beb1315 3905rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef
DJ
3906fi
3907echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3908echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3909if test $ac_cv_header_sys_wait_h = yes; then
3910
b033df90
DJ
3911cat >>confdefs.h <<\_ACEOF
3912#define HAVE_SYS_WAIT_H 1
3913_ACEOF
3914
3915fi
3916
3917echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
3918echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3919if test "${ac_cv_header_time+set}" = set; then
3920 echo $ECHO_N "(cached) $ECHO_C" >&6
3921else
3922 cat >conftest.$ac_ext <<_ACEOF
b033df90
DJ
3923/* confdefs.h. */
3924_ACEOF
3925cat confdefs.h >>conftest.$ac_ext
3926cat >>conftest.$ac_ext <<_ACEOF
3927/* end confdefs.h. */
3928#include <sys/types.h>
3929#include <sys/time.h>
3930#include <time.h>
3931
3932int
3933main ()
3934{
3935if ((struct tm *) 0)
3936return 0;
3937 ;
3938 return 0;
3939}
3940_ACEOF
3941rm -f conftest.$ac_objext
3942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 3943 (eval $ac_compile) 2>conftest.er1
b033df90 3944 ac_status=$?
3beb1315
HPN
3945 grep -v '^ *+' conftest.er1 >conftest.err
3946 rm -f conftest.er1
3947 cat conftest.err >&5
b033df90
DJ
3948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3949 (exit $ac_status); } &&
e8f9ec35
GDR
3950 { ac_try='test -z "$ac_c_werror_flag"
3951 || test ! -s conftest.err'
3beb1315
HPN
3952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3953 (eval $ac_try) 2>&5
3954 ac_status=$?
3955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3956 (exit $ac_status); }; } &&
3957 { ac_try='test -s conftest.$ac_objext'
b033df90
DJ
3958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3959 (eval $ac_try) 2>&5
3960 ac_status=$?
3961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3962 (exit $ac_status); }; }; then
3963 ac_cv_header_time=yes
3964else
3965 echo "$as_me: failed program was:" >&5
3966sed 's/^/| /' conftest.$ac_ext >&5
3967
3968ac_cv_header_time=no
3969fi
3beb1315 3970rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b033df90
DJ
3971fi
3972echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
3973echo "${ECHO_T}$ac_cv_header_time" >&6
3974if test $ac_cv_header_time = yes; then
3975
3976cat >>confdefs.h <<\_ACEOF
3977#define TIME_WITH_SYS_TIME 1
3978_ACEOF
3979
3980fi
3981
3982
3983echo "$as_me:$LINENO: checking whether errno must be declared" >&5
3984echo $ECHO_N "checking whether errno must be declared... $ECHO_C" >&6
3985if test "${libiberty_cv_declare_errno+set}" = set; then
3986 echo $ECHO_N "(cached) $ECHO_C" >&6
3987else
3988 cat >conftest.$ac_ext <<_ACEOF
b033df90
DJ
3989/* confdefs.h. */
3990_ACEOF
3991cat confdefs.h >>conftest.$ac_ext
3992cat >>conftest.$ac_ext <<_ACEOF
3993/* end confdefs.h. */
3994#include <errno.h>
3995int
3996main ()
3997{
3998int x = errno;
3999 ;
4000 return 0;
4001}
4002_ACEOF
4003rm -f conftest.$ac_objext
4004if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 4005 (eval $ac_compile) 2>conftest.er1
b033df90 4006 ac_status=$?
3beb1315
HPN
4007 grep -v '^ *+' conftest.er1 >conftest.err
4008 rm -f conftest.er1
4009 cat conftest.err >&5
b033df90
DJ
4010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4011 (exit $ac_status); } &&
e8f9ec35
GDR
4012 { ac_try='test -z "$ac_c_werror_flag"
4013 || test ! -s conftest.err'
3beb1315
HPN
4014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4015 (eval $ac_try) 2>&5
4016 ac_status=$?
4017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4018 (exit $ac_status); }; } &&
4019 { ac_try='test -s conftest.$ac_objext'
b033df90
DJ
4020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4021 (eval $ac_try) 2>&5
4022 ac_status=$?
4023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4024 (exit $ac_status); }; }; then
4025 libiberty_cv_declare_errno=no
4026else
4027 echo "$as_me: failed program was:" >&5
4028sed 's/^/| /' conftest.$ac_ext >&5
4029
4030libiberty_cv_declare_errno=yes
4031fi
3beb1315 4032rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b033df90
DJ
4033fi
4034echo "$as_me:$LINENO: result: $libiberty_cv_declare_errno" >&5
4035echo "${ECHO_T}$libiberty_cv_declare_errno" >&6
4036if test $libiberty_cv_declare_errno = yes
4037then
4038cat >>confdefs.h <<\_ACEOF
4039#define NEED_DECLARATION_ERRNO 1
4040_ACEOF
4041
4042fi
4043
4044
d49d0907 4045# Determine the size of an int for struct fibnode.
b033df90
DJ
4046echo "$as_me:$LINENO: checking for egrep" >&5
4047echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4048if test "${ac_cv_prog_egrep+set}" = set; then
4049 echo $ECHO_N "(cached) $ECHO_C" >&6
4050else
4051 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4052 then ac_cv_prog_egrep='grep -E'
4053 else ac_cv_prog_egrep='egrep'
4054 fi
4055fi
4056echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4057echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4058 EGREP=$ac_cv_prog_egrep
4059
4060
4061echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4062echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4063if test "${ac_cv_header_stdc+set}" = set; then
4064 echo $ECHO_N "(cached) $ECHO_C" >&6
4065else
4066 cat >conftest.$ac_ext <<_ACEOF
b033df90
DJ
4067/* confdefs.h. */
4068_ACEOF
4069cat confdefs.h >>conftest.$ac_ext
4070cat >>conftest.$ac_ext <<_ACEOF
4071/* end confdefs.h. */
4072#include <stdlib.h>
4073#include <stdarg.h>
4074#include <string.h>
4075#include <float.h>
4076
4077int
4078main ()
4079{
4080
4081 ;
4082 return 0;
4083}
4084_ACEOF
4085rm -f conftest.$ac_objext
4086if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 4087 (eval $ac_compile) 2>conftest.er1
b033df90 4088 ac_status=$?
3beb1315
HPN
4089 grep -v '^ *+' conftest.er1 >conftest.err
4090 rm -f conftest.er1
4091 cat conftest.err >&5
b033df90
DJ
4092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4093 (exit $ac_status); } &&
e8f9ec35
GDR
4094 { ac_try='test -z "$ac_c_werror_flag"
4095 || test ! -s conftest.err'
3beb1315
HPN
4096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4097 (eval $ac_try) 2>&5
4098 ac_status=$?
4099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4100 (exit $ac_status); }; } &&
4101 { ac_try='test -s conftest.$ac_objext'
b033df90
DJ
4102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4103 (eval $ac_try) 2>&5
4104 ac_status=$?
4105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4106 (exit $ac_status); }; }; then
4107 ac_cv_header_stdc=yes
4108else
4109 echo "$as_me: failed program was:" >&5
4110sed 's/^/| /' conftest.$ac_ext >&5
4111
4112ac_cv_header_stdc=no
4113fi
3beb1315 4114rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b033df90
DJ
4115
4116if test $ac_cv_header_stdc = yes; then
4117 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4118 cat >conftest.$ac_ext <<_ACEOF
b033df90
DJ
4119/* confdefs.h. */
4120_ACEOF
4121cat confdefs.h >>conftest.$ac_ext
4122cat >>conftest.$ac_ext <<_ACEOF
4123/* end confdefs.h. */
4124#include <string.h>
4125
4126_ACEOF
4127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4128 $EGREP "memchr" >/dev/null 2>&1; then
4129 :
4130else
4131 ac_cv_header_stdc=no
4132fi
4133rm -f conftest*
4134
4135fi
4136
4137if test $ac_cv_header_stdc = yes; then
4138 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4139 cat >conftest.$ac_ext <<_ACEOF
b033df90
DJ
4140/* confdefs.h. */
4141_ACEOF
4142cat confdefs.h >>conftest.$ac_ext
4143cat >>conftest.$ac_ext <<_ACEOF
4144/* end confdefs.h. */
4145#include <stdlib.h>
4146
238235ef 4147_ACEOF
b033df90
DJ
4148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4149 $EGREP "free" >/dev/null 2>&1; then
4150 :
4151else
4152 ac_cv_header_stdc=no
4153fi
4154rm -f conftest*
238235ef
DJ
4155
4156fi
4157
b033df90
DJ
4158if test $ac_cv_header_stdc = yes; then
4159 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4160 if test "$cross_compiling" = yes; then
4161 :
238235ef
DJ
4162else
4163 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
4164/* confdefs.h. */
4165_ACEOF
4166cat confdefs.h >>conftest.$ac_ext
4167cat >>conftest.$ac_ext <<_ACEOF
4168/* end confdefs.h. */
b033df90
DJ
4169#include <ctype.h>
4170#if ((' ' & 0x0FF) == 0x020)
4171# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4172# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4173#else
4174# define ISLOWER(c) \
3beb1315
HPN
4175 (('a' <= (c) && (c) <= 'i') \
4176 || ('j' <= (c) && (c) <= 'r') \
4177 || ('s' <= (c) && (c) <= 'z'))
b033df90
DJ
4178# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4179#endif
238235ef 4180
b033df90 4181#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
238235ef
DJ
4182int
4183main ()
4184{
b033df90
DJ
4185 int i;
4186 for (i = 0; i < 256; i++)
4187 if (XOR (islower (i), ISLOWER (i))
3beb1315 4188 || toupper (i) != TOUPPER (i))
b033df90
DJ
4189 exit(2);
4190 exit (0);
238235ef
DJ
4191}
4192_ACEOF
b033df90
DJ
4193rm -f conftest$ac_exeext
4194if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4195 (eval $ac_link) 2>&5
238235ef
DJ
4196 ac_status=$?
4197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b033df90 4198 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
238235ef
DJ
4199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4200 (eval $ac_try) 2>&5
4201 ac_status=$?
4202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4203 (exit $ac_status); }; }; then
b033df90 4204 :
238235ef 4205else
b033df90
DJ
4206 echo "$as_me: program exited with status $ac_status" >&5
4207echo "$as_me: failed program was:" >&5
238235ef
DJ
4208sed 's/^/| /' conftest.$ac_ext >&5
4209
b033df90
DJ
4210( exit $ac_status )
4211ac_cv_header_stdc=no
238235ef 4212fi
3beb1315 4213rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
238235ef 4214fi
b033df90
DJ
4215fi
4216fi
4217echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4218echo "${ECHO_T}$ac_cv_header_stdc" >&6
4219if test $ac_cv_header_stdc = yes; then
238235ef
DJ
4220
4221cat >>confdefs.h <<\_ACEOF
b033df90 4222#define STDC_HEADERS 1
238235ef
DJ
4223_ACEOF
4224
4225fi
4226
b033df90 4227# On IRIX 5.3, sys/types and inttypes.h are conflicting.
238235ef 4228
b033df90
DJ
4229
4230
4231
4232
4233
4234
4235
4236
4237for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3beb1315 4238 inttypes.h stdint.h unistd.h
b033df90
DJ
4239do
4240as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4241echo "$as_me:$LINENO: checking for $ac_header" >&5
4242echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4243if eval "test \"\${$as_ac_Header+set}\" = set"; then
238235ef
DJ
4244 echo $ECHO_N "(cached) $ECHO_C" >&6
4245else
4246 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
4247/* confdefs.h. */
4248_ACEOF
4249cat confdefs.h >>conftest.$ac_ext
4250cat >>conftest.$ac_ext <<_ACEOF
4251/* end confdefs.h. */
b033df90 4252#include <$ac_header>
238235ef 4253_ACEOF
b033df90
DJ
4254if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4255 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
238235ef 4256 ac_status=$?
b033df90
DJ
4257 grep -v '^ *+' conftest.er1 >conftest.err
4258 rm -f conftest.er1
4259 cat conftest.err >&5
238235ef 4260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b033df90
DJ
4261 (exit $ac_status); } >/dev/null; then
4262 if test -s conftest.err; then
4263 ac_cpp_err=$ac_c_preproc_warn_flag
3beb1315 4264 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
b033df90
DJ
4265 else
4266 ac_cpp_err=
4267 fi
4268else
4269 ac_cpp_err=yes
4270fi
4271if test -z "$ac_cpp_err"; then
4272 eval "$as_ac_Header=yes"
238235ef
DJ
4273else
4274 echo "$as_me: failed program was:" >&5
4275sed 's/^/| /' conftest.$ac_ext >&5
4276
b033df90 4277 eval "$as_ac_Header=no"
238235ef 4278fi
b033df90 4279rm -f conftest.err conftest.$ac_ext
238235ef 4280fi
b033df90
DJ
4281echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4282echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4283if test `eval echo '${'$as_ac_Header'}'` = yes; then
4284 cat >>confdefs.h <<_ACEOF
4285#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
238235ef
DJ
4286_ACEOF
4287
4288fi
b033df90 4289done
238235ef
DJ
4290
4291
d49d0907
BE
4292echo "$as_me:$LINENO: checking for int" >&5
4293echo $ECHO_N "checking for int... $ECHO_C" >&6
4294if test "${ac_cv_type_int+set}" = set; then
4295 echo $ECHO_N "(cached) $ECHO_C" >&6
4296else
4297 cat >conftest.$ac_ext <<_ACEOF
4298/* confdefs.h. */
4299_ACEOF
4300cat confdefs.h >>conftest.$ac_ext
4301cat >>conftest.$ac_ext <<_ACEOF
4302/* end confdefs.h. */
4303$ac_includes_default
4304int
4305main ()
4306{
4307if ((int *) 0)
4308 return 0;
4309if (sizeof (int))
4310 return 0;
4311 ;
4312 return 0;
4313}
4314_ACEOF
4315rm -f conftest.$ac_objext
4316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4317 (eval $ac_compile) 2>conftest.er1
4318 ac_status=$?
4319 grep -v '^ *+' conftest.er1 >conftest.err
4320 rm -f conftest.er1
4321 cat conftest.err >&5
4322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4323 (exit $ac_status); } &&
e8f9ec35
GDR
4324 { ac_try='test -z "$ac_c_werror_flag"
4325 || test ! -s conftest.err'
d49d0907
BE
4326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4327 (eval $ac_try) 2>&5
4328 ac_status=$?
4329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4330 (exit $ac_status); }; } &&
4331 { ac_try='test -s conftest.$ac_objext'
4332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4333 (eval $ac_try) 2>&5
4334 ac_status=$?
4335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4336 (exit $ac_status); }; }; then
4337 ac_cv_type_int=yes
4338else
4339 echo "$as_me: failed program was:" >&5
4340sed 's/^/| /' conftest.$ac_ext >&5
4341
4342ac_cv_type_int=no
4343fi
4344rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4345fi
4346echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4347echo "${ECHO_T}$ac_cv_type_int" >&6
4348
4349echo "$as_me:$LINENO: checking size of int" >&5
4350echo $ECHO_N "checking size of int... $ECHO_C" >&6
4351if test "${ac_cv_sizeof_int+set}" = set; then
4352 echo $ECHO_N "(cached) $ECHO_C" >&6
4353else
4354 if test "$ac_cv_type_int" = yes; then
4355 # The cast to unsigned long works around a bug in the HP C Compiler
4356 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4357 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4358 # This bug is HP SR number 8606223364.
4359 if test "$cross_compiling" = yes; then
4360 # Depending upon the size, compute the lo and hi bounds.
4361cat >conftest.$ac_ext <<_ACEOF
4362/* confdefs.h. */
4363_ACEOF
4364cat confdefs.h >>conftest.$ac_ext
4365cat >>conftest.$ac_ext <<_ACEOF
4366/* end confdefs.h. */
4367$ac_includes_default
4368int
4369main ()
4370{
4371static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4372test_array [0] = 0
4373
4374 ;
4375 return 0;
4376}
4377_ACEOF
4378rm -f conftest.$ac_objext
4379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4380 (eval $ac_compile) 2>conftest.er1
4381 ac_status=$?
4382 grep -v '^ *+' conftest.er1 >conftest.err
4383 rm -f conftest.er1
4384 cat conftest.err >&5
4385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4386 (exit $ac_status); } &&
e8f9ec35
GDR
4387 { ac_try='test -z "$ac_c_werror_flag"
4388 || test ! -s conftest.err'
d49d0907
BE
4389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4390 (eval $ac_try) 2>&5
4391 ac_status=$?
4392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4393 (exit $ac_status); }; } &&
4394 { ac_try='test -s conftest.$ac_objext'
4395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4396 (eval $ac_try) 2>&5
4397 ac_status=$?
4398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4399 (exit $ac_status); }; }; then
4400 ac_lo=0 ac_mid=0
4401 while :; do
4402 cat >conftest.$ac_ext <<_ACEOF
4403/* confdefs.h. */
4404_ACEOF
4405cat confdefs.h >>conftest.$ac_ext
4406cat >>conftest.$ac_ext <<_ACEOF
4407/* end confdefs.h. */
4408$ac_includes_default
4409int
4410main ()
4411{
4412static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4413test_array [0] = 0
4414
4415 ;
4416 return 0;
4417}
4418_ACEOF
4419rm -f conftest.$ac_objext
4420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4421 (eval $ac_compile) 2>conftest.er1
4422 ac_status=$?
4423 grep -v '^ *+' conftest.er1 >conftest.err
4424 rm -f conftest.er1
4425 cat conftest.err >&5
4426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4427 (exit $ac_status); } &&
e8f9ec35
GDR
4428 { ac_try='test -z "$ac_c_werror_flag"
4429 || test ! -s conftest.err'
d49d0907
BE
4430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4431 (eval $ac_try) 2>&5
4432 ac_status=$?
4433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4434 (exit $ac_status); }; } &&
4435 { ac_try='test -s conftest.$ac_objext'
4436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4437 (eval $ac_try) 2>&5
4438 ac_status=$?
4439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4440 (exit $ac_status); }; }; then
4441 ac_hi=$ac_mid; break
4442else
4443 echo "$as_me: failed program was:" >&5
4444sed 's/^/| /' conftest.$ac_ext >&5
4445
4446ac_lo=`expr $ac_mid + 1`
4447 if test $ac_lo -le $ac_mid; then
4448 ac_lo= ac_hi=
4449 break
4450 fi
4451 ac_mid=`expr 2 '*' $ac_mid + 1`
4452fi
4453rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4454 done
4455else
4456 echo "$as_me: failed program was:" >&5
4457sed 's/^/| /' conftest.$ac_ext >&5
4458
4459cat >conftest.$ac_ext <<_ACEOF
4460/* confdefs.h. */
4461_ACEOF
4462cat confdefs.h >>conftest.$ac_ext
4463cat >>conftest.$ac_ext <<_ACEOF
4464/* end confdefs.h. */
4465$ac_includes_default
4466int
4467main ()
4468{
4469static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4470test_array [0] = 0
4471
4472 ;
4473 return 0;
4474}
4475_ACEOF
4476rm -f conftest.$ac_objext
4477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4478 (eval $ac_compile) 2>conftest.er1
4479 ac_status=$?
4480 grep -v '^ *+' conftest.er1 >conftest.err
4481 rm -f conftest.er1
4482 cat conftest.err >&5
4483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484 (exit $ac_status); } &&
e8f9ec35
GDR
4485 { ac_try='test -z "$ac_c_werror_flag"
4486 || test ! -s conftest.err'
d49d0907
BE
4487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4488 (eval $ac_try) 2>&5
4489 ac_status=$?
4490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4491 (exit $ac_status); }; } &&
4492 { ac_try='test -s conftest.$ac_objext'
4493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4494 (eval $ac_try) 2>&5
4495 ac_status=$?
4496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4497 (exit $ac_status); }; }; then
4498 ac_hi=-1 ac_mid=-1
4499 while :; do
4500 cat >conftest.$ac_ext <<_ACEOF
4501/* confdefs.h. */
4502_ACEOF
4503cat confdefs.h >>conftest.$ac_ext
4504cat >>conftest.$ac_ext <<_ACEOF
4505/* end confdefs.h. */
4506$ac_includes_default
4507int
4508main ()
4509{
4510static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4511test_array [0] = 0
4512
4513 ;
4514 return 0;
4515}
4516_ACEOF
4517rm -f conftest.$ac_objext
4518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4519 (eval $ac_compile) 2>conftest.er1
4520 ac_status=$?
4521 grep -v '^ *+' conftest.er1 >conftest.err
4522 rm -f conftest.er1
4523 cat conftest.err >&5
4524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4525 (exit $ac_status); } &&
e8f9ec35
GDR
4526 { ac_try='test -z "$ac_c_werror_flag"
4527 || test ! -s conftest.err'
d49d0907
BE
4528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4529 (eval $ac_try) 2>&5
4530 ac_status=$?
4531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4532 (exit $ac_status); }; } &&
4533 { ac_try='test -s conftest.$ac_objext'
4534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4535 (eval $ac_try) 2>&5
4536 ac_status=$?
4537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4538 (exit $ac_status); }; }; then
4539 ac_lo=$ac_mid; break
4540else
4541 echo "$as_me: failed program was:" >&5
4542sed 's/^/| /' conftest.$ac_ext >&5
4543
4544ac_hi=`expr '(' $ac_mid ')' - 1`
4545 if test $ac_mid -le $ac_hi; then
4546 ac_lo= ac_hi=
4547 break
4548 fi
4549 ac_mid=`expr 2 '*' $ac_mid`
4550fi
4551rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4552 done
4553else
4554 echo "$as_me: failed program was:" >&5
4555sed 's/^/| /' conftest.$ac_ext >&5
4556
4557ac_lo= ac_hi=
4558fi
4559rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4560fi
4561rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4562# Binary search between lo and hi bounds.
4563while test "x$ac_lo" != "x$ac_hi"; do
4564 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4565 cat >conftest.$ac_ext <<_ACEOF
4566/* confdefs.h. */
4567_ACEOF
4568cat confdefs.h >>conftest.$ac_ext
4569cat >>conftest.$ac_ext <<_ACEOF
4570/* end confdefs.h. */
4571$ac_includes_default
4572int
4573main ()
4574{
4575static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4576test_array [0] = 0
4577
4578 ;
4579 return 0;
4580}
4581_ACEOF
4582rm -f conftest.$ac_objext
4583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4584 (eval $ac_compile) 2>conftest.er1
4585 ac_status=$?
4586 grep -v '^ *+' conftest.er1 >conftest.err
4587 rm -f conftest.er1
4588 cat conftest.err >&5
4589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4590 (exit $ac_status); } &&
e8f9ec35
GDR
4591 { ac_try='test -z "$ac_c_werror_flag"
4592 || test ! -s conftest.err'
d49d0907
BE
4593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4594 (eval $ac_try) 2>&5
4595 ac_status=$?
4596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4597 (exit $ac_status); }; } &&
4598 { ac_try='test -s conftest.$ac_objext'
4599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4600 (eval $ac_try) 2>&5
4601 ac_status=$?
4602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4603 (exit $ac_status); }; }; then
4604 ac_hi=$ac_mid
4605else
4606 echo "$as_me: failed program was:" >&5
4607sed 's/^/| /' conftest.$ac_ext >&5
4608
4609ac_lo=`expr '(' $ac_mid ')' + 1`
4610fi
4611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4612done
4613case $ac_lo in
4614?*) ac_cv_sizeof_int=$ac_lo;;
4615'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4616See \`config.log' for more details." >&5
4617echo "$as_me: error: cannot compute sizeof (int), 77
4618See \`config.log' for more details." >&2;}
4619 { (exit 1); exit 1; }; } ;;
4620esac
4621else
4622 if test "$cross_compiling" = yes; then
e8f9ec35
GDR
4623 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4624See \`config.log' for more details." >&5
4625echo "$as_me: error: cannot run test program while cross compiling
4626See \`config.log' for more details." >&2;}
d49d0907
BE
4627 { (exit 1); exit 1; }; }
4628else
4629 cat >conftest.$ac_ext <<_ACEOF
4630/* confdefs.h. */
4631_ACEOF
4632cat confdefs.h >>conftest.$ac_ext
4633cat >>conftest.$ac_ext <<_ACEOF
4634/* end confdefs.h. */
4635$ac_includes_default
4636long longval () { return (long) (sizeof (int)); }
4637unsigned long ulongval () { return (long) (sizeof (int)); }
4638#include <stdio.h>
4639#include <stdlib.h>
4640int
4641main ()
4642{
4643
4644 FILE *f = fopen ("conftest.val", "w");
4645 if (! f)
4646 exit (1);
4647 if (((long) (sizeof (int))) < 0)
4648 {
4649 long i = longval ();
4650 if (i != ((long) (sizeof (int))))
4651 exit (1);
4652 fprintf (f, "%ld\n", i);
4653 }
4654 else
4655 {
4656 unsigned long i = ulongval ();
4657 if (i != ((long) (sizeof (int))))
4658 exit (1);
4659 fprintf (f, "%lu\n", i);
4660 }
4661 exit (ferror (f) || fclose (f) != 0);
4662
4663 ;
4664 return 0;
4665}
4666_ACEOF
4667rm -f conftest$ac_exeext
4668if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4669 (eval $ac_link) 2>&5
4670 ac_status=$?
4671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4672 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4674 (eval $ac_try) 2>&5
4675 ac_status=$?
4676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4677 (exit $ac_status); }; }; then
4678 ac_cv_sizeof_int=`cat conftest.val`
4679else
4680 echo "$as_me: program exited with status $ac_status" >&5
4681echo "$as_me: failed program was:" >&5
4682sed 's/^/| /' conftest.$ac_ext >&5
4683
4684( exit $ac_status )
4685{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4686See \`config.log' for more details." >&5
4687echo "$as_me: error: cannot compute sizeof (int), 77
4688See \`config.log' for more details." >&2;}
4689 { (exit 1); exit 1; }; }
4690fi
4691rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4692fi
4693fi
4694rm -f conftest.val
4695else
4696 ac_cv_sizeof_int=0
4697fi
4698fi
4699echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4700echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4701cat >>confdefs.h <<_ACEOF
4702#define SIZEOF_INT $ac_cv_sizeof_int
4703_ACEOF
4704
4705
4706
238235ef
DJ
4707echo "$as_me:$LINENO: checking for uintptr_t" >&5
4708echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
4709if test "${ac_cv_type_uintptr_t+set}" = set; then
4710 echo $ECHO_N "(cached) $ECHO_C" >&6
4711else
4712 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
4713/* confdefs.h. */
4714_ACEOF
4715cat confdefs.h >>conftest.$ac_ext
4716cat >>conftest.$ac_ext <<_ACEOF
4717/* end confdefs.h. */
4718$ac_includes_default
4719int
4720main ()
4721{
4722if ((uintptr_t *) 0)
4723 return 0;
4724if (sizeof (uintptr_t))
4725 return 0;
4726 ;
4727 return 0;
4728}
4729_ACEOF
4730rm -f conftest.$ac_objext
4731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 4732 (eval $ac_compile) 2>conftest.er1
238235ef 4733 ac_status=$?
3beb1315
HPN
4734 grep -v '^ *+' conftest.er1 >conftest.err
4735 rm -f conftest.er1
4736 cat conftest.err >&5
238235ef
DJ
4737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4738 (exit $ac_status); } &&
e8f9ec35
GDR
4739 { ac_try='test -z "$ac_c_werror_flag"
4740 || test ! -s conftest.err'
3beb1315
HPN
4741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4742 (eval $ac_try) 2>&5
4743 ac_status=$?
4744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4745 (exit $ac_status); }; } &&
4746 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
4747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4748 (eval $ac_try) 2>&5
4749 ac_status=$?
4750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4751 (exit $ac_status); }; }; then
4752 ac_cv_type_uintptr_t=yes
4753else
4754 echo "$as_me: failed program was:" >&5
4755sed 's/^/| /' conftest.$ac_ext >&5
d3982b71 4756
238235ef
DJ
4757ac_cv_type_uintptr_t=no
4758fi
3beb1315 4759rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fdfc290b 4760fi
238235ef
DJ
4761echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
4762echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
4763if test $ac_cv_type_uintptr_t = yes; then
4764 :
4765else
4766
4767cat >>confdefs.h <<_ACEOF
fdfc290b 4768#define uintptr_t unsigned long
238235ef 4769_ACEOF
fdfc290b
DR
4770
4771fi
d3982b71 4772
9bf3c9cc
RH
4773
4774# Look for a 64-bit type.
4775echo "$as_me:$LINENO: checking for a 64-bit type" >&5
4776echo $ECHO_N "checking for a 64-bit type... $ECHO_C" >&6
4777if test "${liberty_cv_uint64+set}" = set; then
4778 echo $ECHO_N "(cached) $ECHO_C" >&6
4779else
4780 cat >conftest.$ac_ext <<_ACEOF
4781/* confdefs.h. */
4782_ACEOF
4783cat confdefs.h >>conftest.$ac_ext
4784cat >>conftest.$ac_ext <<_ACEOF
4785/* end confdefs.h. */
4786#ifdef HAVE_STDINT_H
4787#include <stdint.h>
4788#endif
4789int
4790main ()
4791{
4792extern uint64_t foo;
4793 ;
4794 return 0;
4795}
4796_ACEOF
4797rm -f conftest.$ac_objext
4798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4799 (eval $ac_compile) 2>conftest.er1
4800 ac_status=$?
4801 grep -v '^ *+' conftest.er1 >conftest.err
4802 rm -f conftest.er1
4803 cat conftest.err >&5
4804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4805 (exit $ac_status); } &&
e8f9ec35
GDR
4806 { ac_try='test -z "$ac_c_werror_flag"
4807 || test ! -s conftest.err'
9bf3c9cc
RH
4808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4809 (eval $ac_try) 2>&5
4810 ac_status=$?
4811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4812 (exit $ac_status); }; } &&
4813 { ac_try='test -s conftest.$ac_objext'
4814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4815 (eval $ac_try) 2>&5
4816 ac_status=$?
4817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4818 (exit $ac_status); }; }; then
4819 liberty_cv_uint64=uint64_t
4820else
4821 echo "$as_me: failed program was:" >&5
4822sed 's/^/| /' conftest.$ac_ext >&5
4823
4824cat >conftest.$ac_ext <<_ACEOF
4825/* confdefs.h. */
4826_ACEOF
4827cat confdefs.h >>conftest.$ac_ext
4828cat >>conftest.$ac_ext <<_ACEOF
4829/* end confdefs.h. */
4830#ifdef HAVE_LIMITS_H
4831#include <limits.h>
4832#endif
4833#ifndef CHAR_BIT
4834#define CHAR_BIT 8
4835#endif
4836int
4837main ()
4838{
4839extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1];
4840 ;
4841 return 0;
4842}
4843_ACEOF
4844rm -f conftest.$ac_objext
4845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4846 (eval $ac_compile) 2>conftest.er1
4847 ac_status=$?
4848 grep -v '^ *+' conftest.er1 >conftest.err
4849 rm -f conftest.er1
4850 cat conftest.err >&5
4851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4852 (exit $ac_status); } &&
e8f9ec35
GDR
4853 { ac_try='test -z "$ac_c_werror_flag"
4854 || test ! -s conftest.err'
9bf3c9cc
RH
4855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4856 (eval $ac_try) 2>&5
4857 ac_status=$?
4858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4859 (exit $ac_status); }; } &&
4860 { ac_try='test -s conftest.$ac_objext'
4861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4862 (eval $ac_try) 2>&5
4863 ac_status=$?
4864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4865 (exit $ac_status); }; }; then
4866 liberty_cv_uint64="unsigned long"
4867else
4868 echo "$as_me: failed program was:" >&5
4869sed 's/^/| /' conftest.$ac_ext >&5
4870
4871cat >conftest.$ac_ext <<_ACEOF
4872/* confdefs.h. */
4873_ACEOF
4874cat confdefs.h >>conftest.$ac_ext
4875cat >>conftest.$ac_ext <<_ACEOF
4876/* end confdefs.h. */
4877#ifdef HAVE_LIMITS_H
4878#include <limits.h>
4879#endif
4880#ifndef CHAR_BIT
4881#define CHAR_BIT 8
4882#endif
4883int
4884main ()
4885{
4886extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1];
4887 ;
4888 return 0;
4889}
4890_ACEOF
4891rm -f conftest.$ac_objext
4892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4893 (eval $ac_compile) 2>conftest.er1
4894 ac_status=$?
4895 grep -v '^ *+' conftest.er1 >conftest.err
4896 rm -f conftest.er1
4897 cat conftest.err >&5
4898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4899 (exit $ac_status); } &&
e8f9ec35
GDR
4900 { ac_try='test -z "$ac_c_werror_flag"
4901 || test ! -s conftest.err'
9bf3c9cc
RH
4902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4903 (eval $ac_try) 2>&5
4904 ac_status=$?
4905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4906 (exit $ac_status); }; } &&
4907 { ac_try='test -s conftest.$ac_objext'
4908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4909 (eval $ac_try) 2>&5
4910 ac_status=$?
4911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4912 (exit $ac_status); }; }; then
4913 liberty_cv_uint64="unsigned long long"
4914else
4915 echo "$as_me: failed program was:" >&5
4916sed 's/^/| /' conftest.$ac_ext >&5
4917
4918liberty_cv_uint64=none
4919fi
4920rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4921fi
4922rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4923fi
4924rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4925fi
4926
4927echo "$as_me:$LINENO: result: $liberty_cv_uint64" >&5
4928echo "${ECHO_T}$liberty_cv_uint64" >&6
4929if test "$liberty_cv_uint64" != none; then
4930
6489430a
MR
4931cat >>confdefs.h <<_ACEOF
4932#define UNSIGNED_64BIT_TYPE $liberty_cv_uint64
9bf3c9cc
RH
4933_ACEOF
4934
4935fi
4936
39e8d049
KG
4937# Given the above check, we always have uintptr_t or a fallback
4938# definition. So define HAVE_UINTPTR_T in case any imported code
4939# relies on it.
d3982b71 4940
238235ef
DJ
4941cat >>confdefs.h <<\_ACEOF
4942#define HAVE_UINTPTR_T 1
4943_ACEOF
4944
4945
4946echo "$as_me:$LINENO: checking for pid_t" >&5
4947echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4948if test "${ac_cv_type_pid_t+set}" = set; then
4949 echo $ECHO_N "(cached) $ECHO_C" >&6
4950else
4951 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
4952/* confdefs.h. */
4953_ACEOF
4954cat confdefs.h >>conftest.$ac_ext
4955cat >>conftest.$ac_ext <<_ACEOF
4956/* end confdefs.h. */
4957$ac_includes_default
4958int
4959main ()
4960{
4961if ((pid_t *) 0)
4962 return 0;
4963if (sizeof (pid_t))
4964 return 0;
4965 ;
4966 return 0;
4967}
4968_ACEOF
4969rm -f conftest.$ac_objext
4970if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 4971 (eval $ac_compile) 2>conftest.er1
238235ef 4972 ac_status=$?
3beb1315
HPN
4973 grep -v '^ *+' conftest.er1 >conftest.err
4974 rm -f conftest.er1
4975 cat conftest.err >&5
238235ef
DJ
4976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977 (exit $ac_status); } &&
e8f9ec35
GDR
4978 { ac_try='test -z "$ac_c_werror_flag"
4979 || test ! -s conftest.err'
3beb1315
HPN
4980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4981 (eval $ac_try) 2>&5
4982 ac_status=$?
4983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4984 (exit $ac_status); }; } &&
4985 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
4986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4987 (eval $ac_try) 2>&5
4988 ac_status=$?
4989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4990 (exit $ac_status); }; }; then
deae2ed9
MM
4991 ac_cv_type_pid_t=yes
4992else
238235ef
DJ
4993 echo "$as_me: failed program was:" >&5
4994sed 's/^/| /' conftest.$ac_ext >&5
deae2ed9 4995
238235ef 4996ac_cv_type_pid_t=no
deae2ed9 4997fi
3beb1315 4998rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef
DJ
4999fi
5000echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5001echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5002if test $ac_cv_type_pid_t = yes; then
5003 :
5004else
5005
5006cat >>confdefs.h <<_ACEOF
deae2ed9 5007#define pid_t int
238235ef 5008_ACEOF
deae2ed9
MM
5009
5010fi
5011
5012
0bc0cd11
JL
5013# This is the list of functions which libiberty will provide if they
5014# are not available on the host.
5015
5016funcs="asprintf"
5017funcs="$funcs atexit"
5018funcs="$funcs basename"
5019funcs="$funcs bcmp"
5020funcs="$funcs bcopy"
dac45916 5021funcs="$funcs bsearch"
0bc0cd11 5022funcs="$funcs bzero"
a9acf741 5023funcs="$funcs calloc"
0bc0cd11 5024funcs="$funcs clock"
29650b2b 5025funcs="$funcs ffs"
0bc0cd11
JL
5026funcs="$funcs getcwd"
5027funcs="$funcs getpagesize"
17998b22 5028funcs="$funcs gettimeofday"
0bc0cd11
JL
5029funcs="$funcs index"
5030funcs="$funcs insque"
5031funcs="$funcs memchr"
5032funcs="$funcs memcmp"
5033funcs="$funcs memcpy"
5034funcs="$funcs memmove"
029bcc09 5035funcs="$funcs mempcpy"
0bc0cd11 5036funcs="$funcs memset"
687361c8 5037funcs="$funcs mkstemps"
9eb4080f 5038funcs="$funcs putenv"
0bc0cd11
JL
5039funcs="$funcs random"
5040funcs="$funcs rename"
5041funcs="$funcs rindex"
9eb4080f 5042funcs="$funcs setenv"
bd3fbc6b 5043funcs="$funcs snprintf"
0bc0cd11 5044funcs="$funcs sigsetmask"
029bcc09
KG
5045funcs="$funcs stpcpy"
5046funcs="$funcs stpncpy"
0bc0cd11
JL
5047funcs="$funcs strcasecmp"
5048funcs="$funcs strchr"
5049funcs="$funcs strdup"
5050funcs="$funcs strncasecmp"
17998b22 5051funcs="$funcs strndup"
0bc0cd11
JL
5052funcs="$funcs strrchr"
5053funcs="$funcs strstr"
5054funcs="$funcs strtod"
5055funcs="$funcs strtol"
5056funcs="$funcs strtoul"
83fbfe42 5057funcs="$funcs strverscmp"
0bc0cd11
JL
5058funcs="$funcs tmpnam"
5059funcs="$funcs vasprintf"
5060funcs="$funcs vfprintf"
5061funcs="$funcs vprintf"
bd3fbc6b 5062funcs="$funcs vsnprintf"
0bc0cd11
JL
5063funcs="$funcs vsprintf"
5064funcs="$funcs waitpid"
5065
5066# Also in the old function.def file: alloca, vfork, getopt.
5067
aa9dc53d 5068vars="sys_errlist sys_nerr sys_siglist"
0bc0cd11 5069
90e72e20 5070checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
64c7e556 5071checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
78a7dc90 5072checkfuncs="$checkfuncs getsysinfo table sysctl wait3 wait4 __fsetlocking"
0bc0cd11
JL
5073
5074# These are neither executed nor required, but they help keep
5075# autoheader happy without adding a bunch of text to acconfig.h.
5076if test "x" = "y"; then
0bc0cd11 5077
0bc0cd11 5078
238235ef
DJ
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
5136
17998b22
KG
5137
5138
f9a9ac80
KG
5139
5140
238235ef 5141
78a7dc90 5142
83fbfe42 5143
238235ef
DJ
5144
5145
5146for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
17998b22 5147 getcwd getpagesize gettimeofday index insque mkstemps memchr memcmp memcpy \
238235ef 5148 memmove mempcpy memset putenv random rename rindex sigsetmask \
17998b22 5149 strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strndup strrchr strstr \
83fbfe42 5150 strtod strtol strtoul strverscmp tmpnam vasprintf vfprintf vprintf \
238235ef
DJ
5151 vsprintf waitpid getrusage on_exit psignal strerror strsignal \
5152 sysconf times sbrk gettimeofday ffs snprintf vsnprintf \
a584cf65 5153 pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl wait3 wait4 \
78a7dc90 5154 realpath canonicalize_file_name __fsetlocking
238235ef
DJ
5155do
5156as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5157echo "$as_me:$LINENO: checking for $ac_func" >&5
5158echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5159if eval "test \"\${$as_ac_var+set}\" = set"; then
5160 echo $ECHO_N "(cached) $ECHO_C" >&6
5161else
5162 if test x$gcc_no_link = xyes; then
5163 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5164echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5165 { (exit 1); exit 1; }; }
5166fi
5167cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
5168/* confdefs.h. */
5169_ACEOF
5170cat confdefs.h >>conftest.$ac_ext
5171cat >>conftest.$ac_ext <<_ACEOF
5172/* end confdefs.h. */
5173/* System header to define __stub macros and hopefully few prototypes,
5174 which can conflict with char $ac_func (); below.
5175 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
5176 <limits.h> exists even on freestanding compilers. Under hpux,
5177 including <limits.h> includes <sys/time.h> and causes problems
5178 checking for functions defined therein. */
5179#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
5180# include <limits.h>
5181#else
5182# include <assert.h>
5183#endif
5184/* Override any gcc2 internal prototype to avoid an error. */
5185#ifdef __cplusplus
5186extern "C"
5187{
5188#endif
5189/* We use char because int might match the return type of a gcc2
5190 builtin and then its argument prototype would still apply. */
5191char $ac_func ();
5192/* The GNU C library defines this for functions which it implements
0bc0cd11
JL
5193 to always fail with ENOSYS. Some functions are actually named
5194 something starting with __ and the normal name is an alias. */
5195#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5196choke me
5197#else
238235ef
DJ
5198char (*f) () = $ac_func;
5199#endif
5200#ifdef __cplusplus
5201}
0bc0cd11
JL
5202#endif
5203
238235ef
DJ
5204int
5205main ()
5206{
5207return f != $ac_func;
5208 ;
5209 return 0;
5210}
5211_ACEOF
5212rm -f conftest.$ac_objext conftest$ac_exeext
5213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 5214 (eval $ac_link) 2>conftest.er1
238235ef 5215 ac_status=$?
3beb1315
HPN
5216 grep -v '^ *+' conftest.er1 >conftest.err
5217 rm -f conftest.er1
5218 cat conftest.err >&5
238235ef
DJ
5219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5220 (exit $ac_status); } &&
e8f9ec35
GDR
5221 { ac_try='test -z "$ac_c_werror_flag"
5222 || test ! -s conftest.err'
3beb1315
HPN
5223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5224 (eval $ac_try) 2>&5
5225 ac_status=$?
5226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5227 (exit $ac_status); }; } &&
5228 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
5229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5230 (eval $ac_try) 2>&5
5231 ac_status=$?
5232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5233 (exit $ac_status); }; }; then
5234 eval "$as_ac_var=yes"
5235else
5236 echo "$as_me: failed program was:" >&5
5237sed 's/^/| /' conftest.$ac_ext >&5
5238
5239eval "$as_ac_var=no"
5240fi
3beb1315
HPN
5241rm -f conftest.err conftest.$ac_objext \
5242 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
5243fi
5244echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5245echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5246if test `eval echo '${'$as_ac_var'}'` = yes; then
5247 cat >>confdefs.h <<_ACEOF
5248#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5249_ACEOF
e9019af6 5250
0bc0cd11
JL
5251fi
5252done
5253
1ff7682c
GDR
5254 echo "$as_me:$LINENO: checking whether basename is declared" >&5
5255echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6
5256if test "${ac_cv_have_decl_basename+set}" = set; then
5257 echo $ECHO_N "(cached) $ECHO_C" >&6
5258else
5259 cat >conftest.$ac_ext <<_ACEOF
5260/* confdefs.h. */
5261_ACEOF
5262cat confdefs.h >>conftest.$ac_ext
5263cat >>conftest.$ac_ext <<_ACEOF
5264/* end confdefs.h. */
5265$ac_includes_default
5266int
5267main ()
5268{
5269#ifndef basename
5270 char *p = (char *) basename;
5271#endif
5272
5273 ;
5274 return 0;
5275}
5276_ACEOF
5277rm -f conftest.$ac_objext
5278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5279 (eval $ac_compile) 2>conftest.er1
5280 ac_status=$?
5281 grep -v '^ *+' conftest.er1 >conftest.err
5282 rm -f conftest.er1
5283 cat conftest.err >&5
5284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5285 (exit $ac_status); } &&
e8f9ec35
GDR
5286 { ac_try='test -z "$ac_c_werror_flag"
5287 || test ! -s conftest.err'
1ff7682c
GDR
5288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5289 (eval $ac_try) 2>&5
5290 ac_status=$?
5291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5292 (exit $ac_status); }; } &&
5293 { ac_try='test -s conftest.$ac_objext'
5294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5295 (eval $ac_try) 2>&5
5296 ac_status=$?
5297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5298 (exit $ac_status); }; }; then
5299 ac_cv_have_decl_basename=yes
5300else
5301 echo "$as_me: failed program was:" >&5
5302sed 's/^/| /' conftest.$ac_ext >&5
5303
5304ac_cv_have_decl_basename=no
5305fi
5306rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5307fi
5308echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5
5309echo "${ECHO_T}$ac_cv_have_decl_basename" >&6
5310if test $ac_cv_have_decl_basename = yes; then
5311
5312cat >>confdefs.h <<_ACEOF
5313#define HAVE_DECL_BASENAME 1
5314_ACEOF
5315
5316
5317else
5318 cat >>confdefs.h <<_ACEOF
5319#define HAVE_DECL_BASENAME 0
5320_ACEOF
5321
5322
5323fi
5324echo "$as_me:$LINENO: checking whether ffs is declared" >&5
5325echo $ECHO_N "checking whether ffs is declared... $ECHO_C" >&6
5326if test "${ac_cv_have_decl_ffs+set}" = set; then
5327 echo $ECHO_N "(cached) $ECHO_C" >&6
5328else
5329 cat >conftest.$ac_ext <<_ACEOF
5330/* confdefs.h. */
5331_ACEOF
5332cat confdefs.h >>conftest.$ac_ext
5333cat >>conftest.$ac_ext <<_ACEOF
5334/* end confdefs.h. */
5335$ac_includes_default
5336int
5337main ()
5338{
5339#ifndef ffs
5340 char *p = (char *) ffs;
5341#endif
5342
5343 ;
5344 return 0;
5345}
5346_ACEOF
5347rm -f conftest.$ac_objext
5348if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5349 (eval $ac_compile) 2>conftest.er1
5350 ac_status=$?
5351 grep -v '^ *+' conftest.er1 >conftest.err
5352 rm -f conftest.er1
5353 cat conftest.err >&5
5354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5355 (exit $ac_status); } &&
e8f9ec35
GDR
5356 { ac_try='test -z "$ac_c_werror_flag"
5357 || test ! -s conftest.err'
1ff7682c
GDR
5358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5359 (eval $ac_try) 2>&5
5360 ac_status=$?
5361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5362 (exit $ac_status); }; } &&
5363 { ac_try='test -s conftest.$ac_objext'
5364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5365 (eval $ac_try) 2>&5
5366 ac_status=$?
5367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5368 (exit $ac_status); }; }; then
5369 ac_cv_have_decl_ffs=yes
5370else
5371 echo "$as_me: failed program was:" >&5
5372sed 's/^/| /' conftest.$ac_ext >&5
5373
5374ac_cv_have_decl_ffs=no
5375fi
5376rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5377fi
5378echo "$as_me:$LINENO: result: $ac_cv_have_decl_ffs" >&5
5379echo "${ECHO_T}$ac_cv_have_decl_ffs" >&6
5380if test $ac_cv_have_decl_ffs = yes; then
5381
5382cat >>confdefs.h <<_ACEOF
5383#define HAVE_DECL_FFS 1
5384_ACEOF
5385
5386
5387else
5388 cat >>confdefs.h <<_ACEOF
5389#define HAVE_DECL_FFS 0
5390_ACEOF
5391
5392
5393fi
5394echo "$as_me:$LINENO: checking whether asprintf is declared" >&5
5395echo $ECHO_N "checking whether asprintf is declared... $ECHO_C" >&6
5396if test "${ac_cv_have_decl_asprintf+set}" = set; then
5397 echo $ECHO_N "(cached) $ECHO_C" >&6
5398else
5399 cat >conftest.$ac_ext <<_ACEOF
5400/* confdefs.h. */
5401_ACEOF
5402cat confdefs.h >>conftest.$ac_ext
5403cat >>conftest.$ac_ext <<_ACEOF
5404/* end confdefs.h. */
5405$ac_includes_default
5406int
5407main ()
5408{
5409#ifndef asprintf
5410 char *p = (char *) asprintf;
5411#endif
5412
5413 ;
5414 return 0;
5415}
5416_ACEOF
5417rm -f conftest.$ac_objext
5418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5419 (eval $ac_compile) 2>conftest.er1
5420 ac_status=$?
5421 grep -v '^ *+' conftest.er1 >conftest.err
5422 rm -f conftest.er1
5423 cat conftest.err >&5
5424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5425 (exit $ac_status); } &&
e8f9ec35
GDR
5426 { ac_try='test -z "$ac_c_werror_flag"
5427 || test ! -s conftest.err'
1ff7682c
GDR
5428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5429 (eval $ac_try) 2>&5
5430 ac_status=$?
5431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5432 (exit $ac_status); }; } &&
5433 { ac_try='test -s conftest.$ac_objext'
5434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5435 (eval $ac_try) 2>&5
5436 ac_status=$?
5437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5438 (exit $ac_status); }; }; then
5439 ac_cv_have_decl_asprintf=yes
5440else
5441 echo "$as_me: failed program was:" >&5
5442sed 's/^/| /' conftest.$ac_ext >&5
5443
5444ac_cv_have_decl_asprintf=no
5445fi
5446rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5447fi
5448echo "$as_me:$LINENO: result: $ac_cv_have_decl_asprintf" >&5
5449echo "${ECHO_T}$ac_cv_have_decl_asprintf" >&6
5450if test $ac_cv_have_decl_asprintf = yes; then
5451
5452cat >>confdefs.h <<_ACEOF
5453#define HAVE_DECL_ASPRINTF 1
5454_ACEOF
5455
5456
5457else
5458 cat >>confdefs.h <<_ACEOF
5459#define HAVE_DECL_ASPRINTF 0
5460_ACEOF
5461
5462
5463fi
5464echo "$as_me:$LINENO: checking whether vasprintf is declared" >&5
5465echo $ECHO_N "checking whether vasprintf is declared... $ECHO_C" >&6
5466if test "${ac_cv_have_decl_vasprintf+set}" = set; then
5467 echo $ECHO_N "(cached) $ECHO_C" >&6
5468else
5469 cat >conftest.$ac_ext <<_ACEOF
5470/* confdefs.h. */
5471_ACEOF
5472cat confdefs.h >>conftest.$ac_ext
5473cat >>conftest.$ac_ext <<_ACEOF
5474/* end confdefs.h. */
5475$ac_includes_default
5476int
5477main ()
5478{
5479#ifndef vasprintf
5480 char *p = (char *) vasprintf;
5481#endif
5482
5483 ;
5484 return 0;
5485}
5486_ACEOF
5487rm -f conftest.$ac_objext
5488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5489 (eval $ac_compile) 2>conftest.er1
5490 ac_status=$?
5491 grep -v '^ *+' conftest.er1 >conftest.err
5492 rm -f conftest.er1
5493 cat conftest.err >&5
5494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5495 (exit $ac_status); } &&
e8f9ec35
GDR
5496 { ac_try='test -z "$ac_c_werror_flag"
5497 || test ! -s conftest.err'
1ff7682c
GDR
5498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5499 (eval $ac_try) 2>&5
5500 ac_status=$?
5501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5502 (exit $ac_status); }; } &&
5503 { ac_try='test -s conftest.$ac_objext'
5504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5505 (eval $ac_try) 2>&5
5506 ac_status=$?
5507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5508 (exit $ac_status); }; }; then
5509 ac_cv_have_decl_vasprintf=yes
5510else
5511 echo "$as_me: failed program was:" >&5
5512sed 's/^/| /' conftest.$ac_ext >&5
5513
5514ac_cv_have_decl_vasprintf=no
5515fi
5516rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5517fi
5518echo "$as_me:$LINENO: result: $ac_cv_have_decl_vasprintf" >&5
5519echo "${ECHO_T}$ac_cv_have_decl_vasprintf" >&6
5520if test $ac_cv_have_decl_vasprintf = yes; then
5521
5522cat >>confdefs.h <<_ACEOF
5523#define HAVE_DECL_VASPRINTF 1
5524_ACEOF
5525
5526
5527else
5528 cat >>confdefs.h <<_ACEOF
5529#define HAVE_DECL_VASPRINTF 0
5530_ACEOF
5531
5532
ddcf783b
EZ
5533fi
5534echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
5535echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
5536if test "${ac_cv_have_decl_snprintf+set}" = set; then
5537 echo $ECHO_N "(cached) $ECHO_C" >&6
5538else
5539 cat >conftest.$ac_ext <<_ACEOF
5540/* confdefs.h. */
5541_ACEOF
5542cat confdefs.h >>conftest.$ac_ext
5543cat >>conftest.$ac_ext <<_ACEOF
5544/* end confdefs.h. */
5545$ac_includes_default
5546int
5547main ()
5548{
5549#ifndef snprintf
5550 char *p = (char *) snprintf;
5551#endif
5552
5553 ;
5554 return 0;
5555}
5556_ACEOF
5557rm -f conftest.$ac_objext
5558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5559 (eval $ac_compile) 2>conftest.er1
5560 ac_status=$?
5561 grep -v '^ *+' conftest.er1 >conftest.err
5562 rm -f conftest.er1
5563 cat conftest.err >&5
5564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5565 (exit $ac_status); } &&
e8f9ec35
GDR
5566 { ac_try='test -z "$ac_c_werror_flag"
5567 || test ! -s conftest.err'
ddcf783b
EZ
5568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5569 (eval $ac_try) 2>&5
5570 ac_status=$?
5571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5572 (exit $ac_status); }; } &&
5573 { ac_try='test -s conftest.$ac_objext'
5574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5575 (eval $ac_try) 2>&5
5576 ac_status=$?
5577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5578 (exit $ac_status); }; }; then
5579 ac_cv_have_decl_snprintf=yes
5580else
5581 echo "$as_me: failed program was:" >&5
5582sed 's/^/| /' conftest.$ac_ext >&5
5583
5584ac_cv_have_decl_snprintf=no
5585fi
5586rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5587fi
5588echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
5589echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
5590if test $ac_cv_have_decl_snprintf = yes; then
5591
5592cat >>confdefs.h <<_ACEOF
5593#define HAVE_DECL_SNPRINTF 1
5594_ACEOF
5595
5596
5597else
5598 cat >>confdefs.h <<_ACEOF
5599#define HAVE_DECL_SNPRINTF 0
5600_ACEOF
5601
5602
5603fi
5604echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
5605echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
5606if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
5607 echo $ECHO_N "(cached) $ECHO_C" >&6
5608else
5609 cat >conftest.$ac_ext <<_ACEOF
5610/* confdefs.h. */
5611_ACEOF
5612cat confdefs.h >>conftest.$ac_ext
5613cat >>conftest.$ac_ext <<_ACEOF
5614/* end confdefs.h. */
5615$ac_includes_default
5616int
5617main ()
5618{
5619#ifndef vsnprintf
5620 char *p = (char *) vsnprintf;
5621#endif
5622
5623 ;
5624 return 0;
5625}
5626_ACEOF
5627rm -f conftest.$ac_objext
5628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5629 (eval $ac_compile) 2>conftest.er1
5630 ac_status=$?
5631 grep -v '^ *+' conftest.er1 >conftest.err
5632 rm -f conftest.er1
5633 cat conftest.err >&5
5634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5635 (exit $ac_status); } &&
e8f9ec35
GDR
5636 { ac_try='test -z "$ac_c_werror_flag"
5637 || test ! -s conftest.err'
ddcf783b
EZ
5638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5639 (eval $ac_try) 2>&5
5640 ac_status=$?
5641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5642 (exit $ac_status); }; } &&
5643 { ac_try='test -s conftest.$ac_objext'
5644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5645 (eval $ac_try) 2>&5
5646 ac_status=$?
5647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5648 (exit $ac_status); }; }; then
5649 ac_cv_have_decl_vsnprintf=yes
5650else
5651 echo "$as_me: failed program was:" >&5
5652sed 's/^/| /' conftest.$ac_ext >&5
5653
5654ac_cv_have_decl_vsnprintf=no
5655fi
5656rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5657fi
5658echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
5659echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
5660if test $ac_cv_have_decl_vsnprintf = yes; then
5661
5662cat >>confdefs.h <<_ACEOF
5663#define HAVE_DECL_VSNPRINTF 1
5664_ACEOF
5665
5666
5667else
5668 cat >>confdefs.h <<_ACEOF
5669#define HAVE_DECL_VSNPRINTF 0
5670_ACEOF
5671
5672
1ff7682c
GDR
5673fi
5674
5675
238235ef
DJ
5676
5677cat >>confdefs.h <<\_ACEOF
d1209685 5678#define HAVE_SYS_ERRLIST 1
238235ef
DJ
5679_ACEOF
5680
d1209685 5681
238235ef 5682cat >>confdefs.h <<\_ACEOF
dac45916 5683#define HAVE_SYS_NERR 1
238235ef
DJ
5684_ACEOF
5685
d1209685 5686
238235ef 5687cat >>confdefs.h <<\_ACEOF
d1209685 5688#define HAVE_SYS_SIGLIST 1
238235ef 5689_ACEOF
d1209685 5690
0bc0cd11
JL
5691fi
5692
5693# For each of these functions, if the host does not provide the
5694# function we want to put FN.o in LIBOBJS, and if the host does
b548dffb 5695# provide the function, we want to define HAVE_FN in config.h.
0bc0cd11
JL
5696
5697setobjs=
7c72138a 5698CHECK=
48d7db63 5699target_header_dir=
0bc0cd11
JL
5700if test -n "${with_target_subdir}"; then
5701
ca6b370d 5702 # We are being configured as a target library. AC_REPLACE_FUNCS
0bc0cd11 5703 # may not work correctly, because the compiler may not be able to
ca6b370d
JL
5704 # link executables. Note that we may still be being configured
5705 # native.
0bc0cd11
JL
5706
5707 # If we are being configured for newlib, we know which functions
5708 # newlib provide and which ones we will be expected to provide.
5709
5710 if test "x${with_newlib}" = "xyes"; then
3beb1315
HPN
5711 case $LIBOBJS in
5712 "asprintf.$ac_objext" | \
5713 *" asprintf.$ac_objext" | \
5714 "asprintf.$ac_objext "* | \
5715 *" asprintf.$ac_objext "* ) ;;
5716 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;;
5717esac
5718
5719 case $LIBOBJS in
5720 "basename.$ac_objext" | \
5721 *" basename.$ac_objext" | \
5722 "basename.$ac_objext "* | \
5723 *" basename.$ac_objext "* ) ;;
5724 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
5725esac
5726
5727 case $LIBOBJS in
5728 "insque.$ac_objext" | \
5729 *" insque.$ac_objext" | \
5730 "insque.$ac_objext "* | \
5731 *" insque.$ac_objext "* ) ;;
5732 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
5733esac
5734
5735 case $LIBOBJS in
5736 "random.$ac_objext" | \
5737 *" random.$ac_objext" | \
5738 "random.$ac_objext "* | \
5739 *" random.$ac_objext "* ) ;;
5740 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
5741esac
5742
5743 case $LIBOBJS in
5744 "strdup.$ac_objext" | \
5745 *" strdup.$ac_objext" | \
5746 "strdup.$ac_objext "* | \
5747 *" strdup.$ac_objext "* ) ;;
5748 *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
5749esac
5750
5751 case $LIBOBJS in
5752 "vasprintf.$ac_objext" | \
5753 *" vasprintf.$ac_objext" | \
5754 "vasprintf.$ac_objext "* | \
5755 *" vasprintf.$ac_objext "* ) ;;
5756 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
5757esac
5758
0bc0cd11
JL
5759
5760 for f in $funcs; do
5761 case "$f" in
ca6b370d 5762 asprintf | basename | insque | random | strdup | vasprintf)
0bc0cd11
JL
5763 ;;
5764 *)
5765 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
238235ef 5766 cat >>confdefs.h <<_ACEOF
0bc0cd11 5767#define $n 1
238235ef 5768_ACEOF
0bc0cd11
JL
5769
5770 ;;
5771 esac
5772 done
5773
5774 # newlib doesnt provide any of the variables in $vars, so we
5775 # dont have to check them here.
5776
ca6b370d 5777 # Of the functions in $checkfuncs, newlib only has strerror.
c1300f45 5778 cat >>confdefs.h <<\_ACEOF
0bc0cd11 5779#define HAVE_STRERROR 1
c1300f45 5780_ACEOF
0bc0cd11
JL
5781
5782
5783 setobjs=yes
5784
5785 fi
7c72138a 5786
70aec81b
CV
5787 # If we are being configured for Mingw, we know which functions
5788 # Mingw provides and which ones we will be expected to provide.
5789
5790 case "${host}" in
5791 *-*-mingw*)
5792 case $LIBOBJS in
5793 "asprintf.$ac_objext" | \
5794 *" asprintf.$ac_objext" | \
5795 "asprintf.$ac_objext "* | \
5796 *" asprintf.$ac_objext "* ) ;;
5797 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;;
5798esac
5799
5800 case $LIBOBJS in
5801 "basename.$ac_objext" | \
5802 *" basename.$ac_objext" | \
5803 "basename.$ac_objext "* | \
5804 *" basename.$ac_objext "* ) ;;
5805 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
5806esac
5807
5808 case $LIBOBJS in
5809 "bcmp.$ac_objext" | \
5810 *" bcmp.$ac_objext" | \
5811 "bcmp.$ac_objext "* | \
5812 *" bcmp.$ac_objext "* ) ;;
5813 *) LIBOBJS="$LIBOBJS bcmp.$ac_objext" ;;
5814esac
5815
5816 case $LIBOBJS in
5817 "bcopy.$ac_objext" | \
5818 *" bcopy.$ac_objext" | \
5819 "bcopy.$ac_objext "* | \
5820 *" bcopy.$ac_objext "* ) ;;
5821 *) LIBOBJS="$LIBOBJS bcopy.$ac_objext" ;;
5822esac
5823
5824 case $LIBOBJS in
5825 "bzero.$ac_objext" | \
5826 *" bzero.$ac_objext" | \
5827 "bzero.$ac_objext "* | \
5828 *" bzero.$ac_objext "* ) ;;
5829 *) LIBOBJS="$LIBOBJS bzero.$ac_objext" ;;
5830esac
5831
5832 case $LIBOBJS in
5833 "clock.$ac_objext" | \
5834 *" clock.$ac_objext" | \
5835 "clock.$ac_objext "* | \
5836 *" clock.$ac_objext "* ) ;;
5837 *) LIBOBJS="$LIBOBJS clock.$ac_objext" ;;
5838esac
5839
5840 case $LIBOBJS in
5841 "ffs.$ac_objext" | \
5842 *" ffs.$ac_objext" | \
5843 "ffs.$ac_objext "* | \
5844 *" ffs.$ac_objext "* ) ;;
5845 *) LIBOBJS="$LIBOBJS ffs.$ac_objext" ;;
5846esac
5847
5848 case $LIBOBJS in
5849 "getpagesize.$ac_objext" | \
5850 *" getpagesize.$ac_objext" | \
5851 "getpagesize.$ac_objext "* | \
5852 *" getpagesize.$ac_objext "* ) ;;
5853 *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;;
5854esac
5855
5856 case $LIBOBJS in
5857 "index.$ac_objext" | \
5858 *" index.$ac_objext" | \
5859 "index.$ac_objext "* | \
5860 *" index.$ac_objext "* ) ;;
5861 *) LIBOBJS="$LIBOBJS index.$ac_objext" ;;
5862esac
5863
5864 case $LIBOBJS in
5865 "insque.$ac_objext" | \
5866 *" insque.$ac_objext" | \
5867 "insque.$ac_objext "* | \
5868 *" insque.$ac_objext "* ) ;;
5869 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
5870esac
5871
5872 case $LIBOBJS in
5873 "mempcpy.$ac_objext" | \
5874 *" mempcpy.$ac_objext" | \
5875 "mempcpy.$ac_objext "* | \
5876 *" mempcpy.$ac_objext "* ) ;;
5877 *) LIBOBJS="$LIBOBJS mempcpy.$ac_objext" ;;
5878esac
5879
5880 case $LIBOBJS in
5881 "mkstemps.$ac_objext" | \
5882 *" mkstemps.$ac_objext" | \
5883 "mkstemps.$ac_objext "* | \
5884 *" mkstemps.$ac_objext "* ) ;;
5885 *) LIBOBJS="$LIBOBJS mkstemps.$ac_objext" ;;
5886esac
5887
5888 case $LIBOBJS in
5889 "random.$ac_objext" | \
5890 *" random.$ac_objext" | \
5891 "random.$ac_objext "* | \
5892 *" random.$ac_objext "* ) ;;
5893 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
5894esac
5895
5896 case $LIBOBJS in
5897 "rindex.$ac_objext" | \
5898 *" rindex.$ac_objext" | \
5899 "rindex.$ac_objext "* | \
5900 *" rindex.$ac_objext "* ) ;;
5901 *) LIBOBJS="$LIBOBJS rindex.$ac_objext" ;;
5902esac
5903
5904 case $LIBOBJS in
5905 "sigsetmask.$ac_objext" | \
5906 *" sigsetmask.$ac_objext" | \
5907 "sigsetmask.$ac_objext "* | \
5908 *" sigsetmask.$ac_objext "* ) ;;
5909 *) LIBOBJS="$LIBOBJS sigsetmask.$ac_objext" ;;
5910esac
5911
5912 case $LIBOBJS in
5913 "stpcpy.$ac_objext" | \
5914 *" stpcpy.$ac_objext" | \
5915 "stpcpy.$ac_objext "* | \
5916 *" stpcpy.$ac_objext "* ) ;;
5917 *) LIBOBJS="$LIBOBJS stpcpy.$ac_objext" ;;
5918esac
5919
5920 case $LIBOBJS in
5921 "stpncpy.$ac_objext" | \
5922 *" stpncpy.$ac_objext" | \
5923 "stpncpy.$ac_objext "* | \
5924 *" stpncpy.$ac_objext "* ) ;;
5925 *) LIBOBJS="$LIBOBJS stpncpy.$ac_objext" ;;
5926esac
5927
5928 case $LIBOBJS in
5929 "strndup.$ac_objext" | \
5930 *" strndup.$ac_objext" | \
5931 "strndup.$ac_objext "* | \
5932 *" strndup.$ac_objext "* ) ;;
5933 *) LIBOBJS="$LIBOBJS strndup.$ac_objext" ;;
5934esac
5935
5936 case $LIBOBJS in
5937 "strverscmp.$ac_objext" | \
5938 *" strverscmp.$ac_objext" | \
5939 "strverscmp.$ac_objext "* | \
5940 *" strverscmp.$ac_objext "* ) ;;
5941 *) LIBOBJS="$LIBOBJS strverscmp.$ac_objext" ;;
5942esac
5943
5944 case $LIBOBJS in
5945 "vasprintf.$ac_objext" | \
5946 *" vasprintf.$ac_objext" | \
5947 "vasprintf.$ac_objext "* | \
5948 *" vasprintf.$ac_objext "* ) ;;
5949 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
5950esac
5951
5952 case $LIBOBJS in
5953 "waitpid.$ac_objext" | \
5954 *" waitpid.$ac_objext" | \
5955 "waitpid.$ac_objext "* | \
5956 *" waitpid.$ac_objext "* ) ;;
5957 *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;;
5958esac
5959
5960
5961 for f in $funcs; do
5962 case "$f" in
5963 asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strverscmp | vasprintf | waitpid)
5964 ;;
5965 *)
5966 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5967 cat >>confdefs.h <<_ACEOF
5968#define $n 1
5969_ACEOF
5970
5971 ;;
5972 esac
5973 done
5974
5975 # Mingw doesnt provide any of the variables in $vars, so we
5976 # dont have to check them here.
5977
5978 # Of the functions in $checkfuncs, Mingw only has strerror.
5979 cat >>confdefs.h <<\_ACEOF
5980#define HAVE_STRERROR 1
5981_ACEOF
5982
5983
5984 setobjs=yes
5985 ;;
5986
5987 esac
5988
48d7db63
PE
5989 # We may wish to install the target headers somewhere.
5990 # Check whether --enable-install-libiberty or --disable-install-libiberty was given.
5991if test "${enable_install_libiberty+set}" = set; then
5992 enableval="$enable_install_libiberty"
5993 enable_install_libiberty=$enableval
5994else
5995 enable_install_libiberty=no
238235ef 5996fi;
48d7db63
PE
5997 # Option parsed, now set things appropriately.
5998 case x"$enable_install_libiberty" in
5999 xyes|x)
6000 target_header_dir=libiberty
6001 ;;
238235ef 6002 xno)
48d7db63
PE
6003 target_header_dir=
6004 ;;
238235ef 6005 *)
48d7db63
PE
6006 # This could be sanity-checked in various ways...
6007 target_header_dir="${enable_install_libiberty}"
6008 ;;
6009 esac
6010
6011
7c72138a
TT
6012else
6013
6014 # Not a target library, so we set things up to run the test suite.
a584cf65 6015 CHECK=really-check
7c72138a 6016
0bc0cd11
JL
6017fi
6018
7c72138a
TT
6019
6020
48d7db63 6021
b1c45ae4 6022case "${host}" in
46af757b 6023 *-*-cygwin* | *-*-mingw*)
c1300f45 6024 cat >>confdefs.h <<\_ACEOF
b1c45ae4 6025#define HAVE_SYS_ERRLIST 1
c1300f45 6026_ACEOF
b1c45ae4 6027
c1300f45 6028 cat >>confdefs.h <<\_ACEOF
b1c45ae4 6029#define HAVE_SYS_NERR 1
c1300f45 6030_ACEOF
b1c45ae4
CF
6031
6032 ;;
6033esac
6034
0bc0cd11
JL
6035if test -z "${setobjs}"; then
6036 case "${host}" in
6037
6038 *-*-vxworks*)
6039 # Handle VxWorks configuration specially, since on VxWorks the
6040 # libraries are actually on the target board, not in the file
6041 # system.
3beb1315
HPN
6042 case $LIBOBJS in
6043 "basename.$ac_objext" | \
6044 *" basename.$ac_objext" | \
6045 "basename.$ac_objext "* | \
6046 *" basename.$ac_objext "* ) ;;
6047 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
6048esac
6049
6050 case $LIBOBJS in
6051 "getpagesize.$ac_objext" | \
6052 *" getpagesize.$ac_objext" | \
6053 "getpagesize.$ac_objext "* | \
6054 *" getpagesize.$ac_objext "* ) ;;
6055 *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;;
6056esac
6057
6058 case $LIBOBJS in
6059 "insque.$ac_objext" | \
6060 *" insque.$ac_objext" | \
6061 "insque.$ac_objext "* | \
6062 *" insque.$ac_objext "* ) ;;
6063 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
6064esac
6065
6066 case $LIBOBJS in
6067 "random.$ac_objext" | \
6068 *" random.$ac_objext" | \
6069 "random.$ac_objext "* | \
6070 *" random.$ac_objext "* ) ;;
6071 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
6072esac
6073
6074 case $LIBOBJS in
6075 "strcasecmp.$ac_objext" | \
6076 *" strcasecmp.$ac_objext" | \
6077 "strcasecmp.$ac_objext "* | \
6078 *" strcasecmp.$ac_objext "* ) ;;
6079 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" ;;
6080esac
6081
6082 case $LIBOBJS in
6083 "strncasecmp.$ac_objext" | \
6084 *" strncasecmp.$ac_objext" | \
6085 "strncasecmp.$ac_objext "* | \
6086 *" strncasecmp.$ac_objext "* ) ;;
6087 *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;;
6088esac
6089
6090 case $LIBOBJS in
6091 "strdup.$ac_objext" | \
6092 *" strdup.$ac_objext" | \
6093 "strdup.$ac_objext "* | \
6094 *" strdup.$ac_objext "* ) ;;
6095 *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
6096esac
6097
6098 case $LIBOBJS in
6099 "vfork.$ac_objext" | \
6100 *" vfork.$ac_objext" | \
6101 "vfork.$ac_objext "* | \
6102 *" vfork.$ac_objext "* ) ;;
6103 *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
6104esac
6105
6106 case $LIBOBJS in
6107 "waitpid.$ac_objext" | \
6108 *" waitpid.$ac_objext" | \
6109 "waitpid.$ac_objext "* | \
6110 *" waitpid.$ac_objext "* ) ;;
6111 *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;;
6112esac
6113
6114 case $LIBOBJS in
6115 "vasprintf.$ac_objext" | \
6116 *" vasprintf.$ac_objext" | \
6117 "vasprintf.$ac_objext "* | \
6118 *" vasprintf.$ac_objext "* ) ;;
6119 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
6120esac
6121
0bc0cd11
JL
6122 for f in $funcs; do
6123 case "$f" in
6124 basename | getpagesize | insque | random | strcasecmp)
6125 ;;
6126 strncasecmp | strdup | vfork | waitpid | vasprintf)
6127 ;;
6128 *)
6129 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
238235ef 6130 cat >>confdefs.h <<_ACEOF
0bc0cd11 6131#define $n 1
238235ef 6132_ACEOF
0bc0cd11
JL
6133
6134 ;;
6135 esac
6136 done
6137
6138 # VxWorks doesn't provide any of the variables in $vars, so we
6139 # don't have to check them here.
6140
6141 # Of the functions in $checkfuncs, VxWorks only has strerror.
c1300f45 6142 cat >>confdefs.h <<\_ACEOF
0bc0cd11 6143#define HAVE_STRERROR 1
c1300f45 6144_ACEOF
0bc0cd11
JL
6145
6146
f86b57e4
DD
6147 setobjs=yes
6148 ;;
6149
6150 *-*-msdosdjgpp)
6151 for f in atexit basename bcmp bcopy bsearch bzero calloc clock ffs \
6a9131e7 6152 getcwd getpagesize getrusage gettimeofday \
f86b57e4
DD
6153 index insque memchr memcmp memcpy memmove memset psignal \
6154 putenv random rename rindex sbrk setenv stpcpy strcasecmp \
6155 strchr strdup strerror strncasecmp strrchr strstr strtod \
6156 strtol strtoul sysconf times tmpnam vfprintf vprintf \
6157 vsprintf waitpid
6158 do
6159 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6160 cat >>confdefs.h <<_ACEOF
6161#define $n 1
6162_ACEOF
6163
6164 done
6165
6166
0bc0cd11
JL
6167 setobjs=yes
6168 ;;
6169
6170 esac
6171fi
6172
6173if test -z "${setobjs}"; then
6174
6175 case "${host}" in
6176
dd8f3ed5
GN
6177 *-*-cygwin*)
6178 # The Cygwin library actually uses a couple of files from
0bc0cd11 6179 # libiberty when it is built. If we are building a native
dd8f3ed5 6180 # Cygwin, and we run the tests, we will appear to have these
0bc0cd11
JL
6181 # files. However, when we go on to build winsup, we will wind up
6182 # with a library which does not have the files, since they should
6183 # have come from libiberty.
6184
6185 # We handle this by removing the functions the winsup library
6186 # provides from our shell variables, so that they appear to be
6187 # missing.
6188
2f31ed7e 6189 # DJ - only if we're *building* cygwin, not just building *with* cygwin
238235ef 6190
2f31ed7e
DD
6191 if test -n "${with_target_subdir}"
6192 then
6193 funcs="`echo $funcs | sed -e 's/random//'`"
3beb1315
HPN
6194 case $LIBOBJS in
6195 "random.$ac_objext" | \
6196 *" random.$ac_objext" | \
6197 "random.$ac_objext "* | \
6198 *" random.$ac_objext "* ) ;;
6199 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
6200esac
6201
2f31ed7e
DD
6202 vars="`echo $vars | sed -e 's/sys_siglist//'`"
6203 checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
6204 fi
0bc0cd11
JL
6205 ;;
6206
6207 *-*-mingw32*)
6208 # Under mingw32, sys_nerr and sys_errlist exist, but they are
6209 # macros, so the test below won't find them.
d1209685
ZW
6210 libiberty_cv_var_sys_nerr=yes
6211 libiberty_cv_var_sys_errlist=yes
0bc0cd11
JL
6212 ;;
6213
b3df8be1 6214 *-*-msdosdjgpp*)
fe8ee922
DD
6215 # vfork and fork are stubs.
6216 ac_cv_func_vfork_works=no
6217 ;;
6218
89f602a7 6219 *-*-uwin*)
238235ef 6220 # Under some versions of uwin, vfork is notoriously buggy and the test
89f602a7
MK
6221 # can hang configure; on other versions, vfork exists just as a stub.
6222 # FIXME: This should be removed once vfork in uwin's runtime is fixed.
6223 ac_cv_func_vfork_works=no
62133b5e 6224 # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
238235ef 6225 # macros (actually, these are imported from a DLL, but the end effect
62133b5e 6226 # is the same), so the test below won't find them.
d1209685
ZW
6227 libiberty_cv_var_sys_nerr=yes
6228 libiberty_cv_var_sys_errlist=yes
89f602a7
MK
6229 ;;
6230
ee262b6f 6231 *-*-*vms*)
238235ef 6232 # Under VMS, vfork works very different than on Unix. The standard test
ee262b6f
DR
6233 # won't work, and it isn't easily adaptable. It makes more sense to
6234 # just force it.
6235 ac_cv_func_vfork_works=yes
6236 ;;
6237
0bc0cd11
JL
6238 esac
6239
6240 # We haven't set the list of objects yet. Use the standard autoconf
6241 # tests. This will only work if the compiler works.
238235ef
DJ
6242 echo "$as_me:$LINENO: checking for library containing strerror" >&5
6243echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
6244if test "${ac_cv_search_strerror+set}" = set; then
6245 echo $ECHO_N "(cached) $ECHO_C" >&6
6246else
6247 ac_func_search_save_LIBS=$LIBS
6248ac_cv_search_strerror=no
6249if test x$gcc_no_link = xyes; then
6250 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6251echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6252 { (exit 1); exit 1; }; }
6253fi
6254cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6255/* confdefs.h. */
6256_ACEOF
6257cat confdefs.h >>conftest.$ac_ext
6258cat >>conftest.$ac_ext <<_ACEOF
6259/* end confdefs.h. */
0bc0cd11 6260
238235ef
DJ
6261/* Override any gcc2 internal prototype to avoid an error. */
6262#ifdef __cplusplus
6263extern "C"
6264#endif
6265/* We use char because int might match the return type of a gcc2
6266 builtin and then its argument prototype would still apply. */
6267char strerror ();
6268int
6269main ()
6270{
6271strerror ();
6272 ;
6273 return 0;
6274}
6275_ACEOF
6276rm -f conftest.$ac_objext conftest$ac_exeext
6277if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 6278 (eval $ac_link) 2>conftest.er1
238235ef 6279 ac_status=$?
3beb1315
HPN
6280 grep -v '^ *+' conftest.er1 >conftest.err
6281 rm -f conftest.er1
6282 cat conftest.err >&5
238235ef
DJ
6283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6284 (exit $ac_status); } &&
e8f9ec35
GDR
6285 { ac_try='test -z "$ac_c_werror_flag"
6286 || test ! -s conftest.err'
3beb1315
HPN
6287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6288 (eval $ac_try) 2>&5
6289 ac_status=$?
6290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6291 (exit $ac_status); }; } &&
6292 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
6293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6294 (eval $ac_try) 2>&5
6295 ac_status=$?
6296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6297 (exit $ac_status); }; }; then
6298 ac_cv_search_strerror="none required"
6299else
6300 echo "$as_me: failed program was:" >&5
6301sed 's/^/| /' conftest.$ac_ext >&5
6302
6303fi
3beb1315
HPN
6304rm -f conftest.err conftest.$ac_objext \
6305 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
6306if test "$ac_cv_search_strerror" = no; then
6307 for ac_lib in cposix; do
6308 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6309 if test x$gcc_no_link = xyes; then
6310 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6311echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6312 { (exit 1); exit 1; }; }
6313fi
6314cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6315/* confdefs.h. */
6316_ACEOF
6317cat confdefs.h >>conftest.$ac_ext
6318cat >>conftest.$ac_ext <<_ACEOF
6319/* end confdefs.h. */
687361c8 6320
238235ef
DJ
6321/* Override any gcc2 internal prototype to avoid an error. */
6322#ifdef __cplusplus
6323extern "C"
6324#endif
6325/* We use char because int might match the return type of a gcc2
6326 builtin and then its argument prototype would still apply. */
6327char strerror ();
6328int
6329main ()
6330{
6331strerror ();
6332 ;
6333 return 0;
6334}
6335_ACEOF
6336rm -f conftest.$ac_objext conftest$ac_exeext
6337if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 6338 (eval $ac_link) 2>conftest.er1
238235ef 6339 ac_status=$?
3beb1315
HPN
6340 grep -v '^ *+' conftest.er1 >conftest.err
6341 rm -f conftest.er1
6342 cat conftest.err >&5
238235ef
DJ
6343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6344 (exit $ac_status); } &&
e8f9ec35
GDR
6345 { ac_try='test -z "$ac_c_werror_flag"
6346 || test ! -s conftest.err'
3beb1315
HPN
6347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6348 (eval $ac_try) 2>&5
6349 ac_status=$?
6350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6351 (exit $ac_status); }; } &&
6352 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
6353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6354 (eval $ac_try) 2>&5
6355 ac_status=$?
6356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6357 (exit $ac_status); }; }; then
6358 ac_cv_search_strerror="-l$ac_lib"
6359break
6360else
6361 echo "$as_me: failed program was:" >&5
6362sed 's/^/| /' conftest.$ac_ext >&5
6363
6364fi
3beb1315
HPN
6365rm -f conftest.err conftest.$ac_objext \
6366 conftest$ac_exeext conftest.$ac_ext
238235ef 6367 done
0bc0cd11 6368fi
238235ef
DJ
6369LIBS=$ac_func_search_save_LIBS
6370fi
6371echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
6372echo "${ECHO_T}$ac_cv_search_strerror" >&6
6373if test "$ac_cv_search_strerror" != no; then
6374 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
0bc0cd11 6375
0bc0cd11 6376fi
0bc0cd11 6377
238235ef
DJ
6378
6379for ac_func in $funcs
0bc0cd11 6380do
238235ef
DJ
6381as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6382echo "$as_me:$LINENO: checking for $ac_func" >&5
6383echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6384if eval "test \"\${$as_ac_var+set}\" = set"; then
6385 echo $ECHO_N "(cached) $ECHO_C" >&6
6386else
6387 if test x$gcc_no_link = xyes; then
6388 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6389echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6390 { (exit 1); exit 1; }; }
6391fi
6392cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6393/* confdefs.h. */
6394_ACEOF
6395cat confdefs.h >>conftest.$ac_ext
6396cat >>conftest.$ac_ext <<_ACEOF
6397/* end confdefs.h. */
0bc0cd11 6398/* System header to define __stub macros and hopefully few prototypes,
238235ef
DJ
6399 which can conflict with char $ac_func (); below.
6400 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
6401 <limits.h> exists even on freestanding compilers. Under hpux,
6402 including <limits.h> includes <sys/time.h> and causes problems
6403 checking for functions defined therein. */
6404#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
6405# include <limits.h>
6406#else
6407# include <assert.h>
6408#endif
0bc0cd11 6409/* Override any gcc2 internal prototype to avoid an error. */
238235ef
DJ
6410#ifdef __cplusplus
6411extern "C"
6412{
6413#endif
0bc0cd11 6414/* We use char because int might match the return type of a gcc2
238235ef
DJ
6415 builtin and then its argument prototype would still apply. */
6416char $ac_func ();
0bc0cd11
JL
6417/* The GNU C library defines this for functions which it implements
6418 to always fail with ENOSYS. Some functions are actually named
6419 something starting with __ and the normal name is an alias. */
6420#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6421choke me
6422#else
238235ef
DJ
6423char (*f) () = $ac_func;
6424#endif
6425#ifdef __cplusplus
6426}
0bc0cd11
JL
6427#endif
6428
238235ef
DJ
6429int
6430main ()
6431{
6432return f != $ac_func;
6433 ;
6434 return 0;
6435}
6436_ACEOF
6437rm -f conftest.$ac_objext conftest$ac_exeext
6438if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 6439 (eval $ac_link) 2>conftest.er1
238235ef 6440 ac_status=$?
3beb1315
HPN
6441 grep -v '^ *+' conftest.er1 >conftest.err
6442 rm -f conftest.er1
6443 cat conftest.err >&5
238235ef
DJ
6444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6445 (exit $ac_status); } &&
e8f9ec35
GDR
6446 { ac_try='test -z "$ac_c_werror_flag"
6447 || test ! -s conftest.err'
3beb1315
HPN
6448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6449 (eval $ac_try) 2>&5
6450 ac_status=$?
6451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6452 (exit $ac_status); }; } &&
6453 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
6454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6455 (eval $ac_try) 2>&5
6456 ac_status=$?
6457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6458 (exit $ac_status); }; }; then
6459 eval "$as_ac_var=yes"
6460else
6461 echo "$as_me: failed program was:" >&5
6462sed 's/^/| /' conftest.$ac_ext >&5
6463
6464eval "$as_ac_var=no"
6465fi
3beb1315
HPN
6466rm -f conftest.err conftest.$ac_objext \
6467 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
6468fi
6469echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6470echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6471if test `eval echo '${'$as_ac_var'}'` = yes; then
6472 cat >>confdefs.h <<_ACEOF
6473#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6474_ACEOF
6475
6476else
3beb1315
HPN
6477 case $LIBOBJS in
6478 "$ac_func.$ac_objext" | \
6479 *" $ac_func.$ac_objext" | \
6480 "$ac_func.$ac_objext "* | \
6481 *" $ac_func.$ac_objext "* ) ;;
6482 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
6483esac
6484
0bc0cd11
JL
6485fi
6486done
6487
6488
238235ef
DJ
6489 echo "$as_me:$LINENO: checking whether alloca needs Cray hooks" >&5
6490echo $ECHO_N "checking whether alloca needs Cray hooks... $ECHO_C" >&6
6491if test "${ac_cv_os_cray+set}" = set; then
6492 echo $ECHO_N "(cached) $ECHO_C" >&6
0bc0cd11 6493else
238235ef 6494 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6495/* confdefs.h. */
6496_ACEOF
6497cat confdefs.h >>conftest.$ac_ext
6498cat >>conftest.$ac_ext <<_ACEOF
6499/* end confdefs.h. */
0bc0cd11
JL
6500#if defined(CRAY) && ! defined(CRAY2)
6501webecray
6502#else
6503wenotbecray
6504#endif
6505
238235ef 6506_ACEOF
0bc0cd11 6507if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
238235ef 6508 $EGREP "webecray" >/dev/null 2>&1; then
0bc0cd11
JL
6509 ac_cv_os_cray=yes
6510else
0bc0cd11
JL
6511 ac_cv_os_cray=no
6512fi
6513rm -f conftest*
6514
6515fi
238235ef
DJ
6516echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
6517echo "${ECHO_T}$ac_cv_os_cray" >&6
0bc0cd11 6518if test $ac_cv_os_cray = yes; then
b548dffb 6519 for ac_func in _getb67 GETB67 getb67; do
238235ef
DJ
6520 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6521echo "$as_me:$LINENO: checking for $ac_func" >&5
6522echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6523if eval "test \"\${$as_ac_var+set}\" = set"; then
6524 echo $ECHO_N "(cached) $ECHO_C" >&6
6525else
6526 if test x$gcc_no_link = xyes; then
6527 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6528echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6529 { (exit 1); exit 1; }; }
6530fi
6531cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6532/* confdefs.h. */
6533_ACEOF
6534cat confdefs.h >>conftest.$ac_ext
6535cat >>conftest.$ac_ext <<_ACEOF
6536/* end confdefs.h. */
0bc0cd11 6537/* System header to define __stub macros and hopefully few prototypes,
238235ef
DJ
6538 which can conflict with char $ac_func (); below.
6539 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
6540 <limits.h> exists even on freestanding compilers. Under hpux,
6541 including <limits.h> includes <sys/time.h> and causes problems
6542 checking for functions defined therein. */
6543#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
6544# include <limits.h>
6545#else
6546# include <assert.h>
6547#endif
0bc0cd11 6548/* Override any gcc2 internal prototype to avoid an error. */
238235ef
DJ
6549#ifdef __cplusplus
6550extern "C"
6551{
6552#endif
0bc0cd11 6553/* We use char because int might match the return type of a gcc2
238235ef
DJ
6554 builtin and then its argument prototype would still apply. */
6555char $ac_func ();
0bc0cd11
JL
6556/* The GNU C library defines this for functions which it implements
6557 to always fail with ENOSYS. Some functions are actually named
6558 something starting with __ and the normal name is an alias. */
6559#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6560choke me
6561#else
238235ef
DJ
6562char (*f) () = $ac_func;
6563#endif
6564#ifdef __cplusplus
6565}
0bc0cd11
JL
6566#endif
6567
238235ef
DJ
6568int
6569main ()
6570{
6571return f != $ac_func;
6572 ;
6573 return 0;
6574}
6575_ACEOF
6576rm -f conftest.$ac_objext conftest$ac_exeext
6577if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 6578 (eval $ac_link) 2>conftest.er1
238235ef 6579 ac_status=$?
3beb1315
HPN
6580 grep -v '^ *+' conftest.er1 >conftest.err
6581 rm -f conftest.er1
6582 cat conftest.err >&5
238235ef
DJ
6583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6584 (exit $ac_status); } &&
e8f9ec35
GDR
6585 { ac_try='test -z "$ac_c_werror_flag"
6586 || test ! -s conftest.err'
3beb1315
HPN
6587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6588 (eval $ac_try) 2>&5
6589 ac_status=$?
6590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6591 (exit $ac_status); }; } &&
6592 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
6593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6594 (eval $ac_try) 2>&5
6595 ac_status=$?
6596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6597 (exit $ac_status); }; }; then
6598 eval "$as_ac_var=yes"
6599else
6600 echo "$as_me: failed program was:" >&5
6601sed 's/^/| /' conftest.$ac_ext >&5
6602
6603eval "$as_ac_var=no"
6604fi
3beb1315
HPN
6605rm -f conftest.err conftest.$ac_objext \
6606 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
6607fi
6608echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6609echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6610if test `eval echo '${'$as_ac_var'}'` = yes; then
6611
6612cat >>confdefs.h <<_ACEOF
0bc0cd11 6613#define CRAY_STACKSEG_END $ac_func
238235ef 6614_ACEOF
0bc0cd11 6615 break
0bc0cd11
JL
6616fi
6617
b548dffb 6618 done
0bc0cd11
JL
6619fi
6620
238235ef
DJ
6621echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
6622echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
6623if test "${ac_cv_c_stack_direction+set}" = set; then
6624 echo $ECHO_N "(cached) $ECHO_C" >&6
0bc0cd11
JL
6625else
6626 if test "$cross_compiling" = yes; then
6627 ac_cv_c_stack_direction=0
6628else
238235ef 6629 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6630/* confdefs.h. */
6631_ACEOF
6632cat confdefs.h >>conftest.$ac_ext
6633cat >>conftest.$ac_ext <<_ACEOF
6634/* end confdefs.h. */
0bc0cd11
JL
6635find_stack_direction ()
6636{
6637 static char *addr = 0;
6638 auto char dummy;
6639 if (addr == 0)
6640 {
6641 addr = &dummy;
6642 return find_stack_direction ();
6643 }
6644 else
6645 return (&dummy > addr) ? 1 : -1;
6646}
6647main ()
6648{
6649 exit (find_stack_direction() < 0);
6650}
238235ef
DJ
6651_ACEOF
6652rm -f conftest$ac_exeext
6653if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6654 (eval $ac_link) 2>&5
6655 ac_status=$?
6656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6657 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6659 (eval $ac_try) 2>&5
6660 ac_status=$?
6661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6662 (exit $ac_status); }; }; then
0bc0cd11
JL
6663 ac_cv_c_stack_direction=1
6664else
238235ef
DJ
6665 echo "$as_me: program exited with status $ac_status" >&5
6666echo "$as_me: failed program was:" >&5
6667sed 's/^/| /' conftest.$ac_ext >&5
6668
6669( exit $ac_status )
6670ac_cv_c_stack_direction=-1
0bc0cd11 6671fi
3beb1315 6672rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0bc0cd11 6673fi
0bc0cd11 6674fi
238235ef
DJ
6675echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
6676echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
0bc0cd11 6677
238235ef 6678cat >>confdefs.h <<_ACEOF
0bc0cd11 6679#define STACK_DIRECTION $ac_cv_c_stack_direction
238235ef
DJ
6680_ACEOF
6681
0bc0cd11 6682
7dd88617 6683
238235ef
DJ
6684
6685for ac_header in unistd.h vfork.h
6686do
6687as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b033df90 6688echo "$as_me:$LINENO: checking for $ac_header" >&5
238235ef
DJ
6689echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6690if eval "test \"\${$as_ac_Header+set}\" = set"; then
6691 echo $ECHO_N "(cached) $ECHO_C" >&6
238235ef 6692else
b033df90 6693 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6694/* confdefs.h. */
6695_ACEOF
6696cat confdefs.h >>conftest.$ac_ext
6697cat >>conftest.$ac_ext <<_ACEOF
6698/* end confdefs.h. */
6699#include <$ac_header>
6700_ACEOF
6701if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6702 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6703 ac_status=$?
6704 grep -v '^ *+' conftest.er1 >conftest.err
6705 rm -f conftest.er1
6706 cat conftest.err >&5
6707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6708 (exit $ac_status); } >/dev/null; then
6709 if test -s conftest.err; then
6710 ac_cpp_err=$ac_c_preproc_warn_flag
3beb1315 6711 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
238235ef
DJ
6712 else
6713 ac_cpp_err=
6714 fi
0bc0cd11 6715else
238235ef
DJ
6716 ac_cpp_err=yes
6717fi
6718if test -z "$ac_cpp_err"; then
b033df90 6719 eval "$as_ac_Header=yes"
238235ef
DJ
6720else
6721 echo "$as_me: failed program was:" >&5
6722sed 's/^/| /' conftest.$ac_ext >&5
6723
b033df90 6724 eval "$as_ac_Header=no"
238235ef
DJ
6725fi
6726rm -f conftest.err conftest.$ac_ext
0bc0cd11 6727fi
238235ef
DJ
6728echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6729echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
238235ef
DJ
6730if test `eval echo '${'$as_ac_Header'}'` = yes; then
6731 cat >>confdefs.h <<_ACEOF
6732#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6733_ACEOF
0bc0cd11 6734
0bc0cd11 6735fi
238235ef
DJ
6736done
6737
6738
6739
6740for ac_func in fork vfork
6741do
6742as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6743echo "$as_me:$LINENO: checking for $ac_func" >&5
6744echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6745if eval "test \"\${$as_ac_var+set}\" = set"; then
6746 echo $ECHO_N "(cached) $ECHO_C" >&6
6747else
6748 if test x$gcc_no_link = xyes; then
6749 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6750echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6751 { (exit 1); exit 1; }; }
6752fi
6753cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6754/* confdefs.h. */
6755_ACEOF
6756cat confdefs.h >>conftest.$ac_ext
6757cat >>conftest.$ac_ext <<_ACEOF
6758/* end confdefs.h. */
0bc0cd11 6759/* System header to define __stub macros and hopefully few prototypes,
238235ef
DJ
6760 which can conflict with char $ac_func (); below.
6761 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
6762 <limits.h> exists even on freestanding compilers. Under hpux,
6763 including <limits.h> includes <sys/time.h> and causes problems
6764 checking for functions defined therein. */
6765#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
6766# include <limits.h>
6767#else
6768# include <assert.h>
6769#endif
0bc0cd11 6770/* Override any gcc2 internal prototype to avoid an error. */
238235ef
DJ
6771#ifdef __cplusplus
6772extern "C"
6773{
6774#endif
0bc0cd11 6775/* We use char because int might match the return type of a gcc2
238235ef
DJ
6776 builtin and then its argument prototype would still apply. */
6777char $ac_func ();
0bc0cd11
JL
6778/* The GNU C library defines this for functions which it implements
6779 to always fail with ENOSYS. Some functions are actually named
6780 something starting with __ and the normal name is an alias. */
238235ef 6781#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
0bc0cd11
JL
6782choke me
6783#else
238235ef
DJ
6784char (*f) () = $ac_func;
6785#endif
6786#ifdef __cplusplus
6787}
0bc0cd11
JL
6788#endif
6789
238235ef
DJ
6790int
6791main ()
6792{
6793return f != $ac_func;
6794 ;
6795 return 0;
6796}
6797_ACEOF
6798rm -f conftest.$ac_objext conftest$ac_exeext
6799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 6800 (eval $ac_link) 2>conftest.er1
238235ef 6801 ac_status=$?
3beb1315
HPN
6802 grep -v '^ *+' conftest.er1 >conftest.err
6803 rm -f conftest.er1
6804 cat conftest.err >&5
238235ef
DJ
6805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6806 (exit $ac_status); } &&
e8f9ec35
GDR
6807 { ac_try='test -z "$ac_c_werror_flag"
6808 || test ! -s conftest.err'
3beb1315
HPN
6809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6810 (eval $ac_try) 2>&5
6811 ac_status=$?
6812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6813 (exit $ac_status); }; } &&
6814 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
6815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6816 (eval $ac_try) 2>&5
6817 ac_status=$?
6818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6819 (exit $ac_status); }; }; then
6820 eval "$as_ac_var=yes"
6821else
6822 echo "$as_me: failed program was:" >&5
6823sed 's/^/| /' conftest.$ac_ext >&5
6824
6825eval "$as_ac_var=no"
6826fi
3beb1315
HPN
6827rm -f conftest.err conftest.$ac_objext \
6828 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
6829fi
6830echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6831echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6832if test `eval echo '${'$as_ac_var'}'` = yes; then
6833 cat >>confdefs.h <<_ACEOF
6834#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6835_ACEOF
6836
0bc0cd11 6837fi
238235ef 6838done
0bc0cd11 6839
238235ef
DJ
6840if test "x$ac_cv_func_fork" = xyes; then
6841 echo "$as_me:$LINENO: checking for working fork" >&5
6842echo $ECHO_N "checking for working fork... $ECHO_C" >&6
6843if test "${ac_cv_func_fork_works+set}" = set; then
6844 echo $ECHO_N "(cached) $ECHO_C" >&6
0bc0cd11 6845else
238235ef
DJ
6846 if test "$cross_compiling" = yes; then
6847 ac_cv_func_fork_works=cross
6848else
6849 cat >conftest.$ac_ext <<_ACEOF
6850/* By Ruediger Kuhlmann. */
6851 #include <sys/types.h>
6852 #if HAVE_UNISTD_H
6853 # include <unistd.h>
6854 #endif
6855 /* Some systems only have a dummy stub for fork() */
6856 int main ()
6857 {
3beb1315
HPN
6858 if (fork() < 0)
6859 exit (1);
6860 exit (0);
238235ef
DJ
6861 }
6862_ACEOF
6863rm -f conftest$ac_exeext
6864if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6865 (eval $ac_link) 2>&5
6866 ac_status=$?
6867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6868 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6870 (eval $ac_try) 2>&5
6871 ac_status=$?
6872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6873 (exit $ac_status); }; }; then
6874 ac_cv_func_fork_works=yes
6875else
6876 echo "$as_me: program exited with status $ac_status" >&5
6877echo "$as_me: failed program was:" >&5
6878sed 's/^/| /' conftest.$ac_ext >&5
6879
6880( exit $ac_status )
6881ac_cv_func_fork_works=no
6882fi
3beb1315 6883rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
238235ef
DJ
6884fi
6885fi
6886echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
6887echo "${ECHO_T}$ac_cv_func_fork_works" >&6
6888
6889else
6890 ac_cv_func_fork_works=$ac_cv_func_fork
6891fi
6892if test "x$ac_cv_func_fork_works" = xcross; then
6893 case $host in
6894 *-*-amigaos* | *-*-msdosdjgpp*)
6895 # Override, as these systems have only a dummy fork() stub
6896 ac_cv_func_fork_works=no
6897 ;;
6898 *)
6899 ac_cv_func_fork_works=yes
6900 ;;
6901 esac
6902 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
6903echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
0bc0cd11 6904fi
0bc0cd11 6905ac_cv_func_vfork_works=$ac_cv_func_vfork
238235ef
DJ
6906if test "x$ac_cv_func_vfork" = xyes; then
6907 echo "$as_me:$LINENO: checking for working vfork" >&5
6908echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
6909if test "${ac_cv_func_vfork_works+set}" = set; then
6910 echo $ECHO_N "(cached) $ECHO_C" >&6
0bc0cd11 6911else
238235ef
DJ
6912 if test "$cross_compiling" = yes; then
6913 ac_cv_func_vfork_works=cross
6914else
6915 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6916/* confdefs.h. */
6917_ACEOF
6918cat confdefs.h >>conftest.$ac_ext
6919cat >>conftest.$ac_ext <<_ACEOF
6920/* end confdefs.h. */
0bc0cd11
JL
6921/* Thanks to Paul Eggert for this test. */
6922#include <stdio.h>
238235ef 6923#include <stdlib.h>
0bc0cd11
JL
6924#include <sys/types.h>
6925#include <sys/stat.h>
238235ef
DJ
6926#include <sys/wait.h>
6927#if HAVE_UNISTD_H
6928# include <unistd.h>
0bc0cd11 6929#endif
238235ef
DJ
6930#if HAVE_VFORK_H
6931# include <vfork.h>
0bc0cd11
JL
6932#endif
6933/* On some sparc systems, changes by the child to local and incoming
238235ef
DJ
6934 argument registers are propagated back to the parent. The compiler
6935 is told about this with #include <vfork.h>, but some compilers
6936 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
6937 static variable whose address is put into a register that is
6938 clobbered by the vfork. */
6939static void
0bc0cd11
JL
6940#ifdef __cplusplus
6941sparc_address_test (int arg)
238235ef 6942# else
0bc0cd11
JL
6943sparc_address_test (arg) int arg;
6944#endif
6945{
6946 static pid_t child;
6947 if (!child) {
6948 child = vfork ();
6949 if (child < 0) {
6950 perror ("vfork");
6951 _exit(2);
6952 }
6953 if (!child) {
6954 arg = getpid();
6955 write(-1, "", 0);
6956 _exit (arg);
6957 }
6958 }
6959}
238235ef
DJ
6960
6961int
6962main ()
6963{
0bc0cd11
JL
6964 pid_t parent = getpid ();
6965 pid_t child;
6966
238235ef 6967 sparc_address_test (0);
0bc0cd11
JL
6968
6969 child = vfork ();
6970
6971 if (child == 0) {
238235ef
DJ
6972 /* Here is another test for sparc vfork register problems. This
6973 test uses lots of local variables, at least as many local
6974 variables as main has allocated so far including compiler
6975 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
6976 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
6977 reuse the register of parent for one of the local variables,
6978 since it will think that parent can't possibly be used any more
6979 in this routine. Assigning to the local variable will thus
6980 munge parent in the parent process. */
0bc0cd11
JL
6981 pid_t
6982 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6983 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6984 /* Convince the compiler that p..p7 are live; otherwise, it might
6985 use the same hardware register for all 8 local variables. */
6986 if (p != p1 || p != p2 || p != p3 || p != p4
6987 || p != p5 || p != p6 || p != p7)
6988 _exit(1);
6989
238235ef
DJ
6990 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
6991 from child file descriptors. If the child closes a descriptor
6992 before it execs or exits, this munges the parent's descriptor
6993 as well. Test for this by closing stdout in the child. */
0bc0cd11
JL
6994 _exit(close(fileno(stdout)) != 0);
6995 } else {
6996 int status;
6997 struct stat st;
6998
6999 while (wait(&status) != child)
7000 ;
7001 exit(
7002 /* Was there some problem with vforking? */
7003 child < 0
7004
7005 /* Did the child fail? (This shouldn't happen.) */
7006 || status
7007
7008 /* Did the vfork/compiler bug occur? */
7009 || parent != getpid()
7010
7011 /* Did the file descriptor bug occur? */
7012 || fstat(fileno(stdout), &st) != 0
7013 );
7014 }
7015}
238235ef
DJ
7016_ACEOF
7017rm -f conftest$ac_exeext
7018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7019 (eval $ac_link) 2>&5
7020 ac_status=$?
7021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7022 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7024 (eval $ac_try) 2>&5
7025 ac_status=$?
7026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7027 (exit $ac_status); }; }; then
0bc0cd11
JL
7028 ac_cv_func_vfork_works=yes
7029else
238235ef
DJ
7030 echo "$as_me: program exited with status $ac_status" >&5
7031echo "$as_me: failed program was:" >&5
7032sed 's/^/| /' conftest.$ac_ext >&5
7033
7034( exit $ac_status )
7035ac_cv_func_vfork_works=no
7036fi
3beb1315 7037rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0bc0cd11 7038fi
0bc0cd11 7039fi
238235ef
DJ
7040echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
7041echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
0bc0cd11 7042
238235ef
DJ
7043fi;
7044if test "x$ac_cv_func_fork_works" = xcross; then
3beb1315 7045 ac_cv_func_vfork_works=$ac_cv_func_vfork
238235ef
DJ
7046 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
7047echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
0bc0cd11
JL
7048fi
7049
238235ef
DJ
7050if test "x$ac_cv_func_vfork_works" = xyes; then
7051
7052cat >>confdefs.h <<\_ACEOF
7053#define HAVE_WORKING_VFORK 1
7054_ACEOF
7055
7056else
7057
7058cat >>confdefs.h <<\_ACEOF
0bc0cd11 7059#define vfork fork
238235ef
DJ
7060_ACEOF
7061
7062fi
7063if test "x$ac_cv_func_fork_works" = xyes; then
7064
7065cat >>confdefs.h <<\_ACEOF
7066#define HAVE_WORKING_FORK 1
7067_ACEOF
0bc0cd11
JL
7068
7069fi
7070
7071 if test $ac_cv_func_vfork_works = no; then
3beb1315
HPN
7072 case $LIBOBJS in
7073 "vfork.$ac_objext" | \
7074 *" vfork.$ac_objext" | \
7075 "vfork.$ac_objext "* | \
7076 *" vfork.$ac_objext "* ) ;;
7077 *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
7078esac
7079
0bc0cd11 7080 fi
e490616e
ZW
7081 # We only need _doprnt if we might use it to implement v*printf.
7082 if test $ac_cv_func_vprintf != yes \
7083 || test $ac_cv_func_vfprintf != yes \
7084 || test $ac_cv_func_vsprintf != yes; then
238235ef
DJ
7085
7086for ac_func in _doprnt
e490616e 7087do
238235ef
DJ
7088as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7089echo "$as_me:$LINENO: checking for $ac_func" >&5
7090echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7091if eval "test \"\${$as_ac_var+set}\" = set"; then
7092 echo $ECHO_N "(cached) $ECHO_C" >&6
7093else
7094 if test x$gcc_no_link = xyes; then
7095 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7096echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7097 { (exit 1); exit 1; }; }
7098fi
7099cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
7100/* confdefs.h. */
7101_ACEOF
7102cat confdefs.h >>conftest.$ac_ext
7103cat >>conftest.$ac_ext <<_ACEOF
7104/* end confdefs.h. */
e490616e 7105/* System header to define __stub macros and hopefully few prototypes,
238235ef
DJ
7106 which can conflict with char $ac_func (); below.
7107 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
7108 <limits.h> exists even on freestanding compilers. Under hpux,
7109 including <limits.h> includes <sys/time.h> and causes problems
7110 checking for functions defined therein. */
7111#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
7112# include <limits.h>
7113#else
7114# include <assert.h>
7115#endif
e490616e 7116/* Override any gcc2 internal prototype to avoid an error. */
238235ef
DJ
7117#ifdef __cplusplus
7118extern "C"
7119{
7120#endif
e490616e 7121/* We use char because int might match the return type of a gcc2
238235ef
DJ
7122 builtin and then its argument prototype would still apply. */
7123char $ac_func ();
e490616e
ZW
7124/* The GNU C library defines this for functions which it implements
7125 to always fail with ENOSYS. Some functions are actually named
7126 something starting with __ and the normal name is an alias. */
7127#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7128choke me
7129#else
238235ef
DJ
7130char (*f) () = $ac_func;
7131#endif
7132#ifdef __cplusplus
7133}
e490616e
ZW
7134#endif
7135
238235ef
DJ
7136int
7137main ()
7138{
7139return f != $ac_func;
7140 ;
7141 return 0;
7142}
7143_ACEOF
7144rm -f conftest.$ac_objext conftest$ac_exeext
7145if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 7146 (eval $ac_link) 2>conftest.er1
238235ef 7147 ac_status=$?
3beb1315
HPN
7148 grep -v '^ *+' conftest.er1 >conftest.err
7149 rm -f conftest.er1
7150 cat conftest.err >&5
238235ef
DJ
7151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7152 (exit $ac_status); } &&
e8f9ec35
GDR
7153 { ac_try='test -z "$ac_c_werror_flag"
7154 || test ! -s conftest.err'
3beb1315
HPN
7155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7156 (eval $ac_try) 2>&5
7157 ac_status=$?
7158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7159 (exit $ac_status); }; } &&
7160 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
7161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7162 (eval $ac_try) 2>&5
7163 ac_status=$?
7164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7165 (exit $ac_status); }; }; then
7166 eval "$as_ac_var=yes"
7167else
7168 echo "$as_me: failed program was:" >&5
7169sed 's/^/| /' conftest.$ac_ext >&5
7170
7171eval "$as_ac_var=no"
7172fi
3beb1315
HPN
7173rm -f conftest.err conftest.$ac_objext \
7174 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
7175fi
7176echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7177echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7178if test `eval echo '${'$as_ac_var'}'` = yes; then
7179 cat >>confdefs.h <<_ACEOF
7180#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7181_ACEOF
7182
7183else
3beb1315
HPN
7184 case $LIBOBJS in
7185 "$ac_func.$ac_objext" | \
7186 *" $ac_func.$ac_objext" | \
7187 "$ac_func.$ac_objext "* | \
7188 *" $ac_func.$ac_objext "* ) ;;
7189 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
7190esac
7191
e490616e
ZW
7192fi
7193done
7194
7195
9ce3f7e5 7196 else
238235ef
DJ
7197
7198for ac_func in _doprnt
9ce3f7e5 7199do
238235ef
DJ
7200as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7201echo "$as_me:$LINENO: checking for $ac_func" >&5
7202echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7203if eval "test \"\${$as_ac_var+set}\" = set"; then
7204 echo $ECHO_N "(cached) $ECHO_C" >&6
7205else
7206 if test x$gcc_no_link = xyes; then
7207 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7208echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7209 { (exit 1); exit 1; }; }
7210fi
7211cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
7212/* confdefs.h. */
7213_ACEOF
7214cat confdefs.h >>conftest.$ac_ext
7215cat >>conftest.$ac_ext <<_ACEOF
7216/* end confdefs.h. */
9ce3f7e5 7217/* System header to define __stub macros and hopefully few prototypes,
238235ef
DJ
7218 which can conflict with char $ac_func (); below.
7219 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
7220 <limits.h> exists even on freestanding compilers. Under hpux,
7221 including <limits.h> includes <sys/time.h> and causes problems
7222 checking for functions defined therein. */
7223#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
7224# include <limits.h>
7225#else
7226# include <assert.h>
7227#endif
9ce3f7e5 7228/* Override any gcc2 internal prototype to avoid an error. */
238235ef
DJ
7229#ifdef __cplusplus
7230extern "C"
7231{
7232#endif
9ce3f7e5 7233/* We use char because int might match the return type of a gcc2
238235ef
DJ
7234 builtin and then its argument prototype would still apply. */
7235char $ac_func ();
9ce3f7e5
DD
7236/* The GNU C library defines this for functions which it implements
7237 to always fail with ENOSYS. Some functions are actually named
7238 something starting with __ and the normal name is an alias. */
7239#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7240choke me
7241#else
238235ef
DJ
7242char (*f) () = $ac_func;
7243#endif
7244#ifdef __cplusplus
7245}
9ce3f7e5
DD
7246#endif
7247
238235ef
DJ
7248int
7249main ()
7250{
7251return f != $ac_func;
7252 ;
7253 return 0;
7254}
7255_ACEOF
7256rm -f conftest.$ac_objext conftest$ac_exeext
7257if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 7258 (eval $ac_link) 2>conftest.er1
238235ef 7259 ac_status=$?
3beb1315
HPN
7260 grep -v '^ *+' conftest.er1 >conftest.err
7261 rm -f conftest.er1
7262 cat conftest.err >&5
238235ef
DJ
7263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7264 (exit $ac_status); } &&
e8f9ec35
GDR
7265 { ac_try='test -z "$ac_c_werror_flag"
7266 || test ! -s conftest.err'
3beb1315
HPN
7267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7268 (eval $ac_try) 2>&5
7269 ac_status=$?
7270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7271 (exit $ac_status); }; } &&
7272 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
7273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7274 (eval $ac_try) 2>&5
7275 ac_status=$?
7276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7277 (exit $ac_status); }; }; then
7278 eval "$as_ac_var=yes"
7279else
7280 echo "$as_me: failed program was:" >&5
7281sed 's/^/| /' conftest.$ac_ext >&5
7282
7283eval "$as_ac_var=no"
7284fi
3beb1315
HPN
7285rm -f conftest.err conftest.$ac_objext \
7286 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
7287fi
7288echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7289echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7290if test `eval echo '${'$as_ac_var'}'` = yes; then
7291 cat >>confdefs.h <<_ACEOF
7292#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7293_ACEOF
9ce3f7e5 7294
9ce3f7e5
DD
7295fi
7296done
7297
e490616e
ZW
7298 fi
7299
0bc0cd11 7300 for v in $vars; do
238235ef
DJ
7301 echo "$as_me:$LINENO: checking for $v" >&5
7302echo $ECHO_N "checking for $v... $ECHO_C" >&6
7303 if eval "test \"\${libiberty_cv_var_$v+set}\" = set"; then
7304 echo $ECHO_N "(cached) $ECHO_C" >&6
7305else
7306 if test x$gcc_no_link = xyes; then
7307 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7308echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7309 { (exit 1); exit 1; }; }
7310fi
7311cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
7312/* confdefs.h. */
7313_ACEOF
7314cat confdefs.h >>conftest.$ac_ext
7315cat >>conftest.$ac_ext <<_ACEOF
7316/* end confdefs.h. */
0bc0cd11 7317int *p;
238235ef
DJ
7318int
7319main ()
7320{
9f3dbd92 7321extern int $v []; p = $v;
238235ef
DJ
7322 ;
7323 return 0;
7324}
7325_ACEOF
7326rm -f conftest.$ac_objext conftest$ac_exeext
7327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 7328 (eval $ac_link) 2>conftest.er1
238235ef 7329 ac_status=$?
3beb1315
HPN
7330 grep -v '^ *+' conftest.er1 >conftest.err
7331 rm -f conftest.er1
7332 cat conftest.err >&5
238235ef
DJ
7333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7334 (exit $ac_status); } &&
e8f9ec35
GDR
7335 { ac_try='test -z "$ac_c_werror_flag"
7336 || test ! -s conftest.err'
3beb1315
HPN
7337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7338 (eval $ac_try) 2>&5
7339 ac_status=$?
7340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7341 (exit $ac_status); }; } &&
7342 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
7343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7344 (eval $ac_try) 2>&5
7345 ac_status=$?
7346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7347 (exit $ac_status); }; }; then
0bc0cd11
JL
7348 eval "libiberty_cv_var_$v=yes"
7349else
238235ef
DJ
7350 echo "$as_me: failed program was:" >&5
7351sed 's/^/| /' conftest.$ac_ext >&5
7352
7353eval "libiberty_cv_var_$v=no"
0bc0cd11 7354fi
3beb1315
HPN
7355rm -f conftest.err conftest.$ac_objext \
7356 conftest$ac_exeext conftest.$ac_ext
0bc0cd11
JL
7357fi
7358
7359 if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
238235ef
DJ
7360 echo "$as_me:$LINENO: result: yes" >&5
7361echo "${ECHO_T}yes" >&6
0bc0cd11 7362 n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
238235ef 7363 cat >>confdefs.h <<_ACEOF
0bc0cd11 7364#define $n 1
238235ef 7365_ACEOF
0bc0cd11
JL
7366
7367 else
238235ef
DJ
7368 echo "$as_me:$LINENO: result: no" >&5
7369echo "${ECHO_T}no" >&6
0bc0cd11
JL
7370 fi
7371 done
aa9dc53d
ACY
7372
7373 # special check for _system_configuration because AIX <4.3.2 do not
7374 # contain the `physmem' member.
238235ef
DJ
7375 echo "$as_me:$LINENO: checking for external symbol _system_configuration" >&5
7376echo $ECHO_N "checking for external symbol _system_configuration... $ECHO_C" >&6
7377 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
7378/* confdefs.h. */
7379_ACEOF
7380cat confdefs.h >>conftest.$ac_ext
7381cat >>conftest.$ac_ext <<_ACEOF
7382/* end confdefs.h. */
aa9dc53d 7383#include <sys/systemcfg.h>
238235ef
DJ
7384int
7385main ()
7386{
aa9dc53d 7387double x = _system_configuration.physmem;
238235ef
DJ
7388 ;
7389 return 0;
7390}
7391_ACEOF
7392rm -f conftest.$ac_objext
7393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 7394 (eval $ac_compile) 2>conftest.er1
238235ef 7395 ac_status=$?
3beb1315
HPN
7396 grep -v '^ *+' conftest.er1 >conftest.err
7397 rm -f conftest.er1
7398 cat conftest.err >&5
238235ef
DJ
7399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7400 (exit $ac_status); } &&
e8f9ec35
GDR
7401 { ac_try='test -z "$ac_c_werror_flag"
7402 || test ! -s conftest.err'
3beb1315
HPN
7403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7404 (eval $ac_try) 2>&5
7405 ac_status=$?
7406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7407 (exit $ac_status); }; } &&
7408 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
7409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7410 (eval $ac_try) 2>&5
7411 ac_status=$?
7412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7413 (exit $ac_status); }; }; then
7414 echo "$as_me:$LINENO: result: yes" >&5
7415echo "${ECHO_T}yes" >&6
7416
7417cat >>confdefs.h <<\_ACEOF
aa9dc53d 7418#define HAVE__SYSTEM_CONFIGURATION 1
238235ef 7419_ACEOF
aa9dc53d
ACY
7420
7421else
238235ef
DJ
7422 echo "$as_me: failed program was:" >&5
7423sed 's/^/| /' conftest.$ac_ext >&5
7424
7425echo "$as_me:$LINENO: result: no" >&5
7426echo "${ECHO_T}no" >&6
aa9dc53d 7427fi
3beb1315 7428rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef 7429
aa9dc53d 7430
238235ef 7431for ac_func in $checkfuncs
0bc0cd11 7432do
238235ef
DJ
7433as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7434echo "$as_me:$LINENO: checking for $ac_func" >&5
7435echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7436if eval "test \"\${$as_ac_var+set}\" = set"; then
7437 echo $ECHO_N "(cached) $ECHO_C" >&6
7438else
7439 if test x$gcc_no_link = xyes; then
7440 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
7441echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
7442 { (exit 1); exit 1; }; }
7443fi
7444cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
7445/* confdefs.h. */
7446_ACEOF
7447cat confdefs.h >>conftest.$ac_ext
7448cat >>conftest.$ac_ext <<_ACEOF
7449/* end confdefs.h. */
0bc0cd11 7450/* System header to define __stub macros and hopefully few prototypes,
238235ef
DJ
7451 which can conflict with char $ac_func (); below.
7452 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
7453 <limits.h> exists even on freestanding compilers. Under hpux,
7454 including <limits.h> includes <sys/time.h> and causes problems
7455 checking for functions defined therein. */
7456#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
7457# include <limits.h>
7458#else
7459# include <assert.h>
7460#endif
0bc0cd11 7461/* Override any gcc2 internal prototype to avoid an error. */
238235ef
DJ
7462#ifdef __cplusplus
7463extern "C"
7464{
7465#endif
0bc0cd11 7466/* We use char because int might match the return type of a gcc2
238235ef
DJ
7467 builtin and then its argument prototype would still apply. */
7468char $ac_func ();
0bc0cd11
JL
7469/* The GNU C library defines this for functions which it implements
7470 to always fail with ENOSYS. Some functions are actually named
7471 something starting with __ and the normal name is an alias. */
7472#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7473choke me
7474#else
238235ef
DJ
7475char (*f) () = $ac_func;
7476#endif
7477#ifdef __cplusplus
7478}
0bc0cd11
JL
7479#endif
7480
238235ef
DJ
7481int
7482main ()
7483{
7484return f != $ac_func;
7485 ;
7486 return 0;
7487}
7488_ACEOF
7489rm -f conftest.$ac_objext conftest$ac_exeext
7490if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 7491 (eval $ac_link) 2>conftest.er1
238235ef 7492 ac_status=$?
3beb1315
HPN
7493 grep -v '^ *+' conftest.er1 >conftest.err
7494 rm -f conftest.er1
7495 cat conftest.err >&5
238235ef
DJ
7496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7497 (exit $ac_status); } &&
e8f9ec35
GDR
7498 { ac_try='test -z "$ac_c_werror_flag"
7499 || test ! -s conftest.err'
3beb1315
HPN
7500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7501 (eval $ac_try) 2>&5
7502 ac_status=$?
7503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7504 (exit $ac_status); }; } &&
7505 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
7506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7507 (eval $ac_try) 2>&5
7508 ac_status=$?
7509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7510 (exit $ac_status); }; }; then
7511 eval "$as_ac_var=yes"
7512else
7513 echo "$as_me: failed program was:" >&5
7514sed 's/^/| /' conftest.$ac_ext >&5
7515
7516eval "$as_ac_var=no"
7517fi
3beb1315
HPN
7518rm -f conftest.err conftest.$ac_objext \
7519 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
7520fi
7521echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7522echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7523if test `eval echo '${'$as_ac_var'}'` = yes; then
7524 cat >>confdefs.h <<_ACEOF
7525#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7526_ACEOF
0bc0cd11 7527
0bc0cd11
JL
7528fi
7529done
7530
3c60ae5a
GDR
7531 echo "$as_me:$LINENO: checking whether basename is declared" >&5
7532echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6
7533if test "${ac_cv_have_decl_basename+set}" = set; then
7534 echo $ECHO_N "(cached) $ECHO_C" >&6
7535else
7536 cat >conftest.$ac_ext <<_ACEOF
7537/* confdefs.h. */
7538_ACEOF
7539cat confdefs.h >>conftest.$ac_ext
7540cat >>conftest.$ac_ext <<_ACEOF
7541/* end confdefs.h. */
7542$ac_includes_default
7543int
7544main ()
7545{
7546#ifndef basename
7547 char *p = (char *) basename;
7548#endif
7549
7550 ;
7551 return 0;
7552}
7553_ACEOF
7554rm -f conftest.$ac_objext
7555if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7556 (eval $ac_compile) 2>conftest.er1
7557 ac_status=$?
7558 grep -v '^ *+' conftest.er1 >conftest.err
7559 rm -f conftest.er1
7560 cat conftest.err >&5
7561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7562 (exit $ac_status); } &&
e8f9ec35
GDR
7563 { ac_try='test -z "$ac_c_werror_flag"
7564 || test ! -s conftest.err'
3c60ae5a
GDR
7565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7566 (eval $ac_try) 2>&5
7567 ac_status=$?
7568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7569 (exit $ac_status); }; } &&
7570 { ac_try='test -s conftest.$ac_objext'
7571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7572 (eval $ac_try) 2>&5
7573 ac_status=$?
7574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7575 (exit $ac_status); }; }; then
7576 ac_cv_have_decl_basename=yes
7577else
7578 echo "$as_me: failed program was:" >&5
7579sed 's/^/| /' conftest.$ac_ext >&5
7580
7581ac_cv_have_decl_basename=no
7582fi
7583rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7584fi
7585echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5
7586echo "${ECHO_T}$ac_cv_have_decl_basename" >&6
7587if test $ac_cv_have_decl_basename = yes; then
7588
7589cat >>confdefs.h <<_ACEOF
7590#define HAVE_DECL_BASENAME 1
7591_ACEOF
7592
7593
7594else
7595 cat >>confdefs.h <<_ACEOF
7596#define HAVE_DECL_BASENAME 0
7597_ACEOF
7598
7599
7600fi
7601echo "$as_me:$LINENO: checking whether ffs is declared" >&5
7602echo $ECHO_N "checking whether ffs is declared... $ECHO_C" >&6
7603if test "${ac_cv_have_decl_ffs+set}" = set; then
7604 echo $ECHO_N "(cached) $ECHO_C" >&6
7605else
7606 cat >conftest.$ac_ext <<_ACEOF
7607/* confdefs.h. */
7608_ACEOF
7609cat confdefs.h >>conftest.$ac_ext
7610cat >>conftest.$ac_ext <<_ACEOF
7611/* end confdefs.h. */
7612$ac_includes_default
7613int
7614main ()
7615{
7616#ifndef ffs
7617 char *p = (char *) ffs;
7618#endif
7619
7620 ;
7621 return 0;
7622}
7623_ACEOF
7624rm -f conftest.$ac_objext
7625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7626 (eval $ac_compile) 2>conftest.er1
7627 ac_status=$?
7628 grep -v '^ *+' conftest.er1 >conftest.err
7629 rm -f conftest.er1
7630 cat conftest.err >&5
7631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632 (exit $ac_status); } &&
e8f9ec35
GDR
7633 { ac_try='test -z "$ac_c_werror_flag"
7634 || test ! -s conftest.err'
3c60ae5a
GDR
7635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7636 (eval $ac_try) 2>&5
7637 ac_status=$?
7638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7639 (exit $ac_status); }; } &&
7640 { ac_try='test -s conftest.$ac_objext'
7641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7642 (eval $ac_try) 2>&5
7643 ac_status=$?
7644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7645 (exit $ac_status); }; }; then
7646 ac_cv_have_decl_ffs=yes
7647else
7648 echo "$as_me: failed program was:" >&5
7649sed 's/^/| /' conftest.$ac_ext >&5
7650
7651ac_cv_have_decl_ffs=no
7652fi
7653rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7654fi
7655echo "$as_me:$LINENO: result: $ac_cv_have_decl_ffs" >&5
7656echo "${ECHO_T}$ac_cv_have_decl_ffs" >&6
7657if test $ac_cv_have_decl_ffs = yes; then
7658
7659cat >>confdefs.h <<_ACEOF
7660#define HAVE_DECL_FFS 1
7661_ACEOF
7662
7663
7664else
7665 cat >>confdefs.h <<_ACEOF
7666#define HAVE_DECL_FFS 0
7667_ACEOF
7668
7669
7670fi
7671echo "$as_me:$LINENO: checking whether asprintf is declared" >&5
7672echo $ECHO_N "checking whether asprintf is declared... $ECHO_C" >&6
7673if test "${ac_cv_have_decl_asprintf+set}" = set; then
7674 echo $ECHO_N "(cached) $ECHO_C" >&6
7675else
7676 cat >conftest.$ac_ext <<_ACEOF
7677/* confdefs.h. */
7678_ACEOF
7679cat confdefs.h >>conftest.$ac_ext
7680cat >>conftest.$ac_ext <<_ACEOF
7681/* end confdefs.h. */
7682$ac_includes_default
7683int
7684main ()
7685{
7686#ifndef asprintf
7687 char *p = (char *) asprintf;
7688#endif
7689
7690 ;
7691 return 0;
7692}
7693_ACEOF
7694rm -f conftest.$ac_objext
7695if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7696 (eval $ac_compile) 2>conftest.er1
7697 ac_status=$?
7698 grep -v '^ *+' conftest.er1 >conftest.err
7699 rm -f conftest.er1
7700 cat conftest.err >&5
7701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7702 (exit $ac_status); } &&
e8f9ec35
GDR
7703 { ac_try='test -z "$ac_c_werror_flag"
7704 || test ! -s conftest.err'
3c60ae5a
GDR
7705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7706 (eval $ac_try) 2>&5
7707 ac_status=$?
7708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7709 (exit $ac_status); }; } &&
7710 { ac_try='test -s conftest.$ac_objext'
7711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7712 (eval $ac_try) 2>&5
7713 ac_status=$?
7714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7715 (exit $ac_status); }; }; then
7716 ac_cv_have_decl_asprintf=yes
7717else
7718 echo "$as_me: failed program was:" >&5
7719sed 's/^/| /' conftest.$ac_ext >&5
7720
7721ac_cv_have_decl_asprintf=no
7722fi
7723rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7724fi
7725echo "$as_me:$LINENO: result: $ac_cv_have_decl_asprintf" >&5
7726echo "${ECHO_T}$ac_cv_have_decl_asprintf" >&6
7727if test $ac_cv_have_decl_asprintf = yes; then
7728
7729cat >>confdefs.h <<_ACEOF
7730#define HAVE_DECL_ASPRINTF 1
7731_ACEOF
7732
7733
7734else
7735 cat >>confdefs.h <<_ACEOF
7736#define HAVE_DECL_ASPRINTF 0
7737_ACEOF
7738
7739
7740fi
7741echo "$as_me:$LINENO: checking whether vasprintf is declared" >&5
7742echo $ECHO_N "checking whether vasprintf is declared... $ECHO_C" >&6
7743if test "${ac_cv_have_decl_vasprintf+set}" = set; then
7744 echo $ECHO_N "(cached) $ECHO_C" >&6
7745else
7746 cat >conftest.$ac_ext <<_ACEOF
7747/* confdefs.h. */
7748_ACEOF
7749cat confdefs.h >>conftest.$ac_ext
7750cat >>conftest.$ac_ext <<_ACEOF
7751/* end confdefs.h. */
7752$ac_includes_default
7753int
7754main ()
7755{
7756#ifndef vasprintf
7757 char *p = (char *) vasprintf;
7758#endif
7759
7760 ;
7761 return 0;
7762}
7763_ACEOF
7764rm -f conftest.$ac_objext
7765if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7766 (eval $ac_compile) 2>conftest.er1
7767 ac_status=$?
7768 grep -v '^ *+' conftest.er1 >conftest.err
7769 rm -f conftest.er1
7770 cat conftest.err >&5
7771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7772 (exit $ac_status); } &&
e8f9ec35
GDR
7773 { ac_try='test -z "$ac_c_werror_flag"
7774 || test ! -s conftest.err'
3c60ae5a
GDR
7775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7776 (eval $ac_try) 2>&5
7777 ac_status=$?
7778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7779 (exit $ac_status); }; } &&
7780 { ac_try='test -s conftest.$ac_objext'
7781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7782 (eval $ac_try) 2>&5
7783 ac_status=$?
7784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7785 (exit $ac_status); }; }; then
7786 ac_cv_have_decl_vasprintf=yes
7787else
7788 echo "$as_me: failed program was:" >&5
7789sed 's/^/| /' conftest.$ac_ext >&5
7790
7791ac_cv_have_decl_vasprintf=no
7792fi
7793rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7794fi
7795echo "$as_me:$LINENO: result: $ac_cv_have_decl_vasprintf" >&5
7796echo "${ECHO_T}$ac_cv_have_decl_vasprintf" >&6
7797if test $ac_cv_have_decl_vasprintf = yes; then
7798
7799cat >>confdefs.h <<_ACEOF
7800#define HAVE_DECL_VASPRINTF 1
7801_ACEOF
7802
7803
7804else
7805 cat >>confdefs.h <<_ACEOF
7806#define HAVE_DECL_VASPRINTF 0
7807_ACEOF
7808
7809
ddcf783b
EZ
7810fi
7811echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
7812echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
7813if test "${ac_cv_have_decl_snprintf+set}" = set; then
7814 echo $ECHO_N "(cached) $ECHO_C" >&6
7815else
7816 cat >conftest.$ac_ext <<_ACEOF
7817/* confdefs.h. */
7818_ACEOF
7819cat confdefs.h >>conftest.$ac_ext
7820cat >>conftest.$ac_ext <<_ACEOF
7821/* end confdefs.h. */
7822$ac_includes_default
7823int
7824main ()
7825{
7826#ifndef snprintf
7827 char *p = (char *) snprintf;
7828#endif
7829
7830 ;
7831 return 0;
7832}
7833_ACEOF
7834rm -f conftest.$ac_objext
7835if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7836 (eval $ac_compile) 2>conftest.er1
7837 ac_status=$?
7838 grep -v '^ *+' conftest.er1 >conftest.err
7839 rm -f conftest.er1
7840 cat conftest.err >&5
7841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7842 (exit $ac_status); } &&
e8f9ec35
GDR
7843 { ac_try='test -z "$ac_c_werror_flag"
7844 || test ! -s conftest.err'
ddcf783b
EZ
7845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7846 (eval $ac_try) 2>&5
7847 ac_status=$?
7848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7849 (exit $ac_status); }; } &&
7850 { ac_try='test -s conftest.$ac_objext'
7851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7852 (eval $ac_try) 2>&5
7853 ac_status=$?
7854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7855 (exit $ac_status); }; }; then
7856 ac_cv_have_decl_snprintf=yes
7857else
7858 echo "$as_me: failed program was:" >&5
7859sed 's/^/| /' conftest.$ac_ext >&5
7860
7861ac_cv_have_decl_snprintf=no
7862fi
7863rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7864fi
7865echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
7866echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
7867if test $ac_cv_have_decl_snprintf = yes; then
7868
7869cat >>confdefs.h <<_ACEOF
7870#define HAVE_DECL_SNPRINTF 1
7871_ACEOF
7872
7873
7874else
7875 cat >>confdefs.h <<_ACEOF
7876#define HAVE_DECL_SNPRINTF 0
7877_ACEOF
7878
7879
7880fi
7881echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
7882echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
7883if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
7884 echo $ECHO_N "(cached) $ECHO_C" >&6
7885else
7886 cat >conftest.$ac_ext <<_ACEOF
7887/* confdefs.h. */
7888_ACEOF
7889cat confdefs.h >>conftest.$ac_ext
7890cat >>conftest.$ac_ext <<_ACEOF
7891/* end confdefs.h. */
7892$ac_includes_default
7893int
7894main ()
7895{
7896#ifndef vsnprintf
7897 char *p = (char *) vsnprintf;
7898#endif
7899
7900 ;
7901 return 0;
7902}
7903_ACEOF
7904rm -f conftest.$ac_objext
7905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7906 (eval $ac_compile) 2>conftest.er1
7907 ac_status=$?
7908 grep -v '^ *+' conftest.er1 >conftest.err
7909 rm -f conftest.er1
7910 cat conftest.err >&5
7911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7912 (exit $ac_status); } &&
e8f9ec35
GDR
7913 { ac_try='test -z "$ac_c_werror_flag"
7914 || test ! -s conftest.err'
ddcf783b
EZ
7915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7916 (eval $ac_try) 2>&5
7917 ac_status=$?
7918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7919 (exit $ac_status); }; } &&
7920 { ac_try='test -s conftest.$ac_objext'
7921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7922 (eval $ac_try) 2>&5
7923 ac_status=$?
7924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7925 (exit $ac_status); }; }; then
7926 ac_cv_have_decl_vsnprintf=yes
7927else
7928 echo "$as_me: failed program was:" >&5
7929sed 's/^/| /' conftest.$ac_ext >&5
7930
7931ac_cv_have_decl_vsnprintf=no
7932fi
7933rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7934fi
7935echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
7936echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
7937if test $ac_cv_have_decl_vsnprintf = yes; then
7938
7939cat >>confdefs.h <<_ACEOF
7940#define HAVE_DECL_VSNPRINTF 1
7941_ACEOF
7942
7943
7944else
7945 cat >>confdefs.h <<_ACEOF
7946#define HAVE_DECL_VSNPRINTF 0
7947_ACEOF
7948
7949
d7cf8390
GDR
7950fi
7951
7952
7953 echo "$as_me:$LINENO: checking whether calloc is declared" >&5
7954echo $ECHO_N "checking whether calloc is declared... $ECHO_C" >&6
7955if test "${ac_cv_have_decl_calloc+set}" = set; then
7956 echo $ECHO_N "(cached) $ECHO_C" >&6
7957else
7958 cat >conftest.$ac_ext <<_ACEOF
7959/* confdefs.h. */
7960_ACEOF
7961cat confdefs.h >>conftest.$ac_ext
7962cat >>conftest.$ac_ext <<_ACEOF
7963/* end confdefs.h. */
7964$ac_includes_default
7965int
7966main ()
7967{
7968#ifndef calloc
7969 char *p = (char *) calloc;
7970#endif
7971
7972 ;
7973 return 0;
7974}
7975_ACEOF
7976rm -f conftest.$ac_objext
7977if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7978 (eval $ac_compile) 2>conftest.er1
7979 ac_status=$?
7980 grep -v '^ *+' conftest.er1 >conftest.err
7981 rm -f conftest.er1
7982 cat conftest.err >&5
7983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7984 (exit $ac_status); } &&
e8f9ec35
GDR
7985 { ac_try='test -z "$ac_c_werror_flag"
7986 || test ! -s conftest.err'
d7cf8390
GDR
7987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7988 (eval $ac_try) 2>&5
7989 ac_status=$?
7990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7991 (exit $ac_status); }; } &&
7992 { ac_try='test -s conftest.$ac_objext'
7993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7994 (eval $ac_try) 2>&5
7995 ac_status=$?
7996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7997 (exit $ac_status); }; }; then
7998 ac_cv_have_decl_calloc=yes
7999else
8000 echo "$as_me: failed program was:" >&5
8001sed 's/^/| /' conftest.$ac_ext >&5
8002
8003ac_cv_have_decl_calloc=no
8004fi
8005rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8006fi
8007echo "$as_me:$LINENO: result: $ac_cv_have_decl_calloc" >&5
8008echo "${ECHO_T}$ac_cv_have_decl_calloc" >&6
8009if test $ac_cv_have_decl_calloc = yes; then
8010
8011cat >>confdefs.h <<_ACEOF
8012#define HAVE_DECL_CALLOC 1
8013_ACEOF
8014
8015
8016else
8017 cat >>confdefs.h <<_ACEOF
8018#define HAVE_DECL_CALLOC 0
8019_ACEOF
8020
8021
8022fi
8023echo "$as_me:$LINENO: checking whether getenv is declared" >&5
8024echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
8025if test "${ac_cv_have_decl_getenv+set}" = set; then
8026 echo $ECHO_N "(cached) $ECHO_C" >&6
8027else
8028 cat >conftest.$ac_ext <<_ACEOF
8029/* confdefs.h. */
8030_ACEOF
8031cat confdefs.h >>conftest.$ac_ext
8032cat >>conftest.$ac_ext <<_ACEOF
8033/* end confdefs.h. */
8034$ac_includes_default
8035int
8036main ()
8037{
8038#ifndef getenv
8039 char *p = (char *) getenv;
8040#endif
8041
8042 ;
8043 return 0;
8044}
8045_ACEOF
8046rm -f conftest.$ac_objext
8047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8048 (eval $ac_compile) 2>conftest.er1
8049 ac_status=$?
8050 grep -v '^ *+' conftest.er1 >conftest.err
8051 rm -f conftest.er1
8052 cat conftest.err >&5
8053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8054 (exit $ac_status); } &&
e8f9ec35
GDR
8055 { ac_try='test -z "$ac_c_werror_flag"
8056 || test ! -s conftest.err'
d7cf8390
GDR
8057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8058 (eval $ac_try) 2>&5
8059 ac_status=$?
8060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8061 (exit $ac_status); }; } &&
8062 { ac_try='test -s conftest.$ac_objext'
8063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8064 (eval $ac_try) 2>&5
8065 ac_status=$?
8066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8067 (exit $ac_status); }; }; then
8068 ac_cv_have_decl_getenv=yes
8069else
8070 echo "$as_me: failed program was:" >&5
8071sed 's/^/| /' conftest.$ac_ext >&5
8072
8073ac_cv_have_decl_getenv=no
8074fi
8075rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8076fi
8077echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
8078echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
8079if test $ac_cv_have_decl_getenv = yes; then
8080
8081cat >>confdefs.h <<_ACEOF
8082#define HAVE_DECL_GETENV 1
8083_ACEOF
8084
8085
8086else
8087 cat >>confdefs.h <<_ACEOF
8088#define HAVE_DECL_GETENV 0
8089_ACEOF
8090
8091
8b82b724
BE
8092fi
8093echo "$as_me:$LINENO: checking whether getopt is declared" >&5
8094echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6
8095if test "${ac_cv_have_decl_getopt+set}" = set; then
8096 echo $ECHO_N "(cached) $ECHO_C" >&6
8097else
8098 cat >conftest.$ac_ext <<_ACEOF
8099/* confdefs.h. */
8100_ACEOF
8101cat confdefs.h >>conftest.$ac_ext
8102cat >>conftest.$ac_ext <<_ACEOF
8103/* end confdefs.h. */
8104$ac_includes_default
8105int
8106main ()
8107{
8108#ifndef getopt
8109 char *p = (char *) getopt;
8110#endif
8111
8112 ;
8113 return 0;
8114}
8115_ACEOF
8116rm -f conftest.$ac_objext
8117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8118 (eval $ac_compile) 2>conftest.er1
8119 ac_status=$?
8120 grep -v '^ *+' conftest.er1 >conftest.err
8121 rm -f conftest.er1
8122 cat conftest.err >&5
8123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8124 (exit $ac_status); } &&
e8f9ec35
GDR
8125 { ac_try='test -z "$ac_c_werror_flag"
8126 || test ! -s conftest.err'
8b82b724
BE
8127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8128 (eval $ac_try) 2>&5
8129 ac_status=$?
8130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8131 (exit $ac_status); }; } &&
8132 { ac_try='test -s conftest.$ac_objext'
8133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8134 (eval $ac_try) 2>&5
8135 ac_status=$?
8136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8137 (exit $ac_status); }; }; then
8138 ac_cv_have_decl_getopt=yes
8139else
8140 echo "$as_me: failed program was:" >&5
8141sed 's/^/| /' conftest.$ac_ext >&5
8142
8143ac_cv_have_decl_getopt=no
8144fi
8145rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8146fi
8147echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5
8148echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6
8149if test $ac_cv_have_decl_getopt = yes; then
8150
8151cat >>confdefs.h <<_ACEOF
8152#define HAVE_DECL_GETOPT 1
8153_ACEOF
8154
8155
8156else
8157 cat >>confdefs.h <<_ACEOF
8158#define HAVE_DECL_GETOPT 0
8159_ACEOF
8160
8161
d7cf8390
GDR
8162fi
8163echo "$as_me:$LINENO: checking whether malloc is declared" >&5
8164echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
8165if test "${ac_cv_have_decl_malloc+set}" = set; then
8166 echo $ECHO_N "(cached) $ECHO_C" >&6
8167else
8168 cat >conftest.$ac_ext <<_ACEOF
8169/* confdefs.h. */
8170_ACEOF
8171cat confdefs.h >>conftest.$ac_ext
8172cat >>conftest.$ac_ext <<_ACEOF
8173/* end confdefs.h. */
8174$ac_includes_default
8175int
8176main ()
8177{
8178#ifndef malloc
8179 char *p = (char *) malloc;
8180#endif
8181
8182 ;
8183 return 0;
8184}
8185_ACEOF
8186rm -f conftest.$ac_objext
8187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8188 (eval $ac_compile) 2>conftest.er1
8189 ac_status=$?
8190 grep -v '^ *+' conftest.er1 >conftest.err
8191 rm -f conftest.er1
8192 cat conftest.err >&5
8193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8194 (exit $ac_status); } &&
e8f9ec35
GDR
8195 { ac_try='test -z "$ac_c_werror_flag"
8196 || test ! -s conftest.err'
d7cf8390
GDR
8197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8198 (eval $ac_try) 2>&5
8199 ac_status=$?
8200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8201 (exit $ac_status); }; } &&
8202 { ac_try='test -s conftest.$ac_objext'
8203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8204 (eval $ac_try) 2>&5
8205 ac_status=$?
8206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8207 (exit $ac_status); }; }; then
8208 ac_cv_have_decl_malloc=yes
8209else
8210 echo "$as_me: failed program was:" >&5
8211sed 's/^/| /' conftest.$ac_ext >&5
8212
8213ac_cv_have_decl_malloc=no
8214fi
8215rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8216fi
8217echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
8218echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
8219if test $ac_cv_have_decl_malloc = yes; then
8220
8221cat >>confdefs.h <<_ACEOF
8222#define HAVE_DECL_MALLOC 1
8223_ACEOF
8224
8225
8226else
8227 cat >>confdefs.h <<_ACEOF
8228#define HAVE_DECL_MALLOC 0
8229_ACEOF
8230
8231
8232fi
8233echo "$as_me:$LINENO: checking whether realloc is declared" >&5
8234echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6
8235if test "${ac_cv_have_decl_realloc+set}" = set; then
8236 echo $ECHO_N "(cached) $ECHO_C" >&6
8237else
8238 cat >conftest.$ac_ext <<_ACEOF
8239/* confdefs.h. */
8240_ACEOF
8241cat confdefs.h >>conftest.$ac_ext
8242cat >>conftest.$ac_ext <<_ACEOF
8243/* end confdefs.h. */
8244$ac_includes_default
8245int
8246main ()
8247{
8248#ifndef realloc
8249 char *p = (char *) realloc;
8250#endif
8251
8252 ;
8253 return 0;
8254}
8255_ACEOF
8256rm -f conftest.$ac_objext
8257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8258 (eval $ac_compile) 2>conftest.er1
8259 ac_status=$?
8260 grep -v '^ *+' conftest.er1 >conftest.err
8261 rm -f conftest.er1
8262 cat conftest.err >&5
8263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8264 (exit $ac_status); } &&
e8f9ec35
GDR
8265 { ac_try='test -z "$ac_c_werror_flag"
8266 || test ! -s conftest.err'
d7cf8390
GDR
8267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8268 (eval $ac_try) 2>&5
8269 ac_status=$?
8270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8271 (exit $ac_status); }; } &&
8272 { ac_try='test -s conftest.$ac_objext'
8273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8274 (eval $ac_try) 2>&5
8275 ac_status=$?
8276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8277 (exit $ac_status); }; }; then
8278 ac_cv_have_decl_realloc=yes
8279else
8280 echo "$as_me: failed program was:" >&5
8281sed 's/^/| /' conftest.$ac_ext >&5
8282
8283ac_cv_have_decl_realloc=no
8284fi
8285rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8286fi
8287echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5
8288echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6
8289if test $ac_cv_have_decl_realloc = yes; then
8290
8291cat >>confdefs.h <<_ACEOF
8292#define HAVE_DECL_REALLOC 1
8293_ACEOF
8294
8295
8296else
8297 cat >>confdefs.h <<_ACEOF
8298#define HAVE_DECL_REALLOC 0
8299_ACEOF
8300
8301
8302fi
8303echo "$as_me:$LINENO: checking whether sbrk is declared" >&5
8304echo $ECHO_N "checking whether sbrk is declared... $ECHO_C" >&6
8305if test "${ac_cv_have_decl_sbrk+set}" = set; then
8306 echo $ECHO_N "(cached) $ECHO_C" >&6
8307else
8308 cat >conftest.$ac_ext <<_ACEOF
8309/* confdefs.h. */
8310_ACEOF
8311cat confdefs.h >>conftest.$ac_ext
8312cat >>conftest.$ac_ext <<_ACEOF
8313/* end confdefs.h. */
8314$ac_includes_default
8315int
8316main ()
8317{
8318#ifndef sbrk
8319 char *p = (char *) sbrk;
8320#endif
8321
8322 ;
8323 return 0;
8324}
8325_ACEOF
8326rm -f conftest.$ac_objext
8327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8328 (eval $ac_compile) 2>conftest.er1
8329 ac_status=$?
8330 grep -v '^ *+' conftest.er1 >conftest.err
8331 rm -f conftest.er1
8332 cat conftest.err >&5
8333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8334 (exit $ac_status); } &&
e8f9ec35
GDR
8335 { ac_try='test -z "$ac_c_werror_flag"
8336 || test ! -s conftest.err'
d7cf8390
GDR
8337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8338 (eval $ac_try) 2>&5
8339 ac_status=$?
8340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8341 (exit $ac_status); }; } &&
8342 { ac_try='test -s conftest.$ac_objext'
8343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8344 (eval $ac_try) 2>&5
8345 ac_status=$?
8346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8347 (exit $ac_status); }; }; then
8348 ac_cv_have_decl_sbrk=yes
8349else
8350 echo "$as_me: failed program was:" >&5
8351sed 's/^/| /' conftest.$ac_ext >&5
8352
8353ac_cv_have_decl_sbrk=no
8354fi
8355rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8356fi
8357echo "$as_me:$LINENO: result: $ac_cv_have_decl_sbrk" >&5
8358echo "${ECHO_T}$ac_cv_have_decl_sbrk" >&6
8359if test $ac_cv_have_decl_sbrk = yes; then
8360
8361cat >>confdefs.h <<_ACEOF
8362#define HAVE_DECL_SBRK 1
8363_ACEOF
8364
8365
8366else
8367 cat >>confdefs.h <<_ACEOF
8368#define HAVE_DECL_SBRK 0
8369_ACEOF
8370
8371
83fbfe42
GK
8372fi
8373
8374
8375 echo "$as_me:$LINENO: checking whether strverscmp is declared" >&5
8376echo $ECHO_N "checking whether strverscmp is declared... $ECHO_C" >&6
8377if test "${ac_cv_have_decl_strverscmp+set}" = set; then
8378 echo $ECHO_N "(cached) $ECHO_C" >&6
8379else
8380 cat >conftest.$ac_ext <<_ACEOF
8381/* confdefs.h. */
8382_ACEOF
8383cat confdefs.h >>conftest.$ac_ext
8384cat >>conftest.$ac_ext <<_ACEOF
8385/* end confdefs.h. */
8386$ac_includes_default
8387int
8388main ()
8389{
8390#ifndef strverscmp
8391 char *p = (char *) strverscmp;
8392#endif
8393
8394 ;
8395 return 0;
8396}
8397_ACEOF
8398rm -f conftest.$ac_objext
8399if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8400 (eval $ac_compile) 2>conftest.er1
8401 ac_status=$?
8402 grep -v '^ *+' conftest.er1 >conftest.err
8403 rm -f conftest.er1
8404 cat conftest.err >&5
8405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8406 (exit $ac_status); } &&
e8f9ec35
GDR
8407 { ac_try='test -z "$ac_c_werror_flag"
8408 || test ! -s conftest.err'
83fbfe42
GK
8409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8410 (eval $ac_try) 2>&5
8411 ac_status=$?
8412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8413 (exit $ac_status); }; } &&
8414 { ac_try='test -s conftest.$ac_objext'
8415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8416 (eval $ac_try) 2>&5
8417 ac_status=$?
8418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8419 (exit $ac_status); }; }; then
8420 ac_cv_have_decl_strverscmp=yes
8421else
8422 echo "$as_me: failed program was:" >&5
8423sed 's/^/| /' conftest.$ac_ext >&5
8424
8425ac_cv_have_decl_strverscmp=no
8426fi
8427rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8428fi
8429echo "$as_me:$LINENO: result: $ac_cv_have_decl_strverscmp" >&5
8430echo "${ECHO_T}$ac_cv_have_decl_strverscmp" >&6
8431if test $ac_cv_have_decl_strverscmp = yes; then
8432
8433cat >>confdefs.h <<_ACEOF
8434#define HAVE_DECL_STRVERSCMP 1
8435_ACEOF
8436
8437
8438else
8439 cat >>confdefs.h <<_ACEOF
8440#define HAVE_DECL_STRVERSCMP 0
8441_ACEOF
8442
8443
3c60ae5a
GDR
8444fi
8445
8446
238235ef
DJ
8447 echo "$as_me:$LINENO: checking whether canonicalize_file_name must be declared" >&5
8448echo $ECHO_N "checking whether canonicalize_file_name must be declared... $ECHO_C" >&6
8449if test "${libiberty_cv_decl_needed_canonicalize_file_name+set}" = set; then
8450 echo $ECHO_N "(cached) $ECHO_C" >&6
4876b2b4 8451else
238235ef 8452 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
8453/* confdefs.h. */
8454_ACEOF
8455cat confdefs.h >>conftest.$ac_ext
8456cat >>conftest.$ac_ext <<_ACEOF
8457/* end confdefs.h. */
4876b2b4
DJ
8458
8459#include "confdefs.h"
8460#include <stdio.h>
8461#ifdef HAVE_STRING_H
8462#include <string.h>
8463#else
8464#ifdef HAVE_STRINGS_H
8465#include <strings.h>
8466#endif
8467#endif
8468#ifdef HAVE_STDLIB_H
8469#include <stdlib.h>
8470#endif
8471#ifdef HAVE_UNISTD_H
8472#include <unistd.h>
8473#endif
238235ef
DJ
8474int
8475main ()
8476{
4876b2b4 8477char *(*pfn) = (char *(*)) canonicalize_file_name
238235ef
DJ
8478 ;
8479 return 0;
8480}
8481_ACEOF
8482rm -f conftest.$ac_objext
8483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 8484 (eval $ac_compile) 2>conftest.er1
238235ef 8485 ac_status=$?
3beb1315
HPN
8486 grep -v '^ *+' conftest.er1 >conftest.err
8487 rm -f conftest.er1
8488 cat conftest.err >&5
238235ef
DJ
8489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8490 (exit $ac_status); } &&
e8f9ec35
GDR
8491 { ac_try='test -z "$ac_c_werror_flag"
8492 || test ! -s conftest.err'
3beb1315
HPN
8493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8494 (eval $ac_try) 2>&5
8495 ac_status=$?
8496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8497 (exit $ac_status); }; } &&
8498 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
8499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8500 (eval $ac_try) 2>&5
8501 ac_status=$?
8502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8503 (exit $ac_status); }; }; then
4876b2b4
DJ
8504 libiberty_cv_decl_needed_canonicalize_file_name=no
8505else
238235ef
DJ
8506 echo "$as_me: failed program was:" >&5
8507sed 's/^/| /' conftest.$ac_ext >&5
8508
8509libiberty_cv_decl_needed_canonicalize_file_name=yes
4876b2b4 8510fi
3beb1315 8511rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4876b2b4
DJ
8512fi
8513
238235ef
DJ
8514echo "$as_me:$LINENO: result: $libiberty_cv_decl_needed_canonicalize_file_name" >&5
8515echo "${ECHO_T}$libiberty_cv_decl_needed_canonicalize_file_name" >&6
4876b2b4 8516if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then
238235ef
DJ
8517
8518cat >>confdefs.h <<\_ACEOF
4876b2b4 8519#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
238235ef 8520_ACEOF
4876b2b4
DJ
8521
8522fi
8523
0bc0cd11
JL
8524fi
8525
55d0e5e0
ZW
8526# Figure out which version of pexecute to use.
8527case "${host}" in
24f2cabb
L
8528 *-*-mingw* | *-*-winnt*) pexecute=./pex-win32.o ;;
8529 *-*-msdosdjgpp*) pexecute=./pex-djgpp.o ;;
8530 *-*-msdos*) pexecute=./pex-msdos.o ;;
24f2cabb 8531 *) pexecute=./pex-unix.o ;;
55d0e5e0
ZW
8532esac
8533
8534
238235ef
DJ
8535if test x$gcc_no_link = xyes; then
8536 if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
8537 ac_cv_func_mmap_fixed_mapped=no
8538 fi
8539fi
83fbfe42 8540if test "x${ac_cv_func_mmap_fixed_mapped}" != xno; then
238235ef
DJ
8541
8542
8543for ac_header in stdlib.h unistd.h
a9266bfa 8544do
238235ef 8545as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b033df90 8546echo "$as_me:$LINENO: checking for $ac_header" >&5
238235ef
DJ
8547echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8548if eval "test \"\${$as_ac_Header+set}\" = set"; then
8549 echo $ECHO_N "(cached) $ECHO_C" >&6
238235ef 8550else
b033df90 8551 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
8552/* confdefs.h. */
8553_ACEOF
8554cat confdefs.h >>conftest.$ac_ext
8555cat >>conftest.$ac_ext <<_ACEOF
8556/* end confdefs.h. */
8557#include <$ac_header>
8558_ACEOF
8559if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8560 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8561 ac_status=$?
8562 grep -v '^ *+' conftest.er1 >conftest.err
8563 rm -f conftest.er1
8564 cat conftest.err >&5
8565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8566 (exit $ac_status); } >/dev/null; then
8567 if test -s conftest.err; then
8568 ac_cpp_err=$ac_c_preproc_warn_flag
3beb1315 8569 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
238235ef
DJ
8570 else
8571 ac_cpp_err=
8572 fi
8573else
8574 ac_cpp_err=yes
8575fi
8576if test -z "$ac_cpp_err"; then
b033df90 8577 eval "$as_ac_Header=yes"
238235ef
DJ
8578else
8579 echo "$as_me: failed program was:" >&5
8580sed 's/^/| /' conftest.$ac_ext >&5
8581
b033df90 8582 eval "$as_ac_Header=no"
238235ef
DJ
8583fi
8584rm -f conftest.err conftest.$ac_ext
a9266bfa 8585fi
238235ef
DJ
8586echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8587echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
238235ef
DJ
8588if test `eval echo '${'$as_ac_Header'}'` = yes; then
8589 cat >>confdefs.h <<_ACEOF
8590#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8591_ACEOF
8592
a9266bfa
KG
8593fi
8594done
8595
238235ef 8596
a9266bfa
KG
8597for ac_func in getpagesize
8598do
238235ef
DJ
8599as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8600echo "$as_me:$LINENO: checking for $ac_func" >&5
8601echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8602if eval "test \"\${$as_ac_var+set}\" = set"; then
8603 echo $ECHO_N "(cached) $ECHO_C" >&6
8604else
8605 if test x$gcc_no_link = xyes; then
8606 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
8607echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
8608 { (exit 1); exit 1; }; }
8609fi
8610cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
8611/* confdefs.h. */
8612_ACEOF
8613cat confdefs.h >>conftest.$ac_ext
8614cat >>conftest.$ac_ext <<_ACEOF
8615/* end confdefs.h. */
a9266bfa 8616/* System header to define __stub macros and hopefully few prototypes,
238235ef
DJ
8617 which can conflict with char $ac_func (); below.
8618 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
8619 <limits.h> exists even on freestanding compilers. Under hpux,
8620 including <limits.h> includes <sys/time.h> and causes problems
8621 checking for functions defined therein. */
8622#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
8623# include <limits.h>
8624#else
8625# include <assert.h>
8626#endif
a9266bfa 8627/* Override any gcc2 internal prototype to avoid an error. */
238235ef
DJ
8628#ifdef __cplusplus
8629extern "C"
8630{
8631#endif
a9266bfa 8632/* We use char because int might match the return type of a gcc2
238235ef
DJ
8633 builtin and then its argument prototype would still apply. */
8634char $ac_func ();
a9266bfa
KG
8635/* The GNU C library defines this for functions which it implements
8636 to always fail with ENOSYS. Some functions are actually named
8637 something starting with __ and the normal name is an alias. */
8638#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8639choke me
8640#else
238235ef
DJ
8641char (*f) () = $ac_func;
8642#endif
8643#ifdef __cplusplus
8644}
a9266bfa
KG
8645#endif
8646
238235ef
DJ
8647int
8648main ()
8649{
8650return f != $ac_func;
8651 ;
8652 return 0;
8653}
8654_ACEOF
8655rm -f conftest.$ac_objext conftest$ac_exeext
8656if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 8657 (eval $ac_link) 2>conftest.er1
238235ef 8658 ac_status=$?
3beb1315
HPN
8659 grep -v '^ *+' conftest.er1 >conftest.err
8660 rm -f conftest.er1
8661 cat conftest.err >&5
238235ef
DJ
8662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8663 (exit $ac_status); } &&
e8f9ec35
GDR
8664 { ac_try='test -z "$ac_c_werror_flag"
8665 || test ! -s conftest.err'
3beb1315
HPN
8666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8667 (eval $ac_try) 2>&5
8668 ac_status=$?
8669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8670 (exit $ac_status); }; } &&
8671 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
8672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8673 (eval $ac_try) 2>&5
8674 ac_status=$?
8675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8676 (exit $ac_status); }; }; then
8677 eval "$as_ac_var=yes"
8678else
8679 echo "$as_me: failed program was:" >&5
8680sed 's/^/| /' conftest.$ac_ext >&5
8681
8682eval "$as_ac_var=no"
8683fi
3beb1315
HPN
8684rm -f conftest.err conftest.$ac_objext \
8685 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
8686fi
8687echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8688echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8689if test `eval echo '${'$as_ac_var'}'` = yes; then
8690 cat >>confdefs.h <<_ACEOF
8691#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8692_ACEOF
a9266bfa 8693
a9266bfa
KG
8694fi
8695done
8696
238235ef
DJ
8697echo "$as_me:$LINENO: checking for working mmap" >&5
8698echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8699if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8700 echo $ECHO_N "(cached) $ECHO_C" >&6
a9266bfa
KG
8701else
8702 if test "$cross_compiling" = yes; then
8703 ac_cv_func_mmap_fixed_mapped=no
8704else
238235ef 8705 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
8706/* confdefs.h. */
8707_ACEOF
8708cat confdefs.h >>conftest.$ac_ext
8709cat >>conftest.$ac_ext <<_ACEOF
8710/* end confdefs.h. */
8711$ac_includes_default
8712/* malloc might have been renamed as rpl_malloc. */
8713#undef malloc
a9266bfa
KG
8714
8715/* Thanks to Mike Haertel and Jim Avera for this test.
8716 Here is a matrix of mmap possibilities:
8717 mmap private not fixed
8718 mmap private fixed at somewhere currently unmapped
8719 mmap private fixed at somewhere already mapped
8720 mmap shared not fixed
8721 mmap shared fixed at somewhere currently unmapped
8722 mmap shared fixed at somewhere already mapped
8723 For private mappings, we should verify that changes cannot be read()
8724 back from the file, nor mmap's back from the file at a different
8725 address. (There have been systems where private was not correctly
8726 implemented like the infamous i386 svr4.0, and systems where the
238235ef 8727 VM page cache was not coherent with the file system buffer cache
a9266bfa
KG
8728 like early versions of FreeBSD and possibly contemporary NetBSD.)
8729 For shared mappings, we should conversely verify that changes get
238235ef 8730 propagated back to all the places they're supposed to be.
a9266bfa
KG
8731
8732 Grep wants private fixed already mapped.
8733 The main things grep needs to know about mmap are:
8734 * does it exist and is it safe to write into the mmap'd area
8735 * how to use it (BSD variants) */
238235ef 8736
a9266bfa
KG
8737#include <fcntl.h>
8738#include <sys/mman.h>
8739
238235ef
DJ
8740#if !STDC_HEADERS && !HAVE_STDLIB_H
8741char *malloc ();
cf8e4b78
DH
8742#endif
8743
a9266bfa 8744/* This mess was copied from the GNU getpagesize.h. */
238235ef 8745#if !HAVE_GETPAGESIZE
a9266bfa 8746/* Assume that all systems that can run configure have sys/param.h. */
238235ef 8747# if !HAVE_SYS_PARAM_H
a9266bfa
KG
8748# define HAVE_SYS_PARAM_H 1
8749# endif
8750
8751# ifdef _SC_PAGESIZE
8752# define getpagesize() sysconf(_SC_PAGESIZE)
8753# else /* no _SC_PAGESIZE */
238235ef 8754# if HAVE_SYS_PARAM_H
a9266bfa
KG
8755# include <sys/param.h>
8756# ifdef EXEC_PAGESIZE
8757# define getpagesize() EXEC_PAGESIZE
8758# else /* no EXEC_PAGESIZE */
8759# ifdef NBPG
8760# define getpagesize() NBPG * CLSIZE
8761# ifndef CLSIZE
8762# define CLSIZE 1
8763# endif /* no CLSIZE */
8764# else /* no NBPG */
8765# ifdef NBPC
8766# define getpagesize() NBPC
8767# else /* no NBPC */
8768# ifdef PAGESIZE
8769# define getpagesize() PAGESIZE
8770# endif /* PAGESIZE */
8771# endif /* no NBPC */
8772# endif /* no NBPG */
8773# endif /* no EXEC_PAGESIZE */
8774# else /* no HAVE_SYS_PARAM_H */
8775# define getpagesize() 8192 /* punt totally */
8776# endif /* no HAVE_SYS_PARAM_H */
8777# endif /* no _SC_PAGESIZE */
8778
8779#endif /* no HAVE_GETPAGESIZE */
8780
a9266bfa 8781int
238235ef 8782main ()
a9266bfa 8783{
238235ef
DJ
8784 char *data, *data2, *data3;
8785 int i, pagesize;
8786 int fd;
a9266bfa 8787
238235ef
DJ
8788 pagesize = getpagesize ();
8789
8790 /* First, make a file with some known garbage in it. */
8791 data = (char *) malloc (pagesize);
8792 if (!data)
8793 exit (1);
8794 for (i = 0; i < pagesize; ++i)
8795 *(data + i) = rand ();
8796 umask (0);
8797 fd = creat ("conftest.mmap", 0600);
8798 if (fd < 0)
8799 exit (1);
8800 if (write (fd, data, pagesize) != pagesize)
8801 exit (1);
8802 close (fd);
8803
8804 /* Next, try to mmap the file at a fixed address which already has
8805 something else allocated at it. If we can, also make sure that
8806 we see the same garbage. */
8807 fd = open ("conftest.mmap", O_RDWR);
8808 if (fd < 0)
8809 exit (1);
8810 data2 = (char *) malloc (2 * pagesize);
8811 if (!data2)
8812 exit (1);
3beb1315 8813 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
238235ef 8814 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
3beb1315 8815 MAP_PRIVATE | MAP_FIXED, fd, 0L))
238235ef
DJ
8816 exit (1);
8817 for (i = 0; i < pagesize; ++i)
8818 if (*(data + i) != *(data2 + i))
8819 exit (1);
8820
8821 /* Finally, make sure that changes to the mapped area do not
8822 percolate back to the file as seen by read(). (This is a bug on
8823 some variants of i386 svr4.0.) */
8824 for (i = 0; i < pagesize; ++i)
8825 *(data2 + i) = *(data2 + i) + 1;
8826 data3 = (char *) malloc (pagesize);
8827 if (!data3)
8828 exit (1);
8829 if (read (fd, data3, pagesize) != pagesize)
8830 exit (1);
8831 for (i = 0; i < pagesize; ++i)
8832 if (*(data + i) != *(data3 + i))
8833 exit (1);
8834 close (fd);
8835 exit (0);
8836}
8837_ACEOF
8838rm -f conftest$ac_exeext
8839if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8840 (eval $ac_link) 2>&5
8841 ac_status=$?
8842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8843 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8845 (eval $ac_try) 2>&5
8846 ac_status=$?
8847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8848 (exit $ac_status); }; }; then
a9266bfa
KG
8849 ac_cv_func_mmap_fixed_mapped=yes
8850else
238235ef
DJ
8851 echo "$as_me: program exited with status $ac_status" >&5
8852echo "$as_me: failed program was:" >&5
8853sed 's/^/| /' conftest.$ac_ext >&5
8854
8855( exit $ac_status )
8856ac_cv_func_mmap_fixed_mapped=no
a9266bfa 8857fi
3beb1315 8858rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a9266bfa 8859fi
a9266bfa 8860fi
238235ef
DJ
8861echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8862echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
a9266bfa 8863if test $ac_cv_func_mmap_fixed_mapped = yes; then
238235ef
DJ
8864
8865cat >>confdefs.h <<\_ACEOF
a9266bfa 8866#define HAVE_MMAP 1
238235ef 8867_ACEOF
a9266bfa
KG
8868
8869fi
238235ef 8870rm -f conftest.mmap
a9266bfa 8871
238235ef 8872fi
a9266bfa 8873
238235ef
DJ
8874echo "$as_me:$LINENO: checking for working strncmp" >&5
8875echo $ECHO_N "checking for working strncmp... $ECHO_C" >&6
8876if test "${ac_cv_func_strncmp_works+set}" = set; then
8877 echo $ECHO_N "(cached) $ECHO_C" >&6
a9266bfa
KG
8878else
8879 if test "$cross_compiling" = yes; then
8880 ac_cv_func_strncmp_works=no
8881else
238235ef 8882 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
8883/* confdefs.h. */
8884_ACEOF
8885cat confdefs.h >>conftest.$ac_ext
8886cat >>conftest.$ac_ext <<_ACEOF
8887/* end confdefs.h. */
a9266bfa
KG
8888
8889/* Test by Jim Wilson and Kaveh Ghazi.
8890 Check whether strncmp reads past the end of its string parameters. */
8891#include <sys/types.h>
8892
8893#ifdef HAVE_FCNTL_H
8894#include <fcntl.h>
8895#endif
8896
8897#ifdef HAVE_SYS_MMAN_H
8898#include <sys/mman.h>
8899#endif
8900
8901#ifndef MAP_ANON
8902#ifdef MAP_ANONYMOUS
8903#define MAP_ANON MAP_ANONYMOUS
8904#else
8905#define MAP_ANON MAP_FILE
8906#endif
8907#endif
8908
8909#ifndef MAP_FILE
8910#define MAP_FILE 0
8911#endif
8912#ifndef O_RDONLY
8913#define O_RDONLY 0
8914#endif
8915
8916#define MAP_LEN 0x10000
8917
8918main ()
8919{
8920#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
8921 char *p;
8922 int dev_zero;
8923
8924 dev_zero = open ("/dev/zero", O_RDONLY);
8925 if (dev_zero < 0)
8926 exit (1);
238235ef 8927
a9266bfa
KG
8928 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
8929 MAP_ANON|MAP_PRIVATE, dev_zero, 0);
a4219437
IR
8930 if (p == (char *)-1)
8931 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
8932 MAP_ANON|MAP_PRIVATE, -1, 0);
a9266bfa
KG
8933 if (p == (char *)-1)
8934 exit (2);
8935 else
8936 {
8937 char *string = "__si_type_info";
8938 char *q = (char *) p + MAP_LEN - strlen (string) - 2;
8939 char *r = (char *) p + 0xe;
8940
8941 strcpy (q, string);
8942 strcpy (r, string);
8943 strncmp (r, q, 14);
8944 }
8945#endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */
8946 exit (0);
8947}
8948
238235ef
DJ
8949_ACEOF
8950rm -f conftest$ac_exeext
8951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8952 (eval $ac_link) 2>&5
8953 ac_status=$?
8954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8955 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8957 (eval $ac_try) 2>&5
8958 ac_status=$?
8959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8960 (exit $ac_status); }; }; then
a9266bfa
KG
8961 ac_cv_func_strncmp_works=yes
8962else
238235ef
DJ
8963 echo "$as_me: program exited with status $ac_status" >&5
8964echo "$as_me: failed program was:" >&5
8965sed 's/^/| /' conftest.$ac_ext >&5
8966
8967( exit $ac_status )
8968ac_cv_func_strncmp_works=no
a9266bfa 8969fi
3beb1315 8970rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a9266bfa 8971fi
a9266bfa
KG
8972rm -f core core.* *.core
8973fi
238235ef
DJ
8974echo "$as_me:$LINENO: result: $ac_cv_func_strncmp_works" >&5
8975echo "${ECHO_T}$ac_cv_func_strncmp_works" >&6
a9266bfa 8976if test $ac_cv_func_strncmp_works = no ; then
3beb1315
HPN
8977 case $LIBOBJS in
8978 "strncmp.$ac_objext" | \
8979 *" strncmp.$ac_objext" | \
8980 "strncmp.$ac_objext "* | \
8981 *" strncmp.$ac_objext "* ) ;;
8982 *) LIBOBJS="$LIBOBJS strncmp.$ac_objext" ;;
8983esac
8984
a9266bfa
KG
8985fi
8986
8987
0bc0cd11
JL
8988# Install a library built with a cross compiler in $(tooldir) rather
8989# than $(libdir).
ca6b370d 8990if test -z "${with_cross_host}"; then
0bc0cd11
JL
8991 INSTALL_DEST=libdir
8992else
8993 INSTALL_DEST=tooldir
8994fi
8995
8996
ad49d865
L
8997
8998L=""
8999for l in x $LIBOBJS; do
9000 case $l in
9001 x) ;;
9002 *) L="$L ./$l" ;;
9003 esac
9004done
9005LIBOBJS="$L"
9006
cf61af07
CD
9007
9008
9009
9010
0bc0cd11 9011# We need multilib support, but only if configuring for the target.
238235ef 9012 ac_config_files="$ac_config_files Makefile testsuite/Makefile"
9bf3c9cc 9013
238235ef 9014 ac_config_commands="$ac_config_commands default"
9bf3c9cc 9015
238235ef 9016cat >confcache <<\_ACEOF
0bc0cd11
JL
9017# This file is a shell script that caches the results of configure
9018# tests run on this system so they can be shared between configure
238235ef
DJ
9019# scripts and configure runs, see configure's option --config-cache.
9020# It is not useful on other systems. If it contains results you don't
9021# want to keep, you may remove or edit it.
0bc0cd11 9022#
238235ef
DJ
9023# config.status only pays attention to the cache file if you give it
9024# the --recheck option to rerun configure.
0bc0cd11 9025#
238235ef
DJ
9026# `ac_cv_env_foo' variables (set or unset) will be overridden when
9027# loading this file, other *unset* `ac_cv_foo' will be assigned the
9028# following values.
9029
9030_ACEOF
9031
0bc0cd11
JL
9032# The following way of writing the cache mishandles newlines in values,
9033# but we know of no workaround that is simple, portable, and efficient.
9034# So, don't put newlines in cache variables' values.
9035# Ultrix sh set writes to stderr and can't be redirected directly,
9036# and sets the high bit in the cache file unless we assign to the vars.
238235ef
DJ
9037{
9038 (set) 2>&1 |
9039 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9040 *ac_space=\ *)
9041 # `set' does not quote correctly, so add quotes (double-quote
9042 # substitution turns \\\\ into \\, and sed turns \\ into \).
9043 sed -n \
3beb1315
HPN
9044 "s/'/'\\\\''/g;
9045 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
238235ef
DJ
9046 ;;
9047 *)
9048 # `set' quotes correctly as required by POSIX, so do not add quotes.
9049 sed -n \
3beb1315 9050 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
238235ef
DJ
9051 ;;
9052 esac;
9053} |
9054 sed '
9055 t clear
9056 : clear
9057 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
9058 t end
9059 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
9060 : end' >>confcache
9061if diff $cache_file confcache >/dev/null 2>&1; then :; else
0bc0cd11 9062 if test -w $cache_file; then
238235ef
DJ
9063 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
9064 cat confcache >$cache_file
0bc0cd11
JL
9065 else
9066 echo "not updating unwritable cache $cache_file"
9067 fi
9068fi
9069rm -f confcache
9070
0bc0cd11
JL
9071test "x$prefix" = xNONE && prefix=$ac_default_prefix
9072# Let make expand exec_prefix.
9073test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9074
238235ef
DJ
9075# VPATH may cause trouble with some makes, so we remove $(srcdir),
9076# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
9077# trailing colons and then remove the whole line if VPATH becomes empty
9078# (actually we leave an empty line to preserve line numbers).
0bc0cd11 9079if test "x$srcdir" = x.; then
3beb1315 9080 ac_vpsub='/^[ ]*VPATH[ ]*=/{
238235ef
DJ
9081s/:*\$(srcdir):*/:/;
9082s/:*\${srcdir}:*/:/;
9083s/:*@srcdir@:*/:/;
3beb1315 9084s/^\([^=]*=[ ]*\):*/\1/;
238235ef 9085s/:*$//;
3beb1315 9086s/^[^=]*=[ ]*$//;
238235ef 9087}'
0bc0cd11
JL
9088fi
9089
0bc0cd11
JL
9090DEFS=-DHAVE_CONFIG_H
9091
238235ef
DJ
9092ac_libobjs=
9093ac_ltlibobjs=
9094for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
9095 # 1. Remove the extension, and $U if already installed.
9096 ac_i=`echo "$ac_i" |
3beb1315 9097 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
238235ef
DJ
9098 # 2. Add them.
9099 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
9100 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
9101done
9102LIBOBJS=$ac_libobjs
0bc0cd11 9103
238235ef
DJ
9104LTLIBOBJS=$ac_ltlibobjs
9105
9106
9107
9108: ${CONFIG_STATUS=./config.status}
9109ac_clean_files_save=$ac_clean_files
9110ac_clean_files="$ac_clean_files $CONFIG_STATUS"
9111{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
9112echo "$as_me: creating $CONFIG_STATUS" >&6;}
9113cat >$CONFIG_STATUS <<_ACEOF
9114#! $SHELL
9115# Generated by $as_me.
0bc0cd11 9116# Run this file to recreate the current configuration.
0bc0cd11 9117# Compiler output produced by configure, useful for debugging
238235ef 9118# configure, is in config.log if it exists.
0bc0cd11 9119
238235ef
DJ
9120debug=false
9121ac_cs_recheck=false
9122ac_cs_silent=false
9123SHELL=\${CONFIG_SHELL-$SHELL}
9124_ACEOF
9125
9126cat >>$CONFIG_STATUS <<\_ACEOF
9127## --------------------- ##
9128## M4sh Initialization. ##
9129## --------------------- ##
9130
9131# Be Bourne compatible
9132if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
9133 emulate sh
9134 NULLCMD=:
9135 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
9136 # is contrary to our usage. Disable this feature.
9137 alias -g '${1+"$@"}'='"$@"'
9138elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
9139 set -o posix
9140fi
3beb1315 9141DUALCASE=1; export DUALCASE # for MKS sh
238235ef
DJ
9142
9143# Support unset when possible.
3beb1315 9144if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
238235ef
DJ
9145 as_unset=unset
9146else
9147 as_unset=false
9148fi
9149
9150
9151# Work around bugs in pre-3.0 UWIN ksh.
9152$as_unset ENV MAIL MAILPATH
9153PS1='$ '
9154PS2='> '
9155PS4='+ '
9156
9157# NLS nuisances.
9158for as_var in \
9159 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
9160 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
9161 LC_TELEPHONE LC_TIME
0bc0cd11 9162do
3beb1315 9163 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
238235ef
DJ
9164 eval $as_var=C; export $as_var
9165 else
9166 $as_unset $as_var
9167 fi
0bc0cd11
JL
9168done
9169
238235ef
DJ
9170# Required to use basename.
9171if expr a : '\(a\)' >/dev/null 2>&1; then
9172 as_expr=expr
9173else
9174 as_expr=false
9175fi
0bc0cd11 9176
238235ef
DJ
9177if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
9178 as_basename=basename
9179else
9180 as_basename=false
9181fi
0bc0cd11 9182
0bc0cd11 9183
238235ef
DJ
9184# Name of the executable.
9185as_me=`$as_basename "$0" ||
9186$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9187 X"$0" : 'X\(//\)$' \| \
9188 X"$0" : 'X\(/\)$' \| \
9189 . : '\(.\)' 2>/dev/null ||
9190echo X/"$0" |
9191 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
9192 /^X\/\(\/\/\)$/{ s//\1/; q; }
9193 /^X\/\(\/\).*/{ s//\1/; q; }
9194 s/.*/./; q'`
9195
9196
9197# PATH needs CR, and LINENO needs CR and PATH.
9198# Avoid depending upon Character Ranges.
9199as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9200as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9201as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9202as_cr_digits='0123456789'
9203as_cr_alnum=$as_cr_Letters$as_cr_digits
0bc0cd11 9204
238235ef
DJ
9205# The user is always right.
9206if test "${PATH_SEPARATOR+set}" != set; then
9207 echo "#! /bin/sh" >conf$$.sh
9208 echo "exit 0" >>conf$$.sh
9209 chmod +x conf$$.sh
9210 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
9211 PATH_SEPARATOR=';'
0bc0cd11 9212 else
238235ef 9213 PATH_SEPARATOR=:
0bc0cd11 9214 fi
238235ef
DJ
9215 rm -f conf$$.sh
9216fi
9217
9218
9219 as_lineno_1=$LINENO
9220 as_lineno_2=$LINENO
9221 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
9222 test "x$as_lineno_1" != "x$as_lineno_2" &&
9223 test "x$as_lineno_3" = "x$as_lineno_2" || {
9224 # Find who we are. Look in the path if we contain no path at all
9225 # relative or not.
9226 case $0 in
9227 *[\\/]* ) as_myself=$0 ;;
9228 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9229for as_dir in $PATH
9230do
9231 IFS=$as_save_IFS
9232 test -z "$as_dir" && as_dir=.
9233 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
9234done
9235
9236 ;;
9237 esac
9238 # We did not find ourselves, most probably we were run as `sh COMMAND'
9239 # in which case we are not to be found in the path.
9240 if test "x$as_myself" = x; then
9241 as_myself=$0
9242 fi
9243 if test ! -f "$as_myself"; then
9244 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
9245echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
9246 { (exit 1); exit 1; }; }
9247 fi
9248 case $CONFIG_SHELL in
9249 '')
9250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9251for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
9252do
9253 IFS=$as_save_IFS
9254 test -z "$as_dir" && as_dir=.
9255 for as_base in sh bash ksh sh5; do
9256 case $as_dir in
9257 /*)
9258 if ("$as_dir/$as_base" -c '
9259 as_lineno_1=$LINENO
9260 as_lineno_2=$LINENO
9261 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
9262 test "x$as_lineno_1" != "x$as_lineno_2" &&
9263 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
9264 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
9265 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
9266 CONFIG_SHELL=$as_dir/$as_base
9267 export CONFIG_SHELL
9268 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
9269 fi;;
9270 esac
9271 done
9272done
9273;;
9274 esac
9275
9276 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
9277 # uniformly replaced by the line number. The first 'sed' inserts a
9278 # line-number line before each line; the second 'sed' does the real
9279 # work. The second script uses 'N' to pair each line-number line
9280 # with the numbered line, and appends trailing '-' during
9281 # substitution so that $LINENO is not a special case at line end.
9282 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
9283 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
9284 sed '=' <$as_myself |
9285 sed '
9286 N
9287 s,$,-,
9288 : loop
9289 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
9290 t loop
9291 s,-$,,
9292 s,^['$as_cr_digits']*\n,,
9293 ' >$as_me.lineno &&
9294 chmod +x $as_me.lineno ||
9295 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
9296echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
9297 { (exit 1); exit 1; }; }
9298
9299 # Don't try to exec as it changes $[0], causing all sort of problems
9300 # (the dirname of $[0] is not the place where we might find the
9301 # original and so on. Autoconf is especially sensible to this).
9302 . ./$as_me.lineno
9303 # Exit status is that of the last command.
9304 exit
9305}
9306
9307
9308case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
9309 *c*,-n*) ECHO_N= ECHO_C='
9310' ECHO_T=' ' ;;
9311 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
9312 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
9313esac
9314
9315if expr a : '\(a\)' >/dev/null 2>&1; then
9316 as_expr=expr
9317else
9318 as_expr=false
9319fi
9320
9321rm -f conf$$ conf$$.exe conf$$.file
9322echo >conf$$.file
9323if ln -s conf$$.file conf$$ 2>/dev/null; then
9324 # We could just check for DJGPP; but this test a) works b) is more generic
9325 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
9326 if test -f conf$$.exe; then
9327 # Don't use ln at all; we don't have any links
9328 as_ln_s='cp -p'
0bc0cd11 9329 else
238235ef 9330 as_ln_s='ln -s'
0bc0cd11 9331 fi
238235ef
DJ
9332elif ln conf$$.file conf$$ 2>/dev/null; then
9333 as_ln_s=ln
9334else
9335 as_ln_s='cp -p'
9336fi
9337rm -f conf$$ conf$$.exe conf$$.file
9338
9339if mkdir -p . 2>/dev/null; then
9340 as_mkdir_p=:
9341else
3beb1315 9342 test -d ./-p && rmdir ./-p
238235ef
DJ
9343 as_mkdir_p=false
9344fi
9345
9346as_executable_p="test -f"
9347
9348# Sed expression to map a string onto a valid CPP name.
3beb1315 9349as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
238235ef
DJ
9350
9351# Sed expression to map a string onto a valid variable name.
3beb1315 9352as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
238235ef
DJ
9353
9354
9355# IFS
9356# We need space, tab and new line, in precisely that order.
9357as_nl='
9358'
9359IFS=" $as_nl"
9360
9361# CDPATH.
9362$as_unset CDPATH
9363
9364exec 6>&1
9365
9366# Open the log real soon, to keep \$[0] and so on meaningful, and to
9367# report actual input values of CONFIG_FILES etc. instead of their
9368# values after options handling. Logging --version etc. is OK.
9369exec 5>>config.log
9370{
9371 echo
9372 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
9373## Running $as_me. ##
9374_ASBOX
9375} >&5
9376cat >&5 <<_CSEOF
9377
9378This file was extended by $as_me, which was
a4f74b58 9379generated by GNU Autoconf 2.59. Invocation command line was
238235ef
DJ
9380
9381 CONFIG_FILES = $CONFIG_FILES
9382 CONFIG_HEADERS = $CONFIG_HEADERS
9383 CONFIG_LINKS = $CONFIG_LINKS
9384 CONFIG_COMMANDS = $CONFIG_COMMANDS
9385 $ $0 $@
9386
9387_CSEOF
9388echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
9389echo >&5
9390_ACEOF
9391
9392# Files that config.status was made for.
9393if test -n "$ac_config_files"; then
9394 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
9395fi
9396
9397if test -n "$ac_config_headers"; then
9398 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
9399fi
9400
9401if test -n "$ac_config_links"; then
9402 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
9403fi
9404
9405if test -n "$ac_config_commands"; then
9406 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
9407fi
9408
9409cat >>$CONFIG_STATUS <<\_ACEOF
9410
9411ac_cs_usage="\
9412\`$as_me' instantiates files from templates according to the
9413current configuration.
9414
9415Usage: $0 [OPTIONS] [FILE]...
9416
9417 -h, --help print this help, then exit
9418 -V, --version print version number, then exit
9419 -q, --quiet do not print progress messages
9420 -d, --debug don't remove temporary files
9421 --recheck update $as_me by reconfiguring in the same conditions
9422 --file=FILE[:TEMPLATE]
3beb1315 9423 instantiate the configuration file FILE
238235ef 9424 --header=FILE[:TEMPLATE]
3beb1315 9425 instantiate the configuration header FILE
238235ef
DJ
9426
9427Configuration files:
9428$config_files
9429
9430Configuration headers:
9431$config_headers
9432
9433Configuration commands:
9434$config_commands
9435
9436Report bugs to <bug-autoconf@gnu.org>."
9437_ACEOF
9438
9439cat >>$CONFIG_STATUS <<_ACEOF
9440ac_cs_version="\\
9441config.status
a4f74b58 9442configured by $0, generated by GNU Autoconf 2.59,
238235ef
DJ
9443 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
9444
3beb1315 9445Copyright (C) 2003 Free Software Foundation, Inc.
238235ef
DJ
9446This config.status script is free software; the Free Software Foundation
9447gives unlimited permission to copy, distribute and modify it."
9448srcdir=$srcdir
9449INSTALL="$INSTALL"
9450_ACEOF
9451
9452cat >>$CONFIG_STATUS <<\_ACEOF
9453# If no file are specified by the user, then we need to provide default
9454# value. By we need to know if files were specified by the user.
9455ac_need_defaults=:
9456while test $# != 0
9457do
9458 case $1 in
9459 --*=*)
9460 ac_option=`expr "x$1" : 'x\([^=]*\)='`
9461 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
9462 ac_shift=:
9463 ;;
9464 -*)
9465 ac_option=$1
9466 ac_optarg=$2
9467 ac_shift=shift
9468 ;;
9469 *) # This is not an option, so the user has probably given explicit
9470 # arguments.
9471 ac_option=$1
9472 ac_need_defaults=false;;
9473 esac
9474
9475 case $ac_option in
9476 # Handling of the options.
9477_ACEOF
9478cat >>$CONFIG_STATUS <<\_ACEOF
9479 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9480 ac_cs_recheck=: ;;
9481 --version | --vers* | -V )
9482 echo "$ac_cs_version"; exit 0 ;;
9483 --he | --h)
9484 # Conflict between --help and --header
9485 { { echo "$as_me:$LINENO: error: ambiguous option: $1
9486Try \`$0 --help' for more information." >&5
9487echo "$as_me: error: ambiguous option: $1
9488Try \`$0 --help' for more information." >&2;}
9489 { (exit 1); exit 1; }; };;
9490 --help | --hel | -h )
9491 echo "$ac_cs_usage"; exit 0 ;;
9492 --debug | --d* | -d )
9493 debug=: ;;
9494 --file | --fil | --fi | --f )
9495 $ac_shift
9496 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
9497 ac_need_defaults=false;;
9498 --header | --heade | --head | --hea )
9499 $ac_shift
9500 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
9501 ac_need_defaults=false;;
9502 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
9503 | -silent | --silent | --silen | --sile | --sil | --si | --s)
9504 ac_cs_silent=: ;;
9505
9506 # This is an error.
9507 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
9508Try \`$0 --help' for more information." >&5
9509echo "$as_me: error: unrecognized option: $1
9510Try \`$0 --help' for more information." >&2;}
9511 { (exit 1); exit 1; }; } ;;
9512
9513 *) ac_config_targets="$ac_config_targets $1" ;;
9514
9515 esac
9516 shift
0bc0cd11 9517done
238235ef
DJ
9518
9519ac_configure_extra_args=
9520
9521if $ac_cs_silent; then
9522 exec 6>/dev/null
9523 ac_configure_extra_args="$ac_configure_extra_args --silent"
0bc0cd11 9524fi
0bc0cd11 9525
238235ef
DJ
9526_ACEOF
9527cat >>$CONFIG_STATUS <<_ACEOF
9528if \$ac_cs_recheck; then
9529 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
9530 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
9531fi
0bc0cd11 9532
238235ef
DJ
9533_ACEOF
9534
9535cat >>$CONFIG_STATUS <<_ACEOF
9536#
9537# INIT-COMMANDS section.
9538#
9539
9540srcdir=${srcdir}
9541host=${host}
9542target=${target}
9543with_target_subdir=${with_target_subdir}
238235ef
DJ
9544with_multisubdir=${with_multisubdir}
9545ac_configure_args="--enable-multilib ${ac_configure_args}"
9546CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
9547ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
9548libiberty_topdir=${libiberty_topdir}
9549
9550
9551_ACEOF
9552
9553
9554
9555cat >>$CONFIG_STATUS <<\_ACEOF
9556for ac_config_target in $ac_config_targets
9557do
9558 case "$ac_config_target" in
9559 # Handling of arguments.
9560 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
9561 "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
9562 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
9563 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
9564 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
9565echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
9566 { (exit 1); exit 1; }; };;
0bc0cd11 9567 esac
238235ef 9568done
0bc0cd11 9569
238235ef
DJ
9570# If the user did not use the arguments to specify the items to instantiate,
9571# then the envvar interface is used. Set only those that are not.
9572# We use the long form for the default assignment because of an extremely
9573# bizarre bug on SunOS 4.1.3.
9574if $ac_need_defaults; then
9575 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
9576 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
9577 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
9578fi
9579
9580# Have a temporary directory for convenience. Make it in the build tree
9581# simply because there is no reason to put it here, and in addition,
9582# creating and moving files from /tmp can sometimes cause problems.
9583# Create a temporary directory, and hook for its removal unless debugging.
9584$debug ||
9585{
9586 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
9587 trap '{ (exit 1); exit 1; }' 1 2 13 15
9588}
0bc0cd11 9589
238235ef
DJ
9590# Create a (secure) tmp directory for tmp files.
9591
9592{
9593 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
9594 test -n "$tmp" && test -d "$tmp"
9595} ||
9596{
9597 tmp=./confstat$$-$RANDOM
9598 (umask 077 && mkdir $tmp)
9599} ||
9600{
9601 echo "$me: cannot create a temporary directory in ." >&2
9602 { (exit 1); exit 1; }
9603}
9604
9605_ACEOF
9606
9607cat >>$CONFIG_STATUS <<_ACEOF
9608
9609#
9610# CONFIG_FILES section.
9611#
9612
9613# No need to generate the scripts if there are no CONFIG_FILES.
9614# This happens for instance when ./config.status config.h
9615if test -n "\$CONFIG_FILES"; then
9616 # Protect against being on the right side of a sed subst in config.status.
9617 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
9618 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
9619s,@SHELL@,$SHELL,;t t
9620s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
9621s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
9622s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
9623s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
9624s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
9625s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
9626s,@exec_prefix@,$exec_prefix,;t t
9627s,@prefix@,$prefix,;t t
9628s,@program_transform_name@,$program_transform_name,;t t
9629s,@bindir@,$bindir,;t t
9630s,@sbindir@,$sbindir,;t t
9631s,@libexecdir@,$libexecdir,;t t
9632s,@datadir@,$datadir,;t t
9633s,@sysconfdir@,$sysconfdir,;t t
9634s,@sharedstatedir@,$sharedstatedir,;t t
9635s,@localstatedir@,$localstatedir,;t t
9636s,@libdir@,$libdir,;t t
9637s,@includedir@,$includedir,;t t
9638s,@oldincludedir@,$oldincludedir,;t t
9639s,@infodir@,$infodir,;t t
9640s,@mandir@,$mandir,;t t
9641s,@build_alias@,$build_alias,;t t
9642s,@host_alias@,$host_alias,;t t
9643s,@target_alias@,$target_alias,;t t
9644s,@DEFS@,$DEFS,;t t
9645s,@ECHO_C@,$ECHO_C,;t t
9646s,@ECHO_N@,$ECHO_N,;t t
9647s,@ECHO_T@,$ECHO_T,;t t
9648s,@LIBS@,$LIBS,;t t
9649s,@libiberty_topdir@,$libiberty_topdir,;t t
9650s,@MAINT@,$MAINT,;t t
9651s,@NOTMAINT@,$NOTMAINT,;t t
9652s,@MAKEINFO@,$MAKEINFO,;t t
9653s,@BUILD_INFO@,$BUILD_INFO,;t t
9654s,@PERL@,$PERL,;t t
9655s,@HAVE_PERL@,$HAVE_PERL,;t t
9656s,@build@,$build,;t t
9657s,@build_cpu@,$build_cpu,;t t
9658s,@build_vendor@,$build_vendor,;t t
9659s,@build_os@,$build_os,;t t
9660s,@host@,$host,;t t
9661s,@host_cpu@,$host_cpu,;t t
9662s,@host_vendor@,$host_vendor,;t t
9663s,@host_os@,$host_os,;t t
9664s,@AR@,$AR,;t t
9665s,@ac_ct_AR@,$ac_ct_AR,;t t
9666s,@RANLIB@,$RANLIB,;t t
9667s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9668s,@CC@,$CC,;t t
9669s,@CFLAGS@,$CFLAGS,;t t
9670s,@LDFLAGS@,$LDFLAGS,;t t
9671s,@CPPFLAGS@,$CPPFLAGS,;t t
9672s,@ac_ct_CC@,$ac_ct_CC,;t t
9673s,@EXEEXT@,$EXEEXT,;t t
9674s,@OBJEXT@,$OBJEXT,;t t
b033df90 9675s,@CPP@,$CPP,;t t
ad49d865 9676s,@ac_libiberty_warn_cflags@,$ac_libiberty_warn_cflags,;t t
24f2cabb
L
9677s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
9678s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
238235ef
DJ
9679s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
9680s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
9681s,@INSTALL_DATA@,$INSTALL_DATA,;t t
c91c9c2e 9682s,@PICFLAG@,$PICFLAG,;t t
238235ef
DJ
9683s,@EGREP@,$EGREP,;t t
9684s,@LIBOBJS@,$LIBOBJS,;t t
9685s,@CHECK@,$CHECK,;t t
9686s,@target_header_dir@,$target_header_dir,;t t
9687s,@pexecute@,$pexecute,;t t
9688s,@INSTALL_DEST@,$INSTALL_DEST,;t t
cf61af07
CD
9689s,@datarootdir@,$datarootdir,;t t
9690s,@docdir@,$docdir,;t t
9691s,@htmldir@,$htmldir,;t t
238235ef
DJ
9692s,@LTLIBOBJS@,$LTLIBOBJS,;t t
9693/@host_makefile_frag@/r $host_makefile_frag
9694s,@host_makefile_frag@,,;t t
9695CEOF
9696
9697_ACEOF
9698
9699 cat >>$CONFIG_STATUS <<\_ACEOF
9700 # Split the substitutions into bite-sized pieces for seds with
9701 # small command number limits, like on Digital OSF/1 and HP-UX.
9702 ac_max_sed_lines=48
9703 ac_sed_frag=1 # Number of current file.
9704 ac_beg=1 # First line for current file.
9705 ac_end=$ac_max_sed_lines # Line after last line for current file.
9706 ac_more_lines=:
9707 ac_sed_cmds=
9708 while $ac_more_lines; do
9709 if test $ac_beg -gt 1; then
9710 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
9711 else
9712 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
9713 fi
9714 if test ! -s $tmp/subs.frag; then
9715 ac_more_lines=false
9716 else
9717 # The purpose of the label and of the branching condition is to
9718 # speed up the sed processing (if there are no `@' at all, there
9719 # is no need to browse any of the substitutions).
9720 # These are the two extra sed commands mentioned above.
9721 (echo ':t
9722 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
9723 if test -z "$ac_sed_cmds"; then
3beb1315 9724 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
238235ef 9725 else
3beb1315 9726 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
238235ef
DJ
9727 fi
9728 ac_sed_frag=`expr $ac_sed_frag + 1`
9729 ac_beg=$ac_end
9730 ac_end=`expr $ac_end + $ac_max_sed_lines`
9731 fi
9732 done
9733 if test -z "$ac_sed_cmds"; then
9734 ac_sed_cmds=cat
0bc0cd11 9735 fi
238235ef 9736fi # test -n "$CONFIG_FILES"
0bc0cd11 9737
238235ef
DJ
9738_ACEOF
9739cat >>$CONFIG_STATUS <<\_ACEOF
9740for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
9741 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9742 case $ac_file in
9743 - | *:- | *:-:* ) # input from stdin
3beb1315
HPN
9744 cat >$tmp/stdin
9745 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
9746 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
238235ef 9747 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
3beb1315 9748 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
238235ef 9749 * ) ac_file_in=$ac_file.in ;;
0bc0cd11
JL
9750 esac
9751
238235ef
DJ
9752 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
9753 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
9754$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
3beb1315
HPN
9755 X"$ac_file" : 'X\(//\)[^/]' \| \
9756 X"$ac_file" : 'X\(//\)$' \| \
9757 X"$ac_file" : 'X\(/\)' \| \
9758 . : '\(.\)' 2>/dev/null ||
238235ef
DJ
9759echo X"$ac_file" |
9760 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9761 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9762 /^X\(\/\/\)$/{ s//\1/; q; }
9763 /^X\(\/\).*/{ s//\1/; q; }
9764 s/.*/./; q'`
9765 { if $as_mkdir_p; then
9766 mkdir -p "$ac_dir"
9767 else
9768 as_dir="$ac_dir"
9769 as_dirs=
9770 while test ! -d "$as_dir"; do
9771 as_dirs="$as_dir $as_dirs"
9772 as_dir=`(dirname "$as_dir") 2>/dev/null ||
9773$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
3beb1315
HPN
9774 X"$as_dir" : 'X\(//\)[^/]' \| \
9775 X"$as_dir" : 'X\(//\)$' \| \
9776 X"$as_dir" : 'X\(/\)' \| \
9777 . : '\(.\)' 2>/dev/null ||
238235ef
DJ
9778echo X"$as_dir" |
9779 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9780 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9781 /^X\(\/\/\)$/{ s//\1/; q; }
9782 /^X\(\/\).*/{ s//\1/; q; }
9783 s/.*/./; q'`
9784 done
9785 test ! -n "$as_dirs" || mkdir $as_dirs
9786 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
9787echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
9788 { (exit 1); exit 1; }; }; }
9789
9790 ac_builddir=.
0bc0cd11 9791
238235ef
DJ
9792if test "$ac_dir" != .; then
9793 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
9794 # A "../" for each directory in $ac_dir_suffix.
9795 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
9796else
9797 ac_dir_suffix= ac_top_builddir=
9798fi
9799
9800case $srcdir in
9801 .) # No --srcdir option. We are building in place.
9802 ac_srcdir=.
9803 if test -z "$ac_top_builddir"; then
9804 ac_top_srcdir=.
9805 else
9806 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
9807 fi ;;
9808 [\\/]* | ?:[\\/]* ) # Absolute path.
9809 ac_srcdir=$srcdir$ac_dir_suffix;
9810 ac_top_srcdir=$srcdir ;;
9811 *) # Relative path.
9812 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
9813 ac_top_srcdir=$ac_top_builddir$srcdir ;;
9814esac
a4f74b58
KC
9815
9816# Do not use `cd foo && pwd` to compute absolute paths, because
9817# the directories may not exist.
9818case `pwd` in
9819.) ac_abs_builddir="$ac_dir";;
3beb1315 9820*)
a4f74b58
KC
9821 case "$ac_dir" in
9822 .) ac_abs_builddir=`pwd`;;
9823 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
9824 *) ac_abs_builddir=`pwd`/"$ac_dir";;
3beb1315
HPN
9825 esac;;
9826esac
a4f74b58 9827case $ac_abs_builddir in
3beb1315
HPN
9828.) ac_abs_top_builddir=${ac_top_builddir}.;;
9829*)
9830 case ${ac_top_builddir}. in
a4f74b58 9831 .) ac_abs_top_builddir=$ac_abs_builddir;;
3beb1315 9832 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
a4f74b58 9833 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
3beb1315
HPN
9834 esac;;
9835esac
a4f74b58 9836case $ac_abs_builddir in
3beb1315
HPN
9837.) ac_abs_srcdir=$ac_srcdir;;
9838*)
9839 case $ac_srcdir in
a4f74b58 9840 .) ac_abs_srcdir=$ac_abs_builddir;;
3beb1315 9841 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
a4f74b58 9842 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
3beb1315
HPN
9843 esac;;
9844esac
a4f74b58 9845case $ac_abs_builddir in
3beb1315
HPN
9846.) ac_abs_top_srcdir=$ac_top_srcdir;;
9847*)
9848 case $ac_top_srcdir in
a4f74b58 9849 .) ac_abs_top_srcdir=$ac_abs_builddir;;
3beb1315 9850 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
a4f74b58 9851 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
3beb1315
HPN
9852 esac;;
9853esac
238235ef
DJ
9854
9855
9856 case $INSTALL in
9857 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
9858 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
0bc0cd11
JL
9859 esac
9860
e8f9ec35
GDR
9861 if test x"$ac_file" != x-; then
9862 { echo "$as_me:$LINENO: creating $ac_file" >&5
9863echo "$as_me: creating $ac_file" >&6;}
9864 rm -f "$ac_file"
9865 fi
238235ef
DJ
9866 # Let's still pretend it is `configure' which instantiates (i.e., don't
9867 # use $as_me), people would be surprised to read:
9868 # /* config.h. Generated by config.status. */
9869 if test x"$ac_file" = x-; then
9870 configure_input=
9871 else
9872 configure_input="$ac_file. "
9873 fi
9874 configure_input=$configure_input"Generated from `echo $ac_file_in |
3beb1315 9875 sed 's,.*/,,'` by configure."
238235ef
DJ
9876
9877 # First look for the input files in the build tree, otherwise in the
9878 # src tree.
9879 ac_file_inputs=`IFS=:
9880 for f in $ac_file_in; do
9881 case $f in
9882 -) echo $tmp/stdin ;;
9883 [\\/$]*)
3beb1315
HPN
9884 # Absolute (can't be DOS-style, as IFS=:)
9885 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
238235ef
DJ
9886echo "$as_me: error: cannot find input file: $f" >&2;}
9887 { (exit 1); exit 1; }; }
3beb1315 9888 echo "$f";;
238235ef 9889 *) # Relative
3beb1315
HPN
9890 if test -f "$f"; then
9891 # Build tree
9892 echo "$f"
9893 elif test -f "$srcdir/$f"; then
9894 # Source tree
9895 echo "$srcdir/$f"
9896 else
9897 # /dev/null tree
9898 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
238235ef
DJ
9899echo "$as_me: error: cannot find input file: $f" >&2;}
9900 { (exit 1); exit 1; }; }
3beb1315 9901 fi;;
238235ef
DJ
9902 esac
9903 done` || { (exit 1); exit 1; }
9904_ACEOF
9905cat >>$CONFIG_STATUS <<_ACEOF
9906 sed "$ac_vpsub
9907$extrasub
9908_ACEOF
9909cat >>$CONFIG_STATUS <<\_ACEOF
9910:t
9911/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
9912s,@configure_input@,$configure_input,;t t
9913s,@srcdir@,$ac_srcdir,;t t
9914s,@abs_srcdir@,$ac_abs_srcdir,;t t
9915s,@top_srcdir@,$ac_top_srcdir,;t t
9916s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
9917s,@builddir@,$ac_builddir,;t t
9918s,@abs_builddir@,$ac_abs_builddir,;t t
9919s,@top_builddir@,$ac_top_builddir,;t t
9920s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
9921s,@INSTALL@,$ac_INSTALL,;t t
9922" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
9923 rm -f $tmp/stdin
9924 if test x"$ac_file" != x-; then
9925 mv $tmp/out $ac_file
9926 else
9927 cat $tmp/out
9928 rm -f $tmp/out
9929 fi
9930
9931done
9932_ACEOF
9933cat >>$CONFIG_STATUS <<\_ACEOF
9934
9935#
9936# CONFIG_HEADER section.
9937#
0bc0cd11
JL
9938
9939# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9940# NAME is the cpp macro being defined and VALUE is the value it is being given.
9941#
9942# ac_d sets the value in "#define NAME VALUE" lines.
3beb1315
HPN
9943ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9944ac_dB='[ ].*$,\1#\2'
238235ef
DJ
9945ac_dC=' '
9946ac_dD=',;t'
9947# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3beb1315 9948ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
238235ef 9949ac_uB='$,\1#\2define\3'
0bc0cd11 9950ac_uC=' '
238235ef
DJ
9951ac_uD=',;t'
9952
9953for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
0bc0cd11 9954 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
238235ef
DJ
9955 case $ac_file in
9956 - | *:- | *:-:* ) # input from stdin
3beb1315
HPN
9957 cat >$tmp/stdin
9958 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
9959 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
238235ef 9960 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
3beb1315 9961 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
238235ef 9962 * ) ac_file_in=$ac_file.in ;;
0bc0cd11
JL
9963 esac
9964
238235ef
DJ
9965 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
9966echo "$as_me: creating $ac_file" >&6;}
9967
9968 # First look for the input files in the build tree, otherwise in the
9969 # src tree.
9970 ac_file_inputs=`IFS=:
9971 for f in $ac_file_in; do
9972 case $f in
9973 -) echo $tmp/stdin ;;
9974 [\\/$]*)
3beb1315
HPN
9975 # Absolute (can't be DOS-style, as IFS=:)
9976 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
238235ef
DJ
9977echo "$as_me: error: cannot find input file: $f" >&2;}
9978 { (exit 1); exit 1; }; }
3beb1315
HPN
9979 # Do quote $f, to prevent DOS paths from being IFS'd.
9980 echo "$f";;
238235ef 9981 *) # Relative
3beb1315
HPN
9982 if test -f "$f"; then
9983 # Build tree
9984 echo "$f"
9985 elif test -f "$srcdir/$f"; then
9986 # Source tree
9987 echo "$srcdir/$f"
9988 else
9989 # /dev/null tree
9990 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
238235ef
DJ
9991echo "$as_me: error: cannot find input file: $f" >&2;}
9992 { (exit 1); exit 1; }; }
3beb1315 9993 fi;;
238235ef
DJ
9994 esac
9995 done` || { (exit 1); exit 1; }
9996 # Remove the trailing spaces.
3beb1315 9997 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
238235ef
DJ
9998
9999_ACEOF
10000
10001# Transform confdefs.h into two sed scripts, `conftest.defines' and
10002# `conftest.undefs', that substitutes the proper values into
10003# config.h.in to produce config.h. The first handles `#define'
10004# templates, and the second `#undef' templates.
10005# And first: Protect against being on the right side of a sed subst in
10006# config.status. Protect against being in an unquoted here document
10007# in config.status.
10008rm -f conftest.defines conftest.undefs
10009# Using a here document instead of a string reduces the quoting nightmare.
10010# Putting comments in sed scripts is not portable.
10011#
10012# `end' is used to avoid that the second main sed command (meant for
10013# 0-ary CPP macros) applies to n-ary macro definitions.
10014# See the Autoconf documentation for `clear'.
10015cat >confdef2sed.sed <<\_ACEOF
10016s/[\\&,]/\\&/g
10017s,[\\$`],\\&,g
10018t clear
10019: clear
3beb1315 10020s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
238235ef 10021t end
3beb1315 10022s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
238235ef
DJ
10023: end
10024_ACEOF
10025# If some macros were called several times there might be several times
10026# the same #defines, which is useless. Nevertheless, we may not want to
10027# sort them, since we want the *last* AC-DEFINE to be honored.
10028uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
10029sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
10030rm -f confdef2sed.sed
0bc0cd11
JL
10031
10032# This sed command replaces #undef with comments. This is necessary, for
10033# example, in the case of _POSIX_SOURCE, which is predefined and required
10034# on some systems where configure will not decide to define it.
238235ef 10035cat >>conftest.undefs <<\_ACEOF
3beb1315 10036s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
238235ef
DJ
10037_ACEOF
10038
10039# Break up conftest.defines because some shells have a limit on the size
10040# of here documents, and old seds have small limits too (100 cmds).
10041echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
3beb1315 10042echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
238235ef
DJ
10043echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
10044echo ' :' >>$CONFIG_STATUS
10045rm -f conftest.tail
10046while grep . conftest.defines >/dev/null
10047do
10048 # Write a limited-size here document to $tmp/defines.sed.
10049 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
10050 # Speed up: don't consider the non `#define' lines.
3beb1315 10051 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
238235ef
DJ
10052 # Work around the forget-to-reset-the-flag bug.
10053 echo 't clr' >>$CONFIG_STATUS
10054 echo ': clr' >>$CONFIG_STATUS
10055 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
10056 echo 'CEOF
10057 sed -f $tmp/defines.sed $tmp/in >$tmp/out
10058 rm -f $tmp/in
10059 mv $tmp/out $tmp/in
10060' >>$CONFIG_STATUS
10061 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
10062 rm -f conftest.defines
10063 mv conftest.tail conftest.defines
10064done
10065rm -f conftest.defines
10066echo ' fi # grep' >>$CONFIG_STATUS
10067echo >>$CONFIG_STATUS
0bc0cd11 10068
238235ef
DJ
10069# Break up conftest.undefs because some shells have a limit on the size
10070# of here documents, and old seds have small limits too (100 cmds).
10071echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
0bc0cd11 10072rm -f conftest.tail
238235ef 10073while grep . conftest.undefs >/dev/null
0bc0cd11 10074do
238235ef
DJ
10075 # Write a limited-size here document to $tmp/undefs.sed.
10076 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
10077 # Speed up: don't consider the non `#undef'
3beb1315 10078 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
238235ef
DJ
10079 # Work around the forget-to-reset-the-flag bug.
10080 echo 't clr' >>$CONFIG_STATUS
10081 echo ': clr' >>$CONFIG_STATUS
10082 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
0bc0cd11 10083 echo 'CEOF
238235ef
DJ
10084 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
10085 rm -f $tmp/in
10086 mv $tmp/out $tmp/in
10087' >>$CONFIG_STATUS
10088 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
10089 rm -f conftest.undefs
10090 mv conftest.tail conftest.undefs
10091done
10092rm -f conftest.undefs
10093
10094cat >>$CONFIG_STATUS <<\_ACEOF
10095 # Let's still pretend it is `configure' which instantiates (i.e., don't
10096 # use $as_me), people would be surprised to read:
10097 # /* config.h. Generated by config.status. */
10098 if test x"$ac_file" = x-; then
10099 echo "/* Generated by configure. */" >$tmp/config.h
0bc0cd11 10100 else
238235ef 10101 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
0bc0cd11 10102 fi
238235ef
DJ
10103 cat $tmp/in >>$tmp/config.h
10104 rm -f $tmp/in
10105 if test x"$ac_file" != x-; then
10106 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
10107 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
10108echo "$as_me: $ac_file is unchanged" >&6;}
10109 else
10110 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
10111$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
3beb1315
HPN
10112 X"$ac_file" : 'X\(//\)[^/]' \| \
10113 X"$ac_file" : 'X\(//\)$' \| \
10114 X"$ac_file" : 'X\(/\)' \| \
10115 . : '\(.\)' 2>/dev/null ||
238235ef
DJ
10116echo X"$ac_file" |
10117 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10118 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10119 /^X\(\/\/\)$/{ s//\1/; q; }
10120 /^X\(\/\).*/{ s//\1/; q; }
10121 s/.*/./; q'`
10122 { if $as_mkdir_p; then
10123 mkdir -p "$ac_dir"
10124 else
10125 as_dir="$ac_dir"
10126 as_dirs=
10127 while test ! -d "$as_dir"; do
10128 as_dirs="$as_dir $as_dirs"
10129 as_dir=`(dirname "$as_dir") 2>/dev/null ||
10130$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
3beb1315
HPN
10131 X"$as_dir" : 'X\(//\)[^/]' \| \
10132 X"$as_dir" : 'X\(//\)$' \| \
10133 X"$as_dir" : 'X\(/\)' \| \
10134 . : '\(.\)' 2>/dev/null ||
238235ef
DJ
10135echo X"$as_dir" |
10136 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10137 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10138 /^X\(\/\/\)$/{ s//\1/; q; }
10139 /^X\(\/\).*/{ s//\1/; q; }
10140 s/.*/./; q'`
10141 done
10142 test ! -n "$as_dirs" || mkdir $as_dirs
10143 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
10144echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
10145 { (exit 1); exit 1; }; }; }
0bc0cd11 10146
238235ef
DJ
10147 rm -f $ac_file
10148 mv $tmp/config.h $ac_file
10149 fi
10150 else
10151 cat $tmp/config.h
10152 rm -f $tmp/config.h
10153 fi
10154done
10155_ACEOF
10156cat >>$CONFIG_STATUS <<\_ACEOF
0bc0cd11 10157
238235ef
DJ
10158#
10159# CONFIG_COMMANDS section.
10160#
10161for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
10162 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
10163 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
10164 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
10165$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
3beb1315
HPN
10166 X"$ac_dest" : 'X\(//\)[^/]' \| \
10167 X"$ac_dest" : 'X\(//\)$' \| \
10168 X"$ac_dest" : 'X\(/\)' \| \
10169 . : '\(.\)' 2>/dev/null ||
238235ef
DJ
10170echo X"$ac_dest" |
10171 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10172 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10173 /^X\(\/\/\)$/{ s//\1/; q; }
10174 /^X\(\/\).*/{ s//\1/; q; }
10175 s/.*/./; q'`
3beb1315
HPN
10176 { if $as_mkdir_p; then
10177 mkdir -p "$ac_dir"
10178 else
10179 as_dir="$ac_dir"
10180 as_dirs=
10181 while test ! -d "$as_dir"; do
10182 as_dirs="$as_dir $as_dirs"
10183 as_dir=`(dirname "$as_dir") 2>/dev/null ||
10184$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10185 X"$as_dir" : 'X\(//\)[^/]' \| \
10186 X"$as_dir" : 'X\(//\)$' \| \
10187 X"$as_dir" : 'X\(/\)' \| \
10188 . : '\(.\)' 2>/dev/null ||
10189echo X"$as_dir" |
10190 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10191 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10192 /^X\(\/\/\)$/{ s//\1/; q; }
10193 /^X\(\/\).*/{ s//\1/; q; }
10194 s/.*/./; q'`
10195 done
10196 test ! -n "$as_dirs" || mkdir $as_dirs
10197 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
10198echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
10199 { (exit 1); exit 1; }; }; }
10200
238235ef
DJ
10201 ac_builddir=.
10202
10203if test "$ac_dir" != .; then
10204 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
10205 # A "../" for each directory in $ac_dir_suffix.
10206 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
10207else
10208 ac_dir_suffix= ac_top_builddir=
10209fi
10210
10211case $srcdir in
10212 .) # No --srcdir option. We are building in place.
10213 ac_srcdir=.
10214 if test -z "$ac_top_builddir"; then
10215 ac_top_srcdir=.
10216 else
10217 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
10218 fi ;;
10219 [\\/]* | ?:[\\/]* ) # Absolute path.
10220 ac_srcdir=$srcdir$ac_dir_suffix;
10221 ac_top_srcdir=$srcdir ;;
10222 *) # Relative path.
10223 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
10224 ac_top_srcdir=$ac_top_builddir$srcdir ;;
10225esac
a4f74b58
KC
10226
10227# Do not use `cd foo && pwd` to compute absolute paths, because
10228# the directories may not exist.
10229case `pwd` in
10230.) ac_abs_builddir="$ac_dir";;
3beb1315 10231*)
a4f74b58
KC
10232 case "$ac_dir" in
10233 .) ac_abs_builddir=`pwd`;;
10234 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
10235 *) ac_abs_builddir=`pwd`/"$ac_dir";;
3beb1315
HPN
10236 esac;;
10237esac
a4f74b58 10238case $ac_abs_builddir in
3beb1315
HPN
10239.) ac_abs_top_builddir=${ac_top_builddir}.;;
10240*)
10241 case ${ac_top_builddir}. in
a4f74b58 10242 .) ac_abs_top_builddir=$ac_abs_builddir;;
3beb1315 10243 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
a4f74b58 10244 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
3beb1315
HPN
10245 esac;;
10246esac
a4f74b58 10247case $ac_abs_builddir in
3beb1315
HPN
10248.) ac_abs_srcdir=$ac_srcdir;;
10249*)
10250 case $ac_srcdir in
a4f74b58 10251 .) ac_abs_srcdir=$ac_abs_builddir;;
3beb1315 10252 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
a4f74b58 10253 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
3beb1315
HPN
10254 esac;;
10255esac
a4f74b58 10256case $ac_abs_builddir in
3beb1315
HPN
10257.) ac_abs_top_srcdir=$ac_top_srcdir;;
10258*)
10259 case $ac_top_srcdir in
a4f74b58 10260 .) ac_abs_top_srcdir=$ac_abs_builddir;;
3beb1315 10261 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
a4f74b58 10262 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
3beb1315
HPN
10263 esac;;
10264esac
238235ef
DJ
10265
10266
10267 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
10268echo "$as_me: executing $ac_dest commands" >&6;}
10269 case $ac_dest in
10270 default ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
0bc0cd11 10271if test -n "$CONFIG_FILES"; then
7b3ed47d 10272 if test -n "${with_target_subdir}"; then
0bc0cd11
JL
10273 # FIXME: We shouldn't need to set ac_file
10274 ac_file=Makefile
6706f116 10275 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
0bc0cd11
JL
10276 . ${libiberty_topdir}/config-ml.in
10277 fi
238235ef
DJ
10278fi ;;
10279 esac
10280done
10281_ACEOF
10282
10283cat >>$CONFIG_STATUS <<\_ACEOF
10284
10285{ (exit 0); exit 0; }
10286_ACEOF
0bc0cd11 10287chmod +x $CONFIG_STATUS
238235ef
DJ
10288ac_clean_files=$ac_clean_files_save
10289
10290
10291# configure is writing to config.log, and then calls config.status.
10292# config.status does its own redirection, appending to config.log.
10293# Unfortunately, on DOS this fails, as config.log is still kept open
10294# by configure, so config.status won't be able to write to it; its
10295# output is simply discarded. So we exec the FD to /dev/null,
10296# effectively closing config.log, so it can be properly (re)opened and
10297# appended to by config.status. When coming back to configure, we
10298# need to make the FD available again.
10299if test "$no_create" != yes; then
10300 ac_cs_success=:
10301 ac_config_status_args=
10302 test "$silent" = yes &&
10303 ac_config_status_args="$ac_config_status_args --quiet"
10304 exec 5>/dev/null
10305 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
10306 exec 5>>config.log
10307 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
10308 # would make configure fail if this is the last instruction.
10309 $ac_cs_success || { (exit 1); exit 1; }
10310fi
0bc0cd11 10311