summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auth/wscript31
-rw-r--r--auth/wscript_configure16
-rw-r--r--wscript2
3 files changed, 33 insertions, 16 deletions
diff --git a/auth/wscript b/auth/wscript
new file mode 100644
index 00000000000..6b769c5efad
--- /dev/null
+++ b/auth/wscript
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+import Logs, Options, Utils
+import samba3
+
+def set_options(opt):
+ help = ("Build with JSON auth audit support (default=auto). "
+ "This requires the jansson devel package.")
+
+ opt.SAMBA3_ADD_OPTION('json-audit', default=None, help=(help))
+
+ return
+
+def configure(conf):
+ conf.SET_TARGET_TYPE('json-audit', 'EMPTY')
+
+ if Options.options.with_json_audit != False:
+ if conf.CHECK_CFG(package='jansson', args='--cflags --libs',
+ msg='Checking for jansson'):
+ conf.CHECK_FUNCS_IN('json_object', 'jansson')
+
+ if not conf.CONFIG_GET('HAVE_JSON_OBJECT'):
+ if Options.options.with_json_audit == True:
+ conf.fatal('JSON support requested, but no suitable jansson '
+ 'library found')
+ if conf.CONFIG_GET('ENABLE_SELFTEST') and \
+ (not Options.options.without_ad_dc):
+ raise Utils.WafError('jansson JSON library required for '
+ '--enable-selftest when building the AD DC')
+ Logs.info("Building without jansson json log support")
+
diff --git a/auth/wscript_configure b/auth/wscript_configure
deleted file mode 100644
index 9d930bab61c..00000000000
--- a/auth/wscript_configure
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env python
-
-import Options, Utils
-
-conf.SET_TARGET_TYPE('jansson', 'EMPTY')
-
-if conf.CHECK_CFG(package='jansson', args='--cflags --libs',
- msg='Checking for jansson'):
- conf.CHECK_FUNCS_IN('json_object', 'jansson')
-
-if not conf.CONFIG_GET('HAVE_JSON_OBJECT') and \
- conf.CONFIG_GET('ENABLE_SELFTEST') and \
- (not Options.options.without_ad_dc):
- raise Utils.WafError('jansson JSON library required for '
- '--enable-selftest '
- 'when building the AD DC')
diff --git a/wscript b/wscript
index 0985aa94867..b45146c31b2 100644
--- a/wscript
+++ b/wscript
@@ -35,6 +35,7 @@ def system_mitkrb5_callback(option, opt, value, parser):
def set_options(opt):
opt.BUILTIN_DEFAULT('NONE')
opt.PRIVATE_EXTENSION_DEFAULT('samba4')
+ opt.RECURSE('auth')
opt.RECURSE('lib/replace')
opt.RECURSE('dynconfig')
opt.RECURSE('packaging')
@@ -205,6 +206,7 @@ def configure(conf):
# system-provided or embedded Heimdal build
if conf.CONFIG_GET('KRB5_VENDOR') in (None, 'heimdal'):
conf.RECURSE('source4/heimdal_build')
+ conf.RECURSE('auth')
conf.RECURSE('source4/lib/tls')
conf.RECURSE('source4/dsdb/samdb/ldb_modules')
conf.RECURSE('source4/ntvfs/sysdep')