From e72219d2826cc58e197c5742441440468d99897b Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Tue, 3 Jul 2007 11:53:47 -0700 Subject: [PATCH] Fix Valgrind annotations so they can actually be built The AC_CHECK_HEADER() test for will never result in HAVE_VALGRIND_MEMCHECK_H being defined, so ibverbs.h will never include and Valgrind annotations will never actually get built. Fix this by adding an AC_DEFINE() of HAVE_VALGRIND_MEMCHECK_H if the header is found. Pointed out by Jeff Squyres . Signed-off-by: Roland Dreier --- configure.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index 2b4cbb6..f9cab76 100644 --- a/configure.in +++ b/configure.in @@ -34,11 +34,12 @@ AC_CHECK_LIB(pthread, pthread_mutex_init, [], dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADER(valgrind/memcheck.h, memcheck_ok=yes, memcheck_ok=no) - -if test $want_valgrind = yes && test $memcheck_ok = no; then - AC_MSG_ERROR([Valgrind memcheck support requested, but not found.]) -fi +AC_CHECK_HEADER(valgrind/memcheck.h, + [AC_DEFINE(HAVE_VALGRIND_MEMCHECK_H, 1, + [Define to 1 if you have the header file.])], + [if test $want_valgrind = yes; then + AC_MSG_ERROR([Valgrind memcheck support requested, but not found.]) + fi]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST -- 2.46.0