* configure.in: Remove --enable-shared option. It shouldn't be used for gdb.
[external/binutils.git] / readline / configure
1 #! /bin/sh
2 # From configure.in for Readline 4.3, version 2.45, from autoconf version 2.52.
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52 for readline 4.3.
5 #
6 # Report bugs to <bug-readline@gnu.org>.
7 #
8 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
9 # Free Software Foundation, Inc.
10 # This configure script is free software; the Free Software Foundation
11 # gives unlimited permission to copy, distribute and modify it.
12
13 # Avoid depending upon Character Ranges.
14 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17 as_cr_digits='0123456789'
18 as_cr_alnum=$as_cr_Letters$as_cr_digits
19
20 # Sed expression to map a string onto a valid variable name.
21 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
22
23 # Sed expression to map a string onto a valid CPP name.
24 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
25
26 # Be Bourne compatible
27 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28   emulate sh
29   NULLCMD=:
30 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
31   set -o posix
32 fi
33
34 # Name of the executable.
35 as_me=`echo "$0" |sed 's,.*[\\/],,'`
36
37 if expr a : '\(a\)' >/dev/null 2>&1; then
38   as_expr=expr
39 else
40   as_expr=false
41 fi
42
43 rm -f conf$$ conf$$.exe conf$$.file
44 echo >conf$$.file
45 if ln -s conf$$.file conf$$ 2>/dev/null; then
46   # We could just check for DJGPP; but this test a) works b) is more generic
47   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
48   if test -f conf$$.exe; then
49     # Don't use ln at all; we don't have any links
50     as_ln_s='cp -p'
51   else
52     as_ln_s='ln -s'
53   fi
54 elif ln conf$$.file conf$$ 2>/dev/null; then
55   as_ln_s=ln
56 else
57   as_ln_s='cp -p'
58 fi
59 rm -f conf$$ conf$$.exe conf$$.file
60
61 as_executable_p="test -f"
62
63 # Support unset when possible.
64 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
65   as_unset=unset
66 else
67   as_unset=false
68 fi
69
70 # NLS nuisances.
71 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
72 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
73 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
74 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
75 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
76 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
77 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
78 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
79
80 # IFS
81 # We need space, tab and new line, in precisely that order.
82 as_nl='
83 '
84 IFS="   $as_nl"
85
86 # CDPATH.
87 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
88
89 # Name of the host.
90 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
91 # so uname gets run too.
92 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
93
94 exec 6>&1
95
96 #
97 # Initializations.
98 #
99 ac_default_prefix=/usr/local
100 cross_compiling=no
101 subdirs=
102 MFLAGS= MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : ${ac_max_here_lines=38}
109
110 ac_unique_file="readline.h"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datadir='${prefix}/share'
177 sysconfdir='${prefix}/etc'
178 sharedstatedir='${prefix}/com'
179 localstatedir='${prefix}/var'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${prefix}/info'
184 mandir='${prefix}/man'
185
186 # Identity of this package.
187 PACKAGE_NAME='readline'
188 PACKAGE_TARNAME='readline'
189 PACKAGE_VERSION='4.3'
190 PACKAGE_STRING='readline 4.3'
191 PACKAGE_BUGREPORT='bug-readline@gnu.org'
192
193 ac_prev=
194 for ac_option
195 do
196   # If the previous option needs an argument, assign it.
197   if test -n "$ac_prev"; then
198     eval "$ac_prev=\$ac_option"
199     ac_prev=
200     continue
201   fi
202
203   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204
205   # Accept the important Cygnus configure options, so we can diagnose typos.
206
207   case $ac_option in
208
209   -bindir | --bindir | --bindi | --bind | --bin | --bi)
210     ac_prev=bindir ;;
211   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212     bindir=$ac_optarg ;;
213
214   -build | --build | --buil | --bui | --bu)
215     ac_prev=build_alias ;;
216   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217     build_alias=$ac_optarg ;;
218
219   -cache-file | --cache-file | --cache-fil | --cache-fi \
220   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221     ac_prev=cache_file ;;
222   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224     cache_file=$ac_optarg ;;
225
226   --config-cache | -C)
227     cache_file=config.cache ;;
228
229   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230     ac_prev=datadir ;;
231   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232   | --da=*)
233     datadir=$ac_optarg ;;
234
235   -disable-* | --disable-*)
236     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
237     # Reject names that are not valid shell variable names.
238     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
239       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
240    { (exit 1); exit 1; }; }
241     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
242     eval "enable_$ac_feature=no" ;;
243
244   -enable-* | --enable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
251     case $ac_option in
252       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
253       *) ac_optarg=yes ;;
254     esac
255     eval "enable_$ac_feature='$ac_optarg'" ;;
256
257   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
258   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
259   | --exec | --exe | --ex)
260     ac_prev=exec_prefix ;;
261   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
262   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
263   | --exec=* | --exe=* | --ex=*)
264     exec_prefix=$ac_optarg ;;
265
266   -gas | --gas | --ga | --g)
267     # Obsolete; use --with-gas.
268     with_gas=yes ;;
269
270   -help | --help | --hel | --he | -h)
271     ac_init_help=long ;;
272   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
273     ac_init_help=recursive ;;
274   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
275     ac_init_help=short ;;
276
277   -host | --host | --hos | --ho)
278     ac_prev=host_alias ;;
279   -host=* | --host=* | --hos=* | --ho=*)
280     host_alias=$ac_optarg ;;
281
282   -includedir | --includedir | --includedi | --included | --include \
283   | --includ | --inclu | --incl | --inc)
284     ac_prev=includedir ;;
285   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
286   | --includ=* | --inclu=* | --incl=* | --inc=*)
287     includedir=$ac_optarg ;;
288
289   -infodir | --infodir | --infodi | --infod | --info | --inf)
290     ac_prev=infodir ;;
291   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
292     infodir=$ac_optarg ;;
293
294   -libdir | --libdir | --libdi | --libd)
295     ac_prev=libdir ;;
296   -libdir=* | --libdir=* | --libdi=* | --libd=*)
297     libdir=$ac_optarg ;;
298
299   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
300   | --libexe | --libex | --libe)
301     ac_prev=libexecdir ;;
302   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
303   | --libexe=* | --libex=* | --libe=*)
304     libexecdir=$ac_optarg ;;
305
306   -localstatedir | --localstatedir | --localstatedi | --localstated \
307   | --localstate | --localstat | --localsta | --localst \
308   | --locals | --local | --loca | --loc | --lo)
309     ac_prev=localstatedir ;;
310   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
311   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
312   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
313     localstatedir=$ac_optarg ;;
314
315   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
316     ac_prev=mandir ;;
317   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
318     mandir=$ac_optarg ;;
319
320   -nfp | --nfp | --nf)
321     # Obsolete; use --without-fp.
322     with_fp=no ;;
323
324   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
325   | --no-cr | --no-c)
326     no_create=yes ;;
327
328   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
329   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
330     no_recursion=yes ;;
331
332   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
333   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
334   | --oldin | --oldi | --old | --ol | --o)
335     ac_prev=oldincludedir ;;
336   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
337   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
338   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
339     oldincludedir=$ac_optarg ;;
340
341   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
342     ac_prev=prefix ;;
343   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
344     prefix=$ac_optarg ;;
345
346   -program-prefix | --program-prefix | --program-prefi | --program-pref \
347   | --program-pre | --program-pr | --program-p)
348     ac_prev=program_prefix ;;
349   -program-prefix=* | --program-prefix=* | --program-prefi=* \
350   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
351     program_prefix=$ac_optarg ;;
352
353   -program-suffix | --program-suffix | --program-suffi | --program-suff \
354   | --program-suf | --program-su | --program-s)
355     ac_prev=program_suffix ;;
356   -program-suffix=* | --program-suffix=* | --program-suffi=* \
357   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
358     program_suffix=$ac_optarg ;;
359
360   -program-transform-name | --program-transform-name \
361   | --program-transform-nam | --program-transform-na \
362   | --program-transform-n | --program-transform- \
363   | --program-transform | --program-transfor \
364   | --program-transfo | --program-transf \
365   | --program-trans | --program-tran \
366   | --progr-tra | --program-tr | --program-t)
367     ac_prev=program_transform_name ;;
368   -program-transform-name=* | --program-transform-name=* \
369   | --program-transform-nam=* | --program-transform-na=* \
370   | --program-transform-n=* | --program-transform-=* \
371   | --program-transform=* | --program-transfor=* \
372   | --program-transfo=* | --program-transf=* \
373   | --program-trans=* | --program-tran=* \
374   | --progr-tra=* | --program-tr=* | --program-t=*)
375     program_transform_name=$ac_optarg ;;
376
377   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
378   | -silent | --silent | --silen | --sile | --sil)
379     silent=yes ;;
380
381   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
382     ac_prev=sbindir ;;
383   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
384   | --sbi=* | --sb=*)
385     sbindir=$ac_optarg ;;
386
387   -sharedstatedir | --sharedstatedir | --sharedstatedi \
388   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
389   | --sharedst | --shareds | --shared | --share | --shar \
390   | --sha | --sh)
391     ac_prev=sharedstatedir ;;
392   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
393   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
394   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
395   | --sha=* | --sh=*)
396     sharedstatedir=$ac_optarg ;;
397
398   -site | --site | --sit)
399     ac_prev=site ;;
400   -site=* | --site=* | --sit=*)
401     site=$ac_optarg ;;
402
403   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
404     ac_prev=srcdir ;;
405   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
406     srcdir=$ac_optarg ;;
407
408   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
409   | --syscon | --sysco | --sysc | --sys | --sy)
410     ac_prev=sysconfdir ;;
411   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
412   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
413     sysconfdir=$ac_optarg ;;
414
415   -target | --target | --targe | --targ | --tar | --ta | --t)
416     ac_prev=target_alias ;;
417   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
418     target_alias=$ac_optarg ;;
419
420   -v | -verbose | --verbose | --verbos | --verbo | --verb)
421     verbose=yes ;;
422
423   -version | --version | --versio | --versi | --vers | -V)
424     ac_init_version=: ;;
425
426   -with-* | --with-*)
427     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
428     # Reject names that are not valid shell variable names.
429     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
430       { echo "$as_me: error: invalid package name: $ac_package" >&2
431    { (exit 1); exit 1; }; }
432     ac_package=`echo $ac_package| sed 's/-/_/g'`
433     case $ac_option in
434       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
435       *) ac_optarg=yes ;;
436     esac
437     eval "with_$ac_package='$ac_optarg'" ;;
438
439   -without-* | --without-*)
440     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
441     # Reject names that are not valid shell variable names.
442     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
443       { echo "$as_me: error: invalid package name: $ac_package" >&2
444    { (exit 1); exit 1; }; }
445     ac_package=`echo $ac_package | sed 's/-/_/g'`
446     eval "with_$ac_package=no" ;;
447
448   --x)
449     # Obsolete; use --with-x.
450     with_x=yes ;;
451
452   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
453   | --x-incl | --x-inc | --x-in | --x-i)
454     ac_prev=x_includes ;;
455   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
456   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
457     x_includes=$ac_optarg ;;
458
459   -x-libraries | --x-libraries | --x-librarie | --x-librari \
460   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
461     ac_prev=x_libraries ;;
462   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
463   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
464     x_libraries=$ac_optarg ;;
465
466   -*) { echo "$as_me: error: unrecognized option: $ac_option
467 Try \`$0 --help' for more information." >&2
468    { (exit 1); exit 1; }; }
469     ;;
470
471   *=*)
472     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
473     # Reject names that are not valid shell variable names.
474     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
475       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
476    { (exit 1); exit 1; }; }
477     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
478     eval "$ac_envvar='$ac_optarg'"
479     export $ac_envvar ;;
480
481   *)
482     # FIXME: should be removed in autoconf 3.0.
483     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
484     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
485       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
486     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
487     ;;
488
489   esac
490 done
491
492 if test -n "$ac_prev"; then
493   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
494   { echo "$as_me: error: missing argument to $ac_option" >&2
495    { (exit 1); exit 1; }; }
496 fi
497
498 # Be sure to have absolute paths.
499 for ac_var in exec_prefix prefix
500 do
501   eval ac_val=$`echo $ac_var`
502   case $ac_val in
503     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
504     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
505    { (exit 1); exit 1; }; };;
506   esac
507 done
508
509 # Be sure to have absolute paths.
510 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
511               localstatedir libdir includedir oldincludedir infodir mandir
512 do
513   eval ac_val=$`echo $ac_var`
514   case $ac_val in
515     [\\/$]* | ?:[\\/]* ) ;;
516     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
517    { (exit 1); exit 1; }; };;
518   esac
519 done
520
521 # There might be people who depend on the old broken behavior: `$host'
522 # used to hold the argument of --host etc.
523 build=$build_alias
524 host=$host_alias
525 target=$target_alias
526
527 # FIXME: should be removed in autoconf 3.0.
528 if test "x$host_alias" != x; then
529   if test "x$build_alias" = x; then
530     cross_compiling=maybe
531     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
532     If a cross compiler is detected then cross compile mode will be used." >&2
533   elif test "x$build_alias" != "x$host_alias"; then
534     cross_compiling=yes
535   fi
536 fi
537
538 ac_tool_prefix=
539 test -n "$host_alias" && ac_tool_prefix=$host_alias-
540
541 test "$silent" = yes && exec 6>/dev/null
542
543 # Find the source files, if location was not specified.
544 if test -z "$srcdir"; then
545   ac_srcdir_defaulted=yes
546   # Try the directory containing this script, then its parent.
547   ac_prog=$0
548   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
549   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
550   srcdir=$ac_confdir
551   if test ! -r $srcdir/$ac_unique_file; then
552     srcdir=..
553   fi
554 else
555   ac_srcdir_defaulted=no
556 fi
557 if test ! -r $srcdir/$ac_unique_file; then
558   if test "$ac_srcdir_defaulted" = yes; then
559     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
560    { (exit 1); exit 1; }; }
561   else
562     { echo "$as_me: error: cannot find sources in $srcdir" >&2
563    { (exit 1); exit 1; }; }
564   fi
565 fi
566 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
567 ac_env_build_alias_set=${build_alias+set}
568 ac_env_build_alias_value=$build_alias
569 ac_cv_env_build_alias_set=${build_alias+set}
570 ac_cv_env_build_alias_value=$build_alias
571 ac_env_host_alias_set=${host_alias+set}
572 ac_env_host_alias_value=$host_alias
573 ac_cv_env_host_alias_set=${host_alias+set}
574 ac_cv_env_host_alias_value=$host_alias
575 ac_env_target_alias_set=${target_alias+set}
576 ac_env_target_alias_value=$target_alias
577 ac_cv_env_target_alias_set=${target_alias+set}
578 ac_cv_env_target_alias_value=$target_alias
579 ac_env_CC_set=${CC+set}
580 ac_env_CC_value=$CC
581 ac_cv_env_CC_set=${CC+set}
582 ac_cv_env_CC_value=$CC
583 ac_env_CFLAGS_set=${CFLAGS+set}
584 ac_env_CFLAGS_value=$CFLAGS
585 ac_cv_env_CFLAGS_set=${CFLAGS+set}
586 ac_cv_env_CFLAGS_value=$CFLAGS
587 ac_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_env_LDFLAGS_value=$LDFLAGS
589 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
590 ac_cv_env_LDFLAGS_value=$LDFLAGS
591 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_env_CPPFLAGS_value=$CPPFLAGS
593 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
594 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
595 ac_env_CPP_set=${CPP+set}
596 ac_env_CPP_value=$CPP
597 ac_cv_env_CPP_set=${CPP+set}
598 ac_cv_env_CPP_value=$CPP
599
600 #
601 # Report the --help message.
602 #
603 if test "$ac_init_help" = "long"; then
604   # Omit some internal or obsolete options to make the list less imposing.
605   # This message is too long to be a string in the A/UX 3.1 sh.
606   cat <<EOF
607 \`configure' configures readline 4.3 to adapt to many kinds of systems.
608
609 Usage: $0 [OPTION]... [VAR=VALUE]...
610
611 To assign environment variables (e.g., CC, CFLAGS...), specify them as
612 VAR=VALUE.  See below for descriptions of some of the useful variables.
613
614 Defaults for the options are specified in brackets.
615
616 Configuration:
617   -h, --help              display this help and exit
618       --help=short        display options specific to this package
619       --help=recursive    display the short help of all the included packages
620   -V, --version           display version information and exit
621   -q, --quiet, --silent   do not print \`checking...' messages
622       --cache-file=FILE   cache test results in FILE [disabled]
623   -C, --config-cache      alias for \`--cache-file=config.cache'
624   -n, --no-create         do not create output files
625       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
626
627 EOF
628
629   cat <<EOF
630 Installation directories:
631   --prefix=PREFIX         install architecture-independent files in PREFIX
632                           [$ac_default_prefix]
633   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
634                           [PREFIX]
635
636 By default, \`make install' will install all the files in
637 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
638 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
639 for instance \`--prefix=\$HOME'.
640
641 For better control, use the options below.
642
643 Fine tuning of the installation directories:
644   --bindir=DIR           user executables [EPREFIX/bin]
645   --sbindir=DIR          system admin executables [EPREFIX/sbin]
646   --libexecdir=DIR       program executables [EPREFIX/libexec]
647   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
648   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
649   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
650   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
651   --libdir=DIR           object code libraries [EPREFIX/lib]
652   --includedir=DIR       C header files [PREFIX/include]
653   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
654   --infodir=DIR          info documentation [PREFIX/info]
655   --mandir=DIR           man documentation [PREFIX/man]
656 EOF
657
658   cat <<\EOF
659
660 System types:
661   --build=BUILD     configure for building on BUILD [guessed]
662   --host=HOST       build programs to run on HOST [BUILD]
663 EOF
664 fi
665
666 if test -n "$ac_init_help"; then
667   case $ac_init_help in
668      short | recursive ) echo "Configuration of readline 4.3:";;
669    esac
670   cat <<\EOF
671
672 Optional Features:
673   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
674   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
675   --enable-static         build static libraries [default=YES]
676
677 Optional Packages:
678   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
679   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
680   --with-curses           use the curses library instead of the termcap
681                           library
682
683 Some influential environment variables:
684   CC          C compiler command
685   CFLAGS      C compiler flags
686   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
687               nonstandard directory <lib dir>
688   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
689               headers in a nonstandard directory <include dir>
690   CPP         C preprocessor
691
692 Use these variables to override the choices made by `configure' or to help
693 it to find libraries and programs with nonstandard names/locations.
694
695 Report bugs to <bug-readline@gnu.org>.
696 EOF
697 fi
698
699 if test "$ac_init_help" = "recursive"; then
700   # If there are subdirs, report their specific --help.
701   ac_popdir=`pwd`
702   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
703     cd $ac_subdir
704     # A "../" for each directory in /$ac_subdir.
705     ac_dots=`echo $ac_subdir |
706              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
707
708     case $srcdir in
709     .) # No --srcdir option.  We are building in place.
710       ac_sub_srcdir=$srcdir ;;
711     [\\/]* | ?:[\\/]* ) # Absolute path.
712       ac_sub_srcdir=$srcdir/$ac_subdir ;;
713     *) # Relative path.
714       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
715     esac
716
717     # Check for guested configure; otherwise get Cygnus style configure.
718     if test -f $ac_sub_srcdir/configure.gnu; then
719       echo
720       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
721     elif test -f $ac_sub_srcdir/configure; then
722       echo
723       $SHELL $ac_sub_srcdir/configure  --help=recursive
724     elif test -f $ac_sub_srcdir/configure.ac ||
725            test -f $ac_sub_srcdir/configure.in; then
726       echo
727       $ac_configure --help
728     else
729       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
730     fi
731     cd $ac_popdir
732   done
733 fi
734
735 test -n "$ac_init_help" && exit 0
736 if $ac_init_version; then
737   cat <<\EOF
738 readline configure 4.3
739 generated by GNU Autoconf 2.52
740
741 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
742 Free Software Foundation, Inc.
743 This configure script is free software; the Free Software Foundation
744 gives unlimited permission to copy, distribute and modify it.
745 EOF
746   exit 0
747 fi
748 exec 5>config.log
749 cat >&5 <<EOF
750 This file contains any messages produced by compilers while
751 running configure, to aid debugging if configure makes a mistake.
752
753 It was created by readline $as_me 4.3, which was
754 generated by GNU Autoconf 2.52.  Invocation command line was
755
756   $ $0 $@
757
758 EOF
759 {
760 cat <<_ASUNAME
761 ## ---------- ##
762 ## Platform.  ##
763 ## ---------- ##
764
765 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
766 uname -m = `(uname -m) 2>/dev/null || echo unknown`
767 uname -r = `(uname -r) 2>/dev/null || echo unknown`
768 uname -s = `(uname -s) 2>/dev/null || echo unknown`
769 uname -v = `(uname -v) 2>/dev/null || echo unknown`
770
771 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
772 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
773
774 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
775 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
776 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
777 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
778 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
779 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
780 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
781
782 PATH = $PATH
783
784 _ASUNAME
785 } >&5
786
787 cat >&5 <<EOF
788 ## ------------ ##
789 ## Core tests.  ##
790 ## ------------ ##
791
792 EOF
793
794 # Keep a trace of the command line.
795 # Strip out --no-create and --no-recursion so they do not pile up.
796 # Also quote any args containing shell meta-characters.
797 ac_configure_args=
798 ac_sep=
799 for ac_arg
800 do
801   case $ac_arg in
802   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
803   | --no-cr | --no-c) ;;
804   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
805   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
806   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
807     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
808     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
809     ac_sep=" " ;;
810   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
811      ac_sep=" " ;;
812   esac
813   # Get rid of the leading space.
814 done
815
816 # When interrupted or exit'd, cleanup temporary files, and complete
817 # config.log.  We remove comments because anyway the quotes in there
818 # would cause problems or look ugly.
819 trap 'exit_status=$?
820   # Save into config.log some information that might help in debugging.
821   echo >&5
822   echo "## ----------------- ##" >&5
823   echo "## Cache variables.  ##" >&5
824   echo "## ----------------- ##" >&5
825   echo >&5
826   # The following way of writing the cache mishandles newlines in values,
827 {
828   (set) 2>&1 |
829     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
830     *ac_space=\ *)
831       sed -n \
832         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
833           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
834       ;;
835     *)
836       sed -n \
837         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
838       ;;
839     esac;
840 } >&5
841   sed "/^$/d" confdefs.h >conftest.log
842   if test -s conftest.log; then
843     echo >&5
844     echo "## ------------ ##" >&5
845     echo "## confdefs.h.  ##" >&5
846     echo "## ------------ ##" >&5
847     echo >&5
848     cat conftest.log >&5
849   fi
850   (echo; echo) >&5
851   test "$ac_signal" != 0 &&
852     echo "$as_me: caught signal $ac_signal" >&5
853   echo "$as_me: exit $exit_status" >&5
854   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
855     exit $exit_status
856      ' 0
857 for ac_signal in 1 2 13 15; do
858   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
859 done
860 ac_signal=0
861
862 # confdefs.h avoids OS command line length limits that DEFS can exceed.
863 rm -rf conftest* confdefs.h
864 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
865 echo >confdefs.h
866
867 # Let the site file select an alternate cache file if it wants to.
868 # Prefer explicitly selected file to automatically selected ones.
869 if test -z "$CONFIG_SITE"; then
870   if test "x$prefix" != xNONE; then
871     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
872   else
873     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
874   fi
875 fi
876 for ac_site_file in $CONFIG_SITE; do
877   if test -r "$ac_site_file"; then
878     { echo "$as_me:879: loading site script $ac_site_file" >&5
879 echo "$as_me: loading site script $ac_site_file" >&6;}
880     cat "$ac_site_file" >&5
881     . "$ac_site_file"
882   fi
883 done
884
885 if test -r "$cache_file"; then
886   # Some versions of bash will fail to source /dev/null (special
887   # files actually), so we avoid doing that.
888   if test -f "$cache_file"; then
889     { echo "$as_me:890: loading cache $cache_file" >&5
890 echo "$as_me: loading cache $cache_file" >&6;}
891     case $cache_file in
892       [\\/]* | ?:[\\/]* ) . $cache_file;;
893       *)                      . ./$cache_file;;
894     esac
895   fi
896 else
897   { echo "$as_me:898: creating cache $cache_file" >&5
898 echo "$as_me: creating cache $cache_file" >&6;}
899   >$cache_file
900 fi
901
902 # Check that the precious variables saved in the cache have kept the same
903 # value.
904 ac_cache_corrupted=false
905 for ac_var in `(set) 2>&1 |
906                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
907   eval ac_old_set=\$ac_cv_env_${ac_var}_set
908   eval ac_new_set=\$ac_env_${ac_var}_set
909   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
910   eval ac_new_val="\$ac_env_${ac_var}_value"
911   case $ac_old_set,$ac_new_set in
912     set,)
913       { echo "$as_me:914: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
914 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
915       ac_cache_corrupted=: ;;
916     ,set)
917       { echo "$as_me:918: error: \`$ac_var' was not set in the previous run" >&5
918 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
919       ac_cache_corrupted=: ;;
920     ,);;
921     *)
922       if test "x$ac_old_val" != "x$ac_new_val"; then
923         { echo "$as_me:924: error: \`$ac_var' has changed since the previous run:" >&5
924 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
925         { echo "$as_me:926:   former value:  $ac_old_val" >&5
926 echo "$as_me:   former value:  $ac_old_val" >&2;}
927         { echo "$as_me:928:   current value: $ac_new_val" >&5
928 echo "$as_me:   current value: $ac_new_val" >&2;}
929         ac_cache_corrupted=:
930       fi;;
931   esac
932   # Pass precious variables to config.status.  It doesn't matter if
933   # we pass some twice (in addition to the command line arguments).
934   if test "$ac_new_set" = set; then
935     case $ac_new_val in
936     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
937       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
938       ac_configure_args="$ac_configure_args '$ac_arg'"
939       ;;
940     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
941        ;;
942     esac
943   fi
944 done
945 if $ac_cache_corrupted; then
946   { echo "$as_me:947: error: changes in the environment can compromise the build" >&5
947 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
948   { { echo "$as_me:949: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
949 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
950    { (exit 1); exit 1; }; }
951 fi
952
953 ac_ext=c
954 ac_cpp='$CPP $CPPFLAGS'
955 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
956 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
957 ac_compiler_gnu=$ac_cv_c_compiler_gnu
958
959 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
960   *c*,-n*) ECHO_N= ECHO_C='
961 ' ECHO_T='      ' ;;
962   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
963   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
964 esac
965 echo "#! $SHELL" >conftest.sh
966 echo  "exit 0"   >>conftest.sh
967 chmod +x conftest.sh
968 if { (echo "$as_me:969: PATH=\".;.\"; conftest.sh") >&5
969   (PATH=".;."; conftest.sh) 2>&5
970   ac_status=$?
971   echo "$as_me:972: \$? = $ac_status" >&5
972   (exit $ac_status); }; then
973   ac_path_separator=';'
974 else
975   ac_path_separator=:
976 fi
977 PATH_SEPARATOR="$ac_path_separator"
978 rm -f conftest.sh
979
980 ac_config_headers="$ac_config_headers config.h"
981
982 LIBVERSION=4.3
983
984 ac_aux_dir=
985 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
986   if test -f $ac_dir/install-sh; then
987     ac_aux_dir=$ac_dir
988     ac_install_sh="$ac_aux_dir/install-sh -c"
989     break
990   elif test -f $ac_dir/install.sh; then
991     ac_aux_dir=$ac_dir
992     ac_install_sh="$ac_aux_dir/install.sh -c"
993     break
994   elif test -f $ac_dir/shtool; then
995     ac_aux_dir=$ac_dir
996     ac_install_sh="$ac_aux_dir/shtool install -c"
997     break
998   fi
999 done
1000 if test -z "$ac_aux_dir"; then
1001   { { echo "$as_me:1002: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1002 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1003    { (exit 1); exit 1; }; }
1004 fi
1005 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1006 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1007 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1008
1009 # Make sure we can run config.sub.
1010 $ac_config_sub sun4 >/dev/null 2>&1 ||
1011   { { echo "$as_me:1012: error: cannot run $ac_config_sub" >&5
1012 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1013    { (exit 1); exit 1; }; }
1014
1015 echo "$as_me:1016: checking build system type" >&5
1016 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1017 if test "${ac_cv_build+set}" = set; then
1018   echo $ECHO_N "(cached) $ECHO_C" >&6
1019 else
1020   ac_cv_build_alias=$build_alias
1021 test -z "$ac_cv_build_alias" &&
1022   ac_cv_build_alias=`$ac_config_guess`
1023 test -z "$ac_cv_build_alias" &&
1024   { { echo "$as_me:1025: error: cannot guess build type; you must specify one" >&5
1025 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1026    { (exit 1); exit 1; }; }
1027 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1028   { { echo "$as_me:1029: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1029 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1030    { (exit 1); exit 1; }; }
1031
1032 fi
1033 echo "$as_me:1034: result: $ac_cv_build" >&5
1034 echo "${ECHO_T}$ac_cv_build" >&6
1035 build=$ac_cv_build
1036 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1037 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1038 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1039
1040 echo "$as_me:1041: checking host system type" >&5
1041 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1042 if test "${ac_cv_host+set}" = set; then
1043   echo $ECHO_N "(cached) $ECHO_C" >&6
1044 else
1045   ac_cv_host_alias=$host_alias
1046 test -z "$ac_cv_host_alias" &&
1047   ac_cv_host_alias=$ac_cv_build_alias
1048 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1049   { { echo "$as_me:1050: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1050 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1051    { (exit 1); exit 1; }; }
1052
1053 fi
1054 echo "$as_me:1055: result: $ac_cv_host" >&5
1055 echo "${ECHO_T}$ac_cv_host" >&6
1056 host=$ac_cv_host
1057 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1058 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1059 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1060
1061 opt_curses=no
1062
1063 # Check whether --with-curses or --without-curses was given.
1064 if test "${with_curses+set}" = set; then
1065   withval="$with_curses"
1066   opt_curses=$withval
1067 fi;
1068
1069 if test "$opt_curses" = "yes"; then
1070         prefer_curses=yes
1071 fi
1072
1073 opt_static_libs=yes
1074 opt_shared_libs=no
1075
1076 # Check whether --enable-static or --disable-static was given.
1077 if test "${enable_static+set}" = set; then
1078   enableval="$enable_static"
1079   opt_static_libs=$enableval
1080 fi;
1081
1082 echo ""
1083 echo "Beginning configuration for readline-$LIBVERSION for ${host_cpu}-${host_vendor}-${host_os}"
1084 echo ""
1085
1086 # We want these before the checks, so the checks can modify their values.
1087 test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
1088
1089 echo "$as_me:1095: checking whether ${MAKE-make} sets \${MAKE}" >&5
1090 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1091 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1092 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1093   echo $ECHO_N "(cached) $ECHO_C" >&6
1094 else
1095   cat >conftest.make <<\EOF
1096 all:
1097         @echo 'ac_maketemp="${MAKE}"'
1098 EOF
1099 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1100 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1101 if test -n "$ac_maketemp"; then
1102   eval ac_cv_prog_make_${ac_make}_set=yes
1103 else
1104   eval ac_cv_prog_make_${ac_make}_set=no
1105 fi
1106 rm -f conftest.make
1107 fi
1108 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1109   echo "$as_me:1115: result: yes" >&5
1110 echo "${ECHO_T}yes" >&6
1111   SET_MAKE=
1112 else
1113   echo "$as_me:1119: result: no" >&5
1114 echo "${ECHO_T}no" >&6
1115   SET_MAKE="MAKE=${MAKE-make}"
1116 fi
1117
1118 ac_ext=c
1119 ac_cpp='$CPP $CPPFLAGS'
1120 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1121 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1122 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1123 if test -n "$ac_tool_prefix"; then
1124   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1125 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1126 echo "$as_me:1132: checking for $ac_word" >&5
1127 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1128 if test "${ac_cv_prog_CC+set}" = set; then
1129   echo $ECHO_N "(cached) $ECHO_C" >&6
1130 else
1131   if test -n "$CC"; then
1132   ac_cv_prog_CC="$CC" # Let the user override the test.
1133 else
1134   ac_save_IFS=$IFS; IFS=$ac_path_separator
1135 ac_dummy="$PATH"
1136 for ac_dir in $ac_dummy; do
1137   IFS=$ac_save_IFS
1138   test -z "$ac_dir" && ac_dir=.
1139   $as_executable_p "$ac_dir/$ac_word" || continue
1140 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1141 echo "$as_me:1147: found $ac_dir/$ac_word" >&5
1142 break
1143 done
1144
1145 fi
1146 fi
1147 CC=$ac_cv_prog_CC
1148 if test -n "$CC"; then
1149   echo "$as_me:1155: result: $CC" >&5
1150 echo "${ECHO_T}$CC" >&6
1151 else
1152   echo "$as_me:1158: result: no" >&5
1153 echo "${ECHO_T}no" >&6
1154 fi
1155
1156 fi
1157 if test -z "$ac_cv_prog_CC"; then
1158   ac_ct_CC=$CC
1159   # Extract the first word of "gcc", so it can be a program name with args.
1160 set dummy gcc; ac_word=$2
1161 echo "$as_me:1167: checking for $ac_word" >&5
1162 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1163 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1164   echo $ECHO_N "(cached) $ECHO_C" >&6
1165 else
1166   if test -n "$ac_ct_CC"; then
1167   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1168 else
1169   ac_save_IFS=$IFS; IFS=$ac_path_separator
1170 ac_dummy="$PATH"
1171 for ac_dir in $ac_dummy; do
1172   IFS=$ac_save_IFS
1173   test -z "$ac_dir" && ac_dir=.
1174   $as_executable_p "$ac_dir/$ac_word" || continue
1175 ac_cv_prog_ac_ct_CC="gcc"
1176 echo "$as_me:1182: found $ac_dir/$ac_word" >&5
1177 break
1178 done
1179
1180 fi
1181 fi
1182 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1183 if test -n "$ac_ct_CC"; then
1184   echo "$as_me:1190: result: $ac_ct_CC" >&5
1185 echo "${ECHO_T}$ac_ct_CC" >&6
1186 else
1187   echo "$as_me:1193: result: no" >&5
1188 echo "${ECHO_T}no" >&6
1189 fi
1190
1191   CC=$ac_ct_CC
1192 else
1193   CC="$ac_cv_prog_CC"
1194 fi
1195
1196 if test -z "$CC"; then
1197   if test -n "$ac_tool_prefix"; then
1198   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1199 set dummy ${ac_tool_prefix}cc; ac_word=$2
1200 echo "$as_me:1206: checking for $ac_word" >&5
1201 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1202 if test "${ac_cv_prog_CC+set}" = set; then
1203   echo $ECHO_N "(cached) $ECHO_C" >&6
1204 else
1205   if test -n "$CC"; then
1206   ac_cv_prog_CC="$CC" # Let the user override the test.
1207 else
1208   ac_save_IFS=$IFS; IFS=$ac_path_separator
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
1211   IFS=$ac_save_IFS
1212   test -z "$ac_dir" && ac_dir=.
1213   $as_executable_p "$ac_dir/$ac_word" || continue
1214 ac_cv_prog_CC="${ac_tool_prefix}cc"
1215 echo "$as_me:1221: found $ac_dir/$ac_word" >&5
1216 break
1217 done
1218
1219 fi
1220 fi
1221 CC=$ac_cv_prog_CC
1222 if test -n "$CC"; then
1223   echo "$as_me:1229: result: $CC" >&5
1224 echo "${ECHO_T}$CC" >&6
1225 else
1226   echo "$as_me:1232: result: no" >&5
1227 echo "${ECHO_T}no" >&6
1228 fi
1229
1230 fi
1231 if test -z "$ac_cv_prog_CC"; then
1232   ac_ct_CC=$CC
1233   # Extract the first word of "cc", so it can be a program name with args.
1234 set dummy cc; ac_word=$2
1235 echo "$as_me:1241: checking for $ac_word" >&5
1236 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1237 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1238   echo $ECHO_N "(cached) $ECHO_C" >&6
1239 else
1240   if test -n "$ac_ct_CC"; then
1241   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1242 else
1243   ac_save_IFS=$IFS; IFS=$ac_path_separator
1244 ac_dummy="$PATH"
1245 for ac_dir in $ac_dummy; do
1246   IFS=$ac_save_IFS
1247   test -z "$ac_dir" && ac_dir=.
1248   $as_executable_p "$ac_dir/$ac_word" || continue
1249 ac_cv_prog_ac_ct_CC="cc"
1250 echo "$as_me:1256: found $ac_dir/$ac_word" >&5
1251 break
1252 done
1253
1254 fi
1255 fi
1256 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1257 if test -n "$ac_ct_CC"; then
1258   echo "$as_me:1264: result: $ac_ct_CC" >&5
1259 echo "${ECHO_T}$ac_ct_CC" >&6
1260 else
1261   echo "$as_me:1267: result: no" >&5
1262 echo "${ECHO_T}no" >&6
1263 fi
1264
1265   CC=$ac_ct_CC
1266 else
1267   CC="$ac_cv_prog_CC"
1268 fi
1269
1270 fi
1271 if test -z "$CC"; then
1272   # Extract the first word of "cc", so it can be a program name with args.
1273 set dummy cc; ac_word=$2
1274 echo "$as_me:1280: checking for $ac_word" >&5
1275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1276 if test "${ac_cv_prog_CC+set}" = set; then
1277   echo $ECHO_N "(cached) $ECHO_C" >&6
1278 else
1279   if test -n "$CC"; then
1280   ac_cv_prog_CC="$CC" # Let the user override the test.
1281 else
1282   ac_prog_rejected=no
1283   ac_save_IFS=$IFS; IFS=$ac_path_separator
1284 ac_dummy="$PATH"
1285 for ac_dir in $ac_dummy; do
1286   IFS=$ac_save_IFS
1287   test -z "$ac_dir" && ac_dir=.
1288   $as_executable_p "$ac_dir/$ac_word" || continue
1289 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1290   ac_prog_rejected=yes
1291   continue
1292 fi
1293 ac_cv_prog_CC="cc"
1294 echo "$as_me:1300: found $ac_dir/$ac_word" >&5
1295 break
1296 done
1297
1298 if test $ac_prog_rejected = yes; then
1299   # We found a bogon in the path, so make sure we never use it.
1300   set dummy $ac_cv_prog_CC
1301   shift
1302   if test $# != 0; then
1303     # We chose a different compiler from the bogus one.
1304     # However, it has the same basename, so the bogon will be chosen
1305     # first if we set CC to just the basename; use the full file name.
1306     shift
1307     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1308     shift
1309     ac_cv_prog_CC="$@"
1310   fi
1311 fi
1312 fi
1313 fi
1314 CC=$ac_cv_prog_CC
1315 if test -n "$CC"; then
1316   echo "$as_me:1322: result: $CC" >&5
1317 echo "${ECHO_T}$CC" >&6
1318 else
1319   echo "$as_me:1325: result: no" >&5
1320 echo "${ECHO_T}no" >&6
1321 fi
1322
1323 fi
1324 if test -z "$CC"; then
1325   if test -n "$ac_tool_prefix"; then
1326   for ac_prog in cl
1327   do
1328     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1329 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1330 echo "$as_me:1336: checking for $ac_word" >&5
1331 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1332 if test "${ac_cv_prog_CC+set}" = set; then
1333   echo $ECHO_N "(cached) $ECHO_C" >&6
1334 else
1335   if test -n "$CC"; then
1336   ac_cv_prog_CC="$CC" # Let the user override the test.
1337 else
1338   ac_save_IFS=$IFS; IFS=$ac_path_separator
1339 ac_dummy="$PATH"
1340 for ac_dir in $ac_dummy; do
1341   IFS=$ac_save_IFS
1342   test -z "$ac_dir" && ac_dir=.
1343   $as_executable_p "$ac_dir/$ac_word" || continue
1344 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1345 echo "$as_me:1351: found $ac_dir/$ac_word" >&5
1346 break
1347 done
1348
1349 fi
1350 fi
1351 CC=$ac_cv_prog_CC
1352 if test -n "$CC"; then
1353   echo "$as_me:1359: result: $CC" >&5
1354 echo "${ECHO_T}$CC" >&6
1355 else
1356   echo "$as_me:1362: result: no" >&5
1357 echo "${ECHO_T}no" >&6
1358 fi
1359
1360     test -n "$CC" && break
1361   done
1362 fi
1363 if test -z "$CC"; then
1364   ac_ct_CC=$CC
1365   for ac_prog in cl
1366 do
1367   # Extract the first word of "$ac_prog", so it can be a program name with args.
1368 set dummy $ac_prog; ac_word=$2
1369 echo "$as_me:1375: checking for $ac_word" >&5
1370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1371 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1372   echo $ECHO_N "(cached) $ECHO_C" >&6
1373 else
1374   if test -n "$ac_ct_CC"; then
1375   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1376 else
1377   ac_save_IFS=$IFS; IFS=$ac_path_separator
1378 ac_dummy="$PATH"
1379 for ac_dir in $ac_dummy; do
1380   IFS=$ac_save_IFS
1381   test -z "$ac_dir" && ac_dir=.
1382   $as_executable_p "$ac_dir/$ac_word" || continue
1383 ac_cv_prog_ac_ct_CC="$ac_prog"
1384 echo "$as_me:1390: found $ac_dir/$ac_word" >&5
1385 break
1386 done
1387
1388 fi
1389 fi
1390 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1391 if test -n "$ac_ct_CC"; then
1392   echo "$as_me:1398: result: $ac_ct_CC" >&5
1393 echo "${ECHO_T}$ac_ct_CC" >&6
1394 else
1395   echo "$as_me:1401: result: no" >&5
1396 echo "${ECHO_T}no" >&6
1397 fi
1398
1399   test -n "$ac_ct_CC" && break
1400 done
1401
1402   CC=$ac_ct_CC
1403 fi
1404
1405 fi
1406
1407 test -z "$CC" && { { echo "$as_me:1413: error: no acceptable cc found in \$PATH" >&5
1408 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1409    { (exit 1); exit 1; }; }
1410
1411 # Provide some information about the compiler.
1412 echo "$as_me:1418:" \
1413      "checking for C compiler version" >&5
1414 ac_compiler=`set X $ac_compile; echo $2`
1415 { (eval echo "$as_me:1421: \"$ac_compiler --version </dev/null >&5\"") >&5
1416   (eval $ac_compiler --version </dev/null >&5) 2>&5
1417   ac_status=$?
1418   echo "$as_me:1424: \$? = $ac_status" >&5
1419   (exit $ac_status); }
1420 { (eval echo "$as_me:1426: \"$ac_compiler -v </dev/null >&5\"") >&5
1421   (eval $ac_compiler -v </dev/null >&5) 2>&5
1422   ac_status=$?
1423   echo "$as_me:1429: \$? = $ac_status" >&5
1424   (exit $ac_status); }
1425 { (eval echo "$as_me:1431: \"$ac_compiler -V </dev/null >&5\"") >&5
1426   (eval $ac_compiler -V </dev/null >&5) 2>&5
1427   ac_status=$?
1428   echo "$as_me:1434: \$? = $ac_status" >&5
1429   (exit $ac_status); }
1430
1431 cat >conftest.$ac_ext <<_ACEOF
1432 #line 1438 "configure"
1433 #include "confdefs.h"
1434
1435 int
1436 main ()
1437 {
1438
1439   ;
1440   return 0;
1441 }
1442 _ACEOF
1443 ac_clean_files_save=$ac_clean_files
1444 ac_clean_files="$ac_clean_files a.out a.exe"
1445 # Try to create an executable without -o first, disregard a.out.
1446 # It will help us diagnose broken compilers, and finding out an intuition
1447 # of exeext.
1448 echo "$as_me:1454: checking for C compiler default output" >&5
1449 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1450 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1451 if { (eval echo "$as_me:1457: \"$ac_link_default\"") >&5
1452   (eval $ac_link_default) 2>&5
1453   ac_status=$?
1454   echo "$as_me:1460: \$? = $ac_status" >&5
1455   (exit $ac_status); }; then
1456   # Find the output, starting from the most likely.  This scheme is
1457 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1458 # resort.
1459 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1460                 ls a.out conftest 2>/dev/null;
1461                 ls a.* conftest.* 2>/dev/null`; do
1462   case $ac_file in
1463     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1464     a.out ) # We found the default executable, but exeext='' is most
1465             # certainly right.
1466             break;;
1467     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1468           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1469           export ac_cv_exeext
1470           break;;
1471     * ) break;;
1472   esac
1473 done
1474 else
1475   echo "$as_me: failed program was:" >&5
1476 cat conftest.$ac_ext >&5
1477 { { echo "$as_me:1483: error: C compiler cannot create executables" >&5
1478 echo "$as_me: error: C compiler cannot create executables" >&2;}
1479    { (exit 77); exit 77; }; }
1480 fi
1481
1482 ac_exeext=$ac_cv_exeext
1483 echo "$as_me:1489: result: $ac_file" >&5
1484 echo "${ECHO_T}$ac_file" >&6
1485
1486 # Check the compiler produces executables we can run.  If not, either
1487 # the compiler is broken, or we cross compile.
1488 echo "$as_me:1494: checking whether the C compiler works" >&5
1489 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1490 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1491 # If not cross compiling, check that we can run a simple program.
1492 if test "$cross_compiling" != yes; then
1493   if { ac_try='./$ac_file'
1494   { (eval echo "$as_me:1500: \"$ac_try\"") >&5
1495   (eval $ac_try) 2>&5
1496   ac_status=$?
1497   echo "$as_me:1503: \$? = $ac_status" >&5
1498   (exit $ac_status); }; }; then
1499     cross_compiling=no
1500   else
1501     if test "$cross_compiling" = maybe; then
1502         cross_compiling=yes
1503     else
1504         { { echo "$as_me:1510: error: cannot run C compiled programs.
1505 If you meant to cross compile, use \`--host'." >&5
1506 echo "$as_me: error: cannot run C compiled programs.
1507 If you meant to cross compile, use \`--host'." >&2;}
1508    { (exit 1); exit 1; }; }
1509     fi
1510   fi
1511 fi
1512 echo "$as_me:1518: result: yes" >&5
1513 echo "${ECHO_T}yes" >&6
1514
1515 rm -f a.out a.exe conftest$ac_cv_exeext
1516 ac_clean_files=$ac_clean_files_save
1517 # Check the compiler produces executables we can run.  If not, either
1518 # the compiler is broken, or we cross compile.
1519 echo "$as_me:1525: checking whether we are cross compiling" >&5
1520 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1521 echo "$as_me:1527: result: $cross_compiling" >&5
1522 echo "${ECHO_T}$cross_compiling" >&6
1523
1524 echo "$as_me:1530: checking for executable suffix" >&5
1525 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1526 if { (eval echo "$as_me:1532: \"$ac_link\"") >&5
1527   (eval $ac_link) 2>&5
1528   ac_status=$?
1529   echo "$as_me:1535: \$? = $ac_status" >&5
1530   (exit $ac_status); }; then
1531   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1532 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1533 # work properly (i.e., refer to `conftest.exe'), while it won't with
1534 # `rm'.
1535 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1536   case $ac_file in
1537     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1538     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1539           export ac_cv_exeext
1540           break;;
1541     * ) break;;
1542   esac
1543 done
1544 else
1545   { { echo "$as_me:1551: error: cannot compute EXEEXT: cannot compile and link" >&5
1546 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1547    { (exit 1); exit 1; }; }
1548 fi
1549
1550 rm -f conftest$ac_cv_exeext
1551 echo "$as_me:1557: result: $ac_cv_exeext" >&5
1552 echo "${ECHO_T}$ac_cv_exeext" >&6
1553
1554 rm -f conftest.$ac_ext
1555 EXEEXT=$ac_cv_exeext
1556 ac_exeext=$EXEEXT
1557 echo "$as_me:1563: checking for object suffix" >&5
1558 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1559 if test "${ac_cv_objext+set}" = set; then
1560   echo $ECHO_N "(cached) $ECHO_C" >&6
1561 else
1562   cat >conftest.$ac_ext <<_ACEOF
1563 #line 1569 "configure"
1564 #include "confdefs.h"
1565
1566 int
1567 main ()
1568 {
1569
1570   ;
1571   return 0;
1572 }
1573 _ACEOF
1574 rm -f conftest.o conftest.obj
1575 if { (eval echo "$as_me:1581: \"$ac_compile\"") >&5
1576   (eval $ac_compile) 2>&5
1577   ac_status=$?
1578   echo "$as_me:1584: \$? = $ac_status" >&5
1579   (exit $ac_status); }; then
1580   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1581   case $ac_file in
1582     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1583     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1584        break;;
1585   esac
1586 done
1587 else
1588   echo "$as_me: failed program was:" >&5
1589 cat conftest.$ac_ext >&5
1590 { { echo "$as_me:1596: error: cannot compute OBJEXT: cannot compile" >&5
1591 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1592    { (exit 1); exit 1; }; }
1593 fi
1594
1595 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1596 fi
1597 echo "$as_me:1603: result: $ac_cv_objext" >&5
1598 echo "${ECHO_T}$ac_cv_objext" >&6
1599 OBJEXT=$ac_cv_objext
1600 ac_objext=$OBJEXT
1601 echo "$as_me:1607: checking whether we are using the GNU C compiler" >&5
1602 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1603 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1604   echo $ECHO_N "(cached) $ECHO_C" >&6
1605 else
1606   cat >conftest.$ac_ext <<_ACEOF
1607 #line 1613 "configure"
1608 #include "confdefs.h"
1609
1610 int
1611 main ()
1612 {
1613 #ifndef __GNUC__
1614        choke me
1615 #endif
1616
1617   ;
1618   return 0;
1619 }
1620 _ACEOF
1621 rm -f conftest.$ac_objext
1622 if { (eval echo "$as_me:1628: \"$ac_compile\"") >&5
1623   (eval $ac_compile) 2>&5
1624   ac_status=$?
1625   echo "$as_me:1631: \$? = $ac_status" >&5
1626   (exit $ac_status); } &&
1627          { ac_try='test -s conftest.$ac_objext'
1628   { (eval echo "$as_me:1634: \"$ac_try\"") >&5
1629   (eval $ac_try) 2>&5
1630   ac_status=$?
1631   echo "$as_me:1637: \$? = $ac_status" >&5
1632   (exit $ac_status); }; }; then
1633   ac_compiler_gnu=yes
1634 else
1635   echo "$as_me: failed program was:" >&5
1636 cat conftest.$ac_ext >&5
1637 ac_compiler_gnu=no
1638 fi
1639 rm -f conftest.$ac_objext conftest.$ac_ext
1640 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1641
1642 fi
1643 echo "$as_me:1649: result: $ac_cv_c_compiler_gnu" >&5
1644 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1645 GCC=`test $ac_compiler_gnu = yes && echo yes`
1646 ac_test_CFLAGS=${CFLAGS+set}
1647 ac_save_CFLAGS=$CFLAGS
1648 CFLAGS="-g"
1649 echo "$as_me:1655: checking whether $CC accepts -g" >&5
1650 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1651 if test "${ac_cv_prog_cc_g+set}" = set; then
1652   echo $ECHO_N "(cached) $ECHO_C" >&6
1653 else
1654   cat >conftest.$ac_ext <<_ACEOF
1655 #line 1661 "configure"
1656 #include "confdefs.h"
1657
1658 int
1659 main ()
1660 {
1661
1662   ;
1663   return 0;
1664 }
1665 _ACEOF
1666 rm -f conftest.$ac_objext
1667 if { (eval echo "$as_me:1673: \"$ac_compile\"") >&5
1668   (eval $ac_compile) 2>&5
1669   ac_status=$?
1670   echo "$as_me:1676: \$? = $ac_status" >&5
1671   (exit $ac_status); } &&
1672          { ac_try='test -s conftest.$ac_objext'
1673   { (eval echo "$as_me:1679: \"$ac_try\"") >&5
1674   (eval $ac_try) 2>&5
1675   ac_status=$?
1676   echo "$as_me:1682: \$? = $ac_status" >&5
1677   (exit $ac_status); }; }; then
1678   ac_cv_prog_cc_g=yes
1679 else
1680   echo "$as_me: failed program was:" >&5
1681 cat conftest.$ac_ext >&5
1682 ac_cv_prog_cc_g=no
1683 fi
1684 rm -f conftest.$ac_objext conftest.$ac_ext
1685 fi
1686 echo "$as_me:1692: result: $ac_cv_prog_cc_g" >&5
1687 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1688 if test "$ac_test_CFLAGS" = set; then
1689   CFLAGS=$ac_save_CFLAGS
1690 elif test $ac_cv_prog_cc_g = yes; then
1691   if test "$GCC" = yes; then
1692     CFLAGS="-g -O2"
1693   else
1694     CFLAGS="-g"
1695   fi
1696 else
1697   if test "$GCC" = yes; then
1698     CFLAGS="-O2"
1699   else
1700     CFLAGS=
1701   fi
1702 fi
1703 # Some people use a C++ compiler to compile C.  Since we use `exit',
1704 # in C++ we need to declare it.  In case someone uses the same compiler
1705 # for both compiling C and C++ we need to have the C++ compiler decide
1706 # the declaration of exit, since it's the most demanding environment.
1707 cat >conftest.$ac_ext <<_ACEOF
1708 #ifndef __cplusplus
1709   choke me
1710 #endif
1711 _ACEOF
1712 rm -f conftest.$ac_objext
1713 if { (eval echo "$as_me:1719: \"$ac_compile\"") >&5
1714   (eval $ac_compile) 2>&5
1715   ac_status=$?
1716   echo "$as_me:1722: \$? = $ac_status" >&5
1717   (exit $ac_status); } &&
1718          { ac_try='test -s conftest.$ac_objext'
1719   { (eval echo "$as_me:1725: \"$ac_try\"") >&5
1720   (eval $ac_try) 2>&5
1721   ac_status=$?
1722   echo "$as_me:1728: \$? = $ac_status" >&5
1723   (exit $ac_status); }; }; then
1724   for ac_declaration in \
1725    ''\
1726    '#include <stdlib.h>' \
1727    'extern "C" void std::exit (int) throw (); using std::exit;' \
1728    'extern "C" void std::exit (int); using std::exit;' \
1729    'extern "C" void exit (int) throw ();' \
1730    'extern "C" void exit (int);' \
1731    'void exit (int);'
1732 do
1733   cat >conftest.$ac_ext <<_ACEOF
1734 #line 1740 "configure"
1735 #include "confdefs.h"
1736 #include <stdlib.h>
1737 $ac_declaration
1738 int
1739 main ()
1740 {
1741 exit (42);
1742   ;
1743   return 0;
1744 }
1745 _ACEOF
1746 rm -f conftest.$ac_objext
1747 if { (eval echo "$as_me:1753: \"$ac_compile\"") >&5
1748   (eval $ac_compile) 2>&5
1749   ac_status=$?
1750   echo "$as_me:1756: \$? = $ac_status" >&5
1751   (exit $ac_status); } &&
1752          { ac_try='test -s conftest.$ac_objext'
1753   { (eval echo "$as_me:1759: \"$ac_try\"") >&5
1754   (eval $ac_try) 2>&5
1755   ac_status=$?
1756   echo "$as_me:1762: \$? = $ac_status" >&5
1757   (exit $ac_status); }; }; then
1758   :
1759 else
1760   echo "$as_me: failed program was:" >&5
1761 cat conftest.$ac_ext >&5
1762 continue
1763 fi
1764 rm -f conftest.$ac_objext conftest.$ac_ext
1765   cat >conftest.$ac_ext <<_ACEOF
1766 #line 1772 "configure"
1767 #include "confdefs.h"
1768 $ac_declaration
1769 int
1770 main ()
1771 {
1772 exit (42);
1773   ;
1774   return 0;
1775 }
1776 _ACEOF
1777 rm -f conftest.$ac_objext
1778 if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5
1779   (eval $ac_compile) 2>&5
1780   ac_status=$?
1781   echo "$as_me:1787: \$? = $ac_status" >&5
1782   (exit $ac_status); } &&
1783          { ac_try='test -s conftest.$ac_objext'
1784   { (eval echo "$as_me:1790: \"$ac_try\"") >&5
1785   (eval $ac_try) 2>&5
1786   ac_status=$?
1787   echo "$as_me:1793: \$? = $ac_status" >&5
1788   (exit $ac_status); }; }; then
1789   break
1790 else
1791   echo "$as_me: failed program was:" >&5
1792 cat conftest.$ac_ext >&5
1793 fi
1794 rm -f conftest.$ac_objext conftest.$ac_ext
1795 done
1796 rm -f conftest*
1797 if test -n "$ac_declaration"; then
1798   echo '#ifdef __cplusplus' >>confdefs.h
1799   echo $ac_declaration      >>confdefs.h
1800   echo '#endif'             >>confdefs.h
1801 fi
1802
1803 else
1804   echo "$as_me: failed program was:" >&5
1805 cat conftest.$ac_ext >&5
1806 fi
1807 rm -f conftest.$ac_objext conftest.$ac_ext
1808 ac_ext=c
1809 ac_cpp='$CPP $CPPFLAGS'
1810 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1811 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1812 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1813
1814 ac_ext=c
1815 ac_cpp='$CPP $CPPFLAGS'
1816 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1817 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1818 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1819 echo "$as_me:1825: checking how to run the C preprocessor" >&5
1820 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1821 # On Suns, sometimes $CPP names a directory.
1822 if test -n "$CPP" && test -d "$CPP"; then
1823   CPP=
1824 fi
1825 if test -z "$CPP"; then
1826   if test "${ac_cv_prog_CPP+set}" = set; then
1827   echo $ECHO_N "(cached) $ECHO_C" >&6
1828 else
1829       # Double quotes because CPP needs to be expanded
1830     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1831     do
1832       ac_preproc_ok=false
1833 for ac_c_preproc_warn_flag in '' yes
1834 do
1835   # Use a header file that comes with gcc, so configuring glibc
1836   # with a fresh cross-compiler works.
1837   # On the NeXT, cc -E runs the code through the compiler's parser,
1838   # not just through cpp. "Syntax error" is here to catch this case.
1839   cat >conftest.$ac_ext <<_ACEOF
1840 #line 1846 "configure"
1841 #include "confdefs.h"
1842 #include <assert.h>
1843                      Syntax error
1844 _ACEOF
1845 if { (eval echo "$as_me:1851: \"$ac_cpp conftest.$ac_ext\"") >&5
1846   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1847   ac_status=$?
1848   egrep -v '^ *\+' conftest.er1 >conftest.err
1849   rm -f conftest.er1
1850   cat conftest.err >&5
1851   echo "$as_me:1857: \$? = $ac_status" >&5
1852   (exit $ac_status); } >/dev/null; then
1853   if test -s conftest.err; then
1854     ac_cpp_err=$ac_c_preproc_warn_flag
1855   else
1856     ac_cpp_err=
1857   fi
1858 else
1859   ac_cpp_err=yes
1860 fi
1861 if test -z "$ac_cpp_err"; then
1862   :
1863 else
1864   echo "$as_me: failed program was:" >&5
1865   cat conftest.$ac_ext >&5
1866   # Broken: fails on valid input.
1867 continue
1868 fi
1869 rm -f conftest.err conftest.$ac_ext
1870
1871   # OK, works on sane cases.  Now check whether non-existent headers
1872   # can be detected and how.
1873   cat >conftest.$ac_ext <<_ACEOF
1874 #line 1880 "configure"
1875 #include "confdefs.h"
1876 #include <ac_nonexistent.h>
1877 _ACEOF
1878 if { (eval echo "$as_me:1884: \"$ac_cpp conftest.$ac_ext\"") >&5
1879   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1880   ac_status=$?
1881   egrep -v '^ *\+' conftest.er1 >conftest.err
1882   rm -f conftest.er1
1883   cat conftest.err >&5
1884   echo "$as_me:1890: \$? = $ac_status" >&5
1885   (exit $ac_status); } >/dev/null; then
1886   if test -s conftest.err; then
1887     ac_cpp_err=$ac_c_preproc_warn_flag
1888   else
1889     ac_cpp_err=
1890   fi
1891 else
1892   ac_cpp_err=yes
1893 fi
1894 if test -z "$ac_cpp_err"; then
1895   # Broken: success on invalid input.
1896 continue
1897 else
1898   echo "$as_me: failed program was:" >&5
1899   cat conftest.$ac_ext >&5
1900   # Passes both tests.
1901 ac_preproc_ok=:
1902 break
1903 fi
1904 rm -f conftest.err conftest.$ac_ext
1905
1906 done
1907 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1908 rm -f conftest.err conftest.$ac_ext
1909 if $ac_preproc_ok; then
1910   break
1911 fi
1912
1913     done
1914     ac_cv_prog_CPP=$CPP
1915
1916 fi
1917   CPP=$ac_cv_prog_CPP
1918 else
1919   ac_cv_prog_CPP=$CPP
1920 fi
1921 echo "$as_me:1927: result: $CPP" >&5
1922 echo "${ECHO_T}$CPP" >&6
1923 ac_preproc_ok=false
1924 for ac_c_preproc_warn_flag in '' yes
1925 do
1926   # Use a header file that comes with gcc, so configuring glibc
1927   # with a fresh cross-compiler works.
1928   # On the NeXT, cc -E runs the code through the compiler's parser,
1929   # not just through cpp. "Syntax error" is here to catch this case.
1930   cat >conftest.$ac_ext <<_ACEOF
1931 #line 1937 "configure"
1932 #include "confdefs.h"
1933 #include <assert.h>
1934                      Syntax error
1935 _ACEOF
1936 if { (eval echo "$as_me:1942: \"$ac_cpp conftest.$ac_ext\"") >&5
1937   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1938   ac_status=$?
1939   egrep -v '^ *\+' conftest.er1 >conftest.err
1940   rm -f conftest.er1
1941   cat conftest.err >&5
1942   echo "$as_me:1948: \$? = $ac_status" >&5
1943   (exit $ac_status); } >/dev/null; then
1944   if test -s conftest.err; then
1945     ac_cpp_err=$ac_c_preproc_warn_flag
1946   else
1947     ac_cpp_err=
1948   fi
1949 else
1950   ac_cpp_err=yes
1951 fi
1952 if test -z "$ac_cpp_err"; then
1953   :
1954 else
1955   echo "$as_me: failed program was:" >&5
1956   cat conftest.$ac_ext >&5
1957   # Broken: fails on valid input.
1958 continue
1959 fi
1960 rm -f conftest.err conftest.$ac_ext
1961
1962   # OK, works on sane cases.  Now check whether non-existent headers
1963   # can be detected and how.
1964   cat >conftest.$ac_ext <<_ACEOF
1965 #line 1971 "configure"
1966 #include "confdefs.h"
1967 #include <ac_nonexistent.h>
1968 _ACEOF
1969 if { (eval echo "$as_me:1975: \"$ac_cpp conftest.$ac_ext\"") >&5
1970   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1971   ac_status=$?
1972   egrep -v '^ *\+' conftest.er1 >conftest.err
1973   rm -f conftest.er1
1974   cat conftest.err >&5
1975   echo "$as_me:1981: \$? = $ac_status" >&5
1976   (exit $ac_status); } >/dev/null; then
1977   if test -s conftest.err; then
1978     ac_cpp_err=$ac_c_preproc_warn_flag
1979   else
1980     ac_cpp_err=
1981   fi
1982 else
1983   ac_cpp_err=yes
1984 fi
1985 if test -z "$ac_cpp_err"; then
1986   # Broken: success on invalid input.
1987 continue
1988 else
1989   echo "$as_me: failed program was:" >&5
1990   cat conftest.$ac_ext >&5
1991   # Passes both tests.
1992 ac_preproc_ok=:
1993 break
1994 fi
1995 rm -f conftest.err conftest.$ac_ext
1996
1997 done
1998 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1999 rm -f conftest.err conftest.$ac_ext
2000 if $ac_preproc_ok; then
2001   :
2002 else
2003   { { echo "$as_me:2009: error: C preprocessor \"$CPP\" fails sanity check" >&5
2004 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2005    { (exit 1); exit 1; }; }
2006 fi
2007
2008 ac_ext=c
2009 ac_cpp='$CPP $CPPFLAGS'
2010 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2011 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2012 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2013
2014 echo "$as_me:2020: checking for minix/config.h" >&5
2015 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2016 if test "${ac_cv_header_minix_config_h+set}" = set; then
2017   echo $ECHO_N "(cached) $ECHO_C" >&6
2018 else
2019   cat >conftest.$ac_ext <<_ACEOF
2020 #line 2026 "configure"
2021 #include "confdefs.h"
2022 #include <minix/config.h>
2023 _ACEOF
2024 if { (eval echo "$as_me:2030: \"$ac_cpp conftest.$ac_ext\"") >&5
2025   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2026   ac_status=$?
2027   egrep -v '^ *\+' conftest.er1 >conftest.err
2028   rm -f conftest.er1
2029   cat conftest.err >&5
2030   echo "$as_me:2036: \$? = $ac_status" >&5
2031   (exit $ac_status); } >/dev/null; then
2032   if test -s conftest.err; then
2033     ac_cpp_err=$ac_c_preproc_warn_flag
2034   else
2035     ac_cpp_err=
2036   fi
2037 else
2038   ac_cpp_err=yes
2039 fi
2040 if test -z "$ac_cpp_err"; then
2041   ac_cv_header_minix_config_h=yes
2042 else
2043   echo "$as_me: failed program was:" >&5
2044   cat conftest.$ac_ext >&5
2045   ac_cv_header_minix_config_h=no
2046 fi
2047 rm -f conftest.err conftest.$ac_ext
2048 fi
2049 echo "$as_me:2055: result: $ac_cv_header_minix_config_h" >&5
2050 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2051 if test $ac_cv_header_minix_config_h = yes; then
2052   MINIX=yes
2053 else
2054   MINIX=
2055 fi
2056
2057 if test "$MINIX" = yes; then
2058
2059 cat >>confdefs.h <<\EOF
2060 #define _POSIX_SOURCE 1
2061 EOF
2062
2063 cat >>confdefs.h <<\EOF
2064 #define _POSIX_1_SOURCE 2
2065 EOF
2066
2067 cat >>confdefs.h <<\EOF
2068 #define _MINIX 1
2069 EOF
2070
2071 fi
2072
2073 if test "x$cross_compiling" = "xyes"; then
2074     case "${host}" in
2075     *-cygwin*)
2076         cross_cache=${srcdir}/cross-build/cygwin.cache
2077         if test -r "${cross_cache}"; then
2078             echo "loading cross-build cache file ${cross_cache}"
2079             . ${cross_cache}
2080         fi
2081         LOCAL_CFLAGS="$LOCAL_CFLAGS -I${srcdir}/../libtermcap"
2082         unset cross_cache
2083         ;;
2084     *)  echo "configure: cross-compiling for a non-cygwin target is not supported" >&2
2085         ;;
2086     esac
2087 fi
2088
2089 if test "x$cross_compiling" = "xyes"; then
2090   CROSS_COMPILING_FLAG=-DCROSS_COMPILING
2091 else
2092   CROSS_COMPILING_FLAG=
2093 fi
2094
2095 if test -z "$CC_FOR_BUILD"; then
2096     if test "x$cross_compiling" = "xno"; then
2097         CC_FOR_BUILD='$(CC)'
2098     else
2099         CC_FOR_BUILD=gcc
2100     fi
2101 fi
2102
2103 # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
2104 test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
2105
2106 if test $ac_cv_c_compiler_gnu = yes; then
2107     echo "$as_me:2113: checking whether $CC needs -traditional" >&5
2108 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2109 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2110   echo $ECHO_N "(cached) $ECHO_C" >&6
2111 else
2112     ac_pattern="Autoconf.*'x'"
2113   cat >conftest.$ac_ext <<_ACEOF
2114 #line 2120 "configure"
2115 #include "confdefs.h"
2116 #include <sgtty.h>
2117 Autoconf TIOCGETP
2118 _ACEOF
2119 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2120   egrep "$ac_pattern" >/dev/null 2>&1; then
2121   ac_cv_prog_gcc_traditional=yes
2122 else
2123   ac_cv_prog_gcc_traditional=no
2124 fi
2125 rm -f conftest*
2126
2127   if test $ac_cv_prog_gcc_traditional = no; then
2128     cat >conftest.$ac_ext <<_ACEOF
2129 #line 2135 "configure"
2130 #include "confdefs.h"
2131 #include <termio.h>
2132 Autoconf TCGETA
2133 _ACEOF
2134 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2135   egrep "$ac_pattern" >/dev/null 2>&1; then
2136   ac_cv_prog_gcc_traditional=yes
2137 fi
2138 rm -f conftest*
2139
2140   fi
2141 fi
2142 echo "$as_me:2148: result: $ac_cv_prog_gcc_traditional" >&5
2143 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2144   if test $ac_cv_prog_gcc_traditional = yes; then
2145     CC="$CC -traditional"
2146   fi
2147 fi
2148
2149 # Find a good install program.  We prefer a C program (faster),
2150 # so one script is as good as another.  But avoid the broken or
2151 # incompatible versions:
2152 # SysV /etc/install, /usr/sbin/install
2153 # SunOS /usr/etc/install
2154 # IRIX /sbin/install
2155 # AIX /bin/install
2156 # AmigaOS /C/install, which installs bootblocks on floppy discs
2157 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2158 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2159 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2160 # ./install, which can be erroneously created by make from ./install.sh.
2161 echo "$as_me:2167: checking for a BSD compatible install" >&5
2162 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2163 if test -z "$INSTALL"; then
2164 if test "${ac_cv_path_install+set}" = set; then
2165   echo $ECHO_N "(cached) $ECHO_C" >&6
2166 else
2167     ac_save_IFS=$IFS; IFS=$ac_path_separator
2168   for ac_dir in $PATH; do
2169     IFS=$ac_save_IFS
2170     # Account for people who put trailing slashes in PATH elements.
2171     case $ac_dir/ in
2172     / | ./ | .// | /cC/* \
2173     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2174     | /usr/ucb/* ) ;;
2175     *)
2176       # OSF1 and SCO ODT 3.0 have their own names for install.
2177       # Don't use installbsd from OSF since it installs stuff as root
2178       # by default.
2179       for ac_prog in ginstall scoinst install; do
2180         if $as_executable_p "$ac_dir/$ac_prog"; then
2181           if test $ac_prog = install &&
2182             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2183             # AIX install.  It has an incompatible calling convention.
2184             :
2185           elif test $ac_prog = install &&
2186             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2187             # program-specific install script used by HP pwplus--don't use.
2188             :
2189           else
2190             ac_cv_path_install="$ac_dir/$ac_prog -c"
2191             break 2
2192           fi
2193         fi
2194       done
2195       ;;
2196     esac
2197   done
2198
2199 fi
2200   if test "${ac_cv_path_install+set}" = set; then
2201     INSTALL=$ac_cv_path_install
2202   else
2203     # As a last resort, use the slow shell script.  We don't cache a
2204     # path for INSTALL within a source directory, because that will
2205     # break other packages using the cache if that directory is
2206     # removed, or if the path is relative.
2207     INSTALL=$ac_install_sh
2208   fi
2209 fi
2210 echo "$as_me:2216: result: $INSTALL" >&5
2211 echo "${ECHO_T}$INSTALL" >&6
2212
2213 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2214 # It thinks the first close brace ends the variable substitution.
2215 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2216
2217 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2218
2219 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2220
2221 # Extract the first word of "ar", so it can be a program name with args.
2222 set dummy ar; ac_word=$2
2223 echo "$as_me:2229: checking for $ac_word" >&5
2224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2225 if test "${ac_cv_prog_AR+set}" = set; then
2226   echo $ECHO_N "(cached) $ECHO_C" >&6
2227 else
2228   if test -n "$AR"; then
2229   ac_cv_prog_AR="$AR" # Let the user override the test.
2230 else
2231   ac_save_IFS=$IFS; IFS=$ac_path_separator
2232 ac_dummy="$PATH"
2233 for ac_dir in $ac_dummy; do
2234   IFS=$ac_save_IFS
2235   test -z "$ac_dir" && ac_dir=.
2236   $as_executable_p "$ac_dir/$ac_word" || continue
2237 ac_cv_prog_AR=""
2238 echo "$as_me:2244: found $ac_dir/$ac_word" >&5
2239 break
2240 done
2241
2242   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
2243 fi
2244 fi
2245 AR=$ac_cv_prog_AR
2246 if test -n "$AR"; then
2247   echo "$as_me:2253: result: $AR" >&5
2248 echo "${ECHO_T}$AR" >&6
2249 else
2250   echo "$as_me:2256: result: no" >&5
2251 echo "${ECHO_T}no" >&6
2252 fi
2253
2254 test -n "$ARFLAGS" || ARFLAGS="cr"
2255 if test -n "$ac_tool_prefix"; then
2256   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2257 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2258 echo "$as_me:2264: checking for $ac_word" >&5
2259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2260 if test "${ac_cv_prog_RANLIB+set}" = set; then
2261   echo $ECHO_N "(cached) $ECHO_C" >&6
2262 else
2263   if test -n "$RANLIB"; then
2264   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2265 else
2266   ac_save_IFS=$IFS; IFS=$ac_path_separator
2267 ac_dummy="$PATH"
2268 for ac_dir in $ac_dummy; do
2269   IFS=$ac_save_IFS
2270   test -z "$ac_dir" && ac_dir=.
2271   $as_executable_p "$ac_dir/$ac_word" || continue
2272 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2273 echo "$as_me:2279: found $ac_dir/$ac_word" >&5
2274 break
2275 done
2276
2277 fi
2278 fi
2279 RANLIB=$ac_cv_prog_RANLIB
2280 if test -n "$RANLIB"; then
2281   echo "$as_me:2287: result: $RANLIB" >&5
2282 echo "${ECHO_T}$RANLIB" >&6
2283 else
2284   echo "$as_me:2290: result: no" >&5
2285 echo "${ECHO_T}no" >&6
2286 fi
2287
2288 fi
2289 if test -z "$ac_cv_prog_RANLIB"; then
2290   ac_ct_RANLIB=$RANLIB
2291   # Extract the first word of "ranlib", so it can be a program name with args.
2292 set dummy ranlib; ac_word=$2
2293 echo "$as_me:2299: checking for $ac_word" >&5
2294 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2295 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2296   echo $ECHO_N "(cached) $ECHO_C" >&6
2297 else
2298   if test -n "$ac_ct_RANLIB"; then
2299   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2300 else
2301   ac_save_IFS=$IFS; IFS=$ac_path_separator
2302 ac_dummy="$PATH"
2303 for ac_dir in $ac_dummy; do
2304   IFS=$ac_save_IFS
2305   test -z "$ac_dir" && ac_dir=.
2306   $as_executable_p "$ac_dir/$ac_word" || continue
2307 ac_cv_prog_ac_ct_RANLIB="ranlib"
2308 echo "$as_me:2314: found $ac_dir/$ac_word" >&5
2309 break
2310 done
2311
2312   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2313 fi
2314 fi
2315 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2316 if test -n "$ac_ct_RANLIB"; then
2317   echo "$as_me:2323: result: $ac_ct_RANLIB" >&5
2318 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2319 else
2320   echo "$as_me:2326: result: no" >&5
2321 echo "${ECHO_T}no" >&6
2322 fi
2323
2324   RANLIB=$ac_ct_RANLIB
2325 else
2326   RANLIB="$ac_cv_prog_RANLIB"
2327 fi
2328
2329 MAKE_SHELL=/bin/sh
2330
2331 echo "$as_me:2337: checking for $CC option to accept ANSI C" >&5
2332 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2333 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2334   echo $ECHO_N "(cached) $ECHO_C" >&6
2335 else
2336   ac_cv_prog_cc_stdc=no
2337 ac_save_CC=$CC
2338 cat >conftest.$ac_ext <<_ACEOF
2339 #line 2345 "configure"
2340 #include "confdefs.h"
2341 #include <stdarg.h>
2342 #include <stdio.h>
2343 #include <sys/types.h>
2344 #include <sys/stat.h>
2345 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2346 struct buf { int x; };
2347 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2348 static char *e (p, i)
2349      char **p;
2350      int i;
2351 {
2352   return p[i];
2353 }
2354 static char *f (char * (*g) (char **, int), char **p, ...)
2355 {
2356   char *s;
2357   va_list v;
2358   va_start (v,p);
2359   s = g (p, va_arg (v,int));
2360   va_end (v);
2361   return s;
2362 }
2363 int test (int i, double x);
2364 struct s1 {int (*f) (int a);};
2365 struct s2 {int (*f) (double a);};
2366 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2367 int argc;
2368 char **argv;
2369 int
2370 main ()
2371 {
2372 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2373   ;
2374   return 0;
2375 }
2376 _ACEOF
2377 # Don't try gcc -ansi; that turns off useful extensions and
2378 # breaks some systems' header files.
2379 # AIX                   -qlanglvl=ansi
2380 # Ultrix and OSF/1      -std1
2381 # HP-UX 10.20 and later -Ae
2382 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2383 # SVR4                  -Xc -D__EXTENSIONS__
2384 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2385 do
2386   CC="$ac_save_CC $ac_arg"
2387   rm -f conftest.$ac_objext
2388 if { (eval echo "$as_me:2394: \"$ac_compile\"") >&5
2389   (eval $ac_compile) 2>&5
2390   ac_status=$?
2391   echo "$as_me:2397: \$? = $ac_status" >&5
2392   (exit $ac_status); } &&
2393          { ac_try='test -s conftest.$ac_objext'
2394   { (eval echo "$as_me:2400: \"$ac_try\"") >&5
2395   (eval $ac_try) 2>&5
2396   ac_status=$?
2397   echo "$as_me:2403: \$? = $ac_status" >&5
2398   (exit $ac_status); }; }; then
2399   ac_cv_prog_cc_stdc=$ac_arg
2400 break
2401 else
2402   echo "$as_me: failed program was:" >&5
2403 cat conftest.$ac_ext >&5
2404 fi
2405 rm -f conftest.$ac_objext
2406 done
2407 rm -f conftest.$ac_ext conftest.$ac_objext
2408 CC=$ac_save_CC
2409
2410 fi
2411
2412 case "x$ac_cv_prog_cc_stdc" in
2413   x|xno)
2414     echo "$as_me:2420: result: none needed" >&5
2415 echo "${ECHO_T}none needed" >&6 ;;
2416   *)
2417     echo "$as_me:2423: result: $ac_cv_prog_cc_stdc" >&5
2418 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2419     CC="$CC $ac_cv_prog_cc_stdc" ;;
2420 esac
2421
2422 echo "$as_me:2428: checking for an ANSI C-conforming const" >&5
2423 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2424 if test "${ac_cv_c_const+set}" = set; then
2425   echo $ECHO_N "(cached) $ECHO_C" >&6
2426 else
2427   cat >conftest.$ac_ext <<_ACEOF
2428 #line 2434 "configure"
2429 #include "confdefs.h"
2430
2431 int
2432 main ()
2433 {
2434 /* FIXME: Include the comments suggested by Paul. */
2435 #ifndef __cplusplus
2436   /* Ultrix mips cc rejects this.  */
2437   typedef int charset[2];
2438   const charset x;
2439   /* SunOS 4.1.1 cc rejects this.  */
2440   char const *const *ccp;
2441   char **p;
2442   /* NEC SVR4.0.2 mips cc rejects this.  */
2443   struct point {int x, y;};
2444   static struct point const zero = {0,0};
2445   /* AIX XL C 1.02.0.0 rejects this.
2446      It does not let you subtract one const X* pointer from another in
2447      an arm of an if-expression whose if-part is not a constant
2448      expression */
2449   const char *g = "string";
2450   ccp = &g + (g ? g-g : 0);
2451   /* HPUX 7.0 cc rejects these. */
2452   ++ccp;
2453   p = (char**) ccp;
2454   ccp = (char const *const *) p;
2455   { /* SCO 3.2v4 cc rejects this.  */
2456     char *t;
2457     char const *s = 0 ? (char *) 0 : (char const *) 0;
2458
2459     *t++ = 0;
2460   }
2461   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2462     int x[] = {25, 17};
2463     const int *foo = &x[0];
2464     ++foo;
2465   }
2466   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2467     typedef const int *iptr;
2468     iptr p = 0;
2469     ++p;
2470   }
2471   { /* AIX XL C 1.02.0.0 rejects this saying
2472        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2473     struct s { int j; const int *ap[3]; };
2474     struct s *b; b->j = 5;
2475   }
2476   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2477     const int foo = 10;
2478   }
2479 #endif
2480
2481   ;
2482   return 0;
2483 }
2484 _ACEOF
2485 rm -f conftest.$ac_objext
2486 if { (eval echo "$as_me:2492: \"$ac_compile\"") >&5
2487   (eval $ac_compile) 2>&5
2488   ac_status=$?
2489   echo "$as_me:2495: \$? = $ac_status" >&5
2490   (exit $ac_status); } &&
2491          { ac_try='test -s conftest.$ac_objext'
2492   { (eval echo "$as_me:2498: \"$ac_try\"") >&5
2493   (eval $ac_try) 2>&5
2494   ac_status=$?
2495   echo "$as_me:2501: \$? = $ac_status" >&5
2496   (exit $ac_status); }; }; then
2497   ac_cv_c_const=yes
2498 else
2499   echo "$as_me: failed program was:" >&5
2500 cat conftest.$ac_ext >&5
2501 ac_cv_c_const=no
2502 fi
2503 rm -f conftest.$ac_objext conftest.$ac_ext
2504 fi
2505 echo "$as_me:2511: result: $ac_cv_c_const" >&5
2506 echo "${ECHO_T}$ac_cv_c_const" >&6
2507 if test $ac_cv_c_const = no; then
2508
2509 cat >>confdefs.h <<\EOF
2510 #define const
2511 EOF
2512
2513 fi
2514
2515 echo "$as_me:2521: checking for function prototypes" >&5
2516 echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
2517 if test "$ac_cv_prog_cc_stdc" != no; then
2518   echo "$as_me:2524: result: yes" >&5
2519 echo "${ECHO_T}yes" >&6
2520
2521 cat >>confdefs.h <<\EOF
2522 #define PROTOTYPES 1
2523 EOF
2524
2525 else
2526   echo "$as_me:2532: result: no" >&5
2527 echo "${ECHO_T}no" >&6
2528 fi
2529
2530 echo "$as_me:2536: checking for ANSI C header files" >&5
2531 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2532 if test "${ac_cv_header_stdc+set}" = set; then
2533   echo $ECHO_N "(cached) $ECHO_C" >&6
2534 else
2535   cat >conftest.$ac_ext <<_ACEOF
2536 #line 2542 "configure"
2537 #include "confdefs.h"
2538 #include <stdlib.h>
2539 #include <stdarg.h>
2540 #include <string.h>
2541 #include <float.h>
2542
2543 _ACEOF
2544 if { (eval echo "$as_me:2550: \"$ac_cpp conftest.$ac_ext\"") >&5
2545   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2546   ac_status=$?
2547   egrep -v '^ *\+' conftest.er1 >conftest.err
2548   rm -f conftest.er1
2549   cat conftest.err >&5
2550   echo "$as_me:2556: \$? = $ac_status" >&5
2551   (exit $ac_status); } >/dev/null; then
2552   if test -s conftest.err; then
2553     ac_cpp_err=$ac_c_preproc_warn_flag
2554   else
2555     ac_cpp_err=
2556   fi
2557 else
2558   ac_cpp_err=yes
2559 fi
2560 if test -z "$ac_cpp_err"; then
2561   ac_cv_header_stdc=yes
2562 else
2563   echo "$as_me: failed program was:" >&5
2564   cat conftest.$ac_ext >&5
2565   ac_cv_header_stdc=no
2566 fi
2567 rm -f conftest.err conftest.$ac_ext
2568
2569 if test $ac_cv_header_stdc = yes; then
2570   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2571   cat >conftest.$ac_ext <<_ACEOF
2572 #line 2578 "configure"
2573 #include "confdefs.h"
2574 #include <string.h>
2575
2576 _ACEOF
2577 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2578   egrep "memchr" >/dev/null 2>&1; then
2579   :
2580 else
2581   ac_cv_header_stdc=no
2582 fi
2583 rm -f conftest*
2584
2585 fi
2586
2587 if test $ac_cv_header_stdc = yes; then
2588   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2589   cat >conftest.$ac_ext <<_ACEOF
2590 #line 2596 "configure"
2591 #include "confdefs.h"
2592 #include <stdlib.h>
2593
2594 _ACEOF
2595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2596   egrep "free" >/dev/null 2>&1; then
2597   :
2598 else
2599   ac_cv_header_stdc=no
2600 fi
2601 rm -f conftest*
2602
2603 fi
2604
2605 if test $ac_cv_header_stdc = yes; then
2606   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2607   if test "$cross_compiling" = yes; then
2608   :
2609 else
2610   cat >conftest.$ac_ext <<_ACEOF
2611 #line 2617 "configure"
2612 #include "confdefs.h"
2613 #include <ctype.h>
2614 #if ((' ' & 0x0FF) == 0x020)
2615 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2616 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2617 #else
2618 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2619                      || ('j' <= (c) && (c) <= 'r') \
2620                      || ('s' <= (c) && (c) <= 'z'))
2621 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2622 #endif
2623
2624 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2625 int
2626 main ()
2627 {
2628   int i;
2629   for (i = 0; i < 256; i++)
2630     if (XOR (islower (i), ISLOWER (i))
2631         || toupper (i) != TOUPPER (i))
2632       exit(2);
2633   exit (0);
2634 }
2635 _ACEOF
2636 rm -f conftest$ac_exeext
2637 if { (eval echo "$as_me:2643: \"$ac_link\"") >&5
2638   (eval $ac_link) 2>&5
2639   ac_status=$?
2640   echo "$as_me:2646: \$? = $ac_status" >&5
2641   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2642   { (eval echo "$as_me:2648: \"$ac_try\"") >&5
2643   (eval $ac_try) 2>&5
2644   ac_status=$?
2645   echo "$as_me:2651: \$? = $ac_status" >&5
2646   (exit $ac_status); }; }; then
2647   :
2648 else
2649   echo "$as_me: program exited with status $ac_status" >&5
2650 echo "$as_me: failed program was:" >&5
2651 cat conftest.$ac_ext >&5
2652 ac_cv_header_stdc=no
2653 fi
2654 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2655 fi
2656 fi
2657 fi
2658 echo "$as_me:2664: result: $ac_cv_header_stdc" >&5
2659 echo "${ECHO_T}$ac_cv_header_stdc" >&6
2660 if test $ac_cv_header_stdc = yes; then
2661
2662 cat >>confdefs.h <<\EOF
2663 #define STDC_HEADERS 1
2664 EOF
2665
2666 fi
2667
2668 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
2669
2670 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2671                   inttypes.h stdint.h unistd.h
2672 do
2673 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2674 echo "$as_me:2680: checking for $ac_header" >&5
2675 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2676 if eval "test \"\${$as_ac_Header+set}\" = set"; then
2677   echo $ECHO_N "(cached) $ECHO_C" >&6
2678 else
2679   cat >conftest.$ac_ext <<_ACEOF
2680 #line 2686 "configure"
2681 #include "confdefs.h"
2682 $ac_includes_default
2683 #include <$ac_header>
2684 _ACEOF
2685 rm -f conftest.$ac_objext
2686 if { (eval echo "$as_me:2692: \"$ac_compile\"") >&5
2687   (eval $ac_compile) 2>&5
2688   ac_status=$?
2689   echo "$as_me:2695: \$? = $ac_status" >&5
2690   (exit $ac_status); } &&
2691          { ac_try='test -s conftest.$ac_objext'
2692   { (eval echo "$as_me:2698: \"$ac_try\"") >&5
2693   (eval $ac_try) 2>&5
2694   ac_status=$?
2695   echo "$as_me:2701: \$? = $ac_status" >&5
2696   (exit $ac_status); }; }; then
2697   eval "$as_ac_Header=yes"
2698 else
2699   echo "$as_me: failed program was:" >&5
2700 cat conftest.$ac_ext >&5
2701 eval "$as_ac_Header=no"
2702 fi
2703 rm -f conftest.$ac_objext conftest.$ac_ext
2704 fi
2705 echo "$as_me:2711: result: `eval echo '${'$as_ac_Header'}'`" >&5
2706 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2707 if test `eval echo '${'$as_ac_Header'}'` = yes; then
2708   cat >>confdefs.h <<EOF
2709 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2710 EOF
2711
2712 fi
2713 done
2714
2715 echo "$as_me:2721: checking whether char is unsigned" >&5
2716 echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
2717 if test "${ac_cv_c_char_unsigned+set}" = set; then
2718   echo $ECHO_N "(cached) $ECHO_C" >&6
2719 else
2720   cat >conftest.$ac_ext <<_ACEOF
2721 #line 2727 "configure"
2722 #include "confdefs.h"
2723 $ac_includes_default
2724 int
2725 main ()
2726 {
2727 int _array_ [1 - 2 * !(((char) -1) < 0)]
2728   ;
2729   return 0;
2730 }
2731 _ACEOF
2732 rm -f conftest.$ac_objext
2733 if { (eval echo "$as_me:2739: \"$ac_compile\"") >&5
2734   (eval $ac_compile) 2>&5
2735   ac_status=$?
2736   echo "$as_me:2742: \$? = $ac_status" >&5
2737   (exit $ac_status); } &&
2738          { ac_try='test -s conftest.$ac_objext'
2739   { (eval echo "$as_me:2745: \"$ac_try\"") >&5
2740   (eval $ac_try) 2>&5
2741   ac_status=$?
2742   echo "$as_me:2748: \$? = $ac_status" >&5
2743   (exit $ac_status); }; }; then
2744   ac_cv_c_char_unsigned=no
2745 else
2746   echo "$as_me: failed program was:" >&5
2747 cat conftest.$ac_ext >&5
2748 ac_cv_c_char_unsigned=yes
2749 fi
2750 rm -f conftest.$ac_objext conftest.$ac_ext
2751 fi
2752 echo "$as_me:2758: result: $ac_cv_c_char_unsigned" >&5
2753 echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
2754 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2755   cat >>confdefs.h <<\EOF
2756 #define __CHAR_UNSIGNED__ 1
2757 EOF
2758
2759 fi
2760
2761 echo "$as_me:2767: checking return type of signal handlers" >&5
2762 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
2763 if test "${ac_cv_type_signal+set}" = set; then
2764   echo $ECHO_N "(cached) $ECHO_C" >&6
2765 else
2766   cat >conftest.$ac_ext <<_ACEOF
2767 #line 2773 "configure"
2768 #include "confdefs.h"
2769 #include <sys/types.h>
2770 #include <signal.h>
2771 #ifdef signal
2772 # undef signal
2773 #endif
2774 #ifdef __cplusplus
2775 extern "C" void (*signal (int, void (*)(int)))(int);
2776 #else
2777 void (*signal ()) ();
2778 #endif
2779
2780 int
2781 main ()
2782 {
2783 int i;
2784   ;
2785   return 0;
2786 }
2787 _ACEOF
2788 rm -f conftest.$ac_objext
2789 if { (eval echo "$as_me:2795: \"$ac_compile\"") >&5
2790   (eval $ac_compile) 2>&5
2791   ac_status=$?
2792   echo "$as_me:2798: \$? = $ac_status" >&5
2793   (exit $ac_status); } &&
2794          { ac_try='test -s conftest.$ac_objext'
2795   { (eval echo "$as_me:2801: \"$ac_try\"") >&5
2796   (eval $ac_try) 2>&5
2797   ac_status=$?
2798   echo "$as_me:2804: \$? = $ac_status" >&5
2799   (exit $ac_status); }; }; then
2800   ac_cv_type_signal=void
2801 else
2802   echo "$as_me: failed program was:" >&5
2803 cat conftest.$ac_ext >&5
2804 ac_cv_type_signal=int
2805 fi
2806 rm -f conftest.$ac_objext conftest.$ac_ext
2807 fi
2808 echo "$as_me:2814: result: $ac_cv_type_signal" >&5
2809 echo "${ECHO_T}$ac_cv_type_signal" >&6
2810
2811 cat >>confdefs.h <<EOF
2812 #define RETSIGTYPE $ac_cv_type_signal
2813 EOF
2814
2815 echo "$as_me:2821: checking for size_t" >&5
2816 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
2817 if test "${ac_cv_type_size_t+set}" = set; then
2818   echo $ECHO_N "(cached) $ECHO_C" >&6
2819 else
2820   cat >conftest.$ac_ext <<_ACEOF
2821 #line 2827 "configure"
2822 #include "confdefs.h"
2823 $ac_includes_default
2824 int
2825 main ()
2826 {
2827 if ((size_t *) 0)
2828   return 0;
2829 if (sizeof (size_t))
2830   return 0;
2831   ;
2832   return 0;
2833 }
2834 _ACEOF
2835 rm -f conftest.$ac_objext
2836 if { (eval echo "$as_me:2842: \"$ac_compile\"") >&5
2837   (eval $ac_compile) 2>&5
2838   ac_status=$?
2839   echo "$as_me:2845: \$? = $ac_status" >&5
2840   (exit $ac_status); } &&
2841          { ac_try='test -s conftest.$ac_objext'
2842   { (eval echo "$as_me:2848: \"$ac_try\"") >&5
2843   (eval $ac_try) 2>&5
2844   ac_status=$?
2845   echo "$as_me:2851: \$? = $ac_status" >&5
2846   (exit $ac_status); }; }; then
2847   ac_cv_type_size_t=yes
2848 else
2849   echo "$as_me: failed program was:" >&5
2850 cat conftest.$ac_ext >&5
2851 ac_cv_type_size_t=no
2852 fi
2853 rm -f conftest.$ac_objext conftest.$ac_ext
2854 fi
2855 echo "$as_me:2861: result: $ac_cv_type_size_t" >&5
2856 echo "${ECHO_T}$ac_cv_type_size_t" >&6
2857 if test $ac_cv_type_size_t = yes; then
2858   :
2859 else
2860
2861 cat >>confdefs.h <<EOF
2862 #define size_t unsigned
2863 EOF
2864
2865 fi
2866
2867 echo "$as_me:2873: checking for ssize_t" >&5
2868 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
2869 if test "${ac_cv_type_ssize_t+set}" = set; then
2870   echo $ECHO_N "(cached) $ECHO_C" >&6
2871 else
2872   cat >conftest.$ac_ext <<_ACEOF
2873 #line 2879 "configure"
2874 #include "confdefs.h"
2875 $ac_includes_default
2876 int
2877 main ()
2878 {
2879 if ((ssize_t *) 0)
2880   return 0;
2881 if (sizeof (ssize_t))
2882   return 0;
2883   ;
2884   return 0;
2885 }
2886 _ACEOF
2887 rm -f conftest.$ac_objext
2888 if { (eval echo "$as_me:2894: \"$ac_compile\"") >&5
2889   (eval $ac_compile) 2>&5
2890   ac_status=$?
2891   echo "$as_me:2897: \$? = $ac_status" >&5
2892   (exit $ac_status); } &&
2893          { ac_try='test -s conftest.$ac_objext'
2894   { (eval echo "$as_me:2900: \"$ac_try\"") >&5
2895   (eval $ac_try) 2>&5
2896   ac_status=$?
2897   echo "$as_me:2903: \$? = $ac_status" >&5
2898   (exit $ac_status); }; }; then
2899   ac_cv_type_ssize_t=yes
2900 else
2901   echo "$as_me: failed program was:" >&5
2902 cat conftest.$ac_ext >&5
2903 ac_cv_type_ssize_t=no
2904 fi
2905 rm -f conftest.$ac_objext conftest.$ac_ext
2906 fi
2907 echo "$as_me:2913: result: $ac_cv_type_ssize_t" >&5
2908 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
2909 if test $ac_cv_type_ssize_t = yes; then
2910   :
2911 else
2912
2913 cat >>confdefs.h <<EOF
2914 #define ssize_t int
2915 EOF
2916
2917 fi
2918
2919 echo "$as_me:2925: checking whether stat file-mode macros are broken" >&5
2920 echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
2921 if test "${ac_cv_header_stat_broken+set}" = set; then
2922   echo $ECHO_N "(cached) $ECHO_C" >&6
2923 else
2924   cat >conftest.$ac_ext <<_ACEOF
2925 #line 2931 "configure"
2926 #include "confdefs.h"
2927 #include <sys/types.h>
2928 #include <sys/stat.h>
2929
2930 #if defined(S_ISBLK) && defined(S_IFDIR)
2931 # if S_ISBLK (S_IFDIR)
2932 You lose.
2933 # endif
2934 #endif
2935
2936 #if defined(S_ISBLK) && defined(S_IFCHR)
2937 # if S_ISBLK (S_IFCHR)
2938 You lose.
2939 # endif
2940 #endif
2941
2942 #if defined(S_ISLNK) && defined(S_IFREG)
2943 # if S_ISLNK (S_IFREG)
2944 You lose.
2945 # endif
2946 #endif
2947
2948 #if defined(S_ISSOCK) && defined(S_IFREG)
2949 # if S_ISSOCK (S_IFREG)
2950 You lose.
2951 # endif
2952 #endif
2953
2954 _ACEOF
2955 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2956   egrep "You lose" >/dev/null 2>&1; then
2957   ac_cv_header_stat_broken=yes
2958 else
2959   ac_cv_header_stat_broken=no
2960 fi
2961 rm -f conftest*
2962
2963 fi
2964 echo "$as_me:2970: result: $ac_cv_header_stat_broken" >&5
2965 echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
2966 if test $ac_cv_header_stat_broken = yes; then
2967
2968 cat >>confdefs.h <<\EOF
2969 #define STAT_MACROS_BROKEN 1
2970 EOF
2971
2972 fi
2973
2974 ac_header_dirent=no
2975 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
2976   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
2977 echo "$as_me:2983: checking for $ac_hdr that defines DIR" >&5
2978 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
2979 if eval "test \"\${$as_ac_Header+set}\" = set"; then
2980   echo $ECHO_N "(cached) $ECHO_C" >&6
2981 else
2982   cat >conftest.$ac_ext <<_ACEOF
2983 #line 2989 "configure"
2984 #include "confdefs.h"
2985 #include <sys/types.h>
2986 #include <$ac_hdr>
2987
2988 int
2989 main ()
2990 {
2991 if ((DIR *) 0)
2992 return 0;
2993   ;
2994   return 0;
2995 }
2996 _ACEOF
2997 rm -f conftest.$ac_objext
2998 if { (eval echo "$as_me:3004: \"$ac_compile\"") >&5
2999   (eval $ac_compile) 2>&5
3000   ac_status=$?
3001   echo "$as_me:3007: \$? = $ac_status" >&5
3002   (exit $ac_status); } &&
3003          { ac_try='test -s conftest.$ac_objext'
3004   { (eval echo "$as_me:3010: \"$ac_try\"") >&5
3005   (eval $ac_try) 2>&5
3006   ac_status=$?
3007   echo "$as_me:3013: \$? = $ac_status" >&5
3008   (exit $ac_status); }; }; then
3009   eval "$as_ac_Header=yes"
3010 else
3011   echo "$as_me: failed program was:" >&5
3012 cat conftest.$ac_ext >&5
3013 eval "$as_ac_Header=no"
3014 fi
3015 rm -f conftest.$ac_objext conftest.$ac_ext
3016 fi
3017 echo "$as_me:3023: result: `eval echo '${'$as_ac_Header'}'`" >&5
3018 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3019 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3020   cat >>confdefs.h <<EOF
3021 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
3022 EOF
3023
3024 ac_header_dirent=$ac_hdr; break
3025 fi
3026
3027 done
3028 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3029 if test $ac_header_dirent = dirent.h; then
3030   echo "$as_me:3036: checking for opendir in -ldir" >&5
3031 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
3032 if test "${ac_cv_lib_dir_opendir+set}" = set; then
3033   echo $ECHO_N "(cached) $ECHO_C" >&6
3034 else
3035   ac_check_lib_save_LIBS=$LIBS
3036 LIBS="-ldir  $LIBS"
3037 cat >conftest.$ac_ext <<_ACEOF
3038 #line 3044 "configure"
3039 #include "confdefs.h"
3040
3041 /* Override any gcc2 internal prototype to avoid an error.  */
3042 #ifdef __cplusplus
3043 extern "C"
3044 #endif
3045 /* We use char because int might match the return type of a gcc2
3046    builtin and then its argument prototype would still apply.  */
3047 char opendir ();
3048 int
3049 main ()
3050 {
3051 opendir ();
3052   ;
3053   return 0;
3054 }
3055 _ACEOF
3056 rm -f conftest.$ac_objext conftest$ac_exeext
3057 if { (eval echo "$as_me:3063: \"$ac_link\"") >&5
3058   (eval $ac_link) 2>&5
3059   ac_status=$?
3060   echo "$as_me:3066: \$? = $ac_status" >&5
3061   (exit $ac_status); } &&
3062          { ac_try='test -s conftest$ac_exeext'
3063   { (eval echo "$as_me:3069: \"$ac_try\"") >&5
3064   (eval $ac_try) 2>&5
3065   ac_status=$?
3066   echo "$as_me:3072: \$? = $ac_status" >&5
3067   (exit $ac_status); }; }; then
3068   ac_cv_lib_dir_opendir=yes
3069 else
3070   echo "$as_me: failed program was:" >&5
3071 cat conftest.$ac_ext >&5
3072 ac_cv_lib_dir_opendir=no
3073 fi
3074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3075 LIBS=$ac_check_lib_save_LIBS
3076 fi
3077 echo "$as_me:3083: result: $ac_cv_lib_dir_opendir" >&5
3078 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
3079 if test $ac_cv_lib_dir_opendir = yes; then
3080   LIBS="$LIBS -ldir"
3081 fi
3082
3083 else
3084   echo "$as_me:3090: checking for opendir in -lx" >&5
3085 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
3086 if test "${ac_cv_lib_x_opendir+set}" = set; then
3087   echo $ECHO_N "(cached) $ECHO_C" >&6
3088 else
3089   ac_check_lib_save_LIBS=$LIBS
3090 LIBS="-lx  $LIBS"
3091 cat >conftest.$ac_ext <<_ACEOF
3092 #line 3098 "configure"
3093 #include "confdefs.h"
3094
3095 /* Override any gcc2 internal prototype to avoid an error.  */
3096 #ifdef __cplusplus
3097 extern "C"
3098 #endif
3099 /* We use char because int might match the return type of a gcc2
3100    builtin and then its argument prototype would still apply.  */
3101 char opendir ();
3102 int
3103 main ()
3104 {
3105 opendir ();
3106   ;
3107   return 0;
3108 }
3109 _ACEOF
3110 rm -f conftest.$ac_objext conftest$ac_exeext
3111 if { (eval echo "$as_me:3117: \"$ac_link\"") >&5
3112   (eval $ac_link) 2>&5
3113   ac_status=$?
3114   echo "$as_me:3120: \$? = $ac_status" >&5
3115   (exit $ac_status); } &&
3116          { ac_try='test -s conftest$ac_exeext'
3117   { (eval echo "$as_me:3123: \"$ac_try\"") >&5
3118   (eval $ac_try) 2>&5
3119   ac_status=$?
3120   echo "$as_me:3126: \$? = $ac_status" >&5
3121   (exit $ac_status); }; }; then
3122   ac_cv_lib_x_opendir=yes
3123 else
3124   echo "$as_me: failed program was:" >&5
3125 cat conftest.$ac_ext >&5
3126 ac_cv_lib_x_opendir=no
3127 fi
3128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3129 LIBS=$ac_check_lib_save_LIBS
3130 fi
3131 echo "$as_me:3137: result: $ac_cv_lib_x_opendir" >&5
3132 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
3133 if test $ac_cv_lib_x_opendir = yes; then
3134   LIBS="$LIBS -lx"
3135 fi
3136
3137 fi
3138
3139 for ac_func in lstat memmove putenv select setenv setlocale \
3140                 strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit
3141 do
3142 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3143 echo "$as_me:3149: checking for $ac_func" >&5
3144 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3145 if eval "test \"\${$as_ac_var+set}\" = set"; then
3146   echo $ECHO_N "(cached) $ECHO_C" >&6
3147 else
3148   cat >conftest.$ac_ext <<_ACEOF
3149 #line 3155 "configure"
3150 #include "confdefs.h"
3151 /* System header to define __stub macros and hopefully few prototypes,
3152     which can conflict with char $ac_func (); below.  */
3153 #include <assert.h>
3154 /* Override any gcc2 internal prototype to avoid an error.  */
3155 #ifdef __cplusplus
3156 extern "C"
3157 #endif
3158 /* We use char because int might match the return type of a gcc2
3159    builtin and then its argument prototype would still apply.  */
3160 char $ac_func ();
3161 char (*f) ();
3162
3163 int
3164 main ()
3165 {
3166 /* The GNU C library defines this for functions which it implements
3167     to always fail with ENOSYS.  Some functions are actually named
3168     something starting with __ and the normal name is an alias.  */
3169 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3170 choke me
3171 #else
3172 f = $ac_func;
3173 #endif
3174
3175   ;
3176   return 0;
3177 }
3178 _ACEOF
3179 rm -f conftest.$ac_objext conftest$ac_exeext
3180 if { (eval echo "$as_me:3186: \"$ac_link\"") >&5
3181   (eval $ac_link) 2>&5
3182   ac_status=$?
3183   echo "$as_me:3189: \$? = $ac_status" >&5
3184   (exit $ac_status); } &&
3185          { ac_try='test -s conftest$ac_exeext'
3186   { (eval echo "$as_me:3192: \"$ac_try\"") >&5
3187   (eval $ac_try) 2>&5
3188   ac_status=$?
3189   echo "$as_me:3195: \$? = $ac_status" >&5
3190   (exit $ac_status); }; }; then
3191   eval "$as_ac_var=yes"
3192 else
3193   echo "$as_me: failed program was:" >&5
3194 cat conftest.$ac_ext >&5
3195 eval "$as_ac_var=no"
3196 fi
3197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3198 fi
3199 echo "$as_me:3205: result: `eval echo '${'$as_ac_var'}'`" >&5
3200 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3201 if test `eval echo '${'$as_ac_var'}'` = yes; then
3202   cat >>confdefs.h <<EOF
3203 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3204 EOF
3205
3206 fi
3207 done
3208
3209 echo "$as_me:3215: checking for working strcoll" >&5
3210 echo $ECHO_N "checking for working strcoll... $ECHO_C" >&6
3211 if test "${ac_cv_func_strcoll_works+set}" = set; then
3212   echo $ECHO_N "(cached) $ECHO_C" >&6
3213 else
3214   if test "$cross_compiling" = yes; then
3215   ac_cv_func_strcoll_works=no
3216 else
3217   cat >conftest.$ac_ext <<_ACEOF
3218 #line 3224 "configure"
3219 #include "confdefs.h"
3220 $ac_includes_default
3221 int
3222 main ()
3223 {
3224 exit (strcoll ("abc", "def") >= 0 ||
3225          strcoll ("ABC", "DEF") >= 0 ||
3226          strcoll ("123", "456") >= 0)
3227   ;
3228   return 0;
3229 }
3230 _ACEOF
3231 rm -f conftest$ac_exeext
3232 if { (eval echo "$as_me:3238: \"$ac_link\"") >&5
3233   (eval $ac_link) 2>&5
3234   ac_status=$?
3235   echo "$as_me:3241: \$? = $ac_status" >&5
3236   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3237   { (eval echo "$as_me:3243: \"$ac_try\"") >&5
3238   (eval $ac_try) 2>&5
3239   ac_status=$?
3240   echo "$as_me:3246: \$? = $ac_status" >&5
3241   (exit $ac_status); }; }; then
3242   ac_cv_func_strcoll_works=yes
3243 else
3244   echo "$as_me: program exited with status $ac_status" >&5
3245 echo "$as_me: failed program was:" >&5
3246 cat conftest.$ac_ext >&5
3247 ac_cv_func_strcoll_works=no
3248 fi
3249 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3250 fi
3251 fi
3252 echo "$as_me:3258: result: $ac_cv_func_strcoll_works" >&5
3253 echo "${ECHO_T}$ac_cv_func_strcoll_works" >&6
3254 if test $ac_cv_func_strcoll_works = yes; then
3255
3256 cat >>confdefs.h <<\EOF
3257 #define HAVE_STRCOLL 1
3258 EOF
3259
3260 fi
3261
3262 for ac_header in unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \
3263                 limits.h sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
3264                 termcap.h termios.h termio.h sys/file.h locale.h memory.h
3265 do
3266 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3267 echo "$as_me:3273: checking for $ac_header" >&5
3268 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3269 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3270   echo $ECHO_N "(cached) $ECHO_C" >&6
3271 else
3272   cat >conftest.$ac_ext <<_ACEOF
3273 #line 3279 "configure"
3274 #include "confdefs.h"
3275 #include <$ac_header>
3276 _ACEOF
3277 if { (eval echo "$as_me:3283: \"$ac_cpp conftest.$ac_ext\"") >&5
3278   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3279   ac_status=$?
3280   egrep -v '^ *\+' conftest.er1 >conftest.err
3281   rm -f conftest.er1
3282   cat conftest.err >&5
3283   echo "$as_me:3289: \$? = $ac_status" >&5
3284   (exit $ac_status); } >/dev/null; then
3285   if test -s conftest.err; then
3286     ac_cpp_err=$ac_c_preproc_warn_flag
3287   else
3288     ac_cpp_err=
3289   fi
3290 else
3291   ac_cpp_err=yes
3292 fi
3293 if test -z "$ac_cpp_err"; then
3294   eval "$as_ac_Header=yes"
3295 else
3296   echo "$as_me: failed program was:" >&5
3297   cat conftest.$ac_ext >&5
3298   eval "$as_ac_Header=no"
3299 fi
3300 rm -f conftest.err conftest.$ac_ext
3301 fi
3302 echo "$as_me:3308: result: `eval echo '${'$as_ac_Header'}'`" >&5
3303 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3304 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3305   cat >>confdefs.h <<EOF
3306 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3307 EOF
3308
3309 fi
3310 done
3311
3312 echo "$as_me:3318: checking for type of signal functions" >&5
3313 echo $ECHO_N "checking for type of signal functions... $ECHO_C" >&6
3314 if test "${bash_cv_signal_vintage+set}" = set; then
3315   echo $ECHO_N "(cached) $ECHO_C" >&6
3316 else
3317
3318   cat >conftest.$ac_ext <<_ACEOF
3319 #line 3325 "configure"
3320 #include "confdefs.h"
3321 #include <signal.h>
3322 int
3323 main ()
3324 {
3325
3326     sigset_t ss;
3327     struct sigaction sa;
3328     sigemptyset(&ss); sigsuspend(&ss);
3329     sigaction(SIGINT, &sa, (struct sigaction *) 0);
3330     sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
3331
3332   ;
3333   return 0;
3334 }
3335 _ACEOF
3336 rm -f conftest.$ac_objext conftest$ac_exeext
3337 if { (eval echo "$as_me:3343: \"$ac_link\"") >&5
3338   (eval $ac_link) 2>&5
3339   ac_status=$?
3340   echo "$as_me:3346: \$? = $ac_status" >&5
3341   (exit $ac_status); } &&
3342          { ac_try='test -s conftest$ac_exeext'
3343   { (eval echo "$as_me:3349: \"$ac_try\"") >&5
3344   (eval $ac_try) 2>&5
3345   ac_status=$?
3346   echo "$as_me:3352: \$? = $ac_status" >&5
3347   (exit $ac_status); }; }; then
3348   bash_cv_signal_vintage=posix
3349 else
3350   echo "$as_me: failed program was:" >&5
3351 cat conftest.$ac_ext >&5
3352
3353     cat >conftest.$ac_ext <<_ACEOF
3354 #line 3360 "configure"
3355 #include "confdefs.h"
3356 #include <signal.h>
3357 int
3358 main ()
3359 {
3360
3361         int mask = sigmask(SIGINT);
3362         sigsetmask(mask); sigblock(mask); sigpause(mask);
3363
3364   ;
3365   return 0;
3366 }
3367 _ACEOF
3368 rm -f conftest.$ac_objext conftest$ac_exeext
3369 if { (eval echo "$as_me:3375: \"$ac_link\"") >&5
3370   (eval $ac_link) 2>&5
3371   ac_status=$?
3372   echo "$as_me:3378: \$? = $ac_status" >&5
3373   (exit $ac_status); } &&
3374          { ac_try='test -s conftest$ac_exeext'
3375   { (eval echo "$as_me:3381: \"$ac_try\"") >&5
3376   (eval $ac_try) 2>&5
3377   ac_status=$?
3378   echo "$as_me:3384: \$? = $ac_status" >&5
3379   (exit $ac_status); }; }; then
3380   bash_cv_signal_vintage=4.2bsd
3381 else
3382   echo "$as_me: failed program was:" >&5
3383 cat conftest.$ac_ext >&5
3384
3385       cat >conftest.$ac_ext <<_ACEOF
3386 #line 3392 "configure"
3387 #include "confdefs.h"
3388
3389         #include <signal.h>
3390         RETSIGTYPE foo() { }
3391 int
3392 main ()
3393 {
3394
3395                 int mask = sigmask(SIGINT);
3396                 sigset(SIGINT, foo); sigrelse(SIGINT);
3397                 sighold(SIGINT); sigpause(SIGINT);
3398
3399   ;
3400   return 0;
3401 }
3402 _ACEOF
3403 rm -f conftest.$ac_objext conftest$ac_exeext
3404 if { (eval echo "$as_me:3410: \"$ac_link\"") >&5
3405   (eval $ac_link) 2>&5
3406   ac_status=$?
3407   echo "$as_me:3413: \$? = $ac_status" >&5
3408   (exit $ac_status); } &&
3409          { ac_try='test -s conftest$ac_exeext'
3410   { (eval echo "$as_me:3416: \"$ac_try\"") >&5
3411   (eval $ac_try) 2>&5
3412   ac_status=$?
3413   echo "$as_me:3419: \$? = $ac_status" >&5
3414   (exit $ac_status); }; }; then
3415   bash_cv_signal_vintage=svr3
3416 else
3417   echo "$as_me: failed program was:" >&5
3418 cat conftest.$ac_ext >&5
3419 bash_cv_signal_vintage=v7
3420
3421 fi
3422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3423
3424 fi
3425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3426
3427 fi
3428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3429
3430 fi
3431
3432 echo "$as_me:3438: result: $bash_cv_signal_vintage" >&5
3433 echo "${ECHO_T}$bash_cv_signal_vintage" >&6
3434 if test "$bash_cv_signal_vintage" = posix; then
3435 cat >>confdefs.h <<\EOF
3436 #define HAVE_POSIX_SIGNALS 1
3437 EOF
3438
3439 elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
3440 cat >>confdefs.h <<\EOF
3441 #define HAVE_BSD_SIGNALS 1
3442 EOF
3443
3444 elif test "$bash_cv_signal_vintage" = svr3; then
3445 cat >>confdefs.h <<\EOF
3446 #define HAVE_USG_SIGHOLD 1
3447 EOF
3448
3449 fi
3450
3451 echo "$as_me:3457: checking if signal handlers must be reinstalled when invoked" >&5
3452 echo $ECHO_N "checking if signal handlers must be reinstalled when invoked... $ECHO_C" >&6
3453 if test "${bash_cv_must_reinstall_sighandlers+set}" = set; then
3454   echo $ECHO_N "(cached) $ECHO_C" >&6
3455 else
3456   if test "$cross_compiling" = yes; then
3457   { echo "$as_me:3463: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5
3458 echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;}
3459     bash_cv_must_reinstall_sighandlers=no
3460
3461 else
3462   cat >conftest.$ac_ext <<_ACEOF
3463 #line 3469 "configure"
3464 #include "confdefs.h"
3465
3466 #include <signal.h>
3467 #ifdef HAVE_UNISTD_H
3468 #include <unistd.h>
3469 #endif
3470
3471 typedef RETSIGTYPE sigfunc();
3472
3473 int nsigint;
3474
3475 #ifdef HAVE_POSIX_SIGNALS
3476 sigfunc *
3477 set_signal_handler(sig, handler)
3478      int sig;
3479      sigfunc *handler;
3480 {
3481   struct sigaction act, oact;
3482   act.sa_handler = handler;
3483   act.sa_flags = 0;
3484   sigemptyset (&act.sa_mask);
3485   sigemptyset (&oact.sa_mask);
3486   sigaction (sig, &act, &oact);
3487   return (oact.sa_handler);
3488 }
3489 #else
3490 #define set_signal_handler(s, h) signal(s, h)
3491 #endif
3492
3493 RETSIGTYPE
3494 sigint(s)
3495 int s;
3496 {
3497   nsigint++;
3498 }
3499
3500 main()
3501 {
3502         nsigint = 0;
3503         set_signal_handler(SIGINT, sigint);
3504         kill((int)getpid(), SIGINT);
3505         kill((int)getpid(), SIGINT);
3506         exit(nsigint != 2);
3507 }
3508
3509 _ACEOF
3510 rm -f conftest$ac_exeext
3511 if { (eval echo "$as_me:3517: \"$ac_link\"") >&5
3512   (eval $ac_link) 2>&5
3513   ac_status=$?
3514   echo "$as_me:3520: \$? = $ac_status" >&5
3515   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3516   { (eval echo "$as_me:3522: \"$ac_try\"") >&5
3517   (eval $ac_try) 2>&5
3518   ac_status=$?
3519   echo "$as_me:3525: \$? = $ac_status" >&5
3520   (exit $ac_status); }; }; then
3521   bash_cv_must_reinstall_sighandlers=no
3522 else
3523   echo "$as_me: program exited with status $ac_status" >&5
3524 echo "$as_me: failed program was:" >&5
3525 cat conftest.$ac_ext >&5
3526 bash_cv_must_reinstall_sighandlers=yes
3527 fi
3528 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3529 fi
3530 fi
3531
3532 echo "$as_me:3538: result: $bash_cv_must_reinstall_sighandlers" >&5
3533 echo "${ECHO_T}$bash_cv_must_reinstall_sighandlers" >&6
3534 if test $bash_cv_must_reinstall_sighandlers = yes; then
3535 cat >>confdefs.h <<\EOF
3536 #define MUST_REINSTALL_SIGHANDLERS 1
3537 EOF
3538
3539 fi
3540
3541 echo "$as_me:3547: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
3542 echo $ECHO_N "checking for presence of POSIX-style sigsetjmp/siglongjmp... $ECHO_C" >&6
3543 if test "${bash_cv_func_sigsetjmp+set}" = set; then
3544   echo $ECHO_N "(cached) $ECHO_C" >&6
3545 else
3546   if test "$cross_compiling" = yes; then
3547   { echo "$as_me:3553: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5
3548 echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;}
3549      bash_cv_func_sigsetjmp=missing
3550
3551 else
3552   cat >conftest.$ac_ext <<_ACEOF
3553 #line 3559 "configure"
3554 #include "confdefs.h"
3555
3556 #ifdef HAVE_UNISTD_H
3557 #include <unistd.h>
3558 #endif
3559 #include <sys/types.h>
3560 #include <signal.h>
3561 #include <setjmp.h>
3562
3563 main()
3564 {
3565 #if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
3566 exit (1);
3567 #else
3568
3569 int code;
3570 sigset_t set, oset;
3571 sigjmp_buf xx;
3572
3573 /* get the mask */
3574 sigemptyset(&set);
3575 sigemptyset(&oset);
3576 sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
3577 sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
3578
3579 /* save it */
3580 code = sigsetjmp(xx, 1);
3581 if (code)
3582   exit(0);      /* could get sigmask and compare to oset here. */
3583
3584 /* change it */
3585 sigaddset(&set, SIGINT);
3586 sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
3587
3588 /* and siglongjmp */
3589 siglongjmp(xx, 10);
3590 exit(1);
3591 #endif
3592 }
3593 _ACEOF
3594 rm -f conftest$ac_exeext
3595 if { (eval echo "$as_me:3601: \"$ac_link\"") >&5
3596   (eval $ac_link) 2>&5
3597   ac_status=$?
3598   echo "$as_me:3604: \$? = $ac_status" >&5
3599   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3600   { (eval echo "$as_me:3606: \"$ac_try\"") >&5
3601   (eval $ac_try) 2>&5
3602   ac_status=$?
3603   echo "$as_me:3609: \$? = $ac_status" >&5
3604   (exit $ac_status); }; }; then
3605   bash_cv_func_sigsetjmp=present
3606 else
3607   echo "$as_me: program exited with status $ac_status" >&5
3608 echo "$as_me: failed program was:" >&5
3609 cat conftest.$ac_ext >&5
3610 bash_cv_func_sigsetjmp=missing
3611 fi
3612 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3613 fi
3614 fi
3615
3616 echo "$as_me:3622: result: $bash_cv_func_sigsetjmp" >&5
3617 echo "${ECHO_T}$bash_cv_func_sigsetjmp" >&6
3618 if test $bash_cv_func_sigsetjmp = present; then
3619 cat >>confdefs.h <<\EOF
3620 #define HAVE_POSIX_SIGSETJMP 1
3621 EOF
3622
3623 fi
3624
3625 echo "$as_me:3631: checking for lstat" >&5
3626 echo $ECHO_N "checking for lstat... $ECHO_C" >&6
3627 if test "${bash_cv_func_lstat+set}" = set; then
3628   echo $ECHO_N "(cached) $ECHO_C" >&6
3629 else
3630   cat >conftest.$ac_ext <<_ACEOF
3631 #line 3637 "configure"
3632 #include "confdefs.h"
3633
3634 #include <sys/types.h>
3635 #include <sys/stat.h>
3636
3637 int
3638 main ()
3639 {
3640  lstat(".",(struct stat *)0);
3641   ;
3642   return 0;
3643 }
3644 _ACEOF
3645 rm -f conftest.$ac_objext conftest$ac_exeext
3646 if { (eval echo "$as_me:3652: \"$ac_link\"") >&5
3647   (eval $ac_link) 2>&5
3648   ac_status=$?
3649   echo "$as_me:3655: \$? = $ac_status" >&5
3650   (exit $ac_status); } &&
3651          { ac_try='test -s conftest$ac_exeext'
3652   { (eval echo "$as_me:3658: \"$ac_try\"") >&5
3653   (eval $ac_try) 2>&5
3654   ac_status=$?
3655   echo "$as_me:3661: \$? = $ac_status" >&5
3656   (exit $ac_status); }; }; then
3657   bash_cv_func_lstat=yes
3658 else
3659   echo "$as_me: failed program was:" >&5
3660 cat conftest.$ac_ext >&5
3661 bash_cv_func_lstat=no
3662 fi
3663 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3664 fi
3665 echo "$as_me:3671: result: $bash_cv_func_lstat" >&5
3666 echo "${ECHO_T}$bash_cv_func_lstat" >&6
3667 if test $bash_cv_func_lstat = yes; then
3668   cat >>confdefs.h <<\EOF
3669 #define HAVE_LSTAT 1
3670 EOF
3671
3672 fi
3673
3674 echo "$as_me:3680: checking whether or not strcoll and strcmp differ" >&5
3675 echo $ECHO_N "checking whether or not strcoll and strcmp differ... $ECHO_C" >&6
3676 if test "${bash_cv_func_strcoll_broken+set}" = set; then
3677   echo $ECHO_N "(cached) $ECHO_C" >&6
3678 else
3679   if test "$cross_compiling" = yes; then
3680   { echo "$as_me:3686: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5
3681 echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;}
3682     bash_cv_func_strcoll_broken=no
3683
3684 else
3685   cat >conftest.$ac_ext <<_ACEOF
3686 #line 3692 "configure"
3687 #include "confdefs.h"
3688
3689 #include <stdio.h>
3690 #if defined (HAVE_LOCALE_H)
3691 #include <locale.h>
3692 #endif
3693
3694 main(c, v)
3695 int     c;
3696 char    *v[];
3697 {
3698         int     r1, r2;
3699         char    *deflocale, *defcoll;
3700
3701 #ifdef HAVE_SETLOCALE
3702         deflocale = setlocale(LC_ALL, "");
3703         defcoll = setlocale(LC_COLLATE, "");
3704 #endif
3705
3706 #ifdef HAVE_STRCOLL
3707         /* These two values are taken from tests/glob-test. */
3708         r1 = strcoll("abd", "aXd");
3709 #else
3710         r1 = 0;
3711 #endif
3712         r2 = strcmp("abd", "aXd");
3713
3714         /* These two should both be greater than 0.  It is permissible for
3715            a system to return different values, as long as the sign is the
3716            same. */
3717
3718         /* Exit with 1 (failure) if these two values are both > 0, since
3719            this tests whether strcoll(3) is broken with respect to strcmp(3)
3720            in the default locale. */
3721         exit (r1 > 0 && r2 > 0);
3722 }
3723
3724 _ACEOF
3725 rm -f conftest$ac_exeext
3726 if { (eval echo "$as_me:3732: \"$ac_link\"") >&5
3727   (eval $ac_link) 2>&5
3728   ac_status=$?
3729   echo "$as_me:3735: \$? = $ac_status" >&5
3730   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3731   { (eval echo "$as_me:3737: \"$ac_try\"") >&5
3732   (eval $ac_try) 2>&5
3733   ac_status=$?
3734   echo "$as_me:3740: \$? = $ac_status" >&5
3735   (exit $ac_status); }; }; then
3736   bash_cv_func_strcoll_broken=yes
3737 else
3738   echo "$as_me: program exited with status $ac_status" >&5
3739 echo "$as_me: failed program was:" >&5
3740 cat conftest.$ac_ext >&5
3741 bash_cv_func_strcoll_broken=no
3742 fi
3743 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3744 fi
3745 fi
3746
3747 echo "$as_me:3753: result: $bash_cv_func_strcoll_broken" >&5
3748 echo "${ECHO_T}$bash_cv_func_strcoll_broken" >&6
3749 if test $bash_cv_func_strcoll_broken = yes; then
3750 cat >>confdefs.h <<\EOF
3751 #define STRCOLL_BROKEN 1
3752 EOF
3753
3754 fi
3755
3756 echo "$as_me:3762: checking whether getpw functions are declared in pwd.h" >&5
3757 echo $ECHO_N "checking whether getpw functions are declared in pwd.h... $ECHO_C" >&6
3758 if test "${bash_cv_getpw_declared+set}" = set; then
3759   echo $ECHO_N "(cached) $ECHO_C" >&6
3760 else
3761   cat >conftest.$ac_ext <<_ACEOF
3762 #line 3768 "configure"
3763 #include "confdefs.h"
3764
3765 #include <sys/types.h>
3766 #ifdef HAVE_UNISTD_H
3767 #  include <unistd.h>
3768 #endif
3769 #include <pwd.h>
3770
3771 _ACEOF
3772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3773   egrep "getpwuid" >/dev/null 2>&1; then
3774   bash_cv_getpw_declared=yes
3775 else
3776   bash_cv_getpw_declared=no
3777 fi
3778 rm -f conftest*
3779
3780 fi
3781
3782 echo "$as_me:3788: result: $bash_cv_getpw_declared" >&5
3783 echo "${ECHO_T}$bash_cv_getpw_declared" >&6
3784 if test $bash_cv_getpw_declared = yes; then
3785 cat >>confdefs.h <<\EOF
3786 #define HAVE_GETPW_DECLS 1
3787 EOF
3788
3789 fi
3790
3791 echo "$as_me:3797: checking POSIX termios" >&5
3792 echo $ECHO_N "checking POSIX termios... $ECHO_C" >&6
3793 if test "${ac_cv_sys_posix_termios+set}" = set; then
3794   echo $ECHO_N "(cached) $ECHO_C" >&6
3795 else
3796   cat >conftest.$ac_ext <<_ACEOF
3797 #line 3803 "configure"
3798 #include "confdefs.h"
3799 #include <sys/types.h>
3800 #include <unistd.h>
3801 #include <termios.h>
3802 int
3803 main ()
3804 {
3805 /* SunOS 4.0.3 has termios.h but not the library calls.  */
3806    tcgetattr(0, 0);
3807   ;
3808   return 0;
3809 }
3810 _ACEOF
3811 rm -f conftest.$ac_objext conftest$ac_exeext
3812 if { (eval echo "$as_me:3818: \"$ac_link\"") >&5
3813   (eval $ac_link) 2>&5
3814   ac_status=$?
3815   echo "$as_me:3821: \$? = $ac_status" >&5
3816   (exit $ac_status); } &&
3817          { ac_try='test -s conftest$ac_exeext'
3818   { (eval echo "$as_me:3824: \"$ac_try\"") >&5
3819   (eval $ac_try) 2>&5
3820   ac_status=$?
3821   echo "$as_me:3827: \$? = $ac_status" >&5
3822   (exit $ac_status); }; }; then
3823   ac_cv_sys_posix_termios=yes
3824 else
3825   echo "$as_me: failed program was:" >&5
3826 cat conftest.$ac_ext >&5
3827 ac_cv_sys_posix_termios=no
3828 fi
3829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3830 fi
3831 echo "$as_me:3837: result: $ac_cv_sys_posix_termios" >&5
3832 echo "${ECHO_T}$ac_cv_sys_posix_termios" >&6
3833
3834 if test $ac_cv_sys_posix_termios = yes; then
3835   echo "$as_me:3841: checking whether termios.h defines TIOCGWINSZ" >&5
3836 echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6
3837 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
3838   echo $ECHO_N "(cached) $ECHO_C" >&6
3839 else
3840   cat >conftest.$ac_ext <<_ACEOF
3841 #line 3847 "configure"
3842 #include "confdefs.h"
3843 #include <sys/types.h>
3844 #include <termios.h>
3845 #ifdef TIOCGWINSZ
3846   yes
3847 #endif
3848
3849 _ACEOF
3850 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3851   egrep "yes" >/dev/null 2>&1; then
3852   ac_cv_sys_tiocgwinsz_in_termios_h=yes
3853 else
3854   ac_cv_sys_tiocgwinsz_in_termios_h=no
3855 fi
3856 rm -f conftest*
3857
3858 fi
3859 echo "$as_me:3865: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
3860 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6
3861
3862 fi
3863 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
3864   echo "$as_me:3870: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
3865 echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6
3866 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
3867   echo $ECHO_N "(cached) $ECHO_C" >&6
3868 else
3869   cat >conftest.$ac_ext <<_ACEOF
3870 #line 3876 "configure"
3871 #include "confdefs.h"
3872 #include <sys/types.h>
3873 #include <sys/ioctl.h>
3874 #ifdef TIOCGWINSZ
3875   yes
3876 #endif
3877
3878 _ACEOF
3879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3880   egrep "yes" >/dev/null 2>&1; then
3881   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
3882 else
3883   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
3884 fi
3885 rm -f conftest*
3886
3887 fi
3888 echo "$as_me:3894: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
3889 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6
3890
3891   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
3892
3893 cat >>confdefs.h <<\EOF
3894 #define GWINSZ_IN_SYS_IOCTL 1
3895 EOF
3896
3897   fi
3898 fi
3899
3900 echo "$as_me:3906: checking whether signal handlers are of type void" >&5
3901 echo $ECHO_N "checking whether signal handlers are of type void... $ECHO_C" >&6
3902 if test "${bash_cv_void_sighandler+set}" = set; then
3903   echo $ECHO_N "(cached) $ECHO_C" >&6
3904 else
3905   cat >conftest.$ac_ext <<_ACEOF
3906 #line 3912 "configure"
3907 #include "confdefs.h"
3908 #include <sys/types.h>
3909 #include <signal.h>
3910 #ifdef signal
3911 #undef signal
3912 #endif
3913 #ifdef __cplusplus
3914 extern "C"
3915 #endif
3916 void (*signal ()) ();
3917 int
3918 main ()
3919 {
3920 int i;
3921   ;
3922   return 0;
3923 }
3924 _ACEOF
3925 rm -f conftest.$ac_objext
3926 if { (eval echo "$as_me:3932: \"$ac_compile\"") >&5
3927   (eval $ac_compile) 2>&5
3928   ac_status=$?
3929   echo "$as_me:3935: \$? = $ac_status" >&5
3930   (exit $ac_status); } &&
3931          { ac_try='test -s conftest.$ac_objext'
3932   { (eval echo "$as_me:3938: \"$ac_try\"") >&5
3933   (eval $ac_try) 2>&5
3934   ac_status=$?
3935   echo "$as_me:3941: \$? = $ac_status" >&5
3936   (exit $ac_status); }; }; then
3937   bash_cv_void_sighandler=yes
3938 else
3939   echo "$as_me: failed program was:" >&5
3940 cat conftest.$ac_ext >&5
3941 bash_cv_void_sighandler=no
3942 fi
3943 rm -f conftest.$ac_objext conftest.$ac_ext
3944 fi
3945 echo "$as_me:3951: result: $bash_cv_void_sighandler" >&5
3946 echo "${ECHO_T}$bash_cv_void_sighandler" >&6
3947 if test $bash_cv_void_sighandler = yes; then
3948 cat >>confdefs.h <<\EOF
3949 #define VOID_SIGHANDLER 1
3950 EOF
3951
3952 fi
3953
3954 echo "$as_me:3960: checking for TIOCSTAT in sys/ioctl.h" >&5
3955 echo $ECHO_N "checking for TIOCSTAT in sys/ioctl.h... $ECHO_C" >&6
3956 if test "${bash_cv_tiocstat_in_ioctl+set}" = set; then
3957   echo $ECHO_N "(cached) $ECHO_C" >&6
3958 else
3959   cat >conftest.$ac_ext <<_ACEOF
3960 #line 3966 "configure"
3961 #include "confdefs.h"
3962 #include <sys/types.h>
3963 #include <sys/ioctl.h>
3964 int
3965 main ()
3966 {
3967 int x = TIOCSTAT;
3968   ;
3969   return 0;
3970 }
3971 _ACEOF
3972 rm -f conftest.$ac_objext
3973 if { (eval echo "$as_me:3979: \"$ac_compile\"") >&5
3974   (eval $ac_compile) 2>&5
3975   ac_status=$?
3976   echo "$as_me:3982: \$? = $ac_status" >&5
3977   (exit $ac_status); } &&
3978          { ac_try='test -s conftest.$ac_objext'
3979   { (eval echo "$as_me:3985: \"$ac_try\"") >&5
3980   (eval $ac_try) 2>&5
3981   ac_status=$?
3982   echo "$as_me:3988: \$? = $ac_status" >&5
3983   (exit $ac_status); }; }; then
3984   bash_cv_tiocstat_in_ioctl=yes
3985 else
3986   echo "$as_me: failed program was:" >&5
3987 cat conftest.$ac_ext >&5
3988 bash_cv_tiocstat_in_ioctl=no
3989 fi
3990 rm -f conftest.$ac_objext conftest.$ac_ext
3991 fi
3992
3993 echo "$as_me:3999: result: $bash_cv_tiocstat_in_ioctl" >&5
3994 echo "${ECHO_T}$bash_cv_tiocstat_in_ioctl" >&6
3995 if test $bash_cv_tiocstat_in_ioctl = yes; then
3996 cat >>confdefs.h <<\EOF
3997 #define TIOCSTAT_IN_SYS_IOCTL 1
3998 EOF
3999
4000 fi
4001
4002 echo "$as_me:4008: checking for FIONREAD in sys/ioctl.h" >&5
4003 echo $ECHO_N "checking for FIONREAD in sys/ioctl.h... $ECHO_C" >&6
4004 if test "${bash_cv_fionread_in_ioctl+set}" = set; then
4005   echo $ECHO_N "(cached) $ECHO_C" >&6
4006 else
4007   cat >conftest.$ac_ext <<_ACEOF
4008 #line 4014 "configure"
4009 #include "confdefs.h"
4010 #include <sys/types.h>
4011 #include <sys/ioctl.h>
4012 int
4013 main ()
4014 {
4015 int x = FIONREAD;
4016   ;
4017   return 0;
4018 }
4019 _ACEOF
4020 rm -f conftest.$ac_objext
4021 if { (eval echo "$as_me:4027: \"$ac_compile\"") >&5
4022   (eval $ac_compile) 2>&5
4023   ac_status=$?
4024   echo "$as_me:4030: \$? = $ac_status" >&5
4025   (exit $ac_status); } &&
4026          { ac_try='test -s conftest.$ac_objext'
4027   { (eval echo "$as_me:4033: \"$ac_try\"") >&5
4028   (eval $ac_try) 2>&5
4029   ac_status=$?
4030   echo "$as_me:4036: \$? = $ac_status" >&5
4031   (exit $ac_status); }; }; then
4032   bash_cv_fionread_in_ioctl=yes
4033 else
4034   echo "$as_me: failed program was:" >&5
4035 cat conftest.$ac_ext >&5
4036 bash_cv_fionread_in_ioctl=no
4037 fi
4038 rm -f conftest.$ac_objext conftest.$ac_ext
4039 fi
4040
4041 echo "$as_me:4047: result: $bash_cv_fionread_in_ioctl" >&5
4042 echo "${ECHO_T}$bash_cv_fionread_in_ioctl" >&6
4043 if test $bash_cv_fionread_in_ioctl = yes; then
4044 cat >>confdefs.h <<\EOF
4045 #define FIONREAD_IN_SYS_IOCTL 1
4046 EOF
4047
4048 fi
4049
4050 echo "$as_me:4056: checking for speed_t in sys/types.h" >&5
4051 echo $ECHO_N "checking for speed_t in sys/types.h... $ECHO_C" >&6
4052 if test "${bash_cv_speed_t_in_sys_types+set}" = set; then
4053   echo $ECHO_N "(cached) $ECHO_C" >&6
4054 else
4055   cat >conftest.$ac_ext <<_ACEOF
4056 #line 4062 "configure"
4057 #include "confdefs.h"
4058 #include <sys/types.h>
4059 int
4060 main ()
4061 {
4062 speed_t x;
4063   ;
4064   return 0;
4065 }
4066 _ACEOF
4067 rm -f conftest.$ac_objext
4068 if { (eval echo "$as_me:4074: \"$ac_compile\"") >&5
4069   (eval $ac_compile) 2>&5
4070   ac_status=$?
4071   echo "$as_me:4077: \$? = $ac_status" >&5
4072   (exit $ac_status); } &&
4073          { ac_try='test -s conftest.$ac_objext'
4074   { (eval echo "$as_me:4080: \"$ac_try\"") >&5
4075   (eval $ac_try) 2>&5
4076   ac_status=$?
4077   echo "$as_me:4083: \$? = $ac_status" >&5
4078   (exit $ac_status); }; }; then
4079   bash_cv_speed_t_in_sys_types=yes
4080 else
4081   echo "$as_me: failed program was:" >&5
4082 cat conftest.$ac_ext >&5
4083 bash_cv_speed_t_in_sys_types=no
4084 fi
4085 rm -f conftest.$ac_objext conftest.$ac_ext
4086 fi
4087
4088 echo "$as_me:4094: result: $bash_cv_speed_t_in_sys_types" >&5
4089 echo "${ECHO_T}$bash_cv_speed_t_in_sys_types" >&6
4090 if test $bash_cv_speed_t_in_sys_types = yes; then
4091 cat >>confdefs.h <<\EOF
4092 #define SPEED_T_IN_SYS_TYPES 1
4093 EOF
4094
4095 fi
4096
4097 echo "$as_me:4103: checking for struct winsize in sys/ioctl.h and termios.h" >&5
4098 echo $ECHO_N "checking for struct winsize in sys/ioctl.h and termios.h... $ECHO_C" >&6
4099 if test "${bash_cv_struct_winsize_header+set}" = set; then
4100   echo $ECHO_N "(cached) $ECHO_C" >&6
4101 else
4102   cat >conftest.$ac_ext <<_ACEOF
4103 #line 4109 "configure"
4104 #include "confdefs.h"
4105 #include <sys/types.h>
4106 #include <sys/ioctl.h>
4107 int
4108 main ()
4109 {
4110 struct winsize x;
4111   ;
4112   return 0;
4113 }
4114 _ACEOF
4115 rm -f conftest.$ac_objext
4116 if { (eval echo "$as_me:4122: \"$ac_compile\"") >&5
4117   (eval $ac_compile) 2>&5
4118   ac_status=$?
4119   echo "$as_me:4125: \$? = $ac_status" >&5
4120   (exit $ac_status); } &&
4121          { ac_try='test -s conftest.$ac_objext'
4122   { (eval echo "$as_me:4128: \"$ac_try\"") >&5
4123   (eval $ac_try) 2>&5
4124   ac_status=$?
4125   echo "$as_me:4131: \$? = $ac_status" >&5
4126   (exit $ac_status); }; }; then
4127   bash_cv_struct_winsize_header=ioctl_h
4128 else
4129   echo "$as_me: failed program was:" >&5
4130 cat conftest.$ac_ext >&5
4131 cat >conftest.$ac_ext <<_ACEOF
4132 #line 4138 "configure"
4133 #include "confdefs.h"
4134 #include <sys/types.h>
4135 #include <termios.h>
4136 int
4137 main ()
4138 {
4139 struct winsize x;
4140   ;
4141   return 0;
4142 }
4143 _ACEOF
4144 rm -f conftest.$ac_objext
4145 if { (eval echo "$as_me:4151: \"$ac_compile\"") >&5
4146   (eval $ac_compile) 2>&5
4147   ac_status=$?
4148   echo "$as_me:4154: \$? = $ac_status" >&5
4149   (exit $ac_status); } &&
4150          { ac_try='test -s conftest.$ac_objext'
4151   { (eval echo "$as_me:4157: \"$ac_try\"") >&5
4152   (eval $ac_try) 2>&5
4153   ac_status=$?
4154   echo "$as_me:4160: \$? = $ac_status" >&5
4155   (exit $ac_status); }; }; then
4156   bash_cv_struct_winsize_header=termios_h
4157 else
4158   echo "$as_me: failed program was:" >&5
4159 cat conftest.$ac_ext >&5
4160 bash_cv_struct_winsize_header=other
4161 fi
4162 rm -f conftest.$ac_objext conftest.$ac_ext
4163
4164 fi
4165 rm -f conftest.$ac_objext conftest.$ac_ext
4166 fi
4167
4168 if test $bash_cv_struct_winsize_header = ioctl_h; then
4169   echo "$as_me:4175: result: sys/ioctl.h" >&5
4170 echo "${ECHO_T}sys/ioctl.h" >&6
4171   cat >>confdefs.h <<\EOF
4172 #define STRUCT_WINSIZE_IN_SYS_IOCTL 1
4173 EOF
4174
4175 elif test $bash_cv_struct_winsize_header = termios_h; then
4176   echo "$as_me:4182: result: termios.h" >&5
4177 echo "${ECHO_T}termios.h" >&6
4178   cat >>confdefs.h <<\EOF
4179 #define STRUCT_WINSIZE_IN_TERMIOS 1
4180 EOF
4181
4182 else
4183   echo "$as_me:4189: result: not found" >&5
4184 echo "${ECHO_T}not found" >&6
4185 fi
4186
4187 echo "$as_me:4193: checking if struct dirent has a d_ino member" >&5
4188 echo $ECHO_N "checking if struct dirent has a d_ino member... $ECHO_C" >&6
4189 if test "${bash_cv_dirent_has_dino+set}" = set; then
4190   echo $ECHO_N "(cached) $ECHO_C" >&6
4191 else
4192   cat >conftest.$ac_ext <<_ACEOF
4193 #line 4199 "configure"
4194 #include "confdefs.h"
4195
4196 #include <stdio.h>
4197 #include <sys/types.h>
4198 #ifdef HAVE_UNISTD_H
4199 # include <unistd.h>
4200 #endif /* HAVE_UNISTD_H */
4201 #if defined(HAVE_DIRENT_H)
4202 # include <dirent.h>
4203 #else
4204 # define dirent direct
4205 # ifdef HAVE_SYS_NDIR_H
4206 #  include <sys/ndir.h>
4207 # endif /* SYSNDIR */
4208 # ifdef HAVE_SYS_DIR_H
4209 #  include <sys/dir.h>
4210 # endif /* SYSDIR */
4211 # ifdef HAVE_NDIR_H
4212 #  include <ndir.h>
4213 # endif
4214 #endif /* HAVE_DIRENT_H */
4215
4216 int
4217 main ()
4218 {
4219
4220 struct dirent d; int z; z = d.d_ino;
4221
4222   ;
4223   return 0;
4224 }
4225 _ACEOF
4226 rm -f conftest.$ac_objext
4227 if { (eval echo "$as_me:4233: \"$ac_compile\"") >&5
4228   (eval $ac_compile) 2>&5
4229   ac_status=$?
4230   echo "$as_me:4236: \$? = $ac_status" >&5
4231   (exit $ac_status); } &&
4232          { ac_try='test -s conftest.$ac_objext'
4233   { (eval echo "$as_me:4239: \"$ac_try\"") >&5
4234   (eval $ac_try) 2>&5
4235   ac_status=$?
4236   echo "$as_me:4242: \$? = $ac_status" >&5
4237   (exit $ac_status); }; }; then
4238   bash_cv_dirent_has_dino=yes
4239 else
4240   echo "$as_me: failed program was:" >&5
4241 cat conftest.$ac_ext >&5
4242 bash_cv_dirent_has_dino=no
4243 fi
4244 rm -f conftest.$ac_objext conftest.$ac_ext
4245 fi
4246
4247 echo "$as_me:4253: result: $bash_cv_dirent_has_dino" >&5
4248 echo "${ECHO_T}$bash_cv_dirent_has_dino" >&6
4249 if test $bash_cv_dirent_has_dino = yes; then
4250 cat >>confdefs.h <<\EOF
4251 #define STRUCT_DIRENT_HAS_D_INO 1
4252 EOF
4253
4254 fi
4255
4256 echo "$as_me:4262: checking if struct dirent has a d_fileno member" >&5
4257 echo $ECHO_N "checking if struct dirent has a d_fileno member... $ECHO_C" >&6
4258 if test "${bash_cv_dirent_has_d_fileno+set}" = set; then
4259   echo $ECHO_N "(cached) $ECHO_C" >&6
4260 else
4261   cat >conftest.$ac_ext <<_ACEOF
4262 #line 4268 "configure"
4263 #include "confdefs.h"
4264
4265 #include <stdio.h>
4266 #include <sys/types.h>
4267 #ifdef HAVE_UNISTD_H
4268 # include <unistd.h>
4269 #endif /* HAVE_UNISTD_H */
4270 #if defined(HAVE_DIRENT_H)
4271 # include <dirent.h>
4272 #else
4273 # define dirent direct
4274 # ifdef HAVE_SYS_NDIR_H
4275 #  include <sys/ndir.h>
4276 # endif /* SYSNDIR */
4277 # ifdef HAVE_SYS_DIR_H
4278 #  include <sys/dir.h>
4279 # endif /* SYSDIR */
4280 # ifdef HAVE_NDIR_H
4281 #  include <ndir.h>
4282 # endif
4283 #endif /* HAVE_DIRENT_H */
4284
4285 int
4286 main ()
4287 {
4288
4289 struct dirent d; int z; z = d.d_fileno;
4290
4291   ;
4292   return 0;
4293 }
4294 _ACEOF
4295 rm -f conftest.$ac_objext
4296 if { (eval echo "$as_me:4302: \"$ac_compile\"") >&5
4297   (eval $ac_compile) 2>&5
4298   ac_status=$?
4299   echo "$as_me:4305: \$? = $ac_status" >&5
4300   (exit $ac_status); } &&
4301          { ac_try='test -s conftest.$ac_objext'
4302   { (eval echo "$as_me:4308: \"$ac_try\"") >&5
4303   (eval $ac_try) 2>&5
4304   ac_status=$?
4305   echo "$as_me:4311: \$? = $ac_status" >&5
4306   (exit $ac_status); }; }; then
4307   bash_cv_dirent_has_d_fileno=yes
4308 else
4309   echo "$as_me: failed program was:" >&5
4310 cat conftest.$ac_ext >&5
4311 bash_cv_dirent_has_d_fileno=no
4312 fi
4313 rm -f conftest.$ac_objext conftest.$ac_ext
4314 fi
4315
4316 echo "$as_me:4322: result: $bash_cv_dirent_has_d_fileno" >&5
4317 echo "${ECHO_T}$bash_cv_dirent_has_d_fileno" >&6
4318 if test $bash_cv_dirent_has_d_fileno = yes; then
4319 cat >>confdefs.h <<\EOF
4320 #define STRUCT_DIRENT_HAS_D_FILENO 1
4321 EOF
4322
4323 fi
4324
4325 case "$host_os" in
4326 aix*)   prefer_curses=yes ;;
4327 esac
4328
4329 if test "X$bash_cv_termcap_lib" = "X"; then
4330 _bash_needmsg=yes
4331 else
4332 echo "$as_me:4338: checking which library has the termcap functions" >&5
4333 echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6
4334 _bash_needmsg=
4335 fi
4336 if test "${bash_cv_termcap_lib+set}" = set; then
4337   echo $ECHO_N "(cached) $ECHO_C" >&6
4338 else
4339   echo "$as_me:4345: checking for tgetent in -ltermcap" >&5
4340 echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6
4341 if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
4342   echo $ECHO_N "(cached) $ECHO_C" >&6
4343 else
4344   ac_check_lib_save_LIBS=$LIBS
4345 LIBS="-ltermcap  $LIBS"
4346 cat >conftest.$ac_ext <<_ACEOF
4347 #line 4353 "configure"
4348 #include "confdefs.h"
4349
4350 /* Override any gcc2 internal prototype to avoid an error.  */
4351 #ifdef __cplusplus
4352 extern "C"
4353 #endif
4354 /* We use char because int might match the return type of a gcc2
4355    builtin and then its argument prototype would still apply.  */
4356 char tgetent ();
4357 int
4358 main ()
4359 {
4360 tgetent ();
4361   ;
4362   return 0;
4363 }
4364 _ACEOF
4365 rm -f conftest.$ac_objext conftest$ac_exeext
4366 if { (eval echo "$as_me:4372: \"$ac_link\"") >&5
4367   (eval $ac_link) 2>&5
4368   ac_status=$?
4369   echo "$as_me:4375: \$? = $ac_status" >&5
4370   (exit $ac_status); } &&
4371          { ac_try='test -s conftest$ac_exeext'
4372   { (eval echo "$as_me:4378: \"$ac_try\"") >&5
4373   (eval $ac_try) 2>&5
4374   ac_status=$?
4375   echo "$as_me:4381: \$? = $ac_status" >&5
4376   (exit $ac_status); }; }; then
4377   ac_cv_lib_termcap_tgetent=yes
4378 else
4379   echo "$as_me: failed program was:" >&5
4380 cat conftest.$ac_ext >&5
4381 ac_cv_lib_termcap_tgetent=no
4382 fi
4383 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4384 LIBS=$ac_check_lib_save_LIBS
4385 fi
4386 echo "$as_me:4392: result: $ac_cv_lib_termcap_tgetent" >&5
4387 echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6
4388 if test $ac_cv_lib_termcap_tgetent = yes; then
4389   bash_cv_termcap_lib=libtermcap
4390 else
4391   echo "$as_me:4397: checking for tgetent in -ltinfo" >&5
4392 echo $ECHO_N "checking for tgetent in -ltinfo... $ECHO_C" >&6
4393 if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then
4394   echo $ECHO_N "(cached) $ECHO_C" >&6
4395 else
4396   ac_check_lib_save_LIBS=$LIBS
4397 LIBS="-ltinfo  $LIBS"
4398 cat >conftest.$ac_ext <<_ACEOF
4399 #line 4405 "configure"
4400 #include "confdefs.h"
4401
4402 /* Override any gcc2 internal prototype to avoid an error.  */
4403 #ifdef __cplusplus
4404 extern "C"
4405 #endif
4406 /* We use char because int might match the return type of a gcc2
4407    builtin and then its argument prototype would still apply.  */
4408 char tgetent ();
4409 int
4410 main ()
4411 {
4412 tgetent ();
4413   ;
4414   return 0;
4415 }
4416 _ACEOF
4417 rm -f conftest.$ac_objext conftest$ac_exeext
4418 if { (eval echo "$as_me:4424: \"$ac_link\"") >&5
4419   (eval $ac_link) 2>&5
4420   ac_status=$?
4421   echo "$as_me:4427: \$? = $ac_status" >&5
4422   (exit $ac_status); } &&
4423          { ac_try='test -s conftest$ac_exeext'
4424   { (eval echo "$as_me:4430: \"$ac_try\"") >&5
4425   (eval $ac_try) 2>&5
4426   ac_status=$?
4427   echo "$as_me:4433: \$? = $ac_status" >&5
4428   (exit $ac_status); }; }; then
4429   ac_cv_lib_tinfo_tgetent=yes
4430 else
4431   echo "$as_me: failed program was:" >&5
4432 cat conftest.$ac_ext >&5
4433 ac_cv_lib_tinfo_tgetent=no
4434 fi
4435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4436 LIBS=$ac_check_lib_save_LIBS
4437 fi
4438 echo "$as_me:4444: result: $ac_cv_lib_tinfo_tgetent" >&5
4439 echo "${ECHO_T}$ac_cv_lib_tinfo_tgetent" >&6
4440 if test $ac_cv_lib_tinfo_tgetent = yes; then
4441   bash_cv_termcap_lib=libtinfo
4442 else
4443   echo "$as_me:4449: checking for tgetent in -lcurses" >&5
4444 echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6
4445 if test "${ac_cv_lib_curses_tgetent+set}" = set; then
4446   echo $ECHO_N "(cached) $ECHO_C" >&6
4447 else
4448   ac_check_lib_save_LIBS=$LIBS
4449 LIBS="-lcurses  $LIBS"
4450 cat >conftest.$ac_ext <<_ACEOF
4451 #line 4457 "configure"
4452 #include "confdefs.h"
4453
4454 /* Override any gcc2 internal prototype to avoid an error.  */
4455 #ifdef __cplusplus
4456 extern "C"
4457 #endif
4458 /* We use char because int might match the return type of a gcc2
4459    builtin and then its argument prototype would still apply.  */
4460 char tgetent ();
4461 int
4462 main ()
4463 {
4464 tgetent ();
4465   ;
4466   return 0;
4467 }
4468 _ACEOF
4469 rm -f conftest.$ac_objext conftest$ac_exeext
4470 if { (eval echo "$as_me:4476: \"$ac_link\"") >&5
4471   (eval $ac_link) 2>&5
4472   ac_status=$?
4473   echo "$as_me:4479: \$? = $ac_status" >&5
4474   (exit $ac_status); } &&
4475          { ac_try='test -s conftest$ac_exeext'
4476   { (eval echo "$as_me:4482: \"$ac_try\"") >&5
4477   (eval $ac_try) 2>&5
4478   ac_status=$?
4479   echo "$as_me:4485: \$? = $ac_status" >&5
4480   (exit $ac_status); }; }; then
4481   ac_cv_lib_curses_tgetent=yes
4482 else
4483   echo "$as_me: failed program was:" >&5
4484 cat conftest.$ac_ext >&5
4485 ac_cv_lib_curses_tgetent=no
4486 fi
4487 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4488 LIBS=$ac_check_lib_save_LIBS
4489 fi
4490 echo "$as_me:4496: result: $ac_cv_lib_curses_tgetent" >&5
4491 echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6
4492 if test $ac_cv_lib_curses_tgetent = yes; then
4493   bash_cv_termcap_lib=libcurses
4494 else
4495   echo "$as_me:4501: checking for tgetent in -lncurses" >&5
4496 echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6
4497 if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then
4498   echo $ECHO_N "(cached) $ECHO_C" >&6
4499 else
4500   ac_check_lib_save_LIBS=$LIBS
4501 LIBS="-lncurses  $LIBS"
4502 cat >conftest.$ac_ext <<_ACEOF
4503 #line 4509 "configure"
4504 #include "confdefs.h"
4505
4506 /* Override any gcc2 internal prototype to avoid an error.  */
4507 #ifdef __cplusplus
4508 extern "C"
4509 #endif
4510 /* We use char because int might match the return type of a gcc2
4511    builtin and then its argument prototype would still apply.  */
4512 char tgetent ();
4513 int
4514 main ()
4515 {
4516 tgetent ();
4517   ;
4518   return 0;
4519 }
4520 _ACEOF
4521 rm -f conftest.$ac_objext conftest$ac_exeext
4522 if { (eval echo "$as_me:4528: \"$ac_link\"") >&5
4523   (eval $ac_link) 2>&5
4524   ac_status=$?
4525   echo "$as_me:4531: \$? = $ac_status" >&5
4526   (exit $ac_status); } &&
4527          { ac_try='test -s conftest$ac_exeext'
4528   { (eval echo "$as_me:4534: \"$ac_try\"") >&5
4529   (eval $ac_try) 2>&5
4530   ac_status=$?
4531   echo "$as_me:4537: \$? = $ac_status" >&5
4532   (exit $ac_status); }; }; then
4533   ac_cv_lib_ncurses_tgetent=yes
4534 else
4535   echo "$as_me: failed program was:" >&5
4536 cat conftest.$ac_ext >&5
4537 ac_cv_lib_ncurses_tgetent=no
4538 fi
4539 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4540 LIBS=$ac_check_lib_save_LIBS
4541 fi
4542 echo "$as_me:4548: result: $ac_cv_lib_ncurses_tgetent" >&5
4543 echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6
4544 if test $ac_cv_lib_ncurses_tgetent = yes; then
4545   bash_cv_termcap_lib=libncurses
4546 else
4547   bash_cv_termcap_lib=gnutermcap
4548 fi
4549
4550 fi
4551
4552 fi
4553
4554 fi
4555
4556 fi
4557
4558 if test "X$_bash_needmsg" = "Xyes"; then
4559 echo "$as_me:4565: checking which library has the termcap functions" >&5
4560 echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6
4561 fi
4562 echo "$as_me:4568: result: using $bash_cv_termcap_lib" >&5
4563 echo "${ECHO_T}using $bash_cv_termcap_lib" >&6
4564 if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
4565 LDFLAGS="$LDFLAGS -L./lib/termcap"
4566 TERMCAP_LIB="./lib/termcap/libtermcap.a"
4567 TERMCAP_DEP="./lib/termcap/libtermcap.a"
4568 elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
4569 TERMCAP_LIB=-ltermcap
4570 TERMCAP_DEP=
4571 elif test $bash_cv_termcap_lib = libtinfo; then
4572 TERMCAP_LIB=-ltinfo
4573 TERMCAP_DEP=
4574 elif test $bash_cv_termcap_lib = libncurses; then
4575 TERMCAP_LIB=-lncurses
4576 TERMCAP_DEP=
4577 else
4578 TERMCAP_LIB=-lcurses
4579 TERMCAP_DEP=
4580 fi
4581
4582 if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
4583         if test "$prefer_curses" = yes; then
4584                 TERMCAP_LIB=-lcurses
4585         else
4586                 TERMCAP_LIB=-ltermcap   #default
4587         fi
4588 fi
4589
4590 for ac_header in wctype.h
4591 do
4592 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4593 echo "$as_me:4599: checking for $ac_header" >&5
4594 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4595 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4596   echo $ECHO_N "(cached) $ECHO_C" >&6
4597 else
4598   cat >conftest.$ac_ext <<_ACEOF
4599 #line 4605 "configure"
4600 #include "confdefs.h"
4601 #include <$ac_header>
4602 _ACEOF
4603 if { (eval echo "$as_me:4609: \"$ac_cpp conftest.$ac_ext\"") >&5
4604   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4605   ac_status=$?
4606   egrep -v '^ *\+' conftest.er1 >conftest.err
4607   rm -f conftest.er1
4608   cat conftest.err >&5
4609   echo "$as_me:4615: \$? = $ac_status" >&5
4610   (exit $ac_status); } >/dev/null; then
4611   if test -s conftest.err; then
4612     ac_cpp_err=$ac_c_preproc_warn_flag
4613   else
4614     ac_cpp_err=
4615   fi
4616 else
4617   ac_cpp_err=yes
4618 fi
4619 if test -z "$ac_cpp_err"; then
4620   eval "$as_ac_Header=yes"
4621 else
4622   echo "$as_me: failed program was:" >&5
4623   cat conftest.$ac_ext >&5
4624   eval "$as_ac_Header=no"
4625 fi
4626 rm -f conftest.err conftest.$ac_ext
4627 fi
4628 echo "$as_me:4634: result: `eval echo '${'$as_ac_Header'}'`" >&5
4629 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4630 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4631   cat >>confdefs.h <<EOF
4632 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4633 EOF
4634
4635 fi
4636 done
4637
4638 for ac_header in wchar.h
4639 do
4640 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4641 echo "$as_me:4647: checking for $ac_header" >&5
4642 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4643 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4644   echo $ECHO_N "(cached) $ECHO_C" >&6
4645 else
4646   cat >conftest.$ac_ext <<_ACEOF
4647 #line 4653 "configure"
4648 #include "confdefs.h"
4649 #include <$ac_header>
4650 _ACEOF
4651 if { (eval echo "$as_me:4657: \"$ac_cpp conftest.$ac_ext\"") >&5
4652   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4653   ac_status=$?
4654   egrep -v '^ *\+' conftest.er1 >conftest.err
4655   rm -f conftest.er1
4656   cat conftest.err >&5
4657   echo "$as_me:4663: \$? = $ac_status" >&5
4658   (exit $ac_status); } >/dev/null; then
4659   if test -s conftest.err; then
4660     ac_cpp_err=$ac_c_preproc_warn_flag
4661   else
4662     ac_cpp_err=
4663   fi
4664 else
4665   ac_cpp_err=yes
4666 fi
4667 if test -z "$ac_cpp_err"; then
4668   eval "$as_ac_Header=yes"
4669 else
4670   echo "$as_me: failed program was:" >&5
4671   cat conftest.$ac_ext >&5
4672   eval "$as_ac_Header=no"
4673 fi
4674 rm -f conftest.err conftest.$ac_ext
4675 fi
4676 echo "$as_me:4682: result: `eval echo '${'$as_ac_Header'}'`" >&5
4677 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4678 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4679   cat >>confdefs.h <<EOF
4680 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4681 EOF
4682
4683 fi
4684 done
4685
4686 for ac_header in langinfo.h
4687 do
4688 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4689 echo "$as_me:4695: checking for $ac_header" >&5
4690 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4691 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4692   echo $ECHO_N "(cached) $ECHO_C" >&6
4693 else
4694   cat >conftest.$ac_ext <<_ACEOF
4695 #line 4701 "configure"
4696 #include "confdefs.h"
4697 #include <$ac_header>
4698 _ACEOF
4699 if { (eval echo "$as_me:4705: \"$ac_cpp conftest.$ac_ext\"") >&5
4700   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4701   ac_status=$?
4702   egrep -v '^ *\+' conftest.er1 >conftest.err
4703   rm -f conftest.er1
4704   cat conftest.err >&5
4705   echo "$as_me:4711: \$? = $ac_status" >&5
4706   (exit $ac_status); } >/dev/null; then
4707   if test -s conftest.err; then
4708     ac_cpp_err=$ac_c_preproc_warn_flag
4709   else
4710     ac_cpp_err=
4711   fi
4712 else
4713   ac_cpp_err=yes
4714 fi
4715 if test -z "$ac_cpp_err"; then
4716   eval "$as_ac_Header=yes"
4717 else
4718   echo "$as_me: failed program was:" >&5
4719   cat conftest.$ac_ext >&5
4720   eval "$as_ac_Header=no"
4721 fi
4722 rm -f conftest.err conftest.$ac_ext
4723 fi
4724 echo "$as_me:4730: result: `eval echo '${'$as_ac_Header'}'`" >&5
4725 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4726 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4727   cat >>confdefs.h <<EOF
4728 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4729 EOF
4730
4731 fi
4732 done
4733
4734 echo "$as_me:4740: checking for mbsrtowcs" >&5
4735 echo $ECHO_N "checking for mbsrtowcs... $ECHO_C" >&6
4736 if test "${ac_cv_func_mbsrtowcs+set}" = set; then
4737   echo $ECHO_N "(cached) $ECHO_C" >&6
4738 else
4739   cat >conftest.$ac_ext <<_ACEOF
4740 #line 4746 "configure"
4741 #include "confdefs.h"
4742 /* System header to define __stub macros and hopefully few prototypes,
4743     which can conflict with char mbsrtowcs (); below.  */
4744 #include <assert.h>
4745 /* Override any gcc2 internal prototype to avoid an error.  */
4746 #ifdef __cplusplus
4747 extern "C"
4748 #endif
4749 /* We use char because int might match the return type of a gcc2
4750    builtin and then its argument prototype would still apply.  */
4751 char mbsrtowcs ();
4752 char (*f) ();
4753
4754 int
4755 main ()
4756 {
4757 /* The GNU C library defines this for functions which it implements
4758     to always fail with ENOSYS.  Some functions are actually named
4759     something starting with __ and the normal name is an alias.  */
4760 #if defined (__stub_mbsrtowcs) || defined (__stub___mbsrtowcs)
4761 choke me
4762 #else
4763 f = mbsrtowcs;
4764 #endif
4765
4766   ;
4767   return 0;
4768 }
4769 _ACEOF
4770 rm -f conftest.$ac_objext conftest$ac_exeext
4771 if { (eval echo "$as_me:4777: \"$ac_link\"") >&5
4772   (eval $ac_link) 2>&5
4773   ac_status=$?
4774   echo "$as_me:4780: \$? = $ac_status" >&5
4775   (exit $ac_status); } &&
4776          { ac_try='test -s conftest$ac_exeext'
4777   { (eval echo "$as_me:4783: \"$ac_try\"") >&5
4778   (eval $ac_try) 2>&5
4779   ac_status=$?
4780   echo "$as_me:4786: \$? = $ac_status" >&5
4781   (exit $ac_status); }; }; then
4782   ac_cv_func_mbsrtowcs=yes
4783 else
4784   echo "$as_me: failed program was:" >&5
4785 cat conftest.$ac_ext >&5
4786 ac_cv_func_mbsrtowcs=no
4787 fi
4788 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4789 fi
4790 echo "$as_me:4796: result: $ac_cv_func_mbsrtowcs" >&5
4791 echo "${ECHO_T}$ac_cv_func_mbsrtowcs" >&6
4792 if test $ac_cv_func_mbsrtowcs = yes; then
4793   cat >>confdefs.h <<\EOF
4794 #define HAVE_MBSRTOWCS 1
4795 EOF
4796
4797 fi
4798
4799 echo "$as_me:4805: checking for wcwidth" >&5
4800 echo $ECHO_N "checking for wcwidth... $ECHO_C" >&6
4801 if test "${ac_cv_func_wcwidth+set}" = set; then
4802   echo $ECHO_N "(cached) $ECHO_C" >&6
4803 else
4804   cat >conftest.$ac_ext <<_ACEOF
4805 #line 4811 "configure"
4806 #include "confdefs.h"
4807 /* System header to define __stub macros and hopefully few prototypes,
4808     which can conflict with char wcwidth (); below.  */
4809 #include <assert.h>
4810 /* Override any gcc2 internal prototype to avoid an error.  */
4811 #ifdef __cplusplus
4812 extern "C"
4813 #endif
4814 /* We use char because int might match the return type of a gcc2
4815    builtin and then its argument prototype would still apply.  */
4816 char wcwidth ();
4817 char (*f) ();
4818
4819 int
4820 main ()
4821 {
4822 /* The GNU C library defines this for functions which it implements
4823     to always fail with ENOSYS.  Some functions are actually named
4824     something starting with __ and the normal name is an alias.  */
4825 #if defined (__stub_wcwidth) || defined (__stub___wcwidth)
4826 choke me
4827 #else
4828 f = wcwidth;
4829 #endif
4830
4831   ;
4832   return 0;
4833 }
4834 _ACEOF
4835 rm -f conftest.$ac_objext conftest$ac_exeext
4836 if { (eval echo "$as_me:4842: \"$ac_link\"") >&5
4837   (eval $ac_link) 2>&5
4838   ac_status=$?
4839   echo "$as_me:4845: \$? = $ac_status" >&5
4840   (exit $ac_status); } &&
4841          { ac_try='test -s conftest$ac_exeext'
4842   { (eval echo "$as_me:4848: \"$ac_try\"") >&5
4843   (eval $ac_try) 2>&5
4844   ac_status=$?
4845   echo "$as_me:4851: \$? = $ac_status" >&5
4846   (exit $ac_status); }; }; then
4847   ac_cv_func_wcwidth=yes
4848 else
4849   echo "$as_me: failed program was:" >&5
4850 cat conftest.$ac_ext >&5
4851 ac_cv_func_wcwidth=no
4852 fi
4853 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4854 fi
4855 echo "$as_me:4861: result: $ac_cv_func_wcwidth" >&5
4856 echo "${ECHO_T}$ac_cv_func_wcwidth" >&6
4857 if test $ac_cv_func_wcwidth = yes; then
4858   cat >>confdefs.h <<\EOF
4859 #define HAVE_WCWIDTH 1
4860 EOF
4861
4862 fi
4863
4864 echo "$as_me:4870: checking for mbstate_t" >&5
4865 echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
4866 if test "${bash_cv_have_mbstate_t+set}" = set; then
4867   echo $ECHO_N "(cached) $ECHO_C" >&6
4868 else
4869   if test "$cross_compiling" = yes; then
4870   { { echo "$as_me:4876: error: cannot run test program while cross compiling" >&5
4871 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4872    { (exit 1); exit 1; }; }
4873 else
4874   cat >conftest.$ac_ext <<_ACEOF
4875 #line 4881 "configure"
4876 #include "confdefs.h"
4877
4878 #include <wchar.h>
4879 int
4880 main ()
4881 {
4882   mbstate_t ps;
4883   return 0;
4884 }
4885 _ACEOF
4886 rm -f conftest$ac_exeext
4887 if { (eval echo "$as_me:4893: \"$ac_link\"") >&5
4888   (eval $ac_link) 2>&5
4889   ac_status=$?
4890   echo "$as_me:4896: \$? = $ac_status" >&5
4891   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4892   { (eval echo "$as_me:4898: \"$ac_try\"") >&5
4893   (eval $ac_try) 2>&5
4894   ac_status=$?
4895   echo "$as_me:4901: \$? = $ac_status" >&5
4896   (exit $ac_status); }; }; then
4897   bash_cv_have_mbstate_t=yes
4898 else
4899   echo "$as_me: program exited with status $ac_status" >&5
4900 echo "$as_me: failed program was:" >&5
4901 cat conftest.$ac_ext >&5
4902 bash_cv_have_mbstate_t=no
4903 fi
4904 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4905 fi
4906 fi
4907 echo "$as_me:4913: result: $bash_cv_have_mbstate_t" >&5
4908 echo "${ECHO_T}$bash_cv_have_mbstate_t" >&6
4909 if test $bash_cv_have_mbstate_t = yes; then
4910         cat >>confdefs.h <<\EOF
4911 #define HAVE_MBSTATE_T 1
4912 EOF
4913
4914 fi
4915
4916 echo "$as_me:4922: checking for nl_langinfo and CODESET" >&5
4917 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
4918 if test "${bash_cv_langinfo_codeset+set}" = set; then
4919   echo $ECHO_N "(cached) $ECHO_C" >&6
4920 else
4921   cat >conftest.$ac_ext <<_ACEOF
4922 #line 4928 "configure"
4923 #include "confdefs.h"
4924 #include <langinfo.h>
4925 int
4926 main ()
4927 {
4928 char* cs = nl_langinfo(CODESET);
4929   ;
4930   return 0;
4931 }
4932 _ACEOF
4933 rm -f conftest.$ac_objext conftest$ac_exeext
4934 if { (eval echo "$as_me:4940: \"$ac_link\"") >&5
4935   (eval $ac_link) 2>&5
4936   ac_status=$?
4937   echo "$as_me:4943: \$? = $ac_status" >&5
4938   (exit $ac_status); } &&
4939          { ac_try='test -s conftest$ac_exeext'
4940   { (eval echo "$as_me:4946: \"$ac_try\"") >&5
4941   (eval $ac_try) 2>&5
4942   ac_status=$?
4943   echo "$as_me:4949: \$? = $ac_status" >&5
4944   (exit $ac_status); }; }; then
4945   bash_cv_langinfo_codeset=yes
4946 else
4947   echo "$as_me: failed program was:" >&5
4948 cat conftest.$ac_ext >&5
4949 bash_cv_langinfo_codeset=no
4950 fi
4951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4952 fi
4953 echo "$as_me:4959: result: $bash_cv_langinfo_codeset" >&5
4954 echo "${ECHO_T}$bash_cv_langinfo_codeset" >&6
4955 if test $bash_cv_langinfo_codeset = yes; then
4956   cat >>confdefs.h <<\EOF
4957 #define HAVE_LANGINFO_CODESET 1
4958 EOF
4959
4960 fi
4961
4962 case "$host_cpu" in
4963 *cray*) LOCAL_CFLAGS=-DCRAY ;;
4964 *s390*) LOCAL_CFLAGS=-fsigned-char ;;
4965 esac
4966
4967 case "$host_os" in
4968 isc*)   LOCAL_CFLAGS=-Disc386 ;;
4969 esac
4970
4971 # shared library configuration section
4972 #
4973 # Shared object configuration section.  These values are generated by
4974 # ${srcdir}/support/shobj-conf
4975 #
4976 if test -f ${srcdir}/support/shobj-conf; then
4977         echo "$as_me:4983: checking configuration for building shared libraries" >&5
4978 echo $ECHO_N "checking configuration for building shared libraries... $ECHO_C" >&6
4979         eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
4980
4981         echo "$as_me:4987: result: $SHLIB_STATUS" >&5
4982 echo "${ECHO_T}$SHLIB_STATUS" >&6
4983
4984         # SHLIB_STATUS is either `supported' or `unsupported'.  If it's
4985         # `unsupported', turn off any default shared library building
4986         if test "$SHLIB_STATUS" = 'unsupported'; then
4987                 opt_shared_libs=no
4988         fi
4989
4990         # shared library versioning
4991         # quoted for m4 so I can use character classes
4992         SHLIB_MAJOR=`expr "$LIBVERSION" : '\([0-9]\)\..*'`
4993         SHLIB_MINOR=`expr "$LIBVERSION" : '[0-9]\.\([0-9]\).*'`
4994
4995 fi
4996
4997 if test "$opt_static_libs" = "yes"; then
4998         STATIC_TARGET=static
4999         STATIC_INSTALL_TARGET=install-static
5000 fi
5001 if test "$opt_shared_libs" = "yes"; then
5002         SHARED_TARGET=shared
5003         SHARED_INSTALL_TARGET=install-shared
5004 fi
5005
5006 case "$host_os" in
5007 msdosdjgpp*)    BUILD_DIR=`pwd.exe` ;;  # to prevent //d/path/file
5008 *)              BUILD_DIR=`pwd` ;;
5009 esac
5010
5011 ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile shlib/Makefile"
5012 ac_config_commands="$ac_config_commands default"
5013 cat >confcache <<\_ACEOF
5014 # This file is a shell script that caches the results of configure
5015 # tests run on this system so they can be shared between configure
5016 # scripts and configure runs, see configure's option --config-cache.
5017 # It is not useful on other systems.  If it contains results you don't
5018 # want to keep, you may remove or edit it.
5019 #
5020 # config.status only pays attention to the cache file if you give it
5021 # the --recheck option to rerun configure.
5022 #
5023 # `ac_cv_env_foo' variables (set or unset) will be overriden when
5024 # loading this file, other *unset* `ac_cv_foo' will be assigned the
5025 # following values.
5026
5027 _ACEOF
5028
5029 # The following way of writing the cache mishandles newlines in values,
5030 # but we know of no workaround that is simple, portable, and efficient.
5031 # So, don't put newlines in cache variables' values.
5032 # Ultrix sh set writes to stderr and can't be redirected directly,
5033 # and sets the high bit in the cache file unless we assign to the vars.
5034 {
5035   (set) 2>&1 |
5036     case `(ac_space=' '; set | grep ac_space) 2>&1` in
5037     *ac_space=\ *)
5038       # `set' does not quote correctly, so add quotes (double-quote
5039       # substitution turns \\\\ into \\, and sed turns \\ into \).
5040       sed -n \
5041         "s/'/'\\\\''/g;
5042           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5043       ;;
5044     *)
5045       # `set' quotes correctly as required by POSIX, so do not add quotes.
5046       sed -n \
5047         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
5048       ;;
5049     esac;
5050 } |
5051   sed '
5052      t clear
5053      : clear
5054      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
5055      t end
5056      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
5057      : end' >>confcache
5058 if cmp -s $cache_file confcache; then :; else
5059   if test -w $cache_file; then
5060     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
5061     cat confcache >$cache_file
5062   else
5063     echo "not updating unwritable cache $cache_file"
5064   fi
5065 fi
5066 rm -f confcache
5067
5068 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5069 # Let make expand exec_prefix.
5070 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5071
5072 # VPATH may cause trouble with some makes, so we remove $(srcdir),
5073 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
5074 # trailing colons and then remove the whole line if VPATH becomes empty
5075 # (actually we leave an empty line to preserve line numbers).
5076 if test "x$srcdir" = x.; then
5077   ac_vpsub='/^[         ]*VPATH[        ]*=/{
5078 s/:*\$(srcdir):*/:/;
5079 s/:*\${srcdir}:*/:/;
5080 s/:*@srcdir@:*/:/;
5081 s/^\([^=]*=[    ]*\):*/\1/;
5082 s/:*$//;
5083 s/^[^=]*=[      ]*$//;
5084 }'
5085 fi
5086
5087 DEFS=-DHAVE_CONFIG_H
5088
5089 : ${CONFIG_STATUS=./config.status}
5090 ac_clean_files_save=$ac_clean_files
5091 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
5092 { echo "$as_me:5098: creating $CONFIG_STATUS" >&5
5093 echo "$as_me: creating $CONFIG_STATUS" >&6;}
5094 cat >$CONFIG_STATUS <<_ACEOF
5095 #! $SHELL
5096 # Generated automatically by configure.
5097 # Run this file to recreate the current configuration.
5098 # Compiler output produced by configure, useful for debugging
5099 # configure, is in config.log if it exists.
5100
5101 debug=false
5102 SHELL=\${CONFIG_SHELL-$SHELL}
5103 ac_cs_invocation="\$0 \$@"
5104
5105 _ACEOF
5106
5107 cat >>$CONFIG_STATUS <<\_ACEOF
5108 # Be Bourne compatible
5109 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
5110   emulate sh
5111   NULLCMD=:
5112 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
5113   set -o posix
5114 fi
5115
5116 # Name of the executable.
5117 as_me=`echo "$0" |sed 's,.*[\\/],,'`
5118
5119 if expr a : '\(a\)' >/dev/null 2>&1; then
5120   as_expr=expr
5121 else
5122   as_expr=false
5123 fi
5124
5125 rm -f conf$$ conf$$.exe conf$$.file
5126 echo >conf$$.file
5127 if ln -s conf$$.file conf$$ 2>/dev/null; then
5128   # We could just check for DJGPP; but this test a) works b) is more generic
5129   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
5130   if test -f conf$$.exe; then
5131     # Don't use ln at all; we don't have any links
5132     as_ln_s='cp -p'
5133   else
5134     as_ln_s='ln -s'
5135   fi
5136 elif ln conf$$.file conf$$ 2>/dev/null; then
5137   as_ln_s=ln
5138 else
5139   as_ln_s='cp -p'
5140 fi
5141 rm -f conf$$ conf$$.exe conf$$.file
5142
5143 as_executable_p="test -f"
5144
5145 # Support unset when possible.
5146 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
5147   as_unset=unset
5148 else
5149   as_unset=false
5150 fi
5151
5152 # NLS nuisances.
5153 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
5154 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
5155 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
5156 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
5157 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
5158 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
5159 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
5160 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
5161
5162 # IFS
5163 # We need space, tab and new line, in precisely that order.
5164 as_nl='
5165 '
5166 IFS="   $as_nl"
5167
5168 # CDPATH.
5169 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
5170
5171 exec 6>&1
5172
5173 _ACEOF
5174
5175 # Files that config.status was made for.
5176 if test -n "$ac_config_files"; then
5177   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
5178 fi
5179
5180 if test -n "$ac_config_headers"; then
5181   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
5182 fi
5183
5184 if test -n "$ac_config_links"; then
5185   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
5186 fi
5187
5188 if test -n "$ac_config_commands"; then
5189   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
5190 fi
5191
5192 cat >>$CONFIG_STATUS <<\EOF
5193
5194 ac_cs_usage="\
5195 \`$as_me' instantiates files from templates according to the
5196 current configuration.
5197
5198 Usage: $0 [OPTIONS] [FILE]...
5199
5200   -h, --help       print this help, then exit
5201   -V, --version    print version number, then exit
5202   -d, --debug      don't remove temporary files
5203       --recheck    update $as_me by reconfiguring in the same conditions
5204   --file=FILE[:TEMPLATE]
5205                    instantiate the configuration file FILE
5206   --header=FILE[:TEMPLATE]
5207                    instantiate the configuration header FILE
5208
5209 Configuration files:
5210 $config_files
5211
5212 Configuration headers:
5213 $config_headers
5214
5215 Configuration commands:
5216 $config_commands
5217
5218 Report bugs to <bug-autoconf@gnu.org>."
5219 EOF
5220
5221 cat >>$CONFIG_STATUS <<EOF
5222 ac_cs_version="\\
5223 readline config.status 4.3
5224 configured by $0, generated by GNU Autoconf 2.52,
5225   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
5226
5227 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
5228 Free Software Foundation, Inc.
5229 This config.status script is free software; the Free Software Foundation
5230 gives unlimited permission to copy, distribute and modify it."
5231 srcdir=$srcdir
5232 INSTALL="$INSTALL"
5233 EOF
5234
5235 cat >>$CONFIG_STATUS <<\EOF
5236 # If no file are specified by the user, then we need to provide default
5237 # value.  By we need to know if files were specified by the user.
5238 ac_need_defaults=:
5239 while test $# != 0
5240 do
5241   case $1 in
5242   --*=*)
5243     ac_option=`expr "x$1" : 'x\([^=]*\)='`
5244     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
5245     shift
5246     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
5247     shift
5248     ;;
5249   -*);;
5250   *) # This is not an option, so the user has probably given explicit
5251      # arguments.
5252      ac_need_defaults=false;;
5253   esac
5254
5255   case $1 in
5256   # Handling of the options.
5257 EOF
5258 cat >>$CONFIG_STATUS <<EOF
5259   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5260     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
5261     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
5262 EOF
5263 cat >>$CONFIG_STATUS <<\EOF
5264   --version | --vers* | -V )
5265     echo "$ac_cs_version"; exit 0 ;;
5266   --he | --h)
5267     # Conflict between --help and --header
5268     { { echo "$as_me:5274: error: ambiguous option: $1
5269 Try \`$0 --help' for more information." >&5
5270 echo "$as_me: error: ambiguous option: $1
5271 Try \`$0 --help' for more information." >&2;}
5272    { (exit 1); exit 1; }; };;
5273   --help | --hel | -h )
5274     echo "$ac_cs_usage"; exit 0 ;;
5275   --debug | --d* | -d )
5276     debug=: ;;
5277   --file | --fil | --fi | --f )
5278     shift
5279     CONFIG_FILES="$CONFIG_FILES $1"
5280     ac_need_defaults=false;;
5281   --header | --heade | --head | --hea )
5282     shift
5283     CONFIG_HEADERS="$CONFIG_HEADERS $1"
5284     ac_need_defaults=false;;
5285
5286   # This is an error.
5287   -*) { { echo "$as_me:5293: error: unrecognized option: $1
5288 Try \`$0 --help' for more information." >&5
5289 echo "$as_me: error: unrecognized option: $1
5290 Try \`$0 --help' for more information." >&2;}
5291    { (exit 1); exit 1; }; } ;;
5292
5293   *) ac_config_targets="$ac_config_targets $1" ;;
5294
5295   esac
5296   shift
5297 done
5298
5299 exec 5>>config.log
5300 cat >&5 << _ACEOF
5301
5302 ## ----------------------- ##
5303 ## Running config.status.  ##
5304 ## ----------------------- ##
5305
5306 This file was extended by $as_me (readline 4.3) 2.52, executed with
5307   CONFIG_FILES    = $CONFIG_FILES
5308   CONFIG_HEADERS  = $CONFIG_HEADERS
5309   CONFIG_LINKS    = $CONFIG_LINKS
5310   CONFIG_COMMANDS = $CONFIG_COMMANDS
5311   > $ac_cs_invocation
5312 on `(hostname || uname -n) 2>/dev/null | sed 1q`
5313
5314 _ACEOF
5315 EOF
5316
5317 cat >>$CONFIG_STATUS <<\EOF
5318 for ac_config_target in $ac_config_targets
5319 do
5320   case "$ac_config_target" in
5321   # Handling of arguments.
5322   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
5323   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
5324   "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
5325   "shlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES shlib/Makefile" ;;
5326   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
5327   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
5328   *) { { echo "$as_me:5334: error: invalid argument: $ac_config_target" >&5
5329 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
5330    { (exit 1); exit 1; }; };;
5331   esac
5332 done
5333
5334 # If the user did not use the arguments to specify the items to instantiate,
5335 # then the envvar interface is used.  Set only those that are not.
5336 # We use the long form for the default assignment because of an extremely
5337 # bizarre bug on SunOS 4.1.3.
5338 if $ac_need_defaults; then
5339   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
5340   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
5341   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
5342 fi
5343
5344 # Create a temporary directory, and hook for its removal unless debugging.
5345 $debug ||
5346 {
5347   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
5348   trap '{ (exit 1); exit 1; }' 1 2 13 15
5349 }
5350
5351 # Create a (secure) tmp directory for tmp files.
5352 : ${TMPDIR=/tmp}
5353 {
5354   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
5355   test -n "$tmp" && test -d "$tmp"
5356 }  ||
5357 {
5358   tmp=$TMPDIR/cs$$-$RANDOM
5359   (umask 077 && mkdir $tmp)
5360 } ||
5361 {
5362    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
5363    { (exit 1); exit 1; }
5364 }
5365
5366 EOF
5367
5368 cat >>$CONFIG_STATUS <<EOF
5369
5370 #
5371 # CONFIG_FILES section.
5372 #
5373
5374 # No need to generate the scripts if there are no CONFIG_FILES.
5375 # This happens for instance when ./config.status config.h
5376 if test -n "\$CONFIG_FILES"; then
5377   # Protect against being on the right side of a sed subst in config.status.
5378   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
5379    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
5380 s,@SHELL@,$SHELL,;t t
5381 s,@exec_prefix@,$exec_prefix,;t t
5382 s,@prefix@,$prefix,;t t
5383 s,@program_transform_name@,$program_transform_name,;t t
5384 s,@bindir@,$bindir,;t t
5385 s,@sbindir@,$sbindir,;t t
5386 s,@libexecdir@,$libexecdir,;t t
5387 s,@datadir@,$datadir,;t t
5388 s,@sysconfdir@,$sysconfdir,;t t
5389 s,@sharedstatedir@,$sharedstatedir,;t t
5390 s,@localstatedir@,$localstatedir,;t t
5391 s,@libdir@,$libdir,;t t
5392 s,@includedir@,$includedir,;t t
5393 s,@oldincludedir@,$oldincludedir,;t t
5394 s,@infodir@,$infodir,;t t
5395 s,@mandir@,$mandir,;t t
5396 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
5397 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
5398 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
5399 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
5400 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
5401 s,@build_alias@,$build_alias,;t t
5402 s,@host_alias@,$host_alias,;t t
5403 s,@target_alias@,$target_alias,;t t
5404 s,@ECHO_C@,$ECHO_C,;t t
5405 s,@ECHO_N@,$ECHO_N,;t t
5406 s,@ECHO_T@,$ECHO_T,;t t
5407 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
5408 s,@DEFS@,$DEFS,;t t
5409 s,@LIBS@,$LIBS,;t t
5410 s,@build@,$build,;t t
5411 s,@build_cpu@,$build_cpu,;t t
5412 s,@build_vendor@,$build_vendor,;t t
5413 s,@build_os@,$build_os,;t t
5414 s,@host@,$host,;t t
5415 s,@host_cpu@,$host_cpu,;t t
5416 s,@host_vendor@,$host_vendor,;t t
5417 s,@host_os@,$host_os,;t t
5418 s,@SET_MAKE@,$SET_MAKE,;t t
5419 s,@CC@,$CC,;t t
5420 s,@CFLAGS@,$CFLAGS,;t t
5421 s,@LDFLAGS@,$LDFLAGS,;t t
5422 s,@CPPFLAGS@,$CPPFLAGS,;t t
5423 s,@ac_ct_CC@,$ac_ct_CC,;t t
5424 s,@EXEEXT@,$EXEEXT,;t t
5425 s,@OBJEXT@,$OBJEXT,;t t
5426 s,@CPP@,$CPP,;t t
5427 s,@CROSS_COMPILING_FLAG@,$CROSS_COMPILING_FLAG,;t t
5428 s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
5429 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
5430 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
5431 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
5432 s,@AR@,$AR,;t t
5433 s,@RANLIB@,$RANLIB,;t t
5434 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
5435 s,@MAKE_SHELL@,$MAKE_SHELL,;t t
5436 s,@SHOBJ_CC@,$SHOBJ_CC,;t t
5437 s,@SHOBJ_CFLAGS@,$SHOBJ_CFLAGS,;t t
5438 s,@SHOBJ_LD@,$SHOBJ_LD,;t t
5439 s,@SHOBJ_LDFLAGS@,$SHOBJ_LDFLAGS,;t t
5440 s,@SHOBJ_XLDFLAGS@,$SHOBJ_XLDFLAGS,;t t
5441 s,@SHOBJ_LIBS@,$SHOBJ_LIBS,;t t
5442 s,@SHOBJ_STATUS@,$SHOBJ_STATUS,;t t
5443 s,@SHLIB_STATUS@,$SHLIB_STATUS,;t t
5444 s,@SHLIB_XLDFLAGS@,$SHLIB_XLDFLAGS,;t t
5445 s,@SHLIB_LIBSUFF@,$SHLIB_LIBSUFF,;t t
5446 s,@SHLIB_LIBVERSION@,$SHLIB_LIBVERSION,;t t
5447 s,@SHLIB_LIBS@,$SHLIB_LIBS,;t t
5448 s,@SHLIB_MAJOR@,$SHLIB_MAJOR,;t t
5449 s,@SHLIB_MINOR@,$SHLIB_MINOR,;t t
5450 s,@STATIC_TARGET@,$STATIC_TARGET,;t t
5451 s,@SHARED_TARGET@,$SHARED_TARGET,;t t
5452 s,@STATIC_INSTALL_TARGET@,$STATIC_INSTALL_TARGET,;t t
5453 s,@SHARED_INSTALL_TARGET@,$SHARED_INSTALL_TARGET,;t t
5454 s,@BUILD_DIR@,$BUILD_DIR,;t t
5455 s,@LOCAL_CFLAGS@,$LOCAL_CFLAGS,;t t
5456 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
5457 s,@LOCAL_DEFS@,$LOCAL_DEFS,;t t
5458 s,@ARFLAGS@,$ARFLAGS,;t t
5459 s,@LIBVERSION@,$LIBVERSION,;t t
5460 s,@TERMCAP_LIB@,$TERMCAP_LIB,;t t
5461 CEOF
5462
5463 EOF
5464
5465   cat >>$CONFIG_STATUS <<\EOF
5466   # Split the substitutions into bite-sized pieces for seds with
5467   # small command number limits, like on Digital OSF/1 and HP-UX.
5468   ac_max_sed_lines=48
5469   ac_sed_frag=1 # Number of current file.
5470   ac_beg=1 # First line for current file.
5471   ac_end=$ac_max_sed_lines # Line after last line for current file.
5472   ac_more_lines=:
5473   ac_sed_cmds=
5474   while $ac_more_lines; do
5475     if test $ac_beg -gt 1; then
5476       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
5477     else
5478       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
5479     fi
5480     if test ! -s $tmp/subs.frag; then
5481       ac_more_lines=false
5482     else
5483       # The purpose of the label and of the branching condition is to
5484       # speed up the sed processing (if there are no `@' at all, there
5485       # is no need to browse any of the substitutions).
5486       # These are the two extra sed commands mentioned above.
5487       (echo ':t
5488   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
5489       if test -z "$ac_sed_cmds"; then
5490         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
5491       else
5492         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
5493       fi
5494       ac_sed_frag=`expr $ac_sed_frag + 1`
5495       ac_beg=$ac_end
5496       ac_end=`expr $ac_end + $ac_max_sed_lines`
5497     fi
5498   done
5499   if test -z "$ac_sed_cmds"; then
5500     ac_sed_cmds=cat
5501   fi
5502 fi # test -n "$CONFIG_FILES"
5503
5504 EOF
5505 cat >>$CONFIG_STATUS <<\EOF
5506 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
5507   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5508   case $ac_file in
5509   - | *:- | *:-:* ) # input from stdin
5510         cat >$tmp/stdin
5511         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5512         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5513   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5514         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5515   * )   ac_file_in=$ac_file.in ;;
5516   esac
5517
5518   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
5519   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5520          X"$ac_file" : 'X\(//\)[^/]' \| \
5521          X"$ac_file" : 'X\(//\)$' \| \
5522          X"$ac_file" : 'X\(/\)' \| \
5523          .     : '\(.\)' 2>/dev/null ||
5524 echo X"$ac_file" |
5525     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
5526           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
5527           /^X\(\/\/\)$/{ s//\1/; q; }
5528           /^X\(\/\).*/{ s//\1/; q; }
5529           s/.*/./; q'`
5530   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5531     { case "$ac_dir" in
5532   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
5533   *)                      as_incr_dir=.;;
5534 esac
5535 as_dummy="$ac_dir"
5536 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
5537   case $as_mkdir_dir in
5538     # Skip DOS drivespec
5539     ?:) as_incr_dir=$as_mkdir_dir ;;
5540     *)
5541       as_incr_dir=$as_incr_dir/$as_mkdir_dir
5542       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
5543     ;;
5544   esac
5545 done; }
5546
5547     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
5548     # A "../" for each directory in $ac_dir_suffix.
5549     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
5550   else
5551     ac_dir_suffix= ac_dots=
5552   fi
5553
5554   case $srcdir in
5555   .)  ac_srcdir=.
5556       if test -z "$ac_dots"; then
5557          ac_top_srcdir=.
5558       else
5559          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
5560       fi ;;
5561   [\\/]* | ?:[\\/]* )
5562       ac_srcdir=$srcdir$ac_dir_suffix;
5563       ac_top_srcdir=$srcdir ;;
5564   *) # Relative path.
5565     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
5566     ac_top_srcdir=$ac_dots$srcdir ;;
5567   esac
5568
5569   case $INSTALL in
5570   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
5571   *) ac_INSTALL=$ac_dots$INSTALL ;;
5572   esac
5573
5574   if test x"$ac_file" != x-; then
5575     { echo "$as_me:5581: creating $ac_file" >&5
5576 echo "$as_me: creating $ac_file" >&6;}
5577     rm -f "$ac_file"
5578   fi
5579   # Let's still pretend it is `configure' which instantiates (i.e., don't
5580   # use $as_me), people would be surprised to read:
5581   #    /* config.h.  Generated automatically by config.status.  */
5582   configure_input="Generated automatically from `echo $ac_file_in |
5583                                                  sed 's,.*/,,'` by configure."
5584
5585   # First look for the input files in the build tree, otherwise in the
5586   # src tree.
5587   ac_file_inputs=`IFS=:
5588     for f in $ac_file_in; do
5589       case $f in
5590       -) echo $tmp/stdin ;;
5591       [\\/$]*)
5592          # Absolute (can't be DOS-style, as IFS=:)
5593          test -f "$f" || { { echo "$as_me:5599: error: cannot find input file: $f" >&5
5594 echo "$as_me: error: cannot find input file: $f" >&2;}
5595    { (exit 1); exit 1; }; }
5596          echo $f;;
5597       *) # Relative
5598          if test -f "$f"; then
5599            # Build tree
5600            echo $f
5601          elif test -f "$srcdir/$f"; then
5602            # Source tree
5603            echo $srcdir/$f
5604          else
5605            # /dev/null tree
5606            { { echo "$as_me:5612: error: cannot find input file: $f" >&5
5607 echo "$as_me: error: cannot find input file: $f" >&2;}
5608    { (exit 1); exit 1; }; }
5609          fi;;
5610       esac
5611     done` || { (exit 1); exit 1; }
5612 EOF
5613 cat >>$CONFIG_STATUS <<EOF
5614   sed "$ac_vpsub
5615 $extrasub
5616 EOF
5617 cat >>$CONFIG_STATUS <<\EOF
5618 :t
5619 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
5620 s,@configure_input@,$configure_input,;t t
5621 s,@srcdir@,$ac_srcdir,;t t
5622 s,@top_srcdir@,$ac_top_srcdir,;t t
5623 s,@INSTALL@,$ac_INSTALL,;t t
5624 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
5625   rm -f $tmp/stdin
5626   if test x"$ac_file" != x-; then
5627     mv $tmp/out $ac_file
5628   else
5629     cat $tmp/out
5630     rm -f $tmp/out
5631   fi
5632
5633 done
5634 EOF
5635 cat >>$CONFIG_STATUS <<\EOF
5636
5637 #
5638 # CONFIG_HEADER section.
5639 #
5640
5641 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5642 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5643 #
5644 # ac_d sets the value in "#define NAME VALUE" lines.
5645 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5646 ac_dB='[        ].*$,\1#\2'
5647 ac_dC=' '
5648 ac_dD=',;t'
5649 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5650 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5651 ac_uB='$,\1#\2define\3'
5652 ac_uC=' '
5653 ac_uD=',;t'
5654
5655 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
5656   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5657   case $ac_file in
5658   - | *:- | *:-:* ) # input from stdin
5659         cat >$tmp/stdin
5660         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5661         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5662   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5663         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5664   * )   ac_file_in=$ac_file.in ;;
5665   esac
5666
5667   test x"$ac_file" != x- && { echo "$as_me:5673: creating $ac_file" >&5
5668 echo "$as_me: creating $ac_file" >&6;}
5669
5670   # First look for the input files in the build tree, otherwise in the
5671   # src tree.
5672   ac_file_inputs=`IFS=:
5673     for f in $ac_file_in; do
5674       case $f in
5675       -) echo $tmp/stdin ;;
5676       [\\/$]*)
5677          # Absolute (can't be DOS-style, as IFS=:)
5678          test -f "$f" || { { echo "$as_me:5684: error: cannot find input file: $f" >&5
5679 echo "$as_me: error: cannot find input file: $f" >&2;}
5680    { (exit 1); exit 1; }; }
5681          echo $f;;
5682       *) # Relative
5683          if test -f "$f"; then
5684            # Build tree
5685            echo $f
5686          elif test -f "$srcdir/$f"; then
5687            # Source tree
5688            echo $srcdir/$f
5689          else
5690            # /dev/null tree
5691            { { echo "$as_me:5697: error: cannot find input file: $f" >&5
5692 echo "$as_me: error: cannot find input file: $f" >&2;}
5693    { (exit 1); exit 1; }; }
5694          fi;;
5695       esac
5696     done` || { (exit 1); exit 1; }
5697   # Remove the trailing spaces.
5698   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
5699
5700 EOF
5701
5702 # Transform confdefs.h into two sed scripts, `conftest.defines' and
5703 # `conftest.undefs', that substitutes the proper values into
5704 # config.h.in to produce config.h.  The first handles `#define'
5705 # templates, and the second `#undef' templates.
5706 # And first: Protect against being on the right side of a sed subst in
5707 # config.status.  Protect against being in an unquoted here document
5708 # in config.status.
5709 rm -f conftest.defines conftest.undefs
5710 # Using a here document instead of a string reduces the quoting nightmare.
5711 # Putting comments in sed scripts is not portable.
5712 #
5713 # `end' is used to avoid that the second main sed command (meant for
5714 # 0-ary CPP macros) applies to n-ary macro definitions.
5715 # See the Autoconf documentation for `clear'.
5716 cat >confdef2sed.sed <<\EOF
5717 s/[\\&,]/\\&/g
5718 s,[\\$`],\\&,g
5719 t clear
5720 : clear
5721 s,^[    ]*#[    ]*define[       ][      ]*\(\([^        (][^    (]*\)([^)]*)\)[         ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
5722 t end
5723 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
5724 : end
5725 EOF
5726 # If some macros were called several times there might be several times
5727 # the same #defines, which is useless.  Nevertheless, we may not want to
5728 # sort them, since we want the *last* AC-DEFINE to be honored.
5729 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
5730 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
5731 rm -f confdef2sed.sed
5732
5733 # This sed command replaces #undef with comments.  This is necessary, for
5734 # example, in the case of _POSIX_SOURCE, which is predefined and required
5735 # on some systems where configure will not decide to define it.
5736 cat >>conftest.undefs <<\EOF
5737 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
5738 EOF
5739
5740 # Break up conftest.defines because some shells have a limit on the size
5741 # of here documents, and old seds have small limits too (100 cmds).
5742 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
5743 echo '  if egrep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
5744 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
5745 echo '  :' >>$CONFIG_STATUS
5746 rm -f conftest.tail
5747 while grep . conftest.defines >/dev/null
5748 do
5749   # Write a limited-size here document to $tmp/defines.sed.
5750   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
5751   # Speed up: don't consider the non `#define' lines.
5752   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
5753   # Work around the forget-to-reset-the-flag bug.
5754   echo 't clr' >>$CONFIG_STATUS
5755   echo ': clr' >>$CONFIG_STATUS
5756   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
5757   echo 'CEOF
5758   sed -f $tmp/defines.sed $tmp/in >$tmp/out
5759   rm -f $tmp/in
5760   mv $tmp/out $tmp/in
5761 ' >>$CONFIG_STATUS
5762   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
5763   rm -f conftest.defines
5764   mv conftest.tail conftest.defines
5765 done
5766 rm -f conftest.defines
5767 echo '  fi # egrep' >>$CONFIG_STATUS
5768 echo >>$CONFIG_STATUS
5769
5770 # Break up conftest.undefs because some shells have a limit on the size
5771 # of here documents, and old seds have small limits too (100 cmds).
5772 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
5773 rm -f conftest.tail
5774 while grep . conftest.undefs >/dev/null
5775 do
5776   # Write a limited-size here document to $tmp/undefs.sed.
5777   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
5778   # Speed up: don't consider the non `#undef'
5779   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
5780   # Work around the forget-to-reset-the-flag bug.
5781   echo 't clr' >>$CONFIG_STATUS
5782   echo ': clr' >>$CONFIG_STATUS
5783   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
5784   echo 'CEOF
5785   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
5786   rm -f $tmp/in
5787   mv $tmp/out $tmp/in
5788 ' >>$CONFIG_STATUS
5789   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
5790   rm -f conftest.undefs
5791   mv conftest.tail conftest.undefs
5792 done
5793 rm -f conftest.undefs
5794
5795 cat >>$CONFIG_STATUS <<\EOF
5796   # Let's still pretend it is `configure' which instantiates (i.e., don't
5797   # use $as_me), people would be surprised to read:
5798   #    /* config.h.  Generated automatically by config.status.  */
5799   if test x"$ac_file" = x-; then
5800     echo "/* Generated automatically by configure.  */" >$tmp/config.h
5801   else
5802     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
5803   fi
5804   cat $tmp/in >>$tmp/config.h
5805   rm -f $tmp/in
5806   if test x"$ac_file" != x-; then
5807     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
5808       { echo "$as_me:5814: $ac_file is unchanged" >&5
5809 echo "$as_me: $ac_file is unchanged" >&6;}
5810     else
5811       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5812          X"$ac_file" : 'X\(//\)[^/]' \| \
5813          X"$ac_file" : 'X\(//\)$' \| \
5814          X"$ac_file" : 'X\(/\)' \| \
5815          .     : '\(.\)' 2>/dev/null ||
5816 echo X"$ac_file" |
5817     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
5818           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
5819           /^X\(\/\/\)$/{ s//\1/; q; }
5820           /^X\(\/\).*/{ s//\1/; q; }
5821           s/.*/./; q'`
5822       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5823         { case "$ac_dir" in
5824   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
5825   *)                      as_incr_dir=.;;
5826 esac
5827 as_dummy="$ac_dir"
5828 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
5829   case $as_mkdir_dir in
5830     # Skip DOS drivespec
5831     ?:) as_incr_dir=$as_mkdir_dir ;;
5832     *)
5833       as_incr_dir=$as_incr_dir/$as_mkdir_dir
5834       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
5835     ;;
5836   esac
5837 done; }
5838
5839       fi
5840       rm -f $ac_file
5841       mv $tmp/config.h $ac_file
5842     fi
5843   else
5844     cat $tmp/config.h
5845     rm -f $tmp/config.h
5846   fi
5847 done
5848 EOF
5849 cat >>$CONFIG_STATUS <<\EOF
5850
5851 #
5852 # CONFIG_COMMANDS section.
5853 #
5854 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
5855   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
5856   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
5857
5858   case $ac_dest in
5859     default )
5860 # Makefile uses this timestamp file to record whether config.h is up to date.
5861 echo > stamp-h
5862  ;;
5863   esac
5864 done
5865 EOF
5866
5867 cat >>$CONFIG_STATUS <<\EOF
5868
5869 { (exit 0); exit 0; }
5870 EOF
5871 chmod +x $CONFIG_STATUS
5872 ac_clean_files=$ac_clean_files_save
5873
5874 # configure is writing to config.log, and then calls config.status.
5875 # config.status does its own redirection, appending to config.log.
5876 # Unfortunately, on DOS this fails, as config.log is still kept open
5877 # by configure, so config.status won't be able to write to it; its
5878 # output is simply discarded.  So we exec the FD to /dev/null,
5879 # effectively closing config.log, so it can be properly (re)opened and
5880 # appended to by config.status.  When coming back to configure, we
5881 # need to make the FD available again.
5882 if test "$no_create" != yes; then
5883   ac_cs_success=:
5884   exec 5>/dev/null
5885   $SHELL $CONFIG_STATUS || ac_cs_success=false
5886   exec 5>>config.log
5887   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
5888   # would make configure fail if this is the last instruction.
5889   $ac_cs_success || { (exit 1); exit 1; }
5890 fi
5891