summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/common/ldb.c4
-rw-r--r--source4/lib/ldb/config.m46
2 files changed, 7 insertions, 3 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index 146745043f..e84473efab 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -52,11 +52,11 @@ struct ldb_context *ldb_connect(const char *url, unsigned int flags,
return ltdb_connect(url, flags, options);
}
-#ifdef HAVE_LDAP
+#if HAVE_LDAP
if (strncmp(url, "ldap", 4) == 0) {
return lldb_connect(url, flags, options);
}
-#endif /*HAVE_LDAP*/
+#endif
errno = EINVAL;
return NULL;
diff --git a/source4/lib/ldb/config.m4 b/source4/lib/ldb/config.m4
index 7c4749ab02..1541dd6736 100644
--- a/source4/lib/ldb/config.m4
+++ b/source4/lib/ldb/config.m4
@@ -1,3 +1,7 @@
+if test x"$HAVE_LDAP" = x"yes"; then
+SMB_SUBSYSTEM(LIBLDB_LDAP,[lib/ldb/ldb_ldap/ldb_ldap.o])
+fi
+
SMB_SUBSYSTEM(LIBLDB,[lib/ldb/common/ldb.o],
[lib/ldb/common/ldb_ldif.o \
lib/ldb/common/ldb_parse.o \
@@ -8,7 +12,7 @@ SMB_SUBSYSTEM(LIBLDB,[lib/ldb/common/ldb.o],
lib/ldb/ldb_tdb/ldb_pack.o \
lib/ldb/ldb_tdb/ldb_index.o \
lib/ldb/ldb_tdb/ldb_match.o \
- lib/ldb/ldb_ldap/ldb_ldap.o],
+ \$(LIBLDAP_LDAP_OBJS)],
lib/ldb/include/ldb.h)
SMB_SUBSYSTEM(LDBADD,[],