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