diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-07-11 12:10:21 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-07-11 12:10:21 -0500 |
commit | 6401fdd7f7414cc16009bbd1a261dfaa36cbbacc (patch) | |
tree | 21f715c4d68d04b7c86d2a5849eefaacf1996256 /configure.ac | |
parent | 8e7ee28533094e6f3e5d9968e3841e5af38bf1ba (diff) | |
parent | 2343edb9f2a49354ab3d46a2fec85b840daf0709 (diff) | |
download | ayatana-indicator-power-6401fdd7f7414cc16009bbd1a261dfaa36cbbacc.tar.gz ayatana-indicator-power-6401fdd7f7414cc16009bbd1a261dfaa36cbbacc.tar.bz2 ayatana-indicator-power-6401fdd7f7414cc16009bbd1a261dfaa36cbbacc.zip |
merge lp:~charlesk/indicator-power/coverage
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index fc287a2..876edf7 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) -AM_INIT_AUTOMAKE([1.11 -Wall foreign subdir-objects dist-xz]) +AM_INIT_AUTOMAKE([1.11 -Wall foreign dist-xz]) AM_MAINTAINER_MODE([enable]) AM_SILENT_RULES([yes]) @@ -19,6 +19,7 @@ AM_SILENT_RULES([yes]) # Check for programs AC_PROG_CC AM_PROG_CC_C_O +AC_PROG_CXX # Initialize libtool LT_PREREQ([2.2.6]) @@ -48,6 +49,26 @@ PKG_CHECK_MODULES([GSD],[gnome-settings-daemon >= $GSD_REQUIRED_VERSION]) GLIB_GSETTINGS ########################### +# 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"]) + +########################### # gcov coverage reporting ########################### @@ -119,6 +140,8 @@ AC_CONFIG_FILES([ Makefile po/Makefile.in data/Makefile +src/Makefile +tests/Makefile ]) AC_OUTPUT @@ -132,5 +155,7 @@ Power Indicator Configuration: Prefix: $prefix Local Install: $with_localinstall + Unit Tests: $enable_tests gcov: $use_gcov + ]) |