summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/Makefile.in8
-rwxr-xr-xsource4/lib/ldb/autogen.sh8
-rw-r--r--source4/lib/ldb/configure.ac13
-rw-r--r--source4/lib/ldb/libldb.m4 (renamed from source4/lib/ldb/config.m4)0
-rw-r--r--source4/lib/ldb/popt.m428
-rw-r--r--source4/lib/ldb/replace.m460
6 files changed, 15 insertions, 102 deletions
diff --git a/source4/lib/ldb/Makefile.in b/source4/lib/ldb/Makefile.in
index bc00c6b656..af47667bed 100644
--- a/source4/lib/ldb/Makefile.in
+++ b/source4/lib/ldb/Makefile.in
@@ -11,7 +11,7 @@ includedir = @includedir@
libdir = @libdir@
bindir = @bindir@
mandir = @mandir@
-VPATH = @srcdir@:@srcdir@/..:@POPTDIR@
+VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@:@poptdir@
srcdir = @srcdir@
builddir = @builddir@
SLAPD = @SLAPD@
@@ -19,10 +19,10 @@ 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 \
+ -I@poptdir@ -I@tallocdir@ -I@tdbdir@/include -I@libreplacedir@ \
-DLIBDIR=\"$(libdir)\" -DSHLIBEXT=\"@SHLIBEXT@\" -DUSE_MMAP=1 @CFLAGS@
-LIB_FLAGS=-L$(srcdir)/../tdb -L$(srcdir)/../talloc -Llib -lldb -ltdb -ltalloc @LIBS@ @REPLACE_LIB@
+LIB_FLAGS=-Llib -lldb @LIBS@
LDB_TDB_DIR=ldb_tdb
LDB_TDB_OBJ=$(LDB_TDB_DIR)/ldb_tdb.o \
@@ -41,7 +41,7 @@ MODULES_OBJ=$(MODDIR)/operational.o $(MODDIR)/schema.o $(MODDIR)/rdn_name.o \
$(MODDIR)/objectclass.o \
$(MODDIR)/paged_results.o $(MODDIR)/sort.o $(MODDIR)/asq.o
-OBJS = $(MODULES_OBJ) $(COMMON_OBJ) $(LDB_TDB_OBJ) $(TDB_OBJ) $(TALLOC_OBJ) $(EXTRA_OBJ)
+OBJS = $(MODULES_OBJ) $(COMMON_OBJ) $(LDB_TDB_OBJ) @TDBOBJ@ @TALLOCOBJ@ @POPTOBJ@ @LIBREPLACEOBJ@ $(EXTRA_OBJ)
LDB_LIB = lib/libldb.a
diff --git a/source4/lib/ldb/autogen.sh b/source4/lib/ldb/autogen.sh
index d46a4279f3..500cab87d5 100755
--- a/source4/lib/ldb/autogen.sh
+++ b/source4/lib/ldb/autogen.sh
@@ -3,8 +3,12 @@
rm -rf autom4te.cache
rm -f configure config.h.in
-autoheader || exit 1
-autoconf || exit 1
+IPATHS="-I libreplace -I lib/replace -I ../libreplace -I ../replace"
+IPATHS="$IPATHS -I lib/talloc -I talloc -I ../talloc"
+IPATHS="$IPATHS -I lib/tdb -I tdb -I ../tdb"
+IPATHS="$IPATHS -I lib/popt -I popt -I ../popt"
+autoheader $IPATHS || exit 1
+autoconf $IPATHS || exit 1
rm -rf autom4te.cache
diff --git a/source4/lib/ldb/configure.ac b/source4/lib/ldb/configure.ac
index 1cca6024ff..6aeb39475a 100644
--- a/source4/lib/ldb/configure.ac
+++ b/source4/lib/ldb/configure.ac
@@ -48,8 +48,10 @@ AC_SUBST(MODULESDIR)
TESTS=""
EXTRA_OBJ=""
-m4_include(popt.m4)
-m4_include(../replace/libreplace.m4)
+m4_include(libreplace.m4)
+m4_include(libpopt.m4)
+m4_include(libtalloc.m4)
+m4_include(libtdb.m4)
m4_include(ldap.m4)
if test x"$with_ldap_support" = x"yes"; then
@@ -70,10 +72,5 @@ fi
AC_SUBST(TESTS)
AC_SUBST(EXTRA_OBJ)
-m4_include(replace.m4)
-SMB_REPLACE_FUNCS(strtoll)
-
-m4_include(config.m4)
-m4_include(../talloc/config.m4)
-m4_include(../tdb/config.m4)
+m4_include(libldb.m4)
AC_OUTPUT(Makefile ldb.pc)
diff --git a/source4/lib/ldb/config.m4 b/source4/lib/ldb/libldb.m4
index 845563b4a1..845563b4a1 100644
--- a/source4/lib/ldb/config.m4
+++ b/source4/lib/ldb/libldb.m4
diff --git a/source4/lib/ldb/popt.m4 b/source4/lib/ldb/popt.m4
deleted file mode 100644
index 558bfc73b1..0000000000
--- a/source4/lib/ldb/popt.m4
+++ /dev/null
@@ -1,28 +0,0 @@
-#################################################
-# Check to see if we should use an external src dir
-
-POPTDIR=""
-AC_ARG_WITH(popt-src,
-[ --with-popt-src set location of popt source],
-[
-case "$withval" in
- yes|no)
- AC_MSG_ERROR([--with-popt-src called without argument])
- ;;
- *)
- POPTDIR="$withval"
- ;;
-esac ],
-)
-
-if test x"$POPTDIR" = x; then
- AC_CHECK_HEADERS(popt.h)
- AC_CHECK_LIB(popt, poptGetContext)
-else
- EXTRA_OBJ="$EXTRA_OBJ findme.o popt.o poptconfig.o popthelp.o poptparse.o"
- CFLAGS="$CFLAGS -I$POPTDIR"
-fi
-
-AC_CHECK_HEADERS([float.h alloca.h])
-AC_CHECK_FUNCS(strerror)
-AC_SUBST(POPTDIR)
diff --git a/source4/lib/ldb/replace.m4 b/source4/lib/ldb/replace.m4
deleted file mode 100644
index e06cb7e85a..0000000000
--- a/source4/lib/ldb/replace.m4
+++ /dev/null
@@ -1,60 +0,0 @@
-dnl Try to find a replacement library
-dnl Will define HAVE_REPLACE_H if replace.h can be found
-AC_DEFUN([SMB_LIBREPLACE], [
-AC_ARG_WITH(libreplace,
-[ --with-libreplace Specify location to libreplace],
-[
- # Check whether libreplace can actually be found in this location
- if ! test -f "$withval/replace.h"
- then
- AC_MSG_ERROR([Unable to find replace.h in $withval])
- fi
- replacedir=$withval
-],
-[
- # Check if we can find libreplace in a common location
- for dir in . replace ../replace
- do
- AC_MSG_CHECKING([for libreplace in $dir])
- if test -f "$dir/replace.h"
- then
- replacedir="$dir"
- AC_MSG_RESULT(yes)
- break
- fi
- AC_MSG_RESULT(no)
- done
-])
-
-AC_SUBST(REPLACE_LIB)
-AC_SUBST(REPLACE_DIR)
-
-if test "$replacedir" != ""
-then
- REPLACE_DIR="$replacedir"
- REPLACE_LIB="$replacedir/libreplace.a"
- CFLAGS="$CFLAGS -I$replacedir"
- AC_DEFINE(HAVE_REPLACE_H, 1,
- [Whether replace.h is present and should be used])
-fi
-])
-
-dnl Try to find the specified functions in the system, or
-dnl in Samba's replacement library. In the future, this may also
-dnl try to find these functions in libroken or GNUlib if libreplace can't be
-dnl found.
-AC_DEFUN(SMB_REPLACE_FUNCS, [
- AC_REQUIRE([SMB_LIBREPLACE])dnl
-
- if test -z "$replacedir" || test -f "$replacedir/libreplace.a"
- then
- LIBS="$LIBS $REPLACE_LIB"
- for f in $1
- do
- AC_CHECK_FUNC($f, [], [
- AC_MSG_ERROR([Unable to find $f in the system. Consider
- specifying the path to the replacement library])
- ])
- done
- fi
-])