From: Uwe Hermann Date: Tue, 8 Jan 2019 21:08:45 +0000 (+0100) Subject: Fix the build wrt gstreamermm-1.0. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=81c16ddcdf0dc76c1aca3a1b3fe6e58c22cc6d73;p=libsigrokflow.git Fix the build wrt gstreamermm-1.0. Also, make gstreamermm-1.0 a required dependency (not optional). --- diff --git a/Makefile.am b/Makefile.am index 27d3cb6..1dd7f30 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,13 +23,14 @@ GNUMAKEFLAGS = --no-print-directory 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 diff --git a/configure.ac b/configure.ac index 0054d80..3ebe563 100644 --- a/configure.ac +++ b/configure.ac @@ -68,12 +68,20 @@ SR_ARG_ENABLE_WARNINGS([SRF_WXXFLAGS], [-Wall], [-Wall -Wextra]) # 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 @@ -96,6 +104,6 @@ Compile configuration: - Linker flags.................... $LDFLAGS Detected libraries (required): - - gstreamermm..................... $sr_gstreamermm_version + - gstreamermm >= 1.8.0 ........... $srf_gstreamermm_version _EOF