diff options
-rw-r--r-- | acinclude.m4 | 20 | ||||
-rw-r--r-- | configure.ac | 30 | ||||
-rw-r--r-- | ext/xml/php_xml.h | 2 |
3 files changed, 30 insertions, 22 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index b8902f0947..b8100afe96 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -3310,23 +3310,3 @@ dnl Load the AX_CHECK_COMPILE_FLAG macro from the autoconf archive. m4_include([build/ax_check_compile_flag.m4]) m4_include([build/ax_gcc_func_attribute.m4]) - -dnl PHP_CHECK_VALGRIND -AC_DEFUN([PHP_CHECK_VALGRIND], [ - AC_MSG_CHECKING([for valgrind]) - - SEARCH_PATH="/usr/local /usr" - SEARCH_FOR="/include/valgrind/valgrind.h" - for i in $SEARCH_PATH ; do - if test -r $i/$SEARCH_FOR; then - VALGRIND_DIR=$i - fi - done - - if test -z "$VALGRIND_DIR"; then - AC_MSG_RESULT([not found]) - else - AC_MSG_RESULT(found in $VALGRIND_DIR) - AC_DEFINE(HAVE_VALGRIND, 1, [ ]) - fi -]) diff --git a/configure.ac b/configure.ac index cf4f72b38a..e18e1de2ef 100644 --- a/configure.ac +++ b/configure.ac @@ -784,7 +784,35 @@ if test "$ac_cv__asm_goto" = yes; then AC_DEFINE(HAVE_ASM_GOTO,1,[Define if asm goto support]) fi -PHP_CHECK_VALGRIND +dnl Check valgrind support +PHP_ARG_WITH(valgrind, [whether to enable valgrind support], +[ --with-valgrind=DIR Enable valgrind support], yes, no) + +if test "$PHP_VALGRIND" != "no"; then + + AC_MSG_CHECKING([for valgrind header]) + + if test "$PHP_VALGRIND" = "yes"; then + SEARCH_PATH="/usr/local /usr" + else + SEARCH_PATH="$PHP_VALGRIND" + fi + + SEARCH_FOR="/include/valgrind/valgrind.h" + for i in $SEARCH_PATH ; do + if test -r $i/$SEARCH_FOR; then + VALGRIND_DIR=$i + fi + done + + if test -z "$VALGRIND_DIR"; then + AC_MSG_RESULT([not found]) + else + AC_MSG_RESULT(found in $VALGRIND_DIR) + AC_DEFINE(HAVE_VALGRIND, 1, [ ]) + fi + +fi dnl General settings. dnl ------------------------------------------------------------------------- diff --git a/ext/xml/php_xml.h b/ext/xml/php_xml.h index e2174e5c87..637932f5d9 100644 --- a/ext/xml/php_xml.h +++ b/ext/xml/php_xml.h @@ -36,7 +36,7 @@ extern zend_module_entry xml_module_entry; #ifdef HAVE_XML -#include "ext/xml/expat_compat.h" +#include "expat_compat.h" #ifdef XML_UNICODE #error "UTF-16 Unicode support not implemented!" |