Skip to content

Commit

Permalink
fix default args for --with-pcre-valgrind
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Jul 13, 2017
1 parent 850bb99 commit 24de0fe
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ext/pcre/config0.m4
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,20 @@ PHP_ARG_WITH(pcre-jit,,[ --with-pcre-jit Enable PCRE JIT functionality]
fi
fi

PHP_ARG_WITH(pcre-valgrind,,[ --with-pcre-valgrind=DIR
Enable PCRE valgrind support. Developers only!], $PHP_DEBUG, no)
if test "$PHP_DEBUG" != "no" && test "$PHP_DEBUG" != "0"; then
PHP_ARG_WITH(pcre-valgrind,,[ --with-pcre-valgrind=DIR
Enable PCRE valgrind support. Developers only!], yes, no)
else
PHP_ARG_WITH(pcre-valgrind,,[ --with-pcre-valgrind=DIR
Enable PCRE valgrind support. Developers only!], no, no)
fi

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" && test "$PHP_DEBUG" != "no"; then
if test "$PHP_PCRE_VALGRIND" = "no" && test "$PHP_DEBUG" != "0"; then
AC_MSG_NOTICE([PCRE Valgrind support is disabled for debug build])
elif test "$PHP_PCRE_VALGRIND" != "no" || test "$PHP_DEBUG" != "no"; then
elif test "$PHP_PCRE_VALGRIND" != "no" || test "$PHP_DEBUG" != "0"; 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
Expand Down

0 comments on commit 24de0fe

Please sign in to comment.