put the valgrind detection in an .m4

Original commit message from CVS:
put the valgrind detection in an .m4
parent 7d175466
2005-10-07 Thomas Vander Stichele <thomas at apestaart dot org>
* m4/Makefile.am:
* m4/gst-valgrind.m4:
put the valgrind detection in an .m4
2005-09-29 Thomas Vander Stichele <thomas at apestaart dot org>
* check.mak:
......
......@@ -9,6 +9,7 @@ EXTRA_DIST = \
as-libtool-tags.m4 \
as-python.m4 \
as-scrub-include.m4 \
as-valgrind.m4 \
as-version.m4 \
ax_create_stdint_h.m4 \
glib-gettext.m4 \
......
AC_DEFUN([GST_VALGRIND_CHECK],
[
dnl valgrind inclusion
AC_ARG_ENABLE(valgrind,
AC_HELP_STRING([--disable-valgrind], [disable run-time valgrind detection]),
[
case "${enableval}" in
yes) USE_VALGRIND="$USE_DEBUG" ;;
no) USE_VALGRIND=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
esac],
[
USE_VALGRIND="$USE_DEBUG"
]) dnl Default value
VALGRIND_REQ="2.1"
if test "x$USE_VALGRIND" = xyes; then
PKG_CHECK_MODULES(VALGRIND, valgrind > $VALGRIND_REQ,
USE_VALGRIND="yes", USE_VALGRIND="no")
fi
if test "x$USE_VALGRIND" = xyes; then
AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used])
AC_MSG_NOTICE(Using extra code paths for valgrind)
fi
AC_SUBST(VALGRIND_CFLAGS)
AC_SUBST(VALGRIND_LIBS)
AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment