[evince] Add a configure check for hi-dpi support



commit 8b965e769808815df9c75a10a0e4972c0904d26a
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Thu Feb 27 11:07:55 2014 -0500

    Add a configure check for hi-dpi support
    
    In order to support hi-dpi (GDK_SCALE) we need new-enough versions
    of both GTK+ and cairo. Add a configure check for the appropriate
    functions and define HAVE_HIDPI_SUPPORT.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723431

 configure.ac |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3c30e45..b7358c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,6 +157,23 @@ PKG_CHECK_MODULES(LIBVIEW, gtk+-3.0 >= $GTK_REQUIRED gail-3.0 >= $GTK_REQUIRED g
 PKG_CHECK_MODULES(BACKEND, cairo >= $CAIRO_REQUIRED gtk+-3.0 >= $GTK_REQUIRED)
 PKG_CHECK_MODULES(FRONTEND_CORE, gtk+-3.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED 
gmodule-no-export-2.0 >= $GLIB_REQUIRED)
 
+# Although GTK+ 3.10 includes hi-dpi functionality, it does not require a cairo with
+# cairo_surface_set_device_scale(), which we also need if we're to support hi-dpi,
+# so we need check for that explicity.
+
+evince_save_LIBS=$LIBS
+LIBS="$LIBS $LIBVIEW_LIBS"
+AC_CHECK_FUNCS(cairo_surface_set_device_scale)
+LIBS=$evince_save_LIBS
+
+AC_MSG_CHECKING([for hi-dpi support])
+if test "$ac_cv_func_cairo_surface_set_device_scale" = yes ; then
+   AC_DEFINE([HAVE_HIDPI_SUPPORT], [1], [Define if cairo and GTK+ have necessary functions for hi-dpi])
+   AC_MSG_RESULT([yes])
+else
+   AC_MSG_RESULT([no])
+fi
+
 SHELL_PLATFORM_PKGS=
 case "$with_platform" in
   gnome)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]