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