diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/ldb/wscript | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source4/lib/ldb/wscript b/source4/lib/ldb/wscript index ad875374db..97e345b834 100644 --- a/source4/lib/ldb/wscript +++ b/source4/lib/ldb/wscript @@ -27,7 +27,10 @@ def configure(conf): s4_build = getattr(conf.env, '_SAMBA_BUILD_', 0) == 4 + if not s4_build: + if conf.CHECK_BUNDLED_SYSTEM('ldb', minversion=VERSION): + 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) @@ -130,13 +133,14 @@ def build(bld): if s4_build: ldb_deps += ' LDBSAMBA POPT_CREDENTIALS POPT_SAMBA LIBCMDLINE_CREDENTIALS gensec' - bld.SAMBA_LIBRARY('ldb', - COMMON_SRC + ' ' + LDB_MAP_SRC, - deps=ldb_deps, - includes='include', - public_headers='include/ldb.h include/ldb_errors.h', - pc_files='ldb.pc', - vnum=VERSION) + if not bld.CONFIG_SET('USING_SYSTEM_LDB'): + bld.SAMBA_LIBRARY('ldb', + COMMON_SRC + ' ' + LDB_MAP_SRC, + deps=ldb_deps, + includes='include', + public_headers='include/ldb.h include/ldb_errors.h', + pc_files='ldb.pc', + vnum=VERSION) bld.SAMBA_SUBSYSTEM('LIBLDB_CMDLINE', 'tools/ldbutil.c tools/cmdline.c', |