./configure --with-apxs2=/usr/local/apache2/bin/apxs \ --with-mysql \ --with-gd
configure command fails, ending with the following two lines of error output:
If configure fails try --with-jpeg-dir=<DIR> configure: error: libpng.(a|so) not found.
After digging around, I finally figured out that not only did I have to install
libjpeg, as the installation document suggests, but I also had to install the "devel" versions of these two libraries to get
configure to work, like this:
yum install libpng yum install libpng-devel yum install libjpeg yum install libjpeg-devel
After installing all of these libraries, the PHP
configure script ran properly, as did the
make install commands.