r25100: Include LDAP libs in .pc file so linking statically against libldb works...
authorJelmer Vernooij <jelmer@samba.org>
Tue, 11 Sep 2007 18:24:09 +0000 (18:24 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:06:37 +0000 (15:06 -0500)
source/lib/ldb/Makefile.in
source/lib/ldb/configure.ac
source/lib/ldb/ldb.pc.in
source/lib/ldb/tools/config.mk

index 4a4585d861f88a8e7b44e6593d0d34625ce1d411..75f1767550a073663c65552f519f31161251d539 100644 (file)
@@ -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 \
index 776877111b2ec3c86b4038d4534be4aa4c56292b..6f19d882909cec2da716c88017ec6db10df507ba 100644 (file)
@@ -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
 
index 4a9714ca5467e7c3b1dfc750da42ff9329fa8954..248fb05c4fc89eeb7acc1944e54c8307aa50ed6d 100644 (file)
@@ -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/
index 19ff94367798505893c908a6eecf51005a87dc6b..bf6c5f963c4f1992c0bbb77d23b0dba62e81ac8d 100644 (file)
@@ -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