diff options
author | Roland Dreier <rolandd@cisco.com> | 2007-07-03 11:55:03 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-07-03 11:55:03 -0700 |
commit | 98277f51b0a0c7c7afaf10c55802b2de8dc91430 (patch) | |
tree | 28eea533df703fe57d9d781dedaf94bc43d70c71 | |
parent | 6368315dc2bde00a533e64b984a8cd5b739aedcd (diff) | |
download | libmlx4-98277f51b0a0c7c7afaf10c55802b2de8dc91430.tar.gz |
Fix Valgrind annotations so they can actually be built
The AC_CHECK_HEADER() test for <valgrind/memcheck.h> will never result
in HAVE_VALGRIND_MEMCHECK_H being defined, so ibverbs.h will never
include <valgrind/memcheck.h> 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 <jsquyres@cisco.com>.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | configure.in | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/configure.in b/configure.in index 1c5e8e2..c68872c 100644 --- a/configure.in +++ b/configure.in @@ -32,11 +32,12 @@ dnl Checks for header files. AC_CHECK_HEADER(infiniband/driver.h, [], AC_MSG_ERROR([<infiniband/driver.h> not found. libmlx4 requires libibverbs.])) 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 <valgrind/memcheck.h> not found.]) -fi +AC_CHECK_HEADER(valgrind/memcheck.h, + [AC_DEFINE(HAVE_VALGRIND_MEMCHECK_H, 1, + [Define to 1 if you have the <valgrind/memcheck.h> header file.])], + [if test $want_valgrind = yes; then + AC_MSG_ERROR([Valgrind memcheck support requested, but <valgrind/memcheck.h> not found.]) + fi]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST |