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