1From 5624aa156c551ab2b81bb86279844397ed690653 Mon Sep 17 00:00:00 2001
2From: Matteo Vescovi <matteo.vescovi@yahoo.co.uk>
3Date: Sun, 21 Jan 2018 17:17:12 +0000
4Subject: [PATCH] Fixed cppunit detection.
5
6---
7 configure.ac | 16 +++++++++++-----
8 1 file changed, 11 insertions(+), 5 deletions(-)
9
10diff --git a/configure.ac b/configure.ac
11index a02e9f1..1538a51 100644
12--- a/configure.ac
13+++ b/configure.ac
14@@ -204,10 +204,16 @@ AM_CONDITIONAL([USE_SQLITE], [test "x$use_sqlite" = "xyes"])
15 dnl ==================
16 dnl Checks for CppUnit
17 dnl ==================
18-AM_PATH_CPPUNIT([1.9.6],
19- [],
20- [AC_MSG_WARN([CppUnit not found. Unit tests will not be built. CppUnit can be obtained from http://cppunit.sourceforge.net.])])
21-AM_CONDITIONAL([HAVE_CPPUNIT], [test "$CPPUNIT_LIBS"])
22+PKG_CHECK_MODULES([CPPUNIT],
23+ [cppunit >= 1.9],
24+ [have_cppunit=yes],
25+ [AM_PATH_CPPUNIT([1.9],
26+ [have_cppunit=yes],
27+ [AC_MSG_WARN([CppUnit not found. Unit tests will not be built. CppUnit can be obtained from http://cppunit.sourceforge.net.])])
28+ ])
29+AC_SUBST([CPPUNIT_CFLAGS])
30+AC_SUBST([CPPUNIT_LIBS])
31+AM_CONDITIONAL([HAVE_CPPUNIT], [test "x$have_cppunit" = "xyes"])
32
33
34 dnl ============================
35@@ -592,7 +598,7 @@ then
36 else
37 build_demo_application="no"
38 fi
39-if test "$CPPUNIT_LIBS"
40+if test "x$have_cppunit" = "xyes"
41 then
42 build_unit_tests="yes"
43 else
44--
452.31.1
46