waf: Only build pam_wrapper if we build with pam
authorAndreas Schneider <asn@samba.org>
Mon, 10 Apr 2017 05:50:41 +0000 (07:50 +0200)
committerUri Simchoni <uri@samba.org>
Wed, 12 Apr 2017 10:54:24 +0000 (12:54 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
selftest/tests.py
wscript
wscript_build

index d962a66f4e63cc9052acd7e08f77d3a2abaaea4f..e3dd91414d98ef96ea431512b9eea5ac0fbca564 100644 (file)
@@ -39,6 +39,7 @@ finally:
 
 have_man_pages_support = ("XSLTPROC_MANPAGES" in config_hash)
 with_cmocka = ("HAVE_CMOCKA" in config_hash)
+with_pam = ("WITH_PAM" in config_hash)
 pam_wrapper_so_path=config_hash["LIBPAM_WRAPPER_SO_PATH"]
 
 planpythontestsuite("none", "samba.tests.source")
@@ -137,8 +138,9 @@ plantestsuite(
      configuration])
 planpythontestsuite("none", "samba.tests.glue", py3_compatible=True)
 
-plantestsuite("samba.tests.pam_winbind", "ad_member",
-              [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"), valgrindify(python), pam_wrapper_so_path])
+if with_pam:
+    plantestsuite("samba.tests.pam_winbind", "ad_member",
+                  [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"), valgrindify(python), pam_wrapper_so_path])
 
 if with_cmocka:
     plantestsuite("samba.unittests.krb5samba", "none",
diff --git a/wscript b/wscript
index 5a82c61472a8d22436f4c06e015e1882ee8cdf2a..de85591223c8d8aa62479c6d6a7c13d42211dd59 100644 (file)
--- a/wscript
+++ b/wscript
@@ -179,10 +179,11 @@ def configure(conf):
     conf.RECURSE('selftest')
     if conf.CONFIG_GET('ENABLE_SELFTEST'):
         conf.RECURSE('lib/nss_wrapper')
-        conf.RECURSE('lib/pam_wrapper')
         conf.RECURSE('lib/resolv_wrapper')
         conf.RECURSE('lib/socket_wrapper')
         conf.RECURSE('lib/uid_wrapper')
+        if Options.options.with_pam:
+            conf.RECURSE('lib/pam_wrapper')
         if Options.options.with_ntvfs_fileserver != False:
             if not (Options.options.without_ad_dc or Options.options.with_system_mitkrb5):
                 conf.DEFINE('WITH_NTVFS_FILESERVER', 1)
index 59e0bdfa4ccaa213d86a6baed6f463bd27cf9436..2ddcdcc8557011068289f645402f2b3b3c9fe1b0 100644 (file)
@@ -69,7 +69,7 @@ bld.RECURSE('source4/lib/cmdline')
 bld.RECURSE('source4/lib/http')
 if bld.CONFIG_GET('NSS_WRAPPER'):
     bld.RECURSE('lib/nss_wrapper')
-if bld.CONFIG_GET('PAM_WRAPPER'):
+if bld.CONFIG_GET('PAM_WRAPPER') and Options.options.with_pam:
     bld.RECURSE('lib/pam_wrapper')
 if bld.CONFIG_GET('SOCKET_WRAPPER'):
     bld.RECURSE('lib/socket_wrapper')