From 705eb1b42bd83149592a284a035b54c3346936da Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 26 Apr 2012 14:34:38 -0500 Subject: add scaffolding for indicator-session-service Google Testing with libdbustest --- configure.ac | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 1ef7d50..4a1317e 100644 --- a/configure.ac +++ b/configure.ac @@ -14,6 +14,7 @@ IT_PROG_INTLTOOL([0.35.0]) AC_ISC_POSIX AC_PROG_CC +AC_PROG_CXX AM_PROG_CC_C_O AC_STDC_HEADERS AC_PROG_LIBTOOL @@ -32,6 +33,7 @@ GTK3_REQUIRED_VERSION=3.0 INDICATOR_REQUIRED_VERSION=0.3.19 DBUSMENUGTK_REQUIRED_VERSION=0.5.90 POLKIT_REQUIRED_VERSION=0.92 +DBUSTEST_REQUIRED_VERSION=0.0.5 AC_ARG_WITH([gtk], [AS_HELP_STRING([--with-gtk], @@ -87,6 +89,8 @@ AS_IF([test "x$with_gtk" = x3], [ AC_DEFINE(HAVE_GTK3, 1, [whether gtk3 is available]) ]) +PKG_CHECK_MODULES(LIBDBUSTEST, dbustest-1 >= DBUSTEST_REQUIRED_VERSION) + ########################### # GTK Logout Helper ########################### @@ -170,6 +174,13 @@ else fi AC_SUBST(DBUSSERVICEDIR) +########################### +# Google Test framework +########################### + +m4_include([m4/gtest.m4]) +CHECK_GTEST + ############################## # Custom Junk ############################## @@ -236,6 +247,7 @@ data/icons/scalable/Makefile data/icons/scalable/actions/Makefile data/icons/scalable/status/Makefile data/extra-sessions/Makefile +tests/Makefile po/Makefile.in ]) -- cgit v1.2.3 From 6187dfbd140c6f3af8dce96c3cac1e86c6ff0442 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 26 Apr 2012 15:01:53 -0500 Subject: only require GTest and libdbustest if we're building the unit tests --- configure.ac | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 4a1317e..476fc2e 100644 --- a/configure.ac +++ b/configure.ac @@ -89,8 +89,6 @@ AS_IF([test "x$with_gtk" = x3], [ AC_DEFINE(HAVE_GTK3, 1, [whether gtk3 is available]) ]) -PKG_CHECK_MODULES(LIBDBUSTEST, dbustest-1 >= DBUSTEST_REQUIRED_VERSION) - ########################### # GTK Logout Helper ########################### @@ -178,8 +176,23 @@ AC_SUBST(DBUSSERVICEDIR) # 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 + if test "x$enable_tests" = "xyes"; then + PKG_CHECK_MODULES(LIBDBUSTEST, dbustest-1 >= DBUSTEST_REQUIRED_VERSION) + fi +fi +AM_CONDITIONAL([BUILD_TESTS],[test "x$enable_tests" = "xyes"]) ############################## # Custom Junk @@ -266,5 +279,6 @@ SUS Indicator Configuration: Indicator GTK: $with_gtk Logout Helper: $have_gtklogouthelper APT support: $enable_apt + Enable tests: $enable_tests Coverage reporting: $use_gcov ]) -- cgit v1.2.3 From 1bab86efd3e4637d61e20364c2859982605850b1 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 26 Apr 2012 16:37:10 -0500 Subject: sync with the other indicatorsGTest automake rules --- configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 476fc2e..e90a05e 100644 --- a/configure.ac +++ b/configure.ac @@ -189,10 +189,14 @@ if test "x$enable_tests" != "xno"; then AC_MSG_ERROR([tests were requested but gtest is not installed.]) fi if test "x$enable_tests" = "xyes"; then - PKG_CHECK_MODULES(LIBDBUSTEST, dbustest-1 >= DBUSTEST_REQUIRED_VERSION) + PKG_CHECK_MODULES([TEST_SERVICE],[indicator-0.4 >= $INDICATOR_REQUIRED_VERSION + dbustest-1 >= $DBUSTEST_REQUIRED_VERSION + dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION]) fi fi AM_CONDITIONAL([BUILD_TESTS],[test "x$enable_tests" = "xyes"]) +AC_SUBST([TEST_SERVICE_CFLAGS]) +AC_SUBST([TEST_SERVICE_LDFLAGS]) ############################## # Custom Junk @@ -279,6 +283,6 @@ SUS Indicator Configuration: Indicator GTK: $with_gtk Logout Helper: $have_gtklogouthelper APT support: $enable_apt - Enable tests: $enable_tests + Unit Tests: $enable_tests Coverage reporting: $use_gcov ]) -- cgit v1.2.3 From f2298244150295340ce53a35ea6ff92433105f2c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 27 Apr 2012 09:47:59 -0500 Subject: Switch to using the xorg-gtest main so that we're running under a dummy Xserver --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index e90a05e..3bac232 100644 --- a/configure.ac +++ b/configure.ac @@ -183,6 +183,7 @@ AC_ARG_ENABLE([tests], 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 -- cgit v1.2.3 From 3dff82bd5a24664d4121e81150631e35fb14f059 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 7 May 2012 16:30:01 -0700 Subject: remove gtk2 support --- configure.ac | 73 +++++++++++++----------------------------------------------- 1 file changed, 15 insertions(+), 58 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index de54ff4..84c5c2e 100644 --- a/configure.ac +++ b/configure.ac @@ -28,55 +28,27 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) # Dependencies ########################### -GTK_REQUIRED_VERSION=2.12 -GTK3_REQUIRED_VERSION=3.0 +GTK_REQUIRED_VERSION=3.0 INDICATOR_REQUIRED_VERSION=0.3.19 DBUSMENUGTK_REQUIRED_VERSION=0.5.90 POLKIT_REQUIRED_VERSION=0.92 DBUSTEST_REQUIRED_VERSION=0.0.5 +DBUSMENUGLIB_REQUIRED_VERSION=0.1.1 -AC_ARG_WITH([gtk], - [AS_HELP_STRING([--with-gtk], - [Which version of gtk to use for the indicator @<:@default=3@:>@])], - [], - [with_gtk=3]) - -AS_IF([test "x$with_gtk" = x3], - [PKG_CHECK_MODULES(APPLET, gtk+-3.0 >= $GTK3_REQUIRED_VERSION - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION) - ], - [test "x$with_gtk" = x2], - [PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION) - ], - [AC_MSG_FAILURE([Value for --with-indicator-gtk was neither 2 nor 3])] -) +PKG_CHECK_MODULES(APPLET, gtk+-3.0 >= $GTK_REQUIRED_VERSION + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION) AC_SUBST(APPLET_CFLAGS) AC_SUBST(APPLET_LIBS) -DBUSMENUGLIB_REQUIRED_VERSION=0.1.1 - -AS_IF([test "x$with_gtk" = x3], - [PKG_CHECK_MODULES(SESSIONSERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2) - ], - [test "x$with_gtk" = x2], - [PKG_CHECK_MODULES(SESSIONSERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2) - ] -) +PKG_CHECK_MODULES(SESSIONSERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION + dbus-glib-1 + gio-unix-2.0 + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + packagekit-glib2) AC_SUBST(SESSIONERVICE_CFLAGS) AC_SUBST(SESSIONERVICE_LIBS) @@ -84,11 +56,6 @@ PKG_CHECK_MODULES(GUDEV, gudev-1.0, has_gudev=true, has_gudev=false) AC_SUBST(GUDEV_CFLAGS) AC_SUBST(GUDEV_LIBS) -AM_CONDITIONAL([USE_GTK3], [test "x$with_gtk" = "x3"]) -AS_IF([test "x$with_gtk" = x3], [ - AC_DEFINE(HAVE_GTK3, 1, [whether gtk3 is available]) - ]) - ########################### # GTK Logout Helper ########################### @@ -98,19 +65,10 @@ AC_ARG_ENABLE([gtklogouthelper], enable_gtklogouthelper=auto) if test x"$enable_gtklogouthelper" != x"no" ; then - AS_IF([test "x$with_gtk" = x3], - [PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-3.0 >= $GTK3_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION, - [have_gtklogouthelper=yes], - [have_gtklogouthelper=no]) - ], - [test "x$with_gtk" = x2], - [PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-2.0 >= $GTK_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION, - [have_gtklogouthelper=yes], - [have_gtklogouthelper=no]) - ] - ) + PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-3.0 >= $GTK_REQUIRED_VERSION + polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION, + [have_gtklogouthelper=yes], + [have_gtklogouthelper=no]) if test x${have_gtklogouthelper} = xyes; then AC_DEFINE(HAVE_GTKLOGOUTHELPER, 1, [Define to 1 to enable GTK Logout Helper]) fi @@ -281,7 +239,6 @@ SUS Indicator Configuration: Prefix: $prefix Indicator Dir: $INDICATORDIR - Indicator GTK: $with_gtk Logout Helper: $have_gtklogouthelper APT support: $enable_apt Unit Tests: $enable_tests -- cgit v1.2.3 From 09ed92a81c950f6b2221652281c04c1c85e68177 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 4 Jun 2012 17:19:23 -0500 Subject: remove the software updates menuitem; it's no longer in the spec --- configure.ac | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 84c5c2e..f17db0b 100644 --- a/configure.ac +++ b/configure.ac @@ -83,18 +83,6 @@ AM_CONDITIONAL(BUILD_GTKLOGOUTHELPER, test x${have_gtklogouthelper} = xyes) AC_SUBST(GTKLOGOUTHELPER_CFLAGS) AC_SUBST(GTKLOGOUTHELPER_LIBS) -########################### -# APT support -########################### -AC_ARG_ENABLE([apt], - AC_HELP_STRING([--disable-apt], [disable APT support]),, - [enable_apt=yes]) -AM_CONDITIONAL([BUILD_APT], [test "x$enable_apt" != "xno"]) - -if test "x$enable_apt" != "xno"; then - AC_DEFINE(HAVE_APT, 1, [Define to 1 to enable APT support]) -fi - ########################### # Check to see if we're local ########################### @@ -240,7 +228,6 @@ SUS Indicator Configuration: Prefix: $prefix Indicator Dir: $INDICATORDIR Logout Helper: $have_gtklogouthelper - APT support: $enable_apt Unit Tests: $enable_tests Coverage reporting: $use_gcov ]) -- cgit v1.2.3 From fb89365ff1f8be1b407d1e0519c3d28744692011 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 4 Jun 2012 19:11:25 -0500 Subject: remove our udev dependency now that we no longer use it to look at devices --- configure.ac | 3 --- 1 file changed, 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index f17db0b..8d2d901 100644 --- a/configure.ac +++ b/configure.ac @@ -52,7 +52,6 @@ PKG_CHECK_MODULES(SESSIONSERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VE AC_SUBST(SESSIONERVICE_CFLAGS) AC_SUBST(SESSIONERVICE_LIBS) -PKG_CHECK_MODULES(GUDEV, gudev-1.0, has_gudev=true, has_gudev=false) AC_SUBST(GUDEV_CFLAGS) AC_SUBST(GUDEV_LIBS) @@ -188,8 +187,6 @@ AC_SUBST(COVERAGE_LDFLAGS) # Files ########################### -AM_CONDITIONAL([HAS_GUDEV], [test "x$has_gudev" = "xtrue"]) - AC_CONFIG_FILES([ Makefile src/Makefile -- cgit v1.2.3 From 28eebe0162f5caf8fec30e49291f81f48f118818 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 6 Jul 2012 15:11:40 -0500 Subject: if tests aren't explicitly requested, don't fail the build if dbus-test-runner isn't installed --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8d2d901..73f7a55 100644 --- a/configure.ac +++ b/configure.ac @@ -137,7 +137,9 @@ if test "x$enable_tests" != "xno"; then if test "x$enable_tests" = "xyes"; then PKG_CHECK_MODULES([TEST_SERVICE],[indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION dbustest-1 >= $DBUSTEST_REQUIRED_VERSION - dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION]) + dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION], + [enable_tests="yes"], + [enable_tests="no"]) fi fi AM_CONDITIONAL([BUILD_TESTS],[test "x$enable_tests" = "xyes"]) -- cgit v1.2.3 From 5b3945bab742d40e33e8a9bb3077cdc2b3898b22 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 11 Jul 2012 09:59:14 -0500 Subject: bumping version to 12.10.0 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 73f7a55..05983f0 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_INIT(src/indicator-session.c) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-session, 0.3.96) +AM_INIT_AUTOMAKE(indicator-session, 12.10.0) AM_MAINTAINER_MODE -- cgit v1.2.3