From 850bb998d9664e849ed743ea031dd0ee2a64cc9d Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 13 Jul 2017 18:36:00 +0200 Subject: [PATCH] Enable valgrind support for PCRE by default in debug builds Thanks Nikita for the hint. --- ext/pcre/config0.m4 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4 index 6d5b257791..aa8cd304e0 100644 --- a/ext/pcre/config0.m4 +++ b/ext/pcre/config0.m4 @@ -79,11 +79,14 @@ PHP_ARG_WITH(pcre-jit,,[ --with-pcre-jit Enable PCRE JIT functionality] fi PHP_ARG_WITH(pcre-valgrind,,[ --with-pcre-valgrind=DIR - Enable PCRE valgrind support. Developers only!], no, no) + Enable PCRE valgrind support. Developers only!], $PHP_DEBUG, no) + if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then AC_MSG_WARN([PHP is going to be linked with an external PCRE, --with-pcre-valgrind has no effect]) else - if test "$PHP_PCRE_VALGRIND" != "no"; then + if test "$PHP_PCRE_VALGRIND" = "no" && test "$PHP_DEBUG" != "no"; then + AC_MSG_NOTICE([PCRE Valgrind support is disabled for debug build]) + elif test "$PHP_PCRE_VALGRIND" != "no" || test "$PHP_DEBUG" != "no"; then PHP_PCRE_VALGRIND_INCDIR= AC_MSG_CHECKING([for Valgrind headers location]) for i in $PHP_PCRE_VALGRIND $PHP_PCRE_VALGRIND/include $PHP_PCRE_VALGRIND/local/include /usr/include /usr/local/include; do -- 2.40.0