aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2007-07-03 11:53:47 -0700
committerRoland Dreier <rolandd@cisco.com>2007-07-03 12:06:55 -0700
commit67a2703ed831328fc79ed7c4766163cb7200c081 (patch)
treea4b49590d1c6e659b0e5285650ba016295682dfb
parenta32f9e2292bbd194d0b14eb5e538d63918819ffa (diff)
downloadlibibverbs-67a2703ed831328fc79ed7c4766163cb7200c081.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> (cherry picked from commit e72219d2826cc58e197c5742441440468d99897b)
-rw-r--r--configure.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/configure.in b/configure.in
index b7c81bb..10f93b0 100644
--- a/configure.in
+++ b/configure.in
@@ -37,11 +37,12 @@ dnl Checks for header files.
AC_CHECK_HEADER(sysfs/libsysfs.h, [],
AC_MSG_ERROR([<sysfs/libsysfs.h> not found. libibverbs requires libsysfs.]))
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