cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=aca6fc8c3611b5e7d4faaed61e52dedf057d7219

commit aca6fc8c3611b5e7d4faaed61e52dedf057d7219
Author: Jean Guyomarc'h <jean.guyoma...@gmail.com>
Date:   Fri Jan 22 21:06:35 2016 +0100

    autotools: fix code coverage on OSX
    
    OSX uses clang as a default compiler instead of gcc.
    Gcov does not exist for clang, but clang has an alternative which
    requires additional compilier and linker flags.
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 configure.ac | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 19bf480..4b25b55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -327,8 +327,10 @@ EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
 if test "${want_coverage}" = "yes" ; then
    AC_CHECK_PROG([have_lcov], [lcov], [yes], [no])
    if test "x${have_lcov}" = "xyes" ; then
-      EFLALL_COV_CFLAGS="${EFLALL_COV_CFLAGS} -fprofile-arcs -ftest-coverage"
-      EFLALL_COV_LIBS="${EFLALL_COV_LIBS} -lgcov"
+      AC_SEARCH_LIBS([gcov], [_gcov_init])
+      EFL_CHECK_COMPILER_FLAGS([EFLALL], [-fprofile-arcs -ftest-coverage])
+      EFL_CHECK_COMPILER_FLAGS([EFLALL], [-fprofile-instr-generate 
-fcoverage-mapping])
+      EFL_CHECK_LINKER_FLAGS([EFLALL], [-fprofile-instr-generate 
-fcoverage-mapping])
       if test "x${prefer_assert}" = "xno"; then
          EFLALL_COV_CFLAGS="${EFLALL_COV_CFLAGS} -DNDEBUG"
       else

-- 


Reply via email to