From 71425f1bb3700e52442154aeab9a78c587341aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Wed, 10 Dec 2014 10:22:39 +0100 Subject: [PATCH] Check for pcre.h in configure.ac --- ChangeLog | 4 ++++ configure.ac | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index c60beb93..33433edc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-12-10 Tim Ruehsen + + * configure.ac: Check for pcre.h + 2014-12-08 Giuseppe Scrivano * cfg.mk (local-checks-to-skip): Add sc_cast_of_argument_to_free. diff --git a/configure.ac b/configure.ac index a366e83d..7b4e2adc 100644 --- a/configure.ac +++ b/configure.ac @@ -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.]) + ]) + ]) ]) ])