summaryrefslogtreecommitdiffstats
path: root/src/external/libpcre.m4
blob: 5917c8cfdc4e7fa76657a727eca30d067b4affcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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])])