From 2826062056b7ba73f6a091921a36d3f5062c6180 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 10 Oct 2010 15:25:19 +0200 Subject: [PATCH] lib: Make valgrind support optional. --- configure.in | 3 +++ lib/mt.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/configure.in b/configure.in index b77eae8..0f47c26 100644 --- a/configure.in +++ b/configure.in @@ -19,6 +19,9 @@ if test "$HAS_MAGIC" = no; then AC_MSG_ERROR([*** cannot find libmagic on this system]) fi +AH_TEMPLATE(HAVE_VALGRIND, [define to include debugging support for Valgrind]) +AC_CHECK_HEADER(valgrind/memcheck.h, [AC_DEFINE(HAVE_VALGRIND)], []) + AH_TEMPLATE(HAVE_XATTR, [define to compile support for filesystem extended attributes]) AC_ARG_WITH(xattr, [ --with-xattr Enable XATTR support]) HAS_XATTR="" diff --git a/lib/mt.c b/lib/mt.c index db37936..c4dcf86 100644 --- a/lib/mt.c +++ b/lib/mt.c @@ -25,7 +25,10 @@ #endif #include #include + +#ifdef HAVE_VALGRIND #include +#endif struct muth *current = NULL; static ucontext_t mainctxt; -- 2.11.0