test: Link gtest_main in test binaries

The library gtest_main provides a 'main' function which runs the tests
and reports whether they passed or failed. When it's not included,
linking fails because there is no 'main' function.

Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: I79310447053e07eb1873fc353ef99b0b12223328
diff --git a/configure.ac b/configure.ac
index 21970ae..3fc2baa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,7 +27,7 @@
 LT_INIT # Required for systemd linking
 
 # Check/set gtest specific functions.
-PKG_CHECK_MODULES([GTEST], [gtest], [], [AC_MSG_NOTICE([gtest not found, tests will not build])])
+PKG_CHECK_MODULES([GTEST], [gtest_main], [], [AC_MSG_NOTICE([gtest not found, tests will not build])])
 PKG_CHECK_MODULES([GMOCK], [gmock], [], [AC_MSG_NOTICE([gmock not found, tests will not build])])
 AX_PTHREAD([GTEST_CFLAGS+=" -DGTEST_HAS_PTHREAD=1 "],[GTEST_CFLAGS+=" -DGTEST_HAS_PTHREAD=0 "])