1 dnl Detect Valgrind location and flags
3 AC_DEFUN([EMPATHY_VALGRIND],
12 PKG_CHECK_MODULES(VALGRIND, valgrind > "$valgrind_req",
13 have_valgrind_runtime="yes", have_valgrind_runtime="no")
15 AC_PATH_PROG(VALGRIND_PATH, valgrind)
17 # Compile the instrumentation for valgrind only if the valgrind
18 # libraries are installed and the valgrind executable is found
19 if test "x$enable" = xyes &&
20 test "$have_valgrind_runtime" = yes &&
21 test -n "$VALGRIND_PATH" ;
23 AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used])
24 AC_MSG_NOTICE(using compile-time instrumentation for valgrind)
27 AC_SUBST(VALGRIND_CFLAGS)
28 AC_SUBST(VALGRIND_LIBS)
30 AM_CONDITIONAL(HAVE_VALGRIND, test -n "$VALGRIND_PATH")