Simplify and fix poppler discovery code

Now configure should abort in case poppler is not found (unless explicitly disabled)

I'm still not sure about the hard "poppler < 0.40" requirement
added by jpeg yesterday, we should fix the issue instead of
tell "we don't support it"
This commit is contained in:
Davide Andreoli 2016-06-09 12:33:10 +02:00
parent 8ce859f484
commit c5f689a154
2 changed files with 8 additions and 31 deletions

View File

@ -2862,37 +2862,14 @@ have_rsvg="no"
### Check needed dependency for each generic loader
if test "x${want_poppler}" = "xyes"; then
PKG_CHECK_EXISTS([poppler >= 0.12 poppler < 0.20],
[
poppler_pc="poppler >= 0.12 poppler < 0.20"
have_poppler="yes"
],
[have_poppler="no"])
PKG_CHECK_MODULES([POPPLER], [poppler >= 0.12 poppler < 0.40],
[have_poppler="yes"])
if test "x${have_poppler}" = "xno" ; then
PKG_CHECK_EXISTS([poppler >= 0.20 poppler < 0.31],
[
poppler_pc="poppler >= 0.20 poppler < 0.31"
AC_DEFINE(HAVE_POPPLER_020, 1, [Have poppler 0.20])
have_poppler="yes"
],
[have_poppler="no"])
fi
PKG_CHECK_EXISTS([poppler >= 0.20],
[AC_DEFINE(HAVE_POPPLER_020, 1, [Have poppler at least 0.20])])
if test "x${have_poppler}" = "xno" ; then
PKG_CHECK_EXISTS([poppler >= 0.31 poppler < 0.40],
[
poppler_pc="poppler >= 0.31"
AC_DEFINE(HAVE_POPPLER_031, 1, [Have poppler 0.31])
have_poppler="yes"
],
[have_poppler="no"])
fi
if test "x${have_poppler}" = "xyes" ; then
PKG_CHECK_MODULES([POPPLER], [${poppler_pc}],
[have_poppler="yes"])
fi
PKG_CHECK_EXISTS([poppler >= 0.31],
[AC_DEFINE(HAVE_POPPLER_031, 1, [Have poppler at least 0.31])])
fi
if test "x${want_spectre}" = "xyes"; then

View File

@ -161,7 +161,7 @@ void poppler_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED)
if (!output_dev)
return;
#if defined(HAVE_POPPLER_020) || defined(HAVE_POPPLER_031)
#ifdef HAVE_POPPLER_020
output_dev->startDoc(pdfdoc);
#else
output_dev->startDoc(pdfdoc->getXRef());
@ -174,7 +174,7 @@ void poppler_load_image(int size_w EINA_UNUSED, int size_h EINA_UNUSED)
output_dev->setVectorAntialias(EINA_TRUE);
#endif
#if defined(HAVE_POPPLER_020) || defined(HAVE_POPPLER_031)
#ifdef HAVE_POPPLER_020
page->displaySlice(output_dev, dpi, dpi,
0, false, false,
0, 0, width, height,