BIND 10 trac1999, updated. 0e338764b6b71df82872928da843baaeb0b8224e [trac1999] build libgtest.a is using --with-gtest-source
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Jul 6 21:03:45 UTC 2012
The branch, trac1999 has been updated
via 0e338764b6b71df82872928da843baaeb0b8224e (commit)
from a430ea9289e56be4d0749d587d70d2f419154e79 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0e338764b6b71df82872928da843baaeb0b8224e
Author: Jeremy C. Reed <jreed at ISC.org>
Date: Fri Jul 6 16:03:09 2012 -0500
[trac1999] build libgtest.a is using --with-gtest-source
(also removed an extra space out of an unrelated output)
-----------------------------------------------------------------------
Summary of changes:
Makefile.am | 8 +++++++-
configure.ac | 30 +++++++++++++++++++-----------
2 files changed, 26 insertions(+), 12 deletions(-)
-----------------------------------------------------------------------
diff --git a/Makefile.am b/Makefile.am
index 7024294..99b5d46 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
# ^^^^^^^^ This has to be the first line and cannot come later in this
# Makefile.am due to some bork in some versions of autotools.
-SUBDIRS = compatcheck doc src tests
+SUBDIRS = compatcheck doc . src tests
USE_LCOV=@USE_LCOV@
LCOV=@LCOV@
GENHTML=@GENHTML@
@@ -427,3 +427,9 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = dns++.pc
CLEANFILES = $(abs_top_builddir)/logger_lockfile
+
+if HAVE_GTEST_SOURCE
+noinst_LIBRARIES = libgtest.a
+libgtest_a_CXXFLAGS = $(GTEST_INCLUDES) $(AM_CXXFLAGS)
+nodist_libgtest_a_SOURCES = $(GTEST_SOURCE)/src/gtest-all.cc
+endif
diff --git a/configure.ac b/configure.ac
index a67f372..5952234 100644
--- a/configure.ac
+++ b/configure.ac
@@ -455,12 +455,13 @@ AC_SUBST(PYCOVERAGE_RUN)
AC_SUBST(USE_PYCOVERAGE)
enable_gtest="no"
+GTEST_INCLUDES=
AC_ARG_WITH([gtest-source],
[AS_HELP_STRING([--with-gtest-source=PATH],
[location of the Googletest source, defaults to /usr/src/gtest])],
[enable_gtest="yes" ; GTEST_SOURCE="$withval";
- GTEST_CPPFLAGS="-I$withval/include"],
+ GTEST_INCLUDES="-I$withval -I$withval/include"],
[GTEST_SOURCE="/usr/src/gtest"])
AC_ARG_WITH([gtest],
@@ -823,12 +824,17 @@ AC_SUBST(MULTITHREADING_FLAG)
#
# Check availability of gtest, which will be used for unit tests.
#
-if test "x$enable_gtest" = "xyes"
-then
+GTEST_LDFLAGS=
+GTEST_LDADD=
+DISTCHECK_GTEST_CONFIGURE_FLAG=
+if test "x$enable_gtest" = "xyes" ; then
DISTCHECK_GTEST_CONFIGURE_FLAG="--enable-gtest"
if test -n "$with_gtest_source" ; then
+# TODO: actually need to check if needs pthread
+GTEST_LDADD="$GTEST_LDADD $PTHREAD_LDFLAGS"
+
if test "x$GTEST_SOURCE" = "xyes" ; then
# If not specified, try some common paths.
@@ -845,9 +851,12 @@ AC_CHECK_FILES([$GTEST_SOURCE/src/gtest-all.cc]
[AC_MSG_ERROR(no gtest source but it was selected)])
DISTCHECK_GTEST_CONFIGURE_FLAG="$DISTCHECK_GTEST_CONFIGURE_FLAG $GTEST_SOURCE"
+ GTEST_LDFLAGS="\$(top_builddir)/libgtest.a"
fi
fi
+ if test "$gtest_path" != "no" ; then
+
if test "$gtest_path" != "yes"; then
GTEST_PATHS=$gtest_path
if test -x "${gtest_path}/bin/gtest-config" ; then
@@ -926,17 +935,16 @@ AC_CHECK_FILES([$GTEST_SOURCE/src/gtest-all.cc]
if test "${GTEST_FOUND}" != "true"; then
AC_MSG_ERROR([Cannot find gtest in: $GTEST_PATHS])
fi
-else
- GTEST_INCLUDES=
- GTEST_LDFLAGS=
- GTEST_LDADD=
- DISTCHECK_GTEST_CONFIGURE_FLAG=
+
+ fi
fi
-AM_CONDITIONAL(HAVE_GTEST, test $gtest_path != "no")
+AM_CONDITIONAL(HAVE_GTEST, test $enable_gtest != "no")
+AM_CONDITIONAL(HAVE_GTEST_SOURCE, test "X$have_gtest_source" = "Xyes")
AC_SUBST(DISTCHECK_GTEST_CONFIGURE_FLAG)
AC_SUBST(GTEST_INCLUDES)
AC_SUBST(GTEST_LDFLAGS)
AC_SUBST(GTEST_LDADD)
+AC_SUBST(GTEST_SOURCE)
dnl check for pkg-config itself so we don't try the m4 macro without pkg-config
AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes, no)
@@ -1336,12 +1344,12 @@ Features:
$enable_features
Developer:
- Google Tests: $gtest_path
+ Google Tests: $enable_gtest
Valgrind: $found_valgrind
C++ Code Coverage: $USE_LCOV
Python Code Coverage: $USE_PYCOVERAGE
Logger checks: $enable_logger_checks
- Generate Manuals: $enable_man
+ Generate Manuals: $enable_man
END
More information about the bind10-changes
mailing list