]> git.ipfire.org Git - thirdparty/gcc.git/blame - libiberty/configure
ifcvt.c (total_bb_rtx_cost): Rename function to cheap_bb_rtx_cost_p.
[thirdparty/gcc.git] / libiberty / configure
CommitLineData
0bc0cd11 1#! /bin/sh
0bc0cd11 2# Guess values for system-dependent variables and create Makefiles.
a4f74b58 3# Generated by GNU Autoconf 2.59.
0bc0cd11 4#
3beb1315 5# Copyright (C) 2003 Free Software Foundation, Inc.
0bc0cd11
JL
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
238235ef
DJ
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
11
12# Be Bourne compatible
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
21fi
3beb1315 22DUALCASE=1; export DUALCASE # for MKS sh
238235ef
DJ
23
24# Support unset when possible.
3beb1315 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
238235ef
DJ
26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
43do
3beb1315 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
238235ef
DJ
45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
48 fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54else
55 as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
66as_me=`$as_basename "$0" ||
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
76
77
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
96 rm -f conf$$.sh
97fi
98
99
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
116
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
137 /*)
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
166 N
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
210 fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
217
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
3beb1315 221 test -d ./-p && rmdir ./-p
238235ef
DJ
222 as_mkdir_p=false
223fi
224
225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
3beb1315 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
238235ef
DJ
229
230# Sed expression to map a string onto a valid variable name.
3beb1315 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
238235ef
DJ
232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
241$as_unset CDPATH
242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
0bc0cd11 250
238235ef
DJ
251#
252# Initializations.
253#
0bc0cd11 254ac_default_prefix=/usr/local
238235ef
DJ
255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
274ac_unique_file="xmalloc.c"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
b033df90 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
7b3ed47d 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); } &&
7b3ed47d 2333 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
2334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2335 (eval $ac_try) 2>&5
2336 ac_status=$?
2337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2338 (exit $ac_status); }; } &&
2339 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
2340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2341 (eval $ac_try) 2>&5
2342 ac_status=$?
2343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2344 (exit $ac_status); }; }; then
2345 ac_compiler_gnu=yes
2346else
2347 echo "$as_me: failed program was:" >&5
2348sed 's/^/| /' conftest.$ac_ext >&5
2349
2350ac_compiler_gnu=no
2351fi
3beb1315 2352rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef
DJ
2353ac_cv_c_compiler_gnu=$ac_compiler_gnu
2354
2355fi
2356echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2357echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2358GCC=`test $ac_compiler_gnu = yes && echo yes`
2359ac_test_CFLAGS=${CFLAGS+set}
2360ac_save_CFLAGS=$CFLAGS
2361CFLAGS="-g"
2362echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2363echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2364if test "${ac_cv_prog_cc_g+set}" = set; then
2365 echo $ECHO_N "(cached) $ECHO_C" >&6
2366else
2367 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
2368/* confdefs.h. */
2369_ACEOF
2370cat confdefs.h >>conftest.$ac_ext
2371cat >>conftest.$ac_ext <<_ACEOF
2372/* end confdefs.h. */
7fda878c 2373
238235ef
DJ
2374int
2375main ()
2376{
7fda878c 2377
238235ef
DJ
2378 ;
2379 return 0;
2380}
2381_ACEOF
2382rm -f conftest.$ac_objext
2383if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 2384 (eval $ac_compile) 2>conftest.er1
238235ef 2385 ac_status=$?
3beb1315
HPN
2386 grep -v '^ *+' conftest.er1 >conftest.err
2387 rm -f conftest.er1
2388 cat conftest.err >&5
238235ef
DJ
2389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2390 (exit $ac_status); } &&
7b3ed47d 2391 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
2392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2393 (eval $ac_try) 2>&5
2394 ac_status=$?
2395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2396 (exit $ac_status); }; } &&
2397 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
2398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2399 (eval $ac_try) 2>&5
2400 ac_status=$?
2401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2402 (exit $ac_status); }; }; then
2403 ac_cv_prog_cc_g=yes
2404else
2405 echo "$as_me: failed program was:" >&5
2406sed 's/^/| /' conftest.$ac_ext >&5
0bc0cd11 2407
238235ef
DJ
2408ac_cv_prog_cc_g=no
2409fi
3beb1315 2410rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef
DJ
2411fi
2412echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2413echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2414if test "$ac_test_CFLAGS" = set; then
2415 CFLAGS=$ac_save_CFLAGS
2416elif test $ac_cv_prog_cc_g = yes; then
0bc0cd11 2417 if test "$GCC" = yes; then
238235ef 2418 CFLAGS="-g -O2"
0bc0cd11 2419 else
238235ef 2420 CFLAGS="-g"
0bc0cd11
JL
2421 fi
2422else
238235ef
DJ
2423 if test "$GCC" = yes; then
2424 CFLAGS="-O2"
2425 else
2426 CFLAGS=
2427 fi
0bc0cd11 2428fi
238235ef
DJ
2429echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2430echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2431if test "${ac_cv_prog_cc_stdc+set}" = set; then
2432 echo $ECHO_N "(cached) $ECHO_C" >&6
2433else
2434 ac_cv_prog_cc_stdc=no
2435ac_save_CC=$CC
2436cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
2437/* confdefs.h. */
2438_ACEOF
2439cat confdefs.h >>conftest.$ac_ext
2440cat >>conftest.$ac_ext <<_ACEOF
2441/* end confdefs.h. */
2442#include <stdarg.h>
2443#include <stdio.h>
2444#include <sys/types.h>
2445#include <sys/stat.h>
2446/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2447struct buf { int x; };
2448FILE * (*rcsopen) (struct buf *, struct stat *, int);
2449static char *e (p, i)
2450 char **p;
2451 int i;
2452{
2453 return p[i];
d1209685 2454}
238235ef
DJ
2455static char *f (char * (*g) (char **, int), char **p, ...)
2456{
2457 char *s;
2458 va_list v;
2459 va_start (v,p);
2460 s = g (p, va_arg (v,int));
2461 va_end (v);
2462 return s;
d1209685 2463}
3beb1315
HPN
2464
2465/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2466 function prototypes and stuff, but not '\xHH' hex character constants.
2467 These don't provoke an error unfortunately, instead are silently treated
2468 as 'x'. The following induces an error, until -std1 is added to get
2469 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2470 array size at least. It's necessary to write '\x00'==0 to get something
2471 that's true only with -std1. */
2472int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2473
238235ef
DJ
2474int test (int i, double x);
2475struct s1 {int (*f) (int a);};
2476struct s2 {int (*f) (double a);};
2477int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2478int argc;
2479char **argv;
2480int
2481main ()
2482{
2483return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2484 ;
2485 return 0;
d1209685 2486}
238235ef
DJ
2487_ACEOF
2488# Don't try gcc -ansi; that turns off useful extensions and
2489# breaks some systems' header files.
2490# AIX -qlanglvl=ansi
2491# Ultrix and OSF/1 -std1
2492# HP-UX 10.20 and later -Ae
2493# HP-UX older versions -Aa -D_HPUX_SOURCE
2494# SVR4 -Xc -D__EXTENSIONS__
2495for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2496do
2497 CC="$ac_save_CC $ac_arg"
2498 rm -f conftest.$ac_objext
2499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 2500 (eval $ac_compile) 2>conftest.er1
238235ef 2501 ac_status=$?
3beb1315
HPN
2502 grep -v '^ *+' conftest.er1 >conftest.err
2503 rm -f conftest.er1
2504 cat conftest.err >&5
238235ef
DJ
2505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2506 (exit $ac_status); } &&
7b3ed47d 2507 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
2508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2509 (eval $ac_try) 2>&5
2510 ac_status=$?
2511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2512 (exit $ac_status); }; } &&
2513 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
2514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2515 (eval $ac_try) 2>&5
2516 ac_status=$?
2517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2518 (exit $ac_status); }; }; then
2519 ac_cv_prog_cc_stdc=$ac_arg
2520break
2521else
2522 echo "$as_me: failed program was:" >&5
2523sed 's/^/| /' conftest.$ac_ext >&5
2524
2525fi
3beb1315 2526rm -f conftest.err conftest.$ac_objext
238235ef
DJ
2527done
2528rm -f conftest.$ac_ext conftest.$ac_objext
2529CC=$ac_save_CC
2530
2531fi
2532
2533case "x$ac_cv_prog_cc_stdc" in
2534 x|xno)
2535 echo "$as_me:$LINENO: result: none needed" >&5
2536echo "${ECHO_T}none needed" >&6 ;;
2537 *)
2538 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2539echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2540 CC="$CC $ac_cv_prog_cc_stdc" ;;
2541esac
2542
2543# Some people use a C++ compiler to compile C. Since we use `exit',
2544# in C++ we need to declare it. In case someone uses the same compiler
2545# for both compiling C and C++ we need to have the C++ compiler decide
2546# the declaration of exit, since it's the most demanding environment.
2547cat >conftest.$ac_ext <<_ACEOF
2548#ifndef __cplusplus
2549 choke me
2550#endif
2551_ACEOF
2552rm -f conftest.$ac_objext
2553if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 2554 (eval $ac_compile) 2>conftest.er1
238235ef 2555 ac_status=$?
3beb1315
HPN
2556 grep -v '^ *+' conftest.er1 >conftest.err
2557 rm -f conftest.er1
2558 cat conftest.err >&5
238235ef
DJ
2559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2560 (exit $ac_status); } &&
7b3ed47d 2561 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
2562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2563 (eval $ac_try) 2>&5
2564 ac_status=$?
2565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2566 (exit $ac_status); }; } &&
2567 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
2568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2569 (eval $ac_try) 2>&5
2570 ac_status=$?
2571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2572 (exit $ac_status); }; }; then
2573 for ac_declaration in \
3beb1315 2574 '' \
238235ef
DJ
2575 'extern "C" void std::exit (int) throw (); using std::exit;' \
2576 'extern "C" void std::exit (int); using std::exit;' \
2577 'extern "C" void exit (int) throw ();' \
2578 'extern "C" void exit (int);' \
2579 'void exit (int);'
2580do
2581 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
2582/* confdefs.h. */
2583_ACEOF
2584cat confdefs.h >>conftest.$ac_ext
2585cat >>conftest.$ac_ext <<_ACEOF
2586/* end confdefs.h. */
c0590bfd 2587$ac_declaration
3beb1315 2588#include <stdlib.h>
238235ef
DJ
2589int
2590main ()
2591{
2592exit (42);
2593 ;
2594 return 0;
d1209685 2595}
238235ef
DJ
2596_ACEOF
2597rm -f conftest.$ac_objext
2598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 2599 (eval $ac_compile) 2>conftest.er1
238235ef 2600 ac_status=$?
3beb1315
HPN
2601 grep -v '^ *+' conftest.er1 >conftest.err
2602 rm -f conftest.er1
2603 cat conftest.err >&5
238235ef
DJ
2604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2605 (exit $ac_status); } &&
7b3ed47d 2606 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
2607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2608 (eval $ac_try) 2>&5
2609 ac_status=$?
2610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2611 (exit $ac_status); }; } &&
2612 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
2613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2614 (eval $ac_try) 2>&5
2615 ac_status=$?
2616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2617 (exit $ac_status); }; }; then
2618 :
2619else
2620 echo "$as_me: failed program was:" >&5
2621sed 's/^/| /' conftest.$ac_ext >&5
2622
2623continue
2624fi
3beb1315 2625rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef 2626 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
2627/* confdefs.h. */
2628_ACEOF
2629cat confdefs.h >>conftest.$ac_ext
2630cat >>conftest.$ac_ext <<_ACEOF
2631/* end confdefs.h. */
2632$ac_declaration
2633int
2634main ()
2635{
2636exit (42);
2637 ;
2638 return 0;
d1209685 2639}
238235ef
DJ
2640_ACEOF
2641rm -f conftest.$ac_objext
2642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 2643 (eval $ac_compile) 2>conftest.er1
238235ef 2644 ac_status=$?
3beb1315
HPN
2645 grep -v '^ *+' conftest.er1 >conftest.err
2646 rm -f conftest.er1
2647 cat conftest.err >&5
238235ef
DJ
2648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2649 (exit $ac_status); } &&
7b3ed47d 2650 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
2651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2652 (eval $ac_try) 2>&5
2653 ac_status=$?
2654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2655 (exit $ac_status); }; } &&
2656 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
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); }; }; then
2662 break
2663else
2664 echo "$as_me: failed program was:" >&5
2665sed 's/^/| /' conftest.$ac_ext >&5
d1209685 2666
238235ef 2667fi
3beb1315 2668rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef
DJ
2669done
2670rm -f conftest*
2671if test -n "$ac_declaration"; then
2672 echo '#ifdef __cplusplus' >>confdefs.h
2673 echo $ac_declaration >>confdefs.h
2674 echo '#endif' >>confdefs.h
2675fi
2676
2677else
2678 echo "$as_me: failed program was:" >&5
2679sed 's/^/| /' conftest.$ac_ext >&5
2680
2681fi
3beb1315 2682rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef
DJ
2683ac_ext=c
2684ac_cpp='$CPP $CPPFLAGS'
2685ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2686ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2687ac_compiler_gnu=$ac_cv_c_compiler_gnu
2688
b033df90
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
2694echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2695echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2696# On Suns, sometimes $CPP names a directory.
2697if test -n "$CPP" && test -d "$CPP"; then
2698 CPP=
2699fi
2700if test -z "$CPP"; then
2701 if test "${ac_cv_prog_CPP+set}" = set; then
2702 echo $ECHO_N "(cached) $ECHO_C" >&6
2703else
2704 # Double quotes because CPP needs to be expanded
2705 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2706 do
2707 ac_preproc_ok=false
2708for ac_c_preproc_warn_flag in '' yes
2709do
2710 # Use a header file that comes with gcc, so configuring glibc
2711 # with a fresh cross-compiler works.
2712 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2713 # <limits.h> exists even on freestanding compilers.
2714 # On the NeXT, cc -E runs the code through the compiler's parser,
2715 # not just through cpp. "Syntax error" is here to catch this case.
2716 cat >conftest.$ac_ext <<_ACEOF
b033df90
DJ
2717/* confdefs.h. */
2718_ACEOF
2719cat confdefs.h >>conftest.$ac_ext
2720cat >>conftest.$ac_ext <<_ACEOF
2721/* end confdefs.h. */
2722#ifdef __STDC__
2723# include <limits.h>
2724#else
2725# include <assert.h>
2726#endif
3beb1315 2727 Syntax error
b033df90
DJ
2728_ACEOF
2729if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2730 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2731 ac_status=$?
2732 grep -v '^ *+' conftest.er1 >conftest.err
2733 rm -f conftest.er1
2734 cat conftest.err >&5
2735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2736 (exit $ac_status); } >/dev/null; then
2737 if test -s conftest.err; then
2738 ac_cpp_err=$ac_c_preproc_warn_flag
3beb1315 2739 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
b033df90
DJ
2740 else
2741 ac_cpp_err=
2742 fi
2743else
2744 ac_cpp_err=yes
2745fi
2746if test -z "$ac_cpp_err"; then
2747 :
2748else
2749 echo "$as_me: failed program was:" >&5
2750sed 's/^/| /' conftest.$ac_ext >&5
2751
2752 # Broken: fails on valid input.
2753continue
2754fi
2755rm -f conftest.err conftest.$ac_ext
2756
2757 # OK, works on sane cases. Now check whether non-existent headers
2758 # can be detected and how.
2759 cat >conftest.$ac_ext <<_ACEOF
b033df90
DJ
2760/* confdefs.h. */
2761_ACEOF
2762cat confdefs.h >>conftest.$ac_ext
2763cat >>conftest.$ac_ext <<_ACEOF
2764/* end confdefs.h. */
2765#include <ac_nonexistent.h>
2766_ACEOF
2767if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2768 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2769 ac_status=$?
2770 grep -v '^ *+' conftest.er1 >conftest.err
2771 rm -f conftest.er1
2772 cat conftest.err >&5
2773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2774 (exit $ac_status); } >/dev/null; then
2775 if test -s conftest.err; then
2776 ac_cpp_err=$ac_c_preproc_warn_flag
3beb1315 2777 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
b033df90
DJ
2778 else
2779 ac_cpp_err=
2780 fi
2781else
2782 ac_cpp_err=yes
2783fi
2784if test -z "$ac_cpp_err"; then
2785 # Broken: success on invalid input.
2786continue
2787else
2788 echo "$as_me: failed program was:" >&5
2789sed 's/^/| /' conftest.$ac_ext >&5
2790
2791 # Passes both tests.
2792ac_preproc_ok=:
2793break
2794fi
2795rm -f conftest.err conftest.$ac_ext
2796
2797done
2798# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2799rm -f conftest.err conftest.$ac_ext
2800if $ac_preproc_ok; then
2801 break
2802fi
2803
2804 done
2805 ac_cv_prog_CPP=$CPP
2806
2807fi
2808 CPP=$ac_cv_prog_CPP
2809else
2810 ac_cv_prog_CPP=$CPP
2811fi
2812echo "$as_me:$LINENO: result: $CPP" >&5
2813echo "${ECHO_T}$CPP" >&6
2814ac_preproc_ok=false
2815for ac_c_preproc_warn_flag in '' yes
2816do
2817 # Use a header file that comes with gcc, so configuring glibc
2818 # with a fresh cross-compiler works.
2819 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2820 # <limits.h> exists even on freestanding compilers.
2821 # On the NeXT, cc -E runs the code through the compiler's parser,
2822 # not just through cpp. "Syntax error" is here to catch this case.
2823 cat >conftest.$ac_ext <<_ACEOF
b033df90
DJ
2824/* confdefs.h. */
2825_ACEOF
2826cat confdefs.h >>conftest.$ac_ext
2827cat >>conftest.$ac_ext <<_ACEOF
2828/* end confdefs.h. */
2829#ifdef __STDC__
2830# include <limits.h>
2831#else
2832# include <assert.h>
2833#endif
3beb1315 2834 Syntax error
b033df90
DJ
2835_ACEOF
2836if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2837 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2838 ac_status=$?
2839 grep -v '^ *+' conftest.er1 >conftest.err
2840 rm -f conftest.er1
2841 cat conftest.err >&5
2842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2843 (exit $ac_status); } >/dev/null; then
2844 if test -s conftest.err; then
2845 ac_cpp_err=$ac_c_preproc_warn_flag
3beb1315 2846 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
b033df90
DJ
2847 else
2848 ac_cpp_err=
2849 fi
2850else
2851 ac_cpp_err=yes
2852fi
2853if test -z "$ac_cpp_err"; then
2854 :
2855else
2856 echo "$as_me: failed program was:" >&5
2857sed 's/^/| /' conftest.$ac_ext >&5
2858
2859 # Broken: fails on valid input.
2860continue
2861fi
2862rm -f conftest.err conftest.$ac_ext
2863
2864 # OK, works on sane cases. Now check whether non-existent headers
2865 # can be detected and how.
2866 cat >conftest.$ac_ext <<_ACEOF
b033df90
DJ
2867/* confdefs.h. */
2868_ACEOF
2869cat confdefs.h >>conftest.$ac_ext
2870cat >>conftest.$ac_ext <<_ACEOF
2871/* end confdefs.h. */
2872#include <ac_nonexistent.h>
2873_ACEOF
2874if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2875 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2876 ac_status=$?
2877 grep -v '^ *+' conftest.er1 >conftest.err
2878 rm -f conftest.er1
2879 cat conftest.err >&5
2880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2881 (exit $ac_status); } >/dev/null; then
2882 if test -s conftest.err; then
2883 ac_cpp_err=$ac_c_preproc_warn_flag
3beb1315 2884 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
b033df90
DJ
2885 else
2886 ac_cpp_err=
2887 fi
2888else
2889 ac_cpp_err=yes
2890fi
2891if test -z "$ac_cpp_err"; then
2892 # Broken: success on invalid input.
2893continue
2894else
2895 echo "$as_me: failed program was:" >&5
2896sed 's/^/| /' conftest.$ac_ext >&5
2897
2898 # Passes both tests.
2899ac_preproc_ok=:
2900break
2901fi
2902rm -f conftest.err conftest.$ac_ext
2903
2904done
2905# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2906rm -f conftest.err conftest.$ac_ext
2907if $ac_preproc_ok; then
2908 :
2909else
2910 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2911See \`config.log' for more details." >&5
2912echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2913See \`config.log' for more details." >&2;}
2914 { (exit 1); exit 1; }; }
2915fi
2916
2917ac_ext=c
2918ac_cpp='$CPP $CPPFLAGS'
2919ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2920ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2921ac_compiler_gnu=$ac_cv_c_compiler_gnu
2922
2923
2924ac_c_preproc_warn_flag=yes
238235ef
DJ
2925
2926if test x$GCC = xyes; then
2927 ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
2928fi
2929
2930
2931if test "x$CC" != xcc; then
2932 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2933echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2934else
2935 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2936echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2937fi
2938set dummy $CC; ac_cc=`echo $2 |
2939 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2940if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2941 echo $ECHO_N "(cached) $ECHO_C" >&6
2942else
2943 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
2944/* confdefs.h. */
2945_ACEOF
2946cat confdefs.h >>conftest.$ac_ext
2947cat >>conftest.$ac_ext <<_ACEOF
2948/* end confdefs.h. */
2949
2950int
2951main ()
2952{
2953
2954 ;
2955 return 0;
2956}
2957_ACEOF
2958# Make sure it works both with $CC and with simple cc.
2959# We do the test twice because some compilers refuse to overwrite an
2960# existing .o file with -o, though they will create one.
2961ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2962if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2963 (eval $ac_try) 2>&5
2964 ac_status=$?
2965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2966 (exit $ac_status); } &&
2967 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2968 (eval $ac_try) 2>&5
2969 ac_status=$?
2970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2971 (exit $ac_status); };
2972then
2973 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2974 if test "x$CC" != xcc; then
2975 # Test first that cc exists at all.
2976 if { ac_try='cc -c conftest.$ac_ext >&5'
2977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2978 (eval $ac_try) 2>&5
2979 ac_status=$?
2980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2981 (exit $ac_status); }; }; then
2982 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2983 if { (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); } &&
2988 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2989 (eval $ac_try) 2>&5
2990 ac_status=$?
2991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2992 (exit $ac_status); };
2993 then
3beb1315
HPN
2994 # cc works too.
2995 :
238235ef 2996 else
3beb1315
HPN
2997 # cc exists but doesn't like -o.
2998 eval ac_cv_prog_cc_${ac_cc}_c_o=no
238235ef
DJ
2999 fi
3000 fi
3001 fi
d1209685 3002else
238235ef 3003 eval ac_cv_prog_cc_${ac_cc}_c_o=no
d1209685
ZW
3004fi
3005rm -f conftest*
238235ef
DJ
3006
3007fi
3008if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
3009 echo "$as_me:$LINENO: result: yes" >&5
3010echo "${ECHO_T}yes" >&6
3011else
3012 echo "$as_me:$LINENO: result: no" >&5
3013echo "${ECHO_T}no" >&6
3014
3015cat >>confdefs.h <<\_ACEOF
3016#define NO_MINUS_C_MINUS_O 1
3017_ACEOF
3018
3019fi
3020
3021# autoconf is lame and doesn't give us any substitution variable for this.
3022if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
3023 NO_MINUS_C_MINUS_O=yes
3024else
3025 OUTPUT_OPTION='-o $@'
d1209685
ZW
3026fi
3027
238235ef
DJ
3028
3029
3030
3031echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3032echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3033if test "${ac_cv_c_const+set}" = set; then
3034 echo $ECHO_N "(cached) $ECHO_C" >&6
3035else
3036 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
3037/* confdefs.h. */
3038_ACEOF
3039cat confdefs.h >>conftest.$ac_ext
3040cat >>conftest.$ac_ext <<_ACEOF
3041/* end confdefs.h. */
3042
3043int
3044main ()
3045{
3046/* FIXME: Include the comments suggested by Paul. */
3047#ifndef __cplusplus
3048 /* Ultrix mips cc rejects this. */
3049 typedef int charset[2];
3050 const charset x;
3051 /* SunOS 4.1.1 cc rejects this. */
3052 char const *const *ccp;
3053 char **p;
3054 /* NEC SVR4.0.2 mips cc rejects this. */
3055 struct point {int x, y;};
3056 static struct point const zero = {0,0};
3057 /* AIX XL C 1.02.0.0 rejects this.
3058 It does not let you subtract one const X* pointer from another in
3059 an arm of an if-expression whose if-part is not a constant
3060 expression */
3061 const char *g = "string";
3062 ccp = &g + (g ? g-g : 0);
3063 /* HPUX 7.0 cc rejects these. */
3064 ++ccp;
3065 p = (char**) ccp;
3066 ccp = (char const *const *) p;
3067 { /* SCO 3.2v4 cc rejects this. */
3068 char *t;
3069 char const *s = 0 ? (char *) 0 : (char const *) 0;
3070
3071 *t++ = 0;
3072 }
3073 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3074 int x[] = {25, 17};
3075 const int *foo = &x[0];
3076 ++foo;
3077 }
3078 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3079 typedef const int *iptr;
3080 iptr p = 0;
3081 ++p;
3082 }
3083 { /* AIX XL C 1.02.0.0 rejects this saying
3084 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3085 struct s { int j; const int *ap[3]; };
3086 struct s *b; b->j = 5;
3087 }
3088 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3089 const int foo = 10;
3090 }
3091#endif
3092
3093 ;
3094 return 0;
3095}
3096_ACEOF
3097rm -f conftest.$ac_objext
3098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 3099 (eval $ac_compile) 2>conftest.er1
238235ef 3100 ac_status=$?
3beb1315
HPN
3101 grep -v '^ *+' conftest.er1 >conftest.err
3102 rm -f conftest.er1
3103 cat conftest.err >&5
238235ef
DJ
3104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3105 (exit $ac_status); } &&
7b3ed47d 3106 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
3107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3108 (eval $ac_try) 2>&5
3109 ac_status=$?
3110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3111 (exit $ac_status); }; } &&
3112 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
3113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3114 (eval $ac_try) 2>&5
3115 ac_status=$?
3116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3117 (exit $ac_status); }; }; then
3118 ac_cv_c_const=yes
3119else
3120 echo "$as_me: failed program was:" >&5
3121sed 's/^/| /' conftest.$ac_ext >&5
3122
3123ac_cv_c_const=no
3124fi
3beb1315 3125rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef
DJ
3126fi
3127echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3128echo "${ECHO_T}$ac_cv_c_const" >&6
d1209685 3129if test $ac_cv_c_const = no; then
238235ef
DJ
3130
3131cat >>confdefs.h <<\_ACEOF
3132#define const
3133_ACEOF
d1209685
ZW
3134
3135fi
3136
238235ef
DJ
3137echo "$as_me:$LINENO: checking for inline" >&5
3138echo $ECHO_N "checking for inline... $ECHO_C" >&6
3139if test "${ac_cv_c_inline+set}" = set; then
3140 echo $ECHO_N "(cached) $ECHO_C" >&6
d1209685
ZW
3141else
3142 ac_cv_c_inline=no
3143for ac_kw in inline __inline__ __inline; do
238235ef 3144 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
3145/* confdefs.h. */
3146_ACEOF
3147cat confdefs.h >>conftest.$ac_ext
3148cat >>conftest.$ac_ext <<_ACEOF
3149/* end confdefs.h. */
3150#ifndef __cplusplus
3151typedef int foo_t;
3152static $ac_kw foo_t static_foo () {return 0; }
3153$ac_kw foo_t foo () {return 0; }
3154#endif
d1209685 3155
238235ef
DJ
3156_ACEOF
3157rm -f conftest.$ac_objext
3158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 3159 (eval $ac_compile) 2>conftest.er1
238235ef 3160 ac_status=$?
3beb1315
HPN
3161 grep -v '^ *+' conftest.er1 >conftest.err
3162 rm -f conftest.er1
3163 cat conftest.err >&5
238235ef
DJ
3164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3165 (exit $ac_status); } &&
7b3ed47d 3166 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
3167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3168 (eval $ac_try) 2>&5
3169 ac_status=$?
3170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3171 (exit $ac_status); }; } &&
3172 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
3173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3174 (eval $ac_try) 2>&5
3175 ac_status=$?
3176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3177 (exit $ac_status); }; }; then
d1209685
ZW
3178 ac_cv_c_inline=$ac_kw; break
3179else
238235ef
DJ
3180 echo "$as_me: failed program was:" >&5
3181sed 's/^/| /' conftest.$ac_ext >&5
3182
d1209685 3183fi
3beb1315 3184rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d1209685
ZW
3185done
3186
3187fi
238235ef
DJ
3188echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3189echo "${ECHO_T}$ac_cv_c_inline" >&6
3beb1315
HPN
3190
3191
238235ef 3192case $ac_cv_c_inline in
d1209685 3193 inline | yes) ;;
3beb1315
HPN
3194 *)
3195 case $ac_cv_c_inline in
3196 no) ac_val=;;
3197 *) ac_val=$ac_cv_c_inline;;
3198 esac
3199 cat >>confdefs.h <<_ACEOF
3200#ifndef __cplusplus
3201#define inline $ac_val
3202#endif
238235ef 3203_ACEOF
3beb1315 3204 ;;
d1209685
ZW
3205esac
3206
238235ef
DJ
3207echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
3208echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
3209if test "${ac_cv_c_bigendian+set}" = set; then
3210 echo $ECHO_N "(cached) $ECHO_C" >&6
5cc5a0d0
JM
3211else
3212 ac_cv_c_bigendian=unknown
3213# See if sys/param.h defines the BYTE_ORDER macro.
238235ef 3214cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
3215/* confdefs.h. */
3216_ACEOF
3217cat confdefs.h >>conftest.$ac_ext
3218cat >>conftest.$ac_ext <<_ACEOF
3219/* end confdefs.h. */
5cc5a0d0
JM
3220#include <sys/types.h>
3221#include <sys/param.h>
238235ef
DJ
3222int
3223main ()
3224{
5cc5a0d0
JM
3225
3226#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3227 bogus endian macros
3228#endif
238235ef
DJ
3229 ;
3230 return 0;
3231}
3232_ACEOF
3233rm -f conftest.$ac_objext
3234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 3235 (eval $ac_compile) 2>conftest.er1
238235ef 3236 ac_status=$?
3beb1315
HPN
3237 grep -v '^ *+' conftest.er1 >conftest.err
3238 rm -f conftest.er1
3239 cat conftest.err >&5
238235ef
DJ
3240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3241 (exit $ac_status); } &&
7b3ed47d 3242 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
3243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3244 (eval $ac_try) 2>&5
3245 ac_status=$?
3246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3247 (exit $ac_status); }; } &&
3248 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
3249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3250 (eval $ac_try) 2>&5
3251 ac_status=$?
3252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3253 (exit $ac_status); }; }; then
5cc5a0d0 3254 # It does; now see whether it defined to BIG_ENDIAN or not.
238235ef 3255cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
3256/* confdefs.h. */
3257_ACEOF
3258cat confdefs.h >>conftest.$ac_ext
3259cat >>conftest.$ac_ext <<_ACEOF
3260/* end confdefs.h. */
5cc5a0d0
JM
3261#include <sys/types.h>
3262#include <sys/param.h>
238235ef
DJ
3263int
3264main ()
3265{
5cc5a0d0
JM
3266
3267#if BYTE_ORDER != BIG_ENDIAN
3268 not big endian
3269#endif
238235ef
DJ
3270 ;
3271 return 0;
3272}
3273_ACEOF
3274rm -f conftest.$ac_objext
3275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 3276 (eval $ac_compile) 2>conftest.er1
238235ef 3277 ac_status=$?
3beb1315
HPN
3278 grep -v '^ *+' conftest.er1 >conftest.err
3279 rm -f conftest.er1
3280 cat conftest.err >&5
238235ef
DJ
3281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3282 (exit $ac_status); } &&
7b3ed47d 3283 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
3284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3285 (eval $ac_try) 2>&5
3286 ac_status=$?
3287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3288 (exit $ac_status); }; } &&
3289 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
3290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3291 (eval $ac_try) 2>&5
3292 ac_status=$?
3293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3294 (exit $ac_status); }; }; then
5cc5a0d0
JM
3295 ac_cv_c_bigendian=yes
3296else
238235ef
DJ
3297 echo "$as_me: failed program was:" >&5
3298sed 's/^/| /' conftest.$ac_ext >&5
3299
3300ac_cv_c_bigendian=no
5cc5a0d0 3301fi
3beb1315 3302rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5cc5a0d0 3303else
238235ef
DJ
3304 echo "$as_me: failed program was:" >&5
3305sed 's/^/| /' conftest.$ac_ext >&5
3306
5cc5a0d0 3307fi
3beb1315 3308rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5cc5a0d0
JM
3309if test $ac_cv_c_bigendian = unknown; then
3310if test "$cross_compiling" = yes; then
238235ef
DJ
3311 echo $ac_n "cross-compiling... " 2>&6
3312else
3313 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
3314/* confdefs.h. */
3315_ACEOF
3316cat confdefs.h >>conftest.$ac_ext
3317cat >>conftest.$ac_ext <<_ACEOF
3318/* end confdefs.h. */
5cc5a0d0
JM
3319main () {
3320 /* Are we little or big endian? From Harbison&Steele. */
3321 union
3322 {
3323 long l;
3324 char c[sizeof (long)];
3325 } u;
3326 u.l = 1;
3327 exit (u.c[sizeof (long) - 1] == 1);
3328}
238235ef
DJ
3329_ACEOF
3330rm -f conftest$ac_exeext
3331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3332 (eval $ac_link) 2>&5
3333 ac_status=$?
3334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3335 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3337 (eval $ac_try) 2>&5
3338 ac_status=$?
3339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3340 (exit $ac_status); }; }; then
5cc5a0d0
JM
3341 ac_cv_c_bigendian=no
3342else
238235ef
DJ
3343 echo "$as_me: program exited with status $ac_status" >&5
3344echo "$as_me: failed program was:" >&5
3345sed 's/^/| /' conftest.$ac_ext >&5
3346
3347( exit $ac_status )
3348ac_cv_c_bigendian=yes
5cc5a0d0 3349fi
3beb1315 3350rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5cc5a0d0 3351fi
5cc5a0d0
JM
3352fi
3353fi
238235ef
DJ
3354echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
3355echo "${ECHO_T}$ac_cv_c_bigendian" >&6
5cc5a0d0 3356if test $ac_cv_c_bigendian = unknown; then
238235ef
DJ
3357echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
3358echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
5cc5a0d0
JM
3359
3360cat >conftest.c <<EOF
3361short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3362short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3363void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3364short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3365short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3366void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3367int main() { _ascii (); _ebcdic (); return 0; }
3368EOF
3369 if test -f conftest.c ; then
3beb1315 3370 if ${CC-cc} ${CFLAGS} -c conftest.c -o conftest.o && test -f conftest.o ; then
5cc5a0d0
JM
3371 if test `grep -l BIGenDianSyS conftest.o` ; then
3372 echo $ac_n ' big endian probe OK, ' 1>&6
3373 ac_cv_c_bigendian=yes
3374 fi
3375 if test `grep -l LiTTleEnDian conftest.o` ; then
3376 echo $ac_n ' little endian probe OK, ' 1>&6
3377 if test $ac_cv_c_bigendian = yes ; then
3378 ac_cv_c_bigendian=unknown;
3379 else
3380 ac_cv_c_bigendian=no
3381 fi
3382 fi
3383 echo $ac_n 'guessing bigendian ... ' >&6
3384 fi
3385 fi
238235ef
DJ
3386echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
3387echo "${ECHO_T}$ac_cv_c_bigendian" >&6
5cc5a0d0
JM
3388fi
3389if test $ac_cv_c_bigendian = yes; then
238235ef
DJ
3390
3391cat >>confdefs.h <<\_ACEOF
5cc5a0d0 3392#define WORDS_BIGENDIAN 1
238235ef 3393_ACEOF
5cc5a0d0 3394
238235ef
DJ
3395
3396cat >>confdefs.h <<\_ACEOF
5cc5a0d0 3397#define HOST_WORDS_BIG_ENDIAN 1
238235ef 3398_ACEOF
5cc5a0d0
JM
3399
3400 BYTEORDER=4321
3401else
3402 BYTEORDER=1234
3403fi
238235ef
DJ
3404
3405cat >>confdefs.h <<_ACEOF
5cc5a0d0 3406#define BYTEORDER $BYTEORDER
238235ef 3407_ACEOF
5cc5a0d0
JM
3408
3409if test $ac_cv_c_bigendian = unknown; then
3beb1315
HPN
3410 { { echo "$as_me:$LINENO: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&5
3411echo "$as_me: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&2;}
3412 { (exit 1); exit 1; }; }
5cc5a0d0
JM
3413fi
3414
0bc0cd11
JL
3415
3416
3417
238235ef 3418 ac_config_headers="$ac_config_headers config.h:config.in"
0bc0cd11
JL
3419
3420
3421
3422# Find a good install program. We prefer a C program (faster),
3423# so one script is as good as another. But avoid the broken or
3424# incompatible versions:
3425# SysV /etc/install, /usr/sbin/install
3426# SunOS /usr/etc/install
3427# IRIX /sbin/install
3428# AIX /bin/install
238235ef 3429# AmigaOS /C/install, which installs bootblocks on floppy discs
0bc0cd11
JL
3430# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3431# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3432# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3beb1315 3433# OS/2's system install, which has a completely different semantic
0bc0cd11 3434# ./install, which can be erroneously created by make from ./install.sh.
238235ef
DJ
3435echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3436echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
0bc0cd11 3437if test -z "$INSTALL"; then
238235ef
DJ
3438if test "${ac_cv_path_install+set}" = set; then
3439 echo $ECHO_N "(cached) $ECHO_C" >&6
3440else
3441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3442for as_dir in $PATH
3443do
3444 IFS=$as_save_IFS
3445 test -z "$as_dir" && as_dir=.
3446 # Account for people who put trailing slashes in PATH elements.
3447case $as_dir/ in
3448 ./ | .// | /cC/* | \
3449 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3beb1315 3450 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
238235ef
DJ
3451 /usr/ucb/* ) ;;
3452 *)
3453 # OSF1 and SCO ODT 3.0 have their own names for install.
3454 # Don't use installbsd from OSF since it installs stuff as root
3455 # by default.
3456 for ac_prog in ginstall scoinst install; do
3457 for ac_exec_ext in '' $ac_executable_extensions; do
3beb1315
HPN
3458 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3459 if test $ac_prog = install &&
3460 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3461 # AIX install. It has an incompatible calling convention.
3462 :
3463 elif test $ac_prog = install &&
3464 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3465 # program-specific install script used by HP pwplus--don't use.
3466 :
3467 else
3468 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3469 break 3
3470 fi
3471 fi
0bc0cd11 3472 done
238235ef
DJ
3473 done
3474 ;;
3475esac
3476done
3477
0bc0cd11
JL
3478
3479fi
3480 if test "${ac_cv_path_install+set}" = set; then
238235ef 3481 INSTALL=$ac_cv_path_install
0bc0cd11
JL
3482 else
3483 # As a last resort, use the slow shell script. We don't cache a
3484 # path for INSTALL within a source directory, because that will
3485 # break other packages using the cache if that directory is
3486 # removed, or if the path is relative.
238235ef 3487 INSTALL=$ac_install_sh
0bc0cd11
JL
3488 fi
3489fi
238235ef
DJ
3490echo "$as_me:$LINENO: result: $INSTALL" >&5
3491echo "${ECHO_T}$INSTALL" >&6
0bc0cd11
JL
3492
3493# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3494# It thinks the first close brace ends the variable substitution.
3495test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3496
238235ef 3497test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
687361c8 3498
0bc0cd11
JL
3499test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3500
3501
3502. ${srcdir}/config.table
3503host_makefile_frag=${frag}
3504
3505
3506# It's OK to check for header files. Although the compiler may not be
3507# able to link anything, it had better be able to at least compile
3508# something.
238235ef
DJ
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
9bf3c9cc
RH
3532
3533for 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
238235ef
DJ
3534do
3535as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b033df90 3536echo "$as_me:$LINENO: checking for $ac_header" >&5
238235ef
DJ
3537echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3538if eval "test \"\${$as_ac_Header+set}\" = set"; then
3539 echo $ECHO_N "(cached) $ECHO_C" >&6
238235ef 3540else
b033df90 3541 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
3542/* confdefs.h. */
3543_ACEOF
3544cat confdefs.h >>conftest.$ac_ext
3545cat >>conftest.$ac_ext <<_ACEOF
3546/* end confdefs.h. */
3547#include <$ac_header>
3548_ACEOF
3549if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3550 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3551 ac_status=$?
3552 grep -v '^ *+' conftest.er1 >conftest.err
3553 rm -f conftest.er1
3554 cat conftest.err >&5
3555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3556 (exit $ac_status); } >/dev/null; then
3557 if test -s conftest.err; then
3558 ac_cpp_err=$ac_c_preproc_warn_flag
3beb1315 3559 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
238235ef
DJ
3560 else
3561 ac_cpp_err=
3562 fi
fdfc290b 3563else
238235ef
DJ
3564 ac_cpp_err=yes
3565fi
3566if test -z "$ac_cpp_err"; then
b033df90 3567 eval "$as_ac_Header=yes"
238235ef
DJ
3568else
3569 echo "$as_me: failed program was:" >&5
3570sed 's/^/| /' conftest.$ac_ext >&5
3571
b033df90 3572 eval "$as_ac_Header=no"
238235ef
DJ
3573fi
3574rm -f conftest.err conftest.$ac_ext
238235ef
DJ
3575fi
3576echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3577echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
238235ef
DJ
3578if test `eval echo '${'$as_ac_Header'}'` = yes; then
3579 cat >>confdefs.h <<_ACEOF
3580#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3581_ACEOF
3582
3583fi
238235ef
DJ
3584done
3585
3586echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
3587echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
3588if test "${ac_cv_header_sys_wait_h+set}" = set; then
3589 echo $ECHO_N "(cached) $ECHO_C" >&6
3590else
3591 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
3592/* confdefs.h. */
3593_ACEOF
3594cat confdefs.h >>conftest.$ac_ext
3595cat >>conftest.$ac_ext <<_ACEOF
3596/* end confdefs.h. */
d3982b71 3597#include <sys/types.h>
238235ef
DJ
3598#include <sys/wait.h>
3599#ifndef WEXITSTATUS
3600# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
fdfc290b 3601#endif
238235ef
DJ
3602#ifndef WIFEXITED
3603# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3604#endif
3605
3606int
3607main ()
3608{
3609 int s;
3610 wait (&s);
3611 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3612 ;
3613 return 0;
3614}
3615_ACEOF
3616rm -f conftest.$ac_objext
3617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 3618 (eval $ac_compile) 2>conftest.er1
238235ef 3619 ac_status=$?
3beb1315
HPN
3620 grep -v '^ *+' conftest.er1 >conftest.err
3621 rm -f conftest.er1
3622 cat conftest.err >&5
238235ef
DJ
3623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3624 (exit $ac_status); } &&
7b3ed47d 3625 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
3626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3627 (eval $ac_try) 2>&5
3628 ac_status=$?
3629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3630 (exit $ac_status); }; } &&
3631 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
3632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3633 (eval $ac_try) 2>&5
3634 ac_status=$?
3635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3636 (exit $ac_status); }; }; then
3637 ac_cv_header_sys_wait_h=yes
d3982b71 3638else
238235ef
DJ
3639 echo "$as_me: failed program was:" >&5
3640sed 's/^/| /' conftest.$ac_ext >&5
3641
3642ac_cv_header_sys_wait_h=no
d3982b71 3643fi
3beb1315 3644rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef
DJ
3645fi
3646echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3647echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3648if test $ac_cv_header_sys_wait_h = yes; then
3649
b033df90
DJ
3650cat >>confdefs.h <<\_ACEOF
3651#define HAVE_SYS_WAIT_H 1
3652_ACEOF
3653
3654fi
3655
3656echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
3657echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3658if test "${ac_cv_header_time+set}" = set; then
3659 echo $ECHO_N "(cached) $ECHO_C" >&6
3660else
3661 cat >conftest.$ac_ext <<_ACEOF
b033df90
DJ
3662/* confdefs.h. */
3663_ACEOF
3664cat confdefs.h >>conftest.$ac_ext
3665cat >>conftest.$ac_ext <<_ACEOF
3666/* end confdefs.h. */
3667#include <sys/types.h>
3668#include <sys/time.h>
3669#include <time.h>
3670
3671int
3672main ()
3673{
3674if ((struct tm *) 0)
3675return 0;
3676 ;
3677 return 0;
3678}
3679_ACEOF
3680rm -f conftest.$ac_objext
3681if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 3682 (eval $ac_compile) 2>conftest.er1
b033df90 3683 ac_status=$?
3beb1315
HPN
3684 grep -v '^ *+' conftest.er1 >conftest.err
3685 rm -f conftest.er1
3686 cat conftest.err >&5
b033df90
DJ
3687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3688 (exit $ac_status); } &&
7b3ed47d 3689 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
3690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3691 (eval $ac_try) 2>&5
3692 ac_status=$?
3693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3694 (exit $ac_status); }; } &&
3695 { ac_try='test -s conftest.$ac_objext'
b033df90
DJ
3696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3697 (eval $ac_try) 2>&5
3698 ac_status=$?
3699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3700 (exit $ac_status); }; }; then
3701 ac_cv_header_time=yes
3702else
3703 echo "$as_me: failed program was:" >&5
3704sed 's/^/| /' conftest.$ac_ext >&5
3705
3706ac_cv_header_time=no
3707fi
3beb1315 3708rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b033df90
DJ
3709fi
3710echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
3711echo "${ECHO_T}$ac_cv_header_time" >&6
3712if test $ac_cv_header_time = yes; then
3713
3714cat >>confdefs.h <<\_ACEOF
3715#define TIME_WITH_SYS_TIME 1
3716_ACEOF
3717
3718fi
3719
3720
3721echo "$as_me:$LINENO: checking whether errno must be declared" >&5
3722echo $ECHO_N "checking whether errno must be declared... $ECHO_C" >&6
3723if test "${libiberty_cv_declare_errno+set}" = set; then
3724 echo $ECHO_N "(cached) $ECHO_C" >&6
3725else
3726 cat >conftest.$ac_ext <<_ACEOF
b033df90
DJ
3727/* confdefs.h. */
3728_ACEOF
3729cat confdefs.h >>conftest.$ac_ext
3730cat >>conftest.$ac_ext <<_ACEOF
3731/* end confdefs.h. */
3732#include <errno.h>
3733int
3734main ()
3735{
3736int x = errno;
3737 ;
3738 return 0;
3739}
3740_ACEOF
3741rm -f conftest.$ac_objext
3742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 3743 (eval $ac_compile) 2>conftest.er1
b033df90 3744 ac_status=$?
3beb1315
HPN
3745 grep -v '^ *+' conftest.er1 >conftest.err
3746 rm -f conftest.er1
3747 cat conftest.err >&5
b033df90
DJ
3748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3749 (exit $ac_status); } &&
7b3ed47d 3750 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
3751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3752 (eval $ac_try) 2>&5
3753 ac_status=$?
3754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3755 (exit $ac_status); }; } &&
3756 { ac_try='test -s conftest.$ac_objext'
b033df90
DJ
3757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3758 (eval $ac_try) 2>&5
3759 ac_status=$?
3760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3761 (exit $ac_status); }; }; then
3762 libiberty_cv_declare_errno=no
3763else
3764 echo "$as_me: failed program was:" >&5
3765sed 's/^/| /' conftest.$ac_ext >&5
3766
3767libiberty_cv_declare_errno=yes
3768fi
3beb1315 3769rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b033df90
DJ
3770fi
3771echo "$as_me:$LINENO: result: $libiberty_cv_declare_errno" >&5
3772echo "${ECHO_T}$libiberty_cv_declare_errno" >&6
3773if test $libiberty_cv_declare_errno = yes
3774then
3775cat >>confdefs.h <<\_ACEOF
3776#define NEED_DECLARATION_ERRNO 1
3777_ACEOF
3778
3779fi
3780
3781
d49d0907 3782# Determine the size of an int for struct fibnode.
b033df90
DJ
3783echo "$as_me:$LINENO: checking for egrep" >&5
3784echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3785if test "${ac_cv_prog_egrep+set}" = set; then
3786 echo $ECHO_N "(cached) $ECHO_C" >&6
3787else
3788 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3789 then ac_cv_prog_egrep='grep -E'
3790 else ac_cv_prog_egrep='egrep'
3791 fi
3792fi
3793echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3794echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3795 EGREP=$ac_cv_prog_egrep
3796
3797
3798echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3799echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3800if test "${ac_cv_header_stdc+set}" = set; then
3801 echo $ECHO_N "(cached) $ECHO_C" >&6
3802else
3803 cat >conftest.$ac_ext <<_ACEOF
b033df90
DJ
3804/* confdefs.h. */
3805_ACEOF
3806cat confdefs.h >>conftest.$ac_ext
3807cat >>conftest.$ac_ext <<_ACEOF
3808/* end confdefs.h. */
3809#include <stdlib.h>
3810#include <stdarg.h>
3811#include <string.h>
3812#include <float.h>
3813
3814int
3815main ()
3816{
3817
3818 ;
3819 return 0;
3820}
3821_ACEOF
3822rm -f conftest.$ac_objext
3823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 3824 (eval $ac_compile) 2>conftest.er1
b033df90 3825 ac_status=$?
3beb1315
HPN
3826 grep -v '^ *+' conftest.er1 >conftest.err
3827 rm -f conftest.er1
3828 cat conftest.err >&5
b033df90
DJ
3829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3830 (exit $ac_status); } &&
7b3ed47d 3831 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
3832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3833 (eval $ac_try) 2>&5
3834 ac_status=$?
3835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3836 (exit $ac_status); }; } &&
3837 { ac_try='test -s conftest.$ac_objext'
b033df90
DJ
3838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3839 (eval $ac_try) 2>&5
3840 ac_status=$?
3841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3842 (exit $ac_status); }; }; then
3843 ac_cv_header_stdc=yes
3844else
3845 echo "$as_me: failed program was:" >&5
3846sed 's/^/| /' conftest.$ac_ext >&5
3847
3848ac_cv_header_stdc=no
3849fi
3beb1315 3850rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b033df90
DJ
3851
3852if test $ac_cv_header_stdc = yes; then
3853 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3854 cat >conftest.$ac_ext <<_ACEOF
b033df90
DJ
3855/* confdefs.h. */
3856_ACEOF
3857cat confdefs.h >>conftest.$ac_ext
3858cat >>conftest.$ac_ext <<_ACEOF
3859/* end confdefs.h. */
3860#include <string.h>
3861
3862_ACEOF
3863if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3864 $EGREP "memchr" >/dev/null 2>&1; then
3865 :
3866else
3867 ac_cv_header_stdc=no
3868fi
3869rm -f conftest*
3870
3871fi
3872
3873if test $ac_cv_header_stdc = yes; then
3874 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3875 cat >conftest.$ac_ext <<_ACEOF
b033df90
DJ
3876/* confdefs.h. */
3877_ACEOF
3878cat confdefs.h >>conftest.$ac_ext
3879cat >>conftest.$ac_ext <<_ACEOF
3880/* end confdefs.h. */
3881#include <stdlib.h>
3882
238235ef 3883_ACEOF
b033df90
DJ
3884if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3885 $EGREP "free" >/dev/null 2>&1; then
3886 :
3887else
3888 ac_cv_header_stdc=no
3889fi
3890rm -f conftest*
238235ef
DJ
3891
3892fi
3893
b033df90
DJ
3894if test $ac_cv_header_stdc = yes; then
3895 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3896 if test "$cross_compiling" = yes; then
3897 :
238235ef
DJ
3898else
3899 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
3900/* confdefs.h. */
3901_ACEOF
3902cat confdefs.h >>conftest.$ac_ext
3903cat >>conftest.$ac_ext <<_ACEOF
3904/* end confdefs.h. */
b033df90
DJ
3905#include <ctype.h>
3906#if ((' ' & 0x0FF) == 0x020)
3907# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3908# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3909#else
3910# define ISLOWER(c) \
3beb1315
HPN
3911 (('a' <= (c) && (c) <= 'i') \
3912 || ('j' <= (c) && (c) <= 'r') \
3913 || ('s' <= (c) && (c) <= 'z'))
b033df90
DJ
3914# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3915#endif
238235ef 3916
b033df90 3917#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
238235ef
DJ
3918int
3919main ()
3920{
b033df90
DJ
3921 int i;
3922 for (i = 0; i < 256; i++)
3923 if (XOR (islower (i), ISLOWER (i))
3beb1315 3924 || toupper (i) != TOUPPER (i))
b033df90
DJ
3925 exit(2);
3926 exit (0);
238235ef
DJ
3927}
3928_ACEOF
b033df90
DJ
3929rm -f conftest$ac_exeext
3930if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3931 (eval $ac_link) 2>&5
238235ef
DJ
3932 ac_status=$?
3933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b033df90 3934 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
238235ef
DJ
3935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3936 (eval $ac_try) 2>&5
3937 ac_status=$?
3938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3939 (exit $ac_status); }; }; then
b033df90 3940 :
238235ef 3941else
b033df90
DJ
3942 echo "$as_me: program exited with status $ac_status" >&5
3943echo "$as_me: failed program was:" >&5
238235ef
DJ
3944sed 's/^/| /' conftest.$ac_ext >&5
3945
b033df90
DJ
3946( exit $ac_status )
3947ac_cv_header_stdc=no
238235ef 3948fi
3beb1315 3949rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
238235ef 3950fi
b033df90
DJ
3951fi
3952fi
3953echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3954echo "${ECHO_T}$ac_cv_header_stdc" >&6
3955if test $ac_cv_header_stdc = yes; then
238235ef
DJ
3956
3957cat >>confdefs.h <<\_ACEOF
b033df90 3958#define STDC_HEADERS 1
238235ef
DJ
3959_ACEOF
3960
3961fi
3962
b033df90 3963# On IRIX 5.3, sys/types and inttypes.h are conflicting.
238235ef 3964
b033df90
DJ
3965
3966
3967
3968
3969
3970
3971
3972
3973for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3beb1315 3974 inttypes.h stdint.h unistd.h
b033df90
DJ
3975do
3976as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3977echo "$as_me:$LINENO: checking for $ac_header" >&5
3978echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3979if eval "test \"\${$as_ac_Header+set}\" = set"; then
238235ef
DJ
3980 echo $ECHO_N "(cached) $ECHO_C" >&6
3981else
3982 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
3983/* confdefs.h. */
3984_ACEOF
3985cat confdefs.h >>conftest.$ac_ext
3986cat >>conftest.$ac_ext <<_ACEOF
3987/* end confdefs.h. */
b033df90 3988#include <$ac_header>
238235ef 3989_ACEOF
b033df90
DJ
3990if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3991 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
238235ef 3992 ac_status=$?
b033df90
DJ
3993 grep -v '^ *+' conftest.er1 >conftest.err
3994 rm -f conftest.er1
3995 cat conftest.err >&5
238235ef 3996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b033df90
DJ
3997 (exit $ac_status); } >/dev/null; then
3998 if test -s conftest.err; then
3999 ac_cpp_err=$ac_c_preproc_warn_flag
3beb1315 4000 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
b033df90
DJ
4001 else
4002 ac_cpp_err=
4003 fi
4004else
4005 ac_cpp_err=yes
4006fi
4007if test -z "$ac_cpp_err"; then
4008 eval "$as_ac_Header=yes"
238235ef
DJ
4009else
4010 echo "$as_me: failed program was:" >&5
4011sed 's/^/| /' conftest.$ac_ext >&5
4012
b033df90 4013 eval "$as_ac_Header=no"
238235ef 4014fi
b033df90 4015rm -f conftest.err conftest.$ac_ext
238235ef 4016fi
b033df90
DJ
4017echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4018echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4019if test `eval echo '${'$as_ac_Header'}'` = yes; then
4020 cat >>confdefs.h <<_ACEOF
4021#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
238235ef
DJ
4022_ACEOF
4023
4024fi
b033df90 4025done
238235ef
DJ
4026
4027
d49d0907
BE
4028echo "$as_me:$LINENO: checking for int" >&5
4029echo $ECHO_N "checking for int... $ECHO_C" >&6
4030if test "${ac_cv_type_int+set}" = set; then
4031 echo $ECHO_N "(cached) $ECHO_C" >&6
4032else
4033 cat >conftest.$ac_ext <<_ACEOF
4034/* confdefs.h. */
4035_ACEOF
4036cat confdefs.h >>conftest.$ac_ext
4037cat >>conftest.$ac_ext <<_ACEOF
4038/* end confdefs.h. */
4039$ac_includes_default
4040int
4041main ()
4042{
4043if ((int *) 0)
4044 return 0;
4045if (sizeof (int))
4046 return 0;
4047 ;
4048 return 0;
4049}
4050_ACEOF
4051rm -f conftest.$ac_objext
4052if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4053 (eval $ac_compile) 2>conftest.er1
4054 ac_status=$?
4055 grep -v '^ *+' conftest.er1 >conftest.err
4056 rm -f conftest.er1
4057 cat conftest.err >&5
4058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4059 (exit $ac_status); } &&
4060 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4062 (eval $ac_try) 2>&5
4063 ac_status=$?
4064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4065 (exit $ac_status); }; } &&
4066 { ac_try='test -s conftest.$ac_objext'
4067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4068 (eval $ac_try) 2>&5
4069 ac_status=$?
4070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4071 (exit $ac_status); }; }; then
4072 ac_cv_type_int=yes
4073else
4074 echo "$as_me: failed program was:" >&5
4075sed 's/^/| /' conftest.$ac_ext >&5
4076
4077ac_cv_type_int=no
4078fi
4079rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4080fi
4081echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4082echo "${ECHO_T}$ac_cv_type_int" >&6
4083
4084echo "$as_me:$LINENO: checking size of int" >&5
4085echo $ECHO_N "checking size of int... $ECHO_C" >&6
4086if test "${ac_cv_sizeof_int+set}" = set; then
4087 echo $ECHO_N "(cached) $ECHO_C" >&6
4088else
4089 if test "$ac_cv_type_int" = yes; then
4090 # The cast to unsigned long works around a bug in the HP C Compiler
4091 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4092 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4093 # This bug is HP SR number 8606223364.
4094 if test "$cross_compiling" = yes; then
4095 # Depending upon the size, compute the lo and hi bounds.
4096cat >conftest.$ac_ext <<_ACEOF
4097/* confdefs.h. */
4098_ACEOF
4099cat confdefs.h >>conftest.$ac_ext
4100cat >>conftest.$ac_ext <<_ACEOF
4101/* end confdefs.h. */
4102$ac_includes_default
4103int
4104main ()
4105{
4106static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4107test_array [0] = 0
4108
4109 ;
4110 return 0;
4111}
4112_ACEOF
4113rm -f conftest.$ac_objext
4114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4115 (eval $ac_compile) 2>conftest.er1
4116 ac_status=$?
4117 grep -v '^ *+' conftest.er1 >conftest.err
4118 rm -f conftest.er1
4119 cat conftest.err >&5
4120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4121 (exit $ac_status); } &&
4122 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4124 (eval $ac_try) 2>&5
4125 ac_status=$?
4126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4127 (exit $ac_status); }; } &&
4128 { ac_try='test -s conftest.$ac_objext'
4129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4130 (eval $ac_try) 2>&5
4131 ac_status=$?
4132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4133 (exit $ac_status); }; }; then
4134 ac_lo=0 ac_mid=0
4135 while :; do
4136 cat >conftest.$ac_ext <<_ACEOF
4137/* confdefs.h. */
4138_ACEOF
4139cat confdefs.h >>conftest.$ac_ext
4140cat >>conftest.$ac_ext <<_ACEOF
4141/* end confdefs.h. */
4142$ac_includes_default
4143int
4144main ()
4145{
4146static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4147test_array [0] = 0
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
4153rm -f conftest.$ac_objext
4154if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4155 (eval $ac_compile) 2>conftest.er1
4156 ac_status=$?
4157 grep -v '^ *+' conftest.er1 >conftest.err
4158 rm -f conftest.er1
4159 cat conftest.err >&5
4160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4161 (exit $ac_status); } &&
4162 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4164 (eval $ac_try) 2>&5
4165 ac_status=$?
4166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4167 (exit $ac_status); }; } &&
4168 { ac_try='test -s conftest.$ac_objext'
4169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4170 (eval $ac_try) 2>&5
4171 ac_status=$?
4172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4173 (exit $ac_status); }; }; then
4174 ac_hi=$ac_mid; break
4175else
4176 echo "$as_me: failed program was:" >&5
4177sed 's/^/| /' conftest.$ac_ext >&5
4178
4179ac_lo=`expr $ac_mid + 1`
4180 if test $ac_lo -le $ac_mid; then
4181 ac_lo= ac_hi=
4182 break
4183 fi
4184 ac_mid=`expr 2 '*' $ac_mid + 1`
4185fi
4186rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4187 done
4188else
4189 echo "$as_me: failed program was:" >&5
4190sed 's/^/| /' conftest.$ac_ext >&5
4191
4192cat >conftest.$ac_ext <<_ACEOF
4193/* confdefs.h. */
4194_ACEOF
4195cat confdefs.h >>conftest.$ac_ext
4196cat >>conftest.$ac_ext <<_ACEOF
4197/* end confdefs.h. */
4198$ac_includes_default
4199int
4200main ()
4201{
4202static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4203test_array [0] = 0
4204
4205 ;
4206 return 0;
4207}
4208_ACEOF
4209rm -f conftest.$ac_objext
4210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4211 (eval $ac_compile) 2>conftest.er1
4212 ac_status=$?
4213 grep -v '^ *+' conftest.er1 >conftest.err
4214 rm -f conftest.er1
4215 cat conftest.err >&5
4216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4217 (exit $ac_status); } &&
4218 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4220 (eval $ac_try) 2>&5
4221 ac_status=$?
4222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4223 (exit $ac_status); }; } &&
4224 { ac_try='test -s conftest.$ac_objext'
4225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4226 (eval $ac_try) 2>&5
4227 ac_status=$?
4228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4229 (exit $ac_status); }; }; then
4230 ac_hi=-1 ac_mid=-1
4231 while :; do
4232 cat >conftest.$ac_ext <<_ACEOF
4233/* confdefs.h. */
4234_ACEOF
4235cat confdefs.h >>conftest.$ac_ext
4236cat >>conftest.$ac_ext <<_ACEOF
4237/* end confdefs.h. */
4238$ac_includes_default
4239int
4240main ()
4241{
4242static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4243test_array [0] = 0
4244
4245 ;
4246 return 0;
4247}
4248_ACEOF
4249rm -f conftest.$ac_objext
4250if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4251 (eval $ac_compile) 2>conftest.er1
4252 ac_status=$?
4253 grep -v '^ *+' conftest.er1 >conftest.err
4254 rm -f conftest.er1
4255 cat conftest.err >&5
4256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4257 (exit $ac_status); } &&
4258 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4260 (eval $ac_try) 2>&5
4261 ac_status=$?
4262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4263 (exit $ac_status); }; } &&
4264 { ac_try='test -s conftest.$ac_objext'
4265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4266 (eval $ac_try) 2>&5
4267 ac_status=$?
4268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4269 (exit $ac_status); }; }; then
4270 ac_lo=$ac_mid; break
4271else
4272 echo "$as_me: failed program was:" >&5
4273sed 's/^/| /' conftest.$ac_ext >&5
4274
4275ac_hi=`expr '(' $ac_mid ')' - 1`
4276 if test $ac_mid -le $ac_hi; then
4277 ac_lo= ac_hi=
4278 break
4279 fi
4280 ac_mid=`expr 2 '*' $ac_mid`
4281fi
4282rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4283 done
4284else
4285 echo "$as_me: failed program was:" >&5
4286sed 's/^/| /' conftest.$ac_ext >&5
4287
4288ac_lo= ac_hi=
4289fi
4290rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4291fi
4292rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4293# Binary search between lo and hi bounds.
4294while test "x$ac_lo" != "x$ac_hi"; do
4295 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4296 cat >conftest.$ac_ext <<_ACEOF
4297/* confdefs.h. */
4298_ACEOF
4299cat confdefs.h >>conftest.$ac_ext
4300cat >>conftest.$ac_ext <<_ACEOF
4301/* end confdefs.h. */
4302$ac_includes_default
4303int
4304main ()
4305{
4306static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4307test_array [0] = 0
4308
4309 ;
4310 return 0;
4311}
4312_ACEOF
4313rm -f conftest.$ac_objext
4314if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4315 (eval $ac_compile) 2>conftest.er1
4316 ac_status=$?
4317 grep -v '^ *+' conftest.er1 >conftest.err
4318 rm -f conftest.er1
4319 cat conftest.err >&5
4320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4321 (exit $ac_status); } &&
4322 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4324 (eval $ac_try) 2>&5
4325 ac_status=$?
4326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4327 (exit $ac_status); }; } &&
4328 { ac_try='test -s conftest.$ac_objext'
4329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4330 (eval $ac_try) 2>&5
4331 ac_status=$?
4332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4333 (exit $ac_status); }; }; then
4334 ac_hi=$ac_mid
4335else
4336 echo "$as_me: failed program was:" >&5
4337sed 's/^/| /' conftest.$ac_ext >&5
4338
4339ac_lo=`expr '(' $ac_mid ')' + 1`
4340fi
4341rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4342done
4343case $ac_lo in
4344?*) ac_cv_sizeof_int=$ac_lo;;
4345'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4346See \`config.log' for more details." >&5
4347echo "$as_me: error: cannot compute sizeof (int), 77
4348See \`config.log' for more details." >&2;}
4349 { (exit 1); exit 1; }; } ;;
4350esac
4351else
4352 if test "$cross_compiling" = yes; then
4353 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
4354echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
4355 { (exit 1); exit 1; }; }
4356else
4357 cat >conftest.$ac_ext <<_ACEOF
4358/* confdefs.h. */
4359_ACEOF
4360cat confdefs.h >>conftest.$ac_ext
4361cat >>conftest.$ac_ext <<_ACEOF
4362/* end confdefs.h. */
4363$ac_includes_default
4364long longval () { return (long) (sizeof (int)); }
4365unsigned long ulongval () { return (long) (sizeof (int)); }
4366#include <stdio.h>
4367#include <stdlib.h>
4368int
4369main ()
4370{
4371
4372 FILE *f = fopen ("conftest.val", "w");
4373 if (! f)
4374 exit (1);
4375 if (((long) (sizeof (int))) < 0)
4376 {
4377 long i = longval ();
4378 if (i != ((long) (sizeof (int))))
4379 exit (1);
4380 fprintf (f, "%ld\n", i);
4381 }
4382 else
4383 {
4384 unsigned long i = ulongval ();
4385 if (i != ((long) (sizeof (int))))
4386 exit (1);
4387 fprintf (f, "%lu\n", i);
4388 }
4389 exit (ferror (f) || fclose (f) != 0);
4390
4391 ;
4392 return 0;
4393}
4394_ACEOF
4395rm -f conftest$ac_exeext
4396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4397 (eval $ac_link) 2>&5
4398 ac_status=$?
4399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4400 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4402 (eval $ac_try) 2>&5
4403 ac_status=$?
4404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4405 (exit $ac_status); }; }; then
4406 ac_cv_sizeof_int=`cat conftest.val`
4407else
4408 echo "$as_me: program exited with status $ac_status" >&5
4409echo "$as_me: failed program was:" >&5
4410sed 's/^/| /' conftest.$ac_ext >&5
4411
4412( exit $ac_status )
4413{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4414See \`config.log' for more details." >&5
4415echo "$as_me: error: cannot compute sizeof (int), 77
4416See \`config.log' for more details." >&2;}
4417 { (exit 1); exit 1; }; }
4418fi
4419rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4420fi
4421fi
4422rm -f conftest.val
4423else
4424 ac_cv_sizeof_int=0
4425fi
4426fi
4427echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4428echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4429cat >>confdefs.h <<_ACEOF
4430#define SIZEOF_INT $ac_cv_sizeof_int
4431_ACEOF
4432
4433
4434
238235ef
DJ
4435echo "$as_me:$LINENO: checking for uintptr_t" >&5
4436echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
4437if test "${ac_cv_type_uintptr_t+set}" = set; then
4438 echo $ECHO_N "(cached) $ECHO_C" >&6
4439else
4440 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
4441/* confdefs.h. */
4442_ACEOF
4443cat confdefs.h >>conftest.$ac_ext
4444cat >>conftest.$ac_ext <<_ACEOF
4445/* end confdefs.h. */
4446$ac_includes_default
4447int
4448main ()
4449{
4450if ((uintptr_t *) 0)
4451 return 0;
4452if (sizeof (uintptr_t))
4453 return 0;
4454 ;
4455 return 0;
4456}
4457_ACEOF
4458rm -f conftest.$ac_objext
4459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 4460 (eval $ac_compile) 2>conftest.er1
238235ef 4461 ac_status=$?
3beb1315
HPN
4462 grep -v '^ *+' conftest.er1 >conftest.err
4463 rm -f conftest.er1
4464 cat conftest.err >&5
238235ef
DJ
4465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4466 (exit $ac_status); } &&
7b3ed47d 4467 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
4468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4469 (eval $ac_try) 2>&5
4470 ac_status=$?
4471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4472 (exit $ac_status); }; } &&
4473 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
4474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4475 (eval $ac_try) 2>&5
4476 ac_status=$?
4477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4478 (exit $ac_status); }; }; then
4479 ac_cv_type_uintptr_t=yes
4480else
4481 echo "$as_me: failed program was:" >&5
4482sed 's/^/| /' conftest.$ac_ext >&5
d3982b71 4483
238235ef
DJ
4484ac_cv_type_uintptr_t=no
4485fi
3beb1315 4486rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fdfc290b 4487fi
238235ef
DJ
4488echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
4489echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
4490if test $ac_cv_type_uintptr_t = yes; then
4491 :
4492else
4493
4494cat >>confdefs.h <<_ACEOF
fdfc290b 4495#define uintptr_t unsigned long
238235ef 4496_ACEOF
fdfc290b
DR
4497
4498fi
d3982b71 4499
9bf3c9cc
RH
4500
4501# Look for a 64-bit type.
4502echo "$as_me:$LINENO: checking for a 64-bit type" >&5
4503echo $ECHO_N "checking for a 64-bit type... $ECHO_C" >&6
4504if test "${liberty_cv_uint64+set}" = set; then
4505 echo $ECHO_N "(cached) $ECHO_C" >&6
4506else
4507 cat >conftest.$ac_ext <<_ACEOF
4508/* confdefs.h. */
4509_ACEOF
4510cat confdefs.h >>conftest.$ac_ext
4511cat >>conftest.$ac_ext <<_ACEOF
4512/* end confdefs.h. */
4513#ifdef HAVE_STDINT_H
4514#include <stdint.h>
4515#endif
4516int
4517main ()
4518{
4519extern uint64_t foo;
4520 ;
4521 return 0;
4522}
4523_ACEOF
4524rm -f conftest.$ac_objext
4525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4526 (eval $ac_compile) 2>conftest.er1
4527 ac_status=$?
4528 grep -v '^ *+' conftest.er1 >conftest.err
4529 rm -f conftest.er1
4530 cat conftest.err >&5
4531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4532 (exit $ac_status); } &&
7b3ed47d 4533 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9bf3c9cc
RH
4534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4535 (eval $ac_try) 2>&5
4536 ac_status=$?
4537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4538 (exit $ac_status); }; } &&
4539 { ac_try='test -s conftest.$ac_objext'
4540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4541 (eval $ac_try) 2>&5
4542 ac_status=$?
4543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4544 (exit $ac_status); }; }; then
4545 liberty_cv_uint64=uint64_t
4546else
4547 echo "$as_me: failed program was:" >&5
4548sed 's/^/| /' conftest.$ac_ext >&5
4549
4550cat >conftest.$ac_ext <<_ACEOF
4551/* confdefs.h. */
4552_ACEOF
4553cat confdefs.h >>conftest.$ac_ext
4554cat >>conftest.$ac_ext <<_ACEOF
4555/* end confdefs.h. */
4556#ifdef HAVE_LIMITS_H
4557#include <limits.h>
4558#endif
4559#ifndef CHAR_BIT
4560#define CHAR_BIT 8
4561#endif
4562int
4563main ()
4564{
4565extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1];
4566 ;
4567 return 0;
4568}
4569_ACEOF
4570rm -f conftest.$ac_objext
4571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4572 (eval $ac_compile) 2>conftest.er1
4573 ac_status=$?
4574 grep -v '^ *+' conftest.er1 >conftest.err
4575 rm -f conftest.er1
4576 cat conftest.err >&5
4577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4578 (exit $ac_status); } &&
7b3ed47d 4579 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9bf3c9cc
RH
4580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4581 (eval $ac_try) 2>&5
4582 ac_status=$?
4583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4584 (exit $ac_status); }; } &&
4585 { ac_try='test -s conftest.$ac_objext'
4586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4587 (eval $ac_try) 2>&5
4588 ac_status=$?
4589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4590 (exit $ac_status); }; }; then
4591 liberty_cv_uint64="unsigned long"
4592else
4593 echo "$as_me: failed program was:" >&5
4594sed 's/^/| /' conftest.$ac_ext >&5
4595
4596cat >conftest.$ac_ext <<_ACEOF
4597/* confdefs.h. */
4598_ACEOF
4599cat confdefs.h >>conftest.$ac_ext
4600cat >>conftest.$ac_ext <<_ACEOF
4601/* end confdefs.h. */
4602#ifdef HAVE_LIMITS_H
4603#include <limits.h>
4604#endif
4605#ifndef CHAR_BIT
4606#define CHAR_BIT 8
4607#endif
4608int
4609main ()
4610{
4611extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1];
4612 ;
4613 return 0;
4614}
4615_ACEOF
4616rm -f conftest.$ac_objext
4617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4618 (eval $ac_compile) 2>conftest.er1
4619 ac_status=$?
4620 grep -v '^ *+' conftest.er1 >conftest.err
4621 rm -f conftest.er1
4622 cat conftest.err >&5
4623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4624 (exit $ac_status); } &&
7b3ed47d 4625 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9bf3c9cc
RH
4626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4627 (eval $ac_try) 2>&5
4628 ac_status=$?
4629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4630 (exit $ac_status); }; } &&
4631 { ac_try='test -s conftest.$ac_objext'
4632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4633 (eval $ac_try) 2>&5
4634 ac_status=$?
4635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4636 (exit $ac_status); }; }; then
4637 liberty_cv_uint64="unsigned long long"
4638else
4639 echo "$as_me: failed program was:" >&5
4640sed 's/^/| /' conftest.$ac_ext >&5
4641
4642liberty_cv_uint64=none
4643fi
4644rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4645fi
4646rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4647fi
4648rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4649fi
4650
4651echo "$as_me:$LINENO: result: $liberty_cv_uint64" >&5
4652echo "${ECHO_T}$liberty_cv_uint64" >&6
4653if test "$liberty_cv_uint64" != none; then
4654
6489430a
MR
4655cat >>confdefs.h <<_ACEOF
4656#define UNSIGNED_64BIT_TYPE $liberty_cv_uint64
9bf3c9cc
RH
4657_ACEOF
4658
4659fi
4660
39e8d049
KG
4661# Given the above check, we always have uintptr_t or a fallback
4662# definition. So define HAVE_UINTPTR_T in case any imported code
4663# relies on it.
d3982b71 4664
238235ef
DJ
4665cat >>confdefs.h <<\_ACEOF
4666#define HAVE_UINTPTR_T 1
4667_ACEOF
4668
4669
4670echo "$as_me:$LINENO: checking for pid_t" >&5
4671echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4672if test "${ac_cv_type_pid_t+set}" = set; then
4673 echo $ECHO_N "(cached) $ECHO_C" >&6
4674else
4675 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
4676/* confdefs.h. */
4677_ACEOF
4678cat confdefs.h >>conftest.$ac_ext
4679cat >>conftest.$ac_ext <<_ACEOF
4680/* end confdefs.h. */
4681$ac_includes_default
4682int
4683main ()
4684{
4685if ((pid_t *) 0)
4686 return 0;
4687if (sizeof (pid_t))
4688 return 0;
4689 ;
4690 return 0;
4691}
4692_ACEOF
4693rm -f conftest.$ac_objext
4694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 4695 (eval $ac_compile) 2>conftest.er1
238235ef 4696 ac_status=$?
3beb1315
HPN
4697 grep -v '^ *+' conftest.er1 >conftest.err
4698 rm -f conftest.er1
4699 cat conftest.err >&5
238235ef
DJ
4700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4701 (exit $ac_status); } &&
7b3ed47d 4702 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
4703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4704 (eval $ac_try) 2>&5
4705 ac_status=$?
4706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4707 (exit $ac_status); }; } &&
4708 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
4709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4710 (eval $ac_try) 2>&5
4711 ac_status=$?
4712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4713 (exit $ac_status); }; }; then
deae2ed9
MM
4714 ac_cv_type_pid_t=yes
4715else
238235ef
DJ
4716 echo "$as_me: failed program was:" >&5
4717sed 's/^/| /' conftest.$ac_ext >&5
deae2ed9 4718
238235ef 4719ac_cv_type_pid_t=no
deae2ed9 4720fi
3beb1315 4721rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef
DJ
4722fi
4723echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4724echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4725if test $ac_cv_type_pid_t = yes; then
4726 :
4727else
4728
4729cat >>confdefs.h <<_ACEOF
deae2ed9 4730#define pid_t int
238235ef 4731_ACEOF
deae2ed9
MM
4732
4733fi
4734
4735
0bc0cd11
JL
4736# This is the list of functions which libiberty will provide if they
4737# are not available on the host.
4738
4739funcs="asprintf"
4740funcs="$funcs atexit"
4741funcs="$funcs basename"
4742funcs="$funcs bcmp"
4743funcs="$funcs bcopy"
dac45916 4744funcs="$funcs bsearch"
0bc0cd11 4745funcs="$funcs bzero"
a9acf741 4746funcs="$funcs calloc"
0bc0cd11 4747funcs="$funcs clock"
29650b2b 4748funcs="$funcs ffs"
0bc0cd11
JL
4749funcs="$funcs getcwd"
4750funcs="$funcs getpagesize"
4751funcs="$funcs index"
4752funcs="$funcs insque"
4753funcs="$funcs memchr"
4754funcs="$funcs memcmp"
4755funcs="$funcs memcpy"
4756funcs="$funcs memmove"
029bcc09 4757funcs="$funcs mempcpy"
0bc0cd11 4758funcs="$funcs memset"
687361c8 4759funcs="$funcs mkstemps"
9eb4080f 4760funcs="$funcs putenv"
0bc0cd11
JL
4761funcs="$funcs random"
4762funcs="$funcs rename"
4763funcs="$funcs rindex"
9eb4080f 4764funcs="$funcs setenv"
bd3fbc6b 4765funcs="$funcs snprintf"
0bc0cd11 4766funcs="$funcs sigsetmask"
029bcc09
KG
4767funcs="$funcs stpcpy"
4768funcs="$funcs stpncpy"
0bc0cd11
JL
4769funcs="$funcs strcasecmp"
4770funcs="$funcs strchr"
4771funcs="$funcs strdup"
4772funcs="$funcs strncasecmp"
4773funcs="$funcs strrchr"
4774funcs="$funcs strstr"
4775funcs="$funcs strtod"
4776funcs="$funcs strtol"
4777funcs="$funcs strtoul"
4778funcs="$funcs tmpnam"
4779funcs="$funcs vasprintf"
4780funcs="$funcs vfprintf"
4781funcs="$funcs vprintf"
bd3fbc6b 4782funcs="$funcs vsnprintf"
0bc0cd11
JL
4783funcs="$funcs vsprintf"
4784funcs="$funcs waitpid"
4785
4786# Also in the old function.def file: alloca, vfork, getopt.
4787
aa9dc53d 4788vars="sys_errlist sys_nerr sys_siglist"
0bc0cd11 4789
90e72e20 4790checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
64c7e556 4791checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
170230b7 4792checkfuncs="$checkfuncs getsysinfo table sysctl"
0bc0cd11
JL
4793
4794# These are neither executed nor required, but they help keep
4795# autoheader happy without adding a bunch of text to acconfig.h.
4796if test "x" = "y"; then
0bc0cd11 4797
0bc0cd11 4798
238235ef
DJ
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
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
4860for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
4861 getcwd getpagesize index insque mkstemps memchr memcmp memcpy \
4862 memmove mempcpy memset putenv random rename rindex sigsetmask \
4863 strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr \
4864 strtod strtol strtoul tmpnam vasprintf vfprintf vprintf \
4865 vsprintf waitpid getrusage on_exit psignal strerror strsignal \
4866 sysconf times sbrk gettimeofday ffs snprintf vsnprintf \
4867 pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl \
4868 realpath canonicalize_file_name
4869do
4870as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4871echo "$as_me:$LINENO: checking for $ac_func" >&5
4872echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4873if eval "test \"\${$as_ac_var+set}\" = set"; then
4874 echo $ECHO_N "(cached) $ECHO_C" >&6
4875else
4876 if test x$gcc_no_link = xyes; then
4877 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
4878echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
4879 { (exit 1); exit 1; }; }
4880fi
4881cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
4882/* confdefs.h. */
4883_ACEOF
4884cat confdefs.h >>conftest.$ac_ext
4885cat >>conftest.$ac_ext <<_ACEOF
4886/* end confdefs.h. */
4887/* System header to define __stub macros and hopefully few prototypes,
4888 which can conflict with char $ac_func (); below.
4889 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
4890 <limits.h> exists even on freestanding compilers. Under hpux,
4891 including <limits.h> includes <sys/time.h> and causes problems
4892 checking for functions defined therein. */
4893#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
4894# include <limits.h>
4895#else
4896# include <assert.h>
4897#endif
4898/* Override any gcc2 internal prototype to avoid an error. */
4899#ifdef __cplusplus
4900extern "C"
4901{
4902#endif
4903/* We use char because int might match the return type of a gcc2
4904 builtin and then its argument prototype would still apply. */
4905char $ac_func ();
4906/* The GNU C library defines this for functions which it implements
0bc0cd11
JL
4907 to always fail with ENOSYS. Some functions are actually named
4908 something starting with __ and the normal name is an alias. */
4909#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4910choke me
4911#else
238235ef
DJ
4912char (*f) () = $ac_func;
4913#endif
4914#ifdef __cplusplus
4915}
0bc0cd11
JL
4916#endif
4917
238235ef
DJ
4918int
4919main ()
4920{
4921return f != $ac_func;
4922 ;
4923 return 0;
4924}
4925_ACEOF
4926rm -f conftest.$ac_objext conftest$ac_exeext
4927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 4928 (eval $ac_link) 2>conftest.er1
238235ef 4929 ac_status=$?
3beb1315
HPN
4930 grep -v '^ *+' conftest.er1 >conftest.err
4931 rm -f conftest.er1
4932 cat conftest.err >&5
238235ef
DJ
4933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4934 (exit $ac_status); } &&
7b3ed47d 4935 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
4936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4937 (eval $ac_try) 2>&5
4938 ac_status=$?
4939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4940 (exit $ac_status); }; } &&
4941 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
4942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4943 (eval $ac_try) 2>&5
4944 ac_status=$?
4945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4946 (exit $ac_status); }; }; then
4947 eval "$as_ac_var=yes"
4948else
4949 echo "$as_me: failed program was:" >&5
4950sed 's/^/| /' conftest.$ac_ext >&5
4951
4952eval "$as_ac_var=no"
4953fi
3beb1315
HPN
4954rm -f conftest.err conftest.$ac_objext \
4955 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
4956fi
4957echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4958echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4959if test `eval echo '${'$as_ac_var'}'` = yes; then
4960 cat >>confdefs.h <<_ACEOF
4961#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4962_ACEOF
e9019af6 4963
0bc0cd11
JL
4964fi
4965done
4966
238235ef
DJ
4967
4968cat >>confdefs.h <<\_ACEOF
d1209685 4969#define HAVE_SYS_ERRLIST 1
238235ef
DJ
4970_ACEOF
4971
d1209685 4972
238235ef 4973cat >>confdefs.h <<\_ACEOF
dac45916 4974#define HAVE_SYS_NERR 1
238235ef
DJ
4975_ACEOF
4976
d1209685 4977
238235ef 4978cat >>confdefs.h <<\_ACEOF
d1209685 4979#define HAVE_SYS_SIGLIST 1
238235ef 4980_ACEOF
d1209685 4981
0bc0cd11
JL
4982fi
4983
4984# For each of these functions, if the host does not provide the
4985# function we want to put FN.o in LIBOBJS, and if the host does
b548dffb 4986# provide the function, we want to define HAVE_FN in config.h.
0bc0cd11
JL
4987
4988setobjs=
7c72138a 4989CHECK=
48d7db63 4990target_header_dir=
0bc0cd11
JL
4991if test -n "${with_target_subdir}"; then
4992
ca6b370d 4993 # We are being configured as a target library. AC_REPLACE_FUNCS
0bc0cd11 4994 # may not work correctly, because the compiler may not be able to
ca6b370d
JL
4995 # link executables. Note that we may still be being configured
4996 # native.
0bc0cd11
JL
4997
4998 # If we are being configured for newlib, we know which functions
4999 # newlib provide and which ones we will be expected to provide.
5000
5001 if test "x${with_newlib}" = "xyes"; then
3beb1315
HPN
5002 case $LIBOBJS in
5003 "asprintf.$ac_objext" | \
5004 *" asprintf.$ac_objext" | \
5005 "asprintf.$ac_objext "* | \
5006 *" asprintf.$ac_objext "* ) ;;
5007 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;;
5008esac
5009
5010 case $LIBOBJS in
5011 "basename.$ac_objext" | \
5012 *" basename.$ac_objext" | \
5013 "basename.$ac_objext "* | \
5014 *" basename.$ac_objext "* ) ;;
5015 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
5016esac
5017
5018 case $LIBOBJS in
5019 "insque.$ac_objext" | \
5020 *" insque.$ac_objext" | \
5021 "insque.$ac_objext "* | \
5022 *" insque.$ac_objext "* ) ;;
5023 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
5024esac
5025
5026 case $LIBOBJS in
5027 "random.$ac_objext" | \
5028 *" random.$ac_objext" | \
5029 "random.$ac_objext "* | \
5030 *" random.$ac_objext "* ) ;;
5031 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
5032esac
5033
5034 case $LIBOBJS in
5035 "strdup.$ac_objext" | \
5036 *" strdup.$ac_objext" | \
5037 "strdup.$ac_objext "* | \
5038 *" strdup.$ac_objext "* ) ;;
5039 *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
5040esac
5041
5042 case $LIBOBJS in
5043 "vasprintf.$ac_objext" | \
5044 *" vasprintf.$ac_objext" | \
5045 "vasprintf.$ac_objext "* | \
5046 *" vasprintf.$ac_objext "* ) ;;
5047 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
5048esac
5049
0bc0cd11
JL
5050
5051 for f in $funcs; do
5052 case "$f" in
ca6b370d 5053 asprintf | basename | insque | random | strdup | vasprintf)
0bc0cd11
JL
5054 ;;
5055 *)
5056 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
238235ef 5057 cat >>confdefs.h <<_ACEOF
0bc0cd11 5058#define $n 1
238235ef 5059_ACEOF
0bc0cd11
JL
5060
5061 ;;
5062 esac
5063 done
5064
5065 # newlib doesnt provide any of the variables in $vars, so we
5066 # dont have to check them here.
5067
ca6b370d 5068 # Of the functions in $checkfuncs, newlib only has strerror.
0bc0cd11
JL
5069 cat >> confdefs.h <<\EOF
5070#define HAVE_STRERROR 1
5071EOF
5072
5073
5074 setobjs=yes
5075
5076 fi
7c72138a 5077
48d7db63
PE
5078 # We may wish to install the target headers somewhere.
5079 # Check whether --enable-install-libiberty or --disable-install-libiberty was given.
5080if test "${enable_install_libiberty+set}" = set; then
5081 enableval="$enable_install_libiberty"
5082 enable_install_libiberty=$enableval
5083else
5084 enable_install_libiberty=no
238235ef 5085fi;
48d7db63
PE
5086 # Option parsed, now set things appropriately.
5087 case x"$enable_install_libiberty" in
5088 xyes|x)
5089 target_header_dir=libiberty
5090 ;;
238235ef 5091 xno)
48d7db63
PE
5092 target_header_dir=
5093 ;;
238235ef 5094 *)
48d7db63
PE
5095 # This could be sanity-checked in various ways...
5096 target_header_dir="${enable_install_libiberty}"
5097 ;;
5098 esac
5099
5100
7c72138a
TT
5101else
5102
5103 # Not a target library, so we set things up to run the test suite.
5104 CHECK=check-cplus-dem
5105
0bc0cd11
JL
5106fi
5107
7c72138a
TT
5108
5109
48d7db63 5110
b1c45ae4 5111case "${host}" in
46af757b 5112 *-*-cygwin* | *-*-mingw*)
b1c45ae4
CF
5113 cat >> confdefs.h <<\EOF
5114#define HAVE_SYS_ERRLIST 1
5115EOF
5116
5117 cat >> confdefs.h <<\EOF
5118#define HAVE_SYS_NERR 1
5119EOF
5120
5121 ;;
5122esac
5123
0bc0cd11
JL
5124if test -z "${setobjs}"; then
5125 case "${host}" in
5126
5127 *-*-vxworks*)
5128 # Handle VxWorks configuration specially, since on VxWorks the
5129 # libraries are actually on the target board, not in the file
5130 # system.
3beb1315
HPN
5131 case $LIBOBJS in
5132 "basename.$ac_objext" | \
5133 *" basename.$ac_objext" | \
5134 "basename.$ac_objext "* | \
5135 *" basename.$ac_objext "* ) ;;
5136 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
5137esac
5138
5139 case $LIBOBJS in
5140 "getpagesize.$ac_objext" | \
5141 *" getpagesize.$ac_objext" | \
5142 "getpagesize.$ac_objext "* | \
5143 *" getpagesize.$ac_objext "* ) ;;
5144 *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;;
5145esac
5146
5147 case $LIBOBJS in
5148 "insque.$ac_objext" | \
5149 *" insque.$ac_objext" | \
5150 "insque.$ac_objext "* | \
5151 *" insque.$ac_objext "* ) ;;
5152 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
5153esac
5154
5155 case $LIBOBJS in
5156 "random.$ac_objext" | \
5157 *" random.$ac_objext" | \
5158 "random.$ac_objext "* | \
5159 *" random.$ac_objext "* ) ;;
5160 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
5161esac
5162
5163 case $LIBOBJS in
5164 "strcasecmp.$ac_objext" | \
5165 *" strcasecmp.$ac_objext" | \
5166 "strcasecmp.$ac_objext "* | \
5167 *" strcasecmp.$ac_objext "* ) ;;
5168 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" ;;
5169esac
5170
5171 case $LIBOBJS in
5172 "strncasecmp.$ac_objext" | \
5173 *" strncasecmp.$ac_objext" | \
5174 "strncasecmp.$ac_objext "* | \
5175 *" strncasecmp.$ac_objext "* ) ;;
5176 *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;;
5177esac
5178
5179 case $LIBOBJS in
5180 "strdup.$ac_objext" | \
5181 *" strdup.$ac_objext" | \
5182 "strdup.$ac_objext "* | \
5183 *" strdup.$ac_objext "* ) ;;
5184 *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
5185esac
5186
5187 case $LIBOBJS in
5188 "vfork.$ac_objext" | \
5189 *" vfork.$ac_objext" | \
5190 "vfork.$ac_objext "* | \
5191 *" vfork.$ac_objext "* ) ;;
5192 *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
5193esac
5194
5195 case $LIBOBJS in
5196 "waitpid.$ac_objext" | \
5197 *" waitpid.$ac_objext" | \
5198 "waitpid.$ac_objext "* | \
5199 *" waitpid.$ac_objext "* ) ;;
5200 *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;;
5201esac
5202
5203 case $LIBOBJS in
5204 "vasprintf.$ac_objext" | \
5205 *" vasprintf.$ac_objext" | \
5206 "vasprintf.$ac_objext "* | \
5207 *" vasprintf.$ac_objext "* ) ;;
5208 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
5209esac
5210
0bc0cd11
JL
5211 for f in $funcs; do
5212 case "$f" in
5213 basename | getpagesize | insque | random | strcasecmp)
5214 ;;
5215 strncasecmp | strdup | vfork | waitpid | vasprintf)
5216 ;;
5217 *)
5218 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
238235ef 5219 cat >>confdefs.h <<_ACEOF
0bc0cd11 5220#define $n 1
238235ef 5221_ACEOF
0bc0cd11
JL
5222
5223 ;;
5224 esac
5225 done
5226
5227 # VxWorks doesn't provide any of the variables in $vars, so we
5228 # don't have to check them here.
5229
5230 # Of the functions in $checkfuncs, VxWorks only has strerror.
5231 cat >> confdefs.h <<\EOF
5232#define HAVE_STRERROR 1
5233EOF
5234
5235
5236 setobjs=yes
5237 ;;
5238
5239 esac
5240fi
5241
5242if test -z "${setobjs}"; then
5243
5244 case "${host}" in
5245
dd8f3ed5
GN
5246 *-*-cygwin*)
5247 # The Cygwin library actually uses a couple of files from
0bc0cd11 5248 # libiberty when it is built. If we are building a native
dd8f3ed5 5249 # Cygwin, and we run the tests, we will appear to have these
0bc0cd11
JL
5250 # files. However, when we go on to build winsup, we will wind up
5251 # with a library which does not have the files, since they should
5252 # have come from libiberty.
5253
5254 # We handle this by removing the functions the winsup library
5255 # provides from our shell variables, so that they appear to be
5256 # missing.
5257
2f31ed7e 5258 # DJ - only if we're *building* cygwin, not just building *with* cygwin
238235ef 5259
2f31ed7e
DD
5260 if test -n "${with_target_subdir}"
5261 then
5262 funcs="`echo $funcs | sed -e 's/random//'`"
3beb1315
HPN
5263 case $LIBOBJS in
5264 "random.$ac_objext" | \
5265 *" random.$ac_objext" | \
5266 "random.$ac_objext "* | \
5267 *" random.$ac_objext "* ) ;;
5268 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
5269esac
5270
2f31ed7e
DD
5271 vars="`echo $vars | sed -e 's/sys_siglist//'`"
5272 checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
5273 fi
0bc0cd11
JL
5274 ;;
5275
5276 *-*-mingw32*)
5277 # Under mingw32, sys_nerr and sys_errlist exist, but they are
5278 # macros, so the test below won't find them.
d1209685
ZW
5279 libiberty_cv_var_sys_nerr=yes
5280 libiberty_cv_var_sys_errlist=yes
0bc0cd11
JL
5281 ;;
5282
89f602a7 5283 *-*-uwin*)
238235ef 5284 # Under some versions of uwin, vfork is notoriously buggy and the test
89f602a7
MK
5285 # can hang configure; on other versions, vfork exists just as a stub.
5286 # FIXME: This should be removed once vfork in uwin's runtime is fixed.
5287 ac_cv_func_vfork_works=no
62133b5e 5288 # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
238235ef 5289 # macros (actually, these are imported from a DLL, but the end effect
62133b5e 5290 # is the same), so the test below won't find them.
d1209685
ZW
5291 libiberty_cv_var_sys_nerr=yes
5292 libiberty_cv_var_sys_errlist=yes
89f602a7
MK
5293 ;;
5294
ee262b6f 5295 *-*-*vms*)
238235ef 5296 # Under VMS, vfork works very different than on Unix. The standard test
ee262b6f
DR
5297 # won't work, and it isn't easily adaptable. It makes more sense to
5298 # just force it.
5299 ac_cv_func_vfork_works=yes
5300 ;;
5301
0bc0cd11
JL
5302 esac
5303
5304 # We haven't set the list of objects yet. Use the standard autoconf
5305 # tests. This will only work if the compiler works.
238235ef
DJ
5306 echo "$as_me:$LINENO: checking for library containing strerror" >&5
5307echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
5308if test "${ac_cv_search_strerror+set}" = set; then
5309 echo $ECHO_N "(cached) $ECHO_C" >&6
5310else
5311 ac_func_search_save_LIBS=$LIBS
5312ac_cv_search_strerror=no
5313if test x$gcc_no_link = xyes; then
5314 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5315echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5316 { (exit 1); exit 1; }; }
5317fi
5318cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
5319/* confdefs.h. */
5320_ACEOF
5321cat confdefs.h >>conftest.$ac_ext
5322cat >>conftest.$ac_ext <<_ACEOF
5323/* end confdefs.h. */
0bc0cd11 5324
238235ef
DJ
5325/* Override any gcc2 internal prototype to avoid an error. */
5326#ifdef __cplusplus
5327extern "C"
5328#endif
5329/* We use char because int might match the return type of a gcc2
5330 builtin and then its argument prototype would still apply. */
5331char strerror ();
5332int
5333main ()
5334{
5335strerror ();
5336 ;
5337 return 0;
5338}
5339_ACEOF
5340rm -f conftest.$ac_objext conftest$ac_exeext
5341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 5342 (eval $ac_link) 2>conftest.er1
238235ef 5343 ac_status=$?
3beb1315
HPN
5344 grep -v '^ *+' conftest.er1 >conftest.err
5345 rm -f conftest.er1
5346 cat conftest.err >&5
238235ef
DJ
5347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5348 (exit $ac_status); } &&
7b3ed47d 5349 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
5350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5351 (eval $ac_try) 2>&5
5352 ac_status=$?
5353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5354 (exit $ac_status); }; } &&
5355 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
5356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5357 (eval $ac_try) 2>&5
5358 ac_status=$?
5359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5360 (exit $ac_status); }; }; then
5361 ac_cv_search_strerror="none required"
5362else
5363 echo "$as_me: failed program was:" >&5
5364sed 's/^/| /' conftest.$ac_ext >&5
5365
5366fi
3beb1315
HPN
5367rm -f conftest.err conftest.$ac_objext \
5368 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
5369if test "$ac_cv_search_strerror" = no; then
5370 for ac_lib in cposix; do
5371 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5372 if test x$gcc_no_link = xyes; then
5373 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5374echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5375 { (exit 1); exit 1; }; }
5376fi
5377cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
5378/* confdefs.h. */
5379_ACEOF
5380cat confdefs.h >>conftest.$ac_ext
5381cat >>conftest.$ac_ext <<_ACEOF
5382/* end confdefs.h. */
687361c8 5383
238235ef
DJ
5384/* Override any gcc2 internal prototype to avoid an error. */
5385#ifdef __cplusplus
5386extern "C"
5387#endif
5388/* We use char because int might match the return type of a gcc2
5389 builtin and then its argument prototype would still apply. */
5390char strerror ();
5391int
5392main ()
5393{
5394strerror ();
5395 ;
5396 return 0;
5397}
5398_ACEOF
5399rm -f conftest.$ac_objext conftest$ac_exeext
5400if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 5401 (eval $ac_link) 2>conftest.er1
238235ef 5402 ac_status=$?
3beb1315
HPN
5403 grep -v '^ *+' conftest.er1 >conftest.err
5404 rm -f conftest.er1
5405 cat conftest.err >&5
238235ef
DJ
5406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5407 (exit $ac_status); } &&
7b3ed47d 5408 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
5409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5410 (eval $ac_try) 2>&5
5411 ac_status=$?
5412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5413 (exit $ac_status); }; } &&
5414 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
5415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5416 (eval $ac_try) 2>&5
5417 ac_status=$?
5418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5419 (exit $ac_status); }; }; then
5420 ac_cv_search_strerror="-l$ac_lib"
5421break
5422else
5423 echo "$as_me: failed program was:" >&5
5424sed 's/^/| /' conftest.$ac_ext >&5
5425
5426fi
3beb1315
HPN
5427rm -f conftest.err conftest.$ac_objext \
5428 conftest$ac_exeext conftest.$ac_ext
238235ef 5429 done
0bc0cd11 5430fi
238235ef
DJ
5431LIBS=$ac_func_search_save_LIBS
5432fi
5433echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
5434echo "${ECHO_T}$ac_cv_search_strerror" >&6
5435if test "$ac_cv_search_strerror" != no; then
5436 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
0bc0cd11 5437
0bc0cd11 5438fi
0bc0cd11 5439
238235ef
DJ
5440
5441for ac_func in $funcs
0bc0cd11 5442do
238235ef
DJ
5443as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5444echo "$as_me:$LINENO: checking for $ac_func" >&5
5445echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5446if eval "test \"\${$as_ac_var+set}\" = set"; then
5447 echo $ECHO_N "(cached) $ECHO_C" >&6
5448else
5449 if test x$gcc_no_link = xyes; then
5450 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5451echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5452 { (exit 1); exit 1; }; }
5453fi
5454cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
5455/* confdefs.h. */
5456_ACEOF
5457cat confdefs.h >>conftest.$ac_ext
5458cat >>conftest.$ac_ext <<_ACEOF
5459/* end confdefs.h. */
0bc0cd11 5460/* System header to define __stub macros and hopefully few prototypes,
238235ef
DJ
5461 which can conflict with char $ac_func (); below.
5462 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
5463 <limits.h> exists even on freestanding compilers. Under hpux,
5464 including <limits.h> includes <sys/time.h> and causes problems
5465 checking for functions defined therein. */
5466#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
5467# include <limits.h>
5468#else
5469# include <assert.h>
5470#endif
0bc0cd11 5471/* Override any gcc2 internal prototype to avoid an error. */
238235ef
DJ
5472#ifdef __cplusplus
5473extern "C"
5474{
5475#endif
0bc0cd11 5476/* We use char because int might match the return type of a gcc2
238235ef
DJ
5477 builtin and then its argument prototype would still apply. */
5478char $ac_func ();
0bc0cd11
JL
5479/* The GNU C library defines this for functions which it implements
5480 to always fail with ENOSYS. Some functions are actually named
5481 something starting with __ and the normal name is an alias. */
5482#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5483choke me
5484#else
238235ef
DJ
5485char (*f) () = $ac_func;
5486#endif
5487#ifdef __cplusplus
5488}
0bc0cd11
JL
5489#endif
5490
238235ef
DJ
5491int
5492main ()
5493{
5494return f != $ac_func;
5495 ;
5496 return 0;
5497}
5498_ACEOF
5499rm -f conftest.$ac_objext conftest$ac_exeext
5500if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 5501 (eval $ac_link) 2>conftest.er1
238235ef 5502 ac_status=$?
3beb1315
HPN
5503 grep -v '^ *+' conftest.er1 >conftest.err
5504 rm -f conftest.er1
5505 cat conftest.err >&5
238235ef
DJ
5506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5507 (exit $ac_status); } &&
7b3ed47d 5508 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
5509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5510 (eval $ac_try) 2>&5
5511 ac_status=$?
5512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5513 (exit $ac_status); }; } &&
5514 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
5515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5516 (eval $ac_try) 2>&5
5517 ac_status=$?
5518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5519 (exit $ac_status); }; }; then
5520 eval "$as_ac_var=yes"
5521else
5522 echo "$as_me: failed program was:" >&5
5523sed 's/^/| /' conftest.$ac_ext >&5
5524
5525eval "$as_ac_var=no"
5526fi
3beb1315
HPN
5527rm -f conftest.err conftest.$ac_objext \
5528 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
5529fi
5530echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5531echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5532if test `eval echo '${'$as_ac_var'}'` = yes; then
5533 cat >>confdefs.h <<_ACEOF
5534#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5535_ACEOF
5536
5537else
3beb1315
HPN
5538 case $LIBOBJS in
5539 "$ac_func.$ac_objext" | \
5540 *" $ac_func.$ac_objext" | \
5541 "$ac_func.$ac_objext "* | \
5542 *" $ac_func.$ac_objext "* ) ;;
5543 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
5544esac
5545
0bc0cd11
JL
5546fi
5547done
5548
5549
238235ef
DJ
5550 echo "$as_me:$LINENO: checking whether alloca needs Cray hooks" >&5
5551echo $ECHO_N "checking whether alloca needs Cray hooks... $ECHO_C" >&6
5552if test "${ac_cv_os_cray+set}" = set; then
5553 echo $ECHO_N "(cached) $ECHO_C" >&6
0bc0cd11 5554else
238235ef 5555 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
5556/* confdefs.h. */
5557_ACEOF
5558cat confdefs.h >>conftest.$ac_ext
5559cat >>conftest.$ac_ext <<_ACEOF
5560/* end confdefs.h. */
0bc0cd11
JL
5561#if defined(CRAY) && ! defined(CRAY2)
5562webecray
5563#else
5564wenotbecray
5565#endif
5566
238235ef 5567_ACEOF
0bc0cd11 5568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
238235ef 5569 $EGREP "webecray" >/dev/null 2>&1; then
0bc0cd11
JL
5570 ac_cv_os_cray=yes
5571else
0bc0cd11
JL
5572 ac_cv_os_cray=no
5573fi
5574rm -f conftest*
5575
5576fi
238235ef
DJ
5577echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
5578echo "${ECHO_T}$ac_cv_os_cray" >&6
0bc0cd11 5579if test $ac_cv_os_cray = yes; then
b548dffb 5580 for ac_func in _getb67 GETB67 getb67; do
238235ef
DJ
5581 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5582echo "$as_me:$LINENO: checking for $ac_func" >&5
5583echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5584if eval "test \"\${$as_ac_var+set}\" = set"; then
5585 echo $ECHO_N "(cached) $ECHO_C" >&6
5586else
5587 if test x$gcc_no_link = xyes; then
5588 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5589echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5590 { (exit 1); exit 1; }; }
5591fi
5592cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
5593/* confdefs.h. */
5594_ACEOF
5595cat confdefs.h >>conftest.$ac_ext
5596cat >>conftest.$ac_ext <<_ACEOF
5597/* end confdefs.h. */
0bc0cd11 5598/* System header to define __stub macros and hopefully few prototypes,
238235ef
DJ
5599 which can conflict with char $ac_func (); below.
5600 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
5601 <limits.h> exists even on freestanding compilers. Under hpux,
5602 including <limits.h> includes <sys/time.h> and causes problems
5603 checking for functions defined therein. */
5604#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
5605# include <limits.h>
5606#else
5607# include <assert.h>
5608#endif
0bc0cd11 5609/* Override any gcc2 internal prototype to avoid an error. */
238235ef
DJ
5610#ifdef __cplusplus
5611extern "C"
5612{
5613#endif
0bc0cd11 5614/* We use char because int might match the return type of a gcc2
238235ef
DJ
5615 builtin and then its argument prototype would still apply. */
5616char $ac_func ();
0bc0cd11
JL
5617/* The GNU C library defines this for functions which it implements
5618 to always fail with ENOSYS. Some functions are actually named
5619 something starting with __ and the normal name is an alias. */
5620#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5621choke me
5622#else
238235ef
DJ
5623char (*f) () = $ac_func;
5624#endif
5625#ifdef __cplusplus
5626}
0bc0cd11
JL
5627#endif
5628
238235ef
DJ
5629int
5630main ()
5631{
5632return f != $ac_func;
5633 ;
5634 return 0;
5635}
5636_ACEOF
5637rm -f conftest.$ac_objext conftest$ac_exeext
5638if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 5639 (eval $ac_link) 2>conftest.er1
238235ef 5640 ac_status=$?
3beb1315
HPN
5641 grep -v '^ *+' conftest.er1 >conftest.err
5642 rm -f conftest.er1
5643 cat conftest.err >&5
238235ef
DJ
5644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5645 (exit $ac_status); } &&
7b3ed47d 5646 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
5647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5648 (eval $ac_try) 2>&5
5649 ac_status=$?
5650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5651 (exit $ac_status); }; } &&
5652 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
5653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5654 (eval $ac_try) 2>&5
5655 ac_status=$?
5656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5657 (exit $ac_status); }; }; then
5658 eval "$as_ac_var=yes"
5659else
5660 echo "$as_me: failed program was:" >&5
5661sed 's/^/| /' conftest.$ac_ext >&5
5662
5663eval "$as_ac_var=no"
5664fi
3beb1315
HPN
5665rm -f conftest.err conftest.$ac_objext \
5666 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
5667fi
5668echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5669echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5670if test `eval echo '${'$as_ac_var'}'` = yes; then
5671
5672cat >>confdefs.h <<_ACEOF
0bc0cd11 5673#define CRAY_STACKSEG_END $ac_func
238235ef 5674_ACEOF
0bc0cd11 5675 break
0bc0cd11
JL
5676fi
5677
b548dffb 5678 done
0bc0cd11
JL
5679fi
5680
238235ef
DJ
5681echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
5682echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
5683if test "${ac_cv_c_stack_direction+set}" = set; then
5684 echo $ECHO_N "(cached) $ECHO_C" >&6
0bc0cd11
JL
5685else
5686 if test "$cross_compiling" = yes; then
5687 ac_cv_c_stack_direction=0
5688else
238235ef 5689 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
5690/* confdefs.h. */
5691_ACEOF
5692cat confdefs.h >>conftest.$ac_ext
5693cat >>conftest.$ac_ext <<_ACEOF
5694/* end confdefs.h. */
0bc0cd11
JL
5695find_stack_direction ()
5696{
5697 static char *addr = 0;
5698 auto char dummy;
5699 if (addr == 0)
5700 {
5701 addr = &dummy;
5702 return find_stack_direction ();
5703 }
5704 else
5705 return (&dummy > addr) ? 1 : -1;
5706}
5707main ()
5708{
5709 exit (find_stack_direction() < 0);
5710}
238235ef
DJ
5711_ACEOF
5712rm -f conftest$ac_exeext
5713if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5714 (eval $ac_link) 2>&5
5715 ac_status=$?
5716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5717 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5719 (eval $ac_try) 2>&5
5720 ac_status=$?
5721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5722 (exit $ac_status); }; }; then
0bc0cd11
JL
5723 ac_cv_c_stack_direction=1
5724else
238235ef
DJ
5725 echo "$as_me: program exited with status $ac_status" >&5
5726echo "$as_me: failed program was:" >&5
5727sed 's/^/| /' conftest.$ac_ext >&5
5728
5729( exit $ac_status )
5730ac_cv_c_stack_direction=-1
0bc0cd11 5731fi
3beb1315 5732rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0bc0cd11 5733fi
0bc0cd11 5734fi
238235ef
DJ
5735echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
5736echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
0bc0cd11 5737
238235ef 5738cat >>confdefs.h <<_ACEOF
0bc0cd11 5739#define STACK_DIRECTION $ac_cv_c_stack_direction
238235ef
DJ
5740_ACEOF
5741
0bc0cd11 5742
7dd88617 5743
238235ef
DJ
5744
5745for ac_header in unistd.h vfork.h
5746do
5747as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b033df90 5748echo "$as_me:$LINENO: checking for $ac_header" >&5
238235ef
DJ
5749echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5750if eval "test \"\${$as_ac_Header+set}\" = set"; then
5751 echo $ECHO_N "(cached) $ECHO_C" >&6
238235ef 5752else
b033df90 5753 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
5754/* confdefs.h. */
5755_ACEOF
5756cat confdefs.h >>conftest.$ac_ext
5757cat >>conftest.$ac_ext <<_ACEOF
5758/* end confdefs.h. */
5759#include <$ac_header>
5760_ACEOF
5761if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5762 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5763 ac_status=$?
5764 grep -v '^ *+' conftest.er1 >conftest.err
5765 rm -f conftest.er1
5766 cat conftest.err >&5
5767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5768 (exit $ac_status); } >/dev/null; then
5769 if test -s conftest.err; then
5770 ac_cpp_err=$ac_c_preproc_warn_flag
3beb1315 5771 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
238235ef
DJ
5772 else
5773 ac_cpp_err=
5774 fi
0bc0cd11 5775else
238235ef
DJ
5776 ac_cpp_err=yes
5777fi
5778if test -z "$ac_cpp_err"; then
b033df90 5779 eval "$as_ac_Header=yes"
238235ef
DJ
5780else
5781 echo "$as_me: failed program was:" >&5
5782sed 's/^/| /' conftest.$ac_ext >&5
5783
b033df90 5784 eval "$as_ac_Header=no"
238235ef
DJ
5785fi
5786rm -f conftest.err conftest.$ac_ext
0bc0cd11 5787fi
238235ef
DJ
5788echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5789echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
238235ef
DJ
5790if test `eval echo '${'$as_ac_Header'}'` = yes; then
5791 cat >>confdefs.h <<_ACEOF
5792#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5793_ACEOF
0bc0cd11 5794
0bc0cd11 5795fi
238235ef
DJ
5796done
5797
5798
5799
5800for ac_func in fork vfork
5801do
5802as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5803echo "$as_me:$LINENO: checking for $ac_func" >&5
5804echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5805if eval "test \"\${$as_ac_var+set}\" = set"; then
5806 echo $ECHO_N "(cached) $ECHO_C" >&6
5807else
5808 if test x$gcc_no_link = xyes; then
5809 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5810echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5811 { (exit 1); exit 1; }; }
5812fi
5813cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
5814/* confdefs.h. */
5815_ACEOF
5816cat confdefs.h >>conftest.$ac_ext
5817cat >>conftest.$ac_ext <<_ACEOF
5818/* end confdefs.h. */
0bc0cd11 5819/* System header to define __stub macros and hopefully few prototypes,
238235ef
DJ
5820 which can conflict with char $ac_func (); below.
5821 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
5822 <limits.h> exists even on freestanding compilers. Under hpux,
5823 including <limits.h> includes <sys/time.h> and causes problems
5824 checking for functions defined therein. */
5825#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
5826# include <limits.h>
5827#else
5828# include <assert.h>
5829#endif
0bc0cd11 5830/* Override any gcc2 internal prototype to avoid an error. */
238235ef
DJ
5831#ifdef __cplusplus
5832extern "C"
5833{
5834#endif
0bc0cd11 5835/* We use char because int might match the return type of a gcc2
238235ef
DJ
5836 builtin and then its argument prototype would still apply. */
5837char $ac_func ();
0bc0cd11
JL
5838/* The GNU C library defines this for functions which it implements
5839 to always fail with ENOSYS. Some functions are actually named
5840 something starting with __ and the normal name is an alias. */
238235ef 5841#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
0bc0cd11
JL
5842choke me
5843#else
238235ef
DJ
5844char (*f) () = $ac_func;
5845#endif
5846#ifdef __cplusplus
5847}
0bc0cd11
JL
5848#endif
5849
238235ef
DJ
5850int
5851main ()
5852{
5853return f != $ac_func;
5854 ;
5855 return 0;
5856}
5857_ACEOF
5858rm -f conftest.$ac_objext conftest$ac_exeext
5859if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 5860 (eval $ac_link) 2>conftest.er1
238235ef 5861 ac_status=$?
3beb1315
HPN
5862 grep -v '^ *+' conftest.er1 >conftest.err
5863 rm -f conftest.er1
5864 cat conftest.err >&5
238235ef
DJ
5865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5866 (exit $ac_status); } &&
7b3ed47d 5867 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
5868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5869 (eval $ac_try) 2>&5
5870 ac_status=$?
5871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5872 (exit $ac_status); }; } &&
5873 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
5874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5875 (eval $ac_try) 2>&5
5876 ac_status=$?
5877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5878 (exit $ac_status); }; }; then
5879 eval "$as_ac_var=yes"
5880else
5881 echo "$as_me: failed program was:" >&5
5882sed 's/^/| /' conftest.$ac_ext >&5
5883
5884eval "$as_ac_var=no"
5885fi
3beb1315
HPN
5886rm -f conftest.err conftest.$ac_objext \
5887 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
5888fi
5889echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5890echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5891if test `eval echo '${'$as_ac_var'}'` = yes; then
5892 cat >>confdefs.h <<_ACEOF
5893#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5894_ACEOF
5895
0bc0cd11 5896fi
238235ef 5897done
0bc0cd11 5898
238235ef
DJ
5899if test "x$ac_cv_func_fork" = xyes; then
5900 echo "$as_me:$LINENO: checking for working fork" >&5
5901echo $ECHO_N "checking for working fork... $ECHO_C" >&6
5902if test "${ac_cv_func_fork_works+set}" = set; then
5903 echo $ECHO_N "(cached) $ECHO_C" >&6
0bc0cd11 5904else
238235ef
DJ
5905 if test "$cross_compiling" = yes; then
5906 ac_cv_func_fork_works=cross
5907else
5908 cat >conftest.$ac_ext <<_ACEOF
5909/* By Ruediger Kuhlmann. */
5910 #include <sys/types.h>
5911 #if HAVE_UNISTD_H
5912 # include <unistd.h>
5913 #endif
5914 /* Some systems only have a dummy stub for fork() */
5915 int main ()
5916 {
3beb1315
HPN
5917 if (fork() < 0)
5918 exit (1);
5919 exit (0);
238235ef
DJ
5920 }
5921_ACEOF
5922rm -f conftest$ac_exeext
5923if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5924 (eval $ac_link) 2>&5
5925 ac_status=$?
5926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5927 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5929 (eval $ac_try) 2>&5
5930 ac_status=$?
5931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5932 (exit $ac_status); }; }; then
5933 ac_cv_func_fork_works=yes
5934else
5935 echo "$as_me: program exited with status $ac_status" >&5
5936echo "$as_me: failed program was:" >&5
5937sed 's/^/| /' conftest.$ac_ext >&5
5938
5939( exit $ac_status )
5940ac_cv_func_fork_works=no
5941fi
3beb1315 5942rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
238235ef
DJ
5943fi
5944fi
5945echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
5946echo "${ECHO_T}$ac_cv_func_fork_works" >&6
5947
5948else
5949 ac_cv_func_fork_works=$ac_cv_func_fork
5950fi
5951if test "x$ac_cv_func_fork_works" = xcross; then
5952 case $host in
5953 *-*-amigaos* | *-*-msdosdjgpp*)
5954 # Override, as these systems have only a dummy fork() stub
5955 ac_cv_func_fork_works=no
5956 ;;
5957 *)
5958 ac_cv_func_fork_works=yes
5959 ;;
5960 esac
5961 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
5962echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
0bc0cd11 5963fi
0bc0cd11 5964ac_cv_func_vfork_works=$ac_cv_func_vfork
238235ef
DJ
5965if test "x$ac_cv_func_vfork" = xyes; then
5966 echo "$as_me:$LINENO: checking for working vfork" >&5
5967echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
5968if test "${ac_cv_func_vfork_works+set}" = set; then
5969 echo $ECHO_N "(cached) $ECHO_C" >&6
0bc0cd11 5970else
238235ef
DJ
5971 if test "$cross_compiling" = yes; then
5972 ac_cv_func_vfork_works=cross
5973else
5974 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
5975/* confdefs.h. */
5976_ACEOF
5977cat confdefs.h >>conftest.$ac_ext
5978cat >>conftest.$ac_ext <<_ACEOF
5979/* end confdefs.h. */
0bc0cd11
JL
5980/* Thanks to Paul Eggert for this test. */
5981#include <stdio.h>
238235ef 5982#include <stdlib.h>
0bc0cd11
JL
5983#include <sys/types.h>
5984#include <sys/stat.h>
238235ef
DJ
5985#include <sys/wait.h>
5986#if HAVE_UNISTD_H
5987# include <unistd.h>
0bc0cd11 5988#endif
238235ef
DJ
5989#if HAVE_VFORK_H
5990# include <vfork.h>
0bc0cd11
JL
5991#endif
5992/* On some sparc systems, changes by the child to local and incoming
238235ef
DJ
5993 argument registers are propagated back to the parent. The compiler
5994 is told about this with #include <vfork.h>, but some compilers
5995 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
5996 static variable whose address is put into a register that is
5997 clobbered by the vfork. */
5998static void
0bc0cd11
JL
5999#ifdef __cplusplus
6000sparc_address_test (int arg)
238235ef 6001# else
0bc0cd11
JL
6002sparc_address_test (arg) int arg;
6003#endif
6004{
6005 static pid_t child;
6006 if (!child) {
6007 child = vfork ();
6008 if (child < 0) {
6009 perror ("vfork");
6010 _exit(2);
6011 }
6012 if (!child) {
6013 arg = getpid();
6014 write(-1, "", 0);
6015 _exit (arg);
6016 }
6017 }
6018}
238235ef
DJ
6019
6020int
6021main ()
6022{
0bc0cd11
JL
6023 pid_t parent = getpid ();
6024 pid_t child;
6025
238235ef 6026 sparc_address_test (0);
0bc0cd11
JL
6027
6028 child = vfork ();
6029
6030 if (child == 0) {
238235ef
DJ
6031 /* Here is another test for sparc vfork register problems. This
6032 test uses lots of local variables, at least as many local
6033 variables as main has allocated so far including compiler
6034 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
6035 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
6036 reuse the register of parent for one of the local variables,
6037 since it will think that parent can't possibly be used any more
6038 in this routine. Assigning to the local variable will thus
6039 munge parent in the parent process. */
0bc0cd11
JL
6040 pid_t
6041 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6042 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6043 /* Convince the compiler that p..p7 are live; otherwise, it might
6044 use the same hardware register for all 8 local variables. */
6045 if (p != p1 || p != p2 || p != p3 || p != p4
6046 || p != p5 || p != p6 || p != p7)
6047 _exit(1);
6048
238235ef
DJ
6049 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
6050 from child file descriptors. If the child closes a descriptor
6051 before it execs or exits, this munges the parent's descriptor
6052 as well. Test for this by closing stdout in the child. */
0bc0cd11
JL
6053 _exit(close(fileno(stdout)) != 0);
6054 } else {
6055 int status;
6056 struct stat st;
6057
6058 while (wait(&status) != child)
6059 ;
6060 exit(
6061 /* Was there some problem with vforking? */
6062 child < 0
6063
6064 /* Did the child fail? (This shouldn't happen.) */
6065 || status
6066
6067 /* Did the vfork/compiler bug occur? */
6068 || parent != getpid()
6069
6070 /* Did the file descriptor bug occur? */
6071 || fstat(fileno(stdout), &st) != 0
6072 );
6073 }
6074}
238235ef
DJ
6075_ACEOF
6076rm -f conftest$ac_exeext
6077if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6078 (eval $ac_link) 2>&5
6079 ac_status=$?
6080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6081 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6083 (eval $ac_try) 2>&5
6084 ac_status=$?
6085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6086 (exit $ac_status); }; }; then
0bc0cd11
JL
6087 ac_cv_func_vfork_works=yes
6088else
238235ef
DJ
6089 echo "$as_me: program exited with status $ac_status" >&5
6090echo "$as_me: failed program was:" >&5
6091sed 's/^/| /' conftest.$ac_ext >&5
6092
6093( exit $ac_status )
6094ac_cv_func_vfork_works=no
6095fi
3beb1315 6096rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0bc0cd11 6097fi
0bc0cd11 6098fi
238235ef
DJ
6099echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
6100echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
0bc0cd11 6101
238235ef
DJ
6102fi;
6103if test "x$ac_cv_func_fork_works" = xcross; then
3beb1315 6104 ac_cv_func_vfork_works=$ac_cv_func_vfork
238235ef
DJ
6105 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
6106echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
0bc0cd11
JL
6107fi
6108
238235ef
DJ
6109if test "x$ac_cv_func_vfork_works" = xyes; then
6110
6111cat >>confdefs.h <<\_ACEOF
6112#define HAVE_WORKING_VFORK 1
6113_ACEOF
6114
6115else
6116
6117cat >>confdefs.h <<\_ACEOF
0bc0cd11 6118#define vfork fork
238235ef
DJ
6119_ACEOF
6120
6121fi
6122if test "x$ac_cv_func_fork_works" = xyes; then
6123
6124cat >>confdefs.h <<\_ACEOF
6125#define HAVE_WORKING_FORK 1
6126_ACEOF
0bc0cd11
JL
6127
6128fi
6129
6130 if test $ac_cv_func_vfork_works = no; then
3beb1315
HPN
6131 case $LIBOBJS in
6132 "vfork.$ac_objext" | \
6133 *" vfork.$ac_objext" | \
6134 "vfork.$ac_objext "* | \
6135 *" vfork.$ac_objext "* ) ;;
6136 *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
6137esac
6138
0bc0cd11 6139 fi
e490616e
ZW
6140 # We only need _doprnt if we might use it to implement v*printf.
6141 if test $ac_cv_func_vprintf != yes \
6142 || test $ac_cv_func_vfprintf != yes \
6143 || test $ac_cv_func_vsprintf != yes; then
238235ef
DJ
6144
6145for ac_func in _doprnt
e490616e 6146do
238235ef
DJ
6147as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6148echo "$as_me:$LINENO: checking for $ac_func" >&5
6149echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6150if eval "test \"\${$as_ac_var+set}\" = set"; then
6151 echo $ECHO_N "(cached) $ECHO_C" >&6
6152else
6153 if test x$gcc_no_link = xyes; then
6154 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6155echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6156 { (exit 1); exit 1; }; }
6157fi
6158cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6159/* confdefs.h. */
6160_ACEOF
6161cat confdefs.h >>conftest.$ac_ext
6162cat >>conftest.$ac_ext <<_ACEOF
6163/* end confdefs.h. */
e490616e 6164/* System header to define __stub macros and hopefully few prototypes,
238235ef
DJ
6165 which can conflict with char $ac_func (); below.
6166 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
6167 <limits.h> exists even on freestanding compilers. Under hpux,
6168 including <limits.h> includes <sys/time.h> and causes problems
6169 checking for functions defined therein. */
6170#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
6171# include <limits.h>
6172#else
6173# include <assert.h>
6174#endif
e490616e 6175/* Override any gcc2 internal prototype to avoid an error. */
238235ef
DJ
6176#ifdef __cplusplus
6177extern "C"
6178{
6179#endif
e490616e 6180/* We use char because int might match the return type of a gcc2
238235ef
DJ
6181 builtin and then its argument prototype would still apply. */
6182char $ac_func ();
e490616e
ZW
6183/* The GNU C library defines this for functions which it implements
6184 to always fail with ENOSYS. Some functions are actually named
6185 something starting with __ and the normal name is an alias. */
6186#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6187choke me
6188#else
238235ef
DJ
6189char (*f) () = $ac_func;
6190#endif
6191#ifdef __cplusplus
6192}
e490616e
ZW
6193#endif
6194
238235ef
DJ
6195int
6196main ()
6197{
6198return f != $ac_func;
6199 ;
6200 return 0;
6201}
6202_ACEOF
6203rm -f conftest.$ac_objext conftest$ac_exeext
6204if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 6205 (eval $ac_link) 2>conftest.er1
238235ef 6206 ac_status=$?
3beb1315
HPN
6207 grep -v '^ *+' conftest.er1 >conftest.err
6208 rm -f conftest.er1
6209 cat conftest.err >&5
238235ef
DJ
6210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6211 (exit $ac_status); } &&
7b3ed47d 6212 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
6213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6214 (eval $ac_try) 2>&5
6215 ac_status=$?
6216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6217 (exit $ac_status); }; } &&
6218 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
6219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6220 (eval $ac_try) 2>&5
6221 ac_status=$?
6222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6223 (exit $ac_status); }; }; then
6224 eval "$as_ac_var=yes"
6225else
6226 echo "$as_me: failed program was:" >&5
6227sed 's/^/| /' conftest.$ac_ext >&5
6228
6229eval "$as_ac_var=no"
6230fi
3beb1315
HPN
6231rm -f conftest.err conftest.$ac_objext \
6232 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
6233fi
6234echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6235echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6236if test `eval echo '${'$as_ac_var'}'` = yes; then
6237 cat >>confdefs.h <<_ACEOF
6238#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6239_ACEOF
6240
6241else
3beb1315
HPN
6242 case $LIBOBJS in
6243 "$ac_func.$ac_objext" | \
6244 *" $ac_func.$ac_objext" | \
6245 "$ac_func.$ac_objext "* | \
6246 *" $ac_func.$ac_objext "* ) ;;
6247 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
6248esac
6249
e490616e
ZW
6250fi
6251done
6252
6253
9ce3f7e5 6254 else
238235ef
DJ
6255
6256for ac_func in _doprnt
9ce3f7e5 6257do
238235ef
DJ
6258as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6259echo "$as_me:$LINENO: checking for $ac_func" >&5
6260echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6261if eval "test \"\${$as_ac_var+set}\" = set"; then
6262 echo $ECHO_N "(cached) $ECHO_C" >&6
6263else
6264 if test x$gcc_no_link = xyes; then
6265 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6266echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6267 { (exit 1); exit 1; }; }
6268fi
6269cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6270/* confdefs.h. */
6271_ACEOF
6272cat confdefs.h >>conftest.$ac_ext
6273cat >>conftest.$ac_ext <<_ACEOF
6274/* end confdefs.h. */
9ce3f7e5 6275/* System header to define __stub macros and hopefully few prototypes,
238235ef
DJ
6276 which can conflict with char $ac_func (); below.
6277 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
6278 <limits.h> exists even on freestanding compilers. Under hpux,
6279 including <limits.h> includes <sys/time.h> and causes problems
6280 checking for functions defined therein. */
6281#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
6282# include <limits.h>
6283#else
6284# include <assert.h>
6285#endif
9ce3f7e5 6286/* Override any gcc2 internal prototype to avoid an error. */
238235ef
DJ
6287#ifdef __cplusplus
6288extern "C"
6289{
6290#endif
9ce3f7e5 6291/* We use char because int might match the return type of a gcc2
238235ef
DJ
6292 builtin and then its argument prototype would still apply. */
6293char $ac_func ();
9ce3f7e5
DD
6294/* The GNU C library defines this for functions which it implements
6295 to always fail with ENOSYS. Some functions are actually named
6296 something starting with __ and the normal name is an alias. */
6297#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6298choke me
6299#else
238235ef
DJ
6300char (*f) () = $ac_func;
6301#endif
6302#ifdef __cplusplus
6303}
9ce3f7e5
DD
6304#endif
6305
238235ef
DJ
6306int
6307main ()
6308{
6309return f != $ac_func;
6310 ;
6311 return 0;
6312}
6313_ACEOF
6314rm -f conftest.$ac_objext conftest$ac_exeext
6315if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 6316 (eval $ac_link) 2>conftest.er1
238235ef 6317 ac_status=$?
3beb1315
HPN
6318 grep -v '^ *+' conftest.er1 >conftest.err
6319 rm -f conftest.er1
6320 cat conftest.err >&5
238235ef
DJ
6321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6322 (exit $ac_status); } &&
7b3ed47d 6323 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
6324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6325 (eval $ac_try) 2>&5
6326 ac_status=$?
6327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6328 (exit $ac_status); }; } &&
6329 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
6330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6331 (eval $ac_try) 2>&5
6332 ac_status=$?
6333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6334 (exit $ac_status); }; }; then
6335 eval "$as_ac_var=yes"
6336else
6337 echo "$as_me: failed program was:" >&5
6338sed 's/^/| /' conftest.$ac_ext >&5
6339
6340eval "$as_ac_var=no"
6341fi
3beb1315
HPN
6342rm -f conftest.err conftest.$ac_objext \
6343 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
6344fi
6345echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6346echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6347if test `eval echo '${'$as_ac_var'}'` = yes; then
6348 cat >>confdefs.h <<_ACEOF
6349#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6350_ACEOF
9ce3f7e5 6351
9ce3f7e5
DD
6352fi
6353done
6354
e490616e
ZW
6355 fi
6356
0bc0cd11 6357 for v in $vars; do
238235ef
DJ
6358 echo "$as_me:$LINENO: checking for $v" >&5
6359echo $ECHO_N "checking for $v... $ECHO_C" >&6
6360 if eval "test \"\${libiberty_cv_var_$v+set}\" = set"; then
6361 echo $ECHO_N "(cached) $ECHO_C" >&6
6362else
6363 if test x$gcc_no_link = xyes; then
6364 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6365echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6366 { (exit 1); exit 1; }; }
6367fi
6368cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6369/* confdefs.h. */
6370_ACEOF
6371cat confdefs.h >>conftest.$ac_ext
6372cat >>conftest.$ac_ext <<_ACEOF
6373/* end confdefs.h. */
0bc0cd11 6374int *p;
238235ef
DJ
6375int
6376main ()
6377{
9f3dbd92 6378extern int $v []; p = $v;
238235ef
DJ
6379 ;
6380 return 0;
6381}
6382_ACEOF
6383rm -f conftest.$ac_objext conftest$ac_exeext
6384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 6385 (eval $ac_link) 2>conftest.er1
238235ef 6386 ac_status=$?
3beb1315
HPN
6387 grep -v '^ *+' conftest.er1 >conftest.err
6388 rm -f conftest.er1
6389 cat conftest.err >&5
238235ef
DJ
6390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6391 (exit $ac_status); } &&
7b3ed47d 6392 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
6393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6394 (eval $ac_try) 2>&5
6395 ac_status=$?
6396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6397 (exit $ac_status); }; } &&
6398 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
6399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6400 (eval $ac_try) 2>&5
6401 ac_status=$?
6402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6403 (exit $ac_status); }; }; then
0bc0cd11
JL
6404 eval "libiberty_cv_var_$v=yes"
6405else
238235ef
DJ
6406 echo "$as_me: failed program was:" >&5
6407sed 's/^/| /' conftest.$ac_ext >&5
6408
6409eval "libiberty_cv_var_$v=no"
0bc0cd11 6410fi
3beb1315
HPN
6411rm -f conftest.err conftest.$ac_objext \
6412 conftest$ac_exeext conftest.$ac_ext
0bc0cd11
JL
6413fi
6414
6415 if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
238235ef
DJ
6416 echo "$as_me:$LINENO: result: yes" >&5
6417echo "${ECHO_T}yes" >&6
0bc0cd11 6418 n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
238235ef 6419 cat >>confdefs.h <<_ACEOF
0bc0cd11 6420#define $n 1
238235ef 6421_ACEOF
0bc0cd11
JL
6422
6423 else
238235ef
DJ
6424 echo "$as_me:$LINENO: result: no" >&5
6425echo "${ECHO_T}no" >&6
0bc0cd11
JL
6426 fi
6427 done
aa9dc53d
ACY
6428
6429 # special check for _system_configuration because AIX <4.3.2 do not
6430 # contain the `physmem' member.
238235ef
DJ
6431 echo "$as_me:$LINENO: checking for external symbol _system_configuration" >&5
6432echo $ECHO_N "checking for external symbol _system_configuration... $ECHO_C" >&6
6433 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6434/* confdefs.h. */
6435_ACEOF
6436cat confdefs.h >>conftest.$ac_ext
6437cat >>conftest.$ac_ext <<_ACEOF
6438/* end confdefs.h. */
aa9dc53d 6439#include <sys/systemcfg.h>
238235ef
DJ
6440int
6441main ()
6442{
aa9dc53d 6443double x = _system_configuration.physmem;
238235ef
DJ
6444 ;
6445 return 0;
6446}
6447_ACEOF
6448rm -f conftest.$ac_objext
6449if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 6450 (eval $ac_compile) 2>conftest.er1
238235ef 6451 ac_status=$?
3beb1315
HPN
6452 grep -v '^ *+' conftest.er1 >conftest.err
6453 rm -f conftest.er1
6454 cat conftest.err >&5
238235ef
DJ
6455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6456 (exit $ac_status); } &&
7b3ed47d 6457 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
6458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6459 (eval $ac_try) 2>&5
6460 ac_status=$?
6461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6462 (exit $ac_status); }; } &&
6463 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
6464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6465 (eval $ac_try) 2>&5
6466 ac_status=$?
6467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6468 (exit $ac_status); }; }; then
6469 echo "$as_me:$LINENO: result: yes" >&5
6470echo "${ECHO_T}yes" >&6
6471
6472cat >>confdefs.h <<\_ACEOF
aa9dc53d 6473#define HAVE__SYSTEM_CONFIGURATION 1
238235ef 6474_ACEOF
aa9dc53d
ACY
6475
6476else
238235ef
DJ
6477 echo "$as_me: failed program was:" >&5
6478sed 's/^/| /' conftest.$ac_ext >&5
6479
6480echo "$as_me:$LINENO: result: no" >&5
6481echo "${ECHO_T}no" >&6
aa9dc53d 6482fi
3beb1315 6483rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef 6484
aa9dc53d 6485
238235ef 6486for ac_func in $checkfuncs
0bc0cd11 6487do
238235ef
DJ
6488as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6489echo "$as_me:$LINENO: checking for $ac_func" >&5
6490echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6491if eval "test \"\${$as_ac_var+set}\" = set"; then
6492 echo $ECHO_N "(cached) $ECHO_C" >&6
6493else
6494 if test x$gcc_no_link = xyes; then
6495 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6496echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6497 { (exit 1); exit 1; }; }
6498fi
6499cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6500/* confdefs.h. */
6501_ACEOF
6502cat confdefs.h >>conftest.$ac_ext
6503cat >>conftest.$ac_ext <<_ACEOF
6504/* end confdefs.h. */
0bc0cd11 6505/* System header to define __stub macros and hopefully few prototypes,
238235ef
DJ
6506 which can conflict with char $ac_func (); below.
6507 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
6508 <limits.h> exists even on freestanding compilers. Under hpux,
6509 including <limits.h> includes <sys/time.h> and causes problems
6510 checking for functions defined therein. */
6511#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
6512# include <limits.h>
6513#else
6514# include <assert.h>
6515#endif
0bc0cd11 6516/* Override any gcc2 internal prototype to avoid an error. */
238235ef
DJ
6517#ifdef __cplusplus
6518extern "C"
6519{
6520#endif
0bc0cd11 6521/* We use char because int might match the return type of a gcc2
238235ef
DJ
6522 builtin and then its argument prototype would still apply. */
6523char $ac_func ();
0bc0cd11
JL
6524/* The GNU C library defines this for functions which it implements
6525 to always fail with ENOSYS. Some functions are actually named
6526 something starting with __ and the normal name is an alias. */
6527#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6528choke me
6529#else
238235ef
DJ
6530char (*f) () = $ac_func;
6531#endif
6532#ifdef __cplusplus
6533}
0bc0cd11
JL
6534#endif
6535
238235ef
DJ
6536int
6537main ()
6538{
6539return f != $ac_func;
6540 ;
6541 return 0;
6542}
6543_ACEOF
6544rm -f conftest.$ac_objext conftest$ac_exeext
6545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 6546 (eval $ac_link) 2>conftest.er1
238235ef 6547 ac_status=$?
3beb1315
HPN
6548 grep -v '^ *+' conftest.er1 >conftest.err
6549 rm -f conftest.er1
6550 cat conftest.err >&5
238235ef
DJ
6551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6552 (exit $ac_status); } &&
7b3ed47d 6553 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
6554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6555 (eval $ac_try) 2>&5
6556 ac_status=$?
6557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6558 (exit $ac_status); }; } &&
6559 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
6560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6561 (eval $ac_try) 2>&5
6562 ac_status=$?
6563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6564 (exit $ac_status); }; }; then
6565 eval "$as_ac_var=yes"
6566else
6567 echo "$as_me: failed program was:" >&5
6568sed 's/^/| /' conftest.$ac_ext >&5
6569
6570eval "$as_ac_var=no"
6571fi
3beb1315
HPN
6572rm -f conftest.err conftest.$ac_objext \
6573 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
6574fi
6575echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6576echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6577if test `eval echo '${'$as_ac_var'}'` = yes; then
6578 cat >>confdefs.h <<_ACEOF
6579#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6580_ACEOF
0bc0cd11 6581
0bc0cd11
JL
6582fi
6583done
6584
238235ef
DJ
6585 echo "$as_me:$LINENO: checking whether canonicalize_file_name must be declared" >&5
6586echo $ECHO_N "checking whether canonicalize_file_name must be declared... $ECHO_C" >&6
6587if test "${libiberty_cv_decl_needed_canonicalize_file_name+set}" = set; then
6588 echo $ECHO_N "(cached) $ECHO_C" >&6
4876b2b4 6589else
238235ef 6590 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6591/* confdefs.h. */
6592_ACEOF
6593cat confdefs.h >>conftest.$ac_ext
6594cat >>conftest.$ac_ext <<_ACEOF
6595/* end confdefs.h. */
4876b2b4
DJ
6596
6597#include "confdefs.h"
6598#include <stdio.h>
6599#ifdef HAVE_STRING_H
6600#include <string.h>
6601#else
6602#ifdef HAVE_STRINGS_H
6603#include <strings.h>
6604#endif
6605#endif
6606#ifdef HAVE_STDLIB_H
6607#include <stdlib.h>
6608#endif
6609#ifdef HAVE_UNISTD_H
6610#include <unistd.h>
6611#endif
238235ef
DJ
6612int
6613main ()
6614{
4876b2b4 6615char *(*pfn) = (char *(*)) canonicalize_file_name
238235ef
DJ
6616 ;
6617 return 0;
6618}
6619_ACEOF
6620rm -f conftest.$ac_objext
6621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3beb1315 6622 (eval $ac_compile) 2>conftest.er1
238235ef 6623 ac_status=$?
3beb1315
HPN
6624 grep -v '^ *+' conftest.er1 >conftest.err
6625 rm -f conftest.er1
6626 cat conftest.err >&5
238235ef
DJ
6627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6628 (exit $ac_status); } &&
7b3ed47d 6629 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
6630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6631 (eval $ac_try) 2>&5
6632 ac_status=$?
6633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6634 (exit $ac_status); }; } &&
6635 { ac_try='test -s conftest.$ac_objext'
238235ef
DJ
6636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6637 (eval $ac_try) 2>&5
6638 ac_status=$?
6639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6640 (exit $ac_status); }; }; then
4876b2b4
DJ
6641 libiberty_cv_decl_needed_canonicalize_file_name=no
6642else
238235ef
DJ
6643 echo "$as_me: failed program was:" >&5
6644sed 's/^/| /' conftest.$ac_ext >&5
6645
6646libiberty_cv_decl_needed_canonicalize_file_name=yes
4876b2b4 6647fi
3beb1315 6648rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4876b2b4
DJ
6649fi
6650
238235ef
DJ
6651echo "$as_me:$LINENO: result: $libiberty_cv_decl_needed_canonicalize_file_name" >&5
6652echo "${ECHO_T}$libiberty_cv_decl_needed_canonicalize_file_name" >&6
4876b2b4 6653if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then
238235ef
DJ
6654
6655cat >>confdefs.h <<\_ACEOF
4876b2b4 6656#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
238235ef 6657_ACEOF
4876b2b4
DJ
6658
6659fi
6660
0bc0cd11
JL
6661fi
6662
55d0e5e0
ZW
6663# Figure out which version of pexecute to use.
6664case "${host}" in
5254fd7b
ILT
6665 *-*-mingw* | *-*-winnt*) pexecute=./pex-win32.o ;;
6666 *-*-msdosdjgpp*) pexecute=./pex-djgpp.o ;;
6667 *-*-msdos*) pexecute=./pex-msdos.o ;;
6668 *-*-os2-emx*) pexecute=./pex-os2.o ;;
6669 *) pexecute=./pex-unix.o ;;
55d0e5e0
ZW
6670esac
6671
6672
238235ef
DJ
6673if test x$gcc_no_link = xyes; then
6674 if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
6675 ac_cv_func_mmap_fixed_mapped=no
6676 fi
6677fi
6678if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
6679
6680
6681for ac_header in stdlib.h unistd.h
a9266bfa 6682do
238235ef 6683as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b033df90 6684echo "$as_me:$LINENO: checking for $ac_header" >&5
238235ef
DJ
6685echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6686if eval "test \"\${$as_ac_Header+set}\" = set"; then
6687 echo $ECHO_N "(cached) $ECHO_C" >&6
238235ef 6688else
b033df90 6689 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6690/* confdefs.h. */
6691_ACEOF
6692cat confdefs.h >>conftest.$ac_ext
6693cat >>conftest.$ac_ext <<_ACEOF
6694/* end confdefs.h. */
6695#include <$ac_header>
6696_ACEOF
6697if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6698 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6699 ac_status=$?
6700 grep -v '^ *+' conftest.er1 >conftest.err
6701 rm -f conftest.er1
6702 cat conftest.err >&5
6703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6704 (exit $ac_status); } >/dev/null; then
6705 if test -s conftest.err; then
6706 ac_cpp_err=$ac_c_preproc_warn_flag
3beb1315 6707 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
238235ef
DJ
6708 else
6709 ac_cpp_err=
6710 fi
6711else
6712 ac_cpp_err=yes
6713fi
6714if test -z "$ac_cpp_err"; then
b033df90 6715 eval "$as_ac_Header=yes"
238235ef
DJ
6716else
6717 echo "$as_me: failed program was:" >&5
6718sed 's/^/| /' conftest.$ac_ext >&5
6719
b033df90 6720 eval "$as_ac_Header=no"
238235ef
DJ
6721fi
6722rm -f conftest.err conftest.$ac_ext
a9266bfa 6723fi
238235ef
DJ
6724echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6725echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
238235ef
DJ
6726if test `eval echo '${'$as_ac_Header'}'` = yes; then
6727 cat >>confdefs.h <<_ACEOF
6728#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6729_ACEOF
6730
a9266bfa
KG
6731fi
6732done
6733
238235ef 6734
a9266bfa
KG
6735for ac_func in getpagesize
6736do
238235ef
DJ
6737as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6738echo "$as_me:$LINENO: checking for $ac_func" >&5
6739echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6740if eval "test \"\${$as_ac_var+set}\" = set"; then
6741 echo $ECHO_N "(cached) $ECHO_C" >&6
6742else
6743 if test x$gcc_no_link = xyes; then
6744 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6745echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6746 { (exit 1); exit 1; }; }
6747fi
6748cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6749/* confdefs.h. */
6750_ACEOF
6751cat confdefs.h >>conftest.$ac_ext
6752cat >>conftest.$ac_ext <<_ACEOF
6753/* end confdefs.h. */
a9266bfa 6754/* System header to define __stub macros and hopefully few prototypes,
238235ef
DJ
6755 which can conflict with char $ac_func (); below.
6756 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
86d75906
JDA
6757 <limits.h> exists even on freestanding compilers. Under hpux,
6758 including <limits.h> includes <sys/time.h> and causes problems
6759 checking for functions defined therein. */
6760#if defined (__STDC__) && !defined (_HPUX_SOURCE)
238235ef
DJ
6761# include <limits.h>
6762#else
6763# include <assert.h>
6764#endif
a9266bfa 6765/* Override any gcc2 internal prototype to avoid an error. */
238235ef
DJ
6766#ifdef __cplusplus
6767extern "C"
6768{
6769#endif
a9266bfa 6770/* We use char because int might match the return type of a gcc2
238235ef
DJ
6771 builtin and then its argument prototype would still apply. */
6772char $ac_func ();
a9266bfa
KG
6773/* The GNU C library defines this for functions which it implements
6774 to always fail with ENOSYS. Some functions are actually named
6775 something starting with __ and the normal name is an alias. */
6776#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6777choke me
6778#else
238235ef
DJ
6779char (*f) () = $ac_func;
6780#endif
6781#ifdef __cplusplus
6782}
a9266bfa
KG
6783#endif
6784
238235ef
DJ
6785int
6786main ()
6787{
6788return f != $ac_func;
6789 ;
6790 return 0;
6791}
6792_ACEOF
6793rm -f conftest.$ac_objext conftest$ac_exeext
6794if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3beb1315 6795 (eval $ac_link) 2>conftest.er1
238235ef 6796 ac_status=$?
3beb1315
HPN
6797 grep -v '^ *+' conftest.er1 >conftest.err
6798 rm -f conftest.er1
6799 cat conftest.err >&5
238235ef
DJ
6800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6801 (exit $ac_status); } &&
7b3ed47d 6802 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3beb1315
HPN
6803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6804 (eval $ac_try) 2>&5
6805 ac_status=$?
6806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6807 (exit $ac_status); }; } &&
6808 { ac_try='test -s conftest$ac_exeext'
238235ef
DJ
6809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6810 (eval $ac_try) 2>&5
6811 ac_status=$?
6812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6813 (exit $ac_status); }; }; then
6814 eval "$as_ac_var=yes"
6815else
6816 echo "$as_me: failed program was:" >&5
6817sed 's/^/| /' conftest.$ac_ext >&5
6818
6819eval "$as_ac_var=no"
6820fi
3beb1315
HPN
6821rm -f conftest.err conftest.$ac_objext \
6822 conftest$ac_exeext conftest.$ac_ext
238235ef
DJ
6823fi
6824echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6825echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6826if test `eval echo '${'$as_ac_var'}'` = yes; then
6827 cat >>confdefs.h <<_ACEOF
6828#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6829_ACEOF
a9266bfa 6830
a9266bfa
KG
6831fi
6832done
6833
238235ef
DJ
6834echo "$as_me:$LINENO: checking for working mmap" >&5
6835echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
6836if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
6837 echo $ECHO_N "(cached) $ECHO_C" >&6
a9266bfa
KG
6838else
6839 if test "$cross_compiling" = yes; then
6840 ac_cv_func_mmap_fixed_mapped=no
6841else
238235ef 6842 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
6843/* confdefs.h. */
6844_ACEOF
6845cat confdefs.h >>conftest.$ac_ext
6846cat >>conftest.$ac_ext <<_ACEOF
6847/* end confdefs.h. */
6848$ac_includes_default
6849/* malloc might have been renamed as rpl_malloc. */
6850#undef malloc
a9266bfa
KG
6851
6852/* Thanks to Mike Haertel and Jim Avera for this test.
6853 Here is a matrix of mmap possibilities:
6854 mmap private not fixed
6855 mmap private fixed at somewhere currently unmapped
6856 mmap private fixed at somewhere already mapped
6857 mmap shared not fixed
6858 mmap shared fixed at somewhere currently unmapped
6859 mmap shared fixed at somewhere already mapped
6860 For private mappings, we should verify that changes cannot be read()
6861 back from the file, nor mmap's back from the file at a different
6862 address. (There have been systems where private was not correctly
6863 implemented like the infamous i386 svr4.0, and systems where the
238235ef 6864 VM page cache was not coherent with the file system buffer cache
a9266bfa
KG
6865 like early versions of FreeBSD and possibly contemporary NetBSD.)
6866 For shared mappings, we should conversely verify that changes get
238235ef 6867 propagated back to all the places they're supposed to be.
a9266bfa
KG
6868
6869 Grep wants private fixed already mapped.
6870 The main things grep needs to know about mmap are:
6871 * does it exist and is it safe to write into the mmap'd area
6872 * how to use it (BSD variants) */
238235ef 6873
a9266bfa
KG
6874#include <fcntl.h>
6875#include <sys/mman.h>
6876
238235ef
DJ
6877#if !STDC_HEADERS && !HAVE_STDLIB_H
6878char *malloc ();
cf8e4b78
DH
6879#endif
6880
a9266bfa 6881/* This mess was copied from the GNU getpagesize.h. */
238235ef 6882#if !HAVE_GETPAGESIZE
a9266bfa 6883/* Assume that all systems that can run configure have sys/param.h. */
238235ef 6884# if !HAVE_SYS_PARAM_H
a9266bfa
KG
6885# define HAVE_SYS_PARAM_H 1
6886# endif
6887
6888# ifdef _SC_PAGESIZE
6889# define getpagesize() sysconf(_SC_PAGESIZE)
6890# else /* no _SC_PAGESIZE */
238235ef 6891# if HAVE_SYS_PARAM_H
a9266bfa
KG
6892# include <sys/param.h>
6893# ifdef EXEC_PAGESIZE
6894# define getpagesize() EXEC_PAGESIZE
6895# else /* no EXEC_PAGESIZE */
6896# ifdef NBPG
6897# define getpagesize() NBPG * CLSIZE
6898# ifndef CLSIZE
6899# define CLSIZE 1
6900# endif /* no CLSIZE */
6901# else /* no NBPG */
6902# ifdef NBPC
6903# define getpagesize() NBPC
6904# else /* no NBPC */
6905# ifdef PAGESIZE
6906# define getpagesize() PAGESIZE
6907# endif /* PAGESIZE */
6908# endif /* no NBPC */
6909# endif /* no NBPG */
6910# endif /* no EXEC_PAGESIZE */
6911# else /* no HAVE_SYS_PARAM_H */
6912# define getpagesize() 8192 /* punt totally */
6913# endif /* no HAVE_SYS_PARAM_H */
6914# endif /* no _SC_PAGESIZE */
6915
6916#endif /* no HAVE_GETPAGESIZE */
6917
a9266bfa 6918int
238235ef 6919main ()
a9266bfa 6920{
238235ef
DJ
6921 char *data, *data2, *data3;
6922 int i, pagesize;
6923 int fd;
a9266bfa 6924
238235ef
DJ
6925 pagesize = getpagesize ();
6926
6927 /* First, make a file with some known garbage in it. */
6928 data = (char *) malloc (pagesize);
6929 if (!data)
6930 exit (1);
6931 for (i = 0; i < pagesize; ++i)
6932 *(data + i) = rand ();
6933 umask (0);
6934 fd = creat ("conftest.mmap", 0600);
6935 if (fd < 0)
6936 exit (1);
6937 if (write (fd, data, pagesize) != pagesize)
6938 exit (1);
6939 close (fd);
6940
6941 /* Next, try to mmap the file at a fixed address which already has
6942 something else allocated at it. If we can, also make sure that
6943 we see the same garbage. */
6944 fd = open ("conftest.mmap", O_RDWR);
6945 if (fd < 0)
6946 exit (1);
6947 data2 = (char *) malloc (2 * pagesize);
6948 if (!data2)
6949 exit (1);
3beb1315 6950 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
238235ef 6951 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
3beb1315 6952 MAP_PRIVATE | MAP_FIXED, fd, 0L))
238235ef
DJ
6953 exit (1);
6954 for (i = 0; i < pagesize; ++i)
6955 if (*(data + i) != *(data2 + i))
6956 exit (1);
6957
6958 /* Finally, make sure that changes to the mapped area do not
6959 percolate back to the file as seen by read(). (This is a bug on
6960 some variants of i386 svr4.0.) */
6961 for (i = 0; i < pagesize; ++i)
6962 *(data2 + i) = *(data2 + i) + 1;
6963 data3 = (char *) malloc (pagesize);
6964 if (!data3)
6965 exit (1);
6966 if (read (fd, data3, pagesize) != pagesize)
6967 exit (1);
6968 for (i = 0; i < pagesize; ++i)
6969 if (*(data + i) != *(data3 + i))
6970 exit (1);
6971 close (fd);
6972 exit (0);
6973}
6974_ACEOF
6975rm -f conftest$ac_exeext
6976if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6977 (eval $ac_link) 2>&5
6978 ac_status=$?
6979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6980 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6982 (eval $ac_try) 2>&5
6983 ac_status=$?
6984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6985 (exit $ac_status); }; }; then
a9266bfa
KG
6986 ac_cv_func_mmap_fixed_mapped=yes
6987else
238235ef
DJ
6988 echo "$as_me: program exited with status $ac_status" >&5
6989echo "$as_me: failed program was:" >&5
6990sed 's/^/| /' conftest.$ac_ext >&5
6991
6992( exit $ac_status )
6993ac_cv_func_mmap_fixed_mapped=no
a9266bfa 6994fi
3beb1315 6995rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a9266bfa 6996fi
a9266bfa 6997fi
238235ef
DJ
6998echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
6999echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
a9266bfa 7000if test $ac_cv_func_mmap_fixed_mapped = yes; then
238235ef
DJ
7001
7002cat >>confdefs.h <<\_ACEOF
a9266bfa 7003#define HAVE_MMAP 1
238235ef 7004_ACEOF
a9266bfa
KG
7005
7006fi
238235ef 7007rm -f conftest.mmap
a9266bfa 7008
238235ef 7009fi
a9266bfa 7010
238235ef
DJ
7011echo "$as_me:$LINENO: checking for working strncmp" >&5
7012echo $ECHO_N "checking for working strncmp... $ECHO_C" >&6
7013if test "${ac_cv_func_strncmp_works+set}" = set; then
7014 echo $ECHO_N "(cached) $ECHO_C" >&6
a9266bfa
KG
7015else
7016 if test "$cross_compiling" = yes; then
7017 ac_cv_func_strncmp_works=no
7018else
238235ef 7019 cat >conftest.$ac_ext <<_ACEOF
238235ef
DJ
7020/* confdefs.h. */
7021_ACEOF
7022cat confdefs.h >>conftest.$ac_ext
7023cat >>conftest.$ac_ext <<_ACEOF
7024/* end confdefs.h. */
a9266bfa
KG
7025
7026/* Test by Jim Wilson and Kaveh Ghazi.
7027 Check whether strncmp reads past the end of its string parameters. */
7028#include <sys/types.h>
7029
7030#ifdef HAVE_FCNTL_H
7031#include <fcntl.h>
7032#endif
7033
7034#ifdef HAVE_SYS_MMAN_H
7035#include <sys/mman.h>
7036#endif
7037
7038#ifndef MAP_ANON
7039#ifdef MAP_ANONYMOUS
7040#define MAP_ANON MAP_ANONYMOUS
7041#else
7042#define MAP_ANON MAP_FILE
7043#endif
7044#endif
7045
7046#ifndef MAP_FILE
7047#define MAP_FILE 0
7048#endif
7049#ifndef O_RDONLY
7050#define O_RDONLY 0
7051#endif
7052
7053#define MAP_LEN 0x10000
7054
7055main ()
7056{
7057#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
7058 char *p;
7059 int dev_zero;
7060
7061 dev_zero = open ("/dev/zero", O_RDONLY);
7062 if (dev_zero < 0)
7063 exit (1);
238235ef 7064
a9266bfa
KG
7065 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
7066 MAP_ANON|MAP_PRIVATE, dev_zero, 0);
a4219437
IR
7067 if (p == (char *)-1)
7068 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
7069 MAP_ANON|MAP_PRIVATE, -1, 0);
a9266bfa
KG
7070 if (p == (char *)-1)
7071 exit (2);
7072 else
7073 {
7074 char *string = "__si_type_info";
7075 char *q = (char *) p + MAP_LEN - strlen (string) - 2;
7076 char *r = (char *) p + 0xe;
7077
7078 strcpy (q, string);
7079 strcpy (r, string);
7080 strncmp (r, q, 14);
7081 }
7082#endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */
7083 exit (0);
7084}
7085
238235ef
DJ
7086_ACEOF
7087rm -f conftest$ac_exeext
7088if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7089 (eval $ac_link) 2>&5
7090 ac_status=$?
7091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7092 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7094 (eval $ac_try) 2>&5
7095 ac_status=$?
7096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7097 (exit $ac_status); }; }; then
a9266bfa
KG
7098 ac_cv_func_strncmp_works=yes
7099else
238235ef
DJ
7100 echo "$as_me: program exited with status $ac_status" >&5
7101echo "$as_me: failed program was:" >&5
7102sed 's/^/| /' conftest.$ac_ext >&5
7103
7104( exit $ac_status )
7105ac_cv_func_strncmp_works=no
a9266bfa 7106fi
3beb1315 7107rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a9266bfa 7108fi
a9266bfa
KG
7109rm -f core core.* *.core
7110fi
238235ef
DJ
7111echo "$as_me:$LINENO: result: $ac_cv_func_strncmp_works" >&5
7112echo "${ECHO_T}$ac_cv_func_strncmp_works" >&6
a9266bfa 7113if test $ac_cv_func_strncmp_works = no ; then
3beb1315
HPN
7114 case $LIBOBJS in
7115 "strncmp.$ac_objext" | \
7116 *" strncmp.$ac_objext" | \
7117 "strncmp.$ac_objext "* | \
7118 *" strncmp.$ac_objext "* ) ;;
7119 *) LIBOBJS="$LIBOBJS strncmp.$ac_objext" ;;
7120esac
7121
a9266bfa
KG
7122fi
7123
7124
0bc0cd11
JL
7125# Install a library built with a cross compiler in $(tooldir) rather
7126# than $(libdir).
ca6b370d 7127if test -z "${with_cross_host}"; then
0bc0cd11
JL
7128 INSTALL_DEST=libdir
7129else
7130 INSTALL_DEST=tooldir
7131fi
7132
7133
5254fd7b
ILT
7134
7135L=""
7136for l in x $LIBOBJS; do
7137 case $l in
7138 x) ;;
7139 *) L="$L ./$l" ;;
7140 esac
7141done
7142LIBOBJS="$L"
7143
0bc0cd11 7144# We need multilib support, but only if configuring for the target.
238235ef 7145 ac_config_files="$ac_config_files Makefile testsuite/Makefile"
9bf3c9cc 7146
238235ef 7147 ac_config_commands="$ac_config_commands default"
9bf3c9cc 7148
238235ef 7149cat >confcache <<\_ACEOF
0bc0cd11
JL
7150# This file is a shell script that caches the results of configure
7151# tests run on this system so they can be shared between configure
238235ef
DJ
7152# scripts and configure runs, see configure's option --config-cache.
7153# It is not useful on other systems. If it contains results you don't
7154# want to keep, you may remove or edit it.
0bc0cd11 7155#
238235ef
DJ
7156# config.status only pays attention to the cache file if you give it
7157# the --recheck option to rerun configure.
0bc0cd11 7158#
238235ef
DJ
7159# `ac_cv_env_foo' variables (set or unset) will be overridden when
7160# loading this file, other *unset* `ac_cv_foo' will be assigned the
7161# following values.
7162
7163_ACEOF
7164
0bc0cd11
JL
7165# The following way of writing the cache mishandles newlines in values,
7166# but we know of no workaround that is simple, portable, and efficient.
7167# So, don't put newlines in cache variables' values.
7168# Ultrix sh set writes to stderr and can't be redirected directly,
7169# and sets the high bit in the cache file unless we assign to the vars.
238235ef
DJ
7170{
7171 (set) 2>&1 |
7172 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7173 *ac_space=\ *)
7174 # `set' does not quote correctly, so add quotes (double-quote
7175 # substitution turns \\\\ into \\, and sed turns \\ into \).
7176 sed -n \
3beb1315
HPN
7177 "s/'/'\\\\''/g;
7178 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
238235ef
DJ
7179 ;;
7180 *)
7181 # `set' quotes correctly as required by POSIX, so do not add quotes.
7182 sed -n \
3beb1315 7183 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
238235ef
DJ
7184 ;;
7185 esac;
7186} |
7187 sed '
7188 t clear
7189 : clear
7190 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
7191 t end
7192 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
7193 : end' >>confcache
7194if diff $cache_file confcache >/dev/null 2>&1; then :; else
0bc0cd11 7195 if test -w $cache_file; then
238235ef
DJ
7196 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
7197 cat confcache >$cache_file
0bc0cd11
JL
7198 else
7199 echo "not updating unwritable cache $cache_file"
7200 fi
7201fi
7202rm -f confcache
7203
0bc0cd11
JL
7204test "x$prefix" = xNONE && prefix=$ac_default_prefix
7205# Let make expand exec_prefix.
7206test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7207
238235ef
DJ
7208# VPATH may cause trouble with some makes, so we remove $(srcdir),
7209# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
7210# trailing colons and then remove the whole line if VPATH becomes empty
7211# (actually we leave an empty line to preserve line numbers).
0bc0cd11 7212if test "x$srcdir" = x.; then
3beb1315 7213 ac_vpsub='/^[ ]*VPATH[ ]*=/{
238235ef
DJ
7214s/:*\$(srcdir):*/:/;
7215s/:*\${srcdir}:*/:/;
7216s/:*@srcdir@:*/:/;
3beb1315 7217s/^\([^=]*=[ ]*\):*/\1/;
238235ef 7218s/:*$//;
3beb1315 7219s/^[^=]*=[ ]*$//;
238235ef 7220}'
0bc0cd11
JL
7221fi
7222
0bc0cd11
JL
7223DEFS=-DHAVE_CONFIG_H
7224
238235ef
DJ
7225ac_libobjs=
7226ac_ltlibobjs=
7227for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
7228 # 1. Remove the extension, and $U if already installed.
7229 ac_i=`echo "$ac_i" |
3beb1315 7230 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
238235ef
DJ
7231 # 2. Add them.
7232 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
7233 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
7234done
7235LIBOBJS=$ac_libobjs
0bc0cd11 7236
238235ef
DJ
7237LTLIBOBJS=$ac_ltlibobjs
7238
7239
7240
7241: ${CONFIG_STATUS=./config.status}
7242ac_clean_files_save=$ac_clean_files
7243ac_clean_files="$ac_clean_files $CONFIG_STATUS"
7244{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
7245echo "$as_me: creating $CONFIG_STATUS" >&6;}
7246cat >$CONFIG_STATUS <<_ACEOF
7247#! $SHELL
7248# Generated by $as_me.
0bc0cd11 7249# Run this file to recreate the current configuration.
0bc0cd11 7250# Compiler output produced by configure, useful for debugging
238235ef 7251# configure, is in config.log if it exists.
0bc0cd11 7252
238235ef
DJ
7253debug=false
7254ac_cs_recheck=false
7255ac_cs_silent=false
7256SHELL=\${CONFIG_SHELL-$SHELL}
7257_ACEOF
7258
7259cat >>$CONFIG_STATUS <<\_ACEOF
7260## --------------------- ##
7261## M4sh Initialization. ##
7262## --------------------- ##
7263
7264# Be Bourne compatible
7265if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
7266 emulate sh
7267 NULLCMD=:
7268 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
7269 # is contrary to our usage. Disable this feature.
7270 alias -g '${1+"$@"}'='"$@"'
7271elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
7272 set -o posix
7273fi
3beb1315 7274DUALCASE=1; export DUALCASE # for MKS sh
238235ef
DJ
7275
7276# Support unset when possible.
3beb1315 7277if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
238235ef
DJ
7278 as_unset=unset
7279else
7280 as_unset=false
7281fi
7282
7283
7284# Work around bugs in pre-3.0 UWIN ksh.
7285$as_unset ENV MAIL MAILPATH
7286PS1='$ '
7287PS2='> '
7288PS4='+ '
7289
7290# NLS nuisances.
7291for as_var in \
7292 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
7293 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
7294 LC_TELEPHONE LC_TIME
0bc0cd11 7295do
3beb1315 7296 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
238235ef
DJ
7297 eval $as_var=C; export $as_var
7298 else
7299 $as_unset $as_var
7300 fi
0bc0cd11
JL
7301done
7302
238235ef
DJ
7303# Required to use basename.
7304if expr a : '\(a\)' >/dev/null 2>&1; then
7305 as_expr=expr
7306else
7307 as_expr=false
7308fi
0bc0cd11 7309
238235ef
DJ
7310if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
7311 as_basename=basename
7312else
7313 as_basename=false
7314fi
0bc0cd11 7315
0bc0cd11 7316
238235ef
DJ
7317# Name of the executable.
7318as_me=`$as_basename "$0" ||
7319$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
7320 X"$0" : 'X\(//\)$' \| \
7321 X"$0" : 'X\(/\)$' \| \
7322 . : '\(.\)' 2>/dev/null ||
7323echo X/"$0" |
7324 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
7325 /^X\/\(\/\/\)$/{ s//\1/; q; }
7326 /^X\/\(\/\).*/{ s//\1/; q; }
7327 s/.*/./; q'`
7328
7329
7330# PATH needs CR, and LINENO needs CR and PATH.
7331# Avoid depending upon Character Ranges.
7332as_cr_letters='abcdefghijklmnopqrstuvwxyz'
7333as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
7334as_cr_Letters=$as_cr_letters$as_cr_LETTERS
7335as_cr_digits='0123456789'
7336as_cr_alnum=$as_cr_Letters$as_cr_digits
0bc0cd11 7337
238235ef
DJ
7338# The user is always right.
7339if test "${PATH_SEPARATOR+set}" != set; then
7340 echo "#! /bin/sh" >conf$$.sh
7341 echo "exit 0" >>conf$$.sh
7342 chmod +x conf$$.sh
7343 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7344 PATH_SEPARATOR=';'
0bc0cd11 7345 else
238235ef 7346 PATH_SEPARATOR=:
0bc0cd11 7347 fi
238235ef
DJ
7348 rm -f conf$$.sh
7349fi
7350
7351
7352 as_lineno_1=$LINENO
7353 as_lineno_2=$LINENO
7354 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
7355 test "x$as_lineno_1" != "x$as_lineno_2" &&
7356 test "x$as_lineno_3" = "x$as_lineno_2" || {
7357 # Find who we are. Look in the path if we contain no path at all
7358 # relative or not.
7359 case $0 in
7360 *[\\/]* ) as_myself=$0 ;;
7361 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7362for as_dir in $PATH
7363do
7364 IFS=$as_save_IFS
7365 test -z "$as_dir" && as_dir=.
7366 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
7367done
7368
7369 ;;
7370 esac
7371 # We did not find ourselves, most probably we were run as `sh COMMAND'
7372 # in which case we are not to be found in the path.
7373 if test "x$as_myself" = x; then
7374 as_myself=$0
7375 fi
7376 if test ! -f "$as_myself"; then
7377 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
7378echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
7379 { (exit 1); exit 1; }; }
7380 fi
7381 case $CONFIG_SHELL in
7382 '')
7383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7384for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
7385do
7386 IFS=$as_save_IFS
7387 test -z "$as_dir" && as_dir=.
7388 for as_base in sh bash ksh sh5; do
7389 case $as_dir in
7390 /*)
7391 if ("$as_dir/$as_base" -c '
7392 as_lineno_1=$LINENO
7393 as_lineno_2=$LINENO
7394 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
7395 test "x$as_lineno_1" != "x$as_lineno_2" &&
7396 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
7397 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
7398 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
7399 CONFIG_SHELL=$as_dir/$as_base
7400 export CONFIG_SHELL
7401 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
7402 fi;;
7403 esac
7404 done
7405done
7406;;
7407 esac
7408
7409 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
7410 # uniformly replaced by the line number. The first 'sed' inserts a
7411 # line-number line before each line; the second 'sed' does the real
7412 # work. The second script uses 'N' to pair each line-number line
7413 # with the numbered line, and appends trailing '-' during
7414 # substitution so that $LINENO is not a special case at line end.
7415 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
7416 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
7417 sed '=' <$as_myself |
7418 sed '
7419 N
7420 s,$,-,
7421 : loop
7422 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
7423 t loop
7424 s,-$,,
7425 s,^['$as_cr_digits']*\n,,
7426 ' >$as_me.lineno &&
7427 chmod +x $as_me.lineno ||
7428 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
7429echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
7430 { (exit 1); exit 1; }; }
7431
7432 # Don't try to exec as it changes $[0], causing all sort of problems
7433 # (the dirname of $[0] is not the place where we might find the
7434 # original and so on. Autoconf is especially sensible to this).
7435 . ./$as_me.lineno
7436 # Exit status is that of the last command.
7437 exit
7438}
7439
7440
7441case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
7442 *c*,-n*) ECHO_N= ECHO_C='
7443' ECHO_T=' ' ;;
7444 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
7445 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
7446esac
7447
7448if expr a : '\(a\)' >/dev/null 2>&1; then
7449 as_expr=expr
7450else
7451 as_expr=false
7452fi
7453
7454rm -f conf$$ conf$$.exe conf$$.file
7455echo >conf$$.file
7456if ln -s conf$$.file conf$$ 2>/dev/null; then
7457 # We could just check for DJGPP; but this test a) works b) is more generic
7458 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
7459 if test -f conf$$.exe; then
7460 # Don't use ln at all; we don't have any links
7461 as_ln_s='cp -p'
0bc0cd11 7462 else
238235ef 7463 as_ln_s='ln -s'
0bc0cd11 7464 fi
238235ef
DJ
7465elif ln conf$$.file conf$$ 2>/dev/null; then
7466 as_ln_s=ln
7467else
7468 as_ln_s='cp -p'
7469fi
7470rm -f conf$$ conf$$.exe conf$$.file
7471
7472if mkdir -p . 2>/dev/null; then
7473 as_mkdir_p=:
7474else
3beb1315 7475 test -d ./-p && rmdir ./-p
238235ef
DJ
7476 as_mkdir_p=false
7477fi
7478
7479as_executable_p="test -f"
7480
7481# Sed expression to map a string onto a valid CPP name.
3beb1315 7482as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
238235ef
DJ
7483
7484# Sed expression to map a string onto a valid variable name.
3beb1315 7485as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
238235ef
DJ
7486
7487
7488# IFS
7489# We need space, tab and new line, in precisely that order.
7490as_nl='
7491'
7492IFS=" $as_nl"
7493
7494# CDPATH.
7495$as_unset CDPATH
7496
7497exec 6>&1
7498
7499# Open the log real soon, to keep \$[0] and so on meaningful, and to
7500# report actual input values of CONFIG_FILES etc. instead of their
7501# values after options handling. Logging --version etc. is OK.
7502exec 5>>config.log
7503{
7504 echo
7505 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
7506## Running $as_me. ##
7507_ASBOX
7508} >&5
7509cat >&5 <<_CSEOF
7510
7511This file was extended by $as_me, which was
a4f74b58 7512generated by GNU Autoconf 2.59. Invocation command line was
238235ef
DJ
7513
7514 CONFIG_FILES = $CONFIG_FILES
7515 CONFIG_HEADERS = $CONFIG_HEADERS
7516 CONFIG_LINKS = $CONFIG_LINKS
7517 CONFIG_COMMANDS = $CONFIG_COMMANDS
7518 $ $0 $@
7519
7520_CSEOF
7521echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
7522echo >&5
7523_ACEOF
7524
7525# Files that config.status was made for.
7526if test -n "$ac_config_files"; then
7527 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
7528fi
7529
7530if test -n "$ac_config_headers"; then
7531 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
7532fi
7533
7534if test -n "$ac_config_links"; then
7535 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
7536fi
7537
7538if test -n "$ac_config_commands"; then
7539 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
7540fi
7541
7542cat >>$CONFIG_STATUS <<\_ACEOF
7543
7544ac_cs_usage="\
7545\`$as_me' instantiates files from templates according to the
7546current configuration.
7547
7548Usage: $0 [OPTIONS] [FILE]...
7549
7550 -h, --help print this help, then exit
7551 -V, --version print version number, then exit
7552 -q, --quiet do not print progress messages
7553 -d, --debug don't remove temporary files
7554 --recheck update $as_me by reconfiguring in the same conditions
7555 --file=FILE[:TEMPLATE]
3beb1315 7556 instantiate the configuration file FILE
238235ef 7557 --header=FILE[:TEMPLATE]
3beb1315 7558 instantiate the configuration header FILE
238235ef
DJ
7559
7560Configuration files:
7561$config_files
7562
7563Configuration headers:
7564$config_headers
7565
7566Configuration commands:
7567$config_commands
7568
7569Report bugs to <bug-autoconf@gnu.org>."
7570_ACEOF
7571
7572cat >>$CONFIG_STATUS <<_ACEOF
7573ac_cs_version="\\
7574config.status
a4f74b58 7575configured by $0, generated by GNU Autoconf 2.59,
238235ef
DJ
7576 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
7577
3beb1315 7578Copyright (C) 2003 Free Software Foundation, Inc.
238235ef
DJ
7579This config.status script is free software; the Free Software Foundation
7580gives unlimited permission to copy, distribute and modify it."
7581srcdir=$srcdir
7582INSTALL="$INSTALL"
7583_ACEOF
7584
7585cat >>$CONFIG_STATUS <<\_ACEOF
7586# If no file are specified by the user, then we need to provide default
7587# value. By we need to know if files were specified by the user.
7588ac_need_defaults=:
7589while test $# != 0
7590do
7591 case $1 in
7592 --*=*)
7593 ac_option=`expr "x$1" : 'x\([^=]*\)='`
7594 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
7595 ac_shift=:
7596 ;;
7597 -*)
7598 ac_option=$1
7599 ac_optarg=$2
7600 ac_shift=shift
7601 ;;
7602 *) # This is not an option, so the user has probably given explicit
7603 # arguments.
7604 ac_option=$1
7605 ac_need_defaults=false;;
7606 esac
7607
7608 case $ac_option in
7609 # Handling of the options.
7610_ACEOF
7611cat >>$CONFIG_STATUS <<\_ACEOF
7612 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7613 ac_cs_recheck=: ;;
7614 --version | --vers* | -V )
7615 echo "$ac_cs_version"; exit 0 ;;
7616 --he | --h)
7617 # Conflict between --help and --header
7618 { { echo "$as_me:$LINENO: error: ambiguous option: $1
7619Try \`$0 --help' for more information." >&5
7620echo "$as_me: error: ambiguous option: $1
7621Try \`$0 --help' for more information." >&2;}
7622 { (exit 1); exit 1; }; };;
7623 --help | --hel | -h )
7624 echo "$ac_cs_usage"; exit 0 ;;
7625 --debug | --d* | -d )
7626 debug=: ;;
7627 --file | --fil | --fi | --f )
7628 $ac_shift
7629 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
7630 ac_need_defaults=false;;
7631 --header | --heade | --head | --hea )
7632 $ac_shift
7633 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
7634 ac_need_defaults=false;;
7635 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
7636 | -silent | --silent | --silen | --sile | --sil | --si | --s)
7637 ac_cs_silent=: ;;
7638
7639 # This is an error.
7640 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
7641Try \`$0 --help' for more information." >&5
7642echo "$as_me: error: unrecognized option: $1
7643Try \`$0 --help' for more information." >&2;}
7644 { (exit 1); exit 1; }; } ;;
7645
7646 *) ac_config_targets="$ac_config_targets $1" ;;
7647
7648 esac
7649 shift
0bc0cd11 7650done
238235ef
DJ
7651
7652ac_configure_extra_args=
7653
7654if $ac_cs_silent; then
7655 exec 6>/dev/null
7656 ac_configure_extra_args="$ac_configure_extra_args --silent"
0bc0cd11 7657fi
0bc0cd11 7658
238235ef
DJ
7659_ACEOF
7660cat >>$CONFIG_STATUS <<_ACEOF
7661if \$ac_cs_recheck; then
7662 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
7663 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
7664fi
0bc0cd11 7665
238235ef
DJ
7666_ACEOF
7667
7668cat >>$CONFIG_STATUS <<_ACEOF
7669#
7670# INIT-COMMANDS section.
7671#
7672
7673srcdir=${srcdir}
7674host=${host}
7675target=${target}
7676with_target_subdir=${with_target_subdir}
238235ef
DJ
7677with_multisubdir=${with_multisubdir}
7678ac_configure_args="--enable-multilib ${ac_configure_args}"
7679CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
7680ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
7681libiberty_topdir=${libiberty_topdir}
7682
7683
7684_ACEOF
7685
7686
7687
7688cat >>$CONFIG_STATUS <<\_ACEOF
7689for ac_config_target in $ac_config_targets
7690do
7691 case "$ac_config_target" in
7692 # Handling of arguments.
7693 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
7694 "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
7695 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
7696 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
7697 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
7698echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
7699 { (exit 1); exit 1; }; };;
0bc0cd11 7700 esac
238235ef 7701done
0bc0cd11 7702
238235ef
DJ
7703# If the user did not use the arguments to specify the items to instantiate,
7704# then the envvar interface is used. Set only those that are not.
7705# We use the long form for the default assignment because of an extremely
7706# bizarre bug on SunOS 4.1.3.
7707if $ac_need_defaults; then
7708 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
7709 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
7710 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
7711fi
7712
7713# Have a temporary directory for convenience. Make it in the build tree
7714# simply because there is no reason to put it here, and in addition,
7715# creating and moving files from /tmp can sometimes cause problems.
7716# Create a temporary directory, and hook for its removal unless debugging.
7717$debug ||
7718{
7719 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
7720 trap '{ (exit 1); exit 1; }' 1 2 13 15
7721}
0bc0cd11 7722
238235ef
DJ
7723# Create a (secure) tmp directory for tmp files.
7724
7725{
7726 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
7727 test -n "$tmp" && test -d "$tmp"
7728} ||
7729{
7730 tmp=./confstat$$-$RANDOM
7731 (umask 077 && mkdir $tmp)
7732} ||
7733{
7734 echo "$me: cannot create a temporary directory in ." >&2
7735 { (exit 1); exit 1; }
7736}
7737
7738_ACEOF
7739
7740cat >>$CONFIG_STATUS <<_ACEOF
7741
7742#
7743# CONFIG_FILES section.
7744#
7745
7746# No need to generate the scripts if there are no CONFIG_FILES.
7747# This happens for instance when ./config.status config.h
7748if test -n "\$CONFIG_FILES"; then
7749 # Protect against being on the right side of a sed subst in config.status.
7750 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
7751 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
7752s,@SHELL@,$SHELL,;t t
7753s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
7754s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
7755s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
7756s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
7757s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
7758s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
7759s,@exec_prefix@,$exec_prefix,;t t
7760s,@prefix@,$prefix,;t t
7761s,@program_transform_name@,$program_transform_name,;t t
7762s,@bindir@,$bindir,;t t
7763s,@sbindir@,$sbindir,;t t
7764s,@libexecdir@,$libexecdir,;t t
7765s,@datadir@,$datadir,;t t
7766s,@sysconfdir@,$sysconfdir,;t t
7767s,@sharedstatedir@,$sharedstatedir,;t t
7768s,@localstatedir@,$localstatedir,;t t
7769s,@libdir@,$libdir,;t t
7770s,@includedir@,$includedir,;t t
7771s,@oldincludedir@,$oldincludedir,;t t
7772s,@infodir@,$infodir,;t t
7773s,@mandir@,$mandir,;t t
7774s,@build_alias@,$build_alias,;t t
7775s,@host_alias@,$host_alias,;t t
7776s,@target_alias@,$target_alias,;t t
7777s,@DEFS@,$DEFS,;t t
7778s,@ECHO_C@,$ECHO_C,;t t
7779s,@ECHO_N@,$ECHO_N,;t t
7780s,@ECHO_T@,$ECHO_T,;t t
7781s,@LIBS@,$LIBS,;t t
7782s,@libiberty_topdir@,$libiberty_topdir,;t t
7783s,@MAINT@,$MAINT,;t t
7784s,@NOTMAINT@,$NOTMAINT,;t t
7785s,@MAKEINFO@,$MAKEINFO,;t t
7786s,@BUILD_INFO@,$BUILD_INFO,;t t
7787s,@PERL@,$PERL,;t t
7788s,@HAVE_PERL@,$HAVE_PERL,;t t
7789s,@build@,$build,;t t
7790s,@build_cpu@,$build_cpu,;t t
7791s,@build_vendor@,$build_vendor,;t t
7792s,@build_os@,$build_os,;t t
7793s,@host@,$host,;t t
7794s,@host_cpu@,$host_cpu,;t t
7795s,@host_vendor@,$host_vendor,;t t
7796s,@host_os@,$host_os,;t t
7797s,@AR@,$AR,;t t
7798s,@ac_ct_AR@,$ac_ct_AR,;t t
7799s,@RANLIB@,$RANLIB,;t t
7800s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
7801s,@CC@,$CC,;t t
7802s,@CFLAGS@,$CFLAGS,;t t
7803s,@LDFLAGS@,$LDFLAGS,;t t
7804s,@CPPFLAGS@,$CPPFLAGS,;t t
7805s,@ac_ct_CC@,$ac_ct_CC,;t t
7806s,@EXEEXT@,$EXEEXT,;t t
7807s,@OBJEXT@,$OBJEXT,;t t
b033df90 7808s,@CPP@,$CPP,;t t
238235ef
DJ
7809s,@ac_libiberty_warn_cflags@,$ac_libiberty_warn_cflags,;t t
7810s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
7811s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
7812s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
7813s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
7814s,@INSTALL_DATA@,$INSTALL_DATA,;t t
238235ef
DJ
7815s,@EGREP@,$EGREP,;t t
7816s,@LIBOBJS@,$LIBOBJS,;t t
7817s,@CHECK@,$CHECK,;t t
7818s,@target_header_dir@,$target_header_dir,;t t
7819s,@pexecute@,$pexecute,;t t
7820s,@INSTALL_DEST@,$INSTALL_DEST,;t t
7821s,@LTLIBOBJS@,$LTLIBOBJS,;t t
7822/@host_makefile_frag@/r $host_makefile_frag
7823s,@host_makefile_frag@,,;t t
7824CEOF
7825
7826_ACEOF
7827
7828 cat >>$CONFIG_STATUS <<\_ACEOF
7829 # Split the substitutions into bite-sized pieces for seds with
7830 # small command number limits, like on Digital OSF/1 and HP-UX.
7831 ac_max_sed_lines=48
7832 ac_sed_frag=1 # Number of current file.
7833 ac_beg=1 # First line for current file.
7834 ac_end=$ac_max_sed_lines # Line after last line for current file.
7835 ac_more_lines=:
7836 ac_sed_cmds=
7837 while $ac_more_lines; do
7838 if test $ac_beg -gt 1; then
7839 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
7840 else
7841 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
7842 fi
7843 if test ! -s $tmp/subs.frag; then
7844 ac_more_lines=false
7845 else
7846 # The purpose of the label and of the branching condition is to
7847 # speed up the sed processing (if there are no `@' at all, there
7848 # is no need to browse any of the substitutions).
7849 # These are the two extra sed commands mentioned above.
7850 (echo ':t
7851 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
7852 if test -z "$ac_sed_cmds"; then
3beb1315 7853 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
238235ef 7854 else
3beb1315 7855 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
238235ef
DJ
7856 fi
7857 ac_sed_frag=`expr $ac_sed_frag + 1`
7858 ac_beg=$ac_end
7859 ac_end=`expr $ac_end + $ac_max_sed_lines`
7860 fi
7861 done
7862 if test -z "$ac_sed_cmds"; then
7863 ac_sed_cmds=cat
0bc0cd11 7864 fi
238235ef 7865fi # test -n "$CONFIG_FILES"
0bc0cd11 7866
238235ef
DJ
7867_ACEOF
7868cat >>$CONFIG_STATUS <<\_ACEOF
7869for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
7870 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7871 case $ac_file in
7872 - | *:- | *:-:* ) # input from stdin
3beb1315
HPN
7873 cat >$tmp/stdin
7874 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
7875 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
238235ef 7876 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
3beb1315 7877 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
238235ef 7878 * ) ac_file_in=$ac_file.in ;;
0bc0cd11
JL
7879 esac
7880
238235ef
DJ
7881 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
7882 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
7883$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
3beb1315
HPN
7884 X"$ac_file" : 'X\(//\)[^/]' \| \
7885 X"$ac_file" : 'X\(//\)$' \| \
7886 X"$ac_file" : 'X\(/\)' \| \
7887 . : '\(.\)' 2>/dev/null ||
238235ef
DJ
7888echo X"$ac_file" |
7889 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7890 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7891 /^X\(\/\/\)$/{ s//\1/; q; }
7892 /^X\(\/\).*/{ s//\1/; q; }
7893 s/.*/./; q'`
7894 { if $as_mkdir_p; then
7895 mkdir -p "$ac_dir"
7896 else
7897 as_dir="$ac_dir"
7898 as_dirs=
7899 while test ! -d "$as_dir"; do
7900 as_dirs="$as_dir $as_dirs"
7901 as_dir=`(dirname "$as_dir") 2>/dev/null ||
7902$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
3beb1315
HPN
7903 X"$as_dir" : 'X\(//\)[^/]' \| \
7904 X"$as_dir" : 'X\(//\)$' \| \
7905 X"$as_dir" : 'X\(/\)' \| \
7906 . : '\(.\)' 2>/dev/null ||
238235ef
DJ
7907echo X"$as_dir" |
7908 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7909 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7910 /^X\(\/\/\)$/{ s//\1/; q; }
7911 /^X\(\/\).*/{ s//\1/; q; }
7912 s/.*/./; q'`
7913 done
7914 test ! -n "$as_dirs" || mkdir $as_dirs
7915 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
7916echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
7917 { (exit 1); exit 1; }; }; }
7918
7919 ac_builddir=.
0bc0cd11 7920
238235ef
DJ
7921if test "$ac_dir" != .; then
7922 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
7923 # A "../" for each directory in $ac_dir_suffix.
7924 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
7925else
7926 ac_dir_suffix= ac_top_builddir=
7927fi
7928
7929case $srcdir in
7930 .) # No --srcdir option. We are building in place.
7931 ac_srcdir=.
7932 if test -z "$ac_top_builddir"; then
7933 ac_top_srcdir=.
7934 else
7935 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
7936 fi ;;
7937 [\\/]* | ?:[\\/]* ) # Absolute path.
7938 ac_srcdir=$srcdir$ac_dir_suffix;
7939 ac_top_srcdir=$srcdir ;;
7940 *) # Relative path.
7941 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
7942 ac_top_srcdir=$ac_top_builddir$srcdir ;;
7943esac
a4f74b58
KC
7944
7945# Do not use `cd foo && pwd` to compute absolute paths, because
7946# the directories may not exist.
7947case `pwd` in
7948.) ac_abs_builddir="$ac_dir";;
3beb1315 7949*)
a4f74b58
KC
7950 case "$ac_dir" in
7951 .) ac_abs_builddir=`pwd`;;
7952 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
7953 *) ac_abs_builddir=`pwd`/"$ac_dir";;
3beb1315
HPN
7954 esac;;
7955esac
a4f74b58 7956case $ac_abs_builddir in
3beb1315
HPN
7957.) ac_abs_top_builddir=${ac_top_builddir}.;;
7958*)
7959 case ${ac_top_builddir}. in
a4f74b58 7960 .) ac_abs_top_builddir=$ac_abs_builddir;;
3beb1315 7961 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
a4f74b58 7962 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
3beb1315
HPN
7963 esac;;
7964esac
a4f74b58 7965case $ac_abs_builddir in
3beb1315
HPN
7966.) ac_abs_srcdir=$ac_srcdir;;
7967*)
7968 case $ac_srcdir in
a4f74b58 7969 .) ac_abs_srcdir=$ac_abs_builddir;;
3beb1315 7970 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
a4f74b58 7971 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
3beb1315
HPN
7972 esac;;
7973esac
a4f74b58 7974case $ac_abs_builddir in
3beb1315
HPN
7975.) ac_abs_top_srcdir=$ac_top_srcdir;;
7976*)
7977 case $ac_top_srcdir in
a4f74b58 7978 .) ac_abs_top_srcdir=$ac_abs_builddir;;
3beb1315 7979 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
a4f74b58 7980 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
3beb1315
HPN
7981 esac;;
7982esac
238235ef
DJ
7983
7984
7985 case $INSTALL in
7986 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
7987 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
0bc0cd11
JL
7988 esac
7989
238235ef
DJ
7990 # Let's still pretend it is `configure' which instantiates (i.e., don't
7991 # use $as_me), people would be surprised to read:
7992 # /* config.h. Generated by config.status. */
7993 if test x"$ac_file" = x-; then
7994 configure_input=
7995 else
7996 configure_input="$ac_file. "
7997 fi
7998 configure_input=$configure_input"Generated from `echo $ac_file_in |
3beb1315 7999 sed 's,.*/,,'` by configure."
238235ef
DJ
8000
8001 # First look for the input files in the build tree, otherwise in the
8002 # src tree.
8003 ac_file_inputs=`IFS=:
8004 for f in $ac_file_in; do
8005 case $f in
8006 -) echo $tmp/stdin ;;
8007 [\\/$]*)
3beb1315
HPN
8008 # Absolute (can't be DOS-style, as IFS=:)
8009 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
238235ef
DJ
8010echo "$as_me: error: cannot find input file: $f" >&2;}
8011 { (exit 1); exit 1; }; }
3beb1315 8012 echo "$f";;
238235ef 8013 *) # Relative
3beb1315
HPN
8014 if test -f "$f"; then
8015 # Build tree
8016 echo "$f"
8017 elif test -f "$srcdir/$f"; then
8018 # Source tree
8019 echo "$srcdir/$f"
8020 else
8021 # /dev/null tree
8022 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
238235ef
DJ
8023echo "$as_me: error: cannot find input file: $f" >&2;}
8024 { (exit 1); exit 1; }; }
3beb1315 8025 fi;;
238235ef
DJ
8026 esac
8027 done` || { (exit 1); exit 1; }
7b3ed47d
PB
8028
8029 if test x"$ac_file" != x-; then
8030 { echo "$as_me:$LINENO: creating $ac_file" >&5
8031echo "$as_me: creating $ac_file" >&6;}
8032 rm -f "$ac_file"
8033 fi
238235ef
DJ
8034_ACEOF
8035cat >>$CONFIG_STATUS <<_ACEOF
8036 sed "$ac_vpsub
8037$extrasub
8038_ACEOF
8039cat >>$CONFIG_STATUS <<\_ACEOF
8040:t
8041/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
8042s,@configure_input@,$configure_input,;t t
8043s,@srcdir@,$ac_srcdir,;t t
8044s,@abs_srcdir@,$ac_abs_srcdir,;t t
8045s,@top_srcdir@,$ac_top_srcdir,;t t
8046s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
8047s,@builddir@,$ac_builddir,;t t
8048s,@abs_builddir@,$ac_abs_builddir,;t t
8049s,@top_builddir@,$ac_top_builddir,;t t
8050s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
8051s,@INSTALL@,$ac_INSTALL,;t t
8052" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
8053 rm -f $tmp/stdin
8054 if test x"$ac_file" != x-; then
8055 mv $tmp/out $ac_file
8056 else
8057 cat $tmp/out
8058 rm -f $tmp/out
8059 fi
8060
8061done
8062_ACEOF
8063cat >>$CONFIG_STATUS <<\_ACEOF
8064
8065#
8066# CONFIG_HEADER section.
8067#
0bc0cd11
JL
8068
8069# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8070# NAME is the cpp macro being defined and VALUE is the value it is being given.
8071#
8072# ac_d sets the value in "#define NAME VALUE" lines.
3beb1315
HPN
8073ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8074ac_dB='[ ].*$,\1#\2'
238235ef
DJ
8075ac_dC=' '
8076ac_dD=',;t'
8077# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3beb1315 8078ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
238235ef 8079ac_uB='$,\1#\2define\3'
0bc0cd11 8080ac_uC=' '
238235ef
DJ
8081ac_uD=',;t'
8082
8083for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
0bc0cd11 8084 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
238235ef
DJ
8085 case $ac_file in
8086 - | *:- | *:-:* ) # input from stdin
3beb1315
HPN
8087 cat >$tmp/stdin
8088 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8089 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
238235ef 8090 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
3beb1315 8091 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
238235ef 8092 * ) ac_file_in=$ac_file.in ;;
0bc0cd11
JL
8093 esac
8094
238235ef
DJ
8095 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
8096echo "$as_me: creating $ac_file" >&6;}
8097
8098 # First look for the input files in the build tree, otherwise in the
8099 # src tree.
8100 ac_file_inputs=`IFS=:
8101 for f in $ac_file_in; do
8102 case $f in
8103 -) echo $tmp/stdin ;;
8104 [\\/$]*)
3beb1315
HPN
8105 # Absolute (can't be DOS-style, as IFS=:)
8106 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
238235ef
DJ
8107echo "$as_me: error: cannot find input file: $f" >&2;}
8108 { (exit 1); exit 1; }; }
3beb1315
HPN
8109 # Do quote $f, to prevent DOS paths from being IFS'd.
8110 echo "$f";;
238235ef 8111 *) # Relative
3beb1315
HPN
8112 if test -f "$f"; then
8113 # Build tree
8114 echo "$f"
8115 elif test -f "$srcdir/$f"; then
8116 # Source tree
8117 echo "$srcdir/$f"
8118 else
8119 # /dev/null tree
8120 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
238235ef
DJ
8121echo "$as_me: error: cannot find input file: $f" >&2;}
8122 { (exit 1); exit 1; }; }
3beb1315 8123 fi;;
238235ef
DJ
8124 esac
8125 done` || { (exit 1); exit 1; }
8126 # Remove the trailing spaces.
3beb1315 8127 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
238235ef
DJ
8128
8129_ACEOF
8130
8131# Transform confdefs.h into two sed scripts, `conftest.defines' and
8132# `conftest.undefs', that substitutes the proper values into
8133# config.h.in to produce config.h. The first handles `#define'
8134# templates, and the second `#undef' templates.
8135# And first: Protect against being on the right side of a sed subst in
8136# config.status. Protect against being in an unquoted here document
8137# in config.status.
8138rm -f conftest.defines conftest.undefs
8139# Using a here document instead of a string reduces the quoting nightmare.
8140# Putting comments in sed scripts is not portable.
8141#
8142# `end' is used to avoid that the second main sed command (meant for
8143# 0-ary CPP macros) applies to n-ary macro definitions.
8144# See the Autoconf documentation for `clear'.
8145cat >confdef2sed.sed <<\_ACEOF
8146s/[\\&,]/\\&/g
8147s,[\\$`],\\&,g
8148t clear
8149: clear
3beb1315 8150s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
238235ef 8151t end
3beb1315 8152s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
238235ef
DJ
8153: end
8154_ACEOF
8155# If some macros were called several times there might be several times
8156# the same #defines, which is useless. Nevertheless, we may not want to
8157# sort them, since we want the *last* AC-DEFINE to be honored.
8158uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
8159sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
8160rm -f confdef2sed.sed
0bc0cd11
JL
8161
8162# This sed command replaces #undef with comments. This is necessary, for
8163# example, in the case of _POSIX_SOURCE, which is predefined and required
8164# on some systems where configure will not decide to define it.
238235ef 8165cat >>conftest.undefs <<\_ACEOF
3beb1315 8166s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
238235ef
DJ
8167_ACEOF
8168
8169# Break up conftest.defines because some shells have a limit on the size
8170# of here documents, and old seds have small limits too (100 cmds).
8171echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
3beb1315 8172echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
238235ef
DJ
8173echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
8174echo ' :' >>$CONFIG_STATUS
8175rm -f conftest.tail
8176while grep . conftest.defines >/dev/null
8177do
8178 # Write a limited-size here document to $tmp/defines.sed.
8179 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
8180 # Speed up: don't consider the non `#define' lines.
3beb1315 8181 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
238235ef
DJ
8182 # Work around the forget-to-reset-the-flag bug.
8183 echo 't clr' >>$CONFIG_STATUS
8184 echo ': clr' >>$CONFIG_STATUS
8185 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
8186 echo 'CEOF
8187 sed -f $tmp/defines.sed $tmp/in >$tmp/out
8188 rm -f $tmp/in
8189 mv $tmp/out $tmp/in
8190' >>$CONFIG_STATUS
8191 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
8192 rm -f conftest.defines
8193 mv conftest.tail conftest.defines
8194done
8195rm -f conftest.defines
8196echo ' fi # grep' >>$CONFIG_STATUS
8197echo >>$CONFIG_STATUS
0bc0cd11 8198
238235ef
DJ
8199# Break up conftest.undefs because some shells have a limit on the size
8200# of here documents, and old seds have small limits too (100 cmds).
8201echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
0bc0cd11 8202rm -f conftest.tail
238235ef 8203while grep . conftest.undefs >/dev/null
0bc0cd11 8204do
238235ef
DJ
8205 # Write a limited-size here document to $tmp/undefs.sed.
8206 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
8207 # Speed up: don't consider the non `#undef'
3beb1315 8208 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
238235ef
DJ
8209 # Work around the forget-to-reset-the-flag bug.
8210 echo 't clr' >>$CONFIG_STATUS
8211 echo ': clr' >>$CONFIG_STATUS
8212 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
0bc0cd11 8213 echo 'CEOF
238235ef
DJ
8214 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
8215 rm -f $tmp/in
8216 mv $tmp/out $tmp/in
8217' >>$CONFIG_STATUS
8218 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
8219 rm -f conftest.undefs
8220 mv conftest.tail conftest.undefs
8221done
8222rm -f conftest.undefs
8223
8224cat >>$CONFIG_STATUS <<\_ACEOF
8225 # Let's still pretend it is `configure' which instantiates (i.e., don't
8226 # use $as_me), people would be surprised to read:
8227 # /* config.h. Generated by config.status. */
8228 if test x"$ac_file" = x-; then
8229 echo "/* Generated by configure. */" >$tmp/config.h
0bc0cd11 8230 else
238235ef 8231 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
0bc0cd11 8232 fi
238235ef
DJ
8233 cat $tmp/in >>$tmp/config.h
8234 rm -f $tmp/in
8235 if test x"$ac_file" != x-; then
8236 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
8237 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
8238echo "$as_me: $ac_file is unchanged" >&6;}
8239 else
8240 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
8241$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
3beb1315
HPN
8242 X"$ac_file" : 'X\(//\)[^/]' \| \
8243 X"$ac_file" : 'X\(//\)$' \| \
8244 X"$ac_file" : 'X\(/\)' \| \
8245 . : '\(.\)' 2>/dev/null ||
238235ef
DJ
8246echo X"$ac_file" |
8247 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8248 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8249 /^X\(\/\/\)$/{ s//\1/; q; }
8250 /^X\(\/\).*/{ s//\1/; q; }
8251 s/.*/./; q'`
8252 { if $as_mkdir_p; then
8253 mkdir -p "$ac_dir"
8254 else
8255 as_dir="$ac_dir"
8256 as_dirs=
8257 while test ! -d "$as_dir"; do
8258 as_dirs="$as_dir $as_dirs"
8259 as_dir=`(dirname "$as_dir") 2>/dev/null ||
8260$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
3beb1315
HPN
8261 X"$as_dir" : 'X\(//\)[^/]' \| \
8262 X"$as_dir" : 'X\(//\)$' \| \
8263 X"$as_dir" : 'X\(/\)' \| \
8264 . : '\(.\)' 2>/dev/null ||
238235ef
DJ
8265echo X"$as_dir" |
8266 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8267 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8268 /^X\(\/\/\)$/{ s//\1/; q; }
8269 /^X\(\/\).*/{ s//\1/; q; }
8270 s/.*/./; q'`
8271 done
8272 test ! -n "$as_dirs" || mkdir $as_dirs
8273 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
8274echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
8275 { (exit 1); exit 1; }; }; }
0bc0cd11 8276
238235ef
DJ
8277 rm -f $ac_file
8278 mv $tmp/config.h $ac_file
8279 fi
8280 else
8281 cat $tmp/config.h
8282 rm -f $tmp/config.h
8283 fi
8284done
8285_ACEOF
8286cat >>$CONFIG_STATUS <<\_ACEOF
0bc0cd11 8287
238235ef
DJ
8288#
8289# CONFIG_COMMANDS section.
8290#
8291for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
8292 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
8293 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
8294 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
8295$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
3beb1315
HPN
8296 X"$ac_dest" : 'X\(//\)[^/]' \| \
8297 X"$ac_dest" : 'X\(//\)$' \| \
8298 X"$ac_dest" : 'X\(/\)' \| \
8299 . : '\(.\)' 2>/dev/null ||
238235ef
DJ
8300echo X"$ac_dest" |
8301 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8302 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8303 /^X\(\/\/\)$/{ s//\1/; q; }
8304 /^X\(\/\).*/{ s//\1/; q; }
8305 s/.*/./; q'`
3beb1315
HPN
8306 { if $as_mkdir_p; then
8307 mkdir -p "$ac_dir"
8308 else
8309 as_dir="$ac_dir"
8310 as_dirs=
8311 while test ! -d "$as_dir"; do
8312 as_dirs="$as_dir $as_dirs"
8313 as_dir=`(dirname "$as_dir") 2>/dev/null ||
8314$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8315 X"$as_dir" : 'X\(//\)[^/]' \| \
8316 X"$as_dir" : 'X\(//\)$' \| \
8317 X"$as_dir" : 'X\(/\)' \| \
8318 . : '\(.\)' 2>/dev/null ||
8319echo X"$as_dir" |
8320 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8321 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8322 /^X\(\/\/\)$/{ s//\1/; q; }
8323 /^X\(\/\).*/{ s//\1/; q; }
8324 s/.*/./; q'`
8325 done
8326 test ! -n "$as_dirs" || mkdir $as_dirs
8327 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
8328echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
8329 { (exit 1); exit 1; }; }; }
8330
238235ef
DJ
8331 ac_builddir=.
8332
8333if test "$ac_dir" != .; then
8334 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
8335 # A "../" for each directory in $ac_dir_suffix.
8336 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
8337else
8338 ac_dir_suffix= ac_top_builddir=
8339fi
8340
8341case $srcdir in
8342 .) # No --srcdir option. We are building in place.
8343 ac_srcdir=.
8344 if test -z "$ac_top_builddir"; then
8345 ac_top_srcdir=.
8346 else
8347 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
8348 fi ;;
8349 [\\/]* | ?:[\\/]* ) # Absolute path.
8350 ac_srcdir=$srcdir$ac_dir_suffix;
8351 ac_top_srcdir=$srcdir ;;
8352 *) # Relative path.
8353 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
8354 ac_top_srcdir=$ac_top_builddir$srcdir ;;
8355esac
a4f74b58
KC
8356
8357# Do not use `cd foo && pwd` to compute absolute paths, because
8358# the directories may not exist.
8359case `pwd` in
8360.) ac_abs_builddir="$ac_dir";;
3beb1315 8361*)
a4f74b58
KC
8362 case "$ac_dir" in
8363 .) ac_abs_builddir=`pwd`;;
8364 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
8365 *) ac_abs_builddir=`pwd`/"$ac_dir";;
3beb1315
HPN
8366 esac;;
8367esac
a4f74b58 8368case $ac_abs_builddir in
3beb1315
HPN
8369.) ac_abs_top_builddir=${ac_top_builddir}.;;
8370*)
8371 case ${ac_top_builddir}. in
a4f74b58 8372 .) ac_abs_top_builddir=$ac_abs_builddir;;
3beb1315 8373 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
a4f74b58 8374 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
3beb1315
HPN
8375 esac;;
8376esac
a4f74b58 8377case $ac_abs_builddir in
3beb1315
HPN
8378.) ac_abs_srcdir=$ac_srcdir;;
8379*)
8380 case $ac_srcdir in
a4f74b58 8381 .) ac_abs_srcdir=$ac_abs_builddir;;
3beb1315 8382 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
a4f74b58 8383 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
3beb1315
HPN
8384 esac;;
8385esac
a4f74b58 8386case $ac_abs_builddir in
3beb1315
HPN
8387.) ac_abs_top_srcdir=$ac_top_srcdir;;
8388*)
8389 case $ac_top_srcdir in
a4f74b58 8390 .) ac_abs_top_srcdir=$ac_abs_builddir;;
3beb1315 8391 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
a4f74b58 8392 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
3beb1315
HPN
8393 esac;;
8394esac
238235ef
DJ
8395
8396
8397 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
8398echo "$as_me: executing $ac_dest commands" >&6;}
8399 case $ac_dest in
8400 default ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
0bc0cd11 8401if test -n "$CONFIG_FILES"; then
7b3ed47d 8402 if test -n "${with_target_subdir}"; then
0bc0cd11
JL
8403 # FIXME: We shouldn't need to set ac_file
8404 ac_file=Makefile
6706f116 8405 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
0bc0cd11
JL
8406 . ${libiberty_topdir}/config-ml.in
8407 fi
238235ef
DJ
8408fi ;;
8409 esac
8410done
8411_ACEOF
8412
8413cat >>$CONFIG_STATUS <<\_ACEOF
8414
8415{ (exit 0); exit 0; }
8416_ACEOF
0bc0cd11 8417chmod +x $CONFIG_STATUS
238235ef
DJ
8418ac_clean_files=$ac_clean_files_save
8419
8420
8421# configure is writing to config.log, and then calls config.status.
8422# config.status does its own redirection, appending to config.log.
8423# Unfortunately, on DOS this fails, as config.log is still kept open
8424# by configure, so config.status won't be able to write to it; its
8425# output is simply discarded. So we exec the FD to /dev/null,
8426# effectively closing config.log, so it can be properly (re)opened and
8427# appended to by config.status. When coming back to configure, we
8428# need to make the FD available again.
8429if test "$no_create" != yes; then
8430 ac_cs_success=:
8431 ac_config_status_args=
8432 test "$silent" = yes &&
8433 ac_config_status_args="$ac_config_status_args --quiet"
8434 exec 5>/dev/null
8435 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
8436 exec 5>>config.log
8437 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
8438 # would make configure fail if this is the last instruction.
8439 $ac_cs_success || { (exit 1); exit 1; }
8440fi
0bc0cd11 8441