OSDN Git Service

* config/cygwin.cache: Prime mbstate_t.
[pf3gnuchains/pf3gnuchains4x.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_config_headers="$ac_config_headers config.h"
982
983 LIBVERSION=4.3
984
985 ac_aux_dir=
986 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
987   if 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/install.sh; then
992     ac_aux_dir=$ac_dir
993     ac_install_sh="$ac_aux_dir/install.sh -c"
994     break
995   elif test -f $ac_dir/shtool; then
996     ac_aux_dir=$ac_dir
997     ac_install_sh="$ac_aux_dir/shtool install -c"
998     break
999   fi
1000 done
1001 if test -z "$ac_aux_dir"; then
1002   { { echo "$as_me:1002: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1003 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1004    { (exit 1); exit 1; }; }
1005 fi
1006 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1007 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1008 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
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 test "x$cross_compiling" = "xyes"; then
2080     case "${host}" in
2081     *-cygwin*)
2082         cross_cache=${srcdir}/cross-build/cygwin.cache
2083         if test -r "${cross_cache}"; then
2084             echo "loading cross-build cache file ${cross_cache}"
2085             . ${cross_cache}
2086         fi
2087         LOCAL_CFLAGS="$LOCAL_CFLAGS -I${srcdir}/../libtermcap"
2088         unset cross_cache
2089         ;;
2090     *)  echo "configure: cross-compiling for a non-cygwin target is not supported" >&2
2091         ;;
2092     esac
2093 fi
2094
2095 if test "x$cross_compiling" = "xyes"; then
2096   CROSS_COMPILING_FLAG=-DCROSS_COMPILING
2097 else
2098   CROSS_COMPILING_FLAG=
2099 fi
2100
2101 if test -z "$CC_FOR_BUILD"; then
2102     if test "x$cross_compiling" = "xno"; then
2103         CC_FOR_BUILD='$(CC)'
2104     else
2105         CC_FOR_BUILD=gcc
2106     fi
2107 fi
2108
2109 # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
2110 test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
2111
2112 if test $ac_cv_c_compiler_gnu = yes; then
2113     echo "$as_me:2113: checking whether $CC needs -traditional" >&5
2114 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2115 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2116   echo $ECHO_N "(cached) $ECHO_C" >&6
2117 else
2118     ac_pattern="Autoconf.*'x'"
2119   cat >conftest.$ac_ext <<_ACEOF
2120 #line 2120 "configure"
2121 #include "confdefs.h"
2122 #include <sgtty.h>
2123 Autoconf TIOCGETP
2124 _ACEOF
2125 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2126   egrep "$ac_pattern" >/dev/null 2>&1; then
2127   ac_cv_prog_gcc_traditional=yes
2128 else
2129   ac_cv_prog_gcc_traditional=no
2130 fi
2131 rm -f conftest*
2132
2133   if test $ac_cv_prog_gcc_traditional = no; then
2134     cat >conftest.$ac_ext <<_ACEOF
2135 #line 2135 "configure"
2136 #include "confdefs.h"
2137 #include <termio.h>
2138 Autoconf TCGETA
2139 _ACEOF
2140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2141   egrep "$ac_pattern" >/dev/null 2>&1; then
2142   ac_cv_prog_gcc_traditional=yes
2143 fi
2144 rm -f conftest*
2145
2146   fi
2147 fi
2148 echo "$as_me:2148: result: $ac_cv_prog_gcc_traditional" >&5
2149 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2150   if test $ac_cv_prog_gcc_traditional = yes; then
2151     CC="$CC -traditional"
2152   fi
2153 fi
2154
2155 # Find a good install program.  We prefer a C program (faster),
2156 # so one script is as good as another.  But avoid the broken or
2157 # incompatible versions:
2158 # SysV /etc/install, /usr/sbin/install
2159 # SunOS /usr/etc/install
2160 # IRIX /sbin/install
2161 # AIX /bin/install
2162 # AmigaOS /C/install, which installs bootblocks on floppy discs
2163 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2164 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2165 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2166 # ./install, which can be erroneously created by make from ./install.sh.
2167 echo "$as_me:2167: checking for a BSD compatible install" >&5
2168 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2169 if test -z "$INSTALL"; then
2170 if test "${ac_cv_path_install+set}" = set; then
2171   echo $ECHO_N "(cached) $ECHO_C" >&6
2172 else
2173     ac_save_IFS=$IFS; IFS=$ac_path_separator
2174   for ac_dir in $PATH; do
2175     IFS=$ac_save_IFS
2176     # Account for people who put trailing slashes in PATH elements.
2177     case $ac_dir/ in
2178     / | ./ | .// | /cC/* \
2179     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2180     | /usr/ucb/* ) ;;
2181     *)
2182       # OSF1 and SCO ODT 3.0 have their own names for install.
2183       # Don't use installbsd from OSF since it installs stuff as root
2184       # by default.
2185       for ac_prog in ginstall scoinst install; do
2186         if $as_executable_p "$ac_dir/$ac_prog"; then
2187           if test $ac_prog = install &&
2188             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2189             # AIX install.  It has an incompatible calling convention.
2190             :
2191           elif test $ac_prog = install &&
2192             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2193             # program-specific install script used by HP pwplus--don't use.
2194             :
2195           else
2196             ac_cv_path_install="$ac_dir/$ac_prog -c"
2197             break 2
2198           fi
2199         fi
2200       done
2201       ;;
2202     esac
2203   done
2204
2205 fi
2206   if test "${ac_cv_path_install+set}" = set; then
2207     INSTALL=$ac_cv_path_install
2208   else
2209     # As a last resort, use the slow shell script.  We don't cache a
2210     # path for INSTALL within a source directory, because that will
2211     # break other packages using the cache if that directory is
2212     # removed, or if the path is relative.
2213     INSTALL=$ac_install_sh
2214   fi
2215 fi
2216 echo "$as_me:2216: result: $INSTALL" >&5
2217 echo "${ECHO_T}$INSTALL" >&6
2218
2219 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2220 # It thinks the first close brace ends the variable substitution.
2221 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2222
2223 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2224
2225 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2226
2227 # Extract the first word of "ar", so it can be a program name with args.
2228 set dummy ar; ac_word=$2
2229 echo "$as_me:2229: checking for $ac_word" >&5
2230 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2231 if test "${ac_cv_prog_AR+set}" = set; then
2232   echo $ECHO_N "(cached) $ECHO_C" >&6
2233 else
2234   if test -n "$AR"; then
2235   ac_cv_prog_AR="$AR" # Let the user override the test.
2236 else
2237   ac_save_IFS=$IFS; IFS=$ac_path_separator
2238 ac_dummy="$PATH"
2239 for ac_dir in $ac_dummy; do
2240   IFS=$ac_save_IFS
2241   test -z "$ac_dir" && ac_dir=.
2242   $as_executable_p "$ac_dir/$ac_word" || continue
2243 ac_cv_prog_AR=""
2244 echo "$as_me:2244: found $ac_dir/$ac_word" >&5
2245 break
2246 done
2247
2248   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
2249 fi
2250 fi
2251 AR=$ac_cv_prog_AR
2252 if test -n "$AR"; then
2253   echo "$as_me:2253: result: $AR" >&5
2254 echo "${ECHO_T}$AR" >&6
2255 else
2256   echo "$as_me:2256: result: no" >&5
2257 echo "${ECHO_T}no" >&6
2258 fi
2259
2260 test -n "$ARFLAGS" || ARFLAGS="cr"
2261 if test -n "$ac_tool_prefix"; then
2262   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2263 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2264 echo "$as_me:2264: checking for $ac_word" >&5
2265 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2266 if test "${ac_cv_prog_RANLIB+set}" = set; then
2267   echo $ECHO_N "(cached) $ECHO_C" >&6
2268 else
2269   if test -n "$RANLIB"; then
2270   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2271 else
2272   ac_save_IFS=$IFS; IFS=$ac_path_separator
2273 ac_dummy="$PATH"
2274 for ac_dir in $ac_dummy; do
2275   IFS=$ac_save_IFS
2276   test -z "$ac_dir" && ac_dir=.
2277   $as_executable_p "$ac_dir/$ac_word" || continue
2278 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2279 echo "$as_me:2279: found $ac_dir/$ac_word" >&5
2280 break
2281 done
2282
2283 fi
2284 fi
2285 RANLIB=$ac_cv_prog_RANLIB
2286 if test -n "$RANLIB"; then
2287   echo "$as_me:2287: result: $RANLIB" >&5
2288 echo "${ECHO_T}$RANLIB" >&6
2289 else
2290   echo "$as_me:2290: result: no" >&5
2291 echo "${ECHO_T}no" >&6
2292 fi
2293
2294 fi
2295 if test -z "$ac_cv_prog_RANLIB"; then
2296   ac_ct_RANLIB=$RANLIB
2297   # Extract the first word of "ranlib", so it can be a program name with args.
2298 set dummy ranlib; ac_word=$2
2299 echo "$as_me:2299: checking for $ac_word" >&5
2300 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2301 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2302   echo $ECHO_N "(cached) $ECHO_C" >&6
2303 else
2304   if test -n "$ac_ct_RANLIB"; then
2305   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2306 else
2307   ac_save_IFS=$IFS; IFS=$ac_path_separator
2308 ac_dummy="$PATH"
2309 for ac_dir in $ac_dummy; do
2310   IFS=$ac_save_IFS
2311   test -z "$ac_dir" && ac_dir=.
2312   $as_executable_p "$ac_dir/$ac_word" || continue
2313 ac_cv_prog_ac_ct_RANLIB="ranlib"
2314 echo "$as_me:2314: found $ac_dir/$ac_word" >&5
2315 break
2316 done
2317
2318   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2319 fi
2320 fi
2321 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2322 if test -n "$ac_ct_RANLIB"; then
2323   echo "$as_me:2323: result: $ac_ct_RANLIB" >&5
2324 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2325 else
2326   echo "$as_me:2326: result: no" >&5
2327 echo "${ECHO_T}no" >&6
2328 fi
2329
2330   RANLIB=$ac_ct_RANLIB
2331 else
2332   RANLIB="$ac_cv_prog_RANLIB"
2333 fi
2334
2335 MAKE_SHELL=/bin/sh
2336
2337 echo "$as_me:2337: checking for $CC option to accept ANSI C" >&5
2338 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2339 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2340   echo $ECHO_N "(cached) $ECHO_C" >&6
2341 else
2342   ac_cv_prog_cc_stdc=no
2343 ac_save_CC=$CC
2344 cat >conftest.$ac_ext <<_ACEOF
2345 #line 2345 "configure"
2346 #include "confdefs.h"
2347 #include <stdarg.h>
2348 #include <stdio.h>
2349 #include <sys/types.h>
2350 #include <sys/stat.h>
2351 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2352 struct buf { int x; };
2353 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2354 static char *e (p, i)
2355      char **p;
2356      int i;
2357 {
2358   return p[i];
2359 }
2360 static char *f (char * (*g) (char **, int), char **p, ...)
2361 {
2362   char *s;
2363   va_list v;
2364   va_start (v,p);
2365   s = g (p, va_arg (v,int));
2366   va_end (v);
2367   return s;
2368 }
2369 int test (int i, double x);
2370 struct s1 {int (*f) (int a);};
2371 struct s2 {int (*f) (double a);};
2372 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2373 int argc;
2374 char **argv;
2375 int
2376 main ()
2377 {
2378 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2379   ;
2380   return 0;
2381 }
2382 _ACEOF
2383 # Don't try gcc -ansi; that turns off useful extensions and
2384 # breaks some systems' header files.
2385 # AIX                   -qlanglvl=ansi
2386 # Ultrix and OSF/1      -std1
2387 # HP-UX 10.20 and later -Ae
2388 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2389 # SVR4                  -Xc -D__EXTENSIONS__
2390 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2391 do
2392   CC="$ac_save_CC $ac_arg"
2393   rm -f conftest.$ac_objext
2394 if { (eval echo "$as_me:2394: \"$ac_compile\"") >&5
2395   (eval $ac_compile) 2>&5
2396   ac_status=$?
2397   echo "$as_me:2397: \$? = $ac_status" >&5
2398   (exit $ac_status); } &&
2399          { ac_try='test -s conftest.$ac_objext'
2400   { (eval echo "$as_me:2400: \"$ac_try\"") >&5
2401   (eval $ac_try) 2>&5
2402   ac_status=$?
2403   echo "$as_me:2403: \$? = $ac_status" >&5
2404   (exit $ac_status); }; }; then
2405   ac_cv_prog_cc_stdc=$ac_arg
2406 break
2407 else
2408   echo "$as_me: failed program was:" >&5
2409 cat conftest.$ac_ext >&5
2410 fi
2411 rm -f conftest.$ac_objext
2412 done
2413 rm -f conftest.$ac_ext conftest.$ac_objext
2414 CC=$ac_save_CC
2415
2416 fi
2417
2418 case "x$ac_cv_prog_cc_stdc" in
2419   x|xno)
2420     echo "$as_me:2420: result: none needed" >&5
2421 echo "${ECHO_T}none needed" >&6 ;;
2422   *)
2423     echo "$as_me:2423: result: $ac_cv_prog_cc_stdc" >&5
2424 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2425     CC="$CC $ac_cv_prog_cc_stdc" ;;
2426 esac
2427
2428 echo "$as_me:2428: checking for an ANSI C-conforming const" >&5
2429 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2430 if test "${ac_cv_c_const+set}" = set; then
2431   echo $ECHO_N "(cached) $ECHO_C" >&6
2432 else
2433   cat >conftest.$ac_ext <<_ACEOF
2434 #line 2434 "configure"
2435 #include "confdefs.h"
2436
2437 int
2438 main ()
2439 {
2440 /* FIXME: Include the comments suggested by Paul. */
2441 #ifndef __cplusplus
2442   /* Ultrix mips cc rejects this.  */
2443   typedef int charset[2];
2444   const charset x;
2445   /* SunOS 4.1.1 cc rejects this.  */
2446   char const *const *ccp;
2447   char **p;
2448   /* NEC SVR4.0.2 mips cc rejects this.  */
2449   struct point {int x, y;};
2450   static struct point const zero = {0,0};
2451   /* AIX XL C 1.02.0.0 rejects this.
2452      It does not let you subtract one const X* pointer from another in
2453      an arm of an if-expression whose if-part is not a constant
2454      expression */
2455   const char *g = "string";
2456   ccp = &g + (g ? g-g : 0);
2457   /* HPUX 7.0 cc rejects these. */
2458   ++ccp;
2459   p = (char**) ccp;
2460   ccp = (char const *const *) p;
2461   { /* SCO 3.2v4 cc rejects this.  */
2462     char *t;
2463     char const *s = 0 ? (char *) 0 : (char const *) 0;
2464
2465     *t++ = 0;
2466   }
2467   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2468     int x[] = {25, 17};
2469     const int *foo = &x[0];
2470     ++foo;
2471   }
2472   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2473     typedef const int *iptr;
2474     iptr p = 0;
2475     ++p;
2476   }
2477   { /* AIX XL C 1.02.0.0 rejects this saying
2478        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2479     struct s { int j; const int *ap[3]; };
2480     struct s *b; b->j = 5;
2481   }
2482   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2483     const int foo = 10;
2484   }
2485 #endif
2486
2487   ;
2488   return 0;
2489 }
2490 _ACEOF
2491 rm -f conftest.$ac_objext
2492 if { (eval echo "$as_me:2492: \"$ac_compile\"") >&5
2493   (eval $ac_compile) 2>&5
2494   ac_status=$?
2495   echo "$as_me:2495: \$? = $ac_status" >&5
2496   (exit $ac_status); } &&
2497          { ac_try='test -s conftest.$ac_objext'
2498   { (eval echo "$as_me:2498: \"$ac_try\"") >&5
2499   (eval $ac_try) 2>&5
2500   ac_status=$?
2501   echo "$as_me:2501: \$? = $ac_status" >&5
2502   (exit $ac_status); }; }; then
2503   ac_cv_c_const=yes
2504 else
2505   echo "$as_me: failed program was:" >&5
2506 cat conftest.$ac_ext >&5
2507 ac_cv_c_const=no
2508 fi
2509 rm -f conftest.$ac_objext conftest.$ac_ext
2510 fi
2511 echo "$as_me:2511: result: $ac_cv_c_const" >&5
2512 echo "${ECHO_T}$ac_cv_c_const" >&6
2513 if test $ac_cv_c_const = no; then
2514
2515 cat >>confdefs.h <<\EOF
2516 #define const
2517 EOF
2518
2519 fi
2520
2521 echo "$as_me:2521: checking for function prototypes" >&5
2522 echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
2523 if test "$ac_cv_prog_cc_stdc" != no; then
2524   echo "$as_me:2524: result: yes" >&5
2525 echo "${ECHO_T}yes" >&6
2526
2527 cat >>confdefs.h <<\EOF
2528 #define PROTOTYPES 1
2529 EOF
2530
2531 else
2532   echo "$as_me:2532: result: no" >&5
2533 echo "${ECHO_T}no" >&6
2534 fi
2535
2536 echo "$as_me:2536: checking for ANSI C header files" >&5
2537 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2538 if test "${ac_cv_header_stdc+set}" = set; then
2539   echo $ECHO_N "(cached) $ECHO_C" >&6
2540 else
2541   cat >conftest.$ac_ext <<_ACEOF
2542 #line 2542 "configure"
2543 #include "confdefs.h"
2544 #include <stdlib.h>
2545 #include <stdarg.h>
2546 #include <string.h>
2547 #include <float.h>
2548
2549 _ACEOF
2550 if { (eval echo "$as_me:2550: \"$ac_cpp conftest.$ac_ext\"") >&5
2551   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2552   ac_status=$?
2553   egrep -v '^ *\+' conftest.er1 >conftest.err
2554   rm -f conftest.er1
2555   cat conftest.err >&5
2556   echo "$as_me:2556: \$? = $ac_status" >&5
2557   (exit $ac_status); } >/dev/null; then
2558   if test -s conftest.err; then
2559     ac_cpp_err=$ac_c_preproc_warn_flag
2560   else
2561     ac_cpp_err=
2562   fi
2563 else
2564   ac_cpp_err=yes
2565 fi
2566 if test -z "$ac_cpp_err"; then
2567   ac_cv_header_stdc=yes
2568 else
2569   echo "$as_me: failed program was:" >&5
2570   cat conftest.$ac_ext >&5
2571   ac_cv_header_stdc=no
2572 fi
2573 rm -f conftest.err conftest.$ac_ext
2574
2575 if test $ac_cv_header_stdc = yes; then
2576   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2577   cat >conftest.$ac_ext <<_ACEOF
2578 #line 2578 "configure"
2579 #include "confdefs.h"
2580 #include <string.h>
2581
2582 _ACEOF
2583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2584   egrep "memchr" >/dev/null 2>&1; then
2585   :
2586 else
2587   ac_cv_header_stdc=no
2588 fi
2589 rm -f conftest*
2590
2591 fi
2592
2593 if test $ac_cv_header_stdc = yes; then
2594   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2595   cat >conftest.$ac_ext <<_ACEOF
2596 #line 2596 "configure"
2597 #include "confdefs.h"
2598 #include <stdlib.h>
2599
2600 _ACEOF
2601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2602   egrep "free" >/dev/null 2>&1; then
2603   :
2604 else
2605   ac_cv_header_stdc=no
2606 fi
2607 rm -f conftest*
2608
2609 fi
2610
2611 if test $ac_cv_header_stdc = yes; then
2612   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2613   if test "$cross_compiling" = yes; then
2614   :
2615 else
2616   cat >conftest.$ac_ext <<_ACEOF
2617 #line 2617 "configure"
2618 #include "confdefs.h"
2619 #include <ctype.h>
2620 #if ((' ' & 0x0FF) == 0x020)
2621 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2622 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2623 #else
2624 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2625                      || ('j' <= (c) && (c) <= 'r') \
2626                      || ('s' <= (c) && (c) <= 'z'))
2627 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2628 #endif
2629
2630 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2631 int
2632 main ()
2633 {
2634   int i;
2635   for (i = 0; i < 256; i++)
2636     if (XOR (islower (i), ISLOWER (i))
2637         || toupper (i) != TOUPPER (i))
2638       exit(2);
2639   exit (0);
2640 }
2641 _ACEOF
2642 rm -f conftest$ac_exeext
2643 if { (eval echo "$as_me:2643: \"$ac_link\"") >&5
2644   (eval $ac_link) 2>&5
2645   ac_status=$?
2646   echo "$as_me:2646: \$? = $ac_status" >&5
2647   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2648   { (eval echo "$as_me:2648: \"$ac_try\"") >&5
2649   (eval $ac_try) 2>&5
2650   ac_status=$?
2651   echo "$as_me:2651: \$? = $ac_status" >&5
2652   (exit $ac_status); }; }; then
2653   :
2654 else
2655   echo "$as_me: program exited with status $ac_status" >&5
2656 echo "$as_me: failed program was:" >&5
2657 cat conftest.$ac_ext >&5
2658 ac_cv_header_stdc=no
2659 fi
2660 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2661 fi
2662 fi
2663 fi
2664 echo "$as_me:2664: result: $ac_cv_header_stdc" >&5
2665 echo "${ECHO_T}$ac_cv_header_stdc" >&6
2666 if test $ac_cv_header_stdc = yes; then
2667
2668 cat >>confdefs.h <<\EOF
2669 #define STDC_HEADERS 1
2670 EOF
2671
2672 fi
2673
2674 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
2675
2676 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2677                   inttypes.h stdint.h unistd.h
2678 do
2679 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2680 echo "$as_me:2680: checking for $ac_header" >&5
2681 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2682 if eval "test \"\${$as_ac_Header+set}\" = set"; then
2683   echo $ECHO_N "(cached) $ECHO_C" >&6
2684 else
2685   cat >conftest.$ac_ext <<_ACEOF
2686 #line 2686 "configure"
2687 #include "confdefs.h"
2688 $ac_includes_default
2689 #include <$ac_header>
2690 _ACEOF
2691 rm -f conftest.$ac_objext
2692 if { (eval echo "$as_me:2692: \"$ac_compile\"") >&5
2693   (eval $ac_compile) 2>&5
2694   ac_status=$?
2695   echo "$as_me:2695: \$? = $ac_status" >&5
2696   (exit $ac_status); } &&
2697          { ac_try='test -s conftest.$ac_objext'
2698   { (eval echo "$as_me:2698: \"$ac_try\"") >&5
2699   (eval $ac_try) 2>&5
2700   ac_status=$?
2701   echo "$as_me:2701: \$? = $ac_status" >&5
2702   (exit $ac_status); }; }; then
2703   eval "$as_ac_Header=yes"
2704 else
2705   echo "$as_me: failed program was:" >&5
2706 cat conftest.$ac_ext >&5
2707 eval "$as_ac_Header=no"
2708 fi
2709 rm -f conftest.$ac_objext conftest.$ac_ext
2710 fi
2711 echo "$as_me:2711: result: `eval echo '${'$as_ac_Header'}'`" >&5
2712 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2713 if test `eval echo '${'$as_ac_Header'}'` = yes; then
2714   cat >>confdefs.h <<EOF
2715 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2716 EOF
2717
2718 fi
2719 done
2720
2721 echo "$as_me:2721: checking whether char is unsigned" >&5
2722 echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
2723 if test "${ac_cv_c_char_unsigned+set}" = set; then
2724   echo $ECHO_N "(cached) $ECHO_C" >&6
2725 else
2726   cat >conftest.$ac_ext <<_ACEOF
2727 #line 2727 "configure"
2728 #include "confdefs.h"
2729 $ac_includes_default
2730 int
2731 main ()
2732 {
2733 int _array_ [1 - 2 * !(((char) -1) < 0)]
2734   ;
2735   return 0;
2736 }
2737 _ACEOF
2738 rm -f conftest.$ac_objext
2739 if { (eval echo "$as_me:2739: \"$ac_compile\"") >&5
2740   (eval $ac_compile) 2>&5
2741   ac_status=$?
2742   echo "$as_me:2742: \$? = $ac_status" >&5
2743   (exit $ac_status); } &&
2744          { ac_try='test -s conftest.$ac_objext'
2745   { (eval echo "$as_me:2745: \"$ac_try\"") >&5
2746   (eval $ac_try) 2>&5
2747   ac_status=$?
2748   echo "$as_me:2748: \$? = $ac_status" >&5
2749   (exit $ac_status); }; }; then
2750   ac_cv_c_char_unsigned=no
2751 else
2752   echo "$as_me: failed program was:" >&5
2753 cat conftest.$ac_ext >&5
2754 ac_cv_c_char_unsigned=yes
2755 fi
2756 rm -f conftest.$ac_objext conftest.$ac_ext
2757 fi
2758 echo "$as_me:2758: result: $ac_cv_c_char_unsigned" >&5
2759 echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
2760 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2761   cat >>confdefs.h <<\EOF
2762 #define __CHAR_UNSIGNED__ 1
2763 EOF
2764
2765 fi
2766
2767 echo "$as_me:2767: checking return type of signal handlers" >&5
2768 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
2769 if test "${ac_cv_type_signal+set}" = set; then
2770   echo $ECHO_N "(cached) $ECHO_C" >&6
2771 else
2772   cat >conftest.$ac_ext <<_ACEOF
2773 #line 2773 "configure"
2774 #include "confdefs.h"
2775 #include <sys/types.h>
2776 #include <signal.h>
2777 #ifdef signal
2778 # undef signal
2779 #endif
2780 #ifdef __cplusplus
2781 extern "C" void (*signal (int, void (*)(int)))(int);
2782 #else
2783 void (*signal ()) ();
2784 #endif
2785
2786 int
2787 main ()
2788 {
2789 int i;
2790   ;
2791   return 0;
2792 }
2793 _ACEOF
2794 rm -f conftest.$ac_objext
2795 if { (eval echo "$as_me:2795: \"$ac_compile\"") >&5
2796   (eval $ac_compile) 2>&5
2797   ac_status=$?
2798   echo "$as_me:2798: \$? = $ac_status" >&5
2799   (exit $ac_status); } &&
2800          { ac_try='test -s conftest.$ac_objext'
2801   { (eval echo "$as_me:2801: \"$ac_try\"") >&5
2802   (eval $ac_try) 2>&5
2803   ac_status=$?
2804   echo "$as_me:2804: \$? = $ac_status" >&5
2805   (exit $ac_status); }; }; then
2806   ac_cv_type_signal=void
2807 else
2808   echo "$as_me: failed program was:" >&5
2809 cat conftest.$ac_ext >&5
2810 ac_cv_type_signal=int
2811 fi
2812 rm -f conftest.$ac_objext conftest.$ac_ext
2813 fi
2814 echo "$as_me:2814: result: $ac_cv_type_signal" >&5
2815 echo "${ECHO_T}$ac_cv_type_signal" >&6
2816
2817 cat >>confdefs.h <<EOF
2818 #define RETSIGTYPE $ac_cv_type_signal
2819 EOF
2820
2821 echo "$as_me:2821: checking for size_t" >&5
2822 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
2823 if test "${ac_cv_type_size_t+set}" = set; then
2824   echo $ECHO_N "(cached) $ECHO_C" >&6
2825 else
2826   cat >conftest.$ac_ext <<_ACEOF
2827 #line 2827 "configure"
2828 #include "confdefs.h"
2829 $ac_includes_default
2830 int
2831 main ()
2832 {
2833 if ((size_t *) 0)
2834   return 0;
2835 if (sizeof (size_t))
2836   return 0;
2837   ;
2838   return 0;
2839 }
2840 _ACEOF
2841 rm -f conftest.$ac_objext
2842 if { (eval echo "$as_me:2842: \"$ac_compile\"") >&5
2843   (eval $ac_compile) 2>&5
2844   ac_status=$?
2845   echo "$as_me:2845: \$? = $ac_status" >&5
2846   (exit $ac_status); } &&
2847          { ac_try='test -s conftest.$ac_objext'
2848   { (eval echo "$as_me:2848: \"$ac_try\"") >&5
2849   (eval $ac_try) 2>&5
2850   ac_status=$?
2851   echo "$as_me:2851: \$? = $ac_status" >&5
2852   (exit $ac_status); }; }; then
2853   ac_cv_type_size_t=yes
2854 else
2855   echo "$as_me: failed program was:" >&5
2856 cat conftest.$ac_ext >&5
2857 ac_cv_type_size_t=no
2858 fi
2859 rm -f conftest.$ac_objext conftest.$ac_ext
2860 fi
2861 echo "$as_me:2861: result: $ac_cv_type_size_t" >&5
2862 echo "${ECHO_T}$ac_cv_type_size_t" >&6
2863 if test $ac_cv_type_size_t = yes; then
2864   :
2865 else
2866
2867 cat >>confdefs.h <<EOF
2868 #define size_t unsigned
2869 EOF
2870
2871 fi
2872
2873 echo "$as_me:2873: checking for ssize_t" >&5
2874 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
2875 if test "${ac_cv_type_ssize_t+set}" = set; then
2876   echo $ECHO_N "(cached) $ECHO_C" >&6
2877 else
2878   cat >conftest.$ac_ext <<_ACEOF
2879 #line 2879 "configure"
2880 #include "confdefs.h"
2881 $ac_includes_default
2882 int
2883 main ()
2884 {
2885 if ((ssize_t *) 0)
2886   return 0;
2887 if (sizeof (ssize_t))
2888   return 0;
2889   ;
2890   return 0;
2891 }
2892 _ACEOF
2893 rm -f conftest.$ac_objext
2894 if { (eval echo "$as_me:2894: \"$ac_compile\"") >&5
2895   (eval $ac_compile) 2>&5
2896   ac_status=$?
2897   echo "$as_me:2897: \$? = $ac_status" >&5
2898   (exit $ac_status); } &&
2899          { ac_try='test -s conftest.$ac_objext'
2900   { (eval echo "$as_me:2900: \"$ac_try\"") >&5
2901   (eval $ac_try) 2>&5
2902   ac_status=$?
2903   echo "$as_me:2903: \$? = $ac_status" >&5
2904   (exit $ac_status); }; }; then
2905   ac_cv_type_ssize_t=yes
2906 else
2907   echo "$as_me: failed program was:" >&5
2908 cat conftest.$ac_ext >&5
2909 ac_cv_type_ssize_t=no
2910 fi
2911 rm -f conftest.$ac_objext conftest.$ac_ext
2912 fi
2913 echo "$as_me:2913: result: $ac_cv_type_ssize_t" >&5
2914 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
2915 if test $ac_cv_type_ssize_t = yes; then
2916   :
2917 else
2918
2919 cat >>confdefs.h <<EOF
2920 #define ssize_t int
2921 EOF
2922
2923 fi
2924
2925 echo "$as_me:2925: checking whether stat file-mode macros are broken" >&5
2926 echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
2927 if test "${ac_cv_header_stat_broken+set}" = set; then
2928   echo $ECHO_N "(cached) $ECHO_C" >&6
2929 else
2930   cat >conftest.$ac_ext <<_ACEOF
2931 #line 2931 "configure"
2932 #include "confdefs.h"
2933 #include <sys/types.h>
2934 #include <sys/stat.h>
2935
2936 #if defined(S_ISBLK) && defined(S_IFDIR)
2937 # if S_ISBLK (S_IFDIR)
2938 You lose.
2939 # endif
2940 #endif
2941
2942 #if defined(S_ISBLK) && defined(S_IFCHR)
2943 # if S_ISBLK (S_IFCHR)
2944 You lose.
2945 # endif
2946 #endif
2947
2948 #if defined(S_ISLNK) && defined(S_IFREG)
2949 # if S_ISLNK (S_IFREG)
2950 You lose.
2951 # endif
2952 #endif
2953
2954 #if defined(S_ISSOCK) && defined(S_IFREG)
2955 # if S_ISSOCK (S_IFREG)
2956 You lose.
2957 # endif
2958 #endif
2959
2960 _ACEOF
2961 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2962   egrep "You lose" >/dev/null 2>&1; then
2963   ac_cv_header_stat_broken=yes
2964 else
2965   ac_cv_header_stat_broken=no
2966 fi
2967 rm -f conftest*
2968
2969 fi
2970 echo "$as_me:2970: result: $ac_cv_header_stat_broken" >&5
2971 echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
2972 if test $ac_cv_header_stat_broken = yes; then
2973
2974 cat >>confdefs.h <<\EOF
2975 #define STAT_MACROS_BROKEN 1
2976 EOF
2977
2978 fi
2979
2980 ac_header_dirent=no
2981 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
2982   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
2983 echo "$as_me:2983: checking for $ac_hdr that defines DIR" >&5
2984 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
2985 if eval "test \"\${$as_ac_Header+set}\" = set"; then
2986   echo $ECHO_N "(cached) $ECHO_C" >&6
2987 else
2988   cat >conftest.$ac_ext <<_ACEOF
2989 #line 2989 "configure"
2990 #include "confdefs.h"
2991 #include <sys/types.h>
2992 #include <$ac_hdr>
2993
2994 int
2995 main ()
2996 {
2997 if ((DIR *) 0)
2998 return 0;
2999   ;
3000   return 0;
3001 }
3002 _ACEOF
3003 rm -f conftest.$ac_objext
3004 if { (eval echo "$as_me:3004: \"$ac_compile\"") >&5
3005   (eval $ac_compile) 2>&5
3006   ac_status=$?
3007   echo "$as_me:3007: \$? = $ac_status" >&5
3008   (exit $ac_status); } &&
3009          { ac_try='test -s conftest.$ac_objext'
3010   { (eval echo "$as_me:3010: \"$ac_try\"") >&5
3011   (eval $ac_try) 2>&5
3012   ac_status=$?
3013   echo "$as_me:3013: \$? = $ac_status" >&5
3014   (exit $ac_status); }; }; then
3015   eval "$as_ac_Header=yes"
3016 else
3017   echo "$as_me: failed program was:" >&5
3018 cat conftest.$ac_ext >&5
3019 eval "$as_ac_Header=no"
3020 fi
3021 rm -f conftest.$ac_objext conftest.$ac_ext
3022 fi
3023 echo "$as_me:3023: result: `eval echo '${'$as_ac_Header'}'`" >&5
3024 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3025 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3026   cat >>confdefs.h <<EOF
3027 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
3028 EOF
3029
3030 ac_header_dirent=$ac_hdr; break
3031 fi
3032
3033 done
3034 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3035 if test $ac_header_dirent = dirent.h; then
3036   echo "$as_me:3036: checking for opendir in -ldir" >&5
3037 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
3038 if test "${ac_cv_lib_dir_opendir+set}" = set; then
3039   echo $ECHO_N "(cached) $ECHO_C" >&6
3040 else
3041   ac_check_lib_save_LIBS=$LIBS
3042 LIBS="-ldir  $LIBS"
3043 cat >conftest.$ac_ext <<_ACEOF
3044 #line 3044 "configure"
3045 #include "confdefs.h"
3046
3047 /* Override any gcc2 internal prototype to avoid an error.  */
3048 #ifdef __cplusplus
3049 extern "C"
3050 #endif
3051 /* We use char because int might match the return type of a gcc2
3052    builtin and then its argument prototype would still apply.  */
3053 char opendir ();
3054 int
3055 main ()
3056 {
3057 opendir ();
3058   ;
3059   return 0;
3060 }
3061 _ACEOF
3062 rm -f conftest.$ac_objext conftest$ac_exeext
3063 if { (eval echo "$as_me:3063: \"$ac_link\"") >&5
3064   (eval $ac_link) 2>&5
3065   ac_status=$?
3066   echo "$as_me:3066: \$? = $ac_status" >&5
3067   (exit $ac_status); } &&
3068          { ac_try='test -s conftest$ac_exeext'
3069   { (eval echo "$as_me:3069: \"$ac_try\"") >&5
3070   (eval $ac_try) 2>&5
3071   ac_status=$?
3072   echo "$as_me:3072: \$? = $ac_status" >&5
3073   (exit $ac_status); }; }; then
3074   ac_cv_lib_dir_opendir=yes
3075 else
3076   echo "$as_me: failed program was:" >&5
3077 cat conftest.$ac_ext >&5
3078 ac_cv_lib_dir_opendir=no
3079 fi
3080 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3081 LIBS=$ac_check_lib_save_LIBS
3082 fi
3083 echo "$as_me:3083: result: $ac_cv_lib_dir_opendir" >&5
3084 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
3085 if test $ac_cv_lib_dir_opendir = yes; then
3086   LIBS="$LIBS -ldir"
3087 fi
3088
3089 else
3090   echo "$as_me:3090: checking for opendir in -lx" >&5
3091 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
3092 if test "${ac_cv_lib_x_opendir+set}" = set; then
3093   echo $ECHO_N "(cached) $ECHO_C" >&6
3094 else
3095   ac_check_lib_save_LIBS=$LIBS
3096 LIBS="-lx  $LIBS"
3097 cat >conftest.$ac_ext <<_ACEOF
3098 #line 3098 "configure"
3099 #include "confdefs.h"
3100
3101 /* Override any gcc2 internal prototype to avoid an error.  */
3102 #ifdef __cplusplus
3103 extern "C"
3104 #endif
3105 /* We use char because int might match the return type of a gcc2
3106    builtin and then its argument prototype would still apply.  */
3107 char opendir ();
3108 int
3109 main ()
3110 {
3111 opendir ();
3112   ;
3113   return 0;
3114 }
3115 _ACEOF
3116 rm -f conftest.$ac_objext conftest$ac_exeext
3117 if { (eval echo "$as_me:3117: \"$ac_link\"") >&5
3118   (eval $ac_link) 2>&5
3119   ac_status=$?
3120   echo "$as_me:3120: \$? = $ac_status" >&5
3121   (exit $ac_status); } &&
3122          { ac_try='test -s conftest$ac_exeext'
3123   { (eval echo "$as_me:3123: \"$ac_try\"") >&5
3124   (eval $ac_try) 2>&5
3125   ac_status=$?
3126   echo "$as_me:3126: \$? = $ac_status" >&5
3127   (exit $ac_status); }; }; then
3128   ac_cv_lib_x_opendir=yes
3129 else
3130   echo "$as_me: failed program was:" >&5
3131 cat conftest.$ac_ext >&5
3132 ac_cv_lib_x_opendir=no
3133 fi
3134 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3135 LIBS=$ac_check_lib_save_LIBS
3136 fi
3137 echo "$as_me:3137: result: $ac_cv_lib_x_opendir" >&5
3138 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
3139 if test $ac_cv_lib_x_opendir = yes; then
3140   LIBS="$LIBS -lx"
3141 fi
3142
3143 fi
3144
3145 for ac_func in lstat memmove putenv select setenv setlocale \
3146                 strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit
3147 do
3148 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3149 echo "$as_me:3149: checking for $ac_func" >&5
3150 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3151 if eval "test \"\${$as_ac_var+set}\" = set"; then
3152   echo $ECHO_N "(cached) $ECHO_C" >&6
3153 else
3154   cat >conftest.$ac_ext <<_ACEOF
3155 #line 3155 "configure"
3156 #include "confdefs.h"
3157 /* System header to define __stub macros and hopefully few prototypes,
3158     which can conflict with char $ac_func (); below.  */
3159 #include <assert.h>
3160 /* Override any gcc2 internal prototype to avoid an error.  */
3161 #ifdef __cplusplus
3162 extern "C"
3163 #endif
3164 /* We use char because int might match the return type of a gcc2
3165    builtin and then its argument prototype would still apply.  */
3166 char $ac_func ();
3167 char (*f) ();
3168
3169 int
3170 main ()
3171 {
3172 /* The GNU C library defines this for functions which it implements
3173     to always fail with ENOSYS.  Some functions are actually named
3174     something starting with __ and the normal name is an alias.  */
3175 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3176 choke me
3177 #else
3178 f = $ac_func;
3179 #endif
3180
3181   ;
3182   return 0;
3183 }
3184 _ACEOF
3185 rm -f conftest.$ac_objext conftest$ac_exeext
3186 if { (eval echo "$as_me:3186: \"$ac_link\"") >&5
3187   (eval $ac_link) 2>&5
3188   ac_status=$?
3189   echo "$as_me:3189: \$? = $ac_status" >&5
3190   (exit $ac_status); } &&
3191          { ac_try='test -s conftest$ac_exeext'
3192   { (eval echo "$as_me:3192: \"$ac_try\"") >&5
3193   (eval $ac_try) 2>&5
3194   ac_status=$?
3195   echo "$as_me:3195: \$? = $ac_status" >&5
3196   (exit $ac_status); }; }; then
3197   eval "$as_ac_var=yes"
3198 else
3199   echo "$as_me: failed program was:" >&5
3200 cat conftest.$ac_ext >&5
3201 eval "$as_ac_var=no"
3202 fi
3203 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3204 fi
3205 echo "$as_me:3205: result: `eval echo '${'$as_ac_var'}'`" >&5
3206 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3207 if test `eval echo '${'$as_ac_var'}'` = yes; then
3208   cat >>confdefs.h <<EOF
3209 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3210 EOF
3211
3212 fi
3213 done
3214
3215 echo "$as_me:3215: checking for working strcoll" >&5
3216 echo $ECHO_N "checking for working strcoll... $ECHO_C" >&6
3217 if test "${ac_cv_func_strcoll_works+set}" = set; then
3218   echo $ECHO_N "(cached) $ECHO_C" >&6
3219 else
3220   if test "$cross_compiling" = yes; then
3221   ac_cv_func_strcoll_works=no
3222 else
3223   cat >conftest.$ac_ext <<_ACEOF
3224 #line 3224 "configure"
3225 #include "confdefs.h"
3226 $ac_includes_default
3227 int
3228 main ()
3229 {
3230 exit (strcoll ("abc", "def") >= 0 ||
3231          strcoll ("ABC", "DEF") >= 0 ||
3232          strcoll ("123", "456") >= 0)
3233   ;
3234   return 0;
3235 }
3236 _ACEOF
3237 rm -f conftest$ac_exeext
3238 if { (eval echo "$as_me:3238: \"$ac_link\"") >&5
3239   (eval $ac_link) 2>&5
3240   ac_status=$?
3241   echo "$as_me:3241: \$? = $ac_status" >&5
3242   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3243   { (eval echo "$as_me:3243: \"$ac_try\"") >&5
3244   (eval $ac_try) 2>&5
3245   ac_status=$?
3246   echo "$as_me:3246: \$? = $ac_status" >&5
3247   (exit $ac_status); }; }; then
3248   ac_cv_func_strcoll_works=yes
3249 else
3250   echo "$as_me: program exited with status $ac_status" >&5
3251 echo "$as_me: failed program was:" >&5
3252 cat conftest.$ac_ext >&5
3253 ac_cv_func_strcoll_works=no
3254 fi
3255 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3256 fi
3257 fi
3258 echo "$as_me:3258: result: $ac_cv_func_strcoll_works" >&5
3259 echo "${ECHO_T}$ac_cv_func_strcoll_works" >&6
3260 if test $ac_cv_func_strcoll_works = yes; then
3261
3262 cat >>confdefs.h <<\EOF
3263 #define HAVE_STRCOLL 1
3264 EOF
3265
3266 fi
3267
3268 for ac_header in unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \
3269                 limits.h sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
3270                 termcap.h termios.h termio.h sys/file.h locale.h memory.h
3271 do
3272 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3273 echo "$as_me:3273: checking for $ac_header" >&5
3274 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3275 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3276   echo $ECHO_N "(cached) $ECHO_C" >&6
3277 else
3278   cat >conftest.$ac_ext <<_ACEOF
3279 #line 3279 "configure"
3280 #include "confdefs.h"
3281 #include <$ac_header>
3282 _ACEOF
3283 if { (eval echo "$as_me:3283: \"$ac_cpp conftest.$ac_ext\"") >&5
3284   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3285   ac_status=$?
3286   egrep -v '^ *\+' conftest.er1 >conftest.err
3287   rm -f conftest.er1
3288   cat conftest.err >&5
3289   echo "$as_me:3289: \$? = $ac_status" >&5
3290   (exit $ac_status); } >/dev/null; then
3291   if test -s conftest.err; then
3292     ac_cpp_err=$ac_c_preproc_warn_flag
3293   else
3294     ac_cpp_err=
3295   fi
3296 else
3297   ac_cpp_err=yes
3298 fi
3299 if test -z "$ac_cpp_err"; then
3300   eval "$as_ac_Header=yes"
3301 else
3302   echo "$as_me: failed program was:" >&5
3303   cat conftest.$ac_ext >&5
3304   eval "$as_ac_Header=no"
3305 fi
3306 rm -f conftest.err conftest.$ac_ext
3307 fi
3308 echo "$as_me:3308: result: `eval echo '${'$as_ac_Header'}'`" >&5
3309 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3310 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3311   cat >>confdefs.h <<EOF
3312 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3313 EOF
3314
3315 fi
3316 done
3317
3318 echo "$as_me:3318: checking for type of signal functions" >&5
3319 echo $ECHO_N "checking for type of signal functions... $ECHO_C" >&6
3320 if test "${bash_cv_signal_vintage+set}" = set; then
3321   echo $ECHO_N "(cached) $ECHO_C" >&6
3322 else
3323
3324   cat >conftest.$ac_ext <<_ACEOF
3325 #line 3325 "configure"
3326 #include "confdefs.h"
3327 #include <signal.h>
3328 int
3329 main ()
3330 {
3331
3332     sigset_t ss;
3333     struct sigaction sa;
3334     sigemptyset(&ss); sigsuspend(&ss);
3335     sigaction(SIGINT, &sa, (struct sigaction *) 0);
3336     sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
3337
3338   ;
3339   return 0;
3340 }
3341 _ACEOF
3342 rm -f conftest.$ac_objext conftest$ac_exeext
3343 if { (eval echo "$as_me:3343: \"$ac_link\"") >&5
3344   (eval $ac_link) 2>&5
3345   ac_status=$?
3346   echo "$as_me:3346: \$? = $ac_status" >&5
3347   (exit $ac_status); } &&
3348          { ac_try='test -s conftest$ac_exeext'
3349   { (eval echo "$as_me:3349: \"$ac_try\"") >&5
3350   (eval $ac_try) 2>&5
3351   ac_status=$?
3352   echo "$as_me:3352: \$? = $ac_status" >&5
3353   (exit $ac_status); }; }; then
3354   bash_cv_signal_vintage=posix
3355 else
3356   echo "$as_me: failed program was:" >&5
3357 cat conftest.$ac_ext >&5
3358
3359     cat >conftest.$ac_ext <<_ACEOF
3360 #line 3360 "configure"
3361 #include "confdefs.h"
3362 #include <signal.h>
3363 int
3364 main ()
3365 {
3366
3367         int mask = sigmask(SIGINT);
3368         sigsetmask(mask); sigblock(mask); sigpause(mask);
3369
3370   ;
3371   return 0;
3372 }
3373 _ACEOF
3374 rm -f conftest.$ac_objext conftest$ac_exeext
3375 if { (eval echo "$as_me:3375: \"$ac_link\"") >&5
3376   (eval $ac_link) 2>&5
3377   ac_status=$?
3378   echo "$as_me:3378: \$? = $ac_status" >&5
3379   (exit $ac_status); } &&
3380          { ac_try='test -s conftest$ac_exeext'
3381   { (eval echo "$as_me:3381: \"$ac_try\"") >&5
3382   (eval $ac_try) 2>&5
3383   ac_status=$?
3384   echo "$as_me:3384: \$? = $ac_status" >&5
3385   (exit $ac_status); }; }; then
3386   bash_cv_signal_vintage=4.2bsd
3387 else
3388   echo "$as_me: failed program was:" >&5
3389 cat conftest.$ac_ext >&5
3390
3391       cat >conftest.$ac_ext <<_ACEOF
3392 #line 3392 "configure"
3393 #include "confdefs.h"
3394
3395         #include <signal.h>
3396         RETSIGTYPE foo() { }
3397 int
3398 main ()
3399 {
3400
3401                 int mask = sigmask(SIGINT);
3402                 sigset(SIGINT, foo); sigrelse(SIGINT);
3403                 sighold(SIGINT); sigpause(SIGINT);
3404
3405   ;
3406   return 0;
3407 }
3408 _ACEOF
3409 rm -f conftest.$ac_objext conftest$ac_exeext
3410 if { (eval echo "$as_me:3410: \"$ac_link\"") >&5
3411   (eval $ac_link) 2>&5
3412   ac_status=$?
3413   echo "$as_me:3413: \$? = $ac_status" >&5
3414   (exit $ac_status); } &&
3415          { ac_try='test -s conftest$ac_exeext'
3416   { (eval echo "$as_me:3416: \"$ac_try\"") >&5
3417   (eval $ac_try) 2>&5
3418   ac_status=$?
3419   echo "$as_me:3419: \$? = $ac_status" >&5
3420   (exit $ac_status); }; }; then
3421   bash_cv_signal_vintage=svr3
3422 else
3423   echo "$as_me: failed program was:" >&5
3424 cat conftest.$ac_ext >&5
3425 bash_cv_signal_vintage=v7
3426
3427 fi
3428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3429
3430 fi
3431 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3432
3433 fi
3434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3435
3436 fi
3437
3438 echo "$as_me:3438: result: $bash_cv_signal_vintage" >&5
3439 echo "${ECHO_T}$bash_cv_signal_vintage" >&6
3440 if test "$bash_cv_signal_vintage" = posix; then
3441 cat >>confdefs.h <<\EOF
3442 #define HAVE_POSIX_SIGNALS 1
3443 EOF
3444
3445 elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
3446 cat >>confdefs.h <<\EOF
3447 #define HAVE_BSD_SIGNALS 1
3448 EOF
3449
3450 elif test "$bash_cv_signal_vintage" = svr3; then
3451 cat >>confdefs.h <<\EOF
3452 #define HAVE_USG_SIGHOLD 1
3453 EOF
3454
3455 fi
3456
3457 echo "$as_me:3457: checking if signal handlers must be reinstalled when invoked" >&5
3458 echo $ECHO_N "checking if signal handlers must be reinstalled when invoked... $ECHO_C" >&6
3459 if test "${bash_cv_must_reinstall_sighandlers+set}" = set; then
3460   echo $ECHO_N "(cached) $ECHO_C" >&6
3461 else
3462   if test "$cross_compiling" = yes; then
3463   { echo "$as_me:3463: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5
3464 echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;}
3465     bash_cv_must_reinstall_sighandlers=no
3466
3467 else
3468   cat >conftest.$ac_ext <<_ACEOF
3469 #line 3469 "configure"
3470 #include "confdefs.h"
3471
3472 #include <signal.h>
3473 #ifdef HAVE_UNISTD_H
3474 #include <unistd.h>
3475 #endif
3476
3477 typedef RETSIGTYPE sigfunc();
3478
3479 int nsigint;
3480
3481 #ifdef HAVE_POSIX_SIGNALS
3482 sigfunc *
3483 set_signal_handler(sig, handler)
3484      int sig;
3485      sigfunc *handler;
3486 {
3487   struct sigaction act, oact;
3488   act.sa_handler = handler;
3489   act.sa_flags = 0;
3490   sigemptyset (&act.sa_mask);
3491   sigemptyset (&oact.sa_mask);
3492   sigaction (sig, &act, &oact);
3493   return (oact.sa_handler);
3494 }
3495 #else
3496 #define set_signal_handler(s, h) signal(s, h)
3497 #endif
3498
3499 RETSIGTYPE
3500 sigint(s)
3501 int s;
3502 {
3503   nsigint++;
3504 }
3505
3506 main()
3507 {
3508         nsigint = 0;
3509         set_signal_handler(SIGINT, sigint);
3510         kill((int)getpid(), SIGINT);
3511         kill((int)getpid(), SIGINT);
3512         exit(nsigint != 2);
3513 }
3514
3515 _ACEOF
3516 rm -f conftest$ac_exeext
3517 if { (eval echo "$as_me:3517: \"$ac_link\"") >&5
3518   (eval $ac_link) 2>&5
3519   ac_status=$?
3520   echo "$as_me:3520: \$? = $ac_status" >&5
3521   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3522   { (eval echo "$as_me:3522: \"$ac_try\"") >&5
3523   (eval $ac_try) 2>&5
3524   ac_status=$?
3525   echo "$as_me:3525: \$? = $ac_status" >&5
3526   (exit $ac_status); }; }; then
3527   bash_cv_must_reinstall_sighandlers=no
3528 else
3529   echo "$as_me: program exited with status $ac_status" >&5
3530 echo "$as_me: failed program was:" >&5
3531 cat conftest.$ac_ext >&5
3532 bash_cv_must_reinstall_sighandlers=yes
3533 fi
3534 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3535 fi
3536 fi
3537
3538 echo "$as_me:3538: result: $bash_cv_must_reinstall_sighandlers" >&5
3539 echo "${ECHO_T}$bash_cv_must_reinstall_sighandlers" >&6
3540 if test $bash_cv_must_reinstall_sighandlers = yes; then
3541 cat >>confdefs.h <<\EOF
3542 #define MUST_REINSTALL_SIGHANDLERS 1
3543 EOF
3544
3545 fi
3546
3547 echo "$as_me:3547: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
3548 echo $ECHO_N "checking for presence of POSIX-style sigsetjmp/siglongjmp... $ECHO_C" >&6
3549 if test "${bash_cv_func_sigsetjmp+set}" = set; then
3550   echo $ECHO_N "(cached) $ECHO_C" >&6
3551 else
3552   if test "$cross_compiling" = yes; then
3553   { echo "$as_me:3553: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5
3554 echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;}
3555      bash_cv_func_sigsetjmp=missing
3556
3557 else
3558   cat >conftest.$ac_ext <<_ACEOF
3559 #line 3559 "configure"
3560 #include "confdefs.h"
3561
3562 #ifdef HAVE_UNISTD_H
3563 #include <unistd.h>
3564 #endif
3565 #include <sys/types.h>
3566 #include <signal.h>
3567 #include <setjmp.h>
3568
3569 main()
3570 {
3571 #if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
3572 exit (1);
3573 #else
3574
3575 int code;
3576 sigset_t set, oset;
3577 sigjmp_buf xx;
3578
3579 /* get the mask */
3580 sigemptyset(&set);
3581 sigemptyset(&oset);
3582 sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
3583 sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
3584
3585 /* save it */
3586 code = sigsetjmp(xx, 1);
3587 if (code)
3588   exit(0);      /* could get sigmask and compare to oset here. */
3589
3590 /* change it */
3591 sigaddset(&set, SIGINT);
3592 sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
3593
3594 /* and siglongjmp */
3595 siglongjmp(xx, 10);
3596 exit(1);
3597 #endif
3598 }
3599 _ACEOF
3600 rm -f conftest$ac_exeext
3601 if { (eval echo "$as_me:3601: \"$ac_link\"") >&5
3602   (eval $ac_link) 2>&5
3603   ac_status=$?
3604   echo "$as_me:3604: \$? = $ac_status" >&5
3605   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3606   { (eval echo "$as_me:3606: \"$ac_try\"") >&5
3607   (eval $ac_try) 2>&5
3608   ac_status=$?
3609   echo "$as_me:3609: \$? = $ac_status" >&5
3610   (exit $ac_status); }; }; then
3611   bash_cv_func_sigsetjmp=present
3612 else
3613   echo "$as_me: program exited with status $ac_status" >&5
3614 echo "$as_me: failed program was:" >&5
3615 cat conftest.$ac_ext >&5
3616 bash_cv_func_sigsetjmp=missing
3617 fi
3618 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3619 fi
3620 fi
3621
3622 echo "$as_me:3622: result: $bash_cv_func_sigsetjmp" >&5
3623 echo "${ECHO_T}$bash_cv_func_sigsetjmp" >&6
3624 if test $bash_cv_func_sigsetjmp = present; then
3625 cat >>confdefs.h <<\EOF
3626 #define HAVE_POSIX_SIGSETJMP 1
3627 EOF
3628
3629 fi
3630
3631 echo "$as_me:3631: checking for lstat" >&5
3632 echo $ECHO_N "checking for lstat... $ECHO_C" >&6
3633 if test "${bash_cv_func_lstat+set}" = set; then
3634   echo $ECHO_N "(cached) $ECHO_C" >&6
3635 else
3636   cat >conftest.$ac_ext <<_ACEOF
3637 #line 3637 "configure"
3638 #include "confdefs.h"
3639
3640 #include <sys/types.h>
3641 #include <sys/stat.h>
3642
3643 int
3644 main ()
3645 {
3646  lstat(".",(struct stat *)0);
3647   ;
3648   return 0;
3649 }
3650 _ACEOF
3651 rm -f conftest.$ac_objext conftest$ac_exeext
3652 if { (eval echo "$as_me:3652: \"$ac_link\"") >&5
3653   (eval $ac_link) 2>&5
3654   ac_status=$?
3655   echo "$as_me:3655: \$? = $ac_status" >&5
3656   (exit $ac_status); } &&
3657          { ac_try='test -s conftest$ac_exeext'
3658   { (eval echo "$as_me:3658: \"$ac_try\"") >&5
3659   (eval $ac_try) 2>&5
3660   ac_status=$?
3661   echo "$as_me:3661: \$? = $ac_status" >&5
3662   (exit $ac_status); }; }; then
3663   bash_cv_func_lstat=yes
3664 else
3665   echo "$as_me: failed program was:" >&5
3666 cat conftest.$ac_ext >&5
3667 bash_cv_func_lstat=no
3668 fi
3669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3670 fi
3671 echo "$as_me:3671: result: $bash_cv_func_lstat" >&5
3672 echo "${ECHO_T}$bash_cv_func_lstat" >&6
3673 if test $bash_cv_func_lstat = yes; then
3674   cat >>confdefs.h <<\EOF
3675 #define HAVE_LSTAT 1
3676 EOF
3677
3678 fi
3679
3680 echo "$as_me:3680: checking whether or not strcoll and strcmp differ" >&5
3681 echo $ECHO_N "checking whether or not strcoll and strcmp differ... $ECHO_C" >&6
3682 if test "${bash_cv_func_strcoll_broken+set}" = set; then
3683   echo $ECHO_N "(cached) $ECHO_C" >&6
3684 else
3685   if test "$cross_compiling" = yes; then
3686   { echo "$as_me:3686: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5
3687 echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;}
3688     bash_cv_func_strcoll_broken=no
3689
3690 else
3691   cat >conftest.$ac_ext <<_ACEOF
3692 #line 3692 "configure"
3693 #include "confdefs.h"
3694
3695 #include <stdio.h>
3696 #if defined (HAVE_LOCALE_H)
3697 #include <locale.h>
3698 #endif
3699
3700 main(c, v)
3701 int     c;
3702 char    *v[];
3703 {
3704         int     r1, r2;
3705         char    *deflocale, *defcoll;
3706
3707 #ifdef HAVE_SETLOCALE
3708         deflocale = setlocale(LC_ALL, "");
3709         defcoll = setlocale(LC_COLLATE, "");
3710 #endif
3711
3712 #ifdef HAVE_STRCOLL
3713         /* These two values are taken from tests/glob-test. */
3714         r1 = strcoll("abd", "aXd");
3715 #else
3716         r1 = 0;
3717 #endif
3718         r2 = strcmp("abd", "aXd");
3719
3720         /* These two should both be greater than 0.  It is permissible for
3721            a system to return different values, as long as the sign is the
3722            same. */
3723
3724         /* Exit with 1 (failure) if these two values are both > 0, since
3725            this tests whether strcoll(3) is broken with respect to strcmp(3)
3726            in the default locale. */
3727         exit (r1 > 0 && r2 > 0);
3728 }
3729
3730 _ACEOF
3731 rm -f conftest$ac_exeext
3732 if { (eval echo "$as_me:3732: \"$ac_link\"") >&5
3733   (eval $ac_link) 2>&5
3734   ac_status=$?
3735   echo "$as_me:3735: \$? = $ac_status" >&5
3736   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3737   { (eval echo "$as_me:3737: \"$ac_try\"") >&5
3738   (eval $ac_try) 2>&5
3739   ac_status=$?
3740   echo "$as_me:3740: \$? = $ac_status" >&5
3741   (exit $ac_status); }; }; then
3742   bash_cv_func_strcoll_broken=yes
3743 else
3744   echo "$as_me: program exited with status $ac_status" >&5
3745 echo "$as_me: failed program was:" >&5
3746 cat conftest.$ac_ext >&5
3747 bash_cv_func_strcoll_broken=no
3748 fi
3749 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3750 fi
3751 fi
3752
3753 echo "$as_me:3753: result: $bash_cv_func_strcoll_broken" >&5
3754 echo "${ECHO_T}$bash_cv_func_strcoll_broken" >&6
3755 if test $bash_cv_func_strcoll_broken = yes; then
3756 cat >>confdefs.h <<\EOF
3757 #define STRCOLL_BROKEN 1
3758 EOF
3759
3760 fi
3761
3762 echo "$as_me:3762: checking whether getpw functions are declared in pwd.h" >&5
3763 echo $ECHO_N "checking whether getpw functions are declared in pwd.h... $ECHO_C" >&6
3764 if test "${bash_cv_getpw_declared+set}" = set; then
3765   echo $ECHO_N "(cached) $ECHO_C" >&6
3766 else
3767   cat >conftest.$ac_ext <<_ACEOF
3768 #line 3768 "configure"
3769 #include "confdefs.h"
3770
3771 #include <sys/types.h>
3772 #ifdef HAVE_UNISTD_H
3773 #  include <unistd.h>
3774 #endif
3775 #include <pwd.h>
3776
3777 _ACEOF
3778 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3779   egrep "getpwuid" >/dev/null 2>&1; then
3780   bash_cv_getpw_declared=yes
3781 else
3782   bash_cv_getpw_declared=no
3783 fi
3784 rm -f conftest*
3785
3786 fi
3787
3788 echo "$as_me:3788: result: $bash_cv_getpw_declared" >&5
3789 echo "${ECHO_T}$bash_cv_getpw_declared" >&6
3790 if test $bash_cv_getpw_declared = yes; then
3791 cat >>confdefs.h <<\EOF
3792 #define HAVE_GETPW_DECLS 1
3793 EOF
3794
3795 fi
3796
3797 echo "$as_me:3797: checking POSIX termios" >&5
3798 echo $ECHO_N "checking POSIX termios... $ECHO_C" >&6
3799 if test "${ac_cv_sys_posix_termios+set}" = set; then
3800   echo $ECHO_N "(cached) $ECHO_C" >&6
3801 else
3802   cat >conftest.$ac_ext <<_ACEOF
3803 #line 3803 "configure"
3804 #include "confdefs.h"
3805 #include <sys/types.h>
3806 #include <unistd.h>
3807 #include <termios.h>
3808 int
3809 main ()
3810 {
3811 /* SunOS 4.0.3 has termios.h but not the library calls.  */
3812    tcgetattr(0, 0);
3813   ;
3814   return 0;
3815 }
3816 _ACEOF
3817 rm -f conftest.$ac_objext conftest$ac_exeext
3818 if { (eval echo "$as_me:3818: \"$ac_link\"") >&5
3819   (eval $ac_link) 2>&5
3820   ac_status=$?
3821   echo "$as_me:3821: \$? = $ac_status" >&5
3822   (exit $ac_status); } &&
3823          { ac_try='test -s conftest$ac_exeext'
3824   { (eval echo "$as_me:3824: \"$ac_try\"") >&5
3825   (eval $ac_try) 2>&5
3826   ac_status=$?
3827   echo "$as_me:3827: \$? = $ac_status" >&5
3828   (exit $ac_status); }; }; then
3829   ac_cv_sys_posix_termios=yes
3830 else
3831   echo "$as_me: failed program was:" >&5
3832 cat conftest.$ac_ext >&5
3833 ac_cv_sys_posix_termios=no
3834 fi
3835 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3836 fi
3837 echo "$as_me:3837: result: $ac_cv_sys_posix_termios" >&5
3838 echo "${ECHO_T}$ac_cv_sys_posix_termios" >&6
3839
3840 if test $ac_cv_sys_posix_termios = yes; then
3841   echo "$as_me:3841: checking whether termios.h defines TIOCGWINSZ" >&5
3842 echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6
3843 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
3844   echo $ECHO_N "(cached) $ECHO_C" >&6
3845 else
3846   cat >conftest.$ac_ext <<_ACEOF
3847 #line 3847 "configure"
3848 #include "confdefs.h"
3849 #include <sys/types.h>
3850 #include <termios.h>
3851 #ifdef TIOCGWINSZ
3852   yes
3853 #endif
3854
3855 _ACEOF
3856 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3857   egrep "yes" >/dev/null 2>&1; then
3858   ac_cv_sys_tiocgwinsz_in_termios_h=yes
3859 else
3860   ac_cv_sys_tiocgwinsz_in_termios_h=no
3861 fi
3862 rm -f conftest*
3863
3864 fi
3865 echo "$as_me:3865: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
3866 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6
3867
3868 fi
3869 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
3870   echo "$as_me:3870: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
3871 echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6
3872 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
3873   echo $ECHO_N "(cached) $ECHO_C" >&6
3874 else
3875   cat >conftest.$ac_ext <<_ACEOF
3876 #line 3876 "configure"
3877 #include "confdefs.h"
3878 #include <sys/types.h>
3879 #include <sys/ioctl.h>
3880 #ifdef TIOCGWINSZ
3881   yes
3882 #endif
3883
3884 _ACEOF
3885 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3886   egrep "yes" >/dev/null 2>&1; then
3887   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
3888 else
3889   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
3890 fi
3891 rm -f conftest*
3892
3893 fi
3894 echo "$as_me:3894: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
3895 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6
3896
3897   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
3898
3899 cat >>confdefs.h <<\EOF
3900 #define GWINSZ_IN_SYS_IOCTL 1
3901 EOF
3902
3903   fi
3904 fi
3905
3906 echo "$as_me:3906: checking whether signal handlers are of type void" >&5
3907 echo $ECHO_N "checking whether signal handlers are of type void... $ECHO_C" >&6
3908 if test "${bash_cv_void_sighandler+set}" = set; then
3909   echo $ECHO_N "(cached) $ECHO_C" >&6
3910 else
3911   cat >conftest.$ac_ext <<_ACEOF
3912 #line 3912 "configure"
3913 #include "confdefs.h"
3914 #include <sys/types.h>
3915 #include <signal.h>
3916 #ifdef signal
3917 #undef signal
3918 #endif
3919 #ifdef __cplusplus
3920 extern "C"
3921 #endif
3922 void (*signal ()) ();
3923 int
3924 main ()
3925 {
3926 int i;
3927   ;
3928   return 0;
3929 }
3930 _ACEOF
3931 rm -f conftest.$ac_objext
3932 if { (eval echo "$as_me:3932: \"$ac_compile\"") >&5
3933   (eval $ac_compile) 2>&5
3934   ac_status=$?
3935   echo "$as_me:3935: \$? = $ac_status" >&5
3936   (exit $ac_status); } &&
3937          { ac_try='test -s conftest.$ac_objext'
3938   { (eval echo "$as_me:3938: \"$ac_try\"") >&5
3939   (eval $ac_try) 2>&5
3940   ac_status=$?
3941   echo "$as_me:3941: \$? = $ac_status" >&5
3942   (exit $ac_status); }; }; then
3943   bash_cv_void_sighandler=yes
3944 else
3945   echo "$as_me: failed program was:" >&5
3946 cat conftest.$ac_ext >&5
3947 bash_cv_void_sighandler=no
3948 fi
3949 rm -f conftest.$ac_objext conftest.$ac_ext
3950 fi
3951 echo "$as_me:3951: result: $bash_cv_void_sighandler" >&5
3952 echo "${ECHO_T}$bash_cv_void_sighandler" >&6
3953 if test $bash_cv_void_sighandler = yes; then
3954 cat >>confdefs.h <<\EOF
3955 #define VOID_SIGHANDLER 1
3956 EOF
3957
3958 fi
3959
3960 echo "$as_me:3960: checking for TIOCSTAT in sys/ioctl.h" >&5
3961 echo $ECHO_N "checking for TIOCSTAT in sys/ioctl.h... $ECHO_C" >&6
3962 if test "${bash_cv_tiocstat_in_ioctl+set}" = set; then
3963   echo $ECHO_N "(cached) $ECHO_C" >&6
3964 else
3965   cat >conftest.$ac_ext <<_ACEOF
3966 #line 3966 "configure"
3967 #include "confdefs.h"
3968 #include <sys/types.h>
3969 #include <sys/ioctl.h>
3970 int
3971 main ()
3972 {
3973 int x = TIOCSTAT;
3974   ;
3975   return 0;
3976 }
3977 _ACEOF
3978 rm -f conftest.$ac_objext
3979 if { (eval echo "$as_me:3979: \"$ac_compile\"") >&5
3980   (eval $ac_compile) 2>&5
3981   ac_status=$?
3982   echo "$as_me:3982: \$? = $ac_status" >&5
3983   (exit $ac_status); } &&
3984          { ac_try='test -s conftest.$ac_objext'
3985   { (eval echo "$as_me:3985: \"$ac_try\"") >&5
3986   (eval $ac_try) 2>&5
3987   ac_status=$?
3988   echo "$as_me:3988: \$? = $ac_status" >&5
3989   (exit $ac_status); }; }; then
3990   bash_cv_tiocstat_in_ioctl=yes
3991 else
3992   echo "$as_me: failed program was:" >&5
3993 cat conftest.$ac_ext >&5
3994 bash_cv_tiocstat_in_ioctl=no
3995 fi
3996 rm -f conftest.$ac_objext conftest.$ac_ext
3997 fi
3998
3999 echo "$as_me:3999: result: $bash_cv_tiocstat_in_ioctl" >&5
4000 echo "${ECHO_T}$bash_cv_tiocstat_in_ioctl" >&6
4001 if test $bash_cv_tiocstat_in_ioctl = yes; then
4002 cat >>confdefs.h <<\EOF
4003 #define TIOCSTAT_IN_SYS_IOCTL 1
4004 EOF
4005
4006 fi
4007
4008 echo "$as_me:4008: checking for FIONREAD in sys/ioctl.h" >&5
4009 echo $ECHO_N "checking for FIONREAD in sys/ioctl.h... $ECHO_C" >&6
4010 if test "${bash_cv_fionread_in_ioctl+set}" = set; then
4011   echo $ECHO_N "(cached) $ECHO_C" >&6
4012 else
4013   cat >conftest.$ac_ext <<_ACEOF
4014 #line 4014 "configure"
4015 #include "confdefs.h"
4016 #include <sys/types.h>
4017 #include <sys/ioctl.h>
4018 int
4019 main ()
4020 {
4021 int x = FIONREAD;
4022   ;
4023   return 0;
4024 }
4025 _ACEOF
4026 rm -f conftest.$ac_objext
4027 if { (eval echo "$as_me:4027: \"$ac_compile\"") >&5
4028   (eval $ac_compile) 2>&5
4029   ac_status=$?
4030   echo "$as_me:4030: \$? = $ac_status" >&5
4031   (exit $ac_status); } &&
4032          { ac_try='test -s conftest.$ac_objext'
4033   { (eval echo "$as_me:4033: \"$ac_try\"") >&5
4034   (eval $ac_try) 2>&5
4035   ac_status=$?
4036   echo "$as_me:4036: \$? = $ac_status" >&5
4037   (exit $ac_status); }; }; then
4038   bash_cv_fionread_in_ioctl=yes
4039 else
4040   echo "$as_me: failed program was:" >&5
4041 cat conftest.$ac_ext >&5
4042 bash_cv_fionread_in_ioctl=no
4043 fi
4044 rm -f conftest.$ac_objext conftest.$ac_ext
4045 fi
4046
4047 echo "$as_me:4047: result: $bash_cv_fionread_in_ioctl" >&5
4048 echo "${ECHO_T}$bash_cv_fionread_in_ioctl" >&6
4049 if test $bash_cv_fionread_in_ioctl = yes; then
4050 cat >>confdefs.h <<\EOF
4051 #define FIONREAD_IN_SYS_IOCTL 1
4052 EOF
4053
4054 fi
4055
4056 echo "$as_me:4056: checking for speed_t in sys/types.h" >&5
4057 echo $ECHO_N "checking for speed_t in sys/types.h... $ECHO_C" >&6
4058 if test "${bash_cv_speed_t_in_sys_types+set}" = set; then
4059   echo $ECHO_N "(cached) $ECHO_C" >&6
4060 else
4061   cat >conftest.$ac_ext <<_ACEOF
4062 #line 4062 "configure"
4063 #include "confdefs.h"
4064 #include <sys/types.h>
4065 int
4066 main ()
4067 {
4068 speed_t x;
4069   ;
4070   return 0;
4071 }
4072 _ACEOF
4073 rm -f conftest.$ac_objext
4074 if { (eval echo "$as_me:4074: \"$ac_compile\"") >&5
4075   (eval $ac_compile) 2>&5
4076   ac_status=$?
4077   echo "$as_me:4077: \$? = $ac_status" >&5
4078   (exit $ac_status); } &&
4079          { ac_try='test -s conftest.$ac_objext'
4080   { (eval echo "$as_me:4080: \"$ac_try\"") >&5
4081   (eval $ac_try) 2>&5
4082   ac_status=$?
4083   echo "$as_me:4083: \$? = $ac_status" >&5
4084   (exit $ac_status); }; }; then
4085   bash_cv_speed_t_in_sys_types=yes
4086 else
4087   echo "$as_me: failed program was:" >&5
4088 cat conftest.$ac_ext >&5
4089 bash_cv_speed_t_in_sys_types=no
4090 fi
4091 rm -f conftest.$ac_objext conftest.$ac_ext
4092 fi
4093
4094 echo "$as_me:4094: result: $bash_cv_speed_t_in_sys_types" >&5
4095 echo "${ECHO_T}$bash_cv_speed_t_in_sys_types" >&6
4096 if test $bash_cv_speed_t_in_sys_types = yes; then
4097 cat >>confdefs.h <<\EOF
4098 #define SPEED_T_IN_SYS_TYPES 1
4099 EOF
4100
4101 fi
4102
4103 echo "$as_me:4103: checking for struct winsize in sys/ioctl.h and termios.h" >&5
4104 echo $ECHO_N "checking for struct winsize in sys/ioctl.h and termios.h... $ECHO_C" >&6
4105 if test "${bash_cv_struct_winsize_header+set}" = set; then
4106   echo $ECHO_N "(cached) $ECHO_C" >&6
4107 else
4108   cat >conftest.$ac_ext <<_ACEOF
4109 #line 4109 "configure"
4110 #include "confdefs.h"
4111 #include <sys/types.h>
4112 #include <sys/ioctl.h>
4113 int
4114 main ()
4115 {
4116 struct winsize x;
4117   ;
4118   return 0;
4119 }
4120 _ACEOF
4121 rm -f conftest.$ac_objext
4122 if { (eval echo "$as_me:4122: \"$ac_compile\"") >&5
4123   (eval $ac_compile) 2>&5
4124   ac_status=$?
4125   echo "$as_me:4125: \$? = $ac_status" >&5
4126   (exit $ac_status); } &&
4127          { ac_try='test -s conftest.$ac_objext'
4128   { (eval echo "$as_me:4128: \"$ac_try\"") >&5
4129   (eval $ac_try) 2>&5
4130   ac_status=$?
4131   echo "$as_me:4131: \$? = $ac_status" >&5
4132   (exit $ac_status); }; }; then
4133   bash_cv_struct_winsize_header=ioctl_h
4134 else
4135   echo "$as_me: failed program was:" >&5
4136 cat conftest.$ac_ext >&5
4137 cat >conftest.$ac_ext <<_ACEOF
4138 #line 4138 "configure"
4139 #include "confdefs.h"
4140 #include <sys/types.h>
4141 #include <termios.h>
4142 int
4143 main ()
4144 {
4145 struct winsize x;
4146   ;
4147   return 0;
4148 }
4149 _ACEOF
4150 rm -f conftest.$ac_objext
4151 if { (eval echo "$as_me:4151: \"$ac_compile\"") >&5
4152   (eval $ac_compile) 2>&5
4153   ac_status=$?
4154   echo "$as_me:4154: \$? = $ac_status" >&5
4155   (exit $ac_status); } &&
4156          { ac_try='test -s conftest.$ac_objext'
4157   { (eval echo "$as_me:4157: \"$ac_try\"") >&5
4158   (eval $ac_try) 2>&5
4159   ac_status=$?
4160   echo "$as_me:4160: \$? = $ac_status" >&5
4161   (exit $ac_status); }; }; then
4162   bash_cv_struct_winsize_header=termios_h
4163 else
4164   echo "$as_me: failed program was:" >&5
4165 cat conftest.$ac_ext >&5
4166 bash_cv_struct_winsize_header=other
4167 fi
4168 rm -f conftest.$ac_objext conftest.$ac_ext
4169
4170 fi
4171 rm -f conftest.$ac_objext conftest.$ac_ext
4172 fi
4173
4174 if test $bash_cv_struct_winsize_header = ioctl_h; then
4175   echo "$as_me:4175: result: sys/ioctl.h" >&5
4176 echo "${ECHO_T}sys/ioctl.h" >&6
4177   cat >>confdefs.h <<\EOF
4178 #define STRUCT_WINSIZE_IN_SYS_IOCTL 1
4179 EOF
4180
4181 elif test $bash_cv_struct_winsize_header = termios_h; then
4182   echo "$as_me:4182: result: termios.h" >&5
4183 echo "${ECHO_T}termios.h" >&6
4184   cat >>confdefs.h <<\EOF
4185 #define STRUCT_WINSIZE_IN_TERMIOS 1
4186 EOF
4187
4188 else
4189   echo "$as_me:4189: result: not found" >&5
4190 echo "${ECHO_T}not found" >&6
4191 fi
4192
4193 echo "$as_me:4193: checking if struct dirent has a d_ino member" >&5
4194 echo $ECHO_N "checking if struct dirent has a d_ino member... $ECHO_C" >&6
4195 if test "${bash_cv_dirent_has_dino+set}" = set; then
4196   echo $ECHO_N "(cached) $ECHO_C" >&6
4197 else
4198   cat >conftest.$ac_ext <<_ACEOF
4199 #line 4199 "configure"
4200 #include "confdefs.h"
4201
4202 #include <stdio.h>
4203 #include <sys/types.h>
4204 #ifdef HAVE_UNISTD_H
4205 # include <unistd.h>
4206 #endif /* HAVE_UNISTD_H */
4207 #if defined(HAVE_DIRENT_H)
4208 # include <dirent.h>
4209 #else
4210 # define dirent direct
4211 # ifdef HAVE_SYS_NDIR_H
4212 #  include <sys/ndir.h>
4213 # endif /* SYSNDIR */
4214 # ifdef HAVE_SYS_DIR_H
4215 #  include <sys/dir.h>
4216 # endif /* SYSDIR */
4217 # ifdef HAVE_NDIR_H
4218 #  include <ndir.h>
4219 # endif
4220 #endif /* HAVE_DIRENT_H */
4221
4222 int
4223 main ()
4224 {
4225
4226 struct dirent d; int z; z = d.d_ino;
4227
4228   ;
4229   return 0;
4230 }
4231 _ACEOF
4232 rm -f conftest.$ac_objext
4233 if { (eval echo "$as_me:4233: \"$ac_compile\"") >&5
4234   (eval $ac_compile) 2>&5
4235   ac_status=$?
4236   echo "$as_me:4236: \$? = $ac_status" >&5
4237   (exit $ac_status); } &&
4238          { ac_try='test -s conftest.$ac_objext'
4239   { (eval echo "$as_me:4239: \"$ac_try\"") >&5
4240   (eval $ac_try) 2>&5
4241   ac_status=$?
4242   echo "$as_me:4242: \$? = $ac_status" >&5
4243   (exit $ac_status); }; }; then
4244   bash_cv_dirent_has_dino=yes
4245 else
4246   echo "$as_me: failed program was:" >&5
4247 cat conftest.$ac_ext >&5
4248 bash_cv_dirent_has_dino=no
4249 fi
4250 rm -f conftest.$ac_objext conftest.$ac_ext
4251 fi
4252
4253 echo "$as_me:4253: result: $bash_cv_dirent_has_dino" >&5
4254 echo "${ECHO_T}$bash_cv_dirent_has_dino" >&6
4255 if test $bash_cv_dirent_has_dino = yes; then
4256 cat >>confdefs.h <<\EOF
4257 #define STRUCT_DIRENT_HAS_D_INO 1
4258 EOF
4259
4260 fi
4261
4262 echo "$as_me:4262: checking if struct dirent has a d_fileno member" >&5
4263 echo $ECHO_N "checking if struct dirent has a d_fileno member... $ECHO_C" >&6
4264 if test "${bash_cv_dirent_has_d_fileno+set}" = set; then
4265   echo $ECHO_N "(cached) $ECHO_C" >&6
4266 else
4267   cat >conftest.$ac_ext <<_ACEOF
4268 #line 4268 "configure"
4269 #include "confdefs.h"
4270
4271 #include <stdio.h>
4272 #include <sys/types.h>
4273 #ifdef HAVE_UNISTD_H
4274 # include <unistd.h>
4275 #endif /* HAVE_UNISTD_H */
4276 #if defined(HAVE_DIRENT_H)
4277 # include <dirent.h>
4278 #else
4279 # define dirent direct
4280 # ifdef HAVE_SYS_NDIR_H
4281 #  include <sys/ndir.h>
4282 # endif /* SYSNDIR */
4283 # ifdef HAVE_SYS_DIR_H
4284 #  include <sys/dir.h>
4285 # endif /* SYSDIR */
4286 # ifdef HAVE_NDIR_H
4287 #  include <ndir.h>
4288 # endif
4289 #endif /* HAVE_DIRENT_H */
4290
4291 int
4292 main ()
4293 {
4294
4295 struct dirent d; int z; z = d.d_fileno;
4296
4297   ;
4298   return 0;
4299 }
4300 _ACEOF
4301 rm -f conftest.$ac_objext
4302 if { (eval echo "$as_me:4302: \"$ac_compile\"") >&5
4303   (eval $ac_compile) 2>&5
4304   ac_status=$?
4305   echo "$as_me:4305: \$? = $ac_status" >&5
4306   (exit $ac_status); } &&
4307          { ac_try='test -s conftest.$ac_objext'
4308   { (eval echo "$as_me:4308: \"$ac_try\"") >&5
4309   (eval $ac_try) 2>&5
4310   ac_status=$?
4311   echo "$as_me:4311: \$? = $ac_status" >&5
4312   (exit $ac_status); }; }; then
4313   bash_cv_dirent_has_d_fileno=yes
4314 else
4315   echo "$as_me: failed program was:" >&5
4316 cat conftest.$ac_ext >&5
4317 bash_cv_dirent_has_d_fileno=no
4318 fi
4319 rm -f conftest.$ac_objext conftest.$ac_ext
4320 fi
4321
4322 echo "$as_me:4322: result: $bash_cv_dirent_has_d_fileno" >&5
4323 echo "${ECHO_T}$bash_cv_dirent_has_d_fileno" >&6
4324 if test $bash_cv_dirent_has_d_fileno = yes; then
4325 cat >>confdefs.h <<\EOF
4326 #define STRUCT_DIRENT_HAS_D_FILENO 1
4327 EOF
4328
4329 fi
4330
4331 case "$host_os" in
4332 aix*)   prefer_curses=yes ;;
4333 esac
4334
4335 if test "X$bash_cv_termcap_lib" = "X"; then
4336 _bash_needmsg=yes
4337 else
4338 echo "$as_me:4338: checking which library has the termcap functions" >&5
4339 echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6
4340 _bash_needmsg=
4341 fi
4342 if test "${bash_cv_termcap_lib+set}" = set; then
4343   echo $ECHO_N "(cached) $ECHO_C" >&6
4344 else
4345   echo "$as_me:4345: checking for tgetent in -ltermcap" >&5
4346 echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6
4347 if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
4348   echo $ECHO_N "(cached) $ECHO_C" >&6
4349 else
4350   ac_check_lib_save_LIBS=$LIBS
4351 LIBS="-ltermcap  $LIBS"
4352 cat >conftest.$ac_ext <<_ACEOF
4353 #line 4353 "configure"
4354 #include "confdefs.h"
4355
4356 /* Override any gcc2 internal prototype to avoid an error.  */
4357 #ifdef __cplusplus
4358 extern "C"
4359 #endif
4360 /* We use char because int might match the return type of a gcc2
4361    builtin and then its argument prototype would still apply.  */
4362 char tgetent ();
4363 int
4364 main ()
4365 {
4366 tgetent ();
4367   ;
4368   return 0;
4369 }
4370 _ACEOF
4371 rm -f conftest.$ac_objext conftest$ac_exeext
4372 if { (eval echo "$as_me:4372: \"$ac_link\"") >&5
4373   (eval $ac_link) 2>&5
4374   ac_status=$?
4375   echo "$as_me:4375: \$? = $ac_status" >&5
4376   (exit $ac_status); } &&
4377          { ac_try='test -s conftest$ac_exeext'
4378   { (eval echo "$as_me:4378: \"$ac_try\"") >&5
4379   (eval $ac_try) 2>&5
4380   ac_status=$?
4381   echo "$as_me:4381: \$? = $ac_status" >&5
4382   (exit $ac_status); }; }; then
4383   ac_cv_lib_termcap_tgetent=yes
4384 else
4385   echo "$as_me: failed program was:" >&5
4386 cat conftest.$ac_ext >&5
4387 ac_cv_lib_termcap_tgetent=no
4388 fi
4389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4390 LIBS=$ac_check_lib_save_LIBS
4391 fi
4392 echo "$as_me:4392: result: $ac_cv_lib_termcap_tgetent" >&5
4393 echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6
4394 if test $ac_cv_lib_termcap_tgetent = yes; then
4395   bash_cv_termcap_lib=libtermcap
4396 else
4397   echo "$as_me:4397: checking for tgetent in -ltinfo" >&5
4398 echo $ECHO_N "checking for tgetent in -ltinfo... $ECHO_C" >&6
4399 if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then
4400   echo $ECHO_N "(cached) $ECHO_C" >&6
4401 else
4402   ac_check_lib_save_LIBS=$LIBS
4403 LIBS="-ltinfo  $LIBS"
4404 cat >conftest.$ac_ext <<_ACEOF
4405 #line 4405 "configure"
4406 #include "confdefs.h"
4407
4408 /* Override any gcc2 internal prototype to avoid an error.  */
4409 #ifdef __cplusplus
4410 extern "C"
4411 #endif
4412 /* We use char because int might match the return type of a gcc2
4413    builtin and then its argument prototype would still apply.  */
4414 char tgetent ();
4415 int
4416 main ()
4417 {
4418 tgetent ();
4419   ;
4420   return 0;
4421 }
4422 _ACEOF
4423 rm -f conftest.$ac_objext conftest$ac_exeext
4424 if { (eval echo "$as_me:4424: \"$ac_link\"") >&5
4425   (eval $ac_link) 2>&5
4426   ac_status=$?
4427   echo "$as_me:4427: \$? = $ac_status" >&5
4428   (exit $ac_status); } &&
4429          { ac_try='test -s conftest$ac_exeext'
4430   { (eval echo "$as_me:4430: \"$ac_try\"") >&5
4431   (eval $ac_try) 2>&5
4432   ac_status=$?
4433   echo "$as_me:4433: \$? = $ac_status" >&5
4434   (exit $ac_status); }; }; then
4435   ac_cv_lib_tinfo_tgetent=yes
4436 else
4437   echo "$as_me: failed program was:" >&5
4438 cat conftest.$ac_ext >&5
4439 ac_cv_lib_tinfo_tgetent=no
4440 fi
4441 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4442 LIBS=$ac_check_lib_save_LIBS
4443 fi
4444 echo "$as_me:4444: result: $ac_cv_lib_tinfo_tgetent" >&5
4445 echo "${ECHO_T}$ac_cv_lib_tinfo_tgetent" >&6
4446 if test $ac_cv_lib_tinfo_tgetent = yes; then
4447   bash_cv_termcap_lib=libtinfo
4448 else
4449   echo "$as_me:4449: checking for tgetent in -lcurses" >&5
4450 echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6
4451 if test "${ac_cv_lib_curses_tgetent+set}" = set; then
4452   echo $ECHO_N "(cached) $ECHO_C" >&6
4453 else
4454   ac_check_lib_save_LIBS=$LIBS
4455 LIBS="-lcurses  $LIBS"
4456 cat >conftest.$ac_ext <<_ACEOF
4457 #line 4457 "configure"
4458 #include "confdefs.h"
4459
4460 /* Override any gcc2 internal prototype to avoid an error.  */
4461 #ifdef __cplusplus
4462 extern "C"
4463 #endif
4464 /* We use char because int might match the return type of a gcc2
4465    builtin and then its argument prototype would still apply.  */
4466 char tgetent ();
4467 int
4468 main ()
4469 {
4470 tgetent ();
4471   ;
4472   return 0;
4473 }
4474 _ACEOF
4475 rm -f conftest.$ac_objext conftest$ac_exeext
4476 if { (eval echo "$as_me:4476: \"$ac_link\"") >&5
4477   (eval $ac_link) 2>&5
4478   ac_status=$?
4479   echo "$as_me:4479: \$? = $ac_status" >&5
4480   (exit $ac_status); } &&
4481          { ac_try='test -s conftest$ac_exeext'
4482   { (eval echo "$as_me:4482: \"$ac_try\"") >&5
4483   (eval $ac_try) 2>&5
4484   ac_status=$?
4485   echo "$as_me:4485: \$? = $ac_status" >&5
4486   (exit $ac_status); }; }; then
4487   ac_cv_lib_curses_tgetent=yes
4488 else
4489   echo "$as_me: failed program was:" >&5
4490 cat conftest.$ac_ext >&5
4491 ac_cv_lib_curses_tgetent=no
4492 fi
4493 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4494 LIBS=$ac_check_lib_save_LIBS
4495 fi
4496 echo "$as_me:4496: result: $ac_cv_lib_curses_tgetent" >&5
4497 echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6
4498 if test $ac_cv_lib_curses_tgetent = yes; then
4499   bash_cv_termcap_lib=libcurses
4500 else
4501   echo "$as_me:4501: checking for tgetent in -lncurses" >&5
4502 echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6
4503 if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then
4504   echo $ECHO_N "(cached) $ECHO_C" >&6
4505 else
4506   ac_check_lib_save_LIBS=$LIBS
4507 LIBS="-lncurses  $LIBS"
4508 cat >conftest.$ac_ext <<_ACEOF
4509 #line 4509 "configure"
4510 #include "confdefs.h"
4511
4512 /* Override any gcc2 internal prototype to avoid an error.  */
4513 #ifdef __cplusplus
4514 extern "C"
4515 #endif
4516 /* We use char because int might match the return type of a gcc2
4517    builtin and then its argument prototype would still apply.  */
4518 char tgetent ();
4519 int
4520 main ()
4521 {
4522 tgetent ();
4523   ;
4524   return 0;
4525 }
4526 _ACEOF
4527 rm -f conftest.$ac_objext conftest$ac_exeext
4528 if { (eval echo "$as_me:4528: \"$ac_link\"") >&5
4529   (eval $ac_link) 2>&5
4530   ac_status=$?
4531   echo "$as_me:4531: \$? = $ac_status" >&5
4532   (exit $ac_status); } &&
4533          { ac_try='test -s conftest$ac_exeext'
4534   { (eval echo "$as_me:4534: \"$ac_try\"") >&5
4535   (eval $ac_try) 2>&5
4536   ac_status=$?
4537   echo "$as_me:4537: \$? = $ac_status" >&5
4538   (exit $ac_status); }; }; then
4539   ac_cv_lib_ncurses_tgetent=yes
4540 else
4541   echo "$as_me: failed program was:" >&5
4542 cat conftest.$ac_ext >&5
4543 ac_cv_lib_ncurses_tgetent=no
4544 fi
4545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4546 LIBS=$ac_check_lib_save_LIBS
4547 fi
4548 echo "$as_me:4548: result: $ac_cv_lib_ncurses_tgetent" >&5
4549 echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6
4550 if test $ac_cv_lib_ncurses_tgetent = yes; then
4551   bash_cv_termcap_lib=libncurses
4552 else
4553   bash_cv_termcap_lib=gnutermcap
4554 fi
4555
4556 fi
4557
4558 fi
4559
4560 fi
4561
4562 fi
4563
4564 if test "X$_bash_needmsg" = "Xyes"; then
4565 echo "$as_me:4565: checking which library has the termcap functions" >&5
4566 echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6
4567 fi
4568 echo "$as_me:4568: result: using $bash_cv_termcap_lib" >&5
4569 echo "${ECHO_T}using $bash_cv_termcap_lib" >&6
4570 if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
4571 LDFLAGS="$LDFLAGS -L./lib/termcap"
4572 TERMCAP_LIB="./lib/termcap/libtermcap.a"
4573 TERMCAP_DEP="./lib/termcap/libtermcap.a"
4574 elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
4575 TERMCAP_LIB=-ltermcap
4576 TERMCAP_DEP=
4577 elif test $bash_cv_termcap_lib = libtinfo; then
4578 TERMCAP_LIB=-ltinfo
4579 TERMCAP_DEP=
4580 elif test $bash_cv_termcap_lib = libncurses; then
4581 TERMCAP_LIB=-lncurses
4582 TERMCAP_DEP=
4583 else
4584 TERMCAP_LIB=-lcurses
4585 TERMCAP_DEP=
4586 fi
4587
4588 if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
4589         if test "$prefer_curses" = yes; then
4590                 TERMCAP_LIB=-lcurses
4591         else
4592                 TERMCAP_LIB=-ltermcap   #default
4593         fi
4594 fi
4595
4596 for ac_header in wctype.h
4597 do
4598 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4599 echo "$as_me:4599: checking for $ac_header" >&5
4600 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4601 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4602   echo $ECHO_N "(cached) $ECHO_C" >&6
4603 else
4604   cat >conftest.$ac_ext <<_ACEOF
4605 #line 4605 "configure"
4606 #include "confdefs.h"
4607 #include <$ac_header>
4608 _ACEOF
4609 if { (eval echo "$as_me:4609: \"$ac_cpp conftest.$ac_ext\"") >&5
4610   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4611   ac_status=$?
4612   egrep -v '^ *\+' conftest.er1 >conftest.err
4613   rm -f conftest.er1
4614   cat conftest.err >&5
4615   echo "$as_me:4615: \$? = $ac_status" >&5
4616   (exit $ac_status); } >/dev/null; then
4617   if test -s conftest.err; then
4618     ac_cpp_err=$ac_c_preproc_warn_flag
4619   else
4620     ac_cpp_err=
4621   fi
4622 else
4623   ac_cpp_err=yes
4624 fi
4625 if test -z "$ac_cpp_err"; then
4626   eval "$as_ac_Header=yes"
4627 else
4628   echo "$as_me: failed program was:" >&5
4629   cat conftest.$ac_ext >&5
4630   eval "$as_ac_Header=no"
4631 fi
4632 rm -f conftest.err conftest.$ac_ext
4633 fi
4634 echo "$as_me:4634: result: `eval echo '${'$as_ac_Header'}'`" >&5
4635 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4636 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4637   cat >>confdefs.h <<EOF
4638 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4639 EOF
4640
4641 fi
4642 done
4643
4644 for ac_header in wchar.h
4645 do
4646 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4647 echo "$as_me:4647: checking for $ac_header" >&5
4648 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4649 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4650   echo $ECHO_N "(cached) $ECHO_C" >&6
4651 else
4652   cat >conftest.$ac_ext <<_ACEOF
4653 #line 4653 "configure"
4654 #include "confdefs.h"
4655 #include <$ac_header>
4656 _ACEOF
4657 if { (eval echo "$as_me:4657: \"$ac_cpp conftest.$ac_ext\"") >&5
4658   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4659   ac_status=$?
4660   egrep -v '^ *\+' conftest.er1 >conftest.err
4661   rm -f conftest.er1
4662   cat conftest.err >&5
4663   echo "$as_me:4663: \$? = $ac_status" >&5
4664   (exit $ac_status); } >/dev/null; then
4665   if test -s conftest.err; then
4666     ac_cpp_err=$ac_c_preproc_warn_flag
4667   else
4668     ac_cpp_err=
4669   fi
4670 else
4671   ac_cpp_err=yes
4672 fi
4673 if test -z "$ac_cpp_err"; then
4674   eval "$as_ac_Header=yes"
4675 else
4676   echo "$as_me: failed program was:" >&5
4677   cat conftest.$ac_ext >&5
4678   eval "$as_ac_Header=no"
4679 fi
4680 rm -f conftest.err conftest.$ac_ext
4681 fi
4682 echo "$as_me:4682: result: `eval echo '${'$as_ac_Header'}'`" >&5
4683 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4684 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4685   cat >>confdefs.h <<EOF
4686 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4687 EOF
4688
4689 fi
4690 done
4691
4692 for ac_header in langinfo.h
4693 do
4694 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4695 echo "$as_me:4695: checking for $ac_header" >&5
4696 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4697 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4698   echo $ECHO_N "(cached) $ECHO_C" >&6
4699 else
4700   cat >conftest.$ac_ext <<_ACEOF
4701 #line 4701 "configure"
4702 #include "confdefs.h"
4703 #include <$ac_header>
4704 _ACEOF
4705 if { (eval echo "$as_me:4705: \"$ac_cpp conftest.$ac_ext\"") >&5
4706   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4707   ac_status=$?
4708   egrep -v '^ *\+' conftest.er1 >conftest.err
4709   rm -f conftest.er1
4710   cat conftest.err >&5
4711   echo "$as_me:4711: \$? = $ac_status" >&5
4712   (exit $ac_status); } >/dev/null; then
4713   if test -s conftest.err; then
4714     ac_cpp_err=$ac_c_preproc_warn_flag
4715   else
4716     ac_cpp_err=
4717   fi
4718 else
4719   ac_cpp_err=yes
4720 fi
4721 if test -z "$ac_cpp_err"; then
4722   eval "$as_ac_Header=yes"
4723 else
4724   echo "$as_me: failed program was:" >&5
4725   cat conftest.$ac_ext >&5
4726   eval "$as_ac_Header=no"
4727 fi
4728 rm -f conftest.err conftest.$ac_ext
4729 fi
4730 echo "$as_me:4730: result: `eval echo '${'$as_ac_Header'}'`" >&5
4731 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4732 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4733   cat >>confdefs.h <<EOF
4734 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4735 EOF
4736
4737 fi
4738 done
4739
4740 echo "$as_me:4740: checking for mbsrtowcs" >&5
4741 echo $ECHO_N "checking for mbsrtowcs... $ECHO_C" >&6
4742 if test "${ac_cv_func_mbsrtowcs+set}" = set; then
4743   echo $ECHO_N "(cached) $ECHO_C" >&6
4744 else
4745   cat >conftest.$ac_ext <<_ACEOF
4746 #line 4746 "configure"
4747 #include "confdefs.h"
4748 /* System header to define __stub macros and hopefully few prototypes,
4749     which can conflict with char mbsrtowcs (); below.  */
4750 #include <assert.h>
4751 /* Override any gcc2 internal prototype to avoid an error.  */
4752 #ifdef __cplusplus
4753 extern "C"
4754 #endif
4755 /* We use char because int might match the return type of a gcc2
4756    builtin and then its argument prototype would still apply.  */
4757 char mbsrtowcs ();
4758 char (*f) ();
4759
4760 int
4761 main ()
4762 {
4763 /* The GNU C library defines this for functions which it implements
4764     to always fail with ENOSYS.  Some functions are actually named
4765     something starting with __ and the normal name is an alias.  */
4766 #if defined (__stub_mbsrtowcs) || defined (__stub___mbsrtowcs)
4767 choke me
4768 #else
4769 f = mbsrtowcs;
4770 #endif
4771
4772   ;
4773   return 0;
4774 }
4775 _ACEOF
4776 rm -f conftest.$ac_objext conftest$ac_exeext
4777 if { (eval echo "$as_me:4777: \"$ac_link\"") >&5
4778   (eval $ac_link) 2>&5
4779   ac_status=$?
4780   echo "$as_me:4780: \$? = $ac_status" >&5
4781   (exit $ac_status); } &&
4782          { ac_try='test -s conftest$ac_exeext'
4783   { (eval echo "$as_me:4783: \"$ac_try\"") >&5
4784   (eval $ac_try) 2>&5
4785   ac_status=$?
4786   echo "$as_me:4786: \$? = $ac_status" >&5
4787   (exit $ac_status); }; }; then
4788   ac_cv_func_mbsrtowcs=yes
4789 else
4790   echo "$as_me: failed program was:" >&5
4791 cat conftest.$ac_ext >&5
4792 ac_cv_func_mbsrtowcs=no
4793 fi
4794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4795 fi
4796 echo "$as_me:4796: result: $ac_cv_func_mbsrtowcs" >&5
4797 echo "${ECHO_T}$ac_cv_func_mbsrtowcs" >&6
4798 if test $ac_cv_func_mbsrtowcs = yes; then
4799   cat >>confdefs.h <<\EOF
4800 #define HAVE_MBSRTOWCS 1
4801 EOF
4802
4803 fi
4804
4805 echo "$as_me:4805: checking for wcwidth" >&5
4806 echo $ECHO_N "checking for wcwidth... $ECHO_C" >&6
4807 if test "${ac_cv_func_wcwidth+set}" = set; then
4808   echo $ECHO_N "(cached) $ECHO_C" >&6
4809 else
4810   cat >conftest.$ac_ext <<_ACEOF
4811 #line 4811 "configure"
4812 #include "confdefs.h"
4813 /* System header to define __stub macros and hopefully few prototypes,
4814     which can conflict with char wcwidth (); below.  */
4815 #include <assert.h>
4816 /* Override any gcc2 internal prototype to avoid an error.  */
4817 #ifdef __cplusplus
4818 extern "C"
4819 #endif
4820 /* We use char because int might match the return type of a gcc2
4821    builtin and then its argument prototype would still apply.  */
4822 char wcwidth ();
4823 char (*f) ();
4824
4825 int
4826 main ()
4827 {
4828 /* The GNU C library defines this for functions which it implements
4829     to always fail with ENOSYS.  Some functions are actually named
4830     something starting with __ and the normal name is an alias.  */
4831 #if defined (__stub_wcwidth) || defined (__stub___wcwidth)
4832 choke me
4833 #else
4834 f = wcwidth;
4835 #endif
4836
4837   ;
4838   return 0;
4839 }
4840 _ACEOF
4841 rm -f conftest.$ac_objext conftest$ac_exeext
4842 if { (eval echo "$as_me:4842: \"$ac_link\"") >&5
4843   (eval $ac_link) 2>&5
4844   ac_status=$?
4845   echo "$as_me:4845: \$? = $ac_status" >&5
4846   (exit $ac_status); } &&
4847          { ac_try='test -s conftest$ac_exeext'
4848   { (eval echo "$as_me:4848: \"$ac_try\"") >&5
4849   (eval $ac_try) 2>&5
4850   ac_status=$?
4851   echo "$as_me:4851: \$? = $ac_status" >&5
4852   (exit $ac_status); }; }; then
4853   ac_cv_func_wcwidth=yes
4854 else
4855   echo "$as_me: failed program was:" >&5
4856 cat conftest.$ac_ext >&5
4857 ac_cv_func_wcwidth=no
4858 fi
4859 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4860 fi
4861 echo "$as_me:4861: result: $ac_cv_func_wcwidth" >&5
4862 echo "${ECHO_T}$ac_cv_func_wcwidth" >&6
4863 if test $ac_cv_func_wcwidth = yes; then
4864   cat >>confdefs.h <<\EOF
4865 #define HAVE_WCWIDTH 1
4866 EOF
4867
4868 fi
4869
4870 echo "$as_me:4870: checking for mbstate_t" >&5
4871 echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
4872 if test "${bash_cv_have_mbstate_t+set}" = set; then
4873   echo $ECHO_N "(cached) $ECHO_C" >&6
4874 else
4875   if test "$cross_compiling" = yes; then
4876   { { echo "$as_me:4876: error: cannot run test program while cross compiling" >&5
4877 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4878    { (exit 1); exit 1; }; }
4879 else
4880   cat >conftest.$ac_ext <<_ACEOF
4881 #line 4881 "configure"
4882 #include "confdefs.h"
4883
4884 #include <wchar.h>
4885 int
4886 main ()
4887 {
4888   mbstate_t ps;
4889   return 0;
4890 }
4891 _ACEOF
4892 rm -f conftest$ac_exeext
4893 if { (eval echo "$as_me:4893: \"$ac_link\"") >&5
4894   (eval $ac_link) 2>&5
4895   ac_status=$?
4896   echo "$as_me:4896: \$? = $ac_status" >&5
4897   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4898   { (eval echo "$as_me:4898: \"$ac_try\"") >&5
4899   (eval $ac_try) 2>&5
4900   ac_status=$?
4901   echo "$as_me:4901: \$? = $ac_status" >&5
4902   (exit $ac_status); }; }; then
4903   bash_cv_have_mbstate_t=yes
4904 else
4905   echo "$as_me: program exited with status $ac_status" >&5
4906 echo "$as_me: failed program was:" >&5
4907 cat conftest.$ac_ext >&5
4908 bash_cv_have_mbstate_t=no
4909 fi
4910 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4911 fi
4912 fi
4913 echo "$as_me:4913: result: $bash_cv_have_mbstate_t" >&5
4914 echo "${ECHO_T}$bash_cv_have_mbstate_t" >&6
4915 if test $bash_cv_have_mbstate_t = yes; then
4916         cat >>confdefs.h <<\EOF
4917 #define HAVE_MBSTATE_T 1
4918 EOF
4919
4920 fi
4921
4922 echo "$as_me:4922: checking for nl_langinfo and CODESET" >&5
4923 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
4924 if test "${bash_cv_langinfo_codeset+set}" = set; then
4925   echo $ECHO_N "(cached) $ECHO_C" >&6
4926 else
4927   cat >conftest.$ac_ext <<_ACEOF
4928 #line 4928 "configure"
4929 #include "confdefs.h"
4930 #include <langinfo.h>
4931 int
4932 main ()
4933 {
4934 char* cs = nl_langinfo(CODESET);
4935   ;
4936   return 0;
4937 }
4938 _ACEOF
4939 rm -f conftest.$ac_objext conftest$ac_exeext
4940 if { (eval echo "$as_me:4940: \"$ac_link\"") >&5
4941   (eval $ac_link) 2>&5
4942   ac_status=$?
4943   echo "$as_me:4943: \$? = $ac_status" >&5
4944   (exit $ac_status); } &&
4945          { ac_try='test -s conftest$ac_exeext'
4946   { (eval echo "$as_me:4946: \"$ac_try\"") >&5
4947   (eval $ac_try) 2>&5
4948   ac_status=$?
4949   echo "$as_me:4949: \$? = $ac_status" >&5
4950   (exit $ac_status); }; }; then
4951   bash_cv_langinfo_codeset=yes
4952 else
4953   echo "$as_me: failed program was:" >&5
4954 cat conftest.$ac_ext >&5
4955 bash_cv_langinfo_codeset=no
4956 fi
4957 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4958 fi
4959 echo "$as_me:4959: result: $bash_cv_langinfo_codeset" >&5
4960 echo "${ECHO_T}$bash_cv_langinfo_codeset" >&6
4961 if test $bash_cv_langinfo_codeset = yes; then
4962   cat >>confdefs.h <<\EOF
4963 #define HAVE_LANGINFO_CODESET 1
4964 EOF
4965
4966 fi
4967
4968 case "$host_cpu" in
4969 *cray*) LOCAL_CFLAGS=-DCRAY ;;
4970 *s390*) LOCAL_CFLAGS=-fsigned-char ;;
4971 esac
4972
4973 case "$host_os" in
4974 isc*)   LOCAL_CFLAGS=-Disc386 ;;
4975 esac
4976
4977 # shared library configuration section
4978 #
4979 # Shared object configuration section.  These values are generated by
4980 # ${srcdir}/support/shobj-conf
4981 #
4982 if test -f ${srcdir}/support/shobj-conf; then
4983         echo "$as_me:4983: checking configuration for building shared libraries" >&5
4984 echo $ECHO_N "checking configuration for building shared libraries... $ECHO_C" >&6
4985         eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
4986
4987         echo "$as_me:4987: result: $SHLIB_STATUS" >&5
4988 echo "${ECHO_T}$SHLIB_STATUS" >&6
4989
4990         # SHLIB_STATUS is either `supported' or `unsupported'.  If it's
4991         # `unsupported', turn off any default shared library building
4992         if test "$SHLIB_STATUS" = 'unsupported'; then
4993                 opt_shared_libs=no
4994         fi
4995
4996         # shared library versioning
4997         # quoted for m4 so I can use character classes
4998         SHLIB_MAJOR=`expr "$LIBVERSION" : '\([0-9]\)\..*'`
4999         SHLIB_MINOR=`expr "$LIBVERSION" : '[0-9]\.\([0-9]\).*'`
5000
5001 fi
5002
5003 if test "$opt_static_libs" = "yes"; then
5004         STATIC_TARGET=static
5005         STATIC_INSTALL_TARGET=install-static
5006 fi
5007 if test "$opt_shared_libs" = "yes"; then
5008         SHARED_TARGET=shared
5009         SHARED_INSTALL_TARGET=install-shared
5010 fi
5011
5012 case "$host_os" in
5013 msdosdjgpp*)    BUILD_DIR=`pwd.exe` ;;  # to prevent //d/path/file
5014 *)              BUILD_DIR=`pwd` ;;
5015 esac
5016
5017 ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile shlib/Makefile"
5018 ac_config_commands="$ac_config_commands default"
5019 cat >confcache <<\_ACEOF
5020 # This file is a shell script that caches the results of configure
5021 # tests run on this system so they can be shared between configure
5022 # scripts and configure runs, see configure's option --config-cache.
5023 # It is not useful on other systems.  If it contains results you don't
5024 # want to keep, you may remove or edit it.
5025 #
5026 # config.status only pays attention to the cache file if you give it
5027 # the --recheck option to rerun configure.
5028 #
5029 # `ac_cv_env_foo' variables (set or unset) will be overriden when
5030 # loading this file, other *unset* `ac_cv_foo' will be assigned the
5031 # following values.
5032
5033 _ACEOF
5034
5035 # The following way of writing the cache mishandles newlines in values,
5036 # but we know of no workaround that is simple, portable, and efficient.
5037 # So, don't put newlines in cache variables' values.
5038 # Ultrix sh set writes to stderr and can't be redirected directly,
5039 # and sets the high bit in the cache file unless we assign to the vars.
5040 {
5041   (set) 2>&1 |
5042     case `(ac_space=' '; set | grep ac_space) 2>&1` in
5043     *ac_space=\ *)
5044       # `set' does not quote correctly, so add quotes (double-quote
5045       # substitution turns \\\\ into \\, and sed turns \\ into \).
5046       sed -n \
5047         "s/'/'\\\\''/g;
5048           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5049       ;;
5050     *)
5051       # `set' quotes correctly as required by POSIX, so do not add quotes.
5052       sed -n \
5053         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
5054       ;;
5055     esac;
5056 } |
5057   sed '
5058      t clear
5059      : clear
5060      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
5061      t end
5062      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
5063      : end' >>confcache
5064 if cmp -s $cache_file confcache; then :; else
5065   if test -w $cache_file; then
5066     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
5067     cat confcache >$cache_file
5068   else
5069     echo "not updating unwritable cache $cache_file"
5070   fi
5071 fi
5072 rm -f confcache
5073
5074 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5075 # Let make expand exec_prefix.
5076 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5077
5078 # VPATH may cause trouble with some makes, so we remove $(srcdir),
5079 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
5080 # trailing colons and then remove the whole line if VPATH becomes empty
5081 # (actually we leave an empty line to preserve line numbers).
5082 if test "x$srcdir" = x.; then
5083   ac_vpsub='/^[         ]*VPATH[        ]*=/{
5084 s/:*\$(srcdir):*/:/;
5085 s/:*\${srcdir}:*/:/;
5086 s/:*@srcdir@:*/:/;
5087 s/^\([^=]*=[    ]*\):*/\1/;
5088 s/:*$//;
5089 s/^[^=]*=[      ]*$//;
5090 }'
5091 fi
5092
5093 DEFS=-DHAVE_CONFIG_H
5094
5095 : ${CONFIG_STATUS=./config.status}
5096 ac_clean_files_save=$ac_clean_files
5097 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
5098 { echo "$as_me:5098: creating $CONFIG_STATUS" >&5
5099 echo "$as_me: creating $CONFIG_STATUS" >&6;}
5100 cat >$CONFIG_STATUS <<_ACEOF
5101 #! $SHELL
5102 # Generated automatically by configure.
5103 # Run this file to recreate the current configuration.
5104 # Compiler output produced by configure, useful for debugging
5105 # configure, is in config.log if it exists.
5106
5107 debug=false
5108 SHELL=\${CONFIG_SHELL-$SHELL}
5109 ac_cs_invocation="\$0 \$@"
5110
5111 _ACEOF
5112
5113 cat >>$CONFIG_STATUS <<\_ACEOF
5114 # Be Bourne compatible
5115 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
5116   emulate sh
5117   NULLCMD=:
5118 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
5119   set -o posix
5120 fi
5121
5122 # Name of the executable.
5123 as_me=`echo "$0" |sed 's,.*[\\/],,'`
5124
5125 if expr a : '\(a\)' >/dev/null 2>&1; then
5126   as_expr=expr
5127 else
5128   as_expr=false
5129 fi
5130
5131 rm -f conf$$ conf$$.exe conf$$.file
5132 echo >conf$$.file
5133 if ln -s conf$$.file conf$$ 2>/dev/null; then
5134   # We could just check for DJGPP; but this test a) works b) is more generic
5135   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
5136   if test -f conf$$.exe; then
5137     # Don't use ln at all; we don't have any links
5138     as_ln_s='cp -p'
5139   else
5140     as_ln_s='ln -s'
5141   fi
5142 elif ln conf$$.file conf$$ 2>/dev/null; then
5143   as_ln_s=ln
5144 else
5145   as_ln_s='cp -p'
5146 fi
5147 rm -f conf$$ conf$$.exe conf$$.file
5148
5149 as_executable_p="test -f"
5150
5151 # Support unset when possible.
5152 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
5153   as_unset=unset
5154 else
5155   as_unset=false
5156 fi
5157
5158 # NLS nuisances.
5159 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
5160 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
5161 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
5162 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
5163 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
5164 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
5165 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
5166 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
5167
5168 # IFS
5169 # We need space, tab and new line, in precisely that order.
5170 as_nl='
5171 '
5172 IFS="   $as_nl"
5173
5174 # CDPATH.
5175 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
5176
5177 exec 6>&1
5178
5179 _ACEOF
5180
5181 # Files that config.status was made for.
5182 if test -n "$ac_config_files"; then
5183   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
5184 fi
5185
5186 if test -n "$ac_config_headers"; then
5187   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
5188 fi
5189
5190 if test -n "$ac_config_links"; then
5191   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
5192 fi
5193
5194 if test -n "$ac_config_commands"; then
5195   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
5196 fi
5197
5198 cat >>$CONFIG_STATUS <<\EOF
5199
5200 ac_cs_usage="\
5201 \`$as_me' instantiates files from templates according to the
5202 current configuration.
5203
5204 Usage: $0 [OPTIONS] [FILE]...
5205
5206   -h, --help       print this help, then exit
5207   -V, --version    print version number, then exit
5208   -d, --debug      don't remove temporary files
5209       --recheck    update $as_me by reconfiguring in the same conditions
5210   --file=FILE[:TEMPLATE]
5211                    instantiate the configuration file FILE
5212   --header=FILE[:TEMPLATE]
5213                    instantiate the configuration header FILE
5214
5215 Configuration files:
5216 $config_files
5217
5218 Configuration headers:
5219 $config_headers
5220
5221 Configuration commands:
5222 $config_commands
5223
5224 Report bugs to <bug-autoconf@gnu.org>."
5225 EOF
5226
5227 cat >>$CONFIG_STATUS <<EOF
5228 ac_cs_version="\\
5229 readline config.status 4.3
5230 configured by $0, generated by GNU Autoconf 2.52,
5231   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
5232
5233 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
5234 Free Software Foundation, Inc.
5235 This config.status script is free software; the Free Software Foundation
5236 gives unlimited permission to copy, distribute and modify it."
5237 srcdir=$srcdir
5238 INSTALL="$INSTALL"
5239 EOF
5240
5241 cat >>$CONFIG_STATUS <<\EOF
5242 # If no file are specified by the user, then we need to provide default
5243 # value.  By we need to know if files were specified by the user.
5244 ac_need_defaults=:
5245 while test $# != 0
5246 do
5247   case $1 in
5248   --*=*)
5249     ac_option=`expr "x$1" : 'x\([^=]*\)='`
5250     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
5251     shift
5252     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
5253     shift
5254     ;;
5255   -*);;
5256   *) # This is not an option, so the user has probably given explicit
5257      # arguments.
5258      ac_need_defaults=false;;
5259   esac
5260
5261   case $1 in
5262   # Handling of the options.
5263 EOF
5264 cat >>$CONFIG_STATUS <<EOF
5265   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5266     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
5267     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
5268 EOF
5269 cat >>$CONFIG_STATUS <<\EOF
5270   --version | --vers* | -V )
5271     echo "$ac_cs_version"; exit 0 ;;
5272   --he | --h)
5273     # Conflict between --help and --header
5274     { { echo "$as_me:5274: error: ambiguous option: $1
5275 Try \`$0 --help' for more information." >&5
5276 echo "$as_me: error: ambiguous option: $1
5277 Try \`$0 --help' for more information." >&2;}
5278    { (exit 1); exit 1; }; };;
5279   --help | --hel | -h )
5280     echo "$ac_cs_usage"; exit 0 ;;
5281   --debug | --d* | -d )
5282     debug=: ;;
5283   --file | --fil | --fi | --f )
5284     shift
5285     CONFIG_FILES="$CONFIG_FILES $1"
5286     ac_need_defaults=false;;
5287   --header | --heade | --head | --hea )
5288     shift
5289     CONFIG_HEADERS="$CONFIG_HEADERS $1"
5290     ac_need_defaults=false;;
5291
5292   # This is an error.
5293   -*) { { echo "$as_me:5293: error: unrecognized option: $1
5294 Try \`$0 --help' for more information." >&5
5295 echo "$as_me: error: unrecognized option: $1
5296 Try \`$0 --help' for more information." >&2;}
5297    { (exit 1); exit 1; }; } ;;
5298
5299   *) ac_config_targets="$ac_config_targets $1" ;;
5300
5301   esac
5302   shift
5303 done
5304
5305 exec 5>>config.log
5306 cat >&5 << _ACEOF
5307
5308 ## ----------------------- ##
5309 ## Running config.status.  ##
5310 ## ----------------------- ##
5311
5312 This file was extended by $as_me (readline 4.3) 2.52, executed with
5313   CONFIG_FILES    = $CONFIG_FILES
5314   CONFIG_HEADERS  = $CONFIG_HEADERS
5315   CONFIG_LINKS    = $CONFIG_LINKS
5316   CONFIG_COMMANDS = $CONFIG_COMMANDS
5317   > $ac_cs_invocation
5318 on `(hostname || uname -n) 2>/dev/null | sed 1q`
5319
5320 _ACEOF
5321 EOF
5322
5323 cat >>$CONFIG_STATUS <<\EOF
5324 for ac_config_target in $ac_config_targets
5325 do
5326   case "$ac_config_target" in
5327   # Handling of arguments.
5328   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
5329   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
5330   "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
5331   "shlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES shlib/Makefile" ;;
5332   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
5333   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
5334   *) { { echo "$as_me:5334: error: invalid argument: $ac_config_target" >&5
5335 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
5336    { (exit 1); exit 1; }; };;
5337   esac
5338 done
5339
5340 # If the user did not use the arguments to specify the items to instantiate,
5341 # then the envvar interface is used.  Set only those that are not.
5342 # We use the long form for the default assignment because of an extremely
5343 # bizarre bug on SunOS 4.1.3.
5344 if $ac_need_defaults; then
5345   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
5346   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
5347   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
5348 fi
5349
5350 # Create a temporary directory, and hook for its removal unless debugging.
5351 $debug ||
5352 {
5353   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
5354   trap '{ (exit 1); exit 1; }' 1 2 13 15
5355 }
5356
5357 # Create a (secure) tmp directory for tmp files.
5358 : ${TMPDIR=/tmp}
5359 {
5360   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
5361   test -n "$tmp" && test -d "$tmp"
5362 }  ||
5363 {
5364   tmp=$TMPDIR/cs$$-$RANDOM
5365   (umask 077 && mkdir $tmp)
5366 } ||
5367 {
5368    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
5369    { (exit 1); exit 1; }
5370 }
5371
5372 EOF
5373
5374 cat >>$CONFIG_STATUS <<EOF
5375
5376 #
5377 # CONFIG_FILES section.
5378 #
5379
5380 # No need to generate the scripts if there are no CONFIG_FILES.
5381 # This happens for instance when ./config.status config.h
5382 if test -n "\$CONFIG_FILES"; then
5383   # Protect against being on the right side of a sed subst in config.status.
5384   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
5385    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
5386 s,@SHELL@,$SHELL,;t t
5387 s,@exec_prefix@,$exec_prefix,;t t
5388 s,@prefix@,$prefix,;t t
5389 s,@program_transform_name@,$program_transform_name,;t t
5390 s,@bindir@,$bindir,;t t
5391 s,@sbindir@,$sbindir,;t t
5392 s,@libexecdir@,$libexecdir,;t t
5393 s,@datadir@,$datadir,;t t
5394 s,@sysconfdir@,$sysconfdir,;t t
5395 s,@sharedstatedir@,$sharedstatedir,;t t
5396 s,@localstatedir@,$localstatedir,;t t
5397 s,@libdir@,$libdir,;t t
5398 s,@includedir@,$includedir,;t t
5399 s,@oldincludedir@,$oldincludedir,;t t
5400 s,@infodir@,$infodir,;t t
5401 s,@mandir@,$mandir,;t t
5402 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
5403 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
5404 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
5405 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
5406 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
5407 s,@build_alias@,$build_alias,;t t
5408 s,@host_alias@,$host_alias,;t t
5409 s,@target_alias@,$target_alias,;t t
5410 s,@ECHO_C@,$ECHO_C,;t t
5411 s,@ECHO_N@,$ECHO_N,;t t
5412 s,@ECHO_T@,$ECHO_T,;t t
5413 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
5414 s,@DEFS@,$DEFS,;t t
5415 s,@LIBS@,$LIBS,;t t
5416 s,@build@,$build,;t t
5417 s,@build_cpu@,$build_cpu,;t t
5418 s,@build_vendor@,$build_vendor,;t t
5419 s,@build_os@,$build_os,;t t
5420 s,@host@,$host,;t t
5421 s,@host_cpu@,$host_cpu,;t t
5422 s,@host_vendor@,$host_vendor,;t t
5423 s,@host_os@,$host_os,;t t
5424 s,@SET_MAKE@,$SET_MAKE,;t t
5425 s,@CC@,$CC,;t t
5426 s,@CFLAGS@,$CFLAGS,;t t
5427 s,@LDFLAGS@,$LDFLAGS,;t t
5428 s,@CPPFLAGS@,$CPPFLAGS,;t t
5429 s,@ac_ct_CC@,$ac_ct_CC,;t t
5430 s,@EXEEXT@,$EXEEXT,;t t
5431 s,@OBJEXT@,$OBJEXT,;t t
5432 s,@CPP@,$CPP,;t t
5433 s,@CROSS_COMPILING_FLAG@,$CROSS_COMPILING_FLAG,;t t
5434 s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
5435 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
5436 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
5437 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
5438 s,@AR@,$AR,;t t
5439 s,@RANLIB@,$RANLIB,;t t
5440 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
5441 s,@MAKE_SHELL@,$MAKE_SHELL,;t t
5442 s,@SHOBJ_CC@,$SHOBJ_CC,;t t
5443 s,@SHOBJ_CFLAGS@,$SHOBJ_CFLAGS,;t t
5444 s,@SHOBJ_LD@,$SHOBJ_LD,;t t
5445 s,@SHOBJ_LDFLAGS@,$SHOBJ_LDFLAGS,;t t
5446 s,@SHOBJ_XLDFLAGS@,$SHOBJ_XLDFLAGS,;t t
5447 s,@SHOBJ_LIBS@,$SHOBJ_LIBS,;t t
5448 s,@SHOBJ_STATUS@,$SHOBJ_STATUS,;t t
5449 s,@SHLIB_STATUS@,$SHLIB_STATUS,;t t
5450 s,@SHLIB_XLDFLAGS@,$SHLIB_XLDFLAGS,;t t
5451 s,@SHLIB_LIBSUFF@,$SHLIB_LIBSUFF,;t t
5452 s,@SHLIB_LIBVERSION@,$SHLIB_LIBVERSION,;t t
5453 s,@SHLIB_LIBS@,$SHLIB_LIBS,;t t
5454 s,@SHLIB_MAJOR@,$SHLIB_MAJOR,;t t
5455 s,@SHLIB_MINOR@,$SHLIB_MINOR,;t t
5456 s,@STATIC_TARGET@,$STATIC_TARGET,;t t
5457 s,@SHARED_TARGET@,$SHARED_TARGET,;t t
5458 s,@STATIC_INSTALL_TARGET@,$STATIC_INSTALL_TARGET,;t t
5459 s,@SHARED_INSTALL_TARGET@,$SHARED_INSTALL_TARGET,;t t
5460 s,@BUILD_DIR@,$BUILD_DIR,;t t
5461 s,@LOCAL_CFLAGS@,$LOCAL_CFLAGS,;t t
5462 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
5463 s,@LOCAL_DEFS@,$LOCAL_DEFS,;t t
5464 s,@ARFLAGS@,$ARFLAGS,;t t
5465 s,@LIBVERSION@,$LIBVERSION,;t t
5466 s,@TERMCAP_LIB@,$TERMCAP_LIB,;t t
5467 CEOF
5468
5469 EOF
5470
5471   cat >>$CONFIG_STATUS <<\EOF
5472   # Split the substitutions into bite-sized pieces for seds with
5473   # small command number limits, like on Digital OSF/1 and HP-UX.
5474   ac_max_sed_lines=48
5475   ac_sed_frag=1 # Number of current file.
5476   ac_beg=1 # First line for current file.
5477   ac_end=$ac_max_sed_lines # Line after last line for current file.
5478   ac_more_lines=:
5479   ac_sed_cmds=
5480   while $ac_more_lines; do
5481     if test $ac_beg -gt 1; then
5482       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
5483     else
5484       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
5485     fi
5486     if test ! -s $tmp/subs.frag; then
5487       ac_more_lines=false
5488     else
5489       # The purpose of the label and of the branching condition is to
5490       # speed up the sed processing (if there are no `@' at all, there
5491       # is no need to browse any of the substitutions).
5492       # These are the two extra sed commands mentioned above.
5493       (echo ':t
5494   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
5495       if test -z "$ac_sed_cmds"; then
5496         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
5497       else
5498         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
5499       fi
5500       ac_sed_frag=`expr $ac_sed_frag + 1`
5501       ac_beg=$ac_end
5502       ac_end=`expr $ac_end + $ac_max_sed_lines`
5503     fi
5504   done
5505   if test -z "$ac_sed_cmds"; then
5506     ac_sed_cmds=cat
5507   fi
5508 fi # test -n "$CONFIG_FILES"
5509
5510 EOF
5511 cat >>$CONFIG_STATUS <<\EOF
5512 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
5513   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5514   case $ac_file in
5515   - | *:- | *:-:* ) # input from stdin
5516         cat >$tmp/stdin
5517         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5518         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5519   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5520         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5521   * )   ac_file_in=$ac_file.in ;;
5522   esac
5523
5524   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
5525   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5526          X"$ac_file" : 'X\(//\)[^/]' \| \
5527          X"$ac_file" : 'X\(//\)$' \| \
5528          X"$ac_file" : 'X\(/\)' \| \
5529          .     : '\(.\)' 2>/dev/null ||
5530 echo X"$ac_file" |
5531     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
5532           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
5533           /^X\(\/\/\)$/{ s//\1/; q; }
5534           /^X\(\/\).*/{ s//\1/; q; }
5535           s/.*/./; q'`
5536   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5537     { case "$ac_dir" in
5538   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
5539   *)                      as_incr_dir=.;;
5540 esac
5541 as_dummy="$ac_dir"
5542 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
5543   case $as_mkdir_dir in
5544     # Skip DOS drivespec
5545     ?:) as_incr_dir=$as_mkdir_dir ;;
5546     *)
5547       as_incr_dir=$as_incr_dir/$as_mkdir_dir
5548       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
5549     ;;
5550   esac
5551 done; }
5552
5553     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
5554     # A "../" for each directory in $ac_dir_suffix.
5555     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
5556   else
5557     ac_dir_suffix= ac_dots=
5558   fi
5559
5560   case $srcdir in
5561   .)  ac_srcdir=.
5562       if test -z "$ac_dots"; then
5563          ac_top_srcdir=.
5564       else
5565          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
5566       fi ;;
5567   [\\/]* | ?:[\\/]* )
5568       ac_srcdir=$srcdir$ac_dir_suffix;
5569       ac_top_srcdir=$srcdir ;;
5570   *) # Relative path.
5571     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
5572     ac_top_srcdir=$ac_dots$srcdir ;;
5573   esac
5574
5575   case $INSTALL in
5576   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
5577   *) ac_INSTALL=$ac_dots$INSTALL ;;
5578   esac
5579
5580   if test x"$ac_file" != x-; then
5581     { echo "$as_me:5581: creating $ac_file" >&5
5582 echo "$as_me: creating $ac_file" >&6;}
5583     rm -f "$ac_file"
5584   fi
5585   # Let's still pretend it is `configure' which instantiates (i.e., don't
5586   # use $as_me), people would be surprised to read:
5587   #    /* config.h.  Generated automatically by config.status.  */
5588   configure_input="Generated automatically from `echo $ac_file_in |
5589                                                  sed 's,.*/,,'` by configure."
5590
5591   # First look for the input files in the build tree, otherwise in the
5592   # src tree.
5593   ac_file_inputs=`IFS=:
5594     for f in $ac_file_in; do
5595       case $f in
5596       -) echo $tmp/stdin ;;
5597       [\\/$]*)
5598          # Absolute (can't be DOS-style, as IFS=:)
5599          test -f "$f" || { { echo "$as_me:5599: error: cannot find input file: $f" >&5
5600 echo "$as_me: error: cannot find input file: $f" >&2;}
5601    { (exit 1); exit 1; }; }
5602          echo $f;;
5603       *) # Relative
5604          if test -f "$f"; then
5605            # Build tree
5606            echo $f
5607          elif test -f "$srcdir/$f"; then
5608            # Source tree
5609            echo $srcdir/$f
5610          else
5611            # /dev/null tree
5612            { { echo "$as_me:5612: error: cannot find input file: $f" >&5
5613 echo "$as_me: error: cannot find input file: $f" >&2;}
5614    { (exit 1); exit 1; }; }
5615          fi;;
5616       esac
5617     done` || { (exit 1); exit 1; }
5618 EOF
5619 cat >>$CONFIG_STATUS <<EOF
5620   sed "$ac_vpsub
5621 $extrasub
5622 EOF
5623 cat >>$CONFIG_STATUS <<\EOF
5624 :t
5625 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
5626 s,@configure_input@,$configure_input,;t t
5627 s,@srcdir@,$ac_srcdir,;t t
5628 s,@top_srcdir@,$ac_top_srcdir,;t t
5629 s,@INSTALL@,$ac_INSTALL,;t t
5630 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
5631   rm -f $tmp/stdin
5632   if test x"$ac_file" != x-; then
5633     mv $tmp/out $ac_file
5634   else
5635     cat $tmp/out
5636     rm -f $tmp/out
5637   fi
5638
5639 done
5640 EOF
5641 cat >>$CONFIG_STATUS <<\EOF
5642
5643 #
5644 # CONFIG_HEADER section.
5645 #
5646
5647 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5648 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5649 #
5650 # ac_d sets the value in "#define NAME VALUE" lines.
5651 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5652 ac_dB='[        ].*$,\1#\2'
5653 ac_dC=' '
5654 ac_dD=',;t'
5655 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5656 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5657 ac_uB='$,\1#\2define\3'
5658 ac_uC=' '
5659 ac_uD=',;t'
5660
5661 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
5662   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5663   case $ac_file in
5664   - | *:- | *:-:* ) # input from stdin
5665         cat >$tmp/stdin
5666         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5667         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5668   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5669         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5670   * )   ac_file_in=$ac_file.in ;;
5671   esac
5672
5673   test x"$ac_file" != x- && { echo "$as_me:5673: creating $ac_file" >&5
5674 echo "$as_me: creating $ac_file" >&6;}
5675
5676   # First look for the input files in the build tree, otherwise in the
5677   # src tree.
5678   ac_file_inputs=`IFS=:
5679     for f in $ac_file_in; do
5680       case $f in
5681       -) echo $tmp/stdin ;;
5682       [\\/$]*)
5683          # Absolute (can't be DOS-style, as IFS=:)
5684          test -f "$f" || { { echo "$as_me:5684: error: cannot find input file: $f" >&5
5685 echo "$as_me: error: cannot find input file: $f" >&2;}
5686    { (exit 1); exit 1; }; }
5687          echo $f;;
5688       *) # Relative
5689          if test -f "$f"; then
5690            # Build tree
5691            echo $f
5692          elif test -f "$srcdir/$f"; then
5693            # Source tree
5694            echo $srcdir/$f
5695          else
5696            # /dev/null tree
5697            { { echo "$as_me:5697: error: cannot find input file: $f" >&5
5698 echo "$as_me: error: cannot find input file: $f" >&2;}
5699    { (exit 1); exit 1; }; }
5700          fi;;
5701       esac
5702     done` || { (exit 1); exit 1; }
5703   # Remove the trailing spaces.
5704   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
5705
5706 EOF
5707
5708 # Transform confdefs.h into two sed scripts, `conftest.defines' and
5709 # `conftest.undefs', that substitutes the proper values into
5710 # config.h.in to produce config.h.  The first handles `#define'
5711 # templates, and the second `#undef' templates.
5712 # And first: Protect against being on the right side of a sed subst in
5713 # config.status.  Protect against being in an unquoted here document
5714 # in config.status.
5715 rm -f conftest.defines conftest.undefs
5716 # Using a here document instead of a string reduces the quoting nightmare.
5717 # Putting comments in sed scripts is not portable.
5718 #
5719 # `end' is used to avoid that the second main sed command (meant for
5720 # 0-ary CPP macros) applies to n-ary macro definitions.
5721 # See the Autoconf documentation for `clear'.
5722 cat >confdef2sed.sed <<\EOF
5723 s/[\\&,]/\\&/g
5724 s,[\\$`],\\&,g
5725 t clear
5726 : clear
5727 s,^[    ]*#[    ]*define[       ][      ]*\(\([^        (][^    (]*\)([^)]*)\)[         ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
5728 t end
5729 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
5730 : end
5731 EOF
5732 # If some macros were called several times there might be several times
5733 # the same #defines, which is useless.  Nevertheless, we may not want to
5734 # sort them, since we want the *last* AC-DEFINE to be honored.
5735 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
5736 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
5737 rm -f confdef2sed.sed
5738
5739 # This sed command replaces #undef with comments.  This is necessary, for
5740 # example, in the case of _POSIX_SOURCE, which is predefined and required
5741 # on some systems where configure will not decide to define it.
5742 cat >>conftest.undefs <<\EOF
5743 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
5744 EOF
5745
5746 # Break up conftest.defines because some shells have a limit on the size
5747 # of here documents, and old seds have small limits too (100 cmds).
5748 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
5749 echo '  if egrep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
5750 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
5751 echo '  :' >>$CONFIG_STATUS
5752 rm -f conftest.tail
5753 while grep . conftest.defines >/dev/null
5754 do
5755   # Write a limited-size here document to $tmp/defines.sed.
5756   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
5757   # Speed up: don't consider the non `#define' lines.
5758   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
5759   # Work around the forget-to-reset-the-flag bug.
5760   echo 't clr' >>$CONFIG_STATUS
5761   echo ': clr' >>$CONFIG_STATUS
5762   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
5763   echo 'CEOF
5764   sed -f $tmp/defines.sed $tmp/in >$tmp/out
5765   rm -f $tmp/in
5766   mv $tmp/out $tmp/in
5767 ' >>$CONFIG_STATUS
5768   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
5769   rm -f conftest.defines
5770   mv conftest.tail conftest.defines
5771 done
5772 rm -f conftest.defines
5773 echo '  fi # egrep' >>$CONFIG_STATUS
5774 echo >>$CONFIG_STATUS
5775
5776 # Break up conftest.undefs because some shells have a limit on the size
5777 # of here documents, and old seds have small limits too (100 cmds).
5778 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
5779 rm -f conftest.tail
5780 while grep . conftest.undefs >/dev/null
5781 do
5782   # Write a limited-size here document to $tmp/undefs.sed.
5783   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
5784   # Speed up: don't consider the non `#undef'
5785   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
5786   # Work around the forget-to-reset-the-flag bug.
5787   echo 't clr' >>$CONFIG_STATUS
5788   echo ': clr' >>$CONFIG_STATUS
5789   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
5790   echo 'CEOF
5791   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
5792   rm -f $tmp/in
5793   mv $tmp/out $tmp/in
5794 ' >>$CONFIG_STATUS
5795   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
5796   rm -f conftest.undefs
5797   mv conftest.tail conftest.undefs
5798 done
5799 rm -f conftest.undefs
5800
5801 cat >>$CONFIG_STATUS <<\EOF
5802   # Let's still pretend it is `configure' which instantiates (i.e., don't
5803   # use $as_me), people would be surprised to read:
5804   #    /* config.h.  Generated automatically by config.status.  */
5805   if test x"$ac_file" = x-; then
5806     echo "/* Generated automatically by configure.  */" >$tmp/config.h
5807   else
5808     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
5809   fi
5810   cat $tmp/in >>$tmp/config.h
5811   rm -f $tmp/in
5812   if test x"$ac_file" != x-; then
5813     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
5814       { echo "$as_me:5814: $ac_file is unchanged" >&5
5815 echo "$as_me: $ac_file is unchanged" >&6;}
5816     else
5817       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5818          X"$ac_file" : 'X\(//\)[^/]' \| \
5819          X"$ac_file" : 'X\(//\)$' \| \
5820          X"$ac_file" : 'X\(/\)' \| \
5821          .     : '\(.\)' 2>/dev/null ||
5822 echo X"$ac_file" |
5823     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
5824           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
5825           /^X\(\/\/\)$/{ s//\1/; q; }
5826           /^X\(\/\).*/{ s//\1/; q; }
5827           s/.*/./; q'`
5828       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5829         { case "$ac_dir" in
5830   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
5831   *)                      as_incr_dir=.;;
5832 esac
5833 as_dummy="$ac_dir"
5834 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
5835   case $as_mkdir_dir in
5836     # Skip DOS drivespec
5837     ?:) as_incr_dir=$as_mkdir_dir ;;
5838     *)
5839       as_incr_dir=$as_incr_dir/$as_mkdir_dir
5840       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
5841     ;;
5842   esac
5843 done; }
5844
5845       fi
5846       rm -f $ac_file
5847       mv $tmp/config.h $ac_file
5848     fi
5849   else
5850     cat $tmp/config.h
5851     rm -f $tmp/config.h
5852   fi
5853 done
5854 EOF
5855 cat >>$CONFIG_STATUS <<\EOF
5856
5857 #
5858 # CONFIG_COMMANDS section.
5859 #
5860 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
5861   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
5862   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
5863
5864   case $ac_dest in
5865     default )
5866 # Makefile uses this timestamp file to record whether config.h is up to date.
5867 echo > stamp-h
5868  ;;
5869   esac
5870 done
5871 EOF
5872
5873 cat >>$CONFIG_STATUS <<\EOF
5874
5875 { (exit 0); exit 0; }
5876 EOF
5877 chmod +x $CONFIG_STATUS
5878 ac_clean_files=$ac_clean_files_save
5879
5880 # configure is writing to config.log, and then calls config.status.
5881 # config.status does its own redirection, appending to config.log.
5882 # Unfortunately, on DOS this fails, as config.log is still kept open
5883 # by configure, so config.status won't be able to write to it; its
5884 # output is simply discarded.  So we exec the FD to /dev/null,
5885 # effectively closing config.log, so it can be properly (re)opened and
5886 # appended to by config.status.  When coming back to configure, we
5887 # need to make the FD available again.
5888 if test "$no_create" != yes; then
5889   ac_cs_success=:
5890   exec 5>/dev/null
5891   $SHELL $CONFIG_STATUS || ac_cs_success=false
5892   exec 5>>config.log
5893   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
5894   # would make configure fail if this is the last instruction.
5895   $ac_cs_success || { (exit 1); exit 1; }
5896 fi
5897