From: Kurt Zeilenga Date: Fri, 18 Sep 1998 22:54:37 +0000 (+0000) Subject: Fixed CRYPT, MD5, and SHA1 support. X-Git-Tag: PHP3_TOOL_0_0~18^2~106 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=92a1440f2de25d2e4de764fa237db4e3debf8386;p=openldap Fixed CRYPT, MD5, and SHA1 support. Added basic -lwrap detection. --- diff --git a/build/top.mk b/build/top.mk index 5d125624b1..819a7b70be 100644 --- a/build/top.mk +++ b/build/top.mk @@ -72,9 +72,7 @@ AC_LIBS = @LDFLAGS@ @LIBS@ AC_CFLAGS = @CFLAGS@ AC_LDFLAGS = -LIBCRYPT = @LIBCRYPT@ LIBTERMCAP = @LIBTERMCAP@ -LIBDB = @LIBDB@ # Our Defaults CC = $(AC_CC) diff --git a/configure b/configure index 31e708e378..f9e5236b2b 100755 --- a/configure +++ b/configure @@ -799,11 +799,11 @@ if test "${enable_wrappers+set}" = set; then SLAPD_TCP_WRAPPERS=yes else - LDAP_TCP_WRAPPERS=no + SLAPD_TCP_WRAPPERS=no fi else enableval=no - LDAP_TCP_WRAPPERS=no + SLAPD_TCP_WRAPPERS=no fi # Check whether --enable-phonetic or --disable-phonetic was given. @@ -1017,6 +1017,7 @@ LDAPD_LIBS= ## slapd arguments SLAPD_DEFS= SLAPD_LIBS= +LUTIL_DEFS= if test "$SLAPD_PHONETIC" = "yes" ; then cat >> confdefs.h <<\EOF #define SLAPD_PHONETIC 1 @@ -1025,6 +1026,22 @@ EOF SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" fi +if test "$SLAPD_MD5" = "yes" ; then + cat >> confdefs.h <<\EOF +#define SLAPD_MD5 1 +EOF + + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5" +fi + +if test "$SLAPD_SHA1" = "yes" ; then + cat >> confdefs.h <<\EOF +#define SLAPD_SHA1 1 +EOF + + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" +fi + if test "$SLAPD_LDBM" = "yes" ; then SLAPD_DEFS="$SLAPD_DEFS -DLDAP_LDBM" fi @@ -1042,7 +1059,7 @@ 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:1046: checking for $ac_word" >&5 +echo "configure:1063: 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 @@ -1071,7 +1088,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:1075: checking for $ac_word" >&5 +echo "configure:1092: 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 @@ -1119,7 +1136,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1123: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1140: 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. @@ -1129,11 +1146,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:1154: \"$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 @@ -1153,12 +1170,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:1157: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1174: 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:1162: checking whether we are using GNU C" >&5 +echo "configure:1179: 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 @@ -1167,7 +1184,7 @@ else yes; #endif EOF -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 +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1188: \"$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 @@ -1182,7 +1199,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:1186: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1203: 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 @@ -1210,7 +1227,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1214: checking how to run the C preprocessor" >&5 +echo "configure:1231: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1225,13 +1242,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:1235: \"$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 : @@ -1242,13 +1259,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:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1272,13 +1289,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:1276: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1293: 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 @@ -1296,7 +1313,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1319,7 +1336,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1323: checking whether ln -s works" >&5 +echo "configure:1340: 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 @@ -1350,7 +1367,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:1354: checking for a BSD compatible install" >&5 +echo "configure:1371: 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 @@ -1402,7 +1419,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:1406: checking for $ac_word" >&5 +echo "configure:1423: 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 @@ -1429,7 +1446,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1433: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1450: 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 @@ -1459,7 +1476,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:1463: checking for $ac_word" >&5 +echo "configure:1480: 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 @@ -1491,7 +1508,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:1495: checking for $ac_word" >&5 +echo "configure:1512: 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 @@ -1523,7 +1540,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:1527: checking for $ac_word" >&5 +echo "configure:1544: 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 @@ -1553,6 +1570,7 @@ else fi + ldbm_use="none" LDBM_DEFS= LDBM_LIBS= @@ -1561,12 +1579,12 @@ 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:1565: checking for dbopen" >&5 +echo "configure:1583: 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:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -1610,7 +1628,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:1614: checking for dbopen in -ldb" >&5 +echo "configure:1632: 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 @@ -1618,7 +1636,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:1651: \"$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 @@ -1666,13 +1684,13 @@ fi fi echo $ac_n "checking for db2""... $ac_c" 1>&6 -echo "configure:1670: checking for db2" >&5 +echo "configure:1688: 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 < @@ -1706,17 +1724,17 @@ fi 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 +echo "configure:1728: 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; } +{ (eval echo configure:1738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1757,7 +1775,7 @@ done 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:1761: checking for gdbm_open in -lgdbm" >&5 +echo "configure:1779: 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 @@ -1765,7 +1783,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:1798: \"$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 @@ -1804,7 +1822,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:1808: checking for dbm_open in -ldbm" >&5 +echo "configure:1826: 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 @@ -1812,7 +1830,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:1845: \"$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 @@ -1859,19 +1877,68 @@ fi fi fi +if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then + echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 +echo "configure:1883: checking for hosts_access in -lwrap" >&5 +ac_lib_var=`echo wrap'_'hosts_access | 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="-lwrap $LIBS" +cat > conftest.$ac_ext <&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 + LIBTCPD="-lwrap" + cat >> confdefs.h <<\EOF +#define HAVE_TCPD 1 +EOF + + SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS" + +else + echo "$ac_t""no" 1>&6 +fi + +fi + # ud needs termcap (should insert check here) LIBTERMCAP="-ltermcap" # FreeBSD (and others) have crypt(3) in -lcrypt -LIBCRYPT= -echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:1870: checking for crypt" >&5 +if test "$SLAPD_CRYPT" = "yes" ; then + echo $ac_n "checking for crypt""... $ac_c" 1>&6 +echo "configure:1937: 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:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -1908,15 +1975,12 @@ fi if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_CRYPT 1 -EOF - + have_crypt=yes else echo "$ac_t""no" 1>&6 - echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:1920: checking for crypt in -lcrypt" >&5 + echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 +echo "configure:1984: 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 @@ -1924,7 +1988,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:2003: \"$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 @@ -1950,31 +2014,38 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - LIBCRYPT="-lcrypt" - cat >> confdefs.h <<\EOF -#define HAVE_CRYPT 1 -EOF - + LUTIL_LIBS="$LUTIL_LIBS -lcrypt" + have_crypt=yes else echo "$ac_t""no" 1>&6 +have_crypt=no fi - fi + if test $have_crypt = yes ; then + cat >> confdefs.h <<\EOF +#define SLAPD_CRYPT 1 +EOF + + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT" + else + echo "configure: warning: could not find crypt" 1>&2 + fi +fi ac_header_dirent=no 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:1973: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2044: 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> @@ -1982,7 +2053,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2007,7 +2078,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:2011: checking for opendir in -ldir" >&5 +echo "configure:2082: 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 @@ -2015,7 +2086,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:2101: \"$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 @@ -2048,7 +2119,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2052: checking for opendir in -lx" >&5 +echo "configure:2123: 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 @@ -2056,7 +2127,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:2142: \"$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 @@ -2090,12 +2161,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2094: checking for ANSI C header files" >&5 +echo "configure:2165: 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 @@ -2103,7 +2174,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2120,7 +2191,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 @@ -2138,7 +2209,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 @@ -2159,7 +2230,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2170,7 +2241,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2194,12 +2265,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2198: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2269: 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 @@ -2215,7 +2286,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2251,17 +2322,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:2255: checking for $ac_hdr" >&5 +echo "configure:2326: 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:2265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2289,12 +2360,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2293: checking for uid_t in sys/types.h" >&5 +echo "configure:2364: 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 @@ -2323,7 +2394,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:2327: checking type of array argument to getgroups" >&5 +echo "configure:2398: 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 @@ -2331,7 +2402,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:2431: \"$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 @@ -2370,7 +2441,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -2394,12 +2465,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:2398: checking for mode_t" >&5 +echo "configure:2469: 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 @@ -2427,12 +2498,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2431: checking for off_t" >&5 +echo "configure:2502: 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 @@ -2460,12 +2531,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2464: checking for pid_t" >&5 +echo "configure:2535: 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 @@ -2493,12 +2564,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2497: checking return type of signal handlers" >&5 +echo "configure:2568: 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 @@ -2515,7 +2586,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2534,12 +2605,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2538: checking for size_t" >&5 +echo "configure:2609: 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 @@ -2567,12 +2638,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2571: checking for uid_t in sys/types.h" >&5 +echo "configure:2642: 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 @@ -2601,12 +2672,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:2605: checking for st_blksize in struct stat" >&5 +echo "configure:2676: 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 @@ -2614,7 +2685,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:2618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -2635,12 +2706,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2639: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2710: 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 @@ -2649,7 +2720,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2670,12 +2741,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2674: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2745: 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 @@ -2683,7 +2754,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2705,12 +2776,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2709: checking for working const" >&5 +echo "configure:2780: 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:2834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2781,7 +2852,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2785: checking for 8-bit clean memcmp" >&5 +echo "configure:2856: 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 @@ -2789,7 +2860,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:2874: \"$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 @@ -2817,12 +2888,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:2821: checking return type of signal handlers" >&5 +echo "configure:2892: 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 @@ -2839,7 +2910,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2858,12 +2929,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:2862: checking for strftime" >&5 +echo "configure:2933: 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:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -2908,7 +2979,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:2912: checking for strftime in -lintl" >&5 +echo "configure:2983: 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 @@ -2916,7 +2987,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:3002: \"$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 @@ -2954,12 +3025,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:2958: checking for vprintf" >&5 +echo "configure:3029: 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:3057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -3006,12 +3077,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:3010: checking for _doprnt" >&5 +echo "configure:3081: 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:3109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -3059,7 +3130,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:3063: checking for wait3 that fills in rusage" >&5 +echo "configure:3134: 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 @@ -3067,7 +3138,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -3098,7 +3169,7 @@ main() { } } EOF -if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3173: \"$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 @@ -3138,12 +3209,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3142: checking for $ac_func" >&5 +echo "configure:3213: 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:3241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3194,12 +3265,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3198: checking for $ac_func" >&5 +echo "configure:3269: 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:3297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3252,13 +3323,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:3256: checking declaration of sys_errlist" >&5 +echo "configure:3327: 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 < @@ -3268,7 +3339,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_dcl_sys_errlist=yes else @@ -3289,20 +3360,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:3293: checking existence of sys_errlist" >&5 +echo "configure:3364: 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:3306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_have_sys_errlist=yes else @@ -3338,6 +3409,8 @@ fi + + @@ -3518,7 +3591,6 @@ s%@SENDMAIL@%$SENDMAIL%g s%@EDITOR@%$EDITOR%g s%@FINGER@%$FINGER%g s%@LIBTERMCAP@%$LIBTERMCAP%g -s%@LIBCRYPT@%$LIBCRYPT%g s%@LIBOBJS@%$LIBOBJS%g s%@BUILD_LDAPD@%$BUILD_LDAPD%g s%@BUILD_SLAPD@%$BUILD_SLAPD%g @@ -3538,6 +3610,8 @@ s%@LDBM_DEFS@%$LDBM_DEFS%g s%@LDBM_LIBS@%$LDBM_LIBS%g s%@LTHREAD_DEFS@%$LTHREAD_DEFS%g s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g +s%@LUTIL_DEFS@%$LUTIL_DEFS%g +s%@LUTIL_LIBS@%$LUTIL_LIBS%g CEOF EOF diff --git a/configure.in b/configure.in index 2ef1d8ba21..78c9710b84 100644 --- a/configure.in +++ b/configure.in @@ -60,7 +60,7 @@ CF_ARG_OPTION(md5,[ --enable-md5 enable MD5 passwords (yes)],[ CF_ARG_OPTION(sha1,[ --enable-sha1 enable SHA1 passwords (yes)],[ SLAPD_SHA1=no],[SLAPD_SHA1=yes],yes)dnl CF_ARG_OPTION(wrappers,[ --enable-wrappers enable tcp wrapper support (no)],[ - SLAPD_TCP_WRAPPERS=yes],[LDAP_TCP_WRAPPERS=no],no)dnl + SLAPD_TCP_WRAPPERS=yes],[SLAPD_TCP_WRAPPERS=no],no)dnl CF_ARG_OPTION(phonetic,[ --enable-phonetic enable phonetic/soundex (no)],[ SLAPD_PHONETIC=yes],[SLAPD_PHONETIC=no],no)dnl CF_ARG_OPTION(rlookups,[ --enable-rlookups enable reverse lookups (yes)],[ @@ -151,11 +151,22 @@ LDAPD_LIBS= ## slapd arguments SLAPD_DEFS= SLAPD_LIBS= +LUTIL_DEFS= if test "$SLAPD_PHONETIC" = "yes" ; then AC_DEFINE(SLAPD_PHONETIC,1) SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" fi +if test "$SLAPD_MD5" = "yes" ; then + AC_DEFINE(SLAPD_MD5,1) + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5" +fi + +if test "$SLAPD_SHA1" = "yes" ; then + AC_DEFINE(SLAPD_SHA1,1) + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" +fi + if test "$SLAPD_LDBM" = "yes" ; then dnl AC_DEFINE(SLAPD_LDBM,1) SLAPD_DEFS="$SLAPD_DEFS -DLDAP_LDBM" @@ -175,7 +186,8 @@ SLURPD_LIBS= dnl End Args -dnl Checks for programs. +dnl ---------------------------------------------------------------- +dnl Checks for programs AC_PROG_CC AC_PROG_GCC_TRADITIONAL @@ -189,6 +201,9 @@ AC_PATH_PROG(SENDMAIL, sendmail, /usr/lib/sendmail, AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi, $PATH:/usr/ucb) AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb) +dnl ---------------------------------------------------------------- +dnl Checks for libraries + ldbm_use="none" LDBM_DEFS= LDBM_LIBS= @@ -275,18 +290,32 @@ dnl AC_DEFINE(LDBM_USE_NDBM,1) fi fi +if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then + AC_CHECK_LIB(wrap, hosts_access, [LIBTCPD="-lwrap" + AC_DEFINE(HAVE_TCPD) + SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS" + ]) +fi + # ud needs termcap (should insert check here) LIBTERMCAP="-ltermcap" AC_SUBST(LIBTERMCAP) # FreeBSD (and others) have crypt(3) in -lcrypt -LIBCRYPT= -AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT), [ - AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt" - AC_DEFINE(HAVE_CRYPT)]) -]) -AC_SUBST(LIBCRYPT) +if test "$SLAPD_CRYPT" = "yes" ; then + AC_CHECK_FUNC(crypt, have_crypt=yes, [ + AC_CHECK_LIB(crypt, crypt, [LUTIL_LIBS="$LUTIL_LIBS -lcrypt" + have_crypt=yes], [have_crypt=no])]) + + if test $have_crypt = yes ; then + AC_DEFINE(SLAPD_CRYPT,1) + LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT" + else + AC_MSG_WARN(could not find crypt, disabling crypt support) + fi +fi +dnl ---------------------------------------------------------------- dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC @@ -305,6 +334,7 @@ AC_CHECK_HEADERS( \ unistd.h \ ) +dnl ---------------------------------------------------------------- dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_GETGROUPS AC_TYPE_MODE_T @@ -320,6 +350,7 @@ AC_STRUCT_TM dnl AC_C_BIGENDIAN AC_C_CONST +dnl ---------------------------------------------------------------- dnl Checks for library functions. AC_FUNC_MEMCMP AC_TYPE_SIGNAL @@ -345,6 +376,7 @@ AC_CHECK_FUNCS( \ AC_REPLACE_FUNCS(strdup) +dnl ---------------------------------------------------------------- # Check Configuration CF_SYS_ERRLIST @@ -369,6 +401,8 @@ AC_SUBST(LDBM_DEFS) AC_SUBST(LDBM_LIBS) AC_SUBST(LTHREAD_DEFS) AC_SUBST(LTHREAD_LIBS) +AC_SUBST(LUTIL_DEFS) +AC_SUBST(LUTIL_LIBS) dnl AC_OUTPUT( \ dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ diff --git a/libraries/liblutil/Makefile.in b/libraries/liblutil/Makefile.in index 67e499385a..0cdbed7239 100644 --- a/libraries/liblutil/Makefile.in +++ b/libraries/liblutil/Makefile.in @@ -5,3 +5,5 @@ LIBRARY = liblutil.a SRCS = base64.c md5.c sha1.c OBJS = base64.o md5.o sha1.o + +XDEFS = @LUTIL_DEFS@ diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index b057e0136e..b915eb6fba 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -26,9 +26,9 @@ all-local: FORCE $(MAKE) $(MFLAGS) slapd (cd tools; $(MAKE) $(MFLAGS) all) -XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ +XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ @LUTIL_DEFS@ XLIBS = @SLAPD_LIBS@ libbackends.a \ - -lavl -llutil -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ + -lavl -llutil -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ @LUTIL_LIBS@ slapd: version.o $(CC) $(LDFLGS) -o $@ $(OBJS) version.o $(LIBS) diff --git a/servers/slapd/back-ldbm/Makefile.in b/servers/slapd/back-ldbm/Makefile.in index 4098c22e09..9d463937a6 100644 --- a/servers/slapd/back-ldbm/Makefile.in +++ b/servers/slapd/back-ldbm/Makefile.in @@ -11,7 +11,7 @@ BUILD_OPT = "--enable-ldbm" BUILD_SRV = @SLAPD_LDBM@ XINCLUDEDIR = -I.. -XDEFS = @LDBM_DEFS@ @LTHREAD_DEFS@ +XDEFS = @LDBM_DEFS@ @LTHREAD_DEFS@ @LUTIL_DEFS@ PROGRAMS = libback-ldbm.a diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in index 912aa07a51..69726d9988 100644 --- a/servers/slapd/tools/Makefile.in +++ b/servers/slapd/tools/Makefile.in @@ -33,7 +33,7 @@ OBJS2 = ../config.o ../ch_malloc.o ../backend.o ../charray.o \ all-local: build-edb2ldif build-chlog2replog $(PROGRAMS) XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ -XLIBS = @SLAPD_LIBS@ -lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ +XLIBS = @SLAPD_LIBS@ -lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ -llutil @LUTIL_LIBS@ build-edb2ldif: FORCE @if [ "$(HAVE_ISODE)" = "yes" ]; then \