Support glibmm 2.68 which has been released one year ago and is the first stable release in the glibmm-2.68 ABI series: https://gitlab.gnome.org/GNOME/glibmm/-/blob/2.68.2/NEWS
Signed-off-by: Fabrice Fontaine <[email protected]> --- Changes v1 -> v2 (after review of Gerhard Sittig): - Split patch - Add more comments to explain what is the preferred version README | 2 +- bindings/cxx/libsigrokcxx.pc.in | 2 +- configure.ac | 12 +++++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README b/README index 768c8ca2..b88ddf22 100644 --- a/README +++ b/README @@ -63,7 +63,7 @@ Requirements for the C++ bindings: - doxygen (required for building the bindings, not only for C++ API docs!) - graphviz (optional, only needed for the C++ API docs) - Python (2 or 3) executable (development files are not needed) - - glibmm-2.4 (>= 2.32.0) + - glibmm-2.4 (>= 2.32.0) which is the preferred version or glibmm-2.68 (>= 2.68.0) as a fallback Requirements for the Python bindings: diff --git a/bindings/cxx/libsigrokcxx.pc.in b/bindings/cxx/libsigrokcxx.pc.in index 10a92f2d..7d2723fc 100644 --- a/bindings/cxx/libsigrokcxx.pc.in +++ b/bindings/cxx/libsigrokcxx.pc.in @@ -6,7 +6,7 @@ includedir=@includedir@ Name: libsigrokcxx Description: C++ bindings for libsigrok URL: http://www.sigrok.org -Requires: libsigrok glibmm-2.4 +Requires: libsigrok @SR_GLIBMM_REQUIRES@ Version: @SR_PACKAGE_VERSION@ Libs: -L${libdir} -lsigrokcxx Libs.private: -lm diff --git a/configure.ac b/configure.ac index 424b0002..edfbc25a 100644 --- a/configure.ac +++ b/configure.ac @@ -407,9 +407,19 @@ AS_IF([test "x$HAVE_CXX11" != x1], [SR_APPEND([sr_cxx_missing], [', '], ['C++11'])]) # The C++ bindings need glibmm. -SR_PKG_CHECK([glibmm], [SR_PKGLIBS_CXX], [glibmm-2.4 >= 2.32.0]) +# SR_GLIBMM_REQUIRES is used in SR_PKG_CHECK and in libsigrokcxx.pc +# (so users of libsigrokcxx will know what version of glibmm is needed) +SR_GLIBMM_REQUIRES=glibmm-2.4 +# First check for glibmm-2.4 which is the preferred version +SR_PKG_CHECK([glibmm], [SR_PKGLIBS_CXX], [$SR_GLIBMM_REQUIRES >= 2.32.0]) +# If glibmm-2.4 is not found, check for glibmm-2.68 as a fallback +AS_IF([test "x$sr_have_glibmm" != xyes], + [SR_GLIBMM_REQUIRES=glibmm-2.68 + SR_PKG_CHECK([glibmm], [SR_PKGLIBS_CXX], [$SR_GLIBMM_REQUIRES >= 2.68.0])]) +# If glibmm-2.4 and glibmm-2.68 are not found, cxx will silently be disabled AS_IF([test "x$sr_have_glibmm" != xyes], [SR_APPEND([sr_cxx_missing], [', '], [glibmm])]) +AC_SUBST(SR_GLIBMM_REQUIRES) # The C++ bindings use Doxygen to parse libsigrok symbols. AC_CHECK_PROG([HAVE_DOXYGEN], [doxygen], [yes], [no]) -- 2.34.1 _______________________________________________ sigrok-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sigrok-devel

