From 073e64a9cd2084a122616f33af2d4174b4f85255 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 7 Dec 2010 12:35:54 +0000 Subject: [PATCH] Make it possible to disable PAM support if you want to avoid that dependency. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4212 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- configure.ac | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 46a69866..1ac63513 100644 --- a/configure.ac +++ b/configure.ac @@ -112,11 +112,19 @@ fi AC_SUBST([GNUTLS_LIBS]) AM_CONDITIONAL([HAVE_GNUTLS], [ ! test "x$GNUTLS_LIBS" = x ]) -AC_CHECK_LIB([pam], [pam_start], - [AC_CHECK_HEADER([security/pam_appl.h], - [PAM_LIBS='-lpam' - AC_DEFINE(HAVE_PAM, 1, [PAM available])], - [], [#include ])]) +AC_ARG_ENABLE([pam], + AS_HELP_STRING([--enable-pam], + [build in support for authenticating users using PAM (default yes)]), + [enable_pam="$enableval"], [enable_pam=yes]) + +PAM_LIBS= +if test "x$enable_pam" = xyes; then + AC_CHECK_LIB([pam], [pam_start], + [AC_CHECK_HEADER([security/pam_appl.h], + [PAM_LIBS='-lpam' + AC_DEFINE(HAVE_PAM, 1, [PAM available])], + [], [#include ])]) +fi AC_SUBST([PAM_LIBS]) AM_CONDITIONAL([HAVE_PAM], [ ! test "x$PAM_LIBS" = x ]) -- 2.39.5