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