Don't build gtk+:3 tests if not required patch originally by Gilles (eva) --- --- configure.ac +++ configure.ac @@ -93,9 +93,13 @@ AC_SUBST([pkg_modules]) PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) +AC_ARG_ENABLE([tests], + AS_HELP_STRING([--enable-tests], [Check for extra dependencies to build all tests])) +AS_IF([test $enable_tests = yes], [ tests_modules="gtk+-3.0 >= $REQ_GTK_VERSION" PKG_CHECK_MODULES(TESTS, [$tests_modules]) - +]) +AM_CONDITIONAL([MORE_TESTS], [test $enable_tests = yes]) GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0` AC_SUBST(GLIB_GENMARSHAL) --- tests/Makefile.am +++ tests/Makefile.am @@ -2,18 +2,15 @@ -I$(top_srcdir) \ $(TESTS_CFLAGS) -noinst_PROGRAMS = \ +check_PROGRAMS = \ test-replace \ - test-replace-widget \ test-server-info \ test-default-action \ test-multi-actions \ test-action-icons \ - test-image \ test-basic \ test-error \ test-markup \ - test-persistence \ test-resident \ test-rtl \ test-size-changes \ @@ -23,6 +20,22 @@ test-xy-actions \ test-xy-stress +#if MORE_TESTS +check_PROGRAMS += \ + test-image \ + test-replace-widget \ + test-persistence + +test_replace_widget_SOURCES = test-replace-widget.c +test_replace_widget_LDADD = $(common_ldflags) + +test_image_SOURCES = test-image.c +test_image_LDADD = $(common_ldflags) + +test_persistence_SOURCES = test-persistence.c +test_persistence_LDADD = $(common_ldflags) +#endif + common_ldflags = \ $(top_builddir)/libnotify/libnotify.la \ $(TESTS_LIBS) @@ -30,9 +43,6 @@ test_replace_SOURCES = test-replace.c test_replace_LDADD = $(common_ldflags) -test_replace_widget_SOURCES = test-replace-widget.c -test_replace_widget_LDADD = $(common_ldflags) - test_server_info_SOURCES = test-server-info.c test_server_info_LDADD = $(common_ldflags) @@ -48,9 +58,6 @@ test_action_icons_SOURCES = test-action-icons.c test_action_icons_LDADD = $(common_ldflags) -test_image_SOURCES = test-image.c -test_image_LDADD = $(common_ldflags) - test_basic_SOURCES = test-basic.c test_basic_LDADD = $(common_ldflags) @@ -75,9 +82,6 @@ test_rtl_SOURCES = test-rtl.c test_rtl_LDADD = $(common_ldflags) -test_persistence_SOURCES = test-persistence.c -test_persistence_LDADD = $(common_ldflags) - test_resident_SOURCES = test-resident.c test_resident_LDADD = $(common_ldflags)