diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/m4/efl_coverage.m4 | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2 SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz |
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/m4/efl_coverage.m4 | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/libraries/evas/m4/efl_coverage.m4 b/libraries/evas/m4/efl_coverage.m4 new file mode 100644 index 0000000..85d0321 --- /dev/null +++ b/libraries/evas/m4/efl_coverage.m4 | |||
@@ -0,0 +1,62 @@ | |||
1 | dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl That code is public domain and can be freely used or copied. | ||
3 | |||
4 | dnl Macro that check if coverage support is wanted and, if yes, if | ||
5 | dnl lcov is available. | ||
6 | |||
7 | dnl Usage: EFL_CHECK_COVERAGE(tests [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
8 | dnl The parameter 'tests' is used if a dependency is needed. If set to "yes", | ||
9 | dnl the dependency is available. | ||
10 | dnl Defines EFL_COVERAGE_CFLAGS and EFL_COVERAGE_LIBS variables | ||
11 | dnl Defines the automake conditionnal EFL_ENABLE_COVERAGE | ||
12 | |||
13 | AC_DEFUN([EFL_CHECK_COVERAGE], | ||
14 | [ | ||
15 | |||
16 | dnl configure option | ||
17 | |||
18 | AC_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 | |||
29 | AC_MSG_CHECKING([whether to use profiling instrumentation]) | ||
30 | AC_MSG_RESULT([$_efl_enable_coverage]) | ||
31 | |||
32 | dnl lcov check | ||
33 | |||
34 | if 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" | ||
38 | fi | ||
39 | |||
40 | if 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 | ||
51 | fi | ||
52 | |||
53 | dnl Substitution | ||
54 | AC_SUBST(EFL_COVERAGE_CFLAGS) | ||
55 | AC_SUBST(EFL_COVERAGE_LIBS) | ||
56 | |||
57 | AM_CONDITIONAL(EFL_ENABLE_COVERAGE, test "x${_efl_enable_coverage}" = "xyes") | ||
58 | |||
59 | AS_IF([test "x$_efl_enable_coverage" = "xyes"], [$2], [$3]) | ||
60 | ]) | ||
61 | |||
62 | dnl End of efl_coverage.m4 | ||