# This file defines:
# - XATTR_INCLUDE_DIRS
# - XATTR_LIBRARIES
# - XATTR_FOUND
# Taking into account:
# - XATTR_PREFIX

FIND_PATH(XATTR_INCLUDE xattr.h
  ${XATTR_PREFIX}/include/attr
  /usr/include/attr
)

FIND_LIBRARY(XATTR_LIB
  NAMES
    attr
  PATHS
    /usr/lib
    ${XATTR_PREFIX}/lib
)

IF(XATTR_INCLUDE AND XATTR_LIB)
  SET(XATTR_FOUND TRUE)
  SET(XATTR_INCLUDE_DIRS ${XATTR_INCLUDE})
  SET(XATTR_LIBRARIES ${XATTR_LIB})
ELSE(XATTR_INCLUDE AND XATTR_LIB)
  SET(XATTR_FOUND FALSE)
ENDIF(XATTR_INCLUDE AND XATTR_LIB)
