summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-08-22 10:46:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:28 -0500
commitb2dd4b3e15cfb71c4f94aa41e7711ae696a12b9a (patch)
tree5d8dad6b12d6dd0f090a19098ce4d36beb29065e
parent7783080810e0c6d71568a3b24fd7f2c7d856c24c (diff)
downloadsamba-b2dd4b3e15cfb71c4f94aa41e7711ae696a12b9a.tar.gz
samba-b2dd4b3e15cfb71c4f94aa41e7711ae696a12b9a.tar.bz2
samba-b2dd4b3e15cfb71c4f94aa41e7711ae696a12b9a.zip
r17706: remove the dependence on gnu make in the standalone build
(This used to be commit 07fa357f3f7251859f8afb6f2b0488b3718b0474)
-rw-r--r--source4/lib/ldb/Makefile.in69
-rw-r--r--source4/lib/ldb/configure.in36
2 files changed, 39 insertions, 66 deletions
diff --git a/source4/lib/ldb/Makefile.in b/source4/lib/ldb/Makefile.in
index d645a3ec4d..1b91203dac 100644
--- a/source4/lib/ldb/Makefile.in
+++ b/source4/lib/ldb/Makefile.in
@@ -11,38 +11,15 @@ mandir = @mandir@
VPATH = @srcdir@:@srcdir@/..:@POPTDIR@
srcdir = @srcdir@
builddir = @builddir@
-WITH_GCOV = @WITH_GCOV@
-WITH_LDAP = @WITH_LDAP@
SLAPD = @SLAPD@
-WITH_SQLITE3 = @WITH_SQLITE3@
POPTOBJ = @POPTOBJ@
+EXTRA_OBJ=@EXTRA_OBJ@
+TESTS=test-tdb.sh @TESTS@
-ifeq ($(WITH_LDAP),yes)
-OPENLDAP_PREFIX=/usr
-LDAP_LIBS=-L$(OPENLDAP_PREFIX)/lib -llber -lldap
-LDAP_FLAGS=-DHAVE_LDAP=1
-LDB_LDAP_OBJ=$(srcdir)/ldb_ldap/ldb_ldap.o
-endif
+CFLAGS=-I$(srcdir)/include -Iinclude -I$(srcdir) -I$(srcdir)/.. \
+ -I$(srcdir)/../tdb/include -I$(srcdir)/../tdb -I$(srcdir)/../talloc -DUSE_MMAP=1 @CFLAGS@
-ifeq ($(WITH_SQLITE3),yes)
-SQLITE3_PREFIX=/usr
-SQLITE3_LIBS=-L$(SQLITE3_PREFIX)/lib -lsqlite3
-SQLITE3_FLAGS=-DHAVE_SQLITE3=1
-LDB_SQLITE3_OBJ=$(srcdir)/ldb_sqlite3/ldb_sqlite3.o
-endif
-
-CFLAGS1=-I$(srcdir)/include -Iinclude -I$(srcdir) -I$(srcdir)/.. \
- -I$(srcdir)/../tdb/include -I$(srcdir)/../tdb -I$(srcdir)/../talloc -DUSE_MMAP=1 $(LDAP_FLAGS)
-
-# enable the following two lines to build with gcov code coverage support
-ifeq ($(WITH_GCOV),1)
-GCOV_FLAGS = -ftest-coverage -fprofile-arcs
-GCOV_LIBS = -lgcov
-endif
-
-CFLAGS = $(CFLAGS1) $(GCOV_FLAGS) @CFLAGS@
-
-LIB_FLAGS=-Llib -lldb $(LDAP_LIBS) $(SQLITE3_LIBS) $(GCOV_LIBS) @LIBS@
+LIB_FLAGS=-Llib -lldb @LIBS@
TDBDIR=tdb
TDB_OBJ=$(TDBDIR)/common/tdb.o $(TDBDIR)/common/dump.o \
@@ -71,7 +48,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) $(LDB_LDAP_OBJ) $(LDB_SQLITE3_OBJ) $(POPTOBJ)
+OBJS = $(MODULES_OBJ) $(COMMON_OBJ) $(LDB_TDB_OBJ) $(TDB_OBJ) $(TALLOC_OBJ) $(EXTRA_OBJ) $(POPTOBJ)
LDB_LIB = lib/libldb.a
@@ -160,38 +137,8 @@ distclean: clean
etags:
etags */*.[ch]
-test-tdb: $(BINS)
- @echo "STARTING TDB BACKEND TEST"
- $(srcdir)/tests/test-tdb.sh
-
-ifeq ($(WITH_LDAP),yes)
-test-ldap:
- @echo "STARTING LDAP BACKEND TEST"
- if test -x "$(SLAPD)"; then $(srcdir)/tests/test-ldap.sh; fi
-else
-test-ldap:
- @echo "SKIP LDAP TEST - NO LDAP SUPPORT"
-endif
-
-ifeq ($(WITH_SQLITE3),yes)
-test-sqlite3:
- @echo "STARTING SQLITE3 BACKEND TEST"
- $(srcdir)/tests/test-sqlite3.sh
-else
-test-sqlite3:
- @echo "SKIP SQLITE3 TEST - NO SQLITE3 SUPPORT"
-endif
-
-ifeq (1,0)
-test-schema:
- @echo "STARTING SCHEMA MODULE TEST"
- $(srcdir)/tests/test-schema.sh
-else
-test-schema:
- @echo "SKIPPING SCHEMA MODULE TEST"
-endif
-
-installcheck: install test-tdb test-ldap test-sqlite3 test-schema
+installcheck: install tests
+ for t in $(TESTS); do echo STARTING $${t}; $(srcdir)/tests/$${t} || exit 1; done
test: installcheck
diff --git a/source4/lib/ldb/configure.in b/source4/lib/ldb/configure.in
index b3a58b56fc..9fc628280b 100644
--- a/source4/lib/ldb/configure.in
+++ b/source4/lib/ldb/configure.in
@@ -13,12 +13,22 @@ AC_DEFUN([SMB_EXT_LIB], [echo -n ""])
AC_DEFUN([SMB_ENABLE], [echo -n ""])
AC_INIT(include/ldb.h)
AC_CONFIG_SRCDIR([common/ldb.c])
+AC_PROG_CC
+
+if test "$ac_cv_prog_gcc" = yes; then
+ CFLAGS="$CFLAGS -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings"
+fi
+
WITH_GCOV=0
AC_ARG_ENABLE(gcov,
AS_HELP_STRING([--enable-gcov],[enable GCOV code coverage tests]),
[ WITH_GCOV=1])
AC_SUBST(WITH_GCOV)
-AC_PROG_CC
+if test x"$with_gcov_support" = x"yes"; then
+ CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs"
+ LIBS="$LIBS -lgcov"
+fi
+
AC_SYS_LARGEFILE
AC_FUNC_MMAP
AC_PATH_PROG(XSLTPROC,xsltproc)
@@ -38,12 +48,28 @@ AC_SUBST(MODULESDIR)
sinclude(popt.m4)
+TESTS=""
+EXTRA_OBJ=""
+
sinclude(ldap.m4)
-WITH_LDAP=$with_ldap_support
-AC_SUBST(WITH_LDAP)
+if test x"$with_ldap_support" = x"yes"; then
+ LIBS="$LIBS -L/usr/lib -llber -lldap"
+ CFLAGS="$CFLAGS -DHAVE_LDAP=1"
+ EXTRA_OBJ="$EXTRA_OBJ ldb_ldap/ldb_ldap.o"
+ TESTS="$TESTS test-ldap.sh"
+fi
+
sinclude(sqlite3.m4)
-WITH_SQLITE3=$with_sqlite3_support
-AC_SUBST(WITH_SQLITE3)
+if test x"$with_sqlite3_support" = x"yes"; then
+ LIBS="$LIBS -L/usr/lib -lsqlite3"
+ CFLAGS="$CFLAGS -DHAVE_SQLITE3=1"
+ EXTRA_OBJ="$EXTRA_OBJ ldb_sqlite3/ldb_sqlite3.o"
+ TESTS="$TESTS test-sqlite3.sh"
+fi
+
+AC_SUBST(TESTS)
+AC_SUBST(EXTRA_OBJ)
+
sinclude(config.m4)
sinclude(../talloc/config.m4)
sinclude(../tdb/config.m4)