s3-waf: Allow using --enable/--disable options as well
authorKai Blin <kai@samba.org>
Sun, 11 Apr 2010 08:34:12 +0000 (10:34 +0200)
committerKai Blin <kai@samba.org>
Thu, 20 May 2010 20:16:13 +0000 (22:16 +0200)
buildtools/wafsamba/samba3.py
source3/wscript

index ebf2565146a0aacd0a236565e9c1f5ea869adae8..9f9bc09cbccd7419bc9dc5448e79664ee961633e 100644 (file)
@@ -4,14 +4,15 @@
 import Options
 from optparse import SUPPRESS_HELP
 
-def SAMBA3_ADD_OPTION(opt, option, help=(), dest=None, default=True):
+def SAMBA3_ADD_OPTION(opt, option, help=(), dest=None, default=True,
+                      with_name="with", without_name="without"):
     if help == ():
         help = ("Build with %s support" % option)
     if dest is None:
         dest = "with_%s" % option
 
-    with_val = "--with-%s" % option
-    without_val = "--without-%s" % option
+    with_val = "--%s-%s" % (with_name, option)
+    without_val = "--%s-%s" % (without_name, option)
 
     opt.add_option(with_val, help=help, action="store_true", dest=dest,
                    default=default)
index ef06a7e7b01ca8adde56036692f3b18d8694a809..aaf8522d26d60a0f53cc1a03c3f90493f6be29b2 100644 (file)
@@ -29,7 +29,7 @@ def set_options(opt):
 
     opt.SAMBA3_ADD_OPTION('winbind')
     opt.SAMBA3_ADD_OPTION('ads')
-    opt.SAMBA3_ADD_OPTION('cups')
+    opt.SAMBA3_ADD_OPTION('cups', with_name="enable", without_name="disable")
 
 
 def configure(conf):