+#--------------------------------------------------------------------------------------------------
+### Initialize of pcre
+find_library(PATH_PCRE_LIB pcre "/usr/lib/")
+
+if(PATH_PCRE_LIB)
+ string(REGEX REPLACE "/libpcre.*[.]so$" "" PATHLIBPCRE "${PATH_PCRE_LIB}")
+ string(REGEX MATCH "-L${PATHLIBPCRE} " operation "${CMAKE_C_FLAGS}")
+ if(NOT operation)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-L${PATHLIBPCRE} ")
+ endif(NOT operation)
+ set(HAVE_PCRE_LIB 1)
+else(PATH_PCRE_LIB)
+ message(FATAL_ERROR "You must have libpcre installed (please install the libpcre3-dev package or equivalent)")
+endif(PATH_PCRE_LIB)
+