# Ensure that local include directories are always searched first.
AM_CPPFLAGS = $(local_includes) -D_POSIX_C_SOURCE=200112L -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
-# The check CFLAGS are a superset of the libsigrok CFLAGS, and the
+# The tests CFLAGS are a superset of the libsigrok CFLAGS, and the
# python bindings CFLAGS are a superset of the C++ bindings CFLAGS.
-AM_CFLAGS = $(SR_EXTRA_CFLAGS) $(SR_WFLAGS) $(CHECK_CFLAGS)
+AM_CFLAGS = $(SR_EXTRA_CFLAGS) $(SR_WFLAGS) $(TESTS_CFLAGS)
AM_CXXFLAGS = $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)
lib_LTLIBRARIES = libsigrok.la
contrib/z60_libsigrok.rules
if HAVE_CHECK
-
TESTS = tests/main
-
check_PROGRAMS = ${TESTS}
+endif
tests_main_SOURCES = \
include/libsigrok/libsigrok.h \
tests/device.c \
tests/trigger.c
-tests_main_LDADD = libsigrok.la $(SR_EXTRA_LIBS) $(CHECK_LIBS)
-
-endif
+tests_main_LDADD = libsigrok.la $(SR_EXTRA_LIBS) $(TESTS_LIBS)
BUILD_EXTRA =
INSTALL_EXTRA =
# These are used to derive the compiler flags and for the "Requires.private"
# field in the generated libsigrok.pc file.
SR_VAR_OPT_PKG([SR_PKGLIBS], [sr_deps_avail])
-SR_PKGLIBS_CHECK=
+SR_PKGLIBS_TESTS=
SR_PKGLIBS_CXX=
SR_PKGLIBS_PYTHON=
######################
# The Check unit testing framework is optional. Disable if not found.
-SR_PKG_CHECK([check], [SR_PKGLIBS_CHECK], [check >= 0.9.4])
+SR_PKG_CHECK([check], [SR_PKGLIBS_TESTS], [check >= 0.9.4])
AM_CONDITIONAL([HAVE_CHECK], [test "x$sr_have_check" = xyes])
AC_LANG([C])
# Retrieve the compile and link flags for all modules combined.
# Also, bail out at this point if any module dependency is not met.
PKG_CHECK_MODULES([LIBSIGROK], [glib-2.0 >= 2.32.0 $SR_PKGLIBS])
-PKG_CHECK_MODULES([CHECK], [$SR_PKGLIBS_CHECK glib-2.0 $SR_PKGLIBS])
+PKG_CHECK_MODULES([TESTS], [$SR_PKGLIBS_TESTS glib-2.0 $SR_PKGLIBS])
# SR_PKGLIBS_CXX may be empty, so only invoke these checks when
# the C++ bindings are enabled.