s4-ldb: enable waf build of ldb without ldap backend
authorAndrew Tridgell <tridge@samba.org>
Mon, 12 Apr 2010 12:56:44 +0000 (22:56 +1000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 12 Apr 2010 13:13:30 +0000 (23:13 +1000)
this is useful for cross-compilation testing, where getting all the
ldap deps installed can be hard

source4/lib/ldb/wscript

index 911eb77fb227b0acedff23ece25acd7ac34b994e..d796bc00116d1c04db121d605b3361c8ae603e09 100644 (file)
@@ -44,7 +44,8 @@ def configure(conf):
                                      implied_deps='replace talloc tdb tevent'):
             conf.define('USING_SYSTEM_LDB', 1)
         # we need this for the ldap backend
-        conf.CHECK_FUNCS_IN('ber_flush ldap_open', 'lber ldap', headers='lber.h ldap.h', mandatory=True)
+        if conf.CHECK_FUNCS_IN('ber_flush ldap_open', 'lber ldap', headers='lber.h ldap.h'):
+            conf.env.ENABLE_LDAP_BACKEND = True
 
     conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
 
@@ -133,7 +134,7 @@ def build(bld):
     bld.SAMBA_MODULE('ldb_ldap', 'ldb_ldap/ldb_ldap.c',
                      init_function='LDB_BACKEND(ldapi),LDB_BACKEND(ldaps),LDB_BACKEND(ldap)',
                      deps='talloc lber ldap',
-                     enabled=not s4_build,
+                     enabled=bld.env.ENABLE_LDAP_BACKEND,
                      subsystem='LIBLDB')
 
     # we're not currently linking against the ldap libs, but ldb.pc.in