summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/ldb/Makefile.in3
-rw-r--r--source4/lib/ldb/configure.in7
2 files changed, 7 insertions, 3 deletions
diff --git a/source4/lib/ldb/Makefile.in b/source4/lib/ldb/Makefile.in
index 1b91203dac..f6bd754857 100644
--- a/source4/lib/ldb/Makefile.in
+++ b/source4/lib/ldb/Makefile.in
@@ -17,7 +17,8 @@ EXTRA_OBJ=@EXTRA_OBJ@
TESTS=test-tdb.sh @TESTS@
CFLAGS=-I$(srcdir)/include -Iinclude -I$(srcdir) -I$(srcdir)/.. \
- -I$(srcdir)/../tdb/include -I$(srcdir)/../tdb -I$(srcdir)/../talloc -DUSE_MMAP=1 @CFLAGS@
+ -I$(srcdir)/../tdb/include -I$(srcdir)/../tdb -I$(srcdir)/../talloc \
+ -DLIBDIR=\"$(libdir)\" -DSHLIBEXT=\"@SHLIBEXT@\" -DUSE_MMAP=1 @CFLAGS@
LIB_FLAGS=-Llib -lldb @LIBS@
diff --git a/source4/lib/ldb/configure.in b/source4/lib/ldb/configure.in
index 9fc628280b..b65534e92e 100644
--- a/source4/lib/ldb/configure.in
+++ b/source4/lib/ldb/configure.in
@@ -37,13 +37,16 @@ AC_PATH_PROG(GCOV,gcov)
AC_PATH_PROG(SLAPD,slapd)
AC_CHECK_HEADERS(stdint.h dlfcn.h)
AC_CONFIG_HEADER(include/config.h)
+AC_CHECK_LIB(dl, dlopen)
AC_CHECK_FUNCS(dlopen dlsym dlclose)
+AC_CHECK_TYPE(comparison_fn_t,
+[AC_DEFINE(HAVE_COMPARISON_FN_T, 1,[Whether or not we have comparison_fn_t])])
+
SHLIBEXT="so" # Should be set based on OS later on
AC_SUBST(SHLIBEXT)
-MODULESDIR="$libdir/ldb"
-AC_DEFINE(MODULESDIR,$MODULESDIR,[Modules directory])
+AC_DEFINE_UNQUOTED(MODULESDIR, LIBDIR "/ldb" , [Modules directory] )
AC_SUBST(MODULESDIR)
sinclude(popt.m4)