summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2010-03-25 02:10:34 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2010-03-25 02:10:34 +0000
commit070351f7d6af3085cb160ac66ce34713e306b735 (patch)
tree349a0c63a6146af778bd7c3efa3cd807388417ae
parentAdding in assertions.h (diff)
downloadinkscape-070351f7d6af3085cb160ac66ce34713e306b735.tar.gz
inkscape-070351f7d6af3085cb160ac66ce34713e306b735.zip
Test Poppler colorspace API using trial compilation
rather than a version check; should fix LP #545580 Fixed bugs: - https://launchpad.net/bugs/545580 (bzr r9231)
-rw-r--r--configure.ac24
1 files changed, 23 insertions, 1 deletions
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 <GfxState.h>
+
+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 ******************************