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