[poppler] minor fix for CFLAGS about PNG headers
mpsuzuki at hiroshima-u.ac.jp
mpsuzuki at hiroshima-u.ac.jp
Thu Mar 22 23:36:55 PDT 2012
Hi,
During the cross build for MinGW environment, I found
that small minor fixes for PNG headers.
If PNG library is available, goo/PNGWriter.h includes
it (goo/Makefile.am appropriately reflect LIBPNG_CFLAGS).
But when SplashBitmap.cc (including PNGWriter.h) is
being compiled, LIBPNG_CFLAGS is not considered.
Thus, when PNG library is installed in irregular directory,
SplashBitmap.cc cannot be proprocessed correctly.
LIBPNG_CFLAGS should be added to INCLUDES by fixing
splash/Makefile.am.
Exactly same problem (PNGWriter.h) is found in
HtmlOutputDev.cc compilation, so utils/Makefile.am
should be improved.
I guess similar things are expected for JPEG and TIFF
libraries, but now LIBJPEG_CFLAGS, LIBTIFF_CFLAGS are
not handled by configure. Should I prepare some hooks
for them?
diff --git a/splash/Makefile.am b/splash/Makefile.am
index 914b308..afd31df 100644
--- a/splash/Makefile.am
+++ b/splash/Makefile.am
@@ -3,6 +3,10 @@ INCLUDES = \
-I$(top_srcdir)/goo \
$(FREETYPE_CFLAGS)
+if BUILD_LIBPNG
+INCLUDES += $(LIBPNG_CFLAGS)
+endif
+
noinst_LTLIBRARIES = libsplash.la
if ENABLE_XPDF_HEADERS
diff --git a/utils/Makefile.am b/utils/Makefile.am
index c0105d9..ad845c1 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -117,6 +117,12 @@ pdftohtml_SOURCES = \
HtmlUtils.h \
$(common)
+# HtmlOutputDev uses goo/PNGWriter.h that may depend on libpng header
+pdftohtml_CXXFLAGS = $(AM_CXXFLAGS)
+if BUILD_LIBPNG
+pdftohtml_CXXFLAGS += $(LIBPNG_CFLAGS)
+endif
+
pdfseparate_SOURCES = \
pdfseparate.cc \
$(common)
More information about the poppler
mailing list