From 6ba0000aa903dfcb1a9718aa4431028d1400cc0a Mon Sep 17 00:00:00 2001 From: raveit65 Date: Thu, 4 May 2023 16:15:06 +0200 Subject: support webkit2 4.0 and 4.1 Co-authored-by: Colomban Wendling --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9783c8aa..f341f0a7 100644 --- a/configure.ac +++ b/configure.ac @@ -622,7 +622,13 @@ AC_ARG_ENABLE(epub, have_webkit="no" if test "x$enable_epub" = "xyes"; then - PKG_CHECK_MODULES(EPUB, webkit2gtk-4.1 >= $WEBKIT_REQUIRED \ + dnl select the available WebKit2Gtk4 version, with a preference towards 4.1 + webkit_pkg=webkit2gtk-4.1 + PKG_CHECK_EXISTS([$webkit_pkg >= $WEBKIT_REQUIRED], [], + [PKG_CHECK_EXISTS([webkit2gtk-4.0 >= $WEBKIT_REQUIRED], + [webkit_pkg=webkit2gtk-4.0])]) + + PKG_CHECK_MODULES(EPUB, $webkit_pkg >= $WEBKIT_REQUIRED \ libxml-2.0 >= $LIBXML_REQUIRED zlib,have_webkit=yes,have_webkit=no) if test "x$have_webkit" = "xyes"; then -- cgit v1.2.1