summaryrefslogtreecommitdiff
path: root/m4/efl_tests.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/efl_tests.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