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.
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
Created attachment 33079 [details] [review] Proposed patch I tried to fix this bug by doing what I have proposed in the first comment.
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?
I think i also prefer Hib patch, Carlo can you test it?
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.
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.