blob: ebf2565146a0aacd0a236565e9c1f5ea869adae8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# a waf tool to add autoconf-like macros to the configure section
# and for SAMBA_ macros for building libraries, binaries etc
import Options
from optparse import SUPPRESS_HELP
def SAMBA3_ADD_OPTION(opt, option, help=(), dest=None, default=True):
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
opt.add_option(with_val, help=help, action="store_true", dest=dest,
default=default)
opt.add_option(without_val, help=SUPPRESS_HELP, action="store_false",
dest=dest)
Options.Handler.SAMBA3_ADD_OPTION = SAMBA3_ADD_OPTION
|