← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~ballogy/libindicate/make-tests-optional into lp:libindicate

 

György Balló has proposed merging lp:~ballogy/libindicate/make-tests-optional into lp:libindicate.

Requested reviews:
  Indicator Applet Developers (indicator-applet-developers)

For more details, see:
https://code.launchpad.net/~ballogy/libindicate/make-tests-optional/+merge/82847

This change makes it possible to disable building tests with '--disable-tests' configure switch.
-- 
https://code.launchpad.net/~ballogy/libindicate/make-tests-optional/+merge/82847
Your team ayatana-commits is subscribed to branch lp:libindicate.
=== modified file 'Makefile.am'
--- Makefile.am	2011-09-20 03:51:52 +0000
+++ Makefile.am	2011-11-21 07:26:01 +0000
@@ -13,9 +13,12 @@
 	$(LIBINDICATEGTK_SUBDIR) \
 	bindings \
 	examples \
-	tests \
 	$(DOC_SUBDIR)
 
+if WANT_TESTS
+SUBDIRS += tests
+endif
+
 EXTRA_DIST = \
 	COPYING.LGPL.2.1 \
 	gtk-doc.make \

=== modified file 'configure.ac'
--- configure.ac	2011-09-20 04:26:16 +0000
+++ configure.ac	2011-11-21 07:26:01 +0000
@@ -237,6 +237,14 @@
 ])
 GNOME_COMPILE_WARNINGS
 
+#########################
+# Check if build tests
+#########################
+AC_ARG_ENABLE([tests],
+	AC_HELP_STRING([--disable-tests], [Disable tests]),,
+	[enable_tests=yes])
+AM_CONDITIONAL([WANT_TESTS], [test "x$enable_tests" != "xno"])
+
 ##############################
 # Custom Junk
 ##############################
@@ -349,3 +357,8 @@
 	[AC_MSG_NOTICE([	Gtk:                    no])],
 	[AC_MSG_NOTICE([	Gtk:                    yes])]
 )
+
+AS_IF([test "x$enable_tests" != "xno"],
+	[AC_MSG_NOTICE([	Tests:                  yes])],
+	[AC_MSG_NOTICE([	Tests:                  no])]
+)