From: Kurt Zeilenga Date: Wed, 12 Aug 1998 00:51:01 +0000 (+0000) Subject: configure.in now supports a wide variety of enable/with flags X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16f9f923fd77496f44f8a509cfb709c5c2781bd6;p=thirdparty%2Fopenldap.git configure.in now supports a wide variety of enable/with flags Also, ldapconfig.h is now used exclusive for defaults slapd/tools/Makefile.in may not handle all cases Added include portable.h to files needing it (all files should include it before anything else) --- diff --git a/acconfig.h b/acconfig.h index fbc76b5560..48c2f9d0bd 100644 --- a/acconfig.h +++ b/acconfig.h @@ -17,30 +17,42 @@ /* define this if sys_errlist is not defined in stdio.h or errno.h */ #undef DECL_SYS_ERRLIST -/* define this to use LDAP LDBM backends */ -#undef LDAP_LDBM +/* define this you have crypt */ +#undef HAVE_CRYPT -/* define this to use LDAP PASSWD backends */ -#undef LDAP_PASSWD +/* define this for connectionless LDAP support */ +#undef LDAP_CONN_LESS + +/* define this to remove -lldap cache support */ +#undef LDAP_NOCACHE + +/* define this for phonetic support */ +#undef LDAP_PHONETIC + +/* define this for LDAP referrals support */ +#undef LDAP_REFERRALS -/* define this to use LDAP SHELL backends */ +/* define this to use SLAPD shell backend */ #undef LDAP_SHELL -/* define this to use DB BTREES */ +/* define this to use SLAPD passwd backend */ +#undef LDAP_PASSWD + +/* define this to use SLAPD LDBM backend */ +#undef LDAP_LDBM + +/* define this to use DBBTREE w/ LDBM backend */ #undef LDBM_USE_DBBTREE -/* define this to use DB HASH */ +/* define this to use DBHASH w/ LDBM backend */ #undef LDBM_USE_DBHASH -/* define this to use GNU DBM */ +/* define this to use GDBM w/ LDBM backend */ #undef LDBM_USE_GDBM -/* define this to use NDBM */ +/* define this to use NDBM w/ LDBM backend */ #undef LDBM_USE_NDBM -/* define this you have crypt */ -#undef HAVE_CRYPT - /* Leave that blank line there!! Autoheader needs it. If you're adding to this file, keep in mind: diff --git a/clients/ud/Makefile.in b/clients/ud/Makefile.in index e877726f39..faf2ab6c6e 100644 --- a/clients/ud/Makefile.in +++ b/clients/ud/Makefile.in @@ -8,9 +8,6 @@ PROGRAMS= ud XLIBS = $(LIBTERMCAP) -DEFINES= -DCONFIG_FILE=\"$(sysconfdir)/ud.conf\" \ - -DLDAP_FRIENDLY_MAP_FILE=\"$(sysconfdir)/ldapfriendly\" - ud : version.o $(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS) diff --git a/configure b/configure index 82c7e26204..0d011d7152 100755 --- a/configure +++ b/configure @@ -19,6 +19,8 @@ ac_help="$ac_help --enable-referrals enable referrals (yes)" ac_help="$ac_help --enable-clapd enable connectionless ldap (no)" +ac_help="$ac_help + --enable-phonetic enable phonetic/soundex (no)" ac_help="$ac_help --enable-ldapd enable building ldapd (no)" ac_help="$ac_help @@ -572,7 +574,7 @@ ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. echo $ac_n "checking arguments""... $ac_c" 1>&6 -echo "configure:576: checking arguments" >&5 +echo "configure:578: checking arguments" >&5 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then @@ -619,6 +621,7 @@ else LDAP_REFERRALS=yes fi + # Check whether --enable-cldap or --disable-cldap was given. if test "${enable_cldap+set}" = set; then enableval="$enable_cldap" @@ -633,6 +636,21 @@ else enableval=no LDAP_CLDAP=no +fi +# Check whether --enable-phonetic or --disable-phonetic was given. +if test "${enable_phonetic+set}" = set; then + enableval="$enable_phonetic" + test "$enableval" != yes && enableval=no + if test "$enableval" != "no" ; then + + LDAP_PHONETIC=yes + else + LDAP_PHONETIC=no + fi +else + enableval=no + LDAP_PHONETIC=no + fi # Check whether --enable-ldapd or --disable-ldapd was given. @@ -794,8 +812,8 @@ fi echo "$ac_t""done" 1>&6 -echo $ac_n "checking LDBM preference""... $ac_c" 1>&6 -echo "configure:799: checking LDBM preference" >&5 +echo $ac_n "checking LDBM preferences""... $ac_c" 1>&6 +echo "configure:817: checking LDBM preferences" >&5 ldbm_prefer=any if test "$opt_ndbm" = yes ; then @@ -828,6 +846,39 @@ fi +LDAP_DEFS= + +if test "$LDAP_DEBUG" = "yes" ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" +fi +if test "$LDAP_REFERRALS" = "yes" ; then + cat >> confdefs.h <<\EOF +#define LDAP_REFERRALS 1 +EOF + +fi +if test "$LDAP_CACHE" = "no" ; then + cat >> confdefs.h <<\EOF +#define LDAP_NOCACHE 1 +EOF + + LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" +fi +if test "$LDAP_CLDAP" = "yes" ; then + cat >> confdefs.h <<\EOF +#define LDAP_CONN_LESS 1 +EOF + + LDAP_DEFS="$LDAP_DEFS -DCLDAP" +fi +if test "$LDAP_PHONETIC" = "yes" ; then + cat >> confdefs.h <<\EOF +#define LDAP_PHONETIC 1 +EOF + + LDAP_DEFS="$LDAP_DEFS -DSOUNDEX" +fi + if test "$BUILD_LDBM" = "yes" ; then cat >> confdefs.h <<\EOF #define LDAP_LDBM 1 @@ -851,7 +902,7 @@ fi # 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:855: checking for $ac_word" >&5 +echo "configure:906: 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 @@ -880,7 +931,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:884: checking for $ac_word" >&5 +echo "configure:935: 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 @@ -928,7 +979,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:932: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:983: 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. @@ -938,11 +989,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:997: \"$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 @@ -962,12 +1013,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:966: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1017: 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:971: checking whether we are using GNU C" >&5 +echo "configure:1022: 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 @@ -976,7 +1027,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:980: \"$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:1031: \"$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 @@ -991,7 +1042,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:995: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1046: 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 @@ -1019,7 +1070,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1023: checking how to run the C preprocessor" >&5 +echo "configure:1074: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1034,13 +1085,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:1044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1051,13 +1102,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:1061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1081,13 +1132,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:1085: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1136: 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 @@ -1105,7 +1156,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1128,7 +1179,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1132: checking whether ln -s works" >&5 +echo "configure:1183: 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 @@ -1159,7 +1210,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:1163: checking for a BSD compatible install" >&5 +echo "configure:1214: 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 @@ -1211,7 +1262,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:1215: checking for $ac_word" >&5 +echo "configure:1266: 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 @@ -1238,7 +1289,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1242: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1293: 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 @@ -1268,7 +1319,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:1272: checking for $ac_word" >&5 +echo "configure:1323: 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 @@ -1300,7 +1351,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:1304: checking for $ac_word" >&5 +echo "configure:1355: 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 @@ -1332,7 +1383,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:1336: checking for $ac_word" >&5 +echo "configure:1387: 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 @@ -1369,12 +1420,12 @@ if test "$BUILD_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:1373: checking for dbopen" >&5 +echo "configure:1424: 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:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -1418,7 +1469,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:1422: checking for dbopen in -ldb" >&5 +echo "configure:1473: 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 @@ -1426,7 +1477,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:1492: \"$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 @@ -1466,7 +1517,7 @@ fi if test $ldbm_prefer = found ; then - if test $ldbm_use = dbbhash ; then + if test $ldbm_use = dbhash ; then cat >> confdefs.h <<\EOF #define LDBM_USE_DBHASH 1 EOF @@ -1481,7 +1532,7 @@ EOF 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:1485: checking for gdbm_open in -lgdbm" >&5 +echo "configure:1536: 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 @@ -1489,7 +1540,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:1555: \"$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 @@ -1531,7 +1582,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:1535: checking for dbm_open in -ldbm" >&5 +echo "configure:1586: 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 @@ -1539,7 +1590,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:1605: \"$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 @@ -1566,7 +1617,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ldbm_use=$ldbm_prefer + ldbm_use=ndbm ldbm_prefer=found LIBDB="-ldbm" cat >> confdefs.h <<\EOF @@ -1584,21 +1635,21 @@ fi { echo "configure: error: could not find suitable db for $ldbm_prefer backend" 1>&2; exit 1; } fi - cat >> confdefs.h <<\EOF -#define LDAP_LDBM 1 -EOF - + if test $ldbm_use = ndbm ; then + echo "configure: warning: LDBM using NDBM" 1>&2 + fi fi + # ud needs termcap (should insert check here) LIBTERMCAP="-ltermcap" # FreeBSD has obsoleted re_comp(3) from -lc, needs -lcompat echo $ac_n "checking for re_comp in -lcompat""... $ac_c" 1>&6 -echo "configure:1602: checking for re_comp in -lcompat" >&5 +echo "configure:1653: checking for re_comp in -lcompat" >&5 ac_lib_var=`echo compat'_'re_comp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1606,7 +1657,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcompat $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1672: \"$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 @@ -1648,12 +1699,12 @@ fi # FreeBSD (and others) have crypt(3) in -lcrypt LIBCRYPT= echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:1652: checking for crypt" >&5 +echo "configure:1703: 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:1731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -1698,7 +1749,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:1702: checking for crypt in -lcrypt" >&5 +echo "configure:1753: 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 @@ -1706,7 +1757,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:1772: \"$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 @@ -1751,12 +1802,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:1755: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1806: 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> @@ -1764,7 +1815,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1789,7 +1840,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:1793: checking for opendir in -ldir" >&5 +echo "configure:1844: 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 @@ -1797,7 +1848,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:1863: \"$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 @@ -1830,7 +1881,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1834: checking for opendir in -lx" >&5 +echo "configure:1885: 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 @@ -1838,7 +1889,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:1904: \"$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 @@ -1872,12 +1923,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1876: checking for ANSI C header files" >&5 +echo "configure:1927: 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 @@ -1885,7 +1936,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1902,7 +1953,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 @@ -1920,7 +1971,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 @@ -1941,7 +1992,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1952,7 +2003,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -1976,12 +2027,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1980: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2031: 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 @@ -1997,7 +2048,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2032,17 +2083,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:2036: checking for $ac_hdr" >&5 +echo "configure:2087: 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:2046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2070,12 +2121,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2074: checking for working const" >&5 +echo "configure:2125: 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:2179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2145,12 +2196,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2149: checking for uid_t in sys/types.h" >&5 +echo "configure:2200: 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 @@ -2179,12 +2230,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2183: checking for off_t" >&5 +echo "configure:2234: 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 @@ -2212,12 +2263,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2216: checking for pid_t" >&5 +echo "configure:2267: 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 @@ -2245,12 +2296,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2249: checking for size_t" >&5 +echo "configure:2300: 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 @@ -2278,12 +2329,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:2282: checking for st_blksize in struct stat" >&5 +echo "configure:2333: 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 @@ -2291,7 +2342,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:2295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -2312,12 +2363,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2316: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2367: 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 @@ -2326,7 +2377,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2347,12 +2398,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2351: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2402: 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 @@ -2360,7 +2411,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2382,7 +2433,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2386: checking for 8-bit clean memcmp" >&5 +echo "configure:2437: 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 @@ -2390,7 +2441,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:2455: \"$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 @@ -2418,12 +2469,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:2422: checking return type of signal handlers" >&5 +echo "configure:2473: 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 @@ -2440,7 +2491,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2459,12 +2510,12 @@ EOF echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:2463: checking for strftime" >&5 +echo "configure:2514: 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:2542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -2509,7 +2560,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:2513: checking for strftime in -lintl" >&5 +echo "configure:2564: 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 @@ -2517,7 +2568,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:2583: \"$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 @@ -2555,12 +2606,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:2559: checking for vprintf" >&5 +echo "configure:2610: 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:2638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -2607,12 +2658,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:2611: checking for _doprnt" >&5 +echo "configure:2662: 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:2690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -2660,7 +2711,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:2664: checking for wait3 that fills in rusage" >&5 +echo "configure:2715: 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 @@ -2668,7 +2719,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -2699,7 +2750,7 @@ main() { } } EOF -if { (eval echo configure:2703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2754: \"$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 @@ -2737,12 +2788,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2741: checking for $ac_func" >&5 +echo "configure:2792: 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:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2793,13 +2844,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:2797: checking declaration of sys_errlist" >&5 +echo "configure:2848: 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 < @@ -2809,7 +2860,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:2813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_dcl_sys_errlist=yes else @@ -2830,20 +2881,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:2834: checking existence of sys_errlist" >&5 +echo "configure:2885: 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:2847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cf_cv_have_sys_errlist=yes else @@ -2984,7 +3035,7 @@ servers/slapd/Makefile:etc/top.mk:servers/slapd/Makefile.in:etc/srv.mk \ servers/slapd/back-ldbm/Makefile:etc/top.mk:servers/slapd/back-ldbm/Makefile.in:etc/srv.mk \ servers/slapd/back-passwd/Makefile:etc/top.mk:servers/slapd/back-passwd/Makefile.in:etc/srv.mk \ servers/slapd/back-shell/Makefile:etc/top.mk:servers/slapd/back-shell/Makefile.in:etc/srv.mk \ -servers/slapd/tools/Makefile:etc/top.mk:servers/slapd/tools/Makefile.in:etc/rules.mk \ +servers/slapd/tools/Makefile:etc/top.mk:servers/slapd/tools/Makefile.in \ servers/slapd/shell-backends/Makefile:etc/top.mk:servers/slapd/shell-backends/Makefile.in:etc/srv.mk \ servers/slurpd/Makefile:etc/top.mk:servers/slurpd/Makefile.in:etc/srv.mk \ Makefile:etc/top.mk:Makefile.in:etc/dir.mk include/portable.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 @@ -3033,6 +3084,7 @@ s%@SET_MAKE@%$SET_MAKE%g s%@SENDMAIL@%$SENDMAIL%g s%@EDITOR@%$EDITOR%g s%@FINGER@%$FINGER%g +s%@LDAP_DEFS@%$LDAP_DEFS%g s%@LIBDB@%$LIBDB%g s%@LIBTERMCAP@%$LIBTERMCAP%g s%@LIBCRYPT@%$LIBCRYPT%g @@ -3102,7 +3154,7 @@ servers/slapd/Makefile:etc/top.mk:servers/slapd/Makefile.in:etc/srv.mk \ servers/slapd/back-ldbm/Makefile:etc/top.mk:servers/slapd/back-ldbm/Makefile.in:etc/srv.mk \ servers/slapd/back-passwd/Makefile:etc/top.mk:servers/slapd/back-passwd/Makefile.in:etc/srv.mk \ servers/slapd/back-shell/Makefile:etc/top.mk:servers/slapd/back-shell/Makefile.in:etc/srv.mk \ -servers/slapd/tools/Makefile:etc/top.mk:servers/slapd/tools/Makefile.in:etc/rules.mk \ +servers/slapd/tools/Makefile:etc/top.mk:servers/slapd/tools/Makefile.in \ servers/slapd/shell-backends/Makefile:etc/top.mk:servers/slapd/shell-backends/Makefile.in:etc/srv.mk \ servers/slurpd/Makefile:etc/top.mk:servers/slurpd/Makefile.in:etc/srv.mk \ Makefile:etc/top.mk:Makefile.in:etc/dir.mk"} diff --git a/configure.in b/configure.in index e9ccd5b86a..e3699c2f1d 100644 --- a/configure.in +++ b/configure.in @@ -21,8 +21,11 @@ CF_ARG_OPTION(cache,[ --enable-cache enable caching (yes)],[ LDAP_CACHE=no],[LDAP_CACHE=yes],yes)dnl CF_ARG_OPTION(referrals,[ --enable-referrals enable referrals (yes)],[ LDAP_REFERRALS=no],[LDAP_REFERRALS=yes],yes)dnl + CF_ARG_OPTION(cldap,[ --enable-clapd enable connectionless ldap (no)],[ LDAP_CLDAP=yes],[LDAP_CLDAP=no],no)dnl +CF_ARG_OPTION(phonetic,[ --enable-phonetic enable phonetic/soundex (no)],[ + LDAP_PHONETIC=yes],[LDAP_PHONETIC=no],no)dnl dnl server options CF_ARG_OPTION(ldapd,[ --enable-ldapd enable building ldapd (no)],[ @@ -58,7 +61,7 @@ AC_ARG_WITH(threads,[ --with-threads use threads (yes)],[ AC_MSG_RESULT(done) -AC_MSG_CHECKING(LDBM preference) +AC_MSG_CHECKING(LDBM preferences) ldbm_prefer=any if test "$opt_ndbm" = yes ; then @@ -91,14 +94,39 @@ AC_SUBST(BUILD_LDBM) AC_SUBST(BUILD_PASSWD) AC_SUBST(BUILD_SHELL) +LDAP_DEFS= + +if test "$LDAP_DEBUG" = "yes" ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" +fi +if test "$LDAP_REFERRALS" = "yes" ; then + AC_DEFINE(LDAP_REFERRALS) +dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" +fi +if test "$LDAP_CACHE" = "no" ; then + AC_DEFINE(LDAP_NOCACHE,1) + LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" +fi +if test "$LDAP_CLDAP" = "yes" ; then + AC_DEFINE(LDAP_CONN_LESS,1) + LDAP_DEFS="$LDAP_DEFS -DCLDAP" +fi +if test "$LDAP_PHONETIC" = "yes" ; then + AC_DEFINE(LDAP_PHONETIC,1) + LDAP_DEFS="$LDAP_DEFS -DSOUNDEX" +fi + if test "$BUILD_LDBM" = "yes" ; then AC_DEFINE(LDAP_LDBM,1) +dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_LDBM" fi if test "$BUILD_PASSWD" = "yes" ; then AC_DEFINE(LDAP_PASSWD,1) +dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_PASSWD" fi if test "$BUILD_SHELL" = "yes" ; then AC_DEFINE(LDAP_SHELL,1) +dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_SHELL" fi dnl End Args @@ -136,10 +164,12 @@ if test "$BUILD_LDBM" = "yes" ; then ]) if test $ldbm_prefer = found ; then - if test $ldbm_use = dbbhash ; then + if test $ldbm_use = dbhash ; then AC_DEFINE(LDBM_USE_DBHASH,1) +dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_DBHASH" else AC_DEFINE(LDBM_USE_DBBTREE,1) +dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_DBBTREE" fi fi fi @@ -149,14 +179,16 @@ if test "$BUILD_LDBM" = "yes" ; then ldbm_prefer=found LIBDB="-lgdbm" AC_DEFINE(LDBM_USE_GDBM,1) +dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_GDBM" ]) fi if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then AC_CHECK_LIB(dbm,dbm_open,[ - ldbm_use=$ldbm_prefer + ldbm_use=ndbm ldbm_prefer=found LIBDB="-ldbm" AC_DEFINE(LDBM_USE_NDBM,1) +dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM" ]) fi @@ -164,9 +196,12 @@ if test "$BUILD_LDBM" = "yes" ; then AC_MSG_ERROR(could not find suitable db for $ldbm_prefer backend) fi - AC_DEFINE(LDAP_LDBM) + if test $ldbm_use = ndbm ; then + AC_MSG_WARN(LDBM using NDBM, functionality will be limited) + fi fi +AC_SUBST(LDAP_DEFS) AC_SUBST(LIBDB) # ud needs termcap (should insert check here) @@ -259,7 +294,7 @@ servers/slapd/Makefile:etc/top.mk:servers/slapd/Makefile.in:etc/srv.mk \ servers/slapd/back-ldbm/Makefile:etc/top.mk:servers/slapd/back-ldbm/Makefile.in:etc/srv.mk \ servers/slapd/back-passwd/Makefile:etc/top.mk:servers/slapd/back-passwd/Makefile.in:etc/srv.mk \ servers/slapd/back-shell/Makefile:etc/top.mk:servers/slapd/back-shell/Makefile.in:etc/srv.mk \ -servers/slapd/tools/Makefile:etc/top.mk:servers/slapd/tools/Makefile.in:etc/rules.mk \ +servers/slapd/tools/Makefile:etc/top.mk:servers/slapd/tools/Makefile.in \ servers/slapd/shell-backends/Makefile:etc/top.mk:servers/slapd/shell-backends/Makefile.in:etc/srv.mk \ servers/slurpd/Makefile:etc/top.mk:servers/slurpd/Makefile.in:etc/srv.mk \ Makefile:etc/top.mk:Makefile.in:etc/dir.mk, \ diff --git a/include/bridge.h b/include/bridge.h index 69f323283e..d6ad620cc1 100644 --- a/include/bridge.h +++ b/include/bridge.h @@ -10,8 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ -#ifndef _PORTABLE_H -#define _PORTABLE_H +#ifndef _BRIDGE_H +#define _BRIDGE_H /* * portable.h for LDAP -- this is where we define common stuff to make @@ -212,4 +212,4 @@ extern char *strdup(); #endif /* ultrix || nextstep */ -#endif /* _PORTABLE_H */ +#endif /* _BRIDGE_H */ diff --git a/include/ldapconfig.h.in b/include/ldapconfig.h.in index 8d46422fa2..4c99262072 100644 --- a/include/ldapconfig.h.in +++ b/include/ldapconfig.h.in @@ -41,10 +41,10 @@ /* default count of DN components to show in entry displays */ #define DEFAULT_RDNCOUNT 2 /* default config file locations */ -#define FILTERFILE "@libexecdir@/ldap/ldapfilter.conf" -#define TEMPLATEFILE "@libexecdir@/ldap/ldaptemplates.conf" -#define SEARCHFILE "@libexecdir@/ldap/ldapsearchprefs.conf" -#define FRIENDLYFILE "@libexecdir@/ldap/ldapfriendly" +#define FILTERFILE "@SYSCONFDIR@/ldap/ldapfilter.conf" +#define TEMPLATEFILE "@SYSCONFDIR@/ldap/ldaptemplates.conf" +#define SEARCHFILE "@SYSCONFDIR@/ldap/ldapsearchprefs.conf" +#define FRIENDLYFILE "@SYSCONFDIR@/ldap/ldapfriendly" /* * FINGER DEFINITIONS @@ -115,7 +115,7 @@ Please try again later.\r\n" /* who to bind as */ #define GO500GW_BINDDN NULL /* where the helpfile lives */ -#define GO500GW_HELPFILE "@libexecdir@/ldap/go500gw.help" +#define GO500GW_HELPFILE "@SYSCONFDIR@/ldap/go500gw.help" /* port on which to listen */ #define GO500GW_PORT 7777 /* timeout on all searches */ @@ -138,7 +138,7 @@ Please try again later.\r\n" /* who to bind as */ #define RCPT500_BINDDN NULL /* where the helpfile lives */ -#define RCPT500_HELPFILE "@libexecdir@/ldap/rcpt500.help" +#define RCPT500_HELPFILE "@SYSCONFDIR@/ldap/rcpt500.help" /* maximum number of matches returned */ #define RCPT500_SIZELIMIT 50 /* address replies will appear to come from */ @@ -207,7 +207,7 @@ Please try again later.\r\n" * UD DEFINITIONS */ /* ud configuration file */ -#define UD_CONFIG_FILE "@libexecdir@/ldap/ud.conf" +#define UD_CONFIG_FILE "@SYSCONFDIR@/ldap/ud.conf" /* default editor */ #define UD_DEFAULT_EDITOR "@EDITOR@" /* default bbasename of user config file */ @@ -249,15 +249,15 @@ Please try again later.\r\n" * SLAPD DEFINITIONS */ /* location of the default slapd config file */ -#define SLAPD_DEFAULT_CONFIGFILE "@libexecdir@/ldap/slapd.conf" +#define SLAPD_DEFAULT_CONFIGFILE "@SYSCONFDIR@/ldap/slapd.conf" /* default sizelimit on number of entries from a search */ #define SLAPD_DEFAULT_SIZELIMIT 500 /* default timelimit to spend on a search */ #define SLAPD_DEFAULT_TIMELIMIT 3600 /* location of the slapd pid file */ -#define SLAPD_PIDFILE "@libexecdir@/ldap/slapd.pid" +#define SLAPD_PIDFILE "@SYSCONFDIR@/ldap/slapd.pid" /* location of the slapd args file */ -#define SLAPD_ARGSFILE "@libexecdir@/ldap/slapd.args" +#define SLAPD_ARGSFILE "@SYSCONFDIR@/ldap/slapd.args" /* dn of the special "monitor" entry */ #define SLAPD_MONITOR_DN "cn=monitor" /* dn of the special "config" entry */ diff --git a/include/portable.h.in b/include/portable.h.in index 814b9646d8..53f94ec756 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -66,30 +66,42 @@ /* define this if sys_errlist is not defined in stdio.h or errno.h */ #undef DECL_SYS_ERRLIST -/* define this to use LDAP LDBM backends */ -#undef LDAP_LDBM +/* define this you have crypt */ +#undef HAVE_CRYPT -/* define this to use LDAP PASSWD backends */ -#undef LDAP_PASSWD +/* define this for connectionless LDAP support */ +#undef LDAP_CONN_LESS + +/* define this to remove -lldap cache support */ +#undef LDAP_NOCACHE + +/* define this for phonetic support */ +#undef LDAP_PHONETIC + +/* define this for LDAP referrals support */ +#undef LDAP_REFERRALS -/* define this to use LDAP SHELL backends */ +/* define this to use SLAPD shell backend */ #undef LDAP_SHELL -/* define this to use DB BTREES */ +/* define this to use SLAPD passwd backend */ +#undef LDAP_PASSWD + +/* define this to use SLAPD LDBM backend */ +#undef LDAP_LDBM + +/* define this to use DBBTREE w/ LDBM backend */ #undef LDBM_USE_DBBTREE -/* define this to use DB HASH */ +/* define this to use DBHASH w/ LDBM backend */ #undef LDBM_USE_DBHASH -/* define this to use GNU DBM */ +/* define this to use GDBM w/ LDBM backend */ #undef LDBM_USE_GDBM -/* define this to use NDBM */ +/* define this to use NDBM w/ LDBM backend */ #undef LDBM_USE_NDBM -/* define this you have crypt */ -#undef HAVE_CRYPT - /* Define if you have the gethostname function. */ #undef HAVE_GETHOSTNAME diff --git a/libraries/libldap/Makefile.in b/libraries/libldap/Makefile.in index ecdc0623eb..1ec0891a57 100644 --- a/libraries/libldap/Makefile.in +++ b/libraries/libldap/Makefile.in @@ -17,9 +17,6 @@ OBJS = bind.o open.o result.o error.o compare.o search.o \ getdn.o getentry.o getattr.o getvalues.o addentry.o \ request.o getdxbyname.o os-ip.o url.o charset.o -DEFINES = -DFILTERFILE="\"$(sysconfdir)/ldapfilter.conf\"" \ - -DTEMPLATEFILE="\"$(sysconfdir)/ldaptemplates.conf\"" - LIBS = -L. -L../liblber -lldap -llber $(AC_LIBS) LIBLBER = ../liblber/liblber.a diff --git a/libraries/libldap/tmplout.c b/libraries/libldap/tmplout.c index 330527b421..b0ed35d90e 100644 --- a/libraries/libldap/tmplout.c +++ b/libraries/libldap/tmplout.c @@ -28,6 +28,7 @@ #include "lber.h" #include "ldap.h" #include "disptmpl.h" +#include "ldapconfig.h" #ifdef NEEDPROTOS static int do_entry2text( LDAP *ld, char *buf, char *base, LDAPMessage *entry, diff --git a/libraries/libldap/ufn.c b/libraries/libldap/ufn.c index 9596adf131..5827ca12b7 100644 --- a/libraries/libldap/ufn.c +++ b/libraries/libldap/ufn.c @@ -29,6 +29,8 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include "lber.h" #include "ldap.h" +#include "ldapconfig.h" + #ifdef NEEDPROTOS typedef int (*cancelptype)( void *cancelparm ); #else /* NEEDPROTOS */ diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in index baa63fb34c..7ebfa52011 100644 --- a/servers/slapd/tools/Makefile.in +++ b/servers/slapd/tools/Makefile.in @@ -1,37 +1,43 @@ -PROGRAMS = ldif2index ldif2ldbm ldbmcat ldif2id2entry \ - ldif2id2children centipede ldbmtest ldif +#----------------------------------------------------------------------------- +# Copyright (c) 1995 Regents of the University of Michigan. +# All rights reserved. +# +# Redistribution and use in source and binary forms are permitted +# provided that this notice is preserved and that due credit is given +# to the University of Michigan at Ann Arbor. The name of the University +# may not be used to endorse or promote products derived from this +# software without specific prior written permission. This software +# is provided ``as is'' without express or implied warranty. +# +# Stand alone LDAP server tools makefile +# +#----------------------------------------------------------------------------- +HAVE_ISODE = @HAVE_ISODE@ +BUILD_LDBM = @BUILD_LDBM@ -XPROGRAMS = edb2ldif -XSRCS = Vers-edb2.c EDB2LDIFSRCS = edb2ldif.c ldapsyntax.c -EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o +EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o ../strdup.o OBJS2 = ../config.o ../ch_malloc.o ../backend.o ../charray.o \ ../aclparse.o ../schema.o ../result.o ../filterentry.o \ ../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \ ../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \ - ../schemaparse.o + ../schemaparse.o ../regex.o ../strdup.o -#LIBS = -L$(LDAP_LIBDIR) -lldif -lldap -llber -lldbm -lavl \ -# $(LDBMLIB) $(EXLIBS) $(AC_LIBS) -#LIBS2 = -L$(LDAP_LIBDIR) -lldif -lldbm -lavl $(LDBMLIB) -llber \ -# $(KRBLIBFLAG) $(KRBLIBS) -llthread $(THREADSLIB) $(AC_LIBS) -LDAP_LIBS = -lldif -lldap -llber -lldbm -lavl -LIBS2 = $(LIBS) -llthread $(THREADLIB) +LDAP_LIBS = -lldif -lldap -llber -lldbm -lavl -llthread $(LIBDB) -all: build-edb2ldif $(PROGRAMS) +all: build-edb2ldif ldif2index ldif2ldbm ldbmcat ldif2id2entry \ + ldif2id2children centipede ldbmtest ldif build-edb2ldif: FORCE - @if [ "$(HAVEISODE)" = "yes" ]; then \ - $(MAKE) $(MFLAGS) CC=$(CC) EXINCLUDES="$(ISODEINCLUDEFLAG)" \ - EXLDFLAGS="$(ISODELIBFLAG)" EXLIBS="$(ISODELIBS)" edb2ldif; \ + @if [ "$(HAVE_ISODE)" = "yes" ]; then \ + $(MAKE) $(MFLAGS) edb2ldif; \ else \ - echo "uncomment the HAVEISODE=yes line in the Make-common file to build edb2ldif"; \ + echo "run configure with --with-isode to build edb2ldif"; \ fi edb2ldif: edb2-vers.o - $(CC) $(ALDFLAGS) -o $@ $(EDB2LDIFOBJS) edb2-vers.o \ - $(LDFLAGS) $(LIBS) + $(CC) $(LDFLAGS) -o $@ $(EDB2LDIFOBJS) edb2-vers.o $(LIBS) edb2-vers.c: $(EDB2LDIFOBJS) $(RM) $@ @@ -42,48 +48,45 @@ edb2-vers.c: $(EDB2LDIFOBJS) < Vers-edb2.c > $@) build-chlog2replog: FORCE - @if [ "$(HAVEISODE)" = "yes" ]; then \ - $(MAKE) $(MFLAGS) CC=$(CC) EXINCLUDES="$(ISODEINCLUDEFLAG)" \ - EXLDFLAGS="$(ISODELIBFLAG)" EXLIBS="$(ISODELIBS)" chlog2replog; \ + @if [ "$(HAVE_ISODE)" = "yes" ]; then \ + $(MAKE) $(MFLAGS) chlog2replog; \ else \ - echo "uncomment the HAVEISODE=yes line in the Make-common file to build chlog2replog"; \ + echo "run configure with --with-isode to build chlog2replog"; \ fi chlog2replog: chlog2replog.o ../lock.o ../ch_malloc.o - $(CC) $(ALDFLAGS) -o $@ chlog2replog.o ../lock.o ../ch_malloc.o \ - $(LDFLAGS) $(LIBS) + $(CC) $(LDFLAGS) -o $@ chlog2replog.o ../lock.o ../ch_malloc.o $(LIBS) ldif2index: ldif2index.o ../libbackends.a $(OBJS2) - $(CC) $(LDFLAGS) -o $@ ldif2index.o $(OBJS2) ../libbackends.a $(LIBS2) + $(CC) $(LDFLAGS) -o $@ ldif2index.o $(OBJS2) ../libbackends.a $(LIBS) ldif2ldbm: ldif2ldbm.sed.o ../libbackends.a $(OBJS2) - $(CC) $(LDFLAGS) -o $@ ldif2ldbm.sed.o $(OBJS2) ../libbackends.a $(LIBS2) + $(CC) $(LDFLAGS) -o $@ ldif2ldbm.sed.o $(OBJS2) ../libbackends.a $(LIBS) ldif2ldbm.sed.c: ldif2ldbm.c - $(SED) -e 's;%ETCDIR%;$(RUNTIMEETCDIR);' ldif2ldbm.c > ldif2ldbm.sed.c + $(SED) -e 's;%ETCDIR%;$(sysconfdir)/ldap;' ldif2ldbm.c > ldif2ldbm.sed.c ldif2id2entry: ldif2id2entry.o ../libbackends.a $(OBJS2) - $(CC) $(LDFLAGS) -o $@ ldif2id2entry.o $(OBJS2) ../libbackends.a $(LIBS2) + $(CC) $(LDFLAGS) -o $@ ldif2id2entry.o $(OBJS2) ../libbackends.a $(LIBS) ldif2id2children: ldif2id2children.o ../libbackends.a $(OBJS2) - $(CC) $(LDFLAGS) -o $@ ldif2id2children.o $(OBJS2) ../libbackends.a $(LIBS2) + $(CC) $(LDFLAGS) -o $@ ldif2id2children.o $(OBJS2) ../libbackends.a $(LIBS) ldbmcat: ldbmcat.o $(CC) $(LDFLAGS) -o $@ ldbmcat.o $(LIBS) ldif: ldif.o - $(CC) $(LDFLAGS) -o $@ ldif.o $(LIBS2) + $(CC) $(LDFLAGS) -o $@ ldif.o $(LIBS) $(LIBS2) centipede: centipede.o - $(CC) $(LDFLAGS) -o $@ centipede.o $(LIBS) $(KRBLIBFLAG) $(KRBLIBS) + $(CC) -o $@ centipede.o $(LIBS) $(KRBLIBFLAG) $(KRBLIBS) sizecount: sizecount.o ../phonetic.o ../ch_malloc.o $(CC) $(LDFLAGS) -o $@ sizecount.o ../phonetic.o ../ch_malloc.o \ $(LIBS) $(KRBLIBFLAG) $(KRBLIBS) ldbmtest: ldbmtest.o ../libbackends.a $(OBJS2) - $(CC) $(ALDFLAGS) -o ldbmtest ldbmtest.o $(OBJS2) \ - ../libbackends.a $(LIBS2) + $(CC) $(LDFLAGS) -o ldbmtest ldbmtest.o $(OBJS2) ../libbackends.a $(LIBS) install: $(ETCDIR) $(ETCDIR)/edb2ldif $(ETCDIR)/ldif2ldbm \ $(ETCDIR)/ldif2index $(ETCDIR)/ldif2id2entry \ @@ -92,14 +95,14 @@ install: $(ETCDIR) $(ETCDIR)/edb2ldif $(ETCDIR)/ldif2ldbm \ $(ETCDIR)/ldif $(ETCDIR)/edb2ldif: build-edb2ldif - @if [ "$(HAVEISODE)" = "yes" ]; then \ + @if [ "$(HAVE_ISODE)" = "yes" ]; then \ $(INSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(ETCDIR); \ else \ exit 0; \ fi $(ETCDIR)/chlog2replog: build-chlog2replog - @if [ "$(HAVEISODE)" = "yes" ]; then \ + @if [ "$(HAVE_ISODE)" = "yes" ]; then \ $(INSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(ETCDIR); \ else \ exit 0; \ @@ -128,3 +131,27 @@ $(ETCDIR)/centipede: centipede $(ETCDIR)/ldbmtest: ldbmtest $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(ETCDIR) + +lint: FORCE + $(LINT) $(INCLUDES) $(DEFINES) $(SRCS) + +5lint: FORCE + $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS) + +clean: FORCE + @echo "making clean in `$(PWD)`" + $(RM) edb2ldif ldif2index *.o core a.out edb2-vers.c \ + ldif2ldbm ldif2id2entry ldif2id2children ldbmcat ldif \ + centipede chlog2replog sizecount ldif2ldbm.sed.c ldbmtest + +depend: ldif2ldbm.sed.c FORCE + @if [ ! -z "$(HAVE_ISODE)" ]; then \ + DEPENDEXTRAS="$(ISODEINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \ + fi; \ + $(MKDEP) $(INCLUDES) $(DEFINES) $$DEPENDEXTRAS ldif2index.c \ + ldif2ldbm.c ldif2id2entry.c ldif2id2children.c ldbmcat.c \ + centipede.c sizecount.c ldif2ldbm.sed.c ldbmtest.c ldif.c + +links: + @echo "making links in `$(PWD)`" + @$(LN) .src/*.[ch] . diff --git a/servers/slapd/tools/ldif2index.c b/servers/slapd/tools/ldif2index.c index af377f6751..8f80d3c6b2 100644 --- a/servers/slapd/tools/ldif2index.c +++ b/servers/slapd/tools/ldif2index.c @@ -1,3 +1,5 @@ +#include "portable.h" + #include #include #include @@ -108,7 +110,7 @@ main( int argc, char **argv ) fprintf( stderr, "No ldbm database found in config file\n" ); exit( 1 ); } - } else if ( dbnum < 1 || dbnum > nbackends ) { + } else if ( dbnum < 0 || dbnum > (nbackends-1) ) { fprintf( stderr, "Database number selected via -n is out of range\n" ); fprintf( stderr, "Must be in the range 1 to %d (number of databases in the config file)\n", nbackends ); exit( 1 ); diff --git a/servers/slurpd/ldap_op.c b/servers/slurpd/ldap_op.c index c961d7d0cd..265426c21c 100644 --- a/servers/slurpd/ldap_op.c +++ b/servers/slurpd/ldap_op.c @@ -14,6 +14,8 @@ * ldap_op.c - routines to perform LDAP operations */ +#include "portable.h" + #include #include #include