From 7ebd1bec24a732a0f7069e727ff4036f6b925e99 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 6 Nov 2012 18:28:32 -0600 Subject: add Google Test scaffolding to indicator-datetime: autotools rules, support for finding the uninstalled copy of the gsettings schema, and a 'hello world' test. --- configure.ac | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'configure.ac') 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 ]) -- cgit v1.2.3