summaryrefslogtreecommitdiff
path: root/m4/empathy-valgrind.m4
diff options
context:
space:
mode:
authorCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2009-12-04 21:14:58 -0200
committerCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2009-12-04 21:14:58 -0200
commit8fb9c3d6136c533cb5f240740f357647019b22ab (patch)
treed377aa717c5df7859a962dfd051aa6a40ffb4229 /m4/empathy-valgrind.m4
parent35c657537049f36e2d6fa445008a498dde4c8423 (diff)
downloadtelepathy-logger-8fb9c3d6136c533cb5f240740f357647019b22ab.tar.gz
Completed importing and refactoring of EmpathyLogStore
* removed any call which would make TPL depending on libempathy * copied empathy-time.[hc] * added some empathy's utility function to tpl_utils.[ch] * added support for automake/autoconf using empathy's one as basis: currently TPL depends on telepathy-glib and libxmp-2.0 (and theirs deps) * added AUTHORS COPYING INSTALL README and NEWS files (empty)
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 0000000..7a44e10
--- /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")
+])