[poppler] minor fix for CFLAGS about PNG headers

Albert Astals Cid aacid at kde.org
Fri Mar 23 12:03:01 PDT 2012


El Divendres, 23 de març de 2012, a les 15:36:55, mpsuzuki at hiroshima-u.ac.jp 
va escriure:
> Hi,

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?

Please, and also could you send the patches you sent here as attachment 
insteaf of inline, makes much easier to apply them and make sure there was no 
whitespace problem.

Cheers,
  Albert

> 
> 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)
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler


More information about the poppler mailing list