1 AC_DEFUN([GST_VALGRIND_CHECK],
4 AC_ARG_ENABLE(valgrind,
5 AC_HELP_STRING([--disable-valgrind], [disable run-time valgrind detection]),
8 yes) USE_VALGRIND="$USE_DEBUG" ;;
10 *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
13 USE_VALGRIND="$USE_DEBUG"
17 if test "x$USE_VALGRIND" = xyes; then
18 PKG_CHECK_MODULES(VALGRIND, valgrind > $VALGRIND_REQ,
26 if test "x$USE_VALGRIND" = xyes; then
27 AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used])
28 AC_MSG_NOTICE(Using extra code paths for valgrind)
30 AC_SUBST(VALGRIND_CFLAGS)
31 AC_SUBST(VALGRIND_LIBS)
33 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
34 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")