From 214042a170c860523b7aad2a251b0dbfbaefb235 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 23 Nov 2021 11:24:12 +0800 Subject: [PATCH] build: don't append valgrind CPPFLAGS if not installed --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 48705c9671..2a762488fe 100644 --- a/configure.ac +++ b/configure.ac @@ -43,8 +43,8 @@ case $host_os in # These Homebrew packages may be keg-only, meaning that they won't be found # in expected paths because they may conflict with system files. Ask # Homebrew where each one is located, then adjust paths accordingly. - valgrind_prefix=`$BREW --prefix valgrind 2>/dev/null` - if test x$valgrind_prefix != x; then + if $BREW list --versions valgrind >/dev/null; then + valgrind_prefix=`$BREW --prefix valgrind 2>/dev/null` VALGRIND_CPPFLAGS="-I$valgrind_prefix/include" fi else