diff options
author | Roland Dreier <rolandd@cisco.com> | 2006-10-17 22:23:33 +0000 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-11-09 11:36:02 -0800 |
commit | 015d85edddee1bba7c253de1ea59e888ae824def (patch) | |
tree | ee26894a83ec6c6df29fa19772061b8b68748d98 | |
parent | 00237a313869407fd15f928815c7a6c253efb33d (diff) | |
download | libibverbs-015d85edddee1bba7c253de1ea59e888ae824def.tar.gz |
Add handling of --with-valgrind=<valgrind dir>
Change libibverbs Valgrind support so that --with-valgrind can take an
installation directory to look in for Valgrind headers.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | configure.in | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/configure.in b/configure.in index d5d1712..ebd2102 100644 --- a/configure.in +++ b/configure.in @@ -12,8 +12,14 @@ 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 = x || test x$with_valgrind = xno; then + want_valgrind=no AC_DEFINE([NVALGRIND], 1, [disable Valgrind annotations]) +else + want_valgrind=yes + if test -d $with_valgrind; then + CPPFLAGS="$CPPFLAGS -I$with_valgrind/include" + fi fi dnl Checks for programs @@ -29,8 +35,8 @@ dnl Checks for header files. AC_HEADER_STDC 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.]) +if test $want_valgrind = yes && test $memcheck_ok = no; then + AC_MSG_ERROR([Valgrind memcheck support requested, but <valgrind/memcheck.h> not found.]) fi dnl Checks for typedefs, structures, and compiler characteristics. |