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