~ubuntu-branches/ubuntu/trusty/pitivi/trusty

« back to all changes in this revision

Viewing changes to common/m4/gst-valgrind.m4

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-02-04 14:42:30 UTC
  • Revision ID: james.westby@ubuntu.com-20060204144230-9ihvyas6lhgn81k1
Tags: upstream-0.9.9.2
ImportĀ upstreamĀ versionĀ 0.9.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_DEFUN([GST_VALGRIND_CHECK],
 
2
[
 
3
  dnl valgrind inclusion
 
4
  AC_ARG_ENABLE(valgrind,
 
5
    AC_HELP_STRING([--disable-valgrind], [disable run-time valgrind detection]),
 
6
    [
 
7
      case "${enableval}" in
 
8
        yes) USE_VALGRIND="$USE_DEBUG" ;;
 
9
        no)  USE_VALGRIND=no ;;
 
10
        *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
 
11
      esac],
 
12
    [
 
13
      USE_VALGRIND="$USE_DEBUG"
 
14
    ]) dnl Default value
 
15
 
 
16
  VALGRIND_REQ="2.1"
 
17
  if test "x$USE_VALGRIND" = xyes; then
 
18
    PKG_CHECK_MODULES(VALGRIND, valgrind > $VALGRIND_REQ,
 
19
      USE_VALGRIND="yes", USE_VALGRIND="no")
 
20
  fi
 
21
 
 
22
  if test "x$USE_VALGRIND" = xyes; then
 
23
    AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used])
 
24
    AC_MSG_NOTICE(Using extra code paths for valgrind)
 
25
  fi
 
26
  AC_SUBST(VALGRIND_CFLAGS)
 
27
  AC_SUBST(VALGRIND_LIBS)
 
28
  
 
29
  AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
 
30
  AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
 
31
])