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