selftest: Require jansson support for selftest of the AD DC
[vlendec/samba-autobuild/.git] / auth / wscript_configure
index 47943fa1e9ca219b02b081111c73dee5bed56969..9d930bab61c057042ffaff1a0881b96c41fd009c 100644 (file)
@@ -1,7 +1,16 @@
 #!/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')