From 648289c639618cc31394f889f6e329ddcaca41ee Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 10 Jan 2008 14:36:57 +0000 Subject: [PATCH] [configure.in] Add paranoid double checking for (svg|pdf)2png Due to my incomplete cross-build environment, configure detects the presence of rsvg and poppler, but they cannot be used. To make my life easier, add a check similar to that used for fontconfig to ensure the libraries are usable before compiling the optional test utilites. --- configure.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index c70b0435c..b0c592900 100644 --- a/configure.in +++ b/configure.in @@ -609,9 +609,10 @@ test_pdf=no if test "x$use_pdf" = "xyes"; then poppler_DEPENDENCY="poppler-glib >= $POPPLER_VERSION_REQUIRED" PKG_CHECK_MODULES(POPPLER, $poppler_DEPENDENCY pango gtk+-2.0, + [_CHECK_FUNCS_WITH_FLAGS(poppler_page_render_to_pixbuf, [$POPPLER_CFLAGS], [$POPPLER_LIBS], [test_pdf=yes], [AC_MSG_RESULT(no) - test_pdf="no (requires $poppler_DEPENDENCY)"]) + test_pdf="no (requires $poppler_DEPENDENCY)"])]) if test "x$test_pdf" = "xyes"; then AC_DEFINE([CAIRO_CAN_TEST_PDF_SURFACE], 1, [Define to 1 if the PDF backend can be tested (need poppler and other dependencies for pdf2png)]) else @@ -638,9 +639,10 @@ test_svg=no if test "x$use_svg" = "xyes"; then librsvg_DEPENDENCY="librsvg-2.0 >= $LIBRSVG_VERSION_REQUIRED" PKG_CHECK_MODULES(LIBRSVG, $librsvg_DEPENDENCY gdk-2.0, + [_CHECK_FUNCS_WITH_FLAGS(rsvg_pixbuf_from_file, [$LIBRSVG_CFLAGS], [$LIBRSVG_LIBS], [test_svg=yes], [AC_MSG_RESULT(no) - test_svg="no (requires $librsvg_DEPENDENCY)"]) + test_svg="no (requires $librsvg_DEPENDENCY)"])]) if test "x$test_svg" = "xyes"; then AC_DEFINE([CAIRO_CAN_TEST_SVG_SURFACE], 1, [Define to 1 if the SVG backend can be tested]) else