Commit adf3d5a2 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Libraries actually compiles using current templates...

however much is still needed (included db2 and thread detection)
parent 15f4632e
......@@ -17,32 +17,32 @@
/* 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 */
/* Leave that blank line there!! Autoheader needs it. */
......@@ -78,7 +78,7 @@ LIBDB = @LIBDB@
# 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)
......
......@@ -190,9 +190,10 @@ AC_PATH_PROG(FINGER, finger, /usr/ucb/finger,
$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,[
......@@ -201,36 +202,37 @@ if test "$BUILD_LDBM" = "yes" ; then
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
......@@ -243,9 +245,6 @@ dnl LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM"
fi
fi
AC_SUBST(LDAP_DEFS)
AC_SUBST(LIBDB)
# ud needs termcap (should insert check here)
LIBTERMCAP="-ltermcap"
AC_SUBST(LIBTERMCAP)
......@@ -322,6 +321,17 @@ AC_REPLACE_FUNCS(strdup)
# 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 \
......
......@@ -82,29 +82,20 @@
/* 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
......
......@@ -6,6 +6,10 @@ XPROGRAMS = testldbm
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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment