waf: Only build pam_wrapper if we build with pam
[samba.git] / wscript
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)