From 58653b7e9a9f44dc35a4d0f0a8584f425f14fb0c Mon Sep 17 00:00:00 2001 From: Doug Morris Date: Sun, 12 Sep 1999 06:44:02 +0000 Subject: [PATCH] fix for configure to find db1/ndbm.h in new linux systems --- acconfig.h | 3 ++ config.h.in | 3 ++ configure | 133 ++++++++++++++++++++++++++++++++++++-------------------- configure.in | 5 +++ uip/slocal.c | 7 ++- zotnet/mf/mf.c | 4 +- 6 files changed, 107 insertions(+), 48 deletions(-) diff --git a/acconfig.h b/acconfig.h index 5051962..a54d1d7 100644 --- a/acconfig.h +++ b/acconfig.h @@ -246,3 +246,6 @@ /* Define if your system has mkstemp */ #undef HAVE_MKSTEMP + +/* Define if your system has db1/ndbm.h instead of ndbm.h (ppclinux) */ +#undef HAVE_DB1_NDBM_H diff --git a/config.h.in b/config.h.in index daf4e6f..da9d917 100644 --- a/config.h.in +++ b/config.h.in @@ -351,6 +351,9 @@ /* Define if you have the header file. */ #undef HAVE_CRYPT_H +/* Define if you have the header file. */ +#undef HAVE_DB1_NDBM_H + /* Define if you have the header file. */ #undef HAVE_DIRENT_H diff --git a/configure b/configure index db6525e..b356735 100755 --- a/configure +++ b/configure @@ -1207,7 +1207,7 @@ if test -n "$RANLIB"; then else echo "$ac_t""no" 1>&6 fi - for ac_prog in mawk gawk nawk awk + for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -3388,18 +3388,59 @@ fi fi +for ac_hdr in db1/ndbm.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3396: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + if test x$with_hesiod != x -a x$with_hesiod != xno; then if test x$with_hesiod != xyes; then HESIOD_INCLUDES="-I$with_hesiod/include" HESIOD_LIBS="-L$with_hesiod/lib" fi echo $ac_n "checking for res_send""... $ac_c" 1>&6 -echo "configure:3398: checking for res_send" >&5 +echo "configure:3439: checking for res_send" >&5 if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_res_send=yes" else @@ -3440,7 +3481,7 @@ if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6 -echo "configure:3444: checking for res_send in -lresolv" >&5 +echo "configure:3485: checking for res_send in -lresolv" >&5 ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3448,7 +3489,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3489,7 +3530,7 @@ fi fi echo $ac_n "checking for hes_resolve in -lhesiod""... $ac_c" 1>&6 -echo "configure:3493: checking for hes_resolve in -lhesiod" >&5 +echo "configure:3534: checking for hes_resolve in -lhesiod" >&5 ac_lib_var=`echo hesiod'_'hes_resolve | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3497,7 +3538,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lhesiod $HESIOD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3542,7 +3583,7 @@ if test x$with_krb4 != x -a x$with_krb4 != xno; then KRB4_INCLUDES="-I/usr/include/kerberosIV" fi echo $ac_n "checking for krb_rd_req in -lkrb4""... $ac_c" 1>&6 -echo "configure:3546: checking for krb_rd_req in -lkrb4" >&5 +echo "configure:3587: checking for krb_rd_req in -lkrb4" >&5 ac_lib_var=`echo krb4'_'krb_rd_req | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3550,7 +3591,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb4 $KRB4_LIBS -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3580,7 +3621,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for krb_rd_req in -lkrb""... $ac_c" 1>&6 -echo "configure:3584: checking for krb_rd_req in -lkrb" >&5 +echo "configure:3625: checking for krb_rd_req in -lkrb" >&5 ac_lib_var=`echo krb'_'krb_rd_req | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3588,7 +3629,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb $KRB4_LIBS -ldes $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3629,12 +3670,12 @@ nmh_save_LIBS="$LIBS" LIBS="$TERMLIB $LIBS" echo $ac_n "checking if an include file defines ospeed""... $ac_c" 1>&6 -echo "configure:3633: checking if an include file defines ospeed" >&5 +echo "configure:3674: checking if an include file defines ospeed" >&5 if eval "test \"`echo '$''{'nmh_cv_decl_ospeed_include_defines'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if HAVE_TERMIOS_H @@ -3647,7 +3688,7 @@ int main() { ospeed = 0; ; return 0; } EOF -if { (eval echo configure:3651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* nmh_cv_decl_ospeed_include_defines=yes else @@ -3663,19 +3704,19 @@ echo "$ac_t""$nmh_cv_decl_ospeed_include_defines" 1>&6 if test $nmh_cv_decl_ospeed_include_defines = no; then echo $ac_n "checking if you must define ospeed""... $ac_c" 1>&6 -echo "configure:3667: checking if you must define ospeed" >&5 +echo "configure:3708: checking if you must define ospeed" >&5 if eval "test \"`echo '$''{'nmh_cv_decl_ospeed_must_define'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* nmh_cv_decl_ospeed_must_define=yes else @@ -3710,12 +3751,12 @@ fi LIBS="$nmh_save_LIBS" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3714: checking return type of signal handlers" >&5 +echo "configure:3755: 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 < #include @@ -3732,7 +3773,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3751,12 +3792,12 @@ EOF echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3755: checking for pid_t" >&5 +echo "configure:3796: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3784,12 +3825,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3788: checking for off_t" >&5 +echo "configure:3829: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3817,12 +3858,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3821: checking for uid_t in sys/types.h" >&5 +echo "configure:3862: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3851,12 +3892,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3855: checking for mode_t" >&5 +echo "configure:3896: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3884,12 +3925,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3888: checking for size_t" >&5 +echo "configure:3929: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3918,12 +3959,12 @@ fi echo $ac_n "checking for sigset_t""... $ac_c" 1>&6 -echo "configure:3922: checking for sigset_t" >&5 +echo "configure:3963: checking for sigset_t" >&5 if eval "test \"`echo '$''{'nmh_cv_type_sigset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3931,7 +3972,7 @@ int main() { sigset_t tempsigset; ; return 0; } EOF -if { (eval echo configure:3935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* nmh_cv_type_sigset_t=yes else @@ -3952,12 +3993,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:3956: checking for st_blksize in struct stat" >&5 +echo "configure:3997: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3965,7 +4006,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:3969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -3987,12 +4028,12 @@ fi echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:3991: checking for tm_gmtoff in struct tm" >&5 +echo "configure:4032: checking for tm_gmtoff in struct tm" >&5 if eval "test \"`echo '$''{'nmh_cv_struct_tm_gmtoff'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4008,7 +4049,7 @@ int main() { struct tm temptm; temptm.tm_gmtoff = 0; ; return 0; } EOF -if { (eval echo configure:4012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* nmh_cv_struct_tm_gmtoff=yes else @@ -4029,7 +4070,7 @@ EOF fi echo $ac_n "checking what style of signals to use""... $ac_c" 1>&6 -echo "configure:4033: checking what style of signals to use" >&5 +echo "configure:4074: checking what style of signals to use" >&5 if test $ac_cv_func_sigaction = yes -a $ac_cv_func_sigprocmask = yes; then signals_style=POSIX_SIGNALS cat >> confdefs.h <<\EOF @@ -4067,7 +4108,7 @@ fi echo "$ac_t""$signals_style" 1>&6 echo $ac_n "checking where signal.h is located""... $ac_c" 1>&6 -echo "configure:4071: checking where signal.h is located" >&5 +echo "configure:4112: checking where signal.h is located" >&5 if eval "test \"`echo '$''{'nmh_cv_path_signal_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/configure.in b/configure.in index c153c94..14690b6 100644 --- a/configure.in +++ b/configure.in @@ -351,6 +351,11 @@ AC_CHECK_FUNC(dbm_open, , AC_CHECK_LIB(dbm, dbm_open))) dnl ---------------- +dnl CHECK FOR NDBM.H +dnl ---------------- +AC_CHECK_HEADERS(db1/ndbm.h) + +dnl ---------------- dnl CHECK FOR HESIOD dnl ---------------- if test x$with_hesiod != x -a x$with_hesiod != xno; then diff --git a/uip/slocal.c b/uip/slocal.c index a306cad..c6aa286 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -27,9 +27,14 @@ #include #include #include -#include #include +#ifdef HAVE_DB1_NDBM_H +#include +#else +#include +#endif + #include #ifndef UTMP_FILE diff --git a/zotnet/mf/mf.c b/zotnet/mf/mf.c index d1db19f..ab6dfa4 100644 --- a/zotnet/mf/mf.c +++ b/zotnet/mf/mf.c @@ -31,7 +31,9 @@ getcpy (char *s) register char *p; if (!s) { - _cleanup(); +/* causes compiles to blow up because the symbol _cleanup is undefined + where did this ever come from? */ + /* _cleanup(); */ abort(); for(;;) pause(); -- 1.7.10.4