[], [with_cairo=yes])
AM_CONDITIONAL([HAVE_CAIRO], [test "$with_cairo" != no])
if test "$with_cairo" != no; then
- PKG_CHECK_MODULES([CAIRO], [cairo >= 1.5 pango >= 1.22 pangocairo],
+ PKG_CHECK_MODULES([CAIRO], [cairo >= 1.5 pango >= 1.20 pangocairo],
[CPPFLAGS="$CPPFLAGS $CAIRO_CFLAGS"
AC_DEFINE([HAVE_CAIRO], 1,
[Define to 1 if Cairo and Pango are available.])],
- [PSPP_REQUIRED_PREREQ([cairo 1.5 or later and pango 1.22 or later (or use --without-cairo)])])
+ [PSPP_REQUIRED_PREREQ([cairo 1.5 or later and pango 1.20 or later (or use --without-cairo)])])
fi
# Support for GUI.
#include "xalloc.h"
+#if ! PANGO_VERSION_CHECK (2, 22, 0)
+int pango_layout_get_baseline (PangoLayout *layout);
+
+/* Shamelessly copied from the pango source */
+int
+pango_layout_get_baseline (PangoLayout *layout)
+{
+ int baseline;
+
+ /* XXX this is so inefficient */
+ PangoLayoutIter *iter = pango_layout_get_iter (layout);
+ baseline = pango_layout_iter_get_baseline (iter);
+ pango_layout_iter_free (iter);
+
+ return baseline;
+}
+#endif
+
+
+
const struct chart_colour data_colour[N_CHART_COLOURS] =
{
{ 165, 42, 42 }, /* brown */