r22596: Set _CFLAGS variables rather than putting knowledge in the ldb Makefile.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 30 Apr 2007 08:53:56 +0000 (08:53 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:51:48 +0000 (14:51 -0500)
This should make it easier to allow use of system tdb or talloc libs using
pkg-config.

source/lib/ldb/Makefile.in
source/lib/talloc/libtalloc.m4
source/lib/tdb/libtdb.m4

index a091b4832ebe87f83f652076a7dfe390e73df7a5..d971581c41ee27a522c812f7d42714150ce54f5c 100644 (file)
@@ -18,11 +18,20 @@ SLAPD = @SLAPD@
 EXTRA_OBJ=@EXTRA_OBJ@
 TESTS=test-tdb.sh @TESTS@
 
+TALLOC_LIBS = @TALLOC_LIBS@
+TALLOC_CFLAGS = @TALLOC_CFLAGS@
+
+TDB_LIBS = @TDB_LIBS@
+TDB_CFLAGS = @TDB_CFLAGS@
+
+POPT_LIBS = @POPT_LIBS@
+POPT_CFLAGS = @POPT_CFLAGS@
+
 CFLAGS=-g -I$(srcdir)/include -Iinclude -I$(srcdir) -I$(srcdir)/.. \
-       @POPT_CFLAGS@ -I@tallocdir@ -I@tdbdir@/include -I@libreplacedir@ \
+       $(POPT_CFLAGS) $(TALLOC_CFLAGS) $(TDB_CFLAGS) -I@libreplacedir@ \
        -DLIBDIR=\"$(libdir)\" -DSHLIBEXT=\"@SHLIBEXT@\" -DUSE_MMAP=1 @CFLAGS@
 
-LIB_FLAGS=@LDFLAGS@ -Llib -lldb @LIBS@ @POPT_LIBS@
+LIB_FLAGS=@LDFLAGS@ -Llib -lldb @LIBS@ $(POPT_LIBS)
 
 LDB_TDB_DIR=ldb_tdb
 LDB_TDB_OBJ=$(LDB_TDB_DIR)/ldb_tdb.o \
index 4a0ee3c8fc5bfa7e8be4ba9f12a5dba4c7318579..d364729ec03f6ea61cacd2b7c2f511ab9879babd 100644 (file)
@@ -15,6 +15,9 @@ fi
 TALLOCOBJ="talloc.o"
 AC_SUBST(TALLOCOBJ)
 
+TALLOC_CFLAGS="-I$tallocdir"
+AC_SUBST(TALLOC_CFLAGS)
+
 AC_CHECK_SIZEOF(size_t,cross)
 AC_CHECK_SIZEOF(void *,cross)
 
index fefa5912c265858e373cdc5ed70ae942e7b5991d..58523fc2dc2ca325f89b2309ff2a73a6ff3653c5 100644 (file)
@@ -17,6 +17,9 @@ TDBOBJ="$TDBOBJ common/freelist.o common/freelistcheck.o common/io.o common/lock
 AC_SUBST(TDBOBJ)
 AC_SUBST(LIBREPLACEOBJ)
 
+TDB_CFLAGS="-I$tdbdir/include"
+AC_SUBST(TDB_CFLAGS)
+
 AC_CHECK_FUNCS(mmap pread pwrite getpagesize utime)
 AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h)