aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAllan LeSage <allanlesage@gmail.com>2012-04-16 13:32:10 -0500
committerAllan LeSage <allanlesage@gmail.com>2012-04-16 13:32:10 -0500
commit00edffe61a1131953899f2eae35d31e25871fa4c (patch)
treee5d6f346b6da93c47782364b3b3904e01bd04d2e /configure.ac
parent77386961444d5d06387f3024f2116654f17d3690 (diff)
downloadayatana-indicator-messages-00edffe61a1131953899f2eae35d31e25871fa4c.tar.gz
ayatana-indicator-messages-00edffe61a1131953899f2eae35d31e25871fa4c.tar.bz2
ayatana-indicator-messages-00edffe61a1131953899f2eae35d31e25871fa4c.zip
Adjusted enabling tests to Charles suggestion (removed xyes=xyes).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 16 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index a429d17..8261207 100644
--- a/configure.ac
+++ b/configure.ac
@@ -124,8 +124,21 @@ AC_SUBST(COVERAGE_LDFLAGS)
# Google Test framework
###########################
-m4_include([m4/gtest.m4])
-CHECK_GTEST
+AC_ARG_ENABLE([tests],
+ [AS_HELP_STRING([--disable-tests], [Disable test scripts and tools (default=auto)])],
+ [enable_tests=${enableval}],
+ [enable_tests=auto])
+if test "x$enable_tests" != "xno"; then
+ m4_include([m4/gtest.m4])
+ CHECK_GTEST
+ if test "x$enable_tests" = "xauto"; then
+ enable_tests=${have_gtest}
+ elif test "x$enable_tests" = "xyes" && test "x$have_gtest" != "xyes"; then
+ AC_MSG_ERROR([tests were requested but gtest is not installed.])
+ fi
+fi
+AM_CONDITIONAL([BUILD_TESTS],[test "x$enable_tests" = "xyes"])
+
###########################
# Check to see if we're local
@@ -229,5 +242,6 @@ Messaging Indicator Configuration:
Prefix: $prefix
Indicator Dir: $INDICATORDIR
+ gtest: $enable_tests
gcov: $use_gcov
])