summaryrefslogtreecommitdiff
path: root/legacy/eet/m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-07-01 12:01:46 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-07-01 12:01:46 +0000
commitb415c1dd55025dcba746043a656c0dbb885a2b96 (patch)
treeb6c90cd0ed007ca128eff8b10a33e389d63463f5 /legacy/eet/m4
parent5859a1ded55f5ae9bbd253e81a1f93b5c0151a18 (diff)
Eet: remove --enable-coverage option.
Now, coverage is detected with just --enable-tests. Buildbot maintainers : please remove --enable-coverage option to eet (more EFL will be supported later) SVN revision: 73108
Diffstat (limited to 'legacy/eet/m4')
-rw-r--r--legacy/eet/m4/efl_coverage.m462
-rw-r--r--legacy/eet/m4/efl_tests.m428
2 files changed, 25 insertions, 65 deletions
diff --git a/legacy/eet/m4/efl_coverage.m4 b/legacy/eet/m4/efl_coverage.m4
deleted file mode 100644
index 85d03215b3..0000000000
--- a/legacy/eet/m4/efl_coverage.m4
+++ /dev/null
@@ -1,62 +0,0 @@
1dnl Copyright (C) 2008 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 coverage support is wanted and, if yes, if
5dnl lcov is available.
6
7dnl Usage: EFL_CHECK_COVERAGE(tests [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
8dnl The parameter 'tests' is used if a dependency is needed. If set to "yes",
9dnl the dependency is available.
10dnl Defines EFL_COVERAGE_CFLAGS and EFL_COVERAGE_LIBS variables
11dnl Defines the automake conditionnal EFL_ENABLE_COVERAGE
12
13AC_DEFUN([EFL_CHECK_COVERAGE],
14[
15
16dnl configure option
17
18AC_ARG_ENABLE([coverage],
19 [AC_HELP_STRING([--enable-coverage], [enable coverage profiling instrumentation @<:@default=disabled@:>@])],
20 [
21 if test "x${enableval}" = "xyes" ; then
22 _efl_enable_coverage="yes"
23 else
24 _efl_enable_coverage="no"
25 fi
26 ],
27 [_efl_enable_coverage="no"])
28
29AC_MSG_CHECKING([whether to use profiling instrumentation])
30AC_MSG_RESULT([$_efl_enable_coverage])
31
32dnl lcov check
33
34if test "x$_efl_enable_coverage" = "xyes" && test ! "x$1" = "xyes" ; then
35 AC_MSG_WARN([Coverage report requested but tests not being built, disable profiling instrumentation.])
36 AC_MSG_WARN([Run configure with --enable-tests])
37 _efl_enable_coverage="no"
38fi
39
40if test "x$_efl_enable_coverage" = "xyes" ; then
41 AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
42 if test "x$have_lcov" = "xyes" ; then
43 EFL_COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
44 EFL_COVERAGE_LIBS="-lgcov"
45# remove any optimisation flag and force debug symbols
46 EFL_DEBUG_CFLAGS="-g -O0 -DDEBUG"
47 else
48 AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
49 _efl_enable_coverage="no"
50 fi
51fi
52
53dnl Substitution
54AC_SUBST(EFL_COVERAGE_CFLAGS)
55AC_SUBST(EFL_COVERAGE_LIBS)
56
57AM_CONDITIONAL(EFL_ENABLE_COVERAGE, test "x${_efl_enable_coverage}" = "xyes")
58
59AS_IF([test "x$_efl_enable_coverage" = "xyes"], [$2], [$3])
60])
61
62dnl End of efl_coverage.m4
diff --git a/legacy/eet/m4/efl_tests.m4 b/legacy/eet/m4/efl_tests.m4
index 3a4dfe246f..edd57f2199 100644
--- a/legacy/eet/m4/efl_tests.m4
+++ b/legacy/eet/m4/efl_tests.m4
@@ -1,14 +1,16 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr> 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. 2dnl That code is public domain and can be freely used or copied.
3 3
4dnl Macro that check if tests programs are wanted and if yes, if 4dnl Macro that check if tests programs are wanted and if yes, if
5dnl the Check library is available. 5dnl the Check library is available.
6dnl the lcov program is available.
6 7
7dnl Usage: EFL_CHECK_TESTS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) 8dnl Usage: EFL_CHECK_TESTS(EFL[, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
8dnl Define the automake conditionnal EFL_ENABLE_TESTS 9dnl Define the automake conditionnal EFL_ENABLE_TESTS
9 10
10AC_DEFUN([EFL_CHECK_TESTS], 11AC_DEFUN([EFL_CHECK_TESTS],
11[ 12[
13m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
12 14
13dnl configure option 15dnl configure option
14 16
@@ -35,9 +37,29 @@ if test "x${_efl_enable_tests}" = "xyes" ; then
35 [_efl_enable_tests="no"]) 37 [_efl_enable_tests="no"])
36fi 38fi
37 39
40efl_enable_coverage="no"
41if test "x${_efl_enable_tests}" = "xyes" ; then
42 AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
43 if test "x$have_lcov" = "xyes" ; then
44 m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -fprofile-arcs -ftest-coverage"
45 m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} -lgcov"
46# remove any optimisation flag and force debug symbols
47 m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -g -O0 -DDEBUG"
48 efl_enable_coverage="yes"
49 else
50 AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
51 fi
52fi
53
54dnl Substitution
55AC_SUBST(EFL_COVERAGE_CFLAGS)
56AC_SUBST(EFL_COVERAGE_LIBS)
57
38AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes") 58AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes")
39 59
40AS_IF([test "x$_efl_enable_tests" = "xyes"], [$1], [$2]) 60AS_IF([test "x$_efl_enable_tests" = "xyes"], [$2], [$3])
61
62m4_popdef([UPEFL])
41]) 63])
42 64
43dnl End of efl_tests.m4 65dnl End of efl_tests.m4