xref: /OK3568_Linux_fs/buildroot/package/linknx/0001-configure-ac-tweak-CPPUNIT-conditional.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 8e7da14647dada5eee8f583b0814bffb31d1b91e Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Sun, 21 Apr 2019 23:17:34 +0200
4Subject: [PATCH] configure.ac: tweak CPPUNIT conditional
5
6Following review of buildroot's patch
7(http://patchwork.ozlabs.org/patch/1088520), tweak CPPUNIT to move call
8to AM_CONDITIONAL outside condition
9
10Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
11[Retrieved from:
12https://github.com/linknx/linknx/commit/8e7da14647dada5eee8f583b0814bffb31d1b91e]
13---
14 configure.ac | 10 ++++------
15 1 file changed, 4 insertions(+), 6 deletions(-)
16
17diff --git a/configure.ac b/configure.ac
18index 51d8ae66..4d9d8efa 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -135,22 +135,20 @@ if test x"$WITH_CPPUNIT" != xno; then
22       AC_DEFINE([HAVE_CPPUNIT], [1], [cppunit])
23       AC_SUBST(CPPUNIT_CFLAGS)
24       AC_SUBST(CPPUNIT_LIBS)
25-      AM_CONDITIONAL(CPPUNIT, true)
26+      found_cppunit=yes
27     ],[
28       AC_MSG_RESULT([no])
29-      AM_CONDITIONAL(CPPUNIT, false)
30     ])
31   else
32     PKG_CHECK_MODULES(CPPUNIT, $CPPUNITPC >= 1.9.6, [
33       AC_DEFINE([HAVE_CPPUNIT], [1], [cppunit])
34       AC_SUBST(CPPUNIT_CFLAGS)
35       AC_SUBST(CPPUNIT_LIBS)
36-      AM_CONDITIONAL([CPPUNIT], true)
37-    ],[AM_CONDITIONAL([CPPUNIT], false)])
38+      found_cppunit=yes
39+    ])
40   fi
41-else
42-  AM_CONDITIONAL([CPPUNIT], false)
43 fi
44+AM_CONDITIONAL([CPPUNIT], [test x"$found_cppunit" = xyes])
45
46 dnl #########################################################################
47 dnl Check if using log4cpp
48