Browse Source

Fix --with-lcov to actually accept the specified location.
And fix setting of CPPFLAGS and LIBS. Don't use make-style
variable syntax in shell scripts as it became shell command substition.


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@424 e5f2f494-b856-4b98-b285-d166d9295462

Jeremy C. Reed 15 years ago
parent
commit
07144bf236
1 changed files with 4 additions and 3 deletions
  1. 4 3
      configure.ac

+ 4 - 3
configure.ac

@@ -33,7 +33,7 @@ AC_TRY_COMPILE([
         AC_MSG_RESULT(no))
         AC_MSG_RESULT(no))
 
 
 AC_ARG_WITH(lcov,
 AC_ARG_WITH(lcov,
-[  --with-lcov         enable gtest and coverage target using the specified lcov], lcov="yes", lcov="no")
+[  --with-lcov[=PROGRAM]         enable gtest and coverage target using the specified lcov], lcov="$withval", lcov="no")
 
 
 AC_ARG_WITH(gtest,
 AC_ARG_WITH(gtest,
 [  --with-gtest=PATH       specify a path to gtest header files (PATH/include) and library (PATH/lib)],
 [  --with-gtest=PATH       specify a path to gtest header files (PATH/include) and library (PATH/lib)],
@@ -65,8 +65,9 @@ if test "$lcov" != "no"; then
 	if test ! -x $GENHTML; then
 	if test ! -x $GENHTML; then
 		AC_MSG_ERROR([genhtml not found, needed for lcov])
 		AC_MSG_ERROR([genhtml not found, needed for lcov])
 	fi
 	fi
-	CPPFLAGS="$(CPPFLAGS) -fprofile-arcs -ftest-coverage"
-	LIBS=" $(LIBS) -lgcov"
+	# GCC specific?
+	CPPFLAGS="$CPPFLAGS -fprofile-arcs -ftest-coverage"
+	LIBS=" $LIBS -lgcov"
 	AC_SUBST(CPPFLAGS)
 	AC_SUBST(CPPFLAGS)
 	AC_SUBST(LIBS)
 	AC_SUBST(LIBS)
 	AC_SUBST(LCOV)
 	AC_SUBST(LCOV)