diff options
author | infirit <[email protected]> | 2015-07-10 12:34:57 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2015-07-10 12:34:57 +0200 |
commit | 84eab85dc4dfdeb31a06068f712ba64f6e2741f5 (patch) | |
tree | 9ca8b549aa8c99bb768e3d0778af8833814270a6 /configure.ac | |
parent | e426bfaf784a1350cb76ee96655003310a4a42e2 (diff) | |
download | atril-84eab85dc4dfdeb31a06068f712ba64f6e2741f5.tar.bz2 atril-84eab85dc4dfdeb31a06068f712ba64f6e2741f5.tar.xz |
Gtk3: Add webkit2gtk-4.0 and prefer it over 3.0
A lot of distro's are dropping webkit2gtk-3.0 and 4.0 works
just as well.
Also use have_webkit variable in the PKG_CONFIG checks.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index aa3ae9af..1df26b7f 100644 --- a/configure.ac +++ b/configure.ac @@ -144,7 +144,7 @@ case "$with_gtk" in WEBKIT_REQUIRED=2.4.3 ;; 3.0) GTK_API_VERSION=3.0 - WEBKIT_API_VERSION=3.0 + WEBKIT_API_VERSION=4.0 GAIL_API_VERSION=-3.0 GTK_REQUIRED=3.0.0 WEBKIT_REQUIRED=2.4.3 @@ -699,29 +699,30 @@ if test "x$enable_epub" = "xyes"; then case "$with_gtk" in 2.0) PKG_CHECK_MODULES(EPUB, webkit-$WEBKIT_API_VERSION >= $WEBKIT_REQUIRED \ - libxml-2.0 >= $LIBXML_REQUIRED zlib,enable_epub=yes,enable_epub=no) + libxml-2.0 >= $LIBXML_REQUIRED zlib,have_webkit=yes,have_webkit=no) ;; 3.0) PKG_CHECK_MODULES(EPUB, webkit2gtk-$WEBKIT_API_VERSION >= $WEBKIT_REQUIRED \ - libxml-2.0 >= $LIBXML_REQUIRED zlib,enable_epub=yes,enable_epub=no) - if test "x$enable_epub" = "xno"; then - WEBKIT_API_VERSION=4.0 + libxml-2.0 >= $LIBXML_REQUIRED zlib,have_webkit=yes,have_webkit=no) + if test "x$have_webkit" = "xno"; then + AC_MSG_NOTICE([Webkit2 4.0 not found, trying 3.0]) + WEBKIT_API_VERSION=3.0 PKG_CHECK_MODULES(EPUB, webkit2gtk-$WEBKIT_API_VERSION >= $WEBKIT_REQUIRED \ - libxml-2.0 >= $LIBXML_REQUIRED zlib,enable_epub=yes,enable_epub=no) + libxml-2.0 >= $LIBXML_REQUIRED zlib,have_webkit=yes,have_webkit=no) fi ;; esac - if test "x$enable_epub" = "xyes"; then + if test "x$have_webkit" = "xyes"; then AC_DEFINE([ENABLE_EPUB], [1], [Enable support for ePub documents.]) else - enable_epub="no" + have_webkit="no" AC_MSG_WARN(["ePub support is disabled."]) fi fi -AM_CONDITIONAL(ENABLE_EPUB, test x$enable_epub = xyes) +AM_CONDITIONAL(ENABLE_EPUB, test x$have_webkit = xyes) dnl ================== End of EPUB checks =================================================== @@ -751,7 +752,7 @@ fi if test "x$enable_xps" = "xyes"; then ATRIL_MIME_TYPES="${ATRIL_MIME_TYPES}application/oxps;application/vnd.ms-xpsdocument;" fi -if test "x$enable_epub" = "xyes"; then +if test "x$have_webkit" = "xyes"; then ATRIL_MIME_TYPES="${ATRIL_MIME_TYPES}application/epub+zip;" fi @@ -950,5 +951,5 @@ Configure summary: Pixbuf Backend.....: $enable_pixbuf Comics Backend.....: $enable_comics XPS Backend........: $enable_xps - ePub Backend.......: $enable_epub + ePub Backend.......: $have_webkit " |