summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-04-11 01:26:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:11 -0500
commit0446e6addd5de78880f30df70424bc608ba062dd (patch)
treeeb9dd31e94b71415ed031eb6af85ce7f2ff0ba60 /source4/lib
parentac193579e7db00c7a2ea0aadaaf0d34c10dcf1a5 (diff)
downloadsamba-0446e6addd5de78880f30df70424bc608ba062dd.tar.gz
samba-0446e6addd5de78880f30df70424bc608ba062dd.tar.bz2
samba-0446e6addd5de78880f30df70424bc608ba062dd.zip
r157: cope with or without LDAP in ldb sample Makefile
(This used to be commit 5004159bf93ccb62d056fa67c18f4a52cdbb2026)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/Makefile.ldb18
1 files changed, 13 insertions, 5 deletions
diff --git a/source4/lib/ldb/Makefile.ldb b/source4/lib/ldb/Makefile.ldb
index 2a41629852..f1b2c8ad21 100644
--- a/source4/lib/ldb/Makefile.ldb
+++ b/source4/lib/ldb/Makefile.ldb
@@ -1,16 +1,24 @@
-OPENLDAP=/home/tridge/samba/openldap/prefix
-TDBDIR=../tdb
-CFLAGS=-Wall -g -Iinclude -I. -I.. -DSTANDALONE=1 -DUSE_MMAP=1
+# ldap support is optional edit WITH_LDAP to suit
+WITH_LDAP=0
+
+ifeq ($(WITH_LDAP),1)
+OPENLDAP_PREFIX=/home/tridge/samba/openldap/prefix
+LDAP_LIBS=-L$(OPENLDAP_PREFIX)/lib -lldap
+LDAP_FLAGS=-DHAVE_LDAP=1
+LDB_LDAP_OBJ=ldb_ldap/ldb_ldap.o
+endif
+
+TDBDIR=../tdb
-LIB_FLAGS=-Llib -lldb -L$(OPENLDAP)/lib -lldap
+CFLAGS=-Wall -g -Iinclude -I. -I.. -DSTANDALONE=1 -DUSE_MMAP=1 $(LDAP_FLAGS)
+LIB_FLAGS=-Llib -lldb $(LDAP_LIBS)
TDB_OBJ=$(TDBDIR)/tdb.o $(TDBDIR)/spinlock.o
LDB_TDB_OBJ=ldb_tdb/ldb_match.o ldb_tdb/ldb_tdb.o \
ldb_tdb/ldb_pack.o ldb_tdb/ldb_search.o ldb_tdb/ldb_index.o
-LDB_LDAP_OBJ=ldb_ldap/ldb_ldap.o
COMMON_OBJ=common/ldb.o common/ldb_ldif.o common/util.o \
common/ldb_parse.o common/ldb_msg.o