diff options
author | DRC <dcommander@users.sourceforge.net> | 2011-06-22 00:18:17 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2011-06-22 00:18:17 +0000 |
commit | 777290b4692c45f4854f9c917da18783c98010a0 (patch) | |
tree | f67bcccd123c9c62a5781dc2b8bd9ffbc71cceec /CMakeLists.txt | |
parent | 801ef7ca6c3f3a33cc7e9bafde0d50a265b533c1 (diff) | |
download | tigervnc-777290b4692c45f4854f9c917da18783c98010a0.tar.gz tigervnc-777290b4692c45f4854f9c917da18783c98010a0.zip |
Detect and enable PAM authentication support
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4513 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f9d9578..fb4e7135 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -253,6 +253,21 @@ if(ENABLE_GNUTLS) endif() endif() +# Check for PAM library +option(ENABLE_PAM "Enable PAM authentication support" ON) +if(ENABLE_PAM) + check_include_files(security/pam_appl.h HAVE_PAM_H) + set(CMAKE_REQUIRED_LIBRARIES -lpam) + check_function_exists(pam_start HAVE_PAM_START) + set(CMAKE_REQUIRED_LIBRARIES) + if(HAVE_PAM_H AND HAVE_PAM_START) + set(PAM_LIBS pam) + else() + set(ENABLE_PAM 0) + endif() +endif() +set(HAVE_PAM ${ENABLE_PAM}) + # Check for socket functions if(WIN32) set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h ws2tcpip.h) |