Commit ebfab832 authored by Adrian Johnson's avatar Adrian Johnson
Browse files

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
parent 388d72ac
......@@ -382,9 +382,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
......@@ -395,6 +395,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"
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment