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