summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-28 16:38:27 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:13 +1000
commitbfbf43cc36ab360b34b49d7e07c2f594e2b7e7c9 (patch)
tree35e0b133c53a859c90962d0678b0e5218943b6f8 /source4
parent505e902436b2a31a7b828fdeddf599339d0229e5 (diff)
downloadsamba-bfbf43cc36ab360b34b49d7e07c2f594e2b7e7c9.tar.gz
samba-bfbf43cc36ab360b34b49d7e07c2f594e2b7e7c9.tar.bz2
samba-bfbf43cc36ab360b34b49d7e07c2f594e2b7e7c9.zip
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.
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/wscript18
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',