summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct12
1 files changed, 11 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 4fd1b86f54..705ef4881c 100644
--- a/SConstruct
+++ b/SConstruct
@@ -189,7 +189,17 @@ for k in platform_opts.keys():
opts.Add(o)
for x in module_list:
- opts.Add(BoolVariable('module_' + x + '_enabled', "Enable module '%s'" % (x, ), True))
+ module_enabled = True
+ tmppath = "./modules/" + x
+ sys.path.append(tmppath)
+ try:
+ import config
+ if (not config.is_enabled()):
+ module_enabled = False
+ except:
+ pass
+ sys.path.remove(tmppath)
+ opts.Add(BoolVariable('module_' + x + '_enabled', "Enable module '%s'" % (x, ), module_enabled))
opts.Update(env_base) # update environment
Help(opts.GenerateHelpText(env_base)) # generate help