AM_CPPFLAGS = -Iinclude -I$(srcdir)/include -I$(srcdir)/src -I.
-AM_CXXFLAGS = $(SRF_WXXFLAGS)
+AM_CXXFLAGS = $(SRF_WXXFLAGS) $(LIBSIGROKFLOW_CFLAGS)
lib_LTLIBRARIES = libsigrokflow.la
libsigrokflow_la_SOURCES = \
src/main.cpp
+libsigrokflow_la_LIBADD = $(LIBSIGROKFLOW_LIBS)
libsigrokflow_la_LDFLAGS = -version-info $(SRF_LIB_VERSION) -no-undefined
library_includedir = $(includedir)/libsigrokflow
# Check if the C++ compiler supports the C++11 standard.
AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
-SR_ARG_OPT_PKG([gstreamermm], [GSTREAMERMM], , [gstreamermm-1.0 >= 1.8.0])
-
##############################
## Finalize configuration ##
##############################
+# Add mandatory dependencies to module list.
+SR_APPEND([SRF_PKGLIBS], ['gstreamermm-1.0 >= 1.8.0'])
+AC_SUBST([SRF_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([LIBSIGROKFLOW], [$SRF_PKGLIBS])
+
+srf_gstreamermm_version=`$PKG_CONFIG --modversion gstreamermm-1.0 2>&AS_MESSAGE_LOG_FD`
+
AC_CONFIG_FILES([Makefile libsigrokflow.pc])
AC_OUTPUT
- Linker flags.................... $LDFLAGS
Detected libraries (required):
- - gstreamermm..................... $sr_gstreamermm_version
+ - gstreamermm >= 1.8.0 ........... $srf_gstreamermm_version
_EOF