0
votes

I've installed libpng 1.2, 1.4 and 1.6 from source in MSYS and MingW because I want to compile pdftopng. Used the makefiles included with libpng for msys/MinGW and they seemed to have installed correctly.

Run the xpdf configure script with MSYS's bash, and it fails to find libpng. As part of the output, I get:

checking for png.h presence... no

checking for png.h... no

Couldn't find libpng -- you will not be able to build pdftohtml or pdftopng

So I search for png.h in my MinGW directory and find them in several places:

C:\MinGW\msys\1.0\local\include\libpng

C:\MinGW\msys\1.0\local\include\libpng16

C:\MinGW\msys\1.0\local\include

C:\MinGW\msys\1.0\include\libpng14

C:\MinGW\msys\1.0\include

C:\MinGW\msys\1.0\include\libpng12

C:\MinGW\msys\1.0\include\libpng

I'm sure I'm missing something simple, but I'm a little out of my element. I've gotten a few parts of xpdf that don't require libpng to compile but I'm completely stumped here.

1
There are some command-line options for the configure script to specify the location of the libpng include files (--with-libpng-includes=DIR) and library (--with-libpng-library=PATH). Do those help?Ian Abbott
Yeah. I actually just found those. Even passing --help to configure scripts was new to me. Providing those switches with the appropriate paths now makes it choke searching for png_write_row in -lpng, but that's at least a new problem one step closer to the desired result.user3137716

1 Answers

0
votes

As Ian Abbott pointed out, I needed to pass (--with-libpng-includes=DIR) and library (--with-libpng-library=PATH) parameters to the configure script.