From: Krzysztof KosiƄski Date: Thu, 25 Mar 2010 02:10:34 +0000 (+0100) Subject: Test Poppler colorspace API using trial compilation X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c94b03b7f9e7496d02296ce711f99dedf98e8d1a;p=inkscape.git Test Poppler colorspace API using trial compilation rather than a version check; should fix LP #545580 --- diff --git a/configure.ac b/configure.ac index d7c38a7c9..3835f620e 100644 --- a/configure.ac +++ b/configure.ac @@ -609,9 +609,31 @@ PKG_CHECK_MODULES(POPPLER_GFXFONT, poppler >= 0.8.3, popplernew=yes, popplernew= if test "x$popplernew" = "xyes"; then AC_DEFINE(POPPLER_NEW_GFXFONT, 1, [Use GfxFont from Poppler >= 0.8.3]) fi -PKG_CHECK_MODULES(POPPLER_COLORSPACE, poppler >= 0.12.2, popplercolor=yes, popplercolor=no) + +AC_MSG_CHECKING(for new color space API in Poppler) +ink_svd_CPPFLAGS=$CPPFLAGS +ink_svd_LIBS=$LIBS +CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS" +LIBS="$LIBS $POPPLER_LIBS" +popplercolor="no" +AC_COMPILE_IFELSE([ +#include + +int main() { + typedef GfxColorSpace *(*parse_p)(Object *, Gfx *); + parse_p p; + p = &GfxColorSpace::parse; + return 0; +} +], [popplercolor=yes]) +CPPFLAGS=$ink_svd_CPPFLAGS +LIBS=$ink_svd_LIBS + if test "x$popplercolor" = "xyes"; then AC_DEFINE(POPPLER_NEW_COLOR_SPACE_API, 1, [Use color space API from Poppler >= 0.12.2]) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) fi dnl ******************************