s3-waf: avoid exporting init symbols from statically linked modules
[gd/samba-autobuild/.git] / source3 / wscript_build
index 66171bfe6c37c43db2a81706195d48624a034ac4..ca08ed8c42e94eb3d585c704289ae78719b5bd1b 100755 (executable)
@@ -692,14 +692,30 @@ bld.SAMBA3_SUBSYSTEM('TLDAP',
                     source=TLDAP_SRC,
                     deps='asn1util LIBTSOCKET')
 
+static_pdb_modules = ['tdbsam', 'ldap', 'smbpasswd', 'wbc_sam']
+static_pdb_match = filter(lambda x: bld.SAMBA3_IS_STATIC_MODULE('pdb_%s' % x), static_pdb_modules)
+private_pdb_match = []
+if bld.SAMBA3_IS_STATIC_MODULE('pdb_samba_dsdb') and bld.AD_DC_BUILD_IS_ENABLED():
+    static_pdb_match.append('samba_dsdb')
+    private_pdb_match.append('!idmap_init')
+    private_pdb_match.append('!idmap_sids_to_xids')
+    private_pdb_match.append('!idmap_xids_to_sids')
+
+private_pdb_match = private_pdb_match + map(lambda x: '!pdb_%s_init' % x, static_pdb_match)
+
 bld.SAMBA3_LIBRARY('pdb',
                    source=PASSDB_SRC,
                    deps='secrets3 GROUPDB SERVER_MUTEX wbclient LIBCLI_AUTH flag_mapping',
-                   private_library=True,
+                   private_library=False,
+                   pc_files=[],
+                   public_headers_install=True,
                    public_headers='''
                                include/passdb.h
                                passdb/machine_sid.h
                                passdb/lookup_sid.h''',
+                   abi_match=private_pdb_match + ['*'],
+                   abi_directory='passdb/ABI',
+                   vnum='0',
                    vars=locals())
 
 bld.SAMBA3_SUBSYSTEM('SERVER_MUTEX',