Rev 12051: Set _CFLAGS variables rather than putting knowledge in	the ldb Makefile. in file:///home/jelmer/bzr.samba/SAMBA_4_0/ At file:///home/jelmer/bzr.samba/SAMBA_4_0/

------------------------------------------------------------
revno: 12051
revision-id: jelmer@samba.org-20070430095236-s1jiamoj4s5hnhj0
parent: svn-v2:22595@0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0
committer: Jelmer Vernooij 
branch nick: SAMBA_4_0
timestamp: Mon 2007-04-30 11:52:36 +0200
message:
  Set _CFLAGS variables rather than putting knowledge in the ldb Makefile. 
  This should make it easier to allow use of system tdb or talloc libs using 
  pkg-config.
modified:
  source/lib/ldb/Makefile.in     svn-v2:6442@0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2flib%2fldb%2fMakefile.in
  source/lib/talloc/libtalloc.m4 svn-v2:18083@0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2flib%2ftalloc%2flibtalloc.m4
  source/lib/tdb/libtdb.m4       svn-v2:18108@0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2flib%2ftdb%2flibtdb.m4
=== modified file 'source/lib/ldb/Makefile.in'
--- a/source/lib/ldb/Makefile.in	2006-11-16 11:15:02 +0000
+++ b/source/lib/ldb/Makefile.in	2007-04-30 09:52:36 +0000
@@ -18,11 +18,20 @@
 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 \\

=== modified file 'source/lib/talloc/libtalloc.m4'
--- a/source/lib/talloc/libtalloc.m4	2006-09-18 01:31:57 +0000
+++ b/source/lib/talloc/libtalloc.m4	2007-04-30 09:52:36 +0000
@@ -15,6 +15,9 @@
 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)
 

=== modified file 'source/lib/tdb/libtdb.m4'
--- a/source/lib/tdb/libtdb.m4	2006-11-30 03:25:07 +0000
+++ b/source/lib/tdb/libtdb.m4	2007-04-30 09:52:36 +0000
@@ -17,6 +17,9 @@
 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)
 

