summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-11 18:24:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:06:37 -0500
commit0ca0c0e5a294d3f3f07ef179793c918bcb128356 (patch)
treed6b161fb34328347ab99d61ea2aefb31ca0f242f /source4
parent669adc9f4a77ef2fcb6d81e9dd86c8b5d01e17ee (diff)
downloadsamba-0ca0c0e5a294d3f3f07ef179793c918bcb128356.tar.gz
samba-0ca0c0e5a294d3f3f07ef179793c918bcb128356.tar.bz2
samba-0ca0c0e5a294d3f3f07ef179793c918bcb128356.zip
r25100: Include LDAP libs in .pc file so linking statically against libldb works again.
(This used to be commit bcf5c9447435a826027626ac89a00eaa6739b12a)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/Makefile.in5
-rw-r--r--source4/lib/ldb/configure.ac3
-rw-r--r--source4/lib/ldb/ldb.pc.in1
-rw-r--r--source4/lib/ldb/tools/config.mk2
4 files changed, 8 insertions, 3 deletions
diff --git a/source4/lib/ldb/Makefile.in b/source4/lib/ldb/Makefile.in
index 4a4585d861..75f1767550 100644
--- a/source4/lib/ldb/Makefile.in
+++ b/source4/lib/ldb/Makefile.in
@@ -30,11 +30,14 @@ POPT_LIBS = @POPT_LIBS@
POPT_CFLAGS = @POPT_CFLAGS@
POPT_OBJ = @POPT_OBJ@
+LDAP_LIBS = @LDAP_LIBS@
+
CFLAGS=-g -I$(srcdir)/include -Iinclude -I$(srcdir) -I$(srcdir)/.. \
$(POPT_CFLAGS) $(TALLOC_CFLAGS) $(TDB_CFLAGS) \
-DLIBDIR=\"$(libdir)\" -DSHLIBEXT=\"@SHLIBEXT@\" -DUSE_MMAP=1 @CFLAGS@
-LIB_FLAGS=@LDFLAGS@ -Llib -lldb @LIBS@ $(POPT_LIBS) $(TALLOC_LIBS) $(TDB_LIBS)
+LIB_FLAGS=@LDFLAGS@ -Llib -lldb @LIBS@ $(POPT_LIBS) $(TALLOC_LIBS) $(TDB_LIBS) \
+ $(LDAP_LIBS)
LDB_TDB_DIR=ldb_tdb
LDB_TDB_OBJ=$(LDB_TDB_DIR)/ldb_tdb.o \
diff --git a/source4/lib/ldb/configure.ac b/source4/lib/ldb/configure.ac
index 776877111b..6f19d88290 100644
--- a/source4/lib/ldb/configure.ac
+++ b/source4/lib/ldb/configure.ac
@@ -53,9 +53,10 @@ m4_include(libtdb.m4)
m4_include(ldap.m4)
if test x"$with_ldap_support" = x"yes"; then
- LIBS="$LIBS -llber -lldap"
CFLAGS="$CFLAGS -DHAVE_LDB_LDAP=1"
EXTRA_OBJ="$EXTRA_OBJ ldb_ldap/ldb_ldap.o"
+ LDAP_LIBS="-llber -lldap"
+ AC_SUBST(LDAP_LIBS)
TESTS="$TESTS test-ldap.sh"
fi
diff --git a/source4/lib/ldb/ldb.pc.in b/source4/lib/ldb/ldb.pc.in
index 4a9714ca54..248fb05c4f 100644
--- a/source4/lib/ldb/ldb.pc.in
+++ b/source4/lib/ldb/ldb.pc.in
@@ -10,6 +10,7 @@ Version: @PACKAGE_VERSION@
Requires.private: tdb
Requires: talloc
Libs: -L${libdir} -lldb
+Libs.private: @LDAP_LIBS@
Cflags: -I${includedir}
Modulesdir: ${modulesdir}
URL: http://ldb.samba.org/
diff --git a/source4/lib/ldb/tools/config.mk b/source4/lib/ldb/tools/config.mk
index 19ff943677..bf6c5f963c 100644
--- a/source4/lib/ldb/tools/config.mk
+++ b/source4/lib/ldb/tools/config.mk
@@ -1,7 +1,7 @@
################################################
# Start SUBSYSTEM LIBLDB_CMDLINE
[SUBSYSTEM::LIBLDB_CMDLINE]
-CFLAGS = -Ilib/ldb
+CFLAGS = -Ilib/ldb -Ilib/ldb/include
OBJ_FILES= \
cmdline.o
PUBLIC_DEPENDENCIES = LIBLDB LIBPOPT