summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-07-13 18:36:00 +0200
committerAnatol Belski <ab@php.net>2017-07-13 18:38:28 +0200
commit850bb998d9664e849ed743ea031dd0ee2a64cc9d (patch)
treeac7ba9e55c900187023dcdfd827e9e755dfd135c
parent1e2764614bc8dca9ef44082d0a1e53d09f8b0562 (diff)
downloadphp-git-850bb998d9664e849ed743ea031dd0ee2a64cc9d.tar.gz
Enable valgrind support for PCRE by default in debug builds
Thanks Nikita for the hint.
-rw-r--r--ext/pcre/config0.m47
1 files 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