summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildtools/wafsamba/samba3.py20
-rw-r--r--source3/wscript3
2 files changed, 23 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba3.py b/buildtools/wafsamba/samba3.py
index 5fa4c0fa74..9abb2abbec 100644
--- a/buildtools/wafsamba/samba3.py
+++ b/buildtools/wafsamba/samba3.py
@@ -2,6 +2,7 @@
# and for SAMBA_ macros for building libraries, binaries etc
import Options
+import Build
from optparse import SUPPRESS_HELP
def SAMBA3_ADD_OPTION(opt, option, help=(), dest=None, default=True,
@@ -21,3 +22,22 @@ def SAMBA3_ADD_OPTION(opt, option, help=(), dest=None, default=True,
opt.add_option(without_val, help=SUPPRESS_HELP, action="store_false",
dest=dest)
Options.Handler.SAMBA3_ADD_OPTION = SAMBA3_ADD_OPTION
+
+def SAMBA3_IS_STATIC_MODULE(bld, module):
+ '''Check whether module is in static list'''
+ if module.lower() in bld.env['static_modules']:
+ return True
+ return False
+Build.BuildContext.SAMBA3_IS_STATIC_MODULE = SAMBA3_IS_STATIC_MODULE
+
+def SAMBA3_IS_SHARED_MODULE(bld, module):
+ '''Check whether module is in shared list'''
+ if module.lower() in bld.env['shared_modules']:
+ return True
+ return False
+Build.BuildContext.SAMBA3_IS_SHARED_MODULE = SAMBA3_IS_SHARED_MODULE
+
+def SAMBA3_IS_ENABLED_MODULE(bld, module):
+ '''Check whether module is in either shared or static list '''
+ return SAMBA3_IS_STATIC_MODULE(bld, module) or SAMBA3_IS_SHARED_MODULE(bld, module)
+Build.BuildContext.SAMBA3_IS_ENABLED_MODULE = SAMBA3_IS_ENABLED_MODULE
diff --git a/source3/wscript b/source3/wscript
index 5bb8f69640..fc91858351 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -295,6 +295,9 @@ utimensat vsyslog _write __write __xstat
default_static_modules.remove(m)
default_shared_modules.append(m)
+ conf.env['static_modules'] = default_static_modules
+ conf.env['shared_modules'] = default_shared_modules
+
conf.DEFINE('STRING_STATIC_MODULES', ' '.join(default_static_modules), quote=True)
static_list = {}