Skip to content

Commit

Permalink
build: Add a check that Valgring actually supports a host platform
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Dec 3, 2021
1 parent 49f608d commit fb723af
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build-aux/m4/bitcoin_secp.m4
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ AC_DEFUN([SECP_VALGRIND_CHECK],[
if test x"$has_valgrind" != x"yes"; then
CPPFLAGS_TEMP="$CPPFLAGS"
CPPFLAGS="$VALGRIND_CPPFLAGS $CPPFLAGS"
AC_CHECK_HEADER([valgrind/memcheck.h], [has_valgrind=yes; AC_DEFINE(HAVE_VALGRIND,1,[Define this symbol if valgrind is installed])])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <valgrind/memcheck.h>
]], [[
#if defined(NVALGRIND)
# error "Valgrind does not support this platform."
#endif
]])], [has_valgrind=yes; AC_DEFINE(HAVE_VALGRIND,1,[Define this symbol if valgrind is installed, and it supports the host platform])])
fi
])

Expand Down

0 comments on commit fb723af

Please sign in to comment.