1# Copyright 2006-2008 The FLWOR Foundation. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14# 15# Try to find the PAM libraries 16# 17# PAM_FOUND - True if PAM library found 18# PAM_INCLUDE_DIR - Directory to include to get PAM headers 19# PAM_LIBRARIES - Libraries to link against for the PAM library 20 21if (PAM_INCLUDE_DIR AND PAM_LIBRARY) 22 # Already in cache, be silent 23 set(PAM_FIND_QUIETLY TRUE) 24endif (PAM_INCLUDE_DIR AND PAM_LIBRARY) 25 26find_path(PAM_INCLUDE_DIR NAMES security/pam_appl.h pam/pam_appl.h) 27find_library(PAM_LIBRARY pam) 28find_library(DL_LIBRARY dl) 29 30if (PAM_INCLUDE_DIR AND PAM_LIBRARY) 31 set(PAM_FOUND TRUE) 32 if (DL_LIBRARY) 33 set(PAM_LIBRARIES ${PAM_LIBRARY} ${DL_LIBRARY}) 34 else (DL_LIBRARY) 35 set(PAM_LIBRARIES ${PAM_LIBRARY}) 36 endif (DL_LIBRARY) 37endif (PAM_INCLUDE_DIR AND PAM_LIBRARY) 38