IF(PAM_FOUND)
  SET(PAM_FIND_QUIETLY TRUE)
ENDIF(PAM_FOUND)

FIND_PATH(PAM_INCLUDE_PATH
  NAMES pam_modules.h
  PATH_SUFFIXES security
  PATHS /usr/include /usr/local/include /usr/pkg/include
)

FIND_LIBRARY(PAM_LIBRARY
  NAMES pam
  PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
)

IF (PAM_INCLUDE_PATH AND PAM_LIBRARY)
  SET(PAM_FOUND TRUE)
ENDIF()

MARK_AS_ADVANCED(
  PAM_INCLUDE_PATH
  PAM_LIBRARY
)
