summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-11-18 07:12:38 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-11-18 07:12:38 +0000
commit4ae8b8cf8617ffcc2f82576ca586cff91f5fdda3 (patch)
tree2e7323a4f7f7ae08addcfed16795cc96ef5d39bd /m4
parent766a0c790d31795a2eaa51f9e7981b13eeb378a7 (diff)
merge: do not use recursive make for unit tests
SVN revision: 79413
Diffstat (limited to 'm4')
-rw-r--r--m4/efl_tests.m449
1 files changed, 0 insertions, 49 deletions
diff --git a/m4/efl_tests.m4 b/m4/efl_tests.m4
deleted file mode 100644
index 612baa0..0000000
--- a/m4/efl_tests.m4
+++ /dev/null
@@ -1,49 +0,0 @@
1dnl Copyright (C) 2008-2012 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if tests programs are wanted and if yes, if
5dnl the Check library is available.
6dnl the lcov program is available.
7
8dnl Usage: EFL_CHECK_TESTS(EFL[, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
9dnl Define the automake conditionnal EFL_ENABLE_TESTS
10
11AC_DEFUN([EFL_CHECK_TESTS],
12[
13m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
14
15dnl configure option
16
17AC_REQUIRE([PKG_PROG_PKG_CONFIG])
18
19PKG_CHECK_MODULES([CHECK],
20 [check >= 0.9.5],
21 [_efl_enable_tests="yes"],
22 [_efl_enable_tests="no"])
23
24AM_CONDITIONAL([EFL_ENABLE_TESTS], [test "x${_efl_enable_tests}" = "xyes"])
25
26_efl_enable_coverage="no"
27AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
28if test "x$have_lcov" = "xyes" ; then
29 m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -fprofile-arcs -ftest-coverage"
30 m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} -lgcov"
31# remove any optimisation flag and force debug symbols
32 if test "x${prefer_assert}" = "xno"; then
33 m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -DNDEBUG"
34 else
35 m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -g -O0 -DDEBUG"
36 fi
37 _efl_enable_coverage="yes"
38else
39 AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
40fi
41
42AM_CONDITIONAL([EFL_ENABLE_COVERAGE], [test "x${_efl_enable_coverage}" = "xyes"])
43
44AS_IF([test "x$_efl_enable_tests" = "xyes"], [$2], [$3])
45
46m4_popdef([UPEFL])
47])
48
49dnl End of efl_tests.m4