--- configure.ac.orig 2020-05-26 17:38:06.000000000 -0600
+++ configure.ac 2020-07-01 20:02:22.195324025 -0600
@@ -52,7 +52,7 @@ AS_IF([test "x$with_gtest" == "xdownload
fi
])],
[test "x$with_gtest" == "xyes"], [
- AS_IF([test -e "$GTEST_PATH/src/gtest-all.cc"], [], [
+ AS_IF([test -e "$GTEST_PATH/include/gtest/gtest.h"], [], [
AC_MSG_ERROR([could not find gtest source at path $GTEST_PATH.])
])
],
@@ -60,7 +60,8 @@ AS_IF([test "x$with_gtest" == "xdownload
[AC_MSG_ERROR([invalid value $with_gtest for with_gtest.])]
)
AS_IF([test "x$with_gtest" == "xyes"],
- [GTEST_CFLAGS="-I$GTEST_PATH/include -I$GTEST_PATH"]);
+ [GTEST_CFLAGS="-I$GTEST_PATH/include/gtest"
+ GTEST_LIBS="-lgtest"]);
AM_CONDITIONAL(with_gtest, test "x$with_gtest" == "xyes")
DEPS_CFLAGS="$GTEST_CFLAGS"
--- Makefile.am.orig 2020-05-26 17:38:06.000000000 -0600
+++ Makefile.am 2020-07-01 20:01:29.430329069 -0600
@@ -41,7 +41,7 @@ TESTS=unittest
check_PROGRAMS=$(TESTS)
unittest_CXXFLAGS = -I$(top_srcdir)/src/ -std=gnu++0x
-unittest_LDADD = $(top_builddir)/libmemtailor.la -lpthread
+unittest_LDADD = $(top_builddir)/libmemtailor.la -lgtest -lpthread
# test_LIBS=
unittest_SOURCES=src/test/ArenaTest.cpp src/test/BufferPoolTest.cpp \
--- src/test/gtestInclude.cpp.orig 2020-05-26 17:38:06.000000000 -0600
+++ src/test/gtestInclude.cpp 2020-07-01 20:01:29.430329069 -0600
@@ -5,4 +5,4 @@
// the compiler flags are the same, which is the whole point of the
// recommendation to build gtest for each program.
-#include "src/gtest-all.cc"
+#include <gtest/gtest.h>