build: refuse to build without PAM support if enabled
authorUri Simchoni <uri@samba.org>
Wed, 12 Apr 2017 07:32:39 +0000 (10:32 +0300)
committerUri Simchoni <uri@samba.org>
Wed, 12 Apr 2017 10:54:24 +0000 (12:54 +0200)
If PAM support is enabled, refuse to build if the prerequisite
libraries are not in place, instead of silently disabling PAM
support and continuing with the build.

This simplifies inclusion of pam_wrapper in the tree.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/wscript

index 78753687431af9df1974392c0dc7fd997b76d790..c526fc56a363296b3ad79741bafe97de8a4e7a08 100644 (file)
@@ -947,6 +947,10 @@ int i; i = PAM_RADIO_TYPE;
         if use_pam:
             conf.DEFINE('WITH_PAM', 1)
             conf.DEFINE('WITH_PAM_MODULES', 1)
+        else:
+            conf.fatal("PAM support is enabled but prerequisite libraries "
+                       "or headers not found. Use --without-pam to disable "
+                       "PAM support.");
 
     seteuid = False