diff options
author | Günther Deschner <gd@samba.org> | 2010-12-01 21:26:49 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-12-06 17:34:45 +0100 |
commit | b73e4e36f5307316e2896d9731377f4252d0e444 (patch) | |
tree | dcb597140e23b929448f1cddcfe85447e7d97a09 /source3/wscript | |
parent | ec97c9f7c72bd1390d3e101c9060d9386602671e (diff) | |
download | samba-b73e4e36f5307316e2896d9731377f4252d0e444.tar.gz samba-b73e4e36f5307316e2896d9731377f4252d0e444.tar.bz2 samba-b73e4e36f5307316e2896d9731377f4252d0e444.zip |
s3-waf: add pam configure checks.
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Dec 6 17:34:45 CET 2010 on sn-devel-104
Diffstat (limited to 'source3/wscript')
-rw-r--r-- | source3/wscript | 71 |
1 files changed, 69 insertions, 2 deletions
diff --git a/source3/wscript b/source3/wscript index 3354ec16c1..b91c6fa41d 100644 --- a/source3/wscript +++ b/source3/wscript @@ -743,8 +743,75 @@ return krb5_kt_resolve(context, "WRFILE:api", &keytab); conf.DEFINE('HAVE_ICONV', 1) if Options.options.with_pam: - conf.CHECK_HEADERS('security/pam_appl.h security/pam_modules.h pam/pam_modules.h', together=True) - conf.CHECK_FUNCS_IN('pam_start', 'pam', checklibc=True, headers='security/pam_appl.h') + 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" + sys.exit(1) + 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'): + print "--with-pam=yes but pam_modules.h not found" + sys.exit(1) + 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') + conf.CHECK_CODE(''' +#if defined(HAVE_SECURITY_PAM_APPL_H) +#include <security/pam_appl.h> +#elif defined(HAVE_PAM_PAM_APPL_H) +#include <pam/pam_appl.h> +#endif +pam_set_item(0, PAM_RHOST, 0); +''', + 'HAVE_PAM_RHOST', + lib='pam', + msg="Checking whether PAM_RHOST is available"); + conf.CHECK_CODE(''' +#if defined(HAVE_SECURITY_PAM_APPL_H) +#include <security/pam_appl.h> +#elif defined(HAVE_PAM_PAM_APPL_H) +#include <pam/pam_appl.h> +#endif +pam_set_item(0, PAM_TTY, 0); +''', + 'HAVE_PAM_TTY', + lib='pam', + msg="Checking whether PAM_TTY is available"); + conf.CHECK_CODE(''' +#if (!defined(LINUX)) + +#define PAM_EXTERN extern +#if defined(HAVE_SECURITY_PAM_APPL_H) +#include <security/pam_appl.h> +#elif defined(HAVE_PAM_PAM_APPL_H) +#include <pam/pam_appl.h> +#endif + +#endif + +#if defined(HAVE_SECURITY_PAM_MODULES_H) +#include <security/pam_modules.h> +#elif defined(HAVE_PAM_PAM_MODULES_H) +#include <pam/pam_modules.h> +#endif + +#if defined(HAVE_SECURITY__PAM_MACROS_H) +#include <security/_pam_macros.h> +#elif defined(HAVE_PAM__PAM_MACROS_H) +#include <pam/_pam_macros.h> +#endif + +#ifdef HAVE_SECURITY_PAM_EXT_H +#include <security/pam_ext.h> +#endif + +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) seteuid = False if not seteuid: |