Author: tridge
Date: 2006-09-05 23:32:35 +0000 (Tue, 05 Sep 2006)
New Revision: 18109

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18109

Log:

move ldb to use the same build methods

Added:
   branches/SAMBA_4_0/source/lib/ldb/libldb.m4
Removed:
   branches/SAMBA_4_0/source/lib/ldb/config.m4
   branches/SAMBA_4_0/source/lib/ldb/popt.m4
   branches/SAMBA_4_0/source/lib/ldb/replace.m4
Modified:
   branches/SAMBA_4_0/source/lib/ldb/Makefile.in
   branches/SAMBA_4_0/source/lib/ldb/autogen.sh
   branches/SAMBA_4_0/source/lib/ldb/configure.ac


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/Makefile.in
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/Makefile.in       2006-09-05 23:32:01 UTC 
(rev 18108)
+++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in       2006-09-05 23:32:35 UTC 
(rev 18109)
@@ -11,7 +11,7 @@
 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 @@
 TESTS=test-tdb.sh @TESTS@
 
 CFLAGS=-I$(srcdir)/include -Iinclude -I$(srcdir) -I$(srcdir)/.. \
-       -I$(srcdir)/../tdb/include -I$(srcdir)/../tdb -I$(srcdir)/../talloc \
+       [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@/include [EMAIL 
PROTECTED]@ \
        -DLIBDIR=\"$(libdir)\" -DSHLIBEXT=\"@[EMAIL PROTECTED]" -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 @@
           $(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
 

Modified: branches/SAMBA_4_0/source/lib/ldb/autogen.sh
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/autogen.sh        2006-09-05 23:32:01 UTC 
(rev 18108)
+++ branches/SAMBA_4_0/source/lib/ldb/autogen.sh        2006-09-05 23:32:35 UTC 
(rev 18109)
@@ -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
 

Deleted: branches/SAMBA_4_0/source/lib/ldb/config.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/config.m4 2006-09-05 23:32:01 UTC (rev 
18108)
+++ branches/SAMBA_4_0/source/lib/ldb/config.m4 2006-09-05 23:32:35 UTC (rev 
18109)
@@ -1,33 +0,0 @@
-SMB_ENABLE(ldb_sqlite3,$with_sqlite3_support)
-
-AC_MSG_CHECKING([for Python])
-
-PYTHON=
- 
-AC_ARG_WITH(python,
-[  --with-python=PYTHONNAME  build Python libraries],
-[ case "${withval-python}" in
-  yes)
-        PYTHON=python
-        ;;
-  no)
-        PYTHON=
-        ;;
-  *)
-        PYTHON=${withval-python}
-        ;;
-  esac ])
-
-if test x"$PYTHON" != "x"; then
-       incdir=`python -c 'import sys; print "%s/include/python%d.%d" % 
(sys.prefix, sys.version_info[[0]], sys.version_info[[1]])'`
-       CPPFLAGS="$CPPFLAGS -I $incdir"
-fi
-
-if test x"$PYTHON" != "x"; then
-       AC_MSG_RESULT([${withval-python}])
-else
-       AC_MSG_RESULT(no)
-       SMB_ENABLE(swig_ldb, NO)
-fi
-
-AC_SUBST(PYTHON)

Modified: branches/SAMBA_4_0/source/lib/ldb/configure.ac
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/configure.ac      2006-09-05 23:32:01 UTC 
(rev 18108)
+++ branches/SAMBA_4_0/source/lib/ldb/configure.ac      2006-09-05 23:32:35 UTC 
(rev 18109)
@@ -48,8 +48,10 @@
 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 @@
 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)

Copied: branches/SAMBA_4_0/source/lib/ldb/libldb.m4 (from rev 18107, 
branches/SAMBA_4_0/source/lib/ldb/config.m4)

Deleted: branches/SAMBA_4_0/source/lib/ldb/popt.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/popt.m4   2006-09-05 23:32:01 UTC (rev 
18108)
+++ branches/SAMBA_4_0/source/lib/ldb/popt.m4   2006-09-05 23:32:35 UTC (rev 
18109)
@@ -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)

Deleted: branches/SAMBA_4_0/source/lib/ldb/replace.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/replace.m4        2006-09-05 23:32:01 UTC 
(rev 18108)
+++ branches/SAMBA_4_0/source/lib/ldb/replace.m4        2006-09-05 23:32:35 UTC 
(rev 18109)
@@ -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
-])

Reply via email to