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