aboutsummaryrefslogtreecommitdiffstats
path: root/m4/empathy-valgrind.m4
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-12-29 23:58:47 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-12-29 23:58:47 +0800
commita4004017570744524ff2d0af3efab045821fd46f (patch)
tree9a15f253d9c45a90a8794143ecdd854650d58af1 /m4/empathy-valgrind.m4
parent0cfd80847f0d66967f56c7d6b3eb46793f725859 (diff)
downloadgsoc2013-empathy-a4004017570744524ff2d0af3efab045821fd46f.tar
gsoc2013-empathy-a4004017570744524ff2d0af3efab045821fd46f.tar.gz
gsoc2013-empathy-a4004017570744524ff2d0af3efab045821fd46f.tar.bz2
gsoc2013-empathy-a4004017570744524ff2d0af3efab045821fd46f.tar.lz
gsoc2013-empathy-a4004017570744524ff2d0af3efab045821fd46f.tar.xz
gsoc2013-empathy-a4004017570744524ff2d0af3efab045821fd46f.tar.zst
gsoc2013-empathy-a4004017570744524ff2d0af3efab045821fd46f.zip
Revert "merge git work"
This reverts commit 0cfd80847f0d66967f56c7d6b3eb46793f725859. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@519 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'm4/empathy-valgrind.m4')
-rw-r--r--m4/empathy-valgrind.m431
1 files changed, 31 insertions, 0 deletions
diff --git a/m4/empathy-valgrind.m4 b/m4/empathy-valgrind.m4
new file mode 100644
index 000000000..7a44e103f
--- /dev/null
+++ b/m4/empathy-valgrind.m4
@@ -0,0 +1,31 @@
+dnl Detect Valgrind location and flags
+
+AC_DEFUN([EMPATHY_VALGRIND],
+[
+ enable=$1
+ if test -n "$2"; then
+ valgrind_req=$2
+ else
+ valgrind_req="2.1"
+ fi
+
+ PKG_CHECK_MODULES(VALGRIND, valgrind > "$valgrind_req",
+ have_valgrind_runtime="yes", have_valgrind_runtime="no")
+
+ AC_PATH_PROG(VALGRIND_PATH, valgrind)
+
+ # Compile the instrumentation for valgrind only if the valgrind
+ # libraries are installed and the valgrind executable is found
+ if test "x$enable" = xyes &&
+ test "$have_valgrind_runtime" = yes &&
+ test -n "$VALGRIND_PATH" ;
+ then
+ AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used])
+ AC_MSG_NOTICE(using compile-time instrumentation for valgrind)
+ fi
+
+ AC_SUBST(VALGRIND_CFLAGS)
+ AC_SUBST(VALGRIND_LIBS)
+
+ AM_CONDITIONAL(HAVE_VALGRIND, test -n "$VALGRIND_PATH")
+])