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