3 # From configure.in for Readline 2.2, version 2.07, from autoconf version 2.12
91 # Guess values for system-dependent variables and create Makefiles.
92 # Generated automatically using autoconf version 2.12
93 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
95 # This configure script is free software; the Free Software Foundation
96 # gives unlimited permission to copy, distribute and modify it.
100 ac_default_prefix=/usr/local
101 # Any additions from configure.in:
103 --with-curses use the curses library instead of the termcap library"
105 # Initialize some variables set by options.
106 # The variables have the same names as the options, with
107 # dashes changed to underlines.
109 cache_file=./config.cache
118 program_transform_name=s,x,x,
126 bindir='${exec_prefix}/bin'
127 sbindir='${exec_prefix}/sbin'
128 libexecdir='${exec_prefix}/libexec'
129 datadir='${prefix}/share'
130 sysconfdir='${prefix}/etc'
131 sharedstatedir='${prefix}/com'
132 localstatedir='${prefix}/var'
133 libdir='${exec_prefix}/lib'
134 includedir='${prefix}/include'
135 oldincludedir='/usr/include'
136 infodir='${prefix}/info'
137 mandir='${prefix}/man'
139 # Initialize some other variables.
142 # Maximum number of lines to put in a shell here document.
149 # If the previous option needs an argument, assign it.
150 if test -n "$ac_prev"; then
151 eval "$ac_prev=\$ac_option"
157 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
161 # Accept the important Cygnus configure options, so we can diagnose typos.
165 -bindir | --bindir | --bindi | --bind | --bin | --bi)
167 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
168 bindir="$ac_optarg" ;;
170 -build | --build | --buil | --bui | --bu)
172 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
173 build="$ac_optarg" ;;
175 -cache-file | --cache-file | --cache-fil | --cache-fi \
176 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
177 ac_prev=cache_file ;;
178 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
179 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
180 cache_file="$ac_optarg" ;;
182 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
184 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
186 datadir="$ac_optarg" ;;
188 -disable-* | --disable-*)
189 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
190 # Reject names that are not valid shell variable names.
191 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
192 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
194 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
195 eval "enable_${ac_feature}=no" ;;
197 -enable-* | --enable-*)
198 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
199 # Reject names that are not valid shell variable names.
200 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
201 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
203 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
208 eval "enable_${ac_feature}='$ac_optarg'" ;;
210 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
211 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
212 | --exec | --exe | --ex)
213 ac_prev=exec_prefix ;;
214 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
215 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
216 | --exec=* | --exe=* | --ex=*)
217 exec_prefix="$ac_optarg" ;;
219 -gas | --gas | --ga | --g)
220 # Obsolete; use --with-gas.
223 -help | --help | --hel | --he)
224 # Omit some internal or obsolete options to make the list less imposing.
225 # This message is too long to be a string in the A/UX 3.1 sh.
227 Usage: configure [options] [host]
228 Options: [defaults in brackets after descriptions]
230 --cache-file=FILE cache test results in FILE
231 --help print this message
232 --no-create do not create output files
233 --quiet, --silent do not print \`checking...' messages
234 --version print the version of autoconf that created configure
235 Directory and file names:
236 --prefix=PREFIX install architecture-independent files in PREFIX
238 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
240 --bindir=DIR user executables in DIR [EPREFIX/bin]
241 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
242 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
243 --datadir=DIR read-only architecture-independent data in DIR
245 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
246 --sharedstatedir=DIR modifiable architecture-independent data in DIR
248 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
249 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
250 --includedir=DIR C header files in DIR [PREFIX/include]
251 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
252 --infodir=DIR info documentation in DIR [PREFIX/info]
253 --mandir=DIR man documentation in DIR [PREFIX/man]
254 --srcdir=DIR find the sources in DIR [configure dir or ..]
255 --program-prefix=PREFIX prepend PREFIX to installed program names
256 --program-suffix=SUFFIX append SUFFIX to installed program names
257 --program-transform-name=PROGRAM
258 run sed PROGRAM on installed program names
262 --build=BUILD configure for building on BUILD [BUILD=HOST]
263 --host=HOST configure for HOST [guessed]
264 --target=TARGET configure for TARGET [TARGET=HOST]
265 Features and packages:
266 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
267 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
268 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
269 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
270 --x-includes=DIR X include files are in DIR
271 --x-libraries=DIR X library files are in DIR
273 if test -n "$ac_help"; then
274 echo "--enable and --with options recognized:$ac_help"
278 -host | --host | --hos | --ho)
280 -host=* | --host=* | --hos=* | --ho=*)
283 -includedir | --includedir | --includedi | --included | --include \
284 | --includ | --inclu | --incl | --inc)
285 ac_prev=includedir ;;
286 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
287 | --includ=* | --inclu=* | --incl=* | --inc=*)
288 includedir="$ac_optarg" ;;
290 -infodir | --infodir | --infodi | --infod | --info | --inf)
292 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
293 infodir="$ac_optarg" ;;
295 -libdir | --libdir | --libdi | --libd)
297 -libdir=* | --libdir=* | --libdi=* | --libd=*)
298 libdir="$ac_optarg" ;;
300 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
301 | --libexe | --libex | --libe)
302 ac_prev=libexecdir ;;
303 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
304 | --libexe=* | --libex=* | --libe=*)
305 libexecdir="$ac_optarg" ;;
307 -localstatedir | --localstatedir | --localstatedi | --localstated \
308 | --localstate | --localstat | --localsta | --localst \
309 | --locals | --local | --loca | --loc | --lo)
310 ac_prev=localstatedir ;;
311 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
312 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
313 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
314 localstatedir="$ac_optarg" ;;
316 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
318 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
319 mandir="$ac_optarg" ;;
322 # Obsolete; use --without-fp.
325 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
329 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
330 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
333 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
334 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
335 | --oldin | --oldi | --old | --ol | --o)
336 ac_prev=oldincludedir ;;
337 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
338 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
339 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
340 oldincludedir="$ac_optarg" ;;
342 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
344 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
345 prefix="$ac_optarg" ;;
347 -program-prefix | --program-prefix | --program-prefi | --program-pref \
348 | --program-pre | --program-pr | --program-p)
349 ac_prev=program_prefix ;;
350 -program-prefix=* | --program-prefix=* | --program-prefi=* \
351 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
352 program_prefix="$ac_optarg" ;;
354 -program-suffix | --program-suffix | --program-suffi | --program-suff \
355 | --program-suf | --program-su | --program-s)
356 ac_prev=program_suffix ;;
357 -program-suffix=* | --program-suffix=* | --program-suffi=* \
358 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
359 program_suffix="$ac_optarg" ;;
361 -program-transform-name | --program-transform-name \
362 | --program-transform-nam | --program-transform-na \
363 | --program-transform-n | --program-transform- \
364 | --program-transform | --program-transfor \
365 | --program-transfo | --program-transf \
366 | --program-trans | --program-tran \
367 | --progr-tra | --program-tr | --program-t)
368 ac_prev=program_transform_name ;;
369 -program-transform-name=* | --program-transform-name=* \
370 | --program-transform-nam=* | --program-transform-na=* \
371 | --program-transform-n=* | --program-transform-=* \
372 | --program-transform=* | --program-transfor=* \
373 | --program-transfo=* | --program-transf=* \
374 | --program-trans=* | --program-tran=* \
375 | --progr-tra=* | --program-tr=* | --program-t=*)
376 program_transform_name="$ac_optarg" ;;
378 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
379 | -silent | --silent | --silen | --sile | --sil)
382 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
384 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
386 sbindir="$ac_optarg" ;;
388 -sharedstatedir | --sharedstatedir | --sharedstatedi \
389 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
390 | --sharedst | --shareds | --shared | --share | --shar \
392 ac_prev=sharedstatedir ;;
393 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
394 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
395 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
397 sharedstatedir="$ac_optarg" ;;
399 -site | --site | --sit)
401 -site=* | --site=* | --sit=*)
404 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
406 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
407 srcdir="$ac_optarg" ;;
409 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
410 | --syscon | --sysco | --sysc | --sys | --sy)
411 ac_prev=sysconfdir ;;
412 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
413 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
414 sysconfdir="$ac_optarg" ;;
416 -target | --target | --targe | --targ | --tar | --ta | --t)
418 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
419 target="$ac_optarg" ;;
421 -v | -verbose | --verbose | --verbos | --verbo | --verb)
424 -version | --version | --versio | --versi | --vers)
425 echo "configure generated by autoconf version 2.12"
429 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
430 # Reject names that are not valid shell variable names.
431 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
432 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
434 ac_package=`echo $ac_package| sed 's/-/_/g'`
439 eval "with_${ac_package}='$ac_optarg'" ;;
441 -without-* | --without-*)
442 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
443 # Reject names that are not valid shell variable names.
444 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
445 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
447 ac_package=`echo $ac_package| sed 's/-/_/g'`
448 eval "with_${ac_package}=no" ;;
451 # Obsolete; use --with-x.
454 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
455 | --x-incl | --x-inc | --x-in | --x-i)
456 ac_prev=x_includes ;;
457 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
458 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
459 x_includes="$ac_optarg" ;;
461 -x-libraries | --x-libraries | --x-librarie | --x-librari \
462 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
463 ac_prev=x_libraries ;;
464 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
465 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
466 x_libraries="$ac_optarg" ;;
468 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
472 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
473 echo "configure: warning: $ac_option: invalid host type" 1>&2
475 if test "x$nonopt" != xNONE; then
476 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
484 if test -n "$ac_prev"; then
485 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
488 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
490 # File descriptor usage:
493 # 2 errors and warnings
494 # 3 some systems may open it to /dev/tty
495 # 4 used on the Kubota Titan
496 # 6 checking for... messages and results
497 # 5 compiler messages saved in config.log
498 if test "$silent" = yes; then
506 This file contains any messages produced by compilers while
507 running configure, to aid debugging if configure makes a mistake.
510 # Strip out --no-create and --no-recursion so they do not pile up.
511 # Also quote any args containing shell metacharacters.
516 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
517 | --no-cr | --no-c) ;;
518 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
519 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
520 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
521 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
522 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
527 # Only set these to C if already set. These must not be set unconditionally
528 # because not all systems understand e.g. LANG=C (notably SCO).
529 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
530 # Non-C LC_CTYPE values break the ctype check.
531 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
532 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
533 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
534 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
536 # confdefs.h avoids OS command line length limits that DEFS can exceed.
537 rm -rf conftest* confdefs.h
538 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
541 # A filename unique to this package, relative to the directory that
542 # configure is in, which we can look for to find out if srcdir is correct.
543 ac_unique_file=readline.h
545 # Find the source files, if location was not specified.
546 if test -z "$srcdir"; then
547 ac_srcdir_defaulted=yes
548 # Try the directory containing this script, then its parent.
550 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
551 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
553 if test ! -r $srcdir/$ac_unique_file; then
557 ac_srcdir_defaulted=no
559 if test ! -r $srcdir/$ac_unique_file; then
560 if test "$ac_srcdir_defaulted" = yes; then
561 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
563 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
566 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
568 # Prefer explicitly selected file to automatically selected ones.
569 if test -z "$CONFIG_SITE"; then
570 if test "x$prefix" != xNONE; then
571 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
573 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
576 for ac_site_file in $CONFIG_SITE; do
577 if test -r "$ac_site_file"; then
578 echo "loading site script $ac_site_file"
583 if test -r "$cache_file"; then
584 echo "loading cache $cache_file"
587 echo "creating cache $cache_file"
592 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
593 ac_cpp='$CPP $CPPFLAGS'
594 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
595 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
596 cross_compiling=$ac_cv_prog_cc_cross
598 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
599 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
600 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
607 ac_n= ac_c='\c' ac_t=
616 for ac_dir in ./support $srcdir/./support; do
617 if test -f $ac_dir/install-sh; then
619 ac_install_sh="$ac_aux_dir/install-sh -c"
621 elif test -f $ac_dir/install.sh; then
623 ac_install_sh="$ac_aux_dir/install.sh -c"
627 if test -z "$ac_aux_dir"; then
628 { echo "configure: error: can not find install-sh or install.sh in ./support $srcdir/./support" 1>&2; exit 1; }
630 ac_config_guess=$ac_aux_dir/config.guess
631 ac_config_sub=$ac_aux_dir/config.sub
632 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
636 # Make sure we can run config.sub.
637 if $ac_config_sub sun4 >/dev/null 2>&1; then :
638 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
641 echo $ac_n "checking host system type""... $ac_c" 1>&6
642 echo "configure:643: checking host system type" >&5
645 case "$host_alias" in
649 if host_alias=`$ac_config_guess`; then :
650 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
652 *) host_alias=$nonopt ;;
656 host=`$ac_config_sub $host_alias`
657 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
658 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
659 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
660 echo "$ac_t""$host" 1>&6
666 # Check whether --with-curses or --without-curses was given.
667 if test "${with_curses+set}" = set; then
668 withval="$with_curses"
673 if test "$opt_curses" = "yes"; then
677 # We want these before the checks, so the checks can modify their values.
678 test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
680 # Extract the first word of "gcc", so it can be a program name with args.
681 set dummy gcc; ac_word=$2
682 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
683 echo "configure:684: checking for $ac_word" >&5
684 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
685 echo $ac_n "(cached) $ac_c" 1>&6
687 if test -n "$CC"; then
688 ac_cv_prog_CC="$CC" # Let the user override the test.
690 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
691 for ac_dir in $PATH; do
692 test -z "$ac_dir" && ac_dir=.
693 if test -f $ac_dir/$ac_word; then
702 if test -n "$CC"; then
703 echo "$ac_t""$CC" 1>&6
705 echo "$ac_t""no" 1>&6
708 if test -z "$CC"; then
709 # Extract the first word of "cc", so it can be a program name with args.
710 set dummy cc; ac_word=$2
711 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
712 echo "configure:713: checking for $ac_word" >&5
713 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
714 echo $ac_n "(cached) $ac_c" 1>&6
716 if test -n "$CC"; then
717 ac_cv_prog_CC="$CC" # Let the user override the test.
719 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
721 for ac_dir in $PATH; do
722 test -z "$ac_dir" && ac_dir=.
723 if test -f $ac_dir/$ac_word; then
724 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
733 if test $ac_prog_rejected = yes; then
734 # We found a bogon in the path, so make sure we never use it.
735 set dummy $ac_cv_prog_CC
737 if test $# -gt 0; then
738 # We chose a different compiler from the bogus one.
739 # However, it has the same basename, so the bogon will be chosen
740 # first if we set CC to just the basename; use the full file name.
742 set dummy "$ac_dir/$ac_word" "$@"
750 if test -n "$CC"; then
751 echo "$ac_t""$CC" 1>&6
753 echo "$ac_t""no" 1>&6
756 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
759 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
760 echo "configure:761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
763 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
764 ac_cpp='$CPP $CPPFLAGS'
765 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
766 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
767 cross_compiling=$ac_cv_prog_cc_cross
769 cat > conftest.$ac_ext <<EOF
770 #line 771 "configure"
771 #include "confdefs.h"
774 if { (eval echo configure:775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
775 ac_cv_prog_cc_works=yes
776 # If we can't run a trivial program, we are probably using a cross compiler.
777 if (./conftest; exit) 2>/dev/null; then
778 ac_cv_prog_cc_cross=no
780 ac_cv_prog_cc_cross=yes
783 echo "configure: failed program was:" >&5
784 cat conftest.$ac_ext >&5
785 ac_cv_prog_cc_works=no
789 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
790 if test $ac_cv_prog_cc_works = no; then
791 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
793 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
794 echo "configure:795: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
795 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
796 cross_compiling=$ac_cv_prog_cc_cross
798 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
799 echo "configure:800: checking whether we are using GNU C" >&5
800 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
801 echo $ac_n "(cached) $ac_c" 1>&6
803 cat > conftest.c <<EOF
808 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
815 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
817 if test $ac_cv_prog_gcc = yes; then
819 ac_test_CFLAGS="${CFLAGS+set}"
820 ac_save_CFLAGS="$CFLAGS"
822 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
823 echo "configure:824: checking whether ${CC-cc} accepts -g" >&5
824 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
825 echo $ac_n "(cached) $ac_c" 1>&6
827 echo 'void f(){}' > conftest.c
828 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
837 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
838 if test "$ac_test_CFLAGS" = set; then
839 CFLAGS="$ac_save_CFLAGS"
840 elif test $ac_cv_prog_cc_g = yes; then
847 test "${CFLAGS+set}" = set || CFLAGS="-g"
850 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
851 echo "configure:852: checking how to run the C preprocessor" >&5
852 # On Suns, sometimes $CPP names a directory.
853 if test -n "$CPP" && test -d "$CPP"; then
856 if test -z "$CPP"; then
857 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
858 echo $ac_n "(cached) $ac_c" 1>&6
860 # This must be in double quotes, not single quotes, because CPP may get
861 # substituted into the Makefile and "${CC-cc}" will confuse make.
863 # On the NeXT, cc -E runs the code through the compiler's parser,
864 # not just through cpp.
865 cat > conftest.$ac_ext <<EOF
866 #line 867 "configure"
867 #include "confdefs.h"
871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
872 { (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
873 ac_err=`grep -v '^ *+' conftest.out`
874 if test -z "$ac_err"; then
878 echo "configure: failed program was:" >&5
879 cat conftest.$ac_ext >&5
881 CPP="${CC-cc} -E -traditional-cpp"
882 cat > conftest.$ac_ext <<EOF
883 #line 884 "configure"
884 #include "confdefs.h"
888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
889 { (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
890 ac_err=`grep -v '^ *+' conftest.out`
891 if test -z "$ac_err"; then
895 echo "configure: failed program was:" >&5
896 cat conftest.$ac_ext >&5
903 ac_cv_prog_CPP="$CPP"
905 CPP="$ac_cv_prog_CPP"
907 ac_cv_prog_CPP="$CPP"
909 echo "$ac_t""$CPP" 1>&6
911 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
912 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
913 echo "configure:914: checking for minix/config.h" >&5
914 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
915 echo $ac_n "(cached) $ac_c" 1>&6
917 cat > conftest.$ac_ext <<EOF
918 #line 919 "configure"
919 #include "confdefs.h"
920 #include <minix/config.h>
922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
923 { (eval echo configure:924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
924 ac_err=`grep -v '^ *+' conftest.out`
925 if test -z "$ac_err"; then
927 eval "ac_cv_header_$ac_safe=yes"
930 echo "configure: failed program was:" >&5
931 cat conftest.$ac_ext >&5
933 eval "ac_cv_header_$ac_safe=no"
937 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
938 echo "$ac_t""yes" 1>&6
941 echo "$ac_t""no" 1>&6
945 if test "$MINIX" = yes; then
946 cat >> confdefs.h <<\EOF
947 #define _POSIX_SOURCE 1
950 cat >> confdefs.h <<\EOF
951 #define _POSIX_1_SOURCE 2
954 cat >> confdefs.h <<\EOF
961 # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
962 test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
964 if test $ac_cv_prog_gcc = yes; then
965 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
966 echo "configure:967: checking whether ${CC-cc} needs -traditional" >&5
967 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
968 echo $ac_n "(cached) $ac_c" 1>&6
970 ac_pattern="Autoconf.*'x'"
971 cat > conftest.$ac_ext <<EOF
972 #line 973 "configure"
973 #include "confdefs.h"
977 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
978 egrep "$ac_pattern" >/dev/null 2>&1; then
980 ac_cv_prog_gcc_traditional=yes
983 ac_cv_prog_gcc_traditional=no
988 if test $ac_cv_prog_gcc_traditional = no; then
989 cat > conftest.$ac_ext <<EOF
990 #line 991 "configure"
991 #include "confdefs.h"
995 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
996 egrep "$ac_pattern" >/dev/null 2>&1; then
998 ac_cv_prog_gcc_traditional=yes
1005 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1006 if test $ac_cv_prog_gcc_traditional = yes; then
1007 CC="$CC -traditional"
1011 # Find a good install program. We prefer a C program (faster),
1012 # so one script is as good as another. But avoid the broken or
1013 # incompatible versions:
1014 # SysV /etc/install, /usr/sbin/install
1015 # SunOS /usr/etc/install
1016 # IRIX /sbin/install
1018 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1019 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1020 # ./install, which can be erroneously created by make from ./install.sh.
1021 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1022 echo "configure:1023: checking for a BSD compatible install" >&5
1023 if test -z "$INSTALL"; then
1024 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1025 echo $ac_n "(cached) $ac_c" 1>&6
1027 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1028 for ac_dir in $PATH; do
1029 # Account for people who put trailing slashes in PATH elements.
1031 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1033 # OSF1 and SCO ODT 3.0 have their own names for install.
1034 for ac_prog in ginstall installbsd scoinst install; do
1035 if test -f $ac_dir/$ac_prog; then
1036 if test $ac_prog = install &&
1037 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1038 # AIX install. It has an incompatible calling convention.
1039 # OSF/1 installbsd also uses dspmsg, but is usable.
1042 ac_cv_path_install="$ac_dir/$ac_prog -c"
1053 if test "${ac_cv_path_install+set}" = set; then
1054 INSTALL="$ac_cv_path_install"
1056 # As a last resort, use the slow shell script. We don't cache a
1057 # path for INSTALL within a source directory, because that will
1058 # break other packages using the cache if that directory is
1059 # removed, or if the path is relative.
1060 INSTALL="$ac_install_sh"
1063 echo "$ac_t""$INSTALL" 1>&6
1065 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1066 # It thinks the first close brace ends the variable substitution.
1067 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1069 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1071 # Extract the first word of "ranlib", so it can be a program name with args.
1072 set dummy ranlib; ac_word=$2
1073 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1074 echo "configure:1075: checking for $ac_word" >&5
1075 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1076 echo $ac_n "(cached) $ac_c" 1>&6
1078 if test -n "$RANLIB"; then
1079 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1081 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1082 for ac_dir in $PATH; do
1083 test -z "$ac_dir" && ac_dir=.
1084 if test -f $ac_dir/$ac_word; then
1085 ac_cv_prog_RANLIB="ranlib"
1090 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1093 RANLIB="$ac_cv_prog_RANLIB"
1094 if test -n "$RANLIB"; then
1095 echo "$ac_t""$RANLIB" 1>&6
1097 echo "$ac_t""no" 1>&6
1101 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1102 echo "configure:1103: checking return type of signal handlers" >&5
1103 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1104 echo $ac_n "(cached) $ac_c" 1>&6
1106 cat > conftest.$ac_ext <<EOF
1107 #line 1108 "configure"
1108 #include "confdefs.h"
1109 #include <sys/types.h>
1115 extern "C" void (*signal (int, void (*)(int)))(int);
1117 void (*signal ()) ();
1124 if { (eval echo configure:1125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1126 ac_cv_type_signal=void
1128 echo "configure: failed program was:" >&5
1129 cat conftest.$ac_ext >&5
1131 ac_cv_type_signal=int
1136 echo "$ac_t""$ac_cv_type_signal" 1>&6
1137 cat >> confdefs.h <<EOF
1138 #define RETSIGTYPE $ac_cv_type_signal
1143 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1144 echo "configure:1145: checking whether stat file-mode macros are broken" >&5
1145 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1146 echo $ac_n "(cached) $ac_c" 1>&6
1148 cat > conftest.$ac_ext <<EOF
1149 #line 1150 "configure"
1150 #include "confdefs.h"
1151 #include <sys/types.h>
1152 #include <sys/stat.h>
1154 #if defined(S_ISBLK) && defined(S_IFDIR)
1155 # if S_ISBLK (S_IFDIR)
1160 #if defined(S_ISBLK) && defined(S_IFCHR)
1161 # if S_ISBLK (S_IFCHR)
1166 #if defined(S_ISLNK) && defined(S_IFREG)
1167 # if S_ISLNK (S_IFREG)
1172 #if defined(S_ISSOCK) && defined(S_IFREG)
1173 # if S_ISSOCK (S_IFREG)
1179 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1180 egrep "You lose" >/dev/null 2>&1; then
1182 ac_cv_header_stat_broken=yes
1185 ac_cv_header_stat_broken=no
1191 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1192 if test $ac_cv_header_stat_broken = yes; then
1193 cat >> confdefs.h <<\EOF
1194 #define STAT_MACROS_BROKEN 1
1200 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1202 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1203 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1204 echo "configure:1205: checking for $ac_hdr that defines DIR" >&5
1205 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1206 echo $ac_n "(cached) $ac_c" 1>&6
1208 cat > conftest.$ac_ext <<EOF
1209 #line 1210 "configure"
1210 #include "confdefs.h"
1211 #include <sys/types.h>
1217 if { (eval echo configure:1218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1219 eval "ac_cv_header_dirent_$ac_safe=yes"
1221 echo "configure: failed program was:" >&5
1222 cat conftest.$ac_ext >&5
1224 eval "ac_cv_header_dirent_$ac_safe=no"
1228 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1229 echo "$ac_t""yes" 1>&6
1230 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1231 cat >> confdefs.h <<EOF
1232 #define $ac_tr_hdr 1
1234 ac_header_dirent=$ac_hdr; break
1236 echo "$ac_t""no" 1>&6
1239 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1240 if test $ac_header_dirent = dirent.h; then
1241 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1242 echo "configure:1243: checking for opendir in -ldir" >&5
1243 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1244 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1245 echo $ac_n "(cached) $ac_c" 1>&6
1247 ac_save_LIBS="$LIBS"
1249 cat > conftest.$ac_ext <<EOF
1250 #line 1251 "configure"
1251 #include "confdefs.h"
1252 /* Override any gcc2 internal prototype to avoid an error. */
1253 /* We use char because int might match the return type of a gcc2
1254 builtin and then its argument prototype would still apply. */
1261 if { (eval echo configure:1262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1263 eval "ac_cv_lib_$ac_lib_var=yes"
1265 echo "configure: failed program was:" >&5
1266 cat conftest.$ac_ext >&5
1268 eval "ac_cv_lib_$ac_lib_var=no"
1271 LIBS="$ac_save_LIBS"
1274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1275 echo "$ac_t""yes" 1>&6
1278 echo "$ac_t""no" 1>&6
1282 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1283 echo "configure:1284: checking for opendir in -lx" >&5
1284 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1285 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1286 echo $ac_n "(cached) $ac_c" 1>&6
1288 ac_save_LIBS="$LIBS"
1290 cat > conftest.$ac_ext <<EOF
1291 #line 1292 "configure"
1292 #include "confdefs.h"
1293 /* Override any gcc2 internal prototype to avoid an error. */
1294 /* We use char because int might match the return type of a gcc2
1295 builtin and then its argument prototype would still apply. */
1302 if { (eval echo configure:1303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1304 eval "ac_cv_lib_$ac_lib_var=yes"
1306 echo "configure: failed program was:" >&5
1307 cat conftest.$ac_ext >&5
1309 eval "ac_cv_lib_$ac_lib_var=no"
1312 LIBS="$ac_save_LIBS"
1315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1316 echo "$ac_t""yes" 1>&6
1319 echo "$ac_t""no" 1>&6
1325 for ac_func in strcasecmp select setenv putenv tcgetattr setlocale lstat
1327 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1328 echo "configure:1329: checking for $ac_func" >&5
1329 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1330 echo $ac_n "(cached) $ac_c" 1>&6
1332 cat > conftest.$ac_ext <<EOF
1333 #line 1334 "configure"
1334 #include "confdefs.h"
1335 /* System header to define __stub macros and hopefully few prototypes,
1336 which can conflict with char $ac_func(); below. */
1338 /* Override any gcc2 internal prototype to avoid an error. */
1339 /* We use char because int might match the return type of a gcc2
1340 builtin and then its argument prototype would still apply. */
1345 /* The GNU C library defines this for functions which it implements
1346 to always fail with ENOSYS. Some functions are actually named
1347 something starting with __ and the normal name is an alias. */
1348 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1356 if { (eval echo configure:1357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1358 eval "ac_cv_func_$ac_func=yes"
1360 echo "configure: failed program was:" >&5
1361 cat conftest.$ac_ext >&5
1363 eval "ac_cv_func_$ac_func=no"
1368 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1369 echo "$ac_t""yes" 1>&6
1370 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1371 cat >> confdefs.h <<EOF
1372 #define $ac_tr_func 1
1376 echo "$ac_t""no" 1>&6
1381 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
1382 echo "configure:1383: checking for working strcoll" >&5
1383 if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
1384 echo $ac_n "(cached) $ac_c" 1>&6
1386 if test "$cross_compiling" = yes; then
1387 ac_cv_func_strcoll_works=no
1389 cat > conftest.$ac_ext <<EOF
1390 #line 1391 "configure"
1391 #include "confdefs.h"
1395 exit (strcoll ("abc", "def") >= 0 ||
1396 strcoll ("ABC", "DEF") >= 0 ||
1397 strcoll ("123", "456") >= 0);
1400 if { (eval echo configure:1401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1402 ac_cv_func_strcoll_works=yes
1404 echo "configure: failed program was:" >&5
1405 cat conftest.$ac_ext >&5
1407 ac_cv_func_strcoll_works=no
1414 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
1415 if test $ac_cv_func_strcoll_works = yes; then
1416 cat >> confdefs.h <<\EOF
1417 #define HAVE_STRCOLL 1
1423 for ac_hdr in unistd.h stdlib.h varargs.h stdarg.h string.h \
1424 sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
1425 termcap.h termios.h termio.h sys/file.h locale.h
1427 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1428 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1429 echo "configure:1430: checking for $ac_hdr" >&5
1430 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1431 echo $ac_n "(cached) $ac_c" 1>&6
1433 cat > conftest.$ac_ext <<EOF
1434 #line 1435 "configure"
1435 #include "confdefs.h"
1438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1439 { (eval echo configure:1440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1440 ac_err=`grep -v '^ *+' conftest.out`
1441 if test -z "$ac_err"; then
1443 eval "ac_cv_header_$ac_safe=yes"
1446 echo "configure: failed program was:" >&5
1447 cat conftest.$ac_ext >&5
1449 eval "ac_cv_header_$ac_safe=no"
1453 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1454 echo "$ac_t""yes" 1>&6
1455 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1456 cat >> confdefs.h <<EOF
1457 #define $ac_tr_hdr 1
1461 echo "$ac_t""no" 1>&6
1467 echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
1468 echo "configure:1469: checking for type of signal functions" >&5
1469 if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
1470 echo $ac_n "(cached) $ac_c" 1>&6
1473 cat > conftest.$ac_ext <<EOF
1474 #line 1475 "configure"
1475 #include "confdefs.h"
1480 struct sigaction sa;
1481 sigemptyset(&ss); sigsuspend(&ss);
1482 sigaction(SIGINT, &sa, (struct sigaction *) 0);
1483 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
1487 if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1489 bash_cv_signal_vintage=posix
1491 echo "configure: failed program was:" >&5
1492 cat conftest.$ac_ext >&5
1495 cat > conftest.$ac_ext <<EOF
1496 #line 1497 "configure"
1497 #include "confdefs.h"
1501 int mask = sigmask(SIGINT);
1502 sigsetmask(mask); sigblock(mask); sigpause(mask);
1506 if { (eval echo configure:1507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1508 bash_cv_signal_vintage=4.2bsd
1510 echo "configure: failed program was:" >&5
1511 cat conftest.$ac_ext >&5
1514 cat > conftest.$ac_ext <<EOF
1515 #line 1516 "configure"
1516 #include "confdefs.h"
1519 RETSIGTYPE foo() { }
1522 int mask = sigmask(SIGINT);
1523 sigset(SIGINT, foo); sigrelse(SIGINT);
1524 sighold(SIGINT); sigpause(SIGINT);
1528 if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1530 bash_cv_signal_vintage=svr3
1532 echo "configure: failed program was:" >&5
1533 cat conftest.$ac_ext >&5
1535 bash_cv_signal_vintage=v7
1548 echo "$ac_t""$bash_cv_signal_vintage" 1>&6
1549 if test "$bash_cv_signal_vintage" = posix; then
1550 cat >> confdefs.h <<\EOF
1551 #define HAVE_POSIX_SIGNALS 1
1554 elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
1555 cat >> confdefs.h <<\EOF
1556 #define HAVE_BSD_SIGNALS 1
1559 elif test "$bash_cv_signal_vintage" = svr3; then
1560 cat >> confdefs.h <<\EOF
1561 #define HAVE_USG_SIGHOLD 1
1568 echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6
1569 echo "configure:1570: checking if signal handlers must be reinstalled when invoked" >&5
1570 if eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then
1571 echo $ac_n "(cached) $ac_c" 1>&6
1573 if test "$cross_compiling" = yes; then
1574 { echo "configure: error: cannot check signal handling if cross compiling -- defaulting to no" 1>&2; exit 1; }
1575 bash_cv_must_reinstall_sighandlers=no
1578 cat > conftest.$ac_ext <<EOF
1579 #line 1580 "configure"
1580 #include "confdefs.h"
1583 #ifdef HAVE_UNISTD_H
1587 typedef RETSIGTYPE sigfunc();
1591 #ifdef HAVE_POSIX_SIGNALS
1593 set_signal_handler(sig, handler)
1597 struct sigaction act, oact;
1598 act.sa_handler = handler;
1600 sigemptyset (&act.sa_mask);
1601 sigemptyset (&oact.sa_mask);
1602 sigaction (sig, &act, &oact);
1603 return (oact.sa_handler);
1606 #define set_signal_handler(s, h) signal(s, h)
1619 set_signal_handler(SIGINT, sigint);
1620 kill((int)getpid(), SIGINT);
1621 kill((int)getpid(), SIGINT);
1626 if { (eval echo configure:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1628 bash_cv_must_reinstall_sighandlers=no
1630 echo "configure: failed program was:" >&5
1631 cat conftest.$ac_ext >&5
1633 bash_cv_must_reinstall_sighandlers=yes
1640 echo "$ac_t""$bash_cv_must_reinstall_sighandlers" 1>&6
1641 if test $bash_cv_must_reinstall_sighandlers = yes; then
1642 cat >> confdefs.h <<\EOF
1643 #define MUST_REINSTALL_SIGHANDLERS 1
1650 echo $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6
1651 echo "configure:1652: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
1652 if eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then
1653 echo $ac_n "(cached) $ac_c" 1>&6
1655 if test "$cross_compiling" = yes; then
1656 { echo "configure: error: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" 1>&2; exit 1; }
1657 bash_cv_func_sigsetjmp=missing
1660 cat > conftest.$ac_ext <<EOF
1661 #line 1662 "configure"
1662 #include "confdefs.h"
1664 #ifdef HAVE_UNISTD_H
1667 #include <sys/types.h>
1673 #if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
1684 sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
1685 sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
1688 code = sigsetjmp(xx, 1);
1690 exit(0); /* could get sigmask and compare to oset here. */
1693 sigaddset(&set, SIGINT);
1694 sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
1696 /* and siglongjmp */
1702 if { (eval echo configure:1703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1704 bash_cv_func_sigsetjmp=present
1706 echo "configure: failed program was:" >&5
1707 cat conftest.$ac_ext >&5
1709 bash_cv_func_sigsetjmp=missing
1716 echo "$ac_t""$bash_cv_func_sigsetjmp" 1>&6
1717 if test $bash_cv_func_sigsetjmp = present; then
1718 cat >> confdefs.h <<\EOF
1719 #define HAVE_POSIX_SIGSETJMP 1
1724 echo $ac_n "checking for lstat""... $ac_c" 1>&6
1725 echo "configure:1726: checking for lstat" >&5
1726 if eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then
1727 echo $ac_n "(cached) $ac_c" 1>&6
1729 cat > conftest.$ac_ext <<EOF
1730 #line 1731 "configure"
1731 #include "confdefs.h"
1733 #include <sys/types.h>
1734 #include <sys/stat.h>
1737 lstat(".",(struct stat *)0);
1740 if { (eval echo configure:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1742 bash_cv_func_lstat=yes
1744 echo "configure: failed program was:" >&5
1745 cat conftest.$ac_ext >&5
1747 bash_cv_func_lstat=no
1752 echo "$ac_t""$bash_cv_func_lstat" 1>&6
1753 if test $bash_cv_func_lstat = yes; then
1754 cat >> confdefs.h <<\EOF
1755 #define HAVE_LSTAT 1
1760 echo $ac_n "checking whether programs are able to redeclare getpw functions""... $ac_c" 1>&6
1761 echo "configure:1762: checking whether programs are able to redeclare getpw functions" >&5
1762 if eval "test \"`echo '$''{'bash_cv_can_redecl_getpw'+set}'`\" = set"; then
1763 echo $ac_n "(cached) $ac_c" 1>&6
1765 cat > conftest.$ac_ext <<EOF
1766 #line 1767 "configure"
1767 #include "confdefs.h"
1768 #include <sys/types.h>
1770 extern struct passwd *getpwent();
1771 extern struct passwd *getpwuid();
1772 extern struct passwd *getpwnam();
1774 struct passwd *z; z = getpwent(); z = getpwuid(0); z = getpwnam("root");
1777 if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1779 bash_cv_can_redecl_getpw=yes
1781 echo "configure: failed program was:" >&5
1782 cat conftest.$ac_ext >&5
1784 bash_cv_can_redecl_getpw=no
1789 echo "$ac_t""$bash_cv_can_redecl_getpw" 1>&6
1790 if test $bash_cv_can_redecl_getpw = no; then
1791 cat >> confdefs.h <<\EOF
1792 #define HAVE_GETPW_DECLS 1
1798 echo $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6
1799 echo "configure:1800: checking whether or not strcoll and strcmp differ" >&5
1800 if eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then
1801 echo $ac_n "(cached) $ac_c" 1>&6
1803 if test "$cross_compiling" = yes; then
1804 { echo "configure: error: cannot check strcoll if cross compiling -- defaulting to no" 1>&2; exit 1; }
1805 bash_cv_func_strcoll_broken=no
1808 cat > conftest.$ac_ext <<EOF
1809 #line 1810 "configure"
1810 #include "confdefs.h"
1813 #if defined (HAVE_LOCALE_H)
1822 char *deflocale, *defcoll;
1824 #ifdef HAVE_SETLOCALE
1825 deflocale = setlocale(LC_ALL, "");
1826 defcoll = setlocale(LC_COLLATE, "");
1830 /* These two values are taken from tests/glob-test. */
1831 r1 = strcoll("abd", "aXd");
1835 r2 = strcmp("abd", "aXd");
1837 /* These two should both be greater than 0. It is permissible for
1838 a system to return different values, as long as the sign is the
1841 /* Exit with 1 (failure) if these two values are both > 0, since
1842 this tests whether strcoll(3) is broken with respect to strcmp(3)
1843 in the default locale. */
1844 exit (r1 > 0 && r2 > 0);
1848 if { (eval echo configure:1849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1850 bash_cv_func_strcoll_broken=yes
1852 echo "configure: failed program was:" >&5
1853 cat conftest.$ac_ext >&5
1855 bash_cv_func_strcoll_broken=no
1862 echo "$ac_t""$bash_cv_func_strcoll_broken" 1>&6
1863 if test $bash_cv_func_strcoll_broken = yes; then
1864 cat >> confdefs.h <<\EOF
1865 #define STRCOLL_BROKEN 1
1871 echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6
1872 echo "configure:1873: checking whether signal handlers are of type void" >&5
1873 if eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then
1874 echo $ac_n "(cached) $ac_c" 1>&6
1876 cat > conftest.$ac_ext <<EOF
1877 #line 1878 "configure"
1878 #include "confdefs.h"
1879 #include <sys/types.h>
1887 void (*signal ()) ();
1892 if { (eval echo configure:1893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1894 bash_cv_void_sighandler=yes
1896 echo "configure: failed program was:" >&5
1897 cat conftest.$ac_ext >&5
1899 bash_cv_void_sighandler=no
1903 echo "$ac_t""$bash_cv_void_sighandler" 1>&6
1904 if test $bash_cv_void_sighandler = yes; then
1905 cat >> confdefs.h <<\EOF
1906 #define VOID_SIGHANDLER 1
1911 echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
1912 echo "configure:1913: checking for TIOCGWINSZ in sys/ioctl.h" >&5
1913 if eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then
1914 echo $ac_n "(cached) $ac_c" 1>&6
1916 cat > conftest.$ac_ext <<EOF
1917 #line 1918 "configure"
1918 #include "confdefs.h"
1919 #include <sys/types.h>
1920 #include <sys/ioctl.h>
1925 if { (eval echo configure:1926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1927 bash_cv_tiocgwinsz_in_ioctl=yes
1929 echo "configure: failed program was:" >&5
1930 cat conftest.$ac_ext >&5
1932 bash_cv_tiocgwinsz_in_ioctl=no
1937 echo "$ac_t""$bash_cv_tiocgwinsz_in_ioctl" 1>&6
1938 if test $bash_cv_tiocgwinsz_in_ioctl = yes; then
1939 cat >> confdefs.h <<\EOF
1940 #define GWINSZ_IN_SYS_IOCTL 1
1945 echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6
1946 echo "configure:1947: checking for TIOCSTAT in sys/ioctl.h" >&5
1947 if eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then
1948 echo $ac_n "(cached) $ac_c" 1>&6
1950 cat > conftest.$ac_ext <<EOF
1951 #line 1952 "configure"
1952 #include "confdefs.h"
1953 #include <sys/types.h>
1954 #include <sys/ioctl.h>
1959 if { (eval echo configure:1960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1961 bash_cv_tiocstat_in_ioctl=yes
1963 echo "configure: failed program was:" >&5
1964 cat conftest.$ac_ext >&5
1966 bash_cv_tiocstat_in_ioctl=no
1971 echo "$ac_t""$bash_cv_tiocstat_in_ioctl" 1>&6
1972 if test $bash_cv_tiocstat_in_ioctl = yes; then
1973 cat >> confdefs.h <<\EOF
1974 #define TIOCSTAT_IN_SYS_IOCTL 1
1979 echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6
1980 echo "configure:1981: checking for FIONREAD in sys/ioctl.h" >&5
1981 if eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then
1982 echo $ac_n "(cached) $ac_c" 1>&6
1984 cat > conftest.$ac_ext <<EOF
1985 #line 1986 "configure"
1986 #include "confdefs.h"
1987 #include <sys/types.h>
1988 #include <sys/ioctl.h>
1993 if { (eval echo configure:1994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1995 bash_cv_fionread_in_ioctl=yes
1997 echo "configure: failed program was:" >&5
1998 cat conftest.$ac_ext >&5
2000 bash_cv_fionread_in_ioctl=no
2005 echo "$ac_t""$bash_cv_fionread_in_ioctl" 1>&6
2006 if test $bash_cv_fionread_in_ioctl = yes; then
2007 cat >> confdefs.h <<\EOF
2008 #define FIONREAD_IN_SYS_IOCTL 1
2013 echo $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6
2014 echo "configure:2015: checking for speed_t in sys/types.h" >&5
2015 if eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then
2016 echo $ac_n "(cached) $ac_c" 1>&6
2018 cat > conftest.$ac_ext <<EOF
2019 #line 2020 "configure"
2020 #include "confdefs.h"
2021 #include <sys/types.h>
2026 if { (eval echo configure:2027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2028 bash_cv_speed_t_in_sys_types=yes
2030 echo "configure: failed program was:" >&5
2031 cat conftest.$ac_ext >&5
2033 bash_cv_speed_t_in_sys_types=no
2038 echo "$ac_t""$bash_cv_speed_t_in_sys_types" 1>&6
2039 if test $bash_cv_speed_t_in_sys_types = yes; then
2040 cat >> confdefs.h <<\EOF
2041 #define SPEED_T_IN_SYS_TYPES 1
2046 echo $ac_n "checking for struct winsize in sys/ioctl.h and termios.h""... $ac_c" 1>&6
2047 echo "configure:2048: checking for struct winsize in sys/ioctl.h and termios.h" >&5
2048 if eval "test \"`echo '$''{'bash_cv_struct_winsize_header'+set}'`\" = set"; then
2049 echo $ac_n "(cached) $ac_c" 1>&6
2051 cat > conftest.$ac_ext <<EOF
2052 #line 2053 "configure"
2053 #include "confdefs.h"
2054 #include <sys/types.h>
2055 #include <sys/ioctl.h>
2060 if { (eval echo configure:2061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2062 bash_cv_struct_winsize_header=ioctl_h
2064 echo "configure: failed program was:" >&5
2065 cat conftest.$ac_ext >&5
2067 cat > conftest.$ac_ext <<EOF
2068 #line 2069 "configure"
2069 #include "confdefs.h"
2070 #include <sys/types.h>
2071 #include <termios.h>
2076 if { (eval echo configure:2077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2078 bash_cv_struct_winsize_header=termios_h
2080 echo "configure: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2083 bash_cv_struct_winsize_header=other
2091 if test $bash_cv_struct_winsize_header = ioctl_h; then
2092 echo "$ac_t""sys/ioctl.h" 1>&6
2093 cat >> confdefs.h <<\EOF
2094 #define STRUCT_WINSIZE_IN_SYS_IOCTL 1
2097 elif test $bash_cv_struct_winsize_header = termios_h; then
2098 echo "$ac_t""termios.h" 1>&6
2099 cat >> confdefs.h <<\EOF
2100 #define STRUCT_WINSIZE_IN_TERMIOS 1
2104 echo "$ac_t""not found" 1>&6
2108 echo $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6
2109 echo "configure:2110: checking if struct dirent has a d_ino member" >&5
2110 if eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then
2111 echo $ac_n "(cached) $ac_c" 1>&6
2113 cat > conftest.$ac_ext <<EOF
2114 #line 2115 "configure"
2115 #include "confdefs.h"
2118 #include <sys/types.h>
2119 #ifdef HAVE_UNISTD_H
2120 # include <unistd.h>
2121 #endif /* HAVE_UNISTD_H */
2122 #if defined(HAVE_DIRENT_H)
2123 # include <dirent.h>
2125 # define dirent direct
2126 # ifdef HAVE_SYS_NDIR_H
2127 # include <sys/ndir.h>
2128 # endif /* SYSNDIR */
2129 # ifdef HAVE_SYS_DIR_H
2130 # include <sys/dir.h>
2131 # endif /* SYSDIR */
2135 #endif /* HAVE_DIRENT_H */
2139 struct dirent d; int z; z = d.d_ino;
2143 if { (eval echo configure:2144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2145 bash_cv_dirent_has_dino=yes
2147 echo "configure: failed program was:" >&5
2148 cat conftest.$ac_ext >&5
2150 bash_cv_dirent_has_dino=no
2155 echo "$ac_t""$bash_cv_dirent_has_dino" 1>&6
2156 if test $bash_cv_dirent_has_dino = yes; then
2157 cat >> confdefs.h <<\EOF
2158 #define STRUCT_DIRENT_HAS_D_INO 1
2164 echo $ac_n "checking if struct dirent has a d_fileno member""... $ac_c" 1>&6
2165 echo "configure:2166: checking if struct dirent has a d_fileno member" >&5
2166 if eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then
2167 echo $ac_n "(cached) $ac_c" 1>&6
2169 cat > conftest.$ac_ext <<EOF
2170 #line 2171 "configure"
2171 #include "confdefs.h"
2174 #include <sys/types.h>
2175 #ifdef HAVE_UNISTD_H
2176 # include <unistd.h>
2177 #endif /* HAVE_UNISTD_H */
2178 #if defined(HAVE_DIRENT_H)
2179 # include <dirent.h>
2181 # define dirent direct
2182 # ifdef HAVE_SYS_NDIR_H
2183 # include <sys/ndir.h>
2184 # endif /* SYSNDIR */
2185 # ifdef HAVE_SYS_DIR_H
2186 # include <sys/dir.h>
2187 # endif /* SYSDIR */
2191 #endif /* HAVE_DIRENT_H */
2195 struct dirent d; int z; z = d.d_fileno;
2199 if { (eval echo configure:2200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2201 bash_cv_dirent_has_d_fileno=yes
2203 echo "configure: failed program was:" >&5
2204 cat conftest.$ac_ext >&5
2206 bash_cv_dirent_has_d_fileno=no
2211 echo "$ac_t""$bash_cv_dirent_has_d_fileno" 1>&6
2212 if test $bash_cv_dirent_has_d_fileno = yes; then
2213 cat >> confdefs.h <<\EOF
2214 #define STRUCT_DIRENT_HAS_D_FILENO 1
2221 aix*) prefer_curses=yes ;;
2224 if test "X$bash_cv_termcap_lib" = "X"; then
2227 echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
2228 echo "configure:2229: checking which library has the termcap functions" >&5
2231 if eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then
2232 echo $ac_n "(cached) $ac_c" 1>&6
2234 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
2235 echo "configure:2236: checking for tgetent in -ltermcap" >&5
2236 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
2237 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2238 echo $ac_n "(cached) $ac_c" 1>&6
2240 ac_save_LIBS="$LIBS"
2241 LIBS="-ltermcap $LIBS"
2242 cat > conftest.$ac_ext <<EOF
2243 #line 2244 "configure"
2244 #include "confdefs.h"
2245 /* Override any gcc2 internal prototype to avoid an error. */
2246 /* We use char because int might match the return type of a gcc2
2247 builtin and then its argument prototype would still apply. */
2254 if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2256 eval "ac_cv_lib_$ac_lib_var=yes"
2258 echo "configure: failed program was:" >&5
2259 cat conftest.$ac_ext >&5
2261 eval "ac_cv_lib_$ac_lib_var=no"
2264 LIBS="$ac_save_LIBS"
2267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2268 echo "$ac_t""yes" 1>&6
2269 bash_cv_termcap_lib=libtermcap
2271 echo "$ac_t""no" 1>&6
2272 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
2273 echo "configure:2274: checking for tgetent in -lcurses" >&5
2274 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
2275 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2276 echo $ac_n "(cached) $ac_c" 1>&6
2278 ac_save_LIBS="$LIBS"
2279 LIBS="-lcurses $LIBS"
2280 cat > conftest.$ac_ext <<EOF
2281 #line 2282 "configure"
2282 #include "confdefs.h"
2283 /* Override any gcc2 internal prototype to avoid an error. */
2284 /* We use char because int might match the return type of a gcc2
2285 builtin and then its argument prototype would still apply. */
2292 if { (eval echo configure:2293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2294 eval "ac_cv_lib_$ac_lib_var=yes"
2296 echo "configure: failed program was:" >&5
2297 cat conftest.$ac_ext >&5
2299 eval "ac_cv_lib_$ac_lib_var=no"
2302 LIBS="$ac_save_LIBS"
2305 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2306 echo "$ac_t""yes" 1>&6
2307 bash_cv_termcap_lib=libcurses
2309 echo "$ac_t""no" 1>&6
2310 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
2311 echo "configure:2312: checking for tgetent in -lncurses" >&5
2312 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
2313 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2314 echo $ac_n "(cached) $ac_c" 1>&6
2316 ac_save_LIBS="$LIBS"
2317 LIBS="-lncurses $LIBS"
2318 cat > conftest.$ac_ext <<EOF
2319 #line 2320 "configure"
2320 #include "confdefs.h"
2321 /* Override any gcc2 internal prototype to avoid an error. */
2322 /* We use char because int might match the return type of a gcc2
2323 builtin and then its argument prototype would still apply. */
2330 if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2332 eval "ac_cv_lib_$ac_lib_var=yes"
2334 echo "configure: failed program was:" >&5
2335 cat conftest.$ac_ext >&5
2337 eval "ac_cv_lib_$ac_lib_var=no"
2340 LIBS="$ac_save_LIBS"
2343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2344 echo "$ac_t""yes" 1>&6
2345 bash_cv_termcap_lib=libncurses
2347 echo "$ac_t""no" 1>&6
2348 bash_cv_termcap_lib=gnutermcap
2357 if test "X$_bash_needmsg" = "Xyes"; then
2358 echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
2359 echo "configure:2360: checking which library has the termcap functions" >&5
2361 echo "$ac_t""using $bash_cv_termcap_lib" 1>&6
2362 if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
2363 LDFLAGS="$LDFLAGS -L./lib/termcap"
2364 TERMCAP_LIB="./lib/termcap/libtermcap.a"
2365 TERMCAP_DEP="./lib/termcap/libtermcap.a"
2366 elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
2367 TERMCAP_LIB=-ltermcap
2369 elif test $bash_cv_termcap_lib = libncurses; then
2370 TERMCAP_LIB=-lncurses
2373 TERMCAP_LIB=-lcurses
2377 if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
2378 TERMCAP_LIB=-ltermcap #default
2382 *cray*) LOCAL_CFLAGS=-DCRAY ;;
2386 isc*) LOCAL_CFLAGS=-Disc386 ;;
2405 cat > confcache <<\EOF
2406 # This file is a shell script that caches the results of configure
2407 # tests run on this system so they can be shared between configure
2408 # scripts and configure runs. It is not useful on other systems.
2409 # If it contains results you don't want to keep, you may remove or edit it.
2411 # By default, configure uses ./config.cache as the cache file,
2412 # creating it if it does not exist already. You can give configure
2413 # the --cache-file=FILE option to use a different cache file; that is
2414 # what configure does when it calls configure scripts in
2415 # subdirectories, so they share the cache.
2416 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2417 # config.status only pays attention to the cache file if you give it the
2418 # --recheck option to rerun configure.
2421 # The following way of writing the cache mishandles newlines in values,
2422 # but we know of no workaround that is simple, portable, and efficient.
2423 # So, don't put newlines in cache variables' values.
2424 # Ultrix sh set writes to stderr and can't be redirected directly,
2425 # and sets the high bit in the cache file unless we assign to the vars.
2427 case `(ac_space=' '; set) 2>&1` in
2429 # `set' does not quote correctly, so add quotes (double-quote substitution
2430 # turns \\\\ into \\, and sed turns \\ into \).
2432 -e "s/'/'\\\\''/g" \
2433 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2436 # `set' quotes correctly as required by POSIX, so do not add quotes.
2437 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2440 if cmp -s $cache_file confcache; then
2443 if test -w $cache_file; then
2444 echo "updating cache $cache_file"
2445 cat confcache > $cache_file
2447 echo "not updating unwritable cache $cache_file"
2452 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2454 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2455 # Let make expand exec_prefix.
2456 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2458 # Any assignment to VPATH causes Sun make to only execute
2459 # the first set of double-colon rules, so remove it if not needed.
2460 # If there is a colon in the path, we need to keep it.
2461 if test "x$srcdir" = x.; then
2462 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2465 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2467 DEFS=-DHAVE_CONFIG_H
2469 # Without the "./", some shells look in PATH for config.status.
2470 : ${CONFIG_STATUS=./config.status}
2472 echo creating $CONFIG_STATUS
2473 rm -f $CONFIG_STATUS
2474 cat > $CONFIG_STATUS <<EOF
2476 # Generated automatically by configure.
2477 # Run this file to recreate the current configuration.
2478 # This directory was configured as follows,
2479 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2481 # $0 $ac_configure_args
2483 # Compiler output produced by configure, useful for debugging
2484 # configure, is in ./config.log if it exists.
2486 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2489 case "\$ac_option" in
2490 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2491 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2492 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2493 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2494 echo "$CONFIG_STATUS generated by autoconf version 2.12"
2496 -help | --help | --hel | --he | --h)
2497 echo "\$ac_cs_usage"; exit 0 ;;
2498 *) echo "\$ac_cs_usage"; exit 1 ;;
2502 ac_given_srcdir=$srcdir
2503 ac_given_INSTALL="$INSTALL"
2505 trap 'rm -fr `echo "Makefile doc/Makefile examples/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2507 cat >> $CONFIG_STATUS <<EOF
2509 # Protect against being on the right side of a sed subst in config.status.
2510 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2511 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2514 s%@CFLAGS@%$CFLAGS%g
2515 s%@CPPFLAGS@%$CPPFLAGS%g
2516 s%@CXXFLAGS@%$CXXFLAGS%g
2518 s%@LDFLAGS@%$LDFLAGS%g
2520 s%@exec_prefix@%$exec_prefix%g
2521 s%@prefix@%$prefix%g
2522 s%@program_transform_name@%$program_transform_name%g
2523 s%@bindir@%$bindir%g
2524 s%@sbindir@%$sbindir%g
2525 s%@libexecdir@%$libexecdir%g
2526 s%@datadir@%$datadir%g
2527 s%@sysconfdir@%$sysconfdir%g
2528 s%@sharedstatedir@%$sharedstatedir%g
2529 s%@localstatedir@%$localstatedir%g
2530 s%@libdir@%$libdir%g
2531 s%@includedir@%$includedir%g
2532 s%@oldincludedir@%$oldincludedir%g
2533 s%@infodir@%$infodir%g
2534 s%@mandir@%$mandir%g
2536 s%@host_alias@%$host_alias%g
2537 s%@host_cpu@%$host_cpu%g
2538 s%@host_vendor@%$host_vendor%g
2539 s%@host_os@%$host_os%g
2542 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2543 s%@INSTALL_DATA@%$INSTALL_DATA%g
2544 s%@RANLIB@%$RANLIB%g
2545 s%@BUILD_DIR@%$BUILD_DIR%g
2546 s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
2547 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
2548 s%@LOCAL_DEFS@%$LOCAL_DEFS%g
2549 s%@LIBVERSION@%$LIBVERSION%g
2550 s%@TERMCAP_LIB@%$TERMCAP_LIB%g
2555 cat >> $CONFIG_STATUS <<\EOF
2557 # Split the substitutions into bite-sized pieces for seds with
2558 # small command number limits, like on Digital OSF/1 and HP-UX.
2559 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2560 ac_file=1 # Number of current file.
2561 ac_beg=1 # First line for current file.
2562 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2565 while $ac_more_lines; do
2566 if test $ac_beg -gt 1; then
2567 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2569 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2571 if test ! -s conftest.s$ac_file; then
2573 rm -f conftest.s$ac_file
2575 if test -z "$ac_sed_cmds"; then
2576 ac_sed_cmds="sed -f conftest.s$ac_file"
2578 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2580 ac_file=`expr $ac_file + 1`
2582 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2585 if test -z "$ac_sed_cmds"; then
2590 cat >> $CONFIG_STATUS <<EOF
2592 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile examples/Makefile"}
2594 cat >> $CONFIG_STATUS <<\EOF
2595 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2596 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2598 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2599 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2600 *) ac_file_in="${ac_file}.in" ;;
2603 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2605 # Remove last slash and all that follows it. Not all systems have dirname.
2606 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2607 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2608 # The file is in a subdirectory.
2609 test ! -d "$ac_dir" && mkdir "$ac_dir"
2610 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2611 # A "../" for each directory in $ac_dir_suffix.
2612 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2614 ac_dir_suffix= ac_dots=
2617 case "$ac_given_srcdir" in
2619 if test -z "$ac_dots"; then top_srcdir=.
2620 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2621 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2623 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2624 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2627 case "$ac_given_INSTALL" in
2628 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2629 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2632 echo creating "$ac_file"
2634 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2636 *Makefile*) ac_comsub="1i\\
2637 # $configure_input" ;;
2641 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2643 s%@configure_input@%$configure_input%g
2644 s%@srcdir@%$srcdir%g
2645 s%@top_srcdir@%$top_srcdir%g
2646 s%@INSTALL@%$INSTALL%g
2647 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2651 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2652 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2654 # ac_d sets the value in "#define NAME VALUE" lines.
2655 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2656 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2659 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2660 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2661 ac_uB='\([ ]\)%\1#\2define\3'
2664 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2665 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2666 ac_eB='$%\1#\2define\3'
2670 if test "${CONFIG_HEADERS+set}" != set; then
2672 cat >> $CONFIG_STATUS <<EOF
2673 CONFIG_HEADERS="config.h"
2675 cat >> $CONFIG_STATUS <<\EOF
2677 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2678 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2680 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2681 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2682 *) ac_file_in="${ac_file}.in" ;;
2685 echo creating $ac_file
2687 rm -f conftest.frag conftest.in conftest.out
2688 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2689 cat $ac_file_inputs > conftest.in
2693 # Transform confdefs.h into a sed script conftest.vals that substitutes
2694 # the proper values into config.h.in to produce config.h. And first:
2695 # Protect against being on the right side of a sed subst in config.status.
2696 # Protect against being in an unquoted here document in config.status.
2698 cat > conftest.hdr <<\EOF
2701 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2705 sed -n -f conftest.hdr confdefs.h > conftest.vals
2708 # This sed command replaces #undef with comments. This is necessary, for
2709 # example, in the case of _POSIX_SOURCE, which is predefined and required
2710 # on some systems where configure will not decide to define it.
2711 cat >> conftest.vals <<\EOF
2712 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2715 # Break up conftest.vals because some shells have a limit on
2716 # the size of here documents, and old seds have small limits too.
2721 ac_lines=`grep -c . conftest.vals`
2722 # grep -c gives empty output for an empty file on some AIX systems.
2723 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2724 # Write a limited-size here document to conftest.frag.
2725 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2726 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2728 sed -f conftest.frag conftest.in > conftest.out
2730 mv conftest.out conftest.in
2732 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2734 mv conftest.tail conftest.vals
2738 cat >> $CONFIG_STATUS <<\EOF
2739 rm -f conftest.frag conftest.h
2740 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2741 cat conftest.in >> conftest.h
2743 if cmp -s $ac_file conftest.h 2>/dev/null; then
2744 echo "$ac_file is unchanged"
2747 # Remove last slash and all that follows it. Not all systems have dirname.
2748 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2749 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2750 # The file is in a subdirectory.
2751 test ! -d "$ac_dir" && mkdir "$ac_dir"
2754 mv conftest.h $ac_file
2759 cat >> $CONFIG_STATUS <<EOF
2762 cat >> $CONFIG_STATUS <<\EOF
2764 # Makefile uses this timestamp file to record whether config.h is up to date.
2769 chmod +x $CONFIG_STATUS
2770 rm -fr confdefs* $ac_clean_files
2771 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1