summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikko Koppanen <mkoppanen@php.net>2011-04-03 07:34:14 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-04-03 07:34:14 +0200
commita48b6cfc003833e40198442124d034942f9f41e3 (patch)
tree8b626beb391b60fe622ca0c3ece2ce9a320f7536
parent656b646bc634993bd9cb1b036a6838c5d0514fa8 (diff)
Additional gcov changes
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
-rw-r--r--acinclude.m432
1 files changed, 21 insertions, 11 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 9c9a770..c518789 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -68,7 +68,7 @@ AC_DEFUN([LIBZMQ_CHECK_LANG_CLANG],
])])
dnl ##############################################################################
-dnl # LIBZMQ_CHECK_LANG_GCC4([action-if-found], [action-if-not-found]) #
+dnl # LIBZMQ_CHECK_LANG_GCC4([action-if-found], [action-if-not-found]) #
dnl # Check if the current language is compiled using clang #
dnl ##############################################################################
AC_DEFUN([LIBZMQ_CHECK_LANG_GCC4],
@@ -331,18 +331,28 @@ AC_DEFUN([LIBZMQ_WITH_GCOV], [{
AC_MSG_CHECKING(whether to enable code coverage)
- if test "x$GXX" != "xyes"; then
- AC_MSG_ERROR([--with-gcov=yes works only with GCC])
- fi
+ if test "x$ZMQ_GCOV" = "xyes"; then
- CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"
- if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then
- CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}"
- fi
+ if test "x$GXX" != "xyes"; then
+ AC_MSG_ERROR([--with-gcov=yes works only with GCC])
+ fi
+
+ CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"
+ if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then
+ CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}"
+ fi
+
+ CPPFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"
+ if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then
+ CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}"
+ fi
+
+ CXXFLAGS="-fprofile-arcs"
+ if test "x${ZMQ_ORIG_CXXFLAGS}" != "xnone"; then
+ CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}"
+ fi
- CPPFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"
- if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then
- CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}"
+ LIBS="-lgcov ${LIBS}"
fi
AS_IF([test "x$ZMQ_GCOV" = "xyes"],