File: Correctly-check-for-the-check-requirement-of-enable-.patch

package info (click to toggle)
libqb 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,796 kB
  • ctags: 2,139
  • sloc: ansic: 18,844; sh: 11,559; makefile: 359
file content (40 lines) | stat: -rw-r--r-- 1,487 bytes parent folder | download | duplicates (2)
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
From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org>
Date: Mon, 5 Dec 2016 12:37:47 +0100
Subject: Correctly check for the "check" requirement of --enable-syslog-tests

---
 configure.ac | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index bb8357c..3c902f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -466,10 +466,8 @@ AC_ARG_ENABLE([coverage],
 AC_ARG_ENABLE([slow-tests],
   [AS_HELP_STRING([--enable-slow-tests],[build and run slow tests])])
 
-if test x"$with_check" = xyes; then
 AC_ARG_ENABLE([syslog-tests],
   [AS_HELP_STRING([--enable-syslog-tests],[build and run syslog tests])])
-fi
 
 AC_ARG_WITH([socket-dir],
   [AS_HELP_STRING([--with-socket-dir=DIR],[socket directory @<:@LOCALSTATEDIR/run@:>@])],
@@ -570,10 +568,12 @@ if test "x${enable_slow_tests}" = xyes ; then
 fi
 AM_CONDITIONAL(HAVE_SLOW_TESTS, [test "x${enable_slow_tests}" = xyes])
 AC_SUBST(HAVE_SLOW_TESTS)
-if test "x${enable_syslog_tests}" = xyes ; then
-	AC_DEFINE([HAVE_SYSLOG_TESTS], 1,[have syslog tests])
-	AC_MSG_NOTICE([Enabling syslog tests])
-fi
+
+AS_IF([test "x$enable_syslog_tests" = xyes],
+  [AS_IF([test "x$with_check" = xno],
+    [AC_MSG_ERROR([--enable-syslog-tests requires the "check" test harness])],
+    [AC_DEFINE([HAVE_SYSLOG_TESTS], 1,[have syslog tests])
+     AC_MSG_NOTICE([Enabling syslog tests])])])
 AM_CONDITIONAL(HAVE_SYSLOG_TESTS, [test "x${enable_syslog_tests}" = xyes])
 AC_SUBST(HAVE_SYSLOG_TESTS)