aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-10-05 18:52:20 +0000
committerRoland Dreier <rolandd@cisco.com>2006-11-09 11:36:33 -0800
commitcaa799b325b2dbc7309e7d6046b29a652a9e4fc6 (patch)
tree8c1ea347d11bdcc9e5b712f7a8f46a3af480ea00
parent00042559262a736d424586e8019a10db1fb419a3 (diff)
downloadlibibverbs-caa799b325b2dbc7309e7d6046b29a652a9e4fc6.tar.gz
Fix up configure test for <valgrind/memcheck.h>
Print a warning if Valgrind annotations are requested but <valgrind/memcheck.h> is not found. Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--configure.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 73dbc08..47087d6 100644
--- a/configure.in
+++ b/configure.in
@@ -12,7 +12,7 @@ AM_PROG_LIBTOOL
AC_ARG_WITH([valgrind],
AC_HELP_STRING([--with-valgrind],
[Enable Valgrind annotations (small runtime overhead, default NO)]))
-if test "x$with_valgrind" != "xyes"; then
+if test x$with_valgrind != xyes; then
AC_DEFINE([NVALGRIND], 1, [disable Valgrind annotations])
fi
@@ -31,7 +31,11 @@ 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_HEADERS(valgrind/memcheck.h)
+AC_CHECK_HEADER(valgrind/memcheck.h, memcheck_ok=yes, memcheck_ok=no)
+
+if test x$with_valgrind = xyes && test $memcheck_ok = no; then
+ AC_MSG_WARN([Valgrind memcheck support requested, but <valgrind/memcheck.h> not found.])
+fi
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST