lxdm-0.4.1-configure-add-pam.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 949ee91acb55baeb4b8761957eabd2e5a345d2ae Mon Sep 17 00:00:00 2001
  2. From: Mitch Harder <mitch.harder@sabayonlinux.org>
  3. Date: Thu, 8 Dec 2011 11:02:28 -0600
  4. Subject: Fix configure.ac test for pam libs.
  5. A bug report on Gentoo noted that the configure test for pam
  6. wasn't working correctly.
  7. https://bugs.gentoo.org/show_bug.cgi?id=384615
  8. This corrections borrows the configure.ac pam testing method used in xdm.
  9. ---
  10. configure.ac | 13 +++++++++++--
  11. 1 files changed, 11 insertions(+), 2 deletions(-)
  12. diff --git a/configure.ac b/configure.ac
  13. index e952473..eaa883a 100644
  14. --- a/configure.ac
  15. +++ b/configure.ac
  16. @@ -14,12 +14,21 @@ AC_PROG_INSTALL
  17. AM_PROG_CC_C_O
  18. # Checks for libraries.
  19. AC_CHECK_LIB([crypt], [crypt])
  20. -AC_ARG_WITH(pam,AC_HELP_STRING([--without-pam],[build without pam]),
  21. -[],[AC_CHECK_LIB([pam], [pam_open_session])])
  22. +# Check for PAM support
  23. +AC_ARG_WITH(pam, AC_HELP_STRING([--with-pam],[Use PAM for authentication]),
  24. + [USE_PAM=$withval], [USE_PAM=$use_pam_default])
  25. +if test "x$USE_PAM" != "xno" ; then
  26. + AC_SEARCH_LIBS(pam_open_session,[pam])
  27. + AC_CHECK_FUNC(pam_open_session,
  28. + [AC_DEFINE(USE_PAM,1,[Use PAM for authentication])],
  29. + [if test "x$USE_PAM" != "xtry" ; then
  30. + AC_MSG_ERROR(["PAM support requested, but pam_open_session not found."])
  31. + fi])
  32. +fi
  33. AC_CHECK_LIB([ck-connector],[ck_connector_open_session])
  34. # Checks for header files.
  35. AC_PATH_X
  36. --
  37. 1.7.3.4