summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorGergely Nagy <algernon@madhouse-project.org>2012-04-29 00:52:05 +0200
committerGergely Nagy <algernon@madhouse-project.org>2012-04-29 00:52:05 +0200
commit36847dcdae8abb9239dcbcdc2446cfb7042302d0 (patch)
treedccf0aa043d8367ac4bd2ac49fe774189b3abf67 /configure.ac
parentcf66dbeb8820ef935045813598aa5a48be00526a (diff)
downloadlibumberlog-36847dcdae8abb9239dcbcdc2446cfb7042302d0.tar.gz
libumberlog-36847dcdae8abb9239dcbcdc2446cfb7042302d0.tar.xz
libumberlog-36847dcdae8abb9239dcbcdc2446cfb7042302d0.zip
Convert the test suite to Check
While assert() is a neat tool, it is not really suitable for testing, as it gives hardly any indication on what part of the test suite failed, and why. For this purpose, an existing testing library, such as Check is a much better option, so lets use that! Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index f3805c7..84c3a19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,9 +54,12 @@ AC_SEARCH_LIBS([clock_gettime], [rt], [], [
])
dnl ***************************************************************************
-dnl JSON-C headers/libraries
+dnl Libraries for the test suite
dnl ***************************************************************************
PKG_CHECK_MODULES(JSON, json >= $JSON_C_MIN_VERSION,[enable_tests="1"],[enable_tests="0"])
+if test "x$enable_tests" = "x1"; then
+ PKG_CHECK_MODULES(CHECK, check, [enable_tests="1"],[enable_tests="0"])
+fi
dnl ***************************************************************************
dnl misc features to be enabled