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