From: Roland Dreier Date: Thu, 5 Oct 2006 18:52:20 +0000 (+0000) Subject: Fix up configure test for X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=0f39e536984c178c06091ebdcce3201dcad562ca;p=~shefty%2Flibibverbs.git Fix up configure test for Print a warning if Valgrind annotations are requested but is not found. Signed-off-by: Roland Dreier --- diff --git a/configure.in b/configure.in index 56eb386..d5d1712 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 @@ -27,7 +27,11 @@ AC_CHECK_LIB(pthread, pthread_mutex_init, [], dnl Checks for header files. 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 not found.]) +fi dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST