FIND_LIBRARY(PFRING_LIBRARY
    NAMES
        pfring
)

FIND_PATH(PFRING_INCLUDE_DIR
    NAMES
        pfring.h
)

SET(PFRING_INCLUDE_DIRS ${PFRING_INCLUDE_DIR})
SET(PFRING_LIBRARIES ${PFRING_LIBRARY})

INCLUDE(CheckFunctionExists)
SET(CMAKE_REQUIRED_INCLUDES ${PFRING_INCLUDE_DIRS})
SET(CMAKE_REQUIRED_LIBRARIES ${PFRING_LIBRARIES})

IF(PFRING_INCLUDE_DIRS AND PFRING_LIBRARIES)
    SET( PFRING_FOUND "YES" )
ENDIF(PFRING_INCLUDE_DIRS AND PFRING_LIBRARIES)

MARK_AS_ADVANCED(
    PFRING_LIBRARIES
    PFRING_INCLUDE_DIRS
)
