diff options
author | Björn Baumbach <bb@sernet.de> | 2018-04-17 15:47:58 +0200 |
---|---|---|
committer | Björn Baumbach <bbaumbach@samba.org> | 2018-04-18 15:25:42 +0200 |
commit | cc1eed99bda3773dc13e927f1df1c4fd72e4b848 (patch) | |
tree | 4df102dc87b7abacfdf04930a57d31af8f11ce5a /auth | |
parent | fc473cd28261478cc9c3232b43fc725f0468f8a9 (diff) | |
download | samba-cc1eed99bda3773dc13e927f1df1c4fd72e4b848.tar.gz |
build: add option to choose to build with or without JSON audit support
Add a new configure option:
--with-json-audit
Build with JSON auth audit support (default=auto). This requires
the jansson devel package.
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): <bbaumbach@samba.org>
Autobuild-Date(master): Wed Apr 18 15:25:42 CEST 2018 on sn-devel-144
Diffstat (limited to 'auth')
-rw-r--r-- | auth/wscript | 31 | ||||
-rw-r--r-- | auth/wscript_configure | 16 |
2 files changed, 31 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') |