3 import Logs, Options, Utils
7 help = ("Build with JSON auth audit support (default=True). "
8 "This requires the jansson devel package.")
10 opt.SAMBA3_ADD_OPTION('json-audit', default=None, help=(help))
15 conf.SET_TARGET_TYPE('jansson', 'EMPTY')
17 if Options.options.with_json_audit != False:
18 if conf.CHECK_CFG(package='jansson', args='--cflags --libs',
19 msg='Checking for jansson'):
20 conf.CHECK_FUNCS_IN('json_object', 'jansson')
22 if not conf.CONFIG_GET('HAVE_JSON_OBJECT'):
23 if Options.options.with_json_audit != False:
24 conf.fatal("Jansson JSON support not found. "
25 "Try installing libjansson-dev or jansson-devel. "
26 "Otherwise, use --without-json-audit to build without "
28 "JSON support is required for the JSON "
29 "formatted audit log feature and the AD DC")
30 if not Options.options.without_ad_dc:
31 raise Utils.WafError('--without-json-audit requires '
33 'Jansson JSON library is required for '
35 Logs.info("Building without Jansson JSON log support")