build: fix linking with coverage enabled after osx fix

After aca6fc8c36 there have been problems when
linking when having coverage enabled.
AC_SEARCH_LIBS was used wrongly here. You need function name first and lib to
link against as second argument. The symbol name also has wto leading
underscores for me.
/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/../../../../x86_64-pc-linux-gnu/bin/ld generated: undefined
reference to `__gcov_init'
This commit is contained in:
Stefan Schmidt 2016-03-07 14:33:15 +01:00
parent da309d6863
commit 5181a4d0ef
1 changed files with 1 additions and 1 deletions

View File

@ -327,7 +327,7 @@ 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
AC_SEARCH_LIBS([gcov], [_gcov_init])
AC_SEARCH_LIBS([__gcov_init], [gcov])
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])