summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2013-12-10 17:17:38 +0100
committerBert Vermeulen <bert@biot.com>2013-12-10 17:22:24 +0100
commitfbd226c3f70f20fdf3cbfd43a671bf2bcc5d23e6 (patch)
tree7372a8e8b359b38a1a542a16fe14dd9058d5bded /configure.ac
parent4d2c7619ec72728dd01999f20ef1004e018d18a4 (diff)
downloadlibsigrokdecode-fbd226c3f70f20fdf3cbfd43a671bf2bcc5d23e6.tar.gz
libsigrokdecode-fbd226c3f70f20fdf3cbfd43a671bf2bcc5d23e6.zip
Add protocol decoder testing framework.
This adds a tool in the tests directory, called pdtest. It uses the "test/" directory in every PD directory, if present, to run the PD against dumps found in the sigrok-dumps repository, and compares the output against ".output" files in the "test/" directory. The file "test/test.conf" is used to configure which tests to run. A separate tool (tests/runtc.c) is used to run the actual decoding and report output. To get an overview of the options, run tests/pdtest without any options.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index ca38710..1314dea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,6 +123,11 @@ PKG_CHECK_MODULES([check], [check >= 0.9.4],
LIBS="$LIBS $check_LIBS"], [have_check="no"])
AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
+PKG_CHECK_MODULES([libsigrok], [libsigrok >= 0.2.0],
+ [have_libsigrok="yes"; CFLAGS="$CFLAGS $libsigrok_CFLAGS";
+ LIBS="$LIBS $libsigrok_LIBS"], [have_libsigrok="no"])
+AM_CONDITIONAL(HAVE_LIBSIGROK, test x"$have_libsigrok" = "xyes")
+
# Checks for header files.
# These are already checked: inttypes.h stdint.h stdlib.h string.h unistd.h.
# AC_CHECK_HEADERS([])
@@ -178,7 +183,7 @@ echo "Detected libraries:"
echo
# Note: This only works for libs with pkg-config integration.
-for lib in "glib-2.0 >= 2.24.0" "check >= 0.9.4"; do
+for lib in "glib-2.0 >= 2.24.0" "check >= 0.9.4" "libsigrok >= 0.2.0"; do
if `$PKG_CONFIG --exists $lib`; then
ver=`$PKG_CONFIG --modversion $lib`
answer="yes ($ver)"