mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
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
This commit is contained in:
parent
fc473cd282
commit
cc1eed99bd
31
auth/wscript
Normal file
31
auth/wscript
Normal file
@ -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")
|
||||
|
@ -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')
|
2
wscript
2
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')
|
||||
|
Loading…
Reference in New Issue
Block a user