summaryrefslogtreecommitdiffstats
path: root/src/external/libpcre.m4
diff options
context:
space:
mode:
Diffstat (limited to 'src/external/libpcre.m4')
-rw-r--r--src/external/libpcre.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/src/external/libpcre.m4 b/src/external/libpcre.m4
new file mode 100644
index 000000000..5917c8cfd
--- /dev/null
+++ b/src/external/libpcre.m4
@@ -0,0 +1,15 @@
+PCRE_OBJ=""
+AC_SUBST(PCRE_OBJ)
+AC_SUBST(PCRE_LIBS)
+AC_SUBST(PCRE_CFLAGS)
+
+PKG_CHECK_MODULES(PCRE, libpcre)
+PKG_CHECK_EXISTS(libpcre >= 7,
+ [AC_MSG_NOTICE([PCRE version is 7 or higher])],
+ [AC_MSG_NOTICE([PCRE version is below 7])
+ AC_DEFINE([HAVE_LIBPCRE_LESSER_THAN_7],
+ 1,
+ [Define if libpcre version is less than 7])])
+
+AC_CHECK_HEADERS(pcre.h)
+AC_CHECK_LIB(pcre, pcre_compile, [ PCRE_LIBS="-lpcre" ], [AC_MSG_ERROR([PCRE is required])])