Skip to content

Commit

Permalink
Add a configure check for hi-dpi support
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Owen W. Taylor authored and Germán Poo-Caamaño committed May 9, 2014
1 parent ce23d0d commit 8b965e7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8b965e7

Please sign in to comment.