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