summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2019-05-25 09:04:37 +0200
committerJoe Watkins <krakjoe@php.net>2019-05-25 09:04:37 +0200
commitf8d53099c93c95018a0be3c8372fd1beadda1fb7 (patch)
treef5d0160877fadc0455b74734ce11247d9a22eb16 /configure.ac
parentdaa9172c10673a99d1acfc2f23a6ffa6e856fea6 (diff)
parentef34e00df34f88c852baac84ad1428d4360c6d06 (diff)
downloadphp-git-f8d53099c93c95018a0be3c8372fd1beadda1fb7.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Use PKG_CHECK_MODULES to detect valgrind, and share build config with pcre
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 7 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac
index e169f4a6a3..ccf6d7721f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -762,35 +762,22 @@ fi
dnl Check valgrind support.
PHP_ARG_WITH([valgrind],
[whether to enable valgrind support],
- [AS_HELP_STRING([--with-valgrind=DIR],
+ [AS_HELP_STRING([--with-valgrind],
[Enable valgrind support])],
[yes],
[no])
if test "$PHP_VALGRIND" != "no"; then
+ PKG_CHECK_MODULES([VALGRIND], [valgrind], [have_valgrind="yes"], [have_valgrind="no"])
- AC_MSG_CHECKING([for valgrind header])
-
- if test "$PHP_VALGRIND" = "yes"; then
- SEARCH_PATH="/usr/local /usr"
+ if test "$have_valgrind" = "yes"; then
+ PHP_EVAL_INCLINE($VALGRIND_CFLAGS)
+ AC_DEFINE(HAVE_VALGRIND, 1, [ ])
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
+ if test "$with_valgrind" = "yes"; then
+ AC_MSG_ERROR([Valgrind not found. Please install Valgrind.])
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.