summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2010-04-11 10:34:12 +0200
committerKai Blin <kai@samba.org>2010-05-20 22:16:13 +0200
commit771a8c17afbb287297958de1f8a017c96507db78 (patch)
tree06ba23e6f8085bd20181b04a26daa221189dc3e7
parent99a2171f8b7ea1e2fda1060e07b2d7cd0ba5c8ae (diff)
downloadsamba-771a8c17afbb287297958de1f8a017c96507db78.tar.gz
samba-771a8c17afbb287297958de1f8a017c96507db78.tar.bz2
samba-771a8c17afbb287297958de1f8a017c96507db78.zip
s3-waf: Allow using --enable/--disable options as well
-rw-r--r--buildtools/wafsamba/samba3.py7
-rw-r--r--source3/wscript2
2 files changed, 5 insertions, 4 deletions
diff --git a/buildtools/wafsamba/samba3.py b/buildtools/wafsamba/samba3.py
index ebf2565146..9f9bc09cbc 100644
--- a/buildtools/wafsamba/samba3.py
+++ b/buildtools/wafsamba/samba3.py
@@ -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)
diff --git a/source3/wscript b/source3/wscript
index ef06a7e7b0..aaf8522d26 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -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):