summaryrefslogtreecommitdiff
blob: 70664702a324d06157fbee0304ace91bdb564c51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From 5656a17634fe5032105075e3a5d9a38b50559486 Mon Sep 17 00:00:00 2001
From: Romain Perier <mrpouet@gentoo.org>
Date: Sat, 3 Apr 2010 18:16:41 +0200
Subject: [PATCH] Do not build testsuite as default (it may consume too much cpu for nothing)

---
 Makefile.am  |    5 ++++-
 configure.in |    3 +++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index b09eda1..307b6b4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,12 @@
 EXTRA_DIST = icons
 
-SUBDIRS = src tests data examples
+SUBDIRS = src data examples
 
+if BUILD_TESTS
+SUBDIRS += tests
 test:		check
 tests:		check
 test-report:	check
 check-valgrind: all
 	cd tests && $(MAKE) $(AM_MAKEFLAGS) check-valgrind
+endif
diff --git a/configure.in b/configure.in
index fdc8020..e3858ee 100644
--- a/configure.in
+++ b/configure.in
@@ -102,6 +102,8 @@ AC_ARG_WITH(examples, [  --with-examples=[[all/c/mono]]
                           demonstrating special features of notify-osd
                           there are Python-examples too, but they don't
                           need to be build])
+AC_ARG_ENABLE(tests, [  --enable-tests
+		     	build testsuite and generate "make test" target to start them ], enable_tests=$enableval, enable_tests=no)
 
 c_examples=no
 csharp_examples=no
@@ -122,6 +124,7 @@ if test "x$with_examples" = "xall"; then
         AC_MSG_NOTICE([Build with C-sharp examples])
 fi
 
+AM_CONDITIONAL(BUILD_TESTS, test "x$enable_tests" != "xno")
 AM_CONDITIONAL(BUILD_C_EXAMPLES, test "x$c_examples" != "xno")
 AM_CONDITIONAL(BUILD_MONO_EXAMPLES, test "x$csharp_examples" != "xno")
 
-- 
1.7.0.4