]> source.dussan.org Git - tigervnc.git/commitdiff
Make it possible to disable PAM support if you want to avoid that dependency.
authorPierre Ossman <ossman@cendio.se>
Tue, 7 Dec 2010 12:35:54 +0000 (12:35 +0000)
committerPierre Ossman <ossman@cendio.se>
Tue, 7 Dec 2010 12:35:54 +0000 (12:35 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4212 3789f03b-4d11-0410-bbf8-ca57d06f2519

configure.ac

index 46a698660683245fafd0777b519511e2ce9b3a72..1ac635139fa0b2a77cbe345e6e5ab6686a0769b4 100644 (file)
@@ -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 ])