Bug 25843 - Poppler does not detect libpng
Summary: Poppler does not detect libpng
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All Windows (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-01 02:42 UTC by Carlo Bramini
Modified: 2010-02-19 12:19 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Proposed patch (4.78 KB, patch)
2010-02-04 11:01 UTC, Carlo Bramini
Details | Splinter Review
0001-Use-PKG_CONFIG-to-search-for-libpng.patch (4.66 KB, patch)
2010-02-10 05:53 UTC, Hib Eris
Details | Splinter Review

Description Carlo Bramini 2010-01-01 02:42:05 UTC
Poppler does not detect the presence of libpng in mingw+msys and cygwin.
I believe it would be probably better to trash m4/libpng.m4 and simply poll libpng-config script for cflags and ldflags related to libpng.
Adding options like "--with-libpng-cflags=..." and "--with-libpng-ldflags=..." will be useful to manually force these properties.
Alternatively, instead of adding these options, the script could just test if LIBPNG_LIBS and LIBPNG_INCS are not empty, which means that those macros are declared externally.
A small verification test could also be done later to verify if retrieved options are good.
Comment 1 Albert Astals Cid 2010-01-01 16:23:46 UTC
Patches welcome, autohell stuff is something i don't want to deal with and much less if i don't have the platform that has the problem to test with
Comment 2 Carlo Bramini 2010-02-04 11:01:58 UTC
Created attachment 33079 [details] [review]
Proposed patch

I tried to fix this bug by doing what I have proposed in the first comment.
Comment 3 Hib Eris 2010-02-10 05:53:13 UTC
Created attachment 33213 [details] [review]
0001-Use-PKG_CONFIG-to-search-for-libpng.patch

I would prefer poppler to use pkg-config to detect libpng. I think that is the standard nowadays, and poppler uses it for most other libraries as well. It also makes cross compiling easier.

With this patch, I can cross compile poppler on linux to windows with a mingw compiler. I think it will work with cygwin and mingw+msys on windows as well. 
Carlo, can you please test this patch for me on those platforms?
Comment 4 Albert Astals Cid 2010-02-16 14:53:59 UTC
I think i also prefer Hib patch, Carlo can you test it?
Comment 5 Carlo Bramini 2010-02-18 04:52:42 UTC
I just appied the patch for using PKG_CONFIG for libpng detection.
It worked fine in mingw+msys and cygwin: library has been detected correctly during configuration and it has been used during build process.
It worked great for me so, if it will work on other supported platforms too, I agree on this solution!
I hope to see a new version with Windows support soon.
Comment 6 Albert Astals Cid 2010-02-19 12:19:07 UTC
pushed
  


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.