From 6a235aad57736597bf8e9f8cc4f60d83a4568eea Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Sep 1998 21:45:15 +0000 Subject: [PATCH] Added DB2 detection. --- build/top.mk | 6 +- clients/finger/Makefile.in | 2 +- configure | 368 +++++++++++++++++++++++-------------- configure.in | 62 +++++-- include/portable.h.in | 6 +- 5 files changed, 284 insertions(+), 160 deletions(-) diff --git a/build/top.mk b/build/top.mk index 8ef5437410..5d125624b1 100644 --- a/build/top.mk +++ b/build/top.mk @@ -67,10 +67,10 @@ LDAP_LIBDEPEND = $(LDAP_LIBDIR)/libldap.a # AutoConfig generated AC_CC = @CC@ -AC_DEFS = @DEFS@ @LDAP_DEFS@ -AC_LIBS = @LIBS@ +AC_DEFS = @CPPFLAGS@ @DEFS@ @LDAP_DEFS@ +AC_LIBS = @LDFLAGS@ @LIBS@ AC_CFLAGS = @CFLAGS@ -AC_LDFLAGS = @LDFLAGS@ +AC_LDFLAGS = LIBCRYPT = @LIBCRYPT@ LIBTERMCAP = @LIBTERMCAP@ diff --git a/clients/finger/Makefile.in b/clients/finger/Makefile.in index 7d342634d4..628fe2afcb 100644 --- a/clients/finger/Makefile.in +++ b/clients/finger/Makefile.in @@ -1,5 +1,5 @@ SRCS= main.c -XSRVS= version.c +XSRCS= version.c OBJS= main.o PROGRAMS= in.xfingerd diff --git a/configure b/configure index 1222f05fe6..31e708e378 100755 --- a/configure +++ b/configure @@ -973,6 +973,7 @@ if test "$BUILD_SLAPD" != "yes" ; then ldbm_prefer="none" fi +## general LDAP arguments LDAP_DEFS= LDAP_LIBS= @@ -1009,10 +1010,13 @@ else LTHREAD_DEFS="-DNO_THREADS" fi +## ldapd arguments LDAPD_DEFS= LDAPD_LIBS= +## slapd arguments SLAPD_DEFS= +SLAPD_LIBS= if test "$SLAPD_PHONETIC" = "yes" ; then cat >> confdefs.h <<\EOF #define SLAPD_PHONETIC 1 @@ -1032,12 +1036,13 @@ if test "$SLAPD_SHELL" = "yes" ; then fi SLURPD_DEFS= +SLURPD_LIBS= # 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:1041: checking for $ac_word" >&5 +echo "configure:1046: 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 @@ -1066,7 +1071,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:1070: checking for $ac_word" >&5 +echo "configure:1075: 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 @@ -1114,7 +1119,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1118: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1123: 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. @@ -1124,11 +1129,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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1137: \"$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 @@ -1148,12 +1153,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:1152: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1157: 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:1157: checking whether we are using GNU C" >&5 +echo "configure:1162: 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 @@ -1162,7 +1167,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1166: \"$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:1171: \"$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 @@ -1177,7 +1182,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:1181: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1186: 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 @@ -1205,7 +1210,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1209: checking how to run the C preprocessor" >&5 +echo "configure:1214: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1220,13 +1225,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1237,13 +1242,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1267,13 +1272,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1271: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1276: 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 < Autoconf TIOCGETP @@ -1291,7 +1296,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1314,7 +1319,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1318: checking whether ln -s works" >&5 +echo "configure:1323: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1345,7 +1350,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:1349: checking for a BSD compatible install" >&5 +echo "configure:1354: 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 @@ -1397,7 +1402,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:1401: checking for $ac_word" >&5 +echo "configure:1406: 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 @@ -1424,7 +1429,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1428: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1433: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1454,7 +1459,7 @@ fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1458: checking for $ac_word" >&5 +echo "configure:1463: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1486,7 +1491,7 @@ fi # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1490: checking for $ac_word" >&5 +echo "configure:1495: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1518,7 +1523,7 @@ fi # Extract the first word of "finger", so it can be a program name with args. set dummy finger; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1522: checking for $ac_word" >&5 +echo "configure:1527: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1549,19 +1554,19 @@ fi ldbm_use="none" -LDBM_LIB="" -LDBM_DEFS="" +LDBM_DEFS= +LDBM_LIBS= if test "$SLAPD_LDBM" = "yes" ; then if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ -o $ldbm_prefer = dbhash ; then echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:1560: checking for dbopen" >&5 +echo "configure:1565: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+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; then +if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -1605,7 +1610,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:1609: checking for dbopen in -ldb" >&5 +echo "configure:1614: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1613,7 +1618,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1633: \"$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 @@ -1642,7 +1647,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ldbm_use=$ldbm_prefer ldbm_prefer=found - LDBM_LIB="-ldb" + LDBM_LIBS="$LDBM_LIBS -ldb" else echo "$ac_t""no" 1>&6 @@ -1654,16 +1659,105 @@ fi if test $ldbm_prefer = found ; then if test $ldbm_use = dbhash ; then - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBHASH" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" else - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBBTREE" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" + fi + fi + + echo $ac_n "checking for db2""... $ac_c" 1>&6 +echo "configure:1670: checking for db2" >&5 + if eval "test \"`echo '$''{'cf_cv_db2'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +/* this check could be improved */ +#ifdef DB_VERSION_MAJOR +#if DB_VERSION_MAJOR == 2 + __db_version_2 +#endif +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "__db_version_2" >/dev/null 2>&1; then + rm -rf conftest* + cf_cv_db2=yes +else + rm -rf conftest* + cf_cv_db2=no +fi +rm -f conftest* + +fi + + echo "$ac_t""$cf_cv_db2" 1>&6 + + if test $cf_cv_db2 = yes ; then + if test $opt_db2 = yes ; then + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2" + else + for ac_hdr in db185.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1710: 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:1720: \"$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 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + if test $cf_cv_header_db185 = no ; then + { echo "configure: error: select --with-db2 or install db2 with 1.85 compatibility" 1>&2; exit 1; } + fi + + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185" + fi + else + if test $opt_db2 = yes ; then + { echo "configure: error: could not local DB2" 1>&2; exit 1; } fi fi fi if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:1667: checking for gdbm_open in -lgdbm" >&5 +echo "configure:1761: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1671,7 +1765,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1780: \"$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 @@ -1700,8 +1794,8 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ldbm_use=$ldbm_prefer ldbm_prefer=found - LDBM_LIB="-lgdbm" - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_GDBM" + LDBM_LIBS="$LDBM_LIBS -lgdbm" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM" else echo "$ac_t""no" 1>&6 @@ -1710,7 +1804,7 @@ fi fi if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:1714: checking for dbm_open in -ldbm" >&5 +echo "configure:1808: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1718,7 +1812,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1827: \"$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 @@ -1747,8 +1841,8 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ldbm_use=ndbm ldbm_prefer=found - LDBM_LIB="-ldbm" - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM" + LDBM_LIBS="$LDBM_LIBS -ldbm" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM" else echo "$ac_t""no" 1>&6 @@ -1772,12 +1866,12 @@ LIBTERMCAP="-ltermcap" # FreeBSD (and others) have crypt(3) in -lcrypt LIBCRYPT= echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:1776: checking for crypt" >&5 +echo "configure:1870: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+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; then +if { (eval echo configure:1898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -1822,7 +1916,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:1826: checking for crypt in -lcrypt" >&5 +echo "configure:1920: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1830,7 +1924,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1939: \"$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 @@ -1875,12 +1969,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:1879: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1973: 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 < #include <$ac_hdr> @@ -1888,7 +1982,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1913,7 +2007,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:1917: checking for opendir in -ldir" >&5 +echo "configure:2011: 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 @@ -1921,7 +2015,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2030: \"$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 @@ -1954,7 +2048,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1958: checking for opendir in -lx" >&5 +echo "configure:2052: 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 @@ -1962,7 +2056,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2071: \"$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 @@ -1996,12 +2090,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2000: checking for ANSI C header files" >&5 +echo "configure:2094: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2009,7 +2103,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2026,7 +2120,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2044,7 +2138,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2065,7 +2159,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2076,7 +2170,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2100,12 +2194,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2104: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2198: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2121,7 +2215,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2157,17 +2251,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2161: checking for $ac_hdr" >&5 +echo "configure:2255: 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:2171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2195,12 +2289,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2199: checking for uid_t in sys/types.h" >&5 +echo "configure:2293: 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 @@ -2229,7 +2323,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:2233: checking type of array argument to getgroups" >&5 +echo "configure:2327: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2237,7 +2331,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -2276,7 +2370,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -2300,12 +2394,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:2304: checking for mode_t" >&5 +echo "configure:2398: 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 @@ -2333,12 +2427,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2337: checking for off_t" >&5 +echo "configure:2431: 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 @@ -2366,12 +2460,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2370: checking for pid_t" >&5 +echo "configure:2464: 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 @@ -2399,12 +2493,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2403: checking return type of signal handlers" >&5 +echo "configure:2497: 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 @@ -2421,7 +2515,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2440,12 +2534,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2444: checking for size_t" >&5 +echo "configure:2538: 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 @@ -2473,12 +2567,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2477: checking for uid_t in sys/types.h" >&5 +echo "configure:2571: 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 @@ -2507,12 +2601,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:2511: checking for st_blksize in struct stat" >&5 +echo "configure:2605: 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 @@ -2520,7 +2614,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:2524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -2541,12 +2635,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2545: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2639: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2555,7 +2649,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2576,12 +2670,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2580: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2674: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2589,7 +2683,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2611,12 +2705,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2615: checking for working const" >&5 +echo "configure:2709: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2687,7 +2781,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2691: checking for 8-bit clean memcmp" >&5 +echo "configure:2785: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2695,7 +2789,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2723,12 +2817,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2727: checking return type of signal handlers" >&5 +echo "configure:2821: 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 @@ -2745,7 +2839,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2764,12 +2858,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:2768: checking for strftime" >&5 +echo "configure:2862: checking for strftime" >&5 if eval "test \"`echo '$''{'ac_cv_func_strftime'+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; then +if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -2814,7 +2908,7 @@ else echo "$ac_t""no" 1>&6 # strftime is in -lintl on SCO UNIX. echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6 -echo "configure:2818: checking for strftime in -lintl" >&5 +echo "configure:2912: checking for strftime in -lintl" >&5 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2822,7 +2916,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2931: \"$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 @@ -2860,12 +2954,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:2864: checking for vprintf" >&5 +echo "configure:2958: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+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; then +if { (eval echo configure:2986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -2912,12 +3006,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:2916: checking for _doprnt" >&5 +echo "configure:3010: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+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; then +if { (eval echo configure:3038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -2965,7 +3059,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:2969: checking for wait3 that fills in rusage" >&5 +echo "configure:3063: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2973,7 +3067,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -3004,7 +3098,7 @@ main() { } } EOF -if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -3044,12 +3138,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3048: checking for $ac_func" >&5 +echo "configure:3142: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3100,12 +3194,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3104: checking for $ac_func" >&5 +echo "configure:3198: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3158,13 +3252,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:3162: checking declaration of sys_errlist" >&5 +echo "configure:3256: checking declaration of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3174,7 +3268,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_dcl_sys_errlist=yes else @@ -3195,20 +3289,20 @@ if test $cf_cv_dcl_sys_errlist = no ; then EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:3199: checking existence of sys_errlist" >&5 +echo "configure:3293: checking existence of sys_errlist" >&5 if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index afac7bed29..2ef1d8ba21 100644 --- a/configure.in +++ b/configure.in @@ -116,7 +116,7 @@ if test "$BUILD_SLAPD" != "yes" ; then ldbm_prefer="none" fi -dnl general LDAP arguments +## general LDAP arguments LDAP_DEFS= LDAP_LIBS= @@ -144,12 +144,13 @@ else LTHREAD_DEFS="-DNO_THREADS" fi -dnl ldapd arguments +## ldapd arguments LDAPD_DEFS= LDAPD_LIBS= -dnl slapd arguments +## slapd arguments SLAPD_DEFS= +SLAPD_LIBS= if test "$SLAPD_PHONETIC" = "yes" ; then AC_DEFINE(SLAPD_PHONETIC,1) SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" @@ -170,6 +171,7 @@ fi dnl slurpd arguments SLURPD_DEFS= +SLURPD_LIBS= dnl End Args @@ -184,14 +186,12 @@ AC_PROG_MAKE_SET AC_PATH_PROG(SENDMAIL, sendmail, /usr/lib/sendmail, $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc) -AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi, - $PATH:/usr/ucb) -AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, - $PATH:/usr/ucb) +AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi, $PATH:/usr/ucb) +AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb) ldbm_use="none" -LDBM_LIB="" -LDBM_DEFS="" +LDBM_DEFS= +LDBM_LIBS= if test "$SLAPD_LDBM" = "yes" ; then if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \ @@ -202,17 +202,47 @@ if test "$SLAPD_LDBM" = "yes" ; then AC_CHECK_LIB(db,dbopen,[ ldbm_use=$ldbm_prefer ldbm_prefer=found - LDBM_LIB="-ldb" + LDBM_LIBS="$LDBM_LIBS -ldb" ]) ]) if test $ldbm_prefer = found ; then if test $ldbm_use = dbhash ; then dnl AC_DEFINE(LDBM_USE_DBHASH,1) - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBHASH" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" else dnl AC_DEFINE(LDBM_USE_DBBTREE,1) - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBBTREE" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" + fi + fi + + AC_MSG_CHECKING(for db2) + AC_CACHE_VAL(cf_cv_db2,[ + AC_EGREP_CPP(__db_version_2,[ +#include +/* this check could be improved */ +#ifdef DB_VERSION_MAJOR +#if DB_VERSION_MAJOR == 2 + __db_version_2 +#endif +#endif + ], cf_cv_db2=yes, cf_cv_db2=no)]) + AC_MSG_RESULT($cf_cv_db2) + + if test $cf_cv_db2 = yes ; then + if test $opt_db2 = yes ; then + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2" + else + AC_CHECK_HEADERS(db185.h) + if test $cf_cv_header_db185 = no ; then + AC_MSG_ERROR([select --with-db2 or install db2 with 1.85 compatibility]) + fi + + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185" + fi + else + if test $opt_db2 = yes ; then + AC_MSG_ERROR(could not local DB2) fi fi fi @@ -221,18 +251,18 @@ dnl AC_DEFINE(LDBM_USE_DBBTREE,1) AC_CHECK_LIB(gdbm, gdbm_open,[ ldbm_use=$ldbm_prefer ldbm_prefer=found - LDBM_LIB="-lgdbm" + LDBM_LIBS="$LDBM_LIBS -lgdbm" dnl AC_DEFINE(LDBM_USE_GDBM,1) - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_GDBM" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM" ]) fi if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then AC_CHECK_LIB(dbm,dbm_open,[ ldbm_use=ndbm ldbm_prefer=found - LDBM_LIB="-ldbm" + LDBM_LIBS="$LDBM_LIBS -ldbm" dnl AC_DEFINE(LDBM_USE_NDBM,1) - LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM" + LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM" ]) fi diff --git a/include/portable.h.in b/include/portable.h.in index 5d862fde03..ec4f2a8936 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -127,6 +127,9 @@ /* Define if you have the strtoul function. */ #undef HAVE_STRTOUL +/* Define if you have the header file. */ +#undef HAVE_DB185_H + /* Define if you have the header file. */ #undef HAVE_DIRENT_H @@ -172,9 +175,6 @@ /* Define if you have the header file. */ #undef HAVE_UNISTD_H -/* Define if you have the compat library (-lcompat). */ -#undef HAVE_LIBCOMPAT - #ifdef HAVE_STDDEF_H # include #endif -- 2.39.5