aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-11-07 08:55:12 +0000
committerTarmac <Unknown>2012-11-07 08:55:12 +0000
commit2893be94b74895718d829b2f22388ea607de0980 (patch)
treed6a8e1a54f050aad7e2b97d9614b2252597a3179 /configure.ac
parentd1bb8ca95f0f9d39c344fa41e297c73e88143800 (diff)
parent7ebd1bec24a732a0f7069e727ff4036f6b925e99 (diff)
downloadayatana-indicator-datetime-2893be94b74895718d829b2f22388ea607de0980.tar.gz
ayatana-indicator-datetime-2893be94b74895718d829b2f22388ea607de0980.tar.bz2
ayatana-indicator-datetime-2893be94b74895718d829b2f22388ea607de0980.zip
Add scaffolding for Google Tests. Fixes: https://bugs.launchpad.net/bugs/985060.
Approved by Lars Uebernickel, PS Jenkins bot.
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 05e9fd3..9c67e55 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
])