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:33 -0800 |
commit | f188bf878fca16e1fb1a7eaa839ea9f238ea94a2 (patch) | |
tree | 42d7e9f2d9592e64e1c78d2d695a48a29e3a455b | |
parent | 8219bfa2a836a7da77d36d0267326adf14607d22 (diff) | |
download | libibverbs-f188bf878fca16e1fb1a7eaa839ea9f238ea94a2.tar.gz |
Add handling of --with-valgrind=<valgrind dir>
Change libibverbs/libmthca 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 47087d6..42a35c7 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 @@ -33,8 +39,8 @@ AC_CHECK_HEADER(sysfs/libsysfs.h, [], 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. |