configure: Make gtest detection more flexible
This modifies the configure script to pull the googletest information
from pkgconfig. Now we don't have to manually configure GTEST specific
flags, we gain the correct library and header paths automatically. It
still understands how to detect googletest without pkgconfig if needed.
Change-Id: I7add3ee3073252adac7199415154c6805221e362
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index ab0ec78..d4d41e4 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,7 +1,7 @@
if WANT_LIBSDBUSPLUS
-AM_CPPFLAGS = -I$(top_srcdir) $(GTEST_CPPFLAGS)
-gtest_ldadd = -lgtest -lgtest_main $(OESDK_TESTCASE_FLAGS) $(PTHREAD_LIBS)
+AM_CPPFLAGS = -I$(top_srcdir) $(GTEST_CFLAGS)
+gtest_ldadd = $(GTEST_LIBS) -lgtest_main $(OESDK_TESTCASE_FLAGS) $(PTHREAD_LIBS)
check_PROGRAMS =
TESTS = $(check_PROGRAMS)