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