/* 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 for phonetic support */
+#undef SLAPD_PHONETIC
+
/* define this to use SLAPD shell backend */
-#undef SLAPD_SHELL
+/* #undef SLAPD_SHELL */
/* define this to use SLAPD passwd backend */
-#undef SLAPD_PASSWD
+/* #undef SLAPD_PASSWD */
/* define this to use SLAPD LDBM backend */
-#undef SLAPD_LDBM
+/* #undef SLAPD_LDBM */
/* define this to use DBBTREE w/ LDBM backend */
-#undef LDBM_USE_DBBTREE
+/* #undef LDBM_USE_DBBTREE */
/* define this to use DBHASH w/ LDBM backend */
-#undef LDBM_USE_DBHASH
+/* #undef LDBM_USE_DBHASH */
/* define this to use GDBM w/ LDBM backend */
-#undef LDBM_USE_GDBM
+/* #undef LDBM_USE_GDBM */
/* define this to use NDBM w/ LDBM backend */
-#undef LDBM_USE_NDBM
+/* #undef LDBM_USE_NDBM */
\f
/* Leave that blank line there!! Autoheader needs it. */
# Our Defaults
CC = $(AC_CC)
-DEFS = $(AC_DEFS) $(INCLUDEDIR) $(LDAP_DEFS)
+DEFS = $(AC_DEFS) $(INCLUDEDIR) $(LDAP_DEFS) $(XDEFS)
LIBS = -L$(LDAP_LIBDIR) $(LDAP_LIBS) $(XLIBS) $(AC_LIBS)
CFLAGS = $(AC_CFLAGS) $(DEFS) $(DEFINES)
$PATH:/usr/ucb)
ldbm_use="none"
-LIBDB=""
+LDBM_LIB=""
+LDBM_DEFS=""
-if test "$BUILD_LDBM" = "yes" ; then
+if test "$SLAPD_LDBM" = "yes" ; then
if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \
-o $ldbm_prefer = dbhash ; then
AC_CHECK_FUNC(dbopen,[
AC_CHECK_LIB(db,dbopen,[
ldbm_use=$ldbm_prefer
ldbm_prefer=found
- LIBDB="-ldb"
+ LDBM_LIB="-ldb"
])
])
if test $ldbm_prefer = found ; then
if test $ldbm_use = dbhash ; then
- AC_DEFINE(LDBM_USE_DBHASH,1)
-dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_DBHASH"
+dnl AC_DEFINE(LDBM_USE_DBHASH,1)
+ LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBHASH"
else
- AC_DEFINE(LDBM_USE_DBBTREE,1)
-dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_DBBTREE"
+dnl AC_DEFINE(LDBM_USE_DBBTREE,1)
+ LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_DBBTREE"
fi
fi
fi
+
if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then
AC_CHECK_LIB(gdbm, gdbm_open,[
ldbm_use=$ldbm_prefer
ldbm_prefer=found
- LIBDB="-lgdbm"
- AC_DEFINE(LDBM_USE_GDBM,1)
-dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_GDBM"
+ LDBM_LIB="-lgdbm"
+dnl AC_DEFINE(LDBM_USE_GDBM,1)
+ LDBM_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=ndbm
ldbm_prefer=found
- LIBDB="-ldbm"
- AC_DEFINE(LDBM_USE_NDBM,1)
-dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM"
+ LDBM_LIB="-ldbm"
+dnl AC_DEFINE(LDBM_USE_NDBM,1)
+ LDBM_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM"
])
fi
fi
fi
-AC_SUBST(LDAP_DEFS)
-AC_SUBST(LIBDB)
-
# ud needs termcap (should insert check here)
LIBTERMCAP="-ltermcap"
AC_SUBST(LIBTERMCAP)
# Check Configuration
CF_SYS_ERRLIST
+AC_SUBST(LDAP_DEFS)
+AC_SUBST(LDAP_LIBS)
+AC_SUBST(LDAPD_DEFS)
+AC_SUBST(LDAPD_LIBS)
+AC_SUBST(SLAPD_DEFS)
+AC_SUBST(SLAPD_LIBS)
+AC_SUBST(SLUPPD_DEFS)
+AC_SUBST(SLUPPD_LIBS)
+AC_SUBST(LDBM_DEFS)
+AC_SUBST(LDBM_LIBS)
+
dnl AC_OUTPUT( \
dnl clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
dnl clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
/* define this to remove -lldap cache support */
#undef LDAP_NOCACHE
+/* define this for LDAP referrals support */
+#undef LDAP_REFERRALS
+
/* define this for phonetic support */
-#undef LDAP_PHONETIC
+#undef SLAPD_PHONETIC
/* define this to use SLAPD shell backend */
-#undef SLAPD_SHELL
+/* #undef SLAPD_SHELL */
/* define this to use SLAPD passwd backend */
-#undef SLAPD_PASSWD
+/* #undef SLAPD_PASSWD */
/* define this to use SLAPD LDBM backend */
-#undef SLAPD_LDBM
-
-/* define this to use DBBTREE w/ LDBM backend */
-#undef LDBM_USE_DBBTREE
-
-/* define this to use DBHASH w/ LDBM backend */
-#undef LDBM_USE_DBHASH
-
-/* define this to use GDBM w/ LDBM backend */
-#undef LDBM_USE_GDBM
-
-/* define this to use NDBM w/ LDBM backend */
-#undef LDBM_USE_NDBM
+/* #undef SLAPD_LDBM */
/* Define if you have the gethostname function. */
#undef HAVE_GETHOSTNAME
SRCS = ldbm.c
OBJS = ldbm.o
+XDEFS = @LDBM_DEFS@
+XLIBS = @LDBM_LIBS@
+
LIBS = -L$(LDAP_LIBDIR) -lavl $(AC_LIBS)
+
testldbm: libldbm.a testldbm.o
$(CC) $(LDFLAGS) -o $@ testldbm.o $(LIBS)