X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=configure.ac;h=80dba11737d76060809a063c759ed8a2cd1b8103;hb=c65de66c488abeb2d55abd4cf5eda2a1a1309c4e;hp=d8311b372da083af38bc0fb5601a3ee7c14f229d;hpb=dbfaa548703dc80e04f86e4dcc443e6ec5b028fb;p=libsigrokflow.git diff --git a/configure.ac b/configure.ac index d8311b3..80dba11 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ([2.63]) AC_INIT([libsigrokflow], [0.1.0], [sigrok-devel@lists.sourceforge.net], - [libsigrokflow], [http://www.sigrok.org]) + [libsigrokflow], [https://www.sigrok.org]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([autostuff]) AC_CONFIG_HEADERS([config.h]) @@ -62,8 +62,19 @@ SR_LIB_VERSION_SET([SRF_LIB_VERSION], [0:0:0]) # We require at least 0.22, as "Requires.private" behaviour changed there. PKG_PROG_PKG_CONFIG([0.22]) +# Keep track of all checked modules so we can list them at the end. +SR_PKG_CHECK_SUMMARY([srf_pkglibs_summary]) + +# Collect the pkg-config module names of all dependencies in SRF_PKGLIBS. +# These are used to derive the compiler flags and for the "Requires.private" +# field in the generated libsigrokflow.pc file. +SR_VAR_OPT_PKG([SRF_PKGLIBS], [srf_deps_avail]) + +SR_ARG_OPT_PKG([libsigrokcxx], [LIBSIGROKCXX], , [libsigrokcxx >= 0.5.1]) +SR_ARG_OPT_PKG([libsigrokdecode], [LIBSIGROKDECODE], , [libsigrokdecode >= 0.5.1]) + AC_LANG([C++]) -SR_ARG_ENABLE_WARNINGS([SRF_WXXFLAGS], [-Wall], [-Wall -Wextra]) +SR_ARG_ENABLE_WARNINGS([SRF_WXXFLAGS], [-Wall], [-Wall -Wextra -Wformat-security]) # Check if the C++ compiler supports the C++11 standard. AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) @@ -72,6 +83,16 @@ AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) ## 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 @@ -93,4 +114,10 @@ Compile configuration: - C++ compiler warnings........... $SRF_WXXFLAGS - Linker flags.................... $LDFLAGS +Detected libraries (required): + - gstreamermm >= 1.8.0 ........... $srf_gstreamermm_version + +Detected libraries (optional): +$srf_pkglibs_summary + _EOF