summaryrefslogtreecommitdiff
path: root/dynconfig/wscript
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-06-21 12:09:40 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-13 08:22:38 +0200
commit9f0a70535c4cd3a06edfddbd330738b4d5d7e541 (patch)
tree904d4a2a53982c10cd929da23ee01895a0cd38dc /dynconfig/wscript
parentd89947ef125fe9e8837db0a9f376d068d62ae66e (diff)
downloadsamba-9f0a70535c4cd3a06edfddbd330738b4d5d7e541.tar.gz
samba-9f0a70535c4cd3a06edfddbd330738b4d5d7e541.tar.bz2
samba-9f0a70535c4cd3a06edfddbd330738b4d5d7e541.zip
dynconfig: remember which options still have their default value
If the values are explicit specified on the command line, we need to keep them. metze
Diffstat (limited to 'dynconfig/wscript')
-rwxr-xr-xdynconfig/wscript12
1 files changed, 10 insertions, 2 deletions
diff --git a/dynconfig/wscript b/dynconfig/wscript
index 6dcc362450..524cbd8cef 100755
--- a/dynconfig/wscript
+++ b/dynconfig/wscript
@@ -100,23 +100,31 @@ def set_options(opt):
def configure(conf):
# get all the basic GNU options from the gnu_dirs tool
+
+ explicit_set = {}
+
for option in dir_options.keys():
+ default = dir_options[option][0]
varname = get_varname(option)
value = getattr(Options.options, varname, None)
conf.ASSERT(value is not None, "Missing configure option %s" % varname)
conf.ASSERT(varname not in conf.env, "Variable %s already defined" % varname)
conf.env[varname] = value
+ if value is not default:
+ explicit_set[varname] = "%s:%s" % (default, value)
for f in dyn_cflags.keys():
v = EXPAND_VARIABLES(conf, dyn_cflags[f])
conf.ASSERT(v != '', "Empty dynconfig value for %s" % f)
- conf.env[f] = v
+ if f not in explicit_set:
+ conf.env[f] = v
if Options.options.ENABLE_FHS:
for f in dyn_cflags_fhs.keys():
v = EXPAND_VARIABLES(conf, dyn_cflags_fhs[f])
conf.ASSERT(v != '', "Empty dynconfig value for %s" % f)
- conf.env[f] = v
+ if f not in explicit_set:
+ conf.env[f] = v
if (not Options.options.ENABLE_FHS and
(conf.env.PREFIX == '/usr' or conf.env.PREFIX == '/usr/local')):