Configuring PHP GD on Ubuntu 11.04 "Natty"
This is a post for the "so I can find it again" category. (It is also a test for the new blogging infrastructure that Oracle migrated to last week).
After an upgrade to Ubuntu 11.04 on one 32 bit machine, my simple custom script to build PHP 5.3 from source failed. The script isn't complex, pulling in a couple of extensions that I use for sanity checking the OCI8 extension. I use the GD extension to generate some simple graphs.
My configuration command was like:./configure ... --with-gd --with-jpeg-dir --with-png-dir ...
which gave the error:configure: error: libjpeg.(a|so) not found
This release of Ubuntu has moved around some standard libraries. After some fiddling around, checking the 'configure' options and the GD extension config.m4 file intention, the solution for me was simple. Add the --with-libdir=lib/i386-linux-gnu option to configure. I haven't tried this with other extensions so YMMV.