summaryrefslogtreecommitdiff
path: root/source3/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'source3/wscript')
-rw-r--r--source3/wscript16
1 files changed, 11 insertions, 5 deletions
diff --git a/source3/wscript b/source3/wscript
index cb10fd5699..ca7acf212c 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -942,13 +942,16 @@ return krb5_kt_resolve(context, "WRFILE:api", &keytab);
conf.DEFINE('HAVE_ICONV', 1)
if Options.options.with_pam:
+ use_pam=True
conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h')
if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'):
print "--with-pam=yes but pam_appl.h not found"
- conf.CHECK_FUNCS_IN('pam_get_data', 'pam', mandatory=True)
- conf.CHECK_HEADERS('security/pam_modules.h pam/pam_modules.h')
- if not conf.CONFIG_SET('HAVE_SECURITY_PAM_MODULES_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_MODULES_H'):
+ use_pam=False
+ conf.CHECK_FUNCS_IN('pam_get_data', 'pam')
+ conf.CHECK_HEADERS('security/pam_modules.h pam/pam_modules.h')
+ if not conf.CONFIG_SET('HAVE_SECURITY_PAM_MODULES_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_MODULES_H'):
print "--with-pam=yes but pam_modules.h not found"
+ use_pam=False
conf.CHECK_HEADERS('security/pam_ext.h security/_pam_macros.h')
conf.CHECK_HEADERS('pam/pam_ext.h pam/_pam_macros.h')
conf.CHECK_FUNCS_IN('pam_vsyslog', 'pam')
@@ -1007,8 +1010,11 @@ int i; i = PAM_RADIO_TYPE;
'HAVE_PAM_RADIO_TYPE',
lib='pam',
msg="Checking whether PAM_RADIO_TYPE is available");
- conf.DEFINE('WITH_PAM', 1)
- conf.DEFINE('WITH_PAM_MODULES', 1)
+ if use_pam:
+ conf.DEFINE('WITH_PAM', 1)
+ conf.DEFINE('WITH_PAM_MODULES', 1)
+ else:
+ conf.SET_TARGET_TYPE('pam', 'EMPTY')
seteuid = False
if not seteuid: