mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
6fda57d309
Thanks to Rowland for a clear description of the behaviour for the smb.conf manpage. This means that those not wanting to link to libarchive will just need to build --without-json-audit. In general, we prefer that optional libraries be required by default so that they are not accidentially missed, particularly in packages. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
36 lines
1.3 KiB
Python
36 lines
1.3 KiB
Python
#!/usr/bin/env python
|
|
|
|
import Logs, Options, Utils
|
|
import samba3
|
|
|
|
def set_options(opt):
|
|
help = ("Build with JSON auth audit support (default=True). "
|
|
"This requires the jansson devel package.")
|
|
|
|
opt.SAMBA3_ADD_OPTION('json-audit', default=None, help=(help))
|
|
|
|
return
|
|
|
|
def configure(conf):
|
|
conf.SET_TARGET_TYPE('jansson', '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 != False:
|
|
conf.fatal("JSON support not found. "
|
|
"Try installing libjansson-dev or jansson-devel. "
|
|
"Otherwise, use --without-json-audit to build without "
|
|
"JSON support. "
|
|
"JSON support is required for the JSON "
|
|
"formatted audit log feature")
|
|
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")
|
|
|