summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2010-12-07 12:35:54 +0000
committerPierre Ossman <ossman@cendio.se>2010-12-07 12:35:54 +0000
commit073e64a9cd2084a122616f33af2d4174b4f85255 (patch)
tree61546e7d11ef84aa2e1fa854caef42fd7a71199c
parent07199140eee72d62d2eae6292dd20f6edfd52756 (diff)
downloadtigervnc-073e64a9cd2084a122616f33af2d4174b4f85255.tar.gz
tigervnc-073e64a9cd2084a122616f33af2d4174b4f85255.zip
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
-rw-r--r--configure.ac18
1 files 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 <stdio.h>])])
+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 <stdio.h>])])
+fi
AC_SUBST([PAM_LIBS])
AM_CONDITIONAL([HAVE_PAM], [ ! test "x$PAM_LIBS" = x ])