summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTrond Norbye <Trond.Norbye@sun.com>2009-10-12 14:29:43 +0200
committerDustin Sallings <dustin@spy.net>2009-10-12 14:32:34 -0700
commit9ff5b444a14f9c03d77ce6548c690bdcfc41e0c6 (patch)
tree43d536bfa51fec7ab79efeb3d7d9e0dc0f669b4a /configure.ac
parentf81f69db54c4f1303943b3874c6eaeeb3b91aeaa (diff)
downloadmemcached-9ff5b444a14f9c03d77ce6548c690bdcfc41e0c6.tar.gz
Issue 97: Check for the existence of libgcov
We use gcov for checking code coverage for the test suite when using gcc. Previously we assumed that libgcov was available if gcov was installed on the target system.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 53127c0..c2b830d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,8 +114,15 @@ if test "x$enable_coverage" != "xno"; then
CFLAGS="$CFLAGS -pthread"
AC_PATH_PROG([PROFILER], [gcov], "no", [$PATH])
if test "x$PROFILER" != "xno"; then
- PROFILER_FLAGS="-fprofile-arcs -ftest-coverage"
- PROFILER_LDFLAGS="-lgcov"
+ # Issue 97: The existense of gcov doesn't mean we have -lgcov
+ AC_CHECK_LIB(gcov, main,
+ [
+ PROFILER_FLAGS="-fprofile-arcs -ftest-coverage"
+ PROFILER_LDFLAGS="-lgcov"
+ ], [
+ PROFILER_FLAGS=
+ PROFILER_LDFLAGS=
+ ])
fi
elif test "$SUNCC" = "yes"
then