[poppler] Branch 'poppler-0.18' - configure.ac utils/Makefile.am
Adrian Johnson
ajohnson at kemper.freedesktop.org
Thu Dec 22 15:32:11 PST 2011
configure.ac | 14 ++++++++++++--
utils/Makefile.am | 4 ++--
2 files changed, 14 insertions(+), 4 deletions(-)
New commits:
commit e91e70f5a2084c16d664d49c6d30cfc244710db5
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Fri Dec 23 09:55:20 2011 +1030
autoconf: Check for cairo-ft and other cairo backends
so that CAIRO_LIBS includes the freetype dependency and pdftocairo
includes the dependencies for optional cairo backends.
Bug 43969
(cherry picked from commit ebfab832ab4f2642b9ab2ededd25de670a3c7147)
diff --git a/configure.ac b/configure.ac
index e828f30..28e30db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -379,9 +379,9 @@ AC_ARG_ENABLE(cairo-output,
enable_cairo_output=$enableval,
enable_cairo_output="try")
if test x$enable_cairo_output = xyes; then
- PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION)
+ PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION cairo-ft >= $CAIRO_VERSION)
elif test x$enable_cairo_output = xtry; then
- PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION,
+ PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION cairo-ft >= $CAIRO_VERSION,
[enable_cairo_output="yes"],
[enable_cairo_output="no"])
fi
@@ -392,6 +392,16 @@ AC_SUBST(CAIRO_LIBS)
AM_CONDITIONAL(BUILD_CAIRO_OUTPUT, test x$enable_cairo_output = xyes)
AH_TEMPLATE([HAVE_CAIRO], [Use cairo for rendering.])
if test x$enable_cairo_output = xyes; then
+ PDFTOCAIRO_DEPS="cairo cairo-ft"
+ dnl Check for optional cairo backends used by pdftocairo
+ PKG_CHECK_EXISTS(cairo-pdf, [PDFTOCAIRO_DEPS="$PDFTOCAIRO_DEPS cairo-pdf"], [])
+ PKG_CHECK_EXISTS(cairo-ps, [PDFTOCAIRO_DEPS="$PDFTOCAIRO_DEPS cairo-ps"], [])
+ PKG_CHECK_EXISTS(cairo-svg, [PDFTOCAIRO_DEPS="$PDFTOCAIRO_DEPS cairo-svg"], [])
+
+ PKG_CHECK_MODULES(PDFTOCAIRO, $PDFTOCAIRO_DEPS)
+ AC_SUBST(PDFTOCAIRO_CFLAGS)
+ AC_SUBST(PDFTOCAIRO_LIBS)
+
AC_DEFINE(HAVE_CAIRO)
CAIRO_FEATURE="#define POPPLER_HAS_CAIRO 1"
CAIRO_REQ="cairo"
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 144d812..951abdb 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -17,7 +17,7 @@ INCLUDES = \
-I$(top_srcdir)/poppler \
$(UTILS_CFLAGS) \
$(FONTCONFIG_CFLAGS) \
- $(CAIRO_CFLAGS)
+ $(PDFTOCAIRO_CFLAGS)
LDADD = \
$(top_builddir)/poppler/libpoppler.la \
@@ -32,7 +32,7 @@ pdftocairo_SOURCES = \
pdftocairo_LDADD = \
$(top_builddir)/poppler/libpoppler-cairo.la \
- $(LDADD) $(CAIRO_LIBS)
+ $(LDADD) $(PDFTOCAIRO_LIBS)
pdftocairo_binary = pdftocairo
More information about the poppler
mailing list