[svn] commit: r466 - in /branches/jinmei-dnsrrparams: configure.ac src/lib/dns/cpp/Makefile.am

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Jan 14 00:35:06 UTC 2010


Author: jinmei
Date: Thu Jan 14 00:35:05 2010
New Revision: 466

Log:
supported lcov

Modified:
    branches/jinmei-dnsrrparams/configure.ac
    branches/jinmei-dnsrrparams/src/lib/dns/cpp/Makefile.am

Modified: branches/jinmei-dnsrrparams/configure.ac
==============================================================================
--- branches/jinmei-dnsrrparams/configure.ac (original)
+++ branches/jinmei-dnsrrparams/configure.ac Thu Jan 14 00:35:05 2010
@@ -32,8 +32,6 @@
 if test $enable_shared != "no" -a "X$GCC" = "Xyes"; then
    CXXFLAGS="$CXXFLAGS -fPIC"
 fi
-
-AC_SUBST(CXXFLAGS)
 
 #
 # Check availablity of boost: 
@@ -79,6 +77,42 @@
 AC_SUBST(GTEST_LDFLAGS)
 AC_SUBST(GTEST_LDADD)
 
+AC_ARG_WITH(lcov,
+[  --with-lcov[=PROGRAM]     enable gtest and coverage target using the specified lcov], lcov="$withval", lcov="no")
+
+USE_LCOV="no"
+if test "$lcov" != "no"; then
+	# force gtest if not set
+	if test "$gtest_path" = "no"; then
+		gtest_path="yes"
+	fi
+	if test "$lcov" != "yes"; then
+		LCOV_PATHS=$lcov
+	else
+		LCOV_PATHS="/usr/bin/lcov /usr/local/bin/lcov"
+	fi
+	for f in $LCOV_PATHS; do
+		if test -x "$f"; then
+			USE_LCOV="yes"
+			LCOV=$f
+		fi
+	done
+	if test $USE_LCOV != "yes"; then
+		AC_MSG_ERROR([Cannot find lcov in: $LCOV_PATHS])
+	fi
+	# is genhtml always in the same directory?
+	GENHTML=`echo "$LCOV" | sed s/lcov$/genhtml/`
+	if test ! -x $GENHTML; then
+		AC_MSG_ERROR([genhtml not found, needed for lcov])
+	fi
+	# GCC specific?
+	CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
+	LIBS=" $LIBS -lgcov"
+fi
+
+AC_SUBST(CXXFLAGS)
+AC_SUBST(LIBS)
+
 # Checks for library functions.
 
 AC_CONFIG_FILES([Makefile

Modified: branches/jinmei-dnsrrparams/src/lib/dns/cpp/Makefile.am
==============================================================================
--- branches/jinmei-dnsrrparams/src/lib/dns/cpp/Makefile.am (original)
+++ branches/jinmei-dnsrrparams/src/lib/dns/cpp/Makefile.am Thu Jan 14 00:35:05 2010
@@ -1,4 +1,6 @@
 AM_CPPFLAGS = $(BOOST_INCLUDES)
+
+CLEANFILES = *.gcno *.gcda
 
 lib_LTLIBRARIES = libdns.la
 libdns_la_SOURCES = buffer.h name.cc name.h messagerenderer.h messagerenderer.cc




More information about the bind10-changes mailing list