Check for pcre.h in configure.ac

This commit is contained in:
Tim Rühsen 2014-12-10 10:22:39 +01:00
parent f59dac3023
commit 71425f1bb3
2 changed files with 14 additions and 9 deletions

View File

@ -1,3 +1,7 @@
2014-12-10 Tim Ruehsen <tim.ruehsen@gmx.de>
* configure.ac: Check for pcre.h
2014-12-08 Giuseppe Scrivano <gscrivan@redhat.com>
* cfg.mk (local-checks-to-skip): Add sc_cast_of_argument_to_free.

View File

@ -678,17 +678,18 @@ AC_ARG_ENABLE(pcre, AC_HELP_STRING([--disable-pcre],
AS_IF([test "X$enable_pcre" != "Xno"],[
PKG_CHECK_MODULES([PCRE], libpcre, [
LIBS="$PCRE_LIBS $LIBS"
CFLAGS="$PCRE_CFLAGS $CFLAGS"
AC_DEFINE([HAVE_LIBPCRE], [1], [Define if using libpcre.])
AC_CHECK_HEADER(pcre.h, [
LIBS="$PCRE_LIBS $LIBS"
AC_DEFINE([HAVE_LIBPCRE], [1], [Define if libpcre is available.])
])
], [
AC_CHECK_HEADER(pcre.h,
AC_CHECK_LIB(pcre, pcre_compile,
[LIBS="${LIBS} -lpcre"
AC_DEFINE([HAVE_LIBPCRE], 1,
[Define if libpcre is available.])
])
)
AC_CHECK_HEADER(pcre.h, [
AC_CHECK_LIB(pcre, pcre_compile, [
LIBS="${LIBS} -lpcre"
AC_DEFINE([HAVE_LIBPCRE], 1, [Define if libpcre is available.])
])
])
])
])