diff options
Diffstat (limited to 'contrib/libreadline/configure')
-rwxr-xr-x | contrib/libreadline/configure | 512 |
1 files changed, 413 insertions, 99 deletions
diff --git a/contrib/libreadline/configure b/contrib/libreadline/configure index 4b7479d..b9bb2b9 100755 --- a/contrib/libreadline/configure +++ b/contrib/libreadline/configure @@ -1,7 +1,19 @@ #! /bin/sh -# From configure.in for Readline 2.1, version 2.04, from autoconf version 2.12 -LIBVERSION=2.1 +# From configure.in for Readline 2.2, version 2.07, from autoconf version 2.12 +LIBVERSION=2.2 + + + + + + + + + + + + @@ -87,6 +99,8 @@ LIBVERSION=2.1 ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: +ac_help="$ac_help +--with-curses use the curses library instead of the termcap library" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -625,7 +639,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:629: checking host system type" >&5 +echo "configure:643: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -646,13 +660,27 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 +opt_curses=no +opt_shared=no + +# Check whether --with-curses or --without-curses was given. +if test "${with_curses+set}" = set; then + withval="$with_curses" + opt_curses=$withval +fi + + +if test "$opt_curses" = "yes"; then + prefer_curses=yes +fi + # We want these before the checks, so the checks can modify their values. test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:656: checking for $ac_word" >&5 +echo "configure:684: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -681,7 +709,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:685: checking for $ac_word" >&5 +echo "configure:713: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -729,7 +757,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:733: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -739,11 +767,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 743 "configure" +#line 771 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -763,12 +791,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:767: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:795: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:772: checking whether we are using GNU C" >&5 +echo "configure:800: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -777,7 +805,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +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 ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -792,7 +820,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:796: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:824: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -819,12 +847,8 @@ else test "${CFLAGS+set}" = set || CFLAGS="-g" fi - -# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS. -test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O" - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:828: checking how to run the C preprocessor" >&5 +echo "configure:852: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -839,13 +863,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 843 "configure" +#line 867 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -856,13 +880,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 860 "configure" +#line 884 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -884,15 +908,68 @@ else fi echo "$ac_t""$CPP" 1>&6 +ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 +echo "configure:914: checking for minix/config.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 919 "configure" +#include "confdefs.h" +#include <minix/config.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + MINIX=yes +else + echo "$ac_t""no" 1>&6 +MINIX= +fi + +if test "$MINIX" = yes; then + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _POSIX_1_SOURCE 2 +EOF + + cat >> confdefs.h <<\EOF +#define _MINIX 1 +EOF + +fi + + +# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS. +test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O" + if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:890: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:967: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext <<EOF -#line 896 "configure" +#line 973 "configure" #include "confdefs.h" #include <sgtty.h> Autoconf TIOCGETP @@ -910,7 +987,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext <<EOF -#line 914 "configure" +#line 991 "configure" #include "confdefs.h" #include <termio.h> Autoconf TCGETA @@ -942,7 +1019,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:946: checking for a BSD compatible install" >&5 +echo "configure:1023: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -994,7 +1071,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:998: checking for $ac_word" >&5 +echo "configure:1075: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1022,12 +1099,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1026: checking return type of signal handlers" >&5 +echo "configure:1103: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1031 "configure" +#line 1108 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -1044,7 +1121,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1064,12 +1141,12 @@ EOF echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:1068: checking whether stat file-mode macros are broken" >&5 +echo "configure:1145: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1073 "configure" +#line 1150 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/stat.h> @@ -1124,12 +1201,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1128: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1205: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1133 "configure" +#line 1210 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -1137,7 +1214,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1162,7 +1239,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1166: checking for opendir in -ldir" >&5 +echo "configure:1243: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1170,7 +1247,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 1174 "configure" +#line 1251 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1181,7 +1258,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:1185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1203,7 +1280,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1207: checking for opendir in -lx" >&5 +echo "configure:1284: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1211,7 +1288,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 1215 "configure" +#line 1292 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1222,7 +1299,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:1226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1248,12 +1325,12 @@ fi for ac_func in strcasecmp select setenv putenv tcgetattr setlocale lstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1252: checking for $ac_func" >&5 +echo "configure:1329: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1257 "configure" +#line 1334 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1276,7 +1353,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1302,7 +1379,7 @@ done echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:1306: checking for working strcoll" >&5 +echo "configure:1383: checking for working strcoll" >&5 if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1310,7 +1387,7 @@ else ac_cv_func_strcoll_works=no else cat > conftest.$ac_ext <<EOF -#line 1314 "configure" +#line 1391 "configure" #include "confdefs.h" #include <string.h> main () @@ -1320,7 +1397,7 @@ main () strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:1324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_strcoll_works=yes else @@ -1349,17 +1426,17 @@ for ac_hdr in unistd.h stdlib.h varargs.h stdarg.h string.h \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1353: checking for $ac_hdr" >&5 +echo "configure:1430: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1358 "configure" +#line 1435 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1388,13 +1465,13 @@ done echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6 -echo "configure:1392: checking for type of signal functions" >&5 +echo "configure:1469: checking for type of signal functions" >&5 if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1398 "configure" +#line 1475 "configure" #include "confdefs.h" #include <signal.h> int main() { @@ -1407,7 +1484,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* bash_cv_signal_vintage=posix else @@ -1416,7 +1493,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 1420 "configure" +#line 1497 "configure" #include "confdefs.h" #include <signal.h> int main() { @@ -1426,7 +1503,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* bash_cv_signal_vintage=4.2bsd else @@ -1435,7 +1512,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 1439 "configure" +#line 1516 "configure" #include "confdefs.h" #include <signal.h> @@ -1448,7 +1525,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* bash_cv_signal_vintage=svr3 else @@ -1489,15 +1566,17 @@ fi echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6 -echo "configure:1493: checking if signal handlers must be reinstalled when invoked" >&5 +echo "configure:1570: checking if signal handlers must be reinstalled when invoked" >&5 if eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: cannot check signal handling if cross compiling" 1>&2; exit 1; } + { echo "configure: error: cannot check signal handling if cross compiling -- defaulting to no" 1>&2; exit 1; } + bash_cv_must_reinstall_sighandlers=no + else cat > conftest.$ac_ext <<EOF -#line 1501 "configure" +#line 1580 "configure" #include "confdefs.h" #include <signal.h> @@ -1544,7 +1623,7 @@ main() } EOF -if { (eval echo configure:1548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then bash_cv_must_reinstall_sighandlers=no else @@ -1569,15 +1648,17 @@ fi echo $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6 -echo "configure:1573: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 +echo "configure:1652: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 if eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: cannot check for sigsetjmp/siglongjmp if cross-compiling" 1>&2; exit 1; } + { echo "configure: error: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" 1>&2; exit 1; } + bash_cv_func_sigsetjmp=missing + else cat > conftest.$ac_ext <<EOF -#line 1581 "configure" +#line 1662 "configure" #include "confdefs.h" #ifdef HAVE_UNISTD_H @@ -1618,7 +1699,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then bash_cv_func_sigsetjmp=present else @@ -1630,7 +1711,6 @@ fi rm -fr conftest* fi - fi echo "$ac_t""$bash_cv_func_sigsetjmp" 1>&6 @@ -1642,22 +1722,22 @@ EOF fi echo $ac_n "checking for lstat""... $ac_c" 1>&6 -echo "configure:1646: checking for lstat" >&5 +echo "configure:1726: checking for lstat" >&5 if eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1651 "configure" +#line 1731 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/stat.h> int main() { - lstat("",(struct stat *)0); + lstat(".",(struct stat *)0); ; return 0; } EOF -if { (eval echo configure:1661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* bash_cv_func_lstat=yes else @@ -1678,21 +1758,23 @@ EOF fi echo $ac_n "checking whether programs are able to redeclare getpw functions""... $ac_c" 1>&6 -echo "configure:1682: checking whether programs are able to redeclare getpw functions" >&5 +echo "configure:1762: checking whether programs are able to redeclare getpw functions" >&5 if eval "test \"`echo '$''{'bash_cv_can_redecl_getpw'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1687 "configure" +#line 1767 "configure" #include "confdefs.h" #include <sys/types.h> #include <pwd.h> extern struct passwd *getpwent(); +extern struct passwd *getpwuid(); +extern struct passwd *getpwnam(); int main() { -struct passwd *z; z = getpwent(); +struct passwd *z; z = getpwent(); z = getpwuid(0); z = getpwnam("root"); ; return 0; } EOF -if { (eval echo configure:1696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_can_redecl_getpw=yes else @@ -1714,15 +1796,17 @@ fi echo $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6 -echo "configure:1718: checking whether or not strcoll and strcmp differ" >&5 +echo "configure:1800: checking whether or not strcoll and strcmp differ" >&5 if eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: cannot check strcoll if cross compiling" 1>&2; exit 1; } + { echo "configure: error: cannot check strcoll if cross compiling -- defaulting to no" 1>&2; exit 1; } + bash_cv_func_strcoll_broken=no + else cat > conftest.$ac_ext <<EOF -#line 1726 "configure" +#line 1810 "configure" #include "confdefs.h" #include <stdio.h> @@ -1761,7 +1845,7 @@ char *v[]; } EOF -if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then bash_cv_func_strcoll_broken=yes else @@ -1773,7 +1857,6 @@ fi rm -fr conftest* fi - fi echo "$ac_t""$bash_cv_func_strcoll_broken" 1>&6 @@ -1786,12 +1869,12 @@ fi echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6 -echo "configure:1790: checking whether signal handlers are of type void" >&5 +echo "configure:1873: checking whether signal handlers are of type void" >&5 if eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1795 "configure" +#line 1878 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -1806,7 +1889,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_void_sighandler=yes else @@ -1826,12 +1909,12 @@ EOF fi echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6 -echo "configure:1830: checking for TIOCGWINSZ in sys/ioctl.h" >&5 +echo "configure:1913: checking for TIOCGWINSZ in sys/ioctl.h" >&5 if eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1835 "configure" +#line 1918 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/ioctl.h> @@ -1839,7 +1922,7 @@ int main() { int x = TIOCGWINSZ; ; return 0; } EOF -if { (eval echo configure:1843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_tiocgwinsz_in_ioctl=yes else @@ -1860,12 +1943,12 @@ EOF fi echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6 -echo "configure:1864: checking for TIOCSTAT in sys/ioctl.h" >&5 +echo "configure:1947: checking for TIOCSTAT in sys/ioctl.h" >&5 if eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1869 "configure" +#line 1952 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/ioctl.h> @@ -1873,7 +1956,7 @@ int main() { int x = TIOCSTAT; ; return 0; } EOF -if { (eval echo configure:1877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_tiocstat_in_ioctl=yes else @@ -1894,12 +1977,12 @@ EOF fi echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6 -echo "configure:1898: checking for FIONREAD in sys/ioctl.h" >&5 +echo "configure:1981: checking for FIONREAD in sys/ioctl.h" >&5 if eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1903 "configure" +#line 1986 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/ioctl.h> @@ -1907,7 +1990,7 @@ int main() { int x = FIONREAD; ; return 0; } EOF -if { (eval echo configure:1911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_fionread_in_ioctl=yes else @@ -1928,19 +2011,19 @@ EOF fi echo $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:1932: checking for speed_t in sys/types.h" >&5 +echo "configure:2015: checking for speed_t in sys/types.h" >&5 if eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1937 "configure" +#line 2020 "configure" #include "confdefs.h" #include <sys/types.h> int main() { speed_t x; ; return 0; } EOF -if { (eval echo configure:1944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_speed_t_in_sys_types=yes else @@ -1960,14 +2043,75 @@ EOF fi +echo $ac_n "checking for struct winsize in sys/ioctl.h and termios.h""... $ac_c" 1>&6 +echo "configure:2048: checking for struct winsize in sys/ioctl.h and termios.h" >&5 +if eval "test \"`echo '$''{'bash_cv_struct_winsize_header'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2053 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/ioctl.h> +int main() { +struct winsize x; +; return 0; } +EOF +if { (eval echo configure:2061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bash_cv_struct_winsize_header=ioctl_h +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext <<EOF +#line 2069 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <termios.h> +int main() { +struct winsize x; +; return 0; } +EOF +if { (eval echo configure:2077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bash_cv_struct_winsize_header=termios_h +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bash_cv_struct_winsize_header=other +fi +rm -f conftest* + +fi +rm -f conftest* +fi + +if test $bash_cv_struct_winsize_header = ioctl_h; then + echo "$ac_t""sys/ioctl.h" 1>&6 + cat >> confdefs.h <<\EOF +#define STRUCT_WINSIZE_IN_SYS_IOCTL 1 +EOF + +elif test $bash_cv_struct_winsize_header = termios_h; then + echo "$ac_t""termios.h" 1>&6 + cat >> confdefs.h <<\EOF +#define STRUCT_WINSIZE_IN_TERMIOS 1 +EOF + +else + echo "$ac_t""not found" 1>&6 +fi + echo $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6 -echo "configure:1966: checking if struct dirent has a d_ino member" >&5 +echo "configure:2110: checking if struct dirent has a d_ino member" >&5 if eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1971 "configure" +#line 2115 "configure" #include "confdefs.h" #include <stdio.h> @@ -1996,7 +2140,7 @@ struct dirent d; int z; z = d.d_ino; ; return 0; } EOF -if { (eval echo configure:2000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_dirent_has_dino=yes else @@ -2018,12 +2162,12 @@ fi echo $ac_n "checking if struct dirent has a d_fileno member""... $ac_c" 1>&6 -echo "configure:2022: checking if struct dirent has a d_fileno member" >&5 +echo "configure:2166: checking if struct dirent has a d_fileno member" >&5 if eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2027 "configure" +#line 2171 "configure" #include "confdefs.h" #include <stdio.h> @@ -2052,7 +2196,7 @@ struct dirent d; int z; z = d.d_fileno; ; return 0; } EOF -if { (eval echo configure:2056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_dirent_has_d_fileno=yes else @@ -2073,6 +2217,167 @@ EOF fi +case "$host_os" in +aix*) prefer_curses=yes ;; +esac + +if test "X$bash_cv_termcap_lib" = "X"; then +_bash_needmsg=yes +else +echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6 +echo "configure:2229: checking which library has the termcap functions" >&5 +_bash_needmsg= +fi +if eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 +echo "configure:2236: checking for tgetent in -ltermcap" >&5 +ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermcap $LIBS" +cat > conftest.$ac_ext <<EOF +#line 2244 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char tgetent(); + +int main() { +tgetent() +; return 0; } +EOF +if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + bash_cv_termcap_lib=libtermcap +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 +echo "configure:2274: checking for tgetent in -lcurses" >&5 +ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcurses $LIBS" +cat > conftest.$ac_ext <<EOF +#line 2282 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char tgetent(); + +int main() { +tgetent() +; return 0; } +EOF +if { (eval echo configure:2293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + bash_cv_termcap_lib=libcurses +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 +echo "configure:2312: checking for tgetent in -lncurses" >&5 +ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lncurses $LIBS" +cat > conftest.$ac_ext <<EOF +#line 2320 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char tgetent(); + +int main() { +tgetent() +; return 0; } +EOF +if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + bash_cv_termcap_lib=libncurses +else + echo "$ac_t""no" 1>&6 +bash_cv_termcap_lib=gnutermcap +fi + +fi + +fi + +fi + +if test "X$_bash_needmsg" = "Xyes"; then +echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6 +echo "configure:2360: checking which library has the termcap functions" >&5 +fi +echo "$ac_t""using $bash_cv_termcap_lib" 1>&6 +if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then +LDFLAGS="$LDFLAGS -L./lib/termcap" +TERMCAP_LIB="./lib/termcap/libtermcap.a" +TERMCAP_DEP="./lib/termcap/libtermcap.a" +elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then +TERMCAP_LIB=-ltermcap +TERMCAP_DEP= +elif test $bash_cv_termcap_lib = libncurses; then +TERMCAP_LIB=-lncurses +TERMCAP_DEP= +else +TERMCAP_LIB=-lcurses +TERMCAP_DEP= +fi + +if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then + TERMCAP_LIB=-ltermcap #default +fi + case "$host_cpu" in *cray*) LOCAL_CFLAGS=-DCRAY ;; esac @@ -2081,6 +2386,12 @@ case "$host_os" in isc*) LOCAL_CFLAGS=-Disc386 ;; esac +BUILD_DIR=`pwd` + + + + + @@ -2231,9 +2542,12 @@ s%@CPP@%$CPP%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@RANLIB@%$RANLIB%g +s%@BUILD_DIR@%$BUILD_DIR%g s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g +s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g s%@LOCAL_DEFS@%$LOCAL_DEFS%g s%@LIBVERSION@%$LIBVERSION%g +s%@TERMCAP_LIB@%$TERMCAP_LIB%g CEOF EOF |