Merge lp:~ballogy/notify-osd/make-tests-optional into lp:notify-osd/oneiric

Proposed by Balló György
Status: Needs review
Proposed branch: lp:~ballogy/notify-osd/make-tests-optional
Merge into: lp:notify-osd/oneiric
Diff against target: 85 lines (+28/-6)
2 files modified
Makefile.am (+5/-1)
configure.in (+23/-5)
To merge this branch: bzr merge lp:~ballogy/notify-osd/make-tests-optional
Reviewer Review Type Date Requested Status
Canonical Desktop Experience Team Pending
Review via email: mp+83500@code.launchpad.net

Description of the change

This change makes it possible to disable building tests with '--disable-tests' configure switch. Libnotify checked only if either tests or C examples are requested.

To post a comment you must log in.
Revision history for this message
Balló György (ballogy) wrote :

Any decision?

Unmerged revisions

445. By Balló György

Make building tests optional

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile.am'
--- Makefile.am 2009-08-25 13:17:46 +0000
+++ Makefile.am 2011-11-27 02:18:24 +0000
@@ -1,9 +1,13 @@
1EXTRA_DIST = icons1EXTRA_DIST = icons
22
3SUBDIRS = src tests data examples3SUBDIRS = src data examples
4
5if BUILD_TESTS
6SUBDIRS += tests
47
5test: check8test: check
6tests: check9tests: check
7test-report: check10test-report: check
8check-valgrind: all11check-valgrind: all
9 cd tests && $(MAKE) $(AM_MAKEFLAGS) check-valgrind12 cd tests && $(MAKE) $(AM_MAKEFLAGS) check-valgrind
13endif
1014
=== modified file 'configure.in'
--- configure.in 2011-11-01 12:45:48 +0000
+++ configure.in 2011-11-27 02:18:24 +0000
@@ -39,11 +39,6 @@
39PKG_CHECK_MODULES([WNCK], [libwnck-3.0])39PKG_CHECK_MODULES([WNCK], [libwnck-3.0])
4040
41#41#
42# libnotify, used unit-tests
43#
44PKG_CHECK_MODULES([LIBNOTIFY], [libnotify >= 0.4.5])
45
46#
47# dbus42# dbus
48#43#
49PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= 0.76])44PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= 0.76])
@@ -76,6 +71,25 @@
76AC_SUBST(LIBM)71AC_SUBST(LIBM)
7772
78#73#
74# checks for building unit-tests
75#
76AC_ARG_ENABLE([tests],
77 AS_HELP_STRING([--enable-tests], [enable building tests]),,
78 enable_tests=auto)
79
80if test x"$enable_tests" != x"no" ; then
81PKG_CHECK_MODULES([LIBNOTIFY], [libnotify >= 0.4.5],
82 [have_tests=yes],
83 [have_tests=no])
84 if test x${enable_tests} = xyes && test x${have_tests} = xno; then
85 AC_MSG_ERROR([Tests configured but libnotify not found])
86 fi
87else
88 have_tests=no
89fi
90AM_CONDITIONAL(BUILD_TESTS, test x${have_tests} = xyes)
91
92#
79# checks for building C- or C#-examples93# checks for building C- or C#-examples
80#94#
81AC_DEFUN([CHECK_FOR_MONO_STUFF],95AC_DEFUN([CHECK_FOR_MONO_STUFF],
@@ -118,6 +132,7 @@
118c_examples=no132c_examples=no
119csharp_examples=no133csharp_examples=no
120if test "x$with_examples" = "xc"; then134if test "x$with_examples" = "xc"; then
135 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify >= 0.4.5])
121 c_examples=yes136 c_examples=yes
122 AC_MSG_NOTICE([Build with ANSI-C examples])137 AC_MSG_NOTICE([Build with ANSI-C examples])
123fi138fi
@@ -127,6 +142,7 @@
127 AC_MSG_NOTICE([Build with C-sharp examples])142 AC_MSG_NOTICE([Build with C-sharp examples])
128fi143fi
129if test "x$with_examples" = "xall"; then144if test "x$with_examples" = "xall"; then
145 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify >= 0.4.5])
130 CHECK_FOR_MONO_STUFF146 CHECK_FOR_MONO_STUFF
131 c_examples=yes147 c_examples=yes
132 csharp_examples=yes148 csharp_examples=yes
@@ -165,6 +181,8 @@
165echo ""181echo ""
166echo " prefix: ${prefix}"182echo " prefix: ${prefix}"
167echo ""183echo ""
184echo " Build Unit Tests: ${have_tests}"
185echo ""
168echo " Build C Examples: ${c_examples}"186echo " Build C Examples: ${c_examples}"
169echo ""187echo ""
170echo " Build C# Examples: ${csharp_examples}"188echo " Build C# Examples: ${csharp_examples}"

Subscribers

People subscribed via source and target branches