File: gst-valgrind.m4

package info (click to toggle)
gst-plugins-bad1.0 1.0.8-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 36,832 kB
  • sloc: ansic: 297,908; cpp: 22,677; sh: 13,303; xml: 6,362; makefile: 4,867; perl: 1,435; objc: 1,273; python: 362; sed: 16
file content (35 lines) | stat: -rw-r--r-- 987 bytes parent folder | download | duplicates (80)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
AC_DEFUN([AG_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="3.0"
  if test "x$USE_VALGRIND" = xyes; then
    PKG_CHECK_MODULES(VALGRIND, valgrind >= $VALGRIND_REQ,
      USE_VALGRIND="yes",
      [
        USE_VALGRIND="no"
        AC_MSG_RESULT([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")
])