OSDN Git Service

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