diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-03-28 13:01:36 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-06 20:27:12 +1000 |
commit | 00825ecf34c94da50892a071547f0051f1668efe (patch) | |
tree | 49b912134994a2b6317e22e050445f903a6a1c30 /source4/lib | |
parent | 80b60df439820a054c03d67ccccb8e0c674a36c0 (diff) | |
download | samba-00825ecf34c94da50892a071547f0051f1668efe.tar.gz samba-00825ecf34c94da50892a071547f0051f1668efe.tar.bz2 samba-00825ecf34c94da50892a071547f0051f1668efe.zip |
ldb-waf: rename libldb.so to libldb-s4.so if built as part of s4
Also include the ldap backend if not built as part of s4. In s4, we
use the ldapi backend.
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/ldb/wscript | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/source4/lib/ldb/wscript b/source4/lib/ldb/wscript index 988f95a8cd..4ba9c18a76 100644 --- a/source4/lib/ldb/wscript +++ b/source4/lib/ldb/wscript @@ -22,6 +22,13 @@ def configure(conf): # where does the default LIBDIR end up? in conf.env somewhere? # conf.CONFIG_PATH('LDB_MODULESDIR', conf.SUBST_ENV_VAR('MODULESDIR') + '/ldb') + + s4_build = getattr(conf.env, '_SAMBA_BUILD_', 0) == 4 + + if not s4_build: + # we need this for the ldap backend + conf.CHECK_FUNCS_IN('ber_flush ldap_open', 'lber ldap', headers='lber.h ldap.h', mandatory=True) + conf.SAMBA_CONFIG_H() def build(bld): @@ -95,12 +102,20 @@ def build(bld): deps='tdb', subsystem='LIBLDB') + # this is only in the s4 build bld.SAMBA_MODULE('ldb_ildap', 'ldb_ildap/ldb_ildap.c', init_function='LDB_BACKEND(ldapi),LDB_BACKEND(ldaps),LDB_BACKEND(ldap)', deps='talloc LIBCLI_LDAP CREDENTIALS', enabled=s4_build, subsystem='LIBLDB') + # this is not included in the s4 build + 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, + subsystem='LIBLDB') + # we're not currently linking against the ldap libs, but ldb.pc.in # has @LDAP_LIBS@ bld.env.LDAP_LIBS = '' @@ -111,9 +126,16 @@ def build(bld): ldb_deps = 'tevent LIBLDB' if s4_build: + # the s4 build of ldb is really quite different from the normal build + # so we give the library a different name to prevent problems with apps + # that may depend on the distro version of ldb + lib_name = 'ldb-s4' + bld.TARGET_ALIAS(lib_name, 'ldb') ldb_deps += ' LDBSAMBA POPT_CREDENTIALS POPT_SAMBA LIBCMDLINE_CREDENTIALS gensec' + else: + lib_name = 'ldb' - bld.SAMBA_LIBRARY('ldb', + bld.SAMBA_LIBRARY(lib_name, COMMON_SRC + ' ' + LDB_MAP_SRC, deps=ldb_deps, includes='include', |