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