aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-19 22:21:33 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-20 16:20:40 +0000
commitc9b51672c21efcc2e52e4a744a0e4d7ca5406dea (patch)
treeab9e34deb2b2b393f7d1b7625b28a9f63d46f575 /configure.ac
parent762c75fadaeff8b333f74143646a6fd69c1460cf (diff)
downloadpaludis-c9b51672c21efcc2e52e4a744a0e4d7ca5406dea.tar.gz
paludis-c9b51672c21efcc2e52e4a744a0e4d7ca5406dea.tar.xz
Start using Google Test for unit tests
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 5f195a002..1b4ad2e4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1580,6 +1580,34 @@ fi
dnl }}}
+dnl {{{ gtest
+
+AC_MSG_CHECKING([whether to run tests that require Google Test])
+AC_ARG_ENABLE([gtest],
+ AS_HELP_STRING([--enable-gtest], [Run tests that require Google Test]),
+ [HAVE_GTEST=$enableval
+ AC_MSG_RESULT([$enableval])],
+ [HAVE_GTEST=yes
+ AC_MSG_RESULT([yes])])
+AC_SUBST([HAVE_GTEST])
+AM_CONDITIONAL([HAVE_GTEST], test "x$HAVE_HTMLTIDY" = "xyes")
+
+if test "x$HAVE_GTEST" = "xyes" ; then
+ AC_CHECK_PROG(HAVE_GTEST_CONFIG, [gtest-config], [yes], [no])
+ if test "x$HAVE_GTEST_CONFIG" = xno ; then
+ AC_MSG_ERROR([gtest-config from Google Test not found, but --disable-gtest was not used])
+ fi
+
+ GTESTDEPS_CXXFLAGS=`gtest-config --cxxflags`
+ GTESTDEPS_LDFLAGS=`gtest-config --ldflags`
+ GTESTDEPS_LIBS=`gtest-config --libs`
+ AC_SUBST(GTESTDEPS_CXXFLAGS)
+ AC_SUBST(GTESTDEPS_LDFLAGS)
+ AC_SUBST(GTESTDEPS_LIBS)
+fi
+
+dnl }}}
+
dnl {{{ libxml2 check
NEED_XML=$need_xml_check
if test "x$need_xml_check" = "xyes" ; then