summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 95020a3..34a70e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,10 +35,17 @@ AC_CHECK_HEADER(sdbusplus/server.hpp, ,[AC_MSG_ERROR([Could not find sdbusplus/s
# Checks for library functions.
LT_INIT # Removes 'unrecognized options: --with-libtool-sysroot'
+
+# Make it possible for users to choose if they want test support
+# explicitly or not at all
+AC_ARG_ENABLE([tests], [Whether we should build test cases])
+
# Check/set gtest specific functions.
-PKG_CHECK_MODULES([GMOCK], [gtest_main],,)
-PKG_CHECK_MODULES([GTEST], [gmock],,)
-AX_PTHREAD
+AS_IF([test "x$enable_tests" != "xno"], [
+ PKG_CHECK_MODULES([GMOCK], [gtest_main],,)
+ PKG_CHECK_MODULES([GTEST], [gmock],,)
+ AX_PTHREAD
+])
AC_ARG_ENABLE([oe-sdk],
AS_HELP_STRING([--enable-oe-sdk], [Link testcases absolutely against OE SDK so they can be ran within it.])
OpenPOWER on IntegriCloud