From: Daniel Elstner Date: Wed, 26 Aug 2015 11:01:16 +0000 (+0200) Subject: Build: Use TESTS prefix instead of CHECK for flag variables X-Git-Tag: libsigrokdecode-0.4.0~86 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff_plain;h=a654ef6e407f1f914a6ec9b104a5e4cf9b84524c Build: Use TESTS prefix instead of CHECK for flag variables In order to avoid confusion of the flags-gathering pkg-config result with the actual test for the availability of "check", change the pkg-config output variable prefix from CHECK to TESTS. --- diff --git a/Makefile.am b/Makefile.am index 0d33f53..0515e80 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,8 +25,8 @@ MAKEFLAGS = --no-print-directory DECODERS_DIR = $(pkgdatadir)/decoders AM_CPPFLAGS = -D_POSIX_C_SOURCE=200112L -DDECODERS_DIR='"$(DECODERS_DIR)"' -# The check CFLAGS are a superset of the libsigrokdecode CFLAGS. -AM_CFLAGS = $(SRD_EXTRA_CFLAGS) $(SRD_WFLAGS) $(CHECK_CFLAGS) +# The tests CFLAGS are a superset of the libsigrokdecode CFLAGS. +AM_CFLAGS = $(SRD_EXTRA_CFLAGS) $(SRD_WFLAGS) $(TESTS_CFLAGS) lib_LTLIBRARIES = libsigrokdecode.la @@ -71,7 +71,7 @@ tests_main_SOURCES = \ tests/session.c tests_main_CPPFLAGS = -D_POSIX_C_SOURCE=200112L -DDECODERS_DIR='"$(abs_top_srcdir)/decoders"' -tests_main_LDADD = libsigrokdecode.la $(SRD_EXTRA_LIBS) $(CHECK_LIBS) +tests_main_LDADD = libsigrokdecode.la $(SRD_EXTRA_LIBS) $(TESTS_LIBS) MAINTAINERCLEANFILES = ChangeLog diff --git a/configure.ac b/configure.ac index c1704cb..fe5d5fb 100644 --- a/configure.ac +++ b/configure.ac @@ -69,7 +69,7 @@ PKG_PROG_PKG_CONFIG([0.22]) # These are used to derive the compiler flags and for the "Requires.private" # field in the generated libsigrokdecode.pc file. SRD_PKGLIBS= -SRD_PKGLIBS_CHECK= +SRD_PKGLIBS_TESTS= # Keep track of all checked modules so we can list them at the end. SR_PKG_CHECK_SUMMARY([srd_pkglibs_summary]) @@ -95,7 +95,7 @@ AS_IF([test "x$PYTHON3" = x], SR_PKG_CHECK_SUMMARY([srd_pkglibs_opt_summary]) # The Check unit testing framework is optional. Disable if not found. -SR_PKG_CHECK([check], [SRD_PKGLIBS_CHECK], [check >= 0.9.4]) +SR_PKG_CHECK([check], [SRD_PKGLIBS_TESTS], [check >= 0.9.4]) AM_CONDITIONAL([HAVE_CHECK], [test "x$sr_have_check" = xyes]) # Enable the C99 standard if possible, and enforce the use @@ -120,7 +120,7 @@ AC_SUBST([SRD_PKGLIBS]) # 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([LIBSIGROKDECODE], [glib-2.0 >= 2.24.0 $SRD_PKGLIBS]) -PKG_CHECK_MODULES([CHECK], [$SRD_PKGLIBS_CHECK glib-2.0 $SRD_PKGLIBS]) +PKG_CHECK_MODULES([TESTS], [$SRD_PKGLIBS_TESTS glib-2.0 $SRD_PKGLIBS]) srd_glib_version=`$PKG_CONFIG --modversion glib-2.0 2>&AS_MESSAGE_LOG_FD`