Skip to content

Commit 850bb99

Browse files
committed
Enable valgrind support for PCRE by default in debug builds
Thanks Nikita for the hint.
1 parent 1e27646 commit 850bb99

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ext/pcre/config0.m4

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,14 @@ PHP_ARG_WITH(pcre-jit,,[ --with-pcre-jit Enable PCRE JIT functionality]
7979
fi
8080

8181
PHP_ARG_WITH(pcre-valgrind,,[ --with-pcre-valgrind=DIR
82-
Enable PCRE valgrind support. Developers only!], no, no)
82+
Enable PCRE valgrind support. Developers only!], $PHP_DEBUG, no)
83+
8384
if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then
8485
AC_MSG_WARN([PHP is going to be linked with an external PCRE, --with-pcre-valgrind has no effect])
8586
else
86-
if test "$PHP_PCRE_VALGRIND" != "no"; then
87+
if test "$PHP_PCRE_VALGRIND" = "no" && test "$PHP_DEBUG" != "no"; then
88+
AC_MSG_NOTICE([PCRE Valgrind support is disabled for debug build])
89+
elif test "$PHP_PCRE_VALGRIND" != "no" || test "$PHP_DEBUG" != "no"; then
8790
PHP_PCRE_VALGRIND_INCDIR=
8891
AC_MSG_CHECKING([for Valgrind headers location])
8992
for i in $PHP_PCRE_VALGRIND $PHP_PCRE_VALGRIND/include $PHP_PCRE_VALGRIND/local/include /usr/include /usr/local/include; do

0 commit comments

Comments
 (0)