From bfbf43cc36ab360b34b49d7e07c2f594e2b7e7c9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Mar 2010 16:38:27 +1100 Subject: s4-waf: support the use of system libraries distros can set --bundled-libraries=NONE to force use of all system libraries. If the right version isn't found then configure will fail. Users may choose which libraries to use from the system, and which to use bundled libs. The default is to try system libs, and use them if their version matches the one in the source tree. --- source4/lib/ldb/wscript | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'source4') 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', -- cgit