From: Francis Dupont Date: Mon, 17 Oct 2016 15:53:45 +0000 (+0200) Subject: [5051] Ported the check from trac4631 X-Git-Tag: trac5060_base~4^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c37654b677fab42a4fe205e9043934f2d11e3a1a;p=thirdparty%2Fkea.git [5051] Ported the check from trac4631 --- diff --git a/configure.ac b/configure.ac index 1cf71532fd..3fd4e791ca 100644 --- a/configure.ac +++ b/configure.ac @@ -1261,6 +1261,27 @@ AC_SUBST(GTEST_LDFLAGS) AC_SUBST(GTEST_LDADD) AC_SUBST(GTEST_SOURCE) +# +# Some Googletest versions bug with C++11 compilers +# +if test $enable_gtest != "no"; then + AC_MSG_CHECKING([if Google Test is compatible with the compiler]) + CPPFLAGS_SAVED=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $GTEST_INCLUDES" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [#include + #include + void foo() { + boost::shared_ptr bar; + ASSERT_TRUE(bar); + }], + [return 0;])], + [AC_MSG_RESULT(yes)], + [AC_MSG_ERROR([XXX_TRUE() Gtest macros won't compile: please use a different version of Gtest, e.g., git one])]) + CPPFLAGS=$CPPFLAGS_SAVED +fi + # # ASIO: we extensively use it as the C++ event management module. #