find_package(PkgConfig)
pkg_check_modules(PC_PCRE libpcre)
if(NOT "${PC_PCRE_FOUND}" STREQUAL "1")
	message("libpcre not found, dataflow.regex servlet has been disabled")
	set(build_dataflow_regex "no")
else(NOT "${PC_PCRE_FOUND}" STREQUAL "1")
	find_library(LIBPCRE_LIBRARIES NAMES ${PC_PCRE_LIBRARIES} PATHS ${PC_PCRE_LIBRARIES_DIRS})
	list(APPEND LOCAL_LIBS ${LIBPCRE_LIBRARIES} proto pstd)
	list(APPEND LOCAL_INCLUDE ${PC_PCRE_INCLUDE_DIRS})
	set(INSTALL yes)
endif(NOT "${PC_PCRE_FOUND}" STREQUAL "1")
