diff options
author | Roland Dreier <rolandd@cisco.com> | 2007-07-03 11:53:47 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-07-03 11:53:47 -0700 |
commit | e72219d2826cc58e197c5742441440468d99897b (patch) | |
tree | 52895a200fea51c38d6e8df3209f1a515b7475db | |
parent | c80d235603c1ffef520def1fbbb3a0e166d139bf (diff) | |
download | libibverbs-e72219d2826cc58e197c5742441440468d99897b.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 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 <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 |