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