[gnome-keyring] [pam] Fix build on Snow Leopard.



commit 3b838fe27561901ea04e7d2884aade5fff132ff6
Author: Louis-Francis Ratté-Boulianne <louisfrancis rb gmail com>
Date:   Fri Aug 27 15:55:23 2010 +0000

    [pam] Fix build on Snow Leopard.
    
    Before Snow Leopard, the pam header files were in /usr/include/pam/
    instead of /usr/include/security. We need to check both locations

 configure.in         |    2 +-
 pam/gkr-pam-module.c |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/configure.in b/configure.in
index 7c217dd..562834c 100644
--- a/configure.in
+++ b/configure.in
@@ -233,7 +233,7 @@ AC_ARG_ENABLE(pam,
 
 pam_status="no"
 if test "$enable_pam" != "no"; then
-	AC_CHECK_HEADER(security/pam_modules.h, have_pam=yes, have_pam=no)
+	AC_CHECK_HEADERS(security/pam_modules.h pam/pam_modules.h, have_pam=yes, have_pam=no)
 	if test "$enable_pam" = "yes" -a "$have_pam" = "no"; then
 		AC_MSG_ERROR(The PAM headers are missing)
 	elif test "$have_pam" = "yes"; then
diff --git a/pam/gkr-pam-module.c b/pam/gkr-pam-module.c
index d6fc17d..5b8e4c5 100644
--- a/pam/gkr-pam-module.c
+++ b/pam/gkr-pam-module.c
@@ -33,8 +33,15 @@
 
 #include "daemon/control/gkd-control-codes.h"
 
+#ifdef HAVE_SECURITY_PAM_MODULES_H
 #include <security/pam_appl.h>
 #include <security/pam_modules.h>
+#else
+#ifdef HAVE_PAM_PAM_MODULES_H
+#include <pam/pam_appl.h>
+#include <pam/pam_modules.h>
+#endif
+#endif
 
 #include <sys/types.h>
 #include <sys/stat.h>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]