import gdb-1999-08-02 snapshot
[external/binutils.git] / readline / configure
1 #! /bin/sh
2
3 # From configure.in for Readline 4.0, version 2.14, from autoconf version 2.13
4 LIBVERSION=4.0
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94 # Guess values for system-dependent variables and create Makefiles.
95 # Generated automatically using autoconf version 2.13 
96 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
97 #
98 # This configure script is free software; the Free Software Foundation
99 # gives unlimited permission to copy, distribute and modify it.
100
101 # Defaults:
102 ac_help=
103 ac_default_prefix=/usr/local
104 # Any additions from configure.in:
105 ac_help="$ac_help
106 --with-curses               use the curses library instead of the termcap library"
107
108 # Initialize some variables set by options.
109 # The variables have the same names as the options, with
110 # dashes changed to underlines.
111 build=NONE
112 cache_file=./config.cache
113 exec_prefix=NONE
114 host=NONE
115 no_create=
116 nonopt=NONE
117 no_recursion=
118 prefix=NONE
119 program_prefix=NONE
120 program_suffix=NONE
121 program_transform_name=s,x,x,
122 silent=
123 site=
124 sitefile=
125 srcdir=
126 target=NONE
127 verbose=
128 x_includes=NONE
129 x_libraries=NONE
130 bindir='${exec_prefix}/bin'
131 sbindir='${exec_prefix}/sbin'
132 libexecdir='${exec_prefix}/libexec'
133 datadir='${prefix}/share'
134 sysconfdir='${prefix}/etc'
135 sharedstatedir='${prefix}/com'
136 localstatedir='${prefix}/var'
137 libdir='${exec_prefix}/lib'
138 includedir='${prefix}/include'
139 oldincludedir='/usr/include'
140 infodir='${prefix}/info'
141 mandir='${prefix}/man'
142
143 # Initialize some other variables.
144 subdirs=
145 MFLAGS= MAKEFLAGS=
146 SHELL=${CONFIG_SHELL-/bin/sh}
147 # Maximum number of lines to put in a shell here document.
148 ac_max_here_lines=12
149
150 ac_prev=
151 for ac_option
152 do
153
154   # If the previous option needs an argument, assign it.
155   if test -n "$ac_prev"; then
156     eval "$ac_prev=\$ac_option"
157     ac_prev=
158     continue
159   fi
160
161   case "$ac_option" in
162   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
163   *) ac_optarg= ;;
164   esac
165
166   # Accept the important Cygnus configure options, so we can diagnose typos.
167
168   case "$ac_option" in
169
170   -bindir | --bindir | --bindi | --bind | --bin | --bi)
171     ac_prev=bindir ;;
172   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
173     bindir="$ac_optarg" ;;
174
175   -build | --build | --buil | --bui | --bu)
176     ac_prev=build ;;
177   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
178     build="$ac_optarg" ;;
179
180   -cache-file | --cache-file | --cache-fil | --cache-fi \
181   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
182     ac_prev=cache_file ;;
183   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
184   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
185     cache_file="$ac_optarg" ;;
186
187   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
188     ac_prev=datadir ;;
189   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
190   | --da=*)
191     datadir="$ac_optarg" ;;
192
193   -disable-* | --disable-*)
194     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
195     # Reject names that are not valid shell variable names.
196     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
197       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
198     fi
199     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
200     eval "enable_${ac_feature}=no" ;;
201
202   -enable-* | --enable-*)
203     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
204     # Reject names that are not valid shell variable names.
205     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
206       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
207     fi
208     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
209     case "$ac_option" in
210       *=*) ;;
211       *) ac_optarg=yes ;;
212     esac
213     eval "enable_${ac_feature}='$ac_optarg'" ;;
214
215   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
216   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
217   | --exec | --exe | --ex)
218     ac_prev=exec_prefix ;;
219   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
220   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
221   | --exec=* | --exe=* | --ex=*)
222     exec_prefix="$ac_optarg" ;;
223
224   -gas | --gas | --ga | --g)
225     # Obsolete; use --with-gas.
226     with_gas=yes ;;
227
228   -help | --help | --hel | --he)
229     # Omit some internal or obsolete options to make the list less imposing.
230     # This message is too long to be a string in the A/UX 3.1 sh.
231     cat << EOF
232 Usage: configure [options] [host]
233 Options: [defaults in brackets after descriptions]
234 Configuration:
235   --cache-file=FILE       cache test results in FILE
236   --help                  print this message
237   --no-create             do not create output files
238   --quiet, --silent       do not print \`checking...' messages
239   --site-file=FILE        use FILE as the site file
240   --version               print the version of autoconf that created configure
241 Directory and file names:
242   --prefix=PREFIX         install architecture-independent files in PREFIX
243                           [$ac_default_prefix]
244   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
245                           [same as prefix]
246   --bindir=DIR            user executables in DIR [EPREFIX/bin]
247   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
248   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
249   --datadir=DIR           read-only architecture-independent data in DIR
250                           [PREFIX/share]
251   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
252   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
253                           [PREFIX/com]
254   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
255   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
256   --includedir=DIR        C header files in DIR [PREFIX/include]
257   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
258   --infodir=DIR           info documentation in DIR [PREFIX/info]
259   --mandir=DIR            man documentation in DIR [PREFIX/man]
260   --srcdir=DIR            find the sources in DIR [configure dir or ..]
261   --program-prefix=PREFIX prepend PREFIX to installed program names
262   --program-suffix=SUFFIX append SUFFIX to installed program names
263   --program-transform-name=PROGRAM
264                           run sed PROGRAM on installed program names
265 EOF
266     cat << EOF
267 Host type:
268   --build=BUILD           configure for building on BUILD [BUILD=HOST]
269   --host=HOST             configure for HOST [guessed]
270   --target=TARGET         configure for TARGET [TARGET=HOST]
271 Features and packages:
272   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
273   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
274   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
275   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
276   --x-includes=DIR        X include files are in DIR
277   --x-libraries=DIR       X library files are in DIR
278 EOF
279     if test -n "$ac_help"; then
280       echo "--enable and --with options recognized:$ac_help"
281     fi
282     exit 0 ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host="$ac_optarg" ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir="$ac_optarg" ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir="$ac_optarg" ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir="$ac_optarg" ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir="$ac_optarg" ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir="$ac_optarg" ;;
321
322   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
323     ac_prev=mandir ;;
324   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
325     mandir="$ac_optarg" ;;
326
327   -nfp | --nfp | --nf)
328     # Obsolete; use --without-fp.
329     with_fp=no ;;
330
331   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
332   | --no-cr | --no-c)
333     no_create=yes ;;
334
335   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
336   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
337     no_recursion=yes ;;
338
339   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
340   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
341   | --oldin | --oldi | --old | --ol | --o)
342     ac_prev=oldincludedir ;;
343   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
344   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
345   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
346     oldincludedir="$ac_optarg" ;;
347
348   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
349     ac_prev=prefix ;;
350   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
351     prefix="$ac_optarg" ;;
352
353   -program-prefix | --program-prefix | --program-prefi | --program-pref \
354   | --program-pre | --program-pr | --program-p)
355     ac_prev=program_prefix ;;
356   -program-prefix=* | --program-prefix=* | --program-prefi=* \
357   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
358     program_prefix="$ac_optarg" ;;
359
360   -program-suffix | --program-suffix | --program-suffi | --program-suff \
361   | --program-suf | --program-su | --program-s)
362     ac_prev=program_suffix ;;
363   -program-suffix=* | --program-suffix=* | --program-suffi=* \
364   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
365     program_suffix="$ac_optarg" ;;
366
367   -program-transform-name | --program-transform-name \
368   | --program-transform-nam | --program-transform-na \
369   | --program-transform-n | --program-transform- \
370   | --program-transform | --program-transfor \
371   | --program-transfo | --program-transf \
372   | --program-trans | --program-tran \
373   | --progr-tra | --program-tr | --program-t)
374     ac_prev=program_transform_name ;;
375   -program-transform-name=* | --program-transform-name=* \
376   | --program-transform-nam=* | --program-transform-na=* \
377   | --program-transform-n=* | --program-transform-=* \
378   | --program-transform=* | --program-transfor=* \
379   | --program-transfo=* | --program-transf=* \
380   | --program-trans=* | --program-tran=* \
381   | --progr-tra=* | --program-tr=* | --program-t=*)
382     program_transform_name="$ac_optarg" ;;
383
384   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
385   | -silent | --silent | --silen | --sile | --sil)
386     silent=yes ;;
387
388   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
389     ac_prev=sbindir ;;
390   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
391   | --sbi=* | --sb=*)
392     sbindir="$ac_optarg" ;;
393
394   -sharedstatedir | --sharedstatedir | --sharedstatedi \
395   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
396   | --sharedst | --shareds | --shared | --share | --shar \
397   | --sha | --sh)
398     ac_prev=sharedstatedir ;;
399   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
400   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
401   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
402   | --sha=* | --sh=*)
403     sharedstatedir="$ac_optarg" ;;
404
405   -site | --site | --sit)
406     ac_prev=site ;;
407   -site=* | --site=* | --sit=*)
408     site="$ac_optarg" ;;
409
410   -site-file | --site-file | --site-fil | --site-fi | --site-f)
411     ac_prev=sitefile ;;
412   -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
413     sitefile="$ac_optarg" ;;
414
415   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
416     ac_prev=srcdir ;;
417   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
418     srcdir="$ac_optarg" ;;
419
420   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
421   | --syscon | --sysco | --sysc | --sys | --sy)
422     ac_prev=sysconfdir ;;
423   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
424   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
425     sysconfdir="$ac_optarg" ;;
426
427   -target | --target | --targe | --targ | --tar | --ta | --t)
428     ac_prev=target ;;
429   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
430     target="$ac_optarg" ;;
431
432   -v | -verbose | --verbose | --verbos | --verbo | --verb)
433     verbose=yes ;;
434
435   -version | --version | --versio | --versi | --vers)
436     echo "configure generated by autoconf version 2.13"
437     exit 0 ;;
438
439   -with-* | --with-*)
440     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
441     # Reject names that are not valid shell variable names.
442     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
443       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
444     fi
445     ac_package=`echo $ac_package| sed 's/-/_/g'`
446     case "$ac_option" in
447       *=*) ;;
448       *) ac_optarg=yes ;;
449     esac
450     eval "with_${ac_package}='$ac_optarg'" ;;
451
452   -without-* | --without-*)
453     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
454     # Reject names that are not valid shell variable names.
455     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
456       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
457     fi
458     ac_package=`echo $ac_package| sed 's/-/_/g'`
459     eval "with_${ac_package}=no" ;;
460
461   --x)
462     # Obsolete; use --with-x.
463     with_x=yes ;;
464
465   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
466   | --x-incl | --x-inc | --x-in | --x-i)
467     ac_prev=x_includes ;;
468   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
469   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
470     x_includes="$ac_optarg" ;;
471
472   -x-libraries | --x-libraries | --x-librarie | --x-librari \
473   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
474     ac_prev=x_libraries ;;
475   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
476   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
477     x_libraries="$ac_optarg" ;;
478
479   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
480     ;;
481
482   *)
483     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
484       echo "configure: warning: $ac_option: invalid host type" 1>&2
485     fi
486     if test "x$nonopt" != xNONE; then
487       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
488     fi
489     nonopt="$ac_option"
490     ;;
491
492   esac
493 done
494
495 if test -n "$ac_prev"; then
496   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
497 fi
498
499 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
500
501 # File descriptor usage:
502 # 0 standard input
503 # 1 file creation
504 # 2 errors and warnings
505 # 3 some systems may open it to /dev/tty
506 # 4 used on the Kubota Titan
507 # 6 checking for... messages and results
508 # 5 compiler messages saved in config.log
509 if test "$silent" = yes; then
510   exec 6>/dev/null
511 else
512   exec 6>&1
513 fi
514 exec 5>./config.log
515
516 echo "\
517 This file contains any messages produced by compilers while
518 running configure, to aid debugging if configure makes a mistake.
519 " 1>&5
520
521 # Strip out --no-create and --no-recursion so they do not pile up.
522 # Also quote any args containing shell metacharacters.
523 ac_configure_args=
524 for ac_arg
525 do
526   case "$ac_arg" in
527   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
528   | --no-cr | --no-c) ;;
529   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
530   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
531   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
532   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
533   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
534   esac
535 done
536
537 # NLS nuisances.
538 # Only set these to C if already set.  These must not be set unconditionally
539 # because not all systems understand e.g. LANG=C (notably SCO).
540 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
541 # Non-C LC_CTYPE values break the ctype check.
542 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
543 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
544 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
545 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
546
547 # confdefs.h avoids OS command line length limits that DEFS can exceed.
548 rm -rf conftest* confdefs.h
549 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
550 echo > confdefs.h
551
552 # A filename unique to this package, relative to the directory that
553 # configure is in, which we can look for to find out if srcdir is correct.
554 ac_unique_file=readline.h
555
556 # Find the source files, if location was not specified.
557 if test -z "$srcdir"; then
558   ac_srcdir_defaulted=yes
559   # Try the directory containing this script, then its parent.
560   ac_prog=$0
561   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
562   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
563   srcdir=$ac_confdir
564   if test ! -r $srcdir/$ac_unique_file; then
565     srcdir=..
566   fi
567 else
568   ac_srcdir_defaulted=no
569 fi
570 if test ! -r $srcdir/$ac_unique_file; then
571   if test "$ac_srcdir_defaulted" = yes; then
572     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
573   else
574     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
575   fi
576 fi
577 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
578
579 # Prefer explicitly selected file to automatically selected ones.
580 if test -z "$sitefile"; then
581   if test -z "$CONFIG_SITE"; then
582     if test "x$prefix" != xNONE; then
583       CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
584     else
585       CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
586     fi
587   fi
588 else
589   CONFIG_SITE="$sitefile"
590 fi
591 for ac_site_file in $CONFIG_SITE; do
592   if test -r "$ac_site_file"; then
593     echo "loading site script $ac_site_file"
594     . "$ac_site_file"
595   fi
596 done
597
598 if test -r "$cache_file"; then
599   echo "loading cache $cache_file"
600   . $cache_file
601 else
602   echo "creating cache $cache_file"
603   > $cache_file
604 fi
605
606 ac_ext=c
607 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
608 ac_cpp='$CPP $CPPFLAGS'
609 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
610 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
611 cross_compiling=$ac_cv_prog_cc_cross
612
613 ac_exeext=
614 ac_objext=o
615 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
616   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
617   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
618     ac_n= ac_c='
619 ' ac_t='        '
620   else
621     ac_n=-n ac_c= ac_t=
622   fi
623 else
624   ac_n= ac_c='\c' ac_t=
625 fi
626
627
628
629
630
631
632
633 ac_aux_dir=
634 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
635   if test -f $ac_dir/install-sh; then
636     ac_aux_dir=$ac_dir
637     ac_install_sh="$ac_aux_dir/install-sh -c"
638     break
639   elif test -f $ac_dir/install.sh; then
640     ac_aux_dir=$ac_dir
641     ac_install_sh="$ac_aux_dir/install.sh -c"
642     break
643   fi
644 done
645 if test -z "$ac_aux_dir"; then
646   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
647 fi
648 ac_config_guess=$ac_aux_dir/config.guess
649 ac_config_sub=$ac_aux_dir/config.sub
650 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
651
652
653 # Make sure we can run config.sub.
654 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
655 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
656 fi
657
658 echo $ac_n "checking host system type""... $ac_c" 1>&6
659 echo "configure:660: checking host system type" >&5
660
661 host_alias=$host
662 case "$host_alias" in
663 NONE)
664   case $nonopt in
665   NONE)
666     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
667     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
668     fi ;;
669   *) host_alias=$nonopt ;;
670   esac ;;
671 esac
672
673 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
674 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
675 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
676 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
677 echo "$ac_t""$host" 1>&6
678
679
680 opt_curses=no
681 opt_shared=no
682
683 # Check whether --with-curses or --without-curses was given.
684 if test "${with_curses+set}" = set; then
685   withval="$with_curses"
686   opt_curses=$withval
687 fi
688
689
690 if test "$opt_curses" = "yes"; then
691         prefer_curses=yes
692 fi
693
694 # We want these before the checks, so the checks can modify their values.
695 test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
696
697 # Extract the first word of "gcc", so it can be a program name with args.
698 set dummy gcc; ac_word=$2
699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
700 echo "configure:701: checking for $ac_word" >&5
701 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
702   echo $ac_n "(cached) $ac_c" 1>&6
703 else
704   if test -n "$CC"; then
705   ac_cv_prog_CC="$CC" # Let the user override the test.
706 else
707   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
708   ac_dummy="$PATH"
709   for ac_dir in $ac_dummy; do
710     test -z "$ac_dir" && ac_dir=.
711     if test -f $ac_dir/$ac_word; then
712       ac_cv_prog_CC="gcc"
713       break
714     fi
715   done
716   IFS="$ac_save_ifs"
717 fi
718 fi
719 CC="$ac_cv_prog_CC"
720 if test -n "$CC"; then
721   echo "$ac_t""$CC" 1>&6
722 else
723   echo "$ac_t""no" 1>&6
724 fi
725
726 if test -z "$CC"; then
727   # Extract the first word of "cc", so it can be a program name with args.
728 set dummy cc; ac_word=$2
729 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
730 echo "configure:731: checking for $ac_word" >&5
731 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
732   echo $ac_n "(cached) $ac_c" 1>&6
733 else
734   if test -n "$CC"; then
735   ac_cv_prog_CC="$CC" # Let the user override the test.
736 else
737   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
738   ac_prog_rejected=no
739   ac_dummy="$PATH"
740   for ac_dir in $ac_dummy; do
741     test -z "$ac_dir" && ac_dir=.
742     if test -f $ac_dir/$ac_word; then
743       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
744         ac_prog_rejected=yes
745         continue
746       fi
747       ac_cv_prog_CC="cc"
748       break
749     fi
750   done
751   IFS="$ac_save_ifs"
752 if test $ac_prog_rejected = yes; then
753   # We found a bogon in the path, so make sure we never use it.
754   set dummy $ac_cv_prog_CC
755   shift
756   if test $# -gt 0; then
757     # We chose a different compiler from the bogus one.
758     # However, it has the same basename, so the bogon will be chosen
759     # first if we set CC to just the basename; use the full file name.
760     shift
761     set dummy "$ac_dir/$ac_word" "$@"
762     shift
763     ac_cv_prog_CC="$@"
764   fi
765 fi
766 fi
767 fi
768 CC="$ac_cv_prog_CC"
769 if test -n "$CC"; then
770   echo "$ac_t""$CC" 1>&6
771 else
772   echo "$ac_t""no" 1>&6
773 fi
774
775   if test -z "$CC"; then
776     case "`uname -s`" in
777     *win32* | *WIN32*)
778       # Extract the first word of "cl", so it can be a program name with args.
779 set dummy cl; ac_word=$2
780 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
781 echo "configure:782: checking for $ac_word" >&5
782 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
783   echo $ac_n "(cached) $ac_c" 1>&6
784 else
785   if test -n "$CC"; then
786   ac_cv_prog_CC="$CC" # Let the user override the test.
787 else
788   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
789   ac_dummy="$PATH"
790   for ac_dir in $ac_dummy; do
791     test -z "$ac_dir" && ac_dir=.
792     if test -f $ac_dir/$ac_word; then
793       ac_cv_prog_CC="cl"
794       break
795     fi
796   done
797   IFS="$ac_save_ifs"
798 fi
799 fi
800 CC="$ac_cv_prog_CC"
801 if test -n "$CC"; then
802   echo "$ac_t""$CC" 1>&6
803 else
804   echo "$ac_t""no" 1>&6
805 fi
806  ;;
807     esac
808   fi
809   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
810 fi
811
812 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
813 echo "configure:814: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
814
815 ac_ext=c
816 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
817 ac_cpp='$CPP $CPPFLAGS'
818 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
819 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
820 cross_compiling=$ac_cv_prog_cc_cross
821
822 cat > conftest.$ac_ext << EOF
823
824 #line 825 "configure"
825 #include "confdefs.h"
826
827 main(){return(0);}
828 EOF
829 if { (eval echo configure:830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
830   ac_cv_prog_cc_works=yes
831   # If we can't run a trivial program, we are probably using a cross compiler.
832   if (./conftest; exit) 2>/dev/null; then
833     ac_cv_prog_cc_cross=no
834   else
835     ac_cv_prog_cc_cross=yes
836   fi
837 else
838   echo "configure: failed program was:" >&5
839   cat conftest.$ac_ext >&5
840   ac_cv_prog_cc_works=no
841 fi
842 rm -fr conftest*
843 ac_ext=c
844 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
845 ac_cpp='$CPP $CPPFLAGS'
846 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
847 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
848 cross_compiling=$ac_cv_prog_cc_cross
849
850 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
851 if test $ac_cv_prog_cc_works = no; then
852   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
853 fi
854 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
855 echo "configure:856: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
856 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
857 cross_compiling=$ac_cv_prog_cc_cross
858
859 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
860 echo "configure:861: checking whether we are using GNU C" >&5
861 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
862   echo $ac_n "(cached) $ac_c" 1>&6
863 else
864   cat > conftest.c <<EOF
865 #ifdef __GNUC__
866   yes;
867 #endif
868 EOF
869 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
870   ac_cv_prog_gcc=yes
871 else
872   ac_cv_prog_gcc=no
873 fi
874 fi
875
876 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
877
878 if test $ac_cv_prog_gcc = yes; then
879   GCC=yes
880 else
881   GCC=
882 fi
883
884 ac_test_CFLAGS="${CFLAGS+set}"
885 ac_save_CFLAGS="$CFLAGS"
886 CFLAGS=
887 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
888 echo "configure:889: checking whether ${CC-cc} accepts -g" >&5
889 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
890   echo $ac_n "(cached) $ac_c" 1>&6
891 else
892   echo 'void f(){}' > conftest.c
893 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
894   ac_cv_prog_cc_g=yes
895 else
896   ac_cv_prog_cc_g=no
897 fi
898 rm -f conftest*
899
900 fi
901
902 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
903 if test "$ac_test_CFLAGS" = set; then
904   CFLAGS="$ac_save_CFLAGS"
905 elif test $ac_cv_prog_cc_g = yes; then
906   if test "$GCC" = yes; then
907     CFLAGS="-g -O2"
908   else
909     CFLAGS="-g"
910   fi
911 else
912   if test "$GCC" = yes; then
913     CFLAGS="-O2"
914   else
915     CFLAGS=
916   fi
917 fi
918
919 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
920 echo "configure:921: checking how to run the C preprocessor" >&5
921 # On Suns, sometimes $CPP names a directory.
922 if test -n "$CPP" && test -d "$CPP"; then
923   CPP=
924 fi
925 if test -z "$CPP"; then
926 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
927   echo $ac_n "(cached) $ac_c" 1>&6
928 else
929     # This must be in double quotes, not single quotes, because CPP may get
930   # substituted into the Makefile and "${CC-cc}" will confuse make.
931   CPP="${CC-cc} -E"
932   # On the NeXT, cc -E runs the code through the compiler's parser,
933   # not just through cpp.
934   cat > conftest.$ac_ext <<EOF
935 #line 936 "configure"
936 #include "confdefs.h"
937 #include <assert.h>
938 Syntax Error
939 EOF
940 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
941 { (eval echo configure:942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
942 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
943 if test -z "$ac_err"; then
944   :
945 else
946   echo "$ac_err" >&5
947   echo "configure: failed program was:" >&5
948   cat conftest.$ac_ext >&5
949   rm -rf conftest*
950   CPP="${CC-cc} -E -traditional-cpp"
951   cat > conftest.$ac_ext <<EOF
952 #line 953 "configure"
953 #include "confdefs.h"
954 #include <assert.h>
955 Syntax Error
956 EOF
957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
958 { (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
960 if test -z "$ac_err"; then
961   :
962 else
963   echo "$ac_err" >&5
964   echo "configure: failed program was:" >&5
965   cat conftest.$ac_ext >&5
966   rm -rf conftest*
967   CPP="${CC-cc} -nologo -E"
968   cat > conftest.$ac_ext <<EOF
969 #line 970 "configure"
970 #include "confdefs.h"
971 #include <assert.h>
972 Syntax Error
973 EOF
974 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
975 { (eval echo configure:976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
976 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
977 if test -z "$ac_err"; then
978   :
979 else
980   echo "$ac_err" >&5
981   echo "configure: failed program was:" >&5
982   cat conftest.$ac_ext >&5
983   rm -rf conftest*
984   CPP=/lib/cpp
985 fi
986 rm -f conftest*
987 fi
988 rm -f conftest*
989 fi
990 rm -f conftest*
991   ac_cv_prog_CPP="$CPP"
992 fi
993   CPP="$ac_cv_prog_CPP"
994 else
995   ac_cv_prog_CPP="$CPP"
996 fi
997 echo "$ac_t""$CPP" 1>&6
998
999 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1000 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1001 echo "configure:1002: checking for minix/config.h" >&5
1002 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1003   echo $ac_n "(cached) $ac_c" 1>&6
1004 else
1005   cat > conftest.$ac_ext <<EOF
1006 #line 1007 "configure"
1007 #include "confdefs.h"
1008 #include <minix/config.h>
1009 EOF
1010 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1011 { (eval echo configure:1012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1012 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1013 if test -z "$ac_err"; then
1014   rm -rf conftest*
1015   eval "ac_cv_header_$ac_safe=yes"
1016 else
1017   echo "$ac_err" >&5
1018   echo "configure: failed program was:" >&5
1019   cat conftest.$ac_ext >&5
1020   rm -rf conftest*
1021   eval "ac_cv_header_$ac_safe=no"
1022 fi
1023 rm -f conftest*
1024 fi
1025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1026   echo "$ac_t""yes" 1>&6
1027   MINIX=yes
1028 else
1029   echo "$ac_t""no" 1>&6
1030 MINIX=
1031 fi
1032
1033 if test "$MINIX" = yes; then
1034   cat >> confdefs.h <<\EOF
1035 #define _POSIX_SOURCE 1
1036 EOF
1037
1038   cat >> confdefs.h <<\EOF
1039 #define _POSIX_1_SOURCE 2
1040 EOF
1041
1042   cat >> confdefs.h <<\EOF
1043 #define _MINIX 1
1044 EOF
1045
1046 fi
1047
1048
1049  
1050 if test "x$cross_compiling" = "xyes"; then
1051     case "${host}" in
1052     *-cygwin*)
1053         cross_cache=${srcdir}/cross-build/cygwin.cache
1054         if test -r "${cross_cache}"; then
1055             echo "loading cross-build cache file ${cross_cache}"
1056             . ${cross_cache}
1057         fi
1058         LOCAL_CFLAGS="$LOCAL_CFLAGS -I${srcdir}/../libtermcap"
1059         unset cross_cache
1060         ;;
1061     *)  echo "configure: cross-compiling for a non-cygwin target is not supported" >&2
1062         ;;
1063     esac
1064 fi
1065  
1066 if test "x$cross_compiling" = "xyes"; then
1067   CROSS_COMPILING_FLAG=-DCROSS_COMPILING
1068 else
1069   CROSS_COMPILING_FLAG=
1070 fi
1071
1072  
1073 if test -z "$CC_FOR_BUILD"; then
1074     if test "x$cross_compiling" = "xno"; then
1075         CC_FOR_BUILD='$(CC)'
1076     else
1077         CC_FOR_BUILD=gcc
1078     fi
1079 fi
1080
1081  
1082
1083 # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
1084 test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
1085
1086 if test $ac_cv_prog_gcc = yes; then
1087     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1088 echo "configure:1089: checking whether ${CC-cc} needs -traditional" >&5
1089 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1090   echo $ac_n "(cached) $ac_c" 1>&6
1091 else
1092     ac_pattern="Autoconf.*'x'"
1093   cat > conftest.$ac_ext <<EOF
1094 #line 1095 "configure"
1095 #include "confdefs.h"
1096 #include <sgtty.h>
1097 Autoconf TIOCGETP
1098 EOF
1099 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1100   egrep "$ac_pattern" >/dev/null 2>&1; then
1101   rm -rf conftest*
1102   ac_cv_prog_gcc_traditional=yes
1103 else
1104   rm -rf conftest*
1105   ac_cv_prog_gcc_traditional=no
1106 fi
1107 rm -f conftest*
1108
1109
1110   if test $ac_cv_prog_gcc_traditional = no; then
1111     cat > conftest.$ac_ext <<EOF
1112 #line 1113 "configure"
1113 #include "confdefs.h"
1114 #include <termio.h>
1115 Autoconf TCGETA
1116 EOF
1117 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1118   egrep "$ac_pattern" >/dev/null 2>&1; then
1119   rm -rf conftest*
1120   ac_cv_prog_gcc_traditional=yes
1121 fi
1122 rm -f conftest*
1123
1124   fi
1125 fi
1126
1127 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1128   if test $ac_cv_prog_gcc_traditional = yes; then
1129     CC="$CC -traditional"
1130   fi
1131 fi
1132
1133 # Find a good install program.  We prefer a C program (faster),
1134 # so one script is as good as another.  But avoid the broken or
1135 # incompatible versions:
1136 # SysV /etc/install, /usr/sbin/install
1137 # SunOS /usr/etc/install
1138 # IRIX /sbin/install
1139 # AIX /bin/install
1140 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1141 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1142 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1143 # ./install, which can be erroneously created by make from ./install.sh.
1144 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1145 echo "configure:1146: checking for a BSD compatible install" >&5
1146 if test -z "$INSTALL"; then
1147 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1148   echo $ac_n "(cached) $ac_c" 1>&6
1149 else
1150     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1151   for ac_dir in $PATH; do
1152     # Account for people who put trailing slashes in PATH elements.
1153     case "$ac_dir/" in
1154     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1155     *)
1156       # OSF1 and SCO ODT 3.0 have their own names for install.
1157       # Don't use installbsd from OSF since it installs stuff as root
1158       # by default.
1159       for ac_prog in ginstall scoinst install; do
1160         if test -f $ac_dir/$ac_prog; then
1161           if test $ac_prog = install &&
1162             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1163             # AIX install.  It has an incompatible calling convention.
1164             :
1165           else
1166             ac_cv_path_install="$ac_dir/$ac_prog -c"
1167             break 2
1168           fi
1169         fi
1170       done
1171       ;;
1172     esac
1173   done
1174   IFS="$ac_save_IFS"
1175
1176 fi
1177   if test "${ac_cv_path_install+set}" = set; then
1178     INSTALL="$ac_cv_path_install"
1179   else
1180     # As a last resort, use the slow shell script.  We don't cache a
1181     # path for INSTALL within a source directory, because that will
1182     # break other packages using the cache if that directory is
1183     # removed, or if the path is relative.
1184     INSTALL="$ac_install_sh"
1185   fi
1186 fi
1187 echo "$ac_t""$INSTALL" 1>&6
1188
1189 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1190 # It thinks the first close brace ends the variable substitution.
1191 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1192
1193 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1194
1195 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1196
1197 # Extract the first word of "ar", so it can be a program name with args.
1198 set dummy ar; ac_word=$2
1199 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1200 echo "configure:1201: checking for $ac_word" >&5
1201 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1202   echo $ac_n "(cached) $ac_c" 1>&6
1203 else
1204   if test -n "$AR"; then
1205   ac_cv_prog_AR="$AR" # Let the user override the test.
1206 else
1207   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1208   ac_dummy="$PATH"
1209   for ac_dir in $ac_dummy; do
1210     test -z "$ac_dir" && ac_dir=.
1211     if test -f $ac_dir/$ac_word; then
1212       ac_cv_prog_AR="ar"
1213       break
1214     fi
1215   done
1216   IFS="$ac_save_ifs"
1217 fi
1218 fi
1219 AR="$ac_cv_prog_AR"
1220 if test -n "$AR"; then
1221   echo "$ac_t""$AR" 1>&6
1222 else
1223   echo "$ac_t""no" 1>&6
1224 fi
1225
1226 test -n "$ARFLAGS" || ARFLAGS="cr"
1227 # Extract the first word of "ranlib", so it can be a program name with args.
1228 set dummy ranlib; ac_word=$2
1229 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1230 echo "configure:1231: checking for $ac_word" >&5
1231 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1232   echo $ac_n "(cached) $ac_c" 1>&6
1233 else
1234   if test -n "$RANLIB"; then
1235   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1236 else
1237   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1238   ac_dummy="$PATH"
1239   for ac_dir in $ac_dummy; do
1240     test -z "$ac_dir" && ac_dir=.
1241     if test -f $ac_dir/$ac_word; then
1242       ac_cv_prog_RANLIB="ranlib"
1243       break
1244     fi
1245   done
1246   IFS="$ac_save_ifs"
1247   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1248 fi
1249 fi
1250 RANLIB="$ac_cv_prog_RANLIB"
1251 if test -n "$RANLIB"; then
1252   echo "$ac_t""$RANLIB" 1>&6
1253 else
1254   echo "$ac_t""no" 1>&6
1255 fi
1256
1257
1258 MAKE_SHELL=/bin/sh
1259
1260
1261 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1262 echo "configure:1263: checking return type of signal handlers" >&5
1263 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1264   echo $ac_n "(cached) $ac_c" 1>&6
1265 else
1266   cat > conftest.$ac_ext <<EOF
1267 #line 1268 "configure"
1268 #include "confdefs.h"
1269 #include <sys/types.h>
1270 #include <signal.h>
1271 #ifdef signal
1272 #undef signal
1273 #endif
1274 #ifdef __cplusplus
1275 extern "C" void (*signal (int, void (*)(int)))(int);
1276 #else
1277 void (*signal ()) ();
1278 #endif
1279
1280 int main() {
1281 int i;
1282 ; return 0; }
1283 EOF
1284 if { (eval echo configure:1285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1285   rm -rf conftest*
1286   ac_cv_type_signal=void
1287 else
1288   echo "configure: failed program was:" >&5
1289   cat conftest.$ac_ext >&5
1290   rm -rf conftest*
1291   ac_cv_type_signal=int
1292 fi
1293 rm -f conftest*
1294 fi
1295
1296 echo "$ac_t""$ac_cv_type_signal" 1>&6
1297 cat >> confdefs.h <<EOF
1298 #define RETSIGTYPE $ac_cv_type_signal
1299 EOF
1300
1301
1302
1303 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1304 echo "configure:1305: checking whether stat file-mode macros are broken" >&5
1305 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1306   echo $ac_n "(cached) $ac_c" 1>&6
1307 else
1308   cat > conftest.$ac_ext <<EOF
1309 #line 1310 "configure"
1310 #include "confdefs.h"
1311 #include <sys/types.h>
1312 #include <sys/stat.h>
1313
1314 #if defined(S_ISBLK) && defined(S_IFDIR)
1315 # if S_ISBLK (S_IFDIR)
1316 You lose.
1317 # endif
1318 #endif
1319
1320 #if defined(S_ISBLK) && defined(S_IFCHR)
1321 # if S_ISBLK (S_IFCHR)
1322 You lose.
1323 # endif
1324 #endif
1325
1326 #if defined(S_ISLNK) && defined(S_IFREG)
1327 # if S_ISLNK (S_IFREG)
1328 You lose.
1329 # endif
1330 #endif
1331
1332 #if defined(S_ISSOCK) && defined(S_IFREG)
1333 # if S_ISSOCK (S_IFREG)
1334 You lose.
1335 # endif
1336 #endif
1337
1338 EOF
1339 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1340   egrep "You lose" >/dev/null 2>&1; then
1341   rm -rf conftest*
1342   ac_cv_header_stat_broken=yes
1343 else
1344   rm -rf conftest*
1345   ac_cv_header_stat_broken=no
1346 fi
1347 rm -f conftest*
1348
1349 fi
1350
1351 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1352 if test $ac_cv_header_stat_broken = yes; then
1353   cat >> confdefs.h <<\EOF
1354 #define STAT_MACROS_BROKEN 1
1355 EOF
1356
1357 fi
1358
1359 ac_header_dirent=no
1360 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1361 do
1362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1363 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1364 echo "configure:1365: checking for $ac_hdr that defines DIR" >&5
1365 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1366   echo $ac_n "(cached) $ac_c" 1>&6
1367 else
1368   cat > conftest.$ac_ext <<EOF
1369 #line 1370 "configure"
1370 #include "confdefs.h"
1371 #include <sys/types.h>
1372 #include <$ac_hdr>
1373 int main() {
1374 DIR *dirp = 0;
1375 ; return 0; }
1376 EOF
1377 if { (eval echo configure:1378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1378   rm -rf conftest*
1379   eval "ac_cv_header_dirent_$ac_safe=yes"
1380 else
1381   echo "configure: failed program was:" >&5
1382   cat conftest.$ac_ext >&5
1383   rm -rf conftest*
1384   eval "ac_cv_header_dirent_$ac_safe=no"
1385 fi
1386 rm -f conftest*
1387 fi
1388 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1389   echo "$ac_t""yes" 1>&6
1390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1391   cat >> confdefs.h <<EOF
1392 #define $ac_tr_hdr 1
1393 EOF
1394  ac_header_dirent=$ac_hdr; break
1395 else
1396   echo "$ac_t""no" 1>&6
1397 fi
1398 done
1399 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1400 if test $ac_header_dirent = dirent.h; then
1401 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1402 echo "configure:1403: checking for opendir in -ldir" >&5
1403 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1404 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1405   echo $ac_n "(cached) $ac_c" 1>&6
1406 else
1407   ac_save_LIBS="$LIBS"
1408 LIBS="-ldir  $LIBS"
1409 cat > conftest.$ac_ext <<EOF
1410 #line 1411 "configure"
1411 #include "confdefs.h"
1412 /* Override any gcc2 internal prototype to avoid an error.  */
1413 /* We use char because int might match the return type of a gcc2
1414     builtin and then its argument prototype would still apply.  */
1415 char opendir();
1416
1417 int main() {
1418 opendir()
1419 ; return 0; }
1420 EOF
1421 if { (eval echo configure:1422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1422   rm -rf conftest*
1423   eval "ac_cv_lib_$ac_lib_var=yes"
1424 else
1425   echo "configure: failed program was:" >&5
1426   cat conftest.$ac_ext >&5
1427   rm -rf conftest*
1428   eval "ac_cv_lib_$ac_lib_var=no"
1429 fi
1430 rm -f conftest*
1431 LIBS="$ac_save_LIBS"
1432
1433 fi
1434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1435   echo "$ac_t""yes" 1>&6
1436   LIBS="$LIBS -ldir"
1437 else
1438   echo "$ac_t""no" 1>&6
1439 fi
1440
1441 else
1442 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1443 echo "configure:1444: checking for opendir in -lx" >&5
1444 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1445 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1446   echo $ac_n "(cached) $ac_c" 1>&6
1447 else
1448   ac_save_LIBS="$LIBS"
1449 LIBS="-lx  $LIBS"
1450 cat > conftest.$ac_ext <<EOF
1451 #line 1452 "configure"
1452 #include "confdefs.h"
1453 /* Override any gcc2 internal prototype to avoid an error.  */
1454 /* We use char because int might match the return type of a gcc2
1455     builtin and then its argument prototype would still apply.  */
1456 char opendir();
1457
1458 int main() {
1459 opendir()
1460 ; return 0; }
1461 EOF
1462 if { (eval echo configure:1463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1463   rm -rf conftest*
1464   eval "ac_cv_lib_$ac_lib_var=yes"
1465 else
1466   echo "configure: failed program was:" >&5
1467   cat conftest.$ac_ext >&5
1468   rm -rf conftest*
1469   eval "ac_cv_lib_$ac_lib_var=no"
1470 fi
1471 rm -f conftest*
1472 LIBS="$ac_save_LIBS"
1473
1474 fi
1475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1476   echo "$ac_t""yes" 1>&6
1477   LIBS="$LIBS -lx"
1478 else
1479   echo "$ac_t""no" 1>&6
1480 fi
1481
1482 fi
1483
1484
1485 for ac_func in strcasecmp select setenv putenv tcgetattr setlocale lstat
1486 do
1487 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1488 echo "configure:1489: checking for $ac_func" >&5
1489 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1490   echo $ac_n "(cached) $ac_c" 1>&6
1491 else
1492   cat > conftest.$ac_ext <<EOF
1493 #line 1494 "configure"
1494 #include "confdefs.h"
1495 /* System header to define __stub macros and hopefully few prototypes,
1496     which can conflict with char $ac_func(); below.  */
1497 #include <assert.h>
1498 /* Override any gcc2 internal prototype to avoid an error.  */
1499 /* We use char because int might match the return type of a gcc2
1500     builtin and then its argument prototype would still apply.  */
1501 char $ac_func();
1502
1503 int main() {
1504
1505 /* The GNU C library defines this for functions which it implements
1506     to always fail with ENOSYS.  Some functions are actually named
1507     something starting with __ and the normal name is an alias.  */
1508 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1509 choke me
1510 #else
1511 $ac_func();
1512 #endif
1513
1514 ; return 0; }
1515 EOF
1516 if { (eval echo configure:1517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1517   rm -rf conftest*
1518   eval "ac_cv_func_$ac_func=yes"
1519 else
1520   echo "configure: failed program was:" >&5
1521   cat conftest.$ac_ext >&5
1522   rm -rf conftest*
1523   eval "ac_cv_func_$ac_func=no"
1524 fi
1525 rm -f conftest*
1526 fi
1527
1528 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1529   echo "$ac_t""yes" 1>&6
1530     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1531   cat >> confdefs.h <<EOF
1532 #define $ac_tr_func 1
1533 EOF
1534  
1535 else
1536   echo "$ac_t""no" 1>&6
1537 fi
1538 done
1539
1540
1541 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
1542 echo "configure:1543: checking for working strcoll" >&5
1543 if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
1544   echo $ac_n "(cached) $ac_c" 1>&6
1545 else
1546   if test "$cross_compiling" = yes; then
1547   ac_cv_func_strcoll_works=no
1548 else
1549   cat > conftest.$ac_ext <<EOF
1550 #line 1551 "configure"
1551 #include "confdefs.h"
1552 #include <string.h>
1553 main ()
1554 {
1555   exit (strcoll ("abc", "def") >= 0 ||
1556         strcoll ("ABC", "DEF") >= 0 ||
1557         strcoll ("123", "456") >= 0);
1558 }
1559 EOF
1560 if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1561 then
1562   ac_cv_func_strcoll_works=yes
1563 else
1564   echo "configure: failed program was:" >&5
1565   cat conftest.$ac_ext >&5
1566   rm -fr conftest*
1567   ac_cv_func_strcoll_works=no
1568 fi
1569 rm -fr conftest*
1570 fi
1571
1572 fi
1573
1574 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
1575 if test $ac_cv_func_strcoll_works = yes; then
1576   cat >> confdefs.h <<\EOF
1577 #define HAVE_STRCOLL 1
1578 EOF
1579
1580 fi
1581
1582
1583 for ac_hdr in unistd.h stdlib.h varargs.h stdarg.h string.h \
1584                 sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
1585                 termcap.h termios.h termio.h sys/file.h locale.h
1586 do
1587 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1588 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1589 echo "configure:1590: checking for $ac_hdr" >&5
1590 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1591   echo $ac_n "(cached) $ac_c" 1>&6
1592 else
1593   cat > conftest.$ac_ext <<EOF
1594 #line 1595 "configure"
1595 #include "confdefs.h"
1596 #include <$ac_hdr>
1597 EOF
1598 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1599 { (eval echo configure:1600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1600 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1601 if test -z "$ac_err"; then
1602   rm -rf conftest*
1603   eval "ac_cv_header_$ac_safe=yes"
1604 else
1605   echo "$ac_err" >&5
1606   echo "configure: failed program was:" >&5
1607   cat conftest.$ac_ext >&5
1608   rm -rf conftest*
1609   eval "ac_cv_header_$ac_safe=no"
1610 fi
1611 rm -f conftest*
1612 fi
1613 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1614   echo "$ac_t""yes" 1>&6
1615     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1616   cat >> confdefs.h <<EOF
1617 #define $ac_tr_hdr 1
1618 EOF
1619  
1620 else
1621   echo "$ac_t""no" 1>&6
1622 fi
1623 done
1624
1625
1626
1627 echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
1628 echo "configure:1629: checking for type of signal functions" >&5
1629 if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
1630   echo $ac_n "(cached) $ac_c" 1>&6
1631 else
1632   
1633   cat > conftest.$ac_ext <<EOF
1634 #line 1635 "configure"
1635 #include "confdefs.h"
1636 #include <signal.h>
1637 int main() {
1638
1639     sigset_t ss;
1640     struct sigaction sa;
1641     sigemptyset(&ss); sigsuspend(&ss);
1642     sigaction(SIGINT, &sa, (struct sigaction *) 0);
1643     sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
1644   
1645 ; return 0; }
1646 EOF
1647 if { (eval echo configure:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1648   rm -rf conftest*
1649   bash_cv_signal_vintage=posix
1650 else
1651   echo "configure: failed program was:" >&5
1652   cat conftest.$ac_ext >&5
1653   rm -rf conftest*
1654   
1655     cat > conftest.$ac_ext <<EOF
1656 #line 1657 "configure"
1657 #include "confdefs.h"
1658 #include <signal.h>
1659 int main() {
1660
1661         int mask = sigmask(SIGINT);
1662         sigsetmask(mask); sigblock(mask); sigpause(mask);
1663     
1664 ; return 0; }
1665 EOF
1666 if { (eval echo configure:1667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1667   rm -rf conftest*
1668   bash_cv_signal_vintage=4.2bsd
1669 else
1670   echo "configure: failed program was:" >&5
1671   cat conftest.$ac_ext >&5
1672   rm -rf conftest*
1673   
1674       cat > conftest.$ac_ext <<EOF
1675 #line 1676 "configure"
1676 #include "confdefs.h"
1677
1678         #include <signal.h>
1679         RETSIGTYPE foo() { }
1680 int main() {
1681
1682                 int mask = sigmask(SIGINT);
1683                 sigset(SIGINT, foo); sigrelse(SIGINT);
1684                 sighold(SIGINT); sigpause(SIGINT);
1685         
1686 ; return 0; }
1687 EOF
1688 if { (eval echo configure:1689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1689   rm -rf conftest*
1690   bash_cv_signal_vintage=svr3
1691 else
1692   echo "configure: failed program was:" >&5
1693   cat conftest.$ac_ext >&5
1694   rm -rf conftest*
1695   bash_cv_signal_vintage=v7
1696     
1697 fi
1698 rm -f conftest*
1699   
1700 fi
1701 rm -f conftest*
1702
1703 fi
1704 rm -f conftest*
1705
1706 fi
1707
1708 echo "$ac_t""$bash_cv_signal_vintage" 1>&6
1709 if test "$bash_cv_signal_vintage" = posix; then
1710 cat >> confdefs.h <<\EOF
1711 #define HAVE_POSIX_SIGNALS 1
1712 EOF
1713
1714 elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
1715 cat >> confdefs.h <<\EOF
1716 #define HAVE_BSD_SIGNALS 1
1717 EOF
1718
1719 elif test "$bash_cv_signal_vintage" = svr3; then
1720 cat >> confdefs.h <<\EOF
1721 #define HAVE_USG_SIGHOLD 1
1722 EOF
1723
1724 fi
1725
1726
1727
1728 echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6
1729 echo "configure:1730: checking if signal handlers must be reinstalled when invoked" >&5
1730 if eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then
1731   echo $ac_n "(cached) $ac_c" 1>&6
1732 else
1733   if test "$cross_compiling" = yes; then
1734   echo "configure: warning: cannot check signal handling if cross compiling -- defaulting to no" 1>&2
1735     bash_cv_must_reinstall_sighandlers=no
1736
1737 else
1738   cat > conftest.$ac_ext <<EOF
1739 #line 1740 "configure"
1740 #include "confdefs.h"
1741
1742 #include <signal.h>
1743 #ifdef HAVE_UNISTD_H
1744 #include <unistd.h>
1745 #endif
1746
1747 typedef RETSIGTYPE sigfunc();
1748
1749 int nsigint;
1750
1751 #ifdef HAVE_POSIX_SIGNALS
1752 sigfunc *
1753 set_signal_handler(sig, handler)
1754      int sig;
1755      sigfunc *handler;
1756 {
1757   struct sigaction act, oact;
1758   act.sa_handler = handler;
1759   act.sa_flags = 0;
1760   sigemptyset (&act.sa_mask);
1761   sigemptyset (&oact.sa_mask);
1762   sigaction (sig, &act, &oact);
1763   return (oact.sa_handler);
1764 }
1765 #else
1766 #define set_signal_handler(s, h) signal(s, h)
1767 #endif
1768
1769 RETSIGTYPE
1770 sigint(s)
1771 int s;
1772 {
1773   nsigint++;
1774 }
1775
1776 main()
1777 {
1778         nsigint = 0;
1779         set_signal_handler(SIGINT, sigint);
1780         kill((int)getpid(), SIGINT);
1781         kill((int)getpid(), SIGINT);
1782         exit(nsigint != 2);
1783 }
1784
1785 EOF
1786 if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1787 then
1788   bash_cv_must_reinstall_sighandlers=no
1789 else
1790   echo "configure: failed program was:" >&5
1791   cat conftest.$ac_ext >&5
1792   rm -fr conftest*
1793   bash_cv_must_reinstall_sighandlers=yes
1794 fi
1795 rm -fr conftest*
1796 fi
1797
1798 fi
1799
1800 echo "$ac_t""$bash_cv_must_reinstall_sighandlers" 1>&6
1801 if test $bash_cv_must_reinstall_sighandlers = yes; then
1802 cat >> confdefs.h <<\EOF
1803 #define MUST_REINSTALL_SIGHANDLERS 1
1804 EOF
1805
1806 fi
1807
1808
1809
1810 echo $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6
1811 echo "configure:1812: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
1812 if eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then
1813   echo $ac_n "(cached) $ac_c" 1>&6
1814 else
1815   if test "$cross_compiling" = yes; then
1816   echo "configure: warning: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" 1>&2
1817      bash_cv_func_sigsetjmp=missing
1818
1819 else
1820   cat > conftest.$ac_ext <<EOF
1821 #line 1822 "configure"
1822 #include "confdefs.h"
1823
1824 #ifdef HAVE_UNISTD_H
1825 #include <unistd.h>
1826 #endif
1827 #include <sys/types.h>
1828 #include <signal.h>
1829 #include <setjmp.h>
1830
1831 main()
1832 {
1833 #if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
1834 exit (1);
1835 #else
1836
1837 int code;
1838 sigset_t set, oset;
1839 sigjmp_buf xx;
1840
1841 /* get the mask */
1842 sigemptyset(&set);
1843 sigemptyset(&oset);
1844 sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
1845 sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
1846
1847 /* save it */
1848 code = sigsetjmp(xx, 1);
1849 if (code)
1850   exit(0);      /* could get sigmask and compare to oset here. */
1851
1852 /* change it */
1853 sigaddset(&set, SIGINT);
1854 sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
1855
1856 /* and siglongjmp */
1857 siglongjmp(xx, 10);
1858 exit(1);
1859 #endif
1860 }
1861 EOF
1862 if { (eval echo configure:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1863 then
1864   bash_cv_func_sigsetjmp=present
1865 else
1866   echo "configure: failed program was:" >&5
1867   cat conftest.$ac_ext >&5
1868   rm -fr conftest*
1869   bash_cv_func_sigsetjmp=missing
1870 fi
1871 rm -fr conftest*
1872 fi
1873
1874 fi
1875
1876 echo "$ac_t""$bash_cv_func_sigsetjmp" 1>&6
1877 if test $bash_cv_func_sigsetjmp = present; then
1878 cat >> confdefs.h <<\EOF
1879 #define HAVE_POSIX_SIGSETJMP 1
1880 EOF
1881
1882 fi
1883
1884 echo $ac_n "checking for lstat""... $ac_c" 1>&6
1885 echo "configure:1886: checking for lstat" >&5
1886 if eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then
1887   echo $ac_n "(cached) $ac_c" 1>&6
1888 else
1889   cat > conftest.$ac_ext <<EOF
1890 #line 1891 "configure"
1891 #include "confdefs.h"
1892
1893 #include <sys/types.h>
1894 #include <sys/stat.h>
1895
1896 int main() {
1897  lstat(".",(struct stat *)0); 
1898 ; return 0; }
1899 EOF
1900 if { (eval echo configure:1901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1901   rm -rf conftest*
1902   bash_cv_func_lstat=yes
1903 else
1904   echo "configure: failed program was:" >&5
1905   cat conftest.$ac_ext >&5
1906   rm -rf conftest*
1907   bash_cv_func_lstat=no
1908 fi
1909 rm -f conftest*
1910 fi
1911
1912 echo "$ac_t""$bash_cv_func_lstat" 1>&6
1913 if test $bash_cv_func_lstat = yes; then
1914   cat >> confdefs.h <<\EOF
1915 #define HAVE_LSTAT 1
1916 EOF
1917
1918 fi
1919
1920 echo $ac_n "checking whether programs are able to redeclare getpw functions""... $ac_c" 1>&6
1921 echo "configure:1922: checking whether programs are able to redeclare getpw functions" >&5
1922 if eval "test \"`echo '$''{'bash_cv_can_redecl_getpw'+set}'`\" = set"; then
1923   echo $ac_n "(cached) $ac_c" 1>&6
1924 else
1925   cat > conftest.$ac_ext <<EOF
1926 #line 1927 "configure"
1927 #include "confdefs.h"
1928 #include <sys/types.h>
1929 #include <pwd.h>
1930 extern struct passwd *getpwent();
1931 extern struct passwd *getpwuid();
1932 extern struct passwd *getpwnam();
1933 int main() {
1934 struct passwd *z; z = getpwent(); z = getpwuid(0); z = getpwnam("root");
1935 ; return 0; }
1936 EOF
1937 if { (eval echo configure:1938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1938   rm -rf conftest*
1939   bash_cv_can_redecl_getpw=yes
1940 else
1941   echo "configure: failed program was:" >&5
1942   cat conftest.$ac_ext >&5
1943   rm -rf conftest*
1944   bash_cv_can_redecl_getpw=no
1945 fi
1946 rm -f conftest*
1947 fi
1948
1949 echo "$ac_t""$bash_cv_can_redecl_getpw" 1>&6
1950 if test $bash_cv_can_redecl_getpw = no; then
1951 cat >> confdefs.h <<\EOF
1952 #define HAVE_GETPW_DECLS 1
1953 EOF
1954
1955 fi
1956
1957
1958 echo $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6
1959 echo "configure:1960: checking whether or not strcoll and strcmp differ" >&5
1960 if eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then
1961   echo $ac_n "(cached) $ac_c" 1>&6
1962 else
1963   if test "$cross_compiling" = yes; then
1964   echo "configure: warning: cannot check strcoll if cross compiling -- defaulting to no" 1>&2
1965     bash_cv_func_strcoll_broken=no
1966
1967 else
1968   cat > conftest.$ac_ext <<EOF
1969 #line 1970 "configure"
1970 #include "confdefs.h"
1971
1972 #include <stdio.h>
1973 #if defined (HAVE_LOCALE_H)
1974 #include <locale.h>
1975 #endif
1976
1977 main(c, v)
1978 int     c;
1979 char    *v[];
1980 {
1981         int     r1, r2;
1982         char    *deflocale, *defcoll;
1983
1984 #ifdef HAVE_SETLOCALE
1985         deflocale = setlocale(LC_ALL, "");
1986         defcoll = setlocale(LC_COLLATE, "");
1987 #endif
1988
1989 #ifdef HAVE_STRCOLL
1990         /* These two values are taken from tests/glob-test. */
1991         r1 = strcoll("abd", "aXd");
1992 #else
1993         r1 = 0;
1994 #endif
1995         r2 = strcmp("abd", "aXd");
1996
1997         /* These two should both be greater than 0.  It is permissible for
1998            a system to return different values, as long as the sign is the
1999            same. */
2000
2001         /* Exit with 1 (failure) if these two values are both > 0, since
2002            this tests whether strcoll(3) is broken with respect to strcmp(3)
2003            in the default locale. */
2004         exit (r1 > 0 && r2 > 0);
2005 }
2006
2007 EOF
2008 if { (eval echo configure:2009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2009 then
2010   bash_cv_func_strcoll_broken=yes
2011 else
2012   echo "configure: failed program was:" >&5
2013   cat conftest.$ac_ext >&5
2014   rm -fr conftest*
2015   bash_cv_func_strcoll_broken=no
2016 fi
2017 rm -fr conftest*
2018 fi
2019
2020 fi
2021
2022 echo "$ac_t""$bash_cv_func_strcoll_broken" 1>&6
2023 if test $bash_cv_func_strcoll_broken = yes; then
2024 cat >> confdefs.h <<\EOF
2025 #define STRCOLL_BROKEN 1
2026 EOF
2027
2028 fi
2029
2030
2031 echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6
2032 echo "configure:2033: checking whether signal handlers are of type void" >&5
2033 if eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then
2034   echo $ac_n "(cached) $ac_c" 1>&6
2035 else
2036   cat > conftest.$ac_ext <<EOF
2037 #line 2038 "configure"
2038 #include "confdefs.h"
2039 #include <sys/types.h>
2040 #include <signal.h>
2041 #ifdef signal
2042 #undef signal
2043 #endif
2044 #ifdef __cplusplus
2045 extern "C"
2046 #endif
2047 void (*signal ()) ();
2048 int main() {
2049 int i;
2050 ; return 0; }
2051 EOF
2052 if { (eval echo configure:2053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2053   rm -rf conftest*
2054   bash_cv_void_sighandler=yes
2055 else
2056   echo "configure: failed program was:" >&5
2057   cat conftest.$ac_ext >&5
2058   rm -rf conftest*
2059   bash_cv_void_sighandler=no
2060 fi
2061 rm -f conftest*
2062 fi
2063 echo "$ac_t""$bash_cv_void_sighandler" 1>&6
2064 if test $bash_cv_void_sighandler = yes; then
2065 cat >> confdefs.h <<\EOF
2066 #define VOID_SIGHANDLER 1
2067 EOF
2068
2069 fi
2070
2071 echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
2072 echo "configure:2073: checking for TIOCGWINSZ in sys/ioctl.h" >&5
2073 if eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then
2074   echo $ac_n "(cached) $ac_c" 1>&6
2075 else
2076   cat > conftest.$ac_ext <<EOF
2077 #line 2078 "configure"
2078 #include "confdefs.h"
2079 #include <sys/types.h>
2080 #include <sys/ioctl.h>
2081 int main() {
2082 int x = TIOCGWINSZ;
2083 ; return 0; }
2084 EOF
2085 if { (eval echo configure:2086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2086   rm -rf conftest*
2087   bash_cv_tiocgwinsz_in_ioctl=yes
2088 else
2089   echo "configure: failed program was:" >&5
2090   cat conftest.$ac_ext >&5
2091   rm -rf conftest*
2092   bash_cv_tiocgwinsz_in_ioctl=no
2093 fi
2094 rm -f conftest*
2095 fi
2096
2097 echo "$ac_t""$bash_cv_tiocgwinsz_in_ioctl" 1>&6
2098 if test $bash_cv_tiocgwinsz_in_ioctl = yes; then   
2099 cat >> confdefs.h <<\EOF
2100 #define GWINSZ_IN_SYS_IOCTL 1
2101 EOF
2102
2103 fi
2104
2105 echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6
2106 echo "configure:2107: checking for TIOCSTAT in sys/ioctl.h" >&5
2107 if eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then
2108   echo $ac_n "(cached) $ac_c" 1>&6
2109 else
2110   cat > conftest.$ac_ext <<EOF
2111 #line 2112 "configure"
2112 #include "confdefs.h"
2113 #include <sys/types.h>
2114 #include <sys/ioctl.h>
2115 int main() {
2116 int x = TIOCSTAT;
2117 ; return 0; }
2118 EOF
2119 if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2120   rm -rf conftest*
2121   bash_cv_tiocstat_in_ioctl=yes
2122 else
2123   echo "configure: failed program was:" >&5
2124   cat conftest.$ac_ext >&5
2125   rm -rf conftest*
2126   bash_cv_tiocstat_in_ioctl=no
2127 fi
2128 rm -f conftest*
2129 fi
2130
2131 echo "$ac_t""$bash_cv_tiocstat_in_ioctl" 1>&6
2132 if test $bash_cv_tiocstat_in_ioctl = yes; then   
2133 cat >> confdefs.h <<\EOF
2134 #define TIOCSTAT_IN_SYS_IOCTL 1
2135 EOF
2136
2137 fi
2138
2139 echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6
2140 echo "configure:2141: checking for FIONREAD in sys/ioctl.h" >&5
2141 if eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then
2142   echo $ac_n "(cached) $ac_c" 1>&6
2143 else
2144   cat > conftest.$ac_ext <<EOF
2145 #line 2146 "configure"
2146 #include "confdefs.h"
2147 #include <sys/types.h>
2148 #include <sys/ioctl.h>
2149 int main() {
2150 int x = FIONREAD;
2151 ; return 0; }
2152 EOF
2153 if { (eval echo configure:2154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2154   rm -rf conftest*
2155   bash_cv_fionread_in_ioctl=yes
2156 else
2157   echo "configure: failed program was:" >&5
2158   cat conftest.$ac_ext >&5
2159   rm -rf conftest*
2160   bash_cv_fionread_in_ioctl=no
2161 fi
2162 rm -f conftest*
2163 fi
2164
2165 echo "$ac_t""$bash_cv_fionread_in_ioctl" 1>&6
2166 if test $bash_cv_fionread_in_ioctl = yes; then   
2167 cat >> confdefs.h <<\EOF
2168 #define FIONREAD_IN_SYS_IOCTL 1
2169 EOF
2170
2171 fi
2172
2173 echo $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6
2174 echo "configure:2175: checking for speed_t in sys/types.h" >&5
2175 if eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then
2176   echo $ac_n "(cached) $ac_c" 1>&6
2177 else
2178   cat > conftest.$ac_ext <<EOF
2179 #line 2180 "configure"
2180 #include "confdefs.h"
2181 #include <sys/types.h>
2182 int main() {
2183 speed_t x;
2184 ; return 0; }
2185 EOF
2186 if { (eval echo configure:2187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2187   rm -rf conftest*
2188   bash_cv_speed_t_in_sys_types=yes
2189 else
2190   echo "configure: failed program was:" >&5
2191   cat conftest.$ac_ext >&5
2192   rm -rf conftest*
2193   bash_cv_speed_t_in_sys_types=no
2194 fi
2195 rm -f conftest*
2196 fi
2197
2198 echo "$ac_t""$bash_cv_speed_t_in_sys_types" 1>&6
2199 if test $bash_cv_speed_t_in_sys_types = yes; then   
2200 cat >> confdefs.h <<\EOF
2201 #define SPEED_T_IN_SYS_TYPES 1
2202 EOF
2203
2204 fi
2205
2206 echo $ac_n "checking for struct winsize in sys/ioctl.h and termios.h""... $ac_c" 1>&6
2207 echo "configure:2208: checking for struct winsize in sys/ioctl.h and termios.h" >&5
2208 if eval "test \"`echo '$''{'bash_cv_struct_winsize_header'+set}'`\" = set"; then
2209   echo $ac_n "(cached) $ac_c" 1>&6
2210 else
2211   cat > conftest.$ac_ext <<EOF
2212 #line 2213 "configure"
2213 #include "confdefs.h"
2214 #include <sys/types.h>
2215 #include <sys/ioctl.h>
2216 int main() {
2217 struct winsize x;
2218 ; return 0; }
2219 EOF
2220 if { (eval echo configure:2221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2221   rm -rf conftest*
2222   bash_cv_struct_winsize_header=ioctl_h
2223 else
2224   echo "configure: failed program was:" >&5
2225   cat conftest.$ac_ext >&5
2226   rm -rf conftest*
2227   cat > conftest.$ac_ext <<EOF
2228 #line 2229 "configure"
2229 #include "confdefs.h"
2230 #include <sys/types.h>
2231 #include <termios.h>
2232 int main() {
2233 struct winsize x;
2234 ; return 0; }
2235 EOF
2236 if { (eval echo configure:2237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2237   rm -rf conftest*
2238   bash_cv_struct_winsize_header=termios_h
2239 else
2240   echo "configure: failed program was:" >&5
2241   cat conftest.$ac_ext >&5
2242   rm -rf conftest*
2243   bash_cv_struct_winsize_header=other
2244 fi
2245 rm -f conftest*
2246
2247 fi
2248 rm -f conftest*
2249 fi
2250
2251 if test $bash_cv_struct_winsize_header = ioctl_h; then
2252   echo "$ac_t""sys/ioctl.h" 1>&6
2253   cat >> confdefs.h <<\EOF
2254 #define STRUCT_WINSIZE_IN_SYS_IOCTL 1
2255 EOF
2256
2257 elif test $bash_cv_struct_winsize_header = termios_h; then
2258   echo "$ac_t""termios.h" 1>&6
2259   cat >> confdefs.h <<\EOF
2260 #define STRUCT_WINSIZE_IN_TERMIOS 1
2261 EOF
2262
2263 else
2264   echo "$ac_t""not found" 1>&6
2265 fi
2266
2267
2268 echo $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6
2269 echo "configure:2270: checking if struct dirent has a d_ino member" >&5
2270 if eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then
2271   echo $ac_n "(cached) $ac_c" 1>&6
2272 else
2273   cat > conftest.$ac_ext <<EOF
2274 #line 2275 "configure"
2275 #include "confdefs.h"
2276
2277 #include <stdio.h>
2278 #include <sys/types.h>
2279 #ifdef HAVE_UNISTD_H
2280 # include <unistd.h>
2281 #endif /* HAVE_UNISTD_H */
2282 #if defined(HAVE_DIRENT_H)
2283 # include <dirent.h>
2284 #else
2285 # define dirent direct
2286 # ifdef HAVE_SYS_NDIR_H
2287 #  include <sys/ndir.h>
2288 # endif /* SYSNDIR */
2289 # ifdef HAVE_SYS_DIR_H
2290 #  include <sys/dir.h>
2291 # endif /* SYSDIR */
2292 # ifdef HAVE_NDIR_H
2293 #  include <ndir.h>
2294 # endif
2295 #endif /* HAVE_DIRENT_H */
2296
2297 int main() {
2298
2299 struct dirent d; int z; z = d.d_ino;
2300
2301 ; return 0; }
2302 EOF
2303 if { (eval echo configure:2304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2304   rm -rf conftest*
2305   bash_cv_dirent_has_dino=yes
2306 else
2307   echo "configure: failed program was:" >&5
2308   cat conftest.$ac_ext >&5
2309   rm -rf conftest*
2310   bash_cv_dirent_has_dino=no
2311 fi
2312 rm -f conftest*
2313 fi
2314
2315 echo "$ac_t""$bash_cv_dirent_has_dino" 1>&6
2316 if test $bash_cv_dirent_has_dino = yes; then
2317 cat >> confdefs.h <<\EOF
2318 #define STRUCT_DIRENT_HAS_D_INO 1
2319 EOF
2320
2321 fi
2322
2323
2324 echo $ac_n "checking if struct dirent has a d_fileno member""... $ac_c" 1>&6
2325 echo "configure:2326: checking if struct dirent has a d_fileno member" >&5
2326 if eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then
2327   echo $ac_n "(cached) $ac_c" 1>&6
2328 else
2329   cat > conftest.$ac_ext <<EOF
2330 #line 2331 "configure"
2331 #include "confdefs.h"
2332
2333 #include <stdio.h>
2334 #include <sys/types.h>
2335 #ifdef HAVE_UNISTD_H
2336 # include <unistd.h>
2337 #endif /* HAVE_UNISTD_H */
2338 #if defined(HAVE_DIRENT_H)
2339 # include <dirent.h>
2340 #else
2341 # define dirent direct
2342 # ifdef HAVE_SYS_NDIR_H
2343 #  include <sys/ndir.h>
2344 # endif /* SYSNDIR */
2345 # ifdef HAVE_SYS_DIR_H
2346 #  include <sys/dir.h>
2347 # endif /* SYSDIR */
2348 # ifdef HAVE_NDIR_H
2349 #  include <ndir.h>
2350 # endif
2351 #endif /* HAVE_DIRENT_H */
2352
2353 int main() {
2354
2355 struct dirent d; int z; z = d.d_fileno;
2356
2357 ; return 0; }
2358 EOF
2359 if { (eval echo configure:2360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2360   rm -rf conftest*
2361   bash_cv_dirent_has_d_fileno=yes
2362 else
2363   echo "configure: failed program was:" >&5
2364   cat conftest.$ac_ext >&5
2365   rm -rf conftest*
2366   bash_cv_dirent_has_d_fileno=no
2367 fi
2368 rm -f conftest*
2369 fi
2370
2371 echo "$ac_t""$bash_cv_dirent_has_d_fileno" 1>&6
2372 if test $bash_cv_dirent_has_d_fileno = yes; then
2373 cat >> confdefs.h <<\EOF
2374 #define STRUCT_DIRENT_HAS_D_FILENO 1
2375 EOF
2376
2377 fi
2378
2379
2380 case "$host_os" in
2381 aix*)   prefer_curses=yes ;;
2382 esac
2383
2384 if test "X$bash_cv_termcap_lib" = "X"; then
2385 _bash_needmsg=yes
2386 else
2387 echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
2388 echo "configure:2389: checking which library has the termcap functions" >&5
2389 _bash_needmsg=
2390 fi
2391 if eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then
2392   echo $ac_n "(cached) $ac_c" 1>&6
2393 else
2394   echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
2395 echo "configure:2396: checking for tgetent in -ltermcap" >&5
2396 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
2397 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2398   echo $ac_n "(cached) $ac_c" 1>&6
2399 else
2400   ac_save_LIBS="$LIBS"
2401 LIBS="-ltermcap  $LIBS"
2402 cat > conftest.$ac_ext <<EOF
2403 #line 2404 "configure"
2404 #include "confdefs.h"
2405 /* Override any gcc2 internal prototype to avoid an error.  */
2406 /* We use char because int might match the return type of a gcc2
2407     builtin and then its argument prototype would still apply.  */
2408 char tgetent();
2409
2410 int main() {
2411 tgetent()
2412 ; return 0; }
2413 EOF
2414 if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2415   rm -rf conftest*
2416   eval "ac_cv_lib_$ac_lib_var=yes"
2417 else
2418   echo "configure: failed program was:" >&5
2419   cat conftest.$ac_ext >&5
2420   rm -rf conftest*
2421   eval "ac_cv_lib_$ac_lib_var=no"
2422 fi
2423 rm -f conftest*
2424 LIBS="$ac_save_LIBS"
2425
2426 fi
2427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2428   echo "$ac_t""yes" 1>&6
2429   bash_cv_termcap_lib=libtermcap
2430 else
2431   echo "$ac_t""no" 1>&6
2432 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
2433 echo "configure:2434: checking for tgetent in -lcurses" >&5
2434 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
2435 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2436   echo $ac_n "(cached) $ac_c" 1>&6
2437 else
2438   ac_save_LIBS="$LIBS"
2439 LIBS="-lcurses  $LIBS"
2440 cat > conftest.$ac_ext <<EOF
2441 #line 2442 "configure"
2442 #include "confdefs.h"
2443 /* Override any gcc2 internal prototype to avoid an error.  */
2444 /* We use char because int might match the return type of a gcc2
2445     builtin and then its argument prototype would still apply.  */
2446 char tgetent();
2447
2448 int main() {
2449 tgetent()
2450 ; return 0; }
2451 EOF
2452 if { (eval echo configure:2453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2453   rm -rf conftest*
2454   eval "ac_cv_lib_$ac_lib_var=yes"
2455 else
2456   echo "configure: failed program was:" >&5
2457   cat conftest.$ac_ext >&5
2458   rm -rf conftest*
2459   eval "ac_cv_lib_$ac_lib_var=no"
2460 fi
2461 rm -f conftest*
2462 LIBS="$ac_save_LIBS"
2463
2464 fi
2465 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2466   echo "$ac_t""yes" 1>&6
2467   bash_cv_termcap_lib=libcurses
2468 else
2469   echo "$ac_t""no" 1>&6
2470 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
2471 echo "configure:2472: checking for tgetent in -lncurses" >&5
2472 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
2473 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2474   echo $ac_n "(cached) $ac_c" 1>&6
2475 else
2476   ac_save_LIBS="$LIBS"
2477 LIBS="-lncurses  $LIBS"
2478 cat > conftest.$ac_ext <<EOF
2479 #line 2480 "configure"
2480 #include "confdefs.h"
2481 /* Override any gcc2 internal prototype to avoid an error.  */
2482 /* We use char because int might match the return type of a gcc2
2483     builtin and then its argument prototype would still apply.  */
2484 char tgetent();
2485
2486 int main() {
2487 tgetent()
2488 ; return 0; }
2489 EOF
2490 if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2491   rm -rf conftest*
2492   eval "ac_cv_lib_$ac_lib_var=yes"
2493 else
2494   echo "configure: failed program was:" >&5
2495   cat conftest.$ac_ext >&5
2496   rm -rf conftest*
2497   eval "ac_cv_lib_$ac_lib_var=no"
2498 fi
2499 rm -f conftest*
2500 LIBS="$ac_save_LIBS"
2501
2502 fi
2503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2504   echo "$ac_t""yes" 1>&6
2505   bash_cv_termcap_lib=libncurses
2506 else
2507   echo "$ac_t""no" 1>&6
2508 bash_cv_termcap_lib=gnutermcap
2509 fi
2510
2511 fi
2512
2513 fi
2514
2515 fi
2516
2517 if test "X$_bash_needmsg" = "Xyes"; then
2518 echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
2519 echo "configure:2520: checking which library has the termcap functions" >&5
2520 fi
2521 echo "$ac_t""using $bash_cv_termcap_lib" 1>&6
2522 if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
2523 LDFLAGS="$LDFLAGS -L./lib/termcap"
2524 TERMCAP_LIB="./lib/termcap/libtermcap.a"
2525 TERMCAP_DEP="./lib/termcap/libtermcap.a"
2526 elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
2527 TERMCAP_LIB=-ltermcap
2528 TERMCAP_DEP=
2529 elif test $bash_cv_termcap_lib = libncurses; then
2530 TERMCAP_LIB=-lncurses
2531 TERMCAP_DEP=
2532 else
2533 TERMCAP_LIB=-lcurses
2534 TERMCAP_DEP=
2535 fi
2536
2537 if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
2538         TERMCAP_LIB=-ltermcap   #default
2539 fi
2540
2541 case "$host_cpu" in
2542 *cray*) LOCAL_CFLAGS=-DCRAY ;;
2543 esac
2544
2545 case "$host_os" in
2546 isc*)   LOCAL_CFLAGS=-Disc386 ;;
2547 esac
2548
2549 # shared library configuration section
2550 #
2551 # Shared object configuration section.  These values are generated by
2552 # ${srcdir}/support/shobj-conf
2553 #
2554 if test -f ${srcdir}/support/shobj-conf; then
2555         echo $ac_n "checking configuration for building shared libraries""... $ac_c" 1>&6
2556 echo "configure:2557: checking configuration for building shared libraries" >&5
2557         eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C ${CC} -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
2558         
2559         
2560         
2561         
2562         
2563         
2564         
2565         
2566         
2567         
2568         
2569         
2570         echo "$ac_t""$SHLIB_STATUS" 1>&6
2571 fi
2572
2573 BUILD_DIR=`pwd`
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591 trap '' 1 2 15
2592 cat > confcache <<\EOF
2593 # This file is a shell script that caches the results of configure
2594 # tests run on this system so they can be shared between configure
2595 # scripts and configure runs.  It is not useful on other systems.
2596 # If it contains results you don't want to keep, you may remove or edit it.
2597 #
2598 # By default, configure uses ./config.cache as the cache file,
2599 # creating it if it does not exist already.  You can give configure
2600 # the --cache-file=FILE option to use a different cache file; that is
2601 # what configure does when it calls configure scripts in
2602 # subdirectories, so they share the cache.
2603 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2604 # config.status only pays attention to the cache file if you give it the
2605 # --recheck option to rerun configure.
2606 #
2607 EOF
2608 # The following way of writing the cache mishandles newlines in values,
2609 # but we know of no workaround that is simple, portable, and efficient.
2610 # So, don't put newlines in cache variables' values.
2611 # Ultrix sh set writes to stderr and can't be redirected directly,
2612 # and sets the high bit in the cache file unless we assign to the vars.
2613 (set) 2>&1 |
2614   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2615   *ac_space=\ *)
2616     # `set' does not quote correctly, so add quotes (double-quote substitution
2617     # turns \\\\ into \\, and sed turns \\ into \).
2618     sed -n \
2619       -e "s/'/'\\\\''/g" \
2620       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2621     ;;
2622   *)
2623     # `set' quotes correctly as required by POSIX, so do not add quotes.
2624     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2625     ;;
2626   esac >> confcache
2627 if cmp -s $cache_file confcache; then
2628   :
2629 else
2630   if test -w $cache_file; then
2631     echo "updating cache $cache_file"
2632     cat confcache > $cache_file
2633   else
2634     echo "not updating unwritable cache $cache_file"
2635   fi
2636 fi
2637 rm -f confcache
2638
2639 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2640
2641 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2642 # Let make expand exec_prefix.
2643 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2644
2645 # Any assignment to VPATH causes Sun make to only execute
2646 # the first set of double-colon rules, so remove it if not needed.
2647 # If there is a colon in the path, we need to keep it.
2648 if test "x$srcdir" = x.; then
2649   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2650 fi
2651
2652 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2653
2654 DEFS=-DHAVE_CONFIG_H
2655
2656 # Without the "./", some shells look in PATH for config.status.
2657 : ${CONFIG_STATUS=./config.status}
2658
2659 echo creating $CONFIG_STATUS
2660 rm -f $CONFIG_STATUS
2661 cat > $CONFIG_STATUS <<EOF
2662 #! /bin/sh
2663 # Generated automatically by configure.
2664 # Run this file to recreate the current configuration.
2665 # This directory was configured as follows,
2666 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2667 #
2668 # $0 $ac_configure_args
2669 #
2670 # Compiler output produced by configure, useful for debugging
2671 # configure, is in ./config.log if it exists.
2672
2673 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2674 for ac_option
2675 do
2676   case "\$ac_option" in
2677   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2678     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2679     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2680   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2681     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2682     exit 0 ;;
2683   -help | --help | --hel | --he | --h)
2684     echo "\$ac_cs_usage"; exit 0 ;;
2685   *) echo "\$ac_cs_usage"; exit 1 ;;
2686   esac
2687 done
2688
2689 ac_given_srcdir=$srcdir
2690 ac_given_INSTALL="$INSTALL"
2691
2692 trap 'rm -fr `echo "Makefile doc/Makefile examples/Makefile shlib/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2693 EOF
2694 cat >> $CONFIG_STATUS <<EOF
2695
2696 # Protect against being on the right side of a sed subst in config.status.
2697 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2698  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2699 $ac_vpsub
2700 $extrasub
2701 s%@SHELL@%$SHELL%g
2702 s%@CFLAGS@%$CFLAGS%g
2703 s%@CPPFLAGS@%$CPPFLAGS%g
2704 s%@CXXFLAGS@%$CXXFLAGS%g
2705 s%@FFLAGS@%$FFLAGS%g
2706 s%@DEFS@%$DEFS%g
2707 s%@LDFLAGS@%$LDFLAGS%g
2708 s%@LIBS@%$LIBS%g
2709 s%@exec_prefix@%$exec_prefix%g
2710 s%@prefix@%$prefix%g
2711 s%@program_transform_name@%$program_transform_name%g
2712 s%@bindir@%$bindir%g
2713 s%@sbindir@%$sbindir%g
2714 s%@libexecdir@%$libexecdir%g
2715 s%@datadir@%$datadir%g
2716 s%@sysconfdir@%$sysconfdir%g
2717 s%@sharedstatedir@%$sharedstatedir%g
2718 s%@localstatedir@%$localstatedir%g
2719 s%@libdir@%$libdir%g
2720 s%@includedir@%$includedir%g
2721 s%@oldincludedir@%$oldincludedir%g
2722 s%@infodir@%$infodir%g
2723 s%@mandir@%$mandir%g
2724 s%@host@%$host%g
2725 s%@host_alias@%$host_alias%g
2726 s%@host_cpu@%$host_cpu%g
2727 s%@host_vendor@%$host_vendor%g
2728 s%@host_os@%$host_os%g
2729 s%@CC@%$CC%g
2730 s%@CPP@%$CPP%g
2731 s%@CROSS_COMPILING_FLAG@%$CROSS_COMPILING_FLAG%g
2732 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
2733 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2734 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2735 s%@INSTALL_DATA@%$INSTALL_DATA%g
2736 s%@AR@%$AR%g
2737 s%@RANLIB@%$RANLIB%g
2738 s%@MAKE_SHELL@%$MAKE_SHELL%g
2739 s%@SHOBJ_CC@%$SHOBJ_CC%g
2740 s%@SHOBJ_CFLAGS@%$SHOBJ_CFLAGS%g
2741 s%@SHOBJ_LD@%$SHOBJ_LD%g
2742 s%@SHOBJ_LDFLAGS@%$SHOBJ_LDFLAGS%g
2743 s%@SHOBJ_XLDFLAGS@%$SHOBJ_XLDFLAGS%g
2744 s%@SHOBJ_LIBS@%$SHOBJ_LIBS%g
2745 s%@SHOBJ_STATUS@%$SHOBJ_STATUS%g
2746 s%@SHLIB_STATUS@%$SHLIB_STATUS%g
2747 s%@SHLIB_XLDFLAGS@%$SHLIB_XLDFLAGS%g
2748 s%@SHLIB_LIBSUFF@%$SHLIB_LIBSUFF%g
2749 s%@SHLIB_LIBVERSION@%$SHLIB_LIBVERSION%g
2750 s%@SHLIB_LIBS@%$SHLIB_LIBS%g
2751 s%@BUILD_DIR@%$BUILD_DIR%g
2752 s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
2753 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
2754 s%@LOCAL_DEFS@%$LOCAL_DEFS%g
2755 s%@ARFLAGS@%$ARFLAGS%g
2756 s%@LIBVERSION@%$LIBVERSION%g
2757 s%@TERMCAP_LIB@%$TERMCAP_LIB%g
2758
2759 CEOF
2760 EOF
2761
2762 cat >> $CONFIG_STATUS <<\EOF
2763
2764 # Split the substitutions into bite-sized pieces for seds with
2765 # small command number limits, like on Digital OSF/1 and HP-UX.
2766 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2767 ac_file=1 # Number of current file.
2768 ac_beg=1 # First line for current file.
2769 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2770 ac_more_lines=:
2771 ac_sed_cmds=""
2772 while $ac_more_lines; do
2773   if test $ac_beg -gt 1; then
2774     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2775   else
2776     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2777   fi
2778   if test ! -s conftest.s$ac_file; then
2779     ac_more_lines=false
2780     rm -f conftest.s$ac_file
2781   else
2782     if test -z "$ac_sed_cmds"; then
2783       ac_sed_cmds="sed -f conftest.s$ac_file"
2784     else
2785       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2786     fi
2787     ac_file=`expr $ac_file + 1`
2788     ac_beg=$ac_end
2789     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2790   fi
2791 done
2792 if test -z "$ac_sed_cmds"; then
2793   ac_sed_cmds=cat
2794 fi
2795 EOF
2796
2797 cat >> $CONFIG_STATUS <<EOF
2798
2799 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile examples/Makefile shlib/Makefile"}
2800 EOF
2801 cat >> $CONFIG_STATUS <<\EOF
2802 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2803   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2804   case "$ac_file" in
2805   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2806        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2807   *) ac_file_in="${ac_file}.in" ;;
2808   esac
2809
2810   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2811
2812   # Remove last slash and all that follows it.  Not all systems have dirname.
2813   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2814   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2815     # The file is in a subdirectory.
2816     test ! -d "$ac_dir" && mkdir "$ac_dir"
2817     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2818     # A "../" for each directory in $ac_dir_suffix.
2819     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2820   else
2821     ac_dir_suffix= ac_dots=
2822   fi
2823
2824   case "$ac_given_srcdir" in
2825   .)  srcdir=.
2826       if test -z "$ac_dots"; then top_srcdir=.
2827       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2828   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2829   *) # Relative path.
2830     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2831     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2832   esac
2833
2834   case "$ac_given_INSTALL" in
2835   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2836   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2837   esac
2838
2839   echo creating "$ac_file"
2840   rm -f "$ac_file"
2841   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2842   case "$ac_file" in
2843   *Makefile*) ac_comsub="1i\\
2844 # $configure_input" ;;
2845   *) ac_comsub= ;;
2846   esac
2847
2848   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2849   sed -e "$ac_comsub
2850 s%@configure_input@%$configure_input%g
2851 s%@srcdir@%$srcdir%g
2852 s%@top_srcdir@%$top_srcdir%g
2853 s%@INSTALL@%$INSTALL%g
2854 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2855 fi; done
2856 rm -f conftest.s*
2857
2858 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2859 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2860 #
2861 # ac_d sets the value in "#define NAME VALUE" lines.
2862 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2863 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2864 ac_dC='\3'
2865 ac_dD='%g'
2866 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2867 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2868 ac_uB='\([      ]\)%\1#\2define\3'
2869 ac_uC=' '
2870 ac_uD='\4%g'
2871 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2872 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2873 ac_eB='$%\1#\2define\3'
2874 ac_eC=' '
2875 ac_eD='%g'
2876
2877 if test "${CONFIG_HEADERS+set}" != set; then
2878 EOF
2879 cat >> $CONFIG_STATUS <<EOF
2880   CONFIG_HEADERS="config.h"
2881 EOF
2882 cat >> $CONFIG_STATUS <<\EOF
2883 fi
2884 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2885   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2886   case "$ac_file" in
2887   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2888        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2889   *) ac_file_in="${ac_file}.in" ;;
2890   esac
2891
2892   echo creating $ac_file
2893
2894   rm -f conftest.frag conftest.in conftest.out
2895   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2896   cat $ac_file_inputs > conftest.in
2897
2898 EOF
2899
2900 # Transform confdefs.h into a sed script conftest.vals that substitutes
2901 # the proper values into config.h.in to produce config.h.  And first:
2902 # Protect against being on the right side of a sed subst in config.status.
2903 # Protect against being in an unquoted here document in config.status.
2904 rm -f conftest.vals
2905 cat > conftest.hdr <<\EOF
2906 s/[\\&%]/\\&/g
2907 s%[\\$`]%\\&%g
2908 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2909 s%ac_d%ac_u%gp
2910 s%ac_u%ac_e%gp
2911 EOF
2912 sed -n -f conftest.hdr confdefs.h > conftest.vals
2913 rm -f conftest.hdr
2914
2915 # This sed command replaces #undef with comments.  This is necessary, for
2916 # example, in the case of _POSIX_SOURCE, which is predefined and required
2917 # on some systems where configure will not decide to define it.
2918 cat >> conftest.vals <<\EOF
2919 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2920 EOF
2921
2922 # Break up conftest.vals because some shells have a limit on
2923 # the size of here documents, and old seds have small limits too.
2924
2925 rm -f conftest.tail
2926 while :
2927 do
2928   ac_lines=`grep -c . conftest.vals`
2929   # grep -c gives empty output for an empty file on some AIX systems.
2930   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2931   # Write a limited-size here document to conftest.frag.
2932   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2933   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2934   echo 'CEOF
2935   sed -f conftest.frag conftest.in > conftest.out
2936   rm -f conftest.in
2937   mv conftest.out conftest.in
2938 ' >> $CONFIG_STATUS
2939   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2940   rm -f conftest.vals
2941   mv conftest.tail conftest.vals
2942 done
2943 rm -f conftest.vals
2944
2945 cat >> $CONFIG_STATUS <<\EOF
2946   rm -f conftest.frag conftest.h
2947   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2948   cat conftest.in >> conftest.h
2949   rm -f conftest.in
2950   if cmp -s $ac_file conftest.h 2>/dev/null; then
2951     echo "$ac_file is unchanged"
2952     rm -f conftest.h
2953   else
2954     # Remove last slash and all that follows it.  Not all systems have dirname.
2955       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2956       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2957       # The file is in a subdirectory.
2958       test ! -d "$ac_dir" && mkdir "$ac_dir"
2959     fi
2960     rm -f $ac_file
2961     mv conftest.h $ac_file
2962   fi
2963 fi; done
2964
2965 EOF
2966 cat >> $CONFIG_STATUS <<EOF
2967
2968 EOF
2969 cat >> $CONFIG_STATUS <<\EOF
2970
2971 # Makefile uses this timestamp file to record whether config.h is up to date.
2972 echo > stamp-h
2973
2974 exit 0
2975 EOF
2976 chmod +x $CONFIG_STATUS
2977 rm -fr confdefs* $ac_clean_files
2978 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2979