aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-11-06 18:28:32 -0600
committerCharles Kerr <charles.kerr@canonical.com>2012-11-06 18:28:32 -0600
commit7ebd1bec24a732a0f7069e727ff4036f6b925e99 (patch)
treea6c0d6c2b9e04ce2e93612a947f2d390045aea7e /configure.ac
parentab006f93c2bf00a3bb7b33cebf26a12e46821fbb (diff)
downloadayatana-indicator-datetime-7ebd1bec24a732a0f7069e727ff4036f6b925e99.tar.gz
ayatana-indicator-datetime-7ebd1bec24a732a0f7069e727ff4036f6b925e99.tar.bz2
ayatana-indicator-datetime-7ebd1bec24a732a0f7069e727ff4036f6b925e99.zip
add Google Test scaffolding to indicator-datetime: autotools rules, support for finding the uninstalled copy of the gsettings schema, and a 'hello world' test.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6b34706..e0f1156 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,6 +20,7 @@ AM_SILENT_RULES([yes])
# Check for programs
AC_PROG_CC
AM_PROG_CC_C_O
+AC_PROG_CXX
AC_HEADER_STDC
# Initialize libtool
@@ -179,6 +180,26 @@ else
fi
AC_SUBST(DBUSSERVICEDIR)
+###########################
+# Google Test framework
+###########################
+
+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
+ CHECK_XORG_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"])
+
##############################
# Custom Junk
##############################
@@ -232,5 +253,6 @@ Date and Time Indicator Configuration:
Indicator Dir: $INDICATORDIR
CC Panel: $have_ccpanel
CC Panel Dir: $CCPANELDIR
+ Unit Tests: $enable_tests
gcov: $use_gcov
])