Skip to content

Commit 24de0fe

Browse files
committed
fix default args for --with-pcre-valgrind
1 parent 850bb99 commit 24de0fe

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

ext/pcre/config0.m4

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,20 @@ PHP_ARG_WITH(pcre-jit,,[ --with-pcre-jit Enable PCRE JIT functionality]
7878
fi
7979
fi
8080

81-
PHP_ARG_WITH(pcre-valgrind,,[ --with-pcre-valgrind=DIR
82-
Enable PCRE valgrind support. Developers only!], $PHP_DEBUG, no)
81+
if test "$PHP_DEBUG" != "no" && test "$PHP_DEBUG" != "0"; then
82+
PHP_ARG_WITH(pcre-valgrind,,[ --with-pcre-valgrind=DIR
83+
Enable PCRE valgrind support. Developers only!], yes, no)
84+
else
85+
PHP_ARG_WITH(pcre-valgrind,,[ --with-pcre-valgrind=DIR
86+
Enable PCRE valgrind support. Developers only!], no, no)
87+
fi
8388

8489
if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then
8590
AC_MSG_WARN([PHP is going to be linked with an external PCRE, --with-pcre-valgrind has no effect])
8691
else
87-
if test "$PHP_PCRE_VALGRIND" = "no" && test "$PHP_DEBUG" != "no"; then
92+
if test "$PHP_PCRE_VALGRIND" = "no" && test "$PHP_DEBUG" != "0"; then
8893
AC_MSG_NOTICE([PCRE Valgrind support is disabled for debug build])
89-
elif test "$PHP_PCRE_VALGRIND" != "no" || test "$PHP_DEBUG" != "no"; then
94+
elif test "$PHP_PCRE_VALGRIND" != "no" || test "$PHP_DEBUG" != "0"; then
9095
PHP_PCRE_VALGRIND_INCDIR=
9196
AC_MSG_CHECKING([for Valgrind headers location])
9297
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)