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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
dnl configure-time options for Telepathy Salut
dnl SALUT_ARG_DEBUG
dnl SALUT_ARG_VALGRIND
dnl SALUT_ARG_COVERAGE
AC_DEFUN([SALUT_ARG_DEBUG],
[
dnl debugging stuff
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--disable-debug],[compile without debug code]),
[
case "${enableval}" in
yes|no) enable="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac
],
[enable=yes])
if test "$enable" = yes; then
AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
fi
])
AC_DEFUN([SALUT_ARG_VALGRIND],
[
dnl valgrind inclusion
AC_ARG_ENABLE(valgrind,
AC_HELP_STRING([--enable-valgrind],[enable valgrind checking and run-time detection]),
[
case "${enableval}" in
yes|no) enable="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
esac
],
[enable=no])
SALUT_VALGRIND($enable, [2.1])
])
AC_DEFUN([SALUT_ARG_COVERAGE],
[
AC_ARG_ENABLE(coverage,
AC_HELP_STRING([--enable-coverage],
[compile with coverage profiling instrumentation (gcc only)]),
[
case "${enableval}" in
yes|no) enable="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-coverage) ;;
esac
],
[enable=no])
SALUT_GCOV($enable)
SALUT_LCOV($enable)
])
|